@thisisagile/easy 17.34.4 → 17.35.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.
Files changed (163) hide show
  1. package/dist/{chunk-3ESFHUVQ.mjs → chunk-2BMYXKEZ.mjs} +2 -2
  2. package/dist/{chunk-N3J6HKTR.mjs → chunk-2FCAPKO3.mjs} +4 -4
  3. package/dist/{chunk-4YXMF4XH.mjs → chunk-3G4EJHZS.mjs} +2 -2
  4. package/dist/{chunk-YR2MP6XR.mjs → chunk-5OSLW2ZD.mjs} +3 -3
  5. package/dist/{chunk-YOOXERNJ.mjs → chunk-6SY4RT7I.mjs} +2 -2
  6. package/dist/{chunk-HUV5HX5Q.mjs → chunk-6SYVBREP.mjs} +3 -3
  7. package/dist/{chunk-MXQZZPQ6.mjs → chunk-ANV5GEXQ.mjs} +3 -3
  8. package/dist/{chunk-KCNTM7XN.mjs → chunk-ASKO2D3S.mjs} +30 -30
  9. package/dist/chunk-ASKO2D3S.mjs.map +1 -0
  10. package/dist/{chunk-OUOI55EP.mjs → chunk-C7LDHMKF.mjs} +3 -3
  11. package/dist/{chunk-GUECCH5L.mjs → chunk-CDP4FFFD.mjs} +4 -4
  12. package/dist/{chunk-UFJNCZSX.mjs → chunk-DKGORM47.mjs} +2 -2
  13. package/dist/{chunk-GQ7JXXY7.mjs → chunk-EDH6XY6O.mjs} +6 -4
  14. package/dist/chunk-EDH6XY6O.mjs.map +1 -0
  15. package/dist/{chunk-IFQCUHOE.mjs → chunk-GHGJC6U3.mjs} +2 -2
  16. package/dist/{chunk-RFJXODWW.mjs → chunk-HQICD246.mjs} +2 -2
  17. package/dist/{chunk-HUPULSW2.mjs → chunk-HXGYRGOW.mjs} +2 -2
  18. package/dist/{chunk-WFUDQKBC.mjs → chunk-IRDNO67Z.mjs} +3 -3
  19. package/dist/{chunk-HFW4HITA.mjs → chunk-JKZFDYHB.mjs} +3 -3
  20. package/dist/{chunk-6U5LBNOQ.mjs → chunk-JXFITQHV.mjs} +4 -4
  21. package/dist/{chunk-N4ZRHNWT.mjs → chunk-KC7ZAE3V.mjs} +7 -7
  22. package/dist/{chunk-P2NU2O2J.mjs → chunk-KS6NA7G3.mjs} +4 -4
  23. package/dist/{chunk-GSHV4VR6.mjs → chunk-L7WVQ4FV.mjs} +2 -2
  24. package/dist/{chunk-RSS35MOP.mjs → chunk-LENB5IRX.mjs} +6 -6
  25. package/dist/{chunk-JTLUBEB4.mjs → chunk-LZNDHBDR.mjs} +3 -3
  26. package/dist/{chunk-LVU54T5J.mjs → chunk-MABGLPDW.mjs} +2 -2
  27. package/dist/{chunk-QQ5S4M7U.mjs → chunk-MGMUPVM4.mjs} +11 -11
  28. package/dist/{chunk-3SFELSYP.mjs → chunk-MXAO3EZZ.mjs} +6 -6
  29. package/dist/{chunk-DUKIT4NA.mjs → chunk-NQFZ44IV.mjs} +2 -2
  30. package/dist/{chunk-IPRZQ34G.mjs → chunk-NUTMRE36.mjs} +3 -3
  31. package/dist/{chunk-57QHPHF2.mjs → chunk-PHS3U3PO.mjs} +4 -4
  32. package/dist/{chunk-7DTNZL5P.mjs → chunk-SPDRDTRQ.mjs} +2 -2
  33. package/dist/{chunk-EMQUXRSO.mjs → chunk-TCP7JYHG.mjs} +3 -3
  34. package/dist/{chunk-M4Q4SN4K.mjs → chunk-UTT3YWCG.mjs} +3 -3
  35. package/dist/{chunk-MORQBQQV.mjs → chunk-VEKYYS3L.mjs} +5 -5
  36. package/dist/{chunk-I4FC6QKX.mjs → chunk-WINQB4KP.mjs} +2 -2
  37. package/dist/{chunk-C6OCUOAU.mjs → chunk-Y27OR4OA.mjs} +172 -172
  38. package/dist/chunk-Y27OR4OA.mjs.map +1 -0
  39. package/dist/{chunk-HYDAFW6T.mjs → chunk-Y3QJPP25.mjs} +5 -5
  40. package/dist/{chunk-W7CNGM5N.mjs → chunk-Y7QBFDWD.mjs} +4 -4
  41. package/dist/{chunk-QA2AQBXU.mjs → chunk-YH5YU237.mjs} +4 -4
  42. package/dist/{chunk-QS5D7K4T.mjs → chunk-ZF5P5JBB.mjs} +2 -2
  43. package/dist/{chunk-R35CGRAE.mjs → chunk-ZIP76GV3.mjs} +2 -2
  44. package/dist/{chunk-QUSPYHXS.mjs → chunk-ZXXR47HZ.mjs} +2 -2
  45. package/dist/data/Condition.mjs +5 -5
  46. package/dist/data/Database.mjs +6 -6
  47. package/dist/data/Field.mjs +5 -5
  48. package/dist/data/InMemoryGateway.mjs +9 -9
  49. package/dist/domain/Audit.mjs +13 -13
  50. package/dist/domain/Child.mjs +12 -12
  51. package/dist/domain/DateTime.mjs +9 -9
  52. package/dist/domain/Entity.mjs +17 -17
  53. package/dist/domain/Repo.mjs +14 -14
  54. package/dist/domain/Struct.mjs +9 -9
  55. package/dist/domain/Typo.mjs +11 -11
  56. package/dist/http/CacheControl.mjs +9 -9
  57. package/dist/http/ContentType.mjs +6 -6
  58. package/dist/http/HttpStatus.mjs +6 -6
  59. package/dist/http/HttpVerb.mjs +6 -6
  60. package/dist/http/LocalRequestStore.mjs +7 -7
  61. package/dist/http/RequestOptions.mjs +9 -9
  62. package/dist/http/RestResult.mjs +9 -9
  63. package/dist/http/toResponse.mjs +10 -10
  64. package/dist/index.js +3 -0
  65. package/dist/index.js.map +1 -1
  66. package/dist/process/App.mjs +8 -8
  67. package/dist/process/Manage.mjs +9 -9
  68. package/dist/process/Scope.mjs +8 -8
  69. package/dist/process/Search.mjs +9 -9
  70. package/dist/process/UseCase.mjs +7 -7
  71. package/dist/resources/Req.mjs +8 -8
  72. package/dist/services/Api.mjs +17 -17
  73. package/dist/services/ApiGateway.mjs +20 -20
  74. package/dist/services/AxiosProvider.mjs +15 -15
  75. package/dist/services/MappedRouteGateway.mjs +25 -25
  76. package/dist/services/RouteGateway.mjs +21 -21
  77. package/dist/services/ViewRouteGateway.mjs +24 -24
  78. package/dist/sql/Column.mjs +9 -9
  79. package/dist/sql/Count.mjs +5 -5
  80. package/dist/sql/Delete.mjs +4 -4
  81. package/dist/sql/Insert.mjs +4 -4
  82. package/dist/sql/Select.mjs +4 -4
  83. package/dist/sql/SqlQuery.mjs +3 -3
  84. package/dist/sql/Table.mjs +21 -21
  85. package/dist/sql/TableGateway.mjs +9 -9
  86. package/dist/sql/Update.mjs +4 -4
  87. package/dist/types/Cache.mjs +4 -4
  88. package/dist/types/CacheAge.mjs +9 -9
  89. package/dist/types/Case.mjs +7 -7
  90. package/dist/types/Context.mjs +7 -7
  91. package/dist/types/Enum.mjs +5 -5
  92. package/dist/types/Environment.mjs +5 -5
  93. package/dist/types/Exception.mjs +7 -7
  94. package/dist/types/Gateway.mjs +8 -8
  95. package/dist/types/IsEqual.mjs +8 -8
  96. package/dist/types/Json.mjs +4 -4
  97. package/dist/types/List.mjs +2 -2
  98. package/dist/types/Meta.mjs +4 -4
  99. package/dist/types/Number.mjs +8 -8
  100. package/dist/types/Object.mjs +3 -3
  101. package/dist/types/PageList.mjs +8 -8
  102. package/dist/types/Parser.mjs +7 -7
  103. package/dist/types/Repository.mjs +8 -8
  104. package/dist/types/Result.mjs +7 -7
  105. package/dist/types/Results.mjs +7 -7
  106. package/dist/types/Tag.mjs +4 -4
  107. package/dist/types/Template.mjs +7 -7
  108. package/dist/types/ToText.mjs +7 -7
  109. package/dist/types/Try.mjs +7 -7
  110. package/dist/types/Uri.mjs +7 -7
  111. package/dist/utils/If.mjs +2 -2
  112. package/dist/utils/Mapper.mjs +6 -6
  113. package/dist/utils/Promise.mjs +4 -4
  114. package/dist/utils/Seconds.mjs +3 -3
  115. package/dist/utils/Sentence.mjs +7 -7
  116. package/dist/utils/View.mjs +11 -11
  117. package/dist/validation/Contraints.d.ts +1 -0
  118. package/dist/validation/Contraints.mjs +10 -8
  119. package/dist/validation/Validate.mjs +7 -7
  120. package/dist/validation/When.mjs +7 -7
  121. package/package.json +1 -1
  122. package/src/validation/Contraints.ts +3 -0
  123. package/dist/chunk-C6OCUOAU.mjs.map +0 -1
  124. package/dist/chunk-GQ7JXXY7.mjs.map +0 -1
  125. package/dist/chunk-KCNTM7XN.mjs.map +0 -1
  126. /package/dist/{chunk-3ESFHUVQ.mjs.map → chunk-2BMYXKEZ.mjs.map} +0 -0
  127. /package/dist/{chunk-N3J6HKTR.mjs.map → chunk-2FCAPKO3.mjs.map} +0 -0
  128. /package/dist/{chunk-4YXMF4XH.mjs.map → chunk-3G4EJHZS.mjs.map} +0 -0
  129. /package/dist/{chunk-YR2MP6XR.mjs.map → chunk-5OSLW2ZD.mjs.map} +0 -0
  130. /package/dist/{chunk-YOOXERNJ.mjs.map → chunk-6SY4RT7I.mjs.map} +0 -0
  131. /package/dist/{chunk-HUV5HX5Q.mjs.map → chunk-6SYVBREP.mjs.map} +0 -0
  132. /package/dist/{chunk-MXQZZPQ6.mjs.map → chunk-ANV5GEXQ.mjs.map} +0 -0
  133. /package/dist/{chunk-OUOI55EP.mjs.map → chunk-C7LDHMKF.mjs.map} +0 -0
  134. /package/dist/{chunk-GUECCH5L.mjs.map → chunk-CDP4FFFD.mjs.map} +0 -0
  135. /package/dist/{chunk-UFJNCZSX.mjs.map → chunk-DKGORM47.mjs.map} +0 -0
  136. /package/dist/{chunk-IFQCUHOE.mjs.map → chunk-GHGJC6U3.mjs.map} +0 -0
  137. /package/dist/{chunk-RFJXODWW.mjs.map → chunk-HQICD246.mjs.map} +0 -0
  138. /package/dist/{chunk-HUPULSW2.mjs.map → chunk-HXGYRGOW.mjs.map} +0 -0
  139. /package/dist/{chunk-WFUDQKBC.mjs.map → chunk-IRDNO67Z.mjs.map} +0 -0
  140. /package/dist/{chunk-HFW4HITA.mjs.map → chunk-JKZFDYHB.mjs.map} +0 -0
  141. /package/dist/{chunk-6U5LBNOQ.mjs.map → chunk-JXFITQHV.mjs.map} +0 -0
  142. /package/dist/{chunk-N4ZRHNWT.mjs.map → chunk-KC7ZAE3V.mjs.map} +0 -0
  143. /package/dist/{chunk-P2NU2O2J.mjs.map → chunk-KS6NA7G3.mjs.map} +0 -0
  144. /package/dist/{chunk-GSHV4VR6.mjs.map → chunk-L7WVQ4FV.mjs.map} +0 -0
  145. /package/dist/{chunk-RSS35MOP.mjs.map → chunk-LENB5IRX.mjs.map} +0 -0
  146. /package/dist/{chunk-JTLUBEB4.mjs.map → chunk-LZNDHBDR.mjs.map} +0 -0
  147. /package/dist/{chunk-LVU54T5J.mjs.map → chunk-MABGLPDW.mjs.map} +0 -0
  148. /package/dist/{chunk-QQ5S4M7U.mjs.map → chunk-MGMUPVM4.mjs.map} +0 -0
  149. /package/dist/{chunk-3SFELSYP.mjs.map → chunk-MXAO3EZZ.mjs.map} +0 -0
  150. /package/dist/{chunk-DUKIT4NA.mjs.map → chunk-NQFZ44IV.mjs.map} +0 -0
  151. /package/dist/{chunk-IPRZQ34G.mjs.map → chunk-NUTMRE36.mjs.map} +0 -0
  152. /package/dist/{chunk-57QHPHF2.mjs.map → chunk-PHS3U3PO.mjs.map} +0 -0
  153. /package/dist/{chunk-7DTNZL5P.mjs.map → chunk-SPDRDTRQ.mjs.map} +0 -0
  154. /package/dist/{chunk-EMQUXRSO.mjs.map → chunk-TCP7JYHG.mjs.map} +0 -0
  155. /package/dist/{chunk-M4Q4SN4K.mjs.map → chunk-UTT3YWCG.mjs.map} +0 -0
  156. /package/dist/{chunk-MORQBQQV.mjs.map → chunk-VEKYYS3L.mjs.map} +0 -0
  157. /package/dist/{chunk-I4FC6QKX.mjs.map → chunk-WINQB4KP.mjs.map} +0 -0
  158. /package/dist/{chunk-HYDAFW6T.mjs.map → chunk-Y3QJPP25.mjs.map} +0 -0
  159. /package/dist/{chunk-W7CNGM5N.mjs.map → chunk-Y7QBFDWD.mjs.map} +0 -0
  160. /package/dist/{chunk-QA2AQBXU.mjs.map → chunk-YH5YU237.mjs.map} +0 -0
  161. /package/dist/{chunk-QS5D7K4T.mjs.map → chunk-ZF5P5JBB.mjs.map} +0 -0
  162. /package/dist/{chunk-R35CGRAE.mjs.map → chunk-ZIP76GV3.mjs.map} +0 -0
  163. /package/dist/{chunk-QUSPYHXS.mjs.map → chunk-ZXXR47HZ.mjs.map} +0 -0
