@bonsae/nrg 0.6.0 → 0.6.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/README.md +5 -5
- package/package.json +14 -75
- package/{build/server → server}/index.cjs +1 -1
- package/{src/core/client → shims}/components.d.ts +2 -0
- package/{src/tsconfig → tsconfig}/client.json +3 -3
- package/types/client.d.ts +37 -0
- package/types/index.d.ts +211 -0
- package/types/server.d.ts +2293 -0
- package/types/vite.d.ts +12 -0
- package/{build/vite → vite}/index.js +95 -0
- package/build/vite/utils.js +0 -56
- package/src/core/client/app.vue +0 -185
- package/src/core/client/components/node-red-config-input.vue +0 -79
- package/src/core/client/components/node-red-editor-input.vue +0 -307
- package/src/core/client/components/node-red-input-label.vue +0 -53
- package/src/core/client/components/node-red-input.vue +0 -93
- package/src/core/client/components/node-red-json-schema-form.vue +0 -444
- package/src/core/client/components/node-red-select-input.vue +0 -108
- package/src/core/client/components/node-red-toggle.vue +0 -115
- package/src/core/client/components/node-red-typed-input.vue +0 -158
- package/src/core/client/index.ts +0 -500
- package/src/core/client/tsconfig.json +0 -18
- package/src/core/constants.ts +0 -18
- package/src/core/errors.ts +0 -9
- package/src/core/server/api/index.ts +0 -1
- package/src/core/server/api/serve-nrg-resources.ts +0 -54
- package/src/core/server/index.ts +0 -190
- package/src/core/server/nodes/config-node.ts +0 -67
- package/src/core/server/nodes/factories.ts +0 -133
- package/src/core/server/nodes/index.ts +0 -5
- package/src/core/server/nodes/io-node.ts +0 -179
- package/src/core/server/nodes/node.ts +0 -259
- package/src/core/server/nodes/types/config-node.ts +0 -28
- package/src/core/server/nodes/types/factories.ts +0 -115
- package/src/core/server/nodes/types/index.ts +0 -4
- package/src/core/server/nodes/types/io-node.ts +0 -40
- package/src/core/server/nodes/types/node.ts +0 -41
- package/src/core/server/nodes/utils.ts +0 -106
- package/src/core/server/schemas/base.ts +0 -66
- package/src/core/server/schemas/index.ts +0 -3
- package/src/core/server/schemas/type.ts +0 -95
- package/src/core/server/schemas/types/index.ts +0 -82
- package/src/core/server/tsconfig.json +0 -17
- package/src/core/server/types/index.ts +0 -220
- package/src/core/server/utils.ts +0 -56
- package/src/core/server/validator.ts +0 -36
- package/src/core/validator.ts +0 -222
- package/src/index.ts +0 -2
- package/src/types.ts +0 -189
- package/src/utils.ts +0 -20
- package/src/vite/async-utils.ts +0 -61
- package/src/vite/client/build.ts +0 -227
- package/src/vite/client/index.ts +0 -1
- package/src/vite/client/plugins/html-generator.ts +0 -75
- package/src/vite/client/plugins/index.ts +0 -5
- package/src/vite/client/plugins/locales-generator.ts +0 -126
- package/src/vite/client/plugins/minifier.ts +0 -23
- package/src/vite/client/plugins/node-definitions-inliner.ts +0 -275
- package/src/vite/client/plugins/static-copy.ts +0 -43
- package/src/vite/defaults.ts +0 -77
- package/src/vite/errors.ts +0 -37
- package/src/vite/index.ts +0 -2
- package/src/vite/logger.ts +0 -94
- package/src/vite/node-red-launcher.ts +0 -344
- package/src/vite/plugin.ts +0 -61
- package/src/vite/plugins/build.ts +0 -85
- package/src/vite/plugins/index.ts +0 -2
- package/src/vite/plugins/server.ts +0 -267
- package/src/vite/server/build.ts +0 -124
- package/src/vite/server/index.ts +0 -1
- package/src/vite/server/plugins/index.ts +0 -3
- package/src/vite/server/plugins/output-wrapper.ts +0 -109
- package/src/vite/server/plugins/package-json-generator.ts +0 -203
- package/src/vite/server/plugins/type-generator.ts +0 -285
- package/src/vite/types.ts +0 -174
- package/src/vite/utils.ts +0 -72
- /package/{build/index.js → index.js} +0 -0
- /package/{build/server → server}/resources/nrg-client.js +0 -0
- /package/{build/server → server}/resources/vue.esm-browser.js +0 -0
- /package/{build/server → server}/resources/vue.esm-browser.prod.js +0 -0
- /package/{src/core/client → shims}/globals.d.ts +0 -0
- /package/{src/core/client → shims}/shims-vue.d.ts +0 -0
- /package/{src/tsconfig → tsconfig}/base.json +0 -0
- /package/{src/tsconfig → tsconfig}/server.json +0 -0
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Build Node-RED nodes with Vue 3, TypeScript, and JSON Schema validation.
|
|
|
14
14
|
## Install
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
pnpm add @bonsae/nrg
|
|
17
|
+
pnpm add @bonsae/nrg vue
|
|
18
18
|
pnpm add -D vite
|
|
19
19
|
```
|
|
20
20
|
|
|
@@ -22,9 +22,9 @@ pnpm add -D vite
|
|
|
22
22
|
|
|
23
23
|
| Export | Description |
|
|
24
24
|
| --- | --- |
|
|
25
|
-
| `@bonsae/nrg
|
|
26
|
-
| `@bonsae/nrg/
|
|
27
|
-
| `@bonsae/nrg/
|
|
25
|
+
| `@bonsae/nrg` | Root entry — `defineRuntimeSettings` |
|
|
26
|
+
| `@bonsae/nrg/server` | Server node classes, schema utilities, validation (`IONode`, `ConfigNode`, `defineIONode`, `defineConfigNode`, `defineModule`, `SchemaType`, `defineSchema`, `Infer`) |
|
|
27
|
+
| `@bonsae/nrg/client` | Client-side registration (`registerTypes`, `defineNode`) |
|
|
28
28
|
| `@bonsae/nrg/vite` | Vite plugin for building and developing Node-RED packages |
|
|
29
29
|
| `@bonsae/nrg/tsconfig/*` | Shared TypeScript configurations for consumers |
|
|
30
30
|
|
|
@@ -32,7 +32,7 @@ pnpm add -D vite
|
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
34
|
# In your Node-RED package project
|
|
35
|
-
pnpm add @bonsae/nrg
|
|
35
|
+
pnpm add @bonsae/nrg vue
|
|
36
36
|
pnpm add -D vite
|
|
37
37
|
```
|
|
38
38
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bonsae/nrg",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "NRG framework — build Node-RED nodes with Vue 3, TypeScript, and JSON Schema",
|
|
5
5
|
"author": "Allan Oricil <allanoricil@duck.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,53 +16,28 @@
|
|
|
16
16
|
"node": ">=22",
|
|
17
17
|
"pnpm": ">=10.11.0"
|
|
18
18
|
},
|
|
19
|
-
"scripts": {
|
|
20
|
-
"test": "vitest run && vitest run --config vitest.e2e.config.ts",
|
|
21
|
-
"test:unit": "vitest run",
|
|
22
|
-
"test:unit:watch": "vitest",
|
|
23
|
-
"test:e2e": "vitest run --config vitest.e2e.config.ts",
|
|
24
|
-
"build": "node build.mjs",
|
|
25
|
-
"typecheck": "tsc -p src/core/server/tsconfig.json --noEmit && tsc -p src/core/client/tsconfig.json --noEmit",
|
|
26
|
-
"lint": "eslint src/",
|
|
27
|
-
"lint:fix": "eslint src/ --fix",
|
|
28
|
-
"format": "prettier --write \"src/**/*.{ts,vue,json}\"",
|
|
29
|
-
"format:check": "prettier --check \"src/**/*.{ts,vue,json}\"",
|
|
30
|
-
"docs:dev": "pnpm --dir docs dev",
|
|
31
|
-
"docs:build": "pnpm --dir docs build",
|
|
32
|
-
"docs:preview": "pnpm --dir docs preview",
|
|
33
|
-
"prepare": "husky"
|
|
34
|
-
},
|
|
35
|
-
"files": [
|
|
36
|
-
"src/",
|
|
37
|
-
"build/"
|
|
38
|
-
],
|
|
39
19
|
"exports": {
|
|
40
20
|
".": {
|
|
41
|
-
"types": "./
|
|
42
|
-
"default": "./
|
|
21
|
+
"types": "./types/index.d.ts",
|
|
22
|
+
"default": "./index.js"
|
|
43
23
|
},
|
|
44
24
|
"./server": {
|
|
45
|
-
"types": "./
|
|
46
|
-
"require": "./
|
|
47
|
-
"default": "./
|
|
25
|
+
"types": "./types/server.d.ts",
|
|
26
|
+
"require": "./server/index.cjs",
|
|
27
|
+
"default": "./server/index.cjs"
|
|
48
28
|
},
|
|
49
|
-
"./client":
|
|
50
|
-
|
|
51
|
-
"./schemas/types": "./src/core/server/schemas/types/index.ts",
|
|
52
|
-
"./vite": {
|
|
53
|
-
"types": "./src/vite/index.ts",
|
|
54
|
-
"default": "./build/vite/index.js"
|
|
29
|
+
"./client": {
|
|
30
|
+
"types": "./types/client.d.ts"
|
|
55
31
|
},
|
|
56
|
-
"./vite
|
|
57
|
-
"types": "./
|
|
58
|
-
"default": "./
|
|
32
|
+
"./vite": {
|
|
33
|
+
"types": "./types/vite.d.ts",
|
|
34
|
+
"default": "./vite/index.js"
|
|
59
35
|
},
|
|
60
|
-
"./tsconfig/base.json": "./
|
|
61
|
-
"./tsconfig/client.json": "./
|
|
62
|
-
"./tsconfig/server.json": "./
|
|
36
|
+
"./tsconfig/base.json": "./tsconfig/base.json",
|
|
37
|
+
"./tsconfig/client.json": "./tsconfig/client.json",
|
|
38
|
+
"./tsconfig/server.json": "./tsconfig/server.json"
|
|
63
39
|
},
|
|
64
40
|
"peerDependencies": {
|
|
65
|
-
"@sinclair/typebox": "^0.34.33",
|
|
66
41
|
"vite": "^6.0.0",
|
|
67
42
|
"vue": "^3.5.14"
|
|
68
43
|
},
|
|
@@ -84,41 +59,5 @@
|
|
|
84
59
|
"typescript": "^5.8.3",
|
|
85
60
|
"vite-plugin-dts": "^4.5.4",
|
|
86
61
|
"vite-plugin-static-copy": "^3.1.0"
|
|
87
|
-
},
|
|
88
|
-
"lint-staged": {
|
|
89
|
-
"src/**/*.{ts,vue}": [
|
|
90
|
-
"eslint --fix",
|
|
91
|
-
"prettier --write"
|
|
92
|
-
],
|
|
93
|
-
"src/**/*.json": [
|
|
94
|
-
"prettier --write"
|
|
95
|
-
]
|
|
96
|
-
},
|
|
97
|
-
"devDependencies": {
|
|
98
|
-
"@commitlint/cli": "^20.5.0",
|
|
99
|
-
"@commitlint/config-conventional": "^20.5.0",
|
|
100
|
-
"@eslint/js": "^9.27.0",
|
|
101
|
-
"@semantic-release/changelog": "^6.0.3",
|
|
102
|
-
"@semantic-release/exec": "^7.1.0",
|
|
103
|
-
"@semantic-release/git": "^10.0.1",
|
|
104
|
-
"@types/express": "^5.0.1",
|
|
105
|
-
"@types/jquery": "^4.0.0",
|
|
106
|
-
"@types/mime-types": "^2.1.4",
|
|
107
|
-
"@types/node": "^22.15.18",
|
|
108
|
-
"@typescript-eslint/eslint-plugin": "^8.32.1",
|
|
109
|
-
"@typescript-eslint/parser": "^8.32.1",
|
|
110
|
-
"@vitest/coverage-v8": "^4.1.5",
|
|
111
|
-
"eslint": "^9.27.0",
|
|
112
|
-
"eslint-config-prettier": "^10.1.8",
|
|
113
|
-
"eslint-plugin-vue": "^10.1.0",
|
|
114
|
-
"globals": "^16.1.0",
|
|
115
|
-
"husky": "^9.1.7",
|
|
116
|
-
"lint-staged": "^16.4.0",
|
|
117
|
-
"prettier": "^3.5.3",
|
|
118
|
-
"semantic-release": "^24.2.4",
|
|
119
|
-
"typescript-eslint": "^8.32.1",
|
|
120
|
-
"vite": "^6.3.4",
|
|
121
|
-
"vitest": "^4.1.5",
|
|
122
|
-
"vue": "^3.5.14"
|
|
123
62
|
}
|
|
124
63
|
}
|
|
@@ -683,7 +683,7 @@ function defineIONode(def) {
|
|
|
683
683
|
return def.registered?.(RED);
|
|
684
684
|
}
|
|
685
685
|
async input(msg) {
|
|
686
|
-
return def.input.call(this, msg);
|
|
686
|
+
if (def.input) return def.input.call(this, msg);
|
|
687
687
|
}
|
|
688
688
|
async created() {
|
|
689
689
|
if (def.created) return def.created.call(this);
|
|
@@ -13,6 +13,8 @@ declare module "vue" {
|
|
|
13
13
|
NodeRedConfigInput: (typeof import("./components/node-red-config-input.vue"))["default"];
|
|
14
14
|
NodeRedSelectInput: (typeof import("./components/node-red-select-input.vue"))["default"];
|
|
15
15
|
NodeRedEditorInput: (typeof import("./components/node-red-editor-input.vue"))["default"];
|
|
16
|
+
NodeRedInputLabel: (typeof import("./components/node-red-input-label.vue"))["default"];
|
|
17
|
+
NodeRedToggle: (typeof import("./components/node-red-toggle.vue"))["default"];
|
|
16
18
|
NodeRedJsonSchemaForm: (typeof import("./components/node-red-json-schema-form.vue"))["default"];
|
|
17
19
|
}
|
|
18
20
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
import type { Component } from "vue";
|
|
3
|
+
|
|
4
|
+
export interface NodeButtonDefinition {
|
|
5
|
+
toggle: string;
|
|
6
|
+
onclick: () => void;
|
|
7
|
+
enabled?: () => boolean;
|
|
8
|
+
visible?: () => boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface NodeFormDefinition {
|
|
12
|
+
component?: Component;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface NodeDefinition {
|
|
16
|
+
type: string;
|
|
17
|
+
category?: string;
|
|
18
|
+
color?: string;
|
|
19
|
+
icon?: ((this: any) => string) | string;
|
|
20
|
+
label?: ((this: any) => string) | string;
|
|
21
|
+
inputs?: number;
|
|
22
|
+
outputs?: number;
|
|
23
|
+
paletteLabel?: ((this: any) => string) | string;
|
|
24
|
+
labelStyle?: ((this: any) => string) | string;
|
|
25
|
+
inputLabels?: ((this: any) => string) | string;
|
|
26
|
+
outputLabels?: ((this: any) => string) | string;
|
|
27
|
+
align?: "left" | "right";
|
|
28
|
+
button?: NodeButtonDefinition;
|
|
29
|
+
onEditResize?: (this: any, size: { width: number; height: number }) => void;
|
|
30
|
+
onPaletteAdd?: (this: any) => void;
|
|
31
|
+
onPaletteRemove?: (this: any) => void;
|
|
32
|
+
form?: NodeFormDefinition;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export declare function defineNode<T extends NodeDefinition>(options: T): T;
|
|
36
|
+
export declare function registerType(definition: NodeDefinition): Promise<void>;
|
|
37
|
+
export declare function registerTypes(nodes: NodeDefinition[]): Promise<void>;
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v9.5.1
|
|
2
|
+
|
|
3
|
+
import { Http2ServerRequest } from 'http2';
|
|
4
|
+
|
|
5
|
+
export interface NodeRedRuntimeSettings {
|
|
6
|
+
userDir?: string;
|
|
7
|
+
nodesDir?: string | string[];
|
|
8
|
+
flowFile?: string;
|
|
9
|
+
flowFilePretty?: boolean;
|
|
10
|
+
credentialSecret?: string | false;
|
|
11
|
+
requireHttps?: boolean;
|
|
12
|
+
https?: {
|
|
13
|
+
key: string;
|
|
14
|
+
cert: string;
|
|
15
|
+
} | (() => Promise<{
|
|
16
|
+
key: string;
|
|
17
|
+
cert: string;
|
|
18
|
+
}> | {
|
|
19
|
+
key: string;
|
|
20
|
+
cert: string;
|
|
21
|
+
});
|
|
22
|
+
httpsRefreshInterval?: number;
|
|
23
|
+
httpAdminRoot?: string;
|
|
24
|
+
httpNodeRoot?: string;
|
|
25
|
+
httpNodeCors?: {
|
|
26
|
+
origin: string;
|
|
27
|
+
methods: string;
|
|
28
|
+
};
|
|
29
|
+
httpStatic?: string | {
|
|
30
|
+
path: string;
|
|
31
|
+
root: string;
|
|
32
|
+
}[];
|
|
33
|
+
httpStaticRoot?: string;
|
|
34
|
+
httpAdminMiddleware?: (req: unknown, res: unknown, next: () => void) => void;
|
|
35
|
+
httpNodeMiddleware?: (req: unknown, res: unknown, next: () => void) => void;
|
|
36
|
+
httpServerOptions?: Record<string, unknown>;
|
|
37
|
+
adminAuth?: {
|
|
38
|
+
type?: "credentials" | "strategy";
|
|
39
|
+
users?: {
|
|
40
|
+
username: string;
|
|
41
|
+
password: string;
|
|
42
|
+
permissions?: string | string[];
|
|
43
|
+
}[];
|
|
44
|
+
default?: {
|
|
45
|
+
permissions?: string | string[];
|
|
46
|
+
};
|
|
47
|
+
tokens?: (token: string) => Promise<{
|
|
48
|
+
user: string;
|
|
49
|
+
permissions: string | string[];
|
|
50
|
+
} | null>;
|
|
51
|
+
tokenHeader: "string";
|
|
52
|
+
sessionExpiryTime?: number;
|
|
53
|
+
[key: string]: unknown;
|
|
54
|
+
};
|
|
55
|
+
httpNodeAuth?: {
|
|
56
|
+
user?: string;
|
|
57
|
+
pass?: string;
|
|
58
|
+
};
|
|
59
|
+
httpStaticAuth?: {
|
|
60
|
+
user?: string;
|
|
61
|
+
pass?: string;
|
|
62
|
+
};
|
|
63
|
+
lang?: "en-US" | "de" | "es-ES" | "fr" | "ko" | "pt-BR" | "ru" | "ja" | "zh-CN" | "zh-TW";
|
|
64
|
+
diagnostics?: {
|
|
65
|
+
enabled?: boolean;
|
|
66
|
+
ui?: boolean;
|
|
67
|
+
};
|
|
68
|
+
runtimeState?: {
|
|
69
|
+
enabled?: boolean;
|
|
70
|
+
ui?: boolean;
|
|
71
|
+
};
|
|
72
|
+
disableEditor?: boolean;
|
|
73
|
+
editorTheme?: {
|
|
74
|
+
page?: {
|
|
75
|
+
title?: string;
|
|
76
|
+
favicon?: string;
|
|
77
|
+
css?: string | string[];
|
|
78
|
+
scripts?: string | string[];
|
|
79
|
+
};
|
|
80
|
+
header?: {
|
|
81
|
+
title?: string;
|
|
82
|
+
image?: string;
|
|
83
|
+
url?: string;
|
|
84
|
+
};
|
|
85
|
+
deployButton?: {
|
|
86
|
+
type?: "simple" | "default";
|
|
87
|
+
label?: string;
|
|
88
|
+
icon?: string;
|
|
89
|
+
};
|
|
90
|
+
menu?: {
|
|
91
|
+
"menu-item-import-library"?: boolean;
|
|
92
|
+
"menu-item-export-library"?: boolean;
|
|
93
|
+
"menu-item-keyboard-shortcuts"?: boolean;
|
|
94
|
+
"menu-item-help"?: {
|
|
95
|
+
label?: string;
|
|
96
|
+
url?: string;
|
|
97
|
+
};
|
|
98
|
+
[menuItem: string]: boolean | {
|
|
99
|
+
label?: string;
|
|
100
|
+
url?: string;
|
|
101
|
+
} | undefined;
|
|
102
|
+
};
|
|
103
|
+
userMenu?: boolean;
|
|
104
|
+
login?: {
|
|
105
|
+
image?: string;
|
|
106
|
+
};
|
|
107
|
+
logout?: {
|
|
108
|
+
redirect?: string;
|
|
109
|
+
};
|
|
110
|
+
palette?: {
|
|
111
|
+
catalogues?: string[];
|
|
112
|
+
categories?: string[];
|
|
113
|
+
theme?: {
|
|
114
|
+
category: string;
|
|
115
|
+
type: string;
|
|
116
|
+
color: string;
|
|
117
|
+
}[];
|
|
118
|
+
};
|
|
119
|
+
projects?: {
|
|
120
|
+
enabled?: boolean;
|
|
121
|
+
workflow?: {
|
|
122
|
+
mode: "manual" | "auto";
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
codeEditor?: {
|
|
126
|
+
lib?: "monaco" | "ace";
|
|
127
|
+
options?: Record<string, unknown>;
|
|
128
|
+
};
|
|
129
|
+
mermaid?: {
|
|
130
|
+
theme?: string;
|
|
131
|
+
};
|
|
132
|
+
tours?: boolean;
|
|
133
|
+
theme?: string;
|
|
134
|
+
[key: string]: unknown;
|
|
135
|
+
};
|
|
136
|
+
contextStorage?: {
|
|
137
|
+
default?: {
|
|
138
|
+
module?: "memory" | "localfilesystem" | object;
|
|
139
|
+
config?: Record<string, unknown>;
|
|
140
|
+
};
|
|
141
|
+
[store: string]: {
|
|
142
|
+
module?: "memory" | "localfilesystem" | object;
|
|
143
|
+
config?: Record<string, unknown>;
|
|
144
|
+
} | undefined;
|
|
145
|
+
};
|
|
146
|
+
exportGlobalContextKeys?: boolean;
|
|
147
|
+
logging?: {
|
|
148
|
+
console?: {
|
|
149
|
+
level?: "fatal" | "error" | "warn" | "info" | "debug" | "trace" | "off";
|
|
150
|
+
metrics?: boolean;
|
|
151
|
+
audit?: boolean;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
fileWorkingDirectory?: string;
|
|
155
|
+
functionExternalModules?: boolean;
|
|
156
|
+
functionGlobalContext?: Record<string, unknown>;
|
|
157
|
+
nodeMessageBufferMaxLength?: number;
|
|
158
|
+
functionTimeout?: number;
|
|
159
|
+
externalModules?: {
|
|
160
|
+
autoInstall?: boolean;
|
|
161
|
+
autoInstallRetry?: number;
|
|
162
|
+
palette?: {
|
|
163
|
+
allowInstall?: boolean;
|
|
164
|
+
allowUpdate?: boolean;
|
|
165
|
+
allowUpload?: boolean;
|
|
166
|
+
allowList?: string[];
|
|
167
|
+
denyList?: string[];
|
|
168
|
+
allowUpdateList?: string[];
|
|
169
|
+
denyUpdateList?: string[];
|
|
170
|
+
};
|
|
171
|
+
modules?: {
|
|
172
|
+
allowInstall?: boolean;
|
|
173
|
+
allowList?: string[];
|
|
174
|
+
denyList?: string[];
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
execMaxBufferSize?: number;
|
|
178
|
+
debugMaxLength?: number;
|
|
179
|
+
debugUseColors?: boolean;
|
|
180
|
+
httpRequestTimeout?: number;
|
|
181
|
+
mqttReconnectTime?: number;
|
|
182
|
+
serialReconnectTime?: number;
|
|
183
|
+
socketReconnectTime?: number;
|
|
184
|
+
socketTimeout?: number;
|
|
185
|
+
tcpMsgQueueSize?: number;
|
|
186
|
+
inboundWebSocketTimeout?: number;
|
|
187
|
+
tlsConfigDisableLocalFiles?: boolean;
|
|
188
|
+
webSocketNodeVerifyClient?: (info: {
|
|
189
|
+
origin: string;
|
|
190
|
+
req: Http2ServerRequest;
|
|
191
|
+
secure: boolean;
|
|
192
|
+
}) => boolean;
|
|
193
|
+
apiMaxLength?: string;
|
|
194
|
+
[key: string]: unknown;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Type-safe helper for defining Node-RED runtime settings.
|
|
198
|
+
*
|
|
199
|
+
* @example
|
|
200
|
+
* ```typescript
|
|
201
|
+
* import { defineRuntimeSettings } from "@bonsae/nrg";
|
|
202
|
+
*
|
|
203
|
+
* export default defineRuntimeSettings({
|
|
204
|
+
* flowFile: "flows.json",
|
|
205
|
+
* flowFilePretty: true,
|
|
206
|
+
* });
|
|
207
|
+
* ```
|
|
208
|
+
*/
|
|
209
|
+
export declare function defineRuntimeSettings(settings: NodeRedRuntimeSettings): NodeRedRuntimeSettings;
|
|
210
|
+
|
|
211
|
+
export {};
|