@bonsae/nrg 0.20.0 → 0.21.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/server.d.ts CHANGED
@@ -491,18 +491,18 @@ type InferOutputs<T> = T extends readonly TSchema[] ? {
491
491
  } : any;
492
492
  declare function NodeRef<T extends new (...args: any[]) => any>(nodeClass: T, options?: NrgSchemaOptions): TNodeRef<InstanceType<T>>;
493
493
  declare function TypedInput$1<T = unknown>(options?: NrgSchemaOptions): TTypedInput<T>;
494
- declare function ReturnProperty(options?: NrgSchemaOptions & {
495
- default?: string;
496
- }): import("@sinclair/typebox").TString;
494
+ declare function OutputReturnProperties(options?: NrgSchemaOptions & {
495
+ default?: Record<number, string>;
496
+ }): import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString>;
497
497
  /**
498
498
  * Extended TypeBox type builder with NRG-specific schema types.
499
499
  * Includes all standard TypeBox types plus {@link NodeRef}, {@link TypedInput}
500
- * and {@link ReturnProperty}.
500
+ * and {@link OutputReturnProperties}.
501
501
  */
502
502
  export declare const SchemaType: import("@sinclair/typebox").JavaScriptTypeBuilder & {
503
503
  NodeRef: typeof NodeRef;
504
504
  TypedInput: typeof TypedInput$1;
505
- ReturnProperty: typeof ReturnProperty;
505
+ OutputReturnProperties: typeof OutputReturnProperties;
506
506
  };
507
507
  /**
508
508
  * Creates a validated object schema from a set of properties. Automatically
@@ -614,31 +614,43 @@ declare abstract class Node$1<TConfig = any, TCredentials = any, TSettings = any
614
614
  get credentials(): NodeCredentials<TCredentials> | undefined;
615
615
  get settings(): TSettings;
616
616
  }
617
+ type SendOptions = {
618
+ /**
619
+ * Node-author default for how the outgoing message carries the incoming
620
+ * context. The flow author's per-port override (when set) wins; otherwise
621
+ * this is used, falling back to `"carry"` when omitted.
622
+ */
623
+ defaultMode?: ContextMode;
624
+ };
617
625
  /**
618
626
  * Controls how an outgoing message carries the incoming message's context:
619
- * - `"nest"` (default): keep all incoming keys and push the full input under
620
- * `input`, so the prior message including any value the result overwrites
621
- * is always recoverable (`msg.input.output`). The `input` chain
622
- * accumulates one frame per node, forming a provenance trail visible in the
623
- * debug panel.
624
- * - `"carry"`: keep all incoming keys (including any upstream `input`) but do
625
- * not record this node context flows through without growing.
627
+ * - `"carry"` (default): keep all incoming keys including any upstream
628
+ * `input` but do not record this node, so context flows through without the
629
+ * provenance chain growing. The safe default for loops and long chains.
630
+ * - `"trace"`: keep all incoming keys and also push the full input under
631
+ * `input`, so the prior message — including any value the result overwrites —
632
+ * stays recoverable (`msg.input.output`). The chain accumulates one frame per
633
+ * node, a provenance trail visible in the debug panel; opt in for linear
634
+ * flows that want full lineage.
626
635
  * - `"reset"`: drop all inherited context; the outgoing message is only the
627
636
  * result at the return key.
628
637
  */
