nvent 0.5.15 → 1.0.0-alpha.1

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 (148) hide show
  1. package/dist/module.d.mts +181 -8
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +1259 -1196
  4. package/dist/runtime/app/composables/useFunctionCall.d.ts +17 -0
  5. package/dist/runtime/app/composables/useFunctionCall.js +25 -0
  6. package/dist/runtime/app/composables/useNventStream.d.ts +23 -0
  7. package/dist/runtime/app/composables/useNventStream.js +58 -0
  8. package/dist/runtime/nitro/plugins/00.iii-lifecycle.d.ts +19 -0
  9. package/dist/runtime/nitro/plugins/00.iii-lifecycle.js +62 -0
  10. package/dist/runtime/nitro/plugins/01.iii-worker.d.ts +15 -0
  11. package/dist/runtime/nitro/plugins/01.iii-worker.js +90 -0
  12. package/dist/runtime/nitro/routes/stream-proxy.d.ts +17 -0
  13. package/dist/runtime/nitro/routes/stream-proxy.js +45 -0
  14. package/dist/runtime/nitro/utils/console.d.ts +32 -0
  15. package/dist/runtime/nitro/utils/console.js +95 -0
  16. package/dist/runtime/nitro/utils/defineFunction.d.ts +378 -3
  17. package/dist/runtime/nitro/utils/defineFunction.js +224 -4
  18. package/dist/runtime/nitro/utils/engine.d.ts +25 -0
  19. package/dist/runtime/nitro/utils/engine.js +130 -0
  20. package/dist/runtime/nitro/utils/nventDir.d.ts +1 -0
  21. package/dist/runtime/nitro/utils/nventDir.js +20 -0
  22. package/dist/runtime/nitro/utils/useIii.d.ts +23 -0
  23. package/dist/runtime/nitro/utils/useIii.js +14 -0
  24. package/dist/runtime/nitro/utils/workers/node.d.ts +24 -0
  25. package/dist/runtime/nitro/utils/workers/node.js +57 -0
  26. package/dist/runtime/nitro/utils/workers/python.d.ts +67 -0
  27. package/dist/runtime/nitro/utils/workers/python.js +220 -0
  28. package/dist/runtime/python/nvent.py +208 -0
  29. package/dist/runtime/python/worker_runtime.py +659 -0
  30. package/dist/types.d.mts +5 -1
  31. package/package.json +11 -14
  32. package/dist/runtime/adapters/base/index.d.ts +0 -6
  33. package/dist/runtime/adapters/base/index.js +0 -1
  34. package/dist/runtime/adapters/base/store-validator.d.ts +0 -48
  35. package/dist/runtime/adapters/base/store-validator.js +0 -147
  36. package/dist/runtime/adapters/builtin/file-queue.d.ts +0 -67
  37. package/dist/runtime/adapters/builtin/file-queue.js +0 -499
  38. package/dist/runtime/adapters/builtin/file-store.d.ts +0 -32
  39. package/dist/runtime/adapters/builtin/file-store.js +0 -206
  40. package/dist/runtime/adapters/builtin/file-stream.d.ts +0 -39
  41. package/dist/runtime/adapters/builtin/file-stream.js +0 -56
  42. package/dist/runtime/adapters/builtin/index.d.ts +0 -10
  43. package/dist/runtime/adapters/builtin/index.js +0 -5
  44. package/dist/runtime/adapters/builtin/memory-queue.d.ts +0 -52
  45. package/dist/runtime/adapters/builtin/memory-queue.js +0 -243
  46. package/dist/runtime/adapters/builtin/memory-store.d.ts +0 -69
  47. package/dist/runtime/adapters/builtin/memory-store.js +0 -357
  48. package/dist/runtime/adapters/builtin/memory-stream.d.ts +0 -21
  49. package/dist/runtime/adapters/builtin/memory-stream.js +0 -56
  50. package/dist/runtime/adapters/factory.d.ts +0 -31
  51. package/dist/runtime/adapters/factory.js +0 -135
  52. package/dist/runtime/adapters/index.d.ts +0 -8
  53. package/dist/runtime/adapters/index.js +0 -3
  54. package/dist/runtime/adapters/interfaces/index.d.ts +0 -11
  55. package/dist/runtime/adapters/interfaces/index.js +0 -3
  56. package/dist/runtime/adapters/interfaces/queue.d.ts +0 -155
  57. package/dist/runtime/adapters/interfaces/queue.js +0 -0
  58. package/dist/runtime/adapters/interfaces/store.d.ts +0 -299
  59. package/dist/runtime/adapters/interfaces/store.js +0 -0
  60. package/dist/runtime/adapters/interfaces/stream.d.ts +0 -62
  61. package/dist/runtime/adapters/interfaces/stream.js +0 -0
  62. package/dist/runtime/adapters/registry.d.ts +0 -85
  63. package/dist/runtime/adapters/registry.js +0 -161
  64. package/dist/runtime/config/index.d.ts +0 -23
  65. package/dist/runtime/config/index.js +0 -200
  66. package/dist/runtime/config/types.d.ts +0 -439
  67. package/dist/runtime/config/types.js +0 -0
  68. package/dist/runtime/events/eventBus.d.ts +0 -20
  69. package/dist/runtime/events/eventBus.js +0 -35
  70. package/dist/runtime/events/types.d.ts +0 -144
  71. package/dist/runtime/events/types.js +0 -0
  72. package/dist/runtime/events/utils/scheduleTrigger.d.ts +0 -8
  73. package/dist/runtime/events/utils/scheduleTrigger.js +0 -71
  74. package/dist/runtime/events/utils/stallDetector.d.ts +0 -83
  75. package/dist/runtime/events/utils/stallDetector.js +0 -318
  76. package/dist/runtime/events/utils/triggerRuntime.d.ts +0 -58
  77. package/dist/runtime/events/utils/triggerRuntime.js +0 -212
  78. package/dist/runtime/events/wiring/flowWiring.d.ts +0 -34
  79. package/dist/runtime/events/wiring/flowWiring.js +0 -1258
  80. package/dist/runtime/events/wiring/registry.d.ts +0 -19
  81. package/dist/runtime/events/wiring/registry.js +0 -43
  82. package/dist/runtime/events/wiring/stateWiring.d.ts +0 -37
  83. package/dist/runtime/events/wiring/stateWiring.js +0 -92
  84. package/dist/runtime/events/wiring/streamWiring.d.ts +0 -36
  85. package/dist/runtime/events/wiring/streamWiring.js +0 -156
  86. package/dist/runtime/events/wiring/triggerWiring.d.ts +0 -21
  87. package/dist/runtime/events/wiring/triggerWiring.js +0 -422
  88. package/dist/runtime/nitro/plugins/00.adapters.d.ts +0 -14
  89. package/dist/runtime/nitro/plugins/00.adapters.js +0 -73
  90. package/dist/runtime/nitro/plugins/01.ws-lifecycle.d.ts +0 -5
  91. package/dist/runtime/nitro/plugins/01.ws-lifecycle.js +0 -69
  92. package/dist/runtime/nitro/plugins/02.workers.d.ts +0 -2
  93. package/dist/runtime/nitro/plugins/02.workers.js +0 -92
  94. package/dist/runtime/nitro/plugins/03.triggers.d.ts +0 -12
  95. package/dist/runtime/nitro/plugins/03.triggers.js +0 -55
  96. package/dist/runtime/nitro/routes/webhook.await.d.ts +0 -23
  97. package/dist/runtime/nitro/routes/webhook.await.js +0 -112
  98. package/dist/runtime/nitro/routes/webhook.trigger.d.ts +0 -86
  99. package/dist/runtime/nitro/routes/webhook.trigger.js +0 -73
  100. package/dist/runtime/nitro/utils/adapters.d.ts +0 -66
  101. package/dist/runtime/nitro/utils/adapters.js +0 -51
  102. package/dist/runtime/nitro/utils/awaitPatterns/event.d.ts +0 -15
  103. package/dist/runtime/nitro/utils/awaitPatterns/event.js +0 -128
  104. package/dist/runtime/nitro/utils/awaitPatterns/index.d.ts +0 -28
  105. package/dist/runtime/nitro/utils/awaitPatterns/index.js +0 -55
  106. package/dist/runtime/nitro/utils/awaitPatterns/schedule.d.ts +0 -16
  107. package/dist/runtime/nitro/utils/awaitPatterns/schedule.js +0 -83
  108. package/dist/runtime/nitro/utils/awaitPatterns/time.d.ts +0 -15
  109. package/dist/runtime/nitro/utils/awaitPatterns/time.js +0 -71
  110. package/dist/runtime/nitro/utils/awaitPatterns/webhook.d.ts +0 -15
  111. package/dist/runtime/nitro/utils/awaitPatterns/webhook.js +0 -128
  112. package/dist/runtime/nitro/utils/defineFunctionConfig.d.ts +0 -378
  113. package/dist/runtime/nitro/utils/defineFunctionConfig.js +0 -3
  114. package/dist/runtime/nitro/utils/defineHooks.d.ts +0 -95
  115. package/dist/runtime/nitro/utils/defineHooks.js +0 -9
  116. package/dist/runtime/nitro/utils/registerAdapter.d.ts +0 -59
  117. package/dist/runtime/nitro/utils/registerAdapter.js +0 -13
  118. package/dist/runtime/nitro/utils/useAwait.d.ts +0 -83
  119. package/dist/runtime/nitro/utils/useAwait.js +0 -169
  120. package/dist/runtime/nitro/utils/useEventManager.d.ts +0 -15
  121. package/dist/runtime/nitro/utils/useEventManager.js +0 -26
  122. package/dist/runtime/nitro/utils/useFlow.d.ts +0 -66
  123. package/dist/runtime/nitro/utils/useFlow.js +0 -310
  124. package/dist/runtime/nitro/utils/useHookRegistry.d.ts +0 -40
  125. package/dist/runtime/nitro/utils/useHookRegistry.js +0 -25
  126. package/dist/runtime/nitro/utils/useNventLogger.d.ts +0 -42
  127. package/dist/runtime/nitro/utils/useNventLogger.js +0 -54
  128. package/dist/runtime/nitro/utils/useRunContext.d.ts +0 -6
  129. package/dist/runtime/nitro/utils/useRunContext.js +0 -102
  130. package/dist/runtime/nitro/utils/useStreamTopics.d.ts +0 -83
  131. package/dist/runtime/nitro/utils/useStreamTopics.js +0 -94
  132. package/dist/runtime/nitro/utils/useTrigger.d.ts +0 -150
  133. package/dist/runtime/nitro/utils/useTrigger.js +0 -311
  134. package/dist/runtime/nitro/utils/wsPeerManager.d.ts +0 -44
  135. package/dist/runtime/nitro/utils/wsPeerManager.js +0 -32
  136. package/dist/runtime/scheduler/index.d.ts +0 -33
  137. package/dist/runtime/scheduler/index.js +0 -42
  138. package/dist/runtime/scheduler/scheduler.d.ts +0 -132
  139. package/dist/runtime/scheduler/scheduler.js +0 -799
  140. package/dist/runtime/scheduler/types.d.ts +0 -122
  141. package/dist/runtime/scheduler/types.js +0 -0
  142. package/dist/runtime/worker/node/runner.d.ts +0 -95
  143. package/dist/runtime/worker/node/runner.js +0 -272
  144. package/dist/runtime/worker/python/get_config.py +0 -64
  145. package/dist/runtime/worker/system/awaitHandlers.d.ts +0 -27
  146. package/dist/runtime/worker/system/awaitHandlers.js +0 -230
  147. package/dist/runtime/worker/system/index.d.ts +0 -24
  148. package/dist/runtime/worker/system/index.js +0 -39
