@umijs/core 4.0.0-canary.20221025.1 → 4.0.0-canary.20221027.1
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/service/service.d.ts +9 -0
- package/dist/service/service.js +11 -8
- package/package.json +3 -3
|
@@ -81,6 +81,15 @@ export declare class Service {
|
|
|
81
81
|
name: string;
|
|
82
82
|
args?: any;
|
|
83
83
|
}): Promise<void>;
|
|
84
|
+
getPaths(): Promise<{
|
|
85
|
+
cwd: string;
|
|
86
|
+
absSrcPath: string;
|
|
87
|
+
absPagesPath: string;
|
|
88
|
+
absApiRoutesPath: string;
|
|
89
|
+
absTmpPath: string;
|
|
90
|
+
absNodeModulesPath: string;
|
|
91
|
+
absOutputPath: string;
|
|
92
|
+
}>;
|
|
84
93
|
resolveConfig(): Promise<{
|
|
85
94
|
config: any;
|
|
86
95
|
defaultConfig: any;
|
package/dist/service/service.js
CHANGED
|
@@ -194,12 +194,7 @@ var Service = class {
|
|
|
194
194
|
});
|
|
195
195
|
this.configManager = configManager;
|
|
196
196
|
this.userConfig = configManager.getUserConfig().config;
|
|
197
|
-
|
|
198
|
-
cwd: this.cwd,
|
|
199
|
-
env: this.env,
|
|
200
|
-
prefix: this.opts.frameworkName || import_constants.DEFAULT_FRAMEWORK_NAME
|
|
201
|
-
});
|
|
202
|
-
this.paths = paths;
|
|
197
|
+
this.paths = await this.getPaths();
|
|
203
198
|
const { plugins, presets } = import_plugin.Plugin.getPluginsAndPresets({
|
|
204
199
|
cwd: this.cwd,
|
|
205
200
|
pkg,
|
|
@@ -239,11 +234,11 @@ var Service = class {
|
|
|
239
234
|
this.stage = import_types.ServiceStage.resolveConfig;
|
|
240
235
|
const { config, defaultConfig } = await this.resolveConfig();
|
|
241
236
|
if (this.config.outputPath) {
|
|
242
|
-
paths.absOutputPath = (0, import_path.isAbsolute)(this.config.outputPath) ? this.config.outputPath : (0, import_path.join)(this.cwd, this.config.outputPath);
|
|
237
|
+
this.paths.absOutputPath = (0, import_path.isAbsolute)(this.config.outputPath) ? this.config.outputPath : (0, import_path.join)(this.cwd, this.config.outputPath);
|
|
243
238
|
}
|
|
244
239
|
this.paths = await this.applyPlugins({
|
|
245
240
|
key: "modifyPaths",
|
|
246
|
-
initialValue: paths
|
|
241
|
+
initialValue: this.paths
|
|
247
242
|
});
|
|
248
243
|
this.stage = import_types.ServiceStage.collectAppData;
|
|
249
244
|
this.appData = await this.applyPlugins({
|
|
@@ -275,6 +270,14 @@ var Service = class {
|
|
|
275
270
|
this._baconPlugins();
|
|
276
271
|
return ret;
|
|
277
272
|
}
|
|
273
|
+
async getPaths() {
|
|
274
|
+
const paths = (0, import_path2.getPaths)({
|
|
275
|
+
cwd: this.cwd,
|
|
276
|
+
env: this.env,
|
|
277
|
+
prefix: this.opts.frameworkName || import_constants.DEFAULT_FRAMEWORK_NAME
|
|
278
|
+
});
|
|
279
|
+
return paths;
|
|
280
|
+
}
|
|
278
281
|
async resolveConfig() {
|
|
279
282
|
(0, import_assert.default)(this.stage > import_types.ServiceStage.init, `Can't generate final config before init stage`);
|
|
280
283
|
const resolveMode = this.commands[this.name].configResolveMode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/core",
|
|
3
|
-
"version": "4.0.0-canary.
|
|
3
|
+
"version": "4.0.0-canary.20221027.1",
|
|
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.0-canary.
|
|
25
|
-
"@umijs/utils": "4.0.0-canary.
|
|
24
|
+
"@umijs/bundler-utils": "4.0.0-canary.20221027.1",
|
|
25
|
+
"@umijs/utils": "4.0.0-canary.20221027.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"dotenv": "16.0.0",
|