@platforma-sdk/workflow-tengo 2.13.6 → 2.15.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.
Files changed (80) hide show
  1. package/README.md +17 -1
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.js +4 -1
  4. package/dist/index.mjs +4 -1
  5. package/dist/tengo/lib/assets.lib.tengo +28 -28
  6. package/dist/tengo/lib/assets.swinfo.lib.tengo +24 -24
  7. package/dist/tengo/lib/constants.lib.tengo +6 -3
  8. package/dist/tengo/lib/exec.R.internal.lib.tengo +2 -2
  9. package/dist/tengo/lib/exec.R.lib.tengo +41 -41
  10. package/dist/tengo/lib/exec.descriptor.lib.tengo +3 -3
  11. package/dist/tengo/lib/exec.internal.lib.tengo +41 -41
  12. package/dist/tengo/lib/exec.lib.tengo +289 -289
  13. package/dist/tengo/lib/exec.limits.lib.tengo +49 -49
  14. package/dist/tengo/lib/exec.monetization.lib.tengo +1 -1
  15. package/dist/tengo/lib/exec.monetization_internal.lib.tengo +38 -38
  16. package/dist/tengo/lib/exec.package.lib.tengo +53 -53
  17. package/dist/tengo/lib/exec.python.internal.lib.tengo +1 -1
  18. package/dist/tengo/lib/exec.python.lib.tengo +37 -37
  19. package/dist/tengo/lib/exec.runcmd.lib.tengo +138 -138
  20. package/dist/tengo/lib/exec.runenv.lib.tengo +18 -18
  21. package/dist/tengo/lib/exec.stream.lib.tengo +25 -25
  22. package/dist/tengo/lib/feats.lib.tengo +3 -3
  23. package/dist/tengo/lib/file.internal.lib.tengo +31 -31
  24. package/dist/tengo/lib/file.lib.tengo +29 -29
  25. package/dist/tengo/lib/ll.get-future-field-default.lib.tengo +137 -0
  26. package/dist/tengo/lib/ll.lib.tengo +129 -129
  27. package/dist/tengo/lib/maps.lib.tengo +38 -38
  28. package/dist/tengo/lib/objects.lib.tengo +6 -6
  29. package/dist/tengo/lib/oop.lib.tengo +11 -11
  30. package/dist/tengo/lib/path.lib.tengo +60 -60
  31. package/dist/tengo/lib/pframes.builder.lib.tengo +3 -3
  32. package/dist/tengo/lib/pframes.constants.lib.tengo +20 -20
  33. package/dist/tengo/lib/pframes.export-pcolumn.lib.tengo +5 -5
  34. package/dist/tengo/lib/pframes.lib.tengo +206 -198
  35. package/dist/tengo/lib/pframes.ll.lib.tengo +59 -59
  36. package/dist/tengo/lib/pframes.pcolumn.lib.tengo +18 -18
  37. package/dist/tengo/lib/pframes.remove-nulls.lib.tengo +36 -0
  38. package/dist/tengo/lib/pframes.spec.lib.tengo +83 -83
  39. package/dist/tengo/lib/pframes.util.lib.tengo +176 -176
  40. package/dist/tengo/lib/pframes.xsv-import-file.lib.tengo +160 -0
  41. package/dist/tengo/lib/pframes.xsv.lib.tengo +84 -167
  42. package/dist/tengo/lib/render.lib.tengo +100 -45
  43. package/dist/tengo/lib/sets.lib.tengo +44 -44
  44. package/dist/tengo/lib/slices.lib.tengo +126 -126
  45. package/dist/tengo/lib/smart.lib.tengo +654 -507
  46. package/dist/tengo/lib/test.lib.tengo +120 -120
  47. package/dist/tengo/lib/tpl.lib.tengo +206 -170
  48. package/dist/tengo/lib/tpl.state-await.lib.tengo +17 -17
  49. package/dist/tengo/lib/tpl.util.lib.tengo +5 -5
  50. package/dist/tengo/lib/units.lib.tengo +2 -2
  51. package/dist/tengo/lib/validation.lib.tengo +130 -130
  52. package/dist/tengo/lib/waiter.lib.tengo +59 -0
  53. package/dist/tengo/lib/workdir.lib.tengo +126 -126
  54. package/dist/tengo/lib/workdir.proc.lib.tengo +47 -47
  55. package/dist/tengo/lib/workdir.save.lib.tengo +53 -53
  56. package/dist/tengo/lib/workflow.bobject.lib.tengo +11 -11
  57. package/dist/tengo/lib/workflow.bquery.lib.tengo +40 -40
  58. package/dist/tengo/lib/workflow.constants.lib.tengo +1 -1
  59. package/dist/tengo/lib/workflow.context.lib.tengo +16 -16
  60. package/dist/tengo/lib/workflow.lib.tengo +76 -76
  61. package/dist/tengo/tpl/exec.R.create-renv.plj.gz +0 -0
  62. package/dist/tengo/tpl/exec.exec.plj.gz +0 -0
  63. package/dist/tengo/tpl/exec.monetization_to_json.plj.gz +0 -0
  64. package/dist/tengo/tpl/exec.python.create-venv.plj.gz +0 -0
  65. package/dist/tengo/tpl/exec.python.install-deps.plj.gz +0 -0
  66. package/dist/tengo/tpl/ll.get-field.plj.gz +0 -0
  67. package/dist/tengo/tpl/pframes.export-multiple-pcolumns.plj.gz +0 -0
  68. package/dist/tengo/tpl/pframes.export-pframe.plj.gz +0 -0
  69. package/dist/tengo/tpl/pframes.export-single-pcolumn.plj.gz +0 -0
  70. package/dist/tengo/tpl/pframes.import-dir.plj.gz +0 -0
  71. package/dist/tengo/tpl/pframes.process-pcolumn-data.plj.gz +0 -0
  72. package/dist/tengo/tpl/pframes.remove-nulls.plj.gz +0 -0
  73. package/dist/tengo/tpl/pframes.xsv-export-pframe.plj.gz +0 -0
  74. package/dist/tengo/tpl/pframes.xsv-import-if-not-null.plj.gz +0 -0
  75. package/dist/tengo/tpl/pframes.xsv-import-map.plj.gz +0 -0
  76. package/dist/tengo/tpl/waiter.waiter.plj.gz +0 -0
  77. package/dist/tengo/tpl/workdir.save.plj.gz +0 -0
  78. package/dist/tengo/tpl/workflow.build-ctx.plj.gz +0 -0
  79. package/package.json +2 -2
  80. package/dist/tengo/tpl/pframes.map-pframe.plj.gz +0 -0
