@platforma-sdk/workflow-tengo 2.15.12 → 2.15.14

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.
@@ -74,8 +74,9 @@ builder := func(productKey) {
74
74
  addFile: func(file, params) {
75
75
  ll.assert(smart.isReference(file), "monetization.builder().addFile: file must be a reference")
76
76
 
77
- filesToAdd[params.arg] = file
78
- monetization.addArgToLastRun(mnz, params.arg, params)
77
+ fileName := monetization.argNameForLastRun(mnz, params.arg)
78
+ filesToAdd[fileName] = file
79
+ monetization.addArgToLastRun(mnz, fileName, params)
79
80
 
80
81
  return self
81
82
  },
@@ -95,8 +96,9 @@ builder := func(productKey) {
95
96
  "bytes",
96
97
  validation.reference])
97
98
 
98
- filesToWrite[params.arg] = data
99
- monetization.addArgToLastRun(mnz, params.arg, params)
99
+ fileName := monetization.argNameForLastRun(mnz, params.arg)
100
+ filesToWrite[fileName] = data
101
+ monetization.addArgToLastRun(mnz, fileName, params)
100
102
 
101
103
  return self
102
104
  },
@@ -169,6 +169,18 @@ addArgToLastRun := func(mnz, fileName, arg) {
169
169
  mnz.runs[len(mnz.runs) - 1][fileName] = arg
170
170
  }
171
171
 
172
+
173
+
174
+
175
+
176
+
177
+ argNameForLastRun := func(mnz, argName) {
178
+ idx := len(mnz.runs) - 1
179
+ fileName := fmt.sprintf("%s_%d", argName, idx)
180
+
181
+ return fileName
182
+ }
183
+
172
184
  setDryRun := func(mnz, isDryRun) {
173
185
  ll.assert(mnz.enabled,
174
186
  "monetization.setDryRun(): monetization must be explicitly enabled by enableMnz(productKey) function")
@@ -305,6 +317,7 @@ export ll.toStrict({
305
317
  appendRun: appendRun,
306
318
  addArgToLastRun: addArgToLastRun,
307
319
  addOptionalArg: addOptionalArg,
320
+ argNameForLastRun: argNameForLastRun,
308
321
  run: run,
309
322
  mnzClientStdoutSchema: mnzClientStdoutSchema
310
323
  })
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": "2.15.12",
3
+ "version": "2.15.14",
4
4
  "description": "Tengo SDK library",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",
@@ -16,8 +16,8 @@
16
16
  "./dist/**/*"
17
17
  ],
18
18
  "dependencies": {
19
- "@milaboratories/software-pframes-conv": "2.1.16",
20
- "@platforma-open/milaboratories.software-small-binaries": "^1.15.16"
19
+ "@milaboratories/software-pframes-conv": "2.1.17",
20
+ "@platforma-open/milaboratories.software-small-binaries": "^1.15.19"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@platforma-sdk/tengo-builder": "^1.19.2"