@platforma-sdk/workflow-tengo 1.3.0 → 1.4.1
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/tengo/lib/pframes.xsv.lib.tengo +1 -0
- package/dist/tengo/lib/smart.lib.tengo +59 -31
- package/dist/tengo/tpl/exec.create-python-venv.plj.gz +0 -0
- package/dist/tengo/tpl/exec.exec.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.aggregate.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-multiple-pcolumns.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-pframe.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-single-pcolumn.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.import-dir.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.import-xsv-map.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.map-pframe.plj.gz +0 -0
- package/dist/tengo/tpl/workdir.save.plj.gz +0 -0
- package/dist/tengo/tpl/workflow.build-ctx.plj.gz +0 -0
- package/package.json +1 -1
|
@@ -121,14 +121,16 @@ isReference := func(f) {
|
|
|
121
121
|
* Gets future field by given field name and field type.
|
|
122
122
|
*
|
|
123
123
|
* @param from: reference - whether a resource or a field we get a field from.
|
|
124
|
-
* @param name: field name
|
|
124
|
+
* @param name: string - field name
|
|
125
125
|
* @param fieldType: field type: input, output
|
|
126
|
+
* @param isEph: bool - resolve in ephemeral or pure mode
|
|
127
|
+
*
|
|
126
128
|
* @return field: smart field
|
|
127
129
|
*/
|
|
128
|
-
_getFutureField := func(from, name, fieldType) {
|
|
130
|
+
_getFutureField := func(from, name, fieldType, isEph) {
|
|
129
131
|
ll.assert(isReference(from), "'from' must be either a resource or a field, got: %#v", from)
|
|
130
132
|
|
|
131
|
-
futureField := tx.createFutureFieldID(fieldType, name)
|
|
133
|
+
futureField := tx.createFutureFieldID(fieldType, name, !isEph)
|
|
132
134
|
f := field(futureField.ResourceFID)
|
|
133
135
|
f.set(from)
|
|
134
136
|
|
|
@@ -348,7 +350,7 @@ resource = func(r) {
|
|
|
348
350
|
},
|
|
349
351
|
|
|
350
352
|
/**
|
|
351
|
-
* Whether
|
|
353
|
+
* Whether resource has input field with specified name
|
|
352
354
|
*
|
|
353
355
|
* @param name field name
|
|
354
356
|
*/
|
|
@@ -357,7 +359,7 @@ resource = func(r) {
|
|
|
357
359
|
},
|
|
358
360
|
|
|
359
361
|
/**
|
|
360
|
-
* Whether
|
|
362
|
+
* Whether resource has output field with specified name
|
|
361
363
|
*
|
|
362
364
|
* @param name field name
|
|
363
365
|
*/
|
|
@@ -366,7 +368,7 @@ resource = func(r) {
|
|
|
366
368
|
},
|
|
367
369
|
|
|
368
370
|
/**
|
|
369
|
-
* Whether
|
|
371
|
+
* Whether resource has any field with specified name
|
|
370
372
|
*
|
|
371
373
|
* @param name field name
|
|
372
374
|
*/
|
|
@@ -427,40 +429,53 @@ resource = func(r) {
|
|
|
427
429
|
/**
|
|
428
430
|
* Get future field given field name and field type.
|
|
429
431
|
*
|
|
430
|
-
* @param name: field name
|
|
431
|
-
* @param fieldType: field type
|
|
432
|
-
* @
|
|
432
|
+
* @param name: string - field name
|
|
433
|
+
* @param fieldType: field type - input, output
|
|
434
|
+
* @param eph: bool (optional) - when false, the operation becomes pure function, waiting for resource
|
|
435
|
+
* to pass deduplication before resolution.
|
|
436
|
+
*
|
|
437
|
+
* @return field: smart.field
|
|
433
438
|
*/
|
|
434
|
-
getFutureField: func(name, fieldType) {
|
|
435
|
-
|
|
439
|
+
getFutureField: func(name, fieldType, ...eph) {
|
|
440
|
+
isEph := true
|
|
441
|
+
if len(eph) > 0 {
|
|
442
|
+
isEph = eph[0]
|
|
443
|
+
}
|
|
444
|
+
return _getFutureField(strictSelf, name, fieldType, isEph)
|
|
436
445
|
},
|
|
437
446
|
|
|
438
447
|
/**
|
|
439
448
|
* Get future input field given field name or a path
|
|
440
449
|
*
|
|
441
|
-
* @param nameOrPath field name or an array representing a path to be traversed
|
|
442
|
-
* @
|
|
450
|
+
* @param nameOrPath: string|string[] - field name or an array representing a path to be traversed
|
|
451
|
+
* @param eph: bool (optional) - when false, the operation becomes pure function, waiting for resource
|
|
452
|
+
* to pass deduplication before resolution.
|
|
453
|
+
*
|
|
454
|
+
* @return field: smart.field
|
|
443
455
|
*/
|
|
444
|
-
getFutureInputField: func(nameOrPath) {
|
|
456
|
+
getFutureInputField: func(nameOrPath, ...eph) {
|
|
445
457
|
if is_array(nameOrPath) {
|
|
446
458
|
current := strictSelf
|
|
447
459
|
for name in nameOrPath {
|
|
448
|
-
current = current.getFutureField(name, "input")
|
|
460
|
+
current = current.getFutureField(name, "input", eph...)
|
|
449
461
|
}
|
|
450
462
|
return current
|
|
451
463
|
} else {
|
|
452
|
-
return self.getFutureField(nameOrPath, "input")
|
|
464
|
+
return self.getFutureField(nameOrPath, "input", eph...)
|
|
453
465
|
}
|
|
454
466
|
},
|
|
455
467
|
|
|
456
468
|
/**
|
|
457
469
|
* Get future output field given field name
|
|
458
470
|
*
|
|
459
|
-
* @param name field name
|
|
460
|
-
* @
|
|
471
|
+
* @param name: string - field name
|
|
472
|
+
* @param eph: bool (optional) - when false, the operation becomes pure function, waiting for resource
|
|
473
|
+
* to pass deduplication before resolution.
|
|
474
|
+
*
|
|
475
|
+
* @return field: smart.field
|
|
461
476
|
*/
|
|
462
|
-
getFutureOutputField: func(name) {
|
|
463
|
-
return self.getFutureField(name, "output")
|
|
477
|
+
getFutureOutputField: func(name, ...eph) {
|
|
478
|
+
return self.getFutureField(name, "output", eph...)
|
|
464
479
|
},
|
|
465
480
|
|
|
466
481
|
/**
|
|
@@ -687,40 +702,53 @@ field = func(f) {
|
|
|
687
702
|
/**
|
|
688
703
|
* Get future field given field name and field type.
|
|
689
704
|
*
|
|
690
|
-
* @param name: field name
|
|
705
|
+
* @param name: string - field name
|
|
691
706
|
* @param fieldType: field type: input, output
|
|
692
|
-
* @
|
|
707
|
+
* @param eph: bool (optional) - when false, the operation becomes pure function, waiting for resource
|
|
708
|
+
* to pass deduplication before resolution.
|
|
709
|
+
*
|
|
710
|
+
* @return field: smart.field
|
|
693
711
|
*/
|
|
694
|
-
getFutureField: func(name, fieldType) {
|
|
695
|
-
|
|
712
|
+
getFutureField: func(name, fieldType, ...eph) {
|
|
713
|
+
isEph := true
|
|
714
|
+
if len(eph) > 0 {
|
|
715
|
+
isEph = eph[0]
|
|
716
|
+
}
|
|
717
|
+
return _getFutureField(strictSelf, name, fieldType, isEph)
|
|
696
718
|
},
|
|
697
719
|
|
|
698
720
|
/**
|
|
699
721
|
* Get future input field given field name or a path
|
|
700
722
|
*
|
|
701
|
-
* @param nameOrPath field name or an array representing a path to be traversed
|
|
723
|
+
* @param nameOrPath: string|string[] - field name or an array representing a path to be traversed
|
|
724
|
+
* @param eph: bool (optional) - when false, the operation becomes pure function, waiting for resource
|
|
725
|
+
* to pass deduplication before resolution.
|
|
726
|
+
*
|
|
702
727
|
* @return field: smart field
|
|
703
728
|
*/
|
|
704
|
-
getFutureInputField: func(nameOrPath) {
|
|
729
|
+
getFutureInputField: func(nameOrPath, ...eph) {
|
|
705
730
|
if is_array(nameOrPath) {
|
|
706
731
|
current := strictSelf
|
|
707
732
|
for name in nameOrPath {
|
|
708
|
-
current = current.getFutureField(name, "input")
|
|
733
|
+
current = current.getFutureField(name, "input", eph...)
|
|
709
734
|
}
|
|
710
735
|
return current
|
|
711
736
|
} else {
|
|
712
|
-
return self.getFutureField(nameOrPath, "input")
|
|
737
|
+
return self.getFutureField(nameOrPath, "input", eph...)
|
|
713
738
|
}
|
|
714
739
|
},
|
|
715
740
|
|
|
716
741
|
/**
|
|
717
742
|
* Get future output field given field name
|
|
718
743
|
*
|
|
719
|
-
* @param name field name
|
|
744
|
+
* @param name: string - field name
|
|
745
|
+
* @param eph: bool (optional) - when false, the operation becomes pure function, waiting for resource
|
|
746
|
+
* to pass deduplication before resolution.
|
|
747
|
+
*
|
|
720
748
|
* @return field: smart field
|
|
721
749
|
*/
|
|
722
|
-
getFutureOutputField: func(name) {
|
|
723
|
-
return self.getFutureField(name, "output")
|
|
750
|
+
getFutureOutputField: func(name, ...eph) {
|
|
751
|
+
return self.getFutureField(name, "output", eph...)
|
|
724
752
|
}
|
|
725
753
|
}
|
|
726
754
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|