@platforma-sdk/workflow-tengo 5.0.2 → 5.1.0
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.python.internal.lib.tengo +6 -4
- package/dist/tengo/lib/exec.python.lib.tengo +2 -1
- package/dist/tengo/lib/txt.lib.tengo +70 -0
- package/dist/tengo/tpl/anonymize.deanonymize.plj.gz +0 -0
- package/dist/tengo/tpl/anonymize.impl.plj.gz +0 -0
- 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/check_network.workdir_type_name_extractor.plj.gz +0 -0
- package/dist/tengo/tpl/exec.R.create-renv.plj.gz +0 -0
- package/dist/tengo/tpl/exec.delayed-compute-allocation.impl.plj.gz +0 -0
- package/dist/tengo/tpl/exec.exec-impl.plj.gz +0 -0
- package/dist/tengo/tpl/exec.exec.plj.gz +0 -0
- package/dist/tengo/tpl/exec.load-software.impl.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.parse-to-json.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 +4 -3
|
@@ -3,12 +3,14 @@ validation := import("@platforma-sdk/workflow-tengo:validation")
|
|
|
3
3
|
desc := import("@platforma-sdk/workflow-tengo:exec.descriptor")
|
|
4
4
|
|
|
5
5
|
pythonVenvInputSchema := {
|
|
6
|
-
toolset: "string",
|
|
7
|
-
dependencies: {"any": validation.reference},
|
|
6
|
+
"toolset": "string",
|
|
7
|
+
"dependencies": {"any": validation.reference},
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
pythonDescriptor: desc.runEnvScheme,
|
|
11
|
-
python: validation.reference
|
|
10
|
+
"pythonDescriptor": desc.runEnvScheme,
|
|
11
|
+
"python": validation.reference,
|
|
12
|
+
|
|
13
|
+
"forceRecreate,?": "number"
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
export ll.toStrict({
|
|
@@ -139,7 +139,8 @@ pythonVenvBuilder := func() {
|
|
|
139
139
|
dependencies: depsMap,
|
|
140
140
|
|
|
141
141
|
pythonDescriptor: pythonDescriptor,
|
|
142
|
-
python: pythonPkg
|
|
142
|
+
python: pythonPkg,
|
|
143
|
+
forceRecreate: 1 // increment to force venv re-creation in blocks
|
|
143
144
|
}
|
|
144
145
|
|
|
145
146
|
validation.assertType(pyVenvInputs, internal.pythonVenvInputSchema, "incomplete python runenv configuration")
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
2
|
+
smart := import("@platforma-sdk/workflow-tengo:smart")
|
|
3
|
+
assets := import("@platforma-sdk/workflow-tengo:assets")
|
|
4
|
+
exec := import("@platforma-sdk/workflow-tengo:exec")
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
head := func(fileRef, opts) {
|
|
27
|
+
if !smart.isReference(fileRef) {
|
|
28
|
+
ll.panic("fileRef must be a valid resource reference. Got: %T", fileRef)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if !is_map(opts) {
|
|
32
|
+
ll.panic("opts must be a map. Got: %T", opts)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if is_undefined(opts.lines) {
|
|
36
|
+
ll.panic("opts.lines is required")
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if !is_int(opts.lines) || opts.lines < 0 {
|
|
40
|
+
ll.panic("opts.lines must be a non-negative integer. Got: %v", opts.lines)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
maxBytes := 32768 // Default 32KB
|
|
44
|
+
if !is_undefined(opts.maxBytes) {
|
|
45
|
+
if !is_int(opts.maxBytes) || opts.maxBytes < 0 {
|
|
46
|
+
ll.panic("opts.maxBytes must be a non-negative integer. Got: %v", opts.maxBytes)
|
|
47
|
+
}
|
|
48
|
+
maxBytes = opts.maxBytes
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
ptexterSw := assets.importSoftware("@platforma-open/milaboratories.software-ptexter:phead-lines")
|
|
52
|
+
|
|
53
|
+
cmdBuilder := exec.builder().
|
|
54
|
+
software(ptexterSw).
|
|
55
|
+
arg("--lines").
|
|
56
|
+
arg(string(opts.lines)).
|
|
57
|
+
arg("--max-bytes").
|
|
58
|
+
arg(string(maxBytes)).
|
|
59
|
+
arg("input.txt").
|
|
60
|
+
arg("output.txt").
|
|
61
|
+
addFile("input.txt", fileRef).
|
|
62
|
+
saveFileContent("output.txt")
|
|
63
|
+
|
|
64
|
+
result := cmdBuilder.run()
|
|
65
|
+
return result.getFileContent("output.txt")
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export ll.toStrict({
|
|
69
|
+
head: head
|
|
70
|
+
})
|
|
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
|
|
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": "5.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "Tengo SDK library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -18,10 +18,11 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@milaboratories/software-pframes-conv": "2.2.2",
|
|
20
20
|
"@platforma-open/milaboratories.software-small-binaries": "^1.15.21",
|
|
21
|
-
"@platforma-open/milaboratories.software-ptabler": ""
|
|
21
|
+
"@platforma-open/milaboratories.software-ptabler": "1.11.2",
|
|
22
|
+
"@platforma-open/milaboratories.software-ptexter": "1.0.1"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
24
|
-
"@platforma-sdk/tengo-builder": "
|
|
25
|
+
"@platforma-sdk/tengo-builder": "2.1.16"
|
|
25
26
|
},
|
|
26
27
|
"scripts": {
|
|
27
28
|
"type-check": "pl-tengo check",
|