@platforma-sdk/model 1.42.16 → 1.42.20

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 (222) hide show
  1. package/dist/bconfig/index.d.ts +0 -1
  2. package/dist/bconfig/lambdas.d.ts +0 -1
  3. package/dist/bconfig/normalization.cjs +19 -0
  4. package/dist/bconfig/normalization.cjs.map +1 -0
  5. package/dist/bconfig/normalization.d.ts +0 -1
  6. package/dist/bconfig/normalization.js +16 -0
  7. package/dist/bconfig/normalization.js.map +1 -0
  8. package/dist/bconfig/types.cjs +8 -0
  9. package/dist/bconfig/types.cjs.map +1 -0
  10. package/dist/bconfig/types.d.ts +0 -1
  11. package/dist/bconfig/types.js +6 -0
  12. package/dist/bconfig/types.js.map +1 -0
  13. package/dist/bconfig/util.d.ts +0 -1
  14. package/dist/bconfig/v3.d.ts +0 -1
  15. package/dist/block_api_v1.d.ts +0 -1
  16. package/dist/block_api_v2.d.ts +0 -1
  17. package/dist/block_state_patch.d.ts +0 -1
  18. package/dist/block_state_util.cjs +28 -0
  19. package/dist/block_state_util.cjs.map +1 -0
  20. package/dist/block_state_util.d.ts +0 -1
  21. package/dist/block_state_util.js +24 -0
  22. package/dist/block_state_util.js.map +1 -0
  23. package/dist/branding.d.ts +0 -1
  24. package/dist/builder.cjs +166 -0
  25. package/dist/builder.cjs.map +1 -0
  26. package/dist/builder.d.ts +0 -1
  27. package/dist/builder.js +164 -0
  28. package/dist/builder.js.map +1 -0
  29. package/dist/components/PFrameForGraphs.cjs +261 -0
  30. package/dist/components/PFrameForGraphs.cjs.map +1 -0
  31. package/dist/components/PFrameForGraphs.d.ts +0 -1
  32. package/dist/components/PFrameForGraphs.js +254 -0
  33. package/dist/components/PFrameForGraphs.js.map +1 -0
  34. package/dist/components/PlAnnotations/filter.d.ts +0 -1
  35. package/dist/components/PlAnnotations/filters_ui.cjs +556 -0
  36. package/dist/components/PlAnnotations/filters_ui.cjs.map +1 -0
  37. package/dist/components/PlAnnotations/filters_ui.d.ts +0 -1
  38. package/dist/components/PlAnnotations/filters_ui.js +548 -0
  39. package/dist/components/PlAnnotations/filters_ui.js.map +1 -0
  40. package/dist/components/PlAnnotations/index.d.ts +0 -1
  41. package/dist/components/PlAnnotations/types.d.ts +0 -1
  42. package/dist/components/PlDataTable.cjs +337 -0
  43. package/dist/components/PlDataTable.cjs.map +1 -0
  44. package/dist/components/PlDataTable.d.ts +0 -1
  45. package/dist/components/PlDataTable.js +324 -0
  46. package/dist/components/PlDataTable.js.map +1 -0
  47. package/dist/components/PlMultiSequenceAlignment.cjs +33 -0
  48. package/dist/components/PlMultiSequenceAlignment.cjs.map +1 -0
  49. package/dist/components/PlMultiSequenceAlignment.d.ts +0 -1
  50. package/dist/components/PlMultiSequenceAlignment.js +31 -0
  51. package/dist/components/PlMultiSequenceAlignment.js.map +1 -0
  52. package/dist/components/PlSelectionModel.cjs +11 -0
  53. package/dist/components/PlSelectionModel.cjs.map +1 -0
  54. package/dist/components/PlSelectionModel.d.ts +0 -1
  55. package/dist/components/PlSelectionModel.js +9 -0
  56. package/dist/components/PlSelectionModel.js.map +1 -0
  57. package/dist/components/index.d.ts +0 -1
  58. package/dist/config/actions.cjs +266 -0
  59. package/dist/config/actions.cjs.map +1 -0
  60. package/dist/config/actions.d.ts +0 -1
  61. package/dist/config/actions.js +233 -0
  62. package/dist/config/actions.js.map +1 -0
  63. package/dist/config/actions_kinds.d.ts +0 -1
  64. package/dist/config/index.d.ts +0 -1
  65. package/dist/config/model.d.ts +0 -1
  66. package/dist/config/model_meta.d.ts +0 -1
  67. package/dist/config/type_engine.d.ts +0 -1
  68. package/dist/config/type_util.d.ts +0 -1
  69. package/dist/env_value.cjs +11 -0
  70. package/dist/env_value.cjs.map +1 -0
  71. package/dist/env_value.d.ts +0 -1
  72. package/dist/env_value.js +9 -0
  73. package/dist/env_value.js.map +1 -0
  74. package/dist/global.d.ts +14 -0
  75. package/dist/index.cjs +138 -0
  76. package/dist/index.cjs.map +1 -0
  77. package/dist/index.d.ts +0 -1
  78. package/dist/index.js +26 -1
  79. package/dist/index.js.map +1 -1
  80. package/dist/internal.cjs +56 -0
  81. package/dist/internal.cjs.map +1 -0
  82. package/dist/internal.d.ts +0 -1
  83. package/dist/internal.js +49 -0
  84. package/dist/internal.js.map +1 -0
  85. package/dist/package.json.cjs +6 -0
  86. package/dist/package.json.cjs.map +1 -0
  87. package/dist/package.json.js +4 -0
  88. package/dist/package.json.js.map +1 -0
  89. package/dist/pframe.cjs +34 -0
  90. package/dist/pframe.cjs.map +1 -0
  91. package/dist/pframe.d.ts +0 -1
  92. package/dist/pframe.js +32 -0
  93. package/dist/pframe.js.map +1 -0
  94. package/dist/platforma.d.ts +0 -1
  95. package/dist/raw_globals.cjs +28 -0
  96. package/dist/raw_globals.cjs.map +1 -0
  97. package/dist/raw_globals.d.ts +0 -1
  98. package/dist/raw_globals.js +25 -0
  99. package/dist/raw_globals.js.map +1 -0
  100. package/dist/ref_util.cjs +21 -0
  101. package/dist/ref_util.cjs.map +1 -0
  102. package/dist/ref_util.d.ts +11 -12
  103. package/dist/ref_util.js +18 -0
  104. package/dist/ref_util.js.map +1 -0
  105. package/dist/render/accessor.cjs +233 -0
  106. package/dist/render/accessor.cjs.map +1 -0
  107. package/dist/render/accessor.d.ts +0 -1
  108. package/dist/render/accessor.js +230 -0
  109. package/dist/render/accessor.js.map +1 -0
  110. package/dist/render/api.cjs +514 -0
  111. package/dist/render/api.cjs.map +1 -0
  112. package/dist/render/api.d.ts +0 -1
  113. package/dist/render/api.js +511 -0
  114. package/dist/render/api.js.map +1 -0
  115. package/dist/render/future.cjs +35 -0
  116. package/dist/render/future.cjs.map +1 -0
  117. package/dist/render/future.d.ts +0 -1
  118. package/dist/render/future.js +33 -0
  119. package/dist/render/future.js.map +1 -0
  120. package/dist/render/index.d.ts +0 -1
  121. package/dist/render/internal.cjs +43 -0
  122. package/dist/render/internal.cjs.map +1 -0
  123. package/dist/render/internal.d.ts +0 -1
  124. package/dist/render/internal.js +37 -0
  125. package/dist/render/internal.js.map +1 -0
  126. package/dist/render/traversal_ops.d.ts +0 -1
  127. package/dist/render/util/axis_filtering.cjs +87 -0
  128. package/dist/render/util/axis_filtering.cjs.map +1 -0
  129. package/dist/render/util/axis_filtering.d.ts +0 -1
  130. package/dist/render/util/axis_filtering.js +85 -0
  131. package/dist/render/util/axis_filtering.js.map +1 -0
  132. package/dist/render/util/column_collection.cjs +309 -0
  133. package/dist/render/util/column_collection.cjs.map +1 -0
  134. package/dist/render/util/column_collection.d.ts +0 -1
  135. package/dist/render/util/column_collection.js +307 -0
  136. package/dist/render/util/column_collection.js.map +1 -0
  137. package/dist/render/util/index.d.ts +0 -1
  138. package/dist/render/util/label.cjs +153 -0
  139. package/dist/render/util/label.cjs.map +1 -0
  140. package/dist/render/util/label.d.ts +0 -1
  141. package/dist/render/util/label.js +149 -0
  142. package/dist/render/util/label.js.map +1 -0
  143. package/dist/render/util/pcolumn_data.cjs +342 -0
  144. package/dist/render/util/pcolumn_data.cjs.map +1 -0
  145. package/dist/render/util/pcolumn_data.d.ts +0 -1
  146. package/dist/render/util/pcolumn_data.js +330 -0
  147. package/dist/render/util/pcolumn_data.js.map +1 -0
  148. package/dist/render/util/pframe_upgraders.cjs +47 -0
  149. package/dist/render/util/pframe_upgraders.cjs.map +1 -0
  150. package/dist/render/util/pframe_upgraders.d.ts +0 -1
  151. package/dist/render/util/pframe_upgraders.js +45 -0
  152. package/dist/render/util/pframe_upgraders.js.map +1 -0
  153. package/dist/render/util/split_selectors.d.ts +0 -1
  154. package/dist/sdk_info.cjs +10 -0
  155. package/dist/sdk_info.cjs.map +1 -0
  156. package/dist/sdk_info.d.ts +0 -1
  157. package/dist/sdk_info.js +8 -0
  158. package/dist/sdk_info.js.map +1 -0
  159. package/dist/unionize.d.ts +0 -1
  160. package/dist/version.cjs +8 -0
  161. package/dist/version.cjs.map +1 -0
  162. package/dist/version.d.ts +0 -1
  163. package/dist/version.js +6 -0
  164. package/dist/version.js.map +1 -0
  165. package/package.json +16 -18
  166. package/src/components/PFrameForGraphs.test.ts +2 -2
  167. package/src/components/PlAnnotations/filters_ui.test.ts +1 -1
  168. package/src/render/util/label.test.ts +2 -2
  169. package/src/typing.test.ts +2 -1
  170. package/dist/bconfig/index.d.ts.map +0 -1
  171. package/dist/bconfig/lambdas.d.ts.map +0 -1
  172. package/dist/bconfig/normalization.d.ts.map +0 -1
  173. package/dist/bconfig/types.d.ts.map +0 -1
  174. package/dist/bconfig/util.d.ts.map +0 -1
  175. package/dist/bconfig/v3.d.ts.map +0 -1
  176. package/dist/block_api_v1.d.ts.map +0 -1
  177. package/dist/block_api_v2.d.ts.map +0 -1
  178. package/dist/block_state_patch.d.ts.map +0 -1
  179. package/dist/block_state_util.d.ts.map +0 -1
  180. package/dist/branding.d.ts.map +0 -1
  181. package/dist/builder.d.ts.map +0 -1
  182. package/dist/components/PFrameForGraphs.d.ts.map +0 -1
  183. package/dist/components/PlAnnotations/filter.d.ts.map +0 -1
  184. package/dist/components/PlAnnotations/filters_ui.d.ts.map +0 -1
  185. package/dist/components/PlAnnotations/index.d.ts.map +0 -1
  186. package/dist/components/PlAnnotations/types.d.ts.map +0 -1
  187. package/dist/components/PlDataTable.d.ts.map +0 -1
  188. package/dist/components/PlMultiSequenceAlignment.d.ts.map +0 -1
  189. package/dist/components/PlSelectionModel.d.ts.map +0 -1
  190. package/dist/components/index.d.ts.map +0 -1
  191. package/dist/config/actions.d.ts.map +0 -1
  192. package/dist/config/actions_kinds.d.ts.map +0 -1
  193. package/dist/config/index.d.ts.map +0 -1
  194. package/dist/config/model.d.ts.map +0 -1
  195. package/dist/config/model_meta.d.ts.map +0 -1
  196. package/dist/config/type_engine.d.ts.map +0 -1
  197. package/dist/config/type_util.d.ts.map +0 -1
  198. package/dist/env_value.d.ts.map +0 -1
  199. package/dist/index.d.ts.map +0 -1
  200. package/dist/index.mjs +0 -2845
  201. package/dist/index.mjs.map +0 -1
  202. package/dist/internal.d.ts.map +0 -1
  203. package/dist/pframe.d.ts.map +0 -1
  204. package/dist/platforma.d.ts.map +0 -1
  205. package/dist/raw_globals.d.ts.map +0 -1
  206. package/dist/ref_util.d.ts.map +0 -1
  207. package/dist/render/accessor.d.ts.map +0 -1
  208. package/dist/render/api.d.ts.map +0 -1
  209. package/dist/render/future.d.ts.map +0 -1
  210. package/dist/render/index.d.ts.map +0 -1
  211. package/dist/render/internal.d.ts.map +0 -1
  212. package/dist/render/traversal_ops.d.ts.map +0 -1
  213. package/dist/render/util/axis_filtering.d.ts.map +0 -1
  214. package/dist/render/util/column_collection.d.ts.map +0 -1
  215. package/dist/render/util/index.d.ts.map +0 -1
  216. package/dist/render/util/label.d.ts.map +0 -1
  217. package/dist/render/util/pcolumn_data.d.ts.map +0 -1
  218. package/dist/render/util/pframe_upgraders.d.ts.map +0 -1
  219. package/dist/render/util/split_selectors.d.ts.map +0 -1
  220. package/dist/sdk_info.d.ts.map +0 -1
  221. package/dist/unionize.d.ts.map +0 -1
  222. package/dist/version.d.ts.map +0 -1
