@platforma-sdk/workflow-tengo 1.6.1 → 1.6.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.
@@ -22,12 +22,13 @@ importTemplate := func(tplName) {
22
22
  /**
23
23
  * Returns software description suitable for 'exec' operations.
24
24
  *
25
- * @param swName: string - full name of the software description, including namespace (package name).
26
- * Local software definitions (within the same package) can omit namespace part and start the name with colon:
27
- * - "@company/package:some-oftware"
28
- * - ":my-local-software"
25
+ * @param swName: string - full name of the software entrypoint, including namespace (NPM package name).
26
+ * Local software entrypoints (within the same package) can omit namespace part
27
+ * and start the name with colon:
28
+ * - "@company/package:some-oftware"
29
+ * - ":my-local-software"
29
30
  *
30
- * @return softwareInfo: softwareInfo - structure with software info
31
+ * @return softwareInfo: softwareInfo - structure with software info.
31
32
  */
32
33
  importSoftware := func(swName) {
33
34
  sw := plapi.getSoftwareInfo(swName)
@@ -42,6 +43,29 @@ importSoftware := func(swName) {
42
43
  })
43
44
  }
44
45
 
46
+ /**
47
+ * Returns asset description suitable for 'exec' operations.
48
+ * Asset is the way to put static files into working directory before execution of the command.
49
+ *
50
+ * @param assetName: string - full name of asset entrypoint, including namespace (NPM package name).
51
+ * Local software entrypoints (within the same package) can omit namespace
52
+ * part and start the name with colon:
53
+ * - "@company/package:some-oftware"
54
+ * - ":my-local-software"
55
+ */
56
+ importAsset := func(swName) {
57
+ asset := plapi.getSoftwareInfo(swName)
58
+ return ll.toStrict({
59
+ _type: "assetDescriptor",
60
+
61
+ resource: smart.resource(asset.id),
62
+ name: asset.name,
63
+ version: asset.version,
64
+ blobRef: asset.blobRef,
65
+ descriptor: ll.toStrict(json.decode(asset.descriptor)) // raw sw.json data with asset entrypoint descriptor
66
+ })
67
+ }
68
+
45
69
  /**
46
70
  * Checks if given item is a software info
47
71
  *
@@ -35,6 +35,9 @@ _SPEC_AXES_SCHEMA := {
35
35
  // Should the N/A values (or empty rows) be allowed;
36
36
  // default: false
37
37
  `allowNA,omitempty`: `bool`,
38
+ // Should the parsing error be interpreted as N/A
39
+ // default: false
40
+ `parseErrorToNA,omitempty`: `bool`,
38
41
  // Specification of the axis
39
42
  `spec`: {
40
43
  // Type of the axis value
@@ -66,6 +69,9 @@ _SPEC_COLUMN_SCHEMA := {
66
69
  // Should the N/A values (or empty rows) be allowed;
67
70
  // default: true
68
71
  `allowNA,omitempty`: `bool`,
72
+ // Should the parsing error be interpreted as N/A
73
+ // default: false
74
+ `parseErrorToNA,omitempty`: `bool`,
69
75
  // Specification of the column
70
76
  `spec,omitempty`: {
71
77
  // Type of column values;
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platforma-sdk/workflow-tengo",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "Tengo SDK library",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",
@@ -16,11 +16,11 @@
16
16
  "./dist/**/*"
17
17
  ],
18
18
  "dependencies": {
19
- "@milaboratories/software-pframes-conv": "^1.6.0",
19
+ "@milaboratories/software-pframes-conv": "^1.6.2",
20
20
  "@platforma-open/milaboratories.software-small-binaries": "^1.13.2"
21
21
  },
22
22
  "devDependencies": {
23
- "@platforma-sdk/tengo-builder": "^1.14.13"
23
+ "@platforma-sdk/tengo-builder": "^1.15.0"
24
24
  },
25
25
  "scripts": {
26
26
  "type-check": "pl-tengo check",