exupery-core-async 0.3.11 → 0.3.13

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/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export * from "./algorithms/procedure/initialize_procedure";
5
5
  export * from "./shorthands";
6
6
  export * from "./procedure/assert_async";
7
7
  export * from "./procedure/assert_sync";
8
+ export * from "./procedure/execute_with_async_data";
8
9
  export * from "./procedure/conditional_async";
9
10
  export * from "./procedure/conditional_multiple";
10
11
  export * from "./procedure/conditional_sync";
package/dist/index.js CHANGED
@@ -24,6 +24,7 @@ __exportStar(require("./shorthands"), exports);
24
24
  // procedure exports
25
25
  __exportStar(require("./procedure/assert_async"), exports);
26
26
  __exportStar(require("./procedure/assert_sync"), exports);
27
+ __exportStar(require("./procedure/execute_with_async_data"), exports);
27
28
  __exportStar(require("./procedure/conditional_async"), exports);
28
29
  __exportStar(require("./procedure/conditional_multiple"), exports);
29
30
  __exportStar(require("./procedure/conditional_sync"), exports);
@@ -0,0 +1,2 @@
1
+ import * as _et from "exupery-core-types";
2
+ export declare 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>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute_with_async_data = void 0;
4
+ const initialize_procedure_1 = require("../algorithms/procedure/initialize_procedure");
5
+ const execute_with_async_data = (procedure, query) => {
6
+ return (0, initialize_procedure_1.__create_procedure)({
7
+ 'execute': (on_success, on_exception) => {
8
+ query.__start((query_result) => {
9
+ procedure["execute with synchrounous data"](query_result).__start(on_success, on_exception);
10
+ }, on_exception);
11
+ }
12
+ });
13
+ };
14
+ exports.execute_with_async_data = execute_with_async_data;
@@ -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)(query_result).__start(on_success, (error) => {
43
+ action(resources)['execute with synchrounous data'](query_result).__start(on_success, (error) => {
44
44
  //transform the error
45
45
  on_error(error);
46
46
  });
@@ -137,18 +137,20 @@ var pi;
137
137
  *
138
138
  * @param action upi
139
139
  */
140
- pi.u = (action, error_transform, error_handler) => ($r) => ($) => {
141
- return (0, initialize_procedure_1.__create_procedure)({
142
- 'execute': (on_succes, on_error) => {
143
- action($r)($).__start(on_succes, (error) => {
144
- if (error_handler !== undefined) {
145
- error_handler(error);
146
- }
147
- on_error(error_transform(error));
148
- });
149
- }
150
- });
151
- };
140
+ pi.u = (action, error_transform, error_handler) => ($r) => ({
141
+ 'execute with synchrounous data': ($) => {
142
+ return (0, initialize_procedure_1.__create_procedure)({
143
+ 'execute': (on_succes, on_error) => {
144
+ action($r)['execute with synchrounous data']($).__start(on_succes, (error) => {
145
+ if (error_handler !== undefined) {
146
+ error_handler(error);
147
+ }
148
+ on_error(error_transform(error));
149
+ });
150
+ }
151
+ });
152
+ }
153
+ });
152
154
  })(pi || (exports.pi = pi = {}));
153
155
  var q;
154
156
  (function (q) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exupery-core-async",
3
- "version": "0.3.11",
3
+ "version": "0.3.13",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Corno",
6
6
  "description": "async types for Exupery",