@@ -0,0 +1,266 @@
1
+ 'use strict';
2
+
3
+ //
4
+ // Helpers
5
+ //
6
+ function primitiveToConfig(value) {
7
+ if (typeof value === 'string'
8
+ || typeof value === 'number'
9
+ || typeof value === 'boolean'
10
+ || value === null)
11
+ return getImmediate(value);
12
+ else
13
+ return value;
14
+ }
15
+ //
16
+ // Context
17
+ //
18
+ function getFromCfg(variable) {
19
+ return { type: 'GetFromCtx', variable };
20
+ }
21
+ //
22
+ // Isolate
23
+ //
24
+ function isolate(cfg) {
25
+ return {
26
+ type: 'Isolate',
27
+ cfg,
28
+ };
29
+ }
30
+ //
31
+ // Well-known Context Vars
32
+ //
33
+ const Args = getFromCfg('$args');
34
+ const It = getFromCfg('$it');
35
+ const MainOutputs = getFromCfg('$prod');
36
+ const StagingOutputs = getFromCfg('$staging');
37
+ const UiState = getFromCfg('$ui');
38
+ //
39
+ // Json
40
+ //
41
+ function getImmediate(value) {
42
+ return { type: 'Immediate', value };
43
+ }
44
+ function makeObject(template) {
45
+ const normalizedTemplate = {};
46
+ for (const [k, cfg] of Object.entries(template))
47
+ normalizedTemplate[k] = primitiveToConfig(cfg);
48
+ return {
49
+ type: 'MakeObject',
50
+ template: normalizedTemplate,
51
+ };
52
+ }
53
+ function makeArray(...template) {
54
+ const normalizedTemplate = [];
55
+ for (const cfg of template)
56
+ normalizedTemplate.push(primitiveToConfig(cfg));
57
+ return {
58
+ type: 'MakeArray',
59
+ template: normalizedTemplate,
60
+ };
61
+ }
62
+ function getJsonField(source, field) {
63
+ return {
64
+ type: 'GetJsonField',
65
+ source: primitiveToConfig(source),
66
+ field: primitiveToConfig(field),
67
+ };
68
+ }
69
+ function mapRecordValues(source, mapping, itVar = '$it') {
70
+ return {
71
+ type: 'MapRecordValues',
72
+ source,
73
+ mapping,
74
+ itVar,
75
+ };
76
+ }
77
+ function mapArrayValues(source, mapping, itVar = '$it') {
78
+ return {
79
+ type: 'MapArrayValues',
80
+ source,
81
+ mapping,
82
+ itVar,
83
+ };
84
+ }
85
+ function flatten(source) {
86
+ return {
87
+ type: 'Flatten',
88
+ source,
89
+ };
90
+ }
91
+ //
92
+ // Boolean
93
+ //
94
+ function isEmpty(arg) {
95
+ return {
96
+ type: 'IsEmpty',
97
+ arg,
98
+ };
99
+ }
100
+ function not(operand) {
101
+ return {
102
+ type: 'Not',
103
+ operand,
104
+ };
105
+ }
106
+ function and(operand1, operand2) {
107
+ return {
108
+ type: 'And',
109
+ operand1,
110
+ operand2,
111
+ };
112
+ }
113
+ function or(operand1, operand2) {
114
+ return {
115
+ type: 'Or',
116
+ operand1,
117
+ operand2,
118
+ };
119
+ }
120
+ //
121
+ // Resources
122
+ //
123
+ function getResourceField(source, field) {
124
+ return {
125
+ type: 'GetResourceField',
126
+ source: primitiveToConfig(source),
127
+ field: primitiveToConfig(field),
128
+ };
129
+ }
130
+ function getResourceValueAsJson() {
131
+ return function (source) {
132
+ return {
133
+ type: 'GetResourceValueAsJson',
134
+ source: primitiveToConfig(source),
135
+ };
136
+ };
137
+ }
138
+ function mapResourceFields(source, mapping, itVar = '$it') {
139
+ return {
140
+ type: 'MapResourceFields',
141
+ source,
142
+ mapping,
143
+ itVar,
144
+ };
145
+ }
146
+ //
147
+ // Download Blobs
148
+ //
149
+ function getBlobContent(source, range) {
150
+ return {
151
+ type: 'GetBlobContent',
152
+ range,
153
+ source: primitiveToConfig(source),
154
+ };
155
+ }
156
+ function getBlobContentAsString(source, range) {
157
+ return {
158
+ type: 'GetBlobContentAsString',
159
+ range,
160
+ source: primitiveToConfig(source),
161
+ };
162
+ }
163
+ function getBlobContentAsJson() {
164
+ return function (source, range) {
165
+ return {
166
+ type: 'GetBlobContentAsJson',
167
+ range,
168
+ source: primitiveToConfig(source),
169
+ };
170
+ };
171
+ }
172
+ function getDownloadedBlobContent(source) {
173
+ return {
174
+ type: 'GetDownloadedBlobContent',
175
+ source: primitiveToConfig(source),
176
+ };
177
+ }
178
+ function getOnDemandBlobContent(source) {
179
+ return {
180
+ type: 'GetOnDemandBlobContent',
181
+ source: primitiveToConfig(source),
182
+ };
183
+ }
184
+ //
185
+ // Download Blobs to URLs
186
+ //
187
+ function extractArchiveAndGetURL(source, format) {
188
+ return {
189
+ type: 'ExtractArchiveAndGetURL',
190
+ format,
191
+ source: primitiveToConfig(source),
192
+ };
193
+ }
194
+ //
195
+ // Upload Blobs
196
+ //
197
+ function getImportProgress(source) {
198
+ return {
199
+ type: 'GetImportProgress',
200
+ source: primitiveToConfig(source),
201
+ };
202
+ }
203
+ //
204
+ // Logs
205
+ //
206
+ function getLastLogs(source, lines) {
207
+ return {
208
+ type: 'GetLastLogs',
209
+ source: primitiveToConfig(source),
210
+ lines,
211
+ };
212
+ }
213
+ function getProgressLog(source, patternToSearch) {
214
+ return {
215
+ type: 'GetProgressLog',
216
+ source: primitiveToConfig(source),
217
+ patternToSearch,
218
+ };
219
+ }
220
+ function getProgressLogWithInfo(source, patternToSearch) {
221
+ return {
222
+ type: 'GetProgressLogWithInfo',
223
+ source: primitiveToConfig(source),
224
+ patternToSearch,
225
+ };
226
+ }
227
+ function getLogHandle(source) {
228
+ return {
229
+ type: 'GetLogHandle',
230
+ source: primitiveToConfig(source),
231
+ };
232
+ }
233
+
234
+ exports.Args = Args;
235
+ exports.It = It;
236
+ exports.MainOutputs = MainOutputs;
237
+ exports.StagingOutputs = StagingOutputs;
238
+ exports.UiState = UiState;
239
+ exports.and = and;
240
+ exports.extractArchiveAndGetURL = extractArchiveAndGetURL;
241
+ exports.flatten = flatten;
242
+ exports.getBlobContent = getBlobContent;
243
+ exports.getBlobContentAsJson = getBlobContentAsJson;
244
+ exports.getBlobContentAsString = getBlobContentAsString;
245
+ exports.getDownloadedBlobContent = getDownloadedBlobContent;
246
+ exports.getFromCfg = getFromCfg;
247
+ exports.getImmediate = getImmediate;
248
+ exports.getImportProgress = getImportProgress;
249
+ exports.getJsonField = getJsonField;
250
+ exports.getLastLogs = getLastLogs;
251
+ exports.getLogHandle = getLogHandle;
252
+ exports.getOnDemandBlobContent = getOnDemandBlobContent;
253
+ exports.getProgressLog = getProgressLog;
254
+ exports.getProgressLogWithInfo = getProgressLogWithInfo;
255
+ exports.getResourceField = getResourceField;
256
+ exports.getResourceValueAsJson = getResourceValueAsJson;
257
+ exports.isEmpty = isEmpty;
258
+ exports.isolate = isolate;
259
+ exports.makeArray = makeArray;
260
+ exports.makeObject = makeObject;
261
+ exports.mapArrayValues = mapArrayValues;
262
+ exports.mapRecordValues = mapRecordValues;
263
+ exports.mapResourceFields = mapResourceFields;
264
+ exports.not = not;
265
+ exports.or = or;
266
+ //# sourceMappingURL=actions.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.cjs","sources":["../../src/config/actions.ts"],"sourcesContent":["import type {\n ActGetField,\n ActGetFromCtx,\n ActGetImmediate,\n ActGetResourceField,\n ActGetResourceValueAsJson,\n ActMakeObject,\n ActMapRecordValues,\n ActMapResourceFields,\n ActMapArrayValues,\n ActIsEmpty,\n ActNot,\n ActIsolate,\n ActGetBlobContentAsJson,\n ActGetBlobContentAsString,\n ActGetBlobContent,\n ActAnd,\n ActOr,\n ActMakeArray,\n ActFlatten,\n ActGetDownloadedBlobContent,\n ActGetOnDemandBlobContent,\n ActImportProgress,\n ActGetLastLogs,\n ActGetProgressLog,\n ActGetProgressLogWithInfo,\n ActGetLogHandle,\n ActExtractArchiveAndGetURL,\n} from './actions_kinds';\nimport type { ExtractAction, POCExtractAction, PrimitiveOrConfig, TypedConfig } from './type_engine';\nimport type { Cfg } from './model';\nimport type { CheckedSyncConf } from './type_util';\nimport type { ArchiveFormat, RangeBytes } from '@milaboratories/pl-model-common';\n\n//\n// Helpers\n//\n\nfunction primitiveToConfig(value: PrimitiveOrConfig): TypedConfig {\n if (\n typeof value === 'string'\n || typeof value === 'number'\n || typeof value === 'boolean'\n || value === null\n )\n return getImmediate(value);\n else return value as TypedConfig;\n}\n\n//\n// Context\n//\n\nexport function getFromCfg<const V extends string>(variable: V): TypedConfig<ActGetFromCtx<V>> {\n return { type: 'GetFromCtx', variable } as Cfg as any;\n}\n\n//\n// Isolate\n//\n\nexport function isolate<const Config extends TypedConfig>(\n cfg: Config,\n): TypedConfig<ActIsolate<ExtractAction<Config>>> {\n return {\n type: 'Isolate',\n cfg,\n } as Cfg as any;\n}\n\n//\n// Well-known Context Vars\n//\n\nexport const Args = getFromCfg('$args');\nexport const It = getFromCfg('$it');\nexport const MainOutputs = getFromCfg('$prod');\nexport const StagingOutputs = getFromCfg('$staging');\nexport const UiState = getFromCfg('$ui');\n\n//\n// Json\n//\n\nexport function getImmediate<const T>(value: T): TypedConfig<ActGetImmediate<T>> {\n return { type: 'Immediate', value } as Cfg as any;\n}\n\nexport function makeObject<const T extends Record<string, PrimitiveOrConfig>>(\n template: T,\n): TypedConfig<ActMakeObject<{ [Key in keyof T]: POCExtractAction<T[Key]> }>> {\n const normalizedTemplate: Record<string, TypedConfig> = {};\n for (const [k, cfg] of Object.entries(template)) normalizedTemplate[k] = primitiveToConfig(cfg);\n return {\n type: 'MakeObject',\n template: normalizedTemplate,\n } as Cfg as any;\n}\n\nexport function makeArray<const T extends PrimitiveOrConfig[]>(\n ...template: T\n): TypedConfig<ActMakeArray<{ [Key in keyof T]: POCExtractAction<T[Key]> }>> {\n const normalizedTemplate: TypedConfig[] = [];\n for (const cfg of template) normalizedTemplate.push(primitiveToConfig(cfg));\n return {\n type: 'MakeArray',\n template: normalizedTemplate,\n } as Cfg as any;\n}\n\nexport function getJsonField<\n const Source extends PrimitiveOrConfig,\n const Field extends PrimitiveOrConfig,\n>(\n source: Source,\n field: Field,\n): TypedConfig<ActGetField<POCExtractAction<Source>, POCExtractAction<Field>>> {\n return {\n type: 'GetJsonField',\n source: primitiveToConfig(source),\n field: primitiveToConfig(field),\n } as Cfg as any;\n}\n\nexport function mapRecordValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n>(\n source: Source & CheckedSyncConf<Source>,\n mapping: Mapping\n): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, '$it'>>;\nexport function mapRecordValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n>(\n source: Source,\n mapping: Mapping & CheckedSyncConf<Mapping>\n): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, '$it'>>;\nexport function mapRecordValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source & CheckedSyncConf<Source>,\n mapping: Mapping,\n itVar: ItVar\n): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;\nexport function mapRecordValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping & CheckedSyncConf<Mapping>,\n itVar: ItVar\n): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;\nexport function mapRecordValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping,\n itVar: ItVar = '$it' as ItVar,\n): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>> {\n return {\n type: 'MapRecordValues',\n source,\n mapping,\n itVar,\n } as Cfg as any;\n}\n\nexport function mapArrayValues<const Source extends TypedConfig, const Mapping extends TypedConfig>(\n source: Source & CheckedSyncConf<Source>,\n mapping: Mapping\n): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, '$it'>>;\nexport function mapArrayValues<const Source extends TypedConfig, const Mapping extends TypedConfig>(\n source: Source,\n mapping: Mapping & CheckedSyncConf<Mapping>\n): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, '$it'>>;\nexport function mapArrayValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source & CheckedSyncConf<Source>,\n mapping: Mapping,\n itVar: ItVar\n): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;\nexport function mapArrayValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping & CheckedSyncConf<Mapping>,\n itVar: ItVar\n): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;\nexport function mapArrayValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping,\n itVar: ItVar = '$it' as ItVar,\n): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>> {\n return {\n type: 'MapArrayValues',\n source,\n mapping,\n itVar,\n } as Cfg as any;\n}\n\nexport function flatten<const Source extends TypedConfig>(\n source: Source,\n): TypedConfig<ActFlatten<ExtractAction<Source>>> {\n return {\n type: 'Flatten',\n source,\n } as Cfg as any;\n}\n\n//\n// Boolean\n//\n\nexport function isEmpty<const Arg extends TypedConfig>(\n arg: Arg,\n): TypedConfig<ActIsEmpty<ExtractAction<Arg>>> {\n return {\n type: 'IsEmpty',\n arg,\n } as Cfg as any;\n}\n\nexport function not<const Operand extends TypedConfig>(\n operand: Operand,\n): TypedConfig<ActNot<ExtractAction<Operand>>> {\n return {\n type: 'Not',\n operand,\n } as Cfg as any;\n}\n\nexport function and<const Operand1 extends TypedConfig, const Operand2 extends TypedConfig>(\n operand1: Operand1,\n operand2: Operand2,\n): TypedConfig<ActAnd<ExtractAction<Operand1>, ExtractAction<Operand2>>> {\n return {\n type: 'And',\n operand1,\n operand2,\n } as Cfg as any;\n}\n\nexport function or<const Operand1 extends TypedConfig, const Operand2 extends TypedConfig>(\n operand1: Operand1,\n operand2: Operand2,\n): TypedConfig<ActOr<ExtractAction<Operand1>, ExtractAction<Operand2>>> {\n return {\n type: 'Or',\n operand1,\n operand2,\n } as Cfg as any;\n}\n\n//\n// Resources\n//\n\nexport function getResourceField<\n const Source extends PrimitiveOrConfig,\n const Field extends PrimitiveOrConfig,\n>(\n source: Source,\n field: Field,\n): TypedConfig<ActGetResourceField<POCExtractAction<Source>, POCExtractAction<Field>>> {\n return {\n type: 'GetResourceField',\n source: primitiveToConfig(source),\n field: primitiveToConfig(field),\n } as Cfg as any;\n}\n\nexport function getResourceValueAsJson<T>() {\n return function <const Source extends PrimitiveOrConfig>(\n source: Source,\n ): TypedConfig<ActGetResourceValueAsJson<POCExtractAction<Source>, T>> {\n return {\n type: 'GetResourceValueAsJson',\n source: primitiveToConfig(source),\n } as Cfg as any;\n };\n}\n\nexport function mapResourceFields<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n>(\n source: Source,\n mapping: Mapping\n): TypedConfig<ActMapResourceFields<ExtractAction<Source>, ExtractAction<Mapping>, '$it'>>;\nexport function mapResourceFields<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping,\n itVar: ItVar\n): TypedConfig<ActMapResourceFields<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;\nexport function mapResourceFields<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping,\n itVar: ItVar = '$it' as ItVar,\n): TypedConfig<ActMapResourceFields<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>> {\n return {\n type: 'MapResourceFields',\n source,\n mapping,\n itVar,\n } as Cfg as TypedConfig<\n ActMapResourceFields<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>\n >;\n}\n\n//\n// Download Blobs\n//\n\nexport function getBlobContent<const Source extends TypedConfig>(\n source: Source,\n range?: RangeBytes,\n): TypedConfig<ActGetBlobContent<ExtractAction<Source>>> {\n return {\n type: 'GetBlobContent',\n range,\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\nexport function getBlobContentAsString<const Source extends TypedConfig>(\n source: Source,\n range?: RangeBytes,\n): TypedConfig<ActGetBlobContentAsString<ExtractAction<Source>>> {\n return {\n type: 'GetBlobContentAsString',\n range,\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\nexport function getBlobContentAsJson<T>() {\n return function <const Source extends TypedConfig>(\n source: Source,\n range?: RangeBytes,\n ): TypedConfig<ActGetBlobContentAsJson<ExtractAction<Source>, T>> {\n return {\n type: 'GetBlobContentAsJson',\n range,\n source: primitiveToConfig(source),\n } as Cfg as any;\n };\n}\n\nexport function getDownloadedBlobContent<const Source extends TypedConfig>(\n source: Source,\n): TypedConfig<ActGetDownloadedBlobContent<ExtractAction<Source>>> {\n return {\n type: 'GetDownloadedBlobContent',\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\nexport function getOnDemandBlobContent<const Source extends TypedConfig>(\n source: Source,\n): TypedConfig<ActGetOnDemandBlobContent<ExtractAction<Source>>> {\n return {\n type: 'GetOnDemandBlobContent',\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\n//\n// Download Blobs to URLs\n//\n\nexport function extractArchiveAndGetURL<const Source extends TypedConfig>(\n source: Source,\n format: ArchiveFormat,\n): TypedConfig<ActExtractArchiveAndGetURL<ExtractAction<Source>>> {\n return {\n type: 'ExtractArchiveAndGetURL',\n format,\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\n//\n// Upload Blobs\n//\n\nexport function getImportProgress<const Source extends TypedConfig>(\n source: Source,\n): TypedConfig<ActImportProgress<ExtractAction<Source>>> {\n return {\n type: 'GetImportProgress',\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\n//\n// Logs\n//\n\nexport function getLastLogs<const Source extends TypedConfig>(\n source: Source,\n lines: number,\n): TypedConfig<ActGetLastLogs<ExtractAction<Source>>> {\n return {\n type: 'GetLastLogs',\n source: primitiveToConfig(source),\n lines,\n } as Cfg as any;\n}\n\nexport function getProgressLog<const Source extends TypedConfig>(\n source: Source,\n patternToSearch: string,\n): TypedConfig<ActGetProgressLog<ExtractAction<Source>>> {\n return {\n type: 'GetProgressLog',\n source: primitiveToConfig(source),\n patternToSearch,\n } as Cfg as any;\n}\n\nexport function getProgressLogWithInfo<const Source extends TypedConfig>(\n source: Source,\n patternToSearch: string,\n): TypedConfig<ActGetProgressLogWithInfo<ExtractAction<Source>>> {\n return {\n type: 'GetProgressLogWithInfo',\n source: primitiveToConfig(source),\n patternToSearch,\n } as Cfg as any;\n}\n\nexport function getLogHandle<const Source extends TypedConfig>(\n source: Source,\n): TypedConfig<ActGetLogHandle<ExtractAction<Source>>> {\n return {\n type: 'GetLogHandle',\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n"],"names":[],"mappings":";;AAkCA;AACA;AACA;AAEA,SAAS,iBAAiB,CAAC,KAAwB,EAAA;IACjD,IACE,OAAO,KAAK,KAAK;WACd,OAAO,KAAK,KAAK;WACjB,OAAO,KAAK,KAAK;AACjB,WAAA,KAAK,KAAK,IAAI;AAEjB,QAAA,OAAO,YAAY,CAAC,KAAK,CAAC;;AACvB,QAAA,OAAO,KAAoB;AAClC;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;IAErB,OAAO;AACL,QAAA,IAAI,EAAE,yBAAyB;QAC/B,MAAM;AACN,QAAA,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC;KACpB;AACjB;AAEA;AACA;AACA;AAEM,SAAU,iBAAiB,CAC/B,MAAc,EAAA;IAEd,OAAO;AACL,QAAA,IAAI,EAAE,mBAAmB;AACzB,QAAA,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC;KACpB;AACjB;AAEA;AACA;AACA;AAEM,SAAU,WAAW,CACzB,MAAc,EACd,KAAa,EAAA;IAEb,OAAO;AACL,QAAA,IAAI,EAAE,aAAa;AACnB,QAAA,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC;QACjC,KAAK;KACQ;AACjB;AAEM,SAAU,cAAc,CAC5B,MAAc,EACd,eAAuB,EAAA;IAEvB,OAAO;AACL,QAAA,IAAI,EAAE,gBAAgB;AACtB,QAAA,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC;QACjC,eAAe;KACF;AACjB;AAEM,SAAU,sBAAsB,CACpC,MAAc,EACd,eAAuB,EAAA;IAEvB,OAAO;AACL,QAAA,IAAI,EAAE,wBAAwB;AAC9B,QAAA,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC;QACjC,eAAe;KACF;AACjB;AAEM,SAAU,YAAY,CAC1B,MAAc,EAAA;IAEd,OAAO;AACL,QAAA,IAAI,EAAE,cAAc;AACpB,QAAA,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC;KACpB;AACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -45,4 +45,3 @@ export declare function getLastLogs<const Source extends TypedConfig>(source: So
45
45
  export declare function getProgressLog<const Source extends TypedConfig>(source: Source, patternToSearch: string): TypedConfig<ActGetProgressLog<ExtractAction<Source>>>;
