@voyantjs/workflows-orchestrator-node 0.107.4 → 0.107.6

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 (69) hide show
  1. package/dist/dashboard-chunks.d.ts +17 -0
  2. package/dist/dashboard-chunks.d.ts.map +1 -0
  3. package/dist/dashboard-chunks.js +19 -0
  4. package/dist/dashboard-http-server.d.ts +6 -0
  5. package/dist/dashboard-http-server.d.ts.map +1 -0
  6. package/dist/dashboard-http-server.js +99 -0
  7. package/dist/dashboard-metrics.d.ts +3 -0
  8. package/dist/dashboard-metrics.d.ts.map +1 -0
  9. package/dist/dashboard-metrics.js +26 -0
  10. package/dist/dashboard-request.d.ts +7 -0
  11. package/dist/dashboard-request.d.ts.map +1 -0
  12. package/dist/dashboard-request.js +436 -0
  13. package/dist/dashboard-server.d.ts +9 -171
  14. package/dist/dashboard-server.d.ts.map +1 -1
  15. package/dist/dashboard-server.js +7 -1229
  16. package/dist/dashboard-sse.d.ts +7 -0
  17. package/dist/dashboard-sse.d.ts.map +1 -0
  18. package/dist/dashboard-sse.js +134 -0
  19. package/dist/dashboard-static.d.ts +7 -0
  20. package/dist/dashboard-static.d.ts.map +1 -0
  21. package/dist/dashboard-static.js +89 -0
  22. package/dist/dashboard-types.d.ts +134 -0
  23. package/dist/dashboard-types.d.ts.map +1 -0
  24. package/dist/dashboard-types.js +1 -0
  25. package/dist/node-selfhost-defaults.d.ts +7 -0
  26. package/dist/node-selfhost-defaults.d.ts.map +1 -0
  27. package/dist/node-selfhost-defaults.js +8 -0
  28. package/dist/node-selfhost-deps.d.ts +4 -0
  29. package/dist/node-selfhost-deps.d.ts.map +1 -0
  30. package/dist/node-selfhost-deps.js +403 -0
  31. package/dist/node-selfhost-resume-input.d.ts +4 -0
  32. package/dist/node-selfhost-resume-input.d.ts.map +1 -0
  33. package/dist/node-selfhost-resume-input.js +20 -0
  34. package/dist/node-standalone-driver.d.ts.map +1 -1
  35. package/dist/node-standalone-driver.js +40 -3
  36. package/dist/node-step-runner.d.ts +3 -0
  37. package/dist/node-step-runner.d.ts.map +1 -0
  38. package/dist/node-step-runner.js +26 -0
  39. package/dist/postgres-manifest-store.d.ts.map +1 -1
  40. package/dist/postgres-manifest-store.js +6 -2
  41. package/dist/postgres-run-record-store.js +1 -1
  42. package/dist/postgres-schema.d.ts.map +1 -1
  43. package/dist/postgres-schema.js +2 -0
  44. package/dist/sleep-alarm-manager.d.ts.map +1 -1
  45. package/dist/sleep-alarm-manager.js +9 -1
  46. package/dist/store-stream.d.ts.map +1 -1
  47. package/dist/store-stream.js +9 -1
  48. package/dist/wakeup-poller.d.ts.map +1 -1
  49. package/dist/wakeup-poller.js +9 -1
  50. package/package.json +3 -3
  51. package/src/dashboard-chunks.ts +35 -0
  52. package/src/dashboard-http-server.ts +118 -0
  53. package/src/dashboard-metrics.ts +39 -0
  54. package/src/dashboard-request.ts +488 -0
  55. package/src/dashboard-server.ts +17 -1535
  56. package/src/dashboard-sse.ts +150 -0
  57. package/src/dashboard-static.ts +88 -0
  58. package/src/dashboard-types.ts +106 -0
  59. package/src/node-selfhost-defaults.ts +9 -0
  60. package/src/node-selfhost-deps.ts +495 -0
  61. package/src/node-selfhost-resume-input.ts +27 -0
  62. package/src/node-standalone-driver.ts +59 -3
  63. package/src/node-step-runner.ts +28 -0
  64. package/src/postgres-manifest-store.ts +2 -0
  65. package/src/postgres-run-record-store.ts +1 -1
  66. package/src/postgres-schema.ts +2 -0
  67. package/src/sleep-alarm-manager.ts +12 -1
  68. package/src/store-stream.ts +12 -1
  69. 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
- ;(timer as unknown as { unref?: () => void }).unref?.()
116
+ unrefTimer(timer)
106
117
  timers.set(stored.id, timer)
107
118
  }
108
119
 
@@ -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
- ;(handle as unknown as { unref?: () => void }).unref?.()
102
+ unrefTimer(handle)
92
103
 
93
104
  return {
94
105
  subscribe(listener) {
@@ -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
- ;(timer as unknown as { unref?: () => void }).unref?.()
130
+ unrefTimer(timer)
120
131
  },
121
132
  stop() {
122
133
  if (!timer) return