@@ -1,6 +1,6 @@
1
- /**
2
- * Working with p-frames
3
- */
1
+
2
+
3
+
4
4
 
5
5
  ll := import("@platforma-sdk/workflow-tengo:ll")
6
6
  maps := import("@platforma-sdk/workflow-tengo:maps")
@@ -16,145 +16,153 @@ constants := import("@platforma-sdk/workflow-tengo:pframes.constants")
16
16
 
17
17
  llProcessTpl := assets.importTemplate("@platforma-sdk/workflow-tengo:pframes.process-pcolumn-data")
18
18
 
19
- /**
20
- * Given a reference to the p-frame, converts all inner resource files into resources that can be
21
- * downloaded from the UI side.
22
- */
19
+
20
+
21
+
22
+
23
23
  exportFrame := func(pf) {
24
24
  return render.createEphemeral(assets.importTemplate("@platforma-sdk/workflow-tengo:pframes.export-pframe"), { pf: pf }).output("result")
25
25
  }
26
26
 
27
- /**
28
- * Export single PColumn data
29
- */
27
+
28
+
29
+
30
30
  exportColumnData := func(data) {
31
31
  return render.createEphemeral(assets.importTemplate("@platforma-sdk/workflow-tengo:pframes.export-single-pcolumn"), { data: data }).output("result")
32
32
  }
33
33
 
34
- /**
35
- * Creates a builder for a resource map p-column's data.
36
- */
34
+
35
+
36
+
37
37
  pColumnResourceMapDataBuilder := func(keyLength) {
38
38
  ll.panic("pframes.pColumnResourceMapDataBuilder is not supported any more; use pcolumn.resourceMapBuilder")
39
39
  }
40
40
 
