@platforma-sdk/workflow-tengo 2.14.0 → 2.15.1

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 +3 -1
  4. package/dist/index.mjs +3 -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 +13 -13
  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,159 +1,159 @@
1
- /*
2
- * Library for tengo unit tests.
3
- * Contains collection of helpers, that make tengo unit tests more compact, easier for reading and writing.
4
- *
5
- * WARNING: It is designed to be imported ONLY in *.test.tengo files.
6
- * As it works ONLY in tengo unit tests context, it will break any workflow if imported
7
- * in .lib.tengo or .tpl.tengo file.
8
- */
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
9
 
10
10
  test := import("test")
11
11
 
12
- //
13
- // Basic re-export from "test" builtin library with some conveniences
14
- //
15
12
 
16
- /**
17
- * Skip the test writing given message to the console log.
18
- *
19
- * @param args: []any - message to be written.
20
- * Each argument is converted to string with its default formatter.
21
- */
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
22
  skip := func(...args) {
23
23
  test.skip(args...)
24
24
  }
25
25
 
26
- /**
27
- * Formatted version of skip(). skipf(msg, ...args) == skip(format(msg, args...))
28
- *
29
- * @param msg: string - message with formatting directives.
30
- * @param args: []any - arguments for directives in <msg>.
31
- */
26
+
27
+
28
+
29
+
30
+
31
+
32
32
  skipf := func(msg, ...args) {
33
33
  skip(format(msg, args...))
34
34
  }
35
35
 
36
- /**
37
- * Fail the test in place. Interrupts execution of single test and prints a
38
- * failure message to the console log.
39
- *
40
- * @param args: []any - message to be written.
41
- * Each argument is converted to string with its default formatter.
42
- */
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
43
  fail := func(...args) {
44
44
  test.fail(args...)
45
45
  }
46
46
 
47
- /**
48
- * Formatted version of fail(). failf(msg, ...args) == fail(format(msg, args...))
49
- *
50
- * @param msg: string - message with formatting directives.
51
- * @param args: []any - arguments for directives in <msg>.
52
- */
47
+
48
+
49
+
50
+
51
+
52
+
53
53
  failf := func(msg, ...args) {
54
54
  fail(format(msg, args...))
55
55
  }
56
56
 
57
- /**
58
- * Write message to console log.
59
- *
60
- * @param args: []any - message to be written.
61
- * Each argument is converted to string with its default formatter.
62
- */
57
+
58
+
59
+
60
+
61
+
62
+
63
63
  log := func(...args) {
64
64
  test.log(args...)
65
65
  }
66
66
 
67
- /**
68
- * Formatted version of log(). logf(msg, ...args) == log(format(msg, args...))
69
- *
70
- * @param msg: string - message with formatting directives.
71
- * @param args: []any - arguments for directives in <msg>.
72
- */
67
+
68
+
69
+
70
+
71
+
72
+
73
73
  logf := func(msg, ...args) {
74
74
  test.log(format(msg, args...))
75
75
  }
76
76
 
77
- /**
78
- * Mark test as executed for tengo testing engine.
79
- *
80
- * Regular tengo file with tests contains bunch of fuctions starting with 'Test' prefix, like `TestMyFunction := func() { ... }`.
81
- * You DO NOT need to call this Done() method if you have file with Test* functions.
82
- *
83
- * For some rare cases, you may want to define your own custom testing script, that will call functions on its own instead
84
- * of using the standard test functions naming. In this case, testing engine needs to know the difference between "nothing was called at all"
85
- * and "everything was done well". This is what this method for.
86
- *
87
- * You don't need it in 99.9% of cases.
88
- *
89
- * This method does not interrupt test execution and is intended for use in custom test scripts
90
- * without declared test functions.
91
- */
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
92
  done := func() {
93
93
  test.done()
94
94
  }
95
95
 
96
- //
97
- // Boolean assertions
98
- //
99
96
 
100
- /**
101
- * Require <condition> to be true, failing test when not.
102
- *
103
- * @param condition: bool
104
- * @param msg: []any - message to be printed on check failure
105
- */
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
106
  isTrue := func(condition, ...msg) {
107
107
  if !condition {
108
108
  test.fail("<condition> != 'true': ", msg...)
109
109
  }
110
110
  }
111
111
 
112
- /**
113
- * Formatted version of isTrue(). isTruef(condition, msg, ...args) == isTrue(condition, format(msg, args...))
114
- *
115
- * @param condition: bool
116
- * @param msg: string - message with formatting directives to be printed on check failure
117
- * @param args: []any - arguments for formatting directives in <msg>
118
- */
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
119
  isTruef := func(condition, msg, ...args) {
120
120
  isTrue(condition, format(msg, args...))
121
121
  }
122
122
 
123
- /**
124
- * Require <condition> to be false, failing test when not.
125
- *
126
- * @param condition: bool
127
- * @param args: []any - message to be printed on check failure
128
- */
123
+
124
+
125
+
126
+
127
+
128
+
129
129
  isFalse := func(condition, ...args) {
130
130
  if condition {
131
131
  test.fail("<condition> != 'false'", args...)
132
132
  }
133
133
  }
134
134
 
135
- /**
136
- * Formatted version of isFalse(). isFalsef(condition, msg, ..args) == isFalse(condition, format(msg, args...))
137
- *
138
- * @param condition: bool
139
- * @param msg: string - message with formatting directives to be printed on check failure
140
- * @param args: []any - arguments for formatting directives in <msg>
141
- */
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
142
  isFalsef := func(condition, msg, ...args) {
143
143
  isFalse(condition, format(msg, args...))
144
144
  }
145
145
 
146
- //
147
- // Equality assertions
148
- //
149
-
150
- /**
151
- * Fails test when <expect> != <value>
152
- *
153
- * @param expect: any - expected value for the equality check
154
- * @param value: any - the value to be checked
155
- * @param args: []any - the message to be printed on check failure
156
- */
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
157
  isEqual := func(expect, value, ...args) {
158
158
  if expect == value {
159
159
  return
@@ -164,22 +164,22 @@ isEqual := func(expect, value, ...args) {
164
164
  fail(msg, args...)
165
165
  }
166
166
 
167
- /**
168
- * Formatted version of isEqual(). isEqualf(expect, value, msg, ..args) == isEqual(expect, value, format(msg, args...))
169
- *
170
- * @param expect: any - expected value for the equality check
171
- * @param value: any - the value to be checked
172
- * @param msg: string - message with formatting directives to be printed on check failure
173
- * @param args: []any - arguments for formatting directives in <msg>
174
- */
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
175
  isEqualf := func(expect, value, msg, ...args) {
176
176
  isEqual(expect, value, format(msg, args...))
177
177
  }
178
178
 
179
179
  export {
180
- //
181
- // Builtin 'test' module method wrappers
182
- //
180
+
181
+
182
+
183
183
  done : done,
184
184
  skip : skip,
185
185
  skipf : skipf,
@@ -188,17 +188,17 @@ export {
188
188
  log : log,
189
189
  logf : logf,
190
190
 
191
- //
192
- // Boolean assertions
193
- //
191
+
192
+
193
+
194
194
  isTrue : isTrue,
195
195
  isTruef : isTruef,
196
196
  isFalse : isFalse,
197
197
  isFalsef : isFalsef,
198
198
 
199
- //
200
- // Equality assertions
201
- //
199
+
200
+
201
+
202
202
  isEqual : isEqual,
203
203
  isEqualf : isEqualf
204
204
  }