@platforma-sdk/workflow-tengo 2.13.2 → 2.13.4

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.
@@ -168,8 +168,8 @@ processColumn := func(input, bodyTpl, outputs, ...opts) {
168
168
  ll.panic("no input spec provided")
169
169
  }
170
170
 
171
- if !smart.isResource(input.data) {
172
- ll.panic("input data should be a resource")
171
+ if !smart.isReference(input.data) {
172
+ ll.panic("input data should be a reference to a field or resource")
173
173
  }
174
174
 
175
175
  validation.assertType(input.spec, pSpec.P_COLUMN_SPEC_SCHEMA)
@@ -330,12 +330,13 @@ processColumn := func(input, bodyTpl, outputs, ...opts) {
330
330
  if is_undefined(spec) {
331
331
  ll.panic("unknown column: " + columnName)
332
332
  }
333
+ return spec
334
+ } else {
335
+ if len(column) > 0 {
336
+ ll.panic("column name should not be provided for non-Xsv output")
337
+ }
338
+ return spec
333
339
  }
334
-
335
- if len(column) > 0 {
336
- ll.panic("column name should not be provided for non-Xsv output")
337
- }
338
- return spec
339
340
  },
340
341
 
341
342
  /**
@@ -360,12 +361,12 @@ processColumn := func(input, bodyTpl, outputs, ...opts) {
360
361
  ll.panic("column name must be provided for Xsv output")
361
362
  }
362
363
  return renderResult.output(name + "/" + column[0])
364
+ } else {
365
+ if len(column) > 0 {
366
+ ll.panic("column name should not be provided for non-Xsv output")
367
+ }
368
+ return renderResult.output(name)
363
369
  }
364
-
365
- if len(column) > 0 {
366
- ll.panic("column name should not be provided for non-Xsv output")
367
- }
368
- return renderResult.output(name)
369
370
  },
370
371
 
371
372
  /**
@@ -398,14 +399,14 @@ processColumn := func(input, bodyTpl, outputs, ...opts) {
398
399
  data: renderResult.output(name + "/" + columnName),
399
400
  spec: spec
400
401
  }
401
- }
402
-
403
- if len(column) > 0 {
404
- ll.panic("column name should not be provided for non-Xsv output")
405
- }
406
- return {
407
- data: renderResult.output(name),
408
- spec: outputSpecs[name]
402
+ } else {
403
+ if len(column) > 0 {
404
+ ll.panic("column name should not be provided for non-Xsv output")
405
+ }
406
+ return {
407
+ data: renderResult.output(name),
408
+ spec: outputSpecs[name]
409
+ }
409
410
  }
410
411
  },
411
412
 
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platforma-sdk/workflow-tengo",
3
- "version": "2.13.2",
3
+ "version": "2.13.4",
4
4
  "description": "Tengo SDK library",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",
@@ -17,10 +17,10 @@
17
17
  ],
18
18
  "dependencies": {
19
19
  "@milaboratories/software-pframes-conv": "2.1.12",
20
- "@platforma-open/milaboratories.software-small-binaries": "^1.15.12"
20
+ "@platforma-open/milaboratories.software-small-binaries": "^1.15.13"
21
21
  },
22
22
  "devDependencies": {
23
- "@platforma-sdk/tengo-builder": "^1.17.7"
23
+ "@platforma-sdk/tengo-builder": "^1.17.8"
24
24
  },
25
25
  "scripts": {
26
26
  "type-check": "pl-tengo check",