@platforma-sdk/workflow-tengo 4.7.5 → 4.8.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/index.d.ts +1 -1
- package/dist/index.js +1 -0
- package/dist/index.mjs +1 -0
- package/dist/tengo/lib/feats.lib.tengo +9 -2
- package/dist/tengo/lib/render.lib.tengo +6 -1
- package/dist/tengo/lib/waiter.lib.tengo +21 -6
- 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.delayed_compute_allocation.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
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare type TemplateFromFile = { readonly type: "from-file"; readonly path: string; };
|
|
2
|
-
declare type TplName = "ll.get-field" | "pframes.export-single-pcolumn" | "pframes.import-dir" | "pframes.remove-nulls" | "waiter.waiter" | "workdir.save" | "workflow.build-ctx" | "workflow.query-anchored" | "exec.R.create-renv" | "exec.python.install-deps" | "exec.python.venv-bin-path" | "pframes.export-multiple-pcolumns" | "pframes.slice-data" | "check_network.create_workdir_from_storage" | "check_network.download_blob" | "check_network.upload_blob" | "check_network.upload_template" | "exec.python.create-venv" | "exec.monetization_to_json" | "exec.exec" | "exec.monetization_info" | "pframes.xsv-export-pframe" | "pframes.xsv-import-if-not-null" | "pframes.xsv-import-map" | "check_network.run_hello_world" | "check_network.run_hello_world_py" | "pframes.process-pcolumn-data" | "pframes.export-pframe" | "pframes.export-pframe-for-ui";
|
|
2
|
+
declare type TplName = "ll.get-field" | "pframes.export-single-pcolumn" | "pframes.import-dir" | "pframes.remove-nulls" | "waiter.waiter" | "workdir.save" | "workflow.build-ctx" | "workflow.query-anchored" | "exec.R.create-renv" | "exec.delayed_compute_allocation" | "exec.python.install-deps" | "exec.python.venv-bin-path" | "pframes.export-multiple-pcolumns" | "pframes.slice-data" | "check_network.create_workdir_from_storage" | "check_network.download_blob" | "check_network.upload_blob" | "check_network.upload_template" | "exec.python.create-venv" | "exec.monetization_to_json" | "exec.exec" | "exec.monetization_info" | "pframes.xsv-export-pframe" | "pframes.xsv-import-if-not-null" | "pframes.xsv-import-map" | "check_network.run_hello_world" | "check_network.run_hello_world_py" | "pframes.process-pcolumn-data" | "pframes.export-pframe" | "pframes.export-pframe-for-ui";
|
|
3
3
|
declare const Templates: Record<TplName, TemplateFromFile>;
|
|
4
4
|
export { Templates };
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ module.exports = { Templates: {
|
|
|
8
8
|
'workflow.build-ctx': { type: 'from-file', path: require.resolve('./tengo/tpl/workflow.build-ctx.plj.gz') },
|
|
9
9
|
'workflow.query-anchored': { type: 'from-file', path: require.resolve('./tengo/tpl/workflow.query-anchored.plj.gz') },
|
|
10
10
|
'exec.R.create-renv': { type: 'from-file', path: require.resolve('./tengo/tpl/exec.R.create-renv.plj.gz') },
|
|
11
|
+
'exec.delayed_compute_allocation': { type: 'from-file', path: require.resolve('./tengo/tpl/exec.delayed_compute_allocation.plj.gz') },
|
|
11
12
|
'exec.python.install-deps': { type: 'from-file', path: require.resolve('./tengo/tpl/exec.python.install-deps.plj.gz') },
|
|
12
13
|
'exec.python.venv-bin-path': { type: 'from-file', path: require.resolve('./tengo/tpl/exec.python.venv-bin-path.plj.gz') },
|
|
13
14
|
'pframes.export-multiple-pcolumns': { type: 'from-file', path: require.resolve('./tengo/tpl/pframes.export-multiple-pcolumns.plj.gz') },
|
package/dist/index.mjs
CHANGED
|
@@ -9,6 +9,7 @@ export const Templates = {
|
|
|
9
9
|
'workflow.build-ctx': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/workflow.build-ctx.plj.gz') },
|
|
10
10
|
'workflow.query-anchored': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/workflow.query-anchored.plj.gz') },
|
|
11
11
|
'exec.R.create-renv': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/exec.R.create-renv.plj.gz') },
|
|
12
|
+
'exec.delayed_compute_allocation': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/exec.delayed_compute_allocation.plj.gz') },
|
|
12
13
|
'exec.python.install-deps': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/exec.python.install-deps.plj.gz') },
|
|
13
14
|
'exec.python.venv-bin-path': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/exec.python.venv-bin-path.plj.gz') },
|
|
14
15
|
'pframes.export-multiple-pcolumns': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/pframes.export-multiple-pcolumns.plj.gz') },
|
|
@@ -36,8 +36,15 @@ export ll.toStrict({
|
|
|
36
36
|
|
|
37
37
|
pureFutureFields: _isEnabled("pureFutureFields") || _api >= 1, // 'pure' future fields magic that provides deduplication
|
|
38
38
|
commandExpressions: _isEnabled("commandExpressions") || _api >= 2, // rich expressions in command arguments ( {{ system.ram_bytes / 20 }} )
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
workdirLimits: true,
|
|
44
|
+
computeLimits: true,
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
serviceFields: _isEnabled("serviceFields"),
|
|
41
48
|
|
|
42
49
|
|
|
43
50
|
|
|
@@ -11,6 +11,7 @@ oop := import("@platforma-sdk/workflow-tengo:oop")
|
|
|
11
11
|
tx := import("tx")
|
|
12
12
|
times := import("times")
|
|
13
13
|
maps := import("@platforma-sdk/workflow-tengo:maps")
|
|
14
|
+
feats := import("@platforma-sdk/workflow-tengo:feats")
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
_SUBSCRIPTION_FIELD := "subscription"
|
|
@@ -55,7 +56,11 @@ createUniversal := func(tpl, isEph, inputs, ...opts) {
|
|
|
55
56
|
}
|
|
56
57
|
for name, value in serviceInputs {
|
|
57
58
|
if !is_undefined(value) {
|
|
58
|
-
|
|
59
|
+
if feats.serviceFields {
|
|
60
|
+
inputsMap.addService(name, value)
|
|
61
|
+
} else {
|
|
62
|
+
inputsMap.add(name, value)
|
|
63
|
+
}
|
|
59
64
|
}
|
|
60
65
|
}
|
|
61
66
|
|
|
@@ -3,6 +3,7 @@ ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
|
3
3
|
render := import("@platforma-sdk/workflow-tengo:render")
|
|
4
4
|
validation := import("@platforma-sdk/workflow-tengo:validation")
|
|
5
5
|
assets := import("@platforma-sdk/workflow-tengo:assets")
|
|
6
|
+
smart := import("@platforma-sdk/workflow-tengo:smart")
|
|
6
7
|
|
|
7
8
|
waiterTpl := assets.importTemplate("@platforma-sdk/workflow-tengo:waiter.waiter")
|
|
8
9
|
|
|
@@ -32,15 +33,29 @@ builder := func(pass) {
|
|
|
32
33
|
return self
|
|
33
34
|
},
|
|
34
35
|
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
35
41
|
build: func() {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
42
|
+
ll.assert(len(whatToWait) > 0, "waiter.builder.build(): at least one wait is required")
|
|
43
|
+
|
|
44
|
+
trigger := undefined
|
|
45
|
+
|
|
46
|
+
if len(whatToWait) == 1 {
|
|
47
|
+
trigger = whatToWait[0]
|
|
48
|
+
} else {
|
|
49
|
+
triggerBuilder := smart.ephemeralMapBuilder()
|
|
50
|
+
for i, v in whatToWait {
|
|
51
|
+
triggerBuilder.addRef(fmt.sprintf("input_%d", i), v)
|
|
52
|
+
}
|
|
53
|
+
trigger = triggerBuilder.build()
|
|
39
54
|
}
|
|
40
55
|
|
|
41
56
|
tpl := render.createEphemeral(waiterTpl, {
|
|
42
|
-
|
|
43
|
-
|
|
57
|
+
pass: pass,
|
|
58
|
+
trigger: trigger
|
|
44
59
|
})
|
|
45
60
|
|
|
46
61
|
return ll.toStrict({
|
|
@@ -55,5 +70,5 @@ builder := func(pass) {
|
|
|
55
70
|
}
|
|
56
71
|
|
|
57
72
|
export ll.toStrict({
|
|
58
|
-
builder:
|
|
73
|
+
builder: builder
|
|
59
74
|
})
|
|
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": "4.
|
|
3
|
+
"version": "4.8.1",
|
|
4
4
|
"description": "Tengo SDK library",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@platforma-open/milaboratories.software-ptabler": "1.6.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@platforma-sdk/tengo-builder": "^2.1.
|
|
24
|
+
"@platforma-sdk/tengo-builder": "^2.1.11"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"type-check": "pl-tengo check",
|