opencode-supertask 0.1.3 → 0.1.4

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.
@@ -27252,26 +27252,28 @@ function findBunPath() {
27252
27252
  }
27253
27253
  function ensureGateway() {
27254
27254
  try {
27255
- const list2 = pm2JsonList();
27256
- const proc = list2.find((p) => p.name === PROCESS_NAME);
27255
+ const list = pm2JsonList();
27256
+ const proc = list.find((p) => p.name === PROCESS_NAME);
27257
27257
  if (proc && proc.pm2_env?.status === "online") {
27258
27258
  return;
27259
27259
  }
27260
27260
  } catch {
27261
27261
  }
27262
27262
  if (!isPm2Installed()) {
27263
+ console.log("[supertask] Installing pm2 for Gateway process management...");
27263
27264
  try {
27264
27265
  execSync("npm install -g pm2", { stdio: "pipe" });
27265
27266
  } catch {
27266
27267
  try {
27267
27268
  execSync("bun install -g pm2", { stdio: "pipe" });
27268
27269
  } catch {
27270
+ console.warn("[supertask] Could not install pm2. Gateway will not auto-start. Run `supertask install` manually.");
27269
27271
  return;
27270
27272
  }
27271
27273
  }
27272
27274
  }
27273
- const list = pm2JsonList();
27274
- const existing = list.find((p) => p.name === PROCESS_NAME);
27275
+ const pm2List = pm2JsonList();
27276
+ const existing = pm2List.find((p) => p.name === PROCESS_NAME);
27275
27277
  if (existing) {
27276
27278
  pm2Exec(["restart", PROCESS_NAME]);
27277
27279
  } else {