befly 3.13.9 → 3.13.10

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/befly.js CHANGED
@@ -15232,13 +15232,12 @@ class Befly {
15232
15232
  hooks = [];
15233
15233
  context = {};
15234
15234
  config = null;
15235
- async start(env) {
15235
+ async start(env = {}) {
15236
15236
  try {
15237
15237
  const serverStartTime = Bun.nanoseconds();
15238
- const runtimeEnv = env || {};
15239
- this.config = await loadBeflyConfig(runtimeEnv.NODE_ENV);
15238
+ this.config = await loadBeflyConfig(env.NODE_ENV || "development");
15240
15239
  this.context.config = this.config;
15241
- this.context.env = runtimeEnv;
15240
+ this.context.env = env;
15242
15241
  const { apis, tables, plugins, hooks, addons } = await scanSources();
15243
15242
  this.context.addons = addons;
15244
15243
  await checkApi(apis);
@@ -15298,7 +15297,7 @@ class Befly {
15298
15297
  }
15299
15298
  });
15300
15299
  const finalStartupTime = calcPerfTime(serverStartTime);
15301
- const processRole = getProcessRole(runtimeEnv);
15300
+ const processRole = getProcessRole(env);
15302
15301
  const roleLabel = processRole.role === "primary" ? "\u4E3B\u8FDB\u7A0B" : `\u5DE5\u4F5C\u8FDB\u7A0B #${processRole.instanceId}`;
15303
15302
  const envLabel = processRole.env === "standalone" ? "" : ` [${processRole.env}]`;
15304
15303
  Logger.info(`${this.config.appName} \u542F\u52A8\u6210\u529F! (${roleLabel}${envLabel})`);