@modern-js/app-tools 2.60.4 → 2.60.6
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/dist/cjs/commands/index.js +0 -2
- package/dist/cjs/hooks.js +7 -5
- package/dist/cjs/plugins/analyze/getFileSystemEntry.js +1 -1
- package/dist/cjs/plugins/analyze/index.js +0 -2
- package/dist/esm/commands/index.js +2 -14
- package/dist/esm/hooks.js +7 -5
- package/dist/esm/plugins/analyze/getFileSystemEntry.js +1 -1
- package/dist/esm/plugins/analyze/index.js +10 -17
- package/dist/esm-node/commands/index.js +0 -2
- package/dist/esm-node/hooks.js +7 -5
- package/dist/esm-node/plugins/analyze/getFileSystemEntry.js +1 -1
- package/dist/esm-node/plugins/analyze/index.js +0 -2
- package/dist/types/types/hooks.d.ts +0 -6
- package/package.json +18 -18
|
@@ -55,7 +55,6 @@ const devCommand = async (program, api) => {
|
|
|
55
55
|
devProgram.command(subCmd).action(async (options = {}) => {
|
|
56
56
|
const { appDirectory } = api.useAppContext();
|
|
57
57
|
const { isTypescript } = await import("@modern-js/utils");
|
|
58
|
-
await runner.beforeDevTask(meta);
|
|
59
58
|
await meta.action(options, {
|
|
60
59
|
isTsProject: isTypescript(appDirectory)
|
|
61
60
|
});
|
|
@@ -76,7 +75,6 @@ const buildCommand = async (program, api) => {
|
|
|
76
75
|
buildProgram.command(platform).action(async () => {
|
|
77
76
|
const { appDirectory } = api.useAppContext();
|
|
78
77
|
const { isTypescript } = await import("@modern-js/utils");
|
|
79
|
-
await runner.beforeBuildPlatform(platformBuilders);
|
|
80
78
|
await platformBuilder.build(platform, {
|
|
81
79
|
isTsProject: isTypescript(appDirectory)
|
|
82
80
|
});
|
package/dist/cjs/hooks.js
CHANGED
|
@@ -33,8 +33,6 @@ const hooks = {
|
|
|
33
33
|
generateEntryCode: (0, import_plugin.createAsyncWorkflow)(),
|
|
34
34
|
htmlPartials: (0, import_plugin.createAsyncWaterfall)(),
|
|
35
35
|
beforeGenerateRoutes: (0, import_plugin.createAsyncWaterfall)(),
|
|
36
|
-
addDefineTypes: (0, import_plugin.createAsyncWaterfall)(),
|
|
37
|
-
collectServerPlugins: (0, import_plugin.createAsyncWaterfall)(),
|
|
38
36
|
_internalServerPlugins: (0, import_plugin.createAsyncWaterfall)(),
|
|
39
37
|
beforeDev: (0, import_plugin.createAsyncWorkflow)(),
|
|
40
38
|
afterDev: (0, import_plugin.createAsyncWorkflow)(),
|
|
@@ -47,10 +45,14 @@ const hooks = {
|
|
|
47
45
|
deploy: (0, import_plugin.createAsyncWorkflow)(),
|
|
48
46
|
afterDeploy: (0, import_plugin.createAsyncWorkflow)(),
|
|
49
47
|
beforeRestart: (0, import_plugin.createAsyncWorkflow)(),
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated
|
|
50
|
+
*/
|
|
50
51
|
registerDev: (0, import_plugin.createParallelWorkflow)(),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated
|
|
54
|
+
*/
|
|
55
|
+
registerBuildPlatform: (0, import_plugin.createParallelWorkflow)()
|
|
54
56
|
};
|
|
55
57
|
// Annotate the CommonJS export names for ESM import in node:
|
|
56
58
|
0 && (module.exports = {
|
|
@@ -60,7 +60,7 @@ const scanDir = async (hookRunners, dirs, enableCustomEntry) => {
|
|
|
60
60
|
const entryName = import_path.default.basename(dir);
|
|
61
61
|
const customEntryFile = hasEntry(dir);
|
|
62
62
|
const customServerEntry = hasServerEntry(dir);
|
|
63
|
-
if (indexFile && !customBootstrap) {
|
|
63
|
+
if (!enableCustomEntry && indexFile && !customBootstrap) {
|
|
64
64
|
return {
|
|
65
65
|
entryName,
|
|
66
66
|
isMainEntry: false,
|
|
@@ -106,8 +106,6 @@ var analyze_default = ({ bundler }) => ({
|
|
|
106
106
|
config: resolvedConfig
|
|
107
107
|
});
|
|
108
108
|
debug(`html templates: %o`, htmlTemplates);
|
|
109
|
-
await hookRunners.addDefineTypes();
|
|
110
|
-
debug(`add Define Types`);
|
|
111
109
|
let checkedEntries = entrypoints.map((point) => point.entryName);
|
|
112
110
|
if ((0, import_utils.isDevCommand)()) {
|
|
113
111
|
const { entry } = (0, import_utils.minimist)((0, import_utils.getArgv)());
|
|
@@ -71,19 +71,13 @@ var devCommand = function() {
|
|
|
71
71
|
];
|
|
72
72
|
case 1:
|
|
73
73
|
isTypescript = _state2.sent().isTypescript;
|
|
74
|
-
return [
|
|
75
|
-
4,
|
|
76
|
-
runner.beforeDevTask(meta)
|
|
77
|
-
];
|
|
78
|
-
case 2:
|
|
79
|
-
_state2.sent();
|
|
80
74
|
return [
|
|
81
75
|
4,
|
|
82
76
|
meta.action(options, {
|
|
83
77
|
isTsProject: isTypescript(appDirectory)
|
|
84
78
|
})
|
|
85
79
|
];
|
|
86
|
-
case
|
|
80
|
+
case 2:
|
|
87
81
|
_state2.sent();
|
|
88
82
|
return [
|
|
89
83
|
2
|
|
@@ -195,19 +189,13 @@ var buildCommand = function() {
|
|
|
195
189
|
];
|
|
196
190
|
case 1:
|
|
197
191
|
isTypescript = _state2.sent().isTypescript;
|
|
198
|
-
return [
|
|
199
|
-
4,
|
|
200
|
-
runner.beforeBuildPlatform(platformBuilders)
|
|
201
|
-
];
|
|
202
|
-
case 2:
|
|
203
|
-
_state2.sent();
|
|
204
192
|
return [
|
|
205
193
|
4,
|
|
206
194
|
platformBuilder.build(platform, {
|
|
207
195
|
isTsProject: isTypescript(appDirectory)
|
|
208
196
|
})
|
|
209
197
|
];
|
|
210
|
-
case
|
|
198
|
+
case 2:
|
|
211
199
|
_state2.sent();
|
|
212
200
|
return [
|
|
213
201
|
2
|
package/dist/esm/hooks.js
CHANGED
|
@@ -10,8 +10,6 @@ var hooks = {
|
|
|
10
10
|
generateEntryCode: createAsyncWorkflow(),
|
|
11
11
|
htmlPartials: createAsyncWaterfall(),
|
|
12
12
|
beforeGenerateRoutes: createAsyncWaterfall(),
|
|
13
|
-
addDefineTypes: createAsyncWaterfall(),
|
|
14
|
-
collectServerPlugins: createAsyncWaterfall(),
|
|
15
13
|
_internalServerPlugins: createAsyncWaterfall(),
|
|
16
14
|
beforeDev: createAsyncWorkflow(),
|
|
17
15
|
afterDev: createAsyncWorkflow(),
|
|
@@ -24,10 +22,14 @@ var hooks = {
|
|
|
24
22
|
deploy: createAsyncWorkflow(),
|
|
25
23
|
afterDeploy: createAsyncWorkflow(),
|
|
26
24
|
beforeRestart: createAsyncWorkflow(),
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated
|
|
27
|
+
*/
|
|
27
28
|
registerDev: createParallelWorkflow(),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated
|
|
31
|
+
*/
|
|
32
|
+
registerBuildPlatform: createParallelWorkflow()
|
|
31
33
|
};
|
|
32
34
|
export {
|
|
33
35
|
hooks
|
|
@@ -78,7 +78,7 @@ var scanDir = function() {
|
|
|
78
78
|
entryName = path.basename(dir);
|
|
79
79
|
customEntryFile = hasEntry(dir);
|
|
80
80
|
customServerEntry = hasServerEntry(dir);
|
|
81
|
-
if (indexFile && !customBootstrap) {
|
|
81
|
+
if (!enableCustomEntry && indexFile && !customBootstrap) {
|
|
82
82
|
return [
|
|
83
83
|
2,
|
|
84
84
|
{
|
|
@@ -139,30 +139,23 @@ function analyze_default(param) {
|
|
|
139
139
|
case 9:
|
|
140
140
|
htmlTemplates = _state.sent();
|
|
141
141
|
debug("html templates: %o", htmlTemplates);
|
|
142
|
-
return [
|
|
143
|
-
4,
|
|
144
|
-
hookRunners.addDefineTypes()
|
|
145
|
-
];
|
|
146
|
-
case 10:
|
|
147
|
-
_state.sent();
|
|
148
|
-
debug("add Define Types");
|
|
149
142
|
checkedEntries = entrypoints.map(function(point) {
|
|
150
143
|
return point.entryName;
|
|
151
144
|
});
|
|
152
145
|
if (!isDevCommand())
|
|
153
146
|
return [
|
|
154
147
|
3,
|
|
155
|
-
|
|
148
|
+
11
|
|
156
149
|
];
|
|
157
150
|
entry = minimist(getArgv()).entry;
|
|
158
151
|
return [
|
|
159
152
|
4,
|
|
160
153
|
getSelectedEntries(typeof entry === "string" ? entry.split(",") : entry, entrypoints)
|
|
161
154
|
];
|
|
162
|
-
case
|
|
155
|
+
case 10:
|
|
163
156
|
checkedEntries = _state.sent();
|
|
164
|
-
_state.label =
|
|
165
|
-
case
|
|
157
|
+
_state.label = 11;
|
|
158
|
+
case 11:
|
|
166
159
|
appContext = _object_spread_props(_object_spread({}, api.useAppContext()), {
|
|
167
160
|
entrypoints,
|
|
168
161
|
checkedEntries,
|
|
@@ -174,7 +167,7 @@ function analyze_default(param) {
|
|
|
174
167
|
if (!checkIsBuildCommands())
|
|
175
168
|
return [
|
|
176
169
|
3,
|
|
177
|
-
|
|
170
|
+
15
|
|
178
171
|
];
|
|
179
172
|
return [
|
|
180
173
|
4,
|
|
@@ -182,14 +175,14 @@ function analyze_default(param) {
|
|
|
182
175
|
entrypoints
|
|
183
176
|
})
|
|
184
177
|
];
|
|
185
|
-
case
|
|
178
|
+
case 12:
|
|
186
179
|
_state.sent();
|
|
187
180
|
normalizedConfig = api.useResolvedConfigContext();
|
|
188
181
|
return [
|
|
189
182
|
4,
|
|
190
183
|
createBuilderGenerator(bundler)
|
|
191
184
|
];
|
|
192
|
-
case
|
|
185
|
+
case 13:
|
|
193
186
|
createBuilderForModern = _state.sent();
|
|
194
187
|
return [
|
|
195
188
|
4,
|
|
@@ -198,7 +191,7 @@ function analyze_default(param) {
|
|
|
198
191
|
appContext
|
|
199
192
|
})
|
|
200
193
|
];
|
|
201
|
-
case
|
|
194
|
+
case 14:
|
|
202
195
|
builder = _state.sent();
|
|
203
196
|
builder.onBeforeBuild(function() {
|
|
204
197
|
var _ref2 = _async_to_generator(function(param2) {
|
|
@@ -347,8 +340,8 @@ function analyze_default(param) {
|
|
|
347
340
|
builder
|
|
348
341
|
});
|
|
349
342
|
api.setAppContext(appContext);
|
|
350
|
-
_state.label =
|
|
351
|
-
case
|
|
343
|
+
_state.label = 15;
|
|
344
|
+
case 15:
|
|
352
345
|
return [
|
|
353
346
|
2
|
|
354
347
|
];
|
|
@@ -16,7 +16,6 @@ const devCommand = async (program, api) => {
|
|
|
16
16
|
devProgram.command(subCmd).action(async (options = {}) => {
|
|
17
17
|
const { appDirectory } = api.useAppContext();
|
|
18
18
|
const { isTypescript } = await import("@modern-js/utils");
|
|
19
|
-
await runner.beforeDevTask(meta);
|
|
20
19
|
await meta.action(options, {
|
|
21
20
|
isTsProject: isTypescript(appDirectory)
|
|
22
21
|
});
|
|
@@ -37,7 +36,6 @@ const buildCommand = async (program, api) => {
|
|
|
37
36
|
buildProgram.command(platform).action(async () => {
|
|
38
37
|
const { appDirectory } = api.useAppContext();
|
|
39
38
|
const { isTypescript } = await import("@modern-js/utils");
|
|
40
|
-
await runner.beforeBuildPlatform(platformBuilders);
|
|
41
39
|
await platformBuilder.build(platform, {
|
|
42
40
|
isTsProject: isTypescript(appDirectory)
|
|
43
41
|
});
|
package/dist/esm-node/hooks.js
CHANGED
|
@@ -10,8 +10,6 @@ const hooks = {
|
|
|
10
10
|
generateEntryCode: createAsyncWorkflow(),
|
|
11
11
|
htmlPartials: createAsyncWaterfall(),
|
|
12
12
|
beforeGenerateRoutes: createAsyncWaterfall(),
|
|
13
|
-
addDefineTypes: createAsyncWaterfall(),
|
|
14
|
-
collectServerPlugins: createAsyncWaterfall(),
|
|
15
13
|
_internalServerPlugins: createAsyncWaterfall(),
|
|
16
14
|
beforeDev: createAsyncWorkflow(),
|
|
17
15
|
afterDev: createAsyncWorkflow(),
|
|
@@ -24,10 +22,14 @@ const hooks = {
|
|
|
24
22
|
deploy: createAsyncWorkflow(),
|
|
25
23
|
afterDeploy: createAsyncWorkflow(),
|
|
26
24
|
beforeRestart: createAsyncWorkflow(),
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated
|
|
27
|
+
*/
|
|
27
28
|
registerDev: createParallelWorkflow(),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated
|
|
31
|
+
*/
|
|
32
|
+
registerBuildPlatform: createParallelWorkflow()
|
|
31
33
|
};
|
|
32
34
|
export {
|
|
33
35
|
hooks
|
|
@@ -27,7 +27,7 @@ const scanDir = async (hookRunners, dirs, enableCustomEntry) => {
|
|
|
27
27
|
const entryName = path.basename(dir);
|
|
28
28
|
const customEntryFile = hasEntry(dir);
|
|
29
29
|
const customServerEntry = hasServerEntry(dir);
|
|
30
|
-
if (indexFile && !customBootstrap) {
|
|
30
|
+
if (!enableCustomEntry && indexFile && !customBootstrap) {
|
|
31
31
|
return {
|
|
32
32
|
entryName,
|
|
33
33
|
isMainEntry: false,
|
|
@@ -73,8 +73,6 @@ var analyze_default = ({ bundler }) => ({
|
|
|
73
73
|
config: resolvedConfig
|
|
74
74
|
});
|
|
75
75
|
debug(`html templates: %o`, htmlTemplates);
|
|
76
|
-
await hookRunners.addDefineTypes();
|
|
77
|
-
debug(`add Define Types`);
|
|
78
76
|
let checkedEntries = entrypoints.map((point) => point.entryName);
|
|
79
77
|
if (isDevCommand()) {
|
|
80
78
|
const { entry } = minimist(getArgv());
|
|
@@ -42,10 +42,6 @@ export type AppToolsHooks<B extends Bundler = 'webpack'> = {
|
|
|
42
42
|
entrypoint: Entrypoint;
|
|
43
43
|
code: string;
|
|
44
44
|
}>;
|
|
45
|
-
addDefineTypes: AsyncWaterfall<void>;
|
|
46
|
-
collectServerPlugins: AsyncWaterfall<{
|
|
47
|
-
plugins: Array<Record<string, string>>;
|
|
48
|
-
}>;
|
|
49
45
|
_internalServerPlugins: AsyncWaterfall<{
|
|
50
46
|
plugins: ServerPlugin[];
|
|
51
47
|
}>;
|
|
@@ -73,7 +69,5 @@ export type AppToolsHooks<B extends Bundler = 'webpack'> = {
|
|
|
73
69
|
afterDeploy: AsyncWorkflow<Record<string, any>, unknown>;
|
|
74
70
|
beforeRestart: AsyncWorkflow<void, void>;
|
|
75
71
|
registerDev: ParallelWorkflow<void, DevToolData>;
|
|
76
|
-
beforeDevTask: ParallelWorkflow<DevToolData, void>;
|
|
77
72
|
registerBuildPlatform: ParallelWorkflow<void, RegisterBuildPlatformResult>;
|
|
78
|
-
beforeBuildPlatform: ParallelWorkflow<RegisterBuildPlatformResult[], void>;
|
|
79
73
|
};
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.60.
|
|
18
|
+
"version": "2.60.6",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@babel/parser": "^7.22.15",
|
|
78
78
|
"@babel/traverse": "^7.23.2",
|
|
79
|
-
"@babel/types": "^7.
|
|
79
|
+
"@babel/types": "^7.26.0",
|
|
80
80
|
"@rsbuild/core": "~1.0.11",
|
|
81
|
-
"@rsbuild/plugin-node-polyfill": "~1.0
|
|
81
|
+
"@rsbuild/plugin-node-polyfill": "~1.2.0",
|
|
82
82
|
"@swc/helpers": "0.5.13",
|
|
83
83
|
"@vercel/nft": "^0.26.4",
|
|
84
84
|
"es-module-lexer": "^1.1.0",
|
|
@@ -88,19 +88,19 @@
|
|
|
88
88
|
"mlly": "^1.6.1",
|
|
89
89
|
"pkg-types": "^1.1.0",
|
|
90
90
|
"std-env": "^3.7.0",
|
|
91
|
-
"@modern-js/
|
|
92
|
-
"@modern-js/plugin": "2.60.
|
|
93
|
-
"@modern-js/plugin-data-loader": "2.60.
|
|
94
|
-
"@modern-js/
|
|
95
|
-
"@modern-js/
|
|
96
|
-
"@modern-js/rsbuild-plugin-esbuild": "2.60.
|
|
97
|
-
"@modern-js/
|
|
98
|
-
"@modern-js/server": "2.60.
|
|
99
|
-
"@modern-js/server-
|
|
100
|
-
"@modern-js/types": "2.60.
|
|
101
|
-
"@modern-js/
|
|
102
|
-
"@modern-js/
|
|
103
|
-
"@modern-js/
|
|
91
|
+
"@modern-js/node-bundle-require": "2.60.6",
|
|
92
|
+
"@modern-js/plugin": "2.60.6",
|
|
93
|
+
"@modern-js/plugin-data-loader": "2.60.6",
|
|
94
|
+
"@modern-js/prod-server": "2.60.6",
|
|
95
|
+
"@modern-js/plugin-i18n": "2.60.6",
|
|
96
|
+
"@modern-js/rsbuild-plugin-esbuild": "2.60.6",
|
|
97
|
+
"@modern-js/server": "2.60.6",
|
|
98
|
+
"@modern-js/server-utils": "2.60.6",
|
|
99
|
+
"@modern-js/server-core": "2.60.6",
|
|
100
|
+
"@modern-js/types": "2.60.6",
|
|
101
|
+
"@modern-js/uni-builder": "2.60.6",
|
|
102
|
+
"@modern-js/utils": "2.60.6",
|
|
103
|
+
"@modern-js/core": "2.60.6"
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
106
|
"@rsbuild/plugin-webpack-swc": "~1.0.3",
|
|
@@ -112,8 +112,8 @@
|
|
|
112
112
|
"tsconfig-paths": "^4.2.0",
|
|
113
113
|
"typescript": "^5",
|
|
114
114
|
"webpack": "^5.95.0",
|
|
115
|
-
"@scripts/build": "2.60.
|
|
116
|
-
"@scripts/jest-config": "2.60.
|
|
115
|
+
"@scripts/build": "2.60.6",
|
|
116
|
+
"@scripts/jest-config": "2.60.6"
|
|
117
117
|
},
|
|
118
118
|
"peerDependencies": {
|
|
119
119
|
"ts-node": "^10.7.0",
|