ugcinc 4.5.41 → 4.5.42

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.
@@ -87,15 +87,41 @@ const definition = (0, types_1.defineNode)({
87
87
  ...(f.objectSchema && { objectSchema: f.objectSchema }),
88
88
  };
89
89
  });
90
+ // Pass through image/video inputs as outputs
91
+ for (const ref of imageInputRefs) {
92
+ outputs.push({
93
+ id: ref,
94
+ type: 'image',
95
+ isArray: false,
96
+ required: true,
97
+ });
98
+ }
99
+ for (const ref of videoInputRefs) {
100
+ outputs.push({
101
+ id: ref,
102
+ type: 'video',
103
+ isArray: false,
104
+ required: true,
105
+ });
106
+ }
90
107
  return { inputs, outputs };
91
108
  },
92
- generatePreview: (config, _ctx, cachedOutputs) => {
109
+ generatePreview: (config, ctx, cachedOutputs) => {
93
110
  // Generator node - return cached preview_outputs from last successful run
94
111
  const result = {};
95
112
  const outputFields = config.outputFields ?? [{ name: 'output', type: 'string' }];
96
113
  for (const field of outputFields) {
97
114
  result[field.name] = cachedOutputs?.[field.name] ?? null;
98
115
  }
116
+ // Pass through image/video inputs as outputs
117
+ const imageInputRefs = config.imageInputRefs ?? [];
118
+ const videoInputRefs = config.videoInputRefs ?? [];
119
+ for (const ref of imageInputRefs) {
120
+ result[ref] = ctx.inputPreviews[ref] ?? null;
121
+ }
122
+ for (const ref of videoInputRefs) {
123
+ result[ref] = ctx.inputPreviews[ref] ?? null;
124
+ }
99
125
  return (0, types_1.preview)(result);
100
126
  },
101
127
  validate: (config) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "4.5.41",
3
+ "version": "4.5.42",
4
4
  "description": "TypeScript/JavaScript client for the UGC Inc API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",