@modern-js/app-tools 2.49.3-alpha.12 → 2.49.3-alpha.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -79,7 +79,7 @@ var deploy_default = () => ({
79
79
  dest: `/.netlify/functions/index`,
80
80
  status: 200
81
81
  });
82
- throw new Error("Currently on the Netlify platform, only CSR projects are supporte, Support for SSR and BFF projects will be available later");
82
+ throw new Error("Currently on the Netlify platform, only CSR projects are supported, Support for SSR and BFF projects will be available later");
83
83
  }
84
84
  console.log("routes", routes, needModernServer);
85
85
  const redirectContent = routes.map((route) => {
@@ -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: import_path.default.join(__dirname, import_path.default.relative(appDirectory, sharedDirectory)),
167
- apiDirectory: import_path.default.join(__dirname, import_path.default.relative(appDirectory, apiDirectory)),
168
- lambdaDirectory: import_path.default.join(__dirname, import_path.default.relative(appDirectory, 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,32 +34,27 @@ 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 } = {}) {
38
- const defaultConfig = {
37
+ async function genNodeEntry({ config, plugins, appContext }) {
38
+ var _config_bff;
39
+ const serverConfig = {
39
40
  server: {
40
41
  port: 8080
41
42
  },
43
+ bff: {
44
+ prefix: config === null || config === void 0 ? void 0 : (_config_bff = config.bff) === null || _config_bff === void 0 ? void 0 : _config_bff.prefix
45
+ },
42
46
  output: {
43
47
  path: "."
44
48
  }
45
49
  };
46
50
  const pluginImportCode = (0, import_utils2.genPluginImportsCode)(plugins || []);
47
51
  const dynamicProdOptions = {
48
- config: config || defaultConfig,
52
+ config: serverConfig,
49
53
  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"
54
+ plugins
56
55
  };
57
56
  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
- );
57
+ 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
58
  return entryCode;
64
59
  }
65
60
  // 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("\\x1b[32mServer is listening on port", port, "\\x1b[0m");
38
+ console.log("\x1B[32mServer is listening on port", port, "\x1B[0m");
34
39
  });
35
40
  }
36
41
  main();
@@ -34,29 +34,24 @@ 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 } = {}) {
38
- const defaultConfig = {
37
+ async function genVercelEntry({ config, plugins, appContext }) {
38
+ var _config_bff;
39
+ const serverConfig = {
40
+ bff: {
41
+ prefix: config === null || config === void 0 ? void 0 : (_config_bff = config.bff) === null || _config_bff === void 0 ? void 0 : _config_bff.prefix
42
+ },
39
43
  output: {
40
44
  path: "."
41
45
  }
42
46
  };
43
47
  const pluginImportCode = (0, import_utils2.genPluginImportsCode)(plugins || []);
44
48
  const dynamicProdOptions = {
45
- config: config || defaultConfig,
49
+ config: serverConfig,
46
50
  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"
51
+ plugins
53
52
  };
54
53
  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
- );
54
+ 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
55
  return entryCode;
61
56
  }
62
57
  // 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);
@@ -73,7 +73,7 @@ function deploy_default() {
73
73
  dest: "/.netlify/functions/index",
74
74
  status: 200
75
75
  });
76
- throw new Error("Currently on the Netlify platform, only CSR projects are supporte, Support for SSR and BFF projects will be available later");
76
+ throw new Error("Currently on the Netlify platform, only CSR projects are supported, Support for SSR and BFF projects will be available later");
77
77
  }
78
78
  console.log("routes", routes, needModernServer);