package/dist/module.d.mts CHANGED
@@ -1,12 +1,185 @@
1
- import * as _nuxt_schema from '@nuxt/schema';
2
- import { ModuleConfig, ModuleOptions } from '../dist/runtime/config/types.js';
3
- export { ModuleOptions } from '../dist/runtime/config/types.js';
1
+ import * as nuxt_schema from 'nuxt/schema';
4
2
 
5
- declare module '@nuxt/schema' {
6
- interface RuntimeConfig {
7
- nvent: ModuleConfig;
8
- }
3
+ /**
4
+ * nvent module options
5
+ *
6
+ * Public API types for the nvent Nuxt module. Kept in a separate file so that
7
+ * `iii/config.ts` can import them without creating a circular dependency with
8
+ * `module.ts`.
9
+ */
10
+ interface NventIiiOptions {
11
+ iii?: {
12
+ /** Version of the iii engine to install. Default: 'latest' */
13
+ version?: string;
14
+ /** 'local' uses a local binary, 'docker' uses Docker, 'remote' skips lifecycle management */
15
+ mode?: 'local' | 'docker' | 'remote';
16
+ /** WebSocket URL for workers to connect to (default: ws://localhost:49134) */
17
+ wsUrl?: string;
18
+ /** HTTP port for iii REST API (default: 3111) */
19
+ httpPort?: number;
20
+ /** HTTP host for iii REST API (default: 'localhost') */
21
+ httpHost?: string;
22
+ /** WebSocket port for workers (default: 49134) */
23
+ wsPort?: number;
24
+ /** WebSocket port for the Stream module (default: 3112) */
25
+ streamPort?: number;
26
+ /** Whether nvent manages engine lifecycle. Default: true in dev, false in prod */
27
+ managed?: boolean;
28
+ modules?: {
29
+ state?: boolean;
30
+ queue?: boolean;
31
+ cron?: boolean;
32
+ observability?: boolean;
33
+ stream?: boolean;
34
+ };
35
+ /** State module adapter configuration */
36
+ state?: {
37
+ adapter?: {
38
+ type: 'kv';
39
+ storeMethod?: 'file_based' | 'in_memory';
40
+ filePath?: string;
41
+ } | {
42
+ type: 'redis';
43
+ redisUrl?: string;
44
+ };
45
+ };
46
+ /**
47
+ * Queue module configuration.
48
+ * Named queues must be declared here for the iii engine to route messages through them.
49
+ */
50
+ queue?: {
51
+ adapter?: {
52
+ type: 'builtin';
53
+ storeMethod?: 'file_based' | 'in_memory';
54
+ filePath?: string;
55
+ } | {
56
+ type: 'redis';
57
+ redisUrl?: string;
58
+ } | {
59
+ type: 'rabbitmq';
60
+ amqpUrl?: string;
61
+ };
62
+ queueConfigs?: Record<string, {
63
+ type?: 'standard' | 'fifo';
64
+ concurrency?: number;
65
+ maxRetries?: number;
66
+ backoffMs?: number;
67
+ /** FIFO only: field in the payload used to group messages */
68
+ messageGroupField?: string;
69
+ }>;
70
+ };
71
+ /** Cron module adapter configuration */
72
+ cron?: {
73
+ adapter?: {
74
+ type: 'kv';
75
+ } | {
76
+ type: 'redis';
77
+ redisUrl?: string;
78
+ };
79
+ };
80
+ /** WebSocket Stream module configuration */
81
+ stream?: {
82
+ host?: string;
83
+ authFunction?: string | null;
84
+ adapter?: {
85
+ type: 'kv';
86
+ storeMethod?: 'file_based' | 'in_memory';
87
+ filePath?: string;
88
+ } | {
89
+ type: 'redis';
90
+ redisUrl?: string;
91
+ };
92
+ };
93
+ /** REST API module extra settings */
94
+ restApi?: {
95
+ host?: string;
96
+ defaultTimeout?: number;
97
+ concurrencyRequestLimit?: number;
98
+ };
99
+ /** OtelModule (observability) configuration */
100
+ observability?: {
101
+ enabled?: boolean;
102
+ serviceName?: string;
103
+ serviceVersion?: string;
104
+ serviceNamespace?: string;
105
+ /**
106
+ * Trace export destination.
107
+ * 'memory' = queryable via iii API / console (default).
108
+ * 'otlp' = external collector (set endpoint too).
109
+ * 'both' = memory + otlp.
110
+ */
111
+ exporter?: 'memory' | 'otlp' | 'both';
112
+ endpoint?: string;
113
+ samplingRatio?: number;
114
+ memoryMaxSpans?: number;
115
+ metricsEnabled?: boolean;
116
+ metricsExporter?: 'memory' | 'otlp';
117
+ metricsRetentionSeconds?: number;
118
+ metricsMaxCount?: number;
119
+ logsEnabled?: boolean;
120
+ logsExporter?: 'memory' | 'otlp' | 'both';
121
+ logsMaxCount?: number;
122
+ logsRetentionSeconds?: number;
123
+ logsBatchSize?: number;
124
+ logsFlushIntervalMs?: number;
125
+ logsSamplingRatio?: number;
126
+ logsConsoleOutput?: boolean;
127
+ level?: 'trace' | 'debug' | 'info' | 'warn' | 'error';
128
+ format?: 'default' | 'json';
129
+ };
130
+ /**
131
+ * Minimum log level for iii engine output.
132
+ * 'none' silences all output, 'error' shows only errors, 'warn' shows warnings + errors,
133
+ * 'info' shows everything. Default: 'warn'
134
+ */
135
+ logLevel?: 'none' | 'error' | 'warn' | 'info';
136
+ /**
137
+ * Enable the iii-console web UI (separate binary, http://localhost:3113).
138
+ * Pass `true` for defaults or an object to customise.
139
+ */
140
+ console?: boolean | {
141
+ /** Version to install. Default: same as iii engine version */
142
+ version?: string;
143
+ /** Port for the console web UI. Default: 3113 */
144
+ port?: number;
145
+ /** Host for the console web UI. Default: 'localhost' */
146
+ host?: string;
147
+ /** Enable the Flow visualization page */
148
+ flow?: boolean;
149
+ };
150
+ };
151
+ functions?: {
152
+ /** Directory under server/ where functions are, relative to serverDir (default: 'functions') */
153
+ dir?: string;
154
+ python?: {
155
+ /**
156
+ * Path to the Python executable used **in development only** (e.g. a virtualenv).
157
+ * Has no effect in production — set `NVENT_PYTHON_BIN` env var instead.
158
+ * Default: 'python3'
159
+ * Example: '.venv/bin/python3'
160
+ */
161
+ devPath?: string;
162
+ /**
163
+ * Skip Python worker support entirely (no Python scanning, no workers started).
164
+ * Useful when the project has no Python functions. Default: false
165
+ */
166
+ skip?: boolean;
167
+ };
168
+ };
169
+ app?: {
170
+ /** Enable the nvent app UI and its built-in route. Default: true */
171
+ enabled?: boolean;
172
+ /** Route path for the nvent app. Default: '/_nvent' */
173
+ routePath?: string;
174
+ /**
175
+ * Layout to use for the nvent app route.
176
+ * Set to false for no layout, or a string to use a named layout.
177
+ * Default: false
178
+ */
179
+ layout?: string | false;
180
+ };
9
181
  }
10
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, {}, true>;
182
+
183
+ declare const _default: nuxt_schema.NuxtModule<NventIiiOptions, NventIiiOptions, false>;
11
184
 
12
185
  export { _default as default };
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nvent",
3
- "version": "0.5.15",
3
+ "version": "1.0.0-alpha.1",
4
4
  "configKey": "nvent",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",