@thisisagile/easy 17.34.4 → 17.36.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 (165) hide show
  1. package/dist/{chunk-3ESFHUVQ.mjs → chunk-2FF6NDVX.mjs} +2 -2
  2. package/dist/{chunk-EMQUXRSO.mjs → chunk-2IETG4DU.mjs} +3 -3
  3. package/dist/{chunk-LVU54T5J.mjs → chunk-4BMUPWAJ.mjs} +2 -2
  4. package/dist/{chunk-HUPULSW2.mjs → chunk-4PQAGLRK.mjs} +2 -2
  5. package/dist/{chunk-IFQCUHOE.mjs → chunk-4XY7L4GK.mjs} +2 -2
  6. package/dist/{chunk-3SFELSYP.mjs → chunk-5GKFGWMT.mjs} +6 -6
  7. package/dist/{chunk-W7CNGM5N.mjs → chunk-7SZETQR3.mjs} +4 -4
  8. package/dist/{chunk-MORQBQQV.mjs → chunk-7THDYHVE.mjs} +5 -5
  9. package/dist/{chunk-6U5LBNOQ.mjs → chunk-7YOBRIPP.mjs} +4 -4
  10. package/dist/{chunk-JTLUBEB4.mjs → chunk-AAPNDGQS.mjs} +3 -3
  11. package/dist/{chunk-RSS35MOP.mjs → chunk-AU4TT4W7.mjs} +6 -6
  12. package/dist/{chunk-C6OCUOAU.mjs → chunk-BD6LAT2Y.mjs} +172 -172
  13. package/dist/chunk-BD6LAT2Y.mjs.map +1 -0
  14. package/dist/{chunk-N4ZRHNWT.mjs → chunk-CTKIKB55.mjs} +7 -7
  15. package/dist/{chunk-GSHV4VR6.mjs → chunk-DFYAOK6M.mjs} +2 -2
  16. package/dist/{chunk-OUOI55EP.mjs → chunk-EQTQ6EZI.mjs} +3 -3
  17. package/dist/{chunk-HUV5HX5Q.mjs → chunk-EVG23WHU.mjs} +3 -3
  18. package/dist/{chunk-DUKIT4NA.mjs → chunk-FIIA7ENW.mjs} +2 -2
  19. package/dist/{chunk-QUSPYHXS.mjs → chunk-HBQFWE27.mjs} +2 -2
  20. package/dist/{chunk-UFJNCZSX.mjs → chunk-HTWGHZHY.mjs} +2 -2
  21. package/dist/{chunk-GUECCH5L.mjs → chunk-HXE3E7RM.mjs} +4 -4
  22. package/dist/{chunk-QA2AQBXU.mjs → chunk-ILB7ZDRN.mjs} +4 -4
  23. package/dist/{chunk-I4FC6QKX.mjs → chunk-JOVRTPGK.mjs} +2 -2
  24. package/dist/{chunk-57QHPHF2.mjs → chunk-KFYAE4HG.mjs} +4 -4
  25. package/dist/{chunk-7DTNZL5P.mjs → chunk-KZQZIQ6T.mjs} +2 -2
  26. package/dist/{chunk-HFW4HITA.mjs → chunk-LTTIVS2R.mjs} +3 -3
  27. package/dist/{chunk-QS5D7K4T.mjs → chunk-MKZLN3EP.mjs} +2 -2
  28. package/dist/{chunk-YOOXERNJ.mjs → chunk-PLIJRFFH.mjs} +2 -2
  29. package/dist/{chunk-GQ7JXXY7.mjs → chunk-PVIIPIWP.mjs} +6 -4
  30. package/dist/chunk-PVIIPIWP.mjs.map +1 -0
  31. package/dist/{chunk-HYDAFW6T.mjs → chunk-R6PJ5CPZ.mjs} +5 -5
  32. package/dist/{chunk-R35CGRAE.mjs → chunk-STBIY75D.mjs} +2 -2
  33. package/dist/{chunk-IPRZQ34G.mjs → chunk-SU7MM4FN.mjs} +3 -3
  34. package/dist/{chunk-P2NU2O2J.mjs → chunk-US4665GR.mjs} +4 -4
  35. package/dist/{chunk-4YXMF4XH.mjs → chunk-VDDHUQPK.mjs} +2 -2
  36. package/dist/{chunk-M4Q4SN4K.mjs → chunk-VTXFZ2S3.mjs} +3 -3
  37. package/dist/{chunk-RFJXODWW.mjs → chunk-WT6TNFBH.mjs} +2 -2
  38. package/dist/{chunk-WFUDQKBC.mjs → chunk-X6CPTGGY.mjs} +3 -3
  39. package/dist/{chunk-MXQZZPQ6.mjs → chunk-XL5HGL2Q.mjs} +3 -3
  40. package/dist/{chunk-N3J6HKTR.mjs → chunk-YGR2R77U.mjs} +4 -4
  41. package/dist/{chunk-KCNTM7XN.mjs → chunk-YTNVFND2.mjs} +35 -30
  42. package/dist/chunk-YTNVFND2.mjs.map +1 -0
  43. package/dist/{chunk-YR2MP6XR.mjs → chunk-YXAXW4CU.mjs} +3 -3
  44. package/dist/{chunk-QQ5S4M7U.mjs → chunk-ZIZ323HN.mjs} +11 -11
  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 +8 -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.d.ts +1 -0
  98. package/dist/types/List.mjs +2 -2
  99. package/dist/types/Meta.mjs +4 -4
  100. package/dist/types/Number.mjs +8 -8
  101. package/dist/types/Object.mjs +3 -3
  102. package/dist/types/PageList.mjs +8 -8
  103. package/dist/types/Parser.mjs +7 -7
  104. package/dist/types/Repository.mjs +8 -8
  105. package/dist/types/Result.mjs +7 -7
  106. package/dist/types/Results.mjs +7 -7
  107. package/dist/types/Tag.mjs +4 -4
  108. package/dist/types/Template.mjs +7 -7
  109. package/dist/types/ToText.mjs +7 -7
  110. package/dist/types/Try.mjs +7 -7
  111. package/dist/types/Uri.mjs +7 -7
  112. package/dist/utils/If.mjs +2 -2
  113. package/dist/utils/Mapper.mjs +6 -6
  114. package/dist/utils/Promise.mjs +4 -4
  115. package/dist/utils/Seconds.mjs +3 -3
  116. package/dist/utils/Sentence.mjs +7 -7
  117. package/dist/utils/View.mjs +11 -11
  118. package/dist/validation/Contraints.d.ts +1 -0
  119. package/dist/validation/Contraints.mjs +10 -8
  120. package/dist/validation/Validate.mjs +7 -7
  121. package/dist/validation/When.mjs +7 -7
  122. package/package.json +1 -1
  123. package/src/types/List.ts +6 -0
  124. package/src/validation/Contraints.ts +3 -0
  125. package/dist/chunk-C6OCUOAU.mjs.map +0 -1
  126. package/dist/chunk-GQ7JXXY7.mjs.map +0 -1
  127. package/dist/chunk-KCNTM7XN.mjs.map +0 -1
  128. /package/dist/{chunk-3ESFHUVQ.mjs.map → chunk-2FF6NDVX.mjs.map} +0 -0
  129. /package/dist/{chunk-EMQUXRSO.mjs.map → chunk-2IETG4DU.mjs.map} +0 -0
  130. /package/dist/{chunk-LVU54T5J.mjs.map → chunk-4BMUPWAJ.mjs.map} +0 -0
  131. /package/dist/{chunk-HUPULSW2.mjs.map → chunk-4PQAGLRK.mjs.map} +0 -0
  132. /package/dist/{chunk-IFQCUHOE.mjs.map → chunk-4XY7L4GK.mjs.map} +0 -0
  133. /package/dist/{chunk-3SFELSYP.mjs.map → chunk-5GKFGWMT.mjs.map} +0 -0
  134. /package/dist/{chunk-W7CNGM5N.mjs.map → chunk-7SZETQR3.mjs.map} +0 -0
  135. /package/dist/{chunk-MORQBQQV.mjs.map → chunk-7THDYHVE.mjs.map} +0 -0
  136. /package/dist/{chunk-6U5LBNOQ.mjs.map → chunk-7YOBRIPP.mjs.map} +0 -0
  137. /package/dist/{chunk-JTLUBEB4.mjs.map → chunk-AAPNDGQS.mjs.map} +0 -0
  138. /package/dist/{chunk-RSS35MOP.mjs.map → chunk-AU4TT4W7.mjs.map} +0 -0
  139. /package/dist/{chunk-N4ZRHNWT.mjs.map → chunk-CTKIKB55.mjs.map} +0 -0
  140. /package/dist/{chunk-GSHV4VR6.mjs.map → chunk-DFYAOK6M.mjs.map} +0 -0
  141. /package/dist/{chunk-OUOI55EP.mjs.map → chunk-EQTQ6EZI.mjs.map} +0 -0
  142. /package/dist/{chunk-HUV5HX5Q.mjs.map → chunk-EVG23WHU.mjs.map} +0 -0
  143. /package/dist/{chunk-DUKIT4NA.mjs.map → chunk-FIIA7ENW.mjs.map} +0 -0
  144. /package/dist/{chunk-QUSPYHXS.mjs.map → chunk-HBQFWE27.mjs.map} +0 -0
  145. /package/dist/{chunk-UFJNCZSX.mjs.map → chunk-HTWGHZHY.mjs.map} +0 -0
  146. /package/dist/{chunk-GUECCH5L.mjs.map → chunk-HXE3E7RM.mjs.map} +0 -0
  147. /package/dist/{chunk-QA2AQBXU.mjs.map → chunk-ILB7ZDRN.mjs.map} +0 -0
  148. /package/dist/{chunk-I4FC6QKX.mjs.map → chunk-JOVRTPGK.mjs.map} +0 -0
  149. /package/dist/{chunk-57QHPHF2.mjs.map → chunk-KFYAE4HG.mjs.map} +0 -0
  150. /package/dist/{chunk-7DTNZL5P.mjs.map → chunk-KZQZIQ6T.mjs.map} +0 -0
  151. /package/dist/{chunk-HFW4HITA.mjs.map → chunk-LTTIVS2R.mjs.map} +0 -0
  152. /package/dist/{chunk-QS5D7K4T.mjs.map → chunk-MKZLN3EP.mjs.map} +0 -0
  153. /package/dist/{chunk-YOOXERNJ.mjs.map → chunk-PLIJRFFH.mjs.map} +0 -0
  154. /package/dist/{chunk-HYDAFW6T.mjs.map → chunk-R6PJ5CPZ.mjs.map} +0 -0
  155. /package/dist/{chunk-R35CGRAE.mjs.map → chunk-STBIY75D.mjs.map} +0 -0
  156. /package/dist/{chunk-IPRZQ34G.mjs.map → chunk-SU7MM4FN.mjs.map} +0 -0
  157. /package/dist/{chunk-P2NU2O2J.mjs.map → chunk-US4665GR.mjs.map} +0 -0
  158. /package/dist/{chunk-4YXMF4XH.mjs.map → chunk-VDDHUQPK.mjs.map} +0 -0
  159. /package/dist/{chunk-M4Q4SN4K.mjs.map → chunk-VTXFZ2S3.mjs.map} +0 -0
  160. /package/dist/{chunk-RFJXODWW.mjs.map → chunk-WT6TNFBH.mjs.map} +0 -0
  161. /package/dist/{chunk-WFUDQKBC.mjs.map → chunk-X6CPTGGY.mjs.map} +0 -0
  162. /package/dist/{chunk-MXQZZPQ6.mjs.map → chunk-XL5HGL2Q.mjs.map} +0 -0
  163. /package/dist/{chunk-N3J6HKTR.mjs.map → chunk-YGR2R77U.mjs.map} +0 -0
  164. /package/dist/{chunk-YR2MP6XR.mjs.map → chunk-YXAXW4CU.mjs.map} +0 -0
  165. /package/dist/{chunk-QQ5S4M7U.mjs.map → chunk-ZIZ323HN.mjs.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  choose
3
- } from "./chunk-C6OCUOAU.mjs";
3
+ } from "./chunk-BD6LAT2Y.mjs";
4
4
  import {
5
5
  isArray,
6
6
  isObject
@@ -20,4 +20,4 @@ var isEqual = (one, another) => choose([one, another]).case(([o, a]) => o === a,
20
20
  export {
21
21
  isEqual
22
22
  };
23
- //# sourceMappingURL=chunk-3ESFHUVQ.mjs.map
23
+ //# sourceMappingURL=chunk-2FF6NDVX.mjs.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  choose
3
- } from "./chunk-C6OCUOAU.mjs";
3
+ } from "./chunk-BD6LAT2Y.mjs";
4
4
  import {
5
5
  List,
6
6
  isList,
7
7
  toList
8
- } from "./chunk-KCNTM7XN.mjs";
8
+ } from "./chunk-YTNVFND2.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-2IETG4DU.mjs.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ifTrue,
3
3
  toList
