exupery-core-async 0.3.29 → 0.3.31
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.
|
@@ -6,8 +6,10 @@ export declare namespace p {
|
|
|
6
6
|
const assert_sync: <Error>(assertion: boolean, error_if_failed: Error) => _et.Procedure_Promise<Error>;
|
|
7
7
|
const conditional_async: <Error>(precondition: _et.Query_Promise<boolean, Error>, procedure: _et.Procedure_Promise<Error>) => _et.Procedure_Promise<Error>;
|
|
8
8
|
const conditional_sync: <Error>(precondition: boolean, procedure: _et.Procedure_Promise<Error>) => _et.Procedure_Promise<Error>;
|
|
9
|
+
const conditional_on_processor: <Procedure_Input, Error>(precondition: _et.Process_Result<Procedure_Input, Error>, procedure: _et.Procedure_Primed_With_Resources<Procedure_Input, Error>) => _et.Procedure_Promise<Error>;
|
|
9
10
|
const dictionary_serie: <Error, Entry_Error>(dictionary: _et.Dictionary<_et.Procedure_Promise<Entry_Error>>, transform_error: _et.Transformer_Without_Parameters<_et.Key_Value_Pair<Entry_Error>, Error>) => _et.Procedure_Promise<Error>;
|
|
10
11
|
const dictionary_parallel: <Error, Entry_Error>(dictionary: _et.Dictionary<_et.Procedure_Promise<Entry_Error>>, aggregate_errors: _et.Transformer_Without_Parameters<_et.Dictionary<Entry_Error>, Error>) => _et.Procedure_Promise<Error>;
|
|
12
|
+
const dictionary_parallel_without_transforming_the_error: <Error, Entry_Error>(dictionary: _et.Dictionary<_et.Procedure_Promise<Entry_Error>>) => _et.Procedure_Promise<_et.Dictionary<Entry_Error>>;
|
|
11
13
|
const execute_with_async_data: <Parameters, Error>(procedure: _et.Procedure_Primed_With_Resources<Parameters, Error>, query: _et.Query_Promise<Parameters, Error>) => _et.Procedure_Promise<Error>;
|
|
12
14
|
const sequence: <Error>(steps: _et.Procedure_Promise<Error>[]) => _et.Procedure_Promise<Error>;
|
|
13
15
|
}
|
|
@@ -125,6 +125,15 @@ var p;
|
|
|
125
125
|
}
|
|
126
126
|
});
|
|
127
127
|
};
|
|
128
|
+
p.conditional_on_processor = (precondition, procedure) => {
|
|
129
|
+
return (0, create_procedure_promise_1.__create_procedure_promise)({
|
|
130
|
+
'execute': (on_success, on_error) => {
|
|
131
|
+
precondition.__extract_data(($) => {
|
|
132
|
+
procedure['execute with synchronous data without error transformation']($).__start(on_success, on_error);
|
|
133
|
+
}, on_error);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
};
|
|
128
137
|
p.dictionary_serie = (dictionary, transform_error) => {
|
|
129
138
|
return (0, create_procedure_promise_1.__create_procedure_promise)({
|
|
130
139
|
'execute': (on_success, on_error) => {
|
|
@@ -182,6 +191,31 @@ var p;
|
|
|
182
191
|
}
|
|
183
192
|
});
|
|
184
193
|
};
|
|
194
|
+
p.dictionary_parallel_without_transforming_the_error = (dictionary) => {
|
|
195
|
+
return (0, create_procedure_promise_1.__create_procedure_promise)({
|
|
196
|
+
'execute': (on_success, on_error) => {
|
|
197
|
+
const errors = {};
|
|
198
|
+
(0, create_asynchronous_processes_monitor_1.create_asynchronous_processes_monitor)((monitor) => {
|
|
199
|
+
dictionary.map(($, key) => {
|
|
200
|
+
monitor['report process started']();
|
|
201
|
+
$.__start(() => {
|
|
202
|
+
monitor['report process finished']();
|
|
203
|
+
}, (e) => {
|
|
204
|
+
errors[key] = e;
|
|
205
|
+
monitor['report process finished']();
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
}, () => {
|
|
209
|
+
if (Object.keys(errors).length === 0) {
|
|
210
|
+
on_success();
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
on_error(_ei.dictionary_literal(errors));
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
};
|
|
185
219
|
p.execute_with_async_data = (procedure, query) => {
|
|
186
220
|
return (0, create_procedure_promise_1.__create_procedure_promise)({
|
|
187
221
|
'execute': (on_success, on_error) => {
|