@thisisagile/easy 17.18.5 → 17.18.6
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/{chunk-S33RXRXR.mjs → chunk-2VL6B3UJ.mjs} +9 -9
- package/dist/{chunk-MLAU6FXE.mjs → chunk-3E3YJR6L.mjs} +5 -5
- package/dist/{chunk-SEWX25XP.mjs → chunk-3TI2Y4HN.mjs} +2 -2
- package/dist/{chunk-MCCIBDEH.mjs → chunk-3Y7X2UQ6.mjs} +3 -3
- package/dist/{chunk-ZZ65BSDI.mjs → chunk-4IH3OE4Y.mjs} +3 -3
- package/dist/{chunk-VAT2WY5Y.mjs → chunk-4REZO4ZW.mjs} +3 -3
- package/dist/{chunk-DF6AC3AA.mjs → chunk-55KHMBCA.mjs} +2 -2
- package/dist/{chunk-6ILWOSEE.mjs → chunk-56HLMAA4.mjs} +16 -13
- package/dist/chunk-56HLMAA4.mjs.map +1 -0
- package/dist/{chunk-H2762RTS.mjs → chunk-5FX7PFZG.mjs} +3 -5
- package/dist/{chunk-H2762RTS.mjs.map → chunk-5FX7PFZG.mjs.map} +1 -1
- package/dist/{chunk-D5KAY6YW.mjs → chunk-5HLBJ56K.mjs} +9 -9
- package/dist/{chunk-SSQRH66L.mjs → chunk-6VTDQIEE.mjs} +3 -3
- package/dist/{chunk-OEL3QKBX.mjs → chunk-744LD44R.mjs} +4 -4
- package/dist/{chunk-Q3WMGUO2.mjs → chunk-BGSOJQAU.mjs} +2 -2
- package/dist/{chunk-55SDDPJZ.mjs → chunk-BLB72GKW.mjs} +2 -2
- package/dist/{chunk-A7C3XND3.mjs → chunk-CCJAHP7Z.mjs} +34 -8
- package/dist/chunk-CCJAHP7Z.mjs.map +1 -0
- package/dist/{chunk-Q56PAJ4T.mjs → chunk-COJ6DGFZ.mjs} +2 -2
- package/dist/{chunk-T3CJ5MZK.mjs → chunk-DIJQ6NKV.mjs} +4 -4
- package/dist/{chunk-OYQIOBV7.mjs → chunk-DK6TQHF3.mjs} +3 -3
- package/dist/{chunk-6LGUOSH3.mjs → chunk-DKTEKZ4O.mjs} +4 -4
- package/dist/{chunk-TU7SVDUE.mjs → chunk-DLJOM2QT.mjs} +4 -4
- package/dist/{chunk-WIBQ7LKH.mjs → chunk-EL4LXAN7.mjs} +3 -3
- package/dist/{chunk-6TR4LD27.mjs → chunk-FT66ANA7.mjs} +6 -6
- package/dist/{chunk-KD36HS3N.mjs → chunk-H27UMLDT.mjs} +2 -2
- package/dist/{chunk-3AB2A6WF.mjs → chunk-HCIL5KUZ.mjs} +3 -3
- package/dist/{chunk-BU6LSSQP.mjs → chunk-HN6COYSV.mjs} +2 -2
- package/dist/{chunk-WTFW6DLP.mjs → chunk-HTKGQGMZ.mjs} +3 -3
- package/dist/{chunk-KTENM2OG.mjs → chunk-IANSP3JJ.mjs} +3 -3
- package/dist/{chunk-NKSCRMWF.mjs → chunk-IRUM7VWE.mjs} +2 -2
- package/dist/{chunk-7JFDA4UI.mjs → chunk-KFSHBLFI.mjs} +2 -2
- package/dist/{chunk-LJPESIYZ.mjs → chunk-KXOBVHGI.mjs} +3 -3
- package/dist/{chunk-NCEWAKOZ.mjs → chunk-KYQULNU4.mjs} +2 -2
- package/dist/{chunk-3Q26WV4F.mjs → chunk-LEC6Y5RE.mjs} +8 -8
- package/dist/{chunk-MMGVG4ZW.mjs → chunk-LXCI7XE5.mjs} +3 -3
- package/dist/{chunk-IABTCMHB.mjs → chunk-M6LRND3Z.mjs} +4 -4
- package/dist/{chunk-5HENJTR6.mjs → chunk-PKILDKWU.mjs} +2 -2
- package/dist/{chunk-FD7AIHNO.mjs → chunk-PWTOW5KS.mjs} +2 -2
- package/dist/{chunk-ROJDO7ZE.mjs → chunk-QZUUK6PI.mjs} +4 -4
- package/dist/{chunk-VORW47OU.mjs → chunk-R3LDH6ZW.mjs} +2 -2
- package/dist/{chunk-K3FRMONT.mjs → chunk-SOXQOCCH.mjs} +6 -6
- package/dist/{chunk-W7D4GZRE.mjs → chunk-TZZJ3U5V.mjs} +5 -7
- package/dist/{chunk-W7D4GZRE.mjs.map → chunk-TZZJ3U5V.mjs.map} +1 -1
- package/dist/{chunk-LXENNRRB.mjs → chunk-VCSOI44U.mjs} +2 -2
- package/dist/{chunk-JQQGQCYH.mjs → chunk-YDC3NPU4.mjs} +3 -5
- package/dist/{chunk-JQQGQCYH.mjs.map → chunk-YDC3NPU4.mjs.map} +1 -1
- package/dist/{chunk-MBXA7ZCQ.mjs → chunk-YDEAOY7R.mjs} +2 -2
- package/dist/{chunk-NDCIZJXB.mjs → chunk-YGKMN5UC.mjs} +2 -2
- package/dist/{chunk-KDK2E7CA.mjs → chunk-YH4CTU3I.mjs} +3 -3
- package/dist/{chunk-P2GDPTZ3.mjs → chunk-YQZVVYMQ.mjs} +2 -2
- package/dist/data/Condition.mjs +4 -5
- package/dist/data/Database.mjs +5 -6
- package/dist/data/Field.mjs +4 -5
- package/dist/data/Field.mjs.map +1 -1
- package/dist/data/InMemoryGateway.mjs +13 -14
- package/dist/data/InMemoryGateway.mjs.map +1 -1
- package/dist/domain/Audit.mjs +17 -18
- package/dist/domain/Child.mjs +14 -15
- package/dist/domain/Child.mjs.map +1 -1
- package/dist/domain/DateTime.d.ts +4 -3
- package/dist/domain/DateTime.mjs +13 -14
- package/dist/domain/Entity.mjs +17 -18
- package/dist/domain/Entity.mjs.map +1 -1
- package/dist/domain/Repo.mjs +13 -14
- package/dist/domain/Repo.mjs.map +1 -1
- package/dist/domain/Struct.mjs +13 -14
- package/dist/domain/Typo.mjs +12 -13
- package/dist/domain/Typo.mjs.map +1 -1
- package/dist/http/CacheControl.mjs +13 -14
- package/dist/http/CacheControl.mjs.map +1 -1
- package/dist/http/ContentType.mjs +5 -6
- package/dist/http/HttpStatus.mjs +5 -6
- package/dist/http/HttpVerb.mjs +5 -6
- package/dist/http/LocalRequestStore.mjs +4 -5
- package/dist/http/LocalRequestStore.mjs.map +1 -1
- package/dist/http/RequestOptions.mjs +8 -9
- package/dist/http/RestResult.mjs +13 -14
- package/dist/http/toResponse.mjs +14 -15
- package/dist/index.js +34 -23
- package/dist/index.js.map +1 -1
- package/dist/process/App.mjs +6 -7
- package/dist/process/App.mjs.map +1 -1
- package/dist/process/Manage.mjs +13 -14
- package/dist/process/Manage.mjs.map +1 -1
- package/dist/process/Scope.mjs +6 -7
- package/dist/process/Search.mjs +13 -14
- package/dist/process/UseCase.mjs +5 -6
- package/dist/process/UseCase.mjs.map +1 -1
- package/dist/resources/Req.mjs +12 -13
- package/dist/resources/Req.mjs.map +1 -1
- package/dist/services/Api.mjs +21 -22
- package/dist/services/ApiGateway.mjs +24 -25
- package/dist/services/AxiosProvider.mjs +19 -20
- package/dist/services/MappedRouteGateway.mjs +27 -28
- package/dist/services/MappedRouteGateway.mjs.map +1 -1
- package/dist/services/RouteGateway.mjs +25 -26
- package/dist/services/ViewRouteGateway.mjs +28 -29
- package/dist/services/ViewRouteGateway.mjs.map +1 -1
- package/dist/sql/Column.mjs +12 -13
- package/dist/sql/Count.mjs +4 -5
- package/dist/sql/Delete.mjs +3 -4
- package/dist/sql/Insert.mjs +3 -4
- package/dist/sql/Select.mjs +3 -4
- package/dist/sql/SqlQuery.mjs +2 -3
- package/dist/sql/Table.mjs +21 -22
- package/dist/sql/Table.mjs.map +1 -1
- package/dist/sql/TableGateway.mjs +13 -14
- package/dist/sql/TableGateway.mjs.map +1 -1
- package/dist/sql/Update.mjs +3 -4
- package/dist/types/Cache.mjs +3 -4
- package/dist/types/Cache.mjs.map +1 -1
- package/dist/types/CacheAge.mjs +13 -14
- package/dist/types/Case.mjs +11 -12
- package/dist/types/Context.mjs +4 -5
- package/dist/types/Enum.mjs +4 -5
- package/dist/types/Environment.mjs +4 -5
- package/dist/types/Environment.mjs.map +1 -1
- package/dist/types/Exception.mjs +6 -7
- package/dist/types/Gateway.mjs +8 -9
- package/dist/types/IsEqual.mjs +12 -13
- package/dist/types/Json.mjs +3 -4
- package/dist/types/List.mjs +1 -2
- package/dist/types/Meta.mjs +3 -4
- package/dist/types/Number.mjs +12 -13
- package/dist/types/Object.mjs +2 -3
- package/dist/types/PageList.mjs +12 -13
- package/dist/types/Parser.mjs +11 -12
- package/dist/types/Parser.mjs.map +1 -1
- package/dist/types/Repository.mjs +8 -9
- package/dist/types/Result.mjs +5 -6
- package/dist/types/Results.mjs +6 -7
- package/dist/types/Tag.mjs +3 -4
- package/dist/types/Tag.mjs.map +1 -1
- package/dist/types/Template.mjs +3 -4
- package/dist/types/Try.mjs +11 -12
- package/dist/types/Uri.mjs +11 -12
- package/dist/types/Uri.mjs.map +1 -1
- package/dist/utils/If.d.ts +4 -0
- package/dist/utils/If.mjs +7 -1
- package/dist/utils/Mapper.mjs +5 -6
- package/dist/utils/Promise.mjs +2 -3
- package/dist/utils/Seconds.mjs +2 -3
- package/dist/utils/Sentence.mjs +3 -4
- package/dist/utils/Sentence.mjs.map +1 -1
- package/dist/utils/View.mjs +15 -16
- package/dist/validation/Contraints.mjs +12 -13
- package/dist/validation/Validate.mjs +11 -12
- package/dist/validation/When.mjs +11 -12
- package/package.json +1 -1
- package/src/domain/DateTime.ts +22 -12
- package/src/utils/If.ts +14 -2
- package/dist/chunk-6ILWOSEE.mjs.map +0 -1
- package/dist/chunk-A7C3XND3.mjs.map +0 -1
- package/dist/chunk-JSON7A4X.mjs +0 -30
- package/dist/chunk-JSON7A4X.mjs.map +0 -1
- /package/dist/{chunk-S33RXRXR.mjs.map → chunk-2VL6B3UJ.mjs.map} +0 -0
- /package/dist/{chunk-MLAU6FXE.mjs.map → chunk-3E3YJR6L.mjs.map} +0 -0
- /package/dist/{chunk-SEWX25XP.mjs.map → chunk-3TI2Y4HN.mjs.map} +0 -0
- /package/dist/{chunk-MCCIBDEH.mjs.map → chunk-3Y7X2UQ6.mjs.map} +0 -0
- /package/dist/{chunk-ZZ65BSDI.mjs.map → chunk-4IH3OE4Y.mjs.map} +0 -0
- /package/dist/{chunk-VAT2WY5Y.mjs.map → chunk-4REZO4ZW.mjs.map} +0 -0
- /package/dist/{chunk-DF6AC3AA.mjs.map → chunk-55KHMBCA.mjs.map} +0 -0
- /package/dist/{chunk-D5KAY6YW.mjs.map → chunk-5HLBJ56K.mjs.map} +0 -0
- /package/dist/{chunk-SSQRH66L.mjs.map → chunk-6VTDQIEE.mjs.map} +0 -0
- /package/dist/{chunk-OEL3QKBX.mjs.map → chunk-744LD44R.mjs.map} +0 -0
- /package/dist/{chunk-Q3WMGUO2.mjs.map → chunk-BGSOJQAU.mjs.map} +0 -0
- /package/dist/{chunk-55SDDPJZ.mjs.map → chunk-BLB72GKW.mjs.map} +0 -0
- /package/dist/{chunk-Q56PAJ4T.mjs.map → chunk-COJ6DGFZ.mjs.map} +0 -0
- /package/dist/{chunk-T3CJ5MZK.mjs.map → chunk-DIJQ6NKV.mjs.map} +0 -0
- /package/dist/{chunk-OYQIOBV7.mjs.map → chunk-DK6TQHF3.mjs.map} +0 -0
- /package/dist/{chunk-6LGUOSH3.mjs.map → chunk-DKTEKZ4O.mjs.map} +0 -0
- /package/dist/{chunk-TU7SVDUE.mjs.map → chunk-DLJOM2QT.mjs.map} +0 -0
- /package/dist/{chunk-WIBQ7LKH.mjs.map → chunk-EL4LXAN7.mjs.map} +0 -0
- /package/dist/{chunk-6TR4LD27.mjs.map → chunk-FT66ANA7.mjs.map} +0 -0
- /package/dist/{chunk-KD36HS3N.mjs.map → chunk-H27UMLDT.mjs.map} +0 -0
- /package/dist/{chunk-3AB2A6WF.mjs.map → chunk-HCIL5KUZ.mjs.map} +0 -0
- /package/dist/{chunk-BU6LSSQP.mjs.map → chunk-HN6COYSV.mjs.map} +0 -0
- /package/dist/{chunk-WTFW6DLP.mjs.map → chunk-HTKGQGMZ.mjs.map} +0 -0
- /package/dist/{chunk-KTENM2OG.mjs.map → chunk-IANSP3JJ.mjs.map} +0 -0
- /package/dist/{chunk-NKSCRMWF.mjs.map → chunk-IRUM7VWE.mjs.map} +0 -0
- /package/dist/{chunk-7JFDA4UI.mjs.map → chunk-KFSHBLFI.mjs.map} +0 -0
- /package/dist/{chunk-LJPESIYZ.mjs.map → chunk-KXOBVHGI.mjs.map} +0 -0
- /package/dist/{chunk-NCEWAKOZ.mjs.map → chunk-KYQULNU4.mjs.map} +0 -0
- /package/dist/{chunk-3Q26WV4F.mjs.map → chunk-LEC6Y5RE.mjs.map} +0 -0
- /package/dist/{chunk-MMGVG4ZW.mjs.map → chunk-LXCI7XE5.mjs.map} +0 -0
- /package/dist/{chunk-IABTCMHB.mjs.map → chunk-M6LRND3Z.mjs.map} +0 -0
- /package/dist/{chunk-5HENJTR6.mjs.map → chunk-PKILDKWU.mjs.map} +0 -0
- /package/dist/{chunk-FD7AIHNO.mjs.map → chunk-PWTOW5KS.mjs.map} +0 -0
- /package/dist/{chunk-ROJDO7ZE.mjs.map → chunk-QZUUK6PI.mjs.map} +0 -0
- /package/dist/{chunk-VORW47OU.mjs.map → chunk-R3LDH6ZW.mjs.map} +0 -0
- /package/dist/{chunk-K3FRMONT.mjs.map → chunk-SOXQOCCH.mjs.map} +0 -0
- /package/dist/{chunk-LXENNRRB.mjs.map → chunk-VCSOI44U.mjs.map} +0 -0
- /package/dist/{chunk-MBXA7ZCQ.mjs.map → chunk-YDEAOY7R.mjs.map} +0 -0
- /package/dist/{chunk-NDCIZJXB.mjs.map → chunk-YGKMN5UC.mjs.map} +0 -0
- /package/dist/{chunk-KDK2E7CA.mjs.map → chunk-YH4CTU3I.mjs.map} +0 -0
- /package/dist/{chunk-P2GDPTZ3.mjs.map → chunk-YQZVVYMQ.mjs.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Enum
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HCIL5KUZ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
isAn
|
|
6
6
|
} from "./chunk-ZHXKBOK2.mjs";
|
|
@@ -91,4 +91,4 @@ export {
|
|
|
91
91
|
isHttpStatus,
|
|
92
92
|
toHttpStatus
|
|
93
93
|
};
|
|
94
|
-
//# sourceMappingURL=chunk-
|
|
94
|
+
//# sourceMappingURL=chunk-H27UMLDT.mjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
meta
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HTKGQGMZ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
toList
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CCJAHP7Z.mjs";
|
|
7
7
|
import {
|
|
8
8
|
ofGet
|
|
9
9
|
} from "./chunk-SJGQU3OG.mjs";
|
|
@@ -65,4 +65,4 @@ export {
|
|
|
65
65
|
Enum,
|
|
66
66
|
isEnum
|
|
67
67
|
};
|
|
68
|
-
//# sourceMappingURL=chunk-
|
|
68
|
+
//# sourceMappingURL=chunk-HCIL5KUZ.mjs.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-MDXL65W4.mjs";
|
|
4
4
|
import {
|
|
5
5
|
json
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IANSP3JJ.mjs";
|
|
7
7
|
import {
|
|
8
8
|
isDefined
|
|
9
9
|
} from "./chunk-DEJ7A5PY.mjs";
|
|
@@ -50,4 +50,4 @@ export {
|
|
|
50
50
|
toCondition,
|
|
51
51
|
isSortCondition
|
|
52
52
|
};
|
|
53
|
-
//# sourceMappingURL=chunk-
|
|
53
|
+
//# sourceMappingURL=chunk-HN6COYSV.mjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
entries,
|
|
3
3
|
values
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5FX7PFZG.mjs";
|
|
5
5
|
import {
|
|
6
6
|
toList
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CCJAHP7Z.mjs";
|
|
8
8
|
import {
|
|
9
9
|
on,
|
|
10
10
|
use
|
|
@@ -55,4 +55,4 @@ var meta = (subject) => new ClassMeta(subject ?? {});
|
|
|
55
55
|
export {
|
|
56
56
|
meta
|
|
57
57
|
};
|
|
58
|
-
//# sourceMappingURL=chunk-
|
|
58
|
+
//# sourceMappingURL=chunk-HTKGQGMZ.mjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
entries
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5FX7PFZG.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ifDefined
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CCJAHP7Z.mjs";
|
|
7
7
|
import {
|
|
8
8
|
ofGet
|
|
9
9
|
} from "./chunk-SJGQU3OG.mjs";
|
|
@@ -56,4 +56,4 @@ export {
|
|
|
56
56
|
takeFirstKey,
|
|
57
57
|
any
|
|
58
58
|
};
|
|
59
|
-
//# sourceMappingURL=chunk-
|
|
59
|
+
//# sourceMappingURL=chunk-IANSP3JJ.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SqlQuery
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BLB72GKW.mjs";
|
|
4
4
|
import {
|
|
5
5
|
quote
|
|
6
6
|
} from "./chunk-OKPGJD64.mjs";
|
|
@@ -20,4 +20,4 @@ var Insert = class extends SqlQuery {
|
|
|
20
20
|
export {
|
|
21
21
|
Insert
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=chunk-
|
|
23
|
+
//# sourceMappingURL=chunk-IRUM7VWE.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Enum
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HCIL5KUZ.mjs";
|
|
4
4
|
|
|
5
5
|
// src/http/HttpVerb.ts
|
|
6
6
|
var HttpVerb = class _HttpVerb extends Enum {
|
|
@@ -17,4 +17,4 @@ var HttpVerb = class _HttpVerb extends Enum {
|
|
|
17
17
|
export {
|
|
18
18
|
HttpVerb
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=chunk-
|
|
20
|
+
//# sourceMappingURL=chunk-KFSHBLFI.mjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
text
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3Y7X2UQ6.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Enum
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HCIL5KUZ.mjs";
|
|
7
7
|
import {
|
|
8
8
|
asString
|
|
9
9
|
} from "./chunk-BDA5LB4S.mjs";
|
|
@@ -37,4 +37,4 @@ export {
|
|
|
37
37
|
isException,
|
|
38
38
|
isDoesNotExist
|
|
39
39
|
};
|
|
40
|
-
//# sourceMappingURL=chunk-
|
|
40
|
+
//# sourceMappingURL=chunk-KXOBVHGI.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isResult,
|
|
3
3
|
toResult
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BGSOJQAU.mjs";
|
|
5
5
|
import {
|
|
6
6
|
toArray
|
|
7
7
|
} from "./chunk-CO2AFYVD.mjs";
|
|
@@ -32,4 +32,4 @@ export {
|
|
|
32
32
|
toResults,
|
|
33
33
|
isResults
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=chunk-
|
|
35
|
+
//# sourceMappingURL=chunk-KYQULNU4.mjs.map
|
|
@@ -3,27 +3,27 @@ import {
|
|
|
3
3
|
} from "./chunk-SSROJBD5.mjs";
|
|
4
4
|
import {
|
|
5
5
|
isEqual
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-COJ6DGFZ.mjs";
|
|
7
7
|
import {
|
|
8
8
|
isPageList,
|
|
9
9
|
toPageList
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YH4CTU3I.mjs";
|
|
11
11
|
import {
|
|
12
12
|
asJson,
|
|
13
13
|
json
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IANSP3JJ.mjs";
|
|
15
15
|
import {
|
|
16
16
|
choose
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5HLBJ56K.mjs";
|
|
18
18
|
import {
|
|
19
19
|
isEnumConstructor
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-HCIL5KUZ.mjs";
|
|
21
21
|
import {
|
|
22
22
|
meta
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-HTKGQGMZ.mjs";
|
|
24
24
|
import {
|
|
25
25
|
ifDefined
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-CCJAHP7Z.mjs";
|
|
27
27
|
import {
|
|
28
28
|
isConstructor,
|
|
29
29
|
use
|
|
@@ -102,4 +102,4 @@ export {
|
|
|
102
102
|
view,
|
|
103
103
|
views
|
|
104
104
|
};
|
|
105
|
-
//# sourceMappingURL=chunk-
|
|
105
|
+
//# sourceMappingURL=chunk-LEC6Y5RE.mjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
reject
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PKILDKWU.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Exception
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KXOBVHGI.mjs";
|
|
7
7
|
|
|
8
8
|
// src/types/Gateway.ts
|
|
9
9
|
var Gateway = class {
|
|
@@ -42,4 +42,4 @@ var Gateway = class {
|
|
|
42
42
|
export {
|
|
43
43
|
Gateway
|
|
44
44
|
};
|
|
45
|
-
//# sourceMappingURL=chunk-
|
|
45
|
+
//# sourceMappingURL=chunk-LXCI7XE5.mjs.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ApiGateway
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-744LD44R.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Api
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DLJOM2QT.mjs";
|
|
7
7
|
import {
|
|
8
8
|
HttpStatus
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-H27UMLDT.mjs";
|
|
10
10
|
import {
|
|
11
11
|
toArray
|
|
12
12
|
} from "./chunk-CO2AFYVD.mjs";
|
|
@@ -54,4 +54,4 @@ var RouteGateway = class extends ApiGateway {
|
|
|
54
54
|
export {
|
|
55
55
|
RouteGateway
|
|
56
56
|
};
|
|
57
|
-
//# sourceMappingURL=chunk-
|
|
57
|
+
//# sourceMappingURL=chunk-M6LRND3Z.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toList
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CCJAHP7Z.mjs";
|
|
4
4
|
import {
|
|
5
5
|
toArray
|
|
6
6
|
} from "./chunk-CO2AFYVD.mjs";
|
|
@@ -40,4 +40,4 @@ export {
|
|
|
40
40
|
tuple5,
|
|
41
41
|
settled
|
|
42
42
|
};
|
|
43
|
-
//# sourceMappingURL=chunk-
|
|
43
|
+
//# sourceMappingURL=chunk-PKILDKWU.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SqlQuery
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BLB72GKW.mjs";
|
|
4
4
|
import {
|
|
5
5
|
toClause
|
|
6
6
|
} from "./chunk-OKPGJD64.mjs";
|
|
@@ -23,4 +23,4 @@ var Update = class extends SqlQuery {
|
|
|
23
23
|
export {
|
|
24
24
|
Update
|
|
25
25
|
};
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
26
|
+
//# sourceMappingURL=chunk-PWTOW5KS.mjs.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
text
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3Y7X2UQ6.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Enum
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HCIL5KUZ.mjs";
|
|
7
7
|
import {
|
|
8
8
|
toList
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CCJAHP7Z.mjs";
|
|
10
10
|
import {
|
|
11
11
|
kebab
|
|
12
12
|
} from "./chunk-BDA5LB4S.mjs";
|
|
@@ -36,4 +36,4 @@ var Scope = class _Scope extends Enum {
|
|
|
36
36
|
export {
|
|
37
37
|
Scope
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-QZUUK6PI.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Enum
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HCIL5KUZ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ofConstruct
|
|
6
6
|
} from "./chunk-ZPNFXK7Y.mjs";
|
|
@@ -22,4 +22,4 @@ export {
|
|
|
22
22
|
DefaultProvider,
|
|
23
23
|
Database
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-R3LDH6ZW.mjs.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
required,
|
|
3
3
|
valid
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3E3YJR6L.mjs";
|
|
5
5
|
import {
|
|
6
6
|
DateTime
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-56HLMAA4.mjs";
|
|
8
8
|
import {
|
|
9
9
|
Struct
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DK6TQHF3.mjs";
|
|
11
11
|
import {
|
|
12
12
|
choose
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5HLBJ56K.mjs";
|
|
14
14
|
import {
|
|
15
15
|
ctx
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-YGKMN5UC.mjs";
|
|
17
17
|
import {
|
|
18
18
|
isIdentity
|
|
19
19
|
} from "./chunk-ZHXKBOK2.mjs";
|
|
@@ -47,4 +47,4 @@ __decorateClass([
|
|
|
47
47
|
export {
|
|
48
48
|
Audit
|
|
49
49
|
};
|
|
50
|
-
//# sourceMappingURL=chunk-
|
|
50
|
+
//# sourceMappingURL=chunk-SOXQOCCH.mjs.map
|
|
@@ -6,16 +6,14 @@ import {
|
|
|
6
6
|
} from "./chunk-GCY5A63A.mjs";
|
|
7
7
|
import {
|
|
8
8
|
json
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IANSP3JJ.mjs";
|
|
10
10
|
import {
|
|
11
11
|
meta
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HTKGQGMZ.mjs";
|
|
13
13
|
import {
|
|
14
|
+
ifNotEmpty,
|
|
14
15
|
toList
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
ifNotEmpty
|
|
18
|
-
} from "./chunk-JSON7A4X.mjs";
|
|
16
|
+
} from "./chunk-CCJAHP7Z.mjs";
|
|
19
17
|
import {
|
|
20
18
|
ofGet
|
|
21
19
|
} from "./chunk-SJGQU3OG.mjs";
|
|
@@ -133,4 +131,4 @@ export {
|
|
|
133
131
|
Mapper,
|
|
134
132
|
mappings
|
|
135
133
|
};
|
|
136
|
-
//# sourceMappingURL=chunk-
|
|
134
|
+
//# sourceMappingURL=chunk-TZZJ3U5V.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/Mapper.ts"],"sourcesContent":["import { Property, PropertyOptions } from './Property';\nimport { State } from './State';\nimport { ifNotEmpty } from './If';\nimport { json, Json, JsonValue } from '../types/Json';\nimport { Optional } from '../types/Types';\nimport { TypeGuard } from '../types/TypeGuard';\nimport { isA } from '../types/IsA';\nimport { List, toList } from '../types/List';\nimport { meta } from '../types/Meta';\nimport { isEmpty } from '../types/Is';\nimport { Get, ofGet } from '../types/Get';\nimport { Construct, ofConstruct } from '../types/Constructor';\n\nexport type Mapping = {\n property: string;\n in: (source?: Json, key?: string) => Optional<JsonValue>;\n out: (source?: Json, key?: string) => Optional<JsonValue>;\n};\nexport const isMapping: TypeGuard<Mapping> = (m?: unknown): m is Mapping => isA<Mapping>(m, 'in', 'out');\n\nexport type MapStartFrom = 'scratch' | 'source';\nexport type MapOptions = { startFrom: MapStartFrom };\n\nexport class Mapper extends State implements Mapping {\n protected readonly map = mappings;\n\n constructor(\n readonly options: MapOptions = { startFrom: 'scratch' },\n readonly property = ''\n ) {\n super();\n }\n\n // All properties that are a mapping\n get properties(): List<[string, Mapping]> {\n return this.get('props', () =>\n meta(this)\n .entries<Mapping>()\n .filter(([, v]) => isMapping(v))\n );\n }\n\n // All names of properties (in target) that have a Mapping\n get keys(): List<string> {\n return this.get('keys', () => this.properties.map(([k]) => k));\n }\n\n // All names of properties (in source) that are named in a Mapping\n get columns(): List<string> {\n return this.get('columns', () => this.properties.mapDefined(([, p]) => ifNotEmpty(p.property, p.property))).distinct();\n }\n\n // All names of properties (in source) that are NOT properties in target\n private get droppedIn(): List<string> {\n return this.get('droppedIn', () => this.columns.filter(c => !this.keys.some(k => k === c)));\n }\n\n // All names op properties (in target) that are NOT properties in source\n private get droppedOut(): List<string> {\n return this.get('droppedOut', () => this.properties.filter(([, p]) => !this.keys.some(k => k === p.property)).map(([k]) => k));\n }\n\n public in(from: Json = {}): Json {\n return json.omit(\n this.properties.reduce((a, [k, p]) => json.merge(a, { [k]: p.in({ ...a, ...from }) }), this.options.startFrom === 'source' ? from : {}),\n ...this.droppedIn\n );\n }\n\n public out(to: Json = {}): Json {\n return json.omit(\n this.properties.reduce(\n (a, [k, p]) => json.merge(a, isEmpty(p.property) ? p.out(to, k) : { [p.property ?? '']: p.out({ ...a, ...to }, k) }),\n this.options.startFrom === 'source' ? to : {}\n ),\n ...this.droppedOut\n );\n }\n\n toString(): string {\n return this.constructor.name;\n }\n}\n\nexport const mappings = {\n item: (property: string, options?: PropertyOptions): Property => new Property(property, options),\n ignore: (property = ''): Mapping => ({\n property,\n in: (): Optional<JsonValue> => undefined,\n out: (): Optional<JsonValue> => undefined,\n }),\n skipIn: (property: string): Mapping => ({\n property,\n in: (): Optional<JsonValue> => undefined,\n out: (source: Json = {}): JsonValue => source[property],\n }),\n skipOut: (property: string): Mapping => ({\n property,\n in: (source: Json = {}): JsonValue => source[property],\n out: (): Optional<JsonValue> => undefined,\n }),\n func: (property: string, funcIn: Get<Optional<JsonValue>, Json>, funcOut: Get<Optional<JsonValue>, Json>): Mapping => ({\n property,\n in: (source: Json = {}): Optional<JsonValue> => ofGet(funcIn, source),\n out: (source: Json = {}): Optional<JsonValue> => ofGet(funcOut, source),\n }),\n add: (funcIn: Get<JsonValue, Json>): Mapping => ({\n property: '',\n in: (source: Json = {}): JsonValue => ofGet(funcIn, source),\n out: (): Optional<JsonValue> => undefined,\n }),\n map: (mapper: Construct<Mapper>, property = ''): Mapping => ({\n property,\n in: (source: Json = {}): JsonValue => ofConstruct(mapper).in(isEmpty(property) ? source : (source[property] as Json)),\n out: (source: Json = {}, key = ''): JsonValue => ofConstruct(mapper).out(isEmpty(key) ? source : (source[key] as Json)),\n }),\n propsToList: (...maps: Mapping[]): Mapping => ({\n property: '',\n in: (source: Json = {}): JsonValue => toList(maps.map(m => ofConstruct(m).in(source))).toJSON(),\n out: (source: Json = {}, key = ''): JsonValue =>\n maps.reduce((a: Json, m, i) => {\n const res = toList(source[key])[i];\n const out = m.out(res as Json);\n return { ...a, [m.property]: out ?? {} };\n }, {}),\n }),\n list: (mapper: Mapping, property: string): Mapping => ({\n property,\n in: (source: Json = {}): JsonValue =>\n toList(source[property])\n .map((v: any) => mapper.in(v))\n .toJSON(),\n out: (source: Json = {}, key = ''): JsonValue =>\n toList(isEmpty(key) ? source : (source[key] as Json))\n .map((v: any) => mapper.out(v))\n .toJSON(),\n }),\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/utils/Mapper.ts"],"sourcesContent":["import { Property, PropertyOptions } from './Property';\nimport { State } from './State';\nimport { ifNotEmpty } from './If';\nimport { json, Json, JsonValue } from '../types/Json';\nimport { Optional } from '../types/Types';\nimport { TypeGuard } from '../types/TypeGuard';\nimport { isA } from '../types/IsA';\nimport { List, toList } from '../types/List';\nimport { meta } from '../types/Meta';\nimport { isEmpty } from '../types/Is';\nimport { Get, ofGet } from '../types/Get';\nimport { Construct, ofConstruct } from '../types/Constructor';\n\nexport type Mapping = {\n property: string;\n in: (source?: Json, key?: string) => Optional<JsonValue>;\n out: (source?: Json, key?: string) => Optional<JsonValue>;\n};\nexport const isMapping: TypeGuard<Mapping> = (m?: unknown): m is Mapping => isA<Mapping>(m, 'in', 'out');\n\nexport type MapStartFrom = 'scratch' | 'source';\nexport type MapOptions = { startFrom: MapStartFrom };\n\nexport class Mapper extends State implements Mapping {\n protected readonly map = mappings;\n\n constructor(\n readonly options: MapOptions = { startFrom: 'scratch' },\n readonly property = ''\n ) {\n super();\n }\n\n // All properties that are a mapping\n get properties(): List<[string, Mapping]> {\n return this.get('props', () =>\n meta(this)\n .entries<Mapping>()\n .filter(([, v]) => isMapping(v))\n );\n }\n\n // All names of properties (in target) that have a Mapping\n get keys(): List<string> {\n return this.get('keys', () => this.properties.map(([k]) => k));\n }\n\n // All names of properties (in source) that are named in a Mapping\n get columns(): List<string> {\n return this.get('columns', () => this.properties.mapDefined(([, p]) => ifNotEmpty(p.property, p.property))).distinct();\n }\n\n // All names of properties (in source) that are NOT properties in target\n private get droppedIn(): List<string> {\n return this.get('droppedIn', () => this.columns.filter(c => !this.keys.some(k => k === c)));\n }\n\n // All names op properties (in target) that are NOT properties in source\n private get droppedOut(): List<string> {\n return this.get('droppedOut', () => this.properties.filter(([, p]) => !this.keys.some(k => k === p.property)).map(([k]) => k));\n }\n\n public in(from: Json = {}): Json {\n return json.omit(\n this.properties.reduce((a, [k, p]) => json.merge(a, { [k]: p.in({ ...a, ...from }) }), this.options.startFrom === 'source' ? from : {}),\n ...this.droppedIn\n );\n }\n\n public out(to: Json = {}): Json {\n return json.omit(\n this.properties.reduce(\n (a, [k, p]) => json.merge(a, isEmpty(p.property) ? p.out(to, k) : { [p.property ?? '']: p.out({ ...a, ...to }, k) }),\n this.options.startFrom === 'source' ? to : {}\n ),\n ...this.droppedOut\n );\n }\n\n toString(): string {\n return this.constructor.name;\n }\n}\n\nexport const mappings = {\n item: (property: string, options?: PropertyOptions): Property => new Property(property, options),\n ignore: (property = ''): Mapping => ({\n property,\n in: (): Optional<JsonValue> => undefined,\n out: (): Optional<JsonValue> => undefined,\n }),\n skipIn: (property: string): Mapping => ({\n property,\n in: (): Optional<JsonValue> => undefined,\n out: (source: Json = {}): JsonValue => source[property],\n }),\n skipOut: (property: string): Mapping => ({\n property,\n in: (source: Json = {}): JsonValue => source[property],\n out: (): Optional<JsonValue> => undefined,\n }),\n func: (property: string, funcIn: Get<Optional<JsonValue>, Json>, funcOut: Get<Optional<JsonValue>, Json>): Mapping => ({\n property,\n in: (source: Json = {}): Optional<JsonValue> => ofGet(funcIn, source),\n out: (source: Json = {}): Optional<JsonValue> => ofGet(funcOut, source),\n }),\n add: (funcIn: Get<JsonValue, Json>): Mapping => ({\n property: '',\n in: (source: Json = {}): JsonValue => ofGet(funcIn, source),\n out: (): Optional<JsonValue> => undefined,\n }),\n map: (mapper: Construct<Mapper>, property = ''): Mapping => ({\n property,\n in: (source: Json = {}): JsonValue => ofConstruct(mapper).in(isEmpty(property) ? source : (source[property] as Json)),\n out: (source: Json = {}, key = ''): JsonValue => ofConstruct(mapper).out(isEmpty(key) ? source : (source[key] as Json)),\n }),\n propsToList: (...maps: Mapping[]): Mapping => ({\n property: '',\n in: (source: Json = {}): JsonValue => toList(maps.map(m => ofConstruct(m).in(source))).toJSON(),\n out: (source: Json = {}, key = ''): JsonValue =>\n maps.reduce((a: Json, m, i) => {\n const res = toList(source[key])[i];\n const out = m.out(res as Json);\n return { ...a, [m.property]: out ?? {} };\n }, {}),\n }),\n list: (mapper: Mapping, property: string): Mapping => ({\n property,\n in: (source: Json = {}): JsonValue =>\n toList(source[property])\n .map((v: any) => mapper.in(v))\n .toJSON(),\n out: (source: Json = {}, key = ''): JsonValue =>\n toList(isEmpty(key) ? source : (source[key] as Json))\n .map((v: any) => mapper.out(v))\n .toJSON(),\n }),\n};\n"],"mappings":"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","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Select
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6VTDQIEE.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ifGet
|
|
6
6
|
} from "./chunk-SJGQU3OG.mjs";
|
|
@@ -15,4 +15,4 @@ var Count = class extends Select {
|
|
|
15
15
|
export {
|
|
16
16
|
Count
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=chunk-
|
|
18
|
+
//# sourceMappingURL=chunk-VCSOI44U.mjs.map
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ifTrue,
|
|
2
3
|
toList
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
ifTrue
|
|
6
|
-
} from "./chunk-JSON7A4X.mjs";
|
|
4
|
+
} from "./chunk-CCJAHP7Z.mjs";
|
|
7
5
|
|
|
8
6
|
// src/utils/Seconds.ts
|
|
9
7
|
var seconds = {
|
|
@@ -23,4 +21,4 @@ var seconds = {
|
|
|
23
21
|
export {
|
|
24
22
|
seconds
|
|
25
23
|
};
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
24
|
+
//# sourceMappingURL=chunk-YDC3NPU4.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/Seconds.ts"],"sourcesContent":["import { ifTrue } from './If';\nimport { toList } from '../types/List';\n\nexport const seconds = {\n toDuration: (s: number) => {\n const seconds = s % 60;\n const minutes = Math.floor(s / 60) % 60;\n const hours = Math.floor(s / 3600) % 24;\n const days = Math.floor(s / 86400);\n return { days, hours, minutes, seconds };\n },\n\n toText: (s: number): string => {\n const { days, hours, minutes, seconds: secs } = seconds.toDuration(s);\n return toList(ifTrue(days, `${days}d`), ifTrue(hours, `${hours}h`), ifTrue(minutes, `${minutes}m`), ifTrue(days + hours + minutes === 0, `${secs}s`))\n .mapDefined(s => s)\n .join(' ');\n },\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/utils/Seconds.ts"],"sourcesContent":["import { ifTrue } from './If';\nimport { toList } from '../types/List';\n\nexport const seconds = {\n toDuration: (s: number) => {\n const seconds = s % 60;\n const minutes = Math.floor(s / 60) % 60;\n const hours = Math.floor(s / 3600) % 24;\n const days = Math.floor(s / 86400);\n return { days, hours, minutes, seconds };\n },\n\n toText: (s: number): string => {\n const { days, hours, minutes, seconds: secs } = seconds.toDuration(s);\n return toList(ifTrue(days, `${days}d`), ifTrue(hours, `${hours}h`), ifTrue(minutes, `${minutes}m`), ifTrue(days + hours + minutes === 0, `${secs}s`))\n .mapDefined(s => s)\n .join(' ');\n },\n};\n"],"mappings":";;;;;;AAGO,IAAM,UAAU;AAAA,EACrB,YAAY,CAAC,MAAc;AACzB,UAAMA,WAAU,IAAI;AACpB,UAAM,UAAU,KAAK,MAAM,IAAI,EAAE,IAAI;AACrC,UAAM,QAAQ,KAAK,MAAM,IAAI,IAAI,IAAI;AACrC,UAAM,OAAO,KAAK,MAAM,IAAI,KAAK;AACjC,WAAO,EAAE,MAAM,OAAO,SAAS,SAAAA,SAAQ;AAAA,EACzC;AAAA,EAEA,QAAQ,CAAC,MAAsB;AAC7B,UAAM,EAAE,MAAM,OAAO,SAAS,SAAS,KAAK,IAAI,QAAQ,WAAW,CAAC;AACpE,WAAO,OAAO,OAAO,MAAM,GAAG,IAAI,GAAG,GAAG,OAAO,OAAO,GAAG,KAAK,GAAG,GAAG,OAAO,SAAS,GAAG,OAAO,GAAG,GAAG,OAAO,OAAO,QAAQ,YAAY,GAAG,GAAG,IAAI,GAAG,CAAC,EACjJ,WAAW,CAAAC,OAAKA,EAAC,EACjB,KAAK,GAAG;AAAA,EACb;AACF;","names":["seconds","s"]}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-GCY5A63A.mjs";
|
|
7
7
|
import {
|
|
8
8
|
tryTo
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5HLBJ56K.mjs";
|
|
10
10
|
import {
|
|
11
11
|
ofGet
|
|
12
12
|
} from "./chunk-SJGQU3OG.mjs";
|
|
@@ -79,4 +79,4 @@ export {
|
|
|
79
79
|
PatternColumn,
|
|
80
80
|
OrderColumn
|
|
81
81
|
};
|
|
82
|
-
//# sourceMappingURL=chunk-
|
|
82
|
+
//# sourceMappingURL=chunk-YDEAOY7R.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
text
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3Y7X2UQ6.mjs";
|
|
4
4
|
|
|
5
5
|
// src/types/Context.ts
|
|
6
6
|
var DotEnvContext = class {
|
|
@@ -91,4 +91,4 @@ export {
|
|
|
91
91
|
Context,
|
|
92
92
|
ctx
|
|
93
93
|
};
|
|
94
|
-
//# sourceMappingURL=chunk-
|
|
94
|
+
//# sourceMappingURL=chunk-YGKMN5UC.mjs.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
choose
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5HLBJ56K.mjs";
|
|
4
4
|
import {
|
|
5
5
|
List,
|
|
6
6
|
isList,
|
|
7
7
|
toList
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CCJAHP7Z.mjs";
|
|
9
9
|
import {
|
|
10
10
|
isA
|
|
11
11
|
} from "./chunk-ZHXKBOK2.mjs";
|
|
@@ -170,4 +170,4 @@ export {
|
|
|
170
170
|
toPageList,
|
|
171
171
|
asPageList
|
|
172
172
|
};
|
|
173
|
-
//# sourceMappingURL=chunk-
|
|
173
|
+
//# sourceMappingURL=chunk-YH4CTU3I.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Enum
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HCIL5KUZ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
asString
|
|
6
6
|
} from "./chunk-BDA5LB4S.mjs";
|
|
@@ -28,4 +28,4 @@ var ContentType = class _ContentType extends Enum {
|
|
|
28
28
|
export {
|
|
29
29
|
ContentType
|
|
30
30
|
};
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
31
|
+
//# sourceMappingURL=chunk-YQZVVYMQ.mjs.map
|
package/dist/data/Condition.mjs
CHANGED
|
@@ -4,12 +4,11 @@ import {
|
|
|
4
4
|
SortCondition,
|
|
5
5
|
isSortCondition,
|
|
6
6
|
toCondition
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-HN6COYSV.mjs";
|
|
8
8
|
import "../chunk-MDXL65W4.mjs";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-JSON7A4X.mjs";
|
|
9
|
+
import "../chunk-IANSP3JJ.mjs";
|
|
10
|
+
import "../chunk-5FX7PFZG.mjs";
|
|
11
|
+
import "../chunk-CCJAHP7Z.mjs";
|
|
13
12
|
import "../chunk-CO2AFYVD.mjs";
|
|
14
13
|
import "../chunk-BDA5LB4S.mjs";
|
|
15
14
|
import "../chunk-SJGQU3OG.mjs";
|
package/dist/data/Database.mjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Database,
|
|
3
3
|
DefaultProvider
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-JSON7A4X.mjs";
|
|
4
|
+
} from "../chunk-R3LDH6ZW.mjs";
|
|
5
|
+
import "../chunk-HCIL5KUZ.mjs";
|
|
6
|
+
import "../chunk-HTKGQGMZ.mjs";
|
|
7
|
+
import "../chunk-5FX7PFZG.mjs";
|
|
8
|
+
import "../chunk-CCJAHP7Z.mjs";
|
|
10
9
|
import "../chunk-CO2AFYVD.mjs";
|
|
11
10
|
import "../chunk-BDA5LB4S.mjs";
|
|
12
11
|
import "../chunk-SJGQU3OG.mjs";
|
package/dist/data/Field.mjs
CHANGED
|
@@ -4,12 +4,11 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
SortCondition,
|
|
6
6
|
toCondition
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-HN6COYSV.mjs";
|
|
8
8
|
import "../chunk-MDXL65W4.mjs";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-JSON7A4X.mjs";
|
|
9
|
+
import "../chunk-IANSP3JJ.mjs";
|
|
10
|
+
import "../chunk-5FX7PFZG.mjs";
|
|
11
|
+
import "../chunk-CCJAHP7Z.mjs";
|
|
13
12
|
import {
|
|
14
13
|
toArray
|
|
15
14
|
} from "../chunk-CO2AFYVD.mjs";
|
package/dist/data/Field.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/data/Field.ts"],"sourcesContent":["import { Condition, SortCondition, toCondition } from './Condition';\nimport { Property } from '../utils/Property';\nimport { toArray } from '../types/Array';\nimport { isDefined } from '../types/Is';\n\nexport class Field extends Property {\n is = (value: unknown): Condition => this.condition('eq', value);\n\n isNot = (value: unknown): Condition => this.condition('ne', value);\n\n isIn = (...value: unknown[]): Condition => this.condition('in', toArray(value));\n\n notIn = (...value: unknown[]): Condition => this.condition('nin', toArray(value));\n\n exists = (does: boolean): Condition => this.condition('exists', does);\n\n greater = (value: unknown): Condition => this.condition('gt', value);\n\n greaterEqual = (value: unknown): Condition => this.condition('gte', value);\n\n less = (value: unknown): Condition => this.condition('lt', value);\n\n lessEqual = (value: unknown): Condition => this.condition('lte', value);\n\n asc = (): SortCondition => new SortCondition(this.property, 1);\n\n desc = (): SortCondition => new SortCondition(this.property, -1);\n\n protected condition = (operator: string, value: unknown): Condition => toCondition(this.property, operator, value, this.options?.convert);\n}\n\nexport const isField = (f?: unknown): f is Field => isDefined(f) && f instanceof Field;\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/data/Field.ts"],"sourcesContent":["import { Condition, SortCondition, toCondition } from './Condition';\nimport { Property } from '../utils/Property';\nimport { toArray } from '../types/Array';\nimport { isDefined } from '../types/Is';\n\nexport class Field extends Property {\n is = (value: unknown): Condition => this.condition('eq', value);\n\n isNot = (value: unknown): Condition => this.condition('ne', value);\n\n isIn = (...value: unknown[]): Condition => this.condition('in', toArray(value));\n\n notIn = (...value: unknown[]): Condition => this.condition('nin', toArray(value));\n\n exists = (does: boolean): Condition => this.condition('exists', does);\n\n greater = (value: unknown): Condition => this.condition('gt', value);\n\n greaterEqual = (value: unknown): Condition => this.condition('gte', value);\n\n less = (value: unknown): Condition => this.condition('lt', value);\n\n lessEqual = (value: unknown): Condition => this.condition('lte', value);\n\n asc = (): SortCondition => new SortCondition(this.property, 1);\n\n desc = (): SortCondition => new SortCondition(this.property, -1);\n\n protected condition = (operator: string, value: unknown): Condition => toCondition(this.property, operator, value, this.options?.convert);\n}\n\nexport const isField = (f?: unknown): f is Field => isDefined(f) && f instanceof Field;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,IAAM,QAAN,cAAoB,SAAS;AAAA,EAClC,KAAK,CAAC,UAA8B,KAAK,UAAU,MAAM,KAAK;AAAA,EAE9D,QAAQ,CAAC,UAA8B,KAAK,UAAU,MAAM,KAAK;AAAA,EAEjE,OAAO,IAAI,UAAgC,KAAK,UAAU,MAAM,QAAQ,KAAK,CAAC;AAAA,EAE9E,QAAQ,IAAI,UAAgC,KAAK,UAAU,OAAO,QAAQ,KAAK,CAAC;AAAA,EAEhF,SAAS,CAAC,SAA6B,KAAK,UAAU,UAAU,IAAI;AAAA,EAEpE,UAAU,CAAC,UAA8B,KAAK,UAAU,MAAM,KAAK;AAAA,EAEnE,eAAe,CAAC,UAA8B,KAAK,UAAU,OAAO,KAAK;AAAA,EAEzE,OAAO,CAAC,UAA8B,KAAK,UAAU,MAAM,KAAK;AAAA,EAEhE,YAAY,CAAC,UAA8B,KAAK,UAAU,OAAO,KAAK;AAAA,EAEtE,MAAM,MAAqB,IAAI,cAAc,KAAK,UAAU,CAAC;AAAA,EAE7D,OAAO,MAAqB,IAAI,cAAc,KAAK,UAAU,EAAE;AAAA,EAErD,YAAY,CAAC,UAAkB,UAA8B,YAAY,KAAK,UAAU,UAAU,OAAO,KAAK,SAAS,OAAO;AAC1I;AAEO,IAAM,UAAU,CAAC,MAA4B,UAAU,CAAC,KAAK,aAAa;","names":[]}
|
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Gateway
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-LXCI7XE5.mjs";
|
|
4
4
|
import {
|
|
5
5
|
toPageList
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-YH4CTU3I.mjs";
|
|
7
7
|
import {
|
|
8
8
|
when
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-5HLBJ56K.mjs";
|
|
10
10
|
import "../chunk-OFGI5FLG.mjs";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-KYQULNU4.mjs";
|
|
12
|
+
import "../chunk-BGSOJQAU.mjs";
|
|
13
|
+
import "../chunk-PKILDKWU.mjs";
|
|
14
14
|
import {
|
|
15
15
|
Exception
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-KXOBVHGI.mjs";
|
|
17
17
|
import "../chunk-WSBULPUZ.mjs";
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-JSON7A4X.mjs";
|
|
18
|
+
import "../chunk-YGKMN5UC.mjs";
|
|
19
|
+
import "../chunk-3Y7X2UQ6.mjs";
|
|
20
|
+
import "../chunk-HCIL5KUZ.mjs";
|
|
21
|
+
import "../chunk-HTKGQGMZ.mjs";
|
|
22
|
+
import "../chunk-5FX7PFZG.mjs";
|
|
23
|
+
import "../chunk-CCJAHP7Z.mjs";
|
|
25
24
|
import "../chunk-CO2AFYVD.mjs";
|
|
26
25
|
import "../chunk-BDA5LB4S.mjs";
|
|
27
26
|
import "../chunk-SJGQU3OG.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/data/InMemoryGateway.ts"],"sourcesContent":["import { FetchOptions, Gateway } from '../types/Gateway';\nimport { PageList, toPageList } from '../types/PageList';\nimport { Json, JsonValue } from '../types/Json';\nimport { Id } from '../types/Id';\nimport { Optional } from '../types/Types';\nimport { isDefined } from '../types/Is';\nimport { when } from '../validation/When';\nimport { Exception } from '../types/Exception';\n\nexport class InMemoryGateway extends Gateway {\n constructor(private readonly data: Promise<PageList<Json>>) {\n super();\n }\n\n all(options?: FetchOptions): Promise<PageList<Json>> {\n return this.data.then(d => toPageList(d, d));\n }\n\n byId(id: Id): Promise<Optional<Json>> {\n return this.data.then(d => d.byId(id)).then(d => (d ? { ...d } : undefined));\n }\n\n by = (key: string, value: JsonValue): Promise<PageList<Json>> => {\n return this.data.then(d => d.filter(i => i[key] === value));\n };\n\n exists(id: Id): Promise<boolean> {\n return this.byId(id).then(d => isDefined(d));\n }\n\n add(item: Json): Promise<Json> {\n return when(item)\n .not.contains(i => i.id)\n .reject(Exception.IsMissingId)\n .then(i => this.exists(i.id as Id))\n .then(ex => when(ex).isTrue.reject(Exception.AlreadyExists))\n .then(() => this.data.then(d => d.add(item)))\n .then(() => ({ ...item }));\n }\n\n remove(id: Id): Promise<true> {\n return this.data\n .then(d =>\n when(d.findIndex(i => i.id === id))\n .with(i => i < 0)\n .reject(Exception.DoesNotExist)\n .then(i => d.splice(i, 1))\n )\n .then(() => true);\n }\n\n update(item: Json): Promise<Json> {\n return when(item)\n .not.contains(i => i.id)\n .reject(Exception.IsMissingId)\n .then(i => this.remove(i.id as Id).then(() => this.add(i)));\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/data/InMemoryGateway.ts"],"sourcesContent":["import { FetchOptions, Gateway } from '../types/Gateway';\nimport { PageList, toPageList } from '../types/PageList';\nimport { Json, JsonValue } from '../types/Json';\nimport { Id } from '../types/Id';\nimport { Optional } from '../types/Types';\nimport { isDefined } from '../types/Is';\nimport { when } from '../validation/When';\nimport { Exception } from '../types/Exception';\n\nexport class InMemoryGateway extends Gateway {\n constructor(private readonly data: Promise<PageList<Json>>) {\n super();\n }\n\n all(options?: FetchOptions): Promise<PageList<Json>> {\n return this.data.then(d => toPageList(d, d));\n }\n\n byId(id: Id): Promise<Optional<Json>> {\n return this.data.then(d => d.byId(id)).then(d => (d ? { ...d } : undefined));\n }\n\n by = (key: string, value: JsonValue): Promise<PageList<Json>> => {\n return this.data.then(d => d.filter(i => i[key] === value));\n };\n\n exists(id: Id): Promise<boolean> {\n return this.byId(id).then(d => isDefined(d));\n }\n\n add(item: Json): Promise<Json> {\n return when(item)\n .not.contains(i => i.id)\n .reject(Exception.IsMissingId)\n .then(i => this.exists(i.id as Id))\n .then(ex => when(ex).isTrue.reject(Exception.AlreadyExists))\n .then(() => this.data.then(d => d.add(item)))\n .then(() => ({ ...item }));\n }\n\n remove(id: Id): Promise<true> {\n return this.data\n .then(d =>\n when(d.findIndex(i => i.id === id))\n .with(i => i < 0)\n .reject(Exception.DoesNotExist)\n .then(i => d.splice(i, 1))\n )\n .then(() => true);\n }\n\n update(item: Json): Promise<Json> {\n return when(item)\n .not.contains(i => i.id)\n .reject(Exception.IsMissingId)\n .then(i => this.remove(i.id as Id).then(() => this.add(i)));\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASO,IAAM,kBAAN,cAA8B,QAAQ;AAAA,EAC3C,YAA6B,MAA+B;AAC1D,UAAM;AADqB;AAAA,EAE7B;AAAA,EAEA,IAAI,SAAiD;AACnD,WAAO,KAAK,KAAK,KAAK,OAAK,WAAW,GAAG,CAAC,CAAC;AAAA,EAC7C;AAAA,EAEA,KAAK,IAAiC;AACpC,WAAO,KAAK,KAAK,KAAK,OAAK,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,OAAM,IAAI,EAAE,GAAG,EAAE,IAAI,MAAU;AAAA,EAC7E;AAAA,EAEA,KAAK,CAAC,KAAa,UAA8C;AAC/D,WAAO,KAAK,KAAK,KAAK,OAAK,EAAE,OAAO,OAAK,EAAE,GAAG,MAAM,KAAK,CAAC;AAAA,EAC5D;AAAA,EAEA,OAAO,IAA0B;AAC/B,WAAO,KAAK,KAAK,EAAE,EAAE,KAAK,OAAK,UAAU,CAAC,CAAC;AAAA,EAC7C;AAAA,EAEA,IAAI,MAA2B;AAC7B,WAAO,KAAK,IAAI,EACb,IAAI,SAAS,OAAK,EAAE,EAAE,EACtB,OAAO,UAAU,WAAW,EAC5B,KAAK,OAAK,KAAK,OAAO,EAAE,EAAQ,CAAC,EACjC,KAAK,QAAM,KAAK,EAAE,EAAE,OAAO,OAAO,UAAU,aAAa,CAAC,EAC1D,KAAK,MAAM,KAAK,KAAK,KAAK,OAAK,EAAE,IAAI,IAAI,CAAC,CAAC,EAC3C,KAAK,OAAO,EAAE,GAAG,KAAK,EAAE;AAAA,EAC7B;AAAA,EAEA,OAAO,IAAuB;AAC5B,WAAO,KAAK,KACT;AAAA,MAAK,OACJ,KAAK,EAAE,UAAU,OAAK,EAAE,OAAO,EAAE,CAAC,EAC/B,KAAK,OAAK,IAAI,CAAC,EACf,OAAO,UAAU,YAAY,EAC7B,KAAK,OAAK,EAAE,OAAO,GAAG,CAAC,CAAC;AAAA,IAC7B,EACC,KAAK,MAAM,IAAI;AAAA,EACpB;AAAA,EAEA,OAAO,MAA2B;AAChC,WAAO,KAAK,IAAI,EACb,IAAI,SAAS,OAAK,EAAE,EAAE,EACtB,OAAO,UAAU,WAAW,EAC5B,KAAK,OAAK,KAAK,OAAO,EAAE,EAAQ,EAAE,KAAK,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC;AAAA,EAC9D;AACF;","names":[]}
|