@bonsae/nrg 0.13.0 → 0.14.0

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/types/test.d.ts CHANGED
@@ -1,27 +1,392 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
- export interface MockNodeRedNodeOptions {
4
- id?: string;
5
- type?: string;
3
+ import { SchemaOptions, Static, TObject, TOptional, TProperties, TSchema, TString } from '@sinclair/typebox';
4
+ import { EventEmitter } from 'events';
5
+ import { Express as Express$1 } from 'express';
6
+ import { Http2ServerRequest } from 'http2';
7
+
8
+ interface NodeRedRuntimeSettings {
9
+ userDir?: string;
10
+ nodesDir?: string | string[];
11
+ flowFile?: string;
12
+ flowFilePretty?: boolean;
13
+ credentialSecret?: string | false;
14
+ requireHttps?: boolean;
15
+ https?: {
16
+ key: string;
17
+ cert: string;
18
+ } | (() => Promise<{
19
+ key: string;
20
+ cert: string;
21
+ }> | {
22
+ key: string;
23
+ cert: string;
24
+ });
25
+ httpsRefreshInterval?: number;
26
+ httpAdminRoot?: string;
27
+ httpNodeRoot?: string;
28
+ httpNodeCors?: {
29
+ origin: string;
30
+ methods: string;
31
+ };
32
+ httpStatic?: string | {
33
+ path: string;
34
+ root: string;
35
+ }[];
36
+ httpStaticRoot?: string;
37
+ httpAdminMiddleware?: (req: unknown, res: unknown, next: () => void) => void;
38
+ httpNodeMiddleware?: (req: unknown, res: unknown, next: () => void) => void;
39
+ httpServerOptions?: Record<string, unknown>;
40
+ adminAuth?: {
41
+ type?: "credentials" | "strategy";
42
+ users?: {
43
+ username: string;
44
+ password: string;
45
+ permissions?: string | string[];
46
+ }[];
47
+ default?: {
48
+ permissions?: string | string[];
49
+ };
50
+ tokens?: (token: string) => Promise<{
51
+ user: string;
52
+ permissions: string | string[];
53
+ } | null>;
54
+ tokenHeader: "string";
55
+ sessionExpiryTime?: number;
56
+ [key: string]: unknown;
57
+ };
58
+ httpNodeAuth?: {
59
+ user?: string;
60
+ pass?: string;
61
+ };
62
+ httpStaticAuth?: {
63
+ user?: string;
64
+ pass?: string;
65
+ };
66
+ lang?: "en-US" | "de" | "es-ES" | "fr" | "ko" | "pt-BR" | "ru" | "ja" | "zh-CN" | "zh-TW";
67
+ diagnostics?: {
68
+ enabled?: boolean;
69
+ ui?: boolean;
70
+ };
71
+ runtimeState?: {
72
+ enabled?: boolean;
73
+ ui?: boolean;
74
+ };
75
+ disableEditor?: boolean;
76
+ editorTheme?: {
77
+ page?: {
78
+ title?: string;
79
+ favicon?: string;
80
+ css?: string | string[];
81
+ scripts?: string | string[];
82
+ };
83
+ header?: {
84
+ title?: string;
85
+ image?: string;
86
+ url?: string;
87
+ };
88
+ deployButton?: {
89
+ type?: "simple" | "default";
90
+ label?: string;
91
+ icon?: string;
92
+ };
93
+ menu?: {
94
+ "menu-item-import-library"?: boolean;
95
+ "menu-item-export-library"?: boolean;
96
+ "menu-item-keyboard-shortcuts"?: boolean;
97
+ "menu-item-help"?: {
98
+ label?: string;
99
+ url?: string;
100
+ };
101
+ [menuItem: string]: boolean | {
102
+ label?: string;
103
+ url?: string;
104
+ } | undefined;
105
+ };
106
+ userMenu?: boolean;
107
+ login?: {
108
+ image?: string;
109
+ };
110
+ logout?: {
111
+ redirect?: string;
112
+ };
113
+ palette?: {
114
+ catalogues?: string[];
115
+ categories?: string[];
116
+ theme?: {
117
+ category: string;
118
+ type: string;
119
+ color: string;
120
+ }[];
121
+ };
122
+ projects?: {
123
+ enabled?: boolean;
124
+ workflow?: {
125
+ mode: "manual" | "auto";
126
+ };
127
+ };
128
+ codeEditor?: {
129
+ lib?: "monaco" | "ace";
130
+ options?: Record<string, unknown>;
131
+ };
132
+ mermaid?: {
133
+ theme?: string;
134
+ };
135
+ tours?: boolean;
136
+ theme?: string;
137
+ [key: string]: unknown;
138
+ };
139
+ contextStorage?: {
140
+ default?: {
141
+ module?: "memory" | "localfilesystem" | object;
142
+ config?: Record<string, unknown>;
143
+ };
144
+ [store: string]: {
145
+ module?: "memory" | "localfilesystem" | object;
146
+ config?: Record<string, unknown>;
147
+ } | undefined;
148
+ };
149
+ exportGlobalContextKeys?: boolean;
150
+ logging?: {
151
+ console?: {
152
+ level?: "fatal" | "error" | "warn" | "info" | "debug" | "trace" | "off";
153
+ metrics?: boolean;
154
+ audit?: boolean;
155
+ };
156
+ };
157
+ fileWorkingDirectory?: string;
158
+ functionExternalModules?: boolean;
159
+ functionGlobalContext?: Record<string, unknown>;
160
+ nodeMessageBufferMaxLength?: number;
161
+ functionTimeout?: number;
162
+ externalModules?: {
163
+ autoInstall?: boolean;
164
+ autoInstallRetry?: number;
165
+ palette?: {
166
+ allowInstall?: boolean;
167
+ allowUpdate?: boolean;
168
+ allowUpload?: boolean;
169
+ allowList?: string[];
170
+ denyList?: string[];
171
+ allowUpdateList?: string[];
172
+ denyUpdateList?: string[];
173
+ };
174
+ modules?: {
175
+ allowInstall?: boolean;
176
+ allowList?: string[];
177
+ denyList?: string[];
178
+ };
179
+ };
180
+ execMaxBufferSize?: number;
181
+ debugMaxLength?: number;
182
+ debugUseColors?: boolean;
183
+ httpRequestTimeout?: number;
184
+ mqttReconnectTime?: number;
185
+ serialReconnectTime?: number;
186
+ socketReconnectTime?: number;
187
+ socketTimeout?: number;
188
+ tcpMsgQueueSize?: number;
189
+ inboundWebSocketTimeout?: number;
190
+ tlsConfigDisableLocalFiles?: boolean;
191
+ webSocketNodeVerifyClient?: (info: {
192
+ origin: string;
193
+ req: Http2ServerRequest;
194
+ secure: boolean;
195
+ }) => boolean;
196
+ apiMaxLength?: string;
197
+ [key: string]: unknown;
198
+ }
199
+ type Schema<T extends TProperties = TProperties> = TObject<T>;
200
+ declare const NodeConfigSchema: import("@sinclair/typebox").TObject<{
201
+ id: import("@sinclair/typebox").TString;
202
+ type: import("@sinclair/typebox").TString;
203
+ name: import("@sinclair/typebox").TString;
204
+ z: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
205
+ }>;
206
+ interface NodeConstructor<T = any, TConfig = any, TCredentials = any> {
207
+ readonly type: string;
208
+ readonly category: string;
209
+ readonly color?: string;
210
+ readonly align?: "left" | "right";
211
+ readonly inputs?: number;
212
+ readonly outputs?: number;
213
+ readonly configSchema?: Schema;
214
+ readonly credentialsSchema?: Schema;
215
+ readonly settingsSchema?: Schema;
216
+ readonly inputSchema?: Schema;
217
+ readonly outputsSchema?: Schema | Schema[];
218
+ readonly validateInput?: boolean;
219
+ readonly validateOutput?: boolean;
220
+ readonly name: string;
221
+ registered?(RED: RED): void | Promise<void>;
222
+ _registered?(RED: RED): void | Promise<void>;
223
+ new (RED: RED, node: NodeRedNode, config: NodeConfig<TConfig>, credentials: NodeCredentials<TCredentials>): T;
224
+ }
225
+ type NodeConfig<TConfig = any> = TConfig & Static<typeof NodeConfigSchema>;
226
+ type NodeCredentials<TCredentials = any> = TCredentials;
227
+ interface INode<TConfig = any, TCredentials = any, TSettings = any> {
228
+ readonly config: NodeConfig<TConfig>;
229
+ readonly id: string;
230
+ readonly name: string | undefined;
231
+ readonly z: string | undefined;
232
+ readonly credentials: NodeCredentials<TCredentials> | undefined;
233
+ readonly settings: TSettings;
234
+ i18n(key: string, substitutions?: Record<string, string>): string;
235
+ setTimeout(fn: () => void, ms: number): NodeJS.Timeout;
236
+ setInterval(fn: () => void, ms: number): NodeJS.Timeout;
237
+ clearTimeout(timer: NodeJS.Timeout): void;
238
+ clearInterval(interval: NodeJS.Timeout): void;
239
+ on(event: string, callback: (...args: any[]) => void): void;
240
+ log(msg: any): void;
241
+ warn(message: string): void;
242
+ error(message: string, msg?: any): void;
243
+ created?(): void | Promise<void>;
244
+ closed?(removed?: boolean): void | Promise<void>;
245
+ }
246
+ interface NodeRedLog {
247
+ info(msg: any): void;
248
+ warn(msg: any): void;
249
+ error(msg: any, error?: any): void;
250
+ debug(msg: any): void;
251
+ trace(msg: any): void;
252
+ log(msg: {
253
+ level: number;
254
+ msg: string;
255
+ }): void;
256
+ metric(): boolean;
257
+ audit(msg: Record<string, any>, req?: any): void;
258
+ addHandler(handler: (msg: any) => void): void;
259
+ removeHandler(handler: (msg: any) => void): void;
260
+ FATAL: 10;
261
+ ERROR: 20;
262
+ WARN: 30;
263
+ INFO: 40;
264
+ DEBUG: 50;
265
+ TRACE: 60;
266
+ AUDIT: 98;
267
+ METRIC: 99;
268
+ }
269
+ interface NodeRedNode {
270
+ id: string;
271
+ type: string;
6
272
  name?: string;
7
273
  z?: string;
8
- wires?: string[][];
9
- credentials?: Record<string, any>;
274
+ x: number;
275
+ y: number;
276
+ g?: string;
277
+ wires: string[][];
278
+ credentials: any;
279
+ _node?: INode;
280
+ send(msg: any): void;
281
+ receive(msg: any): void;
282
+ status(status: string | {
283
+ fill?: string;
284
+ shape?: string;
285
+ text?: string;
286
+ }): void;
287
+ updateWires(wires: string[][]): void;
288
+ on(event: string, callback: (...args: any[]) => void): void;
289
+ log(msg: any): void;
290
+ warn(msg: any): void;
291
+ error(msg: any, errorMsg?: any): void;
292
+ context(): NodeRedNodeContext;
10
293
  [key: string]: any;
11
294
  }
12
- export interface CreateNodeOptions {
295
+ interface NodeRedNodeContext extends NodeRedContextStore {
296
+ flow: NodeRedContextStore;
297
+ global: NodeRedContextStore;
298
+ }
299
+ interface NodeRedNodes {
300
+ registerType(type: string, constructor: any, opts?: any): void;
301
+ getNode(id: string): (NodeRedNode & {
302
+ _node?: INode;
303
+ }) | undefined;
304
+ createNode(node: NodeRedNode, config: Record<string, any>): void;
305
+ getCredentials(id: string): Record<string, any> | undefined;
306
+ eachNode(callback: (node: any) => void): void;
307
+ getType(type: string): any;
308
+ getNodeInfo(type: string): any;
309
+ getNodeList(filter?: any): any[];
310
+ getModuleInfo(module: string): any;
311
+ installModule(module: string, version?: string): Promise<any>;
312
+ uninstallModule(module: string): Promise<any>;
313
+ enableNode(id: string): Promise<any>;
314
+ disableNode(id: string): Promise<any>;
315
+ }
316
+ interface NodeRedUtil {
317
+ evaluateNodeProperty(value: any, type: string, node: any, msg: Record<string, any> | undefined, callback: (err: Error | null, result: any) => void): void;
318
+ generateId(): string;
319
+ cloneMessage<T = any>(msg: T): T;
320
+ ensureString(o: any): string;
321
+ ensureBuffer(o: any): Buffer;
322
+ compareObjects(obj1: any, obj2: any): boolean;
323
+ getMessageProperty(msg: any, expr: string): any;
324
+ setMessageProperty(msg: any, prop: string, value: any, createMissing?: boolean): void;
325
+ getObjectProperty(obj: any, expr: string): any;
326
+ setObjectProperty(obj: any, prop: string, value: any, createMissing?: boolean): void;
327
+ normalisePropertyExpression(str: string, msg?: any, toString?: boolean): string[];
328
+ normaliseNodeTypeName(name: string): string;
329
+ prepareJSONataExpression(value: string, node: any): any;
330
+ evaluateJSONataExpression(expr: any, msg: any, callback: (err: Error | null, result: any) => void): void;
331
+ parseContextStore(key: string): {
332
+ store: string | undefined;
333
+ key: string;
334
+ };
335
+ getSetting(node: any, name: string, flow?: any): any;
336
+ encodeObject(obj: any): any;
337
+ }
338
+ interface NodeRedHooks {
339
+ add(hookId: string, callback: (event: any) => void | Promise<void>): void;
340
+ remove(hookId: string): void;
341
+ trigger(hookId: string, event: any, callback?: (err?: Error) => void): void | Promise<void>;
342
+ has(hookId: string): boolean;
343
+ clear(): void;
344
+ }
345
+ type NodeRedExpressApp = Express;
346
+ interface RED {
347
+ /** Internationalization function */
348
+ _(key: string, substitutions?: Record<string, string>): string;
349
+ /** Logging API */
350
+ log: NodeRedLog;
351
+ /** Node registry and management */
352
+ nodes: NodeRedNodes;
353
+ /** Utility functions */
354
+ util: NodeRedUtil;
355
+ /** Hook system for message lifecycle and module events */
356
+ hooks: NodeRedHooks;
357
+ /** Runtime event emitter */
358
+ events: EventEmitter;
359
+ /** Express app for admin HTTP endpoints */
360
+ httpAdmin: NodeRedExpressApp;
361
+ /** Express app for node HTTP endpoints */
362
+ httpNode: NodeRedExpressApp;
363
+ /** Runtime settings (user-provided settings plus node-registered settings) */
364
+ settings: NodeRedRuntimeSettings & Record<string, any>;
365
+ /** Node-RED version string */
366
+ version(): string;
367
+ }
368
+ interface NodeRedContextStore {
369
+ get(key: string, store: string | undefined, callback: (err: Error | null, value: any) => void): void;
370
+ set(key: string, value: any, store: string | undefined, callback: (err: Error | null) => void): void;
371
+ keys(store: string | undefined, callback: (err: Error | null, keys: string[]) => void): void;
372
+ }
373
+ interface MockRED extends RED {
374
+ registerNode(id: string, nodeRedNode: Partial<NodeRedNode>): void;
375
+ registerNrgNode(id: string, nrgInstance: Partial<INode>): void;
376
+ }
377
+ interface CreateNodeOptions {
13
378
  config?: Record<string, any>;
14
379
  credentials?: Record<string, any>;
15
380
  settings?: Record<string, any>;
16
- overrides?: MockNodeRedNodeOptions;
381
+ overrides?: Partial<NodeRedNode>;
17
382
  }
18
- export type ExtractInput<T> = T extends {
383
+ type ExtractInput<T> = T extends {
19
384
  input(msg: infer I): any;
20
385
  } ? I : any;
21
- export type ExtractOutput<T> = T extends {
386
+ type ExtractOutput<T> = T extends {
22
387
  send(msg: infer O): any;
23
388
  } ? O : any;
24
- export interface TestNodeHelpers<TInput = any, TOutput = any> {
389
+ interface TestNodeHelpers<TInput = any, TOutput = any> {
25
390
  receive(msg: TInput): Promise<void>;
26
391
  close(removed?: boolean): Promise<void>;
27
392
  reset(): void;
@@ -32,18 +397,23 @@ export interface TestNodeHelpers<TInput = any, TOutput = any> {
32
397
  warned(): string[];
33
398
  errored(): string[];
34
399
  }
35
- export interface CreateNodeResult<T> {
400
+ interface CreateNodeResult<T> {
36
401
  node: T & TestNodeHelpers<ExtractInput<T>, ExtractOutput<T>>;
37
- RED: any;
38
- }
39
- export interface NodeClass {
40
- readonly type: string;
41
- readonly category?: string;
42
- readonly configSchema?: any;
43
- registered?(RED: any): void | Promise<void>;
44
- _registered?(RED: any): void | Promise<void>;
45
- new (...args: any[]): any;
402
+ RED: MockRED;
46
403
  }
47
- export declare function createNode<T extends NodeClass>(NodeClass: T, options?: CreateNodeOptions): Promise<CreateNodeResult<InstanceType<T>>>;
404
+ /**
405
+ * Creates a node instance for testing, with helpers for sending messages,
406
+ * inspecting output, and checking status/log calls.
407
+ *
408
+ * @example
409
+ * ```ts
410
+ * const { node } = await createNode(MyNode, {
411
+ * config: { name: "test" },
412
+ * });
413
+ * await node.receive({ payload: "hello" });
414
+ * expect(node.sent(0)).toEqual([{ payload: "HELLO" }]);
415
+ * ```
416
+ */
417
+ export declare function createNode<T extends NodeConstructor>(NodeClass: T, options?: CreateNodeOptions): Promise<CreateNodeResult<InstanceType<T>>>;
48
418
 
49
419
  export {};
package/types/vite.d.ts CHANGED
@@ -1,12 +1,169 @@
1
+ // Generated by dts-bundle-generator v9.5.1
1
2
 
2
- import type { Plugin } from "vite";
3
-
3
+ export interface BuildContext {
4
+ outDir: string;
5
+ packageName: string;
6
+ isDev: boolean;
7
+ }
8
+ export interface BuildPluginOptions {
9
+ serverBuildOptions: ServerBuildOptions;
10
+ clientBuildOptions: ClientBuildOptions;
11
+ extraFilesCopyTargets: CopyTarget[];
12
+ buildContext: BuildContext;
13
+ }
14
+ export interface ClientBuildOptions {
15
+ /** Source directory for client code. @default "./src/client" */
16
+ srcDir?: string;
17
+ /** Entry filename relative to srcDir. @default "index.ts" */
18
+ entry?: string;
19
+ /** Subdirectory name for node definition files. @default "nodes" */
20
+ nodesSubdir?: string;
21
+ /** Pattern to match node definition files. */
22
+ nodeFilePattern?: RegExp;
23
+ /** Global variable name for the UMD/IIFE bundle. @default "NodeRedNodes" */
24
+ name?: string;
25
+ /** Output format for the client bundle. @default "es" */
26
+ format?: "es" | "iife" | "umd";
27
+ /** Base public path for serving resources. */
28
+ base?: string;
29
+ /** Path to LICENSE file to include in the HTML output. @default "./LICENSE" */
30
+ licensePath?: string;
31
+ /** Internationalization options for labels and docs. */
32
+ locales?: LocalesOptions;
33
+ /** Directories for static assets (icons, public files). */
34
+ staticDirs?: {
35
+ /** Directory containing node icons ({type}.png). @default "./src/icons" */
36
+ icons?: string;
37
+ /** Directory for public static files copied to dist/resources/. @default "./src/client/public" */
38
+ public?: string;
39
+ };
40
+ /** Modules to treat as external (not bundled). @default ["jquery", "node-red", "vue", "@bonsae/nrg/client"] */
41
+ external?: string[];
42
+ /** Global variable mappings for external modules. */
43
+ globals?: Record<string, string>;
44
+ /** Custom chunk splitting function for Rollup. */
45
+ manualChunks?: (id: string) => string | undefined;
46
+ }
47
+ export interface CopyTarget {
48
+ /** Source file or directory path. */
49
+ src: string;
50
+ /** Destination path relative to the output directory. */
51
+ dest: string;
52
+ }
53
+ export interface LocalesOptions {
54
+ /** Directory containing documentation files ({type}/{lang}.md or .html). @default "./src/locales/docs" */
55
+ docsDir?: string;
56
+ /** Directory containing label files ({type}/{lang}.json). @default "./src/locales/labels" */
57
+ labelsDir?: string;
58
+ }
59
+ export interface LoggerOptions {
60
+ name: string;
61
+ prefix?: string;
62
+ }
63
+ export interface NodeRedLauncherOptions {
64
+ runtime?: {
65
+ /** Port for Node-RED to listen on. @default 1880 */
66
+ port?: number;
67
+ /** Path to the Node-RED settings file (TypeScript supported). @default "./node-red.settings.ts" */
68
+ settingsFilepath?: string;
69
+ /** Node-RED version to install for the dev server. @default "latest" */
70
+ version?: string;
71
+ };
72
+ /** Delay in ms before restarting Node-RED after a file change. @default 1000 */
73
+ restartDelay?: number;
74
+ /** Additional CLI arguments passed to the Node-RED process. */
75
+ args?: string[];
76
+ }
77
+ /**
78
+ * Options for the `nodeRed()` Vite plugin.
79
+ *
80
+ * All options are optional — defaults work for the standard `src/` directory layout.
81
+ */
4
82
  export interface NodeRedPluginOptions {
5
- outDir?: string;
6
- serverBuildOptions?: Record<string, any>;
7
- clientBuildOptions?: Record<string, any>;
8
- nodeRedLauncherOptions?: Record<string, any>;
9
- extraFilesCopyTargets?: Array<{ src: string; dest: string }>;
83
+ /** Output directory for the built Node-RED package. @default "./dist" */
84
+ outDir?: string;
85
+ /** Options for building the client-side editor UI. */
86
+ clientBuildOptions?: ClientBuildOptions;
87
+ /** Options for building the server-side node runtime. */
88
+ serverBuildOptions?: ServerBuildOptions;
89
+ /** Options for the Node-RED dev server launcher. */
90
+ nodeRedLauncherOptions?: NodeRedLauncherOptions;
91
+ /** Extra files to copy into the output directory (e.g., LICENSE, README). */
92
+ extraFilesCopyTargets?: CopyTarget[];
93
+ }
94
+ export interface PackageJson {
95
+ name: string;
96
+ version: string;
97
+ description?: string;
98
+ type?: "commonjs" | "module";
99
+ main?: string;
100
+ types?: string;
101
+ exports?: Record<string, unknown>;
102
+ scripts?: Record<string, string>;
103
+ dependencies?: Record<string, string>;
104
+ devDependencies?: Record<string, string>;
105
+ peerDependencies?: Record<string, string>;
106
+ optionalDependencies?: Record<string, string>;
107
+ keywords?: string[];
108
+ author?: string | {
109
+ name: string;
110
+ email?: string;
111
+ url?: string;
112
+ };
113
+ license?: string;
114
+ repository?: string | {
115
+ type: string;
116
+ url: string;
117
+ };
118
+ bugs?: string | {
119
+ url: string;
120
+ email?: string;
121
+ };
122
+ homepage?: string;
123
+ engines?: Record<string, string>;
124
+ files?: string[];
125
+ private?: boolean;
126
+ publishConfig?: Record<string, unknown>;
127
+ "node-red"?: {
128
+ nodes?: Record<string, string>;
129
+ version?: string;
130
+ };
131
+ [key: string]: unknown;
132
+ }
133
+ export interface ServerBuildOptions {
134
+ /** Source directory for server code. @default "./src/server" */
135
+ srcDir?: string;
136
+ /** Entry filename relative to srcDir. @default "index.ts" */
137
+ entry?: string;
138
+ /** Output format. "esm" builds to .mjs with a CJS bridge for Node-RED. @default "esm" */
139
+ format?: "cjs" | "esm";
140
+ /** Packages to keep as external (not bundled). @default [] */
141
+ external?: string[];
142
+ /** Dependencies to bundle into the output instead of keeping as external. @default [] */
143
+ bundled?: string[];
144
+ /** Generate rolled-up .d.ts type declarations (production only). @default true */
145
+ types?: boolean;
146
+ /** esbuild target for the server bundle. @default "node22" */
147
+ nodeTarget?: string;
148
+ }
149
+ export interface NodeRedLauncher {
150
+ start(): Promise<number>;
151
+ stop(skipPortUsageCheck?: boolean): Promise<void>;
152
+ cleanup(): void;
153
+ flushLogs(): void;
154
+ readonly preferredPort: number;
155
+ readonly restartDelay: number;
156
+ readonly pid: number | null;
10
157
  }
158
+ export interface ServerPluginOptions {
159
+ nodeRedLauncher: NodeRedLauncher;
160
+ serverBuildOptions: ServerBuildOptions;
161
+ clientBuildOptions: ClientBuildOptions;
162
+ extraFilesCopyTargets: CopyTarget[];
163
+ buildContext: BuildContext;
164
+ }
165
+
166
+ export {};
11
167
 
168
+ import type { Plugin } from "vite";
12
169
  export declare function nodeRed(options?: NodeRedPluginOptions): Plugin[];