@@ -1,26 +1,26 @@
1
1
  import {
2
2
  isEqual
3
- } from "./chunk-3ESFHUVQ.mjs";
3
+ } from "./chunk-2BMYXKEZ.mjs";
4
4
  import {
5
5
  isPageList,
6
6
  toPageList
7
- } from "./chunk-EMQUXRSO.mjs";
7
+ } from "./chunk-TCP7JYHG.mjs";
8
+ import {
9
+ asJson,
10
+ json
11
+ } from "./chunk-5OSLW2ZD.mjs";
8
12
  import {
9
13
  choose
10
- } from "./chunk-C6OCUOAU.mjs";
14
+ } from "./chunk-Y27OR4OA.mjs";
11
15
  import {
12
16
  isEnumConstructor
13
- } from "./chunk-HUV5HX5Q.mjs";
17
+ } from "./chunk-6SYVBREP.mjs";
14
18
  import {
15
19
  meta
16
- } from "./chunk-M4Q4SN4K.mjs";
17
- import {
18
- asJson,
19
- json
20
- } from "./chunk-YR2MP6XR.mjs";
20
+ } from "./chunk-UTT3YWCG.mjs";
21
21
  import {
22
22
  ifDefined
23
- } from "./chunk-KCNTM7XN.mjs";
23
+ } from "./chunk-ASKO2D3S.mjs";
24
24
  import {
25
25
  traverse
26
26
  } from "./chunk-SSROJBD5.mjs";
