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: async ({ config, client }) => {
19
- // Use cached resolved ports if available
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
- // If no templateId selected, return empty ports
27
- const templateId = config?.workflowTemplateId;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "4.1.17",
3
+ "version": "4.1.19",
4
4
  "description": "TypeScript/JavaScript client for the UGC Inc API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",