@shuvi/platform-shared 1.0.0-rc.12 → 1.0.0-rc.13
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/lib/node/platform/plugins/main/hooks.d.ts +0 -1
- package/lib/node/platform/plugins/main/hooks.js +0 -2
- package/lib/node/platform/runtimeFiles.d.ts +1 -1
- package/lib/node/platform/runtimeFiles.js +1 -3
- package/lib/node/project/projectContext.d.ts +0 -1
- package/lib/node/project/projectContext.js +0 -1
- package/package.json +11 -10
- package/lib/node/project/file-presets/files/app/core/polyfill.js.d.ts +0 -3
- package/lib/node/project/file-presets/files/app/core/polyfill.js.js +0 -6
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IRuntimeConfig } from '../../../../shared';
|
|
2
2
|
export declare const extendedHooks: {
|
|
3
3
|
addEntryCode: import("@shuvi/hook").AsyncParallelHook<void, void, string | string[]>;
|
|
4
|
-
addPolyfill: import("@shuvi/hook").AsyncParallelHook<void, void, string | string[]>;
|
|
5
4
|
modifyRuntimeConfig: import("@shuvi/hook").AsyncSeriesWaterfallHook<{
|
|
6
5
|
public: IRuntimeConfig;
|
|
7
6
|
server: IRuntimeConfig;
|
|
@@ -3,10 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.extendedHooks = void 0;
|
|
4
4
|
const hook_1 = require("@shuvi/hook");
|
|
5
5
|
const addEntryCode = (0, hook_1.createAsyncParallelHook)();
|
|
6
|
-
const addPolyfill = (0, hook_1.createAsyncParallelHook)();
|
|
7
6
|
const modifyRuntimeConfig = (0, hook_1.createAsyncSeriesWaterfallHook)();
|
|
8
7
|
exports.extendedHooks = {
|
|
9
8
|
addEntryCode,
|
|
10
|
-
addPolyfill,
|
|
11
9
|
modifyRuntimeConfig
|
|
12
10
|
};
|
|
@@ -4,4 +4,4 @@ import { IPluginContext } from '@shuvi/service';
|
|
|
4
4
|
* `core/error`, `core/platform`, `core/plugins`, `core/polyfill`, `core/runtimeConfig`, `core/setRuntimeConfig`,
|
|
5
5
|
* `user/error`, `user/runtime` and `entry`
|
|
6
6
|
*/
|
|
7
|
-
export declare const getPresetRuntimeFilesCreator: (platformModule: string
|
|
7
|
+
export declare const getPresetRuntimeFilesCreator: (platformModule: string) => (pluginContext: IPluginContext) => Promise<import("@shuvi/service/lib/project").FileOption<any, any>[]>;
|
|
@@ -19,7 +19,7 @@ const file_presets_1 = require("../project/file-presets");
|
|
|
19
19
|
* `core/error`, `core/platform`, `core/plugins`, `core/polyfill`, `core/runtimeConfig`, `core/setRuntimeConfig`,
|
|
20
20
|
* `user/error`, `user/runtime` and `entry`
|
|
21
21
|
*/
|
|
22
|
-
const getPresetRuntimeFilesCreator = (platformModule
|
|
22
|
+
const getPresetRuntimeFilesCreator = (platformModule) => (pluginContext) => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
23
|
const { pluginRunner, config } = pluginContext;
|
|
24
24
|
const getCandidates = (fileName, fallbackType) => project_1.fileUtils.getUserCustomFileCandidates(pluginContext.paths.rootDir, fileName, fallbackType);
|
|
25
25
|
const { public: publicRuntimeConfig, server: serverRuntimeConfig } = yield pluginRunner.modifyRuntimeConfig({
|
|
@@ -51,10 +51,8 @@ const getPresetRuntimeFilesCreator = (platformModule, polyfills) => (pluginConte
|
|
|
51
51
|
context.platformModule = platformModule;
|
|
52
52
|
context.runtimeConfig = Object.assign(Object.assign({}, serverRuntimeConfig), publicRuntimeConfig);
|
|
53
53
|
const runner = pluginContext.pluginRunner;
|
|
54
|
-
const appPolyfills = (yield runner.addPolyfill()).flat();
|
|
55
54
|
const appEntryCodes = (yield runner.addEntryCode()).flat();
|
|
56
55
|
context.entryCodes.push(...appEntryCodes);
|
|
57
|
-
context.polyfills.push(...polyfills, ...appPolyfills);
|
|
58
56
|
const files = (0, file_presets_1.getFilePresets)(context);
|
|
59
57
|
return files;
|
|
60
58
|
});
|
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.13",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/shuvijs/shuvi.git",
|
|
@@ -67,7 +67,8 @@
|
|
|
67
67
|
"types": "./shuvi-type-extensions-node.d.js",
|
|
68
68
|
"default": "./shuvi-type-extensions-node.js"
|
|
69
69
|
},
|
|
70
|
-
"./shuvi-type-extensions-runtime": "./shuvi-type-extensions-runtime.d.ts"
|
|
70
|
+
"./shuvi-type-extensions-runtime": "./shuvi-type-extensions-runtime.d.ts",
|
|
71
|
+
"./package.json": "./package.json"
|
|
71
72
|
},
|
|
72
73
|
"scripts": {
|
|
73
74
|
"dev": "run-p watch:*",
|
|
@@ -82,18 +83,18 @@
|
|
|
82
83
|
"node": ">= 12.0.0"
|
|
83
84
|
},
|
|
84
85
|
"dependencies": {
|
|
85
|
-
"@shuvi/hook": "1.0.0-rc.
|
|
86
|
+
"@shuvi/hook": "1.0.0-rc.13",
|
|
86
87
|
"@shuvi/redox": "0.0.6",
|
|
87
|
-
"@shuvi/router": "1.0.0-rc.
|
|
88
|
-
"@shuvi/runtime": "1.0.0-rc.
|
|
89
|
-
"@shuvi/service": "1.0.0-rc.
|
|
90
|
-
"@shuvi/shared": "1.0.0-rc.
|
|
91
|
-
"@shuvi/toolpack": "1.0.0-rc.
|
|
92
|
-
"@shuvi/utils": "1.0.0-rc.
|
|
88
|
+
"@shuvi/router": "1.0.0-rc.13",
|
|
89
|
+
"@shuvi/runtime": "1.0.0-rc.13",
|
|
90
|
+
"@shuvi/service": "1.0.0-rc.13",
|
|
91
|
+
"@shuvi/shared": "1.0.0-rc.13",
|
|
92
|
+
"@shuvi/toolpack": "1.0.0-rc.13",
|
|
93
|
+
"@shuvi/utils": "1.0.0-rc.13",
|
|
93
94
|
"redux": "4.1.2"
|
|
94
95
|
},
|
|
95
96
|
"peerDependencies": {
|
|
96
|
-
"@shuvi/service": "1.0.0-rc.
|
|
97
|
+
"@shuvi/service": "1.0.0-rc.13"
|
|
97
98
|
},
|
|
98
99
|
"devDependencies": {
|
|
99
100
|
"@types/minimatch": "3.0.5"
|