@bonsae/nrg 0.25.1 → 0.26.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 (34) hide show
  1. package/package.json +6 -4
  2. package/server/index.cjs +1413 -2
  3. package/server/resources/nrg-client.js +10 -0
  4. package/test/client/component/config.js +9 -9
  5. package/test/client/component/index.js +230 -42
  6. package/test/client/component/nrg.css +1 -0
  7. package/test/client/component/schemas.js +37 -0
  8. package/test/client/component/setup.js +1473 -198
  9. package/test/client/e2e/index.js +33 -35
  10. package/test/client/unit/index.js +17 -2
  11. package/test/server/integration/index.js +1222 -11
  12. package/test/server/unit/index.js +184 -2
  13. package/types/client.d.ts +1 -1
  14. package/types/server.d.ts +8 -2
  15. package/types/shims/components.d.ts +8 -8
  16. package/types/shims/{client → core/client}/types.d.ts +2 -2
  17. package/types/shims/core/schema-options.d.ts +24 -0
  18. package/types/shims/schema-options.d.ts +17 -17
  19. package/types/test-client-component-schemas.d.ts +73 -0
  20. package/types/test-client-component.d.ts +153 -7
  21. package/types/test-client-unit.d.ts +105 -4
  22. package/types/test-server-integration.d.ts +64 -63
  23. package/types/test-server-unit.d.ts +2 -1
  24. package/vite/index.js +33 -35
  25. /package/types/shims/{client → core/client}/form/components/node-red-config-input.vue.d.ts +0 -0
  26. /package/types/shims/{client → core/client}/form/components/node-red-editor-input.vue.d.ts +0 -0
  27. /package/types/shims/{client → core/client}/form/components/node-red-input-label.vue.d.ts +0 -0
  28. /package/types/shims/{client → core/client}/form/components/node-red-input.vue.d.ts +0 -0
  29. /package/types/shims/{client → core/client}/form/components/node-red-json-schema-form.vue.d.ts +0 -0
  30. /package/types/shims/{client → core/client}/form/components/node-red-select-input.vue.d.ts +0 -0
  31. /package/types/shims/{client → core/client}/form/components/node-red-toggle.vue.d.ts +0 -0
  32. /package/types/shims/{client → core/client}/form/components/node-red-typed-input.vue.d.ts +0 -0
  33. /package/types/shims/{constants.d.ts → core/constants.d.ts} +0 -0
  34. /package/types/shims/{brands.d.ts → core/types.d.ts} +0 -0
@@ -1,6 +1,7 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
- import { TSchema } from '@sinclair/typebox';
3
+ import { Static, TSchema } from '@sinclair/typebox';
4
+ import { App } from 'vue';
4
5
 
