@bonsae/nrg 0.21.1 → 0.21.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/package.json +1 -1
- package/server/index.cjs +12 -0
- package/server/resources/nrg-client.js +525 -527
- package/test/client/e2e/index.js +3 -0
- package/types/client.d.ts +7 -0
- package/types/server.d.ts +8 -0
- package/types/shims/client/types.d.ts +7 -0
- package/vite/index.js +3 -0
package/test/client/e2e/index.js
CHANGED
|
@@ -1944,6 +1944,9 @@ function nodeDefinitionsInliner(serverOutDir, entryPath, iconsDir, componentsDir
|
|
|
1944
1944
|
icon: iconsDir ? resolveIcon(iconsDir, type) : void 0,
|
|
1945
1945
|
inputs: NodeClass.inputs,
|
|
1946
1946
|
outputs: NodeClass.outputs,
|
|
1947
|
+
// Resolved server-side (Kind symbol intact) so the editor labels
|
|
1948
|
+
// named output ports without guessing from the serialized schema.
|
|
1949
|
+
outputPortNames: NodeClass.outputPortNames ?? void 0,
|
|
1947
1950
|
inputSchema,
|
|
1948
1951
|
outputsSchema
|
|
1949
1952
|
};
|
package/types/client.d.ts
CHANGED
|
@@ -174,6 +174,13 @@ export interface JsonSchemaObject extends SchemaObject {
|
|
|
174
174
|
export interface RuntimeNodeDefinition extends NodeDefinition {
|
|
175
175
|
defaults?: NodeDefaults;
|
|
176
176
|
credentials?: NodeCredentials;
|
|
177
|
+
/**
|
|
178
|
+
* Names of the base output ports when `outputsSchema` is a record of named
|
|
179
|
+
* ports, in declaration order; absent for single/positional outputs. Resolved
|
|
180
|
+
* server-side by the inliner so the editor never guesses port names from the
|
|
181
|
+
* serialized schema.
|
|
182
|
+
*/
|
|
183
|
+
outputPortNames?: string[];
|
|
177
184
|
configSchema?: JsonSchemaObject;
|
|
178
185
|
credentialsSchema?: JsonSchemaObject;
|
|
179
186
|
inputSchema?: JsonSchemaObject;
|
package/types/server.d.ts
CHANGED
|
@@ -677,6 +677,14 @@ export declare abstract class IONode<TConfig = any, TCredentials = any, TInput =
|
|
|
677
677
|
static readonly validateOutput: boolean;
|
|
678
678
|
static get inputs(): 0 | 1;
|
|
679
679
|
static get outputs(): number;
|
|
680
|
+
/**
|
|
681
|
+
* The names of the base output ports when `outputsSchema` is a record of
|
|
682
|
+
* named ports (`{ success, failure }`), in declaration order — otherwise
|
|
683
|
+
* `undefined` (a single schema or a positional array). Resolved here, where
|
|
684
|
+
* TypeBox's `Kind` symbol is intact, so the editor reads the names directly
|
|
685
|
+
* instead of guessing them from a serialized (symbol-stripped) schema.
|
|
686
|
+
*/
|
|
687
|
+
static get outputPortNames(): string[] | undefined;
|
|
680
688
|
readonly config: IONodeConfig<TConfig>;
|
|
681
689
|
protected readonly context: IONodeContext;
|
|
682
690
|
constructor(RED: RED, node: NodeRedNode, config: IONodeConfig<TConfig>, credentials: IONodeCredentials<TCredentials>);
|
|
@@ -146,6 +146,13 @@ export interface JsonSchemaObject extends SchemaObject {
|
|
|
146
146
|
export interface RuntimeNodeDefinition extends NodeDefinition {
|
|
147
147
|
defaults?: NodeDefaults;
|
|
148
148
|
credentials?: NodeCredentials;
|
|
149
|
+
/**
|
|
150
|
+
* Names of the base output ports when `outputsSchema` is a record of named
|
|
151
|
+
* ports, in declaration order; absent for single/positional outputs. Resolved
|
|
152
|
+
* server-side by the inliner so the editor never guesses port names from the
|
|
153
|
+
* serialized schema.
|
|
154
|
+
*/
|
|
155
|
+
outputPortNames?: string[];
|
|
149
156
|
configSchema?: JsonSchemaObject;
|
|
150
157
|
credentialsSchema?: JsonSchemaObject;
|
|
151
158
|
inputSchema?: JsonSchemaObject;
|
package/vite/index.js
CHANGED
|
@@ -2607,6 +2607,9 @@ function nodeDefinitionsInliner(serverOutDir, entryPath, iconsDir, componentsDir
|
|
|
2607
2607
|
icon: iconsDir ? resolveIcon(iconsDir, type) : void 0,
|
|
2608
2608
|
inputs: NodeClass.inputs,
|
|
2609
2609
|
outputs: NodeClass.outputs,
|
|
2610
|
+
// Resolved server-side (Kind symbol intact) so the editor labels
|
|
2611
|
+
// named output ports without guessing from the serialized schema.
|
|
2612
|
+
outputPortNames: NodeClass.outputPortNames ?? void 0,
|
|
2610
2613
|
inputSchema,
|
|
2611
2614
|
outputsSchema
|
|
2612
2615
|
};
|