@platforma-sdk/workflow-tengo 4.0.8 → 4.0.9

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.
@@ -518,9 +518,9 @@ builder := func() {
518
518
 
519
519
  addFiles: func(filesMap, ...opts) {
520
520
  ll.assert(ll.isMap(filesMap), "exec.builder().addFiles: filesMap must be map of file names to file resources")
521
- for fileName, file in filesMap {
521
+ maps.forEach(filesMap, func(fileName, file) {
522
522
  self.addFile(fileName, file, opts...)
523
- }
523
+ })
524
524
  return self
525
525
  },
526
526
 
@@ -223,6 +223,16 @@ deepTransform = func(...maps) {
223
223
  return res
224
224
  }
225
225
 
226
+
227
+
228
+
229
+ forEach := func(map, callback) {
230
+ keys := getKeys(map) // getKeys already returns sorted keys
231
+ for key in keys {
232
+ callback(key, map[key])
233
+ }
234
+ }
235
+
226
236
  export ll.toStrict({
227
237
  map : map,
228
238
  merge: merge,
@@ -237,5 +247,6 @@ export ll.toStrict({
237
247
  filterKeysValues : filterKeysValues,
238
248
  getKeys: getKeys,
239
249
  getValues: getValues,
240
- containsKey: containsKey
250
+ containsKey: containsKey,
251
+ forEach: forEach
241
252
  })
@@ -15,8 +15,8 @@ oop := import("@platforma-sdk/workflow-tengo:oop")
15
15
  sets := import("@platforma-sdk/workflow-tengo:sets")
16
16
  slices := import("@platforma-sdk/workflow-tengo:slices")
17
17
  path := import("@platforma-sdk/workflow-tengo:path")
18
- enum := import("enum")
19
18
  render := import("@platforma-sdk/workflow-tengo:render")
19
+ maps := import("@platforma-sdk/workflow-tengo:maps")
20
20
 
21
21
  _WD_CREATE_FIELD_ALLOCATION := "allocation"
22
22
  _WD_CREATE_FIELD_WORKDIR := "workdir"
@@ -216,7 +216,7 @@ _fill := func() {
216
216
 
217
217
 
218
218
  addFiles: func(fileMap) {
219
- enum.each(fileMap, self.addFile)
219
+ maps.forEach(fileMap, self.addFile)
220
220
  return self
221
221
  },
222
222
 
@@ -240,7 +240,7 @@ _fill := func() {
240
240
 
241
241
 
242
242
  writeFiles: func(contentRefMap) {
243
- enum.each(contentRefMap, self.writeFile)
243
+ maps.forEach(contentRefMap, self.writeFile)
244
244
  return self
245
245
  },
246
246
 
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.0.8",
3
+ "version": "4.0.9",
4
4
  "description": "Tengo SDK library",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",