@modern-js/app-tools 2.49.3-alpha.12 → 2.49.3-alpha.13
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/plugins/deploy/index.js +4 -3
- package/dist/cjs/plugins/deploy/platforms/node.js +3 -12
- package/dist/cjs/plugins/deploy/platforms/nodeEntry.js +6 -1
- package/dist/cjs/plugins/deploy/platforms/vercel.js +3 -12
- package/dist/cjs/plugins/deploy/platforms/vercelEntry.js +5 -0
- package/dist/esm/plugins/deploy/index.js +4 -3
- package/dist/esm/plugins/deploy/platforms/node.js +6 -16
- package/dist/esm/plugins/deploy/platforms/nodeEntry.js +7 -2
- package/dist/esm/plugins/deploy/platforms/vercel.js +6 -16
- package/dist/esm/plugins/deploy/platforms/vercelEntry.js +6 -1
- package/dist/esm-node/plugins/deploy/index.js +4 -3
- package/dist/esm-node/plugins/deploy/platforms/node.js +3 -12
- package/dist/esm-node/plugins/deploy/platforms/nodeEntry.js +6 -1
- package/dist/esm-node/plugins/deploy/platforms/vercel.js +3 -12
- package/dist/esm-node/plugins/deploy/platforms/vercelEntry.js +5 -0
- package/dist/types/plugins/deploy/platforms/node.d.ts +6 -3
- package/dist/types/plugins/deploy/platforms/vercel.d.ts +2 -2
- package/package.json +9 -9
@@ -163,11 +163,12 @@ var deploy_default = () => ({
|
|
163
163
|
}
|
164
164
|
const plugins = (0, import_utils.getInternalPlugins)(appDirectory, serverInternalPlugins);
|
165
165
|
const serverAppContext = {
|
166
|
-
sharedDirectory:
|
167
|
-
apiDirectory:
|
168
|
-
lambdaDirectory:
|
166
|
+
sharedDirectory: `path.join(__dirname, "${import_path.default.relative(appDirectory, sharedDirectory)}")`,
|
167
|
+
apiDirectory: `path.join(__dirname, "${import_path.default.relative(appDirectory, apiDirectory)}")`,
|
168
|
+
lambdaDirectory: `path.join(__dirname, "${import_path.default.relative(appDirectory, lambdaDirectory)}")`,
|
169
169
|
metaName
|
170
170
|
};
|
171
|
+
console.log("serverAppContext", serverAppContext);
|
171
172
|
let code = ``;
|
172
173
|
console.log("deployTarget111111111", deployTarget);
|
173
174
|
switch (deployTarget) {
|
@@ -34,7 +34,7 @@ module.exports = __toCommonJS(node_exports);
|
|
34
34
|
var import_node_path = __toESM(require("node:path"));
|
35
35
|
var import_utils = require("@modern-js/utils");
|
36
36
|
var import_utils2 = require("../utils");
|
37
|
-
async function genNodeEntry({ config, plugins, appContext }
|
37
|
+
async function genNodeEntry({ config, plugins, appContext }) {
|
38
38
|
const defaultConfig = {
|
39
39
|
server: {
|
40
40
|
port: 8080
|
@@ -47,19 +47,10 @@ async function genNodeEntry({ config, plugins, appContext } = {}) {
|
|
47
47
|
const dynamicProdOptions = {
|
48
48
|
config: config || defaultConfig,
|
49
49
|
serverConfigFile: import_utils.DEFAULT_SERVER_CONFIG,
|
50
|
-
plugins
|
51
|
-
appContext: appContext ? {
|
52
|
-
sharedDirectory: appContext.sharedDirectory,
|
53
|
-
apiDirectory: appContext.apiDirectory,
|
54
|
-
lambdaDirectory: appContext.lambdaDirectory
|
55
|
-
} : "undefined"
|
50
|
+
plugins
|
56
51
|
};
|
57
52
|
let entryCode = (await import_utils.fs.readFile(import_node_path.default.join(__dirname, "./nodeEntry.js"))).toString();
|
58
|
-
entryCode = entryCode.replace("p_genPluginImportsCode", pluginImportCode).replace("p_ROUTE_SPEC_FILE", `"${import_utils.ROUTE_SPEC_FILE}"`).replace(
|
59
|
-
"p_dynamicProdOptions",
|
60
|
-
// JSON.stringify(dynamicProdOptions),
|
61
|
-
JSON.stringify(dynamicProdOptions)
|
62
|
-
);
|
53
|
+
entryCode = entryCode.replace("p_genPluginImportsCode", pluginImportCode).replace("p_ROUTE_SPEC_FILE", `"${import_utils.ROUTE_SPEC_FILE}"`).replace("p_dynamicProdOptions", JSON.stringify(dynamicProdOptions)).replace("p_sharedDirectory", appContext.sharedDirectory).replace("p_apiDirectory", appContext.apiDirectory).replace("p_lambdaDirectory", appContext.lambdaDirectory);
|
63
54
|
return entryCode;
|
64
55
|
}
|
65
56
|
// Annotate the CommonJS export names for ESM import in node:
|
@@ -25,12 +25,17 @@ async function main() {
|
|
25
25
|
pwd: __dirname,
|
26
26
|
routes,
|
27
27
|
disableCustomHook: true,
|
28
|
+
appContext: {
|
29
|
+
sharedDirectory: p_sharedDirectory,
|
30
|
+
apiDirectory: p_apiDirectory,
|
31
|
+
lambdaDirectory: p_lambdaDirectory
|
32
|
+
},
|
28
33
|
...dynamicProdOptions
|
29
34
|
};
|
30
35
|
const app = await createProdServer(prodServerOptions);
|
31
36
|
const port = process.env.PORT || 8080;
|
32
37
|
app.listen(port, () => {
|
33
|
-
console.log("
|
38
|
+
console.log("\x1B[32mServer is listening on port", port, "\x1B[0m");
|
34
39
|
});
|
35
40
|
}
|
36
41
|
main();
|
@@ -34,7 +34,7 @@ module.exports = __toCommonJS(vercel_exports);
|
|
34
34
|
var import_node_path = __toESM(require("node:path"));
|
35
35
|
var import_utils = require("@modern-js/utils");
|
36
36
|
var import_utils2 = require("../utils");
|
37
|
-
async function genVercelEntry({ config, plugins, appContext }
|
37
|
+
async function genVercelEntry({ config, plugins, appContext }) {
|
38
38
|
const defaultConfig = {
|
39
39
|
output: {
|
40
40
|
path: "."
|
@@ -44,19 +44,10 @@ async function genVercelEntry({ config, plugins, appContext } = {}) {
|
|
44
44
|
const dynamicProdOptions = {
|
45
45
|
config: config || defaultConfig,
|
46
46
|
serverConfigFile: import_utils.DEFAULT_SERVER_CONFIG,
|
47
|
-
plugins
|
48
|
-
appContext: appContext ? {
|
49
|
-
sharedDirectory: appContext.sharedDirectory,
|
50
|
-
apiDirectory: appContext.apiDirectory,
|
51
|
-
lambdaDirectory: appContext.lambdaDirectory
|
52
|
-
} : "undefined"
|
47
|
+
plugins
|
53
48
|
};
|
54
49
|
let entryCode = (await import_utils.fs.readFile(import_node_path.default.join(__dirname, "./vercelEntry.js"))).toString();
|
55
|
-
entryCode = entryCode.replace("p_genPluginImportsCode", pluginImportCode).replace("p_ROUTE_SPEC_FILE", `"${import_utils.ROUTE_SPEC_FILE}"`).replace(
|
56
|
-
"p_dynamicProdOptions",
|
57
|
-
// JSON.stringify(dynamicProdOptions),
|
58
|
-
JSON.stringify(dynamicProdOptions)
|
59
|
-
);
|
50
|
+
entryCode = entryCode.replace("p_genPluginImportsCode", pluginImportCode).replace("p_ROUTE_SPEC_FILE", `"${import_utils.ROUTE_SPEC_FILE}"`).replace("p_dynamicProdOptions", JSON.stringify(dynamicProdOptions)).replace("p_sharedDirectory", appContext.sharedDirectory).replace("p_apiDirectory", appContext.apiDirectory).replace("p_lambdaDirectory", appContext.lambdaDirectory);
|
60
51
|
return entryCode;
|
61
52
|
}
|
62
53
|
// Annotate the CommonJS export names for ESM import in node:
|
@@ -27,6 +27,11 @@ async function initServer() {
|
|
27
27
|
pwd: __dirname,
|
28
28
|
routes,
|
29
29
|
disableCustomHook: true,
|
30
|
+
appContext: {
|
31
|
+
sharedDirectory: p_sharedDirectory,
|
32
|
+
apiDirectory: p_apiDirectory,
|
33
|
+
lambdaDirectory: p_lambdaDirectory
|
34
|
+
},
|
30
35
|
...dynamicProdOptions
|
31
36
|
};
|
32
37
|
const app = await createProdServer(prodServerOptions);
|
@@ -230,11 +230,12 @@ function deploy_default() {
|
|
230
230
|
case 18:
|
231
231
|
plugins = getInternalPlugins(appDirectory, serverInternalPlugins);
|
232
232
|
serverAppContext = {
|
233
|
-
sharedDirectory: path.join(__dirname, path.relative(appDirectory, sharedDirectory)),
|
234
|
-
apiDirectory: path.join(__dirname, path.relative(appDirectory, apiDirectory)),
|
235
|
-
lambdaDirectory: path.join(__dirname, path.relative(appDirectory, lambdaDirectory)),
|
233
|
+
sharedDirectory: 'path.join(__dirname, "'.concat(path.relative(appDirectory, sharedDirectory), '")'),
|
234
|
+
apiDirectory: 'path.join(__dirname, "'.concat(path.relative(appDirectory, apiDirectory), '")'),
|
235
|
+
lambdaDirectory: 'path.join(__dirname, "'.concat(path.relative(appDirectory, lambdaDirectory), '")'),
|
236
236
|
metaName
|
237
237
|
};
|
238
|
+
console.log("serverAppContext", serverAppContext);
|
238
239
|
code = "";
|
239
240
|
console.log("deployTarget111111111", deployTarget);
|
240
241
|
switch (deployTarget) {
|
@@ -3,17 +3,16 @@ import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
3
3
|
import path from "node:path";
|
4
4
|
import { ROUTE_SPEC_FILE, DEFAULT_SERVER_CONFIG, fs as fse } from "@modern-js/utils";
|
5
5
|
import { genPluginImportsCode } from "../utils";
|
6
|
-
function genNodeEntry() {
|
6
|
+
function genNodeEntry(_) {
|
7
7
|
return _genNodeEntry.apply(this, arguments);
|
8
8
|
}
|
9
9
|
function _genNodeEntry() {
|
10
|
-
_genNodeEntry = _async_to_generator(function() {
|
11
|
-
var
|
12
|
-
var _arguments = arguments;
|
10
|
+
_genNodeEntry = _async_to_generator(function(param) {
|
11
|
+
var config, plugins, appContext, defaultConfig, pluginImportCode, dynamicProdOptions, entryCode;
|
13
12
|
return _ts_generator(this, function(_state) {
|
14
13
|
switch (_state.label) {
|
15
14
|
case 0:
|
16
|
-
|
15
|
+
config = param.config, plugins = param.plugins, appContext = param.appContext;
|
17
16
|
defaultConfig = {
|
18
17
|
server: {
|
19
18
|
port: 8080
|
@@ -26,12 +25,7 @@ function _genNodeEntry() {
|
|
26
25
|
dynamicProdOptions = {
|
27
26
|
config: config || defaultConfig,
|
28
27
|
serverConfigFile: DEFAULT_SERVER_CONFIG,
|
29
|
-
plugins
|
30
|
-
appContext: appContext ? {
|
31
|
-
sharedDirectory: appContext.sharedDirectory,
|
32
|
-
apiDirectory: appContext.apiDirectory,
|
33
|
-
lambdaDirectory: appContext.lambdaDirectory
|
34
|
-
} : "undefined"
|
28
|
+
plugins
|
35
29
|
};
|
36
30
|
return [
|
37
31
|
4,
|
@@ -39,11 +33,7 @@ function _genNodeEntry() {
|
|
39
33
|
];
|
40
34
|
case 1:
|
41
35
|
entryCode = _state.sent().toString();
|
42
|
-
entryCode = entryCode.replace("p_genPluginImportsCode", pluginImportCode).replace("p_ROUTE_SPEC_FILE", '"'.concat(ROUTE_SPEC_FILE, '"')).replace(
|
43
|
-
"p_dynamicProdOptions",
|
44
|
-
// JSON.stringify(dynamicProdOptions),
|
45
|
-
JSON.stringify(dynamicProdOptions)
|
46
|
-
);
|
36
|
+
entryCode = entryCode.replace("p_genPluginImportsCode", pluginImportCode).replace("p_ROUTE_SPEC_FILE", '"'.concat(ROUTE_SPEC_FILE, '"')).replace("p_dynamicProdOptions", JSON.stringify(dynamicProdOptions)).replace("p_sharedDirectory", appContext.sharedDirectory).replace("p_apiDirectory", appContext.apiDirectory).replace("p_lambdaDirectory", appContext.lambdaDirectory);
|
47
37
|
return [
|
48
38
|
2,
|
49
39
|
entryCode
|
@@ -76,7 +76,12 @@ function _main() {
|
|
76
76
|
prodServerOptions = _object_spread._({
|
77
77
|
pwd: __dirname,
|
78
78
|
routes,
|
79
|
-
disableCustomHook: true
|
79
|
+
disableCustomHook: true,
|
80
|
+
appContext: {
|
81
|
+
sharedDirectory: p_sharedDirectory,
|
82
|
+
apiDirectory: p_apiDirectory,
|
83
|
+
lambdaDirectory: p_lambdaDirectory
|
84
|
+
}
|
80
85
|
}, dynamicProdOptions);
|
81
86
|
return [
|
82
87
|
4,
|
@@ -86,7 +91,7 @@ function _main() {
|
|
86
91
|
app = _state.sent();
|
87
92
|
port = process.env.PORT || 8080;
|
88
93
|
app.listen(port, function() {
|
89
|
-
console.log("
|
94
|
+
console.log("\x1B[32mServer is listening on port", port, "\x1B[0m");
|
90
95
|
});
|
91
96
|
return [
|
92
97
|
2
|
@@ -3,17 +3,16 @@ import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
3
3
|
import path from "node:path";
|
4
4
|
import { ROUTE_SPEC_FILE, DEFAULT_SERVER_CONFIG, fs as fse } from "@modern-js/utils";
|
5
5
|
import { genPluginImportsCode } from "../utils";
|
6
|
-
function genVercelEntry() {
|
6
|
+
function genVercelEntry(_) {
|
7
7
|
return _genVercelEntry.apply(this, arguments);
|
8
8
|
}
|
9
9
|
function _genVercelEntry() {
|
10
|
-
_genVercelEntry = _async_to_generator(function() {
|
11
|
-
var
|
12
|
-
var _arguments = arguments;
|
10
|
+
_genVercelEntry = _async_to_generator(function(param) {
|
11
|
+
var config, plugins, appContext, defaultConfig, pluginImportCode, dynamicProdOptions, entryCode;
|
13
12
|
return _ts_generator(this, function(_state) {
|
14
13
|
switch (_state.label) {
|
15
14
|
case 0:
|
16
|
-
|
15
|
+
config = param.config, plugins = param.plugins, appContext = param.appContext;
|
17
16
|
defaultConfig = {
|
18
17
|
output: {
|
19
18
|
path: "."
|
@@ -23,12 +22,7 @@ function _genVercelEntry() {
|
|
23
22
|
dynamicProdOptions = {
|
24
23
|
config: config || defaultConfig,
|
25
24
|
serverConfigFile: DEFAULT_SERVER_CONFIG,
|
26
|
-
plugins
|
27
|
-
appContext: appContext ? {
|
28
|
-
sharedDirectory: appContext.sharedDirectory,
|
29
|
-
apiDirectory: appContext.apiDirectory,
|
30
|
-
lambdaDirectory: appContext.lambdaDirectory
|
31
|
-
} : "undefined"
|
25
|
+
plugins
|
32
26
|
};
|
33
27
|
return [
|
34
28
|
4,
|
@@ -36,11 +30,7 @@ function _genVercelEntry() {
|
|
36
30
|
];
|
37
31
|
case 1:
|
38
32
|
entryCode = _state.sent().toString();
|
39
|
-
entryCode = entryCode.replace("p_genPluginImportsCode", pluginImportCode).replace("p_ROUTE_SPEC_FILE", '"'.concat(ROUTE_SPEC_FILE, '"')).replace(
|
40
|
-
"p_dynamicProdOptions",
|
41
|
-
// JSON.stringify(dynamicProdOptions),
|
42
|
-
JSON.stringify(dynamicProdOptions)
|
43
|
-
);
|
33
|
+
entryCode = entryCode.replace("p_genPluginImportsCode", pluginImportCode).replace("p_ROUTE_SPEC_FILE", '"'.concat(ROUTE_SPEC_FILE, '"')).replace("p_dynamicProdOptions", JSON.stringify(dynamicProdOptions)).replace("p_sharedDirectory", appContext.sharedDirectory).replace("p_apiDirectory", appContext.apiDirectory).replace("p_lambdaDirectory", appContext.lambdaDirectory);
|
44
34
|
return [
|
45
35
|
2,
|
46
36
|
entryCode
|
@@ -84,7 +84,12 @@ var require_vercelEntry = __commonJS({
|
|
84
84
|
prodServerOptions = _object_spread._({
|
85
85
|
pwd: __dirname,
|
86
86
|
routes,
|
87
|
-
disableCustomHook: true
|
87
|
+
disableCustomHook: true,
|
88
|
+
appContext: {
|
89
|
+
sharedDirectory: p_sharedDirectory,
|
90
|
+
apiDirectory: p_apiDirectory,
|
91
|
+
lambdaDirectory: p_lambdaDirectory
|
92
|
+
}
|
88
93
|
}, dynamicProdOptions);
|
89
94
|
return [
|
90
95
|
4,
|
@@ -130,11 +130,12 @@ var deploy_default = () => ({
|
|
130
130
|
}
|
131
131
|
const plugins = getInternalPlugins(appDirectory, serverInternalPlugins);
|
132
132
|
const serverAppContext = {
|
133
|
-
sharedDirectory: path.join(__dirname, path.relative(appDirectory, sharedDirectory))
|
134
|
-
apiDirectory: path.join(__dirname, path.relative(appDirectory, apiDirectory))
|
135
|
-
lambdaDirectory: path.join(__dirname, path.relative(appDirectory, lambdaDirectory))
|
133
|
+
sharedDirectory: `path.join(__dirname, "${path.relative(appDirectory, sharedDirectory)}")`,
|
134
|
+
apiDirectory: `path.join(__dirname, "${path.relative(appDirectory, apiDirectory)}")`,
|
135
|
+
lambdaDirectory: `path.join(__dirname, "${path.relative(appDirectory, lambdaDirectory)}")`,
|
136
136
|
metaName
|
137
137
|
};
|
138
|
+
console.log("serverAppContext", serverAppContext);
|
138
139
|
let code = ``;
|
139
140
|
console.log("deployTarget111111111", deployTarget);
|
140
141
|
switch (deployTarget) {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import path from "node:path";
|
2
2
|
import { ROUTE_SPEC_FILE, DEFAULT_SERVER_CONFIG, fs as fse } from "@modern-js/utils";
|
3
3
|
import { genPluginImportsCode } from "../utils";
|
4
|
-
async function genNodeEntry({ config, plugins, appContext }
|
4
|
+
async function genNodeEntry({ config, plugins, appContext }) {
|
5
5
|
const defaultConfig = {
|
6
6
|
server: {
|
7
7
|
port: 8080
|
@@ -14,19 +14,10 @@ async function genNodeEntry({ config, plugins, appContext } = {}) {
|
|
14
14
|
const dynamicProdOptions = {
|
15
15
|
config: config || defaultConfig,
|
16
16
|
serverConfigFile: DEFAULT_SERVER_CONFIG,
|
17
|
-
plugins
|
18
|
-
appContext: appContext ? {
|
19
|
-
sharedDirectory: appContext.sharedDirectory,
|
20
|
-
apiDirectory: appContext.apiDirectory,
|
21
|
-
lambdaDirectory: appContext.lambdaDirectory
|
22
|
-
} : "undefined"
|
17
|
+
plugins
|
23
18
|
};
|
24
19
|
let entryCode = (await fse.readFile(path.join(__dirname, "./nodeEntry.js"))).toString();
|
25
|
-
entryCode = entryCode.replace("p_genPluginImportsCode", pluginImportCode).replace("p_ROUTE_SPEC_FILE", `"${ROUTE_SPEC_FILE}"`).replace(
|
26
|
-
"p_dynamicProdOptions",
|
27
|
-
// JSON.stringify(dynamicProdOptions),
|
28
|
-
JSON.stringify(dynamicProdOptions)
|
29
|
-
);
|
20
|
+
entryCode = entryCode.replace("p_genPluginImportsCode", pluginImportCode).replace("p_ROUTE_SPEC_FILE", `"${ROUTE_SPEC_FILE}"`).replace("p_dynamicProdOptions", JSON.stringify(dynamicProdOptions)).replace("p_sharedDirectory", appContext.sharedDirectory).replace("p_apiDirectory", appContext.apiDirectory).replace("p_lambdaDirectory", appContext.lambdaDirectory);
|
30
21
|
return entryCode;
|
31
22
|
}
|
32
23
|
export {
|
@@ -24,12 +24,17 @@ async function main() {
|
|
24
24
|
pwd: __dirname,
|
25
25
|
routes,
|
26
26
|
disableCustomHook: true,
|
27
|
+
appContext: {
|
28
|
+
sharedDirectory: p_sharedDirectory,
|
29
|
+
apiDirectory: p_apiDirectory,
|
30
|
+
lambdaDirectory: p_lambdaDirectory
|
31
|
+
},
|
27
32
|
...dynamicProdOptions
|
28
33
|
};
|
29
34
|
const app = await createProdServer(prodServerOptions);
|
30
35
|
const port = process.env.PORT || 8080;
|
31
36
|
app.listen(port, () => {
|
32
|
-
console.log("
|
37
|
+
console.log("\x1B[32mServer is listening on port", port, "\x1B[0m");
|
33
38
|
});
|
34
39
|
}
|
35
40
|
main();
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import path from "node:path";
|
2
2
|
import { ROUTE_SPEC_FILE, DEFAULT_SERVER_CONFIG, fs as fse } from "@modern-js/utils";
|
3
3
|
import { genPluginImportsCode } from "../utils";
|
4
|
-
async function genVercelEntry({ config, plugins, appContext }
|
4
|
+
async function genVercelEntry({ config, plugins, appContext }) {
|
5
5
|
const defaultConfig = {
|
6
6
|
output: {
|
7
7
|
path: "."
|
@@ -11,19 +11,10 @@ async function genVercelEntry({ config, plugins, appContext } = {}) {
|
|
11
11
|
const dynamicProdOptions = {
|
12
12
|
config: config || defaultConfig,
|
13
13
|
serverConfigFile: DEFAULT_SERVER_CONFIG,
|
14
|
-
plugins
|
15
|
-
appContext: appContext ? {
|
16
|
-
sharedDirectory: appContext.sharedDirectory,
|
17
|
-
apiDirectory: appContext.apiDirectory,
|
18
|
-
lambdaDirectory: appContext.lambdaDirectory
|
19
|
-
} : "undefined"
|
14
|
+
plugins
|
20
15
|
};
|
21
16
|
let entryCode = (await fse.readFile(path.join(__dirname, "./vercelEntry.js"))).toString();
|
22
|
-
entryCode = entryCode.replace("p_genPluginImportsCode", pluginImportCode).replace("p_ROUTE_SPEC_FILE", `"${ROUTE_SPEC_FILE}"`).replace(
|
23
|
-
"p_dynamicProdOptions",
|
24
|
-
// JSON.stringify(dynamicProdOptions),
|
25
|
-
JSON.stringify(dynamicProdOptions)
|
26
|
-
);
|
17
|
+
entryCode = entryCode.replace("p_genPluginImportsCode", pluginImportCode).replace("p_ROUTE_SPEC_FILE", `"${ROUTE_SPEC_FILE}"`).replace("p_dynamicProdOptions", JSON.stringify(dynamicProdOptions)).replace("p_sharedDirectory", appContext.sharedDirectory).replace("p_apiDirectory", appContext.apiDirectory).replace("p_lambdaDirectory", appContext.lambdaDirectory);
|
27
18
|
return entryCode;
|
28
19
|
}
|
29
20
|
export {
|
@@ -32,6 +32,11 @@ var require_vercelEntry = __commonJS({
|
|
32
32
|
pwd: __dirname,
|
33
33
|
routes,
|
34
34
|
disableCustomHook: true,
|
35
|
+
appContext: {
|
36
|
+
sharedDirectory: p_sharedDirectory,
|
37
|
+
apiDirectory: p_apiDirectory,
|
38
|
+
lambdaDirectory: p_lambdaDirectory
|
39
|
+
},
|
35
40
|
...dynamicProdOptions
|
36
41
|
};
|
37
42
|
const app = await createProdServer(prodServerOptions);
|
@@ -1,5 +1,8 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import { NormalizedConfig } from '@modern-js/core';
|
2
|
+
import { AppTools } from '../../../types';
|
3
|
+
import { AppContext } from './platform';
|
4
|
+
export declare function genNodeEntry({ config, plugins, appContext, }: {
|
5
|
+
config?: NormalizedConfig<AppTools>;
|
3
6
|
plugins?: string[];
|
4
|
-
appContext
|
7
|
+
appContext: AppContext;
|
5
8
|
}): Promise<string>;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { NormalizedConfig } from '@modern-js/core';
|
2
2
|
import { AppTools } from '../../../types';
|
3
3
|
import { AppContext } from './platform';
|
4
|
-
export declare function genVercelEntry({ config, plugins, appContext, }
|
4
|
+
export declare function genVercelEntry({ config, plugins, appContext, }: {
|
5
5
|
config?: NormalizedConfig<AppTools>;
|
6
6
|
plugins?: string[];
|
7
|
-
appContext
|
7
|
+
appContext: AppContext;
|
8
8
|
}): Promise<string>;
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.49.3-alpha.
|
18
|
+
"version": "2.49.3-alpha.13",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"types": "./dist/types/index.d.ts",
|
21
21
|
"main": "./dist/cjs/index.js",
|
@@ -81,19 +81,19 @@
|
|
81
81
|
"pkg-types": "^1.1.0",
|
82
82
|
"std-env": "^3.7.0",
|
83
83
|
"@modern-js/node-bundle-require": "2.49.2",
|
84
|
-
"@modern-js/plugin": "2.49.2",
|
85
84
|
"@modern-js/plugin-data-loader": "2.49.2",
|
86
|
-
"@modern-js/
|
85
|
+
"@modern-js/core": "2.49.2",
|
87
86
|
"@modern-js/plugin-i18n": "2.49.2",
|
88
|
-
"@modern-js/
|
87
|
+
"@modern-js/plugin-lint": "2.49.2",
|
88
|
+
"@modern-js/prod-server": "2.49.2",
|
89
89
|
"@modern-js/rsbuild-plugin-esbuild": "2.49.2",
|
90
|
-
"@modern-js/
|
91
|
-
"@modern-js/server
|
92
|
-
"@modern-js/utils": "2.49.2",
|
93
|
-
"@modern-js/types": "2.49.2",
|
90
|
+
"@modern-js/plugin": "2.49.2",
|
91
|
+
"@modern-js/server": "2.49.2",
|
94
92
|
"@modern-js/server-core": "2.49.2",
|
95
93
|
"@modern-js/uni-builder": "2.49.2",
|
96
|
-
"@modern-js/
|
94
|
+
"@modern-js/server-utils": "2.49.2",
|
95
|
+
"@modern-js/types": "2.49.2",
|
96
|
+
"@modern-js/utils": "2.49.2"
|
97
97
|
},
|
98
98
|
"devDependencies": {
|
99
99
|
"@rsbuild/plugin-swc": "0.6.10",
|