oasis_test 0.1.20 → 0.1.22

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
@@ -50988,7 +50988,7 @@ async function runCli(argv, println = console.log) {
50988
50988
  }
50989
50989
 
50990
50990
  // src/index.ts
50991
- var PKG_VERSION = true ? "0.1.20" : "dev";
50991
+ var PKG_VERSION = true ? "0.1.22" : "dev";
50992
50992
  var OASIS_DIR = path13.join(os8.homedir(), ".oasis");
50993
50993
  var CONFIG_FILE = path13.join(OASIS_DIR, "node-config.json");
50994
50994
  var PID_FILE = path13.join(OASIS_DIR, "node.pid");
@@ -51127,9 +51127,9 @@ function stopDaemon() {
51127
51127
  function selfUpdate() {
51128
51128
  const cfg = readConfig();
51129
51129
  if (!cfg?.serverUrl) throw new Error("no config \u2014 run `oasis start` first");
51130
- const startArgs = ["-y", `${PKG_NAME}@latest`, "start", "--server-ws", cfg.serverUrl, ...cfg.name ? ["--name", cfg.name] : []];
51131
- const quoted = startArgs.map((a) => `'${a.replace(/'/g, "'\\''")}'`).join(" ");
51132
- const inner = `sleep 2; npx ${quoted} >> '${LOG_FILE}' 2>&1`;
51130
+ const nameArg = cfg.name ? ` --name '${cfg.name.replace(/'/g, "'\\''")}'` : "";
51131
+ const startCmd = `"$(npm prefix -g)/bin/${PKG_NAME}" start --server-ws '${cfg.serverUrl}'${nameArg}`;
51132
+ const inner = `sleep 2; npm install -g '${PKG_NAME}@latest' && ${startCmd} >> '${LOG_FILE}' 2>&1`;
51133
51133
  const hasSystemd = process.platform === "linux" && (() => {
51134
51134
  try {
51135
51135
  (0, import_node_child_process12.execSync)("command -v systemd-run", { stdio: "ignore" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oasis_test",
3
- "version": "0.1.20",
3
+ "version": "0.1.22",
4
4
  "description": "Oasis node daemon + CLI — background daemon, auto-start, full server CLI",
5
5
  "bin": {
6
6
  "oasis": "./dist/index.js"