@platforma-sdk/workflow-tengo 2.6.0 → 2.8.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.
@@ -11,6 +11,8 @@ constants := import("@platforma-sdk/workflow-tengo:constants")
11
11
  stateAwait := import("@platforma-sdk/workflow-tengo:tpl.state-await")
12
12
  validation := import("@platforma-sdk/workflow-tengo:validation")
13
13
 
14
+ bquery := import("@platforma-sdk/workflow-tengo:workflow.bquery")
15
+
14
16
  /**
15
17
  * Unmarshal resource according by:
16
18
  * - converting all json resources (potentially nested) into a tengo objects (maps)
@@ -106,7 +108,7 @@ tpl := func() {
106
108
  return smart.resource(_templateId)
107
109
  },
108
110
 
109
- _unmarshallers: [],
111
+ _unmarshallers: [bquery.resultUnmarshaller()],
110
112
 
111
113
  /**
112
114
  * Register a preprocessor of input resource. The preprocessor must have two
@@ -49,7 +49,7 @@ create := func(spec, ctx, ...options) {
49
49
  // @TODO validate options
50
50
 
51
51
  // override defaults
52
- for k, v in options[0]{
52
+ for k, v in options[0] {
53
53
  ops[k] = v
54
54
  }
55
55
  }
@@ -121,7 +121,7 @@ resultUnmarshaller := func() {
121
121
  return undefined
122
122
  }
123
123
 
124
- result := {
124
+ result := {
125
125
  ref: resource.get("ref").getDataAsJson(),
126
126
  spec: resource.get("spec").getDataAsJson()
127
127
  }
@@ -49,8 +49,8 @@ _isStaging := func() {
49
49
  return !_isProduction()
50
50
  }
51
51
 
52
- // register standard inputs preprocessors
53
- self.registerUnmarshaller(bquery.resultUnmarshaller())
52
+ // register standard inputs preprocessors [now added by default for all templates]
53
+ // self.registerUnmarshaller(bquery.resultUnmarshaller())
54
54
 
55
55
  _args := undefined
56
56
 
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platforma-sdk/workflow-tengo",
3
- "version": "2.6.0",
3
+ "version": "2.8.0",
4
4
  "description": "Tengo SDK library",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",
@@ -16,7 +16,7 @@
16
16
  "./dist/**/*"
17
17
  ],
18
18
  "dependencies": {
19
- "@milaboratories/software-pframes-conv": "2.1.0",
19
+ "@milaboratories/software-pframes-conv": "2.1.2",
20
20
  "@platforma-open/milaboratories.software-small-binaries": "^1.14.6"
21
21
  },
22
22
  "devDependencies": {