79
79
  redirectContent = routes.map(function(route) {
@@ -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,35 +3,32 @@ 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 _ref, config, plugins, appContext, defaultConfig, pluginImportCode, dynamicProdOptions, entryCode;
12
- var _arguments = arguments;
10
+ _genNodeEntry = _async_to_generator(function(param) {
11
+ var config, plugins, appContext, _config_bff, serverConfig, pluginImportCode, dynamicProdOptions, entryCode;
13
12
  return _ts_generator(this, function(_state) {
14
13
  switch (_state.label) {
15
14
  case 0:
16
- _ref = _arguments.length > 0 && _arguments[0] !== void 0 ? _arguments[0] : {}, config = _ref.config, plugins = _ref.plugins, appContext = _ref.appContext;
17
- defaultConfig = {
15
+ config = param.config, plugins = param.plugins, appContext = param.appContext;
16
+ serverConfig = {
18
17
  server: {
19
18
  port: 8080
20
19
  },
20
+ bff: {
21
+ prefix: config === null || config === void 0 ? void 0 : (_config_bff = config.bff) === null || _config_bff === void 0 ? void 0 : _config_bff.prefix
22
+ },
21
23
  output: {
22
24
  path: "."
23
25
  }
24
26
  };
25
27
  pluginImportCode = genPluginImportsCode(plugins || []);
26
28
  dynamicProdOptions = {
27
- config: config || defaultConfig,
29
+ config: serverConfig,
28
30
  serverConfigFile: DEFAULT_SERVER_CONFIG,
29
- plugins,
30
- appContext: appContext ? {
31
- sharedDirectory: appContext.sharedDirectory,
32
- apiDirectory: appContext.apiDirectory,
33
- lambdaDirectory: appContext.lambdaDirectory
34
- } : "undefined"
31
+ plugins
35
32
  };
36
33
  return [
37
34
  4,
@@ -39,11 +36,7 @@ function _genNodeEntry() {
39
36
  ];
40
37
  case 1:
41
38
  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
- );
39
+ 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
40
  return [
48
41
  2,
49
42
  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("\\x1b[32mServer is listening on port", port, "\\x1b[0m");
94
+ console.log("\x1B[32mServer is listening on port", port, "\x1B[0m");
90
95
  });
91
96
  return [
92
97
  2
@@ -3,32 +3,29 @@ 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 _ref, config, plugins, appContext, defaultConfig, pluginImportCode, dynamicProdOptions, entryCode;
12
- var _arguments = arguments;
10
+ _genVercelEntry = _async_to_generator(function(param) {
11
+ var config, plugins, appContext, _config_bff, serverConfig, pluginImportCode, dynamicProdOptions, entryCode;
13
12
  return _ts_generator(this, function(_state) {
14
13
  switch (_state.label) {
15
14
  case 0:
16
- _ref = _arguments.length > 0 && _arguments[0] !== void 0 ? _arguments[0] : {}, config = _ref.config, plugins = _ref.plugins, appContext = _ref.appContext;
17
- defaultConfig = {
15
+ config = param.config, plugins = param.plugins, appContext = param.appContext;
16
+ serverConfig = {
17
+ bff: {
18
+ prefix: config === null || config === void 0 ? void 0 : (_config_bff = config.bff) === null || _config_bff === void 0 ? void 0 : _config_bff.prefix
19
+ },
18
20
  output: {
19
21
  path: "."
20
22
  }
21
23
  };
22
24
  pluginImportCode = genPluginImportsCode(plugins || []);
23
25
  dynamicProdOptions = {
24
- config: config || defaultConfig,
26
+ config: serverConfig,
25
27
  serverConfigFile: DEFAULT_SERVER_CONFIG,
26
- plugins,
27
- appContext: appContext ? {
28
- sharedDirectory: appContext.sharedDirectory,
29
- apiDirectory: appContext.apiDirectory,
30
- lambdaDirectory: appContext.lambdaDirectory
31
- } : "undefined"
28
+ plugins
32
29
  };
33
30
  return [
34
31
  4,
@@ -36,11 +33,7 @@ function _genVercelEntry() {
36
33
  ];
37
34
  case 1:
38
35
  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
- );
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);
44
37
  return [
45
38
  2,
46
39
  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,
@@ -46,7 +46,7 @@ var deploy_default = () => ({
46
46
  dest: `/.netlify/functions/index`,
47
47
  status: 200
48
48
  });
49
- throw new Error("Currently on the Netlify platform, only CSR projects are supporte, Support for SSR and BFF projects will be available later");
49
+ throw new Error("Currently on the Netlify platform, only CSR projects are supported, Support for SSR and BFF projects will be available later");
50
50
  }
51
51
  console.log("routes", routes, needModernServer);
52
52
  const redirectContent = routes.map((route) => {
@@ -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,32 +1,27 @@
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 } = {}) {
5
- const defaultConfig = {
4
+ async function genNodeEntry({ config, plugins, appContext }) {
5
+ var _config_bff;
6
+ const serverConfig = {
6
7
  server: {
7
8
  port: 8080
8
9
  },
10
+ bff: {
11
+ prefix: config === null || config === void 0 ? void 0 : (_config_bff = config.bff) === null || _config_bff === void 0 ? void 0 : _config_bff.prefix
12
+ },
9
13
  output: {
10
14
  path: "."
11
15
  }
12
16
  };
13
17
  const pluginImportCode = genPluginImportsCode(plugins || []);
14
18
  const dynamicProdOptions = {
15
- config: config || defaultConfig,
19
+ config: serverConfig,
16
20
  serverConfigFile: DEFAULT_SERVER_CONFIG,
17
- plugins,
18
- appContext: appContext ? {
19
- sharedDirectory: appContext.sharedDirectory,
20
- apiDirectory: appContext.apiDirectory,
21
- lambdaDirectory: appContext.lambdaDirectory
22
- } : "undefined"
21
+ plugins
23
22
  };
24
23
  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
- );
24
+ 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
25
  return entryCode;
31
26
  }
32
27
  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("\\x1b[32mServer is listening on port", port, "\\x1b[0m");
37
+ console.log("\x1B[32mServer is listening on port", port, "\x1B[0m");
33
38
  });
34
39
  }
35
40
  main();
@@ -1,29 +1,24 @@
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 } = {}) {
5
- const defaultConfig = {
4
+ async function genVercelEntry({ config, plugins, appContext }) {
5
+ var _config_bff;
6
+ const serverConfig = {
7
+ bff: {
8
+ prefix: config === null || config === void 0 ? void 0 : (_config_bff = config.bff) === null || _config_bff === void 0 ? void 0 : _config_bff.prefix
9
+ },
6
10
  output: {
7
11
  path: "."
8
12
  }
9
13
  };
10
14
  const pluginImportCode = genPluginImportsCode(plugins || []);
11
15
  const dynamicProdOptions = {
12
- config: config || defaultConfig,
16
+ config: serverConfig,
13
17
  serverConfigFile: DEFAULT_SERVER_CONFIG,
14
- plugins,
15
- appContext: appContext ? {
16
- sharedDirectory: appContext.sharedDirectory,
17
- apiDirectory: appContext.apiDirectory,
18
- lambdaDirectory: appContext.lambdaDirectory
19
- } : "undefined"
18
+ plugins
20
19
  };
21
20
  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
- );
21
+ 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
22
  return entryCode;
28
23
  }
29
24
  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
- export declare function genNodeEntry({ config, plugins, appContext, }?: {
2
- config?: Record<string, any>;
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?: Record<string, any>;
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?: 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.12",
18
+ "version": "2.49.3-alpha.14",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -80,20 +80,20 @@
80
80
  "mlly": "^1.6.1",
81
81
  "pkg-types": "^1.1.0",
82
82
  "std-env": "^3.7.0",
83
+ "@modern-js/core": "2.49.2",
83
84
  "@modern-js/node-bundle-require": "2.49.2",
84
85
  "@modern-js/plugin": "2.49.2",
85
86
  "@modern-js/plugin-data-loader": "2.49.2",
86
87
  "@modern-js/plugin-lint": "2.49.2",
87
88
  "@modern-js/plugin-i18n": "2.49.2",
88
- "@modern-js/server": "2.49.2",
89
+ "@modern-js/prod-server": "2.49.2",
89
90
  "@modern-js/rsbuild-plugin-esbuild": "2.49.2",
90
- "@modern-js/core": "2.49.2",
91
- "@modern-js/server-utils": "2.49.2",
92
- "@modern-js/utils": "2.49.2",
93
- "@modern-js/types": "2.49.2",
94
91
  "@modern-js/server-core": "2.49.2",
92
+ "@modern-js/server-utils": "2.49.2",
95
93
  "@modern-js/uni-builder": "2.49.2",
96
- "@modern-js/prod-server": "2.49.2"
94
+ "@modern-js/types": "2.49.2",
95
+ "@modern-js/server": "2.49.2",
96
+ "@modern-js/utils": "2.49.2"
97
97
  },
98
98
  "devDependencies": {
99
99
  "@rsbuild/plugin-swc": "0.6.10",