@@ -113,4 +113,4 @@ export {
113
113
  view,
114
114
  views
115
115
  };
116
- //# sourceMappingURL=chunk-QQ5S4M7U.mjs.map
116
+ //# sourceMappingURL=chunk-MGMUPVM4.mjs.map
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  HttpHeader
3
3
  } from "./chunk-SW2OCUH3.mjs";
4
- import {
5
- ContentType
6
- } from "./chunk-DUKIT4NA.mjs";
7
4
  import {
8
5
  toUuid
9
6
  } from "./chunk-HTNGE3BS.mjs";
7
+ import {
8
+ ContentType
9
+ } from "./chunk-NQFZ44IV.mjs";
10
10
  import {
11
11
  ctx
12
- } from "./chunk-C6OCUOAU.mjs";
12
+ } from "./chunk-Y27OR4OA.mjs";
13
13
  import {
14
14
  Enum
15
- } from "./chunk-HUV5HX5Q.mjs";
15
+ } from "./chunk-6SYVBREP.mjs";
16
16
  import {
17
17
  asString
18
18
  } from "./chunk-TOERQZRP.mjs";
@@ -87,4 +87,4 @@ export {
87
87
  RequestOptions,
88
88
  isRequestOptions
89
89
  };
90
- //# sourceMappingURL=chunk-3SFELSYP.mjs.map
90
+ //# sourceMappingURL=chunk-MXAO3EZZ.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Enum
3
- } from "./chunk-HUV5HX5Q.mjs";
3
+ } from "./chunk-6SYVBREP.mjs";
4
4
  import {
5
5
  asString
6
6
  } from "./chunk-TOERQZRP.mjs";