4
- } from "./chunk-KCNTM7XN.mjs";
4
+ } from "./chunk-YTNVFND2.mjs";
5
5
 
6
6
  // src/utils/Seconds.ts
7
7
  var seconds = {
@@ -21,4 +21,4 @@ var seconds = {
21
21
  export {
22
22
  seconds
23
23
  };
24
- //# sourceMappingURL=chunk-LVU54T5J.mjs.map
24
+ //# sourceMappingURL=chunk-4BMUPWAJ.mjs.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ifDefined,
3
3
  toList
4
- } from "./chunk-KCNTM7XN.mjs";
4
+ } from "./chunk-YTNVFND2.mjs";
5
5
 
6
6
  // src/types/Object.ts
7
7
  function entries(subject) {
@@ -34,4 +34,4 @@ export {
34
34
  keys,
35
35
  extractKeys
36
36
  };
37
- //# sourceMappingURL=chunk-HUPULSW2.mjs.map
37
+ //# sourceMappingURL=chunk-4PQAGLRK.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Enum
3
- } from "./chunk-HUV5HX5Q.mjs";
3
+ } from "./chunk-EVG23WHU.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-IFQCUHOE.mjs.map
20
+ //# sourceMappingURL=chunk-4XY7L4GK.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-FIIA7ENW.mjs";
10
10
  import {
11
11
  ctx
12
- } from "./chunk-C6OCUOAU.mjs";
12
+ } from "./chunk-BD6LAT2Y.mjs";
13
13
  import {
14
14
  Enum
15
- } from "./chunk-HUV5HX5Q.mjs";
15
+ } from "./chunk-EVG23WHU.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-5GKFGWMT.mjs.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HttpStatus,
3
3
  isHttpStatus
