@platforma-sdk/workflow-tengo 4.1.4 → 4.2.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.
@@ -97,12 +97,21 @@ blockId := func() {
97
97
  return _blockId
98
98
  }
99
99
 
100
+
101
+
102
+
103
+ getBlockId := func() {
104
+ ret := blockId().getDataAsJson()
105
+ ll.assert(is_string(ret), "block id is not a string")
106
+ return ret
107
+ }
108
+
100
109
  __parentContext := undefined
101
110
 
102
111
 
103
112
 
104
113
 
105
- _parentContext := func() {
114
+ getParentBCtx := func() {
106
115
  if __parentContext == undefined {
107
116
  __parentContext = self.inputs()[_INPUT_CONTEXT_FIELD_NAME]
108
117
  if __parentContext == undefined {
@@ -172,7 +181,7 @@ _buildOutputs := func(results) {
172
181
  assets.importTemplate("@platforma-sdk/workflow-tengo:workflow.build-ctx"),
173
182
  {
174
183
  blockId: blockId(),
175
- parentContext: _parentContext(),
184
+ parentContext: getParentBCtx(),
176
185
  data: eData
177
186
  }
178
187
  )
@@ -204,7 +213,7 @@ _buildOutputs := func(results) {
204
213
 
205
214
 
206
215
  query := func(spec, ...options) {
207
- return bquery.create(spec, _parentContext(), options...)
216
+ return bquery.create(spec, getParentBCtx(), options...)
208
217
  }
209
218
 
210
219
 
@@ -224,7 +233,7 @@ query := func(spec, ...options) {
224
233
 
225
234
 
226
235
  resolve := func(ref, ...options) {
227
- r := bquery.resolve(ref, _parentContext(), options...)
236
+ r := bquery.resolve(ref, getParentBCtx(), options...)
228
237
 
229
238
  return ll.toStrict(oop.inherit(r, {
230
239
  spec: r.getFutureInputField("spec"),
@@ -254,7 +263,7 @@ resolve := func(ref, ...options) {
254
263
 
255
264
 
256
265
  anchoredQuery := func(anchors, queryMap) {
257
- return bquery.anchoredQuery(_parentContext(), anchors, queryMap)
266
+ return bquery.anchoredQuery(getParentBCtx(), anchors, queryMap)
258
267
  }
259
268
 
260
269
 
@@ -352,7 +361,7 @@ validateArgs := func(argsSchema) {
352
361
 
353
362
 
354
363
  createPBundleBuilder := func() {
355
- return pBundle.createBuilder(_parentContext())
364
+ return pBundle.createBuilder(getParentBCtx())
356
365
  }
357
366
 
358
367
 
@@ -391,6 +400,7 @@ body := func(bodyFn) {
391
400
  }
392
401
 
393
402
  export ll.toStrict({
403
+ getParentBCtx: getParentBCtx,
394
404
  query: query,
395
405
  resolve: resolve,
396
406
  anchoredQuery: anchoredQuery,
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.1.4",
3
+ "version": "4.2.0",
4
4
  "description": "Tengo SDK library",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",
@@ -20,7 +20,7 @@
20
20
  "@platforma-open/milaboratories.software-small-binaries": "^1.15.19"
21
21
  },
22
22
  "devDependencies": {
23
- "@platforma-sdk/tengo-builder": "^2.1.2"
23
+ "@platforma-sdk/tengo-builder": "^2.1.3"
24
24
  },
25
25
  "scripts": {
26
26
  "type-check": "pl-tengo check",