@@ -28,4 +28,4 @@ var ContentType = class _ContentType extends Enum {
28
28
  export {
29
29
  ContentType
30
30
  };
31
- //# sourceMappingURL=chunk-DUKIT4NA.mjs.map
31
+ //# sourceMappingURL=chunk-NQFZ44IV.mjs.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  Exception
3
- } from "./chunk-C6OCUOAU.mjs";
3
+ } from "./chunk-Y27OR4OA.mjs";
4
4
  import {
5
5
  reject
6
- } from "./chunk-HFW4HITA.mjs";
6
+ } from "./chunk-JKZFDYHB.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-IPRZQ34G.mjs.map
45
+ //# sourceMappingURL=chunk-NUTMRE36.mjs.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Api
3
- } from "./chunk-GUECCH5L.mjs";
3
+ } from "./chunk-CDP4FFFD.mjs";
4
4
  import {
5
5
  Gateway
6
- } from "./chunk-IPRZQ34G.mjs";
6
+ } from "./chunk-NUTMRE36.mjs";
7
7
  import {
8
8
  toPageList
9
- } from "./chunk-EMQUXRSO.mjs";
9
+ } from "./chunk-TCP7JYHG.mjs";
10
10
  import {
11
11
  use
12
12
  } from "./chunk-ZPNFXK7Y.mjs";