46
46
  export declare function getProgressLogWithInfo<const Source extends TypedConfig>(source: Source, patternToSearch: string): TypedConfig<ActGetProgressLogWithInfo<ExtractAction<Source>>>;
47
47
  export declare function getLogHandle<const Source extends TypedConfig>(source: Source): TypedConfig<ActGetLogHandle<ExtractAction<Source>>>;
48
- //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1,233 @@
1
+ //
2
+ // Helpers
3
+ //
4
+ function primitiveToConfig(value) {
5
+ if (typeof value === 'string'
6
+ || typeof value === 'number'
7
+ || typeof value === 'boolean'
8
+ || value === null)
9
+ return getImmediate(value);
10
+ else
11
+ return value;
12
+ }
13
+ //
14
+ // Context
15
+ //
16
+ function getFromCfg(variable) {
17
+ return { type: 'GetFromCtx', variable };
18
+ }
19
+ //
20
+ // Isolate
21
+ //
22
+ function isolate(cfg) {
23
+ return {
24
+ type: 'Isolate',
25
+ cfg,
26
+ };
27
+ }
28
+ //
29
+ // Well-known Context Vars
30
+ //
31
+ const Args = getFromCfg('$args');
32
+ const It = getFromCfg('$it');
33
+ const MainOutputs = getFromCfg('$prod');
34
+ const StagingOutputs = getFromCfg('$staging');
35
+ const UiState = getFromCfg('$ui');
36
+ //
37
+ // Json
38
+ //
39
+ function getImmediate(value) {
40
+ return { type: 'Immediate', value };
41
+ }
42
+ function makeObject(template) {
43
+ const normalizedTemplate = {};
44
+ for (const [k, cfg] of Object.entries(template))
45
+ normalizedTemplate[k] = primitiveToConfig(cfg);
46
+ return {
47
+ type: 'MakeObject',
48
+ template: normalizedTemplate,
49
+ };
50
+ }
51
+ function makeArray(...template) {
52
+ const normalizedTemplate = [];
53
+ for (const cfg of template)
54
+ normalizedTemplate.push(primitiveToConfig(cfg));
55
+ return {
56
+ type: 'MakeArray',
57
+ template: normalizedTemplate,
58
+ };
59
+ }
60
+ function getJsonField(source, field) {
61
+ return {
62
+ type: 'GetJsonField',
63
+ source: primitiveToConfig(source),
64
+ field: primitiveToConfig(field),
65
+ };
66
+ }
67
+ function mapRecordValues(source, mapping, itVar = '$it') {
68
+ return {
69
+ type: 'MapRecordValues',
70
+ source,
71
+ mapping,
72
+ itVar,
73
+ };
74
+ }
75
+ function mapArrayValues(source, mapping, itVar = '$it') {
76
+ return {
77
+ type: 'MapArrayValues',
78
+ source,
79
+ mapping,
80
+ itVar,
81
+ };
82
+ }
83
+ function flatten(source) {
84
+ return {
85
+ type: 'Flatten',
86
+ source,
87
+ };
88
+ }
89
+ //
90
+ // Boolean
91
+ //
92
+ function isEmpty(arg) {
93
+ return {
94
+ type: 'IsEmpty',
95
+ arg,
96
+ };
97
+ }
98
+ function not(operand) {
99
+ return {
100
+ type: 'Not',
101
+ operand,
102
+ };
103
+ }
104
+ function and(operand1, operand2) {
105
+ return {
106
+ type: 'And',
107
+ operand1,
108
+ operand2,
109
+ };
110
+ }
111
+ function or(operand1, operand2) {
112
+ return {
113
+ type: 'Or',
114
+ operand1,
115
+ operand2,
116
+ };
117
+ }
118
+ //
119
+ // Resources
120
+ //
121
+ function getResourceField(source, field) {
122
+ return {
123
+ type: 'GetResourceField',
124
+ source: primitiveToConfig(source),
125
+ field: primitiveToConfig(field),
126
+ };
127
+ }
128
+ function getResourceValueAsJson() {
129
+ return function (source) {
130
+ return {
131
+ type: 'GetResourceValueAsJson',
132
+ source: primitiveToConfig(source),
133
+ };
134
+ };
135
+ }
136
+ function mapResourceFields(source, mapping, itVar = '$it') {
137
+ return {
138
+ type: 'MapResourceFields',
139
+ source,
140
+ mapping,
141
+ itVar,
142
+ };
143
+ }
144
+ //
145
+ // Download Blobs
146
+ //
147
+ function getBlobContent(source, range) {
148
+ return {
149
+ type: 'GetBlobContent',
150
+ range,
151
+ source: primitiveToConfig(source),
152
+ };
153
+ }
154
+ function getBlobContentAsString(source, range) {
155
+ return {
156
+ type: 'GetBlobContentAsString',
157
+ range,
158
+ source: primitiveToConfig(source),
159
+ };
160
+ }
161
+ function getBlobContentAsJson() {
162
+ return function (source, range) {
163
+ return {
164
+ type: 'GetBlobContentAsJson',
165
+ range,
166
+ source: primitiveToConfig(source),
167
+ };
168
+ };
169
+ }
170
+ function getDownloadedBlobContent(source) {
171
+ return {
172
+ type: 'GetDownloadedBlobContent',
173
+ source: primitiveToConfig(source),
174
+ };
175
+ }
176
+ function getOnDemandBlobContent(source) {
177
+ return {
178
+ type: 'GetOnDemandBlobContent',
179
+ source: primitiveToConfig(source),
180
+ };
181
+ }
182
+ //
183
+ // Download Blobs to URLs
184
+ //
185
+ function extractArchiveAndGetURL(source, format) {
186
+ return {
187
+ type: 'ExtractArchiveAndGetURL',
188
+ format,
189
+ source: primitiveToConfig(source),
190
+ };
191
+ }
192
+ //
193
+ // Upload Blobs
194
+ //
195
+ function getImportProgress(source) {
196
+ return {
197
+ type: 'GetImportProgress',
198
+ source: primitiveToConfig(source),
199
+ };
200
+ }
201
+ //
202
+ // Logs
203
+ //
204
+ function getLastLogs(source, lines) {
205
+ return {
206
+ type: 'GetLastLogs',
207
+ source: primitiveToConfig(source),
208
+ lines,
209
+ };
210
+ }
211
+ function getProgressLog(source, patternToSearch) {
212
+ return {
213
+ type: 'GetProgressLog',
214
+ source: primitiveToConfig(source),
215
+ patternToSearch,
216
+ };
217
+ }
218
+ function getProgressLogWithInfo(source, patternToSearch) {
219
+ return {
220
+ type: 'GetProgressLogWithInfo',
221
+ source: primitiveToConfig(source),
222
+ patternToSearch,
223
+ };
224
+ }
225
+ function getLogHandle(source) {
226
+ return {
227
+ type: 'GetLogHandle',
228
+ source: primitiveToConfig(source),
229
+ };
230
+ }
231
+
232
+ export { Args, It, MainOutputs, StagingOutputs, UiState, and, extractArchiveAndGetURL, flatten, getBlobContent, getBlobContentAsJson, getBlobContentAsString, getDownloadedBlobContent, getFromCfg, getImmediate, getImportProgress, getJsonField, getLastLogs, getLogHandle, getOnDemandBlobContent, getProgressLog, getProgressLogWithInfo, getResourceField, getResourceValueAsJson, isEmpty, isolate, makeArray, makeObject, mapArrayValues, mapRecordValues, mapResourceFields, not, or };
233
+ //# sourceMappingURL=actions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.js","sources":["../../src/config/actions.ts"],"sourcesContent":["import type {\n ActGetField,\n ActGetFromCtx,\n ActGetImmediate,\n ActGetResourceField,\n ActGetResourceValueAsJson,\n ActMakeObject,\n ActMapRecordValues,\n ActMapResourceFields,\n ActMapArrayValues,\n ActIsEmpty,\n ActNot,\n ActIsolate,\n ActGetBlobContentAsJson,\n ActGetBlobContentAsString,\n ActGetBlobContent,\n ActAnd,\n ActOr,\n ActMakeArray,\n ActFlatten,\n ActGetDownloadedBlobContent,\n ActGetOnDemandBlobContent,\n ActImportProgress,\n ActGetLastLogs,\n ActGetProgressLog,\n ActGetProgressLogWithInfo,\n ActGetLogHandle,\n ActExtractArchiveAndGetURL,\n} from './actions_kinds';\nimport type { ExtractAction, POCExtractAction, PrimitiveOrConfig, TypedConfig } from './type_engine';\nimport type { Cfg } from './model';\nimport type { CheckedSyncConf } from './type_util';\nimport type { ArchiveFormat, RangeBytes } from '@milaboratories/pl-model-common';\n\n//\n// Helpers\n//\n\nfunction primitiveToConfig(value: PrimitiveOrConfig): TypedConfig {\n if (\n typeof value === 'string'\n || typeof value === 'number'\n || typeof value === 'boolean'\n || value === null\n )\n return getImmediate(value);\n else return value as TypedConfig;\n}\n\n//\n// Context\n//\n\nexport function getFromCfg<const V extends string>(variable: V): TypedConfig<ActGetFromCtx<V>> {\n return { type: 'GetFromCtx', variable } as Cfg as any;\n}\n\n//\n// Isolate\n//\n\nexport function isolate<const Config extends TypedConfig>(\n cfg: Config,\n): TypedConfig<ActIsolate<ExtractAction<Config>>> {\n return {\n type: 'Isolate',\n cfg,\n } as Cfg as any;\n}\n\n//\n// Well-known Context Vars\n//\n\nexport const Args = getFromCfg('$args');\nexport const It = getFromCfg('$it');\nexport const MainOutputs = getFromCfg('$prod');\nexport const StagingOutputs = getFromCfg('$staging');\nexport const UiState = getFromCfg('$ui');\n\n//\n// Json\n//\n\nexport function getImmediate<const T>(value: T): TypedConfig<ActGetImmediate<T>> {\n return { type: 'Immediate', value } as Cfg as any;\n}\n\nexport function makeObject<const T extends Record<string, PrimitiveOrConfig>>(\n template: T,\n): TypedConfig<ActMakeObject<{ [Key in keyof T]: POCExtractAction<T[Key]> }>> {\n const normalizedTemplate: Record<string, TypedConfig> = {};\n for (const [k, cfg] of Object.entries(template)) normalizedTemplate[k] = primitiveToConfig(cfg);\n return {\n type: 'MakeObject',\n template: normalizedTemplate,\n } as Cfg as any;\n}\n\nexport function makeArray<const T extends PrimitiveOrConfig[]>(\n ...template: T\n): TypedConfig<ActMakeArray<{ [Key in keyof T]: POCExtractAction<T[Key]> }>> {\n const normalizedTemplate: TypedConfig[] = [];\n for (const cfg of template) normalizedTemplate.push(primitiveToConfig(cfg));\n return {\n type: 'MakeArray',\n template: normalizedTemplate,\n } as Cfg as any;\n}\n\nexport function getJsonField<\n const Source extends PrimitiveOrConfig,\n const Field extends PrimitiveOrConfig,\n>(\n source: Source,\n field: Field,\n): TypedConfig<ActGetField<POCExtractAction<Source>, POCExtractAction<Field>>> {\n return {\n type: 'GetJsonField',\n source: primitiveToConfig(source),\n field: primitiveToConfig(field),\n } as Cfg as any;\n}\n\nexport function mapRecordValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n>(\n source: Source & CheckedSyncConf<Source>,\n mapping: Mapping\n): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, '$it'>>;\nexport function mapRecordValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n>(\n source: Source,\n mapping: Mapping & CheckedSyncConf<Mapping>\n): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, '$it'>>;\nexport function mapRecordValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source & CheckedSyncConf<Source>,\n mapping: Mapping,\n itVar: ItVar\n): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;\nexport function mapRecordValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping & CheckedSyncConf<Mapping>,\n itVar: ItVar\n): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;\nexport function mapRecordValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping,\n itVar: ItVar = '$it' as ItVar,\n): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>> {\n return {\n type: 'MapRecordValues',\n source,\n mapping,\n itVar,\n } as Cfg as any;\n}\n\nexport function mapArrayValues<const Source extends TypedConfig, const Mapping extends TypedConfig>(\n source: Source & CheckedSyncConf<Source>,\n mapping: Mapping\n): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, '$it'>>;\nexport function mapArrayValues<const Source extends TypedConfig, const Mapping extends TypedConfig>(\n source: Source,\n mapping: Mapping & CheckedSyncConf<Mapping>\n): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, '$it'>>;\nexport function mapArrayValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source & CheckedSyncConf<Source>,\n mapping: Mapping,\n itVar: ItVar\n): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;\nexport function mapArrayValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping & CheckedSyncConf<Mapping>,\n itVar: ItVar\n): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;\nexport function mapArrayValues<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping,\n itVar: ItVar = '$it' as ItVar,\n): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>> {\n return {\n type: 'MapArrayValues',\n source,\n mapping,\n itVar,\n } as Cfg as any;\n}\n\nexport function flatten<const Source extends TypedConfig>(\n source: Source,\n): TypedConfig<ActFlatten<ExtractAction<Source>>> {\n return {\n type: 'Flatten',\n source,\n } as Cfg as any;\n}\n\n//\n// Boolean\n//\n\nexport function isEmpty<const Arg extends TypedConfig>(\n arg: Arg,\n): TypedConfig<ActIsEmpty<ExtractAction<Arg>>> {\n return {\n type: 'IsEmpty',\n arg,\n } as Cfg as any;\n}\n\nexport function not<const Operand extends TypedConfig>(\n operand: Operand,\n): TypedConfig<ActNot<ExtractAction<Operand>>> {\n return {\n type: 'Not',\n operand,\n } as Cfg as any;\n}\n\nexport function and<const Operand1 extends TypedConfig, const Operand2 extends TypedConfig>(\n operand1: Operand1,\n operand2: Operand2,\n): TypedConfig<ActAnd<ExtractAction<Operand1>, ExtractAction<Operand2>>> {\n return {\n type: 'And',\n operand1,\n operand2,\n } as Cfg as any;\n}\n\nexport function or<const Operand1 extends TypedConfig, const Operand2 extends TypedConfig>(\n operand1: Operand1,\n operand2: Operand2,\n): TypedConfig<ActOr<ExtractAction<Operand1>, ExtractAction<Operand2>>> {\n return {\n type: 'Or',\n operand1,\n operand2,\n } as Cfg as any;\n}\n\n//\n// Resources\n//\n\nexport function getResourceField<\n const Source extends PrimitiveOrConfig,\n const Field extends PrimitiveOrConfig,\n>(\n source: Source,\n field: Field,\n): TypedConfig<ActGetResourceField<POCExtractAction<Source>, POCExtractAction<Field>>> {\n return {\n type: 'GetResourceField',\n source: primitiveToConfig(source),\n field: primitiveToConfig(field),\n } as Cfg as any;\n}\n\nexport function getResourceValueAsJson<T>() {\n return function <const Source extends PrimitiveOrConfig>(\n source: Source,\n ): TypedConfig<ActGetResourceValueAsJson<POCExtractAction<Source>, T>> {\n return {\n type: 'GetResourceValueAsJson',\n source: primitiveToConfig(source),\n } as Cfg as any;\n };\n}\n\nexport function mapResourceFields<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n>(\n source: Source,\n mapping: Mapping\n): TypedConfig<ActMapResourceFields<ExtractAction<Source>, ExtractAction<Mapping>, '$it'>>;\nexport function mapResourceFields<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping,\n itVar: ItVar\n): TypedConfig<ActMapResourceFields<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;\nexport function mapResourceFields<\n const Source extends TypedConfig,\n const Mapping extends TypedConfig,\n const ItVar extends string,\n>(\n source: Source,\n mapping: Mapping,\n itVar: ItVar = '$it' as ItVar,\n): TypedConfig<ActMapResourceFields<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>> {\n return {\n type: 'MapResourceFields',\n source,\n mapping,\n itVar,\n } as Cfg as TypedConfig<\n ActMapResourceFields<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>\n >;\n}\n\n//\n// Download Blobs\n//\n\nexport function getBlobContent<const Source extends TypedConfig>(\n source: Source,\n range?: RangeBytes,\n): TypedConfig<ActGetBlobContent<ExtractAction<Source>>> {\n return {\n type: 'GetBlobContent',\n range,\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\nexport function getBlobContentAsString<const Source extends TypedConfig>(\n source: Source,\n range?: RangeBytes,\n): TypedConfig<ActGetBlobContentAsString<ExtractAction<Source>>> {\n return {\n type: 'GetBlobContentAsString',\n range,\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\nexport function getBlobContentAsJson<T>() {\n return function <const Source extends TypedConfig>(\n source: Source,\n range?: RangeBytes,\n ): TypedConfig<ActGetBlobContentAsJson<ExtractAction<Source>, T>> {\n return {\n type: 'GetBlobContentAsJson',\n range,\n source: primitiveToConfig(source),\n } as Cfg as any;\n };\n}\n\nexport function getDownloadedBlobContent<const Source extends TypedConfig>(\n source: Source,\n): TypedConfig<ActGetDownloadedBlobContent<ExtractAction<Source>>> {\n return {\n type: 'GetDownloadedBlobContent',\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\nexport function getOnDemandBlobContent<const Source extends TypedConfig>(\n source: Source,\n): TypedConfig<ActGetOnDemandBlobContent<ExtractAction<Source>>> {\n return {\n type: 'GetOnDemandBlobContent',\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\n//\n// Download Blobs to URLs\n//\n\nexport function extractArchiveAndGetURL<const Source extends TypedConfig>(\n source: Source,\n format: ArchiveFormat,\n): TypedConfig<ActExtractArchiveAndGetURL<ExtractAction<Source>>> {\n return {\n type: 'ExtractArchiveAndGetURL',\n format,\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\n//\n// Upload Blobs\n//\n\nexport function getImportProgress<const Source extends TypedConfig>(\n source: Source,\n): TypedConfig<ActImportProgress<ExtractAction<Source>>> {\n return {\n type: 'GetImportProgress',\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n\n//\n// Logs\n//\n\nexport function getLastLogs<const Source extends TypedConfig>(\n source: Source,\n lines: number,\n): TypedConfig<ActGetLastLogs<ExtractAction<Source>>> {\n return {\n type: 'GetLastLogs',\n source: primitiveToConfig(source),\n lines,\n } as Cfg as any;\n}\n\nexport function getProgressLog<const Source extends TypedConfig>(\n source: Source,\n patternToSearch: string,\n): TypedConfig<ActGetProgressLog<ExtractAction<Source>>> {\n return {\n type: 'GetProgressLog',\n source: primitiveToConfig(source),\n patternToSearch,\n } as Cfg as any;\n}\n\nexport function getProgressLogWithInfo<const Source extends TypedConfig>(\n source: Source,\n patternToSearch: string,\n): TypedConfig<ActGetProgressLogWithInfo<ExtractAction<Source>>> {\n return {\n type: 'GetProgressLogWithInfo',\n source: primitiveToConfig(source),\n patternToSearch,\n } as Cfg as any;\n}\n\nexport function getLogHandle<const Source extends TypedConfig>(\n source: Source,\n): TypedConfig<ActGetLogHandle<ExtractAction<Source>>> {\n return {\n type: 'GetLogHandle',\n source: primitiveToConfig(source),\n } as Cfg as any;\n}\n"],"names":[],"mappings":"AAkCA;AACA;AACA;AAEA,SAAS,iBAAiB,CAAC,KAAwB,EAAA;IACjD,IACE,OAAO,KAAK,KAAK;WACd,OAAO,KAAK,KAAK;WACjB,OAAO,KAAK,KAAK;AACjB,WAAA,K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AC,MAAM,CAAC;KACpB;AACjB;AAEA;AACA;AACA;AAEM,SAAU,uBAAuB,CACrC,MAAc,EACd,MAAqB,EAAA;IAErB,OAAO;AACL,QAAA,IAAI,EAAE,yBAAyB;QAC/B,MAAM;AACN,QAAA,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC;KACpB;AACjB;AAEA;AACA;AACA;AAEM,SAAU,iBAAiB,CAC/B,MAAc,EAAA;IAEd,OAAO;AACL,QAAA,IAAI,EAAE,mBAAmB;AACzB,QAAA,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC;KACpB;AACjB;AAEA;AACA;AACA;AAEM,SAAU,WAAW,CACzB,MAAc,EACd,KAAa,EAAA;IAEb,OAAO;AACL,QAAA,IAAI,EAAE,aAAa;AACnB,QAAA,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC;QACjC,KAAK;KACQ;AACjB;AAEM,SAAU,cAAc,CAC5B,MAAc,EACd,eAAuB,EAAA;IAEvB,OAAO;AACL,QAAA,IAAI,EAAE,gBAAgB;AACtB,QAAA,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC;QACjC,eAAe;KACF;AACjB;AAEM,SAAU,sBAAsB,CACpC,MAAc,EACd,eAAuB,EAAA;IAEvB,OAAO;AACL,QAAA,IAAI,EAAE,wBAAwB;AAC9B,QAAA,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC;QACjC,eAAe;KACF;AACjB;AAEM,SAAU,YAAY,CAC1B,MAAc,EAAA;IAEd,OAAO;AACL,QAAA,IAAI,EAAE,cAAc;AACpB,QAAA,MAAM,EAAE,iBAAiB,CAAC,MAAM,CAAC;KACpB;AACjB;;;;"}
@@ -119,4 +119,3 @@ export interface ActGetLogHandle<Source extends ConfAction> extends ConfAction {
119
119
  new: (x: this['ctx']) => ActionResult<Source, typeof x> extends PlResourceEntry ? AnyLogHandle : unknown;
120
120
  isSync: IsA<Source, SyncConfAction>;
121
121
  }
