@shuvi/platform-shared 1.0.0-rc.17 → 1.0.0-rc.18
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/esm/shared/application.js +1 -1
- package/esm/shared/runtimPlugin.d.ts +1 -1
- package/esm/shared/runtimPlugin.js +2 -2
- package/lib/node/platform/runtimeFiles.js +5 -1
- package/lib/shared/application.js +1 -1
- package/lib/shared/runtimPlugin.d.ts +1 -1
- package/lib/shared/runtimPlugin.js +1 -1
- package/package.json +10 -10
|
@@ -85,7 +85,7 @@ export class ApplicationImpl {
|
|
|
85
85
|
}
|
|
86
86
|
_initAppContext() {
|
|
87
87
|
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
-
|
|
88
|
+
yield this._pluginManager.runner.appContext(this._context);
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
91
|
_initAppComponent() {
|
|
@@ -3,7 +3,7 @@ import { CustomRuntimePluginHooks } from '@shuvi/runtime';
|
|
|
3
3
|
import { IAppContext } from './applicationTypes';
|
|
4
4
|
export declare type AppComponent = unknown;
|
|
5
5
|
declare const init: import("@shuvi/hook").AsyncParallelHook<void, void, void>;
|
|
6
|
-
declare const appContext: import("@shuvi/hook").
|
|
6
|
+
declare const appContext: import("@shuvi/hook").AsyncSeriesHook<IAppContext, void, void>;
|
|
7
7
|
declare const appComponent: import("@shuvi/hook").AsyncSeriesWaterfallHook<unknown, IAppContext>;
|
|
8
8
|
declare const dispose: import("@shuvi/hook").AsyncParallelHook<void, void, void>;
|
|
9
9
|
export interface BuiltInRuntimePluginHooks extends HookMap {
|
|
@@ -7,10 +7,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { createAsyncParallelHook, createAsyncSeriesWaterfallHook, createHookManager, isPluginInstance } from '@shuvi/hook';
|
|
10
|
+
import { createAsyncParallelHook, createAsyncSeriesHook, createAsyncSeriesWaterfallHook, createHookManager, isPluginInstance } from '@shuvi/hook';
|
|
11
11
|
import { createPluginCreator } from '@shuvi/shared/lib/plugins';
|
|
12
12
|
const init = createAsyncParallelHook();
|
|
13
|
-
const appContext =
|
|
13
|
+
const appContext = createAsyncSeriesHook();
|
|
14
14
|
const appComponent = createAsyncSeriesWaterfallHook();
|
|
15
15
|
const dispose = createAsyncParallelHook();
|
|
16
16
|
const builtinRuntimePluginHooks = {
|
|
@@ -8,9 +8,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
exports.getPresetRuntimeFilesCreator = void 0;
|
|
13
16
|
const project_1 = require("@shuvi/service/lib/project");
|
|
17
|
+
const logger_1 = __importDefault(require("@shuvi/utils/lib/logger"));
|
|
14
18
|
const shuvi_singleton_runtimeConfig_1 = require("../../shared/shuvi-singleton-runtimeConfig");
|
|
15
19
|
const projectContext_1 = require("../project/projectContext");
|
|
16
20
|
const file_presets_1 = require("../project/file-presets");
|
|
@@ -32,7 +36,7 @@ const getPresetRuntimeFilesCreator = (platformModule) => (pluginContext) => __aw
|
|
|
32
36
|
const key = serverKeys[index];
|
|
33
37
|
const hasSameKey = publicKeys.includes(key);
|
|
34
38
|
if (hasSameKey) {
|
|
35
|
-
|
|
39
|
+
logger_1.default.warn(`Warning: key "${key}" exist in both "runtimeConfig" and "publicRuntimeConfig". Please rename the key, or the value from "publicRuntimeConfig" will be applied.\n`);
|
|
36
40
|
break;
|
|
37
41
|
}
|
|
38
42
|
}
|
|
@@ -88,7 +88,7 @@ class ApplicationImpl {
|
|
|
88
88
|
}
|
|
89
89
|
_initAppContext() {
|
|
90
90
|
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
-
|
|
91
|
+
yield this._pluginManager.runner.appContext(this._context);
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
_initAppComponent() {
|
|
@@ -3,7 +3,7 @@ import { CustomRuntimePluginHooks } from '@shuvi/runtime';
|
|
|
3
3
|
import { IAppContext } from './applicationTypes';
|
|
4
4
|
export declare type AppComponent = unknown;
|
|
5
5
|
declare const init: import("@shuvi/hook").AsyncParallelHook<void, void, void>;
|
|
6
|
-
declare const appContext: import("@shuvi/hook").
|
|
6
|
+
declare const appContext: import("@shuvi/hook").AsyncSeriesHook<IAppContext, void, void>;
|
|
7
7
|
declare const appComponent: import("@shuvi/hook").AsyncSeriesWaterfallHook<unknown, IAppContext>;
|
|
8
8
|
declare const dispose: import("@shuvi/hook").AsyncParallelHook<void, void, void>;
|
|
9
9
|
export interface BuiltInRuntimePluginHooks extends HookMap {
|
|
@@ -14,7 +14,7 @@ exports.initPlugins = exports.createRuntimePluginAfter = exports.createRuntimePl
|
|
|
14
14
|
const hook_1 = require("@shuvi/hook");
|
|
15
15
|
const plugins_1 = require("@shuvi/shared/lib/plugins");
|
|
16
16
|
const init = (0, hook_1.createAsyncParallelHook)();
|
|
17
|
-
const appContext = (0, hook_1.
|
|
17
|
+
const appContext = (0, hook_1.createAsyncSeriesHook)();
|
|
18
18
|
const appComponent = (0, hook_1.createAsyncSeriesWaterfallHook)();
|
|
19
19
|
const dispose = (0, hook_1.createAsyncParallelHook)();
|
|
20
20
|
const builtinRuntimePluginHooks = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shuvi/platform-shared",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.18",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/shuvijs/shuvi.git",
|
|
@@ -83,18 +83,18 @@
|
|
|
83
83
|
"node": ">= 12.0.0"
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"@shuvi/hook": "1.0.0-rc.
|
|
87
|
-
"@shuvi/redox": "0.0.
|
|
88
|
-
"@shuvi/router": "1.0.0-rc.
|
|
89
|
-
"@shuvi/runtime": "1.0.0-rc.
|
|
90
|
-
"@shuvi/service": "1.0.0-rc.
|
|
91
|
-
"@shuvi/shared": "1.0.0-rc.
|
|
92
|
-
"@shuvi/toolpack": "1.0.0-rc.
|
|
93
|
-
"@shuvi/utils": "1.0.0-rc.
|
|
86
|
+
"@shuvi/hook": "1.0.0-rc.18",
|
|
87
|
+
"@shuvi/redox": "0.0.7",
|
|
88
|
+
"@shuvi/router": "1.0.0-rc.18",
|
|
89
|
+
"@shuvi/runtime": "1.0.0-rc.18",
|
|
90
|
+
"@shuvi/service": "1.0.0-rc.18",
|
|
91
|
+
"@shuvi/shared": "1.0.0-rc.18",
|
|
92
|
+
"@shuvi/toolpack": "1.0.0-rc.18",
|
|
93
|
+
"@shuvi/utils": "1.0.0-rc.18",
|
|
94
94
|
"redux": "4.1.2"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|
|
97
|
-
"@shuvi/service": "1.0.0-rc.
|
|
97
|
+
"@shuvi/service": "1.0.0-rc.18"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
100
|
"@types/minimatch": "3.0.5"
|