@thisisagile/easy 8.36.2 → 8.37.0
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/utils/Promise.d.ts
CHANGED
|
@@ -8,5 +8,7 @@ export declare const tuple: {
|
|
|
8
8
|
3: <F_1, S_1, T>(first: Pro<F_1>, second: Pro<S_1>, third: Pro<T>) => Promise<[Awaited<F_1>, Awaited<S_1>, Awaited<T>]>;
|
|
9
9
|
4: <F_2, S_2, T_1, Fo>(first: Pro<F_2>, second: Pro<S_2>, third: Pro<T_1>, forth: Pro<Fo>) => Promise<[Awaited<F_2>, Awaited<S_2>, Awaited<T_1>, Awaited<Fo>]>;
|
|
10
10
|
5: <F_3, S_3, T_2, Fo_1, Fi>(first: Pro<F_3>, second: Pro<S_3>, third: Pro<T_2>, forth: Pro<Fo_1>, fifth: Pro<Fi>) => Promise<[Awaited<F_3>, Awaited<S_3>, Awaited<T_2>, Awaited<Fo_1>, Awaited<Fi>]>;
|
|
11
|
+
all: <F_4, S_4>(first: Pro<F_4>, second: Pro<S_4>[]) => Promise<[Awaited<F_4>, S_4[]]>;
|
|
12
|
+
spread: <F_5, S_5>(first: Pro<F_5>, ...second: Pro<S_5>[]) => Promise<[Awaited<F_5>, S_5[]]>;
|
|
11
13
|
};
|
|
12
14
|
export {};
|
package/dist/utils/Promise.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.tuple = exports.reject = exports.resolve = void 0;
|
|
4
|
+
const types_1 = require("../types");
|
|
4
5
|
const resolve = (subject) => Promise.resolve(subject);
|
|
5
6
|
exports.resolve = resolve;
|
|
6
7
|
const reject = (e) => Promise.reject(e);
|
|
@@ -10,5 +11,7 @@ exports.tuple = {
|
|
|
10
11
|
3: (first, second, third) => Promise.all([first, second, third]),
|
|
11
12
|
4: (first, second, third, forth) => Promise.all([first, second, third, forth]),
|
|
12
13
|
5: (first, second, third, forth, fifth) => Promise.all([first, second, third, forth, fifth]),
|
|
14
|
+
all: (first, second) => Promise.all([first, Promise.all(second)]),
|
|
15
|
+
spread: (first, ...second) => Promise.all([first, Promise.all((0, types_1.toArray)(second))]),
|
|
13
16
|
};
|
|
14
17
|
//# sourceMappingURL=Promise.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Promise.js","sourceRoot":"","sources":["../../src/utils/Promise.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Promise.js","sourceRoot":"","sources":["../../src/utils/Promise.ts"],"names":[],"mappings":";;;AAAA,oCAAgD;AAKzC,MAAM,OAAO,GAAG,CAAc,OAA2B,EAAc,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAA7F,QAAA,OAAO,WAAsF;AACnG,MAAM,MAAM,GAAG,CAAY,CAAc,EAAc,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAAtE,QAAA,MAAM,UAAgE;AAEtE,QAAA,KAAK,GAAG;IACnB,CAAC,EAAE,CAAO,KAAa,EAAE,MAAc,EAA2B,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACjG,CAAC,EAAE,CAAU,KAAa,EAAE,MAAc,EAAE,KAAa,EAAkC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACjI,CAAC,EAAE,CAAc,KAAa,EAAE,MAAc,EAAE,KAAa,EAAE,KAAc,EAA0C,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACpK,CAAC,EAAE,CAAkB,KAAa,EAAE,MAAc,EAAE,KAAa,EAAE,KAAc,EAAE,KAAc,EAAkD,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACvM,GAAG,EAAE,CAAO,KAAa,EAAE,MAAgB,EAA6B,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IACpH,MAAM,EAAE,CAAO,KAAa,EAAE,GAAG,MAAgB,EAA6B,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,IAAA,eAAO,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CACpI,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thisisagile/easy",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.37.0",
|
|
4
4
|
"description": "Straightforward library for building domain-driven microservice architectures",
|
|
5
5
|
"author": "Sander Hoogendoorn",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@thisisagile/easy-test": "8.
|
|
34
|
+
"@thisisagile/easy-test": "8.37.0",
|
|
35
35
|
"@types/form-urlencoded": "^4.4.0",
|
|
36
36
|
"@types/jsonwebtoken": "^8.5.8",
|
|
37
37
|
"@types/validator": "^13.7.1"
|
package/src/utils/Promise.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ErrorOrigin } from '../types';
|
|
1
|
+
import { ErrorOrigin, toArray } from '../types';
|
|
2
2
|
|
|
3
3
|
type Pro<A> = A | PromiseLike<A>;
|
|
4
4
|
type Aw<A> = Awaited<A>;
|
|
@@ -11,5 +11,7 @@ export const tuple = {
|
|
|
11
11
|
3: <F, S, T>(first: Pro<F>, second: Pro<S>, third: Pro<T>): Promise<[Aw<F>, Aw<S>, Aw<T>]> => Promise.all([first, second, third]),
|
|
12
12
|
4: <F, S, T, Fo>(first: Pro<F>, second: Pro<S>, third: Pro<T>, forth: Pro<Fo>): Promise<[Aw<F>, Aw<S>, Aw<T>, Aw<Fo>]> => Promise.all([first, second, third, forth]),
|
|
13
13
|
5: <F, S, T, Fo, Fi>(first: Pro<F>, second: Pro<S>, third: Pro<T>, forth: Pro<Fo>, fifth: Pro<Fi>): Promise<[Aw<F>, Aw<S>, Aw<T>, Aw<Fo>, Aw<Fi>]> => Promise.all([first, second, third, forth, fifth]),
|
|
14
|
+
all: <F, S>(first: Pro<F>, second: Pro<S>[]): Promise<[Aw<F>, Aw<S[]>]> => Promise.all([first, Promise.all(second)]),
|
|
15
|
+
spread: <F, S>(first: Pro<F>, ...second: Pro<S>[]): Promise<[Aw<F>, Aw<S[]>]> => Promise.all([first, Promise.all(toArray(second))]),
|
|
14
16
|
};
|
|
15
17
|
|