122
- //# sourceMappingURL=actions_kinds.d.ts.map
@@ -4,4 +4,3 @@ export * from './model';
4
4
  export * from './model_meta';
5
5
  export * from './type_engine';
6
6
  export { type Checked } from './type_util';
7
- //# sourceMappingURL=index.d.ts.map
@@ -127,4 +127,3 @@ export type CfgLogHandle = {
127
127
  type: 'GetLogHandle';
128
128
  source: Cfg;
129
129
  };
130
- //# sourceMappingURL=model.d.ts.map
@@ -3,4 +3,3 @@
3
3
  * Some require creation of a separate rendering cell, like downloading
4
4
  * files. */
5
5
  export type CfgRenderingMode = 'Sync' | 'Async';
6
- //# sourceMappingURL=model_meta.d.ts.map
@@ -33,4 +33,3 @@ declare const plResourceEntry: unique symbol;
33
33
  export type PlResourceEntry = typeof plResourceEntry;
34
34
  export type OptionalPlResourceEntry = PlResourceEntry | undefined;
35
35
  export {};
36
- //# sourceMappingURL=type_engine.d.ts.map
@@ -9,4 +9,3 @@ export type Or<A extends boolean, B extends boolean> = A extends true ? true : B
9
9
  export type And<A extends boolean, B extends boolean> = A extends true ? B extends true ? true : false : false;
