ugcinc 4.1.20 → 4.1.21
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.
|
@@ -43,13 +43,13 @@ export declare function areTypesCompatible({ sourceType, sourceIsArray, targetTy
|
|
|
43
43
|
* Compute ports for a node based on its type and config.
|
|
44
44
|
* Uses the node definition's computePorts function.
|
|
45
45
|
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
46
|
+
* Accepts the full WorkflowNodeDefinition to preserve discriminated union typing.
|
|
47
|
+
*
|
|
48
|
+
* @param node - The workflow node definition
|
|
48
49
|
* @param getConnectedOutput - Optional function to get connected output port info (for dynamic ports)
|
|
49
50
|
*/
|
|
50
|
-
export declare function computePortsForNode({
|
|
51
|
-
|
|
52
|
-
config?: Record<string, unknown>;
|
|
51
|
+
export declare function computePortsForNode({ node, getConnectedOutput, }: {
|
|
52
|
+
node: WorkflowNodeDefinition;
|
|
53
53
|
getConnectedOutput?: (inputId: string) => {
|
|
54
54
|
type: BasePortType | BasePortType[];
|
|
55
55
|
isArray: boolean;
|
package/dist/graph-controller.js
CHANGED
|
@@ -248,17 +248,18 @@ function areTypesCompatible({ sourceType, sourceIsArray, targetType, targetIsArr
|
|
|
248
248
|
* Compute ports for a node based on its type and config.
|
|
249
249
|
* Uses the node definition's computePorts function.
|
|
250
250
|
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
251
|
+
* Accepts the full WorkflowNodeDefinition to preserve discriminated union typing.
|
|
252
|
+
*
|
|
253
|
+
* @param node - The workflow node definition
|
|
253
254
|
* @param getConnectedOutput - Optional function to get connected output port info (for dynamic ports)
|
|
254
255
|
*/
|
|
255
|
-
function computePortsForNode({
|
|
256
|
-
const definition = (0, nodes_1.getNodeDefinition)(
|
|
256
|
+
function computePortsForNode({ node, getConnectedOutput, }) {
|
|
257
|
+
const definition = (0, nodes_1.getNodeDefinition)(node.type);
|
|
257
258
|
if (!definition) {
|
|
258
259
|
return { inputs: [], outputs: [] };
|
|
259
260
|
}
|
|
260
261
|
return definition.computePorts({
|
|
261
|
-
config: config ?? definition.defaults,
|
|
262
|
+
config: node.config ?? definition.defaults,
|
|
262
263
|
getConnectedOutput,
|
|
263
264
|
});
|
|
264
265
|
}
|