4
- } from "./chunk-R35CGRAE.mjs";
4
+ } from "./chunk-STBIY75D.mjs";
5
5
  import {
6
6
  isResponse
7
7
  } from "./chunk-UYDZZAEK.mjs";
@@ -10,10 +10,10 @@ import {
10
10
  isResult,
11
11
  isResults,
12
12
  toResult
13
- } from "./chunk-C6OCUOAU.mjs";
13
+ } from "./chunk-BD6LAT2Y.mjs";
14
14
  import {
15
15
  toList
16
- } from "./chunk-KCNTM7XN.mjs";
16
+ } from "./chunk-YTNVFND2.mjs";
17
17
  import {
18
18
  isDefined,
19
19
  isError
@@ -48,4 +48,4 @@ export {
48
48
  rest,
49
49
  isRestResult
50
50
  };
51
- //# sourceMappingURL=chunk-W7CNGM5N.mjs.map
51
+ //# sourceMappingURL=chunk-7SZETQR3.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-YXAXW4CU.mjs";
4
+ import {
5
+ validate
6
+ } from "./chunk-BD6LAT2Y.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-7THDYHVE.mjs.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  ApiGateway
3
- } from "./chunk-57QHPHF2.mjs";
3
+ } from "./chunk-KFYAE4HG.mjs";
4
4
  import {
5
5
  Api
6
- } from "./chunk-GUECCH5L.mjs";
6
+ } from "./chunk-HXE3E7RM.mjs";
7
7
  import {
8
8
  HttpStatus
9
- } from "./chunk-R35CGRAE.mjs";
9
+ } from "./chunk-STBIY75D.mjs";
10
10
  import {
11
11
  toArray
12
12
  } from "./chunk-CO2AFYVD.mjs";
