@thisisagile/easy 15.26.1 → 15.27.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/chunk-35PSIDGU.mjs +17 -0
- package/dist/chunk-35PSIDGU.mjs.map +1 -0
- package/dist/chunk-3HTSHJPL.mjs +26 -0
- package/dist/chunk-3HTSHJPL.mjs.map +1 -0
- package/dist/chunk-3WOYFN2Q.mjs +18 -0
- package/dist/chunk-3WOYFN2Q.mjs.map +1 -0
- package/dist/chunk-4AP5H3OQ.mjs +46 -0
- package/dist/chunk-4AP5H3OQ.mjs.map +1 -0
- package/dist/chunk-4EVQZKMK.mjs +15 -0
- package/dist/chunk-4EVQZKMK.mjs.map +1 -0
- package/dist/chunk-4QX4EMLL.mjs +13 -0
- package/dist/chunk-4QX4EMLL.mjs.map +1 -0
- package/dist/chunk-5AF55QCJ.mjs +51 -0
- package/dist/chunk-5AF55QCJ.mjs.map +1 -0
- package/dist/chunk-6NOTDYUE.mjs +272 -0
- package/dist/chunk-6NOTDYUE.mjs.map +1 -0
- package/dist/chunk-6OW7KEN5.mjs +94 -0
- package/dist/chunk-6OW7KEN5.mjs.map +1 -0
- package/dist/chunk-74AOBBOZ.mjs +113 -0
- package/dist/chunk-74AOBBOZ.mjs.map +1 -0
- package/dist/chunk-7EP6VCI3.mjs +60 -0
- package/dist/chunk-7EP6VCI3.mjs.map +1 -0
- package/dist/{types/PageList.js → chunk-7NYZAGM3.mjs} +31 -48
- package/dist/chunk-7NYZAGM3.mjs.map +1 -0
- package/dist/chunk-7RIXMU5L.mjs +50 -0
- package/dist/chunk-7RIXMU5L.mjs.map +1 -0
- package/dist/chunk-A7OYYR2S.mjs +48 -0
- package/dist/chunk-A7OYYR2S.mjs.map +1 -0
- package/dist/chunk-ADJAEGCT.mjs +21 -0
- package/dist/chunk-ADJAEGCT.mjs.map +1 -0
- package/dist/chunk-AKYA7FHU.mjs +15 -0
- package/dist/chunk-AKYA7FHU.mjs.map +1 -0
- package/dist/chunk-CLKUH5JA.mjs +42 -0
- package/dist/chunk-CLKUH5JA.mjs.map +1 -0
- package/dist/chunk-CMRS457E.mjs +11 -0
- package/dist/chunk-CMRS457E.mjs.map +1 -0
- package/dist/chunk-D54TPU6G.mjs +43 -0
- package/dist/chunk-D54TPU6G.mjs.map +1 -0
- package/dist/chunk-DICMUQFL.mjs +11 -0
- package/dist/chunk-DICMUQFL.mjs.map +1 -0
- package/dist/chunk-EZC3HAYN.mjs +70 -0
- package/dist/chunk-EZC3HAYN.mjs.map +1 -0
- package/dist/chunk-FAAERRP2.mjs +37 -0
- package/dist/chunk-FAAERRP2.mjs.map +1 -0
- package/dist/chunk-FSK4W6I2.mjs +33 -0
- package/dist/chunk-FSK4W6I2.mjs.map +1 -0
- package/dist/chunk-G7QSW2EB.mjs +23 -0
- package/dist/chunk-G7QSW2EB.mjs.map +1 -0
- package/dist/chunk-GDD652NR.mjs +94 -0
- package/dist/chunk-GDD652NR.mjs.map +1 -0
- package/dist/chunk-GGC4TWMF.mjs +40 -0
- package/dist/chunk-GGC4TWMF.mjs.map +1 -0
- package/dist/chunk-GI5TZOAG.mjs +30 -0
- package/dist/chunk-GI5TZOAG.mjs.map +1 -0
- package/dist/chunk-GVX6S54O.mjs +54 -0
- package/dist/chunk-GVX6S54O.mjs.map +1 -0
- package/dist/chunk-H22IHXDC.mjs +23 -0
- package/dist/chunk-H22IHXDC.mjs.map +1 -0
- package/dist/chunk-H6GKGVYF.mjs +18 -0
- package/dist/chunk-H6GKGVYF.mjs.map +1 -0
- package/dist/chunk-HNB4RM5S.mjs +89 -0
- package/dist/chunk-HNB4RM5S.mjs.map +1 -0
- package/dist/chunk-I3VZW3XF.mjs +46 -0
- package/dist/chunk-I3VZW3XF.mjs.map +1 -0
- package/dist/chunk-IJFQ7PRU.mjs +19 -0
- package/dist/chunk-IJFQ7PRU.mjs.map +1 -0
- package/dist/chunk-JER7KLEK.mjs +82 -0
- package/dist/chunk-JER7KLEK.mjs.map +1 -0
- package/dist/chunk-JXJ5LRH3.mjs +30 -0
- package/dist/chunk-JXJ5LRH3.mjs.map +1 -0
- package/dist/chunk-L2BMMXCX.mjs +79 -0
- package/dist/chunk-L2BMMXCX.mjs.map +1 -0
- package/dist/chunk-LB7OMB5S.mjs +57 -0
- package/dist/chunk-LB7OMB5S.mjs.map +1 -0
- package/dist/chunk-LCDQWW2Y.mjs +18 -0
- package/dist/chunk-LCDQWW2Y.mjs.map +1 -0
- package/dist/chunk-LD64IICE.mjs +28 -0
- package/dist/chunk-LD64IICE.mjs.map +1 -0
- package/dist/chunk-LV7HNQ3N.mjs +183 -0
- package/dist/chunk-LV7HNQ3N.mjs.map +1 -0
- package/dist/chunk-M4UUIOW6.mjs +86 -0
- package/dist/chunk-M4UUIOW6.mjs.map +1 -0
- package/dist/chunk-MDLVDMKY.mjs +11 -0
- package/dist/chunk-MDLVDMKY.mjs.map +1 -0
- package/dist/chunk-NF7FTEE7.mjs +26 -0
- package/dist/chunk-NF7FTEE7.mjs.map +1 -0
- package/dist/chunk-NYTGMBLK.mjs +49 -0
- package/dist/chunk-NYTGMBLK.mjs.map +1 -0
- package/dist/chunk-O62PGEQ7.mjs +20 -0
- package/dist/chunk-O62PGEQ7.mjs.map +1 -0
- package/dist/chunk-OQNZEKWO.mjs +24 -0
- package/dist/chunk-OQNZEKWO.mjs.map +1 -0
- package/dist/chunk-OXBQSJDF.mjs +45 -0
- package/dist/chunk-OXBQSJDF.mjs.map +1 -0
- package/dist/chunk-PIRWVOO2.mjs +7 -0
- package/dist/chunk-PIRWVOO2.mjs.map +1 -0
- package/dist/chunk-PLIJ2CRV.mjs +25 -0
- package/dist/chunk-PLIJ2CRV.mjs.map +1 -0
- package/dist/chunk-PSIJUWZT.mjs +13 -0
- package/dist/chunk-PSIJUWZT.mjs.map +1 -0
- package/dist/chunk-QOGUHAMC.mjs +40 -0
- package/dist/chunk-QOGUHAMC.mjs.map +1 -0
- package/dist/chunk-SGSU4KYT.mjs +49 -0
- package/dist/chunk-SGSU4KYT.mjs.map +1 -0
- package/dist/chunk-SJGDB24D.mjs +41 -0
- package/dist/chunk-SJGDB24D.mjs.map +1 -0
- package/dist/chunk-SJGQU3OG.mjs +15 -0
- package/dist/chunk-SJGQU3OG.mjs.map +1 -0
- package/dist/chunk-SP4KAT3N.mjs +25 -0
- package/dist/chunk-SP4KAT3N.mjs.map +1 -0
- package/dist/chunk-SS3C77DP.mjs +134 -0
- package/dist/chunk-SS3C77DP.mjs.map +1 -0
- package/dist/chunk-SW2OCUH3.mjs +10 -0
- package/dist/chunk-SW2OCUH3.mjs.map +1 -0
- package/dist/chunk-UDLMLGTS.mjs +43 -0
- package/dist/chunk-UDLMLGTS.mjs.map +1 -0
- package/dist/chunk-V62IOKST.mjs +21 -0
- package/dist/chunk-V62IOKST.mjs.map +1 -0
- package/dist/chunk-WEXSGVXZ.mjs +53 -0
- package/dist/chunk-WEXSGVXZ.mjs.map +1 -0
- package/dist/chunk-WUFQM7VZ.mjs +20 -0
- package/dist/chunk-WUFQM7VZ.mjs.map +1 -0
- package/dist/chunk-YTWFWQNB.mjs +866 -0
- package/dist/chunk-YTWFWQNB.mjs.map +1 -0
- package/dist/chunk-ZHAJLP7P.mjs +49 -0
- package/dist/chunk-ZHAJLP7P.mjs.map +1 -0
- package/dist/chunk-ZNWOAXMK.mjs +46 -0
- package/dist/chunk-ZNWOAXMK.mjs.map +1 -0
- package/dist/data/Condition.mjs +19 -35
- package/dist/data/Condition.mjs.map +1 -1
- package/dist/data/Database.mjs +15 -12
- package/dist/data/Database.mjs.map +1 -1
- package/dist/data/Field.mjs +28 -6
- package/dist/data/Field.mjs.map +1 -1
- package/dist/data/InMemoryGateway.mjs +26 -4
- package/dist/data/InMemoryGateway.mjs.map +1 -1
- package/dist/domain/Audit.mjs +18 -24
- package/dist/domain/Audit.mjs.map +1 -1
- package/dist/domain/Child.mjs +28 -5
- package/dist/domain/Child.mjs.map +1 -1
- package/dist/domain/Entity.mjs +32 -6
- package/dist/domain/Entity.mjs.map +1 -1
- package/dist/domain/Repo.mjs +28 -5
- package/dist/domain/Repo.mjs.map +1 -1
- package/dist/domain/Struct.mjs +15 -25
- package/dist/domain/Struct.mjs.map +1 -1
- package/dist/domain/Typo.mjs +21 -4
- package/dist/domain/Typo.mjs.map +1 -1
- package/dist/domain/enums/Country.mjs +14 -262
- package/dist/domain/enums/Country.mjs.map +1 -1
- package/dist/domain/enums/Currency.mjs +17 -131
- package/dist/domain/enums/Currency.mjs.map +1 -1
- package/dist/domain/enums/Environment.mjs +21 -7
- package/dist/domain/enums/Environment.mjs.map +1 -1
- package/dist/domain/enums/Locale.mjs +581 -566
- package/dist/domain/enums/Locale.mjs.map +1 -1
- package/dist/domain/enums/UnitOfMeasurement.mjs +14 -12
- package/dist/domain/enums/UnitOfMeasurement.mjs.map +1 -1
- package/dist/domain/enums/UnitOfWeight.mjs +14 -10
- package/dist/domain/enums/UnitOfWeight.mjs.map +1 -1
- package/dist/domain/structs/Address.mjs +34 -8
- package/dist/domain/structs/Address.mjs.map +1 -1
- package/dist/domain/structs/Box.mjs +26 -5
- package/dist/domain/structs/Box.mjs.map +1 -1
- package/dist/domain/structs/Dimension.mjs +18 -26
- package/dist/domain/structs/Dimension.mjs.map +1 -1
- package/dist/domain/structs/Money.mjs +19 -32
- package/dist/domain/structs/Money.mjs.map +1 -1
- package/dist/domain/structs/Name.mjs +25 -6
- package/dist/domain/structs/Name.mjs.map +1 -1
- package/dist/domain/structs/Weight.mjs +26 -6
- package/dist/domain/structs/Weight.mjs.map +1 -1
- package/dist/domain/values/DateTime.mjs +17 -88
- package/dist/domain/values/DateTime.mjs.map +1 -1
- package/dist/domain/values/EAN.mjs +21 -4
- package/dist/domain/values/EAN.mjs.map +1 -1
- package/dist/domain/values/Email.mjs +23 -5
- package/dist/domain/values/Email.mjs.map +1 -1
- package/dist/domain/values/IBAN.mjs +21 -4
- package/dist/domain/values/IBAN.mjs.map +1 -1
- package/dist/domain/values/PostalCode.mjs +16 -13
- package/dist/domain/values/PostalCode.mjs.map +1 -1
- package/dist/domain/values/Slug.mjs +21 -4
- package/dist/domain/values/Slug.mjs.map +1 -1
- package/dist/domain/values/Url.mjs +22 -5
- package/dist/domain/values/Url.mjs.map +1 -1
- package/dist/health/HealthResource.mjs +32 -4
- package/dist/health/HealthResource.mjs.map +1 -1
- package/dist/health/HealthUri.mjs +15 -5
- package/dist/health/HealthUri.mjs.map +1 -1
- package/dist/http/CacheControl.mjs +16 -28
- package/dist/http/CacheControl.mjs.map +1 -1
- package/dist/http/ContentType.mjs +14 -15
- package/dist/http/ContentType.mjs.map +1 -1
- package/dist/http/HttpHeader.mjs +3 -4
- package/dist/http/HttpHeader.mjs.map +1 -1
- package/dist/http/HttpStatus.mjs +16 -80
- package/dist/http/HttpStatus.mjs.map +1 -1
- package/dist/http/HttpVerb.mjs +14 -11
- package/dist/http/HttpVerb.mjs.map +1 -1
- package/dist/http/LocalRequestStore.mjs +17 -3
- package/dist/http/LocalRequestStore.mjs.map +1 -1
- package/dist/http/OriginatedError.mjs +9 -5
- package/dist/http/OriginatedError.mjs.map +1 -1
- package/dist/http/RequestOptions.mjs +19 -59
- package/dist/http/RequestOptions.mjs.map +1 -1
- package/dist/http/Response.mjs +16 -9
- package/dist/http/Response.mjs.map +1 -1
- package/dist/http/RestResult.mjs +16 -26
- package/dist/http/RestResult.mjs.map +1 -1
- package/dist/http/Verb.mjs +27 -19
- package/dist/http/Verb.mjs.map +1 -1
- package/dist/index.js +4790 -27
- package/dist/index.js.map +1 -1
- package/dist/process/App.mjs +19 -4
- package/dist/process/App.mjs.map +1 -1
- package/dist/process/Manage.mjs +19 -3
- package/dist/process/Manage.mjs.map +1 -1
- package/dist/process/Scope.mjs +14 -18
- package/dist/process/Scope.mjs.map +1 -1
- package/dist/process/Search.mjs +15 -34
- package/dist/process/Search.mjs.map +1 -1
- package/dist/process/UseCase.mjs +24 -4
- package/dist/process/UseCase.mjs.map +1 -1
- package/dist/resources/Req.mjs +20 -4
- package/dist/resources/Req.mjs.map +1 -1
- package/dist/resources/Requires.mjs +18 -4
- package/dist/resources/Requires.mjs.map +1 -1
- package/dist/resources/Route.mjs +15 -32
- package/dist/resources/Route.mjs.map +1 -1
- package/dist/resources/Service.mjs +19 -3
- package/dist/resources/Service.mjs.map +1 -1
- package/dist/security/Jwt.mjs +21 -5
- package/dist/security/Jwt.mjs.map +1 -1
- package/dist/services/Api.mjs +25 -63
- package/dist/services/Api.mjs.map +1 -1
- package/dist/services/ApiGateway.mjs +27 -29
- package/dist/services/ApiGateway.mjs.map +1 -1
- package/dist/services/AxiosProvider.mjs +22 -23
- package/dist/services/AxiosProvider.mjs.map +1 -1
- package/dist/services/MappedRouteGateway.mjs +40 -5
- package/dist/services/MappedRouteGateway.mjs.map +1 -1
- package/dist/services/RouteGateway.mjs +28 -42
- package/dist/services/RouteGateway.mjs.map +1 -1
- package/dist/services/ViewRouteGateway.mjs +39 -5
- package/dist/services/ViewRouteGateway.mjs.map +1 -1
- package/dist/sql/Clause.mjs +19 -22
- package/dist/sql/Clause.mjs.map +1 -1
- package/dist/sql/Column.mjs +19 -64
- package/dist/sql/Column.mjs.map +1 -1
- package/dist/sql/Count.mjs +16 -7
- package/dist/sql/Count.mjs.map +1 -1
- package/dist/sql/Delete.mjs +15 -7
- package/dist/sql/Delete.mjs.map +1 -1
- package/dist/sql/Insert.mjs +17 -12
- package/dist/sql/Insert.mjs.map +1 -1
- package/dist/sql/Join.mjs +3 -18
- package/dist/sql/Join.mjs.map +1 -1
- package/dist/sql/Select.mjs +15 -40
- package/dist/sql/Select.mjs.map +1 -1
- package/dist/sql/SqlQuery.mjs +14 -11
- package/dist/sql/SqlQuery.mjs.map +1 -1
- package/dist/sql/Table.mjs +53 -12
- package/dist/sql/Table.mjs.map +1 -1
- package/dist/sql/TableGateway.mjs +27 -5
- package/dist/sql/TableGateway.mjs.map +1 -1
- package/dist/sql/Update.mjs +17 -13
- package/dist/sql/Update.mjs.map +1 -1
- package/dist/types/Array.mjs +9 -22
- package/dist/types/Array.mjs.map +1 -1
- package/dist/types/Builder.mjs +21 -7
- package/dist/types/Builder.mjs.map +1 -1
- package/dist/types/Cache.mjs +17 -3
- package/dist/types/Cache.mjs.map +1 -1
- package/dist/types/CacheAge.mjs +15 -36
- package/dist/types/CacheAge.mjs.map +1 -1
- package/dist/types/Case.mjs +13 -87
- package/dist/types/Case.mjs.map +1 -1
- package/dist/types/Constructor.mjs +11 -12
- package/dist/types/Constructor.mjs.map +1 -1
- package/dist/types/Context.mjs +17 -81
- package/dist/types/Context.mjs.map +1 -1
- package/dist/types/Enum.mjs +14 -46
- package/dist/types/Enum.mjs.map +1 -1
- package/dist/types/Exception.mjs +15 -22
- package/dist/types/Exception.mjs.map +1 -1
- package/dist/types/Falsy.mjs +4 -2
- package/dist/types/Falsy.mjs.map +1 -1
- package/dist/types/Func.mjs +3 -1
- package/dist/types/Func.mjs.map +1 -1
- package/dist/types/Gateway.mjs +14 -34
- package/dist/types/Gateway.mjs.map +1 -1
- package/dist/types/Get.mjs +6 -4
- package/dist/types/Get.mjs.map +1 -1
- package/dist/types/Id.mjs +5 -2
- package/dist/types/Id.mjs.map +1 -1
- package/dist/types/Is.mjs +21 -21
- package/dist/types/Is.mjs.map +1 -1
- package/dist/types/IsA.mjs +6 -3
- package/dist/types/IsA.mjs.map +1 -1
- package/dist/types/IsDate.mjs +6 -12
- package/dist/types/IsDate.mjs.map +1 -1
- package/dist/types/IsEqual.mjs +14 -11
- package/dist/types/IsEqual.mjs.map +1 -1
- package/dist/types/Json.mjs +14 -31
- package/dist/types/Json.mjs.map +1 -1
- package/dist/types/List.mjs +18 -170
- package/dist/types/List.mjs.map +1 -1
- package/dist/types/Message.mjs +6 -2
- package/dist/types/Message.mjs.map +1 -1
- package/dist/types/Meta.mjs +14 -41
- package/dist/types/Meta.mjs.map +1 -1
- package/dist/types/Nullish.mjs +3 -1
- package/dist/types/Nullish.mjs.map +1 -1
- package/dist/types/Number.mjs +14 -5
- package/dist/types/Number.mjs.map +1 -1
- package/dist/types/PageList.mjs +19 -118
- package/dist/types/PageList.mjs.map +1 -1
- package/dist/types/Parser.mjs +30 -7
- package/dist/types/Parser.mjs.map +1 -1
- package/dist/types/Primitive.mjs +4 -4
- package/dist/types/Primitive.mjs.map +1 -1
- package/dist/types/Repository.mjs +14 -40
- package/dist/types/Repository.mjs.map +1 -1
- package/dist/types/Result.mjs +14 -8
- package/dist/types/Result.mjs.map +1 -1
- package/dist/types/Results.mjs +15 -19
- package/dist/types/Results.mjs.map +1 -1
- package/dist/types/Sort.mjs +4 -2
- package/dist/types/Sort.mjs.map +1 -1
- package/dist/types/Tag.mjs +17 -3
- package/dist/types/Tag.mjs.map +1 -1
- package/dist/types/Template.mjs +14 -35
- package/dist/types/Template.mjs.map +1 -1
- package/dist/types/Text.mjs +19 -97
- package/dist/types/Text.mjs.map +1 -1
- package/dist/types/Try.mjs +14 -107
- package/dist/types/Try.mjs.map +1 -1
- package/dist/types/Uri.mjs +16 -74
- package/dist/types/Uri.mjs.map +1 -1
- package/dist/types/Uuid.mjs +5 -5
- package/dist/types/Uuid.mjs.map +1 -1
- package/dist/types/Validatable.mjs +6 -2
- package/dist/types/Validatable.mjs.map +1 -1
- package/dist/types/Value.mjs +14 -17
- package/dist/types/Value.mjs.map +1 -1
- package/dist/utils/Base64.mjs +3 -1
- package/dist/utils/Base64.mjs.map +1 -1
- package/dist/utils/Convert.mjs +15 -39
- package/dist/utils/Convert.mjs.map +1 -1
- package/dist/utils/If.mjs +10 -13
- package/dist/utils/If.mjs.map +1 -1
- package/dist/utils/Loading.mjs +6 -2
- package/dist/utils/Loading.mjs.map +1 -1
- package/dist/utils/Log.mjs +2 -0
- package/dist/utils/Log.mjs.map +1 -1
- package/dist/utils/Mapper.mjs +19 -101
- package/dist/utils/Mapper.mjs.map +1 -1
- package/dist/utils/Promise.mjs +19 -16
- package/dist/utils/Promise.mjs.map +1 -1
- package/dist/utils/Property.mjs +15 -14
- package/dist/utils/Property.mjs.map +1 -1
- package/dist/utils/Sentence.mjs +28 -14
- package/dist/utils/Sentence.mjs.map +1 -1
- package/dist/utils/State.mjs +7 -8
- package/dist/utils/State.mjs.map +1 -1
- package/dist/utils/Traverse.mjs +3 -5
- package/dist/utils/Traverse.mjs.map +1 -1
- package/dist/utils/View.mjs +21 -64
- package/dist/utils/View.mjs.map +1 -1
- package/dist/utils/Wait.mjs +5 -3
- package/dist/utils/Wait.mjs.map +1 -1
- package/dist/validation/Contraints.mjs +32 -29
- package/dist/validation/Contraints.mjs.map +1 -1
- package/dist/validation/Validate.mjs +16 -28
- package/dist/validation/Validate.mjs.map +1 -1
- package/dist/validation/When.mjs +14 -38
- package/dist/validation/When.mjs.map +1 -1
- package/package.json +4 -3
- package/dist/data/Condition.js +0 -71
- package/dist/data/Condition.js.map +0 -1
- package/dist/data/DataProvider.js +0 -17
- package/dist/data/DataProvider.js.map +0 -1
- package/dist/data/Database.js +0 -42
- package/dist/data/Database.js.map +0 -1
- package/dist/data/Field.js +0 -48
- package/dist/data/Field.js.map +0 -1
- package/dist/data/InMemoryGateway.js +0 -59
- package/dist/data/InMemoryGateway.js.map +0 -1
- package/dist/data/Query.js +0 -17
- package/dist/data/Query.js.map +0 -1
- package/dist/data/QueryProvider.js +0 -17
- package/dist/data/QueryProvider.js.map +0 -1
- package/dist/data/index.js +0 -35
- package/dist/data/index.js.map +0 -1
- package/dist/domain/Audit.js +0 -59
- package/dist/domain/Audit.js.map +0 -1
- package/dist/domain/Child.js +0 -49
- package/dist/domain/Child.js.map +0 -1
- package/dist/domain/Entity.js +0 -62
- package/dist/domain/Entity.js.map +0 -1
- package/dist/domain/Repo.js +0 -81
- package/dist/domain/Repo.js.map +0 -1
- package/dist/domain/Struct.js +0 -55
- package/dist/domain/Struct.js.map +0 -1
- package/dist/domain/Typo.js +0 -62
- package/dist/domain/Typo.js.map +0 -1
- package/dist/domain/enums/Country.js +0 -290
- package/dist/domain/enums/Country.js.map +0 -1
- package/dist/domain/enums/Currency.js +0 -159
- package/dist/domain/enums/Currency.js.map +0 -1
- package/dist/domain/enums/Environment.js +0 -35
- package/dist/domain/enums/Environment.js.map +0 -1
- package/dist/domain/enums/Locale.js +0 -605
- package/dist/domain/enums/Locale.js.map +0 -1
- package/dist/domain/enums/UnitOfMeasurement.js +0 -40
- package/dist/domain/enums/UnitOfMeasurement.js.map +0 -1
- package/dist/domain/enums/UnitOfWeight.js +0 -38
- package/dist/domain/enums/UnitOfWeight.js.map +0 -1
- package/dist/domain/enums/index.js +0 -33
- package/dist/domain/enums/index.js.map +0 -1
- package/dist/domain/index.js +0 -39
- package/dist/domain/index.js.map +0 -1
- package/dist/domain/structs/Address.js +0 -73
- package/dist/domain/structs/Address.js.map +0 -1
- package/dist/domain/structs/Box.js +0 -70
- package/dist/domain/structs/Box.js.map +0 -1
- package/dist/domain/structs/Dimension.js +0 -61
- package/dist/domain/structs/Dimension.js.map +0 -1
- package/dist/domain/structs/Money.js +0 -71
- package/dist/domain/structs/Money.js.map +0 -1
- package/dist/domain/structs/Name.js +0 -57
- package/dist/domain/structs/Name.js.map +0 -1
- package/dist/domain/structs/Weight.js +0 -71
- package/dist/domain/structs/Weight.js.map +0 -1
- package/dist/domain/structs/index.js +0 -33
- package/dist/domain/structs/index.js.map +0 -1
- package/dist/domain/values/DateTime.js +0 -120
- package/dist/domain/values/DateTime.js.map +0 -1
- package/dist/domain/values/EAN.js +0 -50
- package/dist/domain/values/EAN.js.map +0 -1
- package/dist/domain/values/Email.js +0 -57
- package/dist/domain/values/Email.js.map +0 -1
- package/dist/domain/values/IBAN.js +0 -50
- package/dist/domain/values/IBAN.js.map +0 -1
- package/dist/domain/values/PostalCode.js +0 -53
- package/dist/domain/values/PostalCode.js.map +0 -1
- package/dist/domain/values/Slug.js +0 -41
- package/dist/domain/values/Slug.js.map +0 -1
- package/dist/domain/values/Url.js +0 -57
- package/dist/domain/values/Url.js.map +0 -1
- package/dist/domain/values/index.js +0 -35
- package/dist/domain/values/index.js.map +0 -1
- package/dist/health/HealthResource.js +0 -49
- package/dist/health/HealthResource.js.map +0 -1
- package/dist/health/HealthUri.js +0 -33
- package/dist/health/HealthUri.js.map +0 -1
- package/dist/health/index.js +0 -25
- package/dist/health/index.js.map +0 -1
- package/dist/http/CacheControl.js +0 -56
- package/dist/http/CacheControl.js.map +0 -1
- package/dist/http/ContentType.js +0 -53
- package/dist/http/ContentType.js.map +0 -1
- package/dist/http/HttpHeader.js +0 -32
- package/dist/http/HttpHeader.js.map +0 -1
- package/dist/http/HttpStatus.js +0 -112
- package/dist/http/HttpStatus.js.map +0 -1
- package/dist/http/HttpVerb.js +0 -39
- package/dist/http/HttpVerb.js.map +0 -1
- package/dist/http/LocalRequestStore.js +0 -36
- package/dist/http/LocalRequestStore.js.map +0 -1
- package/dist/http/OriginatedError.js +0 -44
- package/dist/http/OriginatedError.js.map +0 -1
- package/dist/http/Request.js +0 -17
- package/dist/http/Request.js.map +0 -1
- package/dist/http/RequestOptions.js +0 -91
- package/dist/http/RequestOptions.js.map +0 -1
- package/dist/http/RequestProvider.js +0 -17
- package/dist/http/RequestProvider.js.map +0 -1
- package/dist/http/Response.js +0 -39
- package/dist/http/Response.js.map +0 -1
- package/dist/http/RestResult.js +0 -56
- package/dist/http/RestResult.js.map +0 -1
- package/dist/http/Verb.js +0 -61
- package/dist/http/Verb.js.map +0 -1
- package/dist/http/index.js +0 -45
- package/dist/http/index.js.map +0 -1
- package/dist/process/App.js +0 -35
- package/dist/process/App.js.map +0 -1
- package/dist/process/Manage.js +0 -43
- package/dist/process/Manage.js.map +0 -1
- package/dist/process/Scope.js +0 -46
- package/dist/process/Scope.js.map +0 -1
- package/dist/process/Search.js +0 -62
- package/dist/process/Search.js.map +0 -1
- package/dist/process/UseCase.js +0 -50
- package/dist/process/UseCase.js.map +0 -1
- package/dist/process/index.js +0 -31
- package/dist/process/index.js.map +0 -1
- package/dist/resources/AppProvider.js +0 -17
- package/dist/resources/AppProvider.js.map +0 -1
- package/dist/resources/Req.js +0 -54
- package/dist/resources/Req.js.map +0 -1
- package/dist/resources/Requires.js +0 -48
- package/dist/resources/Requires.js.map +0 -1
- package/dist/resources/Resource.js +0 -17
- package/dist/resources/Resource.js.map +0 -1
- package/dist/resources/Route.js +0 -62
- package/dist/resources/Route.js.map +0 -1
- package/dist/resources/Service.js +0 -49
- package/dist/resources/Service.js.map +0 -1
- package/dist/resources/index.js +0 -35
- package/dist/resources/index.js.map +0 -1
- package/dist/security/Jwt.js +0 -48
- package/dist/security/Jwt.js.map +0 -1
- package/dist/security/index.js +0 -23
- package/dist/security/index.js.map +0 -1
- package/dist/services/Api.js +0 -93
- package/dist/services/Api.js.map +0 -1
- package/dist/services/ApiGateway.js +0 -57
- package/dist/services/ApiGateway.js.map +0 -1
- package/dist/services/AxiosProvider.js +0 -61
- package/dist/services/AxiosProvider.js.map +0 -1
- package/dist/services/MappedRouteGateway.js +0 -52
- package/dist/services/MappedRouteGateway.js.map +0 -1
- package/dist/services/RouteGateway.js +0 -70
- package/dist/services/RouteGateway.js.map +0 -1
- package/dist/services/ViewRouteGateway.js +0 -55
- package/dist/services/ViewRouteGateway.js.map +0 -1
- package/dist/services/index.js +0 -33
- package/dist/services/index.js.map +0 -1
- package/dist/sql/Clause.js +0 -58
- package/dist/sql/Clause.js.map +0 -1
- package/dist/sql/Column.js +0 -96
- package/dist/sql/Column.js.map +0 -1
- package/dist/sql/Count.js +0 -35
- package/dist/sql/Count.js.map +0 -1
- package/dist/sql/Delete.js +0 -35
- package/dist/sql/Delete.js.map +0 -1
- package/dist/sql/Insert.js +0 -40
- package/dist/sql/Insert.js.map +0 -1
- package/dist/sql/Join.js +0 -46
- package/dist/sql/Join.js.map +0 -1
- package/dist/sql/Select.js +0 -68
- package/dist/sql/Select.js.map +0 -1
- package/dist/sql/SqlQuery.js +0 -39
- package/dist/sql/SqlQuery.js.map +0 -1
- package/dist/sql/Table.js +0 -63
- package/dist/sql/Table.js.map +0 -1
- package/dist/sql/TableGateway.js +0 -62
- package/dist/sql/TableGateway.js.map +0 -1
- package/dist/sql/Update.js +0 -41
- package/dist/sql/Update.js.map +0 -1
- package/dist/sql/index.js +0 -41
- package/dist/sql/index.js.map +0 -1
- package/dist/types/Array.js +0 -54
- package/dist/types/Array.js.map +0 -1
- package/dist/types/Builder.js +0 -43
- package/dist/types/Builder.js.map +0 -1
- package/dist/types/Cache.js +0 -38
- package/dist/types/Cache.js.map +0 -1
- package/dist/types/CacheAge.js +0 -64
- package/dist/types/CacheAge.js.map +0 -1
- package/dist/types/Case.js +0 -115
- package/dist/types/Case.js.map +0 -1
- package/dist/types/Constructor.js +0 -50
- package/dist/types/Constructor.js.map +0 -1
- package/dist/types/Context.js +0 -117
- package/dist/types/Context.js.map +0 -1
- package/dist/types/Enum.js +0 -76
- package/dist/types/Enum.js.map +0 -1
- package/dist/types/ErrorOrigin.js +0 -17
- package/dist/types/ErrorOrigin.js.map +0 -1
- package/dist/types/Exception.js +0 -54
- package/dist/types/Exception.js.map +0 -1
- package/dist/types/Falsy.js +0 -32
- package/dist/types/Falsy.js.map +0 -1
- package/dist/types/Func.js +0 -29
- package/dist/types/Func.js.map +0 -1
- package/dist/types/Gateway.js +0 -62
- package/dist/types/Gateway.js.map +0 -1
- package/dist/types/Get.js +0 -36
- package/dist/types/Get.js.map +0 -1
- package/dist/types/Id.js +0 -30
- package/dist/types/Id.js.map +0 -1
- package/dist/types/Identity.js +0 -17
- package/dist/types/Identity.js.map +0 -1
- package/dist/types/Is.js +0 -85
- package/dist/types/Is.js.map +0 -1
- package/dist/types/IsA.js +0 -33
- package/dist/types/IsA.js.map +0 -1
- package/dist/types/IsDate.js +0 -46
- package/dist/types/IsDate.js.map +0 -1
- package/dist/types/IsEqual.js +0 -39
- package/dist/types/IsEqual.js.map +0 -1
- package/dist/types/Json.js +0 -67
- package/dist/types/Json.js.map +0 -1
- package/dist/types/List.js +0 -208
- package/dist/types/List.js.map +0 -1
- package/dist/types/Message.js +0 -30
- package/dist/types/Message.js.map +0 -1
- package/dist/types/Meta.js +0 -71
- package/dist/types/Meta.js.map +0 -1
- package/dist/types/Nullish.js +0 -29
- package/dist/types/Nullish.js.map +0 -1
- package/dist/types/Number.js +0 -33
- package/dist/types/Number.js.map +0 -1
- package/dist/types/PageList.js.map +0 -1
- package/dist/types/Parser.js +0 -69
- package/dist/types/Parser.js.map +0 -1
- package/dist/types/Primitive.js +0 -32
- package/dist/types/Primitive.js.map +0 -1
- package/dist/types/Repository.js +0 -68
- package/dist/types/Repository.js.map +0 -1
- package/dist/types/Result.js +0 -38
- package/dist/types/Result.js.map +0 -1
- package/dist/types/Results.js +0 -51
- package/dist/types/Results.js.map +0 -1
- package/dist/types/Sort.js +0 -32
- package/dist/types/Sort.js.map +0 -1
- package/dist/types/Tag.js +0 -35
- package/dist/types/Tag.js.map +0 -1
- package/dist/types/Template.js +0 -65
- package/dist/types/Template.js.map +0 -1
- package/dist/types/Text.js +0 -137
- package/dist/types/Text.js.map +0 -1
- package/dist/types/Try.js +0 -137
- package/dist/types/Try.js.map +0 -1
- package/dist/types/TypeGuard.js +0 -17
- package/dist/types/TypeGuard.js.map +0 -1
- package/dist/types/Types.js +0 -17
- package/dist/types/Types.js.map +0 -1
- package/dist/types/Uri.js +0 -106
- package/dist/types/Uri.js.map +0 -1
- package/dist/types/Uuid.js +0 -35
- package/dist/types/Uuid.js.map +0 -1
- package/dist/types/Validatable.js +0 -30
- package/dist/types/Validatable.js.map +0 -1
- package/dist/types/Value.js +0 -47
- package/dist/types/Value.js.map +0 -1
- package/dist/types/index.js +0 -107
- package/dist/types/index.js.map +0 -1
- package/dist/utils/Base64.js +0 -33
- package/dist/utils/Base64.js.map +0 -1
- package/dist/utils/Convert.js +0 -69
- package/dist/utils/Convert.js.map +0 -1
- package/dist/utils/If.js +0 -47
- package/dist/utils/If.js.map +0 -1
- package/dist/utils/Loading.js +0 -30
- package/dist/utils/Loading.js.map +0 -1
- package/dist/utils/Log.js +0 -43
- package/dist/utils/Log.js.map +0 -1
- package/dist/utils/Mapper.js +0 -133
- package/dist/utils/Mapper.js.map +0 -1
- package/dist/utils/Promise.js +0 -56
- package/dist/utils/Promise.js.map +0 -1
- package/dist/utils/Property.js +0 -42
- package/dist/utils/Property.js.map +0 -1
- package/dist/utils/Sentence.js +0 -80
- package/dist/utils/Sentence.js.map +0 -1
- package/dist/utils/State.js +0 -36
- package/dist/utils/State.js.map +0 -1
- package/dist/utils/Traverse.js +0 -33
- package/dist/utils/Traverse.js.map +0 -1
- package/dist/utils/View.js +0 -86
- package/dist/utils/View.js.map +0 -1
- package/dist/utils/Wait.js +0 -39
- package/dist/utils/Wait.js.map +0 -1
- package/dist/utils/index.js +0 -47
- package/dist/utils/index.js.map +0 -1
- package/dist/validation/Contraints.js +0 -91
- package/dist/validation/Contraints.js.map +0 -1
- package/dist/validation/Validate.js +0 -46
- package/dist/validation/Validate.js.map +0 -1
- package/dist/validation/When.js +0 -68
- package/dist/validation/When.js.map +0 -1
- package/dist/validation/index.js +0 -27
- package/dist/validation/index.js.map +0 -1
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var LocalRequestStore_exports = {};
|
|
20
|
-
__export(LocalRequestStore_exports, {
|
|
21
|
-
LocalRequestStore: () => LocalRequestStore
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(LocalRequestStore_exports);
|
|
24
|
-
var import_types = require("../types");
|
|
25
|
-
class LocalRequestStore {
|
|
26
|
-
key = (_req) => "";
|
|
27
|
-
execute(req, f) {
|
|
28
|
-
const key = this.key(req);
|
|
29
|
-
return import_types.ctx.request.get(key) ?? import_types.ctx.request.set(key, f(req));
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
-
0 && (module.exports = {
|
|
34
|
-
LocalRequestStore
|
|
35
|
-
});
|
|
36
|
-
//# sourceMappingURL=LocalRequestStore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/http/LocalRequestStore.ts"],"sourcesContent":["import { ctx, Func, Store } from '../types';\nimport { Response } from './Response';\nimport { Request } from './Request';\n\nexport class LocalRequestStore implements Store<Response, Request> {\n key = (_req: Request): string => '';\n\n execute(req: Request, f: Func<Promise<Response>, Request>): Promise<Response> {\n const key = this.key(req);\n return ctx.request.get(key) ?? ctx.request.set(key, f(req));\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAiC;AAI1B,MAAM,kBAAsD;AAAA,EACjE,MAAM,CAAC,SAA0B;AAAA,EAEjC,QAAQ,KAAc,GAAwD;AAC5E,UAAM,MAAM,KAAK,IAAI,GAAG;AACxB,WAAO,iBAAI,QAAQ,IAAI,GAAG,KAAK,iBAAI,QAAQ,IAAI,KAAK,EAAE,GAAG,CAAC;AAAA,EAC5D;AACF;","names":[]}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var OriginatedError_exports = {};
|
|
20
|
-
__export(OriginatedError_exports, {
|
|
21
|
-
OriginatedError: () => OriginatedError,
|
|
22
|
-
isOriginatedError: () => isOriginatedError,
|
|
23
|
-
toOriginatedError: () => toOriginatedError
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(OriginatedError_exports);
|
|
26
|
-
var import_types = require("../types");
|
|
27
|
-
class OriginatedError extends Error {
|
|
28
|
-
constructor(origin, options) {
|
|
29
|
-
super();
|
|
30
|
-
this.origin = origin;
|
|
31
|
-
this.options = options;
|
|
32
|
-
if ((0, import_types.isError)(origin))
|
|
33
|
-
this.stack = origin.stack;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
const isOriginatedError = (e) => (0, import_types.isError)(e) && e instanceof OriginatedError;
|
|
37
|
-
const toOriginatedError = (e, options) => isOriginatedError(e) ? e : new OriginatedError(e, options);
|
|
38
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
-
0 && (module.exports = {
|
|
40
|
-
OriginatedError,
|
|
41
|
-
isOriginatedError,
|
|
42
|
-
toOriginatedError
|
|
43
|
-
});
|
|
44
|
-
//# sourceMappingURL=OriginatedError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/http/OriginatedError.ts"],"sourcesContent":["import { ErrorOrigin, isError } from '../types';\nimport { VerbOptions } from './Verb';\n\nexport class OriginatedError extends Error {\n constructor(readonly origin: ErrorOrigin, readonly options?: VerbOptions) {\n super();\n if (isError(origin)) this.stack = origin.stack;\n }\n}\n\nexport const isOriginatedError = (e?: unknown): e is OriginatedError => isError(e) && e instanceof OriginatedError;\n\nexport const toOriginatedError = (e: unknown, options?: VerbOptions): OriginatedError =>\n isOriginatedError(e) ? e : new OriginatedError(e as ErrorOrigin, options);\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAqC;AAG9B,MAAM,wBAAwB,MAAM;AAAA,EACzC,YAAqB,QAA8B,SAAuB;AACxE,UAAM;AADa;AAA8B;AAEjD,YAAI,sBAAQ,MAAM;AAAG,WAAK,QAAQ,OAAO;AAAA,EAC3C;AACF;AAEO,MAAM,oBAAoB,CAAC,UAAsC,sBAAQ,CAAC,KAAK,aAAa;AAE5F,MAAM,oBAAoB,CAAC,GAAY,YAC5C,kBAAkB,CAAC,IAAI,IAAI,IAAI,gBAAgB,GAAkB,OAAO;","names":[]}
|
package/dist/http/Request.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
var Request_exports = {};
|
|
16
|
-
module.exports = __toCommonJS(Request_exports);
|
|
17
|
-
//# sourceMappingURL=Request.js.map
|
package/dist/http/Request.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/http/Request.ts"],"sourcesContent":["import { Uri } from '../types';\nimport { HttpVerb } from './HttpVerb';\nimport { RequestOptions } from './RequestOptions';\n\nexport type Request = {\n uri: Uri;\n verb: HttpVerb;\n body?: unknown;\n transform?: (r: any) => any;\n transformError?: (r: any) => any;\n options?: RequestOptions;\n};\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var RequestOptions_exports = {};
|
|
20
|
-
__export(RequestOptions_exports, {
|
|
21
|
-
RequestOptions: () => RequestOptions,
|
|
22
|
-
isRequestOptions: () => isRequestOptions,
|
|
23
|
-
toPageOptions: () => toPageOptions
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(RequestOptions_exports);
|
|
26
|
-
var import_types = require("../types");
|
|
27
|
-
var import_HttpHeader = require("./HttpHeader");
|
|
28
|
-
var import_ContentType = require("./ContentType");
|
|
29
|
-
const toPageOptions = (options) => options instanceof RequestOptions ? options.pageOptions : options;
|
|
30
|
-
class RequestOptions extends import_types.Enum {
|
|
31
|
-
constructor(type = import_ContentType.ContentType.Json, headers = {}, pageOptions) {
|
|
32
|
-
super(type.name);
|
|
33
|
-
this.type = type;
|
|
34
|
-
this.headers = headers;
|
|
35
|
-
this.pageOptions = pageOptions;
|
|
36
|
-
this.headers["Content-Type"] = type.id;
|
|
37
|
-
this.headers[import_HttpHeader.HttpHeader.Correlation] = import_types.ctx.request.correlationId ?? (0, import_types.toUuid)();
|
|
38
|
-
}
|
|
39
|
-
requestOptions = {};
|
|
40
|
-
static get Form() {
|
|
41
|
-
return new RequestOptions(import_ContentType.ContentType.Form);
|
|
42
|
-
}
|
|
43
|
-
static get Json() {
|
|
44
|
-
return new RequestOptions(import_ContentType.ContentType.Json);
|
|
45
|
-
}
|
|
46
|
-
static get Stream() {
|
|
47
|
-
return new RequestOptions(import_ContentType.ContentType.Stream);
|
|
48
|
-
}
|
|
49
|
-
static get Text() {
|
|
50
|
-
return new RequestOptions(import_ContentType.ContentType.Text);
|
|
51
|
-
}
|
|
52
|
-
static get Xml() {
|
|
53
|
-
return new RequestOptions(import_ContentType.ContentType.Xml);
|
|
54
|
-
}
|
|
55
|
-
page = (options) => {
|
|
56
|
-
this.pageOptions = options;
|
|
57
|
-
return this;
|
|
58
|
-
};
|
|
59
|
-
authorization = (auth) => this.setHeader("Authorization", auth);
|
|
60
|
-
apiKey = (apiKey) => this.setHeader("apiKey", apiKey);
|
|
61
|
-
setHeader = (key, value) => (0, import_types.on)(this, (t) => t.headers[(0, import_types.asString)(key)] = value);
|
|
62
|
-
setHeaderUnlessPresent = (key, value) => value ? this.setHeader(key, this.headers[key] ?? value) : this;
|
|
63
|
-
accept = (type) => this.setHeader("Accept", type.id);
|
|
64
|
-
bearer = (jwt) => {
|
|
65
|
-
return (0, import_types.isNotEmpty)(jwt) ? this.authorization(`Bearer ${jwt}`) : this;
|
|
66
|
-
};
|
|
67
|
-
basic = (username, password) => {
|
|
68
|
-
const basicAuth = Buffer.from(`${username}:${password}`, "utf8").toString("base64");
|
|
69
|
-
return this.authorization(`Basic ${basicAuth}`);
|
|
70
|
-
};
|
|
71
|
-
maxRedirects = (max) => {
|
|
72
|
-
this.requestOptions.maxRedirects = max;
|
|
73
|
-
return this;
|
|
74
|
-
};
|
|
75
|
-
validateStatus = (validate) => {
|
|
76
|
-
this.requestOptions.validateStatus = validate;
|
|
77
|
-
return this;
|
|
78
|
-
};
|
|
79
|
-
timeout = (t) => {
|
|
80
|
-
this.requestOptions.timeout = t;
|
|
81
|
-
return this;
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
const isRequestOptions = (o) => (0, import_types.isDefined)(o) && o instanceof RequestOptions;
|
|
85
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
86
|
-
0 && (module.exports = {
|
|
87
|
-
RequestOptions,
|
|
88
|
-
isRequestOptions,
|
|
89
|
-
toPageOptions
|
|
90
|
-
});
|
|
91
|
-
//# sourceMappingURL=RequestOptions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/http/RequestOptions.ts"],"sourcesContent":["import { asString, CacheAge, ctx, Enum, Id, isDefined, isNotEmpty, on, Optional, PageOptions, Text, toUuid } from '../types';\nimport { HttpHeader } from './HttpHeader';\nimport { ContentType } from './ContentType';\n\nexport const toPageOptions = (options?: RequestOptions | PageOptions): Optional<PageOptions> =>\n options instanceof RequestOptions ? options.pageOptions : options;\n\nexport class RequestOptions extends Enum {\n public requestOptions: { maxRedirects?: number; validateStatus?: (status: number) => boolean; timeout?: CacheAge } = {};\n\n constructor(readonly type: ContentType = ContentType.Json, readonly headers: { [key: string]: any } = {}, public pageOptions?: PageOptions) {\n super(type.name);\n this.headers['Content-Type'] = type.id;\n this.headers[HttpHeader.Correlation] = ctx.request.correlationId ?? toUuid();\n }\n\n static get Form(): RequestOptions {\n return new RequestOptions(ContentType.Form);\n }\n\n static get Json(): RequestOptions {\n return new RequestOptions(ContentType.Json);\n }\n\n static get Stream(): RequestOptions {\n return new RequestOptions(ContentType.Stream);\n }\n\n static get Text(): RequestOptions {\n return new RequestOptions(ContentType.Text);\n }\n\n static get Xml(): RequestOptions {\n return new RequestOptions(ContentType.Xml);\n }\n\n page = (options: PageOptions): this => {\n this.pageOptions = options;\n return this;\n };\n\n authorization = (auth: string): this => this.setHeader('Authorization', auth);\n\n apiKey = (apiKey: string): this => this.setHeader('apiKey', apiKey);\n\n setHeader = (key: Text, value: Id | boolean): this => on(this, t => (t.headers[asString(key)] = value));\n\n setHeaderUnlessPresent = (key: string, value?: Id | boolean): this => (value ? this.setHeader(key, this.headers[key] ?? value) : this);\n\n accept = (type: ContentType): this => this.setHeader('Accept', type.id);\n\n bearer = (jwt: Text): this => {\n return isNotEmpty(jwt) ? this.authorization(`Bearer ${jwt}`) : this;\n };\n\n basic = (username: Text, password: Text): this => {\n const basicAuth = Buffer.from(`${username}:${password}`, 'utf8').toString('base64');\n return this.authorization(`Basic ${basicAuth}`);\n };\n\n maxRedirects = (max?: number): this => {\n this.requestOptions.maxRedirects = max;\n return this;\n };\n\n validateStatus = (validate?: (status: number) => boolean): this => {\n this.requestOptions.validateStatus = validate;\n return this;\n };\n\n timeout = (t?: CacheAge): this => {\n this.requestOptions.timeout = t;\n return this;\n };\n}\n\nexport const isRequestOptions = (o?: unknown): o is RequestOptions => isDefined(o) && o instanceof RequestOptions;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkH;AAClH,wBAA2B;AAC3B,yBAA4B;AAErB,MAAM,gBAAgB,CAAC,YAC5B,mBAAmB,iBAAiB,QAAQ,cAAc;AAErD,MAAM,uBAAuB,kBAAK;AAAA,EAGvC,YAAqB,OAAoB,+BAAY,MAAe,UAAkC,CAAC,GAAU,aAA2B;AAC1I,UAAM,KAAK,IAAI;AADI;AAA+C;AAA6C;AAE/G,SAAK,QAAQ,cAAc,IAAI,KAAK;AACpC,SAAK,QAAQ,6BAAW,WAAW,IAAI,iBAAI,QAAQ,qBAAiB,qBAAO;AAAA,EAC7E;AAAA,EANO,iBAA8G,CAAC;AAAA,EAQtH,WAAW,OAAuB;AAChC,WAAO,IAAI,eAAe,+BAAY,IAAI;AAAA,EAC5C;AAAA,EAEA,WAAW,OAAuB;AAChC,WAAO,IAAI,eAAe,+BAAY,IAAI;AAAA,EAC5C;AAAA,EAEA,WAAW,SAAyB;AAClC,WAAO,IAAI,eAAe,+BAAY,MAAM;AAAA,EAC9C;AAAA,EAEA,WAAW,OAAuB;AAChC,WAAO,IAAI,eAAe,+BAAY,IAAI;AAAA,EAC5C;AAAA,EAEA,WAAW,MAAsB;AAC/B,WAAO,IAAI,eAAe,+BAAY,GAAG;AAAA,EAC3C;AAAA,EAEA,OAAO,CAAC,YAA+B;AACrC,SAAK,cAAc;AACnB,WAAO;AAAA,EACT;AAAA,EAEA,gBAAgB,CAAC,SAAuB,KAAK,UAAU,iBAAiB,IAAI;AAAA,EAE5E,SAAS,CAAC,WAAyB,KAAK,UAAU,UAAU,MAAM;AAAA,EAElE,YAAY,CAAC,KAAW,cAA8B,iBAAG,MAAM,OAAM,EAAE,YAAQ,uBAAS,GAAG,CAAC,IAAI,KAAM;AAAA,EAEtG,yBAAyB,CAAC,KAAa,UAAgC,QAAQ,KAAK,UAAU,KAAK,KAAK,QAAQ,GAAG,KAAK,KAAK,IAAI;AAAA,EAEjI,SAAS,CAAC,SAA4B,KAAK,UAAU,UAAU,KAAK,EAAE;AAAA,EAEtE,SAAS,CAAC,QAAoB;AAC5B,eAAO,yBAAW,GAAG,IAAI,KAAK,cAAc,UAAU,GAAG,EAAE,IAAI;AAAA,EACjE;AAAA,EAEA,QAAQ,CAAC,UAAgB,aAAyB;AAChD,UAAM,YAAY,OAAO,KAAK,GAAG,QAAQ,IAAI,QAAQ,IAAI,MAAM,EAAE,SAAS,QAAQ;AAClF,WAAO,KAAK,cAAc,SAAS,SAAS,EAAE;AAAA,EAChD;AAAA,EAEA,eAAe,CAAC,QAAuB;AACrC,SAAK,eAAe,eAAe;AACnC,WAAO;AAAA,EACT;AAAA,EAEA,iBAAiB,CAAC,aAAiD;AACjE,SAAK,eAAe,iBAAiB;AACrC,WAAO;AAAA,EACT;AAAA,EAEA,UAAU,CAAC,MAAuB;AAChC,SAAK,eAAe,UAAU;AAC9B,WAAO;AAAA,EACT;AACF;AAEO,MAAM,mBAAmB,CAAC,UAAqC,wBAAU,CAAC,KAAK,aAAa;","names":[]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
var RequestProvider_exports = {};
|
|
16
|
-
module.exports = __toCommonJS(RequestProvider_exports);
|
|
17
|
-
//# sourceMappingURL=RequestProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/http/RequestProvider.ts"],"sourcesContent":["import { Response } from './Response';\nimport { Request } from './Request';\n\nexport interface RequestProvider {\n execute: (request: Request) => Promise<Response>;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/http/Response.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var Response_exports = {};
|
|
20
|
-
__export(Response_exports, {
|
|
21
|
-
isResponse: () => isResponse,
|
|
22
|
-
toResponse: () => toResponse
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(Response_exports);
|
|
25
|
-
var import_HttpStatus = require("./HttpStatus");
|
|
26
|
-
var import_RestResult = require("./RestResult");
|
|
27
|
-
var import_types = require("../types");
|
|
28
|
-
const isResponse = (r) => (0, import_types.isA)(r, "status", "body");
|
|
29
|
-
const toResponse = (status, body, headers) => ({
|
|
30
|
-
status: (0, import_HttpStatus.toHttpStatus)(status),
|
|
31
|
-
headers,
|
|
32
|
-
body: import_RestResult.rest.to(body)
|
|
33
|
-
});
|
|
34
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
-
0 && (module.exports = {
|
|
36
|
-
isResponse,
|
|
37
|
-
toResponse
|
|
38
|
-
});
|
|
39
|
-
//# sourceMappingURL=Response.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/http/Response.ts"],"sourcesContent":["import { HttpStatus, toHttpStatus } from './HttpStatus';\nimport { rest, RestResult } from './RestResult';\nimport { Code, isA, TypeGuard } from '../types';\n\nexport type Response = {\n status: HttpStatus;\n headers?: { [key: string]: any };\n body: RestResult;\n};\n\nexport const isResponse: TypeGuard<Response> = (r?: unknown): r is Response => isA<Response>(r, 'status', 'body');\n\nexport const toResponse = (status: HttpStatus | Code, body?: unknown, headers?: { [key: string]: any }): Response => ({\n status: toHttpStatus(status),\n headers,\n body: rest.to(body),\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAyC;AACzC,wBAAiC;AACjC,mBAAqC;AAQ9B,MAAM,aAAkC,CAAC,UAA+B,kBAAc,GAAG,UAAU,MAAM;AAEzG,MAAM,aAAa,CAAC,QAA2B,MAAgB,aAAgD;AAAA,EACpH,YAAQ,gCAAa,MAAM;AAAA,EAC3B;AAAA,EACA,MAAM,uBAAK,GAAG,IAAI;AACpB;","names":[]}
|
package/dist/http/RestResult.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var RestResult_exports = {};
|
|
20
|
-
__export(RestResult_exports, {
|
|
21
|
-
isRestResult: () => isRestResult,
|
|
22
|
-
rest: () => rest
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(RestResult_exports);
|
|
25
|
-
var import_types = require("../types");
|
|
26
|
-
var import_HttpStatus = require("./HttpStatus");
|
|
27
|
-
var import_Response = require("./Response");
|
|
28
|
-
const hasErrors = (a) => (0, import_types.isDefined)(a?.error?.errors);
|
|
29
|
-
const hasItems = (a) => (0, import_types.isDefined)(a?.data.items);
|
|
30
|
-
const rest = {
|
|
31
|
-
toData: (status, items = [], totalItems, meta) => ({
|
|
32
|
-
data: {
|
|
33
|
-
code: status.status,
|
|
34
|
-
items: (0, import_types.toList)(items),
|
|
35
|
-
itemCount: items.length,
|
|
36
|
-
totalItems,
|
|
37
|
-
meta
|
|
38
|
-
}
|
|
39
|
-
}),
|
|
40
|
-
toError: (status, errors = [(0, import_types.toResult)(status.name)]) => ({
|
|
41
|
-
error: {
|
|
42
|
-
code: status.status,
|
|
43
|
-
message: status.name ?? errors[0].message ?? "Unknown",
|
|
44
|
-
errors: (0, import_types.toList)(errors),
|
|
45
|
-
errorCount: errors.length
|
|
46
|
-
}
|
|
47
|
-
}),
|
|
48
|
-
to: (payload, status) => (0, import_types.choose)(payload).is.not.defined((p) => p, void 0).type(import_HttpStatus.isHttpStatus, (h) => rest.toError(h ?? status ?? import_HttpStatus.HttpStatus.InternalServerError, [(0, import_types.toResult)(h.name)])).type(import_types.isResult, (r) => rest.toError(status ?? import_HttpStatus.HttpStatus.BadRequest, [r])).type(import_types.isError, (e) => rest.toError(status ?? import_HttpStatus.HttpStatus.BadRequest, [e])).type(import_types.isResults, (r) => rest.toError(status ?? import_HttpStatus.HttpStatus.BadRequest, r.results)).type(import_Response.isResponse, (r) => rest.toError(status ?? import_HttpStatus.HttpStatus.byId(r.body.error?.code), r.body.error?.errors)).type(hasErrors, (e) => rest.toError(status ?? import_HttpStatus.HttpStatus.byId(e.error.code, import_HttpStatus.HttpStatus.BadRequest), e.error.errors)).type(hasItems, (d) => rest.toData(status ?? import_HttpStatus.HttpStatus.byId(d.data.code, import_HttpStatus.HttpStatus.Ok), d.data.items, d.data.totalItems, d.data.meta)).else((p) => rest.toData(status ?? import_HttpStatus.HttpStatus.Ok, (0, import_types.toList)(p)))
|
|
49
|
-
};
|
|
50
|
-
const isRestResult = (r) => (0, import_types.isDefined)(r) && ((0, import_types.isDefined)(r.data) || (0, import_types.isDefined)(r.error));
|
|
51
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
-
0 && (module.exports = {
|
|
53
|
-
isRestResult,
|
|
54
|
-
rest
|
|
55
|
-
});
|
|
56
|
-
//# sourceMappingURL=RestResult.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/http/RestResult.ts"],"sourcesContent":["import { choose, Id, isDefined, isError, isResult, isResults, Json, List, Result, toList, toResult } from '../types';\nimport { HttpStatus, isHttpStatus } from './HttpStatus';\nimport { isResponse } from './Response';\n\nexport type RestResult = {\n data?: { code: number; items: List<Json>; itemCount: number; totalItems?: number; meta?: Json };\n error?: { code: number; message: string; errorCount: number; errors: List<Result> };\n};\n\nconst hasErrors = (a: any): a is { error: { code: number; errors: List<Result> } } => isDefined(a?.error?.errors);\nconst hasItems = (a: any): a is { data: { code: number; items: List<Json>; totalItems?: number; meta?: Json } } => isDefined(a?.data.items);\n\nexport const rest = {\n toData: (status: HttpStatus, items: Json[] = [], totalItems?: number, meta?: Json): RestResult => ({\n data: {\n code: status.status,\n items: toList(items),\n itemCount: items.length,\n totalItems,\n meta,\n },\n }),\n toError: (status: HttpStatus, errors: Result[] = [toResult(status.name)]): RestResult => ({\n error: {\n code: status.status,\n message: status.name ?? errors[0].message ?? 'Unknown',\n errors: toList(errors),\n errorCount: errors.length,\n },\n }),\n to: (payload?: any | any[], status?: HttpStatus): RestResult =>\n choose(payload)\n .is.not.defined(p => p, undefined as unknown as RestResult)\n .type(isHttpStatus, h => rest.toError(h ?? status ?? HttpStatus.InternalServerError, [toResult(h.name)]))\n .type(isResult, r => rest.toError(status ?? HttpStatus.BadRequest, [r]))\n .type(isError, e => rest.toError(status ?? HttpStatus.BadRequest, [e]))\n .type(isResults, r => rest.toError(status ?? HttpStatus.BadRequest, r.results))\n .type(isResponse, r => rest.toError(status ?? HttpStatus.byId(r.body.error?.code as Id), r.body.error?.errors))\n .type(hasErrors, e => rest.toError(status ?? HttpStatus.byId(e.error.code, HttpStatus.BadRequest), e.error.errors))\n .type(hasItems, d => rest.toData(status ?? HttpStatus.byId(d.data.code, HttpStatus.Ok), d.data.items, d.data.totalItems, d.data.meta))\n .else(p => rest.toData(status ?? HttpStatus.Ok, toList(p))),\n};\n\nexport const isRestResult = (r: unknown): r is RestResult => isDefined(r) && (isDefined((r as RestResult).data) || isDefined((r as RestResult).error));\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0G;AAC1G,wBAAyC;AACzC,sBAA2B;AAO3B,MAAM,YAAY,CAAC,UAAmE,wBAAU,GAAG,OAAO,MAAM;AAChH,MAAM,WAAW,CAAC,UAAiG,wBAAU,GAAG,KAAK,KAAK;AAEnI,MAAM,OAAO;AAAA,EAClB,QAAQ,CAAC,QAAoB,QAAgB,CAAC,GAAG,YAAqB,UAA6B;AAAA,IACjG,MAAM;AAAA,MACJ,MAAM,OAAO;AAAA,MACb,WAAO,qBAAO,KAAK;AAAA,MACnB,WAAW,MAAM;AAAA,MACjB;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EACA,SAAS,CAAC,QAAoB,SAAmB,KAAC,uBAAS,OAAO,IAAI,CAAC,OAAmB;AAAA,IACxF,OAAO;AAAA,MACL,MAAM,OAAO;AAAA,MACb,SAAS,OAAO,QAAQ,OAAO,CAAC,EAAE,WAAW;AAAA,MAC7C,YAAQ,qBAAO,MAAM;AAAA,MACrB,YAAY,OAAO;AAAA,IACrB;AAAA,EACF;AAAA,EACA,IAAI,CAAC,SAAuB,eAC1B,qBAAO,OAAO,EACX,GAAG,IAAI,QAAQ,OAAK,GAAG,MAAkC,EACzD,KAAK,gCAAc,OAAK,KAAK,QAAQ,KAAK,UAAU,6BAAW,qBAAqB,KAAC,uBAAS,EAAE,IAAI,CAAC,CAAC,CAAC,EACvG,KAAK,uBAAU,OAAK,KAAK,QAAQ,UAAU,6BAAW,YAAY,CAAC,CAAC,CAAC,CAAC,EACtE,KAAK,sBAAS,OAAK,KAAK,QAAQ,UAAU,6BAAW,YAAY,CAAC,CAAC,CAAC,CAAC,EACrE,KAAK,wBAAW,OAAK,KAAK,QAAQ,UAAU,6BAAW,YAAY,EAAE,OAAO,CAAC,EAC7E,KAAK,4BAAY,OAAK,KAAK,QAAQ,UAAU,6BAAW,KAAK,EAAE,KAAK,OAAO,IAAU,GAAG,EAAE,KAAK,OAAO,MAAM,CAAC,EAC7G,KAAK,WAAW,OAAK,KAAK,QAAQ,UAAU,6BAAW,KAAK,EAAE,MAAM,MAAM,6BAAW,UAAU,GAAG,EAAE,MAAM,MAAM,CAAC,EACjH,KAAK,UAAU,OAAK,KAAK,OAAO,UAAU,6BAAW,KAAK,EAAE,KAAK,MAAM,6BAAW,EAAE,GAAG,EAAE,KAAK,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,IAAI,CAAC,EACpI,KAAK,OAAK,KAAK,OAAO,UAAU,6BAAW,QAAI,qBAAO,CAAC,CAAC,CAAC;AAChE;AAEO,MAAM,eAAe,CAAC,UAAgC,wBAAU,CAAC,UAAM,wBAAW,EAAiB,IAAI,SAAK,wBAAW,EAAiB,KAAK;","names":[]}
|
package/dist/http/Verb.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var Verb_exports = {};
|
|
20
|
-
__export(Verb_exports, {
|
|
21
|
-
del: () => del,
|
|
22
|
-
get: () => get,
|
|
23
|
-
patch: () => patch,
|
|
24
|
-
post: () => post,
|
|
25
|
-
put: () => put,
|
|
26
|
-
search: () => search,
|
|
27
|
-
stream: () => stream,
|
|
28
|
-
toVerbOptions: () => toVerbOptions
|
|
29
|
-
});
|
|
30
|
-
module.exports = __toCommonJS(Verb_exports);
|
|
31
|
-
var import_types = require("../types");
|
|
32
|
-
var import_index = require("./index");
|
|
33
|
-
const toVerbOptions = (options) => ({
|
|
34
|
-
onOk: options?.onOk ?? import_index.HttpStatus.Ok,
|
|
35
|
-
onNotFound: options?.onNotFound ?? import_index.HttpStatus.NotFound,
|
|
36
|
-
onError: options?.onError ?? import_index.HttpStatus.BadRequest,
|
|
37
|
-
type: options?.type ?? import_index.ContentType.Json,
|
|
38
|
-
cache: options?.cache ?? import_index.CacheControl.disabled()
|
|
39
|
-
});
|
|
40
|
-
const toVerb = (verb, options) => (subject, property) => {
|
|
41
|
-
(0, import_types.meta)(subject).property(property).set("verb", { verb, options });
|
|
42
|
-
};
|
|
43
|
-
const get = (options) => toVerb(import_index.HttpVerb.Get, options);
|
|
44
|
-
const search = (options) => toVerb(import_index.HttpVerb.Get, { onNotFound: import_index.HttpStatus.Ok, ...options });
|
|
45
|
-
const put = (options) => toVerb(import_index.HttpVerb.Put, options);
|
|
46
|
-
const patch = (options) => toVerb(import_index.HttpVerb.Patch, options);
|
|
47
|
-
const post = (options) => toVerb(import_index.HttpVerb.Post, { onOk: import_index.HttpStatus.Created, ...options });
|
|
48
|
-
const del = (options) => toVerb(import_index.HttpVerb.Delete, { onOk: import_index.HttpStatus.NoContent, ...options });
|
|
49
|
-
const stream = (options) => toVerb(import_index.HttpVerb.Get, { type: import_index.ContentType.Stream, ...options });
|
|
50
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
-
0 && (module.exports = {
|
|
52
|
-
del,
|
|
53
|
-
get,
|
|
54
|
-
patch,
|
|
55
|
-
post,
|
|
56
|
-
put,
|
|
57
|
-
search,
|
|
58
|
-
stream,
|
|
59
|
-
toVerbOptions
|
|
60
|
-
});
|
|
61
|
-
//# sourceMappingURL=Verb.js.map
|
package/dist/http/Verb.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/http/Verb.ts"],"sourcesContent":["import { meta } from '../types';\nimport { CacheControl, ContentType, HttpStatus, HttpVerb } from './index';\n\nexport type VerbOptions = { onOk?: HttpStatus; onNotFound?: HttpStatus; onError?: HttpStatus; type?: ContentType; cache?: CacheControl };\nexport type Verb = { verb: HttpVerb; options: VerbOptions };\n\nexport const toVerbOptions = (options?: VerbOptions): Required<VerbOptions> => ({\n onOk: options?.onOk ?? HttpStatus.Ok,\n onNotFound: options?.onNotFound ?? HttpStatus.NotFound,\n onError: options?.onError ?? HttpStatus.BadRequest,\n type: options?.type ?? ContentType.Json,\n cache: options?.cache ?? CacheControl.disabled(),\n});\n\nconst toVerb =\n <T>(verb: HttpVerb, options?: VerbOptions): PropertyDecorator =>\n (subject: unknown, property: string | symbol): void => {\n meta(subject).property(property).set('verb', { verb, options });\n };\n\nexport const get = (options?: VerbOptions): PropertyDecorator => toVerb(HttpVerb.Get, options);\n\nexport const search = (options?: VerbOptions): PropertyDecorator => toVerb(HttpVerb.Get, { onNotFound: HttpStatus.Ok, ...options });\n\nexport const put = (options?: VerbOptions): PropertyDecorator => toVerb(HttpVerb.Put, options);\n\nexport const patch = (options?: VerbOptions): PropertyDecorator => toVerb(HttpVerb.Patch, options);\n\nexport const post = (options?: VerbOptions): PropertyDecorator => toVerb(HttpVerb.Post, { onOk: HttpStatus.Created, ...options });\n\nexport const del = (options?: VerbOptions): PropertyDecorator => toVerb(HttpVerb.Delete, { onOk: HttpStatus.NoContent, ...options });\n\nexport const stream = (options?: VerbOptions): PropertyDecorator => toVerb(HttpVerb.Get, { type: ContentType.Stream, ...options });\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAqB;AACrB,mBAAgE;AAKzD,MAAM,gBAAgB,CAAC,aAAkD;AAAA,EAC9E,MAAM,SAAS,QAAQ,wBAAW;AAAA,EAClC,YAAY,SAAS,cAAc,wBAAW;AAAA,EAC9C,SAAS,SAAS,WAAW,wBAAW;AAAA,EACxC,MAAM,SAAS,QAAQ,yBAAY;AAAA,EACnC,OAAO,SAAS,SAAS,0BAAa,SAAS;AACjD;AAEA,MAAM,SACJ,CAAI,MAAgB,YACpB,CAAC,SAAkB,aAAoC;AACrD,yBAAK,OAAO,EAAE,SAAS,QAAQ,EAAE,IAAI,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAChE;AAEK,MAAM,MAAM,CAAC,YAA6C,OAAO,sBAAS,KAAK,OAAO;AAEtF,MAAM,SAAS,CAAC,YAA6C,OAAO,sBAAS,KAAK,EAAE,YAAY,wBAAW,IAAI,GAAG,QAAQ,CAAC;AAE3H,MAAM,MAAM,CAAC,YAA6C,OAAO,sBAAS,KAAK,OAAO;AAEtF,MAAM,QAAQ,CAAC,YAA6C,OAAO,sBAAS,OAAO,OAAO;AAE1F,MAAM,OAAO,CAAC,YAA6C,OAAO,sBAAS,MAAM,EAAE,MAAM,wBAAW,SAAS,GAAG,QAAQ,CAAC;AAEzH,MAAM,MAAM,CAAC,YAA6C,OAAO,sBAAS,QAAQ,EAAE,MAAM,wBAAW,WAAW,GAAG,QAAQ,CAAC;AAE5H,MAAM,SAAS,CAAC,YAA6C,OAAO,sBAAS,KAAK,EAAE,MAAM,yBAAY,QAAQ,GAAG,QAAQ,CAAC;","names":[]}
|
package/dist/http/index.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
-
var http_exports = {};
|
|
17
|
-
module.exports = __toCommonJS(http_exports);
|
|
18
|
-
__reExport(http_exports, require("./CacheControl"), module.exports);
|
|
19
|
-
__reExport(http_exports, require("./ContentType"), module.exports);
|
|
20
|
-
__reExport(http_exports, require("./HttpHeader"), module.exports);
|
|
21
|
-
__reExport(http_exports, require("./HttpStatus"), module.exports);
|
|
22
|
-
__reExport(http_exports, require("./HttpVerb"), module.exports);
|
|
23
|
-
__reExport(http_exports, require("./OriginatedError"), module.exports);
|
|
24
|
-
__reExport(http_exports, require("./Request"), module.exports);
|
|
25
|
-
__reExport(http_exports, require("./RequestOptions"), module.exports);
|
|
26
|
-
__reExport(http_exports, require("./RequestProvider"), module.exports);
|
|
27
|
-
__reExport(http_exports, require("./Response"), module.exports);
|
|
28
|
-
__reExport(http_exports, require("./RestResult"), module.exports);
|
|
29
|
-
__reExport(http_exports, require("./Verb"), module.exports);
|
|
30
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
-
0 && (module.exports = {
|
|
32
|
-
...require("./CacheControl"),
|
|
33
|
-
...require("./ContentType"),
|
|
34
|
-
...require("./HttpHeader"),
|
|
35
|
-
...require("./HttpStatus"),
|
|
36
|
-
...require("./HttpVerb"),
|
|
37
|
-
...require("./OriginatedError"),
|
|
38
|
-
...require("./Request"),
|
|
39
|
-
...require("./RequestOptions"),
|
|
40
|
-
...require("./RequestProvider"),
|
|
41
|
-
...require("./Response"),
|
|
42
|
-
...require("./RestResult"),
|
|
43
|
-
...require("./Verb")
|
|
44
|
-
});
|
|
45
|
-
//# sourceMappingURL=index.js.map
|
package/dist/http/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/http/index.ts"],"sourcesContent":["export * from './CacheControl';\nexport * from './ContentType';\nexport * from './HttpHeader';\nexport * from './HttpStatus';\nexport * from './HttpVerb';\nexport * from './OriginatedError';\nexport * from './Request';\nexport * from './RequestOptions';\nexport * from './RequestProvider';\nexport * from './Response';\nexport * from './RestResult';\nexport * from './Verb';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,yBAAc,2BAAd;AACA,yBAAc,0BADd;AAEA,yBAAc,yBAFd;AAGA,yBAAc,yBAHd;AAIA,yBAAc,uBAJd;AAKA,yBAAc,8BALd;AAMA,yBAAc,sBANd;AAOA,yBAAc,6BAPd;AAQA,yBAAc,8BARd;AASA,yBAAc,uBATd;AAUA,yBAAc,yBAVd;AAWA,yBAAc,mBAXd;","names":[]}
|
package/dist/process/App.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var App_exports = {};
|
|
20
|
-
__export(App_exports, {
|
|
21
|
-
App: () => App
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(App_exports);
|
|
24
|
-
var import_Scope = require("./Scope");
|
|
25
|
-
class App extends import_Scope.Scope {
|
|
26
|
-
constructor(name) {
|
|
27
|
-
super(name);
|
|
28
|
-
}
|
|
29
|
-
static Main = new App("Main");
|
|
30
|
-
}
|
|
31
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
-
0 && (module.exports = {
|
|
33
|
-
App
|
|
34
|
-
});
|
|
35
|
-
//# sourceMappingURL=App.js.map
|
package/dist/process/App.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/process/App.ts"],"sourcesContent":["import { Scope } from './Scope';\n\nexport class App extends Scope {\n constructor(name: string) {\n super(name);\n }\n\n static readonly Main = new App('Main');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsB;AAEf,MAAM,YAAY,mBAAM;AAAA,EAC7B,YAAY,MAAc;AACxB,UAAM,IAAI;AAAA,EACZ;AAAA,EAEA,OAAgB,OAAO,IAAI,IAAI,MAAM;AACvC;","names":[]}
|
package/dist/process/Manage.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var Manage_exports = {};
|
|
20
|
-
__export(Manage_exports, {
|
|
21
|
-
Manage: () => Manage
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(Manage_exports);
|
|
24
|
-
var import_Search = require("./Search");
|
|
25
|
-
class Manage extends import_Search.Search {
|
|
26
|
-
add(json) {
|
|
27
|
-
return this.repo.add(json);
|
|
28
|
-
}
|
|
29
|
-
update(id, json) {
|
|
30
|
-
return this.repo.update(id, json);
|
|
31
|
-
}
|
|
32
|
-
upsert(id, json) {
|
|
33
|
-
return this.repo.upsert(id, json);
|
|
34
|
-
}
|
|
35
|
-
remove(id) {
|
|
36
|
-
return this.repo.remove(id);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
-
0 && (module.exports = {
|
|
41
|
-
Manage
|
|
42
|
-
});
|
|
43
|
-
//# sourceMappingURL=Manage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/process/Manage.ts"],"sourcesContent":["import { Search } from './Search';\nimport { FetchOptions, Id, Json } from '../types';\n\nexport class Manage<T, Options = FetchOptions> extends Search<T, Options> {\n add(json: Json): Promise<T> {\n return this.repo.add(json);\n }\n\n update(id: Id, json: Json): Promise<T> {\n return this.repo.update(id, json);\n }\n\n upsert(id: Id, json: Json): Promise<T> {\n return this.repo.upsert(id, json);\n }\n\n remove(id: Id): Promise<boolean> {\n return this.repo.remove(id);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAuB;AAGhB,MAAM,eAA0C,qBAAmB;AAAA,EACxE,IAAI,MAAwB;AAC1B,WAAO,KAAK,KAAK,IAAI,IAAI;AAAA,EAC3B;AAAA,EAEA,OAAO,IAAQ,MAAwB;AACrC,WAAO,KAAK,KAAK,OAAO,IAAI,IAAI;AAAA,EAClC;AAAA,EAEA,OAAO,IAAQ,MAAwB;AACrC,WAAO,KAAK,KAAK,OAAO,IAAI,IAAI;AAAA,EAClC;AAAA,EAEA,OAAO,IAA0B;AAC/B,WAAO,KAAK,KAAK,OAAO,EAAE;AAAA,EAC5B;AACF;","names":[]}
|
package/dist/process/Scope.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var Scope_exports = {};
|
|
20
|
-
__export(Scope_exports, {
|
|
21
|
-
Scope: () => Scope
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(Scope_exports);
|
|
24
|
-
var import_types = require("../types");
|
|
25
|
-
class Scope extends import_types.Enum {
|
|
26
|
-
constructor(name, id = (0, import_types.text)(name).kebab, subs = (0, import_types.toList)()) {
|
|
27
|
-
super(name, id.toString());
|
|
28
|
-
this.name = name;
|
|
29
|
-
this.subs = subs;
|
|
30
|
-
}
|
|
31
|
-
for(item) {
|
|
32
|
-
return new Scope(`${this.name} ${(0, import_types.isString)(item) ? (0, import_types.text)(item).title : item.name}`, (0, import_types.kebab)(`${this.id} ${(0, import_types.isString)(item) ? item : item.id}`));
|
|
33
|
-
}
|
|
34
|
-
combines(...scopes) {
|
|
35
|
-
this.subs.add(scopes);
|
|
36
|
-
return this;
|
|
37
|
-
}
|
|
38
|
-
expand() {
|
|
39
|
-
return this.subs.flatMap((s) => s.expand()).add(this).distinct();
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
-
0 && (module.exports = {
|
|
44
|
-
Scope
|
|
45
|
-
});
|
|
46
|
-
//# sourceMappingURL=Scope.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/process/Scope.ts"],"sourcesContent":["import { Enum, IdName, isString, kebab, List, Text, text, toList } from '../types';\n\nexport class Scope extends Enum {\n protected constructor(readonly name: string, id: Text = text(name).kebab, readonly subs: List<Scope> = toList()) {\n super(name, id.toString());\n }\n\n for(item: string | IdName): Scope {\n return new Scope(`${this.name} ${isString(item) ? text(item).title : item.name}`, kebab(`${this.id} ${isString(item) ? item : item.id}`));\n }\n\n combines(...scopes: Scope[]): this {\n this.subs.add(scopes);\n return this;\n }\n\n expand(): List<Scope> {\n return this.subs\n .flatMap(s => s.expand())\n .add(this)\n .distinct();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAwE;AAEjE,MAAM,cAAc,kBAAK;AAAA,EACpB,YAAqB,MAAc,SAAW,mBAAK,IAAI,EAAE,OAAgB,WAAoB,qBAAO,GAAG;AAC/G,UAAM,MAAM,GAAG,SAAS,CAAC;AADI;AAAoD;AAAA,EAEnF;AAAA,EAEA,IAAI,MAA8B;AAChC,WAAO,IAAI,MAAM,GAAG,KAAK,IAAI,QAAI,uBAAS,IAAI,QAAI,mBAAK,IAAI,EAAE,QAAQ,KAAK,IAAI,QAAI,oBAAM,GAAG,KAAK,EAAE,QAAI,uBAAS,IAAI,IAAI,OAAO,KAAK,EAAE,EAAE,CAAC;AAAA,EAC1I;AAAA,EAEA,YAAY,QAAuB;AACjC,SAAK,KAAK,IAAI,MAAM;AACpB,WAAO;AAAA,EACT;AAAA,EAEA,SAAsB;AACpB,WAAO,KAAK,KACT,QAAQ,OAAK,EAAE,OAAO,CAAC,EACvB,IAAI,IAAI,EACR,SAAS;AAAA,EACd;AACF;","names":[]}
|