@@ -43,4 +43,4 @@ var ApiGateway = class extends Gateway {
43
43
  export {
44
44
  ApiGateway
45
45
  };
46
- //# sourceMappingURL=chunk-57QHPHF2.mjs.map
46
+ //# sourceMappingURL=chunk-PHS3U3PO.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  tryTo
3
- } from "./chunk-C6OCUOAU.mjs";
3
+ } from "./chunk-Y27OR4OA.mjs";
4
4
  import {
5
5
  asString
6
6
  } from "./chunk-TOERQZRP.mjs";
@@ -17,4 +17,4 @@ var asNumber = (n, alt) => tryTo(() => asString(n)).map((s) => parseInt(s)).filt
17
17
  export {
18
18
  asNumber
19
19
  };
20
- //# sourceMappingURL=chunk-7DTNZL5P.mjs.map
20
+ //# sourceMappingURL=chunk-SPDRDTRQ.mjs.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  choose
3
- } from "./chunk-C6OCUOAU.mjs";
3
+ } from "./chunk-Y27OR4OA.mjs";
4
4
  import {
5
5
  List,
6
6
  isList,
7
7
  toList
8
- } from "./chunk-KCNTM7XN.mjs";
8
+ } from "./chunk-ASKO2D3S.mjs";
9
9
  import {
10
10
  isA
11
11
  } from "./chunk-ZHXKBOK2.mjs";
@@ -172,4 +172,4 @@ export {
172
172
  toPageList,
173
173
  asPageList
174
174
  };
175
- //# sourceMappingURL=chunk-EMQUXRSO.mjs.map
175
+ //# sourceMappingURL=chunk-TCP7JYHG.mjs.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  entries,
3
3
  values
4
- } from "./chunk-HUPULSW2.mjs";
4
+ } from "./chunk-HXGYRGOW.mjs";
5
5
  import {
6
6
  toList
7
- } from "./chunk-KCNTM7XN.mjs";
7
+ } from "./chunk-ASKO2D3S.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-M4Q4SN4K.mjs.map
58
+ //# sourceMappingURL=chunk-UTT3YWCG.mjs.map
@@ -1,9 +1,9 @@
1
- import {
2
- validate
3
- } from "./chunk-C6OCUOAU.mjs";
4
1
  import {
5
2
  json
6
- } from "./chunk-YR2MP6XR.mjs";
3
+ } from "./chunk-5OSLW2ZD.mjs";
4
+ import {
5
+ validate
6
+ } from "./chunk-Y27OR4OA.mjs";
7
7
  import {
8
8
  isDefined
9
9
  } from "./chunk-DEJ7A5PY.mjs";
@@ -37,4 +37,4 @@ export {
37
37
  Struct,
38
38
  isStruct
39
39
  };
40
- //# sourceMappingURL=chunk-MORQBQQV.mjs.map
40
+ //# sourceMappingURL=chunk-VEKYYS3L.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SqlQuery
3
- } from "./chunk-GSHV4VR6.mjs";
3
+ } from "./chunk-L7WVQ4FV.mjs";
4
4
  import {
5
5
  toClause
6
6
  } from "./chunk-5THKYKZ5.mjs";
@@ -23,4 +23,4 @@ var Update = class extends SqlQuery {
23
23
  export {
24
24
  Update
25
25
  };
26
- //# sourceMappingURL=chunk-I4FC6QKX.mjs.map
26
+ //# sourceMappingURL=chunk-WINQB4KP.mjs.map
@@ -1,26 +1,26 @@
1
- import {
2
- reject,
3
- resolve
4
- } from "./chunk-HFW4HITA.mjs";
5
1
  import {
6
2
  isValidatable
7
3
  } from "./chunk-OFGI5FLG.mjs";
4
+ import {
5
+ reject,
6
+ resolve
7
+ } from "./chunk-JKZFDYHB.mjs";
8
8
  import {
9
9
  isValue
10
10
  } from "./chunk-4262V2GR.mjs";
11
11
  import {
12
12
  Enum,
13
13
  isEnum
14
- } from "./chunk-HUV5HX5Q.mjs";
14
+ } from "./chunk-6SYVBREP.mjs";
15
15
  import {
16
16
  meta
17
- } from "./chunk-M4Q4SN4K.mjs";
17
+ } from "./chunk-UTT3YWCG.mjs";
18
18
  import {
19
19
  entries
20
- } from "./chunk-HUPULSW2.mjs";
20
+ } from "./chunk-HXGYRGOW.mjs";
21
21
  import {
22
22
  toList
23
- } from "./chunk-KCNTM7XN.mjs";
23
+ } from "./chunk-ASKO2D3S.mjs";
24
24
  import {
25
25
  toArray
26
26
  } from "./chunk-CO2AFYVD.mjs";
