oasis_test 0.1.49 → 0.1.50

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 +22 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -56182,13 +56182,29 @@ async function startServe(opts) {
56182
56182
  });
56183
56183
  }
56184
56184
  });
56185
- if (info.code === 0) resolve4();
56185
+ const failed = info.code !== 0 || info.reason !== void 0 && info.reason !== "clean";
56186
+ if (!failed) resolve4();
56186
56187
  else {
56187
- const detail = info.errorMessage?.trim();
56188
- const generic = `runtime exited with code ${info.code ?? "null"}${info.reason ? ` (${info.reason})` : ""}`;
56189
- reject(new Error(detail ? `${generic}
56188
+ const genericLine = `runtime exited with code ${info.code ?? "null"}${info.reason ? ` (${info.reason})` : ""}`;
56189
+ let detail = info.errorMessage?.trim() ?? "";
56190
+ if (!detail && info.transcriptRef) {
56191
+ try {
56192
+ const stat3 = fs18.statSync(info.transcriptRef);
56193
+ const size = Math.min(stat3.size, 4e3);
56194
+ const buf = Buffer.alloc(size);
56195
+ const fd = fs18.openSync(info.transcriptRef, "r");
56196
+ try {
56197
+ fs18.readSync(fd, buf, 0, size, Math.max(0, stat3.size - size));
56198
+ } finally {
56199
+ fs18.closeSync(fd);
56200
+ }
56201
+ detail = buf.toString("utf8").trim();
56202
+ } catch {
56203
+ }
56204
+ }
56205
+ reject(new Error(detail ? `${genericLine}
56190
56206
 
56191
- ${detail}` : generic));
56207
+ ${detail}` : genericLine));
56192
56208
  }
56193
56209
  });
56194
56210
  });
@@ -58789,7 +58805,7 @@ ${res.warning}`);
58789
58805
  }
58790
58806
 
58791
58807
  // src/index.ts
58792
- var PKG_VERSION = true ? "0.1.49" : "dev";
58808
+ var PKG_VERSION = true ? "0.1.50" : "dev";
58793
58809
  var OASIS_DIR = path19.join(os11.homedir(), ".oasis");
58794
58810
  var CONFIG_FILE = path19.join(OASIS_DIR, "node-config.json");
58795
58811
  var PID_FILE = path19.join(OASIS_DIR, "node.pid");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oasis_test",
3
- "version": "0.1.49",
3
+ "version": "0.1.50",
4
4
  "description": "Oasis node daemon + CLI — background daemon, auto-start, full server CLI",
5
5
  "bin": {
6
6
  "oasis": "./dist/index.js"