nvent 0.5.15 → 1.0.0-alpha.2
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 +181 -8
- package/dist/module.json +1 -1
- package/dist/module.mjs +1257 -1196
- package/dist/runtime/app/composables/useFunctionCall.d.ts +17 -0
- package/dist/runtime/app/composables/useFunctionCall.js +25 -0
- package/dist/runtime/app/composables/useNventStream.d.ts +23 -0
- package/dist/runtime/app/composables/useNventStream.js +58 -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 +91 -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/utils/console.d.ts +32 -0
- package/dist/runtime/nitro/utils/console.js +95 -0
- package/dist/runtime/nitro/utils/defineFunction.d.ts +378 -3
- package/dist/runtime/nitro/utils/defineFunction.js +224 -4
- package/dist/runtime/nitro/utils/engine.d.ts +25 -0
- package/dist/runtime/nitro/utils/engine.js +130 -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 +23 -0
- package/dist/runtime/nitro/utils/useIii.js +14 -0
- package/dist/runtime/nitro/utils/workers/node.d.ts +24 -0
- package/dist/runtime/nitro/utils/workers/node.js +57 -0
- package/dist/runtime/nitro/utils/workers/python.d.ts +67 -0
- package/dist/runtime/nitro/utils/workers/python.js +220 -0
- package/dist/runtime/python/nvent.py +208 -0
- package/dist/runtime/python/worker_runtime.py +659 -0
- package/dist/runtime/virtual.d.ts +17 -0
- package/dist/types.d.mts +5 -1
- package/package.json +11 -14
- 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,185 @@
|
|
|
1
|
-
import * as
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
182
|
+
|
|
183
|
+
declare const _default: nuxt_schema.NuxtModule<NventIiiOptions, NventIiiOptions, false>;
|
|
11
184
|
|
|
12
185
|
export { _default as default };
|