@platforma-sdk/workflow-tengo 1.5.0 → 1.6.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 +3 -2
- package/dist/index.mjs +3 -2
- package/dist/tengo/lib/exec.internal.lib.tengo +13 -2
- package/dist/tengo/lib/exec.lib.tengo +2 -1
- package/dist/tengo/lib/exec.package.lib.tengo +4 -0
- package/dist/tengo/lib/exec.runcmd.lib.tengo +3 -1
- package/dist/tengo/lib/exec.runenv.lib.tengo +6 -2
- package/dist/tengo/lib/pframes.xsv.lib.tengo +1 -1
- package/dist/tengo/tpl/exec.exec.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/pframes.aggregate.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-multiple-pcolumns.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.import-xsv-map.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.map-pframe.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/package.json +2 -2
- package/dist/tengo/tpl/exec.create-python-venv.plj.gz +0 -0
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 = "pframes.aggregate" | "pframes.export-single-pcolumn" | "pframes.import-dir" | "pframes.map-pframe" | "workdir.save" | "workflow.build-ctx" | "exec.
|
|
2
|
+
declare type TplName = "pframes.aggregate" | "pframes.export-single-pcolumn" | "pframes.import-dir" | "pframes.map-pframe" | "workdir.save" | "workflow.build-ctx" | "exec.python.install-deps" | "pframes.export-multiple-pcolumns" | "pframes.export-pframe" | "exec.python.create-venv" | "exec.exec" | "pframes.import-xsv-map";
|
|
3
3
|
declare const Templates: Record<TplName, TemplateFromFile>;
|
|
4
4
|
export { Templates };
|
package/dist/index.js
CHANGED
|
@@ -5,9 +5,10 @@ module.exports = { Templates: {
|
|
|
5
5
|
'pframes.map-pframe': { type: 'from-file', path: require.resolve('./tengo/tpl/pframes.map-pframe.plj.gz') },
|
|
6
6
|
'workdir.save': { type: 'from-file', path: require.resolve('./tengo/tpl/workdir.save.plj.gz') },
|
|
7
7
|
'workflow.build-ctx': { type: 'from-file', path: require.resolve('./tengo/tpl/workflow.build-ctx.plj.gz') },
|
|
8
|
-
'exec.
|
|
9
|
-
'exec.exec': { type: 'from-file', path: require.resolve('./tengo/tpl/exec.exec.plj.gz') },
|
|
8
|
+
'exec.python.install-deps': { type: 'from-file', path: require.resolve('./tengo/tpl/exec.python.install-deps.plj.gz') },
|
|
10
9
|
'pframes.export-multiple-pcolumns': { type: 'from-file', path: require.resolve('./tengo/tpl/pframes.export-multiple-pcolumns.plj.gz') },
|
|
11
10
|
'pframes.export-pframe': { type: 'from-file', path: require.resolve('./tengo/tpl/pframes.export-pframe.plj.gz') },
|
|
11
|
+
'exec.python.create-venv': { type: 'from-file', path: require.resolve('./tengo/tpl/exec.python.create-venv.plj.gz') },
|
|
12
|
+
'exec.exec': { type: 'from-file', path: require.resolve('./tengo/tpl/exec.exec.plj.gz') },
|
|
12
13
|
'pframes.import-xsv-map': { type: 'from-file', path: require.resolve('./tengo/tpl/pframes.import-xsv-map.plj.gz') }
|
|
13
14
|
}};
|
package/dist/index.mjs
CHANGED
|
@@ -6,9 +6,10 @@ export const Templates = {
|
|
|
6
6
|
'pframes.map-pframe': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/pframes.map-pframe.plj.gz') },
|
|
7
7
|
'workdir.save': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/workdir.save.plj.gz') },
|
|
8
8
|
'workflow.build-ctx': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/workflow.build-ctx.plj.gz') },
|
|
9
|
-
'exec.
|
|
10
|
-
'exec.exec': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/exec.exec.plj.gz') },
|
|
9
|
+
'exec.python.install-deps': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/exec.python.install-deps.plj.gz') },
|
|
11
10
|
'pframes.export-multiple-pcolumns': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/pframes.export-multiple-pcolumns.plj.gz') },
|
|
12
11
|
'pframes.export-pframe': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/pframes.export-pframe.plj.gz') },
|
|
12
|
+
'exec.python.create-venv': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/exec.python.create-venv.plj.gz') },
|
|
13
|
+
'exec.exec': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/exec.exec.plj.gz') },
|
|
13
14
|
'pframes.import-xsv-map': { type: 'from-file', path: resolve(import.meta.dirname, './tengo/tpl/pframes.import-xsv-map.plj.gz') }
|
|
14
15
|
};
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal 'exec' module library.
|
|
3
|
+
*
|
|
4
|
+
* NOT INTENDEND FOR USE OUTSIDE 'exec' MODULE.
|
|
5
|
+
* May completely change API from release to release.
|
|
6
|
+
*/
|
|
7
|
+
|
|
1
8
|
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
2
9
|
json := import("json")
|
|
10
|
+
times := import("times")
|
|
3
11
|
text := import("text")
|
|
4
12
|
oop := import("@platforma-sdk/workflow-tengo:oop")
|
|
5
13
|
maps := import("@platforma-sdk/workflow-tengo:maps")
|
|
@@ -80,7 +88,10 @@ _loadPythonRunEnvironment := func(descriptor, softName, softPkg) {
|
|
|
80
88
|
venvBuilder.useToolset(descriptor.toolset)
|
|
81
89
|
}
|
|
82
90
|
|
|
83
|
-
venv := venvBuilder.
|
|
91
|
+
venv := venvBuilder.
|
|
92
|
+
cache(7 * 24 * times.hour).
|
|
93
|
+
build().
|
|
94
|
+
venv()
|
|
84
95
|
|
|
85
96
|
venvRoot := path.join(_ARG_VAR_PYTHON, "venv")
|
|
86
97
|
venvRefKey := softName + "/venv"
|
|
@@ -104,7 +115,7 @@ _loadRunEnvironment := func(descriptor, softName, softPackage) {
|
|
|
104
115
|
return _loadPythonRunEnvironment(descriptor, softName, softPackage)
|
|
105
116
|
}
|
|
106
117
|
|
|
107
|
-
ll.panic("run environment type %q is not currently supported by
|
|
118
|
+
ll.panic("run environment type %q is not currently supported by workflow-sdk", descriptor.runEnv.type)
|
|
108
119
|
}
|
|
109
120
|
|
|
110
121
|
_binPackageCallOptions := func(runOptions, variables, descriptor, softPackage) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A builder for executing commands.
|
|
3
3
|
*/
|
|
4
|
+
|
|
4
5
|
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
5
6
|
assets := import("@platforma-sdk/workflow-tengo:assets")
|
|
6
7
|
smart := import("@platforma-sdk/workflow-tengo:smart")
|
|
@@ -186,7 +187,7 @@ builder := func() {
|
|
|
186
187
|
ll.assert(
|
|
187
188
|
is_int(time),
|
|
188
189
|
"cache time must be an integer. " +
|
|
189
|
-
"Did you forget to import a standard tengo library '
|
|
190
|
+
"Did you forget to import a standard tengo library 'times'?")
|
|
190
191
|
cache = time
|
|
191
192
|
return self
|
|
192
193
|
},
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A library for run environments creation and bootstrapping.
|
|
3
|
+
*/
|
|
4
|
+
|
|
1
5
|
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
2
6
|
smart := import("@platforma-sdk/workflow-tengo:smart")
|
|
3
7
|
oop := import("@platforma-sdk/workflow-tengo:oop")
|
|
@@ -171,7 +175,7 @@ pythonVenv := func() {
|
|
|
171
175
|
ll.assert(
|
|
172
176
|
is_int(time),
|
|
173
177
|
"cache time must be an integer. " +
|
|
174
|
-
"Did you forget to import a standard tengo library '
|
|
178
|
+
"Did you forget to import a standard tengo library 'times'?")
|
|
175
179
|
cache = time
|
|
176
180
|
return self
|
|
177
181
|
},
|
|
@@ -192,7 +196,7 @@ pythonVenv := func() {
|
|
|
192
196
|
|
|
193
197
|
validation.assertJsonSchema(pyVenvInputs, pythonVenvInputSchema, "incomplete python runenv configuration")
|
|
194
198
|
|
|
195
|
-
tpl := render.create(assets.importTemplate("@platforma-sdk/workflow-tengo:exec.create-
|
|
199
|
+
tpl := render.create(assets.importTemplate("@platforma-sdk/workflow-tengo:exec.python.create-venv"), pyVenvInputs)
|
|
196
200
|
|
|
197
201
|
self := undefined
|
|
198
202
|
self = ll.toStrict(oop.inherit(tpl, {
|
|
@@ -12,7 +12,7 @@ util := import("@platforma-sdk/workflow-tengo:pframes.util")
|
|
|
12
12
|
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
13
13
|
assets := import("@platforma-sdk/workflow-tengo:assets")
|
|
14
14
|
|
|
15
|
-
transposeXsvSw := assets.importSoftware("@milaboratories
|
|
15
|
+
transposeXsvSw := assets.importSoftware("@platforma-open/milaboratories.software-small-binaries:table-converter")
|
|
16
16
|
pfconvSw := assets.importSoftware("@milaboratories/software-pframes-conv:main")
|
|
17
17
|
|
|
18
18
|
/**
|
|
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": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "Tengo SDK library",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@milaboratories/software-pframes-conv": "^1.6.0",
|
|
20
|
-
"@milaboratories
|
|
20
|
+
"@platforma-open/milaboratories.software-small-binaries": "^1.13.2"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@platforma-sdk/tengo-builder": "^1.14.13"
|
|
Binary file
|