@open-mercato/cli 0.6.3-develop.3525.3.cc18b8a43f → 0.6.3-develop.3574.1.f3c5dcf345

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.
@@ -809,6 +809,8 @@ async function writeEphemeralEnvironmentState(input2) {
809
809
  status: "running",
810
810
  baseUrl: input2.baseUrl,
811
811
  port: input2.port,
812
+ databaseUrl: input2.databaseUrl,
813
+ queueBaseDir: input2.queueBaseDir,
812
814
  source: input2.logPrefix,
813
815
  captureScreenshots: input2.captureScreenshots,
814
816
  startedAt: (/* @__PURE__ */ new Date()).toISOString()
@@ -849,6 +851,12 @@ async function readEphemeralEnvironmentState() {
849
851
  if (typeof record.port !== "number" || !Number.isFinite(record.port) || record.port < 1) {
850
852
  return null;
851
853
  }
854
+ if (typeof record.databaseUrl !== "string" || record.databaseUrl.length === 0) {
855
+ return null;
856
+ }
857
+ if (typeof record.queueBaseDir !== "string" || record.queueBaseDir.length === 0) {
858
+ return null;
859
+ }
852
860
  if (typeof record.source !== "string" || record.source.length === 0) {
853
861
  return null;
854
862
  }
@@ -862,6 +870,8 @@ async function readEphemeralEnvironmentState() {
862
870
  status: "running",
863
871
  baseUrl: record.baseUrl,
864
872
  port: record.port,
873
+ databaseUrl: record.databaseUrl,
874
+ queueBaseDir: record.queueBaseDir,
865
875
  source: record.source,
866
876
  captureScreenshots: record.captureScreenshots,
867
877
  startedAt: record.startedAt
@@ -1183,9 +1193,10 @@ async function acquireEphemeralRuntimeLock(logPrefix, options = {}) {
1183
1193
  }
1184
1194
  };
1185
1195
  }
1186
- function buildReusableEnvironment(baseUrl, captureScreenshots) {
1196
+ function buildReusableEnvironment(baseUrl, databaseUrl, queueBaseDir, captureScreenshots) {
1187
1197
  const enterpriseModulesFlag = process.env.OM_ENABLE_ENTERPRISE_MODULES ?? "false";
1188
1198
  return buildEnvironment({
1199
+ DATABASE_URL: databaseUrl,
1189
1200
  BASE_URL: baseUrl,
1190
1201
  APP_URL: baseUrl,
1191
1202
  NEXT_PUBLIC_APP_URL: baseUrl,
@@ -1208,6 +1219,7 @@ function buildReusableEnvironment(baseUrl, captureScreenshots) {
1208
1219
  TENANT_DATA_ENCRYPTION_FALLBACK_KEY: process.env.TENANT_DATA_ENCRYPTION_FALLBACK_KEY ?? "om-ephemeral-integration-fallback-key",
1209
1220
  OM_CLI_QUIET: "1",
1210
1221
  MERCATO_QUIET: "1",
1222
+ QUEUE_BASE_DIR: queueBaseDir,
1211
1223
  NODE_NO_WARNINGS: "1",
1212
1224
  PW_CAPTURE_SCREENSHOTS: captureScreenshots ? "1" : "0"
1213
1225
  });
@@ -1258,8 +1270,13 @@ async function tryReuseExistingEnvironment(options) {
1258
1270
  return {
1259
1271
  baseUrl: state.baseUrl,
1260
1272
  port: state.port,
1261
- databaseUrl: "",
1262
- commandEnvironment: buildReusableEnvironment(state.baseUrl, state.captureScreenshots),
1273
+ databaseUrl: state.databaseUrl,
1274
+ commandEnvironment: buildReusableEnvironment(
1275
+ state.baseUrl,
1276
+ state.databaseUrl,
1277
+ state.queueBaseDir,
1278
+ state.captureScreenshots
1279
+ ),
1263
1280
  ownedByCurrentProcess: false,
1264
1281
  stop: async () => {
1265
1282
  }
@@ -2423,6 +2440,8 @@ async function startEphemeralEnvironment(options) {
2423
2440
  await writeEphemeralEnvironmentState({
2424
2441
  baseUrl: applicationBaseUrl,
2425
2442
  port: applicationPort,
2443
+ databaseUrl,
2444
+ queueBaseDir: EPHEMERAL_QUEUE_BASE_DIR,
2426
2445
  logPrefix: options.logPrefix,
2427
2446
  captureScreenshots: options.captureScreenshots
2428
2447
  });