41
- /**
42
- * Constructs a mapping or aggregation pipeline for a given input PColumn and returns a specialized
43
- * output object for accessing the processing results.
44
- *
45
- * === Body Template Contract ===
46
- *
47
- * Inputs:
48
- * "__key__" - When passKey is true, contains the JSON representation of the group/element key:
49
- * - Without aggregation: represents a single key
50
- * - With aggregation: represents all keys in positions not specified by indices
51
- * Not provided if passKey is false or omitted from ops
52
- * "__aggregation_axes_spec__"
53
- * - When passAggregationAxesSpec is true, contains the axes specification for aggregation
54
- * Can be used to adapt body behavior when optional aggregation axes are unmatched
55
- * Not provided if passAggregationAxesSpec is false or omitted from ops
56
- * "__aggregation_axes_names__"
57
- * - When passAggregationAxesNames is true, contains just the names of aggregation axes
58
- * as a simple array of strings, without domains, annotations, etc.
59
- * Not provided if passAggregationAxesNames is false or omitted from ops
60
- * "__value__" - Content depends on aggregation setting:
61
- * - Without aggregation: single value (only for ResourceMap PColumns)
62
- * - With aggregation: "PColumnData/*" resource containing all records in current group
63
- * ...extra - Additional values/references passed via the options.extra parameter
64
- * are forwarded to the template unchanged
65
- *
66
- * === Parameters ===
67
- *
68
- * @param input Primary input column data and specifications
69
- *
70
- * Required structure:
71
- * {
72
- * // PColumn specifications (must be explicit, not a reference)
73
- * spec: <PColumnSpec>,
74
- *
75
- * // Reference to the data resource
76
- * data: <resource ref>
77
- * }
78
- *
79
- * @param bodyTpl Template executed for each iteration (see contract above)
80
- * @param outputs Array of output configurations to collect from rendered templates
81
- *
82
- * Common fields for all types:
83
- * {
84
- * name: string // Output name
85
- * path?: string[] // [Optional] Override path inside body template result
86
- * First element interpreted as output name
87
- * Defaults to [name] if omitted
88
- * }
89
- *
90
- * Available types:
91
- * | {
92
- * type: "Resource", // Single resource output
93
- * spec: PColumnSpec // Result column spec (must have zero axes specs,
94
- * // input axes specs added automatically)
95
- * }
96
- * | {
97
- * type: "ResourceMap", // ResourceMap output
98
- * spec: PColumnSpec // Result column spec (list only axes specs
99
- * // produced by body template, input axes added automatically)
100
- * }
101
- * | {
102
- * type: "BinaryPartitioned" | "JsonPartitioned",
103
- * // Partitioned Json/Binary PColumn data
104
- * spec: PColumnSpec // Result column spec (list only axes specs
105
- * // produced by body template, input axes added automatically)
106
- * partitionKeyLength: number
107
- * // Expected partition length per operation
108
- * }
109
- * | {
110
- * type: "Xsv", // CSV/TSV formatted text file for xsv conversion
111
- * xsvType: "tsv"|"csv", // Expected file format
112
- * settings: object // Xsv conversion specification
113
- * }
114
- *
115
- * @param opts Optional additional settings
116
- *
117
- * {
118
- * traceSteps?: array // Array of trace steps to add to output specs
119
- * // Each step should be an object with type, id, importance and label
120
- *
121
- * aggregate?: AxisMatcher[],
122
- * // If specified, selected axes are combined and
123
- * // passed to each iteration as a group. These axes
124
- * // won't be automatically added to output specs
125
- * // Examples:
126
- * // - "pl7.app/sequencing/readIndex"
127
- * // - { name: "pl7.app/sequencing/readIndex" }
128
- * // - { type: "String", name: "pl7.app/sequencing/lane" }
129
- * // - { type: "String", name: "pl7.app/sequencing/lane", optional: true }
130
- * // - { type: "String", name: "pl7.app/rna-seq/geneId", domain: { "pl7.app/species": "homo-sapiens" } }
131
- * // With optional: true, matcher won't error if unmatched
132
- * // Use passAggregationAxesSpec for custom handling in body template
133
- *
134
- * passKey?: boolean // Pass __key__ to body template if true
135
- *
136
- * passAggregationAxesSpec?: boolean
137
- * // Pass full aggregation axes specs to body template
138
- * // via __aggregation_axes_spec__ input
139
- *
140
- * passAggregationAxesNames?: boolean
141
- * // Pass array of aggregation axes names to body template
142
- * // via __aggregation_axes_names__ input
143
- *
144
- * extra?: Map<string, Ref>,
145
- * // Additional parameters passed to each body invocation
146
- * // Keys match template input names
147
- *
148
- * isEphemeral?: boolean // Whether to render mapping template in ephemeral mode
149
- * // Defaults to false if omitted, template will be rendered
150
- * // as pure resource
151
- * }
152
- *
153
- * === Return ===
154
- *
155
- * @returns Object with methods for retrieving processing results
156
- * See source code for method documentation and signatures
157
- */
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
158
166
  processColumn := func(input, bodyTpl, outputs, ...opts) {
159
167
  if len(opts) == 0 {
160
168
  opts = {}
@@ -194,13 +202,13 @@ processColumn := func(input, bodyTpl, outputs, ...opts) {
194
202
  ll.panic("can't use passAggregationAxesSpec or passAggregationAxesNames without aggregate")
195
203
  }
196
204
 
197
- // Initialize trace if traceSteps provided
205
+
198
206
  trace := undefined
199
207
  if !is_undefined(opts.traceSteps) {
200
208
  trace = pSpec.makeTrace(input.spec, opts.traceSteps...)
201
209
  }
202
210
 
203
- // JSON params passed as a single resource to the template
211
+
204
212
  processTemplateParams := {
205
213
  eph: opts.isEphemeral,
206
214
  passKey: opts.passKey
@@ -217,7 +225,7 @@ processColumn := func(input, bodyTpl, outputs, ...opts) {
217
225
  aggregationIndices := pSpec.matchAxes(input.spec.axesSpec, opts.aggregate)
218
226
  processTemplateParams.aggregationIndices = aggregationIndices
219
227
 
220
- // calculate iteration axes spec
228
+
221
229
  groupAxesIndices := pUtil.calculateGroupAxesIndices(len(input.spec.axesSpec), aggregationIndices)
222
230
  iterationAxesSpec = []
223
231
  for i in groupAxesIndices {
@@ -247,7 +255,7 @@ processColumn := func(input, bodyTpl, outputs, ...opts) {
247
255
  outputSpecs := {}
248
256
  outputsMap := {}
249
257
  for output in outputs {
250
- // map output name to output settings provided in input
258
+
251
259
  outputsMap[output.name] = output
252
260
  if output.type == "Resource" || output.type == "BinaryPartitioned" || output.type == "JsonPartitioned" {
253
261
  spec := maps.merge(output.spec, { axesSpec: iterationAxesSpec + slices.normalize(output.spec.axesSpec) })
@@ -303,17 +311,17 @@ processColumn := func(input, bodyTpl, outputs, ...opts) {
303
311
  self = ll.toStrict({
304
312
  renderResult: renderResult,
305
313
 
306
- /**
307
- * Returns output spec for the given output name and optional column name
308
- *
309
- * For normal outputs (Resource, ResourceMap, BinaryPartitioned, JsonPartitioned),
310
- * only the output name should be provided.
311
- * For Xsv outputs, both output name and column name should be provided.
312
- *
313
- * @param name - Name of the output
314
- * @param column - Optional. For Xsv outputs, name of the column
315
- * @returns Output spec
316
- */
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
317
325
  outputSpec: func(name, ...column) {
318
326
  output := outputsMap[name]
319
327
  if is_undefined(output) {
@@ -339,17 +347,17 @@ processColumn := func(input, bodyTpl, outputs, ...opts) {
339
347
  }
340
348
  },
341
349
 
342
- /**
343
- * Returns data resource for the given output name and optional column name
344
- *
345
- * For normal outputs (Resource, ResourceMap, BinaryPartitioned, JsonPartitioned),
346
- * only the output name should be provided.
347
- * For Xsv outputs, both output name and column name should be provided.
348
- *
349
- * @param name - Name of the output
350
- * @param column - Optional. For Xsv outputs, name of the column
351
- * @returns data resource
352
- */
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+
360
+
353
361
  outputData: func(name, ...column) {
354
362
  output := outputsMap[name]
355
363
  if is_undefined(output) {
@@ -369,17 +377,17 @@ processColumn := func(input, bodyTpl, outputs, ...opts) {
369
377
  }
370
378
  },
371
379
 
372
- /**
373
- * Returns both data resource and spec for the given output name and optional column name
374
- *
375
- * For normal outputs (Resource, ResourceMap, BinaryPartitioned, JsonPartitioned),
376
- * only the output name should be provided.
377
- * For Xsv outputs, both output name and column name should be provided.
378
- *
379
- * @param name - Name of the output
380
- * @param column - Optional. For Xsv outputs, name of the column
381
- * @returns {data: Resource, spec: PColumnSpec} Object containing both data resource and spec
382
- */
380
+
381
+
382
+
383
+
384
+
385
+
386
+
387
+
388
+
389
+
390
+
383
391
  output: func(name, ...column) {
384
392
  output := outputsMap[name]
385
393
  if is_undefined(output) {
@@ -410,12 +418,12 @@ processColumn := func(input, bodyTpl, outputs, ...opts) {
410
418
  }
411
419
  },
412
420
 
413
- /**
414
- * Returns a PFrame containing all columns from an Xsv output
415
- *
416
- * @param name - Name of the Xsv output
417
- * @returns PFrame containing all columns from the output
418
- */
421
+
422
+
423
+
424
+
425
+
426
+
419
427
  xsvOutputFrame: func(name) {
420
428
  output := outputsMap[name]
421
429
  if is_undefined(output) {
@@ -433,12 +441,12 @@ processColumn := func(input, bodyTpl, outputs, ...opts) {
433
441
  return builder.build()
434
442
  },
435
443
 
436
- /**
437
- * Returns a PFrame containing all results, flattening Xsv outputs using the provided separator
438
- *
439
- * @param ...xsvNameSeparator - Optional separator for joining Xsv output and column names, defaults to "."
440
- * @returns PFrame containing all results
441
- */
444
+
445
+
446
+
447
+
448
+
449
+
442
450
  allOutputsFrame: func(...xsvNameSeparator) {
443
451
  sep := "."
444
452
  if len(xsvNameSeparator) > 0 {
@@ -449,7 +457,7 @@ processColumn := func(input, bodyTpl, outputs, ...opts) {
449
457
 
450
458
  for name, output in outputsMap {
451
459
  if output.type == "Xsv" {
452
- // For Xsv outputs, add each column with name prefixed
460
+
453
461
  for columnName, spec in outputSpecs[name] {
454
462
  builder.add(
455
463
  name + sep + columnName,
@@ -458,7 +466,7 @@ processColumn := func(input, bodyTpl, outputs, ...opts) {
458
466
  )
459
467
  }
460
468
  } else {
461
- // For non-Xsv outputs, add directly
469
+
462
470
  builder.add(
463
471
  name,
464
472
  outputSpecs[name],
@@ -470,11 +478,11 @@ processColumn := func(input, bodyTpl, outputs, ...opts) {
470
478
  return builder.build()
471
479
  },
472
480
 
473
- /**
474
- * Returns sorted list of all available output names
475
- *
476
- * @returns Array of output names
477
- */
481
+
482
+
483
+
484
+
485
+
478
486
  listOutputs: func() {
479
487
  outputs := []
480
488
  for name, _ in outputsMap {
@@ -483,12 +491,12 @@ processColumn := func(input, bodyTpl, outputs, ...opts) {
483
491
  return slices.quickSort(outputs)
484
492
  },
485
493
 
486
- /**
487
- * Checks if given output is of Xsv type
488
- *
489
- * @param name - Output name to check
490
- * @returns true if output is Xsv, false otherwise
491
- */
494
+
495
+
496
+
497
+
498
+
499
+
492
500
  isXsvOutput: func(name) {
493
501
  output := outputsMap[name]
494
502
  if is_undefined(output) {
@@ -497,12 +505,12 @@ processColumn := func(input, bodyTpl, outputs, ...opts) {
497
505
  return output.type == "Xsv"
498
506
  },
499
507
 
500
- /**
501
- * Returns sorted list of column names for given Xsv output
502
- *
503
- * @param name - Xsv output name
504
- * @returns Array of column names
505
- */
508
+
509
+
510
+
511
+
512
+
513
+
506
514
  listXsvColumns: func(name) {
507
515
  output := outputsMap[name]
508
516
  if is_undefined(output) {
@@ -1,6 +1,6 @@
1
- /**
2
- * Set of basic operations for PColumn data payload
3
- */
1
+
2
+
3
+
4
4
 
5
5
  ll := import("@platforma-sdk/workflow-tengo:ll")
6
6
  assets := import("@platforma-sdk/workflow-tengo:assets")
@@ -9,59 +9,59 @@ render := import("@platforma-sdk/workflow-tengo:render")
9
9
 
10
10
  llProcessTpl := assets.importTemplate("@platforma-sdk/workflow-tengo:pframes.process-pcolumn-data")
11
11
 
12
- /**
13
- * Instantiates an aggregation pipeline for the given inputs and returns rendered ephemeral template.
14
- * Use result.output("outputName") to get corresponding output, where result is the object returned by
15
- * this method.
16
- *
17
- * Contract for the body template:
18
- * Inputs:
19
- * "__key__": string - JSON representation of the group key (i.e. keys in all positions not
20
- * specified in the indices parameter). Only provided if passKey is true.
21
- * "__value__": Resource - PColumnData/ResourceMap resource containing all records in current group
22
- * ...extra - Additional values/references passed via the extra parameter are forwarded
23
- * to the template unchanged
24
- *
25
- * @param data: Resource - Data resource (currently only PColumnData/ResourceMap supported)
26
- * @param aggregationIndices: number[]|undefined
27
- * - Indices to aggregate over. These indices will be stripped from
28
- * the input map (opposite of SQL GROUP BY). If undefined, works as
29
- * "map" and passes each input value as raw resource.
30
- * @param bodyTpl: Template - Template implementing the aggregation logic
31
- * @param outputs: OutputSpec[] - Array of output specifications to collect from rendered templates
32
- * Common fields for all output types:
33
- * {
34
- * name: string - Name of the output
35
- * path?: string[] - Optional. Overrides path inside body template
36
- * result. First element is output name. Defaults
37
- * to [name] if not specified.
38
- * }
39
- * Output type variants:
40
- * | { type: "Resource" } - Normal singular resource
41
- * | { - ResourceMap output
42
- * type: "ResourceMap",
43
- * keyLength: number - Expected key length per operation
44
- * }
45
- * | { - Partitioned data output
46
- * type: "BinaryPartitioned"|"JsonPartitioned",
47
- * partitionKeyLength: number - Expected partition length per op
48
- * }
49
- * | { - CSV/TSV text file output
50
- * type: "Xsv",
51
- * xsvType: "tsv"|"csv",
52
- * flattenWithDelimiter?: string,
53
- * - If present, flattens output by adding columns
54
- * one by one using the specified delimiter:
55
- * "{outputName}{flattenWithDelimiter}{columnId}"
56
- * settings: object - Xsv conversion specification
57
- * }
58
- * @param isEph: boolean - If true, body template will be rendered as ephemeral
59
- * @param passKey: boolean - If true, body template will receive __key__ input
60
- * @param extra: object - Optional map of parameters to pass to the template
61
- *
62
- * @returns RenderResult - Rendered template result with output() method for accessing outputs
63
- * @panics - If extra parameter count is invalid
64
- */
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
65
  aggregateV2 := func(data, aggregationIndices, bodyTpl, outputs, isEph, passKey, ...extra) {
66
66
  renderInputs := {
67
67
  params: smart.createJsonResource({
@@ -86,9 +86,9 @@ aggregateV2 := func(data, aggregationIndices, bodyTpl, outputs, isEph, passKey,
86
86
  return renderResult
87
87
  }
88
88
 
89
- /*
90
- * Read docs for aggregateV2
91
- */
89
+
90
+
91
+
92
92
  aggregate := func(data, aggregationIndices, bodyTpl, outputs, isEph, ...extra) {
93
93
  return aggregateV2(data, aggregationIndices, bodyTpl, outputs, isEph, true, extra...)
94
94
  }