@episoda/cli 0.2.199 → 0.2.200
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/dist/daemon/daemon-process.d.ts +16 -1
- package/dist/daemon/daemon-process.js +26 -5
- package/dist/daemon/daemon-process.js.map +1 -1
- package/dist/index.js +13737 -924
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Episoda Daemon Process
|
|
3
|
+
*
|
|
4
|
+
* Main entry point for the persistent daemon that:
|
|
5
|
+
* - Maintains WebSocket connections to multiple projects
|
|
6
|
+
* - Listens for IPC commands from CLI
|
|
7
|
+
* - Handles graceful shutdown
|
|
8
|
+
* - Survives terminal close
|
|
9
|
+
*
|
|
10
|
+
* This file is spawned by daemon-manager.ts in detached mode.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Main entry point
|
|
14
|
+
*/
|
|
15
|
+
declare function runDaemonProcess(): Promise<void>;
|
|
1
16
|
|
|
2
|
-
export {
|
|
17
|
+
export { runDaemonProcess };
|
|
@@ -9,6 +9,10 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
|
9
9
|
var __commonJS = (cb, mod) => function __require() {
|
|
10
10
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
11
|
};
|
|
12
|
+
var __export = (target, all) => {
|
|
13
|
+
for (var name in all)
|
|
14
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
15
|
+
};
|
|
12
16
|
var __copyProps = (to, from, except, desc) => {
|
|
13
17
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
18
|
for (let key of __getOwnPropNames(from))
|
|
@@ -25,6 +29,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
29
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
30
|
mod
|
|
27
31
|
));
|
|
32
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
33
|
|
|
29
34
|
// ../core/dist/command-protocol.js
|
|
30
35
|
var require_command_protocol = __commonJS({
|
|
@@ -3046,7 +3051,7 @@ var require_package = __commonJS({
|
|
|
3046
3051
|
"package.json"(exports2, module2) {
|
|
3047
3052
|
module2.exports = {
|
|
3048
3053
|
name: "@episoda/cli",
|
|
3049
|
-
version: "0.2.
|
|
3054
|
+
version: "0.2.200",
|
|
3050
3055
|
description: "CLI tool for Episoda local development workflow orchestration",
|
|
3051
3056
|
main: "dist/index.js",
|
|
3052
3057
|
types: "dist/index.d.ts",
|
|
@@ -3111,6 +3116,13 @@ var require_package = __commonJS({
|
|
|
3111
3116
|
}
|
|
3112
3117
|
});
|
|
3113
3118
|
|
|
3119
|
+
// src/daemon/daemon-process.ts
|
|
3120
|
+
var daemon_process_exports = {};
|
|
3121
|
+
__export(daemon_process_exports, {
|
|
3122
|
+
runDaemonProcess: () => runDaemonProcess
|
|
3123
|
+
});
|
|
3124
|
+
module.exports = __toCommonJS(daemon_process_exports);
|
|
3125
|
+
|
|
3114
3126
|
// src/daemon/machine-id.ts
|
|
3115
3127
|
var fs = __toESM(require("fs"));
|
|
3116
3128
|
var path = __toESM(require("path"));
|
|
@@ -15653,6 +15665,9 @@ var Daemon = class _Daemon {
|
|
|
15653
15665
|
*/
|
|
15654
15666
|
async start() {
|
|
15655
15667
|
console.log("[Daemon] Starting Episoda daemon...");
|
|
15668
|
+
if (process.env.EPISODA_DAEMON_SUPERVISED) {
|
|
15669
|
+
console.log("[Daemon] EP1477: Running in supervised foreground mode");
|
|
15670
|
+
}
|
|
15656
15671
|
this.machineId = await getMachineId();
|
|
15657
15672
|
console.log(`[Daemon] Machine ID: ${this.machineId}`);
|
|
15658
15673
|
const config = await (0, import_core22.loadConfig)();
|
|
@@ -17179,7 +17194,7 @@ process.on("uncaughtException", (error) => {
|
|
|
17179
17194
|
logCrashDiagnostics("Uncaught exception", error);
|
|
17180
17195
|
process.exit(1);
|
|
17181
17196
|
});
|
|
17182
|
-
async function
|
|
17197
|
+
async function runDaemonProcess() {
|
|
17183
17198
|
if (!process.env.EPISODA_DAEMON_MODE) {
|
|
17184
17199
|
console.error("This script should only be run by daemon-manager");
|
|
17185
17200
|
process.exit(1);
|
|
@@ -17189,8 +17204,14 @@ async function main() {
|
|
|
17189
17204
|
await new Promise(() => {
|
|
17190
17205
|
});
|
|
17191
17206
|
}
|
|
17192
|
-
|
|
17193
|
-
|
|
17194
|
-
|
|
17207
|
+
if (require.main === module) {
|
|
17208
|
+
runDaemonProcess().catch((error) => {
|
|
17209
|
+
console.error("[Daemon] Fatal error:", error);
|
|
17210
|
+
process.exit(1);
|
|
17211
|
+
});
|
|
17212
|
+
}
|
|
17213
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
17214
|
+
0 && (module.exports = {
|
|
17215
|
+
runDaemonProcess
|
|
17195
17216
|
});
|
|
17196
17217
|
//# sourceMappingURL=daemon-process.js.map
|