@@ -57,4 +57,4 @@ var RouteGateway = class extends ApiGateway {
57
57
  export {
58
58
  RouteGateway
59
59
  };
60
- //# sourceMappingURL=chunk-6U5LBNOQ.mjs.map
60
+ //# sourceMappingURL=chunk-7YOBRIPP.mjs.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  asNumber
3
- } from "./chunk-7DTNZL5P.mjs";
3
+ } from "./chunk-KZQZIQ6T.mjs";
4
4
  import {
5
5
  choose
6
- } from "./chunk-C6OCUOAU.mjs";
6
+ } from "./chunk-BD6LAT2Y.mjs";
7
7
  import {
8
8
  asString
9
9
  } from "./chunk-TOERQZRP.mjs";
@@ -54,4 +54,4 @@ export {
54
54
  cacheAge,
55
55
  isCacheAge
56
56
  };
57
- //# sourceMappingURL=chunk-JTLUBEB4.mjs.map
57
+ //# sourceMappingURL=chunk-AAPNDGQS.mjs.map
@@ -4,16 +4,16 @@ import {
4
4
  import {
5
5
  Property
6
6
  } from "./chunk-LGPKT5JC.mjs";
7
- import {
8
- meta
9
- } from "./chunk-M4Q4SN4K.mjs";
10
7
  import {
11
8
  json
12
- } from "./chunk-YR2MP6XR.mjs";
9
+ } from "./chunk-YXAXW4CU.mjs";
10
+ import {
11
+ meta
12
+ } from "./chunk-VTXFZ2S3.mjs";
13
13
  import {
14
14
  ifNotEmpty,
15
15
  toList
16
- } from "./chunk-KCNTM7XN.mjs";
16
+ } from "./chunk-YTNVFND2.mjs";
17
17
  import {
18
18
  ofGet
19
19
  } from "./chunk-SJGQU3OG.mjs";
@@ -131,4 +131,4 @@ export {
131
131
  Mapper,
132
132
  mappings
133
133
  };
134
- //# sourceMappingURL=chunk-RSS35MOP.mjs.map
134
+ //# sourceMappingURL=chunk-AU4TT4W7.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-LTTIVS2R.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-EVG23WHU.mjs";
15
15
  import {
16
16
  meta
17
- } from "./chunk-M4Q4SN4K.mjs";
17
+ } from "./chunk-VTXFZ2S3.mjs";
18
18
  import {
19
19
  entries
20
- } from "./chunk-HUPULSW2.mjs";
20
+ } from "./chunk-4PQAGLRK.mjs";
21
21
  import {
22
22
  toList
23
- } from "./chunk-KCNTM7XN.mjs";
23
+ } from "./chunk-YTNVFND2.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-BD6LAT2Y.mjs.map