@@ -49,6 +49,111 @@ import {
49
49
  isTrue
50
50
  } from "./chunk-DEJ7A5PY.mjs";
51
51
 
52
+ // src/types/Try.ts
53
+ var Try = class _Try {
54
+ is = {
55
+ defined: (prop) => this.filter((v) => isDefined(prop ? prop(v) : v)),
56
+ empty: (prop) => this.filter((v) => isEmpty(prop ? prop(v) : v)),
57
+ valid: (prop) => this.filter((v) => validate(prop ? prop(v) : v).isValid),
58
+ true: (prop) => this.filter((v) => isTrue(prop ? prop(v) : v)),
59
+ false: (prop) => this.filter((v) => !isTrue(prop ? prop(v) : v)),
60
+ not: {
61
+ defined: (prop) => this.filter((v) => !isDefined(prop ? prop(v) : v)),
62
+ empty: (prop) => this.filter((v) => !isEmpty(prop ? prop(v) : v)),
63
+ valid: (prop) => this.filter((v) => !validate(prop ? prop(v) : v).isValid)
64
+ }
65
+ };
66
+ if = this.is;
67
+ static of = (c, ...args) => {
68
+ try {
69
+ const out = ofGet(c, ...args);
70
+ return new Success(out instanceof _Try ? out.value : out);
71
+ } catch (e) {
72
+ return new Failure(e);
73
+ }
74
+ };
75
+ };
76
+ var Success = class extends Try {
77
+ constructor(value) {
78
+ super();
79
+ this.value = value;
80
+ }
81
+ get error() {
82
+ throw new Error("No error found");
83
+ }
84
+ get isValid() {
85
+ return true;
86
+ }
87
+ map(f) {
88
+ return tryTo(f, this.value);
89
+ }
90
+ recover(f) {
91
+ return this;
92
+ }
93
+ recoverFrom(type, f) {
94
+ return this;
95
+ }
96
+ accept(f) {
97
+ return tryTo(() => {
98
+ f(this.value);
99
+ return this;
100
+ });
101
+ }
102
+ filter(predicate) {
103
+ return tryTo(() => {
104
+ if (predicate(this.value))
105
+ return this;
106
+ throw new Error(`Applying filter(${predicate.toString()}) failed.`);
107
+ });
108
+ }
109
+ or(value) {
110
+ return this.value;
111
+ }
112
+ orElse(value) {
113
+ return this.value;
114
+ }
115
+ orThrow(_error) {
116
+ return this.value;
117
+ }
118
+ };
119
+ var Failure = class _Failure extends Try {
120
+ constructor(error) {
121
+ super();
122
+ this.error = error;
123
+ }
124
+ get value() {
125
+ throw this.error;
126
+ }
127
+ get isValid() {
128
+ return false;
129
+ }
130
+ map(f) {
131
+ return new _Failure(this.error);
132
+ }
133
+ recover(f) {
134
+ return tryTo(f, this.error);
135
+ }
136
+ recoverFrom(type, f) {
137
+ return tryTo(() => this.error instanceof type ? this.recover(f) : this);
138
+ }
139
+ accept(f) {
140
+ return this;
141
+ }
142
+ filter(predicate) {
143
+ return this;
144
+ }
145
+ or(value) {
146
+ return ofGet(value);
147
+ }
148
+ orElse(value) {
149
+ return ofGet(value);
150
+ }
151
+ orThrow(error) {
152
+ throw ofConstruct(error);
153
+ }
154
+ };
155
+ var tryTo = (c, ...args) => Try.of(c, ...args);
156
+
52
157
  // src/types/Template.ts
