@platforma-sdk/workflow-tengo 2.8.1 → 2.8.2

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.
Files changed (59) hide show
  1. package/dist/tengo/lib/assets.lib.tengo +76 -82
  2. package/dist/tengo/lib/constants.lib.tengo +28 -31
  3. package/dist/tengo/lib/exec.R.internal.lib.tengo +14 -14
  4. package/dist/tengo/lib/exec.R.lib.tengo +158 -167
  5. package/dist/tengo/lib/exec.internal.lib.tengo +222 -234
  6. package/dist/tengo/lib/exec.lib.tengo +647 -714
  7. package/dist/tengo/lib/exec.package.lib.tengo +229 -238
  8. package/dist/tengo/lib/exec.python.internal.lib.tengo +5 -6
  9. package/dist/tengo/lib/exec.python.lib.tengo +138 -146
  10. package/dist/tengo/lib/exec.runcmd.lib.tengo +234 -253
  11. package/dist/tengo/lib/exec.runenv.lib.tengo +88 -92
  12. package/dist/tengo/lib/exec.stream.lib.tengo +36 -40
  13. package/dist/tengo/lib/file.internal.lib.tengo +70 -77
  14. package/dist/tengo/lib/file.lib.tengo +54 -57
  15. package/dist/tengo/lib/ll.lib.tengo +217 -241
  16. package/dist/tengo/lib/maps.lib.tengo +98 -106
  17. package/dist/tengo/lib/objects.lib.tengo +11 -13
  18. package/dist/tengo/lib/oop.lib.tengo +16 -19
  19. package/dist/tengo/lib/path.lib.tengo +116 -125
  20. package/dist/tengo/lib/pframes.constants.lib.tengo +25 -28
  21. package/dist/tengo/lib/pframes.export-pcolumn.lib.tengo +28 -33
  22. package/dist/tengo/lib/pframes.lib.tengo +38 -43
  23. package/dist/tengo/lib/pframes.ll.lib.tengo +70 -73
  24. package/dist/tengo/lib/pframes.pcolumn.lib.tengo +45 -51
  25. package/dist/tengo/lib/pframes.spec.lib.tengo +70 -96
  26. package/dist/tengo/lib/pframes.util.lib.tengo +154 -289
  27. package/dist/tengo/lib/pframes.xsv.lib.tengo +260 -273
  28. package/dist/tengo/lib/render.lib.tengo +65 -76
  29. package/dist/tengo/lib/sets.lib.tengo +61 -68
  30. package/dist/tengo/lib/slices.lib.tengo +169 -180
  31. package/dist/tengo/lib/smart.lib.tengo +956 -1069
  32. package/dist/tengo/lib/test.lib.tengo +129 -161
  33. package/dist/tengo/lib/tpl.lib.tengo +448 -516
  34. package/dist/tengo/lib/tpl.state-await.lib.tengo +226 -241
  35. package/dist/tengo/lib/tpl.util.lib.tengo +4 -9
  36. package/dist/tengo/lib/validation.lib.tengo +334 -379
  37. package/dist/tengo/lib/workdir.lib.tengo +309 -332
  38. package/dist/tengo/lib/workdir.proc.lib.tengo +126 -144
  39. package/dist/tengo/lib/workdir.save.lib.tengo +113 -130
  40. package/dist/tengo/lib/workflow.bobject.lib.tengo +21 -26
  41. package/dist/tengo/lib/workflow.bquery.lib.tengo +140 -166
  42. package/dist/tengo/lib/workflow.constants.lib.tengo +1 -2
  43. package/dist/tengo/lib/workflow.context.lib.tengo +27 -32
  44. package/dist/tengo/lib/workflow.lib.tengo +167 -207
  45. package/dist/tengo/tpl/exec.R.create-renv.plj.gz +0 -0
  46. package/dist/tengo/tpl/exec.exec.plj.gz +0 -0
  47. package/dist/tengo/tpl/exec.python.create-venv.plj.gz +0 -0
  48. package/dist/tengo/tpl/exec.python.install-deps.plj.gz +0 -0
  49. package/dist/tengo/tpl/pframes.aggregate.plj.gz +0 -0
  50. package/dist/tengo/tpl/pframes.export-multiple-pcolumns.plj.gz +0 -0
  51. package/dist/tengo/tpl/pframes.export-pframe.plj.gz +0 -0
  52. package/dist/tengo/tpl/pframes.export-single-pcolumn.plj.gz +0 -0
  53. package/dist/tengo/tpl/pframes.import-dir.plj.gz +0 -0
  54. package/dist/tengo/tpl/pframes.map-pframe.plj.gz +0 -0
  55. package/dist/tengo/tpl/pframes.xsv-export-pframe.plj.gz +0 -0
  56. package/dist/tengo/tpl/pframes.xsv-import-map.plj.gz +0 -0
  57. package/dist/tengo/tpl/workdir.save.plj.gz +0 -0
  58. package/dist/tengo/tpl/workflow.build-ctx.plj.gz +0 -0
  59. package/package.json +5 -5
