openmates 0.16.0-alpha.0 → 0.16.0-alpha.2

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.
@@ -25198,6 +25198,9 @@ function planRuntimeMonitoringServices(input) {
25198
25198
  ].join("\n")
25199
25199
  };
25200
25200
  }
25201
+ function shouldAutoInstallRuntimeMonitoringServices(env) {
25202
+ return env.OPENMATES_SKIP_RUNTIME_MONITORING !== "1";
25203
+ }
25201
25204
 
25202
25205
  // src/serverHealth.ts
25203
25206
  import dnsModule, { promises as dns } from "dns";
@@ -26880,7 +26883,7 @@ async function serverInstall(flags) {
26880
26883
  ...cliUrls2
26881
26884
  });
26882
26885
  try {
26883
- installRuntimeMonitoringServices(installPath, role);
26886
+ autoInstallRuntimeMonitoringServices(installPath, role);
26884
26887
  } catch (error) {
26885
26888
  throw new Error(`Server files were installed but runtime monitoring service installation failed: ${error instanceof Error ? error.message : String(error)}`);
26886
26889
  }
@@ -26964,7 +26967,7 @@ CLI default API: ${cliUrls2.apiUrl}`);
26964
26967
  ...cliUrls
26965
26968
  });
26966
26969
  try {
26967
- installRuntimeMonitoringServices(installPath, role);
26970
+ autoInstallRuntimeMonitoringServices(installPath, role);
26968
26971
  } catch (error) {
26969
26972
  throw new Error(`Server files were installed but runtime monitoring service installation failed: ${error instanceof Error ? error.message : String(error)}`);
26970
26973
  }
@@ -27111,6 +27114,14 @@ function installRuntimeMonitoringServices(installPath, role) {
27111
27114
  execSync(`systemctl enable --now ${timers.map(shellQuote).join(" ")}`, { stdio: "pipe" });
27112
27115
  for (const timer of timers) execFileSync3("systemctl", ["is-active", "--quiet", timer], { stdio: "pipe" });
27113
27116
  }
27117
+ function autoInstallRuntimeMonitoringServices(installPath, role) {
27118
+ if (!shouldAutoInstallRuntimeMonitoringServices(process.env)) {
27119
+ console.error("Skipping runtime monitoring service installation because OPENMATES_SKIP_RUNTIME_MONITORING=1.");
27120
+ return "skipped";
27121
+ }
27122
+ installRuntimeMonitoringServices(installPath, role);
27123
+ return "installed";
27124
+ }
27114
27125
  async function serverUpdate(rest, flags) {
27115
27126
  if (rest[0] === "status") {
27116
27127
  const installPath2 = resolveServerPath(flags);
@@ -27269,7 +27280,7 @@ async function serverUpdate(rest, flags) {
27269
27280
  const notificationDelivery = await dispatchRuntimeEvent(installPath, role, "post_update_failed", runtimeOutput.checks, (/* @__PURE__ */ new Date()).toISOString());
27270
27281
  let monitoringProvision = "installed";
27271
27282
  try {
27272
- installRuntimeMonitoringServices(installPath, role);
27283
+ monitoringProvision = autoInstallRuntimeMonitoringServices(installPath, role);
27273
27284
  } catch {
27274
27285
  monitoringProvision = "failed";
27275
27286
  }
@@ -27295,7 +27306,7 @@ async function serverUpdate(rest, flags) {
27295
27306
  saveServerConfig({ ...config, imageTag: target.tag, imageChannel: target.channel });
27296
27307
  }
27297
27308
  try {
27298
- installRuntimeMonitoringServices(installPath, role);
27309
+ autoInstallRuntimeMonitoringServices(installPath, role);
27299
27310
  } catch (error) {
27300
27311
  const restoreCommand = safetyPlan.backupName ? `openmates server restore --role ${role} --file ${join6(roleBackupDir(installPath, role), safetyPlan.backupName)}` : null;
27301
27312
  writeUpdateStatus(installPath, role, {
@@ -27397,7 +27408,7 @@ async function serverUpdate(rest, flags) {
27397
27408
  const notificationDelivery = await dispatchRuntimeEvent(installPath, role, "post_update_failed", runtimeOutput.checks, (/* @__PURE__ */ new Date()).toISOString());
27398
27409
  let monitoringProvision = "installed";
27399
27410
  try {
27400
- installRuntimeMonitoringServices(installPath, role);
27411
+ monitoringProvision = autoInstallRuntimeMonitoringServices(installPath, role);
27401
27412
  } catch {
27402
27413
  monitoringProvision = "failed";
27403
27414
  }
@@ -27419,7 +27430,7 @@ async function serverUpdate(rest, flags) {
27419
27430
  throw error;
27420
27431
  }
27421
27432
  try {
27422
- installRuntimeMonitoringServices(installPath, role);
27433
+ autoInstallRuntimeMonitoringServices(installPath, role);
27423
27434
  } catch (error) {
27424
27435
  writeUpdateStatus(installPath, role, { status: "degraded", step: "monitoring-service", restoreStatus: "restore_unavailable", restoreCommand: null });
27425
27436
  throw new Error(`Runtime checks passed but monitoring service installation failed: ${error instanceof Error ? error.message : String(error)}`);
package/dist/cli.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  requireExactConfirmation,
9
9
  resolveProjectContext,
10
10
  serializeToYaml
11
- } from "./chunk-SVL7BFYD.js";
11
+ } from "./chunk-QQA6E4KG.js";
12
12
  import "./chunk-IWKP55ZB.js";
13
13
  import "./chunk-MLWBMJEN.js";
14
14
  export {
package/dist/index.js CHANGED
@@ -39,7 +39,7 @@ import {
39
39
  renderPlanList,
40
40
  renderSupportInfo,
41
41
  serializeToYaml
42
- } from "./chunk-SVL7BFYD.js";
42
+ } from "./chunk-QQA6E4KG.js";
43
43
  import "./chunk-IWKP55ZB.js";
44
44
  import "./chunk-MLWBMJEN.js";
45
45
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmates",
3
- "version": "0.16.0-alpha.0",
3
+ "version": "0.16.0-alpha.2",
4
4
  "description": "OpenMates CLI and SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -113,7 +113,8 @@ services:
113
113
  test: ["CMD", "/usr/local/bin/openmates-directus-health"]
114
114
  interval: 10s
115
115
  timeout: 8s
116
- start_period: 60s
116
+ # cms-setup creates the indexes validated by this health script; cold CI runners can take several minutes.
117
+ start_period: 10m
117
118
  retries: 12
118
119
 
119
120
  cms-database: