@umijs/core 4.0.52 → 4.0.54
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BuildResult } from '@umijs/bundler-utils/compiled/esbuild';
|
|
1
2
|
import { yParser } from '@umijs/utils';
|
|
2
3
|
import { Config } from '../config/config';
|
|
3
4
|
import { ApplyPluginsType, ConfigChangeType, EnableBy, Env, IEvent, IFrameworkType, IModify, ServiceStage } from '../types';
|
|
@@ -23,6 +24,9 @@ export declare class Service {
|
|
|
23
24
|
external?: boolean;
|
|
24
25
|
}>;
|
|
25
26
|
framework?: IFrameworkType;
|
|
27
|
+
prepare?: {
|
|
28
|
+
buildResult: BuildResult;
|
|
29
|
+
};
|
|
26
30
|
[key: string]: any;
|
|
27
31
|
};
|
|
28
32
|
args: yParser.Arguments;
|
package/dist/service/service.js
CHANGED
|
@@ -262,16 +262,16 @@ var Service = class {
|
|
|
262
262
|
throw Error(`Invalid command ${import_utils.chalk.red(name)}, it's not registered.`);
|
|
263
263
|
}
|
|
264
264
|
for (const id of Object.keys(this.plugins)) {
|
|
265
|
-
const { config
|
|
266
|
-
if (
|
|
267
|
-
this.configSchemas[key] =
|
|
268
|
-
if (
|
|
269
|
-
this.configDefaults[key] =
|
|
265
|
+
const { config, key } = this.plugins[id];
|
|
266
|
+
if (config.schema)
|
|
267
|
+
this.configSchemas[key] = config.schema;
|
|
268
|
+
if (config.default !== void 0) {
|
|
269
|
+
this.configDefaults[key] = config.default;
|
|
270
270
|
}
|
|
271
|
-
this.configOnChanges[key] =
|
|
271
|
+
this.configOnChanges[key] = config.onChange || import_types.ConfigChangeType.reload;
|
|
272
272
|
}
|
|
273
273
|
this.stage = import_types.ServiceStage.resolveConfig;
|
|
274
|
-
const {
|
|
274
|
+
const { defaultConfig } = await this.resolveConfig();
|
|
275
275
|
if (this.config.outputPath) {
|
|
276
276
|
this.paths.absOutputPath = (0, import_path.isAbsolute)(this.config.outputPath) ? this.config.outputPath : (0, import_path.join)(this.cwd, this.config.outputPath);
|
|
277
277
|
}
|
|
@@ -287,14 +287,14 @@ var Service = class {
|
|
|
287
287
|
cwd: this.cwd,
|
|
288
288
|
pkg,
|
|
289
289
|
pkgPath,
|
|
290
|
-
plugins,
|
|
290
|
+
plugins: this.plugins,
|
|
291
291
|
presets,
|
|
292
292
|
name,
|
|
293
293
|
args,
|
|
294
294
|
// config
|
|
295
295
|
userConfig: this.userConfig,
|
|
296
296
|
mainConfigFile: configManager.mainConfigFile,
|
|
297
|
-
config,
|
|
297
|
+
config: this.config,
|
|
298
298
|
defaultConfig
|
|
299
299
|
// TODO
|
|
300
300
|
// moduleGraph,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/core",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.54",
|
|
4
4
|
"homepage": "https://github.com/umijs/umi/tree/master/packages/core#readme",
|
|
5
5
|
"bugs": "https://github.com/umijs/umi/issues",
|
|
6
6
|
"repository": {
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"test": "umi-scripts jest-turbo"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@umijs/bundler-utils": "4.0.
|
|
25
|
-
"@umijs/utils": "4.0.
|
|
24
|
+
"@umijs/bundler-utils": "4.0.54",
|
|
25
|
+
"@umijs/utils": "4.0.54"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"dotenv": "16.0.0",
|