@@ -1,6 +1,5 @@
1
- /**
2
- * Gives an interface for working with workdirs.
3
- */
1
+
2
+
4
3
 
5
4
  json := import("json")
6
5
 
@@ -15,359 +14,337 @@ path := import("@platforma-sdk/workflow-tengo:path")
15
14
  enum := import("enum")
16
15
  validation := import("@platforma-sdk/workflow-tengo:validation")
17
16
  render := import("@platforma-sdk/workflow-tengo:render")
18
- blobs := import("@platforma-sdk/workflow-tengo:file.internal")
19
17
 
20
18
  create := func() {
21
- wd := smart.ephemeralBuilder(constants.RTYPE_WORKDIR_CREATE).lockAndBuild()
22
- return wd.getField("workdir")
19
+ wd := smart.ephemeralBuilder(constants.RTYPE_WORKDIR_CREATE).lockAndBuild()
20
+ return wd.getField("workdir")
23
21
  }
24
22
 
25
23
  _getFileFillRule := func(filePath, extension) {
26
- return {
27
- type: "file",
28
- path: filePath,
29
- permissions: 0o600,
30
- pathKey: filePath,
31
- blobKey: filePath,
32
- copyOptional: false,
33
- fileExtension: extension
34
- }
24
+ return {
25
+ type: "file",
26
+ path: filePath,
27
+ permissions: 0o600,
28
+ pathKey: filePath,
29
+ blobKey: filePath,
30
+ copyOptional: false,
31
+ fileExtension: extension
32
+ }
35
33
  }
36
34
 
37
35
  _getArchiveFillRule := func(dstDir, whatToExtract, archiveBlobKey) {
38
- extractRules := []
39
- for f in whatToExtract {
40
- extractRules = append(extractRules, {
41
- srcPath: f,
42
- dstPath: f,
43
- filePerms: 0o600,
44
- dirPerms: 0o700
45
- })
46
- }
47
-
48
- return {
49
- type: "archive",
50
- path: dstDir,
51
- blobKey: archiveBlobKey,
52
- archiveType: "zip",
53
- extractRules: extractRules
54
- }
36
+ extractRules := []
37
+ for f in whatToExtract {
38
+ extractRules = append(extractRules, {
39
+ srcPath: f,
40
+ dstPath: f,
41
+ filePerms: 0o600,
42
+ dirPerms: 0o700
43
+ })
55
44
  }
56
45
 
57
- /**
58
- * Generates a value fill rule for a given file path.
59
- *
60
- * @param filePath: string - the path of the file.
61
- * @return rule: map - the value fill rule.
62
- */
46
+ return {
47
+ type: "archive",
48
+ path: dstDir,
49
+ blobKey: archiveBlobKey,
50
+ archiveType: "zip",
51
+ extractRules: extractRules
52
+ }
53
+ }
54
+
55
+
56
+
57
+
58
+
59
+
63
60
  _getValueFillRule := func(filePath) {
64
- return {
65
- type: "value",
66
- path: filePath,
67
- permissions: 0o600,
68
- pathKey: filePath,
69
- valueKey: filePath
70
- }
61
+ return {
62
+ type: "value",
63
+ path: filePath,
64
+ permissions: 0o600,
65
+ pathKey: filePath,
66
+ valueKey: filePath
71
67
  }
68
+ }
69
+
70
+
71
+
72
+
73
+
72
74
 
73
- /**
74
- * Generates a directory fill rule for a given directory.
75
- *
76
- * @param dir: string - the path of the directory.
77
- * @return rule: map - the directory fill rule.
78
- */
79
75
  _getDirFillRule := func(dir) {
80
- return {
81
- type: "dir",
82
- path: dir,
83
- permissions: 0o700,
84
- pathKey: ""
85
- }
76
+ return {
77
+ type: "dir",
78
+ path: dir,
79
+ permissions: 0o700,
80
+ pathKey: ""
86
81
  }
82
+ }
83
+
84
+
85
+
86
+
87
87
 
