@voyantjs/workflows-orchestrator-node 0.107.5 → 0.107.7
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/dashboard-chunks.d.ts +17 -0
- package/dist/dashboard-chunks.d.ts.map +1 -0
- package/dist/dashboard-chunks.js +19 -0
- package/dist/dashboard-http-server.d.ts +6 -0
- package/dist/dashboard-http-server.d.ts.map +1 -0
- package/dist/dashboard-http-server.js +99 -0
- package/dist/dashboard-metrics.d.ts +3 -0
- package/dist/dashboard-metrics.d.ts.map +1 -0
- package/dist/dashboard-metrics.js +26 -0
- package/dist/dashboard-request.d.ts +7 -0
- package/dist/dashboard-request.d.ts.map +1 -0
- package/dist/dashboard-request.js +436 -0
- package/dist/dashboard-server.d.ts +9 -171
- package/dist/dashboard-server.d.ts.map +1 -1
- package/dist/dashboard-server.js +7 -1229
- package/dist/dashboard-sse.d.ts +7 -0
- package/dist/dashboard-sse.d.ts.map +1 -0
- package/dist/dashboard-sse.js +134 -0
- package/dist/dashboard-static.d.ts +7 -0
- package/dist/dashboard-static.d.ts.map +1 -0
- package/dist/dashboard-static.js +89 -0
- package/dist/dashboard-types.d.ts +134 -0
- package/dist/dashboard-types.d.ts.map +1 -0
- package/dist/dashboard-types.js +1 -0
- package/dist/node-selfhost-defaults.d.ts +7 -0
- package/dist/node-selfhost-defaults.d.ts.map +1 -0
- package/dist/node-selfhost-defaults.js +8 -0
- package/dist/node-selfhost-deps.d.ts +4 -0
- package/dist/node-selfhost-deps.d.ts.map +1 -0
- package/dist/node-selfhost-deps.js +403 -0
- package/dist/node-selfhost-resume-input.d.ts +4 -0
- package/dist/node-selfhost-resume-input.d.ts.map +1 -0
- package/dist/node-selfhost-resume-input.js +20 -0
- package/dist/node-standalone-driver.d.ts.map +1 -1
- package/dist/node-standalone-driver.js +40 -3
- package/dist/node-step-runner.d.ts +3 -0
- package/dist/node-step-runner.d.ts.map +1 -0
- package/dist/node-step-runner.js +26 -0
- package/dist/postgres-manifest-store.d.ts.map +1 -1
- package/dist/postgres-manifest-store.js +6 -2
- package/dist/postgres-run-record-store.js +1 -1
- package/dist/postgres-schema.d.ts.map +1 -1
- package/dist/postgres-schema.js +2 -0
- package/dist/sleep-alarm-manager.d.ts.map +1 -1
- package/dist/sleep-alarm-manager.js +9 -1
- package/dist/store-stream.d.ts.map +1 -1
- package/dist/store-stream.js +9 -1
- package/dist/wakeup-poller.d.ts.map +1 -1
- package/dist/wakeup-poller.js +9 -1
- package/package.json +3 -3
- package/src/dashboard-chunks.ts +35 -0
- package/src/dashboard-http-server.ts +118 -0
- package/src/dashboard-metrics.ts +39 -0
- package/src/dashboard-request.ts +488 -0
- package/src/dashboard-server.ts +17 -1535
- package/src/dashboard-sse.ts +150 -0
- package/src/dashboard-static.ts +88 -0
- package/src/dashboard-types.ts +106 -0
- package/src/node-selfhost-defaults.ts +9 -0
- package/src/node-selfhost-deps.ts +495 -0
- package/src/node-selfhost-resume-input.ts +27 -0
- package/src/node-standalone-driver.ts +59 -3
- package/src/node-step-runner.ts +28 -0
- package/src/postgres-manifest-store.ts +2 -0
- package/src/postgres-run-record-store.ts +1 -1
- package/src/postgres-schema.ts +2 -0
- package/src/sleep-alarm-manager.ts +12 -1
- package/src/store-stream.ts +12 -1
- package/src/wakeup-poller.ts +12 -1
|
@@ -34,6 +34,17 @@ export interface SleepAlarmManager<TStored extends SleepAlarmStoredRun> {
|
|
|
34
34
|
stop: () => void
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
function unrefTimer(timer: unknown): void {
|
|
38
|
+
if (
|
|
39
|
+
typeof timer === "object" &&
|
|
40
|
+
timer !== null &&
|
|
41
|
+
"unref" in timer &&
|
|
42
|
+
typeof timer.unref === "function"
|
|
43
|
+
) {
|
|
44
|
+
timer.unref()
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
37
48
|
export function createSleepAlarmManager<TStored extends SleepAlarmStoredRun>(
|
|
38
49
|
deps: SleepAlarmManagerDeps<TStored>,
|
|
39
50
|
): SleepAlarmManager<TStored> {
|
|
@@ -102,7 +113,7 @@ export function createSleepAlarmManager<TStored extends SleepAlarmStoredRun>(
|
|
|
102
113
|
})
|
|
103
114
|
})
|
|
104
115
|
}, delay)
|
|
105
|
-
|
|
116
|
+
unrefTimer(timer)
|
|
106
117
|
timers.set(stored.id, timer)
|
|
107
118
|
}
|
|
108
119
|
|
package/src/store-stream.ts
CHANGED
|
@@ -21,6 +21,17 @@ export interface StoreStreamOptions {
|
|
|
21
21
|
clearInterval?: typeof clearInterval
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
function unrefTimer(timer: unknown): void {
|
|
25
|
+
if (
|
|
26
|
+
typeof timer === "object" &&
|
|
27
|
+
timer !== null &&
|
|
28
|
+
"unref" in timer &&
|
|
29
|
+
typeof timer.unref === "function"
|
|
30
|
+
) {
|
|
31
|
+
timer.unref()
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
24
35
|
export function diffSnapshots(
|
|
25
36
|
prev: readonly StoredRun[],
|
|
26
37
|
next: readonly StoredRun[],
|
|
@@ -88,7 +99,7 @@ export function createStoreStream(
|
|
|
88
99
|
const handle = setIntervalImpl(() => {
|
|
89
100
|
void pollOnce()
|
|
90
101
|
}, intervalMs)
|
|
91
|
-
|
|
102
|
+
unrefTimer(handle)
|
|
92
103
|
|
|
93
104
|
return {
|
|
94
105
|
subscribe(listener) {
|
package/src/wakeup-poller.ts
CHANGED
|
@@ -39,6 +39,17 @@ export interface WakeupPoller<TStored extends WakeupPollerStoredRun> {
|
|
|
39
39
|
syncStoredRun: (stored: TStored) => Promise<void>
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
function unrefTimer(timer: unknown): void {
|
|
43
|
+
if (
|
|
44
|
+
typeof timer === "object" &&
|
|
45
|
+
timer !== null &&
|
|
46
|
+
"unref" in timer &&
|
|
47
|
+
typeof timer.unref === "function"
|
|
48
|
+
) {
|
|
49
|
+
timer.unref()
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
42
53
|
export function createWakeupPoller<TStored extends WakeupPollerStoredRun>(
|
|
43
54
|
deps: WakeupPollerDeps<TStored>,
|
|
44
55
|
): WakeupPoller<TStored> {
|
|
@@ -116,7 +127,7 @@ export function createWakeupPoller<TStored extends WakeupPollerStoredRun>(
|
|
|
116
127
|
timer = setIntervalImpl(() => {
|
|
117
128
|
void poll().catch(() => {})
|
|
118
129
|
}, intervalMs)
|
|
119
|
-
|
|
130
|
+
unrefTimer(timer)
|
|
120
131
|
},
|
|
121
132
|
stop() {
|
|
122
133
|
if (!timer) return
|