629
- export type ContextMode = "nest" | "carry" | "reset";
638
+ export type ContextMode = "carry" | "trace" | "reset";
630
639
  /**
631
640
  * Base class for nodes that process messages. Provides input/output handling,
632
641
  * schema validation, status updates, and emit port management.
633
642
  *
634
643
  * Every node has a return key (`"output"` by default): the value passed to
635
- * `send()` is merged into the incoming message at that key and the full prior
636
- * message is kept under `input` (`{ ...msg, [returnKey]: result, input: msg }`),
637
- * so upstream properties propagate and the provenance chain is recoverable.
638
- * Declaring `returnProperty` in the `configSchema` only lets the flow author
639
- * override the key in the editor it does not change that a return key always
640
- * exists. `this.send(x)` always means "x is the result", never "x is the whole
641
- * message".
644
+ * `send()` is merged into the incoming message at that key
645
+ * (`{ ...msg, [returnKey]: result }`), so upstream properties propagate. By
646
+ * default the context is carried without growing; pass
647
+ * `{ defaultMode: "trace" }` to also keep the full prior message under `input`
648
+ * as a recoverable provenance chain. The return key, output validation, and
649
+ * context mode all resolve per output port; declaring
650
+ * `outputReturnProperties` in the `configSchema` sets per-port default keys and
651
+ * lets the flow author pick a key other than `output` per port — it does not
652
+ * change that a return key always exists. `this.send(x)` always means "x is the result", never "x is the
653
+ * whole message".
642
654
  *
643
655
  * @example
644
656
  * ```ts
@@ -648,7 +660,7 @@ export type ContextMode = "nest" | "carry" | "reset";
648
660
  * static readonly color = "#ffffff" as const;
649
661
  *
650
662
  * async input(msg: Input) {
651
- * // sends { ...msg, output: <result>, input: msg }
663
+ * // sends { ...msg, output: <result> }
652
664
  * this.send(msg.output.toUpperCase());
653
665
  * }
654
666
  * }
@@ -669,7 +681,7 @@ export declare abstract class IONode<TConfig = any, TCredentials = any, TInput =
669
681
  constructor(RED: RED, node: NodeRedNode, config: IONodeConfig<TConfig>, credentials: IONodeCredentials<TCredentials>);
670
682
  [WIRE_HANDLERS](nodeRedNode: NodeRedNode, createdPromise: Promise<void>): void;
671
683
  input(msg: TInput): void | Promise<void>;
672
- send(msg: TOutput, contextMode?: ContextMode): void;
684
+ send(msg: TOutput, options?: SendOptions): void;
673
685
  get baseOutputs(): number;
674
686
  get totalOutputs(): number;
675
687
  /**
@@ -682,7 +694,7 @@ export declare abstract class IONode<TConfig = any, TCredentials = any, TInput =
682
694
  * throw an error or call `this.error()` for the error port, and the complete
683
695
  * port is sent automatically on successful input processing.
684
696
  */
685
- sendToPort<P extends (TOutput extends Record<string, Record<string, any>> ? keyof TOutput & string : never) | number>(port: P, msg: P extends keyof TOutput ? TOutput[P] : unknown, contextMode?: ContextMode): void;
697
+ sendToPort<P extends (TOutput extends Record<string, Record<string, any>> ? keyof TOutput & string : never) | number>(port: P, msg: P extends keyof TOutput ? TOutput[P] : unknown, options?: SendOptions): void;
686
698
  status(status: IONodeStatus): void;
687
699
  error(message: string, msg?: any): void;
688
700
  updateWires(wires: string[][]): void;
@@ -696,8 +708,12 @@ export declare abstract class IONode<TConfig = any, TCredentials = any, TInput =
696
708
  type IONodeContextScope = NodeContextScope;
697
709
  type IONodeConfig<TConfig = any> = NodeConfig<TConfig> & Static<typeof IONodeConfigSchema> & {
698
710
  validateInput?: boolean;
699
- validateOutput?: boolean;
700
- returnProperty?: string;
711
+ /** Per-port output-validation flags, keyed by base-output port index. */
712
+ validateOutputs?: Record<number, boolean>;
713
+ /** Per-port return properties, keyed by base-output port index. */
714
+ outputReturnProperties?: Record<number, string>;
715
+ /** Per-port context modes, keyed by base-output port index. */
716
+ contextModes?: Record<number, "carry" | "trace" | "reset">;
701
717
  };
702
718
  type IONodeCredentials<TCredentials = any> = NodeCredentials<TCredentials>;
