@platforma-sdk/workflow-tengo 4.5.1 → 4.5.3
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/exec.limits.lib.tengo +1 -1
- package/dist/tengo/lib/smart.lib.tengo +27 -0
- package/dist/tengo/lib/tpl.base.lib.tengo +29 -2
- package/dist/tengo/tpl/check_network.create_workdir_from_storage.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.download_blob.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.run_hello_world.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.run_hello_world_py.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.upload_blob.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.upload_template.plj.gz +0 -0
- package/dist/tengo/tpl/exec.R.create-renv.plj.gz +0 -0
- package/dist/tengo/tpl/exec.exec.plj.gz +0 -0
- package/dist/tengo/tpl/exec.monetization_info.plj.gz +0 -0
- package/dist/tengo/tpl/exec.monetization_to_json.plj.gz +0 -0
- package/dist/tengo/tpl/exec.python.create-venv.plj.gz +0 -0
- package/dist/tengo/tpl/exec.python.install-deps.plj.gz +0 -0
- package/dist/tengo/tpl/exec.python.venv-bin-path.plj.gz +0 -0
- package/dist/tengo/tpl/ll.get-field.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-multiple-pcolumns.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-pframe-for-ui.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.process-pcolumn-data.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.remove-nulls.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.slice-data.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.xsv-export-pframe.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.xsv-import-if-not-null.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.xsv-import-map.plj.gz +0 -0
- package/dist/tengo/tpl/waiter.waiter.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/dist/tengo/tpl/workflow.query-anchored.plj.gz +0 -0
- package/package.json +2 -2
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
9
|
+
|
|
9
10
|
oop := import("@platforma-sdk/workflow-tengo:oop")
|
|
10
11
|
validation := import("@platforma-sdk/workflow-tengo:validation")
|
|
11
|
-
|
|
12
12
|
smart := import("@platforma-sdk/workflow-tengo:smart")
|
|
13
13
|
json := import("json")
|
|
14
14
|
|
|
@@ -486,6 +486,7 @@ resource = func(r) {
|
|
|
486
486
|
if self._inputs == undefined {
|
|
487
487
|
info := self.info()
|
|
488
488
|
inputs := maps.mapValues(info.Inputs, field)
|
|
489
|
+
|
|
489
490
|
if !info.InputsLocked {
|
|
490
491
|
return inputs
|
|
491
492
|
}
|
|
@@ -495,6 +496,32 @@ resource = func(r) {
|
|
|
495
496
|
},
|
|
496
497
|
|
|
497
498
|
|
|
499
|
+
_serviceInputs: undefined,
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
serviceInputs: func() {
|
|
504
|
+
if self._serviceInputs == undefined {
|
|
505
|
+
info := self.info()
|
|
506
|
+
|
|
507
|
+
if !maps.containsKey(info, "ServiceFields") {
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
self._serviceInputs = {}
|
|
511
|
+
return self._serviceInputs
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
svcs := maps.mapValues(info.ServiceFields, field)
|
|
515
|
+
|
|
516
|
+
if !info.InputsLocked {
|
|
517
|
+
return svcs
|
|
518
|
+
}
|
|
519
|
+
self._serviceInputs = svcs
|
|
520
|
+
}
|
|
521
|
+
return self._serviceInputs
|
|
522
|
+
},
|
|
523
|
+
|
|
524
|
+
|
|
498
525
|
_outputs: undefined,
|
|
499
526
|
|
|
500
527
|
|
|
@@ -50,16 +50,32 @@ _unmarshal := func(resource, preprocessors) {
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
result := {}
|
|
53
|
+
|
|
53
54
|
for field, value in resource.inputs() {
|
|
54
55
|
if value.isErrorSet() {
|
|
55
|
-
|
|
56
|
+
decodedError := value.getError().getDataAsJson()
|
|
57
|
+
if is_map(decodedError) && decodedError.message != undefined {
|
|
58
|
+
ll.panic("input %v field has error: %v", field, decodedError.message)
|
|
59
|
+
} else {
|
|
60
|
+
ll.panic("input %v field has error: %v", field, value.getError().getData())
|
|
61
|
+
}
|
|
56
62
|
} else if value.isSet() {
|
|
57
63
|
result[field] = _unmarshal(value.getValue(), preprocessors)
|
|
58
64
|
} else {
|
|
59
65
|
result[field] = value
|
|
60
66
|
}
|
|
67
|
+
}
|
|
61
68
|
|
|
69
|
+
for field, value in resource.serviceInputs() {
|
|
70
|
+
if value.isErrorSet() {
|
|
71
|
+
ll.panic("service input %v field has error: %v", field, field.getError().getDataAsJson().message)
|
|
72
|
+
} else if value.isSet() {
|
|
73
|
+
result[field] = _unmarshal(value.getValue(), preprocessors)
|
|
74
|
+
} else {
|
|
75
|
+
result[field] = value
|
|
76
|
+
}
|
|
62
77
|
}
|
|
78
|
+
|
|
63
79
|
return result
|
|
64
80
|
} else {
|
|
65
81
|
|
|
@@ -158,10 +174,17 @@ tpl := func(ops) {
|
|
|
158
174
|
return self.renderer().get(tplutil.INPUTS_MAP_FIELD).inputs()
|
|
159
175
|
},
|
|
160
176
|
|
|
161
|
-
_inputs: undefined,
|
|
162
177
|
|
|
163
178
|
|
|
164
179
|
|
|
180
|
+
rawServiceInputs: func() {
|
|
181
|
+
return self.renderer().get(tplutil.INPUTS_MAP_FIELD).serviceInputs()
|
|
182
|
+
},
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
_inputs: undefined,
|
|
186
|
+
|
|
187
|
+
|
|
165
188
|
|
|
166
189
|
inputs: func() {
|
|
167
190
|
if self._inputs == undefined {
|
|
@@ -366,6 +389,10 @@ tpl := func(ops) {
|
|
|
366
389
|
|
|
367
390
|
inputs := self.inputs()
|
|
368
391
|
|
|
392
|
+
if len(self.rawServiceInputs()) > 0 {
|
|
393
|
+
ll.panic("prepare() statement is not available for templates with service inputs in this verson of workflow-tengo SDK")
|
|
394
|
+
}
|
|
395
|
+
|
|
369
396
|
|
|
370
397
|
newInputs := copy(inputs)
|
|
371
398
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-sdk/workflow-tengo",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.3",
|
|
4
4
|
"description": "Tengo SDK library",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@platforma-open/milaboratories.software-small-binaries": "^1.15.21"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@platforma-sdk/tengo-builder": "^2.1.
|
|
23
|
+
"@platforma-sdk/tengo-builder": "^2.1.5"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"type-check": "pl-tengo check",
|