@platforma-sdk/workflow-tengo 5.26.0 → 6.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/assets.lib.tengo +3 -1
- package/dist/tengo/lib/assets.wasm.lib.tengo +71 -0
- package/dist/tengo/tpl/annotations.compute.plj.gz +0 -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.conda.create-env.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.build-table.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-multiple-pcolumns.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-parquet-pcolumn-chunk.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.merge-resource-maps.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.parse-to-json.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.process-pcolumn-batch-split.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.process-pcolumn-batch.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/pt.import-dir.plj.gz +0 -0
- package/dist/tengo/tpl/pt.workflow-run.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/dist/tengo/tpl/workflow.query-context-filter.plj.gz +0 -0
- package/package.json +4 -4
- package/dist/tengo/lib/pframes-rs.lib.tengo +0 -223
|
@@ -5,6 +5,7 @@ json := import("json")
|
|
|
5
5
|
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
6
6
|
smart := import("@platforma-sdk/workflow-tengo:smart")
|
|
7
7
|
swinfo := import("@platforma-sdk/workflow-tengo:assets.swinfo")
|
|
8
|
+
wasm := import("@platforma-sdk/workflow-tengo:assets.wasm")
|
|
8
9
|
maps := import("@platforma-sdk/workflow-tengo:maps")
|
|
9
10
|
|
|
10
11
|
|
|
@@ -69,5 +70,6 @@ export ll.toStrict({
|
|
|
69
70
|
importSoftware : swinfo.importSoftware,
|
|
70
71
|
isSoftwareInfo : swinfo.isSoftwareInfo,
|
|
71
72
|
importAsset : importAsset,
|
|
72
|
-
isAssetInfo : isAssetInfo
|
|
73
|
+
isAssetInfo : isAssetInfo,
|
|
74
|
+
importWasm : wasm.importWasm
|
|
73
75
|
})
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
plapi := import("plapi")
|
|
6
|
+
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
importWasm := func(wasmName) {
|
|
66
|
+
return plapi.loadWasm(wasmName)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export ll.toStrict({
|
|
70
|
+
importWasm: importWasm
|
|
71
|
+
})
|
|
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
|
|
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": "
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "Tengo SDK library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
"./dist/**/*"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@milaboratories/pframes-rs-wasip2": "1.1.
|
|
19
|
+
"@milaboratories/pframes-rs-wasip2": "1.1.37",
|
|
20
20
|
"@milaboratories/software-pframes-conv": "2.2.9",
|
|
21
21
|
"@platforma-open/milaboratories.software-small-binaries": "^2.0.3",
|
|
22
|
-
"@platforma-open/milaboratories.software-ptabler": "
|
|
22
|
+
"@platforma-open/milaboratories.software-ptabler": "2.0.0",
|
|
23
23
|
"@platforma-open/milaboratories.software-ptexter": "1.2.2"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@platforma-sdk/tengo-builder": "
|
|
26
|
+
"@platforma-sdk/tengo-builder": "4.0.0"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"type-check": "pl-tengo check",
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
40
|
-
assets := import("@platforma-sdk/workflow-tengo:assets")
|
|
41
|
-
json := import("json")
|
|
42
|
-
|
|
43
|
-
WASM_NAME := "@milaboratories/pframes-rs-wasip2:main"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
_bundleTag := func() {
|
|
53
|
-
if false {
|
|
54
|
-
return assets.importWasm("@milaboratories/pframes-rs-wasip2:main")
|
|
55
|
-
}
|
|
56
|
-
return undefined
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
_runtimeUnavailable := func() {
|
|
60
|
-
return error("pframes-rs wasm runtime not yet wired (see plan/tengo-wasm-call); the wasm bytes are bundled but cannot be invoked from Tengo today")
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
_load := func(limit) {
|
|
68
|
-
return undefined
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
_resolve := func(handle, path) {
|
|
74
|
-
node := handle
|
|
75
|
-
for name in path {
|
|
76
|
-
if is_undefined(node) {
|
|
77
|
-
return undefined
|
|
78
|
-
}
|
|
79
|
-
node = node[name]
|
|
80
|
-
}
|
|
81
|
-
return node
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
_staticCall := func(path) {
|
|
88
|
-
return func(request) {
|
|
89
|
-
h := _load(undefined)
|
|
90
|
-
if is_undefined(h) {
|
|
91
|
-
return _runtimeUnavailable()
|
|
92
|
-
}
|
|
93
|
-
fn := _resolve(h, path)
|
|
94
|
-
if is_undefined(fn) {
|
|
95
|
-
return error("pframes-rs wasm export missing: " + string(path))
|
|
96
|
-
}
|
|
97
|
-
requestJson := ""
|
|
98
|
-
if !is_undefined(request) {
|
|
99
|
-
requestJson = json.encode(request)
|
|
100
|
-
}
|
|
101
|
-
responseJson := fn(requestJson)
|
|
102
|
-
if is_error(responseJson) {
|
|
103
|
-
return responseJson
|
|
104
|
-
}
|
|
105
|
-
return json.decode(responseJson)
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
_instanceMethod := func(hostHandle, methodName, takesArgs) {
|
|
114
|
-
return func(args) {
|
|
115
|
-
method := hostHandle[methodName]
|
|
116
|
-
if is_undefined(method) {
|
|
117
|
-
return error("pframes-rs handle method missing: " + methodName)
|
|
118
|
-
}
|
|
119
|
-
responseJson := undefined
|
|
120
|
-
if takesArgs {
|
|
121
|
-
requestJson := ""
|
|
122
|
-
if !is_undefined(args) {
|
|
123
|
-
requestJson = json.encode(args)
|
|
124
|
-
}
|
|
125
|
-
responseJson = method(requestJson)
|
|
126
|
-
} else {
|
|
127
|
-
responseJson = method()
|
|
128
|
-
}
|
|
129
|
-
if is_error(responseJson) {
|
|
130
|
-
return responseJson
|
|
131
|
-
}
|
|
132
|
-
return json.decode(responseJson)
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
_wrapFrame := func(hostFrame) {
|
|
139
|
-
if is_error(hostFrame) {
|
|
140
|
-
return hostFrame
|
|
141
|
-
}
|
|
142
|
-
return ll.toStrict({
|
|
143
|
-
listColumns: _instanceMethod(hostFrame, "listColumns", false),
|
|
144
|
-
discoverColumns: _instanceMethod(hostFrame, "discoverColumns", true),
|
|
145
|
-
findColumns: _instanceMethod(hostFrame, "findColumns", true),
|
|
146
|
-
evaluateQuery: _instanceMethod(hostFrame, "evaluateQuery", true),
|
|
147
|
-
rewriteLegacyQuery: _instanceMethod(hostFrame, "rewriteLegacyQuery", true)
|
|
148
|
-
})
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
frameFromJson := func(spec) {
|
|
152
|
-
h := _load(undefined)
|
|
153
|
-
if is_undefined(h) {
|
|
154
|
-
return _runtimeUnavailable()
|
|
155
|
-
}
|
|
156
|
-
specJson := json.encode(spec)
|
|
157
|
-
hostFrame := h.frame.fromJson(specJson)
|
|
158
|
-
return _wrapFrame(hostFrame)
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
frameNS := ll.toStrict({
|
|
162
|
-
fromJson: frameFromJson,
|
|
163
|
-
deleteColumns: _staticCall(["frame", "deleteColumns"]),
|
|
164
|
-
buildQuery: _staticCall(["frame", "buildQuery"])
|
|
165
|
-
})
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
_wrapTable := func(hostTable) {
|
|
170
|
-
if is_error(hostTable) {
|
|
171
|
-
return hostTable
|
|
172
|
-
}
|
|
173
|
-
return ll.toStrict({
|
|
174
|
-
findColumn: _instanceMethod(hostTable, "findColumn", true)
|
|
175
|
-
})
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
tableFromJson := func(spec) {
|
|
179
|
-
h := _load(undefined)
|
|
180
|
-
if is_undefined(h) {
|
|
181
|
-
return _runtimeUnavailable()
|
|
182
|
-
}
|
|
183
|
-
specJson := json.encode(spec)
|
|
184
|
-
hostTable := h.table.fromJson(specJson)
|
|
185
|
-
return _wrapTable(hostTable)
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
tableNS := ll.toStrict({
|
|
189
|
-
fromJson: tableFromJson
|
|
190
|
-
})
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
_wrapAxes := func(hostAxes) {
|
|
195
|
-
if is_error(hostAxes) {
|
|
196
|
-
return hostAxes
|
|
197
|
-
}
|
|
198
|
-
return ll.toStrict({
|
|
199
|
-
expand: _instanceMethod(hostAxes, "expand", false),
|
|
200
|
-
find: _instanceMethod(hostAxes, "find", true)
|
|
201
|
-
})
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
axesFromJson := func(spec) {
|
|
205
|
-
h := _load(undefined)
|
|
206
|
-
if is_undefined(h) {
|
|
207
|
-
return _runtimeUnavailable()
|
|
208
|
-
}
|
|
209
|
-
specJson := json.encode(spec)
|
|
210
|
-
hostAxes := h.axes.fromJson(specJson)
|
|
211
|
-
return _wrapAxes(hostAxes)
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
axesNS := ll.toStrict({
|
|
215
|
-
fromJson: axesFromJson,
|
|
216
|
-
collapse: _staticCall(["axes", "collapse"])
|
|
217
|
-
})
|
|
218
|
-
|
|
219
|
-
export ll.toStrict({
|
|
220
|
-
frame: frameNS,
|
|
221
|
-
table: tableNS,
|
|
222
|
-
axes: axesNS
|
|
223
|
-
})
|