53
158
  var Template = class {
54
159
  constructor(template2, subject = {}, options = {}) {
@@ -183,64 +288,6 @@ function textValue(subject, prop) {
183
288
  return p.splice(1).reduce((t, s) => (typeof t === "object" && t !== null ? t : text(t))?.[s], initial)?.toString() ?? "";
184
289
  }
185
290
 
186
- // src/types/Exception.ts
187
- var Exception = class _Exception extends Enum {
188
- constructor(message, id, reason) {
189
- super(message, id ?? text(message).pascal.toString());
190
- this.message = message;
191
- this.reason = reason;
192
- }
193
- static AlreadyExists = new _Exception("Subject already exists");
194
- static DoesNotExist = new _Exception("Does not exist");
195
- static IsMissingId = new _Exception("Subject is missing an id");
196
- static IsNotImplemented = new _Exception("Is not implemented");
197
- static IsNotValid = new _Exception("Is not valid");
198
- static Unknown = new _Exception("Unknown error");
199
- static CouldNotExecute = (target) => new _Exception(`Could not execute ${target}.`, "CouldNotExecute");
200
- static CouldNotValidate = (target) => new _Exception(`Could not validate ${target}.`, "CouldNotValidate");
201
- static EnvironmentVariableNotFound = (variable) => new _Exception(`Environment variable ${text(variable).upper} could not be found.`, "EnvironmentVariableNotFound");
202
- because = (reason) => new _Exception(this.message, this.id, reason);
203
- };
204
- var isException = (e, t) => e instanceof Exception && (isDefined(t) ? e.equals(asString(t)) : true);
205
- var isDoesNotExist = (e) => e instanceof Exception && Exception.DoesNotExist.equals(e);
206
-
207
- // src/validation/When.ts
208
- var When = class _When {
209
- constructor(subject, valid = true, results) {
210
- this.subject = subject;
211
- this.valid = valid;
212
- this.results = results;
213
- }
214
- get not() {
215
- return this.clone(!this.valid);
216
- }
217
- get and() {
218
- return this.clone(this.valid);
219
- }
220
- get isDefined() {
221
- return this.clone(this.valid === isDefined(this.subject));
222
- }
223
- get isEmpty() {
224
- return this.clone(this.valid === isEmpty(this.subject));
225
- }
226
- get isTrue() {
227
- return this.clone(this.valid === !!this.subject);
228
- }
229
- get isValid() {
230
- this.results = validate(this.subject);
231
- return this.clone(this.valid === this.results.isValid);
232
- }
233
- isInstance = (c) => this.clone(this.valid === this.subject instanceof c);
234
- with = (pred) => this.clone(this.valid === ofGet(pred, this.subject));
235
- contains = (property) => this.clone(this.valid === isDefined(ofGet(property, this.subject)));
236
- in = (...items) => this.clone(this.valid === isIn(this.subject, toArray(...items)));
237
- is = (item) => this.clone(this.valid === (this.subject === item));
238
- reject = (error) => !this.valid ? resolve(this.subject) : reject(ofGet(error, this.subject) ?? this.results ?? Exception.Unknown);
239
- recover = (f) => resolve(!this.valid ? this.subject : f(this.subject));
240
- clone = (result = true) => new _When(this.subject, result, this.results);
241
- };
242
- var when = (subject) => new When(subject);
243
-
244
291
  // src/types/Context.ts
245
292
  var DotEnvContext = class {
246
293
  domain = process.env.DOMAIN ?? "easy";
@@ -489,122 +536,65 @@ var validate = (subject) => choose(subject).is.not.defined(
489
536
  var validateReject = (subject) => when(subject).not.isValid.reject();
490
537
  var isValid = (t) => validate(t).isValid;
491
538
 
492
- // src/types/Try.ts
493
- var Try = class _Try {
494
- is = {
495
- defined: (prop) => this.filter((v) => isDefined(prop ? prop(v) : v)),
496
- empty: (prop) => this.filter((v) => isEmpty(prop ? prop(v) : v)),
497
- valid: (prop) => this.filter((v) => validate(prop ? prop(v) : v).isValid),
498
- true: (prop) => this.filter((v) => isTrue(prop ? prop(v) : v)),
499
- false: (prop) => this.filter((v) => !isTrue(prop ? prop(v) : v)),
500
- not: {
501
- defined: (prop) => this.filter((v) => !isDefined(prop ? prop(v) : v)),
502
- empty: (prop) => this.filter((v) => !isEmpty(prop ? prop(v) : v)),
503
- valid: (prop) => this.filter((v) => !validate(prop ? prop(v) : v).isValid)
504
- }
505
- };
506
- if = this.is;
507
- static of = (c, ...args) => {
508
- try {
509
- const out = ofGet(c, ...args);
510
- return new Success(out instanceof _Try ? out.value : out);
511
- } catch (e) {
512
- return new Failure(e);
513
- }
514
- };
515
- };
516
- var Success = class extends Try {
517
- constructor(value) {
518
- super();
519
- this.value = value;
520
- }
521
- get error() {
522
- throw new Error("No error found");
523
- }
524
- get isValid() {
525
- return true;
526
- }
527
- map(f) {
528
- return tryTo(f, this.value);
529
- }
530
- recover(f) {
531
- return this;
532
- }
533
- recoverFrom(type, f) {
534
- return this;
535
- }
536
- accept(f) {
537
- return tryTo(() => {
538
- f(this.value);
539
- return this;
540
- });
541
- }
542
- filter(predicate) {
543
- return tryTo(() => {
544
- if (predicate(this.value))
545
- return this;
546
- throw new Error(`Applying filter(${predicate.toString()}) failed.`);
547
- });
548
- }
549
- or(value) {
550
- return this.value;
551
- }
552
- orElse(value) {
553
- return this.value;
554
- }
555
- orThrow(_error) {
556
- return this.value;
539
+ // src/types/Exception.ts
540
+ var Exception = class _Exception extends Enum {
541
+ constructor(message, id, reason) {
542
+ super(message, id ?? text(message).pascal.toString());
543
+ this.message = message;
544
+ this.reason = reason;
557
545
  }
546
+ static AlreadyExists = new _Exception("Subject already exists");
547
+ static DoesNotExist = new _Exception("Does not exist");
548
+ static IsMissingId = new _Exception("Subject is missing an id");
549
+ static IsNotImplemented = new _Exception("Is not implemented");
550
+ static IsNotValid = new _Exception("Is not valid");
551
+ static Unknown = new _Exception("Unknown error");
552
+ static CouldNotExecute = (target) => new _Exception(`Could not execute ${target}.`, "CouldNotExecute");
553
+ static CouldNotValidate = (target) => new _Exception(`Could not validate ${target}.`, "CouldNotValidate");
554
+ static EnvironmentVariableNotFound = (variable) => new _Exception(`Environment variable ${text(variable).upper} could not be found.`, "EnvironmentVariableNotFound");
555
+ because = (reason) => new _Exception(this.message, this.id, reason);
558
556
  };
559
- var Failure = class _Failure extends Try {
560
- constructor(error) {
561
- super();
562
- this.error = error;
563
- }
564
- get value() {
565
- throw this.error;
566
- }
567
- get isValid() {
568
- return false;
569
- }
570
- map(f) {
571
- return new _Failure(this.error);
572
- }
573
- recover(f) {
574
- return tryTo(f, this.error);
557
+ var isException = (e, t) => e instanceof Exception && (isDefined(t) ? e.equals(asString(t)) : true);
558
+ var isDoesNotExist = (e) => e instanceof Exception && Exception.DoesNotExist.equals(e);
559
+
560
+ // src/validation/When.ts
561
+ var When = class _When {
562
+ constructor(subject, valid = true, results) {
563
+ this.subject = subject;
564
+ this.valid = valid;
565
+ this.results = results;
575
566
  }
576
- recoverFrom(type, f) {
577
- return tryTo(() => this.error instanceof type ? this.recover(f) : this);
567
+ get not() {
568
+ return this.clone(!this.valid);
578
569
  }
579
- accept(f) {
580
- return this;
570
+ get and() {
571
+ return this.clone(this.valid);
581
572
  }
582
- filter(predicate) {
583
- return this;
573
+ get isDefined() {
574
+ return this.clone(this.valid === isDefined(this.subject));
584
575
  }
585
- or(value) {
586
- return ofGet(value);
576
+ get isEmpty() {
577
+ return this.clone(this.valid === isEmpty(this.subject));
587
578
  }
588
- orElse(value) {
589
- return ofGet(value);
579
+ get isTrue() {
580
+ return this.clone(this.valid === !!this.subject);
590
581
  }
591
- orThrow(error) {
592
- throw ofConstruct(error);
582
+ get isValid() {
583
+ this.results = validate(this.subject);
584
+ return this.clone(this.valid === this.results.isValid);
593
585
  }
586
+ isInstance = (c) => this.clone(this.valid === this.subject instanceof c);
587
+ with = (pred) => this.clone(this.valid === ofGet(pred, this.subject));
588
+ contains = (property) => this.clone(this.valid === isDefined(ofGet(property, this.subject)));
589
+ in = (...items) => this.clone(this.valid === isIn(this.subject, toArray(...items)));
590
+ is = (item) => this.clone(this.valid === (this.subject === item));
591
+ reject = (error) => !this.valid ? resolve(this.subject) : reject(ofGet(error, this.subject) ?? this.results ?? Exception.Unknown);
592
+ recover = (f) => resolve(!this.valid ? this.subject : f(this.subject));
593
+ clone = (result = true) => new _When(this.subject, result, this.results);
594
594
  };
595
- var tryTo = (c, ...args) => Try.of(c, ...args);
595
+ var when = (subject) => new When(subject);
596
596
 
597
597
  export {
598
- Try,
599
- tryTo,
600
- Template,
601
- template,
602
- ToText,
603
- text,
604
- textValue,
605
- Exception,
606
- isException,
607
- isDoesNotExist,
608
598
  When,
609
599
  when,
610
600
  DotEnvContext,
@@ -621,6 +611,16 @@ export {
621
611
  asResults,
622
612
  validate,
623
613
  validateReject,
624
- isValid
614
+ isValid,
615
+ Try,
616
+ tryTo,
617
+ Template,
618
+ template,
619
+ ToText,
620
+ text,
621
+ textValue,
622
+ Exception,
623
+ isException,
624
+ isDoesNotExist
625
625
  };
626
- //# sourceMappingURL=chunk-C6OCUOAU.mjs.map
626
+ //# sourceMappingURL=chunk-Y27OR4OA.mjs.map