@platforma-sdk/model 1.82.0 → 1.83.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/annotations/converter.d.ts +1 -3
- package/dist/annotations/converter.d.ts.map +1 -1
- package/dist/annotations/types.d.ts +5 -6
- package/dist/annotations/types.d.ts.map +1 -1
- package/dist/bconfig/index.d.ts +2 -2
- package/dist/bconfig/lambdas.d.ts +11 -21
- package/dist/bconfig/lambdas.d.ts.map +1 -1
- package/dist/bconfig/normalization.d.ts +3 -5
- package/dist/bconfig/normalization.d.ts.map +1 -1
- package/dist/bconfig/types.d.ts +4 -5
- package/dist/bconfig/types.d.ts.map +1 -1
- package/dist/bconfig/util.d.ts +1 -3
- package/dist/bconfig/util.d.ts.map +1 -1
- package/dist/bconfig/v3.d.ts +4 -6
- package/dist/bconfig/v3.d.ts.map +1 -1
- package/dist/block_api_v1.d.ts +2 -4
- package/dist/block_api_v1.d.ts.map +1 -1
- package/dist/block_api_v2.d.ts +1 -3
- package/dist/block_api_v2.d.ts.map +1 -1
- package/dist/block_api_v3.d.ts +1 -3
- package/dist/block_api_v3.d.ts.map +1 -1
- package/dist/block_migrations.d.ts +20 -36
- package/dist/block_migrations.d.ts.map +1 -1
- package/dist/block_model.cjs +2 -2
- package/dist/block_model.d.ts +10 -10
- package/dist/block_model.d.ts.map +1 -1
- package/dist/block_model.js +2 -2
- package/dist/block_state_patch.d.ts +6 -6
- package/dist/block_state_patch.d.ts.map +1 -1
- package/dist/block_state_util.d.ts +4 -6
- package/dist/block_state_util.d.ts.map +1 -1
- package/dist/block_storage.d.ts +24 -23
- package/dist/block_storage.d.ts.map +1 -1
- package/dist/block_storage_facade.d.ts +11 -12
- package/dist/block_storage_facade.d.ts.map +1 -1
- package/dist/columns/column.d.ts +5 -6
- package/dist/columns/column.d.ts.map +1 -1
- package/dist/columns/column_providers/index.d.ts +5 -6
- package/dist/columns/column_providers/index.d.ts.map +1 -1
- package/dist/columns/column_providers/providers.d.ts +10 -11
- package/dist/columns/column_providers/providers.d.ts.map +1 -1
- package/dist/columns/column_providers/types.d.ts +2 -3
- package/dist/columns/column_providers/types.d.ts.map +1 -1
- package/dist/columns/column_recipes/column_discovered_recipe.d.ts +1 -3
- package/dist/columns/column_recipes/column_discovered_recipe.d.ts.map +1 -1
- package/dist/columns/column_recipes/column_filtered_recipe.d.ts +1 -3
- package/dist/columns/column_recipes/column_filtered_recipe.d.ts.map +1 -1
- package/dist/columns/column_recipes/column_overrided_recipe.d.ts +2 -3
- package/dist/columns/column_recipes/column_overrided_recipe.d.ts.map +1 -1
- package/dist/columns/column_recipes/index.d.ts +3 -4
- package/dist/columns/column_recipes/index.d.ts.map +1 -1
- package/dist/columns/column_recipes/types.d.ts +5 -6
- package/dist/columns/column_recipes/types.d.ts.map +1 -1
- package/dist/columns/columns_collection.d.ts +7 -8
- package/dist/columns/columns_collection.d.ts.map +1 -1
- package/dist/columns/data_column.d.ts +12 -16
- package/dist/columns/data_column.d.ts.map +1 -1
- package/dist/columns/derive_axis_values_labels.d.ts +2 -3
- package/dist/columns/derive_axis_values_labels.d.ts.map +1 -1
- package/dist/columns/split_by_axes.d.ts +3 -5
- package/dist/columns/split_by_axes.d.ts.map +1 -1
- package/dist/columns/utils.d.ts +10 -12
- package/dist/columns/utils.d.ts.map +1 -1
- package/dist/components/PFrameForGraphs.d.ts +5 -5
- package/dist/components/PFrameForGraphs.d.ts.map +1 -1
- package/dist/components/PlAnnotations/filter.d.ts +59 -40
- package/dist/components/PlAnnotations/filter.d.ts.map +1 -1
- package/dist/components/PlAnnotations/filters_ui.d.ts +18 -18
- package/dist/components/PlAnnotations/filters_ui.d.ts.map +1 -1
- package/dist/components/PlDataTable/columnResolver.cjs +2 -4
- package/dist/components/PlDataTable/columnResolver.cjs.map +1 -1
- package/dist/components/PlDataTable/columnResolver.js +2 -4
- package/dist/components/PlDataTable/columnResolver.js.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV2.cjs +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV2.cjs.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV2.d.ts +3 -4
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV2.d.ts.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV2.js +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV2.js.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.cjs +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.cjs.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.d.ts +13 -10
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.d.ts.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.js +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.js.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/discoverColumns.d.ts +5 -5
- package/dist/components/PlDataTable/createPlDataTable/discoverColumns.d.ts.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/index.d.ts +4 -4
- package/dist/components/PlDataTable/createPlDataTable/index.d.ts.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/utils.d.ts +8 -7
- package/dist/components/PlDataTable/createPlDataTable/utils.d.ts.map +1 -1
- package/dist/components/PlDataTable/createPlDataTableSheet.d.ts +2 -3
- package/dist/components/PlDataTable/createPlDataTableSheet.d.ts.map +1 -1
- package/dist/components/PlDataTable/state-migration.d.ts +6 -7
- package/dist/components/PlDataTable/state-migration.d.ts.map +1 -1
- package/dist/components/PlDataTable/typesV4.d.ts +73 -42
- package/dist/components/PlDataTable/typesV4.d.ts.map +1 -1
- package/dist/components/PlDataTable/typesV5.d.ts +3 -5
- package/dist/components/PlDataTable/typesV5.d.ts.map +1 -1
- package/dist/components/PlDataTable/typesV6.d.ts +4 -6
- package/dist/components/PlDataTable/typesV6.d.ts.map +1 -1
- package/dist/components/PlDataTable/typesV7.d.ts +45 -27
- package/dist/components/PlDataTable/typesV7.d.ts.map +1 -1
- package/dist/components/PlDataTable/typesV8.d.ts +80 -45
- package/dist/components/PlDataTable/typesV8.d.ts.map +1 -1
- package/dist/components/PlDatasetSelector/build_dataset_options.d.ts +7 -6
- package/dist/components/PlDatasetSelector/build_dataset_options.d.ts.map +1 -1
- package/dist/components/PlDatasetSelector/dataset_selection.d.ts +4 -6
- package/dist/components/PlDatasetSelector/dataset_selection.d.ts.map +1 -1
- package/dist/components/PlDatasetSelector/filter_discovery.d.ts +9 -8
- package/dist/components/PlDatasetSelector/filter_discovery.d.ts.map +1 -1
- package/dist/components/PlMultiSequenceAlignment.d.ts +6 -13
- package/dist/components/PlMultiSequenceAlignment.d.ts.map +1 -1
- package/dist/components/PlSelectionModel.d.ts +6 -6
- package/dist/components/PlSelectionModel.d.ts.map +1 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/config/index.d.ts +2 -6
- package/dist/config/model.d.ts +28 -30
- package/dist/config/model.d.ts.map +1 -1
- package/dist/config/type_engine.d.ts +8 -31
- package/dist/config/type_engine.d.ts.map +1 -1
- package/dist/env_value.d.ts +1 -2
- package/dist/env_value.d.ts.map +1 -1
- package/dist/filters/converters/filterToQuery.d.ts +6 -7
- package/dist/filters/converters/filterToQuery.d.ts.map +1 -1
- package/dist/filters/converters/filterUiToExpressionImpl.d.ts +2 -4
- package/dist/filters/converters/filterUiToExpressionImpl.d.ts.map +1 -1
- package/dist/filters/distill.d.ts +1 -3
- package/dist/filters/distill.d.ts.map +1 -1
- package/dist/filters/index.d.ts +1 -0
- package/dist/filters/types.d.ts +3 -4
- package/dist/filters/types.d.ts.map +1 -1
- package/dist/index.cjs +20 -60
- package/dist/index.d.ts +14 -11
- package/dist/index.js +4 -8
- package/dist/labels/derive_distinct_labels.d.ts +28 -17
- package/dist/labels/derive_distinct_labels.d.ts.map +1 -1
- package/dist/labels/derive_distinct_tooltips.d.ts +11 -8
- package/dist/labels/derive_distinct_tooltips.d.ts.map +1 -1
- package/dist/labels/linked_column_postfix.d.ts +3 -5
- package/dist/labels/linked_column_postfix.d.ts.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.js +1 -1
- package/dist/pframe.d.ts +1 -3
- package/dist/pframe.d.ts.map +1 -1
- package/dist/pframe_utils/axes.d.ts +4 -5
- package/dist/pframe_utils/axes.d.ts.map +1 -1
- package/dist/pframe_utils/columns.d.ts +3 -7
- package/dist/pframe_utils/columns.d.ts.map +1 -1
- package/dist/pframe_utils/index.d.ts +9 -10
- package/dist/pframe_utils/index.d.ts.map +1 -1
- package/dist/platforma.d.ts +19 -21
- package/dist/platforma.d.ts.map +1 -1
- package/dist/plugin_handle.d.ts +11 -13
- package/dist/plugin_handle.d.ts.map +1 -1
- package/dist/plugin_model.d.ts +21 -22
- package/dist/plugin_model.d.ts.map +1 -1
- package/dist/raw_globals.d.ts +3 -4
- package/dist/raw_globals.d.ts.map +1 -1
- package/dist/render/accessor.d.ts +2 -4
- package/dist/render/accessor.d.ts.map +1 -1
- package/dist/render/api.cjs +0 -22
- package/dist/render/api.cjs.map +1 -1
- package/dist/render/api.d.ts +13 -21
- package/dist/render/api.d.ts.map +1 -1
- package/dist/render/api.js +1 -22
- package/dist/render/api.js.map +1 -1
- package/dist/render/future.d.ts +2 -4
- package/dist/render/future.d.ts.map +1 -1
- package/dist/render/index.cjs +0 -1
- package/dist/render/index.d.ts +3 -2
- package/dist/render/index.js +2 -2
- package/dist/render/internal.d.ts +11 -13
- package/dist/render/internal.d.ts.map +1 -1
- package/dist/render/traversal_ops.d.ts +14 -11
- package/dist/render/traversal_ops.d.ts.map +1 -1
- package/dist/render/util/axis_filtering.d.ts +5 -7
- package/dist/render/util/axis_filtering.d.ts.map +1 -1
- package/dist/render/util/column_collection.d.ts +14 -12
- package/dist/render/util/column_collection.d.ts.map +1 -1
- package/dist/render/util/label.d.ts +2 -3
- package/dist/render/util/label.d.ts.map +1 -1
- package/dist/render/util/pcolumn_data.d.ts +24 -25
- package/dist/render/util/pcolumn_data.d.ts.map +1 -1
- package/dist/render/util/split_selectors.d.ts +4 -6
- package/dist/render/util/split_selectors.d.ts.map +1 -1
- package/dist/services/block_services.d.ts +3 -4
- package/dist/services/block_services.d.ts.map +1 -1
- package/dist/services/get_services.d.ts +1 -3
- package/dist/services/get_services.d.ts.map +1 -1
- package/dist/services/service_bridge.d.ts +3 -5
- package/dist/services/service_bridge.d.ts.map +1 -1
- package/dist/services/service_resolve.d.ts +6 -7
- package/dist/services/service_resolve.d.ts.map +1 -1
- package/dist/version.d.ts +3 -4
- package/dist/version.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/bconfig/lambdas.ts +1 -25
- package/src/components/PlDataTable/columnResolver.test.ts +3 -5
- package/src/components/PlDataTable/columnResolver.ts +2 -12
- package/src/components/PlDataTable/createPlDataTable/createPlDataTableV2.ts +1 -4
- package/src/components/PlDataTable/createPlDataTable/createPlDataTableV3.ts +5 -4
- package/src/config/index.ts +0 -4
- package/src/config/type_engine.ts +6 -49
- package/src/index.ts +0 -2
- package/src/render/api.ts +0 -32
- package/src/typing.test.ts +4 -143
- package/dist/block_model_legacy.cjs +0 -240
- package/dist/block_model_legacy.cjs.map +0 -1
- package/dist/block_model_legacy.d.ts +0 -115
- package/dist/block_model_legacy.d.ts.map +0 -1
- package/dist/block_model_legacy.js +0 -240
- package/dist/block_model_legacy.js.map +0 -1
- package/dist/config/actions.cjs +0 -232
- package/dist/config/actions.cjs.map +0 -1
- package/dist/config/actions.d.ts +0 -48
- package/dist/config/actions.d.ts.map +0 -1
- package/dist/config/actions.js +0 -201
- package/dist/config/actions.js.map +0 -1
- package/dist/config/actions_kinds.d.ts +0 -116
- package/dist/config/actions_kinds.d.ts.map +0 -1
- package/dist/config/index.cjs +0 -33
- package/dist/config/index.js +0 -2
- package/dist/config/model_meta.d.ts +0 -9
- package/dist/config/model_meta.d.ts.map +0 -1
- package/dist/config/type_util.d.ts +0 -14
- package/dist/config/type_util.d.ts.map +0 -1
- package/dist/ref_util.cjs +0 -21
- package/dist/ref_util.cjs.map +0 -1
- package/dist/ref_util.d.ts +0 -19
- package/dist/ref_util.d.ts.map +0 -1
- package/dist/ref_util.js +0 -20
- package/dist/ref_util.js.map +0 -1
- package/src/block_model_legacy.ts +0 -465
- package/src/config/actions.ts +0 -468
- package/src/config/actions_kinds.ts +0 -264
- package/src/config/model_meta.ts +0 -5
- package/src/config/type_util.ts +0 -25
- package/src/ref_util.ts +0 -17
package/dist/config/actions.cjs
DELETED
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
//#region src/config/actions.ts
|
|
2
|
-
function primitiveToConfig(value) {
|
|
3
|
-
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || value === null) return getImmediate(value);
|
|
4
|
-
else return value;
|
|
5
|
-
}
|
|
6
|
-
function getFromCfg(variable) {
|
|
7
|
-
return {
|
|
8
|
-
type: "GetFromCtx",
|
|
9
|
-
variable
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
function isolate(cfg) {
|
|
13
|
-
return {
|
|
14
|
-
type: "Isolate",
|
|
15
|
-
cfg
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
const Args = getFromCfg("$args");
|
|
19
|
-
const It = getFromCfg("$it");
|
|
20
|
-
const MainOutputs = getFromCfg("$prod");
|
|
21
|
-
const StagingOutputs = getFromCfg("$staging");
|
|
22
|
-
const UiState = getFromCfg("$ui");
|
|
23
|
-
function getImmediate(value) {
|
|
24
|
-
return {
|
|
25
|
-
type: "Immediate",
|
|
26
|
-
value
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
function makeObject(template) {
|
|
30
|
-
const normalizedTemplate = {};
|
|
31
|
-
for (const [k, cfg] of Object.entries(template)) normalizedTemplate[k] = primitiveToConfig(cfg);
|
|
32
|
-
return {
|
|
33
|
-
type: "MakeObject",
|
|
34
|
-
template: normalizedTemplate
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
function makeArray(...template) {
|
|
38
|
-
const normalizedTemplate = [];
|
|
39
|
-
for (const cfg of template) normalizedTemplate.push(primitiveToConfig(cfg));
|
|
40
|
-
return {
|
|
41
|
-
type: "MakeArray",
|
|
42
|
-
template: normalizedTemplate
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
function getJsonField(source, field) {
|
|
46
|
-
return {
|
|
47
|
-
type: "GetJsonField",
|
|
48
|
-
source: primitiveToConfig(source),
|
|
49
|
-
field: primitiveToConfig(field)
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
function mapRecordValues(source, mapping, itVar = "$it") {
|
|
53
|
-
return {
|
|
54
|
-
type: "MapRecordValues",
|
|
55
|
-
source,
|
|
56
|
-
mapping,
|
|
57
|
-
itVar
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
function mapArrayValues(source, mapping, itVar = "$it") {
|
|
61
|
-
return {
|
|
62
|
-
type: "MapArrayValues",
|
|
63
|
-
source,
|
|
64
|
-
mapping,
|
|
65
|
-
itVar
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
function flatten(source) {
|
|
69
|
-
return {
|
|
70
|
-
type: "Flatten",
|
|
71
|
-
source
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
function isEmpty(arg) {
|
|
75
|
-
return {
|
|
76
|
-
type: "IsEmpty",
|
|
77
|
-
arg
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
function not(operand) {
|
|
81
|
-
return {
|
|
82
|
-
type: "Not",
|
|
83
|
-
operand
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
function and(operand1, operand2) {
|
|
87
|
-
return {
|
|
88
|
-
type: "And",
|
|
89
|
-
operand1,
|
|
90
|
-
operand2
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
function or(operand1, operand2) {
|
|
94
|
-
return {
|
|
95
|
-
type: "Or",
|
|
96
|
-
operand1,
|
|
97
|
-
operand2
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
function getResourceField(source, field) {
|
|
101
|
-
return {
|
|
102
|
-
type: "GetResourceField",
|
|
103
|
-
source: primitiveToConfig(source),
|
|
104
|
-
field: primitiveToConfig(field)
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
function getResourceValueAsJson() {
|
|
108
|
-
return function(source) {
|
|
109
|
-
return {
|
|
110
|
-
type: "GetResourceValueAsJson",
|
|
111
|
-
source: primitiveToConfig(source)
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
function mapResourceFields(source, mapping, itVar = "$it") {
|
|
116
|
-
return {
|
|
117
|
-
type: "MapResourceFields",
|
|
118
|
-
source,
|
|
119
|
-
mapping,
|
|
120
|
-
itVar
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
function getBlobContent(source, range) {
|
|
124
|
-
return {
|
|
125
|
-
type: "GetBlobContent",
|
|
126
|
-
range,
|
|
127
|
-
source: primitiveToConfig(source)
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
function getBlobContentAsString(source, range) {
|
|
131
|
-
return {
|
|
132
|
-
type: "GetBlobContentAsString",
|
|
133
|
-
range,
|
|
134
|
-
source: primitiveToConfig(source)
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
function getBlobContentAsJson() {
|
|
138
|
-
return function(source, range) {
|
|
139
|
-
return {
|
|
140
|
-
type: "GetBlobContentAsJson",
|
|
141
|
-
range,
|
|
142
|
-
source: primitiveToConfig(source)
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
function getDownloadedBlobContent(source) {
|
|
147
|
-
return {
|
|
148
|
-
type: "GetDownloadedBlobContent",
|
|
149
|
-
source: primitiveToConfig(source)
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
function getOnDemandBlobContent(source) {
|
|
153
|
-
return {
|
|
154
|
-
type: "GetOnDemandBlobContent",
|
|
155
|
-
source: primitiveToConfig(source)
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
function extractArchiveAndGetURL(source, format) {
|
|
159
|
-
return {
|
|
160
|
-
type: "ExtractArchiveAndGetURL",
|
|
161
|
-
format,
|
|
162
|
-
source: primitiveToConfig(source)
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
function getImportProgress(source) {
|
|
166
|
-
return {
|
|
167
|
-
type: "GetImportProgress",
|
|
168
|
-
source: primitiveToConfig(source)
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
function getLastLogs(source, lines) {
|
|
172
|
-
return {
|
|
173
|
-
type: "GetLastLogs",
|
|
174
|
-
source: primitiveToConfig(source),
|
|
175
|
-
lines
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
function getProgressLog(source, patternToSearch) {
|
|
179
|
-
return {
|
|
180
|
-
type: "GetProgressLog",
|
|
181
|
-
source: primitiveToConfig(source),
|
|
182
|
-
patternToSearch
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
function getProgressLogWithInfo(source, patternToSearch) {
|
|
186
|
-
return {
|
|
187
|
-
type: "GetProgressLogWithInfo",
|
|
188
|
-
source: primitiveToConfig(source),
|
|
189
|
-
patternToSearch
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
function getLogHandle(source) {
|
|
193
|
-
return {
|
|
194
|
-
type: "GetLogHandle",
|
|
195
|
-
source: primitiveToConfig(source)
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
//#endregion
|
|
199
|
-
exports.Args = Args;
|
|
200
|
-
exports.It = It;
|
|
201
|
-
exports.MainOutputs = MainOutputs;
|
|
202
|
-
exports.StagingOutputs = StagingOutputs;
|
|
203
|
-
exports.UiState = UiState;
|
|
204
|
-
exports.and = and;
|
|
205
|
-
exports.extractArchiveAndGetURL = extractArchiveAndGetURL;
|
|
206
|
-
exports.flatten = flatten;
|
|
207
|
-
exports.getBlobContent = getBlobContent;
|
|
208
|
-
exports.getBlobContentAsJson = getBlobContentAsJson;
|
|
209
|
-
exports.getBlobContentAsString = getBlobContentAsString;
|
|
210
|
-
exports.getDownloadedBlobContent = getDownloadedBlobContent;
|
|
211
|
-
exports.getFromCfg = getFromCfg;
|
|
212
|
-
exports.getImmediate = getImmediate;
|
|
213
|
-
exports.getImportProgress = getImportProgress;
|
|
214
|
-
exports.getJsonField = getJsonField;
|
|
215
|
-
exports.getLastLogs = getLastLogs;
|
|
216
|
-
exports.getLogHandle = getLogHandle;
|
|
217
|
-
exports.getOnDemandBlobContent = getOnDemandBlobContent;
|
|
218
|
-
exports.getProgressLog = getProgressLog;
|
|
219
|
-
exports.getProgressLogWithInfo = getProgressLogWithInfo;
|
|
220
|
-
exports.getResourceField = getResourceField;
|
|
221
|
-
exports.getResourceValueAsJson = getResourceValueAsJson;
|
|
222
|
-
exports.isEmpty = isEmpty;
|
|
223
|
-
exports.isolate = isolate;
|
|
224
|
-
exports.makeArray = makeArray;
|
|
225
|
-
exports.makeObject = makeObject;
|
|
226
|
-
exports.mapArrayValues = mapArrayValues;
|
|
227
|
-
exports.mapRecordValues = mapRecordValues;
|
|
228
|
-
exports.mapResourceFields = mapResourceFields;
|
|
229
|
-
exports.not = not;
|
|
230
|
-
exports.or = or;
|
|
231
|
-
|
|
232
|
-
//# sourceMappingURL=actions.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"actions.cjs","names":[],"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 {\n ExtractAction,\n POCExtractAction,\n PrimitiveOrConfig,\n TypedConfig,\n} 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"],"mappings":";AA2CA,SAAS,kBAAkB,OAAuC;CAChE,IACE,OAAO,UAAU,YACjB,OAAO,UAAU,YACjB,OAAO,UAAU,aACjB,UAAU,MAEV,OAAO,aAAa,KAAK;MACtB,OAAO;AACd;AAMA,SAAgB,WAAmC,UAA4C;CAC7F,OAAO;EAAE,MAAM;EAAc;CAAS;AACxC;AAMA,SAAgB,QACd,KACgD;CAChD,OAAO;EACL,MAAM;EACN;CACF;AACF;AAMA,MAAa,OAAO,WAAW,OAAO;AACtC,MAAa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QACqD;CACrD,OAAO;EACL,MAAM;EACN,QAAQ,kBAAkB,MAAM;CAClC;AACF"}
|
package/dist/config/actions.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { ExtractAction, POCExtractAction, PrimitiveOrConfig, TypedConfig } from "./type_engine.js";
|
|
2
|
-
import { CheckedSyncConf } from "./type_util.js";
|
|
3
|
-
import { ActAnd, ActExtractArchiveAndGetURL, ActFlatten, ActGetBlobContent, ActGetBlobContentAsJson, ActGetBlobContentAsString, ActGetDownloadedBlobContent, ActGetField, ActGetFromCtx, ActGetImmediate, ActGetLastLogs, ActGetLogHandle, ActGetOnDemandBlobContent, ActGetProgressLog, ActGetProgressLogWithInfo, ActGetResourceField, ActGetResourceValueAsJson, ActImportProgress, ActIsEmpty, ActIsolate, ActMakeArray, ActMakeObject, ActMapArrayValues, ActMapRecordValues, ActMapResourceFields, ActNot, ActOr } from "./actions_kinds.js";
|
|
4
|
-
import { ArchiveFormat, RangeBytes } from "@milaboratories/pl-model-common";
|
|
5
|
-
|
|
6
|
-
//#region src/config/actions.d.ts
|
|
7
|
-
declare function getFromCfg<const V extends string>(variable: V): TypedConfig<ActGetFromCtx<V>>;
|
|
8
|
-
declare function isolate<const Config extends TypedConfig>(cfg: Config): TypedConfig<ActIsolate<ExtractAction<Config>>>;
|
|
9
|
-
declare const Args: TypedConfig<ActGetFromCtx<"$args">>;
|
|
10
|
-
declare const It: TypedConfig<ActGetFromCtx<"$it">>;
|
|
11
|
-
declare const MainOutputs: TypedConfig<ActGetFromCtx<"$prod">>;
|
|
12
|
-
declare const StagingOutputs: TypedConfig<ActGetFromCtx<"$staging">>;
|
|
13
|
-
declare const UiState: TypedConfig<ActGetFromCtx<"$ui">>;
|
|
14
|
-
declare function getImmediate<const T>(value: T): TypedConfig<ActGetImmediate<T>>;
|
|
15
|
-
declare function makeObject<const T extends Record<string, PrimitiveOrConfig>>(template: T): TypedConfig<ActMakeObject<{ [Key in keyof T]: POCExtractAction<T[Key]> }>>;
|
|
16
|
-
declare function makeArray<const T extends PrimitiveOrConfig[]>(...template: T): TypedConfig<ActMakeArray<{ [Key in keyof T]: POCExtractAction<T[Key]> }>>;
|
|
17
|
-
declare function getJsonField<const Source extends PrimitiveOrConfig, const Field extends PrimitiveOrConfig>(source: Source, field: Field): TypedConfig<ActGetField<POCExtractAction<Source>, POCExtractAction<Field>>>;
|
|
18
|
-
declare function mapRecordValues<const Source extends TypedConfig, const Mapping extends TypedConfig>(source: Source & CheckedSyncConf<Source>, mapping: Mapping): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, "$it">>;
|
|
19
|
-
declare function mapRecordValues<const Source extends TypedConfig, const Mapping extends TypedConfig>(source: Source, mapping: Mapping & CheckedSyncConf<Mapping>): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, "$it">>;
|
|
20
|
-
declare function mapRecordValues<const Source extends TypedConfig, const Mapping extends TypedConfig, const ItVar extends string>(source: Source & CheckedSyncConf<Source>, mapping: Mapping, itVar: ItVar): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;
|
|
21
|
-
declare function mapRecordValues<const Source extends TypedConfig, const Mapping extends TypedConfig, const ItVar extends string>(source: Source, mapping: Mapping & CheckedSyncConf<Mapping>, itVar: ItVar): TypedConfig<ActMapRecordValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;
|
|
22
|
-
declare function mapArrayValues<const Source extends TypedConfig, const Mapping extends TypedConfig>(source: Source & CheckedSyncConf<Source>, mapping: Mapping): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, "$it">>;
|
|
23
|
-
declare function mapArrayValues<const Source extends TypedConfig, const Mapping extends TypedConfig>(source: Source, mapping: Mapping & CheckedSyncConf<Mapping>): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, "$it">>;
|
|
24
|
-
declare function mapArrayValues<const Source extends TypedConfig, const Mapping extends TypedConfig, const ItVar extends string>(source: Source & CheckedSyncConf<Source>, mapping: Mapping, itVar: ItVar): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;
|
|
25
|
-
declare function mapArrayValues<const Source extends TypedConfig, const Mapping extends TypedConfig, const ItVar extends string>(source: Source, mapping: Mapping & CheckedSyncConf<Mapping>, itVar: ItVar): TypedConfig<ActMapArrayValues<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;
|
|
26
|
-
declare function flatten<const Source extends TypedConfig>(source: Source): TypedConfig<ActFlatten<ExtractAction<Source>>>;
|
|
27
|
-
declare function isEmpty<const Arg extends TypedConfig>(arg: Arg): TypedConfig<ActIsEmpty<ExtractAction<Arg>>>;
|
|
28
|
-
declare function not<const Operand extends TypedConfig>(operand: Operand): TypedConfig<ActNot<ExtractAction<Operand>>>;
|
|
29
|
-
declare function and<const Operand1 extends TypedConfig, const Operand2 extends TypedConfig>(operand1: Operand1, operand2: Operand2): TypedConfig<ActAnd<ExtractAction<Operand1>, ExtractAction<Operand2>>>;
|
|
30
|
-
declare function or<const Operand1 extends TypedConfig, const Operand2 extends TypedConfig>(operand1: Operand1, operand2: Operand2): TypedConfig<ActOr<ExtractAction<Operand1>, ExtractAction<Operand2>>>;
|
|
31
|
-
declare function getResourceField<const Source extends PrimitiveOrConfig, const Field extends PrimitiveOrConfig>(source: Source, field: Field): TypedConfig<ActGetResourceField<POCExtractAction<Source>, POCExtractAction<Field>>>;
|
|
32
|
-
declare function getResourceValueAsJson<T>(): <const Source extends PrimitiveOrConfig>(source: Source) => TypedConfig<ActGetResourceValueAsJson<POCExtractAction<Source>, T>>;
|
|
33
|
-
declare function mapResourceFields<const Source extends TypedConfig, const Mapping extends TypedConfig>(source: Source, mapping: Mapping): TypedConfig<ActMapResourceFields<ExtractAction<Source>, ExtractAction<Mapping>, "$it">>;
|
|
34
|
-
declare function mapResourceFields<const Source extends TypedConfig, const Mapping extends TypedConfig, const ItVar extends string>(source: Source, mapping: Mapping, itVar: ItVar): TypedConfig<ActMapResourceFields<ExtractAction<Source>, ExtractAction<Mapping>, ItVar>>;
|
|
35
|
-
declare function getBlobContent<const Source extends TypedConfig>(source: Source, range?: RangeBytes): TypedConfig<ActGetBlobContent<ExtractAction<Source>>>;
|
|
36
|
-
declare function getBlobContentAsString<const Source extends TypedConfig>(source: Source, range?: RangeBytes): TypedConfig<ActGetBlobContentAsString<ExtractAction<Source>>>;
|
|
37
|
-
declare function getBlobContentAsJson<T>(): <const Source extends TypedConfig>(source: Source, range?: RangeBytes) => TypedConfig<ActGetBlobContentAsJson<ExtractAction<Source>, T>>;
|
|
38
|
-
declare function getDownloadedBlobContent<const Source extends TypedConfig>(source: Source): TypedConfig<ActGetDownloadedBlobContent<ExtractAction<Source>>>;
|
|
39
|
-
declare function getOnDemandBlobContent<const Source extends TypedConfig>(source: Source): TypedConfig<ActGetOnDemandBlobContent<ExtractAction<Source>>>;
|
|
40
|
-
declare function extractArchiveAndGetURL<const Source extends TypedConfig>(source: Source, format: ArchiveFormat): TypedConfig<ActExtractArchiveAndGetURL<ExtractAction<Source>>>;
|
|
41
|
-
declare function getImportProgress<const Source extends TypedConfig>(source: Source): TypedConfig<ActImportProgress<ExtractAction<Source>>>;
|
|
42
|
-
declare function getLastLogs<const Source extends TypedConfig>(source: Source, lines: number): TypedConfig<ActGetLastLogs<ExtractAction<Source>>>;
|
|
43
|
-
declare function getProgressLog<const Source extends TypedConfig>(source: Source, patternToSearch: string): TypedConfig<ActGetProgressLog<ExtractAction<Source>>>;
|
|
44
|
-
declare function getProgressLogWithInfo<const Source extends TypedConfig>(source: Source, patternToSearch: string): TypedConfig<ActGetProgressLogWithInfo<ExtractAction<Source>>>;
|
|
45
|
-
declare function getLogHandle<const Source extends TypedConfig>(source: Source): TypedConfig<ActGetLogHandle<ExtractAction<Source>>>;
|
|
46
|
-
//#endregion
|
|
47
|
-
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 };
|
|
48
|
-
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","names":[],"sources":["../../src/config/actions.ts"],"mappings":";;;;;;iBA0DgB,UAAA,yBAAmC,QAAA,EAAU,CAAA,GAAI,WAAA,CAAY,aAAA,CAAc,CAAA;AAAA,iBAQ3E,OAAA,sBAA6B,WAAA,EAC3C,GAAA,EAAK,MAAA,GACJ,WAAA,CAAY,UAAA,CAAW,aAAA,CAAc,MAAA;AAAA,cAW3B,IAAA,EAAI,WAAA,CAAA,aAAA;AAAA,cACJ,EAAA,EAAE,WAAA,CAAA,aAAA;AAAA,cACF,WAAA,EAAW,WAAA,CAAA,aAAA;AAAA,cACX,cAAA,EAAc,WAAA,CAAA,aAAA;AAAA,cACd,OAAA,EAAO,WAAA,CAAA,aAAA;AAAA,iBAMJ,YAAA,UAAsB,KAAA,EAAO,CAAA,GAAI,WAAA,CAAY,eAAA,CAAgB,CAAA;AAAA,iBAI7D,UAAA,iBAA2B,MAAA,SAAe,iBAAA,GACxD,QAAA,EAAU,CAAA,GACT,WAAA,CAAY,aAAA,iBAA8B,CAAA,GAAI,gBAAA,CAAiB,CAAA,CAAE,GAAA;AAAA,iBASpD,SAAA,iBAA0B,iBAAA,OACrC,QAAA,EAAU,CAAA,GACZ,WAAA,CAAY,YAAA,iBAA6B,CAAA,GAAI,gBAAA,CAAiB,CAAA,CAAE,GAAA;AAAA,iBASnD,YAAA,sBACO,iBAAA,sBACD,iBAAA,EAEpB,MAAA,EAAQ,MAAA,EACR,KAAA,EAAO,KAAA,GACN,WAAA,CAAY,WAA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AA,CAA0B,aAAA,CAAc,MAAA;AAAA,iBAWvC,uBAAA,sBAA6C,WAAA,EAC3D,MAAA,EAAQ,MAAA,EACR,MAAA,EAAQ,aAAA,GACP,WAAA,CAAY,0BAAA,CAA2B,aAAA,CAAc,MAAA;AAAA,iBAYxC,iBAAA,sBAAuC,WAAA,EACrD,MAAA,EAAQ,MAAA,GACP,WAAA,CAAY,iBAAA,CAAkB,aAAA,CAAc,MAAA;AAAA,iBAW/B,WAAA,sBAAiC,WAAA,EAC/C,MAAA,EAAQ,MAAA,EACR,KAAA,WACC,WAAA,CAAY,cAAA,CAAe,aAAA,CAAc,MAAA;AAAA,iBAQ5B,cAAA,sBAAoC,WAAA,EAClD,MAAA,EAAQ,MAAA,EACR,eAAA,WACC,WAAA,CAAY,iBAAA,CAAkB,aAAA,CAAc,MAAA;AAAA,iBAQ/B,sBAAA,sBAA4C,WAAA,EAC1D,MAAA,EAAQ,MAAA,EACR,eAAA,WACC,WAAA,CAAY,yBAAA,CAA0B,aAAA,CAAc,MAAA;AAAA,iBAQvC,YAAA,sBAAkC,WAAA,EAChD,MAAA,EAAQ,MAAA,GACP,WAAA,CAAY,eAAA,CAAgB,aAAA,CAAc,MAAA"}
|
package/dist/config/actions.js
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
//#region src/config/actions.ts
|
|
2
|
-
function primitiveToConfig(value) {
|
|
3
|
-
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || value === null) return getImmediate(value);
|
|
4
|
-
else return value;
|
|
5
|
-
}
|
|
6
|
-
function getFromCfg(variable) {
|
|
7
|
-
return {
|
|
8
|
-
type: "GetFromCtx",
|
|
9
|
-
variable
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
function isolate(cfg) {
|
|
13
|
-
return {
|
|
14
|
-
type: "Isolate",
|
|
15
|
-
cfg
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
const Args = getFromCfg("$args");
|
|
19
|
-
const It = getFromCfg("$it");
|
|
20
|
-
const MainOutputs = getFromCfg("$prod");
|
|
21
|
-
const StagingOutputs = getFromCfg("$staging");
|
|
22
|
-
const UiState = getFromCfg("$ui");
|
|
23
|
-
function getImmediate(value) {
|
|
24
|
-
return {
|
|
25
|
-
type: "Immediate",
|
|
26
|
-
value
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
function makeObject(template) {
|
|
30
|
-
const normalizedTemplate = {};
|
|
31
|
-
for (const [k, cfg] of Object.entries(template)) normalizedTemplate[k] = primitiveToConfig(cfg);
|
|
32
|
-
return {
|
|
33
|
-
type: "MakeObject",
|
|
34
|
-
template: normalizedTemplate
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
function makeArray(...template) {
|
|
38
|
-
const normalizedTemplate = [];
|
|
39
|
-
for (const cfg of template) normalizedTemplate.push(primitiveToConfig(cfg));
|
|
40
|
-
return {
|
|
41
|
-
type: "MakeArray",
|
|
42
|
-
template: normalizedTemplate
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
function getJsonField(source, field) {
|
|
46
|
-
return {
|
|
47
|
-
type: "GetJsonField",
|
|
48
|
-
source: primitiveToConfig(source),
|
|
49
|
-
field: primitiveToConfig(field)
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
function mapRecordValues(source, mapping, itVar = "$it") {
|
|
53
|
-
return {
|
|
54
|
-
type: "MapRecordValues",
|
|
55
|
-
source,
|
|
56
|
-
mapping,
|
|
57
|
-
itVar
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
function mapArrayValues(source, mapping, itVar = "$it") {
|
|
61
|
-
return {
|
|
62
|
-
type: "MapArrayValues",
|
|
63
|
-
source,
|
|
64
|
-
mapping,
|
|
65
|
-
itVar
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
function flatten(source) {
|
|
69
|
-
return {
|
|
70
|
-
type: "Flatten",
|
|
71
|
-
source
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
function isEmpty(arg) {
|
|
75
|
-
return {
|
|
76
|
-
type: "IsEmpty",
|
|
77
|
-
arg
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
function not(operand) {
|
|
81
|
-
return {
|
|
82
|
-
type: "Not",
|
|
83
|
-
operand
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
function and(operand1, operand2) {
|
|
87
|
-
return {
|
|
88
|
-
type: "And",
|
|
89
|
-
operand1,
|
|
90
|
-
operand2
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
function or(operand1, operand2) {
|
|
94
|
-
return {
|
|
95
|
-
type: "Or",
|
|
96
|
-
operand1,
|
|
97
|
-
operand2
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
function getResourceField(source, field) {
|
|
101
|
-
return {
|
|
102
|
-
type: "GetResourceField",
|
|
103
|
-
source: primitiveToConfig(source),
|
|
104
|
-
field: primitiveToConfig(field)
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
function getResourceValueAsJson() {
|
|
108
|
-
return function(source) {
|
|
109
|
-
return {
|
|
110
|
-
type: "GetResourceValueAsJson",
|
|
111
|
-
source: primitiveToConfig(source)
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
function mapResourceFields(source, mapping, itVar = "$it") {
|
|
116
|
-
return {
|
|
117
|
-
type: "MapResourceFields",
|
|
118
|
-
source,
|
|
119
|
-
mapping,
|
|
120
|
-
itVar
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
function getBlobContent(source, range) {
|
|
124
|
-
return {
|
|
125
|
-
type: "GetBlobContent",
|
|
126
|
-
range,
|
|
127
|
-
source: primitiveToConfig(source)
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
function getBlobContentAsString(source, range) {
|
|
131
|
-
return {
|
|
132
|
-
type: "GetBlobContentAsString",
|
|
133
|
-
range,
|
|
134
|
-
source: primitiveToConfig(source)
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
function getBlobContentAsJson() {
|
|
138
|
-
return function(source, range) {
|
|
139
|
-
return {
|
|
140
|
-
type: "GetBlobContentAsJson",
|
|
141
|
-
range,
|
|
142
|
-
source: primitiveToConfig(source)
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
function getDownloadedBlobContent(source) {
|
|
147
|
-
return {
|
|
148
|
-
type: "GetDownloadedBlobContent",
|
|
149
|
-
source: primitiveToConfig(source)
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
function getOnDemandBlobContent(source) {
|
|
153
|
-
return {
|
|
154
|
-
type: "GetOnDemandBlobContent",
|
|
155
|
-
source: primitiveToConfig(source)
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
function extractArchiveAndGetURL(source, format) {
|
|
159
|
-
return {
|
|
160
|
-
type: "ExtractArchiveAndGetURL",
|
|
161
|
-
format,
|
|
162
|
-
source: primitiveToConfig(source)
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
function getImportProgress(source) {
|
|
166
|
-
return {
|
|
167
|
-
type: "GetImportProgress",
|
|
168
|
-
source: primitiveToConfig(source)
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
function getLastLogs(source, lines) {
|
|
172
|
-
return {
|
|
173
|
-
type: "GetLastLogs",
|
|
174
|
-
source: primitiveToConfig(source),
|
|
175
|
-
lines
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
function getProgressLog(source, patternToSearch) {
|
|
179
|
-
return {
|
|
180
|
-
type: "GetProgressLog",
|
|
181
|
-
source: primitiveToConfig(source),
|
|
182
|
-
patternToSearch
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
function getProgressLogWithInfo(source, patternToSearch) {
|
|
186
|
-
return {
|
|
187
|
-
type: "GetProgressLogWithInfo",
|
|
188
|
-
source: primitiveToConfig(source),
|
|
189
|
-
patternToSearch
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
function getLogHandle(source) {
|
|
193
|
-
return {
|
|
194
|
-
type: "GetLogHandle",
|
|
195
|
-
source: primitiveToConfig(source)
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
//#endregion
|
|
199
|
-
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 };
|
|
200
|
-
|
|
201
|
-
//# sourceMappingURL=actions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","names":[],"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 {\n ExtractAction,\n POCExtractAction,\n PrimitiveOrConfig,\n TypedConfig,\n} 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"],"mappings":";AA2CA,SAAS,kBAAkB,OAAuC;CAChE,IACE,OAAO,UAAU,YACjB,OAAO,UAAU,YACjB,OAAO,UAAU,aACjB,UAAU,MAEV,OAAO,aAAa,KAAK;MACtB,OAAO;AACd;AAMA,SAAgB,WAAmC,UAA4C;CAC7F,OAAO;EAAE,MAAM;EAAc;CAAS;AACxC;AAMA,SAAgB,QACd,KACgD;CAChD,OAAO;EACL,MAAM;EACN;CACF;AACF;AAMA,MAAa,OAAO,WAAW,OAAO;AACtC,MAAa,KAAK,WAAW,KAAK;AAClC,MAAa,cAAc,WAAW,OAAO;AAC7C,MAAa,iBAAiB,WAAW,UAAU;AACnD,MAAa,UAAU,WAAW,KAAK;AAMvC,SAAgB,aAAsB,OAA2C;CAC/E,OAAO;EAAE,MAAM;EAAa;CAAM;AACpC;AAEA,SAAgB,WACd,UAC4E;CAC5E,MAAM,qBAAkD,CAAC;CACzD,KAAK,MAAM,CAAC,GAAG,QAAQ,OAAO,QAAQ,QAAQ,GAAG,mBAAmB,KAAK,kBAAkB,GAAG;CAC9F,OAAO;EACL,MAAM;EACN,UAAU;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