@evjs/cli 0.0.13 → 0.0.14

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.
Files changed (2) hide show
  1. package/dist/index.js +8 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -40,9 +40,9 @@ export async function dev(userConfig, options) {
40
40
  return;
41
41
  apiStarted = true;
42
42
  const serverPort = config?.server?.dev?.port ?? CONFIG_DEFAULTS.serverPort;
43
- const backendConfig = config?.server?.backend ?? "node";
44
- const [backend, ...backendExtraArgs] = backendConfig.split(/\s+/);
45
- logger.info `Server bundle detected, starting ${backend} API...`;
43
+ const runtimeConfig = config?.server?.runtime ?? "node";
44
+ const [runtime, ...runtimeExtraArgs] = runtimeConfig.split(/\s+/);
45
+ logger.info `Server bundle detected, starting ${runtime} API...`;
46
46
  const bootstrapPath = path.resolve(cwd, "dist/server/_dev_start.cjs");
47
47
  try {
48
48
  const serverBundlePath = path.resolve(cwd, "dist/server", manifest.server.entry);
@@ -56,16 +56,16 @@ export async function dev(userConfig, options) {
56
56
  `serve(app, { port: ${serverPort}, https: ${JSON.stringify(config.server.dev.https)} });`,
57
57
  ].join("\n"));
58
58
  // node gets --watch flags; other runtimes use their own args as-is
59
- const backendArgs = backend === "node"
59
+ const runtimeArgs = runtime === "node"
60
60
  ? [
61
61
  "--watch",
62
62
  "--watch-preserve-output",
63
- ...backendExtraArgs,
63
+ ...runtimeExtraArgs,
64
64
  bootstrapPath,
65
65
  ]
66
- : [...backendExtraArgs, bootstrapPath];
66
+ : [...runtimeExtraArgs, bootstrapPath];
67
67
  // Don't await execa here since it's a long-running watch process
68
- execa(backend, backendArgs, {
68
+ execa(runtime, runtimeArgs, {
69
69
  stdio: "inherit",
70
70
  env: { ...process.env, NODE_ENV: "development" },
71
71
  }).catch(() => {
@@ -73,7 +73,7 @@ export async function dev(userConfig, options) {
73
73
  });
74
74
  }
75
75
  catch (err) {
76
- logger.error `Server backend failed: ${err}`;
76
+ logger.error `Server runtime failed: ${err}`;
77
77
  apiStarted = false;
78
78
  }
79
79
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evjs/cli",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "CLI and configuration layer for the evjs framework",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",