Fix StartOS 0.4 TypeScript packaging to match SDK API

This commit is contained in:
MacPro
2026-04-09 15:10:44 -05:00
parent d5046a0daf
commit 0b70cbb2bf
3436 changed files with 867051 additions and 92 deletions
+23
View File
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Oneshot = void 0;
const CommandController_1 = require("./CommandController");
const Daemon_1 = require("./Daemon");
/**
* This is a wrapper around CommandController that has a state of off, where the command shouldn't be running
* and the others state of running, where it will keep a living running command
* unlike Daemon, does not restart on success
*/
class Oneshot extends Daemon_1.Daemon {
static of() {
return (effects, subcontainer, exec) => {
let subc = subcontainer;
if (subcontainer && subcontainer.isOwned())
subc = subcontainer.rc();
const startCommand = () => CommandController_1.CommandController.of()(effects, (subc?.rc() ?? null), exec);
return new Oneshot(subcontainer, startCommand, true);
};
}
}
exports.Oneshot = Oneshot;
//# sourceMappingURL=Oneshot.js.map