nvent 0.5.15 → 1.0.0-alpha.10
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/module.d.mts +439 -5
- package/dist/module.json +1 -1
- package/dist/module.mjs +1551 -1191
- package/dist/runtime/app/composables/useFunctionCall.d.ts +17 -0
- package/dist/runtime/app/composables/useFunctionCall.js +25 -0
- package/dist/runtime/app/composables/useIii.d.ts +24 -0
- package/dist/runtime/app/composables/useIii.js +9 -0
- package/dist/runtime/app/composables/useIiiStream.d.ts +22 -0
- package/dist/runtime/app/composables/useIiiStream.js +53 -0
- package/dist/runtime/app/plugins/iii.client.d.ts +13 -0
- package/dist/runtime/app/plugins/iii.client.js +9 -0
- package/dist/runtime/nitro/plugins/00.iii-lifecycle.d.ts +19 -0
- package/dist/runtime/nitro/plugins/00.iii-lifecycle.js +62 -0
- package/dist/runtime/nitro/plugins/01.iii-worker.d.ts +15 -0
- package/dist/runtime/nitro/plugins/01.iii-worker.js +140 -0
- package/dist/runtime/nitro/routes/browser-proxy.d.ts +13 -0
- package/dist/runtime/nitro/routes/browser-proxy.js +55 -0
- package/dist/runtime/nitro/routes/stream-proxy.d.ts +17 -0
- package/dist/runtime/nitro/routes/stream-proxy.js +45 -0
- package/dist/runtime/nitro/server.d.ts +14 -0
- package/dist/runtime/nitro/server.js +3 -0
- package/dist/runtime/nitro/utils/browserAuthToken.d.ts +10 -0
- package/dist/runtime/nitro/utils/browserAuthToken.js +32 -0
- package/dist/runtime/nitro/utils/console.d.ts +32 -0
- package/dist/runtime/nitro/utils/console.js +95 -0
- package/dist/runtime/nitro/utils/defineFunction.d.ts +183 -3
- package/dist/runtime/nitro/utils/defineFunction.js +15 -4
- package/dist/runtime/nitro/utils/engine.d.ts +36 -0
- package/dist/runtime/nitro/utils/engine.js +192 -0
- package/dist/runtime/nitro/utils/nventDir.d.ts +1 -0
- package/dist/runtime/nitro/utils/nventDir.js +20 -0
- package/dist/runtime/nitro/utils/useIii.d.ts +22 -0
- package/dist/runtime/nitro/utils/useIii.js +13 -0
- package/dist/runtime/nitro/utils/workers/node.d.ts +31 -0
- package/dist/runtime/nitro/utils/workers/node.js +31 -0
- package/dist/runtime/nitro/utils/workers/python.d.ts +67 -0
- package/dist/runtime/nitro/utils/workers/python.js +221 -0
- package/dist/runtime/python/nvent.py +336 -0
- package/dist/runtime/python/worker_runtime.py +756 -0
- package/dist/runtime/virtual.d.ts +35 -0
- package/dist/types.d.mts +7 -1
- package/package.json +14 -15
- package/dist/runtime/adapters/base/index.d.ts +0 -6
- package/dist/runtime/adapters/base/index.js +0 -1
- package/dist/runtime/adapters/base/store-validator.d.ts +0 -48
- package/dist/runtime/adapters/base/store-validator.js +0 -147
- package/dist/runtime/adapters/builtin/file-queue.d.ts +0 -67
- package/dist/runtime/adapters/builtin/file-queue.js +0 -499
- package/dist/runtime/adapters/builtin/file-store.d.ts +0 -32
- package/dist/runtime/adapters/builtin/file-store.js +0 -206
- package/dist/runtime/adapters/builtin/file-stream.d.ts +0 -39
- package/dist/runtime/adapters/builtin/file-stream.js +0 -56
- package/dist/runtime/adapters/builtin/index.d.ts +0 -10
- package/dist/runtime/adapters/builtin/index.js +0 -5
- package/dist/runtime/adapters/builtin/memory-queue.d.ts +0 -52
- package/dist/runtime/adapters/builtin/memory-queue.js +0 -243
- package/dist/runtime/adapters/builtin/memory-store.d.ts +0 -69
- package/dist/runtime/adapters/builtin/memory-store.js +0 -357
- package/dist/runtime/adapters/builtin/memory-stream.d.ts +0 -21
- package/dist/runtime/adapters/builtin/memory-stream.js +0 -56
- package/dist/runtime/adapters/factory.d.ts +0 -31
- package/dist/runtime/adapters/factory.js +0 -135
- package/dist/runtime/adapters/index.d.ts +0 -8
- package/dist/runtime/adapters/index.js +0 -3
- package/dist/runtime/adapters/interfaces/index.d.ts +0 -11
- package/dist/runtime/adapters/interfaces/index.js +0 -3
- package/dist/runtime/adapters/interfaces/queue.d.ts +0 -155
- package/dist/runtime/adapters/interfaces/queue.js +0 -0
- package/dist/runtime/adapters/interfaces/store.d.ts +0 -299
- package/dist/runtime/adapters/interfaces/store.js +0 -0
- package/dist/runtime/adapters/interfaces/stream.d.ts +0 -62
- package/dist/runtime/adapters/interfaces/stream.js +0 -0
- package/dist/runtime/adapters/registry.d.ts +0 -85
- package/dist/runtime/adapters/registry.js +0 -161
- package/dist/runtime/config/index.d.ts +0 -23
- package/dist/runtime/config/index.js +0 -200
- package/dist/runtime/config/types.d.ts +0 -439
- package/dist/runtime/config/types.js +0 -0
- package/dist/runtime/events/eventBus.d.ts +0 -20
- package/dist/runtime/events/eventBus.js +0 -35
- package/dist/runtime/events/types.d.ts +0 -144
- package/dist/runtime/events/types.js +0 -0
- package/dist/runtime/events/utils/scheduleTrigger.d.ts +0 -8
- package/dist/runtime/events/utils/scheduleTrigger.js +0 -71
- package/dist/runtime/events/utils/stallDetector.d.ts +0 -83
- package/dist/runtime/events/utils/stallDetector.js +0 -318
- package/dist/runtime/events/utils/triggerRuntime.d.ts +0 -58
- package/dist/runtime/events/utils/triggerRuntime.js +0 -212
- package/dist/runtime/events/wiring/flowWiring.d.ts +0 -34
- package/dist/runtime/events/wiring/flowWiring.js +0 -1258
- package/dist/runtime/events/wiring/registry.d.ts +0 -19
- package/dist/runtime/events/wiring/registry.js +0 -43
- package/dist/runtime/events/wiring/stateWiring.d.ts +0 -37
- package/dist/runtime/events/wiring/stateWiring.js +0 -92
- package/dist/runtime/events/wiring/streamWiring.d.ts +0 -36
- package/dist/runtime/events/wiring/streamWiring.js +0 -156
- package/dist/runtime/events/wiring/triggerWiring.d.ts +0 -21
- package/dist/runtime/events/wiring/triggerWiring.js +0 -422
- package/dist/runtime/nitro/plugins/00.adapters.d.ts +0 -14
- package/dist/runtime/nitro/plugins/00.adapters.js +0 -73
- package/dist/runtime/nitro/plugins/01.ws-lifecycle.d.ts +0 -5
- package/dist/runtime/nitro/plugins/01.ws-lifecycle.js +0 -69
- package/dist/runtime/nitro/plugins/02.workers.d.ts +0 -2
- package/dist/runtime/nitro/plugins/02.workers.js +0 -92
- package/dist/runtime/nitro/plugins/03.triggers.d.ts +0 -12
- package/dist/runtime/nitro/plugins/03.triggers.js +0 -55
- package/dist/runtime/nitro/routes/webhook.await.d.ts +0 -23
- package/dist/runtime/nitro/routes/webhook.await.js +0 -112
- package/dist/runtime/nitro/routes/webhook.trigger.d.ts +0 -86
- package/dist/runtime/nitro/routes/webhook.trigger.js +0 -73
- package/dist/runtime/nitro/utils/adapters.d.ts +0 -66
- package/dist/runtime/nitro/utils/adapters.js +0 -51
- package/dist/runtime/nitro/utils/awaitPatterns/event.d.ts +0 -15
- package/dist/runtime/nitro/utils/awaitPatterns/event.js +0 -128
- package/dist/runtime/nitro/utils/awaitPatterns/index.d.ts +0 -28
- package/dist/runtime/nitro/utils/awaitPatterns/index.js +0 -55
- package/dist/runtime/nitro/utils/awaitPatterns/schedule.d.ts +0 -16
- package/dist/runtime/nitro/utils/awaitPatterns/schedule.js +0 -83
- package/dist/runtime/nitro/utils/awaitPatterns/time.d.ts +0 -15
- package/dist/runtime/nitro/utils/awaitPatterns/time.js +0 -71
- package/dist/runtime/nitro/utils/awaitPatterns/webhook.d.ts +0 -15
- package/dist/runtime/nitro/utils/awaitPatterns/webhook.js +0 -128
- package/dist/runtime/nitro/utils/defineFunctionConfig.d.ts +0 -378
- package/dist/runtime/nitro/utils/defineFunctionConfig.js +0 -3
- package/dist/runtime/nitro/utils/defineHooks.d.ts +0 -95
- package/dist/runtime/nitro/utils/defineHooks.js +0 -9
- package/dist/runtime/nitro/utils/registerAdapter.d.ts +0 -59
- package/dist/runtime/nitro/utils/registerAdapter.js +0 -13
- package/dist/runtime/nitro/utils/useAwait.d.ts +0 -83
- package/dist/runtime/nitro/utils/useAwait.js +0 -169
- package/dist/runtime/nitro/utils/useEventManager.d.ts +0 -15
- package/dist/runtime/nitro/utils/useEventManager.js +0 -26
- package/dist/runtime/nitro/utils/useFlow.d.ts +0 -66
- package/dist/runtime/nitro/utils/useFlow.js +0 -310
- package/dist/runtime/nitro/utils/useHookRegistry.d.ts +0 -40
- package/dist/runtime/nitro/utils/useHookRegistry.js +0 -25
- package/dist/runtime/nitro/utils/useNventLogger.d.ts +0 -42
- package/dist/runtime/nitro/utils/useNventLogger.js +0 -54
- package/dist/runtime/nitro/utils/useRunContext.d.ts +0 -6
- package/dist/runtime/nitro/utils/useRunContext.js +0 -102
- package/dist/runtime/nitro/utils/useStreamTopics.d.ts +0 -83
- package/dist/runtime/nitro/utils/useStreamTopics.js +0 -94
- package/dist/runtime/nitro/utils/useTrigger.d.ts +0 -150
- package/dist/runtime/nitro/utils/useTrigger.js +0 -311
- package/dist/runtime/nitro/utils/wsPeerManager.d.ts +0 -44
- package/dist/runtime/nitro/utils/wsPeerManager.js +0 -32
- package/dist/runtime/scheduler/index.d.ts +0 -33
- package/dist/runtime/scheduler/index.js +0 -42
- package/dist/runtime/scheduler/scheduler.d.ts +0 -132
- package/dist/runtime/scheduler/scheduler.js +0 -799
- package/dist/runtime/scheduler/types.d.ts +0 -122
- package/dist/runtime/scheduler/types.js +0 -0
- package/dist/runtime/worker/node/runner.d.ts +0 -95
- package/dist/runtime/worker/node/runner.js +0 -272
- package/dist/runtime/worker/python/get_config.py +0 -64
- package/dist/runtime/worker/system/awaitHandlers.d.ts +0 -27
- package/dist/runtime/worker/system/awaitHandlers.js +0 -230
- package/dist/runtime/worker/system/index.d.ts +0 -24
- package/dist/runtime/worker/system/index.js +0 -39
package/dist/module.d.mts
CHANGED
|
@@ -1,12 +1,446 @@
|
|
|
1
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';
|
|
4
2
|
|
|
3
|
+
interface NventExtendedQueueDefinition {
|
|
4
|
+
/** Queue name used by TriggerAction.Enqueue({ queue }) */
|
|
5
|
+
name: string;
|
|
6
|
+
type?: 'standard' | 'fifo';
|
|
7
|
+
concurrency?: number;
|
|
8
|
+
/** Alias of maxRetries */
|
|
9
|
+
retries?: number;
|
|
10
|
+
maxRetries?: number;
|
|
11
|
+
/** Alias of backoffMs */
|
|
12
|
+
backoff?: number;
|
|
13
|
+
backoffMs?: number;
|
|
14
|
+
/** Optional visibility timeout / lease timeout if supported by the engine */
|
|
15
|
+
visibilityTimeoutMs?: number;
|
|
16
|
+
leaseTimeoutMs?: number;
|
|
17
|
+
/** Optional dead-letter / fallback queue names if supported by the engine */
|
|
18
|
+
deadLetterQueue?: string;
|
|
19
|
+
fallbackQueue?: string;
|
|
20
|
+
messageGroupField?: string;
|
|
21
|
+
}
|
|
22
|
+
type NventQueueConfig = {
|
|
23
|
+
type?: 'standard' | 'fifo';
|
|
24
|
+
concurrency?: number;
|
|
25
|
+
retries?: number;
|
|
26
|
+
maxRetries?: number;
|
|
27
|
+
backoff?: number;
|
|
28
|
+
backoffMs?: number;
|
|
29
|
+
visibilityTimeoutMs?: number;
|
|
30
|
+
leaseTimeoutMs?: number;
|
|
31
|
+
deadLetterQueue?: string;
|
|
32
|
+
fallbackQueue?: string;
|
|
33
|
+
messageGroupField?: string;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* nvent module options
|
|
38
|
+
*
|
|
39
|
+
* Public API types for the nvent Nuxt module. Kept in a separate file so that
|
|
40
|
+
* `iii/config.ts` can import them without creating a circular dependency with
|
|
41
|
+
* `module.ts`.
|
|
42
|
+
*/
|
|
43
|
+
interface NventIiiOptions {
|
|
44
|
+
iii?: {
|
|
45
|
+
/** Version of the iii engine to install. Default: 'latest' */
|
|
46
|
+
version?: string;
|
|
47
|
+
/** 'local' uses a local binary, 'docker' uses Docker, 'remote' skips lifecycle management */
|
|
48
|
+
mode?: 'local' | 'docker' | 'remote';
|
|
49
|
+
/** WebSocket URL for workers to connect to (default: ws://localhost:49134) */
|
|
50
|
+
wsUrl?: string;
|
|
51
|
+
/** HTTP port for iii REST API (default: 3111) */
|
|
52
|
+
httpPort?: number;
|
|
53
|
+
/** HTTP host for iii REST API (default: 'localhost') */
|
|
54
|
+
httpHost?: string;
|
|
55
|
+
/** WebSocket port for workers (default: 49134) */
|
|
56
|
+
wsPort?: number;
|
|
57
|
+
/** WebSocket port for the Stream module (default: 3112) */
|
|
58
|
+
streamPort?: number;
|
|
59
|
+
/** Whether nvent manages engine lifecycle. Default: true in dev, false in prod */
|
|
60
|
+
managed?: boolean;
|
|
61
|
+
modules?: {
|
|
62
|
+
state?: boolean;
|
|
63
|
+
queue?: boolean;
|
|
64
|
+
cron?: boolean;
|
|
65
|
+
observability?: boolean;
|
|
66
|
+
stream?: boolean;
|
|
67
|
+
};
|
|
68
|
+
/** State module adapter configuration */
|
|
69
|
+
state?: {
|
|
70
|
+
adapter?: {
|
|
71
|
+
type: 'kv';
|
|
72
|
+
storeMethod?: 'file_based' | 'in_memory';
|
|
73
|
+
filePath?: string;
|
|
74
|
+
saveIntervalMs?: number;
|
|
75
|
+
} | {
|
|
76
|
+
type: 'redis';
|
|
77
|
+
redisUrl?: string;
|
|
78
|
+
} | {
|
|
79
|
+
type: 'bridge';
|
|
80
|
+
bridgeUrl: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Queue module configuration.
|
|
85
|
+
* Named queues must be declared here for the iii engine to route messages through them.
|
|
86
|
+
*/
|
|
87
|
+
queue?: {
|
|
88
|
+
adapter?: {
|
|
89
|
+
type: 'builtin';
|
|
90
|
+
storeMethod?: 'file_based' | 'in_memory';
|
|
91
|
+
filePath?: string;
|
|
92
|
+
saveIntervalMs?: number;
|
|
93
|
+
maxAttempts?: number;
|
|
94
|
+
backoffMs?: number;
|
|
95
|
+
concurrency?: number;
|
|
96
|
+
pollIntervalMs?: number;
|
|
97
|
+
/** Processing order. 'concurrent' (parallel) or 'fifo' (sequential). Default: 'concurrent' */
|
|
98
|
+
mode?: 'concurrent' | 'fifo';
|
|
99
|
+
} | {
|
|
100
|
+
type: 'redis';
|
|
101
|
+
redisUrl?: string;
|
|
102
|
+
} | {
|
|
103
|
+
type: 'rabbitmq';
|
|
104
|
+
amqpUrl?: string;
|
|
105
|
+
maxAttempts?: number;
|
|
106
|
+
prefetchCount?: number;
|
|
107
|
+
/** 'standard' or 'quorum' (HA replicated). Default: 'standard' */
|
|
108
|
+
queueMode?: 'standard' | 'quorum';
|
|
109
|
+
} | {
|
|
110
|
+
type: 'bridge';
|
|
111
|
+
bridgeUrl: string;
|
|
112
|
+
};
|
|
113
|
+
queueConfigs?: Record<string, {
|
|
114
|
+
type?: 'standard' | 'fifo';
|
|
115
|
+
concurrency?: number;
|
|
116
|
+
/** Alias of maxRetries */
|
|
117
|
+
retries?: number;
|
|
118
|
+
maxRetries?: number;
|
|
119
|
+
/** Alias of backoffMs */
|
|
120
|
+
backoff?: number;
|
|
121
|
+
backoffMs?: number;
|
|
122
|
+
/** Optional visibility timeout / lease timeout if supported by the engine */
|
|
123
|
+
visibilityTimeoutMs?: number;
|
|
124
|
+
leaseTimeoutMs?: number;
|
|
125
|
+
/** Optional dead-letter / fallback queue names if supported by the engine */
|
|
126
|
+
deadLetterQueue?: string;
|
|
127
|
+
fallbackQueue?: string;
|
|
128
|
+
/** FIFO only: field in the payload used to group messages */
|
|
129
|
+
messageGroupField?: string;
|
|
130
|
+
}>;
|
|
131
|
+
};
|
|
132
|
+
/** Cron module adapter configuration */
|
|
133
|
+
cron?: {
|
|
134
|
+
adapter?: {
|
|
135
|
+
type: 'kv';
|
|
136
|
+
lockTtlMs?: number;
|
|
137
|
+
lockIndex?: string;
|
|
138
|
+
storeMethod?: 'file_based' | 'in_memory';
|
|
139
|
+
filePath?: string;
|
|
140
|
+
saveIntervalMs?: number;
|
|
141
|
+
} | {
|
|
142
|
+
type: 'redis';
|
|
143
|
+
redisUrl?: string;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
/** WebSocket Stream module configuration */
|
|
147
|
+
stream?: {
|
|
148
|
+
host?: string;
|
|
149
|
+
authFunction?: string | null;
|
|
150
|
+
adapter?: {
|
|
151
|
+
type: 'kv';
|
|
152
|
+
storeMethod?: 'file_based' | 'in_memory';
|
|
153
|
+
filePath?: string;
|
|
154
|
+
saveIntervalMs?: number;
|
|
155
|
+
} | {
|
|
156
|
+
type: 'redis';
|
|
157
|
+
redisUrl?: string;
|
|
158
|
+
} | {
|
|
159
|
+
type: 'bridge';
|
|
160
|
+
bridgeUrl: string;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
/** REST API module extra settings */
|
|
164
|
+
restApi?: {
|
|
165
|
+
host?: string;
|
|
166
|
+
defaultTimeout?: number;
|
|
167
|
+
concurrencyRequestLimit?: number;
|
|
168
|
+
/** CORS configuration for browser clients */
|
|
169
|
+
cors?: {
|
|
170
|
+
/** Origins allowed to make requests. Use '*' for any, or list specific domains. */
|
|
171
|
+
allowedOrigins?: string[];
|
|
172
|
+
/** HTTP methods permitted for cross-origin requests. */
|
|
173
|
+
allowedMethods?: string[];
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
/** OtelModule (observability) configuration */
|
|
177
|
+
observability?: {
|
|
178
|
+
enabled?: boolean;
|
|
179
|
+
serviceName?: string;
|
|
180
|
+
serviceVersion?: string;
|
|
181
|
+
serviceNamespace?: string;
|
|
182
|
+
/**
|
|
183
|
+
* Trace export destination.
|
|
184
|
+
* 'memory' = queryable via iii API / console (default).
|
|
185
|
+
* 'otlp' = external collector (set endpoint too).
|
|
186
|
+
* 'both' = memory + otlp.
|
|
187
|
+
*/
|
|
188
|
+
exporter?: 'memory' | 'otlp' | 'both';
|
|
189
|
+
endpoint?: string;
|
|
190
|
+
samplingRatio?: number;
|
|
191
|
+
memoryMaxSpans?: number;
|
|
192
|
+
metricsEnabled?: boolean;
|
|
193
|
+
metricsExporter?: 'memory' | 'otlp';
|
|
194
|
+
metricsRetentionSeconds?: number;
|
|
195
|
+
metricsMaxCount?: number;
|
|
196
|
+
logsEnabled?: boolean;
|
|
197
|
+
logsExporter?: 'memory' | 'otlp' | 'both';
|
|
198
|
+
logsMaxCount?: number;
|
|
199
|
+
logsRetentionSeconds?: number;
|
|
200
|
+
logsBatchSize?: number;
|
|
201
|
+
logsFlushIntervalMs?: number;
|
|
202
|
+
logsSamplingRatio?: number;
|
|
203
|
+
logsConsoleOutput?: boolean;
|
|
204
|
+
/** Advanced sampling rules — override samplingRatio for matched operations. */
|
|
205
|
+
sampling?: {
|
|
206
|
+
default?: number;
|
|
207
|
+
parentBased?: boolean;
|
|
208
|
+
rules?: Array<{
|
|
209
|
+
operation?: string;
|
|
210
|
+
service?: string;
|
|
211
|
+
rate: number;
|
|
212
|
+
}>;
|
|
213
|
+
rateLimit?: {
|
|
214
|
+
maxTracesPerSecond?: number;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
/** Alert rules — trigger a webhook or function when a metric crosses a threshold. */
|
|
218
|
+
alerts?: Array<{
|
|
219
|
+
name: string;
|
|
220
|
+
metric: string;
|
|
221
|
+
threshold: number;
|
|
222
|
+
operator: '>' | '>=' | '<' | '<=' | '==' | '!=';
|
|
223
|
+
windowSeconds: number;
|
|
224
|
+
enabled?: boolean;
|
|
225
|
+
cooldownSeconds?: number;
|
|
226
|
+
action: {
|
|
227
|
+
type: 'webhook';
|
|
228
|
+
url: string;
|
|
229
|
+
} | {
|
|
230
|
+
type: 'function';
|
|
231
|
+
path: string;
|
|
232
|
+
};
|
|
233
|
+
}>;
|
|
234
|
+
level?: 'trace' | 'debug' | 'info' | 'warn' | 'error';
|
|
235
|
+
format?: 'default' | 'json';
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* Minimum log level for iii engine output.
|
|
239
|
+
* 'none' silences all output, 'error' shows only errors, 'warn' shows warnings + errors,
|
|
240
|
+
* 'info' shows everything. Default: 'warn'
|
|
241
|
+
*/
|
|
242
|
+
logLevel?: 'none' | 'error' | 'warn' | 'info';
|
|
243
|
+
/**
|
|
244
|
+
* Enable the iii-console web UI (separate binary, http://localhost:3113).
|
|
245
|
+
* Pass `true` for defaults or an object to customise.
|
|
246
|
+
*/
|
|
247
|
+
console?: boolean | {
|
|
248
|
+
/** Version to install. Default: same as iii engine version */
|
|
249
|
+
version?: string;
|
|
250
|
+
/** Port for the console web UI. Default: 3113 */
|
|
251
|
+
port?: number;
|
|
252
|
+
/** Host for the console web UI. Default: 'localhost' */
|
|
253
|
+
host?: string;
|
|
254
|
+
/** Enable the Flow visualization page */
|
|
255
|
+
flow?: boolean;
|
|
256
|
+
};
|
|
257
|
+
/** PubSub worker — topic-based event fanout across functions. */
|
|
258
|
+
pubsub?: {
|
|
259
|
+
adapter?: {
|
|
260
|
+
type: 'local';
|
|
261
|
+
} | {
|
|
262
|
+
type: 'redis';
|
|
263
|
+
redisUrl?: string;
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* HTTP Functions worker — enables outbound HTTP calls from the engine.
|
|
268
|
+
* Required for functions registered with HttpInvocationConfig.
|
|
269
|
+
*/
|
|
270
|
+
httpFunctions?: {
|
|
271
|
+
security?: {
|
|
272
|
+
/** URL patterns allowed for outbound requests. Use '*' to allow all. */
|
|
273
|
+
urlAllowlist?: string[];
|
|
274
|
+
/** Block requests to private/internal IP ranges (SSRF prevention). Default: true */
|
|
275
|
+
blockPrivateIps?: boolean;
|
|
276
|
+
/** Require HTTPS for all outbound requests. Default: true */
|
|
277
|
+
requireHttps?: boolean;
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
/**
|
|
281
|
+
* Additional iii-worker-manager instance with RBAC.
|
|
282
|
+
* nvent uses this automatically when browser SDK is enabled.
|
|
283
|
+
* Can also be configured manually for custom auth scenarios.
|
|
284
|
+
*/
|
|
285
|
+
workerManager?: {
|
|
286
|
+
rbac?: {
|
|
287
|
+
/** Port for the RBAC worker manager. Default: 49135 */
|
|
288
|
+
port?: number;
|
|
289
|
+
/** Function ID called on every WebSocket upgrade for auth. */
|
|
290
|
+
authFunctionId?: string;
|
|
291
|
+
/** Functions the connecting worker is allowed to invoke (patterns supported). */
|
|
292
|
+
exposeFunctions?: string[];
|
|
293
|
+
/** Function invoked before each handler — enrich or audit requests. */
|
|
294
|
+
middlewareFunctionId?: string;
|
|
295
|
+
/** Allow workers to register their own function handlers. Default: true */
|
|
296
|
+
allowFunctionRegistration?: boolean;
|
|
297
|
+
/** Allow workers to register new trigger types. Default: false */
|
|
298
|
+
allowTriggerTypeRegistration?: boolean;
|
|
299
|
+
/** Prefix prepended to every function the worker registers. */
|
|
300
|
+
functionRegistrationPrefix?: string;
|
|
301
|
+
/** TTL for signed browser auth tokens generated by the Nuxt proxy. Default: 120 */
|
|
302
|
+
tokenTtlSeconds?: number;
|
|
303
|
+
/** Allow browser connections without a custom resolver returning user context. Default: true */
|
|
304
|
+
allowAnonymous?: boolean;
|
|
305
|
+
/** Optional path (relative to project root) to a custom browser auth resolver module. */
|
|
306
|
+
authResolverPath?: string;
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
/**
|
|
310
|
+
* Bridge client workers — connects this engine to remote iii instances.
|
|
311
|
+
* Each entry creates an `iii-bridge` worker in the config.
|
|
312
|
+
*/
|
|
313
|
+
bridge?: Array<{
|
|
314
|
+
url: string;
|
|
315
|
+
serviceId: string;
|
|
316
|
+
serviceName?: string;
|
|
317
|
+
expose?: Array<{
|
|
318
|
+
localFunction: string;
|
|
319
|
+
remoteFunction?: string;
|
|
320
|
+
}>;
|
|
321
|
+
forward?: Array<{
|
|
322
|
+
localFunction: string;
|
|
323
|
+
remoteFunction: string;
|
|
324
|
+
timeoutMs?: number;
|
|
325
|
+
}>;
|
|
326
|
+
}>;
|
|
327
|
+
/**
|
|
328
|
+
* Exec workers — spawns external processes alongside the engine.
|
|
329
|
+
* Each entry creates an `iii-exec` worker in the config.
|
|
330
|
+
*/
|
|
331
|
+
exec?: Array<{
|
|
332
|
+
watch?: string[];
|
|
333
|
+
exec: string[];
|
|
334
|
+
}>;
|
|
335
|
+
/** Anonymous usage telemetry. Set enabled: false to opt out. */
|
|
336
|
+
telemetry?: {
|
|
337
|
+
enabled?: boolean;
|
|
338
|
+
apiKey?: string;
|
|
339
|
+
sdkApiKey?: string;
|
|
340
|
+
heartbeatIntervalSecs?: number;
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
functions?: {
|
|
344
|
+
/** Directory under server/ where functions are, relative to serverDir (default: 'functions') */
|
|
345
|
+
dir?: string;
|
|
346
|
+
/**
|
|
347
|
+
* Function ID prefix for this layer's functions.
|
|
348
|
+
* Set in a layer's `nuxt.config.ts` to namespace its functions.
|
|
349
|
+
* Priority: this value → `$meta.name` → package.json name → directory name.
|
|
350
|
+
* Set to `''` (empty string) to explicitly opt out of any prefix.
|
|
351
|
+
* Has no effect in the root project (always un-prefixed).
|
|
352
|
+
* Example: 'myorg::auth'
|
|
353
|
+
*/
|
|
354
|
+
prefix?: string;
|
|
355
|
+
python?: {
|
|
356
|
+
/**
|
|
357
|
+
* Path to the Python executable used **in development only** (e.g. a virtualenv).
|
|
358
|
+
* Has no effect in production — set `NVENT_PYTHON_BIN` env var instead.
|
|
359
|
+
* Default: 'python3'
|
|
360
|
+
* Example: '.venv/bin/python3'
|
|
361
|
+
*/
|
|
362
|
+
devPath?: string;
|
|
363
|
+
/**
|
|
364
|
+
* Skip Python worker support entirely (no Python scanning, no workers started).
|
|
365
|
+
* Useful when the project has no Python functions. Default: false
|
|
366
|
+
*/
|
|
367
|
+
skip?: boolean;
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
app?: {
|
|
371
|
+
/** Enable the nvent app UI and its built-in route. Default: true */
|
|
372
|
+
enabled?: boolean;
|
|
373
|
+
/** Route path for the nvent app. Default: '/_nvent' */
|
|
374
|
+
routePath?: string;
|
|
375
|
+
/**
|
|
376
|
+
* Layout to use for the nvent app route.
|
|
377
|
+
* Set to false for no layout, or a string to use a named layout.
|
|
378
|
+
* Default: false
|
|
379
|
+
*/
|
|
380
|
+
layout?: string | false;
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
interface LayerInfo {
|
|
385
|
+
rootDir: string;
|
|
386
|
+
serverDir: string;
|
|
387
|
+
/**
|
|
388
|
+
* Prefix prepended to every function ID discovered in this layer.
|
|
389
|
+
* Empty string (or undefined) means no prefix — root project convention.
|
|
390
|
+
* e.g. 'auth' → 'login.ts' becomes 'auth::login'
|
|
391
|
+
*/
|
|
392
|
+
prefix?: string;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
interface NventExtendedFunction {
|
|
396
|
+
/** iii function ID (e.g. `fhir::terminology::lookup`) */
|
|
397
|
+
id: string;
|
|
398
|
+
/** Absolute file path, or root-relative path, to a TS/JS function module */
|
|
399
|
+
absPath: string;
|
|
400
|
+
/** Optional human-readable description */
|
|
401
|
+
description?: string;
|
|
402
|
+
}
|
|
403
|
+
interface NventExtendedPythonFunction {
|
|
404
|
+
/** iii function ID (e.g. `fhir::terminology::expand`) */
|
|
405
|
+
id: string;
|
|
406
|
+
/** Absolute file path, or root-relative path, to a .py file */
|
|
407
|
+
absPath: string;
|
|
408
|
+
/** When true, start this function in a dedicated worker process */
|
|
409
|
+
standalone?: boolean;
|
|
410
|
+
}
|
|
411
|
+
interface NventExtendFunctionsHookPayload {
|
|
412
|
+
/** Push extra TS/JS function files to register */
|
|
413
|
+
functions: NventExtendedFunction[];
|
|
414
|
+
/** Push extra Python function files to register */
|
|
415
|
+
pythonFunctions: NventExtendedPythonFunction[];
|
|
416
|
+
/** Nuxt project root */
|
|
417
|
+
rootDir: string;
|
|
418
|
+
/** Layer scan context (same as nvent internal scan) */
|
|
419
|
+
layerInfos: LayerInfo[];
|
|
420
|
+
/** Configured functions dir relative to each layer's server dir */
|
|
421
|
+
functionsDir: string;
|
|
422
|
+
}
|
|
423
|
+
interface NventExtendQueuesHookPayload {
|
|
424
|
+
/** Push extra named queues to register in iii engine config. */
|
|
425
|
+
queues: NventExtendedQueueDefinition[];
|
|
426
|
+
/** Nuxt project root */
|
|
427
|
+
rootDir: string;
|
|
428
|
+
}
|
|
5
429
|
declare module '@nuxt/schema' {
|
|
6
|
-
interface
|
|
7
|
-
|
|
430
|
+
interface NuxtHooks {
|
|
431
|
+
/**
|
|
432
|
+
* Extend nvent function discovery with additional TS/JS or Python function files.
|
|
433
|
+
* Useful for Nuxt modules that ship their own iii handlers.
|
|
434
|
+
*/
|
|
435
|
+
'nvent:functions:extend': (payload: NventExtendFunctionsHookPayload) => void | Promise<void>;
|
|
436
|
+
/**
|
|
437
|
+
* Extend iii named queue definitions so module-owned workflows can enqueue safely.
|
|
438
|
+
* Duplicate policy: first queue definition wins; later duplicates are ignored with a warning.
|
|
439
|
+
*/
|
|
440
|
+
'nvent:queues:extend': (payload: NventExtendQueuesHookPayload) => void | Promise<void>;
|
|
8
441
|
}
|
|
9
442
|
}
|
|
10
|
-
declare const _default: _nuxt_schema.NuxtModule<
|
|
443
|
+
declare const _default: _nuxt_schema.NuxtModule<NventIiiOptions, NventIiiOptions, false>;
|
|
11
444
|
|
|
12
445
|
export { _default as default };
|
|
446
|
+
export type { NventExtendFunctionsHookPayload, NventExtendQueuesHookPayload, NventExtendedFunction, NventExtendedPythonFunction, NventExtendedQueueDefinition, NventQueueConfig };
|