10
10
  export type IsA<T, E> = T extends E ? true : false;
11
11
  export type Checked<Type, Condition> = Condition extends true ? Type : 'error';
12
- //# sourceMappingURL=type_util.d.ts.map
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ function getEnvironmentValue(name) {
4
+ if (typeof globalThis.getEnvironmentValue !== 'function')
5
+ return undefined;
6
+ else
7
+ return globalThis.getEnvironmentValue(name);
8
+ }
9
+
10
+ exports.getEnvironmentValue = getEnvironmentValue;
11
+ //# sourceMappingURL=env_value.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env_value.cjs","sources":["../src/env_value.ts"],"sourcesContent":["import {} from './global';\n\nexport function getEnvironmentValue(name: string): string | undefined {\n if (typeof globalThis.getEnvironmentValue !== 'function') return undefined;\n else return globalThis.getEnvironmentValue(name);\n}\n"],"names":[],"mappings":";;AAEM,SAAU,mBAAmB,CAAC,IAAY,EAAA;AAC9C,IAAA,IAAI,OAAO,UAAU,CAAC,mBAAmB,KAAK,UAAU;AAAE,QAAA,OAAO,SAAS;;AACrE,QAAA,OAAO,UAAU,CAAC,mBAAmB,CAAC,IAAI,CAAC;AAClD;;;;"}
@@ -1,2 +1 @@
1
1
  export declare function getEnvironmentValue(name: string): string | undefined;
