@thisisagile/easy 15.18.2 → 15.19.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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ErrorOrigin } from '../types';
|
|
1
|
+
import { ErrorOrigin, List } from '../types';
|
|
2
2
|
type Pro<A> = A | PromiseLike<A>;
|
|
3
3
|
type Aw<A> = Awaited<A>;
|
|
4
4
|
export declare const resolve: <S = unknown>(subject: S | PromiseLike<S>) => Promise<S>;
|
|
@@ -10,6 +10,7 @@ export declare const tuple: {
|
|
|
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
11
|
all: <F_4, S_4>(first: Pro<F_4>, second: Pro<S_4>[]) => Promise<[Awaited<F_4>, S_4[]]>;
|
|
12
12
|
spread: <F_5, S_5>(first: Pro<F_5>, ...second: Pro<S_5>[]) => Promise<[Awaited<F_5>, S_5[]]>;
|
|
13
|
+
list: <T_3>(list: Pro<T_3>[]) => Promise<List<Awaited<T_3>>>;
|
|
13
14
|
};
|
|
14
15
|
export declare const tuple2: <F, S>(first: Pro<F>, second: Pro<S>) => Promise<[Awaited<F>, Awaited<S>]>;
|
|
15
16
|
export declare const tuple3: <F, S, T>(first: Pro<F>, second: Pro<S>, third: Pro<T>) => Promise<[Awaited<F>, Awaited<S>, Awaited<T>]>;
|
package/dist/utils/Promise.js
CHANGED
|
@@ -36,7 +36,8 @@ const tuple = {
|
|
|
36
36
|
4: (first, second, third, forth) => Promise.all([first, second, third, forth]),
|
|
37
37
|
5: (first, second, third, forth, fifth) => Promise.all([first, second, third, forth, fifth]),
|
|
38
38
|
all: (first, second) => Promise.all([first, Promise.all(second)]),
|
|
39
|
-
spread: (first, ...second) => Promise.all([first, Promise.all((0, import_types.toArray)(second))])
|
|
39
|
+
spread: (first, ...second) => Promise.all([first, Promise.all((0, import_types.toArray)(second))]),
|
|
40
|
+
list: (list) => Promise.all([...list]).then(import_types.toList)
|
|
40
41
|
};
|
|
41
42
|
const tuple2 = tuple[2];
|
|
42
43
|
const tuple3 = tuple[3];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/Promise.ts"],"sourcesContent":["import { ErrorOrigin, toArray } from '../types';\n\ntype Pro<A> = A | PromiseLike<A>;\ntype Aw<A> = Awaited<A>;\n\nexport const resolve = <S = unknown>(subject: S | PromiseLike<S>): Promise<S> => Promise.resolve(subject);\nexport const reject = <S = never>(e: ErrorOrigin): Promise<S> => Promise.reject(e);\n\nexport const tuple = {\n 2: <F, S>(first: Pro<F>, second: Pro<S>): Promise<[Aw<F>, Aw<S>]> => Promise.all([first, second]),\n 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]),\n 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>]> =>\n Promise.all([first, second, third, forth]),\n 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>]> =>\n Promise.all([first, second, third, forth, fifth]),\n all: <F, S>(first: Pro<F>, second: Pro<S>[]): Promise<[Aw<F>, Aw<S[]>]> => Promise.all([first, Promise.all(second)]),\n spread: <F, S>(first: Pro<F>, ...second: Pro<S>[]): Promise<[Aw<F>, Aw<S[]>]> => Promise.all([first, Promise.all(toArray(second))]),\n};\n\nexport const tuple2 = tuple[2];\nexport const tuple3 = tuple[3];\nexport const tuple4 = tuple[4];\nexport const tuple5 = tuple[5];\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/utils/Promise.ts"],"sourcesContent":["import { ErrorOrigin, List, toArray, toList } from '../types';\n\ntype Pro<A> = A | PromiseLike<A>;\ntype Aw<A> = Awaited<A>;\n\nexport const resolve = <S = unknown>(subject: S | PromiseLike<S>): Promise<S> => Promise.resolve(subject);\nexport const reject = <S = never>(e: ErrorOrigin): Promise<S> => Promise.reject(e);\n\nexport const tuple = {\n 2: <F, S>(first: Pro<F>, second: Pro<S>): Promise<[Aw<F>, Aw<S>]> => Promise.all([first, second]),\n 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]),\n 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>]> =>\n Promise.all([first, second, third, forth]),\n 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>]> =>\n Promise.all([first, second, third, forth, fifth]),\n all: <F, S>(first: Pro<F>, second: Pro<S>[]): Promise<[Aw<F>, Aw<S[]>]> => Promise.all([first, Promise.all(second)]),\n spread: <F, S>(first: Pro<F>, ...second: Pro<S>[]): Promise<[Aw<F>, Aw<S[]>]> => Promise.all([first, Promise.all(toArray(second))]),\n list: <T>(list: Pro<T>[]): Promise<List<Aw<T>>> => Promise.all([...list]).then(toList),\n};\n\nexport const tuple2 = tuple[2];\nexport const tuple3 = tuple[3];\nexport const tuple4 = tuple[4];\nexport const tuple5 = tuple[5];\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAmD;AAK5C,MAAM,UAAU,CAAc,YAA4C,QAAQ,QAAQ,OAAO;AACjG,MAAM,SAAS,CAAY,MAA+B,QAAQ,OAAO,CAAC;AAE1E,MAAM,QAAQ;AAAA,EACnB,GAAG,CAAO,OAAe,WAA4C,QAAQ,IAAI,CAAC,OAAO,MAAM,CAAC;AAAA,EAChG,GAAG,CAAU,OAAe,QAAgB,UAAkD,QAAQ,IAAI,CAAC,OAAO,QAAQ,KAAK,CAAC;AAAA,EAChI,GAAG,CAAc,OAAe,QAAgB,OAAe,UAC7D,QAAQ,IAAI,CAAC,OAAO,QAAQ,OAAO,KAAK,CAAC;AAAA,EAC3C,GAAG,CAAkB,OAAe,QAAgB,OAAe,OAAgB,UACjF,QAAQ,IAAI,CAAC,OAAO,QAAQ,OAAO,OAAO,KAAK,CAAC;AAAA,EAClD,KAAK,CAAO,OAAe,WAAgD,QAAQ,IAAI,CAAC,OAAO,QAAQ,IAAI,MAAM,CAAC,CAAC;AAAA,EACnH,QAAQ,CAAO,UAAkB,WAAgD,QAAQ,IAAI,CAAC,OAAO,QAAQ,QAAI,sBAAQ,MAAM,CAAC,CAAC,CAAC;AAAA,EAClI,MAAM,CAAI,SAAyC,QAAQ,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,KAAK,mBAAM;AACvF;AAEO,MAAM,SAAS,MAAM,CAAC;AACtB,MAAM,SAAS,MAAM,CAAC;AACtB,MAAM,SAAS,MAAM,CAAC;AACtB,MAAM,SAAS,MAAM,CAAC;","names":[]}
|
package/dist/utils/Promise.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../chunk-4N72FQFX.mjs";
|
|
2
|
-
import { toArray } from "../types";
|
|
2
|
+
import { toArray, toList } from "../types";
|
|
3
3
|
const resolve = (subject) => Promise.resolve(subject);
|
|
4
4
|
const reject = (e) => Promise.reject(e);
|
|
5
5
|
const tuple = {
|
|
@@ -8,7 +8,8 @@ const tuple = {
|
|
|
8
8
|
4: (first, second, third, forth) => Promise.all([first, second, third, forth]),
|
|
9
9
|
5: (first, second, third, forth, fifth) => Promise.all([first, second, third, forth, fifth]),
|
|
10
10
|
all: (first, second) => Promise.all([first, Promise.all(second)]),
|
|
11
|
-
spread: (first, ...second) => Promise.all([first, Promise.all(toArray(second))])
|
|
11
|
+
spread: (first, ...second) => Promise.all([first, Promise.all(toArray(second))]),
|
|
12
|
+
list: (list) => Promise.all([...list]).then(toList)
|
|
12
13
|
};
|
|
13
14
|
const tuple2 = tuple[2];
|
|
14
15
|
const tuple3 = tuple[3];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/Promise.ts"],"sourcesContent":["import { ErrorOrigin, toArray } from '../types';\n\ntype Pro<A> = A | PromiseLike<A>;\ntype Aw<A> = Awaited<A>;\n\nexport const resolve = <S = unknown>(subject: S | PromiseLike<S>): Promise<S> => Promise.resolve(subject);\nexport const reject = <S = never>(e: ErrorOrigin): Promise<S> => Promise.reject(e);\n\nexport const tuple = {\n 2: <F, S>(first: Pro<F>, second: Pro<S>): Promise<[Aw<F>, Aw<S>]> => Promise.all([first, second]),\n 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]),\n 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>]> =>\n Promise.all([first, second, third, forth]),\n 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>]> =>\n Promise.all([first, second, third, forth, fifth]),\n all: <F, S>(first: Pro<F>, second: Pro<S>[]): Promise<[Aw<F>, Aw<S[]>]> => Promise.all([first, Promise.all(second)]),\n spread: <F, S>(first: Pro<F>, ...second: Pro<S>[]): Promise<[Aw<F>, Aw<S[]>]> => Promise.all([first, Promise.all(toArray(second))]),\n};\n\nexport const tuple2 = tuple[2];\nexport const tuple3 = tuple[3];\nexport const tuple4 = tuple[4];\nexport const tuple5 = tuple[5];\n"],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/utils/Promise.ts"],"sourcesContent":["import { ErrorOrigin, List, toArray, toList } from '../types';\n\ntype Pro<A> = A | PromiseLike<A>;\ntype Aw<A> = Awaited<A>;\n\nexport const resolve = <S = unknown>(subject: S | PromiseLike<S>): Promise<S> => Promise.resolve(subject);\nexport const reject = <S = never>(e: ErrorOrigin): Promise<S> => Promise.reject(e);\n\nexport const tuple = {\n 2: <F, S>(first: Pro<F>, second: Pro<S>): Promise<[Aw<F>, Aw<S>]> => Promise.all([first, second]),\n 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]),\n 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>]> =>\n Promise.all([first, second, third, forth]),\n 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>]> =>\n Promise.all([first, second, third, forth, fifth]),\n all: <F, S>(first: Pro<F>, second: Pro<S>[]): Promise<[Aw<F>, Aw<S[]>]> => Promise.all([first, Promise.all(second)]),\n spread: <F, S>(first: Pro<F>, ...second: Pro<S>[]): Promise<[Aw<F>, Aw<S[]>]> => Promise.all([first, Promise.all(toArray(second))]),\n list: <T>(list: Pro<T>[]): Promise<List<Aw<T>>> => Promise.all([...list]).then(toList),\n};\n\nexport const tuple2 = tuple[2];\nexport const tuple3 = tuple[3];\nexport const tuple4 = tuple[4];\nexport const tuple5 = tuple[5];\n"],"mappings":";AAAA,SAA4B,SAAS,cAAc;AAK5C,MAAM,UAAU,CAAc,YAA4C,QAAQ,QAAQ,OAAO;AACjG,MAAM,SAAS,CAAY,MAA+B,QAAQ,OAAO,CAAC;AAE1E,MAAM,QAAQ;AAAA,EACnB,GAAG,CAAO,OAAe,WAA4C,QAAQ,IAAI,CAAC,OAAO,MAAM,CAAC;AAAA,EAChG,GAAG,CAAU,OAAe,QAAgB,UAAkD,QAAQ,IAAI,CAAC,OAAO,QAAQ,KAAK,CAAC;AAAA,EAChI,GAAG,CAAc,OAAe,QAAgB,OAAe,UAC7D,QAAQ,IAAI,CAAC,OAAO,QAAQ,OAAO,KAAK,CAAC;AAAA,EAC3C,GAAG,CAAkB,OAAe,QAAgB,OAAe,OAAgB,UACjF,QAAQ,IAAI,CAAC,OAAO,QAAQ,OAAO,OAAO,KAAK,CAAC;AAAA,EAClD,KAAK,CAAO,OAAe,WAAgD,QAAQ,IAAI,CAAC,OAAO,QAAQ,IAAI,MAAM,CAAC,CAAC;AAAA,EACnH,QAAQ,CAAO,UAAkB,WAAgD,QAAQ,IAAI,CAAC,OAAO,QAAQ,IAAI,QAAQ,MAAM,CAAC,CAAC,CAAC;AAAA,EAClI,MAAM,CAAI,SAAyC,QAAQ,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,KAAK,MAAM;AACvF;AAEO,MAAM,SAAS,MAAM,CAAC;AACtB,MAAM,SAAS,MAAM,CAAC;AACtB,MAAM,SAAS,MAAM,CAAC;AACtB,MAAM,SAAS,MAAM,CAAC;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thisisagile/easy",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.19.0",
|
|
4
4
|
"description": "Straightforward library for building domain-driven microservice architectures",
|
|
5
5
|
"author": "Sander Hoogendoorn",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@thisisagile/easy-test": "15.
|
|
36
|
+
"@thisisagile/easy-test": "15.19.0",
|
|
37
37
|
"@types/form-urlencoded": "^4.4.0",
|
|
38
38
|
"@types/jsonwebtoken": "^9.0.6",
|
|
39
39
|
"@types/luxon": "3.4.2",
|
package/src/utils/Promise.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ErrorOrigin, toArray } from '../types';
|
|
1
|
+
import { ErrorOrigin, List, toArray, toList } from '../types';
|
|
2
2
|
|
|
3
3
|
type Pro<A> = A | PromiseLike<A>;
|
|
4
4
|
type Aw<A> = Awaited<A>;
|
|
@@ -15,6 +15,7 @@ export const tuple = {
|
|
|
15
15
|
Promise.all([first, second, third, forth, fifth]),
|
|
16
16
|
all: <F, S>(first: Pro<F>, second: Pro<S>[]): Promise<[Aw<F>, Aw<S[]>]> => Promise.all([first, Promise.all(second)]),
|
|
17
17
|
spread: <F, S>(first: Pro<F>, ...second: Pro<S>[]): Promise<[Aw<F>, Aw<S[]>]> => Promise.all([first, Promise.all(toArray(second))]),
|
|
18
|
+
list: <T>(list: Pro<T>[]): Promise<List<Aw<T>>> => Promise.all([...list]).then(toList),
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
export const tuple2 = tuple[2];
|