@modern-js/plugin 2.69.5 → 3.0.0-alpha.0
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/cli/api.js +119 -0
- package/dist/cjs/cli/context.js +85 -0
- package/dist/cjs/cli/hooks.js +65 -0
- package/dist/cjs/cli/index.js +68 -0
- package/dist/cjs/cli/run/config/createLoadedConfig.js +87 -0
- package/dist/cjs/cli/run/config/createResolvedConfig.js +48 -0
- package/dist/cjs/cli/run/config/loadConfig.js +113 -0
- package/dist/cjs/cli/run/create.js +187 -0
- package/dist/cjs/cli/run/index.js +56 -0
- package/dist/cjs/cli/run/run.js +57 -0
- package/dist/cjs/cli/run/types.js +18 -0
- package/dist/cjs/cli/run/utils/checkIsDuplicationPlugin.js +45 -0
- package/dist/cjs/cli/run/utils/commander.js +56 -0
- package/dist/cjs/cli/run/utils/createFileWatcher.js +112 -0
- package/dist/cjs/cli/run/utils/debug.js +37 -0
- package/dist/cjs/cli/run/utils/initAppDir.js +55 -0
- package/dist/cjs/cli/run/utils/mergeConfig.js +66 -0
- package/dist/cjs/hooks.js +169 -0
- package/dist/cjs/index.js +53 -26
- package/dist/cjs/manager.js +135 -0
- package/dist/cjs/runtime/api.js +95 -0
- package/dist/cjs/runtime/context.js +60 -0
- package/dist/cjs/runtime/hooks.js +46 -0
- package/dist/cjs/runtime/index.js +51 -0
- package/dist/cjs/runtime/run/create.js +79 -0
- package/dist/cjs/runtime/run/index.js +37 -0
- package/dist/cjs/runtime/run/types.js +18 -0
- package/dist/cjs/server/api.js +96 -0
- package/dist/cjs/server/context.js +75 -0
- package/dist/cjs/server/hooks.js +43 -0
- package/dist/cjs/server/index.js +54 -0
- package/dist/cjs/server/run/create.js +79 -0
- package/dist/cjs/server/run/index.js +40 -0
- package/dist/cjs/server/run/types.js +18 -0
- package/dist/cjs/types/cli/api.js +18 -0
- package/dist/cjs/types/cli/context.js +18 -0
- package/dist/cjs/types/cli/hooks.js +18 -0
- package/dist/cjs/types/cli/index.js +18 -0
- package/dist/cjs/types/cli/plugin.js +18 -0
- package/dist/cjs/types/hooks.js +18 -0
- package/dist/cjs/types/index.js +18 -0
- package/dist/cjs/types/plugin.js +18 -0
- package/dist/cjs/types/runtime/api.js +18 -0
- package/dist/cjs/types/runtime/context.js +18 -0
- package/dist/cjs/types/runtime/hooks.js +18 -0
- package/dist/cjs/types/runtime/index.js +18 -0
- package/dist/cjs/types/runtime/plugin.js +18 -0
- package/dist/cjs/types/server/api.js +18 -0
- package/dist/cjs/types/server/context.js +18 -0
- package/dist/cjs/types/server/hooks.js +18 -0
- package/dist/cjs/types/server/index.js +18 -0
- package/dist/cjs/types/server/plugin.js +18 -0
- package/dist/cjs/types/utils.js +18 -0
- package/dist/esm/cli/api.mjs +85 -0
- package/dist/esm/cli/context.mjs +38 -0
- package/dist/esm/cli/hooks.mjs +31 -0
- package/dist/esm/cli/index.mjs +7 -0
- package/dist/esm/cli/run/config/createLoadedConfig.mjs +53 -0
- package/dist/esm/cli/run/config/createResolvedConfig.mjs +14 -0
- package/dist/esm/cli/run/config/loadConfig.mjs +59 -0
- package/dist/esm/cli/run/create.mjs +150 -0
- package/dist/esm/cli/run/index.mjs +7 -0
- package/dist/esm/cli/run/run.mjs +23 -0
- package/dist/esm/cli/run/types.mjs +0 -0
- package/dist/esm/cli/run/utils/checkIsDuplicationPlugin.mjs +11 -0
- package/dist/esm/cli/run/utils/commander.mjs +16 -0
- package/dist/esm/cli/run/utils/createFileWatcher.mjs +68 -0
- package/dist/esm/cli/run/utils/debug.mjs +3 -0
- package/dist/esm/cli/run/utils/initAppDir.mjs +11 -0
- package/dist/esm/cli/run/utils/mergeConfig.mjs +32 -0
- package/dist/esm/hooks.mjs +120 -0
- package/dist/esm/index.mjs +3 -0
- package/dist/esm/manager.mjs +101 -0
- package/dist/esm/runtime/api.mjs +61 -0
- package/dist/esm/runtime/context.mjs +23 -0
- package/dist/esm/runtime/hooks.mjs +12 -0
- package/dist/esm/runtime/index.mjs +5 -0
- package/dist/esm/runtime/run/create.mjs +45 -0
- package/dist/esm/runtime/run/index.mjs +3 -0
- package/dist/esm/runtime/run/types.mjs +0 -0
- package/dist/esm/server/api.mjs +59 -0
- package/dist/esm/server/context.mjs +38 -0
- package/dist/esm/server/hooks.mjs +9 -0
- package/dist/esm/server/index.mjs +5 -0
- package/dist/esm/server/run/create.mjs +45 -0
- package/dist/esm/server/run/index.mjs +3 -0
- package/dist/esm/server/run/types.mjs +0 -0
- package/dist/esm/types/cli/api.mjs +0 -0
- package/dist/esm/types/cli/context.mjs +0 -0
- package/dist/esm/types/cli/hooks.mjs +0 -0
- package/dist/esm/types/cli/index.mjs +0 -0
- package/dist/esm/types/cli/plugin.mjs +0 -0
- package/dist/esm/types/hooks.mjs +0 -0
- package/dist/esm/types/index.mjs +0 -0
- package/dist/esm/types/plugin.mjs +0 -0
- package/dist/esm/types/runtime/api.mjs +0 -0
- package/dist/esm/types/runtime/context.mjs +0 -0
- package/dist/esm/types/runtime/hooks.mjs +0 -0
- package/dist/esm/types/runtime/index.mjs +0 -0
- package/dist/esm/types/runtime/plugin.mjs +0 -0
- package/dist/esm/types/server/api.mjs +0 -0
- package/dist/esm/types/server/context.mjs +0 -0
- package/dist/esm/types/server/hooks.mjs +0 -0
- package/dist/esm/types/server/index.mjs +0 -0
- package/dist/esm/types/server/plugin.mjs +0 -0
- package/dist/esm/types/utils.mjs +0 -0
- package/dist/esm-node/cli/api.mjs +85 -0
- package/dist/esm-node/cli/context.mjs +38 -0
- package/dist/esm-node/cli/hooks.mjs +31 -0
- package/dist/esm-node/cli/index.mjs +7 -0
- package/dist/esm-node/cli/run/config/createLoadedConfig.mjs +53 -0
- package/dist/esm-node/cli/run/config/createResolvedConfig.mjs +14 -0
- package/dist/esm-node/cli/run/config/loadConfig.mjs +59 -0
- package/dist/esm-node/cli/run/create.mjs +150 -0
- package/dist/esm-node/cli/run/index.mjs +7 -0
- package/dist/esm-node/cli/run/run.mjs +23 -0
- package/dist/esm-node/cli/run/utils/checkIsDuplicationPlugin.mjs +11 -0
- package/dist/esm-node/cli/run/utils/commander.mjs +16 -0
- package/dist/esm-node/cli/run/utils/createFileWatcher.mjs +68 -0
- package/dist/esm-node/cli/run/utils/debug.mjs +3 -0
- package/dist/esm-node/cli/run/utils/initAppDir.mjs +11 -0
- package/dist/esm-node/cli/run/utils/mergeConfig.mjs +32 -0
- package/dist/esm-node/hooks.mjs +120 -0
- package/dist/esm-node/index.mjs +3 -0
- package/dist/esm-node/manager.mjs +101 -0
- package/dist/esm-node/runtime/api.mjs +61 -0
- package/dist/esm-node/runtime/context.mjs +23 -0
- package/dist/esm-node/runtime/hooks.mjs +12 -0
- package/dist/esm-node/runtime/index.mjs +5 -0
- package/dist/esm-node/runtime/run/create.mjs +45 -0
- package/dist/esm-node/runtime/run/index.mjs +3 -0
- package/dist/esm-node/runtime/run/types.mjs +0 -0
- package/dist/esm-node/server/api.mjs +59 -0
- package/dist/esm-node/server/context.mjs +38 -0
- package/dist/esm-node/server/hooks.mjs +9 -0
- package/dist/esm-node/server/index.mjs +5 -0
- package/dist/esm-node/server/run/create.mjs +45 -0
- package/dist/esm-node/server/run/index.mjs +3 -0
- package/dist/esm-node/server/run/types.mjs +0 -0
- package/dist/esm-node/types/cli/api.mjs +0 -0
- package/dist/esm-node/types/cli/context.mjs +0 -0
- package/dist/esm-node/types/cli/hooks.mjs +0 -0
- package/dist/esm-node/types/cli/index.mjs +0 -0
- package/dist/esm-node/types/cli/plugin.mjs +0 -0
- package/dist/esm-node/types/hooks.mjs +0 -0
- package/dist/esm-node/types/index.mjs +0 -0
- package/dist/esm-node/types/plugin.mjs +0 -0
- package/dist/esm-node/types/runtime/api.mjs +0 -0
- package/dist/esm-node/types/runtime/context.mjs +0 -0
- package/dist/esm-node/types/runtime/hooks.mjs +0 -0
- package/dist/esm-node/types/runtime/index.mjs +0 -0
- package/dist/esm-node/types/runtime/plugin.mjs +0 -0
- package/dist/esm-node/types/server/api.mjs +0 -0
- package/dist/esm-node/types/server/context.mjs +0 -0
- package/dist/esm-node/types/server/hooks.mjs +0 -0
- package/dist/esm-node/types/server/index.mjs +0 -0
- package/dist/esm-node/types/server/plugin.mjs +0 -0
- package/dist/esm-node/types/utils.mjs +0 -0
- package/dist/types/cli/api.d.ts +8 -0
- package/dist/types/cli/context.d.ts +19 -0
- package/dist/types/cli/hooks.d.ts +42 -0
- package/dist/types/cli/index.d.ts +6 -0
- package/dist/types/cli/run/config/createLoadedConfig.d.ts +2 -0
- package/dist/types/cli/run/config/createResolvedConfig.d.ts +3 -0
- package/dist/types/cli/run/config/loadConfig.d.ts +25 -0
- package/dist/types/cli/run/create.d.ts +16 -0
- package/dist/types/cli/run/index.d.ts +13 -0
- package/dist/types/cli/run/run.d.ts +2 -0
- package/dist/types/cli/run/types.d.ts +32 -0
- package/dist/types/cli/run/utils/checkIsDuplicationPlugin.d.ts +1 -0
- package/dist/types/cli/run/utils/commander.d.ts +5 -0
- package/dist/types/cli/run/utils/createFileWatcher.d.ts +3 -0
- package/dist/types/cli/run/utils/debug.d.ts +1 -0
- package/dist/types/cli/run/utils/initAppDir.d.ts +1 -0
- package/dist/types/cli/run/utils/mergeConfig.d.ts +2 -0
- package/dist/types/hooks.d.ts +7 -0
- package/dist/types/index.d.ts +7 -4
- package/dist/types/manager.d.ts +5 -0
- package/dist/types/runtime/api.d.ts +9 -0
- package/dist/types/runtime/context.d.ts +11 -0
- package/dist/types/runtime/hooks.d.ts +2 -0
- package/dist/types/runtime/index.d.ts +5 -0
- package/dist/types/runtime/run/create.d.ts +7 -0
- package/dist/types/runtime/run/index.d.ts +5 -0
- package/dist/types/runtime/run/types.d.ts +6 -0
- package/dist/types/server/api.d.ts +9 -0
- package/dist/types/server/context.d.ts +13 -0
- package/dist/types/server/hooks.d.ts +9 -0
- package/dist/types/server/index.d.ts +4 -0
- package/dist/types/server/run/create.d.ts +7 -0
- package/dist/types/server/run/index.d.ts +8 -0
- package/dist/types/server/run/types.d.ts +22 -0
- package/dist/types/types/cli/api.d.ts +49 -0
- package/dist/types/types/cli/context.d.ts +42 -0
- package/dist/types/types/cli/hooks.d.ts +72 -0
- package/dist/types/types/cli/index.d.ts +4 -0
- package/dist/types/types/cli/plugin.d.ts +17 -0
- package/dist/types/types/hooks.d.ts +27 -0
- package/dist/types/types/index.d.ts +4 -0
- package/dist/types/types/plugin.d.ts +46 -0
- package/dist/types/types/runtime/api.d.ts +22 -0
- package/dist/types/types/runtime/context.d.ts +13 -0
- package/dist/types/types/runtime/hooks.d.ts +39 -0
- package/dist/types/types/runtime/index.d.ts +4 -0
- package/dist/types/types/runtime/plugin.d.ts +14 -0
- package/dist/types/types/server/api.d.ts +19 -0
- package/dist/types/types/server/context.d.ts +28 -0
- package/dist/types/types/server/hooks.d.ts +24 -0
- package/dist/types/types/server/index.d.ts +4 -0
- package/dist/types/types/server/plugin.d.ts +14 -0
- package/dist/types/types/utils.d.ts +7 -0
- package/package.json +68 -14
- package/rslib.config.mts +4 -0
- package/rstest.config.ts +5 -0
- package/dist/cjs/farrow-pipeline/context.js +0 -44
- package/dist/cjs/farrow-pipeline/counter.js +0 -37
- package/dist/cjs/farrow-pipeline/index.js +0 -87
- package/dist/cjs/manager/async.js +0 -124
- package/dist/cjs/manager/index.js +0 -26
- package/dist/cjs/manager/shared.js +0 -60
- package/dist/cjs/manager/sync.js +0 -194
- package/dist/cjs/manager/types.js +0 -16
- package/dist/cjs/waterfall/async.js +0 -68
- package/dist/cjs/waterfall/index.js +0 -24
- package/dist/cjs/waterfall/sync.js +0 -67
- package/dist/cjs/workflow/async.js +0 -60
- package/dist/cjs/workflow/index.js +0 -30
- package/dist/cjs/workflow/interrupt.js +0 -64
- package/dist/cjs/workflow/parallel.js +0 -53
- package/dist/cjs/workflow/sync.js +0 -56
- package/dist/cjs/workflow/syncParallel.js +0 -55
- package/dist/esm/index.js +0 -882
- package/dist/esm-node/farrow-pipeline/context.js +0 -20
- package/dist/esm-node/farrow-pipeline/counter.js +0 -13
- package/dist/esm-node/farrow-pipeline/index.js +0 -60
- package/dist/esm-node/index.js +0 -4
- package/dist/esm-node/manager/async.js +0 -106
- package/dist/esm-node/manager/index.js +0 -3
- package/dist/esm-node/manager/shared.js +0 -32
- package/dist/esm-node/manager/sync.js +0 -172
- package/dist/esm-node/waterfall/async.js +0 -42
- package/dist/esm-node/waterfall/index.js +0 -2
- package/dist/esm-node/waterfall/sync.js +0 -41
- package/dist/esm-node/workflow/async.js +0 -35
- package/dist/esm-node/workflow/index.js +0 -5
- package/dist/esm-node/workflow/interrupt.js +0 -39
- package/dist/esm-node/workflow/parallel.js +0 -28
- package/dist/esm-node/workflow/sync.js +0 -31
- package/dist/esm-node/workflow/syncParallel.js +0 -30
- package/dist/types/farrow-pipeline/context.d.ts +0 -12
- package/dist/types/farrow-pipeline/counter.d.ts +0 -11
- package/dist/types/farrow-pipeline/index.d.ts +0 -29
- package/dist/types/manager/async.d.ts +0 -54
- package/dist/types/manager/index.d.ts +0 -3
- package/dist/types/manager/shared.d.ts +0 -12
- package/dist/types/manager/sync.d.ts +0 -66
- package/dist/types/manager/types.d.ts +0 -33
- package/dist/types/waterfall/async.d.ts +0 -21
- package/dist/types/waterfall/index.d.ts +0 -2
- package/dist/types/waterfall/sync.d.ts +0 -20
- package/dist/types/workflow/async.d.ts +0 -12
- package/dist/types/workflow/index.d.ts +0 -5
- package/dist/types/workflow/interrupt.d.ts +0 -12
- package/dist/types/workflow/parallel.d.ts +0 -10
- package/dist/types/workflow/sync.d.ts +0 -11
- package/dist/types/workflow/syncParallel.d.ts +0 -10
- /package/dist/esm-node/{manager/types.js → cli/run/types.mjs} +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
mergeConfig: ()=>mergeConfig
|
|
28
|
+
});
|
|
29
|
+
const utils_namespaceObject = require("@modern-js/utils");
|
|
30
|
+
const lodash_namespaceObject = require("@modern-js/utils/lodash");
|
|
31
|
+
const mergeConfig = (configs)=>(0, lodash_namespaceObject.mergeWith)({}, ...configs, (target, source, key)=>{
|
|
32
|
+
if ((0, utils_namespaceObject.isOverriddenConfigKey)(key)) return source ?? target;
|
|
33
|
+
if (Array.isArray(target) || Array.isArray(source)) {
|
|
34
|
+
if (void 0 === target) return source;
|
|
35
|
+
if (void 0 === source) return target;
|
|
36
|
+
const targetArray = (0, utils_namespaceObject.ensureArray)(target);
|
|
37
|
+
const sourceArray = (0, utils_namespaceObject.ensureArray)(source);
|
|
38
|
+
const allItems = [
|
|
39
|
+
...targetArray,
|
|
40
|
+
...sourceArray
|
|
41
|
+
];
|
|
42
|
+
const seenNonFunc = [];
|
|
43
|
+
const result = [];
|
|
44
|
+
for (const item of allItems)if ((0, lodash_namespaceObject.isFunction)(item)) result.push(item);
|
|
45
|
+
else if (!seenNonFunc.some((seen)=>(0, lodash_namespaceObject.isEqual)(seen, item))) {
|
|
46
|
+
seenNonFunc.push(item);
|
|
47
|
+
result.push(item);
|
|
48
|
+
}
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
51
|
+
if ((0, lodash_namespaceObject.isFunction)(target) || (0, lodash_namespaceObject.isFunction)(source)) {
|
|
52
|
+
if (void 0 === source) return target;
|
|
53
|
+
if (void 0 === target) return source;
|
|
54
|
+
return [
|
|
55
|
+
target,
|
|
56
|
+
source
|
|
57
|
+
];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
exports.mergeConfig = __webpack_exports__.mergeConfig;
|
|
61
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
62
|
+
"mergeConfig"
|
|
63
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
64
|
+
Object.defineProperty(exports, '__esModule', {
|
|
65
|
+
value: true
|
|
66
|
+
});
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
createAsyncHook: ()=>createAsyncHook,
|
|
28
|
+
createAsyncInterruptHook: ()=>createAsyncInterruptHook,
|
|
29
|
+
createAsyncPipelineHook: ()=>createAsyncPipelineHook,
|
|
30
|
+
createCollectAsyncHook: ()=>createCollectAsyncHook,
|
|
31
|
+
createCollectSyncHook: ()=>createCollectSyncHook,
|
|
32
|
+
createSyncHook: ()=>createSyncHook
|
|
33
|
+
});
|
|
34
|
+
function createAsyncInterruptHook() {
|
|
35
|
+
const callbacks = [];
|
|
36
|
+
const tap = (cb)=>{
|
|
37
|
+
callbacks.push(cb);
|
|
38
|
+
};
|
|
39
|
+
const call = async (...params)=>{
|
|
40
|
+
let interrupted = false;
|
|
41
|
+
let interruptResult;
|
|
42
|
+
const interrupt = (info)=>{
|
|
43
|
+
interrupted = true;
|
|
44
|
+
interruptResult = info;
|
|
45
|
+
};
|
|
46
|
+
for (const callback of callbacks){
|
|
47
|
+
if (interrupted) break;
|
|
48
|
+
const result = await callback(...params, interrupt);
|
|
49
|
+
if (void 0 !== result) params[0] = result;
|
|
50
|
+
}
|
|
51
|
+
return interrupted ? interruptResult : params[0] || [];
|
|
52
|
+
};
|
|
53
|
+
return {
|
|
54
|
+
tap,
|
|
55
|
+
call
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function createSyncHook() {
|
|
59
|
+
const callbacks = [];
|
|
60
|
+
const tap = (cb)=>{
|
|
61
|
+
callbacks.push(cb);
|
|
62
|
+
};
|
|
63
|
+
const call = (...params)=>{
|
|
64
|
+
for (const callback of callbacks){
|
|
65
|
+
const result = callback(...params);
|
|
66
|
+
if (void 0 !== result) params[0] = result;
|
|
67
|
+
}
|
|
68
|
+
return params[0];
|
|
69
|
+
};
|
|
70
|
+
return {
|
|
71
|
+
tap,
|
|
72
|
+
call
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function createAsyncHook() {
|
|
76
|
+
const callbacks = [];
|
|
77
|
+
const tap = (cb)=>{
|
|
78
|
+
callbacks.push(cb);
|
|
79
|
+
};
|
|
80
|
+
const call = async (...params)=>{
|
|
81
|
+
for (const callback of callbacks){
|
|
82
|
+
const result = await callback(...params);
|
|
83
|
+
if (void 0 !== result) params[0] = result;
|
|
84
|
+
}
|
|
85
|
+
return params[0] || [];
|
|
86
|
+
};
|
|
87
|
+
return {
|
|
88
|
+
tap,
|
|
89
|
+
call
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function createCollectAsyncHook() {
|
|
93
|
+
const callbacks = [];
|
|
94
|
+
const tap = (cb)=>{
|
|
95
|
+
callbacks.push(cb);
|
|
96
|
+
};
|
|
97
|
+
const call = async (...params)=>{
|
|
98
|
+
const results = [];
|
|
99
|
+
for (const callback of callbacks){
|
|
100
|
+
const result = await callback(...params);
|
|
101
|
+
if (void 0 !== result) results.push(result);
|
|
102
|
+
}
|
|
103
|
+
return results;
|
|
104
|
+
};
|
|
105
|
+
return {
|
|
106
|
+
tap,
|
|
107
|
+
call
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function createCollectSyncHook() {
|
|
111
|
+
const callbacks = [];
|
|
112
|
+
const tap = (cb)=>{
|
|
113
|
+
callbacks.push(cb);
|
|
114
|
+
};
|
|
115
|
+
const call = (...params)=>{
|
|
116
|
+
const results = [];
|
|
117
|
+
for (const callback of callbacks){
|
|
118
|
+
const result = callback(...params);
|
|
119
|
+
if (void 0 !== result) results.push(result);
|
|
120
|
+
}
|
|
121
|
+
return results;
|
|
122
|
+
};
|
|
123
|
+
return {
|
|
124
|
+
tap,
|
|
125
|
+
call
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
function createAsyncPipelineHook() {
|
|
129
|
+
const callbacks = [];
|
|
130
|
+
const tap = (cb)=>{
|
|
131
|
+
callbacks.push(cb);
|
|
132
|
+
};
|
|
133
|
+
const call = async (...params)=>{
|
|
134
|
+
for (const callback of callbacks){
|
|
135
|
+
let runNext = false;
|
|
136
|
+
const next = (info)=>{
|
|
137
|
+
runNext = true;
|
|
138
|
+
if (info) params[0] = info;
|
|
139
|
+
};
|
|
140
|
+
const result = await callback(...params, next);
|
|
141
|
+
if (!runNext) {
|
|
142
|
+
params[0] = result;
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return params[0] || [];
|
|
147
|
+
};
|
|
148
|
+
return {
|
|
149
|
+
tap,
|
|
150
|
+
call
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
exports.createAsyncHook = __webpack_exports__.createAsyncHook;
|
|
154
|
+
exports.createAsyncInterruptHook = __webpack_exports__.createAsyncInterruptHook;
|
|
155
|
+
exports.createAsyncPipelineHook = __webpack_exports__.createAsyncPipelineHook;
|
|
156
|
+
exports.createCollectAsyncHook = __webpack_exports__.createCollectAsyncHook;
|
|
157
|
+
exports.createCollectSyncHook = __webpack_exports__.createCollectSyncHook;
|
|
158
|
+
exports.createSyncHook = __webpack_exports__.createSyncHook;
|
|
159
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
160
|
+
"createAsyncHook",
|
|
161
|
+
"createAsyncInterruptHook",
|
|
162
|
+
"createAsyncPipelineHook",
|
|
163
|
+
"createCollectAsyncHook",
|
|
164
|
+
"createCollectSyncHook",
|
|
165
|
+
"createSyncHook"
|
|
166
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
167
|
+
Object.defineProperty(exports, '__esModule', {
|
|
168
|
+
value: true
|
|
169
|
+
});
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,28 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
createAsyncInterruptHook: ()=>external_hooks_js_namespaceObject.createAsyncInterruptHook,
|
|
28
|
+
createPluginManager: ()=>external_manager_js_namespaceObject.createPluginManager,
|
|
29
|
+
createSyncHook: ()=>external_hooks_js_namespaceObject.createSyncHook,
|
|
30
|
+
createAsyncPipelineHook: ()=>external_hooks_js_namespaceObject.createAsyncPipelineHook,
|
|
31
|
+
createAsyncHook: ()=>external_hooks_js_namespaceObject.createAsyncHook,
|
|
32
|
+
createCollectAsyncHook: ()=>external_hooks_js_namespaceObject.createCollectAsyncHook,
|
|
33
|
+
createCollectSyncHook: ()=>external_hooks_js_namespaceObject.createCollectSyncHook
|
|
34
|
+
});
|
|
35
|
+
const external_manager_js_namespaceObject = require("./manager.js");
|
|
36
|
+
const external_hooks_js_namespaceObject = require("./hooks.js");
|
|
37
|
+
exports.createAsyncHook = __webpack_exports__.createAsyncHook;
|
|
38
|
+
exports.createAsyncInterruptHook = __webpack_exports__.createAsyncInterruptHook;
|
|
39
|
+
exports.createAsyncPipelineHook = __webpack_exports__.createAsyncPipelineHook;
|
|
40
|
+
exports.createCollectAsyncHook = __webpack_exports__.createCollectAsyncHook;
|
|
41
|
+
exports.createCollectSyncHook = __webpack_exports__.createCollectSyncHook;
|
|
42
|
+
exports.createPluginManager = __webpack_exports__.createPluginManager;
|
|
43
|
+
exports.createSyncHook = __webpack_exports__.createSyncHook;
|
|
44
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
45
|
+
"createAsyncHook",
|
|
46
|
+
"createAsyncInterruptHook",
|
|
47
|
+
"createAsyncPipelineHook",
|
|
48
|
+
"createCollectAsyncHook",
|
|
49
|
+
"createCollectSyncHook",
|
|
50
|
+
"createPluginManager",
|
|
51
|
+
"createSyncHook"
|
|
52
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
53
|
+
Object.defineProperty(exports, '__esModule', {
|
|
54
|
+
value: true
|
|
28
55
|
});
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
createPluginManager: ()=>createPluginManager
|
|
28
|
+
});
|
|
29
|
+
const isFunction = (obj)=>'function' == typeof obj;
|
|
30
|
+
function validatePlugin(plugin) {
|
|
31
|
+
const type = typeof plugin;
|
|
32
|
+
if ('object' !== type || null === plugin) throw new Error(`Expect CLI Plugin instance to be an object, but got ${type}.`);
|
|
33
|
+
if (!plugin.setup) return;
|
|
34
|
+
if (isFunction(plugin.setup)) return;
|
|
35
|
+
throw new Error(`Expect CLI Plugin plugin.setup to be a function, but got ${type}.`);
|
|
36
|
+
}
|
|
37
|
+
function createPluginManager() {
|
|
38
|
+
const plugins = new Map();
|
|
39
|
+
const dependencies = new Map();
|
|
40
|
+
const addDependency = (plugin, dependency, type)=>{
|
|
41
|
+
if (!dependencies.has(dependency)) dependencies.set(dependency, {
|
|
42
|
+
pre: new Map(),
|
|
43
|
+
post: new Map()
|
|
44
|
+
});
|
|
45
|
+
if ('pre' === type) dependencies.get(plugin).pre.set(dependency, {
|
|
46
|
+
name: dependency,
|
|
47
|
+
isUse: false
|
|
48
|
+
});
|
|
49
|
+
else if ('post' === type) dependencies.get(plugin).post.set(dependency, {
|
|
50
|
+
name: dependency
|
|
51
|
+
});
|
|
52
|
+
else if ('use' === type) {
|
|
53
|
+
if (!dependencies.get(plugin).post.has(dependency) && !dependencies.get(dependency).pre.has(plugin)) dependencies.get(plugin).pre.set(dependency, {
|
|
54
|
+
name: dependency,
|
|
55
|
+
isUse: true
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
const addPlugin = (newPlugin)=>{
|
|
60
|
+
if (!newPlugin) return;
|
|
61
|
+
validatePlugin(newPlugin);
|
|
62
|
+
const { name, usePlugins = [], pre = [], post = [] } = newPlugin;
|
|
63
|
+
if (plugins.has(name)) return void console.warn(`Plugin ${name} already exists.`);
|
|
64
|
+
plugins.set(name, newPlugin);
|
|
65
|
+
dependencies.set(name, {
|
|
66
|
+
pre: new Map(),
|
|
67
|
+
post: new Map()
|
|
68
|
+
});
|
|
69
|
+
pre.forEach((dep)=>{
|
|
70
|
+
addDependency(name, dep, 'pre');
|
|
71
|
+
});
|
|
72
|
+
post.forEach((dep)=>{
|
|
73
|
+
addDependency(name, dep, 'post');
|
|
74
|
+
});
|
|
75
|
+
usePlugins.forEach((plugin)=>{
|
|
76
|
+
if (!plugins.has(plugin.name)) addPlugin(plugin);
|
|
77
|
+
addDependency(name, plugin.name, 'use');
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
const addPlugins = (newPlugins)=>{
|
|
81
|
+
for (const newPlugin of newPlugins)addPlugin(newPlugin);
|
|
82
|
+
};
|
|
83
|
+
const getPlugins = ()=>{
|
|
84
|
+
const visited = new Set();
|
|
85
|
+
const temp = new Set();
|
|
86
|
+
let result = [];
|
|
87
|
+
const visit = (name)=>{
|
|
88
|
+
if (temp.has(name)) throw new Error(`Circular dependency detected: ${name}`);
|
|
89
|
+
if (!visited.has(name) && plugins.get(name)) {
|
|
90
|
+
temp.add(name);
|
|
91
|
+
const { required = [] } = plugins.get(name);
|
|
92
|
+
required.forEach((dep)=>{
|
|
93
|
+
if (!plugins.get(dep)) throw new Error(`${name} plugin required plugin ${dep}, but not found.`);
|
|
94
|
+
});
|
|
95
|
+
const { pre } = dependencies.get(name);
|
|
96
|
+
Array.from(pre.values()).filter((dep)=>!dep.isUse).forEach((dep)=>visit(dep.name));
|
|
97
|
+
Array.from(pre.values()).filter((dep)=>dep.isUse).forEach((dep)=>visit(dep.name));
|
|
98
|
+
temp.delete(name);
|
|
99
|
+
visited.add(name);
|
|
100
|
+
result.push(plugins.get(name));
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
plugins.forEach((_, name)=>{
|
|
104
|
+
const { post } = dependencies.get(name);
|
|
105
|
+
post.forEach((dep)=>{
|
|
106
|
+
if (!dependencies.get(dep.name).pre.has(name)) dependencies.get(dep.name).pre.set(name, {
|
|
107
|
+
name,
|
|
108
|
+
isUse: false
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
plugins.forEach((_, name)=>{
|
|
113
|
+
visit(name);
|
|
114
|
+
});
|
|
115
|
+
result = result.filter((result)=>result);
|
|
116
|
+
return result;
|
|
117
|
+
};
|
|
118
|
+
const clear = ()=>{
|
|
119
|
+
plugins.clear();
|
|
120
|
+
dependencies.clear();
|
|
121
|
+
};
|
|
122
|
+
return {
|
|
123
|
+
getPlugins,
|
|
124
|
+
addPlugins,
|
|
125
|
+
clear,
|
|
126
|
+
isPluginExists: (name)=>plugins.has(name)
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
exports.createPluginManager = __webpack_exports__.createPluginManager;
|
|
130
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
131
|
+
"createPluginManager"
|
|
132
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
133
|
+
Object.defineProperty(exports, '__esModule', {
|
|
134
|
+
value: true
|
|
135
|
+
});
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
initPluginAPI: ()=>initPluginAPI
|
|
28
|
+
});
|
|
29
|
+
const merge_namespaceObject = require("@modern-js/runtime-utils/merge");
|
|
30
|
+
function initPluginAPI({ context, plugins }) {
|
|
31
|
+
const { hooks, extendsHooks } = context;
|
|
32
|
+
function getRuntimeContext() {
|
|
33
|
+
if (context) {
|
|
34
|
+
const { hooks, extendsHooks, config, pluginAPI, ...runtimeContext } = context;
|
|
35
|
+
runtimeContext._internalContext = context;
|
|
36
|
+
return runtimeContext;
|
|
37
|
+
}
|
|
38
|
+
throw new Error('Cannot access context');
|
|
39
|
+
}
|
|
40
|
+
function updateRuntimeContext(updateContext) {
|
|
41
|
+
context = (0, merge_namespaceObject.merge)(context, updateContext);
|
|
42
|
+
}
|
|
43
|
+
function getHooks() {
|
|
44
|
+
return {
|
|
45
|
+
...hooks,
|
|
46
|
+
...extendsHooks
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function getRuntimeConfig() {
|
|
50
|
+
if (context.config) return context.config;
|
|
51
|
+
throw new Error('Cannot access config');
|
|
52
|
+
}
|
|
53
|
+
const extendsPluginApi = {};
|
|
54
|
+
plugins.forEach((plugin)=>{
|
|
55
|
+
const { _registryApi } = plugin;
|
|
56
|
+
if (_registryApi) {
|
|
57
|
+
const apis = _registryApi(getRuntimeContext, updateRuntimeContext);
|
|
58
|
+
Object.keys(apis).forEach((apiName)=>{
|
|
59
|
+
extendsPluginApi[apiName] = apis[apiName];
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
if (extendsHooks) Object.keys(extendsHooks).forEach((hookName)=>{
|
|
64
|
+
extendsPluginApi[hookName] = extendsHooks[hookName].tap;
|
|
65
|
+
});
|
|
66
|
+
const pluginAPI = {
|
|
67
|
+
updateRuntimeContext,
|
|
68
|
+
getHooks,
|
|
69
|
+
getRuntimeConfig,
|
|
70
|
+
config: hooks.config.tap,
|
|
71
|
+
onBeforeRender: hooks.onBeforeRender.tap,
|
|
72
|
+
wrapRoot: hooks.wrapRoot.tap,
|
|
73
|
+
pickContext: hooks.pickContext.tap,
|
|
74
|
+
extendStringSSRCollectors: hooks.extendStringSSRCollectors.tap,
|
|
75
|
+
extendStreamSSR: hooks.extendStreamSSR.tap,
|
|
76
|
+
...extendsPluginApi
|
|
77
|
+
};
|
|
78
|
+
if ("u" < typeof Proxy) return pluginAPI;
|
|
79
|
+
return new Proxy(pluginAPI, {
|
|
80
|
+
get (target, prop) {
|
|
81
|
+
if ('then' === prop) return;
|
|
82
|
+
if (prop in target) return target[prop];
|
|
83
|
+
return ()=>{
|
|
84
|
+
console.warn(`api.${prop.toString()} not exist`);
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
exports.initPluginAPI = __webpack_exports__.initPluginAPI;
|
|
90
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
91
|
+
"initPluginAPI"
|
|
92
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
93
|
+
Object.defineProperty(exports, '__esModule', {
|
|
94
|
+
value: true
|
|
95
|
+
});
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
createRuntimeContext: ()=>createRuntimeContext,
|
|
28
|
+
initRuntimeContext: ()=>initRuntimeContext
|
|
29
|
+
});
|
|
30
|
+
const external_hooks_js_namespaceObject = require("./hooks.js");
|
|
31
|
+
function initRuntimeContext() {
|
|
32
|
+
return {};
|
|
33
|
+
}
|
|
34
|
+
function createRuntimeContext({ runtimeContext, config, plugins }) {
|
|
35
|
+
const extendsHooks = {};
|
|
36
|
+
plugins.forEach((plugin)=>{
|
|
37
|
+
const { registryHooks = {} } = plugin;
|
|
38
|
+
Object.keys(registryHooks).forEach((hookName)=>{
|
|
39
|
+
extendsHooks[hookName] = registryHooks[hookName];
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
return {
|
|
43
|
+
...runtimeContext,
|
|
44
|
+
hooks: {
|
|
45
|
+
...(0, external_hooks_js_namespaceObject.initHooks)(),
|
|
46
|
+
...extendsHooks
|
|
47
|
+
},
|
|
48
|
+
extendsHooks,
|
|
49
|
+
config
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
exports.createRuntimeContext = __webpack_exports__.createRuntimeContext;
|
|
53
|
+
exports.initRuntimeContext = __webpack_exports__.initRuntimeContext;
|
|
54
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
55
|
+
"createRuntimeContext",
|
|
56
|
+
"initRuntimeContext"
|
|
57
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
58
|
+
Object.defineProperty(exports, '__esModule', {
|
|
59
|
+
value: true
|
|
60
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
initHooks: ()=>initHooks
|
|
28
|
+
});
|
|
29
|
+
const external_hooks_js_namespaceObject = require("../hooks.js");
|
|
30
|
+
function initHooks() {
|
|
31
|
+
return {
|
|
32
|
+
onBeforeRender: (0, external_hooks_js_namespaceObject.createAsyncInterruptHook)(),
|
|
33
|
+
wrapRoot: (0, external_hooks_js_namespaceObject.createSyncHook)(),
|
|
34
|
+
pickContext: (0, external_hooks_js_namespaceObject.createSyncHook)(),
|
|
35
|
+
config: (0, external_hooks_js_namespaceObject.createCollectSyncHook)(),
|
|
36
|
+
extendStringSSRCollectors: (0, external_hooks_js_namespaceObject.createCollectSyncHook)(),
|
|
37
|
+
extendStreamSSR: (0, external_hooks_js_namespaceObject.createCollectSyncHook)()
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
exports.initHooks = __webpack_exports__.initHooks;
|
|
41
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
42
|
+
"initHooks"
|
|
43
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
44
|
+
Object.defineProperty(exports, '__esModule', {
|
|
45
|
+
value: true
|
|
46
|
+
});
|