703
719
  type IONodeStatus = {
@@ -68,14 +68,19 @@ export interface NodeRedNode {
68
68
  outputs?: number;
69
69
  /** injected when the node has an inputSchema */
70
70
  validateInput?: boolean;
71
- /** injected when the node has an outputsSchema */
72
- validateOutput?: boolean;
73
- /** present when the node's configSchema declares SchemaType.ReturnProperty() */
74
- returnProperty?: string;
75
71
  /** built-in port toggles, present when declared in the configSchema */
76
72
  errorPort?: boolean;
77
73
  completePort?: boolean;
78
74
  statusPort?: boolean;
75
+ /**
76
+ * Per-port output settings, indexed by base-output port; injected (empty) when
77
+ * the node has an outputsSchema. Read at runtime by IONode.
78
+ * `outputReturnProperties` is author-declared (SchemaType.OutputReturnProperties)
79
+ * — present only when the node opts into per-port return keys.
80
+ */
81
+ validateOutputs?: Record<number, boolean>;
82
+ contextModes?: Record<number, "carry" | "trace" | "reset">;
83
+ outputReturnProperties?: Record<number, string>;
79
84
  [key: string]: any;
80
85
  }
81
86
  export interface NodeDefinition {
@@ -170,6 +175,14 @@ export interface NodeCredentials {
170
175
  export interface NodeFeatures {
171
176
  hasInputSchema: boolean;
172
177
  hasOutputSchema: boolean;
178
+ /**
179
+ * Base output ports (excludes built-in error/complete/status), in port-index
180
+ * order. Drives the per-port context-mode rows in the Outputs subsection.
181
+ */
182
+ outputPorts: {
183
+ index: number;
184
+ label: string;
185
+ }[];
173
186
  }
174
187
  /** Client-side representation of a TypedInput field: the raw value string and its type selector. */
175
188
  export interface TypedInputValue {
@@ -80,14 +80,19 @@ interface NodeRedNode {
80
80
  outputs?: number;
81
81
  /** injected when the node has an inputSchema */
82
82
  validateInput?: boolean;
83
- /** injected when the node has an outputsSchema */
84
- validateOutput?: boolean;
85
- /** present when the node's configSchema declares SchemaType.ReturnProperty() */
86
- returnProperty?: string;
87
83
  /** built-in port toggles, present when declared in the configSchema */
88
84
  errorPort?: boolean;
89
85
  completePort?: boolean;
90
86
  statusPort?: boolean;
87
+ /**
88
+ * Per-port output settings, indexed by base-output port; injected (empty) when
89
+ * the node has an outputsSchema. Read at runtime by IONode.
90
+ * `outputReturnProperties` is author-declared (SchemaType.OutputReturnProperties)
91
+ * — present only when the node opts into per-port return keys.
92
+ */
93
+ validateOutputs?: Record<number, boolean>;
94
+ contextModes?: Record<number, "carry" | "trace" | "reset">;
95
+ outputReturnProperties?: Record<number, string>;
91
96
  [key: string]: any;
92
97
  }
93
98
  interface JsonPropertySchema extends JsonSchemaObjectExtensions {
@@ -155,14 +155,19 @@ interface NodeRedNode {
155
155
  outputs?: number;
156
156
  /** injected when the node has an inputSchema */
157
157
  validateInput?: boolean;
158
- /** injected when the node has an outputsSchema */
159
- validateOutput?: boolean;
160
- /** present when the node's configSchema declares SchemaType.ReturnProperty() */
161
- returnProperty?: string;
162
158
  /** built-in port toggles, present when declared in the configSchema */
163
159
  errorPort?: boolean;
164
160
  completePort?: boolean;
165
161
  statusPort?: boolean;
162
+ /**
163
+ * Per-port output settings, indexed by base-output port; injected (empty) when
164
+ * the node has an outputsSchema. Read at runtime by IONode.
165
+ * `outputReturnProperties` is author-declared (SchemaType.OutputReturnProperties)
166
+ * — present only when the node opts into per-port return keys.
167
+ */
168
+ validateOutputs?: Record<number, boolean>;
169
+ contextModes?: Record<number, "carry" | "trace" | "reset">;
170
+ outputReturnProperties?: Record<number, string>;
166
171
  [key: string]: any;
167
172
  }
168
173
  interface TypedInputValue {
package/types/vite.d.ts CHANGED
@@ -182,4 +182,4 @@ export interface ServerPluginOptions {
182
182
  export {};
183
183
 
184
184
  import type { Plugin } from "vite";
185
- export declare function nodeRed(options?: NodeRedPluginOptions): Plugin[];
185
+ export declare function nrg(options?: NrgPluginOptions): Plugin[];
package/vite/index.js CHANGED
@@ -2038,113 +2038,363 @@ function localesGenerator(options) {
2038
2038
  ];
2039
2039
  const frameworkLabels = {
2040
2040
  "en-US": {
2041
- configs: { name: "Name", returnProperty: "Return key" },
2041
+ configs: { name: "Name" },
2042
2042
  toggles: {
2043
- validateInput: "Validate Input",
2044
- validateOutput: "Validate Output",
2043
+ validateInput: "Validate",
2045
2044
  errorPort: "Error Port",
2046
2045
  completePort: "Complete Port",
2047
- statusPort: "Status Port",
2048
- returnPropertyOverride: "Override return prop key"
2046
+ statusPort: "Status Port"
2047
+ },
2048
+ sections: {
2049
+ portsSettings: "Ports Settings",
2050
+ input: "Input",
2051
+ outputs: "Outputs",
2052
+ lifecyclePorts: "Lifecycle Ports"
2053
+ },
2054
+ outputs: {
2055
+ port: "Port",
2056
+ label: "Label",
2057
+ validate: "Validate",
2058
+ returnProperty: "Return Property",
2059
+ contextMode: "Context Mode"
2060
+ },
2061
+ contextModes: {
2062
+ modes: {
2063
+ default: "Default",
2064
+ carry: "carry",
2065
+ trace: "trace",
2066
+ reset: "reset"
2067
+ }
2068
+ },
2069
+ help: {
2070
+ validateInput: "Validate incoming messages against the input schema before input() runs.",
2071
+ outputs: "Per-port output settings. Validate checks the sent value against the port's schema; Context Mode controls how the incoming message is carried.",
2072
+ lifecyclePorts: "Optional extra output ports that fire on error, on completion, and on every status change.",
2073
+ learnMore: "Learn more"
2049
2074
  }
2050
2075
  },
2051
2076
  de: {
2052
- configs: { name: "Name", returnProperty: "R\xFCckgabe-Schl\xFCssel" },
2077
+ configs: { name: "Name" },
2053
2078
  toggles: {
2054
- validateInput: "Eingabe validieren",
2055
- validateOutput: "Ausgabe validieren",
2079
+ validateInput: "Validieren",
2056
2080
  errorPort: "Fehler-Port",
2057
2081
  completePort: "Abschluss-Port",
2058
- statusPort: "Status-Port",
2059
- returnPropertyOverride: "R\xFCckgabe-Schl\xFCssel \xFCberschreiben"
2082
+ statusPort: "Status-Port"
2083
+ },
2084
+ sections: {
2085
+ portsSettings: "Port-Einstellungen",
2086
+ input: "Eingang",
2087
+ outputs: "Ausg\xE4nge",
2088
+ lifecyclePorts: "Lebenszyklus-Ports"
2089
+ },
2090
+ outputs: {
2091
+ port: "Port",
2092
+ label: "Bezeichnung",
2093
+ validate: "Validieren",
2094
+ returnProperty: "R\xFCckgabe-Eigenschaft",
2095
+ contextMode: "Kontextmodus"
2096
+ },
2097
+ contextModes: {
2098
+ modes: {
2099
+ default: "Standard",
2100
+ carry: "carry",
2101
+ trace: "trace",
2102
+ reset: "reset"
2103
+ }
2104
+ },
2105
+ help: {
2106
+ validateInput: "Eingehende Nachrichten vor dem Ausf\xFChren von input() gegen das Eingabe-Schema validieren.",
2107
+ outputs: "Ausgabe-Einstellungen pro Port. Validieren pr\xFCft den gesendeten Wert gegen das Schema des Ports; Kontextmodus steuert, wie die eingehende Nachricht \xFCbertragen wird.",
2108
+ lifecyclePorts: "Optionale zus\xE4tzliche Ausg\xE4nge, die bei Fehler, Abschluss und jeder Status\xE4nderung ausl\xF6sen.",
2109
+ learnMore: "Mehr erfahren"
2060
2110
  }
2061
2111
  },
2062
2112
  "es-ES": {
2063
- configs: { name: "Nombre", returnProperty: "Clave de retorno" },
2113
+ configs: { name: "Nombre" },
2064
2114
  toggles: {
2065
- validateInput: "Validar entrada",
2066
- validateOutput: "Validar salida",
2115
+ validateInput: "Validar",
2067
2116
  errorPort: "Puerto de error",
2068
2117
  completePort: "Puerto de completado",
2069
- statusPort: "Puerto de estado",
2070
- returnPropertyOverride: "Sobrescribir clave de retorno"
2118
+ statusPort: "Puerto de estado"
2119
+ },
2120
+ sections: {
2121
+ portsSettings: "Configuraci\xF3n de puertos",
2122
+ input: "Entrada",
2123
+ outputs: "Salidas",
2124
+ lifecyclePorts: "Puertos de ciclo de vida"
2125
+ },
2126
+ outputs: {
2127
+ port: "Puerto",
2128
+ label: "Etiqueta",
2129
+ validate: "Validar",
2130
+ returnProperty: "Propiedad de retorno",
2131
+ contextMode: "Modo de contexto"
2132
+ },
2133
+ contextModes: {
2134
+ modes: {
2135
+ default: "Predeterminado",
2136
+ carry: "carry",
2137
+ trace: "trace",
2138
+ reset: "reset"
2139
+ }
2140
+ },
2141
+ help: {
2142
+ validateInput: "Valida los mensajes entrantes con el esquema de entrada antes de ejecutar input().",
2143
+ 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.",
2144
+ lifecyclePorts: "Puertos de salida adicionales opcionales que se activan en error, al completar y en cada cambio de estado.",
2145
+ learnMore: "M\xE1s informaci\xF3n"
2071
2146
  }
2072
2147
  },
2073
2148
  fr: {
2074
- configs: { name: "Nom", returnProperty: "Cl\xE9 de retour" },
2149
+ configs: { name: "Nom" },
2075
2150
  toggles: {
2076
- validateInput: "Valider l'entr\xE9e",
2077
- validateOutput: "Valider la sortie",
2151
+ validateInput: "Valider",
2078
2152
  errorPort: "Port d'erreur",
2079
2153
  completePort: "Port de compl\xE9tion",
2080
- statusPort: "Port de statut",
2081
- returnPropertyOverride: "Remplacer la cl\xE9 de retour"
2154
+ statusPort: "Port de statut"
2155
+ },
2156
+ sections: {
2157
+ portsSettings: "Param\xE8tres des ports",
2158
+ input: "Entr\xE9e",
2159
+ outputs: "Sorties",
2160
+ lifecyclePorts: "Ports de cycle de vie"
2161
+ },
2162
+ outputs: {
2163
+ port: "Port",
2164
+ label: "Libell\xE9",
2165
+ validate: "Valider",
2166
+ returnProperty: "Propri\xE9t\xE9 de retour",
2167
+ contextMode: "Mode de contexte"
2168
+ },
2169
+ contextModes: {
2170
+ modes: {
2171
+ default: "Par d\xE9faut",
2172
+ carry: "carry",
2173
+ trace: "trace",
2174
+ reset: "reset"
2175
+ }
2176
+ },
2177
+ help: {
2178
+ validateInput: "Valide les messages entrants avec le sch\xE9ma d'entr\xE9e avant l'ex\xE9cution de input().",
2179
+ 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.",
2180
+ lifecyclePorts: "Ports de sortie suppl\xE9mentaires optionnels d\xE9clench\xE9s en cas d'erreur, \xE0 la fin et \xE0 chaque changement de statut.",
2181
+ learnMore: "En savoir plus"
2082
2182
  }
2083
2183
  },
2084
2184
  ko: {
2085
- configs: { name: "\uC774\uB984", returnProperty: "\uBC18\uD658 \uD0A4" },
2185
+ configs: { name: "\uC774\uB984" },
2086
2186
  toggles: {
2087
- validateInput: "\uC785\uB825 \uAC80\uC99D",
2088
- validateOutput: "\uCD9C\uB825 \uAC80\uC99D",
2187
+ validateInput: "\uAC80\uC99D",
2089
2188
  errorPort: "\uC624\uB958 \uD3EC\uD2B8",
2090
2189
  completePort: "\uC644\uB8CC \uD3EC\uD2B8",
2091
- statusPort: "\uC0C1\uD0DC \uD3EC\uD2B8",
2092
- returnPropertyOverride: "\uBC18\uD658 \uD0A4 \uC7AC\uC815\uC758"
2190
+ statusPort: "\uC0C1\uD0DC \uD3EC\uD2B8"
2191
+ },
2192
+ sections: {
2193
+ portsSettings: "\uD3EC\uD2B8 \uC124\uC815",
2194
+ input: "\uC785\uB825",
2195
+ outputs: "\uCD9C\uB825",
2196
+ lifecyclePorts: "\uC218\uBA85 \uC8FC\uAE30 \uD3EC\uD2B8"
2197
+ },
2198
+ outputs: {
2199
+ port: "\uD3EC\uD2B8",
2200
+ label: "\uB808\uC774\uBE14",
2201
+ validate: "\uAC80\uC99D",
2202
+ returnProperty: "\uBC18\uD658 \uC18D\uC131",
2203
+ contextMode: "\uCEE8\uD14D\uC2A4\uD2B8 \uBAA8\uB4DC"
2204
+ },
2205
+ contextModes: {
2206
+ modes: {
2207
+ default: "\uAE30\uBCF8\uAC12",
2208
+ carry: "carry",
2209
+ trace: "trace",
2210
+ reset: "reset"
2211
+ }
2212
+ },
2213
+ help: {
2214
+ 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.",
2215
+ 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.",
2216
+ 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.",
2217
+ learnMore: "\uC790\uC138\uD788 \uBCF4\uAE30"
2093
2218
  }
2094
2219
  },
2095
2220
  "pt-BR": {
2096
- configs: { name: "Nome", returnProperty: "Chave de retorno" },
2221
+ configs: { name: "Nome" },
2097
2222
  toggles: {
2098
- validateInput: "Validar Entrada",
2099
- validateOutput: "Validar Sa\xEDda",
2223
+ validateInput: "Validar",
2100
2224
  errorPort: "Porta de Erro",
2101
2225
  completePort: "Porta de Conclus\xE3o",
2102
- statusPort: "Porta de Status",
2103
- returnPropertyOverride: "Sobrescrever chave de retorno"
2226
+ statusPort: "Porta de Status"
2227
+ },
2228
+ sections: {
2229
+ portsSettings: "Configura\xE7\xF5es de portas",
2230
+ input: "Entrada",
2231
+ outputs: "Sa\xEDdas",
2232
+ lifecyclePorts: "Portas de ciclo de vida"
2233
+ },
2234
+ outputs: {
2235
+ port: "Porta",
2236
+ label: "R\xF3tulo",
2237
+ validate: "Validar",
2238
+ returnProperty: "Propriedade de retorno",
2239
+ contextMode: "Modo de contexto"
2240
+ },
2241
+ contextModes: {
2242
+ modes: {
2243
+ default: "Padr\xE3o",
2244
+ carry: "carry",
2245
+ trace: "trace",
2246
+ reset: "reset"
2247
+ }
2248
+ },
2249
+ help: {
2250
+ validateInput: "Valida as mensagens recebidas com o esquema de entrada antes de input() executar.",
2251
+ 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.",
2252
+ lifecyclePorts: "Portas de sa\xEDda extras opcionais que disparam em erro, na conclus\xE3o e a cada mudan\xE7a de status.",
2253
+ learnMore: "Saiba mais"
2104
2254
  }
2105
2255
  },
2106
2256
  ru: {
2107
- configs: { name: "\u0418\u043C\u044F", returnProperty: "\u041A\u043B\u044E\u0447 \u0432\u043E\u0437\u0432\u0440\u0430\u0442\u0430" },
2257
+ configs: { name: "\u0418\u043C\u044F" },
2108
2258
  toggles: {
2109
- validateInput: "\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0432\u0445\u043E\u0434",
2110
- validateOutput: "\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0432\u044B\u0445\u043E\u0434",
2259
+ validateInput: "\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0442\u044C",
2111
2260
  errorPort: "\u041F\u043E\u0440\u0442 \u043E\u0448\u0438\u0431\u043A\u0438",
2112
2261
  completePort: "\u041F\u043E\u0440\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F",
2113
- statusPort: "\u041F\u043E\u0440\u0442 \u0441\u0442\u0430\u0442\u0443\u0441\u0430",
2114
- returnPropertyOverride: "\u041F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0438\u0442\u044C \u043A\u043B\u044E\u0447 \u0432\u043E\u0437\u0432\u0440\u0430\u0442\u0430"
2262
+ statusPort: "\u041F\u043E\u0440\u0442 \u0441\u0442\u0430\u0442\u0443\u0441\u0430"
2263
+ },
2264
+ sections: {
2265
+ portsSettings: "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043F\u043E\u0440\u0442\u043E\u0432",
2266
+ input: "\u0412\u0445\u043E\u0434",
2267
+ outputs: "\u0412\u044B\u0445\u043E\u0434\u044B",
2268
+ lifecyclePorts: "\u041F\u043E\u0440\u0442\u044B \u0436\u0438\u0437\u043D\u0435\u043D\u043D\u043E\u0433\u043E \u0446\u0438\u043A\u043B\u0430"
2269
+ },
2270
+ outputs: {
2271
+ port: "\u041F\u043E\u0440\u0442",
2272
+ label: "\u041C\u0435\u0442\u043A\u0430",
2273
+ validate: "\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0442\u044C",
2274
+ returnProperty: "\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u043E \u0432\u043E\u0437\u0432\u0440\u0430\u0442\u0430",
2275
+ contextMode: "\u0420\u0435\u0436\u0438\u043C \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0430"
2276
+ },
2277
+ contextModes: {
2278
+ modes: {
2279
+ default: "\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E",
2280
+ carry: "carry",
2281
+ trace: "trace",
2282
+ reset: "reset"
2283
+ }
2284
+ },
2285
+ help: {
2286
+ 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().",
2287
+ 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.",
2288
+ 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.",
2289
+ learnMore: "\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435"
2115
2290
  }
2116
2291
  },
2117
2292
  ja: {
2118
- configs: { name: "\u540D\u524D", returnProperty: "\u623B\u308A\u30AD\u30FC" },
2293
+ configs: { name: "\u540D\u524D" },
2119
2294
  toggles: {
2120
- validateInput: "\u5165\u529B\u691C\u8A3C",
2121
- validateOutput: "\u51FA\u529B\u691C\u8A3C",
2295
+ validateInput: "\u691C\u8A3C",
2122
2296
  errorPort: "\u30A8\u30E9\u30FC\u30DD\u30FC\u30C8",
2123
2297
  completePort: "\u5B8C\u4E86\u30DD\u30FC\u30C8",
2124
- statusPort: "\u30B9\u30C6\u30FC\u30BF\u30B9\u30DD\u30FC\u30C8",
2125
- returnPropertyOverride: "\u623B\u308A\u30AD\u30FC\u3092\u4E0A\u66F8\u304D"
2298
+ statusPort: "\u30B9\u30C6\u30FC\u30BF\u30B9\u30DD\u30FC\u30C8"
2299
+ },
2300
+ sections: {
2301
+ portsSettings: "\u30DD\u30FC\u30C8\u8A2D\u5B9A",
2302
+ input: "\u5165\u529B",
2303
+ outputs: "\u51FA\u529B",
2304
+ lifecyclePorts: "\u30E9\u30A4\u30D5\u30B5\u30A4\u30AF\u30EB\u30DD\u30FC\u30C8"
2305
+ },
2306
+ outputs: {
2307
+ port: "\u30DD\u30FC\u30C8",
2308
+ label: "\u30E9\u30D9\u30EB",
2309
+ validate: "\u691C\u8A3C",
2310
+ returnProperty: "\u623B\u308A\u30D7\u30ED\u30D1\u30C6\u30A3",
2311
+ contextMode: "\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30E2\u30FC\u30C9"
2312
+ },
2313
+ contextModes: {
2314
+ modes: {
2315
+ default: "\u30C7\u30D5\u30A9\u30EB\u30C8",
2316
+ carry: "carry",
2317
+ trace: "trace",
2318
+ reset: "reset"
2319
+ }
2320
+ },
2321
+ help: {
2322
+ 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",
2323
+ 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",
2324
+ 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",
2325
+ learnMore: "\u8A73\u7D30"
2126
2326
  }
2127
2327
  },
2128
2328
  "zh-CN": {
2129
- configs: { name: "\u540D\u79F0", returnProperty: "\u8FD4\u56DE\u952E" },
2329
+ configs: { name: "\u540D\u79F0" },
2130
2330
  toggles: {
2131
- validateInput: "\u9A8C\u8BC1\u8F93\u5165",
2132
- validateOutput: "\u9A8C\u8BC1\u8F93\u51FA",
2331
+ validateInput: "\u9A8C\u8BC1",
2133
2332
  errorPort: "\u9519\u8BEF\u7AEF\u53E3",
2134
2333
  completePort: "\u5B8C\u6210\u7AEF\u53E3",
2135
- statusPort: "\u72B6\u6001\u7AEF\u53E3",
2136
- returnPropertyOverride: "\u8986\u76D6\u8FD4\u56DE\u952E"
2334
+ statusPort: "\u72B6\u6001\u7AEF\u53E3"
2335
+ },
2336
+ sections: {
2337
+ portsSettings: "\u7AEF\u53E3\u8BBE\u7F6E",
2338
+ input: "\u8F93\u5165",
2339
+ outputs: "\u8F93\u51FA",
2340
+ lifecyclePorts: "\u751F\u547D\u5468\u671F\u7AEF\u53E3"
2341
+ },
2342
+ outputs: {
2343
+ port: "\u7AEF\u53E3",
2344
+ label: "\u6807\u7B7E",
2345
+ validate: "\u9A8C\u8BC1",
2346
+ returnProperty: "\u8FD4\u56DE\u5C5E\u6027",
2347
+ contextMode: "\u4E0A\u4E0B\u6587\u6A21\u5F0F"
2348
+ },
2349
+ contextModes: {
2350
+ modes: {
2351
+ default: "\u9ED8\u8BA4",
2352
+ carry: "carry",
2353
+ trace: "trace",
2354
+ reset: "reset"
2355
+ }
2356
+ },
2357
+ help: {
2358
+ validateInput: "\u5728 input() \u8FD0\u884C\u524D\uFF0C\u6839\u636E\u8F93\u5165\u6A21\u5F0F\u6821\u9A8C\u4F20\u5165\u6D88\u606F\u3002",
2359
+ 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",
2360
+ 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",
2361
+ learnMore: "\u4E86\u89E3\u66F4\u591A"
2137
2362
  }
2138
2363
  },
2139
2364
  "zh-TW": {
2140
- configs: { name: "\u540D\u7A31", returnProperty: "\u8FD4\u56DE\u9375" },
2365
+ configs: { name: "\u540D\u7A31" },
2141
2366
  toggles: {
2142
- validateInput: "\u9A57\u8B49\u8F38\u5165",
2143
- validateOutput: "\u9A57\u8B49\u8F38\u51FA",
2367
+ validateInput: "\u9A57\u8B49",
2144
2368
  errorPort: "\u932F\u8AA4\u7AEF\u53E3",
2145
2369
  completePort: "\u5B8C\u6210\u7AEF\u53E3",
2146
- statusPort: "\u72C0\u614B\u7AEF\u53E3",
2147
- returnPropertyOverride: "\u8986\u84CB\u8FD4\u56DE\u9375"
2370
+ statusPort: "\u72C0\u614B\u7AEF\u53E3"
2371
+ },
2372
+ sections: {
2373
+ portsSettings: "\u7AEF\u53E3\u8A2D\u5B9A",
2374
+ input: "\u8F38\u5165",
2375
+ outputs: "\u8F38\u51FA",
2376
+ lifecyclePorts: "\u751F\u547D\u9031\u671F\u7AEF\u53E3"
2377
+ },
2378
+ outputs: {
2379
+ port: "\u7AEF\u53E3",
2380
+ label: "\u6A19\u7C64",
2381
+ validate: "\u9A57\u8B49",
2382
+ returnProperty: "\u8FD4\u56DE\u5C6C\u6027",
2383
+ contextMode: "\u5167\u5BB9\u6A21\u5F0F"
2384
+ },
2385
+ contextModes: {
2386
+ modes: {
2387
+ default: "\u9810\u8A2D",
2388
+ carry: "carry",
2389
+ trace: "trace",
2390
+ reset: "reset"
2391
+ }
2392
+ },
2393
+ help: {
2394
+ validateInput: "\u5728 input() \u57F7\u884C\u524D\uFF0C\u4F9D\u8F38\u5165\u7D50\u69CB\u63CF\u8FF0\u9A57\u8B49\u50B3\u5165\u8A0A\u606F\u3002",
2395
+ 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",
2396
+ 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",
2397
+ learnMore: "\u77AD\u89E3\u66F4\u591A"
2148
2398
  }
2149
2399
  }
2150
2400
  };
@@ -2351,7 +2601,8 @@ function nodeDefinitionsInliner(serverOutDir, entryPath, iconsDir, componentsDir
2351
2601
  defaults.validateInput = { required: false, value: false };
2352
2602
  }
2353
2603
  if (defaults && outputsSchema) {
2354
- defaults.validateOutput = { required: false, value: false };
2604
+ defaults.validateOutputs = { required: false, value: {} };
2605
+ defaults.contextModes = { required: false, value: {} };
2355
2606
  }
2356
2607
  const credentials = getCredentialsFromSchema(credentialsSchema);
2357
2608
  _definitions[type] = {