@lob-ox/core-darwin-x64 0.0.22 → 0.0.23
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.
- package/core.cjs +21 -3
- package/package.json +1 -1
package/core.cjs
CHANGED
|
@@ -1630,7 +1630,7 @@ var require_version = __commonJS({
|
|
|
1630
1630
|
var fs2 = require("node:fs");
|
|
1631
1631
|
var path2 = require("node:path");
|
|
1632
1632
|
function guardVersion() {
|
|
1633
|
-
if (true) return String("0.0.
|
|
1633
|
+
if (true) return String("0.0.23");
|
|
1634
1634
|
try {
|
|
1635
1635
|
return JSON.parse(fs2.readFileSync(path2.join(__dirname, "..", "..", "package.json"), "utf8")).version || "unknown";
|
|
1636
1636
|
} catch {
|
|
@@ -23516,8 +23516,8 @@ var require_lifecycle3 = __commonJS({
|
|
|
23516
23516
|
pmClient.register({
|
|
23517
23517
|
id: "sandbox:" + inst.id,
|
|
23518
23518
|
spawn_cmd: cmdArr,
|
|
23519
|
-
priority:
|
|
23520
|
-
//
|
|
23519
|
+
priority: "sandbox",
|
|
23520
|
+
// 壳只认字符串枚举名(core/router/lan/sandbox),数字一律按 Plugin
|
|
23521
23521
|
env
|
|
23522
23522
|
});
|
|
23523
23523
|
pmClient.setDesired("sandbox:" + inst.id, "running");
|
|
@@ -23689,6 +23689,8 @@ var require_lifecycle3 = __commonJS({
|
|
|
23689
23689
|
if (!st.running) {
|
|
23690
23690
|
runtime.delete(inst.id);
|
|
23691
23691
|
state.usage = null;
|
|
23692
|
+
const startupFailure = typeof state.startAt === "number" && state.startAt > 0 && Date.now() - state.startAt < stateMachine.STARTUP_WINDOW_MS;
|
|
23693
|
+
pmClient.recordExit("sandbox:" + inst.id, null, null, startupFailure === true);
|
|
23692
23694
|
stateMachine.setStopped(stateDeps(), inst);
|
|
23693
23695
|
} else if (inst.kind === "sandbox") {
|
|
23694
23696
|
if (tokens) tokens.ensureCaptured(inst.id);
|
|
@@ -27322,6 +27324,22 @@ var require_domains = __commonJS({
|
|
|
27322
27324
|
host.logger && host.logger.warn && host.logger.warn("eventHub.sync: " + (e && e.message || e));
|
|
27323
27325
|
}
|
|
27324
27326
|
});
|
|
27327
|
+
host._beatScheduler.afterTick("sandbox-supervise", () => {
|
|
27328
|
+
try {
|
|
27329
|
+
const mgr = host.instances;
|
|
27330
|
+
if (!mgr || typeof mgr.all !== "function") return;
|
|
27331
|
+
for (const inst of mgr.all()) {
|
|
27332
|
+
if (!inst || inst.kind === "native") continue;
|
|
27333
|
+
try {
|
|
27334
|
+
mgr.supervise(inst.id);
|
|
27335
|
+
} catch (e) {
|
|
27336
|
+
host.logger && host.logger.warn && host.logger.warn("supervise " + inst.id + ": " + (e && e.message || e));
|
|
27337
|
+
}
|
|
27338
|
+
}
|
|
27339
|
+
} catch (e) {
|
|
27340
|
+
host.logger && host.logger.warn && host.logger.warn("sandbox-supervise: " + (e && e.message || e));
|
|
27341
|
+
}
|
|
27342
|
+
});
|
|
27325
27343
|
}
|
|
27326
27344
|
}
|
|
27327
27345
|
host._lan = null;
|