@modern-js/utils 2.13.4 → 2.14.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +29 -0
- package/dist/{alias.js → cjs/alias.js} +4 -15
- package/dist/{analyzeProject.js → cjs/analyzeProject.js} +5 -25
- package/dist/{babel.js → cjs/babel.js} +9 -16
- package/dist/{compatRequire.js → cjs/compatRequire.js} +4 -17
- package/dist/{constants.js → cjs/constants.js} +7 -13
- package/dist/cjs/emptyDir.js +32 -0
- package/dist/{getEntryOptions.js → cjs/getEntryOptions.js} +1 -15
- package/dist/{getPackageManager.js → cjs/getPackageManager.js} +19 -41
- package/dist/{getPort.js → cjs/getPort.js} +4 -24
- package/dist/{getServerConfig.js → cjs/getServerConfig.js} +2 -22
- package/dist/{is → cjs/is}/index.js +3 -2
- package/dist/{logger.js → cjs/logger.js} +5 -16
- package/dist/{monorepo.js → cjs/monorepo.js} +4 -15
- package/dist/cjs/nodeEnv.js +55 -0
- package/dist/{path.js → cjs/path.js} +1 -1
- package/dist/{pathSerializer.js → cjs/pathSerializer.js} +1 -1
- package/dist/{prettyInstructions.js → cjs/prettyInstructions.js} +26 -8
- package/dist/{react.js → cjs/react.js} +4 -15
- package/dist/cjs/runtime/index.js +17 -0
- package/dist/cjs/runtime/parsed.js +39 -0
- package/dist/{runtimeExports.js → cjs/runtimeExports.js} +1 -1
- package/dist/{universal → cjs/universal}/nestedRoutes.js +4 -21
- package/dist/cjs/version.js +59 -0
- package/dist/{watch.js → cjs/watch.js} +9 -29
- package/dist/esm/FileSizeReporter.js +133 -0
- package/dist/esm/alias.js +61 -0
- package/dist/esm/analyzeProject.js +17 -0
- package/dist/esm/applyOptionsChain.js +35 -0
- package/dist/esm/babel.js +105 -0
- package/dist/esm/chainId.js +173 -0
- package/dist/esm/clearConsole.js +8 -0
- package/dist/esm/commands.js +22 -0
- package/dist/esm/compatRequire.js +42 -0
- package/dist/esm/compiled.js +77 -0
- package/dist/esm/constants.js +260 -0
- package/dist/esm/debug.js +5 -0
- package/dist/esm/emptyDir.js +9 -0
- package/dist/esm/ensureAbsolutePath.js +5 -0
- package/dist/esm/ensureArray.js +9 -0
- package/dist/esm/findExists.js +12 -0
- package/dist/esm/generateMetaTags.js +38 -0
- package/dist/esm/getBrowserslist.js +7 -0
- package/dist/esm/getCoreJsVersion.js +13 -0
- package/dist/esm/getEntryOptions.js +17 -0
- package/dist/esm/getPackageManager.js +32 -0
- package/dist/esm/getPort.js +59 -0
- package/dist/esm/getServerConfig.js +14 -0
- package/dist/esm/getTargetDir.js +8 -0
- package/dist/esm/import.js +9 -0
- package/dist/esm/index.js +44 -0
- package/dist/esm/is/index.js +72 -0
- package/dist/esm/is/nodeEnv.js +12 -0
- package/dist/esm/is/platform.js +6 -0
- package/dist/esm/is/type.js +34 -0
- package/dist/esm/logger.js +100 -0
- package/dist/esm/monorepo.js +87 -0
- package/dist/esm/nodeEnv.js +30 -0
- package/dist/esm/path.js +50 -0
- package/dist/esm/pathSerializer.js +46 -0
- package/dist/esm/plugin.js +23 -0
- package/dist/esm/prettyInstructions.js +95 -0
- package/dist/esm/printBuildError.js +34 -0
- package/dist/esm/react.js +20 -0
- package/dist/esm/readTsConfig.js +13 -0
- package/dist/esm/removeSlash.js +8 -0
- package/dist/esm/resolve.js +38 -0
- package/dist/esm/routes.js +24 -0
- package/dist/esm/runtime/index.js +1 -0
- package/dist/esm/runtime/parsed.js +16 -0
- package/dist/esm/runtimeExports.js +40 -0
- package/dist/esm/ssr.js +6 -0
- package/dist/esm/storage.js +42 -0
- package/dist/esm/testUtils.js +15 -0
- package/dist/esm/types.js +0 -0
- package/dist/esm/universal/constants.js +6 -0
- package/dist/esm/universal/formatWebpack.js +77 -0
- package/dist/esm/universal/nestedRoutes.js +93 -0
- package/dist/esm/universal/remixRouter.js +1 -0
- package/dist/esm/universal/serialize.js +7 -0
- package/dist/esm/version.js +25 -0
- package/dist/esm/wait.js +6 -0
- package/dist/esm/watch.js +36 -0
- package/dist/{constants.d.ts → types/constants.d.ts} +6 -2
- package/dist/{prettyInstructions.d.ts → types/prettyInstructions.d.ts} +4 -1
- package/dist/types/runtime/index.d.ts +1 -0
- package/dist/types/runtime/parsed.d.ts +1 -0
- package/package.json +118 -63
- package/dist/emptyDir.js +0 -52
- package/dist/nodeEnv.js +0 -81
- package/dist/version.js +0 -92
- /package/dist/{FileSizeReporter.js → cjs/FileSizeReporter.js} +0 -0
- /package/dist/{applyOptionsChain.js → cjs/applyOptionsChain.js} +0 -0
- /package/dist/{chainId.js → cjs/chainId.js} +0 -0
- /package/dist/{clearConsole.js → cjs/clearConsole.js} +0 -0
- /package/dist/{commands.js → cjs/commands.js} +0 -0
- /package/dist/{compiled.js → cjs/compiled.js} +0 -0
- /package/dist/{debug.js → cjs/debug.js} +0 -0
- /package/dist/{ensureAbsolutePath.js → cjs/ensureAbsolutePath.js} +0 -0
- /package/dist/{ensureArray.js → cjs/ensureArray.js} +0 -0
- /package/dist/{findExists.js → cjs/findExists.js} +0 -0
- /package/dist/{generateMetaTags.js → cjs/generateMetaTags.js} +0 -0
- /package/dist/{getBrowserslist.js → cjs/getBrowserslist.js} +0 -0
- /package/dist/{getCoreJsVersion.js → cjs/getCoreJsVersion.js} +0 -0
- /package/dist/{getTargetDir.js → cjs/getTargetDir.js} +0 -0
- /package/dist/{import.js → cjs/import.js} +0 -0
- /package/dist/{index.js → cjs/index.js} +0 -0
- /package/dist/{is → cjs/is}/nodeEnv.js +0 -0
- /package/dist/{is → cjs/is}/platform.js +0 -0
- /package/dist/{is → cjs/is}/type.js +0 -0
- /package/dist/{plugin.js → cjs/plugin.js} +0 -0
- /package/dist/{printBuildError.js → cjs/printBuildError.js} +0 -0
- /package/dist/{readTsConfig.js → cjs/readTsConfig.js} +0 -0
- /package/dist/{removeSlash.js → cjs/removeSlash.js} +0 -0
- /package/dist/{resolve.js → cjs/resolve.js} +0 -0
- /package/dist/{routes.js → cjs/routes.js} +0 -0
- /package/dist/{ssr.js → cjs/ssr.js} +0 -0
- /package/dist/{storage.js → cjs/storage.js} +0 -0
- /package/dist/{testUtils.js → cjs/testUtils.js} +0 -0
- /package/dist/{types.js → cjs/types.js} +0 -0
- /package/dist/{universal → cjs/universal}/constants.js +0 -0
- /package/dist/{universal → cjs/universal}/formatWebpack.js +0 -0
- /package/dist/{universal → cjs/universal}/remixRouter.js +0 -0
- /package/dist/{universal → cjs/universal}/serialize.js +0 -0
- /package/dist/{wait.js → cjs/wait.js} +0 -0
- /package/{compiled → dist/compiled}/address/index.js +0 -0
- /package/{compiled → dist/compiled}/address/lib/address.d.ts +0 -0
- /package/{compiled → dist/compiled}/address/package.json +0 -0
- /package/{compiled → dist/compiled}/ajv/codegen.js +0 -0
- /package/{compiled → dist/compiled}/ajv/index.js +0 -0
- /package/{compiled → dist/compiled}/ajv/license +0 -0
- /package/{compiled → dist/compiled}/ajv/package.json +0 -0
- /package/{compiled → dist/compiled}/ajv/types/ajv.d.ts +0 -0
- /package/{compiled → dist/compiled}/ajv/types/compile/codegen/code.d.ts +0 -0
- /package/{compiled → dist/compiled}/ajv/types/compile/codegen/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/ajv/types/compile/codegen/scope.d.ts +0 -0
- /package/{compiled → dist/compiled}/ajv/types/compile/errors.d.ts +0 -0
- /package/{compiled → dist/compiled}/ajv/types/compile/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/ajv/types/compile/ref_error.d.ts +0 -0
- /package/{compiled → dist/compiled}/ajv/types/compile/resolve.d.ts +0 -0
- /package/{compiled → dist/compiled}/ajv/types/compile/rules.d.ts +0 -0
- /package/{compiled → dist/compiled}/ajv/types/compile/util.d.ts +0 -0
- /package/{compiled → dist/compiled}/ajv/types/compile/validate/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/ajv/types/compile/validate/subschema.d.ts +0 -0
- /package/{compiled → dist/compiled}/ajv/types/core.d.ts +0 -0
- /package/{compiled → dist/compiled}/ajv/types/runtime/validation_error.d.ts +0 -0
- /package/{compiled → dist/compiled}/ajv/types/types/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/ajv/types/types/json-schema.d.ts +0 -0
- /package/{compiled → dist/compiled}/ajv/types/types/jtd-schema.d.ts +0 -0
- /package/{compiled → dist/compiled}/ajv/types/vocabularies/errors.d.ts +0 -0
- /package/{compiled → dist/compiled}/ajv/uri-js.d.ts +0 -0
- /package/{compiled → dist/compiled}/ajv-keywords/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/ajv-keywords/index.js +0 -0
- /package/{compiled → dist/compiled}/ajv-keywords/license +0 -0
- /package/{compiled → dist/compiled}/ajv-keywords/package.json +0 -0
- /package/{compiled → dist/compiled}/better-ajv-errors/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/better-ajv-errors/index.js +0 -0
- /package/{compiled → dist/compiled}/better-ajv-errors/license +0 -0
- /package/{compiled → dist/compiled}/better-ajv-errors/package.json +0 -0
- /package/{compiled → dist/compiled}/browserslist/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/browserslist/index.js +0 -0
- /package/{compiled → dist/compiled}/browserslist/license +0 -0
- /package/{compiled → dist/compiled}/browserslist/package.json +0 -0
- /package/{compiled → dist/compiled}/chalk/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/chalk/index.js +0 -0
- /package/{compiled → dist/compiled}/chalk/license +0 -0
- /package/{compiled → dist/compiled}/chalk/package.json +0 -0
- /package/{compiled → dist/compiled}/chokidar/anymatch/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/chokidar/fsevents.node +0 -0
- /package/{compiled → dist/compiled}/chokidar/index.js +0 -0
- /package/{compiled → dist/compiled}/chokidar/license +0 -0
- /package/{compiled → dist/compiled}/chokidar/package.json +0 -0
- /package/{compiled → dist/compiled}/chokidar/types/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/commander/index.js +0 -0
- /package/{compiled → dist/compiled}/commander/license +0 -0
- /package/{compiled → dist/compiled}/commander/package.json +0 -0
- /package/{compiled → dist/compiled}/commander/typings/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/debug/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/debug/index.js +0 -0
- /package/{compiled → dist/compiled}/debug/license +0 -0
- /package/{compiled → dist/compiled}/debug/ms/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/debug/package.json +0 -0
- /package/{compiled → dist/compiled}/dotenv/index.js +0 -0
- /package/{compiled → dist/compiled}/dotenv/license +0 -0
- /package/{compiled → dist/compiled}/dotenv/package.json +0 -0
- /package/{compiled → dist/compiled}/dotenv/types/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/dotenv-expand/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/dotenv-expand/index.js +0 -0
- /package/{compiled → dist/compiled}/dotenv-expand/license +0 -0
- /package/{compiled → dist/compiled}/dotenv-expand/package.json +0 -0
- /package/{compiled → dist/compiled}/execa/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/execa/index.js +0 -0
- /package/{compiled → dist/compiled}/execa/license +0 -0
- /package/{compiled → dist/compiled}/execa/package.json +0 -0
- /package/{compiled → dist/compiled}/fast-glob/@nodelib/fs.scandir/out/adapters/fs.d.ts +0 -0
- /package/{compiled → dist/compiled}/fast-glob/@nodelib/fs.scandir/out/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/fast-glob/@nodelib/fs.scandir/out/providers/async.d.ts +0 -0
- /package/{compiled → dist/compiled}/fast-glob/@nodelib/fs.scandir/out/settings.d.ts +0 -0
- /package/{compiled → dist/compiled}/fast-glob/@nodelib/fs.scandir/out/types/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/fast-glob/@nodelib/fs.stat/out/adapters/fs.d.ts +0 -0
- /package/{compiled → dist/compiled}/fast-glob/@nodelib/fs.stat/out/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/fast-glob/@nodelib/fs.stat/out/providers/async.d.ts +0 -0
- /package/{compiled → dist/compiled}/fast-glob/@nodelib/fs.stat/out/settings.d.ts +0 -0
- /package/{compiled → dist/compiled}/fast-glob/@nodelib/fs.stat/out/types/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/fast-glob/@nodelib/fs.walk/out/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/fast-glob/@nodelib/fs.walk/out/providers/async.d.ts +0 -0
- /package/{compiled → dist/compiled}/fast-glob/@nodelib/fs.walk/out/readers/async.d.ts +0 -0
- /package/{compiled → dist/compiled}/fast-glob/@nodelib/fs.walk/out/readers/reader.d.ts +0 -0
- /package/{compiled → dist/compiled}/fast-glob/@nodelib/fs.walk/out/settings.d.ts +0 -0
- /package/{compiled → dist/compiled}/fast-glob/@nodelib/fs.walk/out/types/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/fast-glob/index.js +0 -0
- /package/{compiled → dist/compiled}/fast-glob/license +0 -0
- /package/{compiled → dist/compiled}/fast-glob/out/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/fast-glob/out/managers/tasks.d.ts +0 -0
- /package/{compiled → dist/compiled}/fast-glob/out/settings.d.ts +0 -0
- /package/{compiled → dist/compiled}/fast-glob/out/types/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/fast-glob/package.json +0 -0
- /package/{compiled → dist/compiled}/filesize/filesize.d.ts +0 -0
- /package/{compiled → dist/compiled}/filesize/index.js +0 -0
- /package/{compiled → dist/compiled}/filesize/license +0 -0
- /package/{compiled → dist/compiled}/filesize/package.json +0 -0
- /package/{compiled → dist/compiled}/fs-extra/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/fs-extra/index.js +0 -0
- /package/{compiled → dist/compiled}/fs-extra/license +0 -0
- /package/{compiled → dist/compiled}/fs-extra/package.json +0 -0
- /package/{compiled → dist/compiled}/glob/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/glob/index.js +0 -0
- /package/{compiled → dist/compiled}/glob/license +0 -0
- /package/{compiled → dist/compiled}/glob/minimatch/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/glob/package.json +0 -0
- /package/{compiled → dist/compiled}/globby/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/globby/index.js +0 -0
- /package/{compiled → dist/compiled}/globby/license +0 -0
- /package/{compiled → dist/compiled}/globby/package.json +0 -0
- /package/{compiled → dist/compiled}/gzip-size/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/gzip-size/index.js +0 -0
- /package/{compiled → dist/compiled}/gzip-size/license +0 -0
- /package/{compiled → dist/compiled}/gzip-size/package.json +0 -0
- /package/{compiled → dist/compiled}/import-lazy/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/import-lazy/index.js +0 -0
- /package/{compiled → dist/compiled}/import-lazy/license +0 -0
- /package/{compiled → dist/compiled}/import-lazy/package.json +0 -0
- /package/{compiled → dist/compiled}/inquirer/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/inquirer/index.js +0 -0
- /package/{compiled → dist/compiled}/inquirer/lib/objects/choice.d.ts +0 -0
- /package/{compiled → dist/compiled}/inquirer/lib/objects/choices.d.ts +0 -0
- /package/{compiled → dist/compiled}/inquirer/lib/objects/separator.d.ts +0 -0
- /package/{compiled → dist/compiled}/inquirer/lib/ui/baseUI.d.ts +0 -0
- /package/{compiled → dist/compiled}/inquirer/lib/ui/bottom-bar.d.ts +0 -0
- /package/{compiled → dist/compiled}/inquirer/lib/ui/prompt.d.ts +0 -0
- /package/{compiled → dist/compiled}/inquirer/license +0 -0
- /package/{compiled → dist/compiled}/inquirer/package.json +0 -0
- /package/{compiled → dist/compiled}/inquirer/through/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/js-yaml/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/js-yaml/index.js +0 -0
- /package/{compiled → dist/compiled}/js-yaml/license +0 -0
- /package/{compiled → dist/compiled}/js-yaml/package.json +0 -0
- /package/{compiled → dist/compiled}/json5/index.js +0 -0
- /package/{compiled → dist/compiled}/json5/lib/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/json5/lib/parse.d.ts +0 -0
- /package/{compiled → dist/compiled}/json5/lib/stringify.d.ts +0 -0
- /package/{compiled → dist/compiled}/json5/package.json +0 -0
- /package/{compiled → dist/compiled}/lodash/common/array.d.ts +0 -0
- /package/{compiled → dist/compiled}/lodash/common/collection.d.ts +0 -0
- /package/{compiled → dist/compiled}/lodash/common/common.d.ts +0 -0
- /package/{compiled → dist/compiled}/lodash/common/date.d.ts +0 -0
- /package/{compiled → dist/compiled}/lodash/common/function.d.ts +0 -0
- /package/{compiled → dist/compiled}/lodash/common/lang.d.ts +0 -0
- /package/{compiled → dist/compiled}/lodash/common/math.d.ts +0 -0
- /package/{compiled → dist/compiled}/lodash/common/number.d.ts +0 -0
- /package/{compiled → dist/compiled}/lodash/common/object.d.ts +0 -0
- /package/{compiled → dist/compiled}/lodash/common/seq.d.ts +0 -0
- /package/{compiled → dist/compiled}/lodash/common/string.d.ts +0 -0
- /package/{compiled → dist/compiled}/lodash/common/util.d.ts +0 -0
- /package/{compiled → dist/compiled}/lodash/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/lodash/index.js +0 -0
- /package/{compiled → dist/compiled}/lodash/license +0 -0
- /package/{compiled → dist/compiled}/lodash/package.json +0 -0
- /package/{compiled → dist/compiled}/mime-types/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/mime-types/index.js +0 -0
- /package/{compiled → dist/compiled}/mime-types/license +0 -0
- /package/{compiled → dist/compiled}/mime-types/package.json +0 -0
- /package/{compiled → dist/compiled}/minimist/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/minimist/index.js +0 -0
- /package/{compiled → dist/compiled}/minimist/license +0 -0
- /package/{compiled → dist/compiled}/minimist/package.json +0 -0
- /package/{compiled → dist/compiled}/nanoid/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/nanoid/index.js +0 -0
- /package/{compiled → dist/compiled}/nanoid/license +0 -0
- /package/{compiled → dist/compiled}/nanoid/package.json +0 -0
- /package/{compiled → dist/compiled}/ora/cli-spinners/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/ora/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/ora/index.js +0 -0
- /package/{compiled → dist/compiled}/ora/license +0 -0
- /package/{compiled → dist/compiled}/ora/package.json +0 -0
- /package/{compiled → dist/compiled}/pkg-up/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/pkg-up/index.js +0 -0
- /package/{compiled → dist/compiled}/pkg-up/license +0 -0
- /package/{compiled → dist/compiled}/pkg-up/package.json +0 -0
- /package/{compiled → dist/compiled}/recursive-readdir/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/recursive-readdir/index.js +0 -0
- /package/{compiled → dist/compiled}/recursive-readdir/license +0 -0
- /package/{compiled → dist/compiled}/recursive-readdir/package.json +0 -0
- /package/{compiled → dist/compiled}/schema-utils3/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/schema-utils3/index.js +0 -0
- /package/{compiled → dist/compiled}/schema-utils3/license +0 -0
- /package/{compiled → dist/compiled}/schema-utils3/package.json +0 -0
- /package/{compiled → dist/compiled}/semver/classes/comparator.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/classes/range.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/classes/semver.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/clean.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/cmp.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/coerce.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/compare-build.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/compare-loose.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/compare.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/diff.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/eq.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/gt.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/gte.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/inc.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/lt.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/lte.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/major.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/minor.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/neq.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/parse.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/patch.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/prerelease.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/rcompare.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/rsort.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/satisfies.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/sort.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/functions/valid.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/index.js +0 -0
- /package/{compiled → dist/compiled}/semver/internals/identifiers.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/license +0 -0
- /package/{compiled → dist/compiled}/semver/package.json +0 -0
- /package/{compiled → dist/compiled}/semver/ranges/gtr.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/ranges/intersects.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/ranges/ltr.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/ranges/max-satisfying.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/ranges/min-satisfying.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/ranges/min-version.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/ranges/outside.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/ranges/simplify.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/ranges/subset.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/ranges/to-comparators.d.ts +0 -0
- /package/{compiled → dist/compiled}/semver/ranges/valid.d.ts +0 -0
- /package/{compiled → dist/compiled}/signale/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/signale/index.js +0 -0
- /package/{compiled → dist/compiled}/signale/package.json +0 -0
- /package/{compiled → dist/compiled}/slash/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/slash/index.js +0 -0
- /package/{compiled → dist/compiled}/slash/license +0 -0
- /package/{compiled → dist/compiled}/slash/package.json +0 -0
- /package/{compiled → dist/compiled}/strip-ansi/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/strip-ansi/index.js +0 -0
- /package/{compiled → dist/compiled}/strip-ansi/license +0 -0
- /package/{compiled → dist/compiled}/strip-ansi/package.json +0 -0
- /package/{compiled → dist/compiled}/tsconfig-paths/index.js +0 -0
- /package/{compiled → dist/compiled}/tsconfig-paths/lib/config-loader.d.ts +0 -0
- /package/{compiled → dist/compiled}/tsconfig-paths/lib/filesystem.d.ts +0 -0
- /package/{compiled → dist/compiled}/tsconfig-paths/lib/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/tsconfig-paths/lib/mapping-entry.d.ts +0 -0
- /package/{compiled → dist/compiled}/tsconfig-paths/lib/match-path-async.d.ts +0 -0
- /package/{compiled → dist/compiled}/tsconfig-paths/lib/match-path-sync.d.ts +0 -0
- /package/{compiled → dist/compiled}/tsconfig-paths/lib/register.d.ts +0 -0
- /package/{compiled → dist/compiled}/tsconfig-paths/lib/try-path.d.ts +0 -0
- /package/{compiled → dist/compiled}/tsconfig-paths/lib/tsconfig-loader.d.ts +0 -0
- /package/{compiled → dist/compiled}/tsconfig-paths/license +0 -0
- /package/{compiled → dist/compiled}/tsconfig-paths/package.json +0 -0
- /package/{compiled → dist/compiled}/upath/index.js +0 -0
- /package/{compiled → dist/compiled}/upath/license +0 -0
- /package/{compiled → dist/compiled}/upath/package.json +0 -0
- /package/{compiled → dist/compiled}/upath/upath.d.ts +0 -0
- /package/{compiled → dist/compiled}/url-join/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/url-join/index.js +0 -0
- /package/{compiled → dist/compiled}/url-join/license +0 -0
- /package/{compiled → dist/compiled}/url-join/package.json +0 -0
- /package/{compiled → dist/compiled}/webpack-chain/index.js +0 -0
- /package/{compiled → dist/compiled}/webpack-chain/license +0 -0
- /package/{compiled → dist/compiled}/webpack-chain/package.json +0 -0
- /package/{compiled → dist/compiled}/webpack-chain/types/index.d.ts +0 -0
- /package/{compiled → dist/compiled}/webpack-dev-middleware/index.js +0 -0
- /package/{compiled → dist/compiled}/webpack-dev-middleware/license +0 -0
- /package/{compiled → dist/compiled}/webpack-dev-middleware/package.json +0 -0
- /package/{compiled → dist/compiled}/webpack-dev-middleware/types/index.d.ts +0 -0
- /package/dist/{FileSizeReporter.d.ts → types/FileSizeReporter.d.ts} +0 -0
- /package/dist/{alias.d.ts → types/alias.d.ts} +0 -0
- /package/dist/{analyzeProject.d.ts → types/analyzeProject.d.ts} +0 -0
- /package/dist/{applyOptionsChain.d.ts → types/applyOptionsChain.d.ts} +0 -0
- /package/dist/{babel.d.ts → types/babel.d.ts} +0 -0
- /package/dist/{chainId.d.ts → types/chainId.d.ts} +0 -0
- /package/dist/{clearConsole.d.ts → types/clearConsole.d.ts} +0 -0
- /package/dist/{commands.d.ts → types/commands.d.ts} +0 -0
- /package/dist/{compatRequire.d.ts → types/compatRequire.d.ts} +0 -0
- /package/dist/{compiled.d.ts → types/compiled.d.ts} +0 -0
- /package/dist/{debug.d.ts → types/debug.d.ts} +0 -0
- /package/dist/{emptyDir.d.ts → types/emptyDir.d.ts} +0 -0
- /package/dist/{ensureAbsolutePath.d.ts → types/ensureAbsolutePath.d.ts} +0 -0
- /package/dist/{ensureArray.d.ts → types/ensureArray.d.ts} +0 -0
- /package/dist/{findExists.d.ts → types/findExists.d.ts} +0 -0
- /package/dist/{generateMetaTags.d.ts → types/generateMetaTags.d.ts} +0 -0
- /package/dist/{getBrowserslist.d.ts → types/getBrowserslist.d.ts} +0 -0
- /package/dist/{getCoreJsVersion.d.ts → types/getCoreJsVersion.d.ts} +0 -0
- /package/dist/{getEntryOptions.d.ts → types/getEntryOptions.d.ts} +0 -0
- /package/dist/{getPackageManager.d.ts → types/getPackageManager.d.ts} +0 -0
- /package/dist/{getPort.d.ts → types/getPort.d.ts} +0 -0
- /package/dist/{getServerConfig.d.ts → types/getServerConfig.d.ts} +0 -0
- /package/dist/{getTargetDir.d.ts → types/getTargetDir.d.ts} +0 -0
- /package/dist/{import.d.ts → types/import.d.ts} +0 -0
- /package/dist/{index.d.ts → types/index.d.ts} +0 -0
- /package/dist/{is → types/is}/index.d.ts +0 -0
- /package/dist/{is → types/is}/nodeEnv.d.ts +0 -0
- /package/dist/{is → types/is}/platform.d.ts +0 -0
- /package/dist/{is → types/is}/type.d.ts +0 -0
- /package/dist/{logger.d.ts → types/logger.d.ts} +0 -0
- /package/dist/{monorepo.d.ts → types/monorepo.d.ts} +0 -0
- /package/dist/{nodeEnv.d.ts → types/nodeEnv.d.ts} +0 -0
- /package/dist/{path.d.ts → types/path.d.ts} +0 -0
- /package/dist/{pathSerializer.d.ts → types/pathSerializer.d.ts} +0 -0
- /package/dist/{plugin.d.ts → types/plugin.d.ts} +0 -0
- /package/dist/{printBuildError.d.ts → types/printBuildError.d.ts} +0 -0
- /package/dist/{react.d.ts → types/react.d.ts} +0 -0
- /package/dist/{readTsConfig.d.ts → types/readTsConfig.d.ts} +0 -0
- /package/dist/{removeSlash.d.ts → types/removeSlash.d.ts} +0 -0
- /package/dist/{resolve.d.ts → types/resolve.d.ts} +0 -0
- /package/dist/{routes.d.ts → types/routes.d.ts} +0 -0
- /package/dist/{runtimeExports.d.ts → types/runtimeExports.d.ts} +0 -0
- /package/dist/{ssr.d.ts → types/ssr.d.ts} +0 -0
- /package/dist/{storage.d.ts → types/storage.d.ts} +0 -0
- /package/dist/{testUtils.d.ts → types/testUtils.d.ts} +0 -0
- /package/dist/{types.d.ts → types/types.d.ts} +0 -0
- /package/dist/{universal → types/universal}/constants.d.ts +0 -0
- /package/dist/{universal → types/universal}/formatWebpack.d.ts +0 -0
- /package/dist/{universal → types/universal}/nestedRoutes.d.ts +0 -0
- /package/dist/{universal → types/universal}/remixRouter.d.ts +0 -0
- /package/dist/{universal → types/universal}/serialize.d.ts +0 -0
- /package/dist/{version.d.ts → types/version.d.ts} +0 -0
- /package/dist/{wait.d.ts → types/wait.d.ts} +0 -0
- /package/dist/{watch.d.ts → types/watch.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,34 @@
|
|
1
1
|
# @modern-js/utils
|
2
2
|
|
3
|
+
## 2.14.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- 16399fd: feat: support extendPageData hook and last updated time
|
8
|
+
|
9
|
+
feat: 支持 extendPageData 钩子和最后更新时间功能
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- 4779152: fix(utils): the esm format files should be generate for the client
|
14
|
+
|
15
|
+
fix(utils): 应该为客户端使用,生成 esm 格式的文件
|
16
|
+
|
17
|
+
- 9321bef: feat: adjust server.worker config to deploy.worker.ssr
|
18
|
+
|
19
|
+
feat: 调整 server.worker 为 deploy.worker.ssr
|
20
|
+
|
21
|
+
- 9b45c58: fix(app-tools): should not print all addresses when custom dev.host
|
22
|
+
|
23
|
+
fix(app-tools): 修复自定义 dev.host 时会输出多余的 URL 地址的问题
|
24
|
+
|
25
|
+
- 52d0cb1: feat: support config handle of Route
|
26
|
+
feat: 支持配置 Route 的 handle 属性
|
27
|
+
- 60a81d0: feat: add ssr.inlineScript for use inline json instead inline script when ssr
|
28
|
+
feat: 添加 ssr.inlineScript 用于在 ssr 模式下使用内联 json 而不是内联脚本
|
29
|
+
- dacef96: chore: remove plugin-egg and plugin-nest
|
30
|
+
chore: 移除 plugin-egg 和 plugin-nest
|
31
|
+
|
3
32
|
## 2.13.4
|
4
33
|
|
5
34
|
## 2.13.3
|
@@ -2,22 +2,8 @@ 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;
|
6
5
|
var __getProtoOf = Object.getPrototypeOf;
|
7
6
|
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
|
-
};
|
21
7
|
var __export = (target, all) => {
|
22
8
|
for (var name in all)
|
23
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
@@ -88,7 +74,10 @@ const getAliasConfig = (aliasOption, option) => {
|
|
88
74
|
const baseUrl = (_a = tsconfig == null ? void 0 : tsconfig.compilerOptions) == null ? void 0 : _a.baseUrl;
|
89
75
|
return {
|
90
76
|
absoluteBaseUrl: baseUrl ? import_path.default.join(option.appDirectory, baseUrl) : option.appDirectory,
|
91
|
-
paths:
|
77
|
+
paths: {
|
78
|
+
...alias,
|
79
|
+
...(_b = tsconfig == null ? void 0 : tsconfig.compilerOptions) == null ? void 0 : _b.paths
|
80
|
+
},
|
92
81
|
isTsPath: true,
|
93
82
|
isTsProject
|
94
83
|
};
|
@@ -25,26 +25,6 @@ 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
|
-
};
|
48
28
|
var analyzeProject_exports = {};
|
49
29
|
__export(analyzeProject_exports, {
|
50
30
|
isApiOnly: () => isApiOnly,
|
@@ -54,16 +34,16 @@ module.exports = __toCommonJS(analyzeProject_exports);
|
|
54
34
|
var path = __toESM(require("path"));
|
55
35
|
var import_commands = require("./commands");
|
56
36
|
var import_compiled = require("./compiled");
|
57
|
-
const isApiOnly = (appDirectory, entryDir) =>
|
37
|
+
const isApiOnly = async (appDirectory, entryDir) => {
|
58
38
|
const srcDir = path.join(appDirectory, entryDir != null ? entryDir : "src");
|
59
|
-
const existSrc =
|
39
|
+
const existSrc = await import_compiled.fs.pathExists(srcDir);
|
60
40
|
const options = (0, import_compiled.minimist)((0, import_commands.getArgv)());
|
61
41
|
return !existSrc || Boolean(options["api-only"]);
|
62
|
-
}
|
63
|
-
const isWebOnly = () =>
|
42
|
+
};
|
43
|
+
const isWebOnly = async () => {
|
64
44
|
const options = (0, import_compiled.minimist)((0, import_commands.getArgv)());
|
65
45
|
return Boolean(options["web-only"]);
|
66
|
-
}
|
46
|
+
};
|
67
47
|
// Annotate the CommonJS export names for ESM import in node:
|
68
48
|
0 && (module.exports = {
|
69
49
|
isApiOnly,
|
@@ -1,21 +1,7 @@
|
|
1
1
|
var __defProp = Object.defineProperty;
|
2
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
5
4
|
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
|
-
};
|
19
5
|
var __export = (target, all) => {
|
20
6
|
for (var name in all)
|
21
7
|
__defProp(target, name, { get: all[name], enumerable: true });
|
@@ -98,7 +84,11 @@ const modifyPresetOptions = (presetName, options, presets = []) => {
|
|
98
84
|
presets.forEach((preset, index) => {
|
99
85
|
if (Array.isArray(preset)) {
|
100
86
|
if (typeof preset[0] === "string" && (0, import_path2.normalizeToPosixPath)(preset[0]).includes(presetName)) {
|
101
|
-
preset[1] =
|
87
|
+
preset[1] = {
|
88
|
+
...preset[1] || {},
|
89
|
+
...options
|
90
|
+
// `options` is specific to different presets
|
91
|
+
};
|
102
92
|
}
|
103
93
|
} else if (typeof preset === "string" && (0, import_path2.normalizeToPosixPath)(preset).includes(presetName)) {
|
104
94
|
presets[index] = [preset, options];
|
@@ -124,7 +114,10 @@ const getBabelUtils = (config) => {
|
|
124
114
|
};
|
125
115
|
const applyUserBabelConfig = (defaultOptions, userBabelConfig, extraBabelUtils) => {
|
126
116
|
if (userBabelConfig) {
|
127
|
-
const babelUtils =
|
117
|
+
const babelUtils = {
|
118
|
+
...getBabelUtils(defaultOptions),
|
119
|
+
...extraBabelUtils
|
120
|
+
};
|
128
121
|
return (0, import_applyOptionsChain.applyOptionsChain)(defaultOptions, userBabelConfig || {}, babelUtils);
|
129
122
|
}
|
130
123
|
return defaultOptions;
|
@@ -1,21 +1,7 @@
|
|
1
1
|
var __defProp = Object.defineProperty;
|
2
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
5
4
|
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
|
-
};
|
19
5
|
var __export = (target, all) => {
|
20
6
|
for (var name in all)
|
21
7
|
__defProp(target, name, { get: all[name], enumerable: true });
|
@@ -49,10 +35,11 @@ const dynamicImport = new Function(
|
|
49
35
|
"return import(modulePath)"
|
50
36
|
);
|
51
37
|
const requireExistModule = (filename, opt) => {
|
52
|
-
const final =
|
38
|
+
const final = {
|
53
39
|
extensions: [".ts", ".js"],
|
54
|
-
interop: true
|
55
|
-
|
40
|
+
interop: true,
|
41
|
+
...opt
|
42
|
+
};
|
56
43
|
const exist = (0, import_findExists.findExists)(final.extensions.map((ext) => `${filename}${ext}`));
|
57
44
|
if (!exist) {
|
58
45
|
return null;
|
@@ -42,10 +42,8 @@ __export(constants_exports, {
|
|
42
42
|
SERVER_BUNDLE_DIRECTORY: () => SERVER_BUNDLE_DIRECTORY,
|
43
43
|
SERVER_DIR: () => SERVER_DIR,
|
44
44
|
SERVER_PLUGIN_BFF: () => SERVER_PLUGIN_BFF,
|
45
|
-
SERVER_PLUGIN_EGG: () => SERVER_PLUGIN_EGG,
|
46
45
|
SERVER_PLUGIN_EXPRESS: () => SERVER_PLUGIN_EXPRESS,
|
47
46
|
SERVER_PLUGIN_KOA: () => SERVER_PLUGIN_KOA,
|
48
|
-
SERVER_PLUGIN_NEST: () => SERVER_PLUGIN_NEST,
|
49
47
|
SERVER_PLUGIN_POLYFILL: () => SERVER_PLUGIN_POLYFILL,
|
50
48
|
SERVER_PLUGIN_SERVER: () => SERVER_PLUGIN_SERVER,
|
51
49
|
SERVER_RENDER_FUNCTION_NAME: () => SERVER_RENDER_FUNCTION_NAME,
|
@@ -79,9 +77,7 @@ const INTERNAL_APP_TOOLS_PLUGINS = {
|
|
79
77
|
"@modern-js/plugin-testing": "@modern-js/plugin-testing/cli",
|
80
78
|
"@modern-js/plugin-storybook": "@modern-js/plugin-storybook/cli",
|
81
79
|
"@modern-js/plugin-express": "@modern-js/plugin-express/cli",
|
82
|
-
"@modern-js/plugin-egg": "@modern-js/plugin-egg/cli",
|
83
80
|
"@modern-js/plugin-koa": "@modern-js/plugin-koa/cli",
|
84
|
-
"@modern-js/plugin-nest": "@modern-js/plugin-nest/cli",
|
85
81
|
"@modern-js/plugin-server": "@modern-js/plugin-server/cli",
|
86
82
|
"@modern-js/plugin-garfish": "@modern-js/plugin-garfish/cli",
|
87
83
|
"@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
|
@@ -125,9 +121,7 @@ const INTERNAL_CLI_PLUGINS = {
|
|
125
121
|
"@modern-js/plugin-testing": "@modern-js/plugin-testing/cli",
|
126
122
|
"@modern-js/plugin-storybook": "@modern-js/plugin-storybook/cli",
|
127
123
|
"@modern-js/plugin-express": "@modern-js/plugin-express/cli",
|
128
|
-
"@modern-js/plugin-egg": "@modern-js/plugin-egg/cli",
|
129
124
|
"@modern-js/plugin-koa": "@modern-js/plugin-koa/cli",
|
130
|
-
"@modern-js/plugin-nest": "@modern-js/plugin-nest/cli",
|
131
125
|
"@modern-js/plugin-server": "@modern-js/plugin-server/cli",
|
132
126
|
"@modern-js/plugin-swc": "@modern-js/plugin-swc",
|
133
127
|
"@modern-js/plugin-garfish": "@modern-js/plugin-garfish/cli",
|
@@ -140,17 +134,13 @@ const INTERNAL_CLI_PLUGINS = {
|
|
140
134
|
};
|
141
135
|
const SERVER_PLUGIN_BFF = "@modern-js/plugin-bff";
|
142
136
|
const SERVER_PLUGIN_EXPRESS = "@modern-js/plugin-express";
|
143
|
-
const SERVER_PLUGIN_EGG = "@modern-js/plugin-egg";
|
144
137
|
const SERVER_PLUGIN_KOA = "@modern-js/plugin-koa";
|
145
|
-
const SERVER_PLUGIN_NEST = "@modern-js/plugin-nest";
|
146
138
|
const SERVER_PLUGIN_SERVER = "@modern-js/plugin-server";
|
147
139
|
const SERVER_PLUGIN_POLYFILL = "@modern-js/plugin-polyfill";
|
148
140
|
const INTERNAL_SERVER_PLUGINS = {
|
149
141
|
[SERVER_PLUGIN_BFF]: "@modern-js/plugin-bff/server",
|
150
142
|
[SERVER_PLUGIN_EXPRESS]: "@modern-js/plugin-express/server",
|
151
|
-
[SERVER_PLUGIN_EGG]: "@modern-js/plugin-egg/server",
|
152
143
|
[SERVER_PLUGIN_KOA]: "@modern-js/plugin-koa/server",
|
153
|
-
[SERVER_PLUGIN_NEST]: "@modern-js/plugin-nest/server",
|
154
144
|
[SERVER_PLUGIN_SERVER]: "@modern-js/plugin-server/server",
|
155
145
|
[SERVER_PLUGIN_POLYFILL]: "@modern-js/plugin-polyfill/server"
|
156
146
|
};
|
@@ -270,7 +260,13 @@ const PLUGIN_SCHEMAS = {
|
|
270
260
|
schema: { type: ["boolean", "object"] }
|
271
261
|
}
|
272
262
|
],
|
273
|
-
"@modern-js/plugin-nocode": []
|
263
|
+
"@modern-js/plugin-nocode": [],
|
264
|
+
"@modern-js/plugin-worker": [
|
265
|
+
{
|
266
|
+
target: "deploy.worker.ssr",
|
267
|
+
schema: { type: ["boolean"] }
|
268
|
+
}
|
269
|
+
]
|
274
270
|
};
|
275
271
|
const DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS = {
|
276
272
|
allowNamespaces: true,
|
@@ -308,10 +304,8 @@ const DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS = {
|
|
308
304
|
SERVER_BUNDLE_DIRECTORY,
|
309
305
|
SERVER_DIR,
|
310
306
|
SERVER_PLUGIN_BFF,
|
311
|
-
SERVER_PLUGIN_EGG,
|
312
307
|
SERVER_PLUGIN_EXPRESS,
|
313
308
|
SERVER_PLUGIN_KOA,
|
314
|
-
SERVER_PLUGIN_NEST,
|
315
309
|
SERVER_PLUGIN_POLYFILL,
|
316
310
|
SERVER_PLUGIN_SERVER,
|
317
311
|
SERVER_RENDER_FUNCTION_NAME,
|
@@ -0,0 +1,32 @@
|
|
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 emptyDir_exports = {};
|
19
|
+
__export(emptyDir_exports, {
|
20
|
+
emptyDir: () => emptyDir
|
21
|
+
});
|
22
|
+
module.exports = __toCommonJS(emptyDir_exports);
|
23
|
+
var import_compiled = require("./compiled");
|
24
|
+
const emptyDir = async (dir) => {
|
25
|
+
if (await import_compiled.fs.pathExists(dir)) {
|
26
|
+
await import_compiled.fs.emptyDir(dir);
|
27
|
+
}
|
28
|
+
};
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
30
|
+
0 && (module.exports = {
|
31
|
+
emptyDir
|
32
|
+
});
|
@@ -1,21 +1,7 @@
|
|
1
1
|
var __defProp = Object.defineProperty;
|
2
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
5
4
|
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
|
-
};
|
19
5
|
var __export = (target, all) => {
|
20
6
|
for (var name in all)
|
21
7
|
__defProp(target, name, { get: all[name], enumerable: true });
|
@@ -42,7 +28,7 @@ const getEntryOptions = (name, baseOptions, optionsByEntries, packageName) => {
|
|
42
28
|
if (optionsByEntry === void 0 && name === import_constants.MAIN_ENTRY_NAME && packageName) {
|
43
29
|
optionsByEntry = getOptionsByEntryName(packageName, optionsByEntries);
|
44
30
|
}
|
45
|
-
return optionsByEntry !== void 0 ? (0, import_is.isPlainObject)(optionsByEntry) && (0, import_is.isPlainObject)(baseOptions) ?
|
31
|
+
return optionsByEntry !== void 0 ? (0, import_is.isPlainObject)(optionsByEntry) && (0, import_is.isPlainObject)(baseOptions) ? { ...baseOptions, ...optionsByEntry } : optionsByEntry : baseOptions;
|
46
32
|
} else {
|
47
33
|
return baseOptions;
|
48
34
|
}
|
@@ -25,26 +25,6 @@ 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
|
-
};
|
48
28
|
var getPackageManager_exports = {};
|
49
29
|
__export(getPackageManager_exports, {
|
50
30
|
getPackageManager: () => getPackageManager
|
@@ -55,31 +35,29 @@ var import_path = __toESM(require("path"));
|
|
55
35
|
var import_compiled = require("./compiled");
|
56
36
|
var import_nodeEnv = require("./nodeEnv");
|
57
37
|
const MAX_TIMES = 5;
|
58
|
-
function getPackageManager() {
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
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)()) {
|
38
|
+
async function getPackageManager(cwd = process.cwd()) {
|
39
|
+
let appDirectory = cwd;
|
40
|
+
let times = 0;
|
41
|
+
while (import_os.default.homedir() !== appDirectory && times < MAX_TIMES) {
|
42
|
+
times++;
|
43
|
+
if (import_compiled.fs.existsSync(import_path.default.resolve(appDirectory, "pnpm-lock.yaml"))) {
|
76
44
|
return "pnpm";
|
77
45
|
}
|
78
|
-
if (
|
46
|
+
if (import_compiled.fs.existsSync(import_path.default.resolve(appDirectory, "yarn.lock"))) {
|
79
47
|
return "yarn";
|
80
48
|
}
|
81
|
-
|
82
|
-
|
49
|
+
if (import_compiled.fs.existsSync(import_path.default.resolve(appDirectory, "package-lock.json"))) {
|
50
|
+
return "npm";
|
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";
|
83
61
|
}
|
84
62
|
// Annotate the CommonJS export names for ESM import in node:
|
85
63
|
0 && (module.exports = {
|
@@ -25,26 +25,6 @@ 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
|
-
};
|
48
28
|
var getPort_exports = {};
|
49
29
|
__export(getPort_exports, {
|
50
30
|
getPort: () => getPort
|
@@ -53,10 +33,10 @@ module.exports = __toCommonJS(getPort_exports);
|
|
53
33
|
var import_net = __toESM(require("net"));
|
54
34
|
var import_compiled = require("./compiled");
|
55
35
|
var import_logger = require("./logger");
|
56
|
-
const getPort =
|
36
|
+
const getPort = async (port, {
|
57
37
|
tryLimits = 20,
|
58
38
|
strictPort = false
|
59
|
-
} = {}) {
|
39
|
+
} = {}) => {
|
60
40
|
if (typeof port === "string") {
|
61
41
|
port = parseInt(port, 10);
|
62
42
|
}
|
@@ -68,7 +48,7 @@ const getPort = (_0, ..._1) => __async(void 0, [_0, ..._1], function* (port, {
|
|
68
48
|
let attempts = 0;
|
69
49
|
while (!found && attempts <= tryLimits) {
|
70
50
|
try {
|
71
|
-
|
51
|
+
await new Promise((resolve, reject) => {
|
72
52
|
const server = import_net.default.createServer();
|
73
53
|
server.unref();
|
74
54
|
server.on("error", reject);
|
@@ -105,7 +85,7 @@ const getPort = (_0, ..._1) => __async(void 0, [_0, ..._1], function* (port, {
|
|
105
85
|
}
|
106
86
|
}
|
107
87
|
return port;
|
108
|
-
}
|
88
|
+
};
|
109
89
|
// Annotate the CommonJS export names for ESM import in node:
|
110
90
|
0 && (module.exports = {
|
111
91
|
getPort
|
@@ -25,26 +25,6 @@ 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
|
-
};
|
48
28
|
var getServerConfig_exports = {};
|
49
29
|
__export(getServerConfig_exports, {
|
50
30
|
getServerConfig: () => getServerConfig
|
@@ -53,14 +33,14 @@ module.exports = __toCommonJS(getServerConfig_exports);
|
|
53
33
|
var path = __toESM(require("path"));
|
54
34
|
var import_constants = require("./constants");
|
55
35
|
var import_findExists = require("./findExists");
|
56
|
-
const getServerConfig = (appDirectory, configFile) =>
|
36
|
+
const getServerConfig = async (appDirectory, configFile) => {
|
57
37
|
const configFilePath = (0, import_findExists.findExists)(
|
58
38
|
import_constants.CONFIG_FILE_EXTENSIONS.map(
|
59
39
|
(extension) => path.resolve(appDirectory, `${configFile}${extension}`)
|
60
40
|
)
|
61
41
|
);
|
62
42
|
return configFilePath;
|
63
|
-
}
|
43
|
+
};
|
64
44
|
// Annotate the CommonJS export names for ESM import in node:
|
65
45
|
0 && (module.exports = {
|
66
46
|
getServerConfig
|
@@ -82,8 +82,9 @@ const isUseSSRBundle = (config) => {
|
|
82
82
|
return isSSR(config);
|
83
83
|
};
|
84
84
|
const isServiceWorker = (config) => {
|
85
|
-
|
86
|
-
|
85
|
+
var _a;
|
86
|
+
const { output, deploy } = config;
|
87
|
+
if (((_a = deploy == null ? void 0 : deploy.worker) == null ? void 0 : _a.ssr) && ((output == null ? void 0 : output.ssg) || isSSR(config))) {
|
87
88
|
return true;
|
88
89
|
}
|
89
90
|
return false;
|
@@ -2,22 +2,8 @@ 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;
|
6
5
|
var __getProtoOf = Object.getPrototypeOf;
|
7
6
|
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
|
-
};
|
21
7
|
var __export = (target, all) => {
|
22
8
|
for (var name in all)
|
23
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
@@ -88,8 +74,11 @@ const DEFAULT_CONFIG = {
|
|
88
74
|
class Logger {
|
89
75
|
constructor(options = {}) {
|
90
76
|
this.level = options.level || LOG_TYPES.log.level;
|
91
|
-
this.config =
|
92
|
-
this.types =
|
77
|
+
this.config = { ...DEFAULT_CONFIG, ...options.config || {} };
|
78
|
+
this.types = {
|
79
|
+
...LOG_TYPES,
|
80
|
+
...options.types || {}
|
81
|
+
};
|
93
82
|
this.longestLabel = this.getLongestLabel();
|
94
83
|
Object.keys(this.types).forEach((type) => {
|
95
84
|
this[type] = this._log.bind(this, type);
|
@@ -2,22 +2,8 @@ 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;
|
6
5
|
var __getProtoOf = Object.getPrototypeOf;
|
7
6
|
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
|
-
};
|
21
7
|
var __export = (target, all) => {
|
22
8
|
for (var name in all)
|
23
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
@@ -77,7 +63,10 @@ const isModernjsMonorepo = (root) => {
|
|
77
63
|
return false;
|
78
64
|
}
|
79
65
|
const json = JSON.parse(import_fs.default.readFileSync(pkgJsonPath, "utf8"));
|
80
|
-
const deps =
|
66
|
+
const deps = {
|
67
|
+
...json.dependencies || {},
|
68
|
+
...json.devDependencies || {}
|
69
|
+
};
|
81
70
|
return Boolean(deps["@modern-js/monorepo-tools"]);
|
82
71
|
};
|
83
72
|
const findMonorepoRoot = (appDirectory, maxDepth = PACKAGE_MAX_DEPTH) => {
|
@@ -0,0 +1,55 @@
|
|
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 nodeEnv_exports = {};
|
19
|
+
__export(nodeEnv_exports, {
|
20
|
+
canUseNpm: () => canUseNpm,
|
21
|
+
canUsePnpm: () => canUsePnpm,
|
22
|
+
canUseYarn: () => canUseYarn
|
23
|
+
});
|
24
|
+
module.exports = __toCommonJS(nodeEnv_exports);
|
25
|
+
var import_compiled = require("./compiled");
|
26
|
+
async function canUseNpm() {
|
27
|
+
try {
|
28
|
+
await (0, import_compiled.execa)("npm", ["--version"], { env: process.env });
|
29
|
+
return true;
|
30
|
+
} catch (e) {
|
31
|
+
return false;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
async function canUseYarn() {
|
35
|
+
try {
|
36
|
+
await (0, import_compiled.execa)("yarn", ["--version"], { env: process.env });
|
37
|
+
return true;
|
38
|
+
} catch (e) {
|
39
|
+
return false;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
async function canUsePnpm() {
|
43
|
+
try {
|
44
|
+
await (0, import_compiled.execa)("pnpm", ["--version"], { env: process.env });
|
45
|
+
return true;
|
46
|
+
} catch (e) {
|
47
|
+
return false;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
// Annotate the CommonJS export names for ESM import in node:
|
51
|
+
0 && (module.exports = {
|
52
|
+
canUseNpm,
|
53
|
+
canUsePnpm,
|
54
|
+
canUseYarn
|
55
|
+
});
|