@platforma-sdk/workflow-tengo 4.5.0 → 4.5.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/tengo/lib/exec.internal.lib.tengo +2 -1
- 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 +23 -1
- 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
|
@@ -137,7 +137,7 @@ _loadPythonRunEnvironment := func(operationMode, descriptor, softName, softPkg)
|
|
|
137
137
|
pythonRefVar := _newRefVar(_ARG_VAR_PYTHON_RUN_ENV, softName+"/python", venv.python())
|
|
138
138
|
pythonVenvRefVar := _newRefVar(_ARG_VAR_PYTHON_VENV, softName + "/venv", venv.venv())
|
|
139
139
|
venvBinDirRefVar := _newRefVar(_ARG_VAR_VENV_BIN_DIR, softName + "/binDir", venv.binDir() )
|
|
140
|
-
|
|
140
|
+
pathDelimeterRefVar := _newRefVar(_ARG_PATH_DELIMETER, softName + "/pathDelimeter", venv.pathDelimeter())
|
|
141
141
|
|
|
142
142
|
return ll.toStrict({
|
|
143
143
|
runEnvType: "python",
|
|
@@ -401,6 +401,7 @@ _activateRenv := func(wd, opts) {
|
|
|
401
401
|
activateRenv := prepareCommandRun(wd, opts)
|
|
402
402
|
activateRenv.
|
|
403
403
|
cmd("R").
|
|
404
|
+
inQueue(constants.LIGHT_QUEUE).
|
|
404
405
|
arg("-e").arg("renv::activate()")
|
|
405
406
|
|
|
406
407
|
activateRenvRun := activateRenv.build()
|
|
@@ -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,6 +50,7 @@ _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
|
ll.panic("input %v field has error: %v", field, field.getError().getDataAsJson().message)
|
|
@@ -58,8 +59,18 @@ _unmarshal := func(resource, preprocessors) {
|
|
|
58
59
|
} else {
|
|
59
60
|
result[field] = value
|
|
60
61
|
}
|
|
62
|
+
}
|
|
61
63
|
|
|
64
|
+
for field, value in resource.serviceInputs() {
|
|
65
|
+
if value.isErrorSet() {
|
|
66
|
+
ll.panic("service input %v field has error: %v", field, field.getError().getDataAsJson().message)
|
|
67
|
+
} else if value.isSet() {
|
|
68
|
+
result[field] = _unmarshal(value.getValue(), preprocessors)
|
|
69
|
+
} else {
|
|
70
|
+
result[field] = value
|
|
71
|
+
}
|
|
62
72
|
}
|
|
73
|
+
|
|
63
74
|
return result
|
|
64
75
|
} else {
|
|
65
76
|
|
|
@@ -158,10 +169,17 @@ tpl := func(ops) {
|
|
|
158
169
|
return self.renderer().get(tplutil.INPUTS_MAP_FIELD).inputs()
|
|
159
170
|
},
|
|
160
171
|
|
|
161
|
-
_inputs: undefined,
|
|
162
172
|
|
|
163
173
|
|
|
164
174
|
|
|
175
|
+
rawServiceInputs: func() {
|
|
176
|
+
return self.renderer().get(tplutil.INPUTS_MAP_FIELD).serviceInputs()
|
|
177
|
+
},
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
_inputs: undefined,
|
|
181
|
+
|
|
182
|
+
|
|
165
183
|
|
|
166
184
|
inputs: func() {
|
|
167
185
|
if self._inputs == undefined {
|
|
@@ -366,6 +384,10 @@ tpl := func(ops) {
|
|
|
366
384
|
|
|
367
385
|
inputs := self.inputs()
|
|
368
386
|
|
|
387
|
+
if len(self.rawServiceInputs()) > 0 {
|
|
388
|
+
ll.panic("prepare() statement is not available for templates with service inputs in this verson of workflow-tengo SDK")
|
|
389
|
+
}
|
|
390
|
+
|
|
369
391
|
|
|
370
392
|
newInputs := copy(inputs)
|
|
371
393
|
|
|
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.2",
|
|
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.4"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"type-check": "pl-tengo check",
|