@tstdl/base 0.71.50 → 0.72.0-beta1
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/api/client/client.d.ts +3 -4
- package/api/client/client.js +33 -34
- package/api/client/client.js.map +1 -1
- package/api/client/index.d.ts +1 -1
- package/api/client/index.js +1 -17
- package/api/client/index.js.map +1 -1
- package/api/default-error-handlers.d.ts +2 -2
- package/api/default-error-handlers.js +11 -21
- package/api/default-error-handlers.js.map +1 -1
- package/api/index.d.ts +3 -3
- package/api/index.js +3 -19
- package/api/index.js.map +1 -1
- package/api/response.d.ts +2 -2
- package/api/response.js +42 -46
- package/api/response.js.map +1 -1
- package/api/server/api-controller.d.ts +3 -3
- package/api/server/api-controller.js +11 -19
- package/api/server/api-controller.js.map +1 -1
- package/api/server/error-handler.d.ts +3 -3
- package/api/server/error-handler.js +11 -15
- package/api/server/error-handler.js.map +1 -1
- package/api/server/gateway.d.ts +8 -9
- package/api/server/gateway.js +60 -57
- package/api/server/gateway.js.map +1 -1
- package/api/server/index.d.ts +3 -3
- package/api/server/index.js +3 -19
- package/api/server/index.js.map +1 -1
- package/api/server/middlewares/allowed-methods.middleware.d.ts +4 -4
- package/api/server/middlewares/allowed-methods.middleware.js +7 -11
- package/api/server/middlewares/allowed-methods.middleware.js.map +1 -1
- package/api/server/middlewares/catch-error.middleware.d.ts +3 -3
- package/api/server/middlewares/catch-error.middleware.js +3 -7
- package/api/server/middlewares/catch-error.middleware.js.map +1 -1
- package/api/server/middlewares/cors.middleware.d.ts +3 -3
- package/api/server/middlewares/cors.middleware.js +16 -21
- package/api/server/middlewares/cors.middleware.js.map +1 -1
- package/api/server/middlewares/index.d.ts +4 -4
- package/api/server/middlewares/index.js +4 -20
- package/api/server/middlewares/index.js.map +1 -1
- package/api/server/middlewares/response-time.middleware.d.ts +2 -2
- package/api/server/middlewares/response-time.middleware.js +5 -9
- package/api/server/middlewares/response-time.middleware.js.map +1 -1
- package/api/server/module.d.ts +3 -3
- package/api/server/module.js +7 -10
- package/api/server/module.js.map +1 -1
- package/api/types.d.ts +10 -5
- package/api/types.js +8 -15
- package/api/types.js.map +1 -1
- package/application/application.d.ts +3 -3
- package/application/application.js +22 -23
- package/application/application.js.map +1 -1
- package/application/index.d.ts +1 -1
- package/application/index.js +1 -17
- package/application/index.js.map +1 -1
- package/async-iterator-symbol.js +1 -5
- package/async-iterator-symbol.js.map +1 -1
- package/collections/awaitable/awaitable-list.d.ts +1 -1
- package/collections/awaitable/awaitable-list.js +8 -13
- package/collections/awaitable/awaitable-list.js.map +1 -1
- package/collections/awaitable/awaitable-map.js +9 -13
- package/collections/awaitable/awaitable-map.js.map +1 -1
- package/collections/awaitable/awaitable-set.js +5 -9
- package/collections/awaitable/awaitable-set.js.map +1 -1
- package/collections/awaitable/index.d.ts +3 -3
- package/collections/awaitable/index.js +3 -19
- package/collections/awaitable/index.js.map +1 -1
- package/collections/collection.js +1 -2
- package/collections/index.d.ts +6 -6
- package/collections/index.js +6 -22
- package/collections/index.js.map +1 -1
- package/collections/keyed-set.js +5 -9
- package/collections/keyed-set.js.map +1 -1
- package/collections/list.d.ts +1 -1
- package/collections/list.js +1 -2
- package/collections/observable/index.d.ts +8 -8
- package/collections/observable/index.js +8 -24
- package/collections/observable/index.js.map +1 -1
- package/collections/observable/observable-array.d.ts +2 -2
- package/collections/observable/observable-array.js +2 -6
- package/collections/observable/observable-array.js.map +1 -1
- package/collections/observable/observable-collection-base.d.ts +2 -2
- package/collections/observable/observable-collection-base.js +18 -23
- package/collections/observable/observable-collection-base.js.map +1 -1
- package/collections/observable/observable-collection.d.ts +1 -1
- package/collections/observable/observable-collection.js +1 -2
- package/collections/observable/observable-list-base.d.ts +3 -3
- package/collections/observable/observable-list-base.js +11 -15
- package/collections/observable/observable-list-base.js.map +1 -1
- package/collections/observable/observable-list.d.ts +3 -3
- package/collections/observable/observable-list.js +1 -2
- package/collections/observable/observable-map.js +3 -7
- package/collections/observable/observable-map.js.map +1 -1
- package/collections/observable/observable-set.d.ts +2 -2
- package/collections/observable/observable-set.js +2 -6
- package/collections/observable/observable-set.js.map +1 -1
- package/collections/observable/observable-sorted-array-list.d.ts +3 -3
- package/collections/observable/observable-sorted-array-list.js +21 -25
- package/collections/observable/observable-sorted-array-list.js.map +1 -1
- package/collections/sorted-array-list.d.ts +2 -2
- package/collections/sorted-array-list.js +17 -21
- package/collections/sorted-array-list.js.map +1 -1
- package/collections/sorted-list.d.ts +1 -1
- package/collections/sorted-list.js +1 -2
- package/collections/sorted-map.d.ts +2 -2
- package/collections/sorted-map.js +9 -14
- package/collections/sorted-map.js.map +1 -1
- package/container/container.d.ts +5 -5
- package/container/container.js +115 -122
- package/container/container.js.map +1 -1
- package/container/decorators.d.ts +5 -5
- package/container/decorators.js +42 -68
- package/container/decorators.js.map +1 -1
- package/container/index.d.ts +10 -10
- package/container/index.js +10 -26
- package/container/index.js.map +1 -1
- package/container/interfaces.js +2 -4
- package/container/interfaces.js.map +1 -1
- package/container/provider.d.ts +4 -4
- package/container/provider.js +13 -24
- package/container/provider.js.map +1 -1
- package/container/resolve-chain.d.ts +2 -2
- package/container/resolve-chain.js +7 -11
- package/container/resolve-chain.js.map +1 -1
- package/container/resolve.error.d.ts +2 -2
- package/container/resolve.error.js +4 -8
- package/container/resolve.error.js.map +1 -1
- package/container/token.d.ts +1 -1
- package/container/token.js +5 -10
- package/container/token.js.map +1 -1
- package/container/type-info.d.ts +3 -3
- package/container/type-info.js +16 -25
- package/container/type-info.js.map +1 -1
- package/container/types.d.ts +2 -2
- package/container/types.js +1 -2
- package/container/utils.d.ts +1 -1
- package/container/utils.js +7 -11
- package/container/utils.js.map +1 -1
- package/core.d.ts +4 -4
- package/core.js +23 -28
- package/core.js.map +1 -1
- package/css/theme/index.d.ts +2 -2
- package/css/theme/index.js +2 -18
- package/css/theme/index.js.map +1 -1
- package/css/theme/theme.model.js +1 -5
- package/css/theme/theme.model.js.map +1 -1
- package/css/theme/theme.service.d.ts +1 -1
- package/css/theme/theme.service.js +10 -14
- package/css/theme/theme.service.js.map +1 -1
- package/data-structures/array-list.d.ts +2 -2
- package/data-structures/array-list.js +2 -6
- package/data-structures/array-list.js.map +1 -1
- package/data-structures/circular-buffer.d.ts +2 -2
- package/data-structures/circular-buffer.js +31 -50
- package/data-structures/circular-buffer.js.map +1 -1
- package/data-structures/collection.d.ts +1 -1
- package/data-structures/collection.js +12 -17
- package/data-structures/collection.js.map +1 -1
- package/data-structures/index-out-of-bounds.error.d.ts +1 -1
- package/data-structures/index-out-of-bounds.error.js +5 -9
- package/data-structures/index-out-of-bounds.error.js.map +1 -1
- package/data-structures/index.d.ts +9 -9
- package/data-structures/index.js +9 -25
- package/data-structures/index.js.map +1 -1
- package/data-structures/linked-list.d.ts +4 -4
- package/data-structures/linked-list.js +25 -28
- package/data-structures/linked-list.js.map +1 -1
- package/data-structures/list.d.ts +2 -2
- package/data-structures/list.js +10 -14
- package/data-structures/list.js.map +1 -1
- package/data-structures/multi-key-map.d.ts +1 -1
- package/data-structures/multi-key-map.js +13 -17
- package/data-structures/multi-key-map.js.map +1 -1
- package/data-structures/sorted-array-list.d.ts +5 -5
- package/data-structures/sorted-array-list.js +19 -22
- package/data-structures/sorted-array-list.js.map +1 -1
- package/data-structures/weak-ref-map.d.ts +1 -1
- package/data-structures/weak-ref-map.js +13 -17
- package/data-structures/weak-ref-map.js.map +1 -1
- package/database/entity-repository.d.ts +2 -2
- package/database/entity-repository.js +1 -5
- package/database/entity-repository.js.map +1 -1
- package/database/entity.js +1 -2
- package/database/id.js +4 -8
- package/database/id.js.map +1 -1
- package/database/index.d.ts +6 -6
- package/database/index.js +6 -22
- package/database/index.js.map +1 -1
- package/database/module.js +6 -11
- package/database/module.js.map +1 -1
- package/database/mongo/classes.d.ts +5 -5
- package/database/mongo/classes.js +11 -14
- package/database/mongo/classes.js.map +1 -1
- package/database/mongo/index.d.ts +10 -10
- package/database/mongo/index.js +10 -26
- package/database/mongo/index.js.map +1 -1
- package/database/mongo/{model/document.d.ts → model.d.ts} +3 -3
- package/database/mongo/model.js +71 -0
- package/database/mongo/model.js.map +1 -0
- package/database/mongo/module.d.ts +1 -1
- package/database/mongo/module.js +28 -45
- package/database/mongo/module.js.map +1 -1
- package/database/mongo/mongo-base.repository.d.ts +5 -5
- package/database/mongo/mongo-base.repository.js +49 -98
- package/database/mongo/mongo-base.repository.js.map +1 -1
- package/database/mongo/mongo-bulk.d.ts +4 -4
- package/database/mongo/mongo-bulk.js +17 -21
- package/database/mongo/mongo-bulk.js.map +1 -1
- package/database/mongo/{mongo-entity-repository.d.ts → mongo-entity.repository.d.ts} +8 -8
- package/database/mongo/{mongo-entity-repository.js → mongo-entity.repository.js} +50 -130
- package/database/mongo/mongo-entity.repository.js.map +1 -0
- package/database/mongo/operations.d.ts +4 -4
- package/database/mongo/operations.js +6 -15
- package/database/mongo/operations.js.map +1 -1
- package/database/mongo/query-converter.d.ts +4 -4
- package/database/mongo/query-converter.js +18 -27
- package/database/mongo/query-converter.js.map +1 -1
- package/database/mongo/simple-entity.repository.d.ts +7 -0
- package/database/mongo/simple-entity.repository.js +7 -0
- package/database/mongo/simple-entity.repository.js.map +1 -0
- package/database/mongo/types.d.ts +3 -3
- package/database/mongo/types.js +1 -5
- package/database/mongo/types.js.map +1 -1
- package/database/query.d.ts +2 -2
- package/database/query.js +7 -10
- package/database/query.js.map +1 -1
- package/database/utils.d.ts +1 -1
- package/database/utils.js +1 -5
- package/database/utils.js.map +1 -1
- package/disposable/async-disposer.d.ts +4 -4
- package/disposable/async-disposer.js +20 -24
- package/disposable/async-disposer.js.map +1 -1
- package/disposable/disposable.js +7 -12
- package/disposable/disposable.js.map +1 -1
- package/disposable/index.d.ts +3 -3
- package/disposable/index.js +3 -19
- package/disposable/index.js.map +1 -1
- package/disposable/using.d.ts +1 -1
- package/disposable/using.js +5 -10
- package/disposable/using.js.map +1 -1
- package/distributed-loop/controller.js +1 -2
- package/distributed-loop/distributed-loop.d.ts +5 -5
- package/distributed-loop/distributed-loop.js +15 -19
- package/distributed-loop/distributed-loop.js.map +1 -1
- package/distributed-loop/index.d.ts +3 -3
- package/distributed-loop/index.js +3 -19
- package/distributed-loop/index.js.map +1 -1
- package/distributed-loop/provider.d.ts +2 -2
- package/distributed-loop/provider.js +7 -10
- package/distributed-loop/provider.js.map +1 -1
- package/enumerable/async-enumerable.d.ts +8 -8
- package/enumerable/async-enumerable.js +66 -71
- package/enumerable/async-enumerable.js.map +1 -1
- package/enumerable/enumerable-methods.js +1 -2
- package/enumerable/enumerable.d.ts +6 -6
- package/enumerable/enumerable.js +44 -49
- package/enumerable/enumerable.js.map +1 -1
- package/enumerable/index.d.ts +2 -2
- package/enumerable/index.js +2 -18
- package/enumerable/index.js.map +1 -1
- package/error/api.error.d.ts +2 -2
- package/error/api.error.js +2 -6
- package/error/api.error.js.map +1 -1
- package/error/assertion.error.d.ts +1 -1
- package/error/assertion.error.js +2 -6
- package/error/assertion.error.js.map +1 -1
- package/error/bad-request.error.d.ts +1 -1
- package/error/bad-request.error.js +2 -6
- package/error/bad-request.error.js.map +1 -1
- package/error/custom.error.js +2 -7
- package/error/custom.error.js.map +1 -1
- package/error/details.error.d.ts +1 -1
- package/error/details.error.js +2 -6
- package/error/details.error.js.map +1 -1
- package/error/forbidden.error.d.ts +1 -1
- package/error/forbidden.error.js +2 -6
- package/error/forbidden.error.js.map +1 -1
- package/error/index.d.ts +15 -15
- package/error/index.js +15 -31
- package/error/index.js.map +1 -1
- package/error/invalid-token.error.d.ts +1 -1
- package/error/invalid-token.error.js +2 -6
- package/error/invalid-token.error.js.map +1 -1
- package/error/max-bytes-exceeded.error.d.ts +1 -1
- package/error/max-bytes-exceeded.error.js +2 -6
- package/error/max-bytes-exceeded.error.js.map +1 -1
- package/error/method-not-allowed.error.d.ts +1 -1
- package/error/method-not-allowed.error.js +2 -6
- package/error/method-not-allowed.error.js.map +1 -1
- package/error/multi.error.d.ts +1 -1
- package/error/multi.error.js +2 -6
- package/error/multi.error.js.map +1 -1
- package/error/not-found.error.d.ts +1 -1
- package/error/not-found.error.js +2 -6
- package/error/not-found.error.js.map +1 -1
- package/error/not-implemented.error.d.ts +1 -1
- package/error/not-implemented.error.js +2 -6
- package/error/not-implemented.error.js.map +1 -1
- package/error/unauthorized.error.d.ts +1 -1
- package/error/unauthorized.error.js +2 -6
- package/error/unauthorized.error.js.map +1 -1
- package/error/unsupported-media-type.error.d.ts +1 -1
- package/error/unsupported-media-type.error.js +2 -6
- package/error/unsupported-media-type.error.js.map +1 -1
- package/error/validation.error.d.ts +1 -1
- package/error/validation.error.js +2 -6
- package/error/validation.error.js.map +1 -1
- package/examples/api/basic-overview.js +35 -36
- package/examples/api/basic-overview.js.map +1 -1
- package/global-this.js +1 -5
- package/global-this.js.map +1 -1
- package/http/client/adapters/got-http-client.adapter.d.ts +3 -3
- package/http/client/adapters/got-http-client.adapter.js +49 -82
- package/http/client/adapters/got-http-client.adapter.js.map +1 -1
- package/http/client/adapters/undici-http-client.adapter.d.ts +4 -4
- package/http/client/adapters/undici-http-client.adapter.js +31 -37
- package/http/client/adapters/undici-http-client.adapter.js.map +1 -1
- package/http/client/adapters/utils.d.ts +2 -2
- package/http/client/adapters/utils.js +14 -22
- package/http/client/adapters/utils.js.map +1 -1
- package/http/client/http-client-request.d.ts +13 -13
- package/http/client/http-client-request.js +34 -40
- package/http/client/http-client-request.js.map +1 -1
- package/http/client/http-client-response.d.ts +5 -5
- package/http/client/http-client-response.js +3 -7
- package/http/client/http-client-response.js.map +1 -1
- package/http/client/http-client.adapter.d.ts +3 -3
- package/http/client/http-client.adapter.js +1 -5
- package/http/client/http-client.adapter.js.map +1 -1
- package/http/client/http-client.d.ts +10 -10
- package/http/client/http-client.js +77 -118
- package/http/client/http-client.js.map +1 -1
- package/http/client/index.d.ts +4 -4
- package/http/client/index.js +4 -20
- package/http/client/index.js.map +1 -1
- package/http/cookie-parser.d.ts +1 -1
- package/http/cookie-parser.js +5 -9
- package/http/cookie-parser.js.map +1 -1
- package/http/http-form.d.ts +3 -3
- package/http/http-form.js +2 -6
- package/http/http-form.js.map +1 -1
- package/http/http-headers.d.ts +3 -3
- package/http/http-headers.js +16 -21
- package/http/http-headers.js.map +1 -1
- package/http/http-query.d.ts +3 -3
- package/http/http-query.js +2 -6
- package/http/http-query.js.map +1 -1
- package/http/http-url-parameters.d.ts +3 -3
- package/http/http-url-parameters.js +2 -6
- package/http/http-url-parameters.js.map +1 -1
- package/http/http-value-map.d.ts +2 -2
- package/http/http-value-map.js +21 -27
- package/http/http-value-map.js.map +1 -1
- package/http/http.error.d.ts +3 -3
- package/http/http.error.js +8 -13
- package/http/http.error.js.map +1 -1
- package/http/index.d.ts +9 -9
- package/http/index.js +9 -25
- package/http/index.js.map +1 -1
- package/http/server/http-server-request.d.ts +5 -5
- package/http/server/http-server-request.js +14 -19
- package/http/server/http-server-request.js.map +1 -1
- package/http/server/http-server-response.d.ts +3 -3
- package/http/server/http-server-response.js +3 -7
- package/http/server/http-server-response.js.map +1 -1
- package/http/server/http-server.d.ts +2 -3
- package/http/server/http-server.js +2 -6
- package/http/server/http-server.js.map +1 -1
- package/http/server/index.d.ts +3 -3
- package/http/server/index.js +3 -19
- package/http/server/index.js.map +1 -1
- package/http/server/node/index.d.ts +2 -2
- package/http/server/node/index.js +2 -18
- package/http/server/node/index.js.map +1 -1
- package/http/server/node/module.js +5 -9
- package/http/server/node/module.js.map +1 -1
- package/http/server/node/node-http-server.d.ts +8 -8
- package/http/server/node/node-http-server.js +51 -100
- package/http/server/node/node-http-server.js.map +1 -1
- package/http/types.d.ts +1 -1
- package/http/types.js +9 -16
- package/http/types.js.map +1 -1
- package/image-service/image-service.d.ts +2 -2
- package/image-service/image-service.js +14 -18
- package/image-service/image-service.js.map +1 -1
- package/image-service/imgproxy/imgproxy-image-service.d.ts +5 -5
- package/image-service/imgproxy/imgproxy-image-service.js +32 -36
- package/image-service/imgproxy/imgproxy-image-service.js.map +1 -1
- package/image-service/imgproxy/index.d.ts +1 -1
- package/image-service/imgproxy/index.js +1 -17
- package/image-service/imgproxy/index.js.map +1 -1
- package/image-service/index.d.ts +1 -1
- package/image-service/index.js +1 -17
- package/image-service/index.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -17
- package/index.js.map +1 -1
- package/instance-provider.d.ts +4 -4
- package/instance-provider.js +27 -35
- package/instance-provider.js.map +1 -1
- package/interfaces.js +1 -2
- package/json-path/index.d.ts +1 -1
- package/json-path/index.js +1 -17
- package/json-path/index.js.map +1 -1
- package/json-path/json-path.js +12 -19
- package/json-path/json-path.js.map +1 -1
- package/key-value-store/index.d.ts +2 -2
- package/key-value-store/index.js +2 -18
- package/key-value-store/index.js.map +1 -1
- package/key-value-store/key-value-store.provider.d.ts +2 -2
- package/key-value-store/key-value-store.provider.js +1 -5
- package/key-value-store/key-value-store.provider.js.map +1 -1
- package/key-value-store/key-value.store.d.ts +3 -3
- package/key-value-store/key-value.store.js +2 -6
- package/key-value-store/key-value.store.js.map +1 -1
- package/key-value-store/mongo/index.d.ts +5 -5
- package/key-value-store/mongo/index.js +5 -21
- package/key-value-store/mongo/index.js.map +1 -1
- package/key-value-store/mongo/module.d.ts +2 -2
- package/key-value-store/mongo/module.js +10 -14
- package/key-value-store/mongo/module.js.map +1 -1
- package/key-value-store/mongo/mongo-key-value-store.provider.d.ts +3 -3
- package/key-value-store/mongo/mongo-key-value-store.provider.js +7 -10
- package/key-value-store/mongo/mongo-key-value-store.provider.js.map +1 -1
- package/key-value-store/mongo/mongo-key-value.model.d.ts +1 -1
- package/key-value-store/mongo/mongo-key-value.model.js +1 -2
- package/key-value-store/mongo/mongo-key-value.repository.d.ts +6 -6
- package/key-value-store/mongo/mongo-key-value.repository.js +11 -14
- package/key-value-store/mongo/mongo-key-value.repository.js.map +1 -1
- package/key-value-store/mongo/mongo-key-value.store.d.ts +3 -3
- package/key-value-store/mongo/mongo-key-value.store.js +16 -19
- package/key-value-store/mongo/mongo-key-value.store.js.map +1 -1
- package/lock/index.d.ts +2 -2
- package/lock/index.js +2 -18
- package/lock/index.js.map +1 -1
- package/lock/lock.d.ts +2 -2
- package/lock/lock.js +2 -6
- package/lock/lock.js.map +1 -1
- package/lock/mongo/index.d.ts +5 -5
- package/lock/mongo/index.js +5 -21
- package/lock/mongo/index.js.map +1 -1
- package/lock/mongo/lock.d.ts +4 -4
- package/lock/mongo/lock.js +30 -33
- package/lock/mongo/lock.js.map +1 -1
- package/lock/mongo/model.d.ts +1 -1
- package/lock/mongo/model.js +1 -2
- package/lock/mongo/module.d.ts +2 -2
- package/lock/mongo/module.js +10 -14
- package/lock/mongo/module.js.map +1 -1
- package/lock/mongo/{mongo-lock-repository.d.ts → mongo-lock.repository.d.ts} +6 -6
- package/lock/mongo/{mongo-lock-repository.js → mongo-lock.repository.js} +17 -20
- package/lock/mongo/mongo-lock.repository.js.map +1 -0
- package/lock/mongo/provider.d.ts +4 -4
- package/lock/mongo/provider.js +16 -19
- package/lock/mongo/provider.js.map +1 -1
- package/lock/provider.d.ts +3 -3
- package/lock/provider.js +2 -6
- package/lock/provider.js.map +1 -1
- package/logger/console/index.d.ts +1 -1
- package/logger/console/index.js +1 -17
- package/logger/console/index.js.map +1 -1
- package/logger/console/logger.d.ts +3 -3
- package/logger/console/logger.js +20 -27
- package/logger/console/logger.js.map +1 -1
- package/logger/index.d.ts +2 -2
- package/logger/index.js +2 -18
- package/logger/index.js.map +1 -1
- package/logger/level.js +2 -5
- package/logger/level.js.map +1 -1
- package/logger/logger.d.ts +3 -3
- package/logger/logger.js +13 -17
- package/logger/logger.js.map +1 -1
- package/logger/noop/index.d.ts +1 -1
- package/logger/noop/index.js +1 -17
- package/logger/noop/index.js.map +1 -1
- package/logger/noop/logger.d.ts +1 -1
- package/logger/noop/logger.js +5 -9
- package/logger/noop/logger.js.map +1 -1
- package/mail/clients/nodemailer.mail-client.d.ts +2 -2
- package/mail/clients/nodemailer.mail-client.js +15 -20
- package/mail/clients/nodemailer.mail-client.js.map +1 -1
- package/mail/index.d.ts +8 -8
- package/mail/index.js +8 -24
- package/mail/index.js.map +1 -1
- package/mail/mail-log.repository.d.ts +2 -2
- package/mail/mail-log.repository.js +2 -6
- package/mail/mail-log.repository.js.map +1 -1
- package/mail/mail-template-renderer.provider.d.ts +1 -1
- package/mail/mail-template-renderer.provider.js +6 -9
- package/mail/mail-template-renderer.provider.js.map +1 -1
- package/mail/mail-template.provider.d.ts +1 -1
- package/mail/mail-template.provider.js +1 -5
- package/mail/mail-template.provider.js.map +1 -1
- package/mail/mail-template.renderer.d.ts +1 -1
- package/mail/mail-template.renderer.js +1 -5
- package/mail/mail-template.renderer.js.map +1 -1
- package/mail/mail.client.d.ts +3 -3
- package/mail/mail.client.js +2 -6
- package/mail/mail.client.js.map +1 -1
- package/mail/mail.service.d.ts +7 -7
- package/mail/mail.service.js +24 -27
- package/mail/mail.service.js.map +1 -1
- package/mail/models/index.d.ts +6 -6
- package/mail/models/index.js +6 -22
- package/mail/models/index.js.map +1 -1
- package/mail/models/mail-address.model.js +1 -2
- package/mail/models/mail-content.model.js +1 -2
- package/mail/models/mail-data.model.d.ts +3 -3
- package/mail/models/mail-data.model.js +1 -2
- package/mail/models/mail-log.model.d.ts +3 -3
- package/mail/models/mail-log.model.js +1 -2
- package/mail/models/mail-send-result.model.d.ts +1 -1
- package/mail/models/mail-send-result.model.js +1 -2
- package/mail/models/mail-template.model.js +1 -2
- package/mail/module.d.ts +6 -6
- package/mail/module.js +21 -25
- package/mail/module.js.map +1 -1
- package/mail/repositories/mongo-mail-log.repository.d.ts +6 -6
- package/mail/repositories/mongo-mail-log.repository.js +13 -18
- package/mail/repositories/mongo-mail-log.repository.js.map +1 -1
- package/mail/template-providers/file-mail-template.provider.d.ts +5 -5
- package/mail/template-providers/file-mail-template.provider.js +29 -32
- package/mail/template-providers/file-mail-template.provider.js.map +1 -1
- package/mail/template-providers/memory-mail-template.provider.d.ts +2 -2
- package/mail/template-providers/memory-mail-template.provider.js +7 -10
- package/mail/template-providers/memory-mail-template.provider.js.map +1 -1
- package/mail/template-renderers/handlebars.mail-template-renderer.d.ts +3 -3
- package/mail/template-renderers/handlebars.mail-template-renderer.js +13 -17
- package/mail/template-renderers/handlebars.mail-template-renderer.js.map +1 -1
- package/mail/template-renderers/mjml.mail-template-renderer.d.ts +4 -4
- package/mail/template-renderers/mjml.mail-template-renderer.js +18 -18
- package/mail/template-renderers/mjml.mail-template-renderer.js.map +1 -1
- package/mail/tokens.d.ts +5 -5
- package/mail/tokens.js +3 -6
- package/mail/tokens.js.map +1 -1
- package/memory/index.d.ts +1 -1
- package/memory/index.js +1 -17
- package/memory/index.js.map +1 -1
- package/memory/observable-finalization-registry.js +3 -7
- package/memory/observable-finalization-registry.js.map +1 -1
- package/message-bus/broadcast-channel/broadcast-channel-message-bus-provider.d.ts +3 -3
- package/message-bus/broadcast-channel/broadcast-channel-message-bus-provider.js +3 -7
- package/message-bus/broadcast-channel/broadcast-channel-message-bus-provider.js.map +1 -1
- package/message-bus/broadcast-channel/broadcast-channel-message-bus.d.ts +3 -3
- package/message-bus/broadcast-channel/broadcast-channel-message-bus.js +7 -12
- package/message-bus/broadcast-channel/broadcast-channel-message-bus.js.map +1 -1
- package/message-bus/broadcast-channel/index.d.ts +2 -2
- package/message-bus/broadcast-channel/index.js +2 -18
- package/message-bus/broadcast-channel/index.js.map +1 -1
- package/message-bus/index.d.ts +3 -3
- package/message-bus/index.js +3 -19
- package/message-bus/index.js.map +1 -1
- package/message-bus/local/index.d.ts +2 -2
- package/message-bus/local/index.js +2 -18
- package/message-bus/local/index.js.map +1 -1
- package/message-bus/local/local-message-bus-provider.d.ts +3 -3
- package/message-bus/local/local-message-bus-provider.js +20 -24
- package/message-bus/local/local-message-bus-provider.js.map +1 -1
- package/message-bus/local/local-message-bus.d.ts +4 -4
- package/message-bus/local/local-message-bus.js +13 -16
- package/message-bus/local/local-message-bus.js.map +1 -1
- package/message-bus/local/types.js +1 -2
- package/message-bus/message-bus-base.d.ts +4 -4
- package/message-bus/message-bus-base.js +11 -15
- package/message-bus/message-bus-base.js.map +1 -1
- package/message-bus/message-bus-provider.d.ts +1 -1
- package/message-bus/message-bus-provider.js +1 -5
- package/message-bus/message-bus-provider.js.map +1 -1
- package/message-bus/message-bus.d.ts +4 -4
- package/message-bus/message-bus.js +3 -7
- package/message-bus/message-bus.js.map +1 -1
- package/migration/index.d.ts +3 -3
- package/migration/index.js +3 -19
- package/migration/index.js.map +1 -1
- package/migration/migration-state-repository.d.ts +2 -2
- package/migration/migration-state-repository.js +2 -6
- package/migration/migration-state-repository.js.map +1 -1
- package/migration/migration-state.d.ts +1 -1
- package/migration/migration-state.js +1 -2
- package/migration/migrator.d.ts +3 -3
- package/migration/migrator.js +24 -28
- package/migration/migrator.js.map +1 -1
- package/migration/mongo/index.d.ts +2 -2
- package/migration/mongo/index.js +2 -18
- package/migration/mongo/index.js.map +1 -1
- package/migration/mongo/migration-state-repository.d.ts +7 -7
- package/migration/mongo/migration-state-repository.js +12 -15
- package/migration/mongo/migration-state-repository.js.map +1 -1
- package/migration/mongo/module.d.ts +2 -2
- package/migration/mongo/module.js +7 -11
- package/migration/mongo/module.js.map +1 -1
- package/module/index.d.ts +4 -4
- package/module/index.js +4 -20
- package/module/index.js.map +1 -1
- package/module/module-base.d.ts +5 -5
- package/module/module-base.js +10 -14
- package/module/module-base.js.map +1 -1
- package/module/module-metric-reporter.d.ts +4 -4
- package/module/module-metric-reporter.js +8 -12
- package/module/module-metric-reporter.js.map +1 -1
- package/module/module.d.ts +1 -1
- package/module/module.js +4 -7
- package/module/module.js.map +1 -1
- package/module/modules/index.d.ts +2 -2
- package/module/modules/index.js +2 -18
- package/module/modules/index.js.map +1 -1
- package/module/modules/old-web-server.module.d.ts +7 -7
- package/module/modules/old-web-server.module.js +6 -28
- package/module/modules/old-web-server.module.js.map +1 -1
- package/module/modules/web-server.module.d.ts +9 -9
- package/module/modules/web-server.module.js +24 -47
- package/module/modules/web-server.module.js.map +1 -1
- package/module/utils.d.ts +2 -2
- package/module/utils.js +2 -7
- package/module/utils.js.map +1 -1
- package/object-storage/index.d.ts +3 -3
- package/object-storage/index.js +3 -19
- package/object-storage/index.js.map +1 -1
- package/object-storage/object-storage-provider.d.ts +1 -1
- package/object-storage/object-storage-provider.js +1 -5
- package/object-storage/object-storage-provider.js.map +1 -1
- package/object-storage/object-storage.d.ts +3 -3
- package/object-storage/object-storage.js +2 -6
- package/object-storage/object-storage.js.map +1 -1
- package/object-storage/object.js +1 -2
- package/object-storage/s3/index.d.ts +3 -3
- package/object-storage/s3/index.js +3 -19
- package/object-storage/s3/index.js.map +1 -1
- package/object-storage/s3/s3.object-storage-provider.d.ts +3 -3
- package/object-storage/s3/s3.object-storage-provider.js +20 -24
- package/object-storage/s3/s3.object-storage-provider.js.map +1 -1
- package/object-storage/s3/s3.object-storage.d.ts +3 -3
- package/object-storage/s3/s3.object-storage.js +17 -20
- package/object-storage/s3/s3.object-storage.js.map +1 -1
- package/object-storage/s3/s3.object.d.ts +1 -1
- package/object-storage/s3/s3.object.js +1 -2
- package/old-api/endpoint.d.ts +1 -1
- package/old-api/endpoint.js +2 -7
- package/old-api/endpoint.js.map +1 -1
- package/old-api/endpoints/echo.endpoint.d.ts +1 -1
- package/old-api/endpoints/echo.endpoint.js +1 -5
- package/old-api/endpoints/echo.endpoint.js.map +1 -1
- package/old-api/endpoints/index.d.ts +1 -1
- package/old-api/endpoints/index.js +1 -17
- package/old-api/endpoints/index.js.map +1 -1
- package/old-api/http-api.d.ts +10 -10
- package/old-api/http-api.js +60 -84
- package/old-api/http-api.js.map +1 -1
- package/old-api/index.d.ts +3 -3
- package/old-api/index.js +3 -19
- package/old-api/index.js.map +1 -1
- package/old-api/validation/index.d.ts +1 -1
- package/old-api/validation/index.js +1 -17
- package/old-api/validation/index.js.map +1 -1
- package/old-api/validation/types.d.ts +1 -1
- package/old-api/validation/types.js +2 -5
- package/old-api/validation/types.js.map +1 -1
- package/old-api/validation/validators/index.d.ts +1 -1
- package/old-api/validation/validators/index.js +1 -17
- package/old-api/validation/validators/index.js.map +1 -1
- package/old-api/validation/validators/noop.d.ts +1 -1
- package/old-api/validation/validators/noop.js +1 -5
- package/old-api/validation/validators/noop.js.map +1 -1
- package/old-api/validation/validators/superstruct.d.ts +3 -3
- package/old-api/validation/validators/superstruct.js +17 -28
- package/old-api/validation/validators/superstruct.js.map +1 -1
- package/old-api/validation/validators/yup.d.ts +1 -1
- package/old-api/validation/validators/yup.js +8 -16
- package/old-api/validation/validators/yup.js.map +1 -1
- package/openid-connect/cached-oidc-configuration.service.d.ts +3 -3
- package/openid-connect/cached-oidc-configuration.service.js +14 -17
- package/openid-connect/cached-oidc-configuration.service.js.map +1 -1
- package/openid-connect/index.d.ts +7 -7
- package/openid-connect/index.js +11 -27
- package/openid-connect/index.js.map +1 -1
- package/openid-connect/mongo-oidc-state.repository.d.ts +8 -8
- package/openid-connect/mongo-oidc-state.repository.js +15 -19
- package/openid-connect/mongo-oidc-state.repository.js.map +1 -1
- package/openid-connect/oidc-configuration.service.d.ts +1 -1
- package/openid-connect/oidc-configuration.service.js +11 -14
- package/openid-connect/oidc-configuration.service.js.map +1 -1
- package/openid-connect/oidc-state.model.d.ts +1 -1
- package/openid-connect/oidc-state.model.js +1 -2
- package/openid-connect/oidc-state.repository.d.ts +2 -2
- package/openid-connect/oidc-state.repository.js +2 -6
- package/openid-connect/oidc-state.repository.js.map +1 -1
- package/openid-connect/oidc.service-model.js +1 -2
- package/openid-connect/oidc.service.d.ts +4 -4
- package/openid-connect/oidc.service.js +31 -34
- package/openid-connect/oidc.service.js.map +1 -1
- package/package.json +2 -1
- package/process-shutdown.d.ts +2 -2
- package/process-shutdown.js +11 -18
- package/process-shutdown.js.map +1 -1
- package/promise/cancelable-promise.js +1 -5
- package/promise/cancelable-promise.js.map +1 -1
- package/promise/deferred-promise.js +1 -5
- package/promise/deferred-promise.js.map +1 -1
- package/promise/index.d.ts +2 -2
- package/promise/index.js +2 -18
- package/promise/index.js.map +1 -1
- package/queue/enqueue-batch.d.ts +1 -1
- package/queue/enqueue-batch.js +2 -6
- package/queue/enqueue-batch.js.map +1 -1
- package/queue/index.d.ts +3 -3
- package/queue/index.js +3 -19
- package/queue/index.js.map +1 -1
- package/queue/mongo/index.d.ts +4 -4
- package/queue/mongo/index.js +4 -20
- package/queue/mongo/index.js.map +1 -1
- package/queue/mongo/job.d.ts +3 -3
- package/queue/mongo/job.js +1 -2
- package/queue/mongo/mongo-job.repository.d.ts +7 -7
- package/queue/mongo/mongo-job.repository.js +20 -34
- package/queue/mongo/mongo-job.repository.js.map +1 -1
- package/queue/mongo/queue.d.ts +6 -6
- package/queue/mongo/queue.js +62 -111
- package/queue/mongo/queue.js.map +1 -1
- package/queue/mongo/queue.provider.d.ts +10 -10
- package/queue/mongo/queue.provider.js +16 -20
- package/queue/mongo/queue.provider.js.map +1 -1
- package/queue/provider.d.ts +1 -1
- package/queue/provider.js +1 -5
- package/queue/provider.js.map +1 -1
- package/queue/queue.d.ts +4 -4
- package/queue/queue.js +9 -13
- package/queue/queue.js.map +1 -1
- package/random/index.d.ts +1 -1
- package/random/index.js +1 -17
- package/random/index.js.map +1 -1
- package/random/number/index.d.ts +3 -3
- package/random/number/index.js +3 -19
- package/random/number/index.js.map +1 -1
- package/random/number/mulberry32.d.ts +1 -1
- package/random/number/mulberry32.js +3 -8
- package/random/number/mulberry32.js.map +1 -1
- package/random/number/seeded.js +1 -5
- package/random/number/seeded.js.map +1 -1
- package/random/number/sfc32.d.ts +1 -1
- package/random/number/sfc32.js +3 -8
- package/random/number/sfc32.js.map +1 -1
- package/rxjs/cast.js +2 -7
- package/rxjs/cast.js.map +1 -1
- package/rxjs/index.d.ts +11 -11
- package/rxjs/index.js +11 -27
- package/rxjs/index.js.map +1 -1
- package/rxjs/intersection-observer.js +10 -25
- package/rxjs/intersection-observer.js.map +1 -1
- package/rxjs/mutation-observer.js +11 -27
- package/rxjs/mutation-observer.js.map +1 -1
- package/rxjs/noop.js +2 -7
- package/rxjs/noop.js.map +1 -1
- package/rxjs/performance-observer.js +9 -13
- package/rxjs/performance-observer.js.map +1 -1
- package/rxjs/resize-observer.js +11 -27
- package/rxjs/resize-observer.js.map +1 -1
- package/rxjs/retry-backoff.d.ts +1 -1
- package/rxjs/retry-backoff.js +13 -18
- package/rxjs/retry-backoff.js.map +1 -1
- package/rxjs/slow-array.js +8 -17
- package/rxjs/slow-array.js.map +1 -1
- package/rxjs/teardown.js +3 -7
- package/rxjs/teardown.js.map +1 -1
- package/rxjs/timing.js +14 -17
- package/rxjs/timing.js.map +1 -1
- package/rxjs/touch.js +7 -11
- package/rxjs/touch.js.map +1 -1
- package/schema/index.d.ts +4 -4
- package/schema/index.js +4 -20
- package/schema/index.js.map +1 -1
- package/schema/schema.error.d.ts +2 -2
- package/schema/schema.error.js +6 -11
- package/schema/schema.error.js.map +1 -1
- package/schema/schema.validator.d.ts +4 -4
- package/schema/schema.validator.js +19 -26
- package/schema/schema.validator.js.map +1 -1
- package/schema/schemas/any.d.ts +3 -3
- package/schema/schemas/any.js +9 -11
- package/schema/schemas/any.js.map +1 -1
- package/schema/schemas/array.d.ts +4 -4
- package/schema/schemas/array.js +20 -21
- package/schema/schemas/array.js.map +1 -1
- package/schema/schemas/async-iterable.d.ts +4 -4
- package/schema/schemas/async-iterable.js +18 -19
- package/schema/schemas/async-iterable.js.map +1 -1
- package/schema/schemas/boolean.d.ts +4 -4
- package/schema/schemas/boolean.js +13 -16
- package/schema/schemas/boolean.js.map +1 -1
- package/schema/schemas/date.d.ts +4 -4
- package/schema/schemas/date.js +22 -25
- package/schema/schemas/date.js.map +1 -1
- package/schema/schemas/defaulted.d.ts +5 -5
- package/schema/schemas/defaulted.js +14 -14
- package/schema/schemas/defaulted.js.map +1 -1
- package/schema/schemas/enumeration.d.ts +6 -6
- package/schema/schemas/enumeration.js +24 -26
- package/schema/schemas/enumeration.js.map +1 -1
- package/schema/schemas/index.d.ts +24 -24
- package/schema/schemas/index.js +24 -40
- package/schema/schemas/index.js.map +1 -1
- package/schema/schemas/instance.d.ts +5 -5
- package/schema/schemas/instance.js +13 -14
- package/schema/schemas/instance.js.map +1 -1
- package/schema/schemas/iterable.d.ts +4 -4
- package/schema/schemas/iterable.js +18 -19
- package/schema/schemas/iterable.js.map +1 -1
- package/schema/schemas/literal.d.ts +4 -4
- package/schema/schemas/literal.js +12 -13
- package/schema/schemas/literal.js.map +1 -1
- package/schema/schemas/never.d.ts +4 -4
- package/schema/schemas/never.js +12 -14
- package/schema/schemas/never.js.map +1 -1
- package/schema/schemas/nullable.d.ts +4 -4
- package/schema/schemas/nullable.js +14 -16
- package/schema/schemas/nullable.js.map +1 -1
- package/schema/schemas/number.d.ts +4 -4
- package/schema/schemas/number.js +21 -24
- package/schema/schemas/number.js.map +1 -1
- package/schema/schemas/object.d.ts +5 -5
- package/schema/schemas/object.js +24 -26
- package/schema/schemas/object.js.map +1 -1
- package/schema/schemas/optional.d.ts +4 -4
- package/schema/schemas/optional.js +14 -16
- package/schema/schemas/optional.js.map +1 -1
- package/schema/schemas/preprocess.d.ts +4 -4
- package/schema/schemas/preprocess.js +16 -16
- package/schema/schemas/preprocess.js.map +1 -1
- package/schema/schemas/readable-stream.d.ts +4 -4
- package/schema/schemas/readable-stream.js +12 -14
- package/schema/schemas/readable-stream.js.map +1 -1
- package/schema/schemas/refine.d.ts +5 -5
- package/schema/schemas/refine.js +19 -19
- package/schema/schemas/refine.js.map +1 -1
- package/schema/schemas/regexp.d.ts +4 -4
- package/schema/schemas/regexp.js +16 -19
- package/schema/schemas/regexp.js.map +1 -1
- package/schema/schemas/string.d.ts +4 -4
- package/schema/schemas/string.js +22 -26
- package/schema/schemas/string.js.map +1 -1
- package/schema/schemas/transform.d.ts +4 -4
- package/schema/schemas/transform.js +16 -16
- package/schema/schemas/transform.js.map +1 -1
- package/schema/schemas/uint8-array.d.ts +4 -4
- package/schema/schemas/uint8-array.js +19 -22
- package/schema/schemas/uint8-array.js.map +1 -1
- package/schema/schemas/union.d.ts +4 -4
- package/schema/schemas/union.js +14 -15
- package/schema/schemas/union.js.map +1 -1
- package/schema/schemas/unknown.d.ts +3 -3
- package/schema/schemas/unknown.js +9 -11
- package/schema/schemas/unknown.js.map +1 -1
- package/schema/types.d.ts +2 -2
- package/schema/types.js +1 -5
- package/schema/types.js.map +1 -1
- package/search-index/elastic/config.d.ts +3 -3
- package/search-index/elastic/config.js +6 -9
- package/search-index/elastic/config.js.map +1 -1
- package/search-index/elastic/index.d.ts +5 -5
- package/search-index/elastic/index.js +5 -21
- package/search-index/elastic/index.js.map +1 -1
- package/search-index/elastic/model/elastic-query.d.ts +1 -1
- package/search-index/elastic/model/elastic-query.js +1 -2
- package/search-index/elastic/model/index-mapping.d.ts +3 -3
- package/search-index/elastic/model/index-mapping.js +3 -7
- package/search-index/elastic/model/index-mapping.js.map +1 -1
- package/search-index/elastic/model/index.d.ts +3 -3
- package/search-index/elastic/model/index.js +3 -19
- package/search-index/elastic/model/index.js.map +1 -1
- package/search-index/elastic/model/sort.d.ts +3 -3
- package/search-index/elastic/model/sort.js +1 -2
- package/search-index/elastic/module.d.ts +4 -4
- package/search-index/elastic/module.js +22 -28
- package/search-index/elastic/module.js.map +1 -1
- package/search-index/elastic/query-builder/boolean-query-builder.d.ts +1 -1
- package/search-index/elastic/query-builder/boolean-query-builder.js +1 -5
- package/search-index/elastic/query-builder/boolean-query-builder.js.map +1 -1
- package/search-index/elastic/query-builder/index.d.ts +1 -1
- package/search-index/elastic/query-builder/index.js +1 -17
- package/search-index/elastic/query-builder/index.js.map +1 -1
- package/search-index/elastic/query-converter.d.ts +4 -4
- package/search-index/elastic/query-converter.js +29 -37
- package/search-index/elastic/query-converter.js.map +1 -1
- package/search-index/elastic/search-index.d.ts +9 -9
- package/search-index/elastic/search-index.js +36 -51
- package/search-index/elastic/search-index.js.map +1 -1
- package/search-index/elastic/sort-converter.d.ts +2 -2
- package/search-index/elastic/sort-converter.js +3 -8
- package/search-index/elastic/sort-converter.js.map +1 -1
- package/search-index/elastic/types.d.ts +1 -1
- package/search-index/elastic/types.js +1 -2
- package/search-index/error.d.ts +1 -1
- package/search-index/error.js +4 -8
- package/search-index/error.js.map +1 -1
- package/search-index/index.d.ts +3 -3
- package/search-index/index.js +3 -19
- package/search-index/index.js.map +1 -1
- package/search-index/memory/index.d.ts +1 -1
- package/search-index/memory/index.js +1 -17
- package/search-index/memory/index.js.map +1 -1
- package/search-index/memory/memory-search-index.d.ts +4 -3
- package/search-index/memory/memory-search-index.js +25 -30
- package/search-index/memory/memory-search-index.js.map +1 -1
- package/search-index/search-index.d.ts +2 -3
- package/search-index/search-index.js +11 -41
- package/search-index/search-index.js.map +1 -1
- package/search-index/search-result.d.ts +1 -1
- package/search-index/search-result.js +1 -2
- package/serializer/handlers/binary.d.ts +2 -2
- package/serializer/handlers/binary.js +11 -20
- package/serializer/handlers/binary.js.map +1 -1
- package/serializer/handlers/date.js +2 -7
- package/serializer/handlers/date.js.map +1 -1
- package/serializer/handlers/error.js +2 -7
- package/serializer/handlers/error.js.map +1 -1
- package/serializer/handlers/index.d.ts +7 -7
- package/serializer/handlers/index.js +7 -23
- package/serializer/handlers/index.js.map +1 -1
- package/serializer/handlers/map.d.ts +1 -1
- package/serializer/handlers/map.js +2 -7
- package/serializer/handlers/map.js.map +1 -1
- package/serializer/handlers/regex.js +2 -7
- package/serializer/handlers/regex.js.map +1 -1
- package/serializer/handlers/register.d.ts +1 -1
- package/serializer/handlers/register.js +17 -21
- package/serializer/handlers/register.js.map +1 -1
- package/serializer/handlers/set.d.ts +2 -2
- package/serializer/handlers/set.js +2 -7
- package/serializer/handlers/set.js.map +1 -1
- package/serializer/index.d.ts +4 -4
- package/serializer/index.js +3 -24
- package/serializer/index.js.map +1 -1
- package/serializer/serializable.d.ts +1 -1
- package/serializer/serializable.js +15 -24
- package/serializer/serializable.js.map +1 -1
- package/serializer/serializer.d.ts +2 -2
- package/serializer/serializer.js +30 -37
- package/serializer/serializer.js.map +1 -1
- package/serializer/types.d.ts +1 -1
- package/serializer/types.js +5 -8
- package/serializer/types.js.map +1 -1
- package/tailwind/colors.d.ts +1 -1
- package/tailwind/colors.js +4 -10
- package/tailwind/colors.js.map +1 -1
- package/tailwind/index.d.ts +1 -1
- package/tailwind/index.js +1 -17
- package/tailwind/index.js.map +1 -1
- package/tokens.d.ts +1 -1
- package/tokens.js +2 -5
- package/tokens.js.map +1 -1
- package/tsconfig.json +7 -3
- package/types/geo-json.d.ts +1 -1
- package/types/geo-json.js +1 -2
- package/types.js +1 -2
- package/types.js.map +1 -1
- package/utils/alphabet.js +2 -5
- package/utils/alphabet.js.map +1 -1
- package/utils/any-iterable-iterator.js +4 -8
- package/utils/any-iterable-iterator.js.map +1 -1
- package/utils/array/array-backtracker.js +8 -12
- package/utils/array/array-backtracker.js.map +1 -1
- package/utils/array/array.js +13 -21
- package/utils/array/array.js.map +1 -1
- package/utils/array/index.d.ts +2 -2
- package/utils/array/index.js +2 -18
- package/utils/array/index.js.map +1 -1
- package/utils/async-iterable-helpers/all.d.ts +2 -2
- package/utils/async-iterable-helpers/all.js +9 -31
- package/utils/async-iterable-helpers/all.js.map +1 -1
- package/utils/async-iterable-helpers/any.d.ts +2 -2
- package/utils/async-iterable-helpers/any.js +9 -31
- package/utils/async-iterable-helpers/any.js.map +1 -1
- package/utils/async-iterable-helpers/assert.d.ts +2 -2
- package/utils/async-iterable-helpers/assert.js +22 -60
- package/utils/async-iterable-helpers/assert.js.map +1 -1
- package/utils/async-iterable-helpers/batch.d.ts +1 -1
- package/utils/async-iterable-helpers/batch.js +25 -63
- package/utils/async-iterable-helpers/batch.js.map +1 -1
- package/utils/async-iterable-helpers/buffer.d.ts +1 -1
- package/utils/async-iterable-helpers/buffer.js +43 -90
- package/utils/async-iterable-helpers/buffer.js.map +1 -1
- package/utils/async-iterable-helpers/concat.d.ts +1 -1
- package/utils/async-iterable-helpers/concat.js +3 -33
- package/utils/async-iterable-helpers/concat.js.map +1 -1
- package/utils/async-iterable-helpers/default-if-empty.d.ts +1 -1
- package/utils/async-iterable-helpers/default-if-empty.js +9 -45
- package/utils/async-iterable-helpers/default-if-empty.js.map +1 -1
- package/utils/async-iterable-helpers/deferred.d.ts +1 -1
- package/utils/async-iterable-helpers/deferred.js +3 -33
- package/utils/async-iterable-helpers/deferred.js.map +1 -1
- package/utils/async-iterable-helpers/distinct.d.ts +2 -2
- package/utils/async-iterable-helpers/distinct.js +23 -61
- package/utils/async-iterable-helpers/distinct.js.map +1 -1
- package/utils/async-iterable-helpers/drain.d.ts +1 -1
- package/utils/async-iterable-helpers/drain.js +3 -24
- package/utils/async-iterable-helpers/drain.js.map +1 -1
- package/utils/async-iterable-helpers/filter.d.ts +2 -2
- package/utils/async-iterable-helpers/filter.js +22 -60
- package/utils/async-iterable-helpers/filter.js.map +1 -1
- package/utils/async-iterable-helpers/first-or-default.d.ts +3 -3
- package/utils/async-iterable-helpers/first-or-default.js +6 -28
- package/utils/async-iterable-helpers/first-or-default.js.map +1 -1
- package/utils/async-iterable-helpers/first.d.ts +3 -3
- package/utils/async-iterable-helpers/first.js +6 -28
- package/utils/async-iterable-helpers/first.js.map +1 -1
- package/utils/async-iterable-helpers/for-each.d.ts +2 -2
- package/utils/async-iterable-helpers/for-each.js +7 -29
- package/utils/async-iterable-helpers/for-each.js.map +1 -1
- package/utils/async-iterable-helpers/group-single.d.ts +2 -2
- package/utils/async-iterable-helpers/group-single.js +3 -33
- package/utils/async-iterable-helpers/group-single.js.map +1 -1
- package/utils/async-iterable-helpers/group-to-map.d.ts +2 -2
- package/utils/async-iterable-helpers/group-to-map.js +9 -31
- package/utils/async-iterable-helpers/group-to-map.js.map +1 -1
- package/utils/async-iterable-helpers/group-to-single-map.d.ts +2 -2
- package/utils/async-iterable-helpers/group-to-single-map.js +8 -30
- package/utils/async-iterable-helpers/group-to-single-map.js.map +1 -1
- package/utils/async-iterable-helpers/group.d.ts +2 -2
- package/utils/async-iterable-helpers/group.js +3 -33
- package/utils/async-iterable-helpers/group.js.map +1 -1
- package/utils/async-iterable-helpers/index.d.ts +45 -45
- package/utils/async-iterable-helpers/index.js +45 -61
- package/utils/async-iterable-helpers/index.js.map +1 -1
- package/utils/async-iterable-helpers/interrupt.d.ts +1 -1
- package/utils/async-iterable-helpers/interrupt.js +19 -69
- package/utils/async-iterable-helpers/interrupt.js.map +1 -1
- package/utils/async-iterable-helpers/is-async-iterable.d.ts +1 -1
- package/utils/async-iterable-helpers/is-async-iterable.js +5 -10
- package/utils/async-iterable-helpers/is-async-iterable.js.map +1 -1
- package/utils/async-iterable-helpers/last-or-default.d.ts +3 -3
- package/utils/async-iterable-helpers/last-or-default.js +6 -28
- package/utils/async-iterable-helpers/last-or-default.js.map +1 -1
- package/utils/async-iterable-helpers/last.d.ts +3 -3
- package/utils/async-iterable-helpers/last.js +6 -28
- package/utils/async-iterable-helpers/last.js.map +1 -1
- package/utils/async-iterable-helpers/map-many.d.ts +2 -2
- package/utils/async-iterable-helpers/map-many.js +19 -62
- package/utils/async-iterable-helpers/map-many.js.map +1 -1
- package/utils/async-iterable-helpers/map.d.ts +2 -2
- package/utils/async-iterable-helpers/map.js +19 -57
- package/utils/async-iterable-helpers/map.js.map +1 -1
- package/utils/async-iterable-helpers/materialize.d.ts +1 -1
- package/utils/async-iterable-helpers/materialize.js +9 -41
- package/utils/async-iterable-helpers/materialize.js.map +1 -1
- package/utils/async-iterable-helpers/metadata.d.ts +2 -2
- package/utils/async-iterable-helpers/metadata.js +35 -75
- package/utils/async-iterable-helpers/metadata.js.map +1 -1
- package/utils/async-iterable-helpers/multiplex.d.ts +1 -1
- package/utils/async-iterable-helpers/multiplex.js +7 -29
- package/utils/async-iterable-helpers/multiplex.js.map +1 -1
- package/utils/async-iterable-helpers/observable-iterable.js +31 -49
- package/utils/async-iterable-helpers/observable-iterable.js.map +1 -1
- package/utils/async-iterable-helpers/pairwise.d.ts +1 -1
- package/utils/async-iterable-helpers/pairwise.js +24 -62
- package/utils/async-iterable-helpers/pairwise.js.map +1 -1
- package/utils/async-iterable-helpers/parallel/feed.d.ts +2 -2
- package/utils/async-iterable-helpers/parallel/feed.js +24 -54
- package/utils/async-iterable-helpers/parallel/feed.js.map +1 -1
- package/utils/async-iterable-helpers/parallel/filter.d.ts +2 -2
- package/utils/async-iterable-helpers/parallel/filter.js +3 -7
- package/utils/async-iterable-helpers/parallel/filter.js.map +1 -1
- package/utils/async-iterable-helpers/parallel/for-each.d.ts +2 -2
- package/utils/async-iterable-helpers/parallel/for-each.js +13 -35
- package/utils/async-iterable-helpers/parallel/for-each.js.map +1 -1
- package/utils/async-iterable-helpers/parallel/group.d.ts +2 -2
- package/utils/async-iterable-helpers/parallel/group.js +5 -9
- package/utils/async-iterable-helpers/parallel/group.js.map +1 -1
- package/utils/async-iterable-helpers/parallel/index.d.ts +7 -7
- package/utils/async-iterable-helpers/parallel/index.js +7 -23
- package/utils/async-iterable-helpers/parallel/index.js.map +1 -1
- package/utils/async-iterable-helpers/parallel/map.d.ts +2 -2
- package/utils/async-iterable-helpers/parallel/map.js +3 -7
- package/utils/async-iterable-helpers/parallel/map.js.map +1 -1
- package/utils/async-iterable-helpers/parallel/tap.d.ts +2 -2
- package/utils/async-iterable-helpers/parallel/tap.js +3 -7
- package/utils/async-iterable-helpers/parallel/tap.js.map +1 -1
- package/utils/async-iterable-helpers/parallel/types.js +1 -2
- package/utils/async-iterable-helpers/reduce.d.ts +2 -2
- package/utils/async-iterable-helpers/reduce.js +11 -33
- package/utils/async-iterable-helpers/reduce.js.map +1 -1
- package/utils/async-iterable-helpers/retry.d.ts +2 -2
- package/utils/async-iterable-helpers/retry.js +41 -79
- package/utils/async-iterable-helpers/retry.js.map +1 -1
- package/utils/async-iterable-helpers/single-or-default.d.ts +3 -3
- package/utils/async-iterable-helpers/single-or-default.js +11 -33
- package/utils/async-iterable-helpers/single-or-default.js.map +1 -1
- package/utils/async-iterable-helpers/single.d.ts +3 -3
- package/utils/async-iterable-helpers/single.js +11 -33
- package/utils/async-iterable-helpers/single.js.map +1 -1
- package/utils/async-iterable-helpers/skip.d.ts +1 -1
- package/utils/async-iterable-helpers/skip.js +3 -7
- package/utils/async-iterable-helpers/skip.js.map +1 -1
- package/utils/async-iterable-helpers/sort.d.ts +2 -2
- package/utils/async-iterable-helpers/sort.js +5 -9
- package/utils/async-iterable-helpers/sort.js.map +1 -1
- package/utils/async-iterable-helpers/take-until.d.ts +2 -2
- package/utils/async-iterable-helpers/take-until.js +30 -52
- package/utils/async-iterable-helpers/take-until.js.map +1 -1
- package/utils/async-iterable-helpers/take-while.d.ts +2 -2
- package/utils/async-iterable-helpers/take-while.js +28 -66
- package/utils/async-iterable-helpers/take-while.js.map +1 -1
- package/utils/async-iterable-helpers/take.d.ts +1 -1
- package/utils/async-iterable-helpers/take.js +10 -46
- package/utils/async-iterable-helpers/take.js.map +1 -1
- package/utils/async-iterable-helpers/tap.d.ts +2 -2
- package/utils/async-iterable-helpers/tap.js +19 -57
- package/utils/async-iterable-helpers/tap.js.map +1 -1
- package/utils/async-iterable-helpers/throttle.d.ts +2 -2
- package/utils/async-iterable-helpers/throttle.js +9 -45
- package/utils/async-iterable-helpers/throttle.js.map +1 -1
- package/utils/async-iterable-helpers/to-array.d.ts +1 -1
- package/utils/async-iterable-helpers/to-array.js +5 -27
- package/utils/async-iterable-helpers/to-array.js.map +1 -1
- package/utils/async-iterable-helpers/to-async-iterable-iterator.d.ts +1 -1
- package/utils/async-iterable-helpers/to-async-iterable-iterator.js +36 -74
- package/utils/async-iterable-helpers/to-async-iterable-iterator.js.map +1 -1
- package/utils/async-iterable-helpers/to-async-iterator.d.ts +1 -1
- package/utils/async-iterable-helpers/to-async-iterator.js +9 -14
- package/utils/async-iterable-helpers/to-async-iterator.js.map +1 -1
- package/utils/async-iterable-helpers/to-sync-iterable.d.ts +1 -1
- package/utils/async-iterable-helpers/to-sync-iterable.js +5 -9
- package/utils/async-iterable-helpers/to-sync-iterable.js.map +1 -1
- package/utils/async-iterable-helpers/types.d.ts +1 -1
- package/utils/async-iterable-helpers/types.js +1 -2
- package/utils/async-iterable-helpers/while.d.ts +2 -2
- package/utils/async-iterable-helpers/while.js +24 -62
- package/utils/async-iterable-helpers/while.js.map +1 -1
- package/utils/async-iterator-iterable-iterator.js +24 -42
- package/utils/async-iterator-iterable-iterator.js.map +1 -1
- package/utils/backoff.d.ts +2 -2
- package/utils/backoff.js +30 -53
- package/utils/backoff.js.map +1 -1
- package/utils/base64.d.ts +1 -1
- package/utils/base64.js +15 -26
- package/utils/base64.js.map +1 -1
- package/utils/benchmark.js +17 -25
- package/utils/benchmark.js.map +1 -1
- package/utils/binary-search.d.ts +1 -1
- package/utils/binary-search.js +10 -21
- package/utils/binary-search.js.map +1 -1
- package/utils/binary.d.ts +1 -1
- package/utils/binary.js +7 -13
- package/utils/binary.js.map +1 -1
- package/utils/cancellation-token.js +22 -26
- package/utils/cancellation-token.js.map +1 -1
- package/utils/comparison.js +7 -17
- package/utils/comparison.js.map +1 -1
- package/utils/compression.d.ts +2 -2
- package/utils/compression.js +18 -25
- package/utils/compression.js.map +1 -1
- package/utils/config-parser.js +11 -18
- package/utils/config-parser.js.map +1 -1
- package/utils/cryptography.d.ts +1 -1
- package/utils/cryptography.js +54 -69
- package/utils/cryptography.js.map +1 -1
- package/utils/date-time.js +34 -57
- package/utils/date-time.js.map +1 -1
- package/utils/encoding.d.ts +1 -1
- package/utils/encoding.js +12 -19
- package/utils/encoding.js.map +1 -1
- package/utils/enum.d.ts +1 -1
- package/utils/enum.js +7 -13
- package/utils/enum.js.map +1 -1
- package/utils/equals.d.ts +2 -2
- package/utils/equals.js +17 -24
- package/utils/equals.js.map +1 -1
- package/utils/event-loop.d.ts +2 -2
- package/utils/event-loop.js +9 -14
- package/utils/event-loop.js.map +1 -1
- package/utils/factory-map.js +2 -6
- package/utils/factory-map.js.map +1 -1
- package/utils/feedable-async-iterable.js +16 -53
- package/utils/feedable-async-iterable.js.map +1 -1
- package/utils/file-reader.js +6 -13
- package/utils/file-reader.js.map +1 -1
- package/utils/function/index.d.ts +2 -2
- package/utils/function/index.js +2 -18
- package/utils/function/index.js.map +1 -1
- package/utils/function/memoize.js +4 -9
- package/utils/function/memoize.js.map +1 -1
- package/utils/function/throttle.js +5 -9
- package/utils/function/throttle.js.map +1 -1
- package/utils/helpers.d.ts +1 -1
- package/utils/helpers.js +54 -86
- package/utils/helpers.js.map +1 -1
- package/utils/image.js +22 -30
- package/utils/image.js.map +1 -1
- package/utils/index.d.ts +42 -42
- package/utils/index.js +42 -58
- package/utils/index.js.map +1 -1
- package/utils/iterable-helpers/all.d.ts +1 -1
- package/utils/iterable-helpers/all.js +1 -5
- package/utils/iterable-helpers/all.js.map +1 -1
- package/utils/iterable-helpers/any.d.ts +1 -1
- package/utils/iterable-helpers/any.js +1 -5
- package/utils/iterable-helpers/any.js.map +1 -1
- package/utils/iterable-helpers/assert.d.ts +1 -1
- package/utils/iterable-helpers/assert.js +3 -7
- package/utils/iterable-helpers/assert.js.map +1 -1
- package/utils/iterable-helpers/batch.js +1 -5
- package/utils/iterable-helpers/batch.js.map +1 -1
- package/utils/iterable-helpers/concat.js +1 -5
- package/utils/iterable-helpers/concat.js.map +1 -1
- package/utils/iterable-helpers/default-if-empty.js +1 -5
- package/utils/iterable-helpers/default-if-empty.js.map +1 -1
- package/utils/iterable-helpers/deferred.js +1 -5
- package/utils/iterable-helpers/deferred.js.map +1 -1
- package/utils/iterable-helpers/distinct.d.ts +1 -1
- package/utils/iterable-helpers/distinct.js +1 -5
- package/utils/iterable-helpers/distinct.js.map +1 -1
- package/utils/iterable-helpers/drain.js +1 -5
- package/utils/iterable-helpers/drain.js.map +1 -1
- package/utils/iterable-helpers/filter.d.ts +1 -1
- package/utils/iterable-helpers/filter.js +1 -5
- package/utils/iterable-helpers/filter.js.map +1 -1
- package/utils/iterable-helpers/first-or-default.d.ts +1 -1
- package/utils/iterable-helpers/first-or-default.js +3 -7
- package/utils/iterable-helpers/first-or-default.js.map +1 -1
- package/utils/iterable-helpers/first.d.ts +1 -1
- package/utils/iterable-helpers/first.js +3 -7
- package/utils/iterable-helpers/first.js.map +1 -1
- package/utils/iterable-helpers/for-each.d.ts +1 -1
- package/utils/iterable-helpers/for-each.js +1 -5
- package/utils/iterable-helpers/for-each.js.map +1 -1
- package/utils/iterable-helpers/group-single.d.ts +1 -1
- package/utils/iterable-helpers/group-single.js +3 -7
- package/utils/iterable-helpers/group-single.js.map +1 -1
- package/utils/iterable-helpers/group-to-map.d.ts +1 -1
- package/utils/iterable-helpers/group-to-map.js +3 -7
- package/utils/iterable-helpers/group-to-map.js.map +1 -1
- package/utils/iterable-helpers/group-to-single-map.d.ts +1 -1
- package/utils/iterable-helpers/group-to-single-map.js +1 -5
- package/utils/iterable-helpers/group-to-single-map.js.map +1 -1
- package/utils/iterable-helpers/group.d.ts +1 -1
- package/utils/iterable-helpers/group.js +3 -7
- package/utils/iterable-helpers/group.js.map +1 -1
- package/utils/iterable-helpers/index.d.ts +37 -37
- package/utils/iterable-helpers/index.js +37 -53
- package/utils/iterable-helpers/index.js.map +1 -1
- package/utils/iterable-helpers/is-iterable.d.ts +1 -1
- package/utils/iterable-helpers/is-iterable.js +5 -10
- package/utils/iterable-helpers/is-iterable.js.map +1 -1
- package/utils/iterable-helpers/last-or-default.d.ts +1 -1
- package/utils/iterable-helpers/last-or-default.js +3 -7
- package/utils/iterable-helpers/last-or-default.js.map +1 -1
- package/utils/iterable-helpers/last.d.ts +1 -1
- package/utils/iterable-helpers/last.js +3 -7
- package/utils/iterable-helpers/last.js.map +1 -1
- package/utils/iterable-helpers/map-many.d.ts +1 -1
- package/utils/iterable-helpers/map-many.js +1 -5
- package/utils/iterable-helpers/map-many.js.map +1 -1
- package/utils/iterable-helpers/map.d.ts +1 -1
- package/utils/iterable-helpers/map.js +1 -5
- package/utils/iterable-helpers/map.js.map +1 -1
- package/utils/iterable-helpers/materialize.js +1 -5
- package/utils/iterable-helpers/materialize.js.map +1 -1
- package/utils/iterable-helpers/metadata.d.ts +1 -1
- package/utils/iterable-helpers/metadata.js +1 -5
- package/utils/iterable-helpers/metadata.js.map +1 -1
- package/utils/iterable-helpers/pairwise.js +1 -5
- package/utils/iterable-helpers/pairwise.js.map +1 -1
- package/utils/iterable-helpers/range.js +1 -5
- package/utils/iterable-helpers/range.js.map +1 -1
- package/utils/iterable-helpers/reduce.d.ts +1 -1
- package/utils/iterable-helpers/reduce.js +1 -5
- package/utils/iterable-helpers/reduce.js.map +1 -1
- package/utils/iterable-helpers/single-or-default.d.ts +1 -1
- package/utils/iterable-helpers/single-or-default.js +1 -5
- package/utils/iterable-helpers/single-or-default.js.map +1 -1
- package/utils/iterable-helpers/single.d.ts +1 -1
- package/utils/iterable-helpers/single.js +1 -5
- package/utils/iterable-helpers/single.js.map +1 -1
- package/utils/iterable-helpers/skip.js +1 -5
- package/utils/iterable-helpers/skip.js.map +1 -1
- package/utils/iterable-helpers/sort.d.ts +1 -1
- package/utils/iterable-helpers/sort.js +2 -6
- package/utils/iterable-helpers/sort.js.map +1 -1
- package/utils/iterable-helpers/take-until.d.ts +1 -1
- package/utils/iterable-helpers/take-until.js +1 -5
- package/utils/iterable-helpers/take-until.js.map +1 -1
- package/utils/iterable-helpers/take-while.d.ts +1 -1
- package/utils/iterable-helpers/take-while.js +1 -5
- package/utils/iterable-helpers/take-while.js.map +1 -1
- package/utils/iterable-helpers/take.js +1 -5
- package/utils/iterable-helpers/take.js.map +1 -1
- package/utils/iterable-helpers/tap.d.ts +1 -1
- package/utils/iterable-helpers/tap.js +1 -5
- package/utils/iterable-helpers/tap.js.map +1 -1
- package/utils/iterable-helpers/types.js +1 -2
- package/utils/iterable-helpers/while.d.ts +1 -1
- package/utils/iterable-helpers/while.js +1 -5
- package/utils/iterable-helpers/while.js.map +1 -1
- package/utils/jwt.d.ts +2 -2
- package/utils/jwt.js +26 -31
- package/utils/jwt.js.map +1 -1
- package/utils/map.js +7 -15
- package/utils/map.js.map +1 -1
- package/utils/math.js +7 -17
- package/utils/math.js.map +1 -1
- package/utils/middleware.js +2 -7
- package/utils/middleware.js.map +1 -1
- package/utils/moving-metric.js +5 -9
- package/utils/moving-metric.js.map +1 -1
- package/utils/noop.js +1 -5
- package/utils/noop.js.map +1 -1
- package/utils/object/dereference.js +7 -13
- package/utils/object/dereference.js.map +1 -1
- package/utils/object/forward-ref.js +15 -19
- package/utils/object/forward-ref.js.map +1 -1
- package/utils/object/index.d.ts +6 -6
- package/utils/object/index.js +6 -22
- package/utils/object/index.js.map +1 -1
- package/utils/object/lazy-property.d.ts +1 -1
- package/utils/object/lazy-property.js +14 -21
- package/utils/object/lazy-property.js.map +1 -1
- package/utils/object/merge.js +13 -17
- package/utils/object/merge.js.map +1 -1
- package/utils/object/object.d.ts +1 -1
- package/utils/object/object.js +18 -29
- package/utils/object/object.js.map +1 -1
- package/utils/object/property-name.d.ts +1 -1
- package/utils/object/property-name.js +16 -25
- package/utils/object/property-name.js.map +1 -1
- package/utils/ordered-feedable-async-iterable.d.ts +1 -1
- package/utils/ordered-feedable-async-iterable.js +3 -7
- package/utils/ordered-feedable-async-iterable.js.map +1 -1
- package/utils/patch-worker.d.ts +2 -2
- package/utils/patch-worker.js +23 -29
- package/utils/patch-worker.js.map +1 -1
- package/utils/patterns.js +4 -8
- package/utils/patterns.js.map +1 -1
- package/utils/periodic-reporter.js +9 -13
- package/utils/periodic-reporter.js.map +1 -1
- package/utils/periodic-sampler.js +15 -19
- package/utils/periodic-sampler.js.map +1 -1
- package/utils/provider-function-iterable.js +14 -32
- package/utils/provider-function-iterable.js.map +1 -1
- package/utils/random.js +4 -9
- package/utils/random.js.map +1 -1
- package/utils/reflection.d.ts +1 -1
- package/utils/reflection.js +7 -16
- package/utils/reflection.js.map +1 -1
- package/utils/set.js +7 -15
- package/utils/set.js.map +1 -1
- package/utils/singleton.js +3 -7
- package/utils/singleton.js.map +1 -1
- package/utils/sort.js +5 -12
- package/utils/sort.js.map +1 -1
- package/utils/stream/async-iterable-readable.d.ts +3 -3
- package/utils/stream/async-iterable-readable.js +8 -13
- package/utils/stream/async-iterable-readable.js.map +1 -1
- package/utils/stream/async-writable-stream.d.ts +3 -3
- package/utils/stream/async-writable-stream.js +3 -7
- package/utils/stream/async-writable-stream.js.map +1 -1
- package/utils/stream/index.d.ts +5 -5
- package/utils/stream/index.js +5 -21
- package/utils/stream/index.js.map +1 -1
- package/utils/stream/stream-helper-types.d.ts +1 -1
- package/utils/stream/stream-helper-types.js +1 -2
- package/utils/stream/stream-reader.js +20 -51
- package/utils/stream/stream-reader.js.map +1 -1
- package/utils/stream/typed-readable.d.ts +2 -2
- package/utils/stream/typed-readable.js +2 -5
- package/utils/stream/typed-readable.js.map +1 -1
- package/utils/timer.js +1 -5
- package/utils/timer.js.map +1 -1
- package/utils/timing.d.ts +1 -9
- package/utils/timing.js +12 -23
- package/utils/timing.js.map +1 -1
- package/utils/type-guards.d.ts +1 -1
- package/utils/type-guards.js +209 -422
- package/utils/type-guards.js.map +1 -1
- package/utils/type-of.js +4 -9
- package/utils/type-of.js.map +1 -1
- package/utils/units.js +51 -55
- package/utils/units.js.map +1 -1
- package/utils/url-builder.d.ts +1 -1
- package/utils/url-builder.js +12 -29
- package/utils/url-builder.js.map +1 -1
- package/utils/z-base32.d.ts +1 -1
- package/utils/z-base32.js +6 -11
- package/utils/z-base32.js.map +1 -1
- package/database/mongo/model/document.js +0 -75
- package/database/mongo/model/document.js.map +0 -1
- package/database/mongo/model/index.d.ts +0 -1
- package/database/mongo/model/index.js +0 -18
- package/database/mongo/model/index.js.map +0 -1
- package/database/mongo/mongo-entity-repository.js.map +0 -1
- package/database/mongo/simple-entity-repository.d.ts +0 -7
- package/database/mongo/simple-entity-repository.js +0 -11
- package/database/mongo/simple-entity-repository.js.map +0 -1
- package/lock/mongo/mongo-lock-repository.js.map +0 -1
- package/rxjs/compat/first-value-from.d.ts +0 -2
- package/rxjs/compat/first-value-from.js +0 -9
- package/rxjs/compat/first-value-from.js.map +0 -1
- package/rxjs/compat/index.d.ts +0 -1
- package/rxjs/compat/index.js +0 -18
- package/rxjs/compat/index.js.map +0 -1
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class ReadableStreamSchemaValidator extends schema_validator_1.SchemaValidator {
|
|
9
|
-
[schema_validator_1.test](value, options, path) {
|
|
10
|
-
return readableStreamInstanceSchema[schema_validator_1.test](value, options, path);
|
|
1
|
+
import { SchemaValidator, test } from '../schema.validator.js';
|
|
2
|
+
import { schemaHelper } from '../types.js';
|
|
3
|
+
import { instance } from './instance.js';
|
|
4
|
+
const readableStreamInstanceSchema = (typeof ReadableStream != 'function' ? undefined : instance(ReadableStream));
|
|
5
|
+
export class ReadableStreamSchemaValidator extends SchemaValidator {
|
|
6
|
+
[test](value, options, path) {
|
|
7
|
+
return readableStreamInstanceSchema[test](value, options, path);
|
|
11
8
|
}
|
|
12
9
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
export function readableStream(options) {
|
|
11
|
+
const schema = schemaHelper({
|
|
12
|
+
type: 'readableStream',
|
|
13
|
+
...options
|
|
14
|
+
});
|
|
16
15
|
return new ReadableStreamSchemaValidator(schema);
|
|
17
16
|
}
|
|
18
|
-
exports.readableStream = readableStream;
|
|
19
17
|
//# sourceMappingURL=readable-stream.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readable-stream.js","sourceRoot":"","sources":["../../../source/schema/schemas/readable-stream.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"readable-stream.js","sourceRoot":"","sources":["../../../source/schema/schemas/readable-stream.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAIzC,MAAM,4BAA4B,GAAG,CAAC,OAAO,cAAc,IAAI,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAE,CAAC;AAEnH,MAAM,OAAO,6BAA8B,SAAQ,eAA+C;IAChG,CAAC,IAAI,CAAC,CAAC,KAAc,EAAE,OAAiC,EAAE,IAAc;QACtE,OAAO,4BAA4B,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IAClE,CAAC;CACF;AAED,MAAM,UAAU,cAAc,CAAC,OAAuD;IACpF,MAAM,MAAM,GAAG,YAAY,CAAiC;QAC1D,IAAI,EAAE,gBAAgB;QACtB,GAAG,OAAO;KACX,CAAC,CAAC;IAEH,OAAO,IAAI,6BAA6B,CAAC,MAAM,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { JsonPath } from "../../json-path";
|
|
2
|
-
import { SchemaError } from '../schema.error';
|
|
3
|
-
import type { DefinedValidationOptions, ValidationTestResult } from '../schema.validator';
|
|
4
|
-
import { SchemaValidator, test, testAsync } from '../schema.validator';
|
|
5
|
-
import type { SchemaDefinition, SchemaInput, SchemaOptions, SchemaOutput } from '../types';
|
|
1
|
+
import type { JsonPath } from "../../json-path/index.js";
|
|
2
|
+
import { SchemaError } from '../schema.error.js';
|
|
3
|
+
import type { DefinedValidationOptions, ValidationTestResult } from '../schema.validator.js';
|
|
4
|
+
import { SchemaValidator, test, testAsync } from '../schema.validator.js';
|
|
5
|
+
import type { SchemaDefinition, SchemaInput, SchemaOptions, SchemaOutput } from '../types.js';
|
|
6
6
|
export declare type RefineResult = {
|
|
7
7
|
valid: true;
|
|
8
8
|
error?: undefined;
|
package/schema/schemas/refine.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const schema_validator_1 = require("../schema.validator");
|
|
7
|
-
const types_1 = require("../types");
|
|
8
|
-
class RefineSchemaValidator extends schema_validator_1.SchemaValidator {
|
|
1
|
+
import { isPromise } from "../../utils/type-guards.js";
|
|
2
|
+
import { SchemaError } from '../schema.error.js';
|
|
3
|
+
import { SchemaValidator, test, testAsync } from '../schema.validator.js';
|
|
4
|
+
import { schemaHelper } from '../types.js';
|
|
5
|
+
export class RefineSchemaValidator extends SchemaValidator {
|
|
9
6
|
constructor(schema, inputValidator) {
|
|
10
7
|
super(schema);
|
|
11
8
|
this.inputValidator = inputValidator;
|
|
12
9
|
}
|
|
13
|
-
[
|
|
14
|
-
const inputTestResult = this.inputValidator[
|
|
10
|
+
[test](value, options, path) {
|
|
11
|
+
const inputTestResult = this.inputValidator[test](value, options, path);
|
|
15
12
|
if (!inputTestResult.valid) {
|
|
16
13
|
return inputTestResult;
|
|
17
14
|
}
|
|
18
15
|
const refineResult = this.schema.refiner(inputTestResult.value, path);
|
|
19
|
-
if (
|
|
16
|
+
if (isPromise(refineResult)) {
|
|
20
17
|
throw new Error(`cannot handle async refine in sync validation. Use async instead (path: ${path.path})`);
|
|
21
18
|
}
|
|
22
19
|
if (!refineResult.valid) {
|
|
23
|
-
const error = (refineResult.error instanceof
|
|
20
|
+
const error = (refineResult.error instanceof SchemaError) ? refineResult.error : new SchemaError(refineResult.error, { path });
|
|
24
21
|
return { valid: false, error };
|
|
25
22
|
}
|
|
26
23
|
return { valid: true, value: inputTestResult.value };
|
|
27
24
|
}
|
|
28
|
-
async [
|
|
29
|
-
const inputTestResult = await this.inputValidator[
|
|
25
|
+
async [testAsync](value, options, path) {
|
|
26
|
+
const inputTestResult = await this.inputValidator[testAsync](value, options, path);
|
|
30
27
|
if (!inputTestResult.valid) {
|
|
31
28
|
return inputTestResult;
|
|
32
29
|
}
|
|
33
30
|
const refineResult = await this.schema.refiner(inputTestResult.value, path);
|
|
34
31
|
if (!refineResult.valid) {
|
|
35
|
-
const error = (refineResult.error instanceof
|
|
32
|
+
const error = (refineResult.error instanceof SchemaError) ? refineResult.error : new SchemaError(refineResult.error, { path });
|
|
36
33
|
return { valid: false, error };
|
|
37
34
|
}
|
|
38
35
|
return { valid: true, value: inputTestResult.value };
|
|
39
36
|
}
|
|
40
37
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
export function refine(inputSchemaValidator, refiner, options) {
|
|
39
|
+
const schema = schemaHelper({
|
|
40
|
+
type: 'refine',
|
|
41
|
+
inputSchema: inputSchemaValidator.schema,
|
|
42
|
+
refiner,
|
|
43
|
+
...options
|
|
44
|
+
});
|
|
44
45
|
return new RefineSchemaValidator(schema, inputSchemaValidator);
|
|
45
46
|
}
|
|
46
|
-
exports.refine = refine;
|
|
47
47
|
//# sourceMappingURL=refine.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refine.js","sourceRoot":"","sources":["../../../source/schema/schemas/refine.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"refine.js","sourceRoot":"","sources":["../../../source/schema/schemas/refine.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,mCAA+B;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAa3C,MAAM,OAAO,qBAAkD,SAAQ,eAA0C;IAG/G,YAAY,MAAiC,EAAE,cAAkC;QAC/E,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;IAED,CAAC,IAAI,CAAC,CAAC,KAAc,EAAE,OAAiC,EAAE,IAAc;QACtE,MAAM,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,KAAuB,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;QAE1F,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE;YAC1B,OAAO,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E,CAAC,CAAC;YAC/H,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;SAChC;QAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,CAAC,KAAK,EAAE,CAAC;IACvD,CAAC;CACF;AAED,MAAM,UAAU,MAAM,CAA6B,oBAAwC,EAAE,OAAiC,EAAE,OAA6E;IAC3M,MAAM,MAAM,GAAG,YAAY,CAA4B;QACrD,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,oBAAoB,CAAC,MAAM;QACxC,OAAO;QACP,GAAG,OAAO;KACX,CAAC,CAAC;IAEH,OAAO,IAAI,qBAAqB,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;AACjE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { JsonPath } from "../../json-path";
|
|
2
|
-
import type { DefinedValidationOptions, ValidationTestResult } from '../schema.validator';
|
|
3
|
-
import { SchemaValidator, test } from '../schema.validator';
|
|
4
|
-
import type { Coercible, SchemaDefinition, SchemaOptions } from '../types';
|
|
1
|
+
import type { JsonPath } from "../../json-path/index.js";
|
|
2
|
+
import type { DefinedValidationOptions, ValidationTestResult } from '../schema.validator.js';
|
|
3
|
+
import { SchemaValidator, test } from '../schema.validator.js';
|
|
4
|
+
import type { Coercible, SchemaDefinition, SchemaOptions } from '../types.js';
|
|
5
5
|
export declare type RegExpSchemaDefinition = SchemaDefinition<'regexp', unknown, RegExp> & Coercible;
|
|
6
6
|
export declare class RegExpSchemaValidator extends SchemaValidator<RegExpSchemaDefinition> {
|
|
7
7
|
[test](value: unknown, options: DefinedValidationOptions, path: JsonPath): ValidationTestResult<RegExp>;
|
package/schema/schemas/regexp.js
CHANGED
|
@@ -1,32 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
[schema_validator_1.test](value, options, path) {
|
|
11
|
-
var _a;
|
|
12
|
-
if (!(0, type_guards_1.isRegExp)(value)) {
|
|
13
|
-
if (((_a = this.schema.coerce) !== null && _a !== void 0 ? _a : options.coerce) && (0, type_guards_1.isString)(value)) {
|
|
1
|
+
import { isRegExp, isString } from "../../utils/type-guards.js";
|
|
2
|
+
import { typeOf } from "../../utils/type-of.js";
|
|
3
|
+
import { schemaError, SchemaError } from '../schema.error.js';
|
|
4
|
+
import { SchemaValidator, test } from '../schema.validator.js';
|
|
5
|
+
import { schemaHelper } from '../types.js';
|
|
6
|
+
export class RegExpSchemaValidator extends SchemaValidator {
|
|
7
|
+
[test](value, options, path) {
|
|
8
|
+
if (!isRegExp(value)) {
|
|
9
|
+
if ((this.schema.coerce ?? options.coerce) && isString(value)) {
|
|
14
10
|
try {
|
|
15
11
|
return { valid: true, value: RegExp(value, 'u') };
|
|
16
12
|
}
|
|
17
13
|
catch (error) {
|
|
18
|
-
return { valid: false, error:
|
|
14
|
+
return { valid: false, error: schemaError(`could not coerce provided string to regular expression: ${error.message}`, path) };
|
|
19
15
|
}
|
|
20
16
|
}
|
|
21
|
-
return { valid: false, error:
|
|
17
|
+
return { valid: false, error: SchemaError.expectedButGot('RegExp', typeOf(value), path) };
|
|
22
18
|
}
|
|
23
19
|
return { valid: true, value };
|
|
24
20
|
}
|
|
25
21
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
export function regexp(options) {
|
|
23
|
+
const schema = schemaHelper({
|
|
24
|
+
type: 'regexp',
|
|
25
|
+
...options
|
|
26
|
+
});
|
|
29
27
|
return new RegExpSchemaValidator(schema);
|
|
30
28
|
}
|
|
31
|
-
exports.regexp = regexp;
|
|
32
29
|
//# sourceMappingURL=regexp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regexp.js","sourceRoot":"","sources":["../../../source/schema/schemas/regexp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"regexp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CAAC,CAAC;IAEH,OAAO,IAAI,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { JsonPath } from "../../json-path";
|
|
2
|
-
import type { DefinedValidationOptions, ValidationTestResult } from '../schema.validator';
|
|
3
|
-
import { SchemaValidator, test } from '../schema.validator';
|
|
4
|
-
import type { Coercible, SchemaDefinition, SchemaOptions } from '../types';
|
|
1
|
+
import type { JsonPath } from "../../json-path/index.js";
|
|
2
|
+
import type { DefinedValidationOptions, ValidationTestResult } from '../schema.validator.js';
|
|
3
|
+
import { SchemaValidator, test } from '../schema.validator.js';
|
|
4
|
+
import type { Coercible, SchemaDefinition, SchemaOptions } from '../types.js';
|
|
5
5
|
export declare type StringSchemaDefinition = SchemaDefinition<'string', unknown, string> & Coercible & {
|
|
6
6
|
/** trim */
|
|
7
7
|
trim?: boolean;
|
package/schema/schemas/string.js
CHANGED
|
@@ -1,26 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const schema_error_1 = require("../schema.error");
|
|
6
|
-
const schema_validator_1 = require("../schema.validator");
|
|
7
|
-
const types_1 = require("../types");
|
|
1
|
+
import { isDefined, isRegExp } from "../../utils/type-guards.js";
|
|
2
|
+
import { schemaError } from '../schema.error.js';
|
|
3
|
+
import { SchemaValidator, test } from '../schema.validator.js';
|
|
4
|
+
import { schemaHelper } from '../types.js';
|
|
8
5
|
const coercerMap = {
|
|
9
6
|
number: (number) => ({ valid: true, value: number.toString() }),
|
|
10
7
|
boolean: (boolean) => ({ valid: true, value: boolean.toString() }),
|
|
11
8
|
bigint: (bigint) => ({ valid: true, value: bigint.toString() })
|
|
12
9
|
};
|
|
13
|
-
class StringSchemaValidator extends
|
|
10
|
+
export class StringSchemaValidator extends SchemaValidator {
|
|
14
11
|
constructor(schema) {
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
this.regexp = (0, type_guards_1.isDefined)(pattern) ? RegExp(pattern, patternFlags) : undefined;
|
|
12
|
+
const pattern = isRegExp(schema.pattern) ? schema.pattern.source : schema.pattern;
|
|
13
|
+
const patternFlags = isRegExp(schema.pattern) ? (schema.patternFlags ?? schema.pattern.flags) : schema.patternFlags;
|
|
14
|
+
super({ ...schema, pattern, patternFlags });
|
|
15
|
+
this.regexp = isDefined(pattern) ? RegExp(pattern, patternFlags) : undefined;
|
|
20
16
|
}
|
|
21
|
-
[
|
|
22
|
-
|
|
23
|
-
const result = super.ensureType('string', value, path, { coerce: (_a = this.schema.coerce) !== null && _a !== void 0 ? _a : options.coerce }, coercerMap);
|
|
17
|
+
[test](value, options, path) {
|
|
18
|
+
const result = super.ensureType('string', value, path, { coerce: this.schema.coerce ?? options.coerce }, coercerMap);
|
|
24
19
|
if (!result.valid) {
|
|
25
20
|
return result;
|
|
26
21
|
}
|
|
@@ -34,22 +29,23 @@ class StringSchemaValidator extends schema_validator_1.SchemaValidator {
|
|
|
34
29
|
if (this.schema.uppercase == true) {
|
|
35
30
|
resultValue = resultValue.toUpperCase();
|
|
36
31
|
}
|
|
37
|
-
if (
|
|
38
|
-
return { valid: false, error:
|
|
32
|
+
if (isDefined(this.schema.min) && (resultValue.length < this.schema.min)) {
|
|
33
|
+
return { valid: false, error: schemaError(`minimum length is ${this.schema.min} but value has ${resultValue.length}`, path) };
|
|
39
34
|
}
|
|
40
|
-
if (
|
|
41
|
-
return { valid: false, error:
|
|
35
|
+
if (isDefined(this.schema.max) && (resultValue.length > this.schema.max)) {
|
|
36
|
+
return { valid: false, error: schemaError(`maximum length is ${this.schema.max} but value has ${resultValue.length}`, path) };
|
|
42
37
|
}
|
|
43
|
-
if (
|
|
44
|
-
return { valid: false, error:
|
|
38
|
+
if (isDefined(this.regexp) && !this.regexp.test(resultValue)) {
|
|
39
|
+
return { valid: false, error: schemaError('pattern did not match', path) };
|
|
45
40
|
}
|
|
46
41
|
return { valid: true, value: resultValue };
|
|
47
42
|
}
|
|
48
43
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
export function string(options) {
|
|
45
|
+
const schema = schemaHelper({
|
|
46
|
+
type: 'string',
|
|
47
|
+
...options
|
|
48
|
+
});
|
|
52
49
|
return new StringSchemaValidator(schema);
|
|
53
50
|
}
|
|
54
|
-
exports.string = string;
|
|
55
51
|
//# sourceMappingURL=string.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.js","sourceRoot":"","sources":["../../../source/schema/schemas/string.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"string.js","sourceRoot":"","sources":["../../../source/schema/schemas/string.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,mCAA+B;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,UAAU,GAAuB;IACrC,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;IAC/D,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;IAClE,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;CAChE,CAAC;AAyBF,MAAM,OAAO,qBAAsB,SAAQ,eAAuC;IAGhF,YAAY,MAA8B;QACxC,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CA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
|
|
3
|
-
import { SchemaValidator, test, testAsync } from '../schema.validator';
|
|
4
|
-
import type { SchemaDefinition, SchemaInput, SchemaOptions, SchemaOutput } from '../types';
|
|
1
|
+
import type { JsonPath } from "../../json-path/index.js";
|
|
2
|
+
import type { DefinedValidationOptions, ValidationTestResult } from '../schema.validator.js';
|
|
3
|
+
import { SchemaValidator, test, testAsync } from '../schema.validator.js';
|
|
4
|
+
import type { SchemaDefinition, SchemaInput, SchemaOptions, SchemaOutput } from '../types.js';
|
|
5
5
|
export declare type Transformer<T extends SchemaDefinition, Output> = (value: SchemaOutput<T>) => Output | Promise<Output>;
|
|
6
6
|
export declare type TransformSchemaDefinition<T extends SchemaDefinition = SchemaDefinition, Output = unknown> = SchemaDefinition<'transform', SchemaInput<T>, Output> & {
|
|
7
7
|
inputSchema: T;
|
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const schema_validator_1 = require("../schema.validator");
|
|
6
|
-
const types_1 = require("../types");
|
|
7
|
-
class TransformSchemaValidator extends schema_validator_1.SchemaValidator {
|
|
1
|
+
import { isPromise } from "../../utils/type-guards.js";
|
|
2
|
+
import { SchemaValidator, test, testAsync } from '../schema.validator.js';
|
|
3
|
+
import { schemaHelper } from '../types.js';
|
|
4
|
+
export class TransformSchemaValidator extends SchemaValidator {
|
|
8
5
|
constructor(schema, inputValidator) {
|
|
9
6
|
super(schema);
|
|
10
7
|
this.inputValidator = inputValidator;
|
|
11
8
|
}
|
|
12
|
-
[
|
|
13
|
-
const inputTestResult = this.inputValidator[
|
|
9
|
+
[test](value, options, path) {
|
|
10
|
+
const inputTestResult = this.inputValidator[test](value, options, path);
|
|
14
11
|
if (!inputTestResult.valid) {
|
|
15
12
|
return inputTestResult;
|
|
16
13
|
}
|
|
17
14
|
const transformed = this.schema.transformer(inputTestResult.value);
|
|
18
|
-
if (
|
|
15
|
+
if (isPromise(transformed)) {
|
|
19
16
|
throw new Error(`cannot handle async transform in sync validation. Use async instead (path: ${path.path})`);
|
|
20
17
|
}
|
|
21
18
|
return { valid: true, value: transformed };
|
|
22
19
|
}
|
|
23
|
-
async [
|
|
24
|
-
const inputTestResult = await this.inputValidator[
|
|
20
|
+
async [testAsync](value, options, path) {
|
|
21
|
+
const inputTestResult = await this.inputValidator[testAsync](value, options, path);
|
|
25
22
|
if (!inputTestResult.valid) {
|
|
26
23
|
return inputTestResult;
|
|
27
24
|
}
|
|
@@ -29,10 +26,13 @@ class TransformSchemaValidator extends schema_validator_1.SchemaValidator {
|
|
|
29
26
|
return { valid: true, value: transformed };
|
|
30
27
|
}
|
|
31
28
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
export function transform(inputSchemaValidator, transformer, options) {
|
|
30
|
+
const schema = schemaHelper({
|
|
31
|
+
type: 'transform',
|
|
32
|
+
inputSchema: inputSchemaValidator.schema,
|
|
33
|
+
transformer,
|
|
34
|
+
...options
|
|
35
|
+
});
|
|
35
36
|
return new TransformSchemaValidator(schema, inputSchemaValidator);
|
|
36
37
|
}
|
|
37
|
-
exports.transform = transform;
|
|
38
38
|
//# sourceMappingURL=transform.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../source/schema/schemas/transform.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../source/schema/schemas/transform.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,mCAA+B;AAEnD,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAS3C,MAAM,OAAO,wBAA6D,SAAQ,eAAqD;IAGrI,YAAY,MAA4C,EAAE,cAAkC;QAC1F,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,cAAc,GAAG,cAAc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O,IAAI,wBAAwB,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { JsonPath } from "../../json-path";
|
|
2
|
-
import type { DefinedValidationOptions, ValidationTestResult } from '../schema.validator';
|
|
3
|
-
import { SchemaValidator, test } from '../schema.validator';
|
|
4
|
-
import type { Coercible, SchemaDefinition, SchemaOptions, SchemaOutput } from '../types';
|
|
1
|
+
import type { JsonPath } from "../../json-path/index.js";
|
|
2
|
+
import type { DefinedValidationOptions, ValidationTestResult } from '../schema.validator.js';
|
|
3
|
+
import { SchemaValidator, test } from '../schema.validator.js';
|
|
4
|
+
import type { Coercible, SchemaDefinition, SchemaOptions, SchemaOutput } from '../types.js';
|
|
5
5
|
export declare type Uint8ArraySchemaDefinition = SchemaDefinition<'uint8-array', unknown, Uint8Array> & Coercible & {
|
|
6
6
|
min?: number;
|
|
7
7
|
max?: number;
|
|
@@ -1,39 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
class Uint8ArraySchemaValidator extends schema_validator_1.SchemaValidator {
|
|
11
|
-
[schema_validator_1.test](value, options, path) {
|
|
12
|
-
var _a;
|
|
13
|
-
const instanceTestResult = uint8ArrayInstanceSchema[schema_validator_1.test](value, options, path);
|
|
1
|
+
import { isArray, isDefined, isNumber } from "../../utils/type-guards.js";
|
|
2
|
+
import { schemaError } from '../schema.error.js';
|
|
3
|
+
import { SchemaValidator, test } from '../schema.validator.js';
|
|
4
|
+
import { schemaHelper } from '../types.js';
|
|
5
|
+
import { instance } from './instance.js';
|
|
6
|
+
const uint8ArrayInstanceSchema = instance(Uint8Array);
|
|
7
|
+
export class Uint8ArraySchemaValidator extends SchemaValidator {
|
|
8
|
+
[test](value, options, path) {
|
|
9
|
+
const instanceTestResult = uint8ArrayInstanceSchema[test](value, options, path);
|
|
14
10
|
let array;
|
|
15
11
|
if (instanceTestResult.valid) {
|
|
16
12
|
array = instanceTestResult.value;
|
|
17
13
|
}
|
|
18
|
-
else if ((
|
|
14
|
+
else if ((this.schema.coerce ?? options.coerce) && isArray(value) && value.every((v) => isNumber(v) && Number.isInteger(v) && (v >= 0) && (v <= 255))) {
|
|
19
15
|
array = Uint8Array.from(value);
|
|
20
16
|
}
|
|
21
17
|
else {
|
|
22
18
|
return instanceTestResult;
|
|
23
19
|
}
|
|
24
|
-
if (
|
|
25
|
-
return { valid: false, error:
|
|
20
|
+
if (isDefined(this.schema.min) && (array.byteLength < this.schema.min)) {
|
|
21
|
+
return { valid: false, error: schemaError(`minimum buffer length is ${this.schema.min}`, path) };
|
|
26
22
|
}
|
|
27
|
-
if (
|
|
28
|
-
return { valid: false, error:
|
|
23
|
+
if (isDefined(this.schema.max) && (array.byteLength > this.schema.max)) {
|
|
24
|
+
return { valid: false, error: schemaError(`maximum buffer length is ${this.schema.max}`, path) };
|
|
29
25
|
}
|
|
30
26
|
return { valid: true, value: array };
|
|
31
27
|
}
|
|
32
28
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
export function uint8Array(options) {
|
|
30
|
+
const schema = schemaHelper({
|
|
31
|
+
type: 'uint8-array',
|
|
32
|
+
...options
|
|
33
|
+
});
|
|
36
34
|
return new Uint8ArraySchemaValidator(schema);
|
|
37
35
|
}
|
|
38
|
-
exports.uint8Array = uint8Array;
|
|
39
36
|
//# sourceMappingURL=uint8-array.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uint8-array.js","sourceRoot":"","sources":["../../../source/schema/schemas/uint8-array.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"uint8-array.js","sourceRoot":"","sources":["../../../source/schema/schemas/uint8-array.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,mCAA+B;A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AI,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC;SAClG;QAED,IAAI,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;YACtE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,CAAC,4BAA4B,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC;SAClG;QAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IACvC,CAAC;CACF;AAED,MAAM,UAAU,UAAU,CAAC,OAAmD;IAC5E,MAAM,MAAM,GAAG,YAAY,CAA6B;QACtD,IAAI,EAAE,aAAa;QACnB,GAAG,OAAO;KACX,CAAC,CAAC;IAEH,OAAO,IAAI,yBAAyB,CAAC,MAAM,CAAC,CAAC;AAC/C,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { JsonPath } from "../../json-path";
|
|
2
|
-
import type { DefinedValidationOptions, ValidationTestResult } from '../schema.validator';
|
|
3
|
-
import { SchemaValidator, test, testAsync } from '../schema.validator';
|
|
4
|
-
import type { SchemaDefinition, SchemaInput, SchemaOptions, SchemaOutput } from '../types';
|
|
1
|
+
import type { JsonPath } from "../../json-path/index.js";
|
|
2
|
+
import type { DefinedValidationOptions, ValidationTestResult } from '../schema.validator.js';
|
|
3
|
+
import { SchemaValidator, test, testAsync } from '../schema.validator.js';
|
|
4
|
+
import type { SchemaDefinition, SchemaInput, SchemaOptions, SchemaOutput } from '../types.js';
|
|
5
5
|
export declare type UnionSchemaInput<A extends SchemaDefinition, B extends SchemaDefinition[]> = SchemaInput<A> | SchemaInput<B[number]>;
|
|
6
6
|
export declare type UnionSchemaOutput<A extends SchemaDefinition, B extends SchemaDefinition[]> = SchemaOutput<A> | SchemaOutput<B[number]>;
|
|
7
7
|
export declare type UnionSchemaDefinition<A extends SchemaDefinition, B extends SchemaDefinition[]> = SchemaDefinition<'union', UnionSchemaInput<A, B>, UnionSchemaOutput<A, B>> & {
|
package/schema/schemas/union.js
CHANGED
|
@@ -1,38 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const schema_validator_1 = require("../schema.validator");
|
|
6
|
-
const types_1 = require("../types");
|
|
7
|
-
class UnionSchemaValidator extends schema_validator_1.SchemaValidator {
|
|
1
|
+
import { SchemaError } from '../schema.error.js';
|
|
2
|
+
import { SchemaValidator, test, testAsync } from '../schema.validator.js';
|
|
3
|
+
import { schemaHelper } from '../types.js';
|
|
4
|
+
export class UnionSchemaValidator extends SchemaValidator {
|
|
8
5
|
constructor(innerSchemas, schema) {
|
|
9
6
|
super(schema);
|
|
10
7
|
this.innerSchemas = innerSchemas;
|
|
11
8
|
this.innerSchemaTypesString = this.innerSchemas.map((innerSchema) => innerSchema.schema.type).join(', ');
|
|
12
9
|
}
|
|
13
|
-
[
|
|
10
|
+
[test](value, options, path) {
|
|
14
11
|
for (const schema of this.innerSchemas) {
|
|
15
12
|
const result = schema.test(value, options);
|
|
16
13
|
if (result.valid) {
|
|
17
14
|
return result;
|
|
18
15
|
}
|
|
19
16
|
}
|
|
20
|
-
return { valid: false, error: new
|
|
17
|
+
return { valid: false, error: new SchemaError(`Value did not match any of the allowed schemas (${this.innerSchemaTypesString}).`, { path }) };
|
|
21
18
|
}
|
|
22
|
-
async [
|
|
19
|
+
async [testAsync](value, options, path) {
|
|
23
20
|
for (const schema of this.innerSchemas) {
|
|
24
21
|
const result = await schema.testAsync(value, options);
|
|
25
22
|
if (result.valid) {
|
|
26
23
|
return result;
|
|
27
24
|
}
|
|
28
25
|
}
|
|
29
|
-
return { valid: false, error: new
|
|
26
|
+
return { valid: false, error: new SchemaError(`Value did not match any of the allowed schemas (${this.innerSchemaTypesString}).`, { path }) };
|
|
30
27
|
}
|
|
31
28
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
export function union(schemas, options) {
|
|
30
|
+
const schema = schemaHelper({
|
|
31
|
+
type: 'union',
|
|
32
|
+
schemas: schemas.map((innerSchema) => innerSchema.schema),
|
|
33
|
+
...options
|
|
34
|
+
});
|
|
35
35
|
return new UnionSchemaValidator(schemas, schema);
|
|
36
36
|
}
|
|
37
|
-
exports.union = union;
|
|
38
37
|
//# sourceMappingURL=union.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"union.js","sourceRoot":"","sources":["../../../source/schema/schemas/union.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"union.js","sourceRoot":"","sources":["../../../source/schema/schemas/union.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAS3C,MAAM,OAAO,oBAA+E,SAAQ,eAA4C;IAI9I,YAAY,YAAmE,EAAE,MAAmC;QAClH,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3G,CAAC;IAED,CAAC,IAAI,CAAC,CAAC,KAAc,EAAE,OAAiC,EAAE,IAAc;QACtE,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,YAAY,EAAE;YACtC,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,KAA0B,EAAE,OAAO,CAAC,CAAC;YAEhE,IAAI,MAAM,CAAC,KAAK,EAAE;gBAChB,OAAO,MAAM,CAAC;aACf;SACF;QAED,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,WAAW,CAAC,mDAAmD,IAAI,CAAC,sBAAsB,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAChJ,CAAC;IAES,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,KAAc,EAAE,OAAiC,EAAE,IAAc;QAC3F,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,YAAY,EAAE;YACtC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,KAA0B,EAAE,OAAO,CAAC,CAAC;YAE3E,IAAI,MAAM,CAAC,KAAK,EAAE;gBAChB,OAAO,MAAM,CAAC;aACf;SACF;QAED,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,WAAW,CAAC,mDAAmD,IAAI,CAAC,sBAAsB,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAChJ,CAAC;CACF;AAED,MAAM,UAAU,KAAK,CAAyD,OAAkB,EAAE,OAA6F;IAC7L,MAAM,MAAM,GAAG,YAAY,CAA4D;QACrF,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,CAAuC;QAC/F,GAAG,OAAO;KACX,CAAC,CAAC;IAEH,OAAO,IAAI,oBAAoB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ValidationTestResult } from '../schema.validator';
|
|
2
|
-
import { SchemaValidator, test } from '../schema.validator';
|
|
3
|
-
import type { SchemaDefinition, SchemaOptions } from '../types';
|
|
1
|
+
import type { ValidationTestResult } from '../schema.validator.js';
|
|
2
|
+
import { SchemaValidator, test } from '../schema.validator.js';
|
|
3
|
+
import type { SchemaDefinition, SchemaOptions } from '../types.js';
|
|
4
4
|
export declare type UnknownSchemaDefinition = SchemaDefinition<'unknown'>;
|
|
5
5
|
export declare class UnknownSchemaValidator extends SchemaValidator<UnknownSchemaDefinition> {
|
|
6
6
|
[test](value: unknown): ValidationTestResult<unknown>;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const types_1 = require("../types");
|
|
6
|
-
class UnknownSchemaValidator extends schema_validator_1.SchemaValidator {
|
|
7
|
-
[schema_validator_1.test](value) {
|
|
1
|
+
import { SchemaValidator, test } from '../schema.validator.js';
|
|
2
|
+
import { schemaHelper } from '../types.js';
|
|
3
|
+
export class UnknownSchemaValidator extends SchemaValidator {
|
|
4
|
+
[test](value) {
|
|
8
5
|
return { valid: true, value };
|
|
9
6
|
}
|
|
10
7
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
export function unknown(options) {
|
|
9
|
+
const schema = schemaHelper({
|
|
10
|
+
type: 'unknown',
|
|
11
|
+
...options
|
|
12
|
+
});
|
|
14
13
|
return new UnknownSchemaValidator(schema);
|
|
15
14
|
}
|
|
16
|
-
exports.unknown = unknown;
|
|
17
15
|
//# sourceMappingURL=unknown.js.map
|