@modern-js/server-core 2.5.1-alpha.0 → 2.7.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/CHANGELOG.md +31 -0
- package/dist/cjs/plugin.js +2 -0
- package/dist/{js/node/types/config/bff.js → cjs/types/config/dev.js} +2 -2
- package/dist/esm/plugin.js +2 -0
- package/dist/types/types/config/dev.d.ts +4 -0
- package/dist/types/types/config/index.d.ts +3 -0
- package/dist/types/types/config/server.d.ts +2 -1
- package/package.json +8 -8
- package/dist/js/modern/index.js +0 -4
- package/dist/js/modern/loadPlugins.js +0 -33
- package/dist/js/modern/plugin.js +0 -93
- package/dist/js/modern/types/config/html.js +0 -0
- package/dist/js/modern/types/config/index.js +0 -6
- package/dist/js/modern/types/config/output.js +0 -0
- package/dist/js/modern/types/config/server.js +0 -0
- package/dist/js/modern/types/config/share.js +0 -0
- package/dist/js/modern/types/config/source.js +0 -0
- package/dist/js/modern/types/config/tools.js +0 -0
- package/dist/js/node/index.js +0 -20
- package/dist/js/node/loadPlugins.js +0 -52
- package/dist/js/node/plugin.js +0 -116
- package/dist/js/node/types/config/html.js +0 -15
- package/dist/js/node/types/config/index.js +0 -22
- package/dist/js/node/types/config/output.js +0 -15
- package/dist/js/node/types/config/server.js +0 -15
- package/dist/js/node/types/config/share.js +0 -15
- package/dist/js/node/types/config/source.js +0 -15
- package/dist/js/node/types/config/tools.js +0 -15
- /package/dist/{js/modern/types/config/bff.js → esm/types/config/dev.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @modern-js/server-plugin
|
|
2
2
|
|
|
3
|
+
## 2.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 84bfb439b8: feat: support custom apiDir, lambdaDir and style of writing for bff
|
|
8
|
+
feat: 支持定制 api 目录,lambda 目录,bff 的写法
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- 1eea234fdd: chore: make test files naming consistent
|
|
13
|
+
|
|
14
|
+
chore: 统一测试文件命名为小驼峰格式
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [0f15fc597c]
|
|
17
|
+
- Updated dependencies [dcad887024]
|
|
18
|
+
- Updated dependencies [a4672f7c16]
|
|
19
|
+
- Updated dependencies [7fff9020e1]
|
|
20
|
+
- Updated dependencies [84bfb439b8]
|
|
21
|
+
- @modern-js/utils@2.7.0
|
|
22
|
+
- @modern-js/plugin@2.7.0
|
|
23
|
+
|
|
24
|
+
## 2.6.0
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [e1f799e]
|
|
29
|
+
- Updated dependencies [7915ab3]
|
|
30
|
+
- Updated dependencies [0fe658a]
|
|
31
|
+
- @modern-js/utils@2.6.0
|
|
32
|
+
- @modern-js/plugin@2.6.0
|
|
33
|
+
|
|
3
34
|
## 2.5.0
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -69,6 +69,7 @@ const pluginAPI = {
|
|
|
69
69
|
setAppContext
|
|
70
70
|
};
|
|
71
71
|
const serverHooks = {
|
|
72
|
+
// server hook
|
|
72
73
|
gather,
|
|
73
74
|
config,
|
|
74
75
|
prepare,
|
|
@@ -87,6 +88,7 @@ const serverHooks = {
|
|
|
87
88
|
listen,
|
|
88
89
|
beforeServerReset,
|
|
89
90
|
afterServerReset,
|
|
91
|
+
// request hook
|
|
90
92
|
extendSSRContext,
|
|
91
93
|
extendContext,
|
|
92
94
|
handleError,
|
|
@@ -11,5 +11,5 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
11
11
|
return to;
|
|
12
12
|
};
|
|
13
13
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
-
var
|
|
15
|
-
module.exports = __toCommonJS(
|
|
14
|
+
var dev_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(dev_exports);
|
package/dist/esm/plugin.js
CHANGED
|
@@ -47,6 +47,7 @@ const pluginAPI = {
|
|
|
47
47
|
setAppContext
|
|
48
48
|
};
|
|
49
49
|
const serverHooks = {
|
|
50
|
+
// server hook
|
|
50
51
|
gather,
|
|
51
52
|
config,
|
|
52
53
|
prepare,
|
|
@@ -65,6 +66,7 @@ const serverHooks = {
|
|
|
65
66
|
listen,
|
|
66
67
|
beforeServerReset,
|
|
67
68
|
afterServerReset,
|
|
69
|
+
// request hook
|
|
68
70
|
extendSSRContext,
|
|
69
71
|
extendContext,
|
|
70
72
|
handleError,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BffNormalizedConfig, BffUserConfig } from './bff';
|
|
2
|
+
import { DevNormalizedConfig, DevUserConfig } from './dev';
|
|
2
3
|
import { HtmlNormalizedConfig, HtmlUserConfig } from './html';
|
|
3
4
|
import { OutputNormalizedConfig, OutputUserConfig } from './output';
|
|
4
5
|
import { ServerNormalizedConfig, ServerUserConfig } from './server';
|
|
@@ -22,6 +23,7 @@ export interface UserConfig {
|
|
|
22
23
|
runtime?: RuntimeUserConfig;
|
|
23
24
|
html?: HtmlUserConfig;
|
|
24
25
|
bff?: BffUserConfig;
|
|
26
|
+
dev?: DevUserConfig;
|
|
25
27
|
}
|
|
26
28
|
export type ServerOptions = {
|
|
27
29
|
output: OutputNormalizedConfig;
|
|
@@ -31,4 +33,5 @@ export type ServerOptions = {
|
|
|
31
33
|
runtime: RuntimeNormalizedConfig;
|
|
32
34
|
html: HtmlNormalizedConfig;
|
|
33
35
|
bff: BffNormalizedConfig;
|
|
36
|
+
dev?: DevNormalizedConfig;
|
|
34
37
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SSRMode } from '@modern-js/types';
|
|
1
2
|
import type { WatchOptions } from '@modern-js/utils';
|
|
2
3
|
type Route = string | string[] | {
|
|
3
4
|
route?: string | string[];
|
|
@@ -7,7 +8,7 @@ type Route = string | string[] | {
|
|
|
7
8
|
export type Routes = Record<string, Route>;
|
|
8
9
|
export type SSR = boolean | {
|
|
9
10
|
forceCSR?: boolean;
|
|
10
|
-
mode?:
|
|
11
|
+
mode?: SSRMode;
|
|
11
12
|
};
|
|
12
13
|
export type SSRByEntries = Record<string, SSR>;
|
|
13
14
|
export interface ServerUserConfig {
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.7.0",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/cjs/index.js",
|
|
@@ -28,20 +28,20 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@modern-js/plugin": "2.
|
|
32
|
-
"@modern-js/utils": "2.
|
|
31
|
+
"@modern-js/plugin": "2.7.0",
|
|
32
|
+
"@modern-js/utils": "2.7.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@modern-js/types": "2.5.0",
|
|
36
|
-
"@modern-js/babel-preset-app": "2.5.0",
|
|
37
|
-
"@scripts/build": "2.5.0",
|
|
38
|
-
"@scripts/jest-config": "2.5.0",
|
|
39
35
|
"@types/jest": "^27",
|
|
40
36
|
"@types/node": "^14",
|
|
41
37
|
"http-proxy-middleware": "^2.0.4",
|
|
42
38
|
"jest": "^27",
|
|
43
39
|
"ts-jest": "^27.0.4",
|
|
44
|
-
"typescript": "^4"
|
|
40
|
+
"typescript": "^4",
|
|
41
|
+
"@modern-js/types": "2.7.0",
|
|
42
|
+
"@modern-js/babel-preset-app": "2.7.0",
|
|
43
|
+
"@scripts/build": "2.7.0",
|
|
44
|
+
"@scripts/jest-config": "2.7.0"
|
|
45
45
|
},
|
|
46
46
|
"sideEffects": false,
|
|
47
47
|
"publishConfig": {
|
package/dist/js/modern/index.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
compatRequire,
|
|
3
|
-
getInternalPlugins,
|
|
4
|
-
tryResolve
|
|
5
|
-
} from "@modern-js/utils";
|
|
6
|
-
import { createPlugin } from "./plugin";
|
|
7
|
-
const resolvePlugin = (p, appDirectory) => {
|
|
8
|
-
const isPluginInstance = typeof p !== "string";
|
|
9
|
-
if (isPluginInstance) {
|
|
10
|
-
return {
|
|
11
|
-
module: createPlugin(p.setup, p)
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
const pluginPath = tryResolve(p, appDirectory);
|
|
15
|
-
const module = compatRequire(pluginPath);
|
|
16
|
-
const pluginInstance = module();
|
|
17
|
-
return {
|
|
18
|
-
module: createPlugin(pluginInstance.setup, pluginInstance)
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
const loadPlugins = (appDirectory, configPlugins, options) => {
|
|
22
|
-
const loadedPlugins = getInternalPlugins(
|
|
23
|
-
appDirectory,
|
|
24
|
-
options.internalPlugins
|
|
25
|
-
);
|
|
26
|
-
return [...loadedPlugins, ...configPlugins].map((plugin) => {
|
|
27
|
-
const { module } = resolvePlugin(plugin, appDirectory);
|
|
28
|
-
return module;
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
loadPlugins
|
|
33
|
-
};
|
package/dist/js/modern/plugin.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createContext,
|
|
3
|
-
createAsyncManager,
|
|
4
|
-
createAsyncPipeline,
|
|
5
|
-
createAsyncWaterfall,
|
|
6
|
-
createParallelWorkflow,
|
|
7
|
-
createWaterfall
|
|
8
|
-
} from "@modern-js/plugin";
|
|
9
|
-
const gather = createParallelWorkflow();
|
|
10
|
-
const config = createWaterfall();
|
|
11
|
-
const prepare = createWaterfall();
|
|
12
|
-
const preparebeforeRouteHandler = createAsyncPipeline();
|
|
13
|
-
const prepareWebServer = createAsyncPipeline();
|
|
14
|
-
const prepareApiServer = createAsyncPipeline();
|
|
15
|
-
const onApiChange = createWaterfall();
|
|
16
|
-
const repack = createWaterfall();
|
|
17
|
-
const beforeDevServer = createParallelWorkflow();
|
|
18
|
-
const setupCompiler = createParallelWorkflow();
|
|
19
|
-
const afterDevServer = createParallelWorkflow();
|
|
20
|
-
const beforeRouteSet = createAsyncPipeline();
|
|
21
|
-
const afterRouteSet = createAsyncPipeline();
|
|
22
|
-
const beforeProdServer = createParallelWorkflow();
|
|
23
|
-
const afterProdServer = createParallelWorkflow();
|
|
24
|
-
const listen = createParallelWorkflow();
|
|
25
|
-
const beforeServerReset = createParallelWorkflow();
|
|
26
|
-
const afterServerReset = createParallelWorkflow();
|
|
27
|
-
const extendSSRContext = createAsyncWaterfall();
|
|
28
|
-
const extendContext = createAsyncPipeline();
|
|
29
|
-
const handleError = createParallelWorkflow();
|
|
30
|
-
const beforeMatch = createAsyncPipeline();
|
|
31
|
-
const afterMatch = createAsyncPipeline();
|
|
32
|
-
const prefetch = createParallelWorkflow();
|
|
33
|
-
const renderToString = createAsyncPipeline();
|
|
34
|
-
const beforeRender = createAsyncPipeline();
|
|
35
|
-
const afterRender = createAsyncPipeline();
|
|
36
|
-
const beforeSend = createAsyncPipeline();
|
|
37
|
-
const afterSend = createParallelWorkflow();
|
|
38
|
-
const reset = createParallelWorkflow();
|
|
39
|
-
const AppContext = createContext({});
|
|
40
|
-
const setAppContext = (value) => AppContext.set(value);
|
|
41
|
-
const ConfigContext = createContext({});
|
|
42
|
-
const useConfigContext = () => ConfigContext.use().value;
|
|
43
|
-
const useAppContext = () => AppContext.use().value;
|
|
44
|
-
const pluginAPI = {
|
|
45
|
-
useAppContext,
|
|
46
|
-
useConfigContext,
|
|
47
|
-
setAppContext
|
|
48
|
-
};
|
|
49
|
-
const serverHooks = {
|
|
50
|
-
gather,
|
|
51
|
-
config,
|
|
52
|
-
prepare,
|
|
53
|
-
preparebeforeRouteHandler,
|
|
54
|
-
prepareWebServer,
|
|
55
|
-
prepareApiServer,
|
|
56
|
-
repack,
|
|
57
|
-
onApiChange,
|
|
58
|
-
beforeDevServer,
|
|
59
|
-
setupCompiler,
|
|
60
|
-
afterDevServer,
|
|
61
|
-
beforeRouteSet,
|
|
62
|
-
afterRouteSet,
|
|
63
|
-
beforeProdServer,
|
|
64
|
-
afterProdServer,
|
|
65
|
-
listen,
|
|
66
|
-
beforeServerReset,
|
|
67
|
-
afterServerReset,
|
|
68
|
-
extendSSRContext,
|
|
69
|
-
extendContext,
|
|
70
|
-
handleError,
|
|
71
|
-
beforeMatch,
|
|
72
|
-
afterMatch,
|
|
73
|
-
prefetch,
|
|
74
|
-
renderToString,
|
|
75
|
-
beforeRender,
|
|
76
|
-
afterRender,
|
|
77
|
-
beforeSend,
|
|
78
|
-
afterSend,
|
|
79
|
-
reset
|
|
80
|
-
};
|
|
81
|
-
const createServerManager = () => createAsyncManager(serverHooks, pluginAPI);
|
|
82
|
-
const serverManager = createServerManager();
|
|
83
|
-
const { createPlugin } = serverManager;
|
|
84
|
-
export {
|
|
85
|
-
AppContext,
|
|
86
|
-
ConfigContext,
|
|
87
|
-
createPlugin,
|
|
88
|
-
createServerManager,
|
|
89
|
-
serverManager,
|
|
90
|
-
setAppContext,
|
|
91
|
-
useAppContext,
|
|
92
|
-
useConfigContext
|
|
93
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/js/node/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
var src_exports = {};
|
|
16
|
-
module.exports = __toCommonJS(src_exports);
|
|
17
|
-
__reExport(src_exports, require("./plugin"), module.exports);
|
|
18
|
-
__reExport(src_exports, require("@modern-js/plugin"), module.exports);
|
|
19
|
-
__reExport(src_exports, require("./loadPlugins"), module.exports);
|
|
20
|
-
__reExport(src_exports, require("./types/config"), module.exports);
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var loadPlugins_exports = {};
|
|
19
|
-
__export(loadPlugins_exports, {
|
|
20
|
-
loadPlugins: () => loadPlugins
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(loadPlugins_exports);
|
|
23
|
-
var import_utils = require("@modern-js/utils");
|
|
24
|
-
var import_plugin = require("./plugin");
|
|
25
|
-
const resolvePlugin = (p, appDirectory) => {
|
|
26
|
-
const isPluginInstance = typeof p !== "string";
|
|
27
|
-
if (isPluginInstance) {
|
|
28
|
-
return {
|
|
29
|
-
module: (0, import_plugin.createPlugin)(p.setup, p)
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
const pluginPath = (0, import_utils.tryResolve)(p, appDirectory);
|
|
33
|
-
const module2 = (0, import_utils.compatRequire)(pluginPath);
|
|
34
|
-
const pluginInstance = module2();
|
|
35
|
-
return {
|
|
36
|
-
module: (0, import_plugin.createPlugin)(pluginInstance.setup, pluginInstance)
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
const loadPlugins = (appDirectory, configPlugins, options) => {
|
|
40
|
-
const loadedPlugins = (0, import_utils.getInternalPlugins)(
|
|
41
|
-
appDirectory,
|
|
42
|
-
options.internalPlugins
|
|
43
|
-
);
|
|
44
|
-
return [...loadedPlugins, ...configPlugins].map((plugin) => {
|
|
45
|
-
const { module: module2 } = resolvePlugin(plugin, appDirectory);
|
|
46
|
-
return module2;
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
50
|
-
0 && (module.exports = {
|
|
51
|
-
loadPlugins
|
|
52
|
-
});
|
package/dist/js/node/plugin.js
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var plugin_exports = {};
|
|
19
|
-
__export(plugin_exports, {
|
|
20
|
-
AppContext: () => AppContext,
|
|
21
|
-
ConfigContext: () => ConfigContext,
|
|
22
|
-
createPlugin: () => createPlugin,
|
|
23
|
-
createServerManager: () => createServerManager,
|
|
24
|
-
serverManager: () => serverManager,
|
|
25
|
-
setAppContext: () => setAppContext,
|
|
26
|
-
useAppContext: () => useAppContext,
|
|
27
|
-
useConfigContext: () => useConfigContext
|
|
28
|
-
});
|
|
29
|
-
module.exports = __toCommonJS(plugin_exports);
|
|
30
|
-
var import_plugin = require("@modern-js/plugin");
|
|
31
|
-
const gather = (0, import_plugin.createParallelWorkflow)();
|
|
32
|
-
const config = (0, import_plugin.createWaterfall)();
|
|
33
|
-
const prepare = (0, import_plugin.createWaterfall)();
|
|
34
|
-
const preparebeforeRouteHandler = (0, import_plugin.createAsyncPipeline)();
|
|
35
|
-
const prepareWebServer = (0, import_plugin.createAsyncPipeline)();
|
|
36
|
-
const prepareApiServer = (0, import_plugin.createAsyncPipeline)();
|
|
37
|
-
const onApiChange = (0, import_plugin.createWaterfall)();
|
|
38
|
-
const repack = (0, import_plugin.createWaterfall)();
|
|
39
|
-
const beforeDevServer = (0, import_plugin.createParallelWorkflow)();
|
|
40
|
-
const setupCompiler = (0, import_plugin.createParallelWorkflow)();
|
|
41
|
-
const afterDevServer = (0, import_plugin.createParallelWorkflow)();
|
|
42
|
-
const beforeRouteSet = (0, import_plugin.createAsyncPipeline)();
|
|
43
|
-
const afterRouteSet = (0, import_plugin.createAsyncPipeline)();
|
|
44
|
-
const beforeProdServer = (0, import_plugin.createParallelWorkflow)();
|
|
45
|
-
const afterProdServer = (0, import_plugin.createParallelWorkflow)();
|
|
46
|
-
const listen = (0, import_plugin.createParallelWorkflow)();
|
|
47
|
-
const beforeServerReset = (0, import_plugin.createParallelWorkflow)();
|
|
48
|
-
const afterServerReset = (0, import_plugin.createParallelWorkflow)();
|
|
49
|
-
const extendSSRContext = (0, import_plugin.createAsyncWaterfall)();
|
|
50
|
-
const extendContext = (0, import_plugin.createAsyncPipeline)();
|
|
51
|
-
const handleError = (0, import_plugin.createParallelWorkflow)();
|
|
52
|
-
const beforeMatch = (0, import_plugin.createAsyncPipeline)();
|
|
53
|
-
const afterMatch = (0, import_plugin.createAsyncPipeline)();
|
|
54
|
-
const prefetch = (0, import_plugin.createParallelWorkflow)();
|
|
55
|
-
const renderToString = (0, import_plugin.createAsyncPipeline)();
|
|
56
|
-
const beforeRender = (0, import_plugin.createAsyncPipeline)();
|
|
57
|
-
const afterRender = (0, import_plugin.createAsyncPipeline)();
|
|
58
|
-
const beforeSend = (0, import_plugin.createAsyncPipeline)();
|
|
59
|
-
const afterSend = (0, import_plugin.createParallelWorkflow)();
|
|
60
|
-
const reset = (0, import_plugin.createParallelWorkflow)();
|
|
61
|
-
const AppContext = (0, import_plugin.createContext)({});
|
|
62
|
-
const setAppContext = (value) => AppContext.set(value);
|
|
63
|
-
const ConfigContext = (0, import_plugin.createContext)({});
|
|
64
|
-
const useConfigContext = () => ConfigContext.use().value;
|
|
65
|
-
const useAppContext = () => AppContext.use().value;
|
|
66
|
-
const pluginAPI = {
|
|
67
|
-
useAppContext,
|
|
68
|
-
useConfigContext,
|
|
69
|
-
setAppContext
|
|
70
|
-
};
|
|
71
|
-
const serverHooks = {
|
|
72
|
-
gather,
|
|
73
|
-
config,
|
|
74
|
-
prepare,
|
|
75
|
-
preparebeforeRouteHandler,
|
|
76
|
-
prepareWebServer,
|
|
77
|
-
prepareApiServer,
|
|
78
|
-
repack,
|
|
79
|
-
onApiChange,
|
|
80
|
-
beforeDevServer,
|
|
81
|
-
setupCompiler,
|
|
82
|
-
afterDevServer,
|
|
83
|
-
beforeRouteSet,
|
|
84
|
-
afterRouteSet,
|
|
85
|
-
beforeProdServer,
|
|
86
|
-
afterProdServer,
|
|
87
|
-
listen,
|
|
88
|
-
beforeServerReset,
|
|
89
|
-
afterServerReset,
|
|
90
|
-
extendSSRContext,
|
|
91
|
-
extendContext,
|
|
92
|
-
handleError,
|
|
93
|
-
beforeMatch,
|
|
94
|
-
afterMatch,
|
|
95
|
-
prefetch,
|
|
96
|
-
renderToString,
|
|
97
|
-
beforeRender,
|
|
98
|
-
afterRender,
|
|
99
|
-
beforeSend,
|
|
100
|
-
afterSend,
|
|
101
|
-
reset
|
|
102
|
-
};
|
|
103
|
-
const createServerManager = () => (0, import_plugin.createAsyncManager)(serverHooks, pluginAPI);
|
|
104
|
-
const serverManager = createServerManager();
|
|
105
|
-
const { createPlugin } = serverManager;
|
|
106
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
107
|
-
0 && (module.exports = {
|
|
108
|
-
AppContext,
|
|
109
|
-
ConfigContext,
|
|
110
|
-
createPlugin,
|
|
111
|
-
createServerManager,
|
|
112
|
-
serverManager,
|
|
113
|
-
setAppContext,
|
|
114
|
-
useAppContext,
|
|
115
|
-
useConfigContext
|
|
116
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
-
var html_exports = {};
|
|
15
|
-
module.exports = __toCommonJS(html_exports);
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
var config_exports = {};
|
|
16
|
-
module.exports = __toCommonJS(config_exports);
|
|
17
|
-
__reExport(config_exports, require("./bff"), module.exports);
|
|
18
|
-
__reExport(config_exports, require("./html"), module.exports);
|
|
19
|
-
__reExport(config_exports, require("./output"), module.exports);
|
|
20
|
-
__reExport(config_exports, require("./server"), module.exports);
|
|
21
|
-
__reExport(config_exports, require("./source"), module.exports);
|
|
22
|
-
__reExport(config_exports, require("./tools"), module.exports);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
-
var output_exports = {};
|
|
15
|
-
module.exports = __toCommonJS(output_exports);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
-
var server_exports = {};
|
|
15
|
-
module.exports = __toCommonJS(server_exports);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
-
var share_exports = {};
|
|
15
|
-
module.exports = __toCommonJS(share_exports);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
-
var source_exports = {};
|
|
15
|
-
module.exports = __toCommonJS(source_exports);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
-
var tools_exports = {};
|
|
15
|
-
module.exports = __toCommonJS(tools_exports);
|
|
File without changes
|