2
- //# sourceMappingURL=env_value.d.ts.map
@@ -0,0 +1,9 @@
1
+ function getEnvironmentValue(name) {
2
+ if (typeof globalThis.getEnvironmentValue !== 'function')
3
+ return undefined;
4
+ else
5
+ return globalThis.getEnvironmentValue(name);
6
+ }
7
+
8
+ export { getEnvironmentValue };
9
+ //# sourceMappingURL=env_value.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env_value.js","sources":["../src/env_value.ts"],"sourcesContent":["import {} from './global';\n\nexport function getEnvironmentValue(name: string): string | undefined {\n if (typeof globalThis.getEnvironmentValue !== 'function') return undefined;\n else return globalThis.getEnvironmentValue(name);\n}\n"],"names":[],"mappings":"AAEM,SAAU,mBAAmB,CAAC,IAAY,EAAA;AAC9C,IAAA,IAAI,OAAO,UAAU,CAAC,mBAAmB,KAAK,UAAU;AAAE,QAAA,OAAO,SAAS;;AACrE,QAAA,OAAO,UAAU,CAAC,mBAAmB,CAAC,IAAI,CAAC;AAClD;;;;"}
@@ -0,0 +1,14 @@
1
+ import { PlatformaApiVersion } from './platforma';
2
+ declare global {
3
+ /** Global factory method returning platforma instance */
4
+ var getPlatforma: PlatformaSDKVersion; // TODO: invalid type
5
+ var platforma: Platforma;
6
+ var platformaApiVersion: PlatformaApiVersion;
7
+
8
+ function getEnvironmentValue(name: string): string | undefined;
9
+
10
+ /** Global rendering context, present only in rendering environment */
11
+ var cfgRenderCtx: GlobalCfgRenderCtx;
12
+ }
13
+
14
+ export {};