@modern-js/utils 2.12.1-alpha.3 → 2.13.0
Sign up to get free protection for your applications and to get access to all the features.
- 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/CHANGELOG.md
CHANGED
@@ -2,8 +2,22 @@ var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
5
6
|
var __getProtoOf = Object.getPrototypeOf;
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
10
|
+
var __spreadValues = (a, b) => {
|
11
|
+
for (var prop in b || (b = {}))
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
14
|
+
if (__getOwnPropSymbols)
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
16
|
+
if (__propIsEnum.call(b, prop))
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
18
|
+
}
|
19
|
+
return a;
|
20
|
+
};
|
7
21
|
var __export = (target, all) => {
|
8
22
|
for (var name in all)
|
9
23
|
__defProp(target, name, { get: all[name], enumerable: true });
|
@@ -74,10 +88,7 @@ const getAliasConfig = (aliasOption, option) => {
|
|
74
88
|
const baseUrl = (_a = tsconfig == null ? void 0 : tsconfig.compilerOptions) == null ? void 0 : _a.baseUrl;
|
75
89
|
return {
|
76
90
|
absoluteBaseUrl: baseUrl ? import_path.default.join(option.appDirectory, baseUrl) : option.appDirectory,
|
77
|
-
paths: {
|
78
|
-
...alias,
|
79
|
-
...(_b = tsconfig == null ? void 0 : tsconfig.compilerOptions) == null ? void 0 : _b.paths
|
80
|
-
},
|
91
|
+
paths: __spreadValues(__spreadValues({}, alias), (_b = tsconfig == null ? void 0 : tsconfig.compilerOptions) == null ? void 0 : _b.paths),
|
81
92
|
isTsPath: true,
|
82
93
|
isTsProject
|
83
94
|
};
|
@@ -25,6 +25,26 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
25
25
|
mod
|
26
26
|
));
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
28
|
+
var __async = (__this, __arguments, generator) => {
|
29
|
+
return new Promise((resolve, reject) => {
|
30
|
+
var fulfilled = (value) => {
|
31
|
+
try {
|
32
|
+
step(generator.next(value));
|
33
|
+
} catch (e) {
|
34
|
+
reject(e);
|
35
|
+
}
|
36
|
+
};
|
37
|
+
var rejected = (value) => {
|
38
|
+
try {
|
39
|
+
step(generator.throw(value));
|
40
|
+
} catch (e) {
|
41
|
+
reject(e);
|
42
|
+
}
|
43
|
+
};
|
44
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
45
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
46
|
+
});
|
47
|
+
};
|
28
48
|
var analyzeProject_exports = {};
|
29
49
|
__export(analyzeProject_exports, {
|
30
50
|
isApiOnly: () => isApiOnly,
|
@@ -34,16 +54,16 @@ module.exports = __toCommonJS(analyzeProject_exports);
|
|
34
54
|
var path = __toESM(require("path"));
|
35
55
|
var import_commands = require("./commands");
|
36
56
|
var import_compiled = require("./compiled");
|
37
|
-
const isApiOnly =
|
57
|
+
const isApiOnly = (appDirectory, entryDir) => __async(void 0, null, function* () {
|
38
58
|
const srcDir = path.join(appDirectory, entryDir != null ? entryDir : "src");
|
39
|
-
const existSrc =
|
59
|
+
const existSrc = yield import_compiled.fs.pathExists(srcDir);
|
40
60
|
const options = (0, import_compiled.minimist)((0, import_commands.getArgv)());
|
41
61
|
return !existSrc || Boolean(options["api-only"]);
|
42
|
-
};
|
43
|
-
const isWebOnly =
|
62
|
+
});
|
63
|
+
const isWebOnly = () => __async(void 0, null, function* () {
|
44
64
|
const options = (0, import_compiled.minimist)((0, import_commands.getArgv)());
|
45
65
|
return Boolean(options["web-only"]);
|
46
|
-
};
|
66
|
+
});
|
47
67
|
// Annotate the CommonJS export names for ESM import in node:
|
48
68
|
0 && (module.exports = {
|
49
69
|
isApiOnly,
|
@@ -1,7 +1,21 @@
|
|
1
1
|
var __defProp = Object.defineProperty;
|
2
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
4
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
8
|
+
var __spreadValues = (a, b) => {
|
9
|
+
for (var prop in b || (b = {}))
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
12
|
+
if (__getOwnPropSymbols)
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
14
|
+
if (__propIsEnum.call(b, prop))
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
16
|
+
}
|
17
|
+
return a;
|
18
|
+
};
|
5
19
|
var __export = (target, all) => {
|
6
20
|
for (var name in all)
|
7
21
|
__defProp(target, name, { get: all[name], enumerable: true });
|
@@ -84,11 +98,7 @@ const modifyPresetOptions = (presetName, options, presets = []) => {
|
|
84
98
|
presets.forEach((preset, index) => {
|
85
99
|
if (Array.isArray(preset)) {
|
86
100
|
if (typeof preset[0] === "string" && (0, import_path2.normalizeToPosixPath)(preset[0]).includes(presetName)) {
|
87
|
-
preset[1] = {
|
88
|
-
...preset[1] || {},
|
89
|
-
...options
|
90
|
-
// `options` is specific to different presets
|
91
|
-
};
|
101
|
+
preset[1] = __spreadValues(__spreadValues({}, preset[1] || {}), options);
|
92
102
|
}
|
93
103
|
} else if (typeof preset === "string" && (0, import_path2.normalizeToPosixPath)(preset).includes(presetName)) {
|
94
104
|
presets[index] = [preset, options];
|
@@ -114,10 +124,7 @@ const getBabelUtils = (config) => {
|
|
114
124
|
};
|
115
125
|
const applyUserBabelConfig = (defaultOptions, userBabelConfig, extraBabelUtils) => {
|
116
126
|
if (userBabelConfig) {
|
117
|
-
const babelUtils = {
|
118
|
-
...getBabelUtils(defaultOptions),
|
119
|
-
...extraBabelUtils
|
120
|
-
};
|
127
|
+
const babelUtils = __spreadValues(__spreadValues({}, getBabelUtils(defaultOptions)), extraBabelUtils);
|
121
128
|
return (0, import_applyOptionsChain.applyOptionsChain)(defaultOptions, userBabelConfig || {}, babelUtils);
|
122
129
|
}
|
123
130
|
return defaultOptions;
|
@@ -1,7 +1,21 @@
|
|
1
1
|
var __defProp = Object.defineProperty;
|
2
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
4
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
8
|
+
var __spreadValues = (a, b) => {
|
9
|
+
for (var prop in b || (b = {}))
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
12
|
+
if (__getOwnPropSymbols)
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
14
|
+
if (__propIsEnum.call(b, prop))
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
16
|
+
}
|
17
|
+
return a;
|
18
|
+
};
|
5
19
|
var __export = (target, all) => {
|
6
20
|
for (var name in all)
|
7
21
|
__defProp(target, name, { get: all[name], enumerable: true });
|
@@ -35,11 +49,10 @@ const dynamicImport = new Function(
|
|
35
49
|
"return import(modulePath)"
|
36
50
|
);
|
37
51
|
const requireExistModule = (filename, opt) => {
|
38
|
-
const final = {
|
52
|
+
const final = __spreadValues({
|
39
53
|
extensions: [".ts", ".js"],
|
40
|
-
interop: true
|
41
|
-
|
42
|
-
};
|
54
|
+
interop: true
|
55
|
+
}, opt);
|
43
56
|
const exist = (0, import_findExists.findExists)(final.extensions.map((ext) => `${filename}${ext}`));
|
44
57
|
if (!exist) {
|
45
58
|
return null;
|
@@ -0,0 +1,43 @@
|
|
1
|
+
export { default as fs } from '../compiled/fs-extra';
|
2
|
+
export { default as ora } from '../compiled/ora';
|
3
|
+
export { default as glob } from '../compiled/glob';
|
4
|
+
export { default as yaml } from '../compiled/js-yaml';
|
5
|
+
export { default as chalk } from '../compiled/chalk';
|
6
|
+
export { default as debug } from '../compiled/debug';
|
7
|
+
export { default as slash } from '../compiled/slash';
|
8
|
+
export { default as execa } from '../compiled/execa';
|
9
|
+
export { default as json5 } from '../compiled/json5';
|
10
|
+
export { default as upath } from '../compiled/upath';
|
11
|
+
export { default as pkgUp } from '../compiled/pkg-up';
|
12
|
+
export { nanoid } from '../compiled/nanoid';
|
13
|
+
export { default as semver } from '../compiled/semver';
|
14
|
+
export { default as dotenv } from '../compiled/dotenv';
|
15
|
+
export { default as lodash } from '../compiled/lodash';
|
16
|
+
export { default as globby } from '../compiled/globby';
|
17
|
+
export { default as address } from '../compiled/address';
|
18
|
+
export { default as signale } from '../compiled/signale';
|
19
|
+
export { default as urlJoin } from '../compiled/url-join';
|
20
|
+
export { default as minimist } from '../compiled/minimist';
|
21
|
+
export { default as fastGlob } from '../compiled/fast-glob';
|
22
|
+
export { default as filesize } from '../compiled/filesize';
|
23
|
+
export { default as gzipSize } from '../compiled/gzip-size';
|
24
|
+
export { default as stripAnsi } from '../compiled/strip-ansi';
|
25
|
+
export { default as dotenvExpand } from '../compiled/dotenv-expand';
|
26
|
+
export { default as browserslist } from '../compiled/browserslist';
|
27
|
+
export { default as recursiveReaddir } from '../compiled/recursive-readdir';
|
28
|
+
export { program, Command } from '../compiled/commander';
|
29
|
+
export { Signale } from '../compiled/signale';
|
30
|
+
export type { SignaleOptions } from '../compiled/signale';
|
31
|
+
export type { IOptions as GlobOptions } from '../compiled/glob';
|
32
|
+
export type { GlobbyOptions } from '../compiled/globby';
|
33
|
+
export type { FSWatcher, WatchOptions } from '../compiled/chokidar';
|
34
|
+
export type { ExecaError } from '../compiled/execa';
|
35
|
+
export type { default as WebpackChain } from '../compiled/webpack-chain';
|
36
|
+
/**
|
37
|
+
* Lazy import some expensive modules that will slow down startup speed.
|
38
|
+
* Notice that `csmith-tools build` can not bundle lazy imported modules.
|
39
|
+
*/
|
40
|
+
|
41
|
+
export declare const mime: typeof import('../compiled/mime-types');
|
42
|
+
export declare const chokidar: typeof import('../compiled/chokidar');
|
43
|
+
export declare const inquirer: typeof import('../compiled/inquirer');
|
@@ -3,4 +3,4 @@
|
|
3
3
|
* @param scope - Custom module name of your debug function.
|
4
4
|
* @returns Debug function which namespace start with modern-js:.
|
5
5
|
*/
|
6
|
-
export declare const createDebugger: (scope: string) => import("
|
6
|
+
export declare const createDebugger: (scope: string) => import("../compiled/debug").Debugger;
|
@@ -15,17 +15,37 @@ var __copyProps = (to, from, except, desc) => {
|
|
15
15
|
return to;
|
16
16
|
};
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
18
|
+
var __async = (__this, __arguments, generator) => {
|
19
|
+
return new Promise((resolve, reject) => {
|
20
|
+
var fulfilled = (value) => {
|
21
|
+
try {
|
22
|
+
step(generator.next(value));
|
23
|
+
} catch (e) {
|
24
|
+
reject(e);
|
25
|
+
}
|
26
|
+
};
|
27
|
+
var rejected = (value) => {
|
28
|
+
try {
|
29
|
+
step(generator.throw(value));
|
30
|
+
} catch (e) {
|
31
|
+
reject(e);
|
32
|
+
}
|
33
|
+
};
|
34
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
35
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
36
|
+
});
|
37
|
+
};
|
18
38
|
var emptyDir_exports = {};
|
19
39
|
__export(emptyDir_exports, {
|
20
40
|
emptyDir: () => emptyDir
|
21
41
|
});
|
22
42
|
module.exports = __toCommonJS(emptyDir_exports);
|
23
43
|
var import_compiled = require("./compiled");
|
24
|
-
const emptyDir =
|
25
|
-
if (
|
26
|
-
|
44
|
+
const emptyDir = (dir) => __async(void 0, null, function* () {
|
45
|
+
if (yield import_compiled.fs.pathExists(dir)) {
|
46
|
+
yield import_compiled.fs.emptyDir(dir);
|
27
47
|
}
|
28
|
-
};
|
48
|
+
});
|
29
49
|
// Annotate the CommonJS export names for ESM import in node:
|
30
50
|
0 && (module.exports = {
|
31
51
|
emptyDir
|
@@ -1,7 +1,21 @@
|
|
1
1
|
var __defProp = Object.defineProperty;
|
2
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
4
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
8
|
+
var __spreadValues = (a, b) => {
|
9
|
+
for (var prop in b || (b = {}))
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
12
|
+
if (__getOwnPropSymbols)
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
14
|
+
if (__propIsEnum.call(b, prop))
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
16
|
+
}
|
17
|
+
return a;
|
18
|
+
};
|
5
19
|
var __export = (target, all) => {
|
6
20
|
for (var name in all)
|
7
21
|
__defProp(target, name, { get: all[name], enumerable: true });
|
@@ -28,7 +42,7 @@ const getEntryOptions = (name, baseOptions, optionsByEntries, packageName) => {
|
|
28
42
|
if (optionsByEntry === void 0 && name === import_constants.MAIN_ENTRY_NAME && packageName) {
|
29
43
|
optionsByEntry = getOptionsByEntryName(packageName, optionsByEntries);
|
30
44
|
}
|
31
|
-
return optionsByEntry !== void 0 ? (0, import_is.isPlainObject)(optionsByEntry) && (0, import_is.isPlainObject)(baseOptions) ? {
|
45
|
+
return optionsByEntry !== void 0 ? (0, import_is.isPlainObject)(optionsByEntry) && (0, import_is.isPlainObject)(baseOptions) ? __spreadValues(__spreadValues({}, baseOptions), optionsByEntry) : optionsByEntry : baseOptions;
|
32
46
|
} else {
|
33
47
|
return baseOptions;
|
34
48
|
}
|
@@ -25,6 +25,26 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
25
25
|
mod
|
26
26
|
));
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
28
|
+
var __async = (__this, __arguments, generator) => {
|
29
|
+
return new Promise((resolve, reject) => {
|
30
|
+
var fulfilled = (value) => {
|
31
|
+
try {
|
32
|
+
step(generator.next(value));
|
33
|
+
} catch (e) {
|
34
|
+
reject(e);
|
35
|
+
}
|
36
|
+
};
|
37
|
+
var rejected = (value) => {
|
38
|
+
try {
|
39
|
+
step(generator.throw(value));
|
40
|
+
} catch (e) {
|
41
|
+
reject(e);
|
42
|
+
}
|
43
|
+
};
|
44
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
45
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
46
|
+
});
|
47
|
+
};
|
28
48
|
var getPackageManager_exports = {};
|
29
49
|
__export(getPackageManager_exports, {
|
30
50
|
getPackageManager: () => getPackageManager
|
@@ -35,29 +55,31 @@ var import_path = __toESM(require("path"));
|
|
35
55
|
var import_compiled = require("./compiled");
|
36
56
|
var import_nodeEnv = require("./nodeEnv");
|
37
57
|
const MAX_TIMES = 5;
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
times
|
43
|
-
|
58
|
+
function getPackageManager() {
|
59
|
+
return __async(this, arguments, function* (cwd = process.cwd()) {
|
60
|
+
let appDirectory = cwd;
|
61
|
+
let times = 0;
|
62
|
+
while (import_os.default.homedir() !== appDirectory && times < MAX_TIMES) {
|
63
|
+
times++;
|
64
|
+
if (import_compiled.fs.existsSync(import_path.default.resolve(appDirectory, "pnpm-lock.yaml"))) {
|
65
|
+
return "pnpm";
|
66
|
+
}
|
67
|
+
if (import_compiled.fs.existsSync(import_path.default.resolve(appDirectory, "yarn.lock"))) {
|
68
|
+
return "yarn";
|
69
|
+
}
|
70
|
+
if (import_compiled.fs.existsSync(import_path.default.resolve(appDirectory, "package-lock.json"))) {
|
71
|
+
return "npm";
|
72
|
+
}
|
73
|
+
appDirectory = import_path.default.join(appDirectory, "..");
|
74
|
+
}
|
75
|
+
if (yield (0, import_nodeEnv.canUsePnpm)()) {
|
44
76
|
return "pnpm";
|
45
77
|
}
|
46
|
-
if (
|
78
|
+
if (yield (0, import_nodeEnv.canUseYarn)()) {
|
47
79
|
return "yarn";
|
48
80
|
}
|
49
|
-
|
50
|
-
|
51
|
-
}
|
52
|
-
appDirectory = import_path.default.join(appDirectory, "..");
|
53
|
-
}
|
54
|
-
if (await (0, import_nodeEnv.canUsePnpm)()) {
|
55
|
-
return "pnpm";
|
56
|
-
}
|
57
|
-
if (await (0, import_nodeEnv.canUseYarn)()) {
|
58
|
-
return "yarn";
|
59
|
-
}
|
60
|
-
return "npm";
|
81
|
+
return "npm";
|
82
|
+
});
|
61
83
|
}
|
62
84
|
// Annotate the CommonJS export names for ESM import in node:
|
63
85
|
0 && (module.exports = {
|
@@ -25,6 +25,26 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
25
25
|
mod
|
26
26
|
));
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
28
|
+
var __async = (__this, __arguments, generator) => {
|
29
|
+
return new Promise((resolve, reject) => {
|
30
|
+
var fulfilled = (value) => {
|
31
|
+
try {
|
32
|
+
step(generator.next(value));
|
33
|
+
} catch (e) {
|
34
|
+
reject(e);
|
35
|
+
}
|
36
|
+
};
|
37
|
+
var rejected = (value) => {
|
38
|
+
try {
|
39
|
+
step(generator.throw(value));
|
40
|
+
} catch (e) {
|
41
|
+
reject(e);
|
42
|
+
}
|
43
|
+
};
|
44
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
45
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
46
|
+
});
|
47
|
+
};
|
28
48
|
var getPort_exports = {};
|
29
49
|
__export(getPort_exports, {
|
30
50
|
getPort: () => getPort
|
@@ -33,10 +53,10 @@ module.exports = __toCommonJS(getPort_exports);
|
|
33
53
|
var import_net = __toESM(require("net"));
|
34
54
|
var import_compiled = require("./compiled");
|
35
55
|
var import_logger = require("./logger");
|
36
|
-
const getPort =
|
56
|
+
const getPort = (_0, ..._1) => __async(void 0, [_0, ..._1], function* (port, {
|
37
57
|
tryLimits = 20,
|
38
58
|
strictPort = false
|
39
|
-
} = {})
|
59
|
+
} = {}) {
|
40
60
|
if (typeof port === "string") {
|
41
61
|
port = parseInt(port, 10);
|
42
62
|
}
|
@@ -48,7 +68,7 @@ const getPort = async (port, {
|
|
48
68
|
let attempts = 0;
|
49
69
|
while (!found && attempts <= tryLimits) {
|
50
70
|
try {
|
51
|
-
|
71
|
+
yield new Promise((resolve, reject) => {
|
52
72
|
const server = import_net.default.createServer();
|
53
73
|
server.unref();
|
54
74
|
server.on("error", reject);
|
@@ -85,7 +105,7 @@ const getPort = async (port, {
|
|
85
105
|
}
|
86
106
|
}
|
87
107
|
return port;
|
88
|
-
};
|
108
|
+
});
|
89
109
|
// Annotate the CommonJS export names for ESM import in node:
|
90
110
|
0 && (module.exports = {
|
91
111
|
getPort
|
@@ -25,6 +25,26 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
25
25
|
mod
|
26
26
|
));
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
28
|
+
var __async = (__this, __arguments, generator) => {
|
29
|
+
return new Promise((resolve, reject) => {
|
30
|
+
var fulfilled = (value) => {
|
31
|
+
try {
|
32
|
+
step(generator.next(value));
|
33
|
+
} catch (e) {
|
34
|
+
reject(e);
|
35
|
+
}
|
36
|
+
};
|
37
|
+
var rejected = (value) => {
|
38
|
+
try {
|
39
|
+
step(generator.throw(value));
|
40
|
+
} catch (e) {
|
41
|
+
reject(e);
|
42
|
+
}
|
43
|
+
};
|
44
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
45
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
46
|
+
});
|
47
|
+
};
|
28
48
|
var getServerConfig_exports = {};
|
29
49
|
__export(getServerConfig_exports, {
|
30
50
|
getServerConfig: () => getServerConfig
|
@@ -33,14 +53,14 @@ module.exports = __toCommonJS(getServerConfig_exports);
|
|
33
53
|
var path = __toESM(require("path"));
|
34
54
|
var import_constants = require("./constants");
|
35
55
|
var import_findExists = require("./findExists");
|
36
|
-
const getServerConfig =
|
56
|
+
const getServerConfig = (appDirectory, configFile) => __async(void 0, null, function* () {
|
37
57
|
const configFilePath = (0, import_findExists.findExists)(
|
38
58
|
import_constants.CONFIG_FILE_EXTENSIONS.map(
|
39
59
|
(extension) => path.resolve(appDirectory, `${configFile}${extension}`)
|
40
60
|
)
|
41
61
|
);
|
42
62
|
return configFilePath;
|
43
|
-
};
|
63
|
+
});
|
44
64
|
// Annotate the CommonJS export names for ESM import in node:
|
45
65
|
0 && (module.exports = {
|
46
66
|
getServerConfig
|
@@ -2,8 +2,22 @@ var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
5
6
|
var __getProtoOf = Object.getPrototypeOf;
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
10
|
+
var __spreadValues = (a, b) => {
|
11
|
+
for (var prop in b || (b = {}))
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
14
|
+
if (__getOwnPropSymbols)
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
16
|
+
if (__propIsEnum.call(b, prop))
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
18
|
+
}
|
19
|
+
return a;
|
20
|
+
};
|
7
21
|
var __export = (target, all) => {
|
8
22
|
for (var name in all)
|
9
23
|
__defProp(target, name, { get: all[name], enumerable: true });
|
@@ -74,11 +88,8 @@ const DEFAULT_CONFIG = {
|
|
74
88
|
class Logger {
|
75
89
|
constructor(options = {}) {
|
76
90
|
this.level = options.level || LOG_TYPES.log.level;
|
77
|
-
this.config = {
|
78
|
-
this.types = {
|
79
|
-
...LOG_TYPES,
|
80
|
-
...options.types || {}
|
81
|
-
};
|
91
|
+
this.config = __spreadValues(__spreadValues({}, DEFAULT_CONFIG), options.config || {});
|
92
|
+
this.types = __spreadValues(__spreadValues({}, LOG_TYPES), options.types || {});
|
82
93
|
this.longestLabel = this.getLongestLabel();
|
83
94
|
Object.keys(this.types).forEach((type) => {
|
84
95
|
this[type] = this._log.bind(this, type);
|
@@ -2,8 +2,22 @@ var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
5
6
|
var __getProtoOf = Object.getPrototypeOf;
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
10
|
+
var __spreadValues = (a, b) => {
|
11
|
+
for (var prop in b || (b = {}))
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
14
|
+
if (__getOwnPropSymbols)
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
16
|
+
if (__propIsEnum.call(b, prop))
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
18
|
+
}
|
19
|
+
return a;
|
20
|
+
};
|
7
21
|
var __export = (target, all) => {
|
8
22
|
for (var name in all)
|
9
23
|
__defProp(target, name, { get: all[name], enumerable: true });
|
@@ -63,10 +77,7 @@ const isModernjsMonorepo = (root) => {
|
|
63
77
|
return false;
|
64
78
|
}
|
65
79
|
const json = JSON.parse(import_fs.default.readFileSync(pkgJsonPath, "utf8"));
|
66
|
-
const deps = {
|
67
|
-
...json.dependencies || {},
|
68
|
-
...json.devDependencies || {}
|
69
|
-
};
|
80
|
+
const deps = __spreadValues(__spreadValues({}, json.dependencies || {}), json.devDependencies || {});
|
70
81
|
return Boolean(deps["@modern-js/monorepo-tools"]);
|
71
82
|
};
|
72
83
|
const findMonorepoRoot = (appDirectory, maxDepth = PACKAGE_MAX_DEPTH) => {
|
package/dist/nodeEnv.js
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
+
var __export = (target, all) => {
|
6
|
+
for (var name in all)
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
8
|
+
};
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
11
|
+
for (let key of __getOwnPropNames(from))
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
14
|
+
}
|
15
|
+
return to;
|
16
|
+
};
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
18
|
+
var __async = (__this, __arguments, generator) => {
|
19
|
+
return new Promise((resolve, reject) => {
|
20
|
+
var fulfilled = (value) => {
|
21
|
+
try {
|
22
|
+
step(generator.next(value));
|
23
|
+
} catch (e) {
|
24
|
+
reject(e);
|
25
|
+
}
|
26
|
+
};
|
27
|
+
var rejected = (value) => {
|
28
|
+
try {
|
29
|
+
step(generator.throw(value));
|
30
|
+
} catch (e) {
|
31
|
+
reject(e);
|
32
|
+
}
|
33
|
+
};
|
34
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
35
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
36
|
+
});
|
37
|
+
};
|
38
|
+
var nodeEnv_exports = {};
|
39
|
+
__export(nodeEnv_exports, {
|
40
|
+
canUseNpm: () => canUseNpm,
|
41
|
+
canUsePnpm: () => canUsePnpm,
|
42
|
+
canUseYarn: () => canUseYarn
|
43
|
+
});
|
44
|
+
module.exports = __toCommonJS(nodeEnv_exports);
|
45
|
+
var import_compiled = require("./compiled");
|
46
|
+
function canUseNpm() {
|
47
|
+
return __async(this, null, function* () {
|
48
|
+
try {
|
49
|
+
yield (0, import_compiled.execa)("npm", ["--version"], { env: process.env });
|
50
|
+
return true;
|
51
|
+
} catch (e) {
|
52
|
+
return false;
|
53
|
+
}
|
54
|
+
});
|
55
|
+
}
|
56
|
+
function canUseYarn() {
|
57
|
+
return __async(this, null, function* () {
|
58
|
+
try {
|
59
|
+
yield (0, import_compiled.execa)("yarn", ["--version"], { env: process.env });
|
60
|
+
return true;
|
61
|
+
} catch (e) {
|
62
|
+
return false;
|
63
|
+
}
|
64
|
+
});
|
65
|
+
}
|
66
|
+
function canUsePnpm() {
|
67
|
+
return __async(this, null, function* () {
|
68
|
+
try {
|
69
|
+
yield (0, import_compiled.execa)("pnpm", ["--version"], { env: process.env });
|
70
|
+
return true;
|
71
|
+
} catch (e) {
|
72
|
+
return false;
|
73
|
+
}
|
74
|
+
});
|
75
|
+
}
|
76
|
+
// Annotate the CommonJS export names for ESM import in node:
|
77
|
+
0 && (module.exports = {
|
78
|
+
canUseNpm,
|
79
|
+
canUsePnpm,
|
80
|
+
canUseYarn
|
81
|
+
});
|
@@ -56,7 +56,7 @@ function applyMatcherReplacement(matchers, str, options = {}) {
|
|
56
56
|
const createDefaultPathMatchers = (root) => {
|
57
57
|
const ret = [
|
58
58
|
{
|
59
|
-
match:
|
59
|
+
match: new RegExp("(?<=\\/)(\\.pnpm\\/.+?\\/node_modules)(?=\\/)"),
|
60
60
|
mark: "pnpmInner"
|
61
61
|
}
|
62
62
|
];
|