88
- /**
89
- * Fills a workdir with files, values, and directories.
90
- *
91
- * @param workdir: reference - a reference to the workdir to fill.
92
- * @return self: builder - a builder that adds files and directories to the workdir. */
93
88
  _fill := func(workdir) {
94
- ll.assert(smart.isReference(workdir), "workdir must be a reference to a resource or field")
95
-
96
- wd := smart.ephemeralBuilder(constants.RTYPE_WORKDIR_FILL)
97
- wd.getField("workdirIn").set(workdir)
98
-
99
- blobs := {}
100
- files := {}
101
- zipExtractions := {}
102
- values := {}
103
- dirs := {}
104
-
105
- self := undefined
106
- self = ll.toStrict(oop.inherit(wd, {
107
- _getAllDirs: func(fileName) {
108
- dirsWithFileName := path.getBasenameDirs(fileName)
109
- return slices.slice(dirsWithFileName, 0, -1)
110
- },
111
-
112
- _addDirs: func(fileName) {
113
- newDirs := self._getAllDirs(fileName)
114
- sets.add(dirs, newDirs...)
115
- },
116
-
117
- /**
118
- * Adds files from given zip archive into working directory.
119
- *
120
- * @param zipResource: smart.reference - reference to zip archive to be extracted.
121
- * @param destinationDir: string - path inside working directory for files to be extracted from archive.
122
- * Consider it as 'cd' before extraction. It makes all extracted files to be
123
- * stored inside this directory.
124
- * @param pathsInArchive: string[] - paths inside the archive to be extracted into destinationDir.
125
- * Empty array means 'unpack full archive'.
126
- * Full file paths are preserved during extraction: the file 'a/b/file.txt' would
127
- * be extracted into '<destinationDir>/a/b/file.txt', NOT '<destinationDir>/file.txt',
128
- */
129
- addFromZip: func(zipResource, destinationDir, pathsInArchive) {
130
- validation.assertJsonSchema(zipResource, validation.reference, "workdir.builder.addFromZip: <zipResource> is not smart.reference")
131
- validation.assertJsonSchema(destinationDir, "string", "workdir.builder.addFromZip: <destinationDir> is not a string. It must be a path inside working directory")
132
-
133
- if (is_undefined(pathsInArchive)) {
134
- pathsInArchive = []
135
- }
136
- validation.assertJsonSchema(pathsInArchive, ["string"], "workdir.builder.addFromZip: <pathsInArchive> must contain list of strings with paths inside archive")
137
-
138
- blobKey := ll.idToString(zipResource.id)
139
-
140
- if is_undefined(blobs[blobKey]) {
141
- blobs[blobKey] = zipResource
142
- }
143
-
144
- if is_undefined(zipExtractions[blobKey]) {
145
- zipExtractions[blobKey] = {}
146
- }
147
-
148
- if is_undefined(zipExtractions[blobKey][destinationDir]) || len(pathsInArchive) == 0 {
149
- zipExtractions[blobKey][destinationDir] = pathsInArchive
150
- return self
151
- }
152
-
153
- if (len(pathsInArchive) > 0) {
154
- zipExtractions[blobKey][destinationDir] = append(zipExtractions[blobKey][destinationDir], pathsInArchive...)
155
- }
156
-
157
- return self
158
- },
159
-
160
- /**
161
- * Adds a file to the workdir.
162
- *
163
- * @param fileName: string - the name of the file.
164
- * @param fileResource: reference - the file to add.
165
- */
166
- addFile: func(fileName, fileResource) {
167
- validation.assertJsonSchema(fileName, "string")
168
- validation.assertJsonSchema(fileResource, validation.reference)
169
-
170
- files[fileName] = fileResource
171
- blobs[fileName] = fileResource
172
- self._addDirs(fileName)
173
-
174
- return self
175
- },
176
-
177
- /**
178
- * Adds multiple files to the workdir.
179
- *
180
- * @param fileMap: map[string]reference - a map of files.
181
- */
182
- addFiles: func(fileMap) {
183
- enum.each(fileMap, self.addFile)
184
- return self
185
- },
186
-
187
- /**
188
- * Adds a file with a content to the workdir.
189
- *
190
- * @param fileName: string - the name of the file.
191
- * @param contentRef: reference|any - the content as a reference to add or the content itself.
192
- */
193
- writeFile: func(fileName, contentRef) {
194
- validation.assertJsonSchema(fileName, "string")
195
- values[fileName] = contentRef
196
- self._addDirs(fileName)
197
-
198
- return self
199
- },
200
-
201
- /**
202
- * Adds multiple files with contents to the workdir.
203
- *
204
- * @param contentMap: map[string]any|reference - a map of references to a content or to a content itself.
205
- */
206
- writeFiles: func(contentRefMap) {
207
- enum.each(contentRefMap, self.writeFile)
208
- return self
209
- },
210
-
211
- /**
212
- * Creates a possibly nested directory in the workdir.
213
- *
214
- * @param dir: string - the path of the directory.
215
- */
216
- mkDir: func(dir) {
217
- sets.add(dirs, path.getBasenameDirs(dir))
218
- return self
219
- },
220
-
221
- /**
222
- * Builds the filled workdir.
223
- *
224
- * @return wd: reference - a reference to the filled workdir.
225
- */
226
- build: func() {
227
- rules := []
228
- for dir, _ in dirs {
229
- rules = append(rules, _getDirFillRule(dir))
230
- }
231
- for fileName, _ in files {
232
- rules = append(rules, _getFileFillRule(fileName, path.getExtension(fileName)))
233
- }
234
- for fileName, _ in values {
235
- rules = append(rules, _getValueFillRule(fileName))
236
- }
237
-
238
- for blobKey, directories in zipExtractions {
239
- for dstDir, whatToExtract in directories {
240
- rules = append(rules, _getArchiveFillRule(dstDir, whatToExtract, blobKey))
241
- }
242
- }
243
-
244
- rulesRes := smart.createValueResource(
245
- constants.RTYPE_WORKDIR_FILL_RULES,
246
- json.encode(rules)
247
- )
248
- self.getField("rules").set(rulesRes)
249
-
250
- self.getField("dataIn").set(smart.createBinaryMapResource(values))
251
- self.getField("blobsIn").set(smart.createBlobMapResource(blobs))
252
-
253
- return self.lockAndBuild().outputs().workdirOut
254
- }
255
- }))
256
-
257
- return self
89
+ ll.assert(smart.isReference(workdir), "workdir must be a reference to a resource or field")
90
+
91
+ wd := smart.ephemeralBuilder(constants.RTYPE_WORKDIR_FILL)
92
+ wd.getField("workdirIn").set(workdir)
93
+
94
+ blobs := {}
95
+ files := {}
96
+ zipExtractions := {}
97
+ values := {}
98
+ dirs := {}
99
+
100
+ self := undefined
101
+ self = ll.toStrict(oop.inherit(wd, {
102
+ _getAllDirs: func(fileName) {
103
+ dirsWithFileName := path.getBasenameDirs(fileName)
104
+ return slices.slice(dirsWithFileName, 0, -1)
105
+ },
106
+
107
+ _addDirs: func(fileName) {
108
+ newDirs := self._getAllDirs(fileName)
109
+ sets.add(dirs, newDirs...)
110
+ },
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ addFromZip: func(zipResource, destinationDir, pathsInArchive) {
124
+ validation.assertJsonSchema(zipResource, validation.reference, "workdir.builder.addFromZip: <zipResource> is not smart.reference")
125
+ validation.assertJsonSchema(destinationDir, "string", "workdir.builder.addFromZip: <destinationDir> is not a string. It must be a path inside working directory")
126
+
127
+ if (is_undefined(pathsInArchive)) {
128
+ pathsInArchive = []
129
+ }
130
+ validation.assertJsonSchema(pathsInArchive, ["string"], "workdir.builder.addFromZip: <pathsInArchive> must contain list of strings with paths inside archive")
131
+
132
+ blobKey := ll.idToString(zipResource.id)
133
+
134
+ if is_undefined(blobs[blobKey]) {
135
+ blobs[blobKey] = zipResource
136
+ }
137
+
138
+ if is_undefined(zipExtractions[blobKey]) {
139
+ zipExtractions[blobKey] = {}
140
+ }
141
+
142
+ if is_undefined(zipExtractions[blobKey][destinationDir]) || len(pathsInArchive) == 0 {
143
+ zipExtractions[blobKey][destinationDir] = pathsInArchive
144
+ return self
145
+ }
146
+
147
+ if (len(pathsInArchive) > 0) {
148
+ zipExtractions[blobKey][destinationDir] = append(zipExtractions[blobKey][destinationDir], pathsInArchive...)
149
+ }
150
+
151
+ return self
152
+ },
153
+
154
+
155
+
156
+
157
+
158
+
159
+ addFile: func(fileName, fileResource) {
160
+ validation.assertJsonSchema(fileName, "string")
161
+ validation.assertJsonSchema(fileResource, validation.reference)
162
+
163
+ files[fileName] = fileResource
164
+ blobs[fileName] = fileResource
165
+ self._addDirs(fileName)
166
+
167
+ return self
168
+ },
169
+
170
+
171
+
172
+
173
+
174
+ addFiles: func(fileMap) {
175
+ enum.each(fileMap, self.addFile)
176
+ return self
177
+ },
178
+
179
+
180
+
181
+
182
+
183
+
184
+ writeFile: func(fileName, contentRef) {
185
+ validation.assertJsonSchema(fileName, "string")
186
+ values[fileName] = contentRef
187
+ self._addDirs(fileName)
188
+
189
+ return self
190
+ },
191
+
192
+
193
+
194
+
195
+
196
+ writeFiles: func(contentRefMap) {
197
+ enum.each(contentRefMap, self.writeFile)
198
+ return self
199
+ },
200
+
201
+
202
+
203
+
204
+
205
+ mkDir: func(dir) {
206
+ sets.add(dirs, path.getBasenameDirs(dir))
207
+ return self
208
+ },
209
+
210
+
211
+
212
+
213
+
214
+ build: func() {
215
+ rules := []
216
+ for dir, _ in dirs {
217
+ rules = append(rules, _getDirFillRule(dir))
218
+ }
219
+ for fileName, _ in files {
220
+ rules = append(rules, _getFileFillRule(fileName, path.getExtension(fileName)))
221
+ }
222
+ for fileName, _ in values {
223
+ rules = append(rules, _getValueFillRule(fileName))
224
+ }
225
+
226
+ for blobKey, directories in zipExtractions {
227
+ for dstDir, whatToExtract in directories {
228
+ rules = append(rules, _getArchiveFillRule(dstDir, whatToExtract, blobKey))
229
+ }
258
230
  }
259
231
 
260
- /**
261
- * Creates and fills a workdir with files, contents, and directories. See _fill for futher documentation.
262
- *
263
- * @return self: builder - a builder that adds files and directories to the workdir.
264
- */
232
+ rulesRes := smart.createValueResource(
233
+ constants.RTYPE_WORKDIR_FILL_RULES,
234
+ json.encode(rules)
235
+ )
236
+ self.getField("rules").set(rulesRes)
237
+
238
+ self.getField("dataIn").set(smart.createBinaryMapResource(values))
239
+ self.getField("blobsIn").set(smart.createBlobMapResource(blobs))
240
+
241
+ return self.lockAndBuild().outputs().workdirOut
242
+ }
243
+ }))
244
+
245
+ return self
246
+ }
247
+
248
+
249
+
250
+
251
+
265
252
  builder := func() {
266
- return _fill(create())
253
+ return _fill(create())
267
254
  }
