oasis_test 0.1.33 → 0.1.34

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 +4 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -57632,7 +57632,7 @@ ${res.warning}`);
57632
57632
  }
57633
57633
 
57634
57634
  // src/index.ts
57635
- var PKG_VERSION = true ? "0.1.33" : "dev";
57635
+ var PKG_VERSION = true ? "0.1.34" : "dev";
57636
57636
  var OASIS_DIR = path18.join(os10.homedir(), ".oasis");
57637
57637
  var CONFIG_FILE = path18.join(OASIS_DIR, "node-config.json");
57638
57638
  var PID_FILE = path18.join(OASIS_DIR, "node.pid");
@@ -57773,7 +57773,7 @@ function selfUpdate() {
57773
57773
  if (!cfg?.serverUrl) throw new Error("no config \u2014 run `oasis start` first");
57774
57774
  const nameArg = cfg.name ? ` --name '${cfg.name.replace(/'/g, "'\\''")}'` : "";
57775
57775
  const startCmd = `"$(npm prefix -g)/bin/oasis" start --server-ws '${cfg.serverUrl}'${nameArg}`;
57776
- const inner = `sleep 2; npm install -g --prefer-online '${PKG_NAME}@latest' && ${startCmd} >> '${LOG_FILE}' 2>&1`;
57776
+ const inner = `{ echo "[oasis] self-update \u2192 npm install -g ${PKG_NAME}@latest (then restart)"; sleep 2; npm install -g --prefer-online '${PKG_NAME}@latest' && ${startCmd}; } >> '${LOG_FILE}' 2>&1`;
57777
57777
  const hasSystemd = process.platform === "linux" && (() => {
57778
57778
  try {
57779
57779
  (0, import_node_child_process15.execSync)("command -v systemd-run", { stdio: "ignore" });
@@ -57782,14 +57782,14 @@ function selfUpdate() {
57782
57782
  return false;
57783
57783
  }
57784
57784
  })();
57785
+ const log3 = fs19.openSync(LOG_FILE, "a");
57785
57786
  if (hasSystemd) {
57786
57787
  const child = (0, import_node_child_process15.spawn)("systemd-run", ["--user", "--scope", "--quiet", "sh", "-c", inner], {
57787
57788
  detached: true,
57788
- stdio: "ignore"
57789
+ stdio: ["ignore", log3, log3]
57789
57790
  });
57790
57791
  child.unref();
57791
57792
  } else {
57792
- const log3 = fs19.openSync(LOG_FILE, "a");
57793
57793
  const child = (0, import_node_child_process15.spawn)("sh", ["-c", inner], { detached: true, stdio: ["ignore", log3, log3] });
57794
57794
  child.unref();
57795
57795
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oasis_test",
3
- "version": "0.1.33",
3
+ "version": "0.1.34",
4
4
  "description": "Oasis node daemon + CLI — background daemon, auto-start, full server CLI",
5
5
  "bin": {
6
6
  "oasis": "./dist/index.js"