exupery-core-async 0.3.14 → 0.3.16
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/algorithms/procedure/create_procedure_primed_with_resources.d.ts +2 -1
- package/dist/algorithms/procedure/create_procedure_primed_with_resources.js +20 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/procedure/execute_with_async_data.js +1 -1
- package/dist/shorthands.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import * as _et from 'exupery-core-types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const create_procedure_primed_with_resources_a: <Parameters, Error, Resources>(handler: ($: Parameters) => _et.Procedure_Promise<Error>) => _et.Procedure_Primed_With_Resources<Parameters, Error>;
|
|
3
|
+
export declare const create_procedure_primed_with_resources_b: <Parameters, Error, Resources>(handler: ($: Parameters) => _et.Procedure_Promise<Error>) => _et.Procedure_Primed_With_Resources<Parameters, Error>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.create_procedure_primed_with_resources_b = exports.create_procedure_primed_with_resources_a = void 0;
|
|
4
4
|
const create_procedure_promise_1 = require("./create_procedure_promise");
|
|
5
|
-
const
|
|
5
|
+
const create_procedure_primed_with_resources_a = (handler) => {
|
|
6
6
|
return {
|
|
7
|
-
'execute with
|
|
8
|
-
'execute with
|
|
7
|
+
'execute with synchronous data': handler,
|
|
8
|
+
'execute with asynchronous data': (query) => {
|
|
9
9
|
return (0, create_procedure_promise_1.__create_procedure_promise)({
|
|
10
10
|
'execute': (on_success, on_exception) => {
|
|
11
11
|
query.__start(($) => {
|
|
@@ -16,4 +16,19 @@ const create_procedure_primed_with_resources = (handler) => {
|
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
exports.
|
|
19
|
+
exports.create_procedure_primed_with_resources_a = create_procedure_primed_with_resources_a;
|
|
20
|
+
const create_procedure_primed_with_resources_b = (handler) => {
|
|
21
|
+
return {
|
|
22
|
+
'execute with synchronous data': handler,
|
|
23
|
+
'execute with asynchronous data': (query) => {
|
|
24
|
+
return (0, create_procedure_promise_1.__create_procedure_promise)({
|
|
25
|
+
'execute': (on_success, on_exception) => {
|
|
26
|
+
query.__start(($) => {
|
|
27
|
+
handler($).__start(on_success, on_exception);
|
|
28
|
+
}, on_exception);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
exports.create_procedure_primed_with_resources_b = create_procedure_primed_with_resources_b;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as _et from "exupery-core-types";
|
|
|
2
2
|
export * from "./types/Basic_Query";
|
|
3
3
|
export * from "./algorithms/query/create_query_promise";
|
|
4
4
|
export * from "./algorithms/procedure/create_procedure_promise";
|
|
5
|
+
export * from "./algorithms/procedure/create_procedure_primed_with_resources";
|
|
5
6
|
export * from "./shorthands";
|
|
6
7
|
export * from "./procedure/assert_async";
|
|
7
8
|
export * from "./procedure/assert_sync";
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ __exportStar(require("./types/Basic_Query"), exports);
|
|
|
20
20
|
//functions
|
|
21
21
|
__exportStar(require("./algorithms/query/create_query_promise"), exports);
|
|
22
22
|
__exportStar(require("./algorithms/procedure/create_procedure_promise"), exports);
|
|
23
|
+
__exportStar(require("./algorithms/procedure/create_procedure_primed_with_resources"), exports);
|
|
23
24
|
__exportStar(require("./shorthands"), exports);
|
|
24
25
|
// procedure exports
|
|
25
26
|
__exportStar(require("./procedure/assert_async"), exports);
|
|
@@ -6,7 +6,7 @@ const execute_with_async_data = (procedure, query) => {
|
|
|
6
6
|
return (0, create_procedure_promise_1.__create_procedure_promise)({
|
|
7
7
|
'execute': (on_success, on_exception) => {
|
|
8
8
|
query.__start((query_result) => {
|
|
9
|
-
procedure["execute with
|
|
9
|
+
procedure["execute with synchronous data"](query_result).__start(on_success, on_exception);
|
|
10
10
|
}, on_exception);
|
|
11
11
|
}
|
|
12
12
|
});
|
package/dist/shorthands.js
CHANGED
|
@@ -40,7 +40,7 @@ var p;
|
|
|
40
40
|
//run the query
|
|
41
41
|
query.__start((query_result) => {
|
|
42
42
|
//run the action
|
|
43
|
-
action(resources)['execute with
|
|
43
|
+
action(resources)['execute with synchronous data'](query_result).__start(on_success, (error) => {
|
|
44
44
|
//transform the error
|
|
45
45
|
on_error(error);
|
|
46
46
|
});
|