268
255
 
269
- /**
270
- * Saves a workdir.
271
- *
272
- * @param workdir: reference - a reference to the workdir to save.
273
- * @return self: builder - the builder that helps adding save rules to the save workdir.
274
- */
256
+
257
+
258
+
259
+
260
+
275
261
  save := func(workdir) {
276
- ll.assert(smart.isReference(workdir), "workdir must be a reference to a resource or field")
277
-
278
- // files to save
279
- files := {}
280
- // files to save their content
281
- filesContent := {}
282
- // file sets to save by regex
283
- fileSets := {}
284
- // file sets to save their content by regex
285
- fileSetsContent := {}
286
-
287
- self := undefined
288
- self = ll.toStrict({
289
- /**
290
- * Saves a file from the workdir.
291
- *
292
- * @param fileName: string - the name of the file.
293
- */
294
- saveFile: func(fileName) {
295
- validation.assertJsonSchema(fileName, "string")
296
- sets.add(files, fileName)
297
- return self
298
- },
299
-
300
- /**
301
- * Saves a file to a value resource from the workdir.
302
- *
303
- * @param fileName: string - the name of the file.
304
- */
305
- saveFileContent: func(fileName) {
306
- validation.assertJsonSchema(fileName, "string")
307
- sets.add(filesContent, fileName)
308
- return self
309
- },
310
-
311
- /**
312
- * Save files which names satisfy given regex rule
313
- *
314
- * @param name: string - a name to refer this file set in the outputs
315
- * @param regex: string - regex
316
- */
317
- saveFileSet: func(name, regex) {
318
- validation.assertJsonSchema(regex, "string")
319
- ll.assert(is_undefined(fileSets[name]), "file set with name '", name, "' is already in added")
320
- fileSets[name] = regex
321
- return self
322
- },
323
-
324
- /**
325
- * Save files content which names satisfy given regex rule
326
- *
327
- * @param name: string - a name to refer this file set in the outputs
328
- * @param regex: string - regex
329
- */
330
- saveFileSetContent: func(name, regex) {
331
- validation.assertJsonSchema(regex, "string")
332
- ll.assert(is_undefined(fileSetsContent[name]), "file set content with name '", name, "' is already in added")
333
- sets.add(fileSetsContent, regex)
334
- return self
335
- },
336
-
337
- /**
338
- * Builds the saved workdir.
339
- *
340
- * @return wd: reference - the saved workdir with additional fields.
341
- */
342
- build: func() {
343
-
344
- tpl := assets.importTemplate("@platforma-sdk/workflow-tengo:workdir.save")
345
- inputs := {
346
- workdir: workdir,
347
- files: files,
348
- filesContent: filesContent,
349
- fileSets: fileSets,
350
- fileSetsContent: fileSetsContent
351
- }
352
-
353
- wds := render.createEphemeral(tpl, inputs)
354
-
355
- return ll.toStrict({
356
- files: wds.output("files"),
357
- filesContent: wds.output("filesContent"),
358
- fileSets : wds.output("fileSets"),
359
- fileSetsContent : wds.output("fileSetsContent"),
360
- workdir: wds.output("workdir"),
361
- progress: wds.output("progress")
362
- })
363
- }
364
- })
365
-
366
- return self
262
+ ll.assert(smart.isReference(workdir), "workdir must be a reference to a resource or field")
263
+
264
+ files := {}
265
+ filesContent := {}
266
+ fileSets := {}
267
+ fileSetsContent := {}
268
+
269
+ self := undefined
270
+ self = ll.toStrict({
271
+
272
+
273
+
274
+
275
+ saveFile: func(fileName) {
276
+ validation.assertJsonSchema(fileName, "string")
277
+ sets.add(files, fileName)
278
+ return self
279
+ },
280
+
281
+
282
+
283
+
284
+
285
+ saveFileContent: func(fileName) {
286
+ validation.assertJsonSchema(fileName, "string")
287
+ sets.add(filesContent, fileName)
288
+ return self
289
+ },
290
+
291
+
292
+
293
+
294
+
295
+
296
+ saveFileSet: func(name, regex) {
297
+ validation.assertJsonSchema(regex, "string")
298
+ ll.assert(is_undefined(fileSets[name]), "file set with name '", name, "' is already in added")
299
+ fileSets[name] = regex
300
+ return self
301
+ },
302
+
303
+
304
+
305
+
306
+
307
+
308
+ saveFileSetContent: func(name, regex) {
309
+ validation.assertJsonSchema(regex, "string")
310
+ ll.assert(is_undefined(fileSetsContent[name]), "file set content with name '", name, "' is already in added")
311
+ sets.add(fileSetsContent, regex)
312
+ return self
313
+ },
314
+
315
+
316
+
317
+
318
+
319
+ build: func() {
320
+
321
+ tpl := assets.importTemplate("@platforma-sdk/workflow-tengo:workdir.save")
322
+ inputs := {
323
+ workdir: workdir,
324
+ files: files,
325
+ filesContent: filesContent,
326
+ fileSets: fileSets,
327
+ fileSetsContent: fileSetsContent
328
+ }
329
+
330
+ wds := render.createEphemeral(tpl, inputs)
331
+
332
+ return ll.toStrict({
333
+ files: wds.output("files"),
334
+ filesContent: wds.output("filesContent"),
335
+ fileSets : wds.output("fileSets"),
336
+ fileSetsContent : wds.output("fileSetsContent"),
337
+ workdir: wds.output("workdir"),
338
+ progress: wds.output("progress")
339
+ })
340
+ }
341
+ })
342
+
343
+ return self
367
344
  }
368
345
 
369
346
  export ll.toStrict({
370
- builder: builder,
371
- create: create,
372
- save: save
347
+ builder: builder,
348
+ create: create,
349
+ save: save
373
350
  })