5
6
  export interface MockEditor {
6
7
  getValue(): string;
@@ -103,10 +104,110 @@ interface MockJQueryElement {
103
104
  type MockJQuery = (selector: any, attrs?: Record<string, any>) => MockJQueryElement;
104
105
  /** Build the `$` function the test harness assigns to `window.$`. */
105
106
  export declare function createJQuery(): MockJQuery;
106
- export declare function useFormNode<TConfig extends TSchema = TSchema, TCredentials extends TSchema = TSchema>(): {
107
- node: Record<string, any>;
107
+ interface NodeRefResolved<T = any> {
108
+ readonly __nrg_node_ref: true;
109
+ readonly __instance: T;
110
+ }
111
+ interface TypedInputResolved {
112
+ resolve(...args: any[]): any;
113
+ value: unknown;
114
+ type: string;
115
+ }
116
+ interface NodeRedNodeButtonDefinition {
117
+ toggle: string;
118
+ onclick: () => void;
119
+ enabled?: () => boolean;
120
+ visible?: () => boolean;
121
+ }
122
+ interface NodeRedNode {
123
+ id: string;
124
+ type: string;
125
+ name: string;
126
+ category: string;
127
+ x: string;
128
+ y: string;
129
+ g: string;
130
+ z: string;
131
+ credentials: Record<string, any>;
132
+ _def: {
133
+ defaults: Record<string, {
134
+ value: string;
135
+ type?: string;
136
+ label?: string;
137
+ required?: boolean;
138
+ }>;
139
+ credentials: Record<string, {
140
+ value: string;
141
+ type?: "password" | "text";
142
+ label?: string;
143
+ required?: boolean;
144
+ }>;
145
+ category: string;
146
+ color?: string;
147
+ icon?: string;
148
+ label?: ((this: NodeRedNode) => string) | string;
149
+ inputs?: number;
150
+ outputs?: number;
151
+ paletteLabel?: ((this: NodeRedNode) => string) | string;
152
+ labelStyle?: ((this: NodeRedNode) => string) | string;
153
+ inputLabels?: ((this: NodeRedNode, index: number) => string) | string;
154
+ outputLabels?: ((this: NodeRedNode, index: number) => string) | string;
155
+ align?: "left" | "right";
156
+ button?: NodeRedNodeButtonDefinition;
157
+ };
158
+ _newState?: NodeRedNode;
159
+ _app?: App | null;
160
+ _: (str: string) => string;
161
+ /** dynamic port count (base outputs + enabled built-in ports) */
162
+ outputs?: number;
163
+ /** injected when the node has an inputSchema */
164
+ validateInput?: boolean;
165
+ /** built-in port toggles, present when declared in the configSchema */
166
+ errorPort?: boolean;
167
+ completePort?: boolean;
168
+ statusPort?: boolean;
169
+ /**
170
+ * Per-port output settings, indexed by base-output port. `validateOutputs` is
171
+ * injected (empty) when the node has an outputsSchema; `outputReturnProperties`
172
+ * and `outputContextModes` are author-declared (SchemaType.*) — present only
173
+ * when the node opts into per-port return keys / context modes. Read at
174
+ * runtime by IONode.
175
+ */
176
+ validateOutputs?: Record<number, boolean>;
177
+ outputContextModes?: Record<number, "carry" | "trace" | "reset">;
178
+ outputReturnProperties?: Record<number, string>;
179
+ [key: string]: any;
180
+ }
181
+ interface TypedInputValue {
182
+ value: string;
183
+ type: string;
184
+ }
185
+ type EditorStatic<T> = T extends NodeRefResolved<any> ? string : T extends TypedInputResolved ? TypedInputValue : T extends (...args: any[]) => any ? T : T extends Array<infer I> ? EditorStatic<I>[] : T extends object ? {
186
+ [K in keyof T]: EditorStatic<T[K]>;
187
+ } : T;
188
+ interface FormNode<TConfig extends TSchema = TSchema, TCredentials extends TSchema = TSchema> {
189
+ node: NodeRedNode & EditorStatic<Static<TConfig>> & {
190
+ credentials: EditorStatic<Static<TCredentials>> & Record<string, any>;
191
+ };
108
192
  schema: Record<string, any>;
109
193
  errors: Record<string, string>;
110
- };
194
+ }
195
+ /**
196
+ * Composable that provides typed access to the form node, schema, and errors.
197
+ * Replaces `defineProps` in custom form components — no props declaration needed.
198
+ *
199
+ * @example
200
+ * ```vue
201
+ * <script setup lang="ts">
202
+ * import { useFormNode } from "@bonsae/nrg/client";
203
+ * import type { ConfigsSchema, CredentialsSchema } from "../../server/schemas/my-node";
204
+ *
205
+ * const { node, errors } = useFormNode<typeof ConfigsSchema, typeof CredentialsSchema>();
206
+ * node.name // string — typed from ConfigsSchema
207
+ * node.credentials.apiKey // string — typed from CredentialsSchema
208
+ * </script>
209
+ * ```
210
+ */
211
+ export declare function useFormNode<TConfig extends TSchema = TSchema, TCredentials extends TSchema = TSchema>(): FormNode<TConfig, TCredentials>;
111
212
 
112
213
  export {};
@@ -1,7 +1,8 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
- import { Static, TObject, TOptional, TProperties, TSchema, TString } from '@sinclair/typebox';
3
+ import { SchemaOptions, Static, TObject, TOptional, TProperties, TSchema, TString } from '@sinclair/typebox';
4
4
  import { EventEmitter } from 'events';
5
+ import { Express as Express$1 } from 'express';
5
6
  import { Http2ServerRequest } from 'http2';
6
7
 
7
8
  interface NodeRedRuntimeSettings {
@@ -201,68 +202,6 @@ declare const NodeConfigSchema: import("@sinclair/typebox").TObject<{
201
202
  name: import("@sinclair/typebox").TString;
202
203
  z: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
203
204
  }>;
204
- type Schema<T extends TProperties = TProperties> = TObject<T>;
205
- interface NodeContextStore {
206
- get<T = any>(key: string): Promise<T>;
207
- set<T = any>(key: string, value: T): Promise<void>;
208
- keys(): Promise<string[]>;
209
- /**
210
- * Atomically add `by` (default 1) to a numeric key and return the new value.
211
- * Prefer this over `get`+`set` for counters: it's atomic across instances when
212
- * the context store supports it (e.g. a DynamoDB `ADD` or Redis `INCR` store),
213
- * and serialized within the process otherwise — so concurrent messages never
214
- * lose updates.
215
- */
216
- increment(key: string, by?: number): Promise<number>;
217
- /**
218
- * Atomic read-modify-write: `fn(current)` returns the next value, applied
219
- * atomically (a conditional write + retry on a capable store, a per-key lock
220
- * otherwise). `fn` MAY run more than once on a write conflict, so keep it pure
221
- * (no side effects).
222
- */
223
- update<T = any>(key: string, fn: (current: T) => T | Promise<T>): Promise<T>;
224
- }
225
- interface NodeConstructor<T = any, TConfig = any, TCredentials = any> {
226
- readonly type: string;
227
- readonly category: string;
228
- readonly color?: string;
229
- readonly align?: "left" | "right";
230
- readonly inputs?: number;
231
- readonly outputs?: number;
232
- readonly configSchema?: Schema;
233
- readonly credentialsSchema?: Schema;
234
- readonly settingsSchema?: Schema;
235
- readonly inputSchema?: Schema;
236
- readonly outputsSchema?: TSchema | TSchema[] | Record<string, TSchema>;
237
- readonly validateInput?: boolean;
238
- readonly validateOutput?: boolean;
239
- readonly name: string;
240
- registered?(RED: RED): void | Promise<void>;
241
- register(RED: RED): void | Promise<void>;
242
- validateSettings(RED: RED): void;
243
- new (RED: RED, node: NodeRedNode, config: NodeConfig<TConfig>, credentials: NodeCredentials<TCredentials>): T;
244
- }
245
- type NodeConfig<TConfig = any> = TConfig & Static<typeof NodeConfigSchema>;
246
- type NodeCredentials<TCredentials = any> = TCredentials;
247
- interface INode<TConfig = any, TCredentials = any, TSettings = any> {
248
- readonly config: NodeConfig<TConfig>;
249
- readonly id: string;
250
- readonly name: string | undefined;
251
- readonly z: string | undefined;
252
- readonly credentials: NodeCredentials<TCredentials> | undefined;
253
- readonly settings: TSettings;
254
- i18n(key: string, substitutions?: Record<string, string>): string;
255
- setTimeout(fn: () => void, ms: number): NodeJS.Timeout;
256
- setInterval(fn: () => void, ms: number): NodeJS.Timeout;
257
- clearTimeout(timer: NodeJS.Timeout): void;
258
- clearInterval(interval: NodeJS.Timeout): void;
259
- on(event: string, callback: (...args: any[]) => void): void;
260
- log(msg: any): void;
261
- warn(message: string): void;
262
- error(message: string, msg?: any): void;
263
- created?(): void | Promise<void>;
264
- closed?(removed?: boolean): void | Promise<void>;
265
- }
266
205
  interface NodeRedLog {
267
206
  info(msg: any): void;
268
207
  warn(msg: any): void;
@@ -402,6 +341,68 @@ interface NodeRedContextStore {
402
341
  */
403
342
  update?(key: string, fn: (current: any) => any, store: string | undefined, callback: (err: Error | null, value: any) => void): void;
404
343
  }
344
+ type Schema<T extends TProperties = TProperties> = TObject<T>;
345
+ interface NodeContextStore {
346
+ get<T = any>(key: string): Promise<T>;
347
+ set<T = any>(key: string, value: T): Promise<void>;
348
+ keys(): Promise<string[]>;
349
+ /**
350
+ * Atomically add `by` (default 1) to a numeric key and return the new value.
351
+ * Prefer this over `get`+`set` for counters: it's atomic across instances when
352
+ * the context store supports it (e.g. a DynamoDB `ADD` or Redis `INCR` store),
353
+ * and serialized within the process otherwise — so concurrent messages never
354
+ * lose updates.
355
+ */
356
+ increment(key: string, by?: number): Promise<number>;
357
+ /**
358
+ * Atomic read-modify-write: `fn(current)` returns the next value, applied
359
+ * atomically (a conditional write + retry on a capable store, a per-key lock
360
+ * otherwise). `fn` MAY run more than once on a write conflict, so keep it pure
361
+ * (no side effects).
362
+ */
363
+ update<T = any>(key: string, fn: (current: T) => T | Promise<T>): Promise<T>;
364
+ }
365
+ interface NodeConstructor<T = any, TConfig = any, TCredentials = any> {
366
+ readonly type: string;
367
+ readonly category: string;
368
+ readonly color?: string;
369
+ readonly align?: "left" | "right";
370
+ readonly inputs?: number;
371
+ readonly outputs?: number;
372
+ readonly configSchema?: Schema;
373
+ readonly credentialsSchema?: Schema;
374
+ readonly settingsSchema?: Schema;
375
+ readonly inputSchema?: Schema;
376
+ readonly outputsSchema?: TSchema | TSchema[] | Record<string, TSchema>;
377
+ readonly validateInput?: boolean;
378
+ readonly validateOutput?: boolean;
379
+ readonly name: string;
380
+ registered?(RED: RED): void | Promise<void>;
381
+ register(RED: RED): void | Promise<void>;
382
+ validateSettings(RED: RED): void;
383
+ new (RED: RED, node: NodeRedNode, config: NodeConfig<TConfig>, credentials: NodeCredentials<TCredentials>): T;
384
+ }
385
+ type NodeConfig<TConfig = any> = TConfig & Static<typeof NodeConfigSchema>;
386
+ type NodeCredentials<TCredentials = any> = TCredentials;
387
+ interface INode<TConfig = any, TCredentials = any, TSettings = any> {
388
+ readonly config: NodeConfig<TConfig>;
389
+ readonly id: string;
390
+ readonly name: string | undefined;
391
+ readonly z: string | undefined;
392
+ readonly credentials: NodeCredentials<TCredentials> | undefined;
393
+ readonly settings: TSettings;
394
+ i18n(key: string, substitutions?: Record<string, string>): string;
395
+ setTimeout(fn: () => void, ms: number): NodeJS.Timeout;
396
+ setInterval(fn: () => void, ms: number): NodeJS.Timeout;
397
+ clearTimeout(timer: NodeJS.Timeout): void;
398
+ clearInterval(interval: NodeJS.Timeout): void;
399
+ on(event: string, callback: (...args: any[]) => void): void;
400
+ log(msg: any): void;
401
+ warn(message: string): void;
402
+ error(message: string, msg?: any): void;
403
+ created?(): void | Promise<void>;
404
+ closed?(removed?: boolean): void | Promise<void>;
405
+ }
405
406
  type Channel = "sent" | "received";
406
407
  declare class Recorder {
407
408
  #private;
@@ -1,7 +1,8 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
- import { Static, TObject, TOptional, TProperties, TSchema, TString } from '@sinclair/typebox';
3
+ import { SchemaOptions, Static, TObject, TOptional, TProperties, TSchema, TString } from '@sinclair/typebox';
4
4
  import { EventEmitter } from 'events';
5
+ import { Express as Express$1 } from 'express';
5
6
  import { Http2ServerRequest } from 'http2';
6
7
 
7
8
  interface NodeRedRuntimeSettings {
package/vite/index.js CHANGED
@@ -778,10 +778,7 @@ import dts from "vite-plugin-dts";
778
778
  import fs5 from "fs";
779
779
  import path4 from "path";
780
780
  import ts from "typescript";
781
- var RUNTIME_TYPE_REWRITES = {
782
- "@bonsae/nrg/server": "@bonsae/nrg-runtime/server",
783
- "@bonsae/nrg/client": "@bonsae/nrg-runtime/client"
784
- };
781
+ var RUNTIME_TYPE_REWRITES = {};
785
782
  function rewriteRuntimeTypeImports(outDir, entryNames) {
786
783
  for (const name of entryNames) {
787
784
  const dtsPath = path4.join(outDir, `${name}.d.ts`);
@@ -2216,7 +2213,7 @@ function localesGenerator(options) {
2216
2213
  "en-US": {
2217
2214
  configs: { name: "Name" },
2218
2215
  toggles: {
2219
- validateInput: "Validate",
2216
+ validateInput: "Validate Data",
2220
2217
  errorPort: "Error Port",
2221
2218
  completePort: "Complete Port",
2222
2219
  statusPort: "Status Port"
@@ -2230,7 +2227,7 @@ function localesGenerator(options) {
2230
2227
  outputs: {
2231
2228
  port: "Port",
2232
2229
  label: "Label",
2233
- validate: "Validate",
2230
+ validate: "Validate Data",
2234
2231
  returnProperty: "Return Property",
2235
2232
  contextMode: "Context Mode"
2236
2233
  },
@@ -2243,7 +2240,7 @@ function localesGenerator(options) {
2243
2240
  },
2244
2241
  help: {
2245
2242
  validateInput: "Validate incoming messages against the input schema before input() runs.",
2246
- outputs: "Per-port output settings. Validate checks the sent value against the port's schema; Context Mode controls how the incoming message is carried.",
2243
+ outputs: "Per-port output settings. Validate Data checks the sent value against the port's schema; Context Mode controls how the incoming message is carried.",
2247
2244
  lifecyclePorts: "Optional extra output ports that fire on error, on completion, and on every status change.",
2248
2245
  learnMore: "Learn more"
2249
2246
  }
@@ -2251,7 +2248,7 @@ function localesGenerator(options) {
2251
2248
  de: {
2252
2249
  configs: { name: "Name" },
2253
2250
  toggles: {
2254
- validateInput: "Validieren",
2251
+ validateInput: "Daten validieren",
2255
2252
  errorPort: "Fehler-Port",
2256
2253
  completePort: "Abschluss-Port",
2257
2254
  statusPort: "Status-Port"
@@ -2265,7 +2262,7 @@ function localesGenerator(options) {
2265
2262
  outputs: {
2266
2263
  port: "Port",
2267
2264
  label: "Bezeichnung",
2268
- validate: "Validieren",
2265
+ validate: "Daten validieren",
2269
2266
  returnProperty: "R\xFCckgabe-Eigenschaft",
2270
2267
  contextMode: "Kontextmodus"
2271
2268
  },
@@ -2278,7 +2275,7 @@ function localesGenerator(options) {
2278
2275
  },
2279
2276
  help: {
2280
2277
  validateInput: "Eingehende Nachrichten vor dem Ausf\xFChren von input() gegen das Eingabe-Schema validieren.",
2281
- outputs: "Ausgabe-Einstellungen pro Port. Validieren pr\xFCft den gesendeten Wert gegen das Schema des Ports; Kontextmodus steuert, wie die eingehende Nachricht \xFCbertragen wird.",
2278
+ outputs: "Ausgabe-Einstellungen pro Port. Daten validieren pr\xFCft den gesendeten Wert gegen das Schema des Ports; Kontextmodus steuert, wie die eingehende Nachricht \xFCbertragen wird.",
2282
2279
  lifecyclePorts: "Optionale zus\xE4tzliche Ausg\xE4nge, die bei Fehler, Abschluss und jeder Status\xE4nderung ausl\xF6sen.",
2283
2280
  learnMore: "Mehr erfahren"
2284
2281
  }
@@ -2286,7 +2283,7 @@ function localesGenerator(options) {
2286
2283
  "es-ES": {
2287
2284
  configs: { name: "Nombre" },
2288
2285
  toggles: {
2289
- validateInput: "Validar",
2286
+ validateInput: "Validar datos",
2290
2287
  errorPort: "Puerto de error",
2291
2288
  completePort: "Puerto de completado",
2292
2289
  statusPort: "Puerto de estado"
@@ -2300,7 +2297,7 @@ function localesGenerator(options) {
2300
2297
  outputs: {
2301
2298
  port: "Puerto",
2302
2299
  label: "Etiqueta",
2303
- validate: "Validar",
2300
+ validate: "Validar datos",
2304
2301
  returnProperty: "Propiedad de retorno",
2305
2302
  contextMode: "Modo de contexto"
2306
2303
  },
@@ -2313,7 +2310,7 @@ function localesGenerator(options) {
2313
2310
  },
2314
2311
  help: {
2315
2312
  validateInput: "Valida los mensajes entrantes con el esquema de entrada antes de ejecutar input().",
2316
- outputs: "Ajustes de salida por puerto. Validar comprueba el valor enviado con el esquema del puerto; Modo de contexto controla c\xF3mo se transporta el mensaje entrante.",
2313
+ outputs: "Ajustes de salida por puerto. Validar datos comprueba el valor enviado con el esquema del puerto; Modo de contexto controla c\xF3mo se transporta el mensaje entrante.",
2317
2314
  lifecyclePorts: "Puertos de salida adicionales opcionales que se activan en error, al completar y en cada cambio de estado.",
2318
2315
  learnMore: "M\xE1s informaci\xF3n"
2319
2316
  }
@@ -2321,7 +2318,7 @@ function localesGenerator(options) {
2321
2318
  fr: {
2322
2319
  configs: { name: "Nom" },
2323
2320
  toggles: {
2324
- validateInput: "Valider",
2321
+ validateInput: "Valider les donn\xE9es",
2325
2322
  errorPort: "Port d'erreur",
2326
2323
  completePort: "Port de compl\xE9tion",
2327
2324
  statusPort: "Port de statut"
@@ -2335,7 +2332,7 @@ function localesGenerator(options) {
2335
2332
  outputs: {
2336
2333
  port: "Port",
2337
2334
  label: "Libell\xE9",
2338
- validate: "Valider",
2335
+ validate: "Valider les donn\xE9es",
2339
2336
  returnProperty: "Propri\xE9t\xE9 de retour",
2340
2337
  contextMode: "Mode de contexte"
2341
2338
  },
@@ -2348,7 +2345,7 @@ function localesGenerator(options) {
2348
2345
  },
2349
2346
  help: {
2350
2347
  validateInput: "Valide les messages entrants avec le sch\xE9ma d'entr\xE9e avant l'ex\xE9cution de input().",
2351
- outputs: "R\xE9glages de sortie par port. Valider v\xE9rifie la valeur envoy\xE9e avec le sch\xE9ma du port ; Mode de contexte contr\xF4le la fa\xE7on dont le message entrant est transmis.",
2348
+ outputs: "R\xE9glages de sortie par port. Valider les donn\xE9es v\xE9rifie la valeur envoy\xE9e avec le sch\xE9ma du port ; Mode de contexte contr\xF4le la fa\xE7on dont le message entrant est transmis.",
2352
2349
  lifecyclePorts: "Ports de sortie suppl\xE9mentaires optionnels d\xE9clench\xE9s en cas d'erreur, \xE0 la fin et \xE0 chaque changement de statut.",
2353
2350
  learnMore: "En savoir plus"
2354
2351
  }
@@ -2356,7 +2353,7 @@ function localesGenerator(options) {
2356
2353
  ko: {
2357
2354
  configs: { name: "\uC774\uB984" },
2358
2355
  toggles: {
2359
- validateInput: "\uAC80\uC99D",
2356
+ validateInput: "\uB370\uC774\uD130 \uAC80\uC99D",
2360
2357
  errorPort: "\uC624\uB958 \uD3EC\uD2B8",
2361
2358
  completePort: "\uC644\uB8CC \uD3EC\uD2B8",
2362
2359
  statusPort: "\uC0C1\uD0DC \uD3EC\uD2B8"
@@ -2370,7 +2367,7 @@ function localesGenerator(options) {
2370
2367
  outputs: {
2371
2368
  port: "\uD3EC\uD2B8",
2372
2369
  label: "\uB808\uC774\uBE14",
2373
- validate: "\uAC80\uC99D",
2370
+ validate: "\uB370\uC774\uD130 \uAC80\uC99D",
2374
2371
  returnProperty: "\uBC18\uD658 \uC18D\uC131",
2375
2372
  contextMode: "\uCEE8\uD14D\uC2A4\uD2B8 \uBAA8\uB4DC"
2376
2373
  },
@@ -2383,7 +2380,7 @@ function localesGenerator(options) {
2383
2380
  },
2384
2381
  help: {
2385
2382
  validateInput: "input() \uC2E4\uD589 \uC804\uC5D0 \uB4E4\uC5B4\uC624\uB294 \uBA54\uC2DC\uC9C0\uB97C \uC785\uB825 \uC2A4\uD0A4\uB9C8\uB85C \uAC80\uC99D\uD569\uB2C8\uB2E4.",
2386
- outputs: "\uD3EC\uD2B8\uBCC4 \uCD9C\uB825 \uC124\uC815. \uAC80\uC99D\uC740 \uC804\uC1A1 \uAC12\uC744 \uD3EC\uD2B8 \uC2A4\uD0A4\uB9C8\uB85C \uD655\uC778\uD558\uACE0, \uCEE8\uD14D\uC2A4\uD2B8 \uBAA8\uB4DC\uB294 \uB4E4\uC5B4\uC628 \uBA54\uC2DC\uC9C0\uB97C \uC804\uB2EC\uD558\uB294 \uBC29\uC2DD\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.",
2383
+ outputs: "\uD3EC\uD2B8\uBCC4 \uCD9C\uB825 \uC124\uC815. \uB370\uC774\uD130 \uAC80\uC99D\uC740 \uC804\uC1A1 \uAC12\uC744 \uD3EC\uD2B8 \uC2A4\uD0A4\uB9C8\uB85C \uD655\uC778\uD558\uACE0, \uCEE8\uD14D\uC2A4\uD2B8 \uBAA8\uB4DC\uB294 \uB4E4\uC5B4\uC628 \uBA54\uC2DC\uC9C0\uB97C \uC804\uB2EC\uD558\uB294 \uBC29\uC2DD\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.",
2387
2384
  lifecyclePorts: "\uC624\uB958, \uC644\uB8CC, \uBAA8\uB4E0 \uC0C1\uD0DC \uBCC0\uACBD \uC2DC \uBC1C\uC0DD\uD558\uB294 \uC120\uD0DD\uC801 \uCD94\uAC00 \uCD9C\uB825 \uD3EC\uD2B8\uC785\uB2C8\uB2E4.",
2388
2385
  learnMore: "\uC790\uC138\uD788 \uBCF4\uAE30"
2389
2386
  }
@@ -2391,7 +2388,7 @@ function localesGenerator(options) {
2391
2388
  "pt-BR": {
2392
2389
  configs: { name: "Nome" },
2393
2390
  toggles: {
2394
- validateInput: "Validar",
2391
+ validateInput: "Validar dados",
2395
2392
  errorPort: "Porta de Erro",
2396
2393
  completePort: "Porta de Conclus\xE3o",
2397
2394
  statusPort: "Porta de Status"
@@ -2405,7 +2402,7 @@ function localesGenerator(options) {
2405
2402
  outputs: {
2406
2403
  port: "Porta",
2407
2404
  label: "R\xF3tulo",
2408
- validate: "Validar",
2405
+ validate: "Validar dados",
2409
2406
  returnProperty: "Propriedade de retorno",
2410
2407
  contextMode: "Modo de contexto"
2411
2408
  },
@@ -2418,7 +2415,7 @@ function localesGenerator(options) {
2418
2415
  },
2419
2416
  help: {
2420
2417
  validateInput: "Valida as mensagens recebidas com o esquema de entrada antes de input() executar.",
2421
- outputs: "Configura\xE7\xF5es de sa\xEDda por porta. Validar verifica o valor enviado com o esquema da porta; Modo de contexto controla como a mensagem recebida \xE9 transportada.",
2418
+ outputs: "Configura\xE7\xF5es de sa\xEDda por porta. Validar dados verifica o valor enviado com o esquema da porta; Modo de contexto controla como a mensagem recebida \xE9 transportada.",
2422
2419
  lifecyclePorts: "Portas de sa\xEDda extras opcionais que disparam em erro, na conclus\xE3o e a cada mudan\xE7a de status.",
2423
2420
  learnMore: "Saiba mais"
2424
2421
  }
@@ -2426,7 +2423,7 @@ function localesGenerator(options) {
2426
2423
  ru: {
2427
2424
  configs: { name: "\u0418\u043C\u044F" },
2428
2425
  toggles: {
2429
- validateInput: "\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0442\u044C",
2426
+ validateInput: "\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0442\u044C \u0434\u0430\u043D\u043D\u044B\u0435",
2430
2427
  errorPort: "\u041F\u043E\u0440\u0442 \u043E\u0448\u0438\u0431\u043A\u0438",
2431
2428
  completePort: "\u041F\u043E\u0440\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F",
2432
2429
  statusPort: "\u041F\u043E\u0440\u0442 \u0441\u0442\u0430\u0442\u0443\u0441\u0430"
@@ -2440,7 +2437,7 @@ function localesGenerator(options) {
2440
2437
  outputs: {
2441
2438
  port: "\u041F\u043E\u0440\u0442",
2442
2439
  label: "\u041C\u0435\u0442\u043A\u0430",
2443
- validate: "\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0442\u044C",
2440
+ validate: "\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0442\u044C \u0434\u0430\u043D\u043D\u044B\u0435",
2444
2441
  returnProperty: "\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u043E \u0432\u043E\u0437\u0432\u0440\u0430\u0442\u0430",
2445
2442
  contextMode: "\u0420\u0435\u0436\u0438\u043C \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0430"
2446
2443
  },
@@ -2453,7 +2450,7 @@ function localesGenerator(options) {
2453
2450
  },
2454
2451
  help: {
2455
2452
  validateInput: "\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0442\u044C \u0432\u0445\u043E\u0434\u044F\u0449\u0438\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043F\u043E \u0441\u0445\u0435\u043C\u0435 \u0432\u0432\u043E\u0434\u0430 \u043F\u0435\u0440\u0435\u0434 \u0432\u044B\u0437\u043E\u0432\u043E\u043C input().",
2456
- outputs: "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0432\u044B\u0432\u043E\u0434\u0430 \u0434\u043B\u044F \u043A\u0430\u0436\u0434\u043E\u0433\u043E \u043F\u043E\u0440\u0442\u0430. \xAB\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0442\u044C\xBB \u0441\u0432\u0435\u0440\u044F\u0435\u0442 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0441\u043E \u0441\u0445\u0435\u043C\u043E\u0439 \u043F\u043E\u0440\u0442\u0430; \xAB\u0420\u0435\u0436\u0438\u043C \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0430\xBB \u0443\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0442\u0435\u043C, \u043A\u0430\u043A \u043F\u0435\u0440\u0435\u043D\u043E\u0441\u0438\u0442\u0441\u044F \u0432\u0445\u043E\u0434\u044F\u0449\u0435\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435.",
2453
+ outputs: "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0432\u044B\u0432\u043E\u0434\u0430 \u0434\u043B\u044F \u043A\u0430\u0436\u0434\u043E\u0433\u043E \u043F\u043E\u0440\u0442\u0430. \xAB\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0442\u044C \u0434\u0430\u043D\u043D\u044B\u0435\xBB \u0441\u0432\u0435\u0440\u044F\u0435\u0442 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0441\u043E \u0441\u0445\u0435\u043C\u043E\u0439 \u043F\u043E\u0440\u0442\u0430; \xAB\u0420\u0435\u0436\u0438\u043C \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0430\xBB \u0443\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0442\u0435\u043C, \u043A\u0430\u043A \u043F\u0435\u0440\u0435\u043D\u043E\u0441\u0438\u0442\u0441\u044F \u0432\u0445\u043E\u0434\u044F\u0449\u0435\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435.",
2457
2454
  lifecyclePorts: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u043D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0432\u044B\u0445\u043E\u0434\u043D\u044B\u0435 \u043F\u043E\u0440\u0442\u044B, \u0441\u0440\u0430\u0431\u0430\u0442\u044B\u0432\u0430\u044E\u0449\u0438\u0435 \u043F\u0440\u0438 \u043E\u0448\u0438\u0431\u043A\u0435, \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u0438 \u0438 \u043A\u0430\u0436\u0434\u043E\u043C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0430.",
2458
2455
  learnMore: "\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435"
2459
2456
  }
@@ -2461,7 +2458,7 @@ function localesGenerator(options) {
2461
2458
  ja: {
2462
2459
  configs: { name: "\u540D\u524D" },
2463
2460
  toggles: {
2464
- validateInput: "\u691C\u8A3C",
2461
+ validateInput: "\u30C7\u30FC\u30BF\u3092\u691C\u8A3C",
2465
2462
  errorPort: "\u30A8\u30E9\u30FC\u30DD\u30FC\u30C8",
2466
2463
  completePort: "\u5B8C\u4E86\u30DD\u30FC\u30C8",
2467
2464
  statusPort: "\u30B9\u30C6\u30FC\u30BF\u30B9\u30DD\u30FC\u30C8"
@@ -2475,7 +2472,7 @@ function localesGenerator(options) {
2475
2472
  outputs: {
2476
2473
  port: "\u30DD\u30FC\u30C8",
2477
2474
  label: "\u30E9\u30D9\u30EB",
2478
- validate: "\u691C\u8A3C",
2475
+ validate: "\u30C7\u30FC\u30BF\u3092\u691C\u8A3C",
2479
2476
  returnProperty: "\u623B\u308A\u30D7\u30ED\u30D1\u30C6\u30A3",
2480
2477
  contextMode: "\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30E2\u30FC\u30C9"
2481
2478
  },
@@ -2488,7 +2485,7 @@ function localesGenerator(options) {
2488
2485
  },
2489
2486
  help: {
2490
2487
  validateInput: "input() \u306E\u5B9F\u884C\u524D\u306B\u3001\u53D7\u4FE1\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u5165\u529B\u30B9\u30AD\u30FC\u30DE\u3067\u691C\u8A3C\u3057\u307E\u3059\u3002",
2491
- outputs: "\u30DD\u30FC\u30C8\u3054\u3068\u306E\u51FA\u529B\u8A2D\u5B9A\u3002\u691C\u8A3C\u306F\u9001\u4FE1\u5024\u3092\u30DD\u30FC\u30C8\u306E\u30B9\u30AD\u30FC\u30DE\u3067\u78BA\u8A8D\u3057\u3001\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30E2\u30FC\u30C9\u306F\u53D7\u4FE1\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u5F15\u304D\u7D99\u304E\u65B9\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002",
2488
+ outputs: "\u30DD\u30FC\u30C8\u3054\u3068\u306E\u51FA\u529B\u8A2D\u5B9A\u3002\u30C7\u30FC\u30BF\u306E\u691C\u8A3C\u306F\u9001\u4FE1\u5024\u3092\u30DD\u30FC\u30C8\u306E\u30B9\u30AD\u30FC\u30DE\u3067\u78BA\u8A8D\u3057\u3001\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30E2\u30FC\u30C9\u306F\u53D7\u4FE1\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u5F15\u304D\u7D99\u304E\u65B9\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002",
2492
2489
  lifecyclePorts: "\u30A8\u30E9\u30FC\u6642\u30FB\u5B8C\u4E86\u6642\u30FB\u30B9\u30C6\u30FC\u30BF\u30B9\u5909\u66F4\u3054\u3068\u306B\u767A\u706B\u3059\u308B\u4EFB\u610F\u306E\u8FFD\u52A0\u51FA\u529B\u30DD\u30FC\u30C8\u3002",
2493
2490
  learnMore: "\u8A73\u7D30"
2494
2491
  }
@@ -2496,7 +2493,7 @@ function localesGenerator(options) {
2496
2493
  "zh-CN": {
2497
2494
  configs: { name: "\u540D\u79F0" },
2498
2495
  toggles: {
2499
- validateInput: "\u9A8C\u8BC1",
2496
+ validateInput: "\u9A8C\u8BC1\u6570\u636E",
2500
2497
  errorPort: "\u9519\u8BEF\u7AEF\u53E3",
2501
2498
  completePort: "\u5B8C\u6210\u7AEF\u53E3",
2502
2499
  statusPort: "\u72B6\u6001\u7AEF\u53E3"
@@ -2510,7 +2507,7 @@ function localesGenerator(options) {
2510
2507
  outputs: {
2511
2508
  port: "\u7AEF\u53E3",
2512
2509
  label: "\u6807\u7B7E",
2513
- validate: "\u9A8C\u8BC1",
2510
+ validate: "\u9A8C\u8BC1\u6570\u636E",
2514
2511
  returnProperty: "\u8FD4\u56DE\u5C5E\u6027",
2515
2512
  contextMode: "\u4E0A\u4E0B\u6587\u6A21\u5F0F"
2516
2513
  },
@@ -2523,7 +2520,7 @@ function localesGenerator(options) {
2523
2520
  },
2524
2521
  help: {
2525
2522
  validateInput: "\u5728 input() \u8FD0\u884C\u524D\uFF0C\u6839\u636E\u8F93\u5165\u6A21\u5F0F\u6821\u9A8C\u4F20\u5165\u6D88\u606F\u3002",
2526
- outputs: "\u6309\u7AEF\u53E3\u7684\u8F93\u51FA\u8BBE\u7F6E\u3002\u9A8C\u8BC1\u6839\u636E\u7AEF\u53E3\u6A21\u5F0F\u6821\u9A8C\u53D1\u9001\u7684\u503C\uFF1B\u4E0A\u4E0B\u6587\u6A21\u5F0F\u63A7\u5236\u5982\u4F55\u643A\u5E26\u4F20\u5165\u6D88\u606F\u3002",
2523
+ outputs: "\u6309\u7AEF\u53E3\u7684\u8F93\u51FA\u8BBE\u7F6E\u3002\u9A8C\u8BC1\u6570\u636E\u6839\u636E\u7AEF\u53E3\u6A21\u5F0F\u6821\u9A8C\u53D1\u9001\u7684\u503C\uFF1B\u4E0A\u4E0B\u6587\u6A21\u5F0F\u63A7\u5236\u5982\u4F55\u643A\u5E26\u4F20\u5165\u6D88\u606F\u3002",
2527
2524
  lifecyclePorts: "\u53EF\u9009\u7684\u989D\u5916\u8F93\u51FA\u7AEF\u53E3\uFF0C\u5728\u51FA\u9519\u3001\u5B8C\u6210\u4EE5\u53CA\u6BCF\u6B21\u72B6\u6001\u53D8\u5316\u65F6\u89E6\u53D1\u3002",
2528
2525
  learnMore: "\u4E86\u89E3\u66F4\u591A"
2529
2526
  }
@@ -2531,7 +2528,7 @@ function localesGenerator(options) {
2531
2528
  "zh-TW": {
2532
2529
  configs: { name: "\u540D\u7A31" },
2533
2530
  toggles: {
2534
- validateInput: "\u9A57\u8B49",
2531
+ validateInput: "\u9A57\u8B49\u8CC7\u6599",
2535
2532
  errorPort: "\u932F\u8AA4\u7AEF\u53E3",
2536
2533
  completePort: "\u5B8C\u6210\u7AEF\u53E3",
2537
2534
  statusPort: "\u72C0\u614B\u7AEF\u53E3"
@@ -2545,7 +2542,7 @@ function localesGenerator(options) {
2545
2542
  outputs: {
2546
2543
  port: "\u7AEF\u53E3",
2547
2544
  label: "\u6A19\u7C64",
2548
- validate: "\u9A57\u8B49",
2545
+ validate: "\u9A57\u8B49\u8CC7\u6599",
2549
2546
  returnProperty: "\u8FD4\u56DE\u5C6C\u6027",
2550
2547
  contextMode: "\u5167\u5BB9\u6A21\u5F0F"
2551
2548
  },
@@ -2558,7 +2555,7 @@ function localesGenerator(options) {
2558
2555
  },
2559
2556
  help: {
2560
2557
  validateInput: "\u5728 input() \u57F7\u884C\u524D\uFF0C\u4F9D\u8F38\u5165\u7D50\u69CB\u63CF\u8FF0\u9A57\u8B49\u50B3\u5165\u8A0A\u606F\u3002",
2561
- outputs: "\u4F9D\u9023\u63A5\u57E0\u7684\u8F38\u51FA\u8A2D\u5B9A\u3002\u9A57\u8B49\u4F9D\u9023\u63A5\u57E0\u7D50\u69CB\u63CF\u8FF0\u6AA2\u67E5\u9001\u51FA\u7684\u503C\uFF1B\u5167\u5BB9\u6A21\u5F0F\u63A7\u5236\u5982\u4F55\u651C\u5E36\u50B3\u5165\u8A0A\u606F\u3002",
2558
+ outputs: "\u4F9D\u9023\u63A5\u57E0\u7684\u8F38\u51FA\u8A2D\u5B9A\u3002\u9A57\u8B49\u8CC7\u6599\u4F9D\u9023\u63A5\u57E0\u7D50\u69CB\u63CF\u8FF0\u6AA2\u67E5\u9001\u51FA\u7684\u503C\uFF1B\u5167\u5BB9\u6A21\u5F0F\u63A7\u5236\u5982\u4F55\u651C\u5E36\u50B3\u5165\u8A0A\u606F\u3002",
2562
2559
  lifecyclePorts: "\u53EF\u9078\u7684\u984D\u5916\u8F38\u51FA\u9023\u63A5\u57E0\uFF0C\u5728\u767C\u751F\u932F\u8AA4\u3001\u5B8C\u6210\u4EE5\u53CA\u6BCF\u6B21\u72C0\u614B\u8B8A\u66F4\u6642\u89F8\u767C\u3002",
2563
2560
  learnMore: "\u77AD\u89E3\u66F4\u591A"
2564
2561
  }
@@ -2730,11 +2727,12 @@ function resolveIcon(iconsDir, type) {
2730
2727
  }
2731
2728
  var RUNTIME_SPECIFIER = "@bonsae/nrg-runtime/server";
2732
2729
  var RUNTIME_SPECIFIER_RE = /(['"])@bonsae\/nrg-runtime\/server\1/g;
2730
+ var TOOLKIT_SERVER_SPECIFIER = "@bonsae/nrg/server";
2733
2731
  function resolveRuntimeServer(serverOutDir) {
2734
2732
  const roots = [path11.join(serverOutDir, "index.js"), import.meta.url];
2735
2733
  for (const root of roots) {
2736
2734
  try {
2737
- return createRequire3(root).resolve(RUNTIME_SPECIFIER);
2735
+ return createRequire3(root).resolve(TOOLKIT_SERVER_SPECIFIER);
2738
2736
  } catch {
2739
2737
  }
2740
2738
  }
File without changes