ugcinc 4.1.17 → 4.1.19
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.
|
@@ -15,47 +15,16 @@ const definition = (0, types_1.defineNode)({
|
|
|
15
15
|
outputMode: 'per-input',
|
|
16
16
|
selectionMode: null,
|
|
17
17
|
},
|
|
18
|
-
computePorts:
|
|
19
|
-
//
|
|
18
|
+
computePorts: ({ config }) => {
|
|
19
|
+
// Return cached resolved ports - fetching/updating happens in the UI
|
|
20
20
|
if (config?.resolvedPorts) {
|
|
21
21
|
return {
|
|
22
22
|
inputs: config.resolvedPorts.inputs ?? [],
|
|
23
23
|
outputs: config.resolvedPorts.outputs ?? [],
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
//
|
|
27
|
-
|
|
28
|
-
if (!templateId || !client) {
|
|
29
|
-
return { inputs: [], outputs: [] };
|
|
30
|
-
}
|
|
31
|
-
// Fetch the sub-workflow template
|
|
32
|
-
const response = await client.getTemplate({ templateId });
|
|
33
|
-
if (!response.ok) {
|
|
34
|
-
return { inputs: [], outputs: [] };
|
|
35
|
-
}
|
|
36
|
-
const template = response.data;
|
|
37
|
-
// Find the manual-trigger node to get input definitions
|
|
38
|
-
const manualTrigger = template.nodes.find(n => n.type === 'manual-trigger');
|
|
39
|
-
const triggerOutputs = manualTrigger?.type === 'manual-trigger'
|
|
40
|
-
? (manualTrigger.config?.outputs ?? [])
|
|
41
|
-
: [];
|
|
42
|
-
// Convert trigger outputs to compose-workflow inputs
|
|
43
|
-
const inputs = triggerOutputs.map(output => ({
|
|
44
|
-
id: output.id,
|
|
45
|
-
type: output.type,
|
|
46
|
-
isArray: output.isArray ?? false,
|
|
47
|
-
required: true,
|
|
48
|
-
...(output.type === 'enum' && output.enumOptions ? { enumOptions: output.enumOptions } : {}),
|
|
49
|
-
}));
|
|
50
|
-
// Use template's output_schema for outputs
|
|
51
|
-
const outputSchema = template.output_schema ?? {};
|
|
52
|
-
const outputs = Object.entries(outputSchema).map(([id, schema]) => ({
|
|
53
|
-
id,
|
|
54
|
-
type: schema.type,
|
|
55
|
-
isArray: false,
|
|
56
|
-
required: true,
|
|
57
|
-
}));
|
|
58
|
-
return { inputs, outputs };
|
|
26
|
+
// No cached ports yet - UI will fetch and update
|
|
27
|
+
return { inputs: [], outputs: [] };
|
|
59
28
|
},
|
|
60
29
|
});
|
|
61
30
|
exports.default = definition;
|