@modern-js/app-tools 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +59 -0
- package/dist/{js/node → cjs}/analyze/constants.js +0 -0
- package/dist/cjs/analyze/generateCode.js +249 -0
- package/dist/{js/node → cjs}/analyze/getBundleEntry.js +6 -0
- package/dist/{js/node → cjs}/analyze/getClientRoutes/getRoutes.js +1 -18
- package/dist/{js/node → cjs}/analyze/getClientRoutes/getRoutesLegacy.js +1 -18
- package/dist/{js/node → cjs}/analyze/getClientRoutes/index.js +0 -0
- package/dist/{js/node → cjs}/analyze/getClientRoutes/utils.js +0 -0
- package/dist/{js/node → cjs}/analyze/getFileSystemEntry.js +0 -0
- package/dist/{js/node → cjs}/analyze/getHtmlTemplate.js +4 -24
- package/dist/{js/node → cjs}/analyze/getServerRoutes.js +22 -42
- package/dist/cjs/analyze/index.js +290 -0
- package/dist/{js/node → cjs}/analyze/isDefaultExportFunction.js +0 -0
- package/dist/{js/node → cjs}/analyze/makeLegalIdentifier.js +0 -0
- package/dist/{js/node → cjs}/analyze/nestedRoutes.js +16 -50
- package/dist/{js/node → cjs}/analyze/templates.js +16 -49
- package/dist/{js/node → cjs}/analyze/utils.js +9 -29
- package/dist/{js/node → cjs}/builder/builder-rspack/index.js +0 -0
- package/dist/{js/node → cjs}/builder/builder-webpack/builderPlugins/compatModern.js +0 -0
- package/dist/{js/node → cjs}/builder/builder-webpack/index.js +22 -62
- package/dist/{js/node → cjs}/builder/builder-webpack/webpackPlugins/RouterPlugin.js +7 -24
- package/dist/{js/node → cjs}/builder/builder-webpack/webpackPlugins/index.js +0 -0
- package/dist/{js/node → cjs}/builder/generator/createBuilderOptions.js +0 -0
- package/dist/{js/node → cjs}/builder/generator/createBuilderProviderConfig.js +14 -25
- package/dist/{js/node → cjs}/builder/generator/getBuilderTargets.js +4 -0
- package/dist/cjs/builder/generator/index.js +58 -0
- package/dist/{js/node → cjs}/builder/index.js +12 -34
- package/dist/{js/node → cjs}/builder/shared/builderPlugins/adapterModern.js +35 -34
- package/dist/{js/node → cjs}/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.js +0 -0
- package/dist/{js/node → cjs}/builder/shared/bundlerPlugins/HtmlBottomTemplate.js +0 -0
- package/dist/{js/node → cjs}/builder/shared/createCopyPattern.js +0 -0
- package/dist/{js/node → cjs}/builder/shared/index.js +0 -0
- package/dist/{js/node → cjs}/builder/shared/loaders/serverModuleLoader.js +0 -0
- package/dist/{js/node → cjs}/builder/shared/types.js +0 -0
- package/dist/{js/node → cjs}/commands/build.js +9 -46
- package/dist/cjs/commands/deploy.js +31 -0
- package/dist/{js/node → cjs}/commands/dev.js +17 -52
- package/dist/{js/node → cjs}/commands/index.js +0 -0
- package/dist/{js/node → cjs}/commands/inspect.js +2 -22
- package/dist/{js/node → cjs}/commands/serve.js +8 -28
- package/dist/{js/node → cjs}/config/default.js +15 -26
- package/dist/{js/node → cjs}/config/index.js +0 -0
- package/dist/{js/node → cjs}/config/initialize/index.js +0 -0
- package/dist/{js/node → cjs}/config/initialize/inits.js +4 -20
- package/dist/{js/node → cjs}/config/legacy/createHtmlConfig.js +0 -0
- package/dist/{js/node → cjs}/config/legacy/createOutputConfig.js +0 -0
- package/dist/{js/node → cjs}/config/legacy/createSourceConfig.js +0 -0
- package/dist/{js/node → cjs}/config/legacy/createToolsConfig.js +0 -0
- package/dist/{js/node → cjs}/config/legacy/index.js +0 -0
- package/dist/cjs/defineConfig.js +33 -0
- package/dist/{js/node → cjs}/exports/server.js +0 -0
- package/dist/{js/node → cjs}/hooks.js +0 -0
- package/dist/cjs/index.js +198 -0
- package/dist/cjs/initialize/index.js +102 -0
- package/dist/{js/node → cjs}/locale/en.js +0 -0
- package/dist/{js/node → cjs}/locale/index.js +0 -0
- package/dist/{js/node → cjs}/locale/zh.js +0 -0
- package/dist/{js/node → cjs}/schema/Schema.js +0 -0
- package/dist/{js/node → cjs}/schema/index.js +0 -0
- package/dist/{js/node → cjs}/schema/legacy.js +0 -0
- package/dist/{js/node → cjs}/types/config/deploy.js +0 -0
- package/dist/{js/node → cjs}/types/config/dev.js +0 -0
- package/dist/{js/node → cjs}/types/config/experiments.js +0 -0
- package/dist/{js/node → cjs}/types/config/html.js +0 -0
- package/dist/{js/node → cjs}/types/config/index.js +0 -0
- package/dist/{js/node → cjs}/types/config/output.js +0 -0
- package/dist/{js/node → cjs}/types/config/performance.js +0 -0
- package/dist/{js/node → cjs}/types/config/security.js +0 -0
- package/dist/{js/node → cjs}/types/config/source.js +0 -0
- package/dist/{js/node → cjs}/types/config/tools.js +0 -0
- package/dist/{js/node → cjs}/types/hooks.js +0 -0
- package/dist/{js/node → cjs}/types/index.js +0 -0
- package/dist/{js/node → cjs}/types/legacyConfig/deploy.js +0 -0
- package/dist/{js/node → cjs}/types/legacyConfig/dev.js +0 -0
- package/dist/{js/node → cjs}/types/legacyConfig/index.js +0 -0
- package/dist/{js/node → cjs}/types/legacyConfig/output.js +0 -0
- package/dist/{js/node → cjs}/types/legacyConfig/source.js +0 -0
- package/dist/{js/node → cjs}/types/legacyConfig/tools.js +0 -0
- package/dist/{js/node → cjs}/types/utils.js +0 -0
- package/dist/{js/node → cjs}/utils/config.js +19 -57
- package/dist/{js/node → cjs}/utils/createServer.js +10 -46
- package/dist/{js/node → cjs}/utils/env.js +0 -0
- package/dist/{js/node → cjs}/utils/generateWatchFiles.js +16 -38
- package/dist/{js/node → cjs}/utils/getSelectedEntries.js +3 -23
- package/dist/cjs/utils/getServerInternalPlugins.js +41 -0
- package/dist/{js/node → cjs}/utils/language.js +0 -0
- package/dist/{js/node → cjs}/utils/printInstructions.js +3 -23
- package/dist/cjs/utils/restart.js +45 -0
- package/dist/{js/node → cjs}/utils/routes.js +3 -23
- package/dist/{js/node → cjs}/utils/types.js +0 -0
- package/dist/{js/treeshaking → esm}/analyze/constants.js +0 -0
- package/dist/{js/treeshaking → esm}/analyze/generateCode.js +14 -14
- package/dist/{js/treeshaking → esm}/analyze/getBundleEntry.js +4 -2
- package/dist/{js/treeshaking → esm}/analyze/getClientRoutes/getRoutes.js +1 -1
- package/dist/{js/treeshaking → esm}/analyze/getClientRoutes/getRoutesLegacy.js +1 -1
- package/dist/{js/treeshaking → esm}/analyze/getClientRoutes/index.js +0 -0
- package/dist/{js/treeshaking → esm}/analyze/getClientRoutes/utils.js +0 -0
- package/dist/{js/treeshaking → esm}/analyze/getFileSystemEntry.js +1 -1
- package/dist/{js/treeshaking → esm}/analyze/getHtmlTemplate.js +0 -0
- package/dist/{js/treeshaking → esm}/analyze/getServerRoutes.js +8 -6
- package/dist/{js/treeshaking → esm}/analyze/index.js +8 -8
- package/dist/{js/treeshaking → esm}/analyze/isDefaultExportFunction.js +0 -0
- package/dist/{js/treeshaking → esm}/analyze/makeLegalIdentifier.js +0 -0
- package/dist/{js/treeshaking → esm}/analyze/nestedRoutes.js +5 -5
- package/dist/{js/treeshaking → esm}/analyze/templates.js +8 -7
- package/dist/{js/treeshaking → esm}/analyze/utils.js +3 -3
- package/dist/{js/treeshaking → esm}/builder/builder-rspack/index.js +0 -0
- package/dist/{js/treeshaking → esm}/builder/builder-webpack/builderPlugins/compatModern.js +4 -4
- package/dist/{js/treeshaking → esm}/builder/builder-webpack/index.js +2 -2
- package/dist/{js/treeshaking → esm}/builder/builder-webpack/webpackPlugins/RouterPlugin.js +5 -2
- package/dist/{js/treeshaking → esm}/builder/builder-webpack/webpackPlugins/index.js +0 -0
- package/dist/{js/treeshaking → esm}/builder/generator/createBuilderOptions.js +2 -2
- package/dist/{js/treeshaking → esm}/builder/generator/createBuilderProviderConfig.js +0 -0
- package/dist/{js/treeshaking → esm}/builder/generator/getBuilderTargets.js +5 -1
- package/dist/{js/treeshaking → esm}/builder/generator/index.js +2 -2
- package/dist/{js/treeshaking → esm}/builder/index.js +0 -0
- package/dist/{js/treeshaking → esm}/builder/shared/builderPlugins/adapterModern.js +62 -13
- package/dist/{js/treeshaking → esm}/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.js +0 -0
- package/dist/{js/treeshaking → esm}/builder/shared/bundlerPlugins/HtmlBottomTemplate.js +2 -2
- package/dist/{js/treeshaking → esm}/builder/shared/createCopyPattern.js +0 -0
- package/dist/{js/treeshaking → esm}/builder/shared/index.js +0 -0
- package/dist/{js/treeshaking → esm}/builder/shared/loaders/serverModuleLoader.js +0 -0
- package/dist/{js/treeshaking → esm}/builder/shared/types.js +0 -0
- package/dist/{js/treeshaking → esm}/commands/build.js +0 -0
- package/dist/{js/treeshaking → esm}/commands/deploy.js +0 -0
- package/dist/{js/treeshaking → esm}/commands/dev.js +2 -2
- package/dist/{js/treeshaking → esm}/commands/index.js +0 -0
- package/dist/{js/treeshaking → esm}/commands/inspect.js +0 -0
- package/dist/{js/treeshaking → esm}/commands/serve.js +2 -2
- package/dist/{js/treeshaking → esm}/config/default.js +0 -0
- package/dist/{js/treeshaking → esm}/config/index.js +0 -0
- package/dist/{js/treeshaking → esm}/config/initialize/index.js +0 -0
- package/dist/{js/treeshaking → esm}/config/initialize/inits.js +2 -2
- package/dist/esm/config/legacy/createHtmlConfig.js +19 -0
- package/dist/{js/treeshaking → esm}/config/legacy/createOutputConfig.js +1 -1
- package/dist/{js/treeshaking → esm}/config/legacy/createSourceConfig.js +1 -1
- package/dist/{js/treeshaking → esm}/config/legacy/createToolsConfig.js +1 -1
- package/dist/{js/treeshaking → esm}/config/legacy/index.js +0 -0
- package/dist/{js/treeshaking → esm}/defineConfig.js +0 -0
- package/dist/{js/treeshaking → esm}/exports/server.js +0 -0
- package/dist/{js/treeshaking → esm}/hooks.js +0 -0
- package/dist/{js/treeshaking → esm}/index.js +0 -0
- package/dist/{js/treeshaking → esm}/initialize/index.js +2 -2
- package/dist/{js/treeshaking → esm}/locale/en.js +0 -0
- package/dist/{js/treeshaking → esm}/locale/index.js +0 -0
- package/dist/{js/treeshaking → esm}/locale/zh.js +0 -0
- package/dist/{js/treeshaking → esm}/schema/Schema.js +0 -0
- package/dist/{js/treeshaking → esm}/schema/index.js +0 -0
- package/dist/{js/treeshaking → esm}/schema/legacy.js +0 -0
- package/dist/{js/treeshaking → esm}/types/config/deploy.js +0 -0
- package/dist/{js/treeshaking → esm}/types/config/dev.js +0 -0
- package/dist/{js/treeshaking → esm}/types/config/experiments.js +0 -0
- package/dist/{js/treeshaking → esm}/types/config/html.js +0 -0
- package/dist/{js/treeshaking → esm}/types/config/index.js +0 -0
- package/dist/{js/treeshaking → esm}/types/config/output.js +0 -0
- package/dist/{js/treeshaking → esm}/types/config/performance.js +0 -0
- package/dist/{js/treeshaking → esm}/types/config/security.js +0 -0
- package/dist/{js/treeshaking → esm}/types/config/source.js +0 -0
- package/dist/{js/treeshaking → esm}/types/config/tools.js +0 -0
- package/dist/{js/treeshaking → esm}/types/hooks.js +0 -0
- package/dist/{js/treeshaking → esm}/types/index.js +0 -0
- package/dist/{js/treeshaking → esm}/types/legacyConfig/deploy.js +0 -0
- package/dist/{js/treeshaking → esm}/types/legacyConfig/dev.js +0 -0
- package/dist/{js/treeshaking → esm}/types/legacyConfig/index.js +0 -0
- package/dist/{js/treeshaking → esm}/types/legacyConfig/output.js +0 -0
- package/dist/{js/treeshaking → esm}/types/legacyConfig/source.js +0 -0
- package/dist/{js/treeshaking → esm}/types/legacyConfig/tools.js +0 -0
- package/dist/{js/treeshaking → esm}/types/utils.js +0 -0
- package/dist/{js/treeshaking → esm}/utils/config.js +2 -2
- package/dist/{js/treeshaking → esm}/utils/createServer.js +0 -0
- package/dist/{js/treeshaking → esm}/utils/env.js +0 -0
- package/dist/{js/treeshaking → esm}/utils/generateWatchFiles.js +0 -0
- package/dist/{js/treeshaking → esm}/utils/getSelectedEntries.js +0 -0
- package/dist/{js/treeshaking → esm}/utils/getServerInternalPlugins.js +2 -2
- package/dist/{js/treeshaking → esm}/utils/language.js +0 -0
- package/dist/{js/treeshaking → esm}/utils/printInstructions.js +0 -0
- package/dist/{js/treeshaking → esm}/utils/restart.js +0 -0
- package/dist/{js/treeshaking → esm}/utils/routes.js +0 -0
- package/dist/{js/treeshaking → esm}/utils/types.js +0 -0
- package/dist/{js/modern → esm-node}/analyze/constants.js +0 -0
- package/dist/esm-node/analyze/generateCode.js +225 -0
- package/dist/{js/modern → esm-node}/analyze/getBundleEntry.js +6 -0
- package/dist/{js/modern → esm-node}/analyze/getClientRoutes/getRoutes.js +1 -20
- package/dist/{js/modern → esm-node}/analyze/getClientRoutes/getRoutesLegacy.js +1 -20
- package/dist/{js/modern → esm-node}/analyze/getClientRoutes/index.js +0 -0
- package/dist/{js/modern → esm-node}/analyze/getClientRoutes/utils.js +0 -0
- package/dist/{js/modern → esm-node}/analyze/getFileSystemEntry.js +0 -0
- package/dist/{js/modern → esm-node}/analyze/getHtmlTemplate.js +4 -24
- package/dist/{js/modern → esm-node}/analyze/getServerRoutes.js +24 -45
- package/dist/esm-node/analyze/index.js +281 -0
- package/dist/{js/modern → esm-node}/analyze/isDefaultExportFunction.js +0 -0
- package/dist/{js/modern → esm-node}/analyze/makeLegalIdentifier.js +0 -0
- package/dist/{js/modern → esm-node}/analyze/nestedRoutes.js +16 -52
- package/dist/{js/modern → esm-node}/analyze/templates.js +16 -51
- package/dist/{js/modern → esm-node}/analyze/utils.js +9 -29
- package/dist/{js/modern → esm-node}/builder/builder-rspack/index.js +0 -0
- package/dist/{js/modern → esm-node}/builder/builder-webpack/builderPlugins/compatModern.js +0 -0
- package/dist/esm-node/builder/builder-webpack/index.js +51 -0
- package/dist/{js/modern → esm-node}/builder/builder-webpack/webpackPlugins/RouterPlugin.js +7 -24
- package/dist/{js/modern → esm-node}/builder/builder-webpack/webpackPlugins/index.js +0 -0
- package/dist/{js/modern → esm-node}/builder/generator/createBuilderOptions.js +0 -0
- package/dist/esm-node/builder/generator/createBuilderProviderConfig.js +26 -0
- package/dist/{js/modern → esm-node}/builder/generator/getBuilderTargets.js +10 -1
- package/dist/esm-node/builder/generator/index.js +29 -0
- package/dist/esm-node/builder/index.js +17 -0
- package/dist/{js/modern → esm-node}/builder/shared/builderPlugins/adapterModern.js +35 -36
- package/dist/{js/modern → esm-node}/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.js +0 -0
- package/dist/{js/modern → esm-node}/builder/shared/bundlerPlugins/HtmlBottomTemplate.js +0 -0
- package/dist/{js/modern → esm-node}/builder/shared/createCopyPattern.js +0 -0
- package/dist/{js/modern → esm-node}/builder/shared/index.js +0 -0
- package/dist/{js/modern → esm-node}/builder/shared/loaders/serverModuleLoader.js +0 -0
- package/dist/{js/modern → esm-node}/builder/shared/types.js +0 -0
- package/dist/esm-node/commands/build.js +52 -0
- package/dist/esm-node/commands/deploy.js +8 -0
- package/dist/esm-node/commands/dev.js +72 -0
- package/dist/{js/modern → esm-node}/commands/index.js +0 -0
- package/dist/esm-node/commands/inspect.js +18 -0
- package/dist/{js/modern → esm-node}/commands/serve.js +8 -28
- package/dist/{js/modern → esm-node}/config/default.js +15 -28
- package/dist/{js/modern → esm-node}/config/index.js +0 -0
- package/dist/{js/modern → esm-node}/config/initialize/index.js +0 -0
- package/dist/{js/modern → esm-node}/config/initialize/inits.js +4 -22
- package/dist/{js/modern → esm-node}/config/legacy/createHtmlConfig.js +0 -0
- package/dist/{js/modern → esm-node}/config/legacy/createOutputConfig.js +0 -0
- package/dist/{js/modern → esm-node}/config/legacy/createSourceConfig.js +0 -0
- package/dist/{js/modern → esm-node}/config/legacy/createToolsConfig.js +0 -0
- package/dist/{js/modern → esm-node}/config/legacy/index.js +0 -0
- package/dist/esm-node/defineConfig.js +9 -0
- package/dist/{js/modern → esm-node}/exports/server.js +0 -0
- package/dist/{js/modern → esm-node}/hooks.js +0 -0
- package/dist/esm-node/index.js +172 -0
- package/dist/esm-node/initialize/index.js +91 -0
- package/dist/{js/modern → esm-node}/locale/en.js +0 -0
- package/dist/{js/modern → esm-node}/locale/index.js +0 -0
- package/dist/{js/modern → esm-node}/locale/zh.js +0 -0
- package/dist/{js/modern → esm-node}/schema/Schema.js +0 -0
- package/dist/{js/modern → esm-node}/schema/index.js +0 -0
- package/dist/{js/modern → esm-node}/schema/legacy.js +0 -0
- package/dist/{js/modern → esm-node}/types/config/deploy.js +0 -0
- package/dist/{js/modern → esm-node}/types/config/dev.js +0 -0
- package/dist/{js/modern → esm-node}/types/config/experiments.js +0 -0
- package/dist/{js/modern → esm-node}/types/config/html.js +0 -0
- package/dist/{js/modern → esm-node}/types/config/index.js +0 -0
- package/dist/{js/modern → esm-node}/types/config/output.js +0 -0
- package/dist/{js/modern → esm-node}/types/config/performance.js +0 -0
- package/dist/{js/modern → esm-node}/types/config/security.js +0 -0
- package/dist/{js/modern → esm-node}/types/config/source.js +0 -0
- package/dist/{js/modern → esm-node}/types/config/tools.js +0 -0
- package/dist/{js/modern → esm-node}/types/hooks.js +0 -0
- package/dist/{js/modern → esm-node}/types/index.js +0 -0
- package/dist/{js/modern → esm-node}/types/legacyConfig/deploy.js +0 -0
- package/dist/{js/modern → esm-node}/types/legacyConfig/dev.js +0 -0
- package/dist/{js/modern → esm-node}/types/legacyConfig/index.js +0 -0
- package/dist/{js/modern → esm-node}/types/legacyConfig/output.js +0 -0
- package/dist/{js/modern → esm-node}/types/legacyConfig/source.js +0 -0
- package/dist/{js/modern → esm-node}/types/legacyConfig/tools.js +0 -0
- package/dist/{js/modern → esm-node}/types/utils.js +0 -0
- package/dist/esm-node/utils/config.js +88 -0
- package/dist/esm-node/utils/createServer.js +37 -0
- package/dist/{js/modern → esm-node}/utils/env.js +0 -0
- package/dist/esm-node/utils/generateWatchFiles.js +33 -0
- package/dist/{js/modern → esm-node}/utils/getSelectedEntries.js +3 -23
- package/dist/esm-node/utils/getServerInternalPlugins.js +18 -0
- package/dist/{js/modern → esm-node}/utils/language.js +0 -0
- package/dist/esm-node/utils/printInstructions.js +11 -0
- package/dist/esm-node/utils/restart.js +22 -0
- package/dist/esm-node/utils/routes.js +10 -0
- package/dist/{js/modern → esm-node}/utils/types.js +0 -0
- package/dist/types/types/config/tools.d.ts +1 -1
- package/dist/types/types/hooks.d.ts +5 -4
- package/dist/types/types/index.d.ts +3 -1
- package/package.json +30 -31
- package/dist/js/modern/analyze/generateCode.js +0 -247
- package/dist/js/modern/analyze/index.js +0 -329
- package/dist/js/modern/builder/builder-webpack/index.js +0 -93
- package/dist/js/modern/builder/generator/createBuilderProviderConfig.js +0 -39
- package/dist/js/modern/builder/generator/index.js +0 -53
- package/dist/js/modern/builder/index.js +0 -39
- package/dist/js/modern/commands/build.js +0 -91
- package/dist/js/modern/commands/deploy.js +0 -28
- package/dist/js/modern/commands/dev.js +0 -109
- package/dist/js/modern/commands/inspect.js +0 -38
- package/dist/js/modern/defineConfig.js +0 -27
- package/dist/js/modern/index.js +0 -221
- package/dist/js/modern/initialize/index.js +0 -132
- package/dist/js/modern/utils/config.js +0 -128
- package/dist/js/modern/utils/createServer.js +0 -75
- package/dist/js/modern/utils/generateWatchFiles.js +0 -55
- package/dist/js/modern/utils/getServerInternalPlugins.js +0 -58
- package/dist/js/modern/utils/printInstructions.js +0 -31
- package/dist/js/modern/utils/restart.js +0 -44
- package/dist/js/modern/utils/routes.js +0 -30
- package/dist/js/node/analyze/generateCode.js +0 -271
- package/dist/js/node/analyze/index.js +0 -336
- package/dist/js/node/builder/generator/index.js +0 -82
- package/dist/js/node/commands/deploy.js +0 -51
- package/dist/js/node/defineConfig.js +0 -49
- package/dist/js/node/index.js +0 -245
- package/dist/js/node/initialize/index.js +0 -141
- package/dist/js/node/utils/getServerInternalPlugins.js +0 -79
- package/dist/js/node/utils/restart.js +0 -67
- package/dist/js/treeshaking/config/legacy/createHtmlConfig.js +0 -19
|
@@ -1,336 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __export = (target, all) => {
|
|
25
|
-
for (var name in all)
|
|
26
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
27
|
-
};
|
|
28
|
-
var __copyProps = (to, from, except, desc) => {
|
|
29
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
30
|
-
for (let key of __getOwnPropNames(from))
|
|
31
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
32
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
33
|
-
}
|
|
34
|
-
return to;
|
|
35
|
-
};
|
|
36
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
37
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
38
|
-
mod
|
|
39
|
-
));
|
|
40
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
41
|
-
var __async = (__this, __arguments, generator) => {
|
|
42
|
-
return new Promise((resolve, reject) => {
|
|
43
|
-
var fulfilled = (value) => {
|
|
44
|
-
try {
|
|
45
|
-
step(generator.next(value));
|
|
46
|
-
} catch (e) {
|
|
47
|
-
reject(e);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
var rejected = (value) => {
|
|
51
|
-
try {
|
|
52
|
-
step(generator.throw(value));
|
|
53
|
-
} catch (e) {
|
|
54
|
-
reject(e);
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
58
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
|
-
var analyze_exports = {};
|
|
62
|
-
__export(analyze_exports, {
|
|
63
|
-
default: () => analyze_default
|
|
64
|
-
});
|
|
65
|
-
module.exports = __toCommonJS(analyze_exports);
|
|
66
|
-
var path = __toESM(require("path"));
|
|
67
|
-
var import_utils = require("@modern-js/utils");
|
|
68
|
-
var import_lodash = require("@modern-js/utils/lodash");
|
|
69
|
-
var import_printInstructions = require("../utils/printInstructions");
|
|
70
|
-
var import_routes = require("../utils/routes");
|
|
71
|
-
var import_config = require("../utils/config");
|
|
72
|
-
var import_getSelectedEntries = require("../utils/getSelectedEntries");
|
|
73
|
-
var import_config2 = require("../config");
|
|
74
|
-
var import_builder = require("../builder");
|
|
75
|
-
var import_utils2 = require("./utils");
|
|
76
|
-
var import_constants = require("./constants");
|
|
77
|
-
const debug = (0, import_utils.createDebugger)("plugin-analyze");
|
|
78
|
-
var analyze_default = ({
|
|
79
|
-
bundler
|
|
80
|
-
}) => ({
|
|
81
|
-
name: "@modern-js/plugin-analyze",
|
|
82
|
-
setup: (api) => {
|
|
83
|
-
let pagesDir = [];
|
|
84
|
-
let nestedRouteEntries = [];
|
|
85
|
-
let originEntrypoints = [];
|
|
86
|
-
return {
|
|
87
|
-
prepare() {
|
|
88
|
-
return __async(this, null, function* () {
|
|
89
|
-
var _a2;
|
|
90
|
-
let appContext = api.useAppContext();
|
|
91
|
-
const resolvedConfig = api.useResolvedConfigContext();
|
|
92
|
-
const hookRunners = api.useHookRunners();
|
|
93
|
-
try {
|
|
94
|
-
import_utils.fs.emptydirSync(appContext.internalDirectory);
|
|
95
|
-
} catch (e) {
|
|
96
|
-
}
|
|
97
|
-
const apiOnly = yield (0, import_utils.isApiOnly)(
|
|
98
|
-
appContext.appDirectory,
|
|
99
|
-
(_a2 = resolvedConfig.source) == null ? void 0 : _a2.entriesDir
|
|
100
|
-
);
|
|
101
|
-
yield hookRunners.addRuntimeExports();
|
|
102
|
-
if (apiOnly) {
|
|
103
|
-
const { routes: routes2 } = yield hookRunners.modifyServerRoutes({
|
|
104
|
-
routes: []
|
|
105
|
-
});
|
|
106
|
-
debug(`server routes: %o`, routes2);
|
|
107
|
-
appContext = __spreadProps(__spreadValues({}, appContext), {
|
|
108
|
-
apiOnly,
|
|
109
|
-
serverRoutes: routes2
|
|
110
|
-
});
|
|
111
|
-
api.setAppContext(appContext);
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
const [
|
|
115
|
-
{ getBundleEntry },
|
|
116
|
-
{ getServerRoutes },
|
|
117
|
-
{ generateCode },
|
|
118
|
-
{ getHtmlTemplate }
|
|
119
|
-
] = yield Promise.all([
|
|
120
|
-
Promise.resolve().then(() => __toESM(require("./getBundleEntry"))),
|
|
121
|
-
Promise.resolve().then(() => __toESM(require("./getServerRoutes"))),
|
|
122
|
-
Promise.resolve().then(() => __toESM(require("./generateCode"))),
|
|
123
|
-
Promise.resolve().then(() => __toESM(require("./getHtmlTemplate")))
|
|
124
|
-
]);
|
|
125
|
-
const entrypoints = getBundleEntry(appContext, resolvedConfig);
|
|
126
|
-
debug(`entrypoints: %o`, entrypoints);
|
|
127
|
-
const initialRoutes = getServerRoutes(entrypoints, {
|
|
128
|
-
appContext,
|
|
129
|
-
config: resolvedConfig
|
|
130
|
-
});
|
|
131
|
-
const { routes } = yield hookRunners.modifyServerRoutes({
|
|
132
|
-
routes: initialRoutes
|
|
133
|
-
});
|
|
134
|
-
debug(`server routes: %o`, routes);
|
|
135
|
-
appContext = __spreadProps(__spreadValues({}, appContext), {
|
|
136
|
-
entrypoints,
|
|
137
|
-
serverRoutes: routes
|
|
138
|
-
});
|
|
139
|
-
api.setAppContext(appContext);
|
|
140
|
-
nestedRouteEntries = entrypoints.map((point) => point.nestedRoutesEntry).filter(Boolean);
|
|
141
|
-
pagesDir = entrypoints.map((point) => point.entry).filter(Boolean).concat(nestedRouteEntries);
|
|
142
|
-
originEntrypoints = (0, import_lodash.cloneDeep)(entrypoints);
|
|
143
|
-
yield generateCode(appContext, resolvedConfig, entrypoints, api);
|
|
144
|
-
const htmlTemplates = yield getHtmlTemplate(entrypoints, api, {
|
|
145
|
-
appContext,
|
|
146
|
-
config: resolvedConfig
|
|
147
|
-
});
|
|
148
|
-
debug(`html templates: %o`, htmlTemplates);
|
|
149
|
-
yield hookRunners.addDefineTypes();
|
|
150
|
-
debug(`add Define Types`);
|
|
151
|
-
let checkedEntries = entrypoints.map((point) => point.entryName);
|
|
152
|
-
if ((0, import_utils.isDevCommand)()) {
|
|
153
|
-
const { entry } = (0, import_utils.minimist)(process.argv.slice(2));
|
|
154
|
-
checkedEntries = yield (0, import_getSelectedEntries.getSelectedEntries)(
|
|
155
|
-
typeof entry === "string" ? entry.split(",") : entry,
|
|
156
|
-
entrypoints
|
|
157
|
-
);
|
|
158
|
-
}
|
|
159
|
-
appContext = __spreadProps(__spreadValues({}, appContext), {
|
|
160
|
-
entrypoints,
|
|
161
|
-
checkedEntries,
|
|
162
|
-
apiOnly,
|
|
163
|
-
serverRoutes: routes,
|
|
164
|
-
htmlTemplates
|
|
165
|
-
});
|
|
166
|
-
api.setAppContext(appContext);
|
|
167
|
-
const command = (0, import_utils.getCommand)();
|
|
168
|
-
const buildCommands = ["dev", "start", "build", "inspect", "deploy"];
|
|
169
|
-
if (buildCommands.includes(command)) {
|
|
170
|
-
let _b;
|
|
171
|
-
const normalizedConfig = api.useResolvedConfigContext();
|
|
172
|
-
const createBuilderForModern = yield (0, import_builder.createBuilderGenerator)(bundler);
|
|
173
|
-
const builder = yield createBuilderForModern({
|
|
174
|
-
normalizedConfig,
|
|
175
|
-
appContext,
|
|
176
|
-
onBeforeBuild(_0) {
|
|
177
|
-
return __async(this, arguments, function* ({ bundlerConfigs }) {
|
|
178
|
-
const hookRunners2 = api.useHookRunners();
|
|
179
|
-
yield (0, import_routes.generateRoutes)(appContext);
|
|
180
|
-
yield hookRunners2.beforeBuild({ bundlerConfigs });
|
|
181
|
-
});
|
|
182
|
-
},
|
|
183
|
-
onAfterBuild(_0) {
|
|
184
|
-
return __async(this, arguments, function* ({ stats }) {
|
|
185
|
-
const hookRunners2 = api.useHookRunners();
|
|
186
|
-
yield hookRunners2.afterBuild({ stats });
|
|
187
|
-
yield (0, import_config.emitResolvedConfig)(
|
|
188
|
-
appContext.appDirectory,
|
|
189
|
-
normalizedConfig
|
|
190
|
-
);
|
|
191
|
-
});
|
|
192
|
-
},
|
|
193
|
-
onDevCompileDone(_0) {
|
|
194
|
-
return __async(this, arguments, function* ({ isFirstCompile }) {
|
|
195
|
-
const hookRunners2 = api.useHookRunners();
|
|
196
|
-
if (process.stdout.isTTY || isFirstCompile) {
|
|
197
|
-
hookRunners2.afterDev();
|
|
198
|
-
if (isFirstCompile) {
|
|
199
|
-
(0, import_printInstructions.printInstructions)(hookRunners2, appContext, normalizedConfig);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
},
|
|
204
|
-
onBeforeCreateCompiler(_0) {
|
|
205
|
-
return __async(this, arguments, function* ({ bundlerConfigs }) {
|
|
206
|
-
const hookRunners2 = api.useHookRunners();
|
|
207
|
-
yield hookRunners2.beforeCreateCompiler({
|
|
208
|
-
bundlerConfigs
|
|
209
|
-
});
|
|
210
|
-
});
|
|
211
|
-
},
|
|
212
|
-
onAfterCreateCompiler(_0) {
|
|
213
|
-
return __async(this, arguments, function* ({ compiler }) {
|
|
214
|
-
const hookRunners2 = api.useHookRunners();
|
|
215
|
-
yield hookRunners2.afterCreateCompiler({ compiler });
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
});
|
|
219
|
-
builder.addPlugins(resolvedConfig.builderPlugins);
|
|
220
|
-
appContext = __spreadProps(__spreadValues({}, appContext), {
|
|
221
|
-
builder
|
|
222
|
-
});
|
|
223
|
-
api.setAppContext(appContext);
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
},
|
|
227
|
-
watchFiles() {
|
|
228
|
-
return pagesDir;
|
|
229
|
-
},
|
|
230
|
-
config() {
|
|
231
|
-
return {
|
|
232
|
-
tools: {
|
|
233
|
-
webpackChain: (chain, { name }) => {
|
|
234
|
-
const appContext = api.useAppContext();
|
|
235
|
-
const resolvedConfig = api.useResolvedConfigContext();
|
|
236
|
-
const { entrypoints, internalDirectory, packageName } = appContext;
|
|
237
|
-
entrypoints.forEach((entrypoint) => {
|
|
238
|
-
const { entryName } = entrypoint;
|
|
239
|
-
const ssr = (0, import_utils.getEntryOptions)(
|
|
240
|
-
entryName,
|
|
241
|
-
resolvedConfig.server.ssr,
|
|
242
|
-
resolvedConfig.server.ssrByEntries,
|
|
243
|
-
packageName
|
|
244
|
-
);
|
|
245
|
-
if (entrypoint.nestedRoutesEntry && ssr && name === "server") {
|
|
246
|
-
const serverLoadersFile = (0, import_utils2.getServerLoadersFile)(
|
|
247
|
-
internalDirectory,
|
|
248
|
-
entryName
|
|
249
|
-
);
|
|
250
|
-
chain.entry(`${entryName}-server-loaders`).add(serverLoadersFile);
|
|
251
|
-
}
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
};
|
|
256
|
-
},
|
|
257
|
-
resolvedConfig({ resolved }) {
|
|
258
|
-
const appContext = api.useAppContext();
|
|
259
|
-
const config = (0, import_config2.initialNormalizedConfig)(resolved, appContext, bundler);
|
|
260
|
-
return {
|
|
261
|
-
resolved: config
|
|
262
|
-
};
|
|
263
|
-
},
|
|
264
|
-
modifyEntryImports(_0) {
|
|
265
|
-
return __async(this, arguments, function* ({ entrypoint, imports }) {
|
|
266
|
-
const appContext = api.useAppContext();
|
|
267
|
-
const { srcDirectory, internalSrcAlias } = appContext;
|
|
268
|
-
const { fileSystemRoutes, nestedRoutesEntry } = entrypoint;
|
|
269
|
-
if (fileSystemRoutes && nestedRoutesEntry) {
|
|
270
|
-
const rootLayoutPath = path.join(nestedRoutesEntry, "layout");
|
|
271
|
-
const rootLayoutFile = (0, import_utils.findExists)(
|
|
272
|
-
[".js", ".ts", ".jsx", ".tsx"].map(
|
|
273
|
-
(ext) => `${rootLayoutPath}${ext}`
|
|
274
|
-
)
|
|
275
|
-
);
|
|
276
|
-
if (rootLayoutFile) {
|
|
277
|
-
const rootLayoutBuffer = yield import_utils.fs.readFile(rootLayoutFile);
|
|
278
|
-
const rootLayout = rootLayoutBuffer.toString();
|
|
279
|
-
const [, moduleExports] = yield (0, import_utils2.parseModule)({
|
|
280
|
-
source: rootLayout.toString(),
|
|
281
|
-
filename: rootLayoutFile
|
|
282
|
-
});
|
|
283
|
-
const hasAppConfig = moduleExports.some(
|
|
284
|
-
(e) => e.n === import_constants.APP_CONFIG_NAME
|
|
285
|
-
);
|
|
286
|
-
const generateLayoutPath = (0, import_utils2.replaceWithAlias)(
|
|
287
|
-
srcDirectory,
|
|
288
|
-
rootLayoutFile,
|
|
289
|
-
internalSrcAlias
|
|
290
|
-
);
|
|
291
|
-
if (hasAppConfig) {
|
|
292
|
-
imports.push({
|
|
293
|
-
value: generateLayoutPath,
|
|
294
|
-
specifiers: [{ imported: import_constants.APP_CONFIG_NAME }]
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
const hasAppInit = moduleExports.some(
|
|
298
|
-
(e) => e.n === import_constants.APP_INIT_EXPORTED
|
|
299
|
-
);
|
|
300
|
-
if (hasAppInit) {
|
|
301
|
-
imports.push({
|
|
302
|
-
value: generateLayoutPath,
|
|
303
|
-
specifiers: [
|
|
304
|
-
{ imported: import_constants.APP_INIT_EXPORTED, local: import_constants.APP_INIT_IMPORTED }
|
|
305
|
-
]
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
return {
|
|
311
|
-
entrypoint,
|
|
312
|
-
imports
|
|
313
|
-
};
|
|
314
|
-
});
|
|
315
|
-
},
|
|
316
|
-
fileChange(e) {
|
|
317
|
-
return __async(this, null, function* () {
|
|
318
|
-
const appContext = api.useAppContext();
|
|
319
|
-
const { appDirectory } = appContext;
|
|
320
|
-
const { filename, eventType } = e;
|
|
321
|
-
const isPageFile = (name) => pagesDir.some((pageDir) => name.includes(pageDir));
|
|
322
|
-
const absoluteFilePath = path.resolve(appDirectory, filename);
|
|
323
|
-
const isRouteComponent = isPageFile(absoluteFilePath) && (0, import_utils2.isPageComponentFile)(absoluteFilePath);
|
|
324
|
-
if (isRouteComponent && (eventType === "add" || eventType === "unlink")) {
|
|
325
|
-
const resolvedConfig = api.useResolvedConfigContext();
|
|
326
|
-
const { generateCode } = yield Promise.resolve().then(() => __toESM(require("./generateCode")));
|
|
327
|
-
const entrypoints = (0, import_lodash.cloneDeep)(originEntrypoints);
|
|
328
|
-
generateCode(appContext, resolvedConfig, entrypoints, api);
|
|
329
|
-
}
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
|
-
});
|
|
335
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
336
|
-
0 && (module.exports = {});
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
|
-
mod
|
|
22
|
-
));
|
|
23
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
|
-
var __async = (__this, __arguments, generator) => {
|
|
25
|
-
return new Promise((resolve, reject) => {
|
|
26
|
-
var fulfilled = (value) => {
|
|
27
|
-
try {
|
|
28
|
-
step(generator.next(value));
|
|
29
|
-
} catch (e) {
|
|
30
|
-
reject(e);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
var rejected = (value) => {
|
|
34
|
-
try {
|
|
35
|
-
step(generator.throw(value));
|
|
36
|
-
} catch (e) {
|
|
37
|
-
reject(e);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
41
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
var generator_exports = {};
|
|
45
|
-
__export(generator_exports, {
|
|
46
|
-
generateBuilder: () => generateBuilder
|
|
47
|
-
});
|
|
48
|
-
module.exports = __toCommonJS(generator_exports);
|
|
49
|
-
var import_builder = require("@modern-js/builder");
|
|
50
|
-
var import_createBuilderProviderConfig = require("./createBuilderProviderConfig");
|
|
51
|
-
var import_getBuilderTargets = require("./getBuilderTargets");
|
|
52
|
-
var import_createBuilderOptions = require("./createBuilderOptions");
|
|
53
|
-
function generateBuilder(options, generateProvider, utils) {
|
|
54
|
-
return __async(this, null, function* () {
|
|
55
|
-
const { normalizedConfig, appContext } = options;
|
|
56
|
-
const { modifyBuilderConfig, modifyBuilderInstance } = utils || {};
|
|
57
|
-
const builderConfig = (0, import_createBuilderProviderConfig.createBuilderProviderConfig)(
|
|
58
|
-
normalizedConfig,
|
|
59
|
-
appContext,
|
|
60
|
-
modifyBuilderConfig
|
|
61
|
-
);
|
|
62
|
-
const provider = generateProvider({
|
|
63
|
-
builderConfig
|
|
64
|
-
});
|
|
65
|
-
const target = (0, import_getBuilderTargets.getBuilderTargets)(normalizedConfig);
|
|
66
|
-
const builderOptions = (0, import_createBuilderOptions.createBuilderOptions)(target, appContext);
|
|
67
|
-
const builder = yield (0, import_builder.createBuilder)(provider, builderOptions);
|
|
68
|
-
yield applyBuilderPlugins(builder, options);
|
|
69
|
-
yield modifyBuilderInstance == null ? void 0 : modifyBuilderInstance(builder);
|
|
70
|
-
return builder;
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
function applyBuilderPlugins(builder, options) {
|
|
74
|
-
return __async(this, null, function* () {
|
|
75
|
-
const { builderPluginAdapterModern } = yield Promise.resolve().then(() => __toESM(require("../shared/builderPlugins/adapterModern")));
|
|
76
|
-
builder.addPlugins([builderPluginAdapterModern(options)]);
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
80
|
-
0 && (module.exports = {
|
|
81
|
-
generateBuilder
|
|
82
|
-
});
|
|
@@ -1,51 +0,0 @@
|
|
|
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 deploy_exports = {};
|
|
39
|
-
__export(deploy_exports, {
|
|
40
|
-
deploy: () => deploy
|
|
41
|
-
});
|
|
42
|
-
module.exports = __toCommonJS(deploy_exports);
|
|
43
|
-
const deploy = (api, options) => __async(void 0, null, function* () {
|
|
44
|
-
const hookRunners = api.useHookRunners();
|
|
45
|
-
yield hookRunners.beforeDeploy(options);
|
|
46
|
-
yield hookRunners.afterDeploy(options);
|
|
47
|
-
});
|
|
48
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
49
|
-
0 && (module.exports = {
|
|
50
|
-
deploy
|
|
51
|
-
});
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
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
|
-
};
|
|
21
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
22
|
-
var __export = (target, all) => {
|
|
23
|
-
for (var name in all)
|
|
24
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
25
|
-
};
|
|
26
|
-
var __copyProps = (to, from, except, desc) => {
|
|
27
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
28
|
-
for (let key of __getOwnPropNames(from))
|
|
29
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
30
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
31
|
-
}
|
|
32
|
-
return to;
|
|
33
|
-
};
|
|
34
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
|
-
var defineConfig_exports = {};
|
|
36
|
-
__export(defineConfig_exports, {
|
|
37
|
-
defineConfig: () => defineConfig,
|
|
38
|
-
defineLegacyConfig: () => defineLegacyConfig
|
|
39
|
-
});
|
|
40
|
-
module.exports = __toCommonJS(defineConfig_exports);
|
|
41
|
-
const defineConfig = (config) => config;
|
|
42
|
-
const defineLegacyConfig = (config) => __spreadProps(__spreadValues({}, config), {
|
|
43
|
-
legacy: true
|
|
44
|
-
});
|
|
45
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
-
0 && (module.exports = {
|
|
47
|
-
defineConfig,
|
|
48
|
-
defineLegacyConfig
|
|
49
|
-
});
|