ugcinc 4.0.1 → 4.0.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/dist/automations.js +32 -32
- package/dist/ports.js +28 -28
- package/dist/types.d.ts +4 -1
- package/dist/types.js +1 -1
- package/package.json +1 -1
package/dist/automations.js
CHANGED
|
@@ -275,14 +275,14 @@ function getAllNodes() {
|
|
|
275
275
|
inputs: [
|
|
276
276
|
{
|
|
277
277
|
id: "url",
|
|
278
|
-
type: (0, types_1.portType)('text'),
|
|
278
|
+
type: (0, types_1.portType)({ type: 'text', isArray: false }),
|
|
279
279
|
required: true,
|
|
280
280
|
},
|
|
281
281
|
],
|
|
282
282
|
outputs: [
|
|
283
283
|
{
|
|
284
284
|
id: "video",
|
|
285
|
-
type: (0, types_1.portType)('video'),
|
|
285
|
+
type: (0, types_1.portType)({ type: 'video', isArray: false }),
|
|
286
286
|
required: true,
|
|
287
287
|
},
|
|
288
288
|
],
|
|
@@ -297,7 +297,7 @@ function getAllNodes() {
|
|
|
297
297
|
outputs: [
|
|
298
298
|
{
|
|
299
299
|
id: "account",
|
|
300
|
-
type: (0, types_1.portType)('account'),
|
|
300
|
+
type: (0, types_1.portType)({ type: 'account', isArray: false }),
|
|
301
301
|
required: true,
|
|
302
302
|
},
|
|
303
303
|
],
|
|
@@ -312,7 +312,7 @@ function getAllNodes() {
|
|
|
312
312
|
outputs: [
|
|
313
313
|
{
|
|
314
314
|
id: "text",
|
|
315
|
-
type: (0, types_1.portType)('text'),
|
|
315
|
+
type: (0, types_1.portType)({ type: 'text', isArray: false }),
|
|
316
316
|
required: true,
|
|
317
317
|
},
|
|
318
318
|
],
|
|
@@ -327,14 +327,14 @@ function getAllNodes() {
|
|
|
327
327
|
inputs: [
|
|
328
328
|
{
|
|
329
329
|
id: "background",
|
|
330
|
-
type: (0, types_1.portType)('image'),
|
|
330
|
+
type: (0, types_1.portType)({ type: 'image', isArray: false }),
|
|
331
331
|
required: true,
|
|
332
332
|
},
|
|
333
333
|
],
|
|
334
334
|
outputs: [
|
|
335
335
|
{
|
|
336
336
|
id: "output",
|
|
337
|
-
type: (0, types_1.portType)('image'),
|
|
337
|
+
type: (0, types_1.portType)({ type: 'image', isArray: false }),
|
|
338
338
|
required: true,
|
|
339
339
|
},
|
|
340
340
|
],
|
|
@@ -349,7 +349,7 @@ function getAllNodes() {
|
|
|
349
349
|
outputs: [
|
|
350
350
|
{
|
|
351
351
|
id: "output",
|
|
352
|
-
type: (0, types_1.portType)('video'),
|
|
352
|
+
type: (0, types_1.portType)({ type: 'video', isArray: false }),
|
|
353
353
|
required: true,
|
|
354
354
|
},
|
|
355
355
|
],
|
|
@@ -373,19 +373,19 @@ function getAllNodes() {
|
|
|
373
373
|
inputs: [
|
|
374
374
|
{
|
|
375
375
|
id: "media",
|
|
376
|
-
type: [(0, types_1.portType)('video'), (0, types_1.portType)('audio')],
|
|
376
|
+
type: [(0, types_1.portType)({ type: 'video', isArray: false }), (0, types_1.portType)({ type: 'audio', isArray: false })],
|
|
377
377
|
required: true,
|
|
378
378
|
},
|
|
379
379
|
],
|
|
380
380
|
outputs: [
|
|
381
381
|
{
|
|
382
382
|
id: "text",
|
|
383
|
-
type: (0, types_1.portType)('text'),
|
|
383
|
+
type: (0, types_1.portType)({ type: 'text', isArray: false }),
|
|
384
384
|
required: true,
|
|
385
385
|
},
|
|
386
386
|
{
|
|
387
387
|
id: "segments",
|
|
388
|
-
type: (0, types_1.portType)('object'),
|
|
388
|
+
type: (0, types_1.portType)({ type: 'object', isArray: false }),
|
|
389
389
|
required: true,
|
|
390
390
|
itemSchema: {
|
|
391
391
|
text: { type: 'string' },
|
|
@@ -404,14 +404,14 @@ function getAllNodes() {
|
|
|
404
404
|
inputs: [
|
|
405
405
|
{
|
|
406
406
|
id: "video",
|
|
407
|
-
type: (0, types_1.portType)('video'),
|
|
407
|
+
type: (0, types_1.portType)({ type: 'video', isArray: false }),
|
|
408
408
|
required: true,
|
|
409
409
|
},
|
|
410
410
|
],
|
|
411
411
|
outputs: [
|
|
412
412
|
{
|
|
413
413
|
id: "output",
|
|
414
|
-
type: (0, types_1.portType)('video'),
|
|
414
|
+
type: (0, types_1.portType)({ type: 'video', isArray: false }),
|
|
415
415
|
required: true,
|
|
416
416
|
},
|
|
417
417
|
],
|
|
@@ -425,14 +425,14 @@ function getAllNodes() {
|
|
|
425
425
|
inputs: [
|
|
426
426
|
{
|
|
427
427
|
id: "image",
|
|
428
|
-
type: (0, types_1.portType)('image'),
|
|
428
|
+
type: (0, types_1.portType)({ type: 'image', isArray: false }),
|
|
429
429
|
required: true,
|
|
430
430
|
},
|
|
431
431
|
],
|
|
432
432
|
outputs: [
|
|
433
433
|
{
|
|
434
434
|
id: "output",
|
|
435
|
-
type: (0, types_1.portType)('video'),
|
|
435
|
+
type: (0, types_1.portType)({ type: 'video', isArray: false }),
|
|
436
436
|
required: true,
|
|
437
437
|
},
|
|
438
438
|
],
|
|
@@ -451,7 +451,7 @@ function getAllNodes() {
|
|
|
451
451
|
outputs: [
|
|
452
452
|
{
|
|
453
453
|
id: "output",
|
|
454
|
-
type: (0, types_1.portType)('image'),
|
|
454
|
+
type: (0, types_1.portType)({ type: 'image', isArray: false }),
|
|
455
455
|
required: true,
|
|
456
456
|
},
|
|
457
457
|
],
|
|
@@ -465,14 +465,14 @@ function getAllNodes() {
|
|
|
465
465
|
inputs: [
|
|
466
466
|
{
|
|
467
467
|
id: "video",
|
|
468
|
-
type: (0, types_1.portType)('video'),
|
|
468
|
+
type: (0, types_1.portType)({ type: 'video', isArray: false }),
|
|
469
469
|
required: true,
|
|
470
470
|
},
|
|
471
471
|
],
|
|
472
472
|
outputs: [
|
|
473
473
|
{
|
|
474
474
|
id: "output",
|
|
475
|
-
type: (0, types_1.portType)('video'),
|
|
475
|
+
type: (0, types_1.portType)({ type: 'video', isArray: false }),
|
|
476
476
|
required: true,
|
|
477
477
|
},
|
|
478
478
|
],
|
|
@@ -498,7 +498,7 @@ function getAllNodes() {
|
|
|
498
498
|
inputs: [
|
|
499
499
|
{
|
|
500
500
|
id: "prompt",
|
|
501
|
-
type: (0, types_1.portType)('text'),
|
|
501
|
+
type: (0, types_1.portType)({ type: 'text', isArray: false }),
|
|
502
502
|
required: true,
|
|
503
503
|
},
|
|
504
504
|
// Image input is dynamically added for image-to-video models
|
|
@@ -506,7 +506,7 @@ function getAllNodes() {
|
|
|
506
506
|
outputs: [
|
|
507
507
|
{
|
|
508
508
|
id: "output",
|
|
509
|
-
type: (0, types_1.portType)('video'),
|
|
509
|
+
type: (0, types_1.portType)({ type: 'video', isArray: false }),
|
|
510
510
|
required: true,
|
|
511
511
|
},
|
|
512
512
|
],
|
|
@@ -520,7 +520,7 @@ function getAllNodes() {
|
|
|
520
520
|
inputs: [
|
|
521
521
|
{
|
|
522
522
|
id: "prompt",
|
|
523
|
-
type: (0, types_1.portType)('text'),
|
|
523
|
+
type: (0, types_1.portType)({ type: 'text', isArray: false }),
|
|
524
524
|
required: true,
|
|
525
525
|
},
|
|
526
526
|
// Image input is dynamically added for edit models
|
|
@@ -528,7 +528,7 @@ function getAllNodes() {
|
|
|
528
528
|
outputs: [
|
|
529
529
|
{
|
|
530
530
|
id: "output",
|
|
531
|
-
type: (0, types_1.portType)('image'),
|
|
531
|
+
type: (0, types_1.portType)({ type: 'image', isArray: false }),
|
|
532
532
|
required: true,
|
|
533
533
|
},
|
|
534
534
|
],
|
|
@@ -554,7 +554,7 @@ function getAllNodes() {
|
|
|
554
554
|
inputs: [
|
|
555
555
|
{
|
|
556
556
|
id: "array",
|
|
557
|
-
type: [(0, types_1.portType)('image', true), (0, types_1.portType)('video', true), (0, types_1.portType)('audio', true), (0, types_1.portType)('text', true), (0, types_1.portType)('object', true)],
|
|
557
|
+
type: [(0, types_1.portType)({ type: 'image', isArray: true }), (0, types_1.portType)({ type: 'video', isArray: true }), (0, types_1.portType)({ type: 'audio', isArray: true }), (0, types_1.portType)({ type: 'text', isArray: true }), (0, types_1.portType)({ type: 'object', isArray: true })],
|
|
558
558
|
required: true,
|
|
559
559
|
},
|
|
560
560
|
],
|
|
@@ -600,14 +600,14 @@ function getAllNodes() {
|
|
|
600
600
|
inputs: [
|
|
601
601
|
{
|
|
602
602
|
id: "input",
|
|
603
|
-
type: (0, types_1.portType)('boolean'),
|
|
603
|
+
type: (0, types_1.portType)({ type: 'boolean', isArray: false }),
|
|
604
604
|
required: true,
|
|
605
605
|
},
|
|
606
606
|
],
|
|
607
607
|
outputs: [
|
|
608
608
|
{
|
|
609
609
|
id: "output",
|
|
610
|
-
type: (0, types_1.portType)('boolean'),
|
|
610
|
+
type: (0, types_1.portType)({ type: 'boolean', isArray: false }),
|
|
611
611
|
required: false,
|
|
612
612
|
},
|
|
613
613
|
],
|
|
@@ -635,7 +635,7 @@ function getAllNodes() {
|
|
|
635
635
|
inputs: [
|
|
636
636
|
{
|
|
637
637
|
id: "key",
|
|
638
|
-
type: (0, types_1.portType)('text'),
|
|
638
|
+
type: (0, types_1.portType)({ type: 'text', isArray: false }),
|
|
639
639
|
required: true,
|
|
640
640
|
},
|
|
641
641
|
],
|
|
@@ -653,7 +653,7 @@ function getAllNodes() {
|
|
|
653
653
|
inputs: [
|
|
654
654
|
{
|
|
655
655
|
id: "value",
|
|
656
|
-
type: [(0, types_1.portType)('image'), (0, types_1.portType)('video'), (0, types_1.portType)('audio'), (0, types_1.portType)('text'), (0, types_1.portType)('object'), (0, types_1.portType)('boolean'), (0, types_1.portType)('number')],
|
|
656
|
+
type: [(0, types_1.portType)({ type: 'image', isArray: false }), (0, types_1.portType)({ type: 'video', isArray: false }), (0, types_1.portType)({ type: 'audio', isArray: false }), (0, types_1.portType)({ type: 'text', isArray: false }), (0, types_1.portType)({ type: 'object', isArray: false }), (0, types_1.portType)({ type: 'boolean', isArray: false }), (0, types_1.portType)({ type: 'number', isArray: false })],
|
|
657
657
|
required: true,
|
|
658
658
|
},
|
|
659
659
|
],
|
|
@@ -661,7 +661,7 @@ function getAllNodes() {
|
|
|
661
661
|
outputs: [
|
|
662
662
|
{
|
|
663
663
|
id: "array",
|
|
664
|
-
type: [(0, types_1.portType)('image', true), (0, types_1.portType)('video', true), (0, types_1.portType)('audio', true), (0, types_1.portType)('text', true), (0, types_1.portType)('object', true)],
|
|
664
|
+
type: [(0, types_1.portType)({ type: 'image', isArray: true }), (0, types_1.portType)({ type: 'video', isArray: true }), (0, types_1.portType)({ type: 'audio', isArray: true }), (0, types_1.portType)({ type: 'text', isArray: true }), (0, types_1.portType)({ type: 'object', isArray: true })],
|
|
665
665
|
required: true,
|
|
666
666
|
},
|
|
667
667
|
],
|
|
@@ -676,7 +676,7 @@ function getAllNodes() {
|
|
|
676
676
|
inputs: [
|
|
677
677
|
{
|
|
678
678
|
id: "array",
|
|
679
|
-
type: [(0, types_1.portType)('image', true), (0, types_1.portType)('video', true), (0, types_1.portType)('audio', true), (0, types_1.portType)('text', true), (0, types_1.portType)('object', true)],
|
|
679
|
+
type: [(0, types_1.portType)({ type: 'image', isArray: true }), (0, types_1.portType)({ type: 'video', isArray: true }), (0, types_1.portType)({ type: 'audio', isArray: true }), (0, types_1.portType)({ type: 'text', isArray: true }), (0, types_1.portType)({ type: 'object', isArray: true })],
|
|
680
680
|
required: true,
|
|
681
681
|
},
|
|
682
682
|
],
|
|
@@ -696,17 +696,17 @@ function getAllNodes() {
|
|
|
696
696
|
inputs: [
|
|
697
697
|
{
|
|
698
698
|
id: "account",
|
|
699
|
-
type: (0, types_1.portType)('account'),
|
|
699
|
+
type: (0, types_1.portType)({ type: 'account', isArray: false }),
|
|
700
700
|
required: true,
|
|
701
701
|
},
|
|
702
702
|
{
|
|
703
703
|
id: "caption",
|
|
704
|
-
type: (0, types_1.portType)('text'),
|
|
704
|
+
type: (0, types_1.portType)({ type: 'text', isArray: false }),
|
|
705
705
|
required: false,
|
|
706
706
|
},
|
|
707
707
|
{
|
|
708
708
|
id: "social-audio",
|
|
709
|
-
type: (0, types_1.portType)('social_audio'),
|
|
709
|
+
type: (0, types_1.portType)({ type: 'social_audio', isArray: false }),
|
|
710
710
|
required: false,
|
|
711
711
|
},
|
|
712
712
|
],
|
|
@@ -731,7 +731,7 @@ function getAllNodes() {
|
|
|
731
731
|
inputs: [
|
|
732
732
|
{
|
|
733
733
|
id: "result",
|
|
734
|
-
type: [(0, types_1.portType)('image'), (0, types_1.portType)('video'), (0, types_1.portType)('audio'), (0, types_1.portType)('text'), (0, types_1.portType)('social_audio'), (0, types_1.portType)('account'), (0, types_1.portType)('boolean'), (0, types_1.portType)('object')],
|
|
734
|
+
type: [(0, types_1.portType)({ type: 'image', isArray: false }), (0, types_1.portType)({ type: 'video', isArray: false }), (0, types_1.portType)({ type: 'audio', isArray: false }), (0, types_1.portType)({ type: 'text', isArray: false }), (0, types_1.portType)({ type: 'social_audio', isArray: false }), (0, types_1.portType)({ type: 'account', isArray: false }), (0, types_1.portType)({ type: 'boolean', isArray: false }), (0, types_1.portType)({ type: 'object', isArray: false })],
|
|
735
735
|
required: true,
|
|
736
736
|
},
|
|
737
737
|
],
|
package/dist/ports.js
CHANGED
|
@@ -43,7 +43,7 @@ function computeInputPorts({ node }) {
|
|
|
43
43
|
return baseInputs;
|
|
44
44
|
return variables.map(variable => ({
|
|
45
45
|
id: variable,
|
|
46
|
-
type: (0, types_1.portType)('text'),
|
|
46
|
+
type: (0, types_1.portType)({ type: 'text', isArray: false }),
|
|
47
47
|
required: false,
|
|
48
48
|
}));
|
|
49
49
|
}
|
|
@@ -57,7 +57,7 @@ function computeInputPorts({ node }) {
|
|
|
57
57
|
if (editorConfig.backgroundType !== 'color') {
|
|
58
58
|
dynamicInputs.push({
|
|
59
59
|
id: 'background',
|
|
60
|
-
type: (0, types_1.portType)('image'),
|
|
60
|
+
type: (0, types_1.portType)({ type: 'image', isArray: false }),
|
|
61
61
|
required: true,
|
|
62
62
|
});
|
|
63
63
|
}
|
|
@@ -66,14 +66,14 @@ function computeInputPorts({ node }) {
|
|
|
66
66
|
if (elem.type === 'image' && elem.inputId) {
|
|
67
67
|
dynamicInputs.push({
|
|
68
68
|
id: elem.inputId,
|
|
69
|
-
type: (0, types_1.portType)('image'),
|
|
69
|
+
type: (0, types_1.portType)({ type: 'image', isArray: false }),
|
|
70
70
|
required: true,
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
else if (elem.type === 'text' && elem.textInputId) {
|
|
74
74
|
dynamicInputs.push({
|
|
75
75
|
id: elem.textInputId,
|
|
76
|
-
type: (0, types_1.portType)('text'),
|
|
76
|
+
type: (0, types_1.portType)({ type: 'text', isArray: false }),
|
|
77
77
|
required: true,
|
|
78
78
|
});
|
|
79
79
|
}
|
|
@@ -91,7 +91,7 @@ function computeInputPorts({ node }) {
|
|
|
91
91
|
addedCropInputs.add(inputRef);
|
|
92
92
|
dynamicInputs.push({
|
|
93
93
|
id: inputRef,
|
|
94
|
-
type: (0, types_1.portType)('text'),
|
|
94
|
+
type: (0, types_1.portType)({ type: 'text', isArray: false }),
|
|
95
95
|
required: false,
|
|
96
96
|
});
|
|
97
97
|
}
|
|
@@ -109,9 +109,9 @@ function computeInputPorts({ node }) {
|
|
|
109
109
|
channel.segments.forEach(segment => {
|
|
110
110
|
if ('inputRef' in segment && segment.inputRef && !addedIds.has(segment.inputRef)) {
|
|
111
111
|
addedIds.add(segment.inputRef);
|
|
112
|
-
const inputType = segment.type === 'video' ? (0, types_1.portType)('video')
|
|
113
|
-
: segment.type === 'audio' ? (0, types_1.portType)('audio')
|
|
114
|
-
: (0, types_1.portType)('image');
|
|
112
|
+
const inputType = segment.type === 'video' ? (0, types_1.portType)({ type: 'video', isArray: false })
|
|
113
|
+
: segment.type === 'audio' ? (0, types_1.portType)({ type: 'audio', isArray: false })
|
|
114
|
+
: (0, types_1.portType)({ type: 'image', isArray: false });
|
|
115
115
|
dynamicInputs.push({
|
|
116
116
|
id: segment.inputRef,
|
|
117
117
|
type: inputType,
|
|
@@ -122,7 +122,7 @@ function computeInputPorts({ node }) {
|
|
|
122
122
|
addedIds.add(segment.textInputRef);
|
|
123
123
|
dynamicInputs.push({
|
|
124
124
|
id: segment.textInputRef,
|
|
125
|
-
type: (0, types_1.portType)('text'),
|
|
125
|
+
type: (0, types_1.portType)({ type: 'text', isArray: false }),
|
|
126
126
|
required: true,
|
|
127
127
|
});
|
|
128
128
|
}
|
|
@@ -145,7 +145,7 @@ function computeInputPorts({ node }) {
|
|
|
145
145
|
const varType = v.variableType === 'dropdown' ? 'text' : (v.variableType ?? 'text');
|
|
146
146
|
return {
|
|
147
147
|
id: v.id,
|
|
148
|
-
type: (0, types_1.portType)(varType),
|
|
148
|
+
type: (0, types_1.portType)({ type: varType, isArray: false }),
|
|
149
149
|
required: false,
|
|
150
150
|
};
|
|
151
151
|
});
|
|
@@ -158,7 +158,7 @@ function computeInputPorts({ node }) {
|
|
|
158
158
|
return baseInputs;
|
|
159
159
|
return configInputs.map((input) => ({
|
|
160
160
|
id: input.id,
|
|
161
|
-
type: (0, types_1.portType)(input.type, input.isArray ?? false),
|
|
161
|
+
type: (0, types_1.portType)({ type: input.type, isArray: input.isArray ?? false }),
|
|
162
162
|
required: false,
|
|
163
163
|
}));
|
|
164
164
|
}
|
|
@@ -169,14 +169,14 @@ function computeInputPorts({ node }) {
|
|
|
169
169
|
const dynamicInputs = [];
|
|
170
170
|
if (mode === 'video') {
|
|
171
171
|
// Video mode: video input required
|
|
172
|
-
dynamicInputs.push({ id: 'video', type: (0, types_1.portType)('video'), required: true });
|
|
172
|
+
dynamicInputs.push({ id: 'video', type: (0, types_1.portType)({ type: 'video', isArray: false }), required: true });
|
|
173
173
|
}
|
|
174
174
|
else {
|
|
175
175
|
// Slideshow mode
|
|
176
176
|
const inputType = autoPostConfig?.inputType ?? 'static';
|
|
177
177
|
if (inputType === 'variable') {
|
|
178
178
|
// Variable mode: single images array port
|
|
179
|
-
dynamicInputs.push({ id: 'images', type: (0, types_1.portType)('object'), required: true });
|
|
179
|
+
dynamicInputs.push({ id: 'images', type: (0, types_1.portType)({ type: 'object', isArray: false }), required: true });
|
|
180
180
|
}
|
|
181
181
|
else {
|
|
182
182
|
// Static mode: individual image inputs
|
|
@@ -186,15 +186,15 @@ function computeInputPorts({ node }) {
|
|
|
186
186
|
{ id: 'image3' },
|
|
187
187
|
];
|
|
188
188
|
imageInputs.forEach((input) => {
|
|
189
|
-
dynamicInputs.push({ id: input.id, type: (0, types_1.portType)('image'), required: true });
|
|
189
|
+
dynamicInputs.push({ id: input.id, type: (0, types_1.portType)({ type: 'image', isArray: false }), required: true });
|
|
190
190
|
});
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
// Add static inputs (same for both modes)
|
|
194
|
-
dynamicInputs.push({ id: 'account', type: (0, types_1.portType)('account'), required: true }, { id: 'caption', type: (0, types_1.portType)('text'), required: false });
|
|
194
|
+
dynamicInputs.push({ id: 'account', type: (0, types_1.portType)({ type: 'account', isArray: false }), required: true }, { id: 'caption', type: (0, types_1.portType)({ type: 'text', isArray: false }), required: false });
|
|
195
195
|
// Only add social-audio port if isVariable is true
|
|
196
196
|
if (autoPostConfig?.socialAudio?.isVariable) {
|
|
197
|
-
dynamicInputs.push({ id: 'social-audio', type: (0, types_1.portType)('audio'), required: false });
|
|
197
|
+
dynamicInputs.push({ id: 'social-audio', type: (0, types_1.portType)({ type: 'audio', isArray: false }), required: false });
|
|
198
198
|
}
|
|
199
199
|
return dynamicInputs;
|
|
200
200
|
}
|
|
@@ -206,7 +206,7 @@ function computeInputPorts({ node }) {
|
|
|
206
206
|
return baseInputs;
|
|
207
207
|
return configInputs.map((input) => ({
|
|
208
208
|
id: input.id,
|
|
209
|
-
type: (0, types_1.portType)(input.type),
|
|
209
|
+
type: (0, types_1.portType)({ type: input.type, isArray: false }),
|
|
210
210
|
required: true,
|
|
211
211
|
}));
|
|
212
212
|
}
|
|
@@ -220,13 +220,13 @@ function computeInputPorts({ node }) {
|
|
|
220
220
|
const variables = extractTemplateVariables([systemPrompt]);
|
|
221
221
|
variables.forEach(v => dynamicInputs.push({
|
|
222
222
|
id: v,
|
|
223
|
-
type: [(0, types_1.portType)('text'), (0, types_1.portType)('object'), (0, types_1.portType)('boolean')],
|
|
223
|
+
type: [(0, types_1.portType)({ type: 'text', isArray: false }), (0, types_1.portType)({ type: 'object', isArray: false }), (0, types_1.portType)({ type: 'boolean', isArray: false })],
|
|
224
224
|
required: true,
|
|
225
225
|
}));
|
|
226
226
|
// Add image input refs
|
|
227
|
-
llmConfig?.imageInputRefs?.forEach((ref) => dynamicInputs.push({ id: ref, type: (0, types_1.portType)('image'), required: true }));
|
|
227
|
+
llmConfig?.imageInputRefs?.forEach((ref) => dynamicInputs.push({ id: ref, type: (0, types_1.portType)({ type: 'image', isArray: false }), required: true }));
|
|
228
228
|
// Add video input refs
|
|
229
|
-
llmConfig?.videoInputRefs?.forEach((ref) => dynamicInputs.push({ id: ref, type: (0, types_1.portType)('video'), required: true }));
|
|
229
|
+
llmConfig?.videoInputRefs?.forEach((ref) => dynamicInputs.push({ id: ref, type: (0, types_1.portType)({ type: 'video', isArray: false }), required: true }));
|
|
230
230
|
return dynamicInputs.length > 0 ? dynamicInputs : baseInputs;
|
|
231
231
|
}
|
|
232
232
|
// For-each nodes: array input + passthrough inputs
|
|
@@ -234,10 +234,10 @@ function computeInputPorts({ node }) {
|
|
|
234
234
|
const forEachConfig = node.config?.forEachConfig;
|
|
235
235
|
const inputPorts = forEachConfig?.inputPorts ?? [];
|
|
236
236
|
return [
|
|
237
|
-
{ id: 'array', type: (0, types_1.portType)('object'), required: true },
|
|
237
|
+
{ id: 'array', type: (0, types_1.portType)({ type: 'object', isArray: false }), required: true },
|
|
238
238
|
...inputPorts.map((port) => ({
|
|
239
239
|
id: port.id,
|
|
240
|
-
type: (0, types_1.portType)(port.type, port.isArray ?? false),
|
|
240
|
+
type: (0, types_1.portType)({ type: port.type, isArray: port.isArray ?? false }),
|
|
241
241
|
required: false,
|
|
242
242
|
})),
|
|
243
243
|
];
|
|
@@ -256,11 +256,11 @@ function computeInputPorts({ node }) {
|
|
|
256
256
|
}
|
|
257
257
|
// Transcript nodes: media input
|
|
258
258
|
if (node.type === 'transcript') {
|
|
259
|
-
return [{ id: 'media', type: [(0, types_1.portType)('video'), (0, types_1.portType)('audio')], required: true }];
|
|
259
|
+
return [{ id: 'media', type: [(0, types_1.portType)({ type: 'video', isArray: false }), (0, types_1.portType)({ type: 'audio', isArray: false })], required: true }];
|
|
260
260
|
}
|
|
261
261
|
// Video import nodes: url input
|
|
262
262
|
if (node.type === 'video-import') {
|
|
263
|
-
return [{ id: 'url', type: (0, types_1.portType)('text'), required: true }];
|
|
263
|
+
return [{ id: 'url', type: (0, types_1.portType)({ type: 'text', isArray: false }), required: true }];
|
|
264
264
|
}
|
|
265
265
|
// Image Generation nodes: prompt + optional image for edit models
|
|
266
266
|
if (node.type === 'generate-image') {
|
|
@@ -268,10 +268,10 @@ function computeInputPorts({ node }) {
|
|
|
268
268
|
const model = imageGenConfig?.model ?? '';
|
|
269
269
|
const isEditModel = model.includes('/edit');
|
|
270
270
|
const dynamicInputs = [
|
|
271
|
-
{ id: 'prompt', type: (0, types_1.portType)('text'), required: true },
|
|
271
|
+
{ id: 'prompt', type: (0, types_1.portType)({ type: 'text', isArray: false }), required: true },
|
|
272
272
|
];
|
|
273
273
|
if (isEditModel) {
|
|
274
|
-
dynamicInputs.push({ id: 'image', type: (0, types_1.portType)('image'), required: true });
|
|
274
|
+
dynamicInputs.push({ id: 'image', type: (0, types_1.portType)({ type: 'image', isArray: false }), required: true });
|
|
275
275
|
}
|
|
276
276
|
return dynamicInputs;
|
|
277
277
|
}
|
|
@@ -287,7 +287,7 @@ function computeInputPorts({ node }) {
|
|
|
287
287
|
: 'text';
|
|
288
288
|
dynamicInputs.push({
|
|
289
289
|
id: param.name,
|
|
290
|
-
type: (0, types_1.portType)(pType),
|
|
290
|
+
type: (0, types_1.portType)({ type: pType, isArray: false }),
|
|
291
291
|
required: param.required,
|
|
292
292
|
});
|
|
293
293
|
}
|
|
@@ -296,7 +296,7 @@ function computeInputPorts({ node }) {
|
|
|
296
296
|
}
|
|
297
297
|
// Deduplicate nodes: video input
|
|
298
298
|
if (node.type === 'deduplicate') {
|
|
299
|
-
return [{ id: 'video', type: (0, types_1.portType)('video'), required: true }];
|
|
299
|
+
return [{ id: 'video', type: (0, types_1.portType)({ type: 'video', isArray: false }), required: true }];
|
|
300
300
|
}
|
|
301
301
|
return baseInputs;
|
|
302
302
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -772,7 +772,10 @@ export interface PortType {
|
|
|
772
772
|
/**
|
|
773
773
|
* Helper to create a PortType descriptor
|
|
774
774
|
*/
|
|
775
|
-
export declare function portType(type
|
|
775
|
+
export declare function portType({ type, isArray }: {
|
|
776
|
+
type: BasePortType;
|
|
777
|
+
isArray: boolean;
|
|
778
|
+
}): PortType;
|
|
776
779
|
/**
|
|
777
780
|
* Format a PortType for display (e.g., { type: 'image', isArray: true } -> 'image[]')
|
|
778
781
|
*/
|
package/dist/types.js
CHANGED