@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
package/utils/helpers.js
CHANGED
|
@@ -1,22 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
8
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
9
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
10
|
-
t[p[i]] = s[p[i]];
|
|
11
|
-
}
|
|
12
|
-
return t;
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.iif = exports.normalizeText = exports.recycle = exports.decycle = exports.deferThrow = exports._throw = exports.parseFirstAndFamilyName = exports.select = exports.formatError = exports.toError = exports.flatten = exports.valueOfType = exports.formatDuration = exports.clone = exports.structuredCloneAsync = exports.structuredClone = void 0;
|
|
16
|
-
const http_error_1 = require("../http/http.error");
|
|
17
|
-
const error_1 = require("../error");
|
|
18
|
-
const object_1 = require("./object/object");
|
|
19
|
-
const type_guards_1 = require("./type-guards");
|
|
2
|
+
import { HttpError } from "../http/http.error.js";
|
|
3
|
+
import { DetailsError } from '../error/details.error.js';
|
|
4
|
+
import { hasOwnProperty } from './object/object.js';
|
|
5
|
+
import { isArray, isArrayBuffer, isDataView, isDate, isDefined, isFunction, isMap, isNotNull, isNullOrUndefined, isObject, isPrimitive, isRegExp, isSet, isString, isTypedArray, isUndefined, isWritableArray } from './type-guards.js';
|
|
20
6
|
const supportsNotification = typeof Notification != 'undefined';
|
|
21
7
|
/**
|
|
22
8
|
* create an structured clone of an value using Notification if available, otherwise history state (may alters history)
|
|
@@ -25,7 +11,7 @@ const supportsNotification = typeof Notification != 'undefined';
|
|
|
25
11
|
* @param value value to clone
|
|
26
12
|
* @returns clone of value
|
|
27
13
|
*/
|
|
28
|
-
function structuredClone(value) {
|
|
14
|
+
export function structuredClone(value) {
|
|
29
15
|
if (supportsNotification) {
|
|
30
16
|
return new Notification('', { data: value, silent: true }).data;
|
|
31
17
|
}
|
|
@@ -35,7 +21,6 @@ function structuredClone(value) {
|
|
|
35
21
|
history.replaceState(oldState, document.title);
|
|
36
22
|
return copy;
|
|
37
23
|
}
|
|
38
|
-
exports.structuredClone = structuredClone;
|
|
39
24
|
/**
|
|
40
25
|
* create an structured clone of an value using a MessageChannel
|
|
41
26
|
*
|
|
@@ -43,50 +28,48 @@ exports.structuredClone = structuredClone;
|
|
|
43
28
|
* @param value value to clone
|
|
44
29
|
* @returns clone of value
|
|
45
30
|
*/
|
|
46
|
-
async function structuredCloneAsync(value, options) {
|
|
31
|
+
export async function structuredCloneAsync(value, options) {
|
|
47
32
|
const { port1, port2 } = new MessageChannel();
|
|
48
33
|
const promise = new Promise((resolve) => (port2.onmessage = (event) => resolve(event.data)));
|
|
49
34
|
port1.postMessage(value, options);
|
|
50
35
|
return promise;
|
|
51
36
|
}
|
|
52
|
-
exports.structuredCloneAsync = structuredCloneAsync;
|
|
53
37
|
// eslint-disable-next-line max-statements
|
|
54
|
-
function clone(object, deep) {
|
|
55
|
-
if (
|
|
38
|
+
export function clone(object, deep) {
|
|
39
|
+
if (isPrimitive(object) || isNullOrUndefined(object)) {
|
|
56
40
|
return object;
|
|
57
41
|
}
|
|
58
|
-
if (
|
|
42
|
+
if (isDate(object)) {
|
|
59
43
|
return new Date(object);
|
|
60
44
|
}
|
|
61
|
-
if (
|
|
45
|
+
if (isRegExp(object)) {
|
|
62
46
|
return new RegExp(object.source, object.flags);
|
|
63
47
|
}
|
|
64
|
-
if (
|
|
48
|
+
if (isSet(object)) {
|
|
65
49
|
return new Set(object);
|
|
66
50
|
}
|
|
67
|
-
if (
|
|
51
|
+
if (isMap(object)) {
|
|
68
52
|
return new Map(object);
|
|
69
53
|
}
|
|
70
|
-
if (
|
|
54
|
+
if (isArrayBuffer(object)) {
|
|
71
55
|
return object.slice(0);
|
|
72
56
|
}
|
|
73
|
-
if (
|
|
57
|
+
if (isTypedArray(object)) {
|
|
74
58
|
return object.slice();
|
|
75
59
|
}
|
|
76
|
-
if (
|
|
60
|
+
if (isDataView(object)) {
|
|
77
61
|
const clonedBuffer = object.buffer.slice(0);
|
|
78
62
|
return new DataView(clonedBuffer, object.byteOffset, object.byteLength);
|
|
79
63
|
}
|
|
80
64
|
if (!deep) {
|
|
81
|
-
return (
|
|
65
|
+
return (isArray(object) ? [...object] : { ...object });
|
|
82
66
|
}
|
|
83
|
-
if (
|
|
67
|
+
if (isArray(object)) {
|
|
84
68
|
return object.map((value) => clone(value, true));
|
|
85
69
|
}
|
|
86
70
|
return Object.fromEntries(Object.entries(object).map(([key, value]) => [key, clone(value, true)]));
|
|
87
71
|
}
|
|
88
|
-
|
|
89
|
-
function formatDuration(milliseconds, precision) {
|
|
72
|
+
export function formatDuration(milliseconds, precision) {
|
|
90
73
|
let value;
|
|
91
74
|
let suffix;
|
|
92
75
|
if (milliseconds >= (10 ** 3)) {
|
|
@@ -109,16 +92,13 @@ function formatDuration(milliseconds, precision) {
|
|
|
109
92
|
const result = `${trimmed} ${suffix}`;
|
|
110
93
|
return result;
|
|
111
94
|
}
|
|
112
|
-
|
|
113
|
-
function valueOfType(value) {
|
|
95
|
+
export function valueOfType(value) {
|
|
114
96
|
return value;
|
|
115
97
|
}
|
|
116
|
-
|
|
117
|
-
function flatten(array) {
|
|
98
|
+
export function flatten(array) {
|
|
118
99
|
return array.reduce((acc, item) => (Array.isArray(item) ? [...(acc), ...flatten(item)] : [...(acc), item]), []);
|
|
119
100
|
}
|
|
120
|
-
|
|
121
|
-
function toError(obj) {
|
|
101
|
+
export function toError(obj) {
|
|
122
102
|
if (obj instanceof Error) {
|
|
123
103
|
return obj;
|
|
124
104
|
}
|
|
@@ -126,16 +106,13 @@ function toError(obj) {
|
|
|
126
106
|
try {
|
|
127
107
|
message = JSON.stringify(decycle(obj));
|
|
128
108
|
}
|
|
129
|
-
catch
|
|
109
|
+
catch {
|
|
130
110
|
message = 'serialization of error reason failed. Take a look at the details property of this error instance.';
|
|
131
111
|
}
|
|
132
|
-
|
|
133
|
-
return error;
|
|
112
|
+
return new DetailsError(message, obj);
|
|
134
113
|
}
|
|
135
|
-
exports.toError = toError;
|
|
136
114
|
// eslint-disable-next-line max-statements, complexity
|
|
137
|
-
function formatError(error, options = {}) {
|
|
138
|
-
var _a, _b;
|
|
115
|
+
export function formatError(error, options = {}) {
|
|
139
116
|
const { includeRest = true, includeStack = true, handleBuiltInErrors = true } = options;
|
|
140
117
|
let name;
|
|
141
118
|
let message;
|
|
@@ -143,11 +120,11 @@ function formatError(error, options = {}) {
|
|
|
143
120
|
let rest;
|
|
144
121
|
let extraInfo;
|
|
145
122
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
146
|
-
const wrappedError =
|
|
123
|
+
const wrappedError = error?.rejection ?? error?.reason ?? error?.error;
|
|
147
124
|
if ((error instanceof Error) && !(error.message.startsWith('Uncaught') && (wrappedError instanceof Error))) {
|
|
148
|
-
({ name, message, stack
|
|
125
|
+
({ name, message, stack, ...rest } = error);
|
|
149
126
|
if (handleBuiltInErrors) {
|
|
150
|
-
if ((error instanceof
|
|
127
|
+
if ((error instanceof HttpError) && !includeRest) {
|
|
151
128
|
extraInfo = {
|
|
152
129
|
url: error.request.url,
|
|
153
130
|
method: error.request.method
|
|
@@ -158,25 +135,23 @@ function formatError(error, options = {}) {
|
|
|
158
135
|
else if (wrappedError instanceof Error) {
|
|
159
136
|
return formatError(wrappedError, options);
|
|
160
137
|
}
|
|
161
|
-
if (
|
|
138
|
+
if (isUndefined(name) && (isUndefined(message) || message.trim().length == 0)) {
|
|
162
139
|
try {
|
|
163
140
|
message = JSON.stringify(decycle(error), null, 2);
|
|
164
141
|
}
|
|
165
|
-
catch
|
|
142
|
+
catch {
|
|
166
143
|
throw error;
|
|
167
144
|
}
|
|
168
145
|
}
|
|
169
|
-
const restString = (includeRest && (Object.keys(rest
|
|
170
|
-
const extraInfoString =
|
|
171
|
-
const stackString = (includeStack &&
|
|
172
|
-
return `${name
|
|
146
|
+
const restString = (includeRest && (Object.keys(rest ?? {}).length > 0)) ? `\n${JSON.stringify(decycle(rest), null, 2)}` : '';
|
|
147
|
+
const extraInfoString = isDefined(extraInfo) ? `\n${JSON.stringify(extraInfo, null, 2)}` : '';
|
|
148
|
+
const stackString = (includeStack && isDefined(stack)) ? `\n${stack}` : '';
|
|
149
|
+
return `${name ?? 'Error'}: ${message}${restString}${extraInfoString}${stackString}`;
|
|
173
150
|
}
|
|
174
|
-
|
|
175
|
-
function select(key) {
|
|
151
|
+
export function select(key) {
|
|
176
152
|
return (item) => item[key];
|
|
177
153
|
}
|
|
178
|
-
|
|
179
|
-
function parseFirstAndFamilyName(name) {
|
|
154
|
+
export function parseFirstAndFamilyName(name) {
|
|
180
155
|
if (name.includes(',')) {
|
|
181
156
|
const [familyName, firstName] = name.split(',').map((part) => part.trim());
|
|
182
157
|
return { firstName, familyName };
|
|
@@ -189,49 +164,45 @@ function parseFirstAndFamilyName(name) {
|
|
|
189
164
|
familyName: familyName.length > 0 ? familyName : undefined
|
|
190
165
|
};
|
|
191
166
|
}
|
|
192
|
-
|
|
193
|
-
function _throw(value) {
|
|
167
|
+
export function _throw(value) {
|
|
194
168
|
throw value;
|
|
195
169
|
}
|
|
196
|
-
|
|
197
|
-
function deferThrow(value) {
|
|
170
|
+
export function deferThrow(value) {
|
|
198
171
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
199
172
|
return function deferThrow() {
|
|
200
173
|
throw value;
|
|
201
174
|
};
|
|
202
175
|
}
|
|
203
|
-
|
|
204
|
-
function decycle(_value, replacer) {
|
|
176
|
+
export function decycle(_value, replacer) {
|
|
205
177
|
const mapping = new Map();
|
|
206
|
-
const replacerFn =
|
|
178
|
+
const replacerFn = isDefined(replacer) ? replacer : (value) => value;
|
|
207
179
|
function _decycle(__value, path) {
|
|
208
180
|
const value = replacerFn(__value);
|
|
209
|
-
if (
|
|
181
|
+
if (isPrimitive(value) || isRegExp(value) || isDate(value) || isFunction(value)) {
|
|
210
182
|
return value;
|
|
211
183
|
}
|
|
212
184
|
const mappedPath = mapping.get(value);
|
|
213
|
-
if (
|
|
185
|
+
if (isDefined(mappedPath)) {
|
|
214
186
|
return { $ref: mappedPath };
|
|
215
187
|
}
|
|
216
188
|
mapping.set(value, path);
|
|
217
|
-
if (
|
|
189
|
+
if (isArray(value)) {
|
|
218
190
|
return value.map((item, index) => _decycle(item, `${path}[${index}]`));
|
|
219
191
|
}
|
|
220
192
|
return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, _decycle(item, `${path}['${key}']`)]));
|
|
221
193
|
}
|
|
222
194
|
return _decycle(_value, '$');
|
|
223
195
|
}
|
|
224
|
-
exports.decycle = decycle;
|
|
225
196
|
const recyclePathPattern = /^\$(?:\[(?:(\d+)|'(.*?)')\])*$/u;
|
|
226
197
|
const recyclePathPartsPattern = /\[(?:(\d+)|'(.*?)')\]/ug;
|
|
227
|
-
function recycle(_value, _clone = true) {
|
|
198
|
+
export function recycle(_value, _clone = true) {
|
|
228
199
|
const value = _clone ? clone(_value, true) : _value;
|
|
229
200
|
function deref(ref) {
|
|
230
201
|
const parts = ref.matchAll(recyclePathPartsPattern);
|
|
231
202
|
let target = value;
|
|
232
203
|
for (const [, index, property] of parts) {
|
|
233
|
-
const key = index
|
|
234
|
-
if (!
|
|
204
|
+
const key = index ?? property;
|
|
205
|
+
if (!hasOwnProperty(target, key)) {
|
|
235
206
|
throw new Error(`reference ${ref} not found`);
|
|
236
207
|
}
|
|
237
208
|
target = target[key];
|
|
@@ -239,19 +210,19 @@ function recycle(_value, _clone = true) {
|
|
|
239
210
|
return target;
|
|
240
211
|
}
|
|
241
212
|
function getRef(node) {
|
|
242
|
-
if (
|
|
213
|
+
if (isObject(node) && hasOwnProperty(node, '$ref')) {
|
|
243
214
|
const ref = node['$ref'];
|
|
244
|
-
if (
|
|
215
|
+
if (isString(ref) && recyclePathPattern.test(ref)) {
|
|
245
216
|
return ref;
|
|
246
217
|
}
|
|
247
218
|
}
|
|
248
219
|
return undefined;
|
|
249
220
|
}
|
|
250
221
|
function _recycle(node) {
|
|
251
|
-
if (
|
|
222
|
+
if (isWritableArray(node)) {
|
|
252
223
|
for (let i = 0; i < node.length; i++) {
|
|
253
224
|
const ref = getRef(node[i]);
|
|
254
|
-
if (
|
|
225
|
+
if (isDefined(ref)) {
|
|
255
226
|
node[i] = deref(ref);
|
|
256
227
|
}
|
|
257
228
|
else {
|
|
@@ -259,10 +230,10 @@ function recycle(_value, _clone = true) {
|
|
|
259
230
|
}
|
|
260
231
|
}
|
|
261
232
|
}
|
|
262
|
-
else if (
|
|
233
|
+
else if (isObject(node) && isNotNull(node)) {
|
|
263
234
|
for (const key of Object.keys(node)) {
|
|
264
235
|
const ref = getRef(node[key]);
|
|
265
|
-
if (
|
|
236
|
+
if (isDefined(ref)) {
|
|
266
237
|
node[key] = deref(ref);
|
|
267
238
|
}
|
|
268
239
|
else {
|
|
@@ -274,14 +245,13 @@ function recycle(_value, _clone = true) {
|
|
|
274
245
|
_recycle(value);
|
|
275
246
|
return value;
|
|
276
247
|
}
|
|
277
|
-
exports.recycle = recycle;
|
|
278
248
|
/**
|
|
279
249
|
* trims, lowercases, replaces multi-character whitespace with a single space and unicode normalization
|
|
280
250
|
* @param text text to normalize
|
|
281
251
|
* @param options specify what to normalize. Defaults to all except unicode
|
|
282
252
|
* @returns normalized text
|
|
283
253
|
*/
|
|
284
|
-
function normalizeText(text, options = { trim: true, lowercase: true, multipleWhitespace: true, diacritics: true, ligatures: true }) {
|
|
254
|
+
export function normalizeText(text, options = { trim: true, lowercase: true, multipleWhitespace: true, diacritics: true, ligatures: true }) {
|
|
285
255
|
let normalized = text;
|
|
286
256
|
if (options.trim == true) {
|
|
287
257
|
normalized = normalized.trim();
|
|
@@ -298,14 +268,12 @@ function normalizeText(text, options = { trim: true, lowercase: true, multipleWh
|
|
|
298
268
|
if (options.ligatures == true) {
|
|
299
269
|
normalized = normalized.normalize('NFKC');
|
|
300
270
|
}
|
|
301
|
-
if (
|
|
271
|
+
if (isDefined(options.unicode)) {
|
|
302
272
|
normalized = normalized.normalize(options.unicode);
|
|
303
273
|
}
|
|
304
274
|
return normalized;
|
|
305
275
|
}
|
|
306
|
-
|
|
307
|
-
function iif(condition, trueFn, falseFn) {
|
|
276
|
+
export function iif(condition, trueFn, falseFn) {
|
|
308
277
|
return condition ? trueFn() : falseFn();
|
|
309
278
|
}
|
|
310
|
-
exports.iif = iif;
|
|
311
279
|
//# sourceMappingURL=helpers.js.map
|
package/utils/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../source/utils/helpers.ts"],"names":[],"mappings":";AAAA,iDAAiD;;;;;;;;;;;;;;AAEjD,mDAA8C;AAC9C,oCAAwC;AAExC,4CAAiD;AACjD,+CAAqO;AAErO,MAAM,oBAAoB,GAAG,OAAO,YAAY,IAAI,WAAW,CAAC;AAEhE;;;;;;GAMG;AACH,SAAgB,eAAe,CAAI,KAAQ;IACzC,IAAI,oBAAoB,EAAE;QACxB,OAAO,IAAI,YAAY,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,IAAS,CAAC;KACtE;IAED,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC;IAC/B,OAAO,CAAC,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,IAAI,GAAG,OAAO,CAAC,KAAU,CAAC;IAChC,OAAO,CAAC,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE/C,OAAO,IAAI,CAAC;AACd,CAAC;AAXD,0CAWC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,oBAAoB,CAAI,KAAQ,EAAE,OAA8B;IACpF,MAA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QACtC,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;KAC/C;IAED,IAAI,OAAO,CAAC,UAAU,IAAI,IAAI,EAAE;QAC9B,UAAU,GAAG,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;KACzE;IAED,IAAI,OAAO,CAAC,SAAS,IAAI,IAAI,EAAE;QAC7B,UAAU,GAAG,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;KAC3C;IAED,IAAI,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC9B,UAAU,GAAG,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;KACpD;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,GAAG,CAAO,SAAkB,EAAE,MAAe,EAAE,OAAgB;IAC7E,OAAO,SAAS,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;AAC1C,CAAC"}
|
package/utils/image.js
CHANGED
|
@@ -1,41 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const type_guards_1 = require("./type-guards");
|
|
9
|
-
const supportedImageDecoders = new factory_map_1.FactoryMap(async (dataUrl) => _canDecodeImage(dataUrl));
|
|
10
|
-
const supportedImageEncoders = new factory_map_1.FactoryMap((mimeType) => _canEncodeImage(mimeType));
|
|
1
|
+
import { AssertionError } from "../error/assertion.error.js";
|
|
2
|
+
import { firstValueFrom } from 'rxjs';
|
|
3
|
+
import { fromEvent, map, race, switchMap, throwError } from 'rxjs';
|
|
4
|
+
import { FactoryMap } from './factory-map.js';
|
|
5
|
+
import { assertNotNullPass, isFunction, isNull } from './type-guards.js';
|
|
6
|
+
const supportedImageDecoders = new FactoryMap(async (dataUrl) => _canDecodeImage(dataUrl));
|
|
7
|
+
const supportedImageEncoders = new FactoryMap((mimeType) => _canEncodeImage(mimeType));
|
|
11
8
|
const webpData = 'data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoCAAEAAQAcJaQAA3AA/v3AgAA=';
|
|
12
9
|
const avifData = 'data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=';
|
|
13
|
-
async function canDecodeWebp() {
|
|
10
|
+
export async function canDecodeWebp() {
|
|
14
11
|
return canDecodeImage(webpData);
|
|
15
12
|
}
|
|
16
|
-
|
|
17
|
-
async function canDecodeAvif() {
|
|
13
|
+
export async function canDecodeAvif() {
|
|
18
14
|
return canDecodeImage(avifData);
|
|
19
15
|
}
|
|
20
|
-
|
|
21
|
-
async function canDecodeImage(dataUrl) {
|
|
16
|
+
export async function canDecodeImage(dataUrl) {
|
|
22
17
|
return supportedImageDecoders.get(dataUrl);
|
|
23
18
|
}
|
|
24
|
-
|
|
25
|
-
function canEncodeImageFormat(mimeType) {
|
|
19
|
+
export function canEncodeImageFormat(mimeType) {
|
|
26
20
|
return supportedImageEncoders.get(mimeType);
|
|
27
21
|
}
|
|
28
|
-
exports.canEncodeImageFormat = canEncodeImageFormat;
|
|
29
22
|
async function _canDecodeImage(dataUrl) {
|
|
30
|
-
if (
|
|
23
|
+
if (isFunction(globalThis.createImageBitmap)) {
|
|
31
24
|
const response = await fetch(dataUrl);
|
|
32
25
|
const blob = await response.blob();
|
|
33
26
|
return createImageBitmap(blob).then(() => true).catch(() => false);
|
|
34
27
|
}
|
|
35
28
|
const image = new Image();
|
|
36
|
-
const canPromise =
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
const canPromise = firstValueFrom(race([
|
|
30
|
+
fromEvent(image, 'load').pipe(map(() => true)),
|
|
31
|
+
fromEvent(image, 'error').pipe(map(() => false))
|
|
39
32
|
]));
|
|
40
33
|
image.src = dataUrl;
|
|
41
34
|
return canPromise;
|
|
@@ -43,14 +36,14 @@ async function _canDecodeImage(dataUrl) {
|
|
|
43
36
|
function _canEncodeImage(mimeType) {
|
|
44
37
|
return document.createElement('canvas').toDataURL(mimeType).startsWith(`data:${mimeType};`);
|
|
45
38
|
}
|
|
46
|
-
async function compressImage(sourceImage, width, height, mimeType, quality) {
|
|
39
|
+
export async function compressImage(sourceImage, width, height, mimeType, quality) {
|
|
47
40
|
const canvas = document.createElement('canvas');
|
|
48
41
|
const objectUrl = URL.createObjectURL(sourceImage);
|
|
49
42
|
try {
|
|
50
43
|
const image = new Image();
|
|
51
|
-
const imagePromise =
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
const imagePromise = firstValueFrom(race([
|
|
45
|
+
fromEvent(image, 'load').pipe(map(() => undefined)),
|
|
46
|
+
fromEvent(image, 'error').pipe(switchMap((event) => throwError(() => event.error ?? new Error(event.message))))
|
|
54
47
|
]));
|
|
55
48
|
image.src = objectUrl;
|
|
56
49
|
await imagePromise;
|
|
@@ -61,12 +54,12 @@ async function compressImage(sourceImage, width, height, mimeType, quality) {
|
|
|
61
54
|
const targetHeight = height * scaleFactor;
|
|
62
55
|
canvas.width = targetWidth;
|
|
63
56
|
canvas.height = targetHeight;
|
|
64
|
-
const context =
|
|
57
|
+
const context = assertNotNullPass(canvas.getContext('2d'), 'canvas 2d context not supported');
|
|
65
58
|
context.imageSmoothingQuality = 'high';
|
|
66
59
|
context.drawImage(image, 0, 0, targetWidth, targetHeight);
|
|
67
60
|
const resultBlob = await new Promise((resolve, reject) => canvas.toBlob((blob) => {
|
|
68
|
-
if (
|
|
69
|
-
reject(new
|
|
61
|
+
if (isNull(blob)) {
|
|
62
|
+
reject(new AssertionError('could not render image'));
|
|
70
63
|
return;
|
|
71
64
|
}
|
|
72
65
|
resolve(blob);
|
|
@@ -77,5 +70,4 @@ async function compressImage(sourceImage, width, height, mimeType, quality) {
|
|
|
77
70
|
URL.revokeObjectURL(objectUrl);
|
|
78
71
|
}
|
|
79
72
|
}
|
|
80
|
-
exports.compressImage = compressImage;
|
|
81
73
|
//# sourceMappingURL=image.js.map
|
package/utils/image.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.js","sourceRoot":"","sources":["../../source/utils/image.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image.js","sourceRoot":"","sources":["../../source/utils/image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oCAAmC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEzE,MAAM,sBAAsB,GAAG,IAAI,UAAU,CAA2B,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;AACrH,MAAM,sBAAsB,GAAG,IAAI,UAAU,CAAkB,CAAC,QAAQ,EAAE,EAAE,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;AAExG,MAA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AC,CAAC;QAC3F,MAAM,WAAW,GAAG,KAAK,GAAG,WAAW,CAAC;QACxC,MAAM,YAAY,GAAG,MAAM,GAAG,WAAW,CAAC;QAE1C,MAAM,CAAC,KAAK,GAAG,WAAW,CAAC;QAC3B,MAAM,CAAC,MAAM,GAAG,YAAY,CAAC;QAE7B,MAAM,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,iCAAiC,CAAC,CAAC;QAC9F,OAAO,CAAC,qBAAqB,GAAG,MAAM,CAAC;QACvC,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;QAE1D,MAAM,UAAU,GAAG,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;YACrF,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE;gBAChB,MAAM,CAAC,IAAI,cAAc,CAAC,wBAAwB,CAAC,CAAC,CAAC;gBACrD,OAAO;aACR;YAED,OAAO,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;QAEvB,OAAO,UAAU,CAAC;KACnB;YACO;QACN,GAAG,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;KAChC;AACH,CAAC"}
|
package/utils/index.d.ts
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
export * from './alphabet';
|
|
2
|
-
export * from './any-iterable-iterator';
|
|
3
|
-
export * from './async-iterator-iterable-iterator';
|
|
4
|
-
export * from './backoff';
|
|
5
|
-
export * from './base64';
|
|
6
|
-
export * from './benchmark';
|
|
7
|
-
export * from './binary';
|
|
8
|
-
export * from './binary-search';
|
|
9
|
-
export * from './cancellation-token';
|
|
10
|
-
export * from './comparison';
|
|
11
|
-
export * from './date-time';
|
|
12
|
-
export * from './encoding';
|
|
13
|
-
export * from './enum';
|
|
14
|
-
export * from './equals';
|
|
15
|
-
export * from './event-loop';
|
|
16
|
-
export * from './factory-map';
|
|
17
|
-
export * from './feedable-async-iterable';
|
|
18
|
-
export * from './file-reader';
|
|
19
|
-
export * from './helpers';
|
|
20
|
-
export * from './image';
|
|
21
|
-
export * from './map';
|
|
22
|
-
export * from './math';
|
|
23
|
-
export * from './middleware';
|
|
24
|
-
export * from './moving-metric';
|
|
25
|
-
export * from './noop';
|
|
26
|
-
export * from './ordered-feedable-async-iterable';
|
|
27
|
-
export * from './patterns';
|
|
28
|
-
export * from './periodic-reporter';
|
|
29
|
-
export * from './periodic-sampler';
|
|
30
|
-
export * from './provider-function-iterable';
|
|
31
|
-
export * from './random';
|
|
32
|
-
export * from './reflection';
|
|
33
|
-
export * from './set';
|
|
34
|
-
export * from './singleton';
|
|
35
|
-
export * from './sort';
|
|
36
|
-
export * from './timer';
|
|
37
|
-
export * from './timing';
|
|
38
|
-
export * from './type-guards';
|
|
39
|
-
export * from './type-of';
|
|
40
|
-
export * from './units';
|
|
41
|
-
export * from './url-builder';
|
|
42
|
-
export * from './z-base32';
|
|
1
|
+
export * from './alphabet.js';
|
|
2
|
+
export * from './any-iterable-iterator.js';
|
|
3
|
+
export * from './async-iterator-iterable-iterator.js';
|
|
4
|
+
export * from './backoff.js';
|
|
5
|
+
export * from './base64.js';
|
|
6
|
+
export * from './benchmark.js';
|
|
7
|
+
export * from './binary.js';
|
|
8
|
+
export * from './binary-search.js';
|
|
9
|
+
export * from './cancellation-token.js';
|
|
10
|
+
export * from './comparison.js';
|
|
11
|
+
export * from './date-time.js';
|
|
12
|
+
export * from './encoding.js';
|
|
13
|
+
export * from './enum.js';
|
|
14
|
+
export * from './equals.js';
|
|
15
|
+
export * from './event-loop.js';
|
|
16
|
+
export * from './factory-map.js';
|
|
17
|
+
export * from './feedable-async-iterable.js';
|
|
18
|
+
export * from './file-reader.js';
|
|
19
|
+
export * from './helpers.js';
|
|
20
|
+
export * from './image.js';
|
|
21
|
+
export * from './map.js';
|
|
22
|
+
export * from './math.js';
|
|
23
|
+
export * from './middleware.js';
|
|
24
|
+
export * from './moving-metric.js';
|
|
25
|
+
export * from './noop.js';
|
|
26
|
+
export * from './ordered-feedable-async-iterable.js';
|
|
27
|
+
export * from './patterns.js';
|
|
28
|
+
export * from './periodic-reporter.js';
|
|
29
|
+
export * from './periodic-sampler.js';
|
|
30
|
+
export * from './provider-function-iterable.js';
|
|
31
|
+
export * from './random.js';
|
|
32
|
+
export * from './reflection.js';
|
|
33
|
+
export * from './set.js';
|
|
34
|
+
export * from './singleton.js';
|
|
35
|
+
export * from './sort.js';
|
|
36
|
+
export * from './timer.js';
|
|
37
|
+
export * from './timing.js';
|
|
38
|
+
export * from './type-guards.js';
|
|
39
|
+
export * from './type-of.js';
|
|
40
|
+
export * from './units.js';
|
|
41
|
+
export * from './url-builder.js';
|
|
42
|
+
export * from './z-base32.js';
|