@thisisagile/easy 17.25.2 → 17.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +3476 -115
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-27MBNT3X.mjs +0 -25
- package/dist/chunk-27MBNT3X.mjs.map +0 -1
- package/dist/chunk-35SXXNQO.mjs +0 -20
- package/dist/chunk-35SXXNQO.mjs.map +0 -1
- package/dist/chunk-3M6NLHSO.mjs +0 -18
- package/dist/chunk-3M6NLHSO.mjs.map +0 -1
- package/dist/chunk-4CRBLF44.mjs +0 -56
- package/dist/chunk-4CRBLF44.mjs.map +0 -1
- package/dist/chunk-4K4X43SV.mjs +0 -164
- package/dist/chunk-4K4X43SV.mjs.map +0 -1
- package/dist/chunk-4LVZOQ6O.mjs +0 -58
- package/dist/chunk-4LVZOQ6O.mjs.map +0 -1
- package/dist/chunk-4N72FQFX.mjs +0 -16
- package/dist/chunk-4N72FQFX.mjs.map +0 -1
- package/dist/chunk-5AV36UKS.mjs +0 -20
- package/dist/chunk-5AV36UKS.mjs.map +0 -1
- package/dist/chunk-5DJPREIN.mjs +0 -142
- package/dist/chunk-5DJPREIN.mjs.map +0 -1
- package/dist/chunk-5ZHEIMZ7.mjs +0 -79
- package/dist/chunk-5ZHEIMZ7.mjs.map +0 -1
- package/dist/chunk-6QFV73AS.mjs +0 -55
- package/dist/chunk-6QFV73AS.mjs.map +0 -1
- package/dist/chunk-7DNADCD4.mjs +0 -53
- package/dist/chunk-7DNADCD4.mjs.map +0 -1
- package/dist/chunk-ABGKS4KE.mjs +0 -297
- package/dist/chunk-ABGKS4KE.mjs.map +0 -1
- package/dist/chunk-ADJAEGCT.mjs +0 -21
- package/dist/chunk-ADJAEGCT.mjs.map +0 -1
- package/dist/chunk-AGTB4HMP.mjs +0 -11
- package/dist/chunk-AGTB4HMP.mjs.map +0 -1
- package/dist/chunk-AINW2476.mjs +0 -90
- package/dist/chunk-AINW2476.mjs.map +0 -1
- package/dist/chunk-BDA5LB4S.mjs +0 -29
- package/dist/chunk-BDA5LB4S.mjs.map +0 -1
- package/dist/chunk-BIEWRRM7.mjs +0 -26
- package/dist/chunk-BIEWRRM7.mjs.map +0 -1
- package/dist/chunk-BIHKQLEE.mjs +0 -40
- package/dist/chunk-BIHKQLEE.mjs.map +0 -1
- package/dist/chunk-CO2AFYVD.mjs +0 -43
- package/dist/chunk-CO2AFYVD.mjs.map +0 -1
- package/dist/chunk-CSAPGLC7.mjs +0 -94
- package/dist/chunk-CSAPGLC7.mjs.map +0 -1
- package/dist/chunk-CSHFNF34.mjs +0 -35
- package/dist/chunk-CSHFNF34.mjs.map +0 -1
- package/dist/chunk-CWWAGBYB.mjs +0 -46
- package/dist/chunk-CWWAGBYB.mjs.map +0 -1
- package/dist/chunk-DEJ7A5PY.mjs +0 -43
- package/dist/chunk-DEJ7A5PY.mjs.map +0 -1
- package/dist/chunk-DXQSIBC7.mjs +0 -13
- package/dist/chunk-DXQSIBC7.mjs.map +0 -1
- package/dist/chunk-F34HSIZ5.mjs +0 -68
- package/dist/chunk-F34HSIZ5.mjs.map +0 -1
- package/dist/chunk-GADZDWP3.mjs +0 -20
- package/dist/chunk-GADZDWP3.mjs.map +0 -1
- package/dist/chunk-GB2P3UEO.mjs +0 -82
- package/dist/chunk-GB2P3UEO.mjs.map +0 -1
- package/dist/chunk-GCY5A63A.mjs +0 -25
- package/dist/chunk-GCY5A63A.mjs.map +0 -1
- package/dist/chunk-HL2BC7Z2.mjs +0 -76
- package/dist/chunk-HL2BC7Z2.mjs.map +0 -1
- package/dist/chunk-HULI73W2.mjs +0 -37
- package/dist/chunk-HULI73W2.mjs.map +0 -1
- package/dist/chunk-J3DYDXXF.mjs +0 -175
- package/dist/chunk-J3DYDXXF.mjs.map +0 -1
- package/dist/chunk-JMIXHXWM.mjs +0 -23
- package/dist/chunk-JMIXHXWM.mjs.map +0 -1
- package/dist/chunk-KJVTSC6I.mjs +0 -24
- package/dist/chunk-KJVTSC6I.mjs.map +0 -1
- package/dist/chunk-L63NPT4K.mjs +0 -39
- package/dist/chunk-L63NPT4K.mjs.map +0 -1
- package/dist/chunk-LYRXR6GZ.mjs +0 -54
- package/dist/chunk-LYRXR6GZ.mjs.map +0 -1
- package/dist/chunk-MBRLKMEQ.mjs +0 -54
- package/dist/chunk-MBRLKMEQ.mjs.map +0 -1
- package/dist/chunk-MDXL65W4.mjs +0 -49
- package/dist/chunk-MDXL65W4.mjs.map +0 -1
- package/dist/chunk-O2YZM3KB.mjs +0 -70
- package/dist/chunk-O2YZM3KB.mjs.map +0 -1
- package/dist/chunk-OFGI5FLG.mjs +0 -11
- package/dist/chunk-OFGI5FLG.mjs.map +0 -1
- package/dist/chunk-OKPGJD64.mjs +0 -41
- package/dist/chunk-OKPGJD64.mjs.map +0 -1
- package/dist/chunk-OQNZEKWO.mjs +0 -24
- package/dist/chunk-OQNZEKWO.mjs.map +0 -1
- package/dist/chunk-PIQ5Z4RB.mjs +0 -18
- package/dist/chunk-PIQ5Z4RB.mjs.map +0 -1
- package/dist/chunk-PIRWVOO2.mjs +0 -7
- package/dist/chunk-PIRWVOO2.mjs.map +0 -1
- package/dist/chunk-QBHHLIZY.mjs +0 -51
- package/dist/chunk-QBHHLIZY.mjs.map +0 -1
- package/dist/chunk-RNLFG4YX.mjs +0 -20
- package/dist/chunk-RNLFG4YX.mjs.map +0 -1
- package/dist/chunk-S6WR4MXU.mjs +0 -324
- package/dist/chunk-S6WR4MXU.mjs.map +0 -1
- package/dist/chunk-SDO3B3BQ.mjs +0 -45
- package/dist/chunk-SDO3B3BQ.mjs.map +0 -1
- package/dist/chunk-SJ4YFZKO.mjs +0 -21
- package/dist/chunk-SJ4YFZKO.mjs.map +0 -1
- package/dist/chunk-SJGQU3OG.mjs +0 -15
- package/dist/chunk-SJGQU3OG.mjs.map +0 -1
- package/dist/chunk-SSROJBD5.mjs +0 -30
- package/dist/chunk-SSROJBD5.mjs.map +0 -1
- package/dist/chunk-SW2OCUH3.mjs +0 -10
- package/dist/chunk-SW2OCUH3.mjs.map +0 -1
- package/dist/chunk-TCQRHKGS.mjs +0 -20
- package/dist/chunk-TCQRHKGS.mjs.map +0 -1
- package/dist/chunk-TNHYFGFF.mjs +0 -60
- package/dist/chunk-TNHYFGFF.mjs.map +0 -1
- package/dist/chunk-TYODLVCG.mjs +0 -23
- package/dist/chunk-TYODLVCG.mjs.map +0 -1
- package/dist/chunk-U5VBBUQ2.mjs +0 -48
- package/dist/chunk-U5VBBUQ2.mjs.map +0 -1
- package/dist/chunk-UYDZZAEK.mjs +0 -11
- package/dist/chunk-UYDZZAEK.mjs.map +0 -1
- package/dist/chunk-VIPHIYGL.mjs +0 -107
- package/dist/chunk-VIPHIYGL.mjs.map +0 -1
- package/dist/chunk-VXVOY44M.mjs +0 -40
- package/dist/chunk-VXVOY44M.mjs.map +0 -1
- package/dist/chunk-W64ACIZO.mjs +0 -50
- package/dist/chunk-W64ACIZO.mjs.map +0 -1
- package/dist/chunk-WJZFE5NE.mjs +0 -17
- package/dist/chunk-WJZFE5NE.mjs.map +0 -1
- package/dist/chunk-WM2FXAWF.mjs +0 -134
- package/dist/chunk-WM2FXAWF.mjs.map +0 -1
- package/dist/chunk-WSBULPUZ.mjs +0 -30
- package/dist/chunk-WSBULPUZ.mjs.map +0 -1
- package/dist/chunk-WSG55HKA.mjs +0 -94
- package/dist/chunk-WSG55HKA.mjs.map +0 -1
- package/dist/chunk-YPVIK4SP.mjs +0 -57
- package/dist/chunk-YPVIK4SP.mjs.map +0 -1
- package/dist/chunk-ZHXKBOK2.mjs +0 -22
- package/dist/chunk-ZHXKBOK2.mjs.map +0 -1
- package/dist/chunk-ZPNFXK7Y.mjs +0 -36
- package/dist/chunk-ZPNFXK7Y.mjs.map +0 -1
- package/dist/chunk-ZSLYORET.mjs +0 -31
- package/dist/chunk-ZSLYORET.mjs.map +0 -1
- package/dist/data/Condition.mjs +0 -29
- package/dist/data/Condition.mjs.map +0 -1
- package/dist/data/DataProvider.mjs +0 -1
- package/dist/data/DataProvider.mjs.map +0 -1
- package/dist/data/Database.mjs +0 -23
- package/dist/data/Database.mjs.map +0 -1
- package/dist/data/Field.mjs +0 -47
- package/dist/data/Field.mjs.map +0 -1
- package/dist/data/InMemoryGateway.mjs +0 -70
- package/dist/data/InMemoryGateway.mjs.map +0 -1
- package/dist/data/Query.mjs +0 -1
- package/dist/data/Query.mjs.map +0 -1
- package/dist/data/QueryProvider.mjs +0 -1
- package/dist/data/QueryProvider.mjs.map +0 -1
- package/dist/domain/Audit.mjs +0 -36
- package/dist/domain/Audit.mjs.map +0 -1
- package/dist/domain/Child.mjs +0 -54
- package/dist/domain/Child.mjs.map +0 -1
- package/dist/domain/DateTime.mjs +0 -36
- package/dist/domain/DateTime.mjs.map +0 -1
- package/dist/domain/Entity.mjs +0 -71
- package/dist/domain/Entity.mjs.map +0 -1
- package/dist/domain/Repo.mjs +0 -96
- package/dist/domain/Repo.mjs.map +0 -1
- package/dist/domain/Struct.mjs +0 -33
- package/dist/domain/Struct.mjs.map +0 -1
- package/dist/domain/Typo.mjs +0 -114
- package/dist/domain/Typo.mjs.map +0 -1
- package/dist/http/CacheControl.mjs +0 -66
- package/dist/http/CacheControl.mjs.map +0 -1
- package/dist/http/ContentType.mjs +0 -21
- package/dist/http/ContentType.mjs.map +0 -1
- package/dist/http/HttpHeader.mjs +0 -8
- package/dist/http/HttpHeader.mjs.map +0 -1
- package/dist/http/HttpStatus.mjs +0 -25
- package/dist/http/HttpStatus.mjs.map +0 -1
- package/dist/http/HttpVerb.mjs +0 -21
- package/dist/http/HttpVerb.mjs.map +0 -1
- package/dist/http/LocalRequestStore.mjs +0 -29
- package/dist/http/LocalRequestStore.mjs.map +0 -1
- package/dist/http/Request.mjs +0 -1
- package/dist/http/Request.mjs.map +0 -1
- package/dist/http/RequestOptions.mjs +0 -30
- package/dist/http/RequestOptions.mjs.map +0 -1
- package/dist/http/RequestProvider.mjs +0 -1
- package/dist/http/RequestProvider.mjs.map +0 -1
- package/dist/http/Response.mjs +0 -13
- package/dist/http/Response.mjs.map +0 -1
- package/dist/http/RestResult.mjs +0 -34
- package/dist/http/RestResult.mjs.map +0 -1
- package/dist/http/toResponse.mjs +0 -33
- package/dist/http/toResponse.mjs.map +0 -1
- package/dist/process/App.mjs +0 -30
- package/dist/process/App.mjs.map +0 -1
- package/dist/process/Manage.mjs +0 -47
- package/dist/process/Manage.mjs.map +0 -1
- package/dist/process/Scope.mjs +0 -22
- package/dist/process/Scope.mjs.map +0 -1
- package/dist/process/Search.mjs +0 -31
- package/dist/process/Search.mjs.map +0 -1
- package/dist/process/UseCase.mjs +0 -53
- package/dist/process/UseCase.mjs.map +0 -1
- package/dist/resources/Req.mjs +0 -57
- package/dist/resources/Req.mjs.map +0 -1
- package/dist/security/Jwt.mjs +0 -77
- package/dist/security/Jwt.mjs.map +0 -1
- package/dist/services/Api.mjs +0 -44
- package/dist/services/Api.mjs.map +0 -1
- package/dist/services/ApiGateway.mjs +0 -45
- package/dist/services/ApiGateway.mjs.map +0 -1
- package/dist/services/AxiosProvider.mjs +0 -40
- package/dist/services/AxiosProvider.mjs.map +0 -1
- package/dist/services/MappedRouteGateway.mjs +0 -78
- package/dist/services/MappedRouteGateway.mjs.map +0 -1
- package/dist/services/RouteGateway.mjs +0 -46
- package/dist/services/RouteGateway.mjs.map +0 -1
- package/dist/services/ViewRouteGateway.mjs +0 -79
- package/dist/services/ViewRouteGateway.mjs.map +0 -1
- package/dist/sql/Clause.mjs +0 -24
- package/dist/sql/Clause.mjs.map +0 -1
- package/dist/sql/Column.mjs +0 -37
- package/dist/sql/Column.mjs.map +0 -1
- package/dist/sql/Count.mjs +0 -20
- package/dist/sql/Count.mjs.map +0 -1
- package/dist/sql/Delete.mjs +0 -19
- package/dist/sql/Delete.mjs.map +0 -1
- package/dist/sql/Insert.mjs +0 -21
- package/dist/sql/Insert.mjs.map +0 -1
- package/dist/sql/Join.mjs +0 -8
- package/dist/sql/Join.mjs.map +0 -1
- package/dist/sql/Select.mjs +0 -19
- package/dist/sql/Select.mjs.map +0 -1
- package/dist/sql/SqlQuery.mjs +0 -18
- package/dist/sql/SqlQuery.mjs.map +0 -1
- package/dist/sql/Table.mjs +0 -93
- package/dist/sql/Table.mjs.map +0 -1
- package/dist/sql/TableGateway.mjs +0 -72
- package/dist/sql/TableGateway.mjs.map +0 -1
- package/dist/sql/Update.mjs +0 -21
- package/dist/sql/Update.mjs.map +0 -1
- package/dist/types/AnyKey.mjs +0 -1
- package/dist/types/AnyKey.mjs.map +0 -1
- package/dist/types/Array.mjs +0 -16
- package/dist/types/Array.mjs.map +0 -1
- package/dist/types/Builder.mjs +0 -26
- package/dist/types/Builder.mjs.map +0 -1
- package/dist/types/Cache.mjs +0 -29
- package/dist/types/Cache.mjs.map +0 -1
- package/dist/types/CacheAge.mjs +0 -33
- package/dist/types/CacheAge.mjs.map +0 -1
- package/dist/types/Case.mjs +0 -29
- package/dist/types/Case.mjs.map +0 -1
- package/dist/types/Constructor.mjs +0 -23
- package/dist/types/Constructor.mjs.map +0 -1
- package/dist/types/Context.mjs +0 -28
- package/dist/types/Context.mjs.map +0 -1
- package/dist/types/Currency.mjs +0 -15
- package/dist/types/Currency.mjs.map +0 -1
- package/dist/types/Enum.mjs +0 -24
- package/dist/types/Enum.mjs.map +0 -1
- package/dist/types/Environment.mjs +0 -28
- package/dist/types/Environment.mjs.map +0 -1
- package/dist/types/ErrorOrigin.mjs +0 -1
- package/dist/types/ErrorOrigin.mjs.map +0 -1
- package/dist/types/Exception.mjs +0 -26
- package/dist/types/Exception.mjs.map +0 -1
- package/dist/types/Falsy.mjs +0 -10
- package/dist/types/Falsy.mjs.map +0 -1
- package/dist/types/Func.mjs +0 -8
- package/dist/types/Func.mjs.map +0 -1
- package/dist/types/Gateway.mjs +0 -24
- package/dist/types/Gateway.mjs.map +0 -1
- package/dist/types/Get.mjs +0 -13
- package/dist/types/Get.mjs.map +0 -1
- package/dist/types/Id.mjs +0 -13
- package/dist/types/Id.mjs.map +0 -1
- package/dist/types/IdName.mjs +0 -1
- package/dist/types/IdName.mjs.map +0 -1
- package/dist/types/Identity.mjs +0 -1
- package/dist/types/Identity.mjs.map +0 -1
- package/dist/types/Indexed.mjs +0 -15
- package/dist/types/Indexed.mjs.map +0 -1
- package/dist/types/Is.mjs +0 -42
- package/dist/types/Is.mjs.map +0 -1
- package/dist/types/IsA.mjs +0 -16
- package/dist/types/IsA.mjs.map +0 -1
- package/dist/types/IsDate.mjs +0 -14
- package/dist/types/IsDate.mjs.map +0 -1
- package/dist/types/IsEqual.mjs +0 -30
- package/dist/types/IsEqual.mjs.map +0 -1
- package/dist/types/Json.mjs +0 -29
- package/dist/types/Json.mjs.map +0 -1
- package/dist/types/List.mjs +0 -27
- package/dist/types/List.mjs.map +0 -1
- package/dist/types/Message.mjs +0 -11
- package/dist/types/Message.mjs.map +0 -1
- package/dist/types/Meta.mjs +0 -19
- package/dist/types/Meta.mjs.map +0 -1
- package/dist/types/Nullish.mjs +0 -8
- package/dist/types/Nullish.mjs.map +0 -1
- package/dist/types/Number.mjs +0 -30
- package/dist/types/Number.mjs.map +0 -1
- package/dist/types/Object.mjs +0 -24
- package/dist/types/Object.mjs.map +0 -1
- package/dist/types/PageList.mjs +0 -40
- package/dist/types/PageList.mjs.map +0 -1
- package/dist/types/Parser.mjs +0 -80
- package/dist/types/Parser.mjs.map +0 -1
- package/dist/types/Primitive.mjs +0 -9
- package/dist/types/Primitive.mjs.map +0 -1
- package/dist/types/Repository.mjs +0 -24
- package/dist/types/Repository.mjs.map +0 -1
- package/dist/types/Result.mjs +0 -23
- package/dist/types/Result.mjs.map +0 -1
- package/dist/types/Results.mjs +0 -26
- package/dist/types/Results.mjs.map +0 -1
- package/dist/types/Sort.mjs +0 -10
- package/dist/types/Sort.mjs.map +0 -1
- package/dist/types/Tag.mjs +0 -26
- package/dist/types/Tag.mjs.map +0 -1
- package/dist/types/Template.mjs +0 -21
- package/dist/types/Template.mjs.map +0 -1
- package/dist/types/Text.mjs +0 -21
- package/dist/types/Text.mjs.map +0 -1
- package/dist/types/ToText.mjs +0 -23
- package/dist/types/ToText.mjs.map +0 -1
- package/dist/types/Try.mjs +0 -31
- package/dist/types/Try.mjs.map +0 -1
- package/dist/types/TypeGuard.mjs +0 -1
- package/dist/types/TypeGuard.mjs.map +0 -1
- package/dist/types/Types.mjs +0 -1
- package/dist/types/Types.mjs.map +0 -1
- package/dist/types/Uri.mjs +0 -119
- package/dist/types/Uri.mjs.map +0 -1
- package/dist/types/Uuid.mjs +0 -16
- package/dist/types/Uuid.mjs.map +0 -1
- package/dist/types/Validatable.mjs +0 -13
- package/dist/types/Validatable.mjs.map +0 -1
- package/dist/types/Value.mjs +0 -14
- package/dist/types/Value.mjs.map +0 -1
- package/dist/utils/Base64.mjs +0 -12
- package/dist/utils/Base64.mjs.map +0 -1
- package/dist/utils/Convert.mjs +0 -14
- package/dist/utils/Convert.mjs.map +0 -1
- package/dist/utils/If.mjs +0 -25
- package/dist/utils/If.mjs.map +0 -1
- package/dist/utils/Loading.mjs +0 -11
- package/dist/utils/Loading.mjs.map +0 -1
- package/dist/utils/Log.mjs +0 -21
- package/dist/utils/Log.mjs.map +0 -1
- package/dist/utils/Mapper.mjs +0 -28
- package/dist/utils/Mapper.mjs.map +0 -1
- package/dist/utils/Promise.mjs +0 -35
- package/dist/utils/Promise.mjs.map +0 -1
- package/dist/utils/Property.mjs +0 -13
- package/dist/utils/Property.mjs.map +0 -1
- package/dist/utils/Seconds.mjs +0 -18
- package/dist/utils/Seconds.mjs.map +0 -1
- package/dist/utils/Sentence.mjs +0 -71
- package/dist/utils/Sentence.mjs.map +0 -1
- package/dist/utils/State.mjs +0 -12
- package/dist/utils/State.mjs.map +0 -1
- package/dist/utils/Traverse.mjs +0 -12
- package/dist/utils/Traverse.mjs.map +0 -1
- package/dist/utils/View.mjs +0 -41
- package/dist/utils/View.mjs.map +0 -1
- package/dist/utils/Wait.mjs +0 -17
- package/dist/utils/Wait.mjs.map +0 -1
- package/dist/validation/Contraints.mjs +0 -65
- package/dist/validation/Contraints.mjs.map +0 -1
- package/dist/validation/Validate.mjs +0 -35
- package/dist/validation/Validate.mjs.map +0 -1
- package/dist/validation/When.mjs +0 -31
- package/dist/validation/When.mjs.map +0 -1
package/dist/chunk-YPVIK4SP.mjs
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
asNumber
|
|
3
|
-
} from "./chunk-GADZDWP3.mjs";
|
|
4
|
-
import {
|
|
5
|
-
choose
|
|
6
|
-
} from "./chunk-S6WR4MXU.mjs";
|
|
7
|
-
import {
|
|
8
|
-
asString
|
|
9
|
-
} from "./chunk-BDA5LB4S.mjs";
|
|
10
|
-
import {
|
|
11
|
-
isNumber,
|
|
12
|
-
isString
|
|
13
|
-
} from "./chunk-DEJ7A5PY.mjs";
|
|
14
|
-
|
|
15
|
-
// src/types/CacheAge.ts
|
|
16
|
-
var ageNumber = (s) => asNumber(s.replace(/[a-z]/g, ""));
|
|
17
|
-
var cacheAge = {
|
|
18
|
-
toMilliseconds: (ca) => choose(asString(ca)).case(
|
|
19
|
-
(c) => c.endsWith("ms"),
|
|
20
|
-
(c) => ageNumber(c)
|
|
21
|
-
).case(
|
|
22
|
-
(c) => c.endsWith("s"),
|
|
23
|
-
(c) => ageNumber(c) * 1e3
|
|
24
|
-
).case(
|
|
25
|
-
(c) => c.endsWith("m"),
|
|
26
|
-
(c) => ageNumber(c) * 60 * 1e3
|
|
27
|
-
).case(
|
|
28
|
-
(c) => c.endsWith("h"),
|
|
29
|
-
(c) => ageNumber(c) * 3600 * 1e3
|
|
30
|
-
).case(
|
|
31
|
-
(c) => c.endsWith("d"),
|
|
32
|
-
(c) => ageNumber(c) * 24 * 3600 * 1e3
|
|
33
|
-
).else(ca),
|
|
34
|
-
toSeconds: (ca) => choose(asString(ca)).case(
|
|
35
|
-
(c) => c.endsWith("ms"),
|
|
36
|
-
(c) => ageNumber(c) / 1e3
|
|
37
|
-
).case(
|
|
38
|
-
(c) => c.endsWith("s"),
|
|
39
|
-
(c) => ageNumber(c)
|
|
40
|
-
).case(
|
|
41
|
-
(c) => c.endsWith("m"),
|
|
42
|
-
(c) => ageNumber(c) * 60
|
|
43
|
-
).case(
|
|
44
|
-
(c) => c.endsWith("h"),
|
|
45
|
-
(c) => ageNumber(c) * 3600
|
|
46
|
-
).case(
|
|
47
|
-
(c) => c.endsWith("d"),
|
|
48
|
-
(c) => ageNumber(c) * 24 * 3600
|
|
49
|
-
).else(ca)
|
|
50
|
-
};
|
|
51
|
-
var isCacheAge = (ca) => isString(ca) || isNumber(ca);
|
|
52
|
-
|
|
53
|
-
export {
|
|
54
|
-
cacheAge,
|
|
55
|
-
isCacheAge
|
|
56
|
-
};
|
|
57
|
-
//# sourceMappingURL=chunk-YPVIK4SP.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types/CacheAge.ts"],"sourcesContent":["import { asNumber } from './Number';\nimport { choose } from './Case';\nimport { asString } from './Text';\nimport { isNumber, isString } from './Is';\n\nexport type CacheAge = `${number}${'ms' | 's' | 'm' | 'h' | 'd'}` | number;\n\nconst ageNumber = (s: string): number => asNumber(s.replace(/[a-z]/g, ''));\n\nexport const cacheAge = {\n toMilliseconds: (ca: CacheAge): number =>\n choose(asString(ca))\n .case(\n c => c.endsWith('ms'),\n c => ageNumber(c)\n )\n .case(\n c => c.endsWith('s'),\n c => ageNumber(c) * 1000\n )\n .case(\n c => c.endsWith('m'),\n c => ageNumber(c) * 60 * 1000\n )\n .case(\n c => c.endsWith('h'),\n c => ageNumber(c) * 3600 * 1000\n )\n .case(\n c => c.endsWith('d'),\n c => ageNumber(c) * 24 * 3600 * 1000\n )\n .else(ca as number),\n\n toSeconds: (ca: CacheAge): number =>\n choose(asString(ca))\n .case(\n c => c.endsWith('ms'),\n c => ageNumber(c) / 1000\n )\n .case(\n c => c.endsWith('s'),\n c => ageNumber(c)\n )\n .case(\n c => c.endsWith('m'),\n c => ageNumber(c) * 60\n )\n .case(\n c => c.endsWith('h'),\n c => ageNumber(c) * 3600\n )\n .case(\n c => c.endsWith('d'),\n c => ageNumber(c) * 24 * 3600\n )\n .else(ca as number),\n};\n\nexport const isCacheAge = (ca?: unknown): ca is CacheAge => isString(ca) || isNumber(ca);\n"],"mappings":";;;;;;;;;;;;;;;AAOA,IAAM,YAAY,CAAC,MAAsB,SAAS,EAAE,QAAQ,UAAU,EAAE,CAAC;AAElE,IAAM,WAAW;AAAA,EACtB,gBAAgB,CAAC,OACf,OAAO,SAAS,EAAE,CAAC,EAChB;AAAA,IACC,OAAK,EAAE,SAAS,IAAI;AAAA,IACpB,OAAK,UAAU,CAAC;AAAA,EAClB,EACC;AAAA,IACC,OAAK,EAAE,SAAS,GAAG;AAAA,IACnB,OAAK,UAAU,CAAC,IAAI;AAAA,EACtB,EACC;AAAA,IACC,OAAK,EAAE,SAAS,GAAG;AAAA,IACnB,OAAK,UAAU,CAAC,IAAI,KAAK;AAAA,EAC3B,EACC;AAAA,IACC,OAAK,EAAE,SAAS,GAAG;AAAA,IACnB,OAAK,UAAU,CAAC,IAAI,OAAO;AAAA,EAC7B,EACC;AAAA,IACC,OAAK,EAAE,SAAS,GAAG;AAAA,IACnB,OAAK,UAAU,CAAC,IAAI,KAAK,OAAO;AAAA,EAClC,EACC,KAAK,EAAY;AAAA,EAEtB,WAAW,CAAC,OACV,OAAO,SAAS,EAAE,CAAC,EAChB;AAAA,IACC,OAAK,EAAE,SAAS,IAAI;AAAA,IACpB,OAAK,UAAU,CAAC,IAAI;AAAA,EACtB,EACC;AAAA,IACC,OAAK,EAAE,SAAS,GAAG;AAAA,IACnB,OAAK,UAAU,CAAC;AAAA,EAClB,EACC;AAAA,IACC,OAAK,EAAE,SAAS,GAAG;AAAA,IACnB,OAAK,UAAU,CAAC,IAAI;AAAA,EACtB,EACC;AAAA,IACC,OAAK,EAAE,SAAS,GAAG;AAAA,IACnB,OAAK,UAAU,CAAC,IAAI;AAAA,EACtB,EACC;AAAA,IACC,OAAK,EAAE,SAAS,GAAG;AAAA,IACnB,OAAK,UAAU,CAAC,IAAI,KAAK;AAAA,EAC3B,EACC,KAAK,EAAY;AACxB;AAEO,IAAM,aAAa,CAAC,OAAiC,SAAS,EAAE,KAAK,SAAS,EAAE;","names":[]}
|
package/dist/chunk-ZHXKBOK2.mjs
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
use
|
|
3
|
-
} from "./chunk-ZPNFXK7Y.mjs";
|
|
4
|
-
import {
|
|
5
|
-
isPrimitive
|
|
6
|
-
} from "./chunk-DXQSIBC7.mjs";
|
|
7
|
-
import {
|
|
8
|
-
isDefined,
|
|
9
|
-
isObject
|
|
10
|
-
} from "./chunk-DEJ7A5PY.mjs";
|
|
11
|
-
|
|
12
|
-
// src/types/IsA.ts
|
|
13
|
-
var isA = (t, ...properties) => !isPrimitive(t) && properties.every((p) => p.toString() in t);
|
|
14
|
-
var isAn = isA;
|
|
15
|
-
var isIdentity = (by) => use(by, (b) => isObject(b) && isDefined(b.id));
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
isA,
|
|
19
|
-
isAn,
|
|
20
|
-
isIdentity
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=chunk-ZHXKBOK2.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types/IsA.ts"],"sourcesContent":["import { isPrimitive } from './Primitive';\nimport { Identity } from './Identity';\nimport { use } from './Constructor';\nimport { isDefined, isObject } from './Is';\n\nexport const isA = <T>(t?: unknown, ...properties: (keyof T)[]): t is T => !isPrimitive(t) && properties.every(p => p.toString() in (t as any));\nexport const isAn = isA;\nexport const isIdentity = (by: unknown): by is Identity => use(by as Identity, b => isObject(b) && isDefined(b.id));\n"],"mappings":";;;;;;;;;;;;AAKO,IAAM,MAAM,CAAI,MAAgB,eAAoC,CAAC,YAAY,CAAC,KAAK,WAAW,MAAM,OAAK,EAAE,SAAS,KAAM,CAAS;AACvI,IAAM,OAAO;AACb,IAAM,aAAa,CAAC,OAAgC,IAAI,IAAgB,OAAK,SAAS,CAAC,KAAK,UAAU,EAAE,EAAE,CAAC;","names":[]}
|
package/dist/chunk-ZPNFXK7Y.mjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isPrimitive
|
|
3
|
-
} from "./chunk-DXQSIBC7.mjs";
|
|
4
|
-
import {
|
|
5
|
-
isFunc
|
|
6
|
-
} from "./chunk-PIRWVOO2.mjs";
|
|
7
|
-
import {
|
|
8
|
-
isDefined,
|
|
9
|
-
isFunction
|
|
10
|
-
} from "./chunk-DEJ7A5PY.mjs";
|
|
11
|
-
|
|
12
|
-
// src/types/Constructor.ts
|
|
13
|
-
var isConstructor = (c) => (isDefined(c) && isFunc(c) && c.prototype && c.prototype.constructor) === c;
|
|
14
|
-
var isInstance = (ctor, o) => isFunction(ctor) && o instanceof ctor;
|
|
15
|
-
var ofConstruct = (c, ...args) => isConstructor(c) ? new c(...args) : isFunc(c) ? c(...args) : c;
|
|
16
|
-
var toName = (subject, postfix = "") => subject?.constructor?.name?.replace(postfix, "").toLowerCase() ?? "";
|
|
17
|
-
var isPromise = (value) => {
|
|
18
|
-
return value instanceof Promise;
|
|
19
|
-
};
|
|
20
|
-
var on = (t, f) => {
|
|
21
|
-
const result = f(t);
|
|
22
|
-
return isPromise(result) ? result.then(() => t) : t;
|
|
23
|
-
};
|
|
24
|
-
var use = (t, f) => f(t);
|
|
25
|
-
var ifA = (c, t, alt) => !isPrimitive(t) && t instanceof c ? t : alt ? ifA(c, alt) : void 0;
|
|
26
|
-
|
|
27
|
-
export {
|
|
28
|
-
isConstructor,
|
|
29
|
-
isInstance,
|
|
30
|
-
ofConstruct,
|
|
31
|
-
toName,
|
|
32
|
-
on,
|
|
33
|
-
use,
|
|
34
|
-
ifA
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=chunk-ZPNFXK7Y.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types/Constructor.ts"],"sourcesContent":["import { Get } from './Get';\nimport { isFunc } from './Func';\nimport { isDefined, isFunction } from './Is';\nimport { isPrimitive } from './Primitive';\nimport { Optional } from './Types';\n\nexport type Constructor<T = unknown> = { new (...args: any[]): T };\n\nexport type Construct<Out, In = any> = Get<Out, In> | Constructor<Out>;\n\nexport const isConstructor = <T>(c?: unknown): c is Constructor<T> => (isDefined(c) && isFunc<T, unknown>(c) && c.prototype && c.prototype.constructor) === c;\n\nexport const isInstance = <T>(ctor: Constructor<T>, o?: unknown): o is T => isFunction(ctor) && o instanceof ctor;\n\nexport const ofConstruct = <T>(c: Construct<T>, ...args: unknown[]): T => (isConstructor<T>(c) ? new c(...args) : isFunc<T, unknown>(c) ? c(...args) : c);\n\nexport const toName = (subject?: unknown, postfix = ''): string => (subject as any)?.constructor?.name?.replace(postfix, '').toLowerCase() ?? '';\n\nconst isPromise = <T>(value: unknown): value is Promise<T> => {\n return value instanceof Promise;\n};\n\nexport const on = <T, R>(t: T, f: (t: T) => R): R extends Promise<unknown> ? Promise<T> : T => {\n const result = f(t);\n return (isPromise(result) ? result.then(() => t) : t) as R extends Promise<unknown> ? Promise<T> : T;\n};\n\nexport const use = <T, Out>(t: T, f: (t: T) => Out): Out => f(t);\n\nexport const ifA = <T>(c: Constructor<T>, t?: unknown, alt?: unknown): Optional<T> => (!isPrimitive(t) && t instanceof c ? t : alt ? ifA(c, alt) : undefined);\n\nexport type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> &\n {\n [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;\n }[Keys];\n"],"mappings":";;;;;;;;;;;;AAUO,IAAM,gBAAgB,CAAI,OAAsC,UAAU,CAAC,KAAK,OAAmB,CAAC,KAAK,EAAE,aAAa,EAAE,UAAU,iBAAiB;AAErJ,IAAM,aAAa,CAAI,MAAsB,MAAwB,WAAW,IAAI,KAAK,aAAa;AAEtG,IAAM,cAAc,CAAI,MAAoB,SAAwB,cAAiB,CAAC,IAAI,IAAI,EAAE,GAAG,IAAI,IAAI,OAAmB,CAAC,IAAI,EAAE,GAAG,IAAI,IAAI;AAEhJ,IAAM,SAAS,CAAC,SAAmB,UAAU,OAAgB,SAAiB,aAAa,MAAM,QAAQ,SAAS,EAAE,EAAE,YAAY,KAAK;AAE9I,IAAM,YAAY,CAAI,UAAwC;AAC5D,SAAO,iBAAiB;AAC1B;AAEO,IAAM,KAAK,CAAO,GAAM,MAAgE;AAC7F,QAAM,SAAS,EAAE,CAAC;AAClB,SAAQ,UAAU,MAAM,IAAI,OAAO,KAAK,MAAM,CAAC,IAAI;AACrD;AAEO,IAAM,MAAM,CAAS,GAAM,MAA0B,EAAE,CAAC;AAExD,IAAM,MAAM,CAAI,GAAmB,GAAa,QAAgC,CAAC,YAAY,CAAC,KAAK,aAAa,IAAI,IAAI,MAAM,IAAI,GAAG,GAAG,IAAI;","names":[]}
|
package/dist/chunk-ZSLYORET.mjs
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Enum
|
|
3
|
-
} from "./chunk-F34HSIZ5.mjs";
|
|
4
|
-
import {
|
|
5
|
-
asString
|
|
6
|
-
} from "./chunk-BDA5LB4S.mjs";
|
|
7
|
-
import {
|
|
8
|
-
ofGet
|
|
9
|
-
} from "./chunk-SJGQU3OG.mjs";
|
|
10
|
-
|
|
11
|
-
// src/http/ContentType.ts
|
|
12
|
-
import formUrlEncoded from "form-urlencoded";
|
|
13
|
-
var ContentType = class _ContentType extends Enum {
|
|
14
|
-
constructor(name, type, encoder = (b) => asString(b)) {
|
|
15
|
-
super(name, type);
|
|
16
|
-
this.type = type;
|
|
17
|
-
this.encoder = encoder;
|
|
18
|
-
}
|
|
19
|
-
static Form = new _ContentType("form", "application/x-www-form-urlencoded", (b) => formUrlEncoded(b));
|
|
20
|
-
static Json = new _ContentType("json", "application/json", (b) => b);
|
|
21
|
-
static RawJson = new _ContentType("rawJson", "application/json", (b) => b);
|
|
22
|
-
static Stream = new _ContentType("stream", "application/octet-stream");
|
|
23
|
-
static Text = new _ContentType("text", "text/plain");
|
|
24
|
-
static Xml = new _ContentType("xml", "application/xml");
|
|
25
|
-
encode = (body) => ofGet(this.encoder, body);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export {
|
|
29
|
-
ContentType
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=chunk-ZSLYORET.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/http/ContentType.ts"],"sourcesContent":["import formUrlEncoded from 'form-urlencoded';\nimport { Enum } from '../types/Enum';\nimport { Get, ofGet } from '../types/Get';\nimport { asString } from '../types/Text';\n\nexport class ContentType extends Enum {\n static Form = new ContentType('form', 'application/x-www-form-urlencoded', b => formUrlEncoded(b));\n static Json = new ContentType('json', 'application/json', b => b);\n static RawJson = new ContentType('rawJson', 'application/json', b => b);\n static Stream = new ContentType('stream', 'application/octet-stream');\n static Text = new ContentType('text', 'text/plain');\n static Xml = new ContentType('xml', 'application/xml');\n\n private constructor(\n name: string,\n readonly type: string,\n protected readonly encoder: Get<string> = b => asString(b)\n ) {\n super(name, type);\n }\n\n encode = (body?: unknown): string => ofGet(this.encoder, body);\n}\n"],"mappings":";;;;;;;;;;;AAAA,OAAO,oBAAoB;AAKpB,IAAM,cAAN,MAAM,qBAAoB,KAAK;AAAA,EAQ5B,YACN,MACS,MACU,UAAuB,OAAK,SAAS,CAAC,GACzD;AACA,UAAM,MAAM,IAAI;AAHP;AACU;AAAA,EAGrB;AAAA,EAbA,OAAO,OAAO,IAAI,aAAY,QAAQ,qCAAqC,OAAK,eAAe,CAAC,CAAC;AAAA,EACjG,OAAO,OAAO,IAAI,aAAY,QAAQ,oBAAoB,OAAK,CAAC;AAAA,EAChE,OAAO,UAAU,IAAI,aAAY,WAAW,oBAAoB,OAAK,CAAC;AAAA,EACtE,OAAO,SAAS,IAAI,aAAY,UAAU,0BAA0B;AAAA,EACpE,OAAO,OAAO,IAAI,aAAY,QAAQ,YAAY;AAAA,EAClD,OAAO,MAAM,IAAI,aAAY,OAAO,iBAAiB;AAAA,EAUrD,SAAS,CAAC,SAA2B,MAAM,KAAK,SAAS,IAAI;AAC/D;","names":[]}
|
package/dist/data/Condition.mjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Condition,
|
|
3
|
-
LogicalCondition,
|
|
4
|
-
SortCondition,
|
|
5
|
-
isSortCondition,
|
|
6
|
-
toCondition
|
|
7
|
-
} from "../chunk-7DNADCD4.mjs";
|
|
8
|
-
import "../chunk-MDXL65W4.mjs";
|
|
9
|
-
import "../chunk-O2YZM3KB.mjs";
|
|
10
|
-
import "../chunk-HULI73W2.mjs";
|
|
11
|
-
import "../chunk-ABGKS4KE.mjs";
|
|
12
|
-
import "../chunk-SSROJBD5.mjs";
|
|
13
|
-
import "../chunk-CO2AFYVD.mjs";
|
|
14
|
-
import "../chunk-BDA5LB4S.mjs";
|
|
15
|
-
import "../chunk-SJGQU3OG.mjs";
|
|
16
|
-
import "../chunk-ZHXKBOK2.mjs";
|
|
17
|
-
import "../chunk-ZPNFXK7Y.mjs";
|
|
18
|
-
import "../chunk-DXQSIBC7.mjs";
|
|
19
|
-
import "../chunk-PIRWVOO2.mjs";
|
|
20
|
-
import "../chunk-DEJ7A5PY.mjs";
|
|
21
|
-
import "../chunk-4N72FQFX.mjs";
|
|
22
|
-
export {
|
|
23
|
-
Condition,
|
|
24
|
-
LogicalCondition,
|
|
25
|
-
SortCondition,
|
|
26
|
-
isSortCondition,
|
|
27
|
-
toCondition
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=Condition.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=DataProvider.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/data/Database.mjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Database,
|
|
3
|
-
DefaultProvider
|
|
4
|
-
} from "../chunk-27MBNT3X.mjs";
|
|
5
|
-
import "../chunk-F34HSIZ5.mjs";
|
|
6
|
-
import "../chunk-4LVZOQ6O.mjs";
|
|
7
|
-
import "../chunk-HULI73W2.mjs";
|
|
8
|
-
import "../chunk-ABGKS4KE.mjs";
|
|
9
|
-
import "../chunk-SSROJBD5.mjs";
|
|
10
|
-
import "../chunk-CO2AFYVD.mjs";
|
|
11
|
-
import "../chunk-BDA5LB4S.mjs";
|
|
12
|
-
import "../chunk-SJGQU3OG.mjs";
|
|
13
|
-
import "../chunk-ZHXKBOK2.mjs";
|
|
14
|
-
import "../chunk-ZPNFXK7Y.mjs";
|
|
15
|
-
import "../chunk-DXQSIBC7.mjs";
|
|
16
|
-
import "../chunk-PIRWVOO2.mjs";
|
|
17
|
-
import "../chunk-DEJ7A5PY.mjs";
|
|
18
|
-
import "../chunk-4N72FQFX.mjs";
|
|
19
|
-
export {
|
|
20
|
-
Database,
|
|
21
|
-
DefaultProvider
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=Database.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/data/Field.mjs
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Property
|
|
3
|
-
} from "../chunk-GCY5A63A.mjs";
|
|
4
|
-
import {
|
|
5
|
-
SortCondition,
|
|
6
|
-
toCondition
|
|
7
|
-
} from "../chunk-7DNADCD4.mjs";
|
|
8
|
-
import "../chunk-MDXL65W4.mjs";
|
|
9
|
-
import "../chunk-O2YZM3KB.mjs";
|
|
10
|
-
import "../chunk-HULI73W2.mjs";
|
|
11
|
-
import "../chunk-ABGKS4KE.mjs";
|
|
12
|
-
import "../chunk-SSROJBD5.mjs";
|
|
13
|
-
import {
|
|
14
|
-
toArray
|
|
15
|
-
} from "../chunk-CO2AFYVD.mjs";
|
|
16
|
-
import "../chunk-BDA5LB4S.mjs";
|
|
17
|
-
import "../chunk-SJGQU3OG.mjs";
|
|
18
|
-
import "../chunk-ZHXKBOK2.mjs";
|
|
19
|
-
import "../chunk-ZPNFXK7Y.mjs";
|
|
20
|
-
import "../chunk-DXQSIBC7.mjs";
|
|
21
|
-
import "../chunk-PIRWVOO2.mjs";
|
|
22
|
-
import {
|
|
23
|
-
isDefined
|
|
24
|
-
} from "../chunk-DEJ7A5PY.mjs";
|
|
25
|
-
import "../chunk-4N72FQFX.mjs";
|
|
26
|
-
|
|
27
|
-
// src/data/Field.ts
|
|
28
|
-
var Field = class extends Property {
|
|
29
|
-
is = (value) => this.condition("eq", value);
|
|
30
|
-
isNot = (value) => this.condition("ne", value);
|
|
31
|
-
isIn = (...value) => this.condition("in", toArray(value));
|
|
32
|
-
notIn = (...value) => this.condition("nin", toArray(value));
|
|
33
|
-
exists = (does) => this.condition("exists", does);
|
|
34
|
-
greater = (value) => this.condition("gt", value);
|
|
35
|
-
greaterEqual = (value) => this.condition("gte", value);
|
|
36
|
-
less = (value) => this.condition("lt", value);
|
|
37
|
-
lessEqual = (value) => this.condition("lte", value);
|
|
38
|
-
asc = () => new SortCondition(this.property, 1);
|
|
39
|
-
desc = () => new SortCondition(this.property, -1);
|
|
40
|
-
condition = (operator, value) => toCondition(this.property, operator, value, this.options?.convert);
|
|
41
|
-
};
|
|
42
|
-
var isField = (f) => isDefined(f) && f instanceof Field;
|
|
43
|
-
export {
|
|
44
|
-
Field,
|
|
45
|
-
isField
|
|
46
|
-
};
|
|
47
|
-
//# sourceMappingURL=Field.mjs.map
|
package/dist/data/Field.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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,70 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Gateway
|
|
3
|
-
} from "../chunk-SDO3B3BQ.mjs";
|
|
4
|
-
import {
|
|
5
|
-
toPageList
|
|
6
|
-
} from "../chunk-J3DYDXXF.mjs";
|
|
7
|
-
import {
|
|
8
|
-
when
|
|
9
|
-
} from "../chunk-S6WR4MXU.mjs";
|
|
10
|
-
import "../chunk-OFGI5FLG.mjs";
|
|
11
|
-
import "../chunk-CSHFNF34.mjs";
|
|
12
|
-
import "../chunk-RNLFG4YX.mjs";
|
|
13
|
-
import "../chunk-MBRLKMEQ.mjs";
|
|
14
|
-
import {
|
|
15
|
-
Exception
|
|
16
|
-
} from "../chunk-BIHKQLEE.mjs";
|
|
17
|
-
import "../chunk-WSBULPUZ.mjs";
|
|
18
|
-
import "../chunk-CSAPGLC7.mjs";
|
|
19
|
-
import "../chunk-4K4X43SV.mjs";
|
|
20
|
-
import "../chunk-F34HSIZ5.mjs";
|
|
21
|
-
import "../chunk-4LVZOQ6O.mjs";
|
|
22
|
-
import "../chunk-HULI73W2.mjs";
|
|
23
|
-
import "../chunk-ABGKS4KE.mjs";
|
|
24
|
-
import "../chunk-SSROJBD5.mjs";
|
|
25
|
-
import "../chunk-CO2AFYVD.mjs";
|
|
26
|
-
import "../chunk-BDA5LB4S.mjs";
|
|
27
|
-
import "../chunk-SJGQU3OG.mjs";
|
|
28
|
-
import "../chunk-ZHXKBOK2.mjs";
|
|
29
|
-
import "../chunk-ZPNFXK7Y.mjs";
|
|
30
|
-
import "../chunk-DXQSIBC7.mjs";
|
|
31
|
-
import "../chunk-PIRWVOO2.mjs";
|
|
32
|
-
import {
|
|
33
|
-
isDefined
|
|
34
|
-
} from "../chunk-DEJ7A5PY.mjs";
|
|
35
|
-
import "../chunk-4N72FQFX.mjs";
|
|
36
|
-
|
|
37
|
-
// src/data/InMemoryGateway.ts
|
|
38
|
-
var InMemoryGateway = class extends Gateway {
|
|
39
|
-
constructor(data) {
|
|
40
|
-
super();
|
|
41
|
-
this.data = data;
|
|
42
|
-
}
|
|
43
|
-
all(options) {
|
|
44
|
-
return this.data.then((d) => toPageList(d, d));
|
|
45
|
-
}
|
|
46
|
-
byId(id) {
|
|
47
|
-
return this.data.then((d) => d.byId(id)).then((d) => d ? { ...d } : void 0);
|
|
48
|
-
}
|
|
49
|
-
by = (key, value) => {
|
|
50
|
-
return this.data.then((d) => d.filter((i) => i[key] === value));
|
|
51
|
-
};
|
|
52
|
-
exists(id) {
|
|
53
|
-
return this.byId(id).then((d) => isDefined(d));
|
|
54
|
-
}
|
|
55
|
-
add(item) {
|
|
56
|
-
return when(item).not.contains((i) => i.id).reject(Exception.IsMissingId).then((i) => this.exists(i.id)).then((ex) => when(ex).isTrue.reject(Exception.AlreadyExists)).then(() => this.data.then((d) => d.add(item))).then(() => ({ ...item }));
|
|
57
|
-
}
|
|
58
|
-
remove(id) {
|
|
59
|
-
return this.data.then(
|
|
60
|
-
(d) => when(d.findIndex((i) => i.id === id)).with((i) => i < 0).reject(Exception.DoesNotExist).then((i) => d.splice(i, 1))
|
|
61
|
-
).then(() => true);
|
|
62
|
-
}
|
|
63
|
-
update(item) {
|
|
64
|
-
return when(item).not.contains((i) => i.id).reject(Exception.IsMissingId).then((i) => this.remove(i.id).then(() => this.add(i)));
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
export {
|
|
68
|
-
InMemoryGateway
|
|
69
|
-
};
|
|
70
|
-
//# sourceMappingURL=InMemoryGateway.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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":[]}
|
package/dist/data/Query.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=Query.mjs.map
|
package/dist/data/Query.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=QueryProvider.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/domain/Audit.mjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Audit
|
|
3
|
-
} from "../chunk-W64ACIZO.mjs";
|
|
4
|
-
import "../chunk-HL2BC7Z2.mjs";
|
|
5
|
-
import "../chunk-5DJPREIN.mjs";
|
|
6
|
-
import "../chunk-KJVTSC6I.mjs";
|
|
7
|
-
import "../chunk-ADJAEGCT.mjs";
|
|
8
|
-
import "../chunk-VXVOY44M.mjs";
|
|
9
|
-
import "../chunk-S6WR4MXU.mjs";
|
|
10
|
-
import "../chunk-OFGI5FLG.mjs";
|
|
11
|
-
import "../chunk-CSHFNF34.mjs";
|
|
12
|
-
import "../chunk-RNLFG4YX.mjs";
|
|
13
|
-
import "../chunk-MBRLKMEQ.mjs";
|
|
14
|
-
import "../chunk-BIHKQLEE.mjs";
|
|
15
|
-
import "../chunk-WSBULPUZ.mjs";
|
|
16
|
-
import "../chunk-CSAPGLC7.mjs";
|
|
17
|
-
import "../chunk-4K4X43SV.mjs";
|
|
18
|
-
import "../chunk-F34HSIZ5.mjs";
|
|
19
|
-
import "../chunk-4LVZOQ6O.mjs";
|
|
20
|
-
import "../chunk-O2YZM3KB.mjs";
|
|
21
|
-
import "../chunk-HULI73W2.mjs";
|
|
22
|
-
import "../chunk-ABGKS4KE.mjs";
|
|
23
|
-
import "../chunk-SSROJBD5.mjs";
|
|
24
|
-
import "../chunk-CO2AFYVD.mjs";
|
|
25
|
-
import "../chunk-BDA5LB4S.mjs";
|
|
26
|
-
import "../chunk-SJGQU3OG.mjs";
|
|
27
|
-
import "../chunk-ZHXKBOK2.mjs";
|
|
28
|
-
import "../chunk-ZPNFXK7Y.mjs";
|
|
29
|
-
import "../chunk-DXQSIBC7.mjs";
|
|
30
|
-
import "../chunk-PIRWVOO2.mjs";
|
|
31
|
-
import "../chunk-DEJ7A5PY.mjs";
|
|
32
|
-
import "../chunk-4N72FQFX.mjs";
|
|
33
|
-
export {
|
|
34
|
-
Audit
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=Audit.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/domain/Child.mjs
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
toId
|
|
3
|
-
} from "../chunk-AGTB4HMP.mjs";
|
|
4
|
-
import "../chunk-SJ4YFZKO.mjs";
|
|
5
|
-
import {
|
|
6
|
-
required
|
|
7
|
-
} from "../chunk-HL2BC7Z2.mjs";
|
|
8
|
-
import "../chunk-ADJAEGCT.mjs";
|
|
9
|
-
import {
|
|
10
|
-
Struct
|
|
11
|
-
} from "../chunk-VXVOY44M.mjs";
|
|
12
|
-
import "../chunk-S6WR4MXU.mjs";
|
|
13
|
-
import "../chunk-OFGI5FLG.mjs";
|
|
14
|
-
import "../chunk-CSHFNF34.mjs";
|
|
15
|
-
import "../chunk-RNLFG4YX.mjs";
|
|
16
|
-
import "../chunk-MBRLKMEQ.mjs";
|
|
17
|
-
import "../chunk-BIHKQLEE.mjs";
|
|
18
|
-
import "../chunk-WSBULPUZ.mjs";
|
|
19
|
-
import "../chunk-CSAPGLC7.mjs";
|
|
20
|
-
import "../chunk-4K4X43SV.mjs";
|
|
21
|
-
import "../chunk-F34HSIZ5.mjs";
|
|
22
|
-
import "../chunk-4LVZOQ6O.mjs";
|
|
23
|
-
import {
|
|
24
|
-
json
|
|
25
|
-
} from "../chunk-O2YZM3KB.mjs";
|
|
26
|
-
import "../chunk-HULI73W2.mjs";
|
|
27
|
-
import "../chunk-ABGKS4KE.mjs";
|
|
28
|
-
import "../chunk-SSROJBD5.mjs";
|
|
29
|
-
import "../chunk-CO2AFYVD.mjs";
|
|
30
|
-
import "../chunk-BDA5LB4S.mjs";
|
|
31
|
-
import "../chunk-SJGQU3OG.mjs";
|
|
32
|
-
import "../chunk-ZHXKBOK2.mjs";
|
|
33
|
-
import "../chunk-ZPNFXK7Y.mjs";
|
|
34
|
-
import "../chunk-DXQSIBC7.mjs";
|
|
35
|
-
import "../chunk-PIRWVOO2.mjs";
|
|
36
|
-
import "../chunk-DEJ7A5PY.mjs";
|
|
37
|
-
import {
|
|
38
|
-
__decorateClass
|
|
39
|
-
} from "../chunk-4N72FQFX.mjs";
|
|
40
|
-
|
|
41
|
-
// src/domain/Child.ts
|
|
42
|
-
var Child = class extends Struct {
|
|
43
|
-
id = this.state.id ?? toId();
|
|
44
|
-
merge(a) {
|
|
45
|
-
return json.merge(this, a, { id: this.id });
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
__decorateClass([
|
|
49
|
-
required()
|
|
50
|
-
], Child.prototype, "id", 2);
|
|
51
|
-
export {
|
|
52
|
-
Child
|
|
53
|
-
};
|
|
54
|
-
//# sourceMappingURL=Child.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/domain/Child.ts"],"sourcesContent":["import { Struct } from './Struct';\nimport { required } from '../validation/Contraints';\nimport { Id, toId } from '../types/Id';\nimport { json, Json } from '../types/Json';\n\nexport abstract class Child extends Struct {\n @required() readonly id: Id = this.state.id ?? toId();\n\n protected merge(a: unknown): Json {\n return json.merge(this, a, { id: this.id });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,IAAe,QAAf,cAA6B,OAAO;AAAA,EACpB,KAAS,KAAK,MAAM,MAAM,KAAK;AAAA,EAE1C,MAAM,GAAkB;AAChC,WAAO,KAAK,MAAM,MAAM,GAAG,EAAE,IAAI,KAAK,GAAG,CAAC;AAAA,EAC5C;AACF;AALuB;AAAA,EAApB,SAAS;AAAA,GADU,MACC;","names":[]}
|
package/dist/domain/DateTime.mjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DateTime,
|
|
3
|
-
dt,
|
|
4
|
-
isDateTime
|
|
5
|
-
} from "../chunk-5DJPREIN.mjs";
|
|
6
|
-
import "../chunk-KJVTSC6I.mjs";
|
|
7
|
-
import "../chunk-ADJAEGCT.mjs";
|
|
8
|
-
import "../chunk-S6WR4MXU.mjs";
|
|
9
|
-
import "../chunk-OFGI5FLG.mjs";
|
|
10
|
-
import "../chunk-CSHFNF34.mjs";
|
|
11
|
-
import "../chunk-RNLFG4YX.mjs";
|
|
12
|
-
import "../chunk-MBRLKMEQ.mjs";
|
|
13
|
-
import "../chunk-BIHKQLEE.mjs";
|
|
14
|
-
import "../chunk-WSBULPUZ.mjs";
|
|
15
|
-
import "../chunk-CSAPGLC7.mjs";
|
|
16
|
-
import "../chunk-4K4X43SV.mjs";
|
|
17
|
-
import "../chunk-F34HSIZ5.mjs";
|
|
18
|
-
import "../chunk-4LVZOQ6O.mjs";
|
|
19
|
-
import "../chunk-HULI73W2.mjs";
|
|
20
|
-
import "../chunk-ABGKS4KE.mjs";
|
|
21
|
-
import "../chunk-SSROJBD5.mjs";
|
|
22
|
-
import "../chunk-CO2AFYVD.mjs";
|
|
23
|
-
import "../chunk-BDA5LB4S.mjs";
|
|
24
|
-
import "../chunk-SJGQU3OG.mjs";
|
|
25
|
-
import "../chunk-ZHXKBOK2.mjs";
|
|
26
|
-
import "../chunk-ZPNFXK7Y.mjs";
|
|
27
|
-
import "../chunk-DXQSIBC7.mjs";
|
|
28
|
-
import "../chunk-PIRWVOO2.mjs";
|
|
29
|
-
import "../chunk-DEJ7A5PY.mjs";
|
|
30
|
-
import "../chunk-4N72FQFX.mjs";
|
|
31
|
-
export {
|
|
32
|
-
DateTime,
|
|
33
|
-
dt,
|
|
34
|
-
isDateTime
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=DateTime.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/domain/Entity.mjs
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Audit
|
|
3
|
-
} from "../chunk-W64ACIZO.mjs";
|
|
4
|
-
import {
|
|
5
|
-
toId
|
|
6
|
-
} from "../chunk-AGTB4HMP.mjs";
|
|
7
|
-
import "../chunk-SJ4YFZKO.mjs";
|
|
8
|
-
import {
|
|
9
|
-
required
|
|
10
|
-
} from "../chunk-HL2BC7Z2.mjs";
|
|
11
|
-
import "../chunk-5DJPREIN.mjs";
|
|
12
|
-
import "../chunk-KJVTSC6I.mjs";
|
|
13
|
-
import "../chunk-ADJAEGCT.mjs";
|
|
14
|
-
import {
|
|
15
|
-
Struct
|
|
16
|
-
} from "../chunk-VXVOY44M.mjs";
|
|
17
|
-
import "../chunk-S6WR4MXU.mjs";
|
|
18
|
-
import "../chunk-OFGI5FLG.mjs";
|
|
19
|
-
import "../chunk-CSHFNF34.mjs";
|
|
20
|
-
import "../chunk-RNLFG4YX.mjs";
|
|
21
|
-
import "../chunk-MBRLKMEQ.mjs";
|
|
22
|
-
import "../chunk-BIHKQLEE.mjs";
|
|
23
|
-
import "../chunk-WSBULPUZ.mjs";
|
|
24
|
-
import "../chunk-CSAPGLC7.mjs";
|
|
25
|
-
import "../chunk-4K4X43SV.mjs";
|
|
26
|
-
import "../chunk-F34HSIZ5.mjs";
|
|
27
|
-
import "../chunk-4LVZOQ6O.mjs";
|
|
28
|
-
import {
|
|
29
|
-
json
|
|
30
|
-
} from "../chunk-O2YZM3KB.mjs";
|
|
31
|
-
import "../chunk-HULI73W2.mjs";
|
|
32
|
-
import "../chunk-ABGKS4KE.mjs";
|
|
33
|
-
import "../chunk-SSROJBD5.mjs";
|
|
34
|
-
import "../chunk-CO2AFYVD.mjs";
|
|
35
|
-
import "../chunk-BDA5LB4S.mjs";
|
|
36
|
-
import "../chunk-SJGQU3OG.mjs";
|
|
37
|
-
import "../chunk-ZHXKBOK2.mjs";
|
|
38
|
-
import "../chunk-ZPNFXK7Y.mjs";
|
|
39
|
-
import "../chunk-DXQSIBC7.mjs";
|
|
40
|
-
import "../chunk-PIRWVOO2.mjs";
|
|
41
|
-
import "../chunk-DEJ7A5PY.mjs";
|
|
42
|
-
import {
|
|
43
|
-
__decorateClass
|
|
44
|
-
} from "../chunk-4N72FQFX.mjs";
|
|
45
|
-
|
|
46
|
-
// src/domain/Entity.ts
|
|
47
|
-
var Entity = class extends Struct {
|
|
48
|
-
id = this.state.id ?? toId();
|
|
49
|
-
created = new Audit(this.state.created);
|
|
50
|
-
lastModified = new Audit(this.state.lastModified);
|
|
51
|
-
merge(a) {
|
|
52
|
-
return json.merge(this, a, {
|
|
53
|
-
id: this.id,
|
|
54
|
-
created: this.created,
|
|
55
|
-
lastModified: new Audit()
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
__decorateClass([
|
|
60
|
-
required()
|
|
61
|
-
], Entity.prototype, "id", 2);
|
|
62
|
-
__decorateClass([
|
|
63
|
-
required()
|
|
64
|
-
], Entity.prototype, "created", 2);
|
|
65
|
-
__decorateClass([
|
|
66
|
-
required()
|
|
67
|
-
], Entity.prototype, "lastModified", 2);
|
|
68
|
-
export {
|
|
69
|
-
Entity
|
|
70
|
-
};
|
|
71
|
-
//# sourceMappingURL=Entity.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/domain/Entity.ts"],"sourcesContent":["import { Struct } from './Struct';\nimport { Audit } from './Audit';\nimport { required } from '../validation/Contraints';\nimport { Id, toId } from '../types/Id';\nimport { json, Json } from '../types/Json';\n\nexport abstract class Entity extends Struct {\n @required() readonly id: Id = this.state.id ?? toId();\n @required() readonly created: Audit = new Audit(this.state.created);\n @required() readonly lastModified: Audit = new Audit(this.state.lastModified);\n\n protected merge(a: unknown): Json {\n return json.merge(this, a, {\n id: this.id,\n created: this.created,\n lastModified: new Audit(),\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,IAAe,SAAf,cAA8B,OAAO;AAAA,EACrB,KAAS,KAAK,MAAM,MAAM,KAAK;AAAA,EAC/B,UAAiB,IAAI,MAAM,KAAK,MAAM,OAAO;AAAA,EAC7C,eAAsB,IAAI,MAAM,KAAK,MAAM,YAAY;AAAA,EAElE,MAAM,GAAkB;AAChC,WAAO,KAAK,MAAM,MAAM,GAAG;AAAA,MACzB,IAAI,KAAK;AAAA,MACT,SAAS,KAAK;AAAA,MACd,cAAc,IAAI,MAAM;AAAA,IAC1B,CAAC;AAAA,EACH;AACF;AAXuB;AAAA,EAApB,SAAS;AAAA,GADU,OACC;AACA;AAAA,EAApB,SAAS;AAAA,GAFU,OAEC;AACA;AAAA,EAApB,SAAS;AAAA,GAHU,OAGC;","names":[]}
|