@tstdl/base 0.81.3 → 0.81.5
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 +6 -6
- package/api/client/client.js +4 -4
- package/api/client/client.js.map +1 -1
- package/api/default-error-handlers.d.ts +2 -2
- package/api/default-error-handlers.js +1 -1
- package/api/default-error-handlers.js.map +1 -1
- package/api/response.d.ts +8 -8
- package/api/response.js +1 -1
- package/api/response.js.map +1 -1
- package/api/server/api-controller.d.ts +3 -3
- package/api/server/api-controller.js +3 -3
- package/api/server/api-controller.js.map +1 -1
- package/api/server/error-handler.d.ts +3 -3
- package/api/server/error-handler.js +2 -2
- package/api/server/error-handler.js.map +1 -1
- package/api/server/gateway.d.ts +17 -17
- package/api/server/gateway.js +12 -12
- package/api/server/gateway.js.map +1 -1
- package/api/server/middlewares/allowed-methods.middleware.d.ts +3 -3
- package/api/server/middlewares/allowed-methods.middleware.js +3 -3
- package/api/server/middlewares/allowed-methods.middleware.js.map +1 -1
- package/api/server/middlewares/catch-error.middleware.d.ts +2 -2
- package/api/server/middlewares/cors.middleware.d.ts +2 -2
- package/api/server/middlewares/cors.middleware.js +2 -2
- package/api/server/middlewares/cors.middleware.js.map +1 -1
- package/api/server/middlewares/response-time.middleware.d.ts +1 -1
- package/api/server/middlewares/response-time.middleware.js +2 -2
- package/api/server/middlewares/response-time.middleware.js.map +1 -1
- package/api/server/module.d.ts +2 -2
- package/api/server/module.js +2 -2
- package/api/server/module.js.map +1 -1
- package/api/server/tokens.d.ts +1 -1
- package/api/server/tokens.js +1 -1
- package/api/server/tokens.js.map +1 -1
- package/api/types.d.ts +34 -34
- package/api/types.js +2 -2
- package/api/types.js.map +1 -1
- package/api/utils.d.ts +1 -1
- package/api/utils.js +3 -3
- package/api/utils.js.map +1 -1
- package/application/application.d.ts +5 -5
- package/application/application.js +19 -19
- package/application/application.js.map +1 -1
- package/collections/awaitable/awaitable-list.js +6 -6
- package/collections/awaitable/awaitable-list.js.map +1 -1
- package/collections/awaitable/awaitable-map.js +7 -7
- package/collections/awaitable/awaitable-map.js.map +1 -1
- package/collections/awaitable/awaitable-set.js +7 -7
- package/collections/awaitable/awaitable-set.js.map +1 -1
- package/collections/keyed-set.d.ts +1 -1
- package/collections/observable/observable-array.js +4 -4
- package/collections/observable/observable-array.js.map +1 -1
- package/collections/observable/observable-collection-base.js +9 -9
- package/collections/observable/observable-collection-base.js.map +1 -1
- package/collections/observable/observable-collection.d.ts +1 -1
- package/collections/observable/observable-list-base.js +6 -6
- package/collections/observable/observable-list-base.js.map +1 -1
- package/collections/observable/observable-list.d.ts +2 -2
- package/collections/observable/observable-map.js +5 -5
- package/collections/observable/observable-map.js.map +1 -1
- package/collections/observable/observable-set.js +5 -5
- package/collections/observable/observable-set.js.map +1 -1
- package/collections/observable/observable-sorted-array-list.d.ts +1 -1
- package/collections/observable/observable-sorted-array-list.js +8 -8
- package/collections/observable/observable-sorted-array-list.js.map +1 -1
- package/collections/sorted-array-list.d.ts +1 -1
- package/collections/sorted-array-list.js +5 -5
- package/collections/sorted-array-list.js.map +1 -1
- package/collections/sorted-map.js +4 -4
- package/collections/sorted-map.js.map +1 -1
- package/container/container.d.ts +4 -4
- package/container/container.js +12 -12
- package/container/container.js.map +1 -1
- package/container/decorators.d.ts +5 -5
- package/container/decorators.js +3 -3
- package/container/decorators.js.map +1 -1
- package/container/interfaces.d.ts +1 -1
- package/container/provider.d.ts +7 -7
- package/container/provider.js +1 -1
- package/container/provider.js.map +1 -1
- package/container/resolve-chain.d.ts +3 -3
- package/container/resolve-chain.js +5 -5
- package/container/resolve-chain.js.map +1 -1
- package/container/resolve.error.d.ts +1 -1
- package/container/resolve.error.js +2 -2
- package/container/resolve.error.js.map +1 -1
- package/container/token.d.ts +4 -4
- package/container/token.js +1 -1
- package/container/token.js.map +1 -1
- package/container/type-info.d.ts +1 -1
- package/container/types.d.ts +4 -4
- package/container/utils.d.ts +1 -1
- package/container/utils.js +1 -1
- package/container/utils.js.map +1 -1
- package/core.d.ts +1 -1
- package/css/theme/theme.model.d.ts +2 -2
- package/css/theme/theme.service.js +4 -4
- package/css/theme/theme.service.js.map +1 -1
- package/data-structures/array-list.d.ts +2 -1
- package/data-structures/array-list.js +3 -0
- package/data-structures/array-list.js.map +1 -1
- package/data-structures/circular-buffer.d.ts +2 -1
- package/data-structures/circular-buffer.js +22 -14
- package/data-structures/circular-buffer.js.map +1 -1
- package/data-structures/collection.d.ts +2 -1
- package/data-structures/collection.js +13 -13
- 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 +2 -2
- package/data-structures/index-out-of-bounds.error.js.map +1 -1
- package/data-structures/iterable-weak-map.d.ts +1 -0
- package/data-structures/iterable-weak-map.js +17 -11
- package/data-structures/iterable-weak-map.js.map +1 -1
- package/data-structures/linked-list.d.ts +5 -4
- package/data-structures/linked-list.js +16 -8
- package/data-structures/linked-list.js.map +1 -1
- package/data-structures/list.d.ts +1 -1
- package/data-structures/list.js +1 -1
- package/data-structures/list.js.map +1 -1
- package/data-structures/map.d.ts +1 -0
- package/data-structures/map.js +6 -0
- package/data-structures/map.js.map +1 -1
- package/data-structures/multi-key-map.d.ts +3 -2
- package/data-structures/multi-key-map.js +8 -2
- package/data-structures/multi-key-map.js.map +1 -1
- package/data-structures/set.d.ts +1 -0
- package/data-structures/set.js +3 -0
- package/data-structures/set.js.map +1 -1
- package/data-structures/sorted-array-list.d.ts +6 -5
- package/data-structures/sorted-array-list.js +9 -5
- package/data-structures/sorted-array-list.js.map +1 -1
- package/data-structures/weak-ref-map.d.ts +1 -0
- package/data-structures/weak-ref-map.js +14 -8
- package/data-structures/weak-ref-map.js.map +1 -1
- package/database/entity-repository.d.ts +2 -2
- package/database/entity.d.ts +3 -3
- package/database/id.js +1 -1
- package/database/id.js.map +1 -1
- package/database/module.d.ts +1 -1
- package/database/module.js +1 -1
- package/database/module.js.map +1 -1
- package/database/mongo/classes.d.ts +6 -6
- package/database/mongo/classes.js +1 -1
- package/database/mongo/classes.js.map +1 -1
- package/database/mongo/model/document.d.ts +4 -4
- package/database/mongo/model/document.js +2 -2
- package/database/mongo/model/document.js.map +1 -1
- package/database/mongo/module.d.ts +1 -1
- package/database/mongo/module.js +4 -4
- package/database/mongo/module.js.map +1 -1
- package/database/mongo/mongo-base.repository.d.ts +13 -13
- package/database/mongo/mongo-base.repository.js +4 -4
- package/database/mongo/mongo-base.repository.js.map +1 -1
- package/database/mongo/mongo-bulk.d.ts +2 -2
- package/database/mongo/mongo-entity-repository.d.ts +12 -12
- package/database/mongo/mongo-entity-repository.js +6 -6
- package/database/mongo/mongo-entity-repository.js.map +1 -1
- package/database/mongo/operations.d.ts +1 -1
- package/database/mongo/query-converter.d.ts +2 -2
- package/database/mongo/query-converter.js +3 -3
- package/database/mongo/query-converter.js.map +1 -1
- package/database/mongo/simple-entity-repository.d.ts +2 -2
- package/database/mongo/types.d.ts +18 -18
- package/database/query.d.ts +40 -40
- package/disposable/async-disposer.d.ts +3 -3
- package/disposable/async-disposer.js +10 -10
- package/disposable/async-disposer.js.map +1 -1
- package/disposable/disposable.js +1 -1
- package/disposable/disposable.js.map +1 -1
- package/distributed-loop/distributed-loop.d.ts +6 -6
- package/distributed-loop/distributed-loop.js +6 -6
- package/distributed-loop/distributed-loop.js.map +1 -1
- package/distributed-loop/provider.d.ts +1 -1
- package/distributed-loop/provider.js +2 -2
- package/distributed-loop/provider.js.map +1 -1
- package/enumerable/async-enumerable.d.ts +3 -3
- package/enumerable/async-enumerable.js +2 -2
- package/enumerable/async-enumerable.js.map +1 -1
- package/enumerable/enumerable.d.ts +2 -2
- package/error/custom.error.d.ts +1 -1
- package/error/not-supported.error.d.ts +1 -1
- package/error/not-supported.error.js +1 -1
- package/error/not-supported.error.js.map +1 -1
- package/examples/api/basic-overview.js +11 -11
- package/examples/api/basic-overview.js.map +1 -1
- package/examples/api/streaming.js +14 -14
- package/examples/api/streaming.js.map +1 -1
- package/examples/http/client.js +3 -3
- package/examples/http/client.js.map +1 -1
- package/examples/mail/basic.js +9 -9
- package/examples/mail/basic.js.map +1 -1
- package/examples/mail/templates/hello-name.d.ts +1 -1
- package/examples/mail/templates/hello-name.js +2 -2
- package/examples/mail/templates/hello-name.js.map +1 -1
- package/examples/pdf/basic.js +9 -9
- package/examples/pdf/basic.js.map +1 -1
- package/examples/pdf/templates/hello-name.d.ts +1 -1
- package/examples/pdf/templates/hello-name.js +3 -3
- package/examples/pdf/templates/hello-name.js.map +1 -1
- package/examples/reflection/basic.d.ts +1 -1
- package/examples/reflection/basic.js +4 -4
- package/examples/reflection/basic.js.map +1 -1
- package/examples/template/basic.js +7 -7
- package/examples/template/basic.js.map +1 -1
- package/examples/template/templates/hello-name.d.ts +1 -1
- package/examples/template/templates/hello-name.js +3 -3
- package/examples/template/templates/hello-name.js.map +1 -1
- package/http/client/adapters/undici-http-client.adapter.d.ts +1 -1
- package/http/client/adapters/undici-http-client.adapter.js +4 -4
- package/http/client/adapters/undici-http-client.adapter.js.map +1 -1
- package/http/client/http-client-request.d.ts +9 -9
- package/http/client/http-client-request.js +10 -10
- package/http/client/http-client-request.js.map +1 -1
- package/http/client/http-client-response.d.ts +3 -3
- package/http/client/http-client-response.js +3 -3
- package/http/client/http-client-response.js.map +1 -1
- package/http/client/http-client.d.ts +10 -10
- package/http/client/http-client.js +10 -10
- package/http/client/http-client.js.map +1 -1
- package/http/cookie-parser.js +2 -2
- package/http/cookie-parser.js.map +1 -1
- package/http/http-body.d.ts +3 -3
- package/http/http-body.js +5 -5
- package/http/http-body.js.map +1 -1
- package/http/http-form.d.ts +2 -2
- package/http/http-headers.d.ts +3 -3
- package/http/http-headers.js +3 -3
- package/http/http-headers.js.map +1 -1
- package/http/http-query.d.ts +2 -2
- package/http/http-url-parameters.d.ts +2 -2
- package/http/http-value-map.d.ts +2 -2
- package/http/http-value-map.js +5 -5
- package/http/http-value-map.js.map +1 -1
- package/http/http.error.d.ts +2 -2
- package/http/http.error.js +2 -2
- package/http/http.error.js.map +1 -1
- package/http/server/http-server-request.d.ts +2 -2
- package/http/server/http-server-request.js +3 -3
- 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.d.ts +4 -4
- package/http/server/http-server.js +1 -1
- package/http/server/http-server.js.map +1 -1
- package/http/server/node/module.js +1 -1
- package/http/server/node/module.js.map +1 -1
- package/http/server/node/node-http-server.d.ts +6 -6
- package/http/server/node/node-http-server.js +16 -16
- package/http/server/node/node-http-server.js.map +1 -1
- package/http/types.d.ts +6 -6
- package/http/types.js +1 -1
- package/http/types.js.map +1 -1
- package/http/utils.d.ts +5 -5
- package/http/utils.js +10 -10
- package/http/utils.js.map +1 -1
- package/image-service/image-service.js +1 -1
- package/image-service/image-service.js.map +1 -1
- package/image-service/imgproxy/imgproxy-image-service.d.ts +4 -4
- package/image-service/imgproxy/imgproxy-image-service.js +6 -6
- package/image-service/imgproxy/imgproxy-image-service.js.map +1 -1
- package/json-path/json-path.d.ts +4 -4
- package/json-path/json-path.js +17 -17
- package/json-path/json-path.js.map +1 -1
- package/key-value-store/key-value.store.d.ts +3 -3
- package/key-value-store/key-value.store.js +1 -1
- package/key-value-store/key-value.store.js.map +1 -1
- package/key-value-store/mongo/module.d.ts +2 -2
- package/key-value-store/mongo/module.js +1 -1
- package/key-value-store/mongo/module.js.map +1 -1
- package/key-value-store/mongo/mongo-key-value-store.provider.d.ts +2 -2
- package/key-value-store/mongo/mongo-key-value-store.provider.js +1 -1
- 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 +2 -2
- package/key-value-store/mongo/mongo-key-value.repository.d.ts +5 -5
- package/key-value-store/mongo/mongo-key-value.repository.js +3 -3
- package/key-value-store/mongo/mongo-key-value.repository.js.map +1 -1
- package/key-value-store/mongo/mongo-key-value.store.d.ts +2 -2
- package/key-value-store/mongo/mongo-key-value.store.js +6 -6
- package/key-value-store/mongo/mongo-key-value.store.js.map +1 -1
- package/lock/lock.d.ts +6 -6
- package/lock/lock.js +1 -1
- package/lock/lock.js.map +1 -1
- package/lock/mongo/lock.d.ts +3 -3
- package/lock/mongo/lock.js +10 -10
- package/lock/mongo/lock.js.map +1 -1
- package/lock/mongo/model.d.ts +2 -2
- package/lock/mongo/module.d.ts +2 -2
- package/lock/mongo/module.js +1 -1
- package/lock/mongo/module.js.map +1 -1
- package/lock/mongo/mongo-lock-repository.d.ts +5 -5
- package/lock/mongo/mongo-lock-repository.js +5 -5
- package/lock/mongo/mongo-lock-repository.js.map +1 -1
- package/lock/mongo/provider.d.ts +3 -3
- package/lock/mongo/provider.js +4 -4
- package/lock/mongo/provider.js.map +1 -1
- package/lock/provider.d.ts +3 -3
- package/lock/provider.js +1 -1
- package/lock/provider.js.map +1 -1
- package/logger/console/logger.js +4 -4
- package/logger/console/logger.js.map +1 -1
- package/logger/logger.d.ts +8 -8
- package/logger/logger.js +3 -3
- package/logger/logger.js.map +1 -1
- package/mail/clients/nodemailer.mail-client.js +2 -2
- package/mail/clients/nodemailer.mail-client.js.map +1 -1
- package/mail/mail-log.repository.d.ts +1 -1
- package/mail/mail-log.repository.js +1 -1
- package/mail/mail-log.repository.js.map +1 -1
- package/mail/mail.client.d.ts +3 -3
- package/mail/mail.client.js +1 -1
- package/mail/mail.client.js.map +1 -1
- package/mail/mail.service.d.ts +3 -3
- package/mail/mail.service.js +6 -6
- package/mail/mail.service.js.map +1 -1
- package/mail/models/mail-address.model.d.ts +1 -1
- package/mail/models/mail-content.model.d.ts +1 -1
- package/mail/models/mail-data.model.d.ts +2 -2
- package/mail/models/mail-log.model.d.ts +3 -3
- package/mail/models/mail-send-result.model.d.ts +1 -1
- package/mail/models/mail-template.model.d.ts +2 -2
- package/mail/module.d.ts +2 -2
- package/mail/module.js +2 -2
- package/mail/module.js.map +1 -1
- package/mail/repositories/mongo-mail-log.repository.d.ts +7 -7
- package/mail/repositories/mongo-mail-log.repository.js +3 -3
- package/mail/repositories/mongo-mail-log.repository.js.map +1 -1
- package/mail/tokens.d.ts +1 -1
- package/mail/tokens.js +1 -1
- package/mail/tokens.js.map +1 -1
- package/message-bus/broadcast-channel/broadcast-channel-message-bus-provider.d.ts +1 -1
- package/message-bus/broadcast-channel/broadcast-channel-message-bus.d.ts +1 -1
- package/message-bus/broadcast-channel/broadcast-channel-message-bus.js +5 -5
- package/message-bus/broadcast-channel/broadcast-channel-message-bus.js.map +1 -1
- package/message-bus/local/local-message-bus-provider.d.ts +1 -1
- package/message-bus/local/local-message-bus-provider.js +5 -5
- package/message-bus/local/local-message-bus-provider.js.map +1 -1
- package/message-bus/local/local-message-bus.d.ts +1 -1
- package/message-bus/local/local-message-bus.js +3 -3
- package/message-bus/local/local-message-bus.js.map +1 -1
- package/message-bus/local/types.d.ts +1 -1
- package/message-bus/message-bus-base.d.ts +1 -1
- package/message-bus/message-bus.d.ts +3 -3
- package/message-bus/message-bus.js +1 -1
- package/message-bus/message-bus.js.map +1 -1
- package/migration/migration-state-repository.d.ts +1 -1
- package/migration/migration-state-repository.js +1 -1
- package/migration/migration-state-repository.js.map +1 -1
- package/migration/migration-state.d.ts +3 -3
- package/migration/migrator.d.ts +6 -6
- package/migration/migrator.js +9 -9
- package/migration/migrator.js.map +1 -1
- package/migration/mongo/migration-state-repository.d.ts +4 -4
- package/migration/mongo/migration-state-repository.js +2 -2
- package/migration/mongo/migration-state-repository.js.map +1 -1
- package/migration/mongo/module.d.ts +3 -3
- package/migration/mongo/module.js +2 -2
- package/migration/mongo/module.js.map +1 -1
- package/module/module-base.d.ts +3 -3
- package/module/module-base.js +7 -7
- package/module/module-base.js.map +1 -1
- package/module/module-metric-reporter.d.ts +5 -5
- package/module/module-metric-reporter.js +3 -3
- package/module/module-metric-reporter.js.map +1 -1
- package/module/module.d.ts +2 -2
- package/module/modules/function.module.d.ts +2 -2
- package/module/modules/web-server.module.d.ts +7 -7
- package/module/modules/web-server.module.js +4 -4
- package/module/modules/web-server.module.js.map +1 -1
- package/module/utils.d.ts +1 -1
- package/notification/api.d.ts +4 -4
- package/notification/api.js +3 -3
- package/notification/api.js.map +1 -1
- package/notification/model.js +1 -1
- package/notification/model.js.map +1 -1
- package/notification/module.d.ts +1 -1
- package/object-storage/object-storage.d.ts +3 -3
- package/object-storage/object-storage.js +1 -1
- package/object-storage/object-storage.js.map +1 -1
- package/object-storage/object.d.ts +2 -2
- package/object-storage/s3/s3.object-storage-provider.d.ts +3 -3
- package/object-storage/s3/s3.object-storage-provider.js +3 -3
- package/object-storage/s3/s3.object-storage-provider.js.map +1 -1
- package/object-storage/s3/s3.object-storage.d.ts +2 -2
- package/object-storage/s3/s3.object-storage.js +6 -6
- package/object-storage/s3/s3.object-storage.js.map +1 -1
- package/object-storage/s3/s3.object.d.ts +3 -3
- package/openid-connect/cached-oidc-configuration.service.d.ts +1 -1
- package/openid-connect/cached-oidc-configuration.service.js +5 -5
- package/openid-connect/cached-oidc-configuration.service.js.map +1 -1
- package/openid-connect/index.js +1 -1
- package/openid-connect/index.js.map +1 -1
- package/openid-connect/mongo-oidc-state.repository.d.ts +7 -7
- package/openid-connect/mongo-oidc-state.repository.js +3 -3
- package/openid-connect/mongo-oidc-state.repository.js.map +1 -1
- package/openid-connect/oidc-configuration.service.d.ts +2 -2
- package/openid-connect/oidc-configuration.service.js +3 -3
- package/openid-connect/oidc-configuration.service.js.map +1 -1
- package/openid-connect/oidc-state.model.d.ts +3 -3
- package/openid-connect/oidc-state.repository.d.ts +1 -1
- package/openid-connect/oidc-state.repository.js +1 -1
- package/openid-connect/oidc-state.repository.js.map +1 -1
- package/openid-connect/oidc.service-model.d.ts +8 -8
- package/openid-connect/oidc.service.d.ts +1 -1
- package/openid-connect/oidc.service.js +14 -14
- package/openid-connect/oidc.service.js.map +1 -1
- package/orm/sql/sql-repository.js +1 -1
- package/orm/sql/sql-repository.js.map +1 -1
- package/orm/test.js +1 -1
- package/orm/test.js.map +1 -1
- package/orm/types.d.ts +5 -5
- package/orm/types.js +6 -6
- package/orm/types.js.map +1 -1
- package/package.json +2 -2
- package/pdf/pdf.service.d.ts +8 -8
- package/pdf/pdf.service.js +13 -13
- package/pdf/pdf.service.js.map +1 -1
- package/pool/pool.d.ts +7 -7
- package/pool/pool.js +7 -7
- package/pool/pool.js.map +1 -1
- package/process-shutdown.d.ts +2 -2
- package/process-shutdown.js +2 -2
- package/promise/cancelable-promise.d.ts +1 -1
- package/promise/deferred-promise.js +7 -7
- package/promise/deferred-promise.js.map +1 -1
- package/promise/lazy-promise.d.ts +1 -1
- package/promise/lazy-promise.js +2 -2
- package/promise/lazy-promise.js.map +1 -1
- package/queue/mongo/job.d.ts +5 -5
- package/queue/mongo/mongo-job.repository.d.ts +6 -6
- package/queue/mongo/mongo-job.repository.js +5 -5
- package/queue/mongo/mongo-job.repository.js.map +1 -1
- package/queue/mongo/queue.d.ts +5 -5
- package/queue/mongo/queue.js +12 -12
- package/queue/mongo/queue.js.map +1 -1
- package/queue/mongo/queue.provider.d.ts +7 -7
- package/queue/mongo/queue.provider.js +4 -4
- package/queue/mongo/queue.provider.js.map +1 -1
- package/queue/queue.d.ts +8 -8
- package/queue/queue.js +2 -2
- package/queue/queue.js.map +1 -1
- package/reflection/decorator-data.js +1 -1
- package/reflection/decorator-data.js.map +1 -1
- package/reflection/decorators.js +1 -1
- package/reflection/decorators.js.map +1 -1
- package/reflection/reflection-data-map.d.ts +1 -1
- package/reflection/reflection-data-map.js +3 -3
- package/reflection/reflection-data-map.js.map +1 -1
- package/reflection/registry.d.ts +10 -10
- package/reflection/registry.js +4 -4
- package/reflection/registry.js.map +1 -1
- package/reflection/types.d.ts +33 -33
- package/reflection/utils.d.ts +6 -6
- package/reflection/utils.js +3 -3
- package/reflection/utils.js.map +1 -1
- package/rpc/endpoints/message-port.rpc-endpoint.d.ts +3 -3
- package/rpc/endpoints/message-port.rpc-endpoint.js +1 -1
- package/rpc/endpoints/message-port.rpc-endpoint.js.map +1 -1
- package/rpc/model.d.ts +24 -24
- package/rpc/model.js +1 -1
- package/rpc/model.js.map +1 -1
- package/rpc/rpc-error.d.ts +1 -1
- package/rpc/rpc-error.js +3 -3
- package/rpc/rpc-error.js.map +1 -1
- package/rpc/rpc.d.ts +2 -2
- package/rpc/rpc.js +7 -7
- package/rpc/rpc.js.map +1 -1
- package/rxjs/intersection-observer.d.ts +1 -1
- package/rxjs/intersection-observer.js +2 -2
- package/rxjs/intersection-observer.js.map +1 -1
- package/rxjs/mutation-observer.d.ts +1 -1
- package/rxjs/mutation-observer.js +2 -2
- package/rxjs/mutation-observer.js.map +1 -1
- package/rxjs/performance-observer.d.ts +1 -1
- package/rxjs/performance-observer.js +2 -2
- package/rxjs/performance-observer.js.map +1 -1
- package/rxjs/resize-observer.d.ts +1 -1
- package/rxjs/resize-observer.js +2 -2
- package/rxjs/resize-observer.js.map +1 -1
- package/rxjs/retry-backoff.d.ts +1 -1
- package/rxjs/retry-backoff.js +1 -1
- package/rxjs/retry-backoff.js.map +1 -1
- package/rxjs/slow-array.d.ts +1 -1
- package/rxjs/touch.d.ts +1 -1
- package/schema/array-constraints/maximum-length.d.ts +2 -2
- package/schema/array-constraints/minimum-length.d.ts +2 -2
- package/schema/coercers/boolean.coercer.d.ts +1 -1
- package/schema/coercers/boolean.coercer.js +1 -1
- package/schema/coercers/boolean.coercer.js.map +1 -1
- package/schema/coercers/date.coercer.d.ts +1 -1
- package/schema/coercers/date.coercer.js +1 -1
- package/schema/coercers/date.coercer.js.map +1 -1
- package/schema/coercers/number.coercer.d.ts +1 -1
- package/schema/coercers/regexp.coercer.d.ts +1 -1
- package/schema/coercers/string.coercer.d.ts +1 -1
- package/schema/coercers/string.coercer.js +1 -1
- package/schema/coercers/string.coercer.js.map +1 -1
- package/schema/coercers/uint8-array.coercer.d.ts +1 -1
- package/schema/constraints/enumeration.d.ts +2 -2
- package/schema/constraints/enumeration.js +3 -3
- package/schema/constraints/enumeration.js.map +1 -1
- package/schema/constraints/generic.d.ts +4 -4
- package/schema/constraints/generic.js +1 -1
- package/schema/constraints/generic.js.map +1 -1
- package/schema/constraints/integer.d.ts +2 -2
- package/schema/constraints/length.d.ts +2 -2
- package/schema/constraints/length.js +1 -1
- package/schema/constraints/length.js.map +1 -1
- package/schema/constraints/literal.d.ts +1 -1
- package/schema/constraints/literal.js +1 -1
- package/schema/constraints/literal.js.map +1 -1
- package/schema/constraints/maximum-date.d.ts +2 -2
- package/schema/constraints/maximum-date.js +1 -1
- package/schema/constraints/maximum-date.js.map +1 -1
- package/schema/constraints/maximum-length.d.ts +2 -2
- package/schema/constraints/maximum-length.js +1 -1
- package/schema/constraints/maximum-length.js.map +1 -1
- package/schema/constraints/maximum.d.ts +2 -2
- package/schema/constraints/minimum-date.d.ts +2 -2
- package/schema/constraints/minimum-date.js +1 -1
- package/schema/constraints/minimum-date.js.map +1 -1
- package/schema/constraints/minimum-length.d.ts +2 -2
- package/schema/constraints/minimum-length.js +1 -1
- package/schema/constraints/minimum-length.js.map +1 -1
- package/schema/constraints/minimum.d.ts +2 -2
- package/schema/constraints/pattern.d.ts +2 -2
- package/schema/decorators/class.d.ts +1 -1
- package/schema/decorators/class.js +1 -1
- package/schema/decorators/class.js.map +1 -1
- package/schema/decorators/coerce.d.ts +1 -1
- package/schema/decorators/constraint.d.ts +2 -2
- package/schema/decorators/property.d.ts +2 -2
- package/schema/decorators/property.js +2 -2
- package/schema/decorators/property.js.map +1 -1
- package/schema/decorators/types.d.ts +4 -4
- package/schema/decorators/utils.d.ts +2 -2
- package/schema/decorators/utils.js +5 -5
- package/schema/decorators/utils.js.map +1 -1
- package/schema/schema.d.ts +4 -4
- package/schema/schema.error.d.ts +6 -6
- package/schema/schema.error.js +3 -3
- package/schema/schema.error.js.map +1 -1
- package/schema/schema.js +6 -6
- package/schema/schema.js.map +1 -1
- package/schema/schemas/any.d.ts +2 -2
- package/schema/schemas/array.d.ts +3 -3
- package/schema/schemas/array.js +2 -2
- package/schema/schemas/array.js.map +1 -1
- package/schema/schemas/assign.d.ts +1 -1
- package/schema/schemas/assign.js +2 -2
- package/schema/schemas/assign.js.map +1 -1
- package/schema/schemas/boolean.d.ts +2 -2
- package/schema/schemas/constraint.d.ts +1 -1
- package/schema/schemas/date.d.ts +2 -2
- package/schema/schemas/date.js +2 -2
- package/schema/schemas/date.js.map +1 -1
- package/schema/schemas/defaulted.d.ts +2 -2
- package/schema/schemas/enumeration.d.ts +3 -3
- package/schema/schemas/enumeration.js +1 -1
- package/schema/schemas/enumeration.js.map +1 -1
- package/schema/schemas/instance.d.ts +1 -1
- package/schema/schemas/literal.d.ts +2 -2
- package/schema/schemas/literal.js +1 -1
- package/schema/schemas/literal.js.map +1 -1
- package/schema/schemas/nullable.d.ts +2 -2
- package/schema/schemas/number.d.ts +2 -2
- package/schema/schemas/number.js +2 -2
- package/schema/schemas/number.js.map +1 -1
- package/schema/schemas/object.d.ts +2 -2
- package/schema/schemas/omit.d.ts +1 -1
- package/schema/schemas/omit.js +2 -2
- package/schema/schemas/omit.js.map +1 -1
- package/schema/schemas/one-or-many.d.ts +4 -4
- package/schema/schemas/one-or-many.js +1 -1
- package/schema/schemas/one-or-many.js.map +1 -1
- package/schema/schemas/optional.d.ts +3 -3
- package/schema/schemas/partial.d.ts +1 -1
- package/schema/schemas/partial.js +3 -3
- package/schema/schemas/partial.js.map +1 -1
- package/schema/schemas/pick.d.ts +1 -1
- package/schema/schemas/pick.js +2 -2
- package/schema/schemas/pick.js.map +1 -1
- package/schema/schemas/readable-stream.d.ts +2 -2
- package/schema/schemas/record.d.ts +2 -2
- package/schema/schemas/regexp.d.ts +2 -2
- package/schema/schemas/string.d.ts +2 -2
- package/schema/schemas/string.js +2 -2
- package/schema/schemas/string.js.map +1 -1
- package/schema/schemas/transform.d.ts +1 -1
- package/schema/schemas/uint8-array.d.ts +2 -2
- package/schema/schemas/uint8-array.js +2 -2
- package/schema/schemas/uint8-array.js.map +1 -1
- package/schema/schemas/union.d.ts +2 -2
- package/schema/schemas/union.js +1 -1
- package/schema/schemas/union.js.map +1 -1
- package/schema/schemas/unknown.d.ts +2 -2
- package/schema/transformers/generic.d.ts +3 -3
- package/schema/transformers/lowercase.d.ts +1 -1
- package/schema/transformers/trim.d.ts +1 -1
- package/schema/transformers/uppercase.d.ts +1 -1
- package/schema/types.d.ts +33 -33
- package/schema/types.js +2 -2
- package/schema/types.js.map +1 -1
- package/schema/utils/schema.d.ts +1 -1
- package/schema/utils/schema.js +5 -5
- package/schema/utils/schema.js.map +1 -1
- package/schema/utils/value-type.d.ts +1 -1
- package/schema/utils/value-type.js +2 -2
- package/schema/utils/value-type.js.map +1 -1
- package/search-index/elastic/config.d.ts +4 -4
- package/search-index/elastic/config.js +2 -2
- package/search-index/elastic/config.js.map +1 -1
- package/search-index/elastic/model/elastic-query.d.ts +15 -15
- package/search-index/elastic/model/index-mapping.d.ts +16 -16
- package/search-index/elastic/model/index-mapping.js +1 -1
- package/search-index/elastic/model/index-mapping.js.map +1 -1
- package/search-index/elastic/model/sort.d.ts +4 -4
- package/search-index/elastic/module.d.ts +3 -3
- package/search-index/elastic/module.js +4 -4
- package/search-index/elastic/module.js.map +1 -1
- package/search-index/elastic/query-builder/boolean-query-builder.js +3 -3
- package/search-index/elastic/query-builder/boolean-query-builder.js.map +1 -1
- package/search-index/elastic/query-converter.d.ts +2 -2
- package/search-index/elastic/query-converter.js +2 -2
- package/search-index/elastic/query-converter.js.map +1 -1
- package/search-index/elastic/search-index.d.ts +6 -6
- package/search-index/elastic/search-index.js +8 -8
- package/search-index/elastic/search-index.js.map +1 -1
- package/search-index/elastic/sort-converter.d.ts +1 -1
- package/search-index/error.d.ts +1 -1
- package/search-index/error.js +2 -2
- package/search-index/error.js.map +1 -1
- package/search-index/memory/memory-search-index.d.ts +1 -1
- package/search-index/memory/memory-search-index.js +7 -7
- package/search-index/memory/memory-search-index.js.map +1 -1
- package/search-index/search-index.d.ts +3 -3
- package/search-index/search-index.js +1 -1
- package/search-index/search-index.js.map +1 -1
- package/search-index/search-result.d.ts +3 -3
- package/serializer/handlers/binary.d.ts +2 -2
- package/serializer/handlers/binary.js +1 -1
- package/serializer/handlers/binary.js.map +1 -1
- package/serializer/handlers/error.d.ts +1 -1
- package/serializer/handlers/map.d.ts +1 -1
- package/serializer/handlers/regex.d.ts +1 -1
- package/serializer/handlers/register.js +2 -2
- package/serializer/handlers/register.js.map +1 -1
- package/serializer/handlers/set.d.ts +1 -1
- package/serializer/serializable.d.ts +7 -7
- package/serializer/serializable.js +1 -1
- package/serializer/serializable.js.map +1 -1
- package/serializer/serializer.d.ts +2 -2
- package/serializer/serializer.js +6 -6
- package/serializer/serializer.js.map +1 -1
- package/serializer/types.d.ts +16 -16
- package/sse/server-sent-events.d.ts +3 -3
- package/sse/server-sent-events.js +7 -7
- package/sse/server-sent-events.js.map +1 -1
- package/tailwind/colors.d.ts +2 -2
- package/tailwind/colors.js +2 -2
- package/tailwind/colors.js.map +1 -1
- package/templates/module.d.ts +2 -2
- package/templates/module.js +1 -1
- package/templates/module.js.map +1 -1
- package/templates/providers/file.provider-template.d.ts +4 -4
- package/templates/providers/file.provider-template.js +5 -4
- package/templates/providers/file.provider-template.js.map +1 -1
- package/templates/providers/memory.template-provider.js +2 -2
- package/templates/providers/memory.template-provider.js.map +1 -1
- package/templates/renderers/handlebars.template-renderer.d.ts +10 -10
- package/templates/renderers/handlebars.template-renderer.js +4 -4
- package/templates/renderers/handlebars.template-renderer.js.map +1 -1
- package/templates/renderers/mjml.template-renderer.d.ts +3 -3
- package/templates/renderers/mjml.template-renderer.js +1 -1
- package/templates/renderers/mjml.template-renderer.js.map +1 -1
- package/templates/renderers/string.template-renderer.d.ts +1 -1
- package/templates/renderers/string.template-renderer.js +1 -1
- package/templates/renderers/string.template-renderer.js.map +1 -1
- package/templates/resolvers/file.template-resolver.d.ts +5 -5
- package/templates/resolvers/file.template-resolver.js +3 -3
- package/templates/resolvers/file.template-resolver.js.map +1 -1
- package/templates/resolvers/string.template-resolver.d.ts +1 -1
- package/templates/resolvers/string.template-resolver.js +2 -2
- package/templates/resolvers/string.template-resolver.js.map +1 -1
- package/templates/template-renderer.provider.js +1 -1
- package/templates/template-renderer.provider.js.map +1 -1
- package/templates/template-resolver.provider.js +1 -1
- package/templates/template-resolver.provider.js.map +1 -1
- package/templates/template.model.d.ts +2 -2
- package/templates/template.model.js +1 -1
- package/templates/template.model.js.map +1 -1
- package/templates/template.renderer.d.ts +4 -4
- package/templates/template.service.d.ts +2 -2
- package/templates/template.service.js +4 -4
- package/templates/template.service.js.map +1 -1
- package/templates/tokens.d.ts +2 -2
- package/templates/tokens.js +1 -1
- package/templates/tokens.js.map +1 -1
- package/text/dynamic-text.model.d.ts +1 -1
- package/text/dynamic-text.model.js +2 -2
- package/text/dynamic-text.model.js.map +1 -1
- package/text/localizable-text.model.d.ts +1 -1
- package/text/localization.service.d.ts +13 -13
- package/text/localization.service.js +13 -13
- package/text/localization.service.js.map +1 -1
- package/threading/thread-pool.d.ts +4 -4
- package/threading/thread-pool.js +5 -5
- package/threading/thread-pool.js.map +1 -1
- package/threading/thread-worker.d.ts +2 -2
- package/threading/thread-worker.js +1 -1
- package/threading/thread-worker.js.map +1 -1
- package/types/geo-json.d.ts +13 -13
- package/types.d.ts +89 -89
- package/utils/any-iterable-iterator.d.ts +3 -3
- package/utils/array/array-backtracker.js +3 -3
- package/utils/array/array-backtracker.js.map +1 -1
- package/utils/async-iterable-helpers/buffer.js +1 -1
- package/utils/async-iterable-helpers/buffer.js.map +1 -1
- package/utils/async-iterable-helpers/parallel/types.d.ts +2 -2
- package/utils/async-iterable-helpers/types.d.ts +7 -7
- package/utils/backoff.d.ts +5 -5
- package/utils/base64.js +1 -1
- package/utils/base64.js.map +1 -1
- package/utils/benchmark.d.ts +1 -1
- package/utils/binary-search.d.ts +1 -1
- package/utils/binary.d.ts +1 -1
- package/utils/binary.js +1 -1
- package/utils/binary.js.map +1 -1
- package/utils/cancellation-token.d.ts +1 -1
- package/utils/cancellation-token.js +13 -13
- package/utils/cancellation-token.js.map +1 -1
- package/utils/clone.js +1 -1
- package/utils/clone.js.map +1 -1
- package/utils/compression.d.ts +1 -1
- package/utils/compression.js +3 -3
- package/utils/compression.js.map +1 -1
- package/utils/cryptography.d.ts +12 -12
- package/utils/date-time.d.ts +7 -7
- package/utils/encoding.d.ts +1 -1
- package/utils/encoding.js +1 -1
- package/utils/encoding.js.map +1 -1
- package/utils/enum.d.ts +1 -1
- package/utils/equals.d.ts +4 -4
- package/utils/factory-map.d.ts +1 -1
- package/utils/factory-map.js +3 -3
- package/utils/factory-map.js.map +1 -1
- package/utils/feedable-async-iterable.js +6 -6
- package/utils/feedable-async-iterable.js.map +1 -1
- package/utils/format-error.d.ts +2 -2
- package/utils/function/memoize.d.ts +1 -1
- package/utils/function/memoize.js +2 -2
- package/utils/function/memoize.js.map +1 -1
- package/utils/helpers.d.ts +1 -1
- package/utils/helpers.js +1 -1
- package/utils/helpers.js.map +1 -1
- package/utils/image.js +1 -1
- package/utils/image.js.map +1 -1
- package/utils/iterable-helpers/types.d.ts +6 -6
- package/utils/jwt.d.ts +4 -4
- package/utils/math.d.ts +1 -1
- package/utils/math.js +1 -1
- package/utils/math.js.map +1 -1
- package/utils/merge.d.ts +2 -2
- package/utils/middleware.d.ts +9 -9
- package/utils/moving-metric.d.ts +1 -1
- package/utils/object/decycle.d.ts +2 -2
- package/utils/object/decycle.js +1 -1
- package/utils/object/decycle.js.map +1 -1
- package/utils/object/dereference.d.ts +2 -2
- package/utils/object/dereference.js +1 -1
- package/utils/object/dereference.js.map +1 -1
- package/utils/object/forward-ref.d.ts +2 -2
- package/utils/object/lazy-property.d.ts +6 -6
- package/utils/object/merge.d.ts +1 -1
- package/utils/object/object.d.ts +1 -1
- package/utils/object/property-name.d.ts +6 -6
- package/utils/ordered-feedable-async-iterable.js +5 -5
- package/utils/ordered-feedable-async-iterable.js.map +1 -1
- package/utils/patch-worker.d.ts +2 -2
- package/utils/periodic-reporter.js +3 -3
- package/utils/periodic-reporter.js.map +1 -1
- package/utils/periodic-sampler.d.ts +1 -1
- package/utils/provider-function-iterable.d.ts +2 -2
- package/utils/proxy.d.ts +1 -1
- package/utils/reflection.d.ts +1 -1
- package/utils/singleton.d.ts +2 -2
- package/utils/sort.d.ts +2 -2
- package/utils/stream/size-limited-stream.d.ts +1 -1
- package/utils/stream/size-limited-stream.js +1 -1
- package/utils/stream/size-limited-stream.js.map +1 -1
- package/utils/stream/stream-helper-types.d.ts +5 -5
- package/utils/stream/stream-reader.js +1 -1
- package/utils/stream/stream-reader.js.map +1 -1
- package/utils/type-guards.d.ts +4 -4
- package/utils/type-guards.js +1 -1
- package/utils/type-guards.js.map +1 -1
- package/utils/url-builder.d.ts +4 -4
- package/utils/url-builder.js +1 -1
- package/utils/url-builder.js.map +1 -1
- package/utils/z-base32.d.ts +1 -1
- package/web-types.d.ts +4 -4
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Uint8ArrayProperty = exports.uint8Array = void 0;
|
|
5
|
-
const array_1 = require("
|
|
6
|
-
const type_guards_1 = require("
|
|
5
|
+
const array_1 = require("#/utils/array/array");
|
|
6
|
+
const type_guards_1 = require("#/utils/type-guards");
|
|
7
7
|
const uint8_array_coercer_1 = require("../coercers/uint8-array.coercer");
|
|
8
8
|
const maximum_length_1 = require("../constraints/maximum-length");
|
|
9
9
|
const minimum_length_1 = require("../constraints/minimum-length");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uint8-array.js","sourceRoot":"","sources":["../../../source/schema/schemas/uint8-array.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;AAGzD
|
|
1
|
+
{"version":3,"file":"uint8-array.js","sourceRoot":"","sources":["../../../source/schema/schemas/uint8-array.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;AAGzD,+CAA8C;AAC9C,qDAAgD;AAChD,yEAAoE;AACpE,kEAAwE;AACxE,kEAAwE;AACxE,+CAA8E;AAE9E,oCAAuC;AAUvC,SAAgB,UAAU,CAAC,UAAmC,EAAE;IAC9D,MAAM,QAAQ,GAAyB,IAAA,eAAO,EAAC,OAAO,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;IACvE,MAAM,gBAAgB,GAA4B,IAAA,eAAO,EAAC,OAAO,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC;IAE1F,IAAI,OAAO,CAAC,MAAM,IAAI,IAAI,EAAE;QAC1B,QAAQ,CAAC,IAAI,CAAC,uCAAiB,CAAC,CAAC;KAClC;IAED,IAAI,IAAA,uBAAS,EAAC,OAAO,CAAC,aAAa,CAAC,EAAE;QACpC,gBAAgB,CAAC,IAAI,CAAC,IAAI,wCAAuB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC;KAC3E;IAED,IAAI,IAAA,uBAAS,EAAC,OAAO,CAAC,aAAa,CAAC,EAAE;QACpC,gBAAgB,CAAC,IAAI,CAAC,IAAI,wCAAuB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC;KAC3E;IAED,OAAO,IAAA,mBAAW,EAAC,UAAU,EAAE;QAC7B,GAAG,OAAO;QACV,QAAQ;QACR,gBAAgB;KACjB,CAAC,CAAC;AACL,CAAC;AArBD,gCAqBC;AAED,SAAgB,kBAAkB,CAAC,OAAiC;IAClE,OAAO,IAAA,+CAAuC,EAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;AACtE,CAAC;AAFD,gDAEC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Decorator } from
|
|
1
|
+
import type { Decorator } from '#/reflection';
|
|
2
2
|
import type { SchemaTestable } from '../schema';
|
|
3
3
|
import type { SchemaOutput, ValueSchema, ValueSchemaOptions } from '../types';
|
|
4
|
-
export
|
|
4
|
+
export type UnionOptions = ValueSchemaOptions;
|
|
5
5
|
export declare function union<T extends SchemaTestable[]>(...schemas: [...T]): ValueSchema<SchemaOutput<T[number]>>;
|
|
6
6
|
export declare function union<T extends SchemaTestable[]>(schemas: [...T], options?: UnionOptions): ValueSchema<SchemaOutput<T[number]>>;
|
|
7
7
|
export declare function Union(...schemas: SchemaTestable[]): Decorator<'property' | 'accessor'>;
|
package/schema/schemas/union.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Union = exports.union = void 0;
|
|
5
|
-
const type_guards_1 = require("
|
|
5
|
+
const type_guards_1 = require("#/utils/type-guards");
|
|
6
6
|
const decorators_1 = require("../decorators");
|
|
7
7
|
const types_1 = require("../types");
|
|
8
8
|
function union(...args) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"union.js","sourceRoot":"","sources":["../../../source/schema/schemas/union.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;AAGzD,
|
|
1
|
+
{"version":3,"file":"union.js","sourceRoot":"","sources":["../../../source/schema/schemas/union.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;AAGzD,qDAAsD;AACtD,8CAAwE;AAGxE,oCAAuC;AAMvC,SAAgB,KAAK,CAA6B,GAAG,IAA8C;IACjG,MAAM,OAAO,GAAG,IAAA,qBAAO,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAS,CAAC;IACvD,MAAM,OAAO,GAAG,IAAA,qBAAO,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAiB,CAAC,CAAC,CAAC,SAAS,CAAC;IAEvE,IAAA,oBAAM,EAAC,OAAO,CAAC,MAAM,IAAI,CAAC,EAAE,oCAAoC,CAAC,CAAC;IAClE,OAAO,IAAA,mBAAW,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACvC,CAAC;AAND,sBAMC;AAED,SAAgB,KAAK,CAAC,GAAG,OAAyB;IAChD,OAAO,IAAA,oDAAuC,EAAC,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;AACpE,CAAC;AAFD,sBAEC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Decorator } from
|
|
1
|
+
import type { Decorator } from '#/reflection';
|
|
2
2
|
import type { ValueSchema, ValueSchemaOptions } from '../types';
|
|
3
|
-
export
|
|
3
|
+
export type UnknownOptions = ValueSchemaOptions;
|
|
4
4
|
export declare function unknown(options?: UnknownOptions): ValueSchema<unknown>;
|
|
5
5
|
export declare function UnknownProperty(options?: UnknownOptions): Decorator<'property' | 'accessor'>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Decorator } from
|
|
2
|
-
import type { AbstractConstructor, OneOrMany } from
|
|
1
|
+
import type { Decorator } from '#/reflection';
|
|
2
|
+
import type { AbstractConstructor, OneOrMany } from '#/types';
|
|
3
3
|
import type { TransformResult, ValueType } from '../types';
|
|
4
4
|
import { SchemaValueTransformer } from '../types';
|
|
5
|
-
export
|
|
5
|
+
export type GenericTransformFunction<T, O> = (value: T) => TransformResult<O>;
|
|
6
6
|
export declare class GenericTransformer<T, O> extends SchemaValueTransformer<T, O> {
|
|
7
7
|
readonly sourceType?: OneOrMany<ValueType<T>>;
|
|
8
8
|
readonly transformFunction: GenericTransformFunction<T, O>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Decorator } from
|
|
1
|
+
import type { Decorator } from '#/reflection';
|
|
2
2
|
import type { TransformResult } from '../types';
|
|
3
3
|
import { SchemaValueTransformer } from '../types';
|
|
4
4
|
export declare class LowercaseTransformer extends SchemaValueTransformer<string, string> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Decorator } from
|
|
1
|
+
import type { Decorator } from '#/reflection';
|
|
2
2
|
import type { TransformResult } from '../types';
|
|
3
3
|
import { SchemaValueTransformer } from '../types';
|
|
4
4
|
export declare class TrimTransformer extends SchemaValueTransformer<string, string> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Decorator } from
|
|
1
|
+
import type { Decorator } from '#/reflection';
|
|
2
2
|
import type { TransformResult } from '../types';
|
|
3
3
|
import { SchemaValueTransformer } from '../types';
|
|
4
4
|
export declare class UppercaseTransformer extends SchemaValueTransformer<string, string> {
|
package/schema/types.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import type { JsonPath } from
|
|
2
|
-
import type { AbstractConstructor, OneOrMany, Record, Type, TypedOmit } from
|
|
1
|
+
import type { JsonPath } from '#/json-path/json-path';
|
|
2
|
+
import type { AbstractConstructor, OneOrMany, Record, Type, TypedOmit } from '#/types';
|
|
3
3
|
import type { NormalizedSchema, Schema, SchemaTestable } from './schema';
|
|
4
4
|
import type { SchemaError } from './schema.error';
|
|
5
5
|
declare const schemaOutputTypeSymbol: unique symbol;
|
|
6
|
-
export
|
|
7
|
-
export
|
|
6
|
+
export type SchemaFactoryFunction<T> = (data: T) => T;
|
|
7
|
+
export type SchemaFactory<T> = {
|
|
8
8
|
type: Type<T>;
|
|
9
9
|
builder?: undefined;
|
|
10
10
|
} | {
|
|
11
11
|
type?: undefined;
|
|
12
12
|
builder: SchemaFactoryFunction<T>;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type ObjectSchemaProperties<T> = {
|
|
15
15
|
[K in keyof T]-?: OneOrMany<SchemaTestable<T[K]>>;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type NormalizedObjectSchemaProperties<T> = {
|
|
18
18
|
[K in keyof T]-?: Schema<T[K]>;
|
|
19
19
|
};
|
|
20
|
-
export
|
|
21
|
-
export
|
|
20
|
+
export type SchemaOutput<T extends SchemaTestable> = T extends ObjectSchema<infer O> ? O : T extends ValueSchema<infer O> ? O : T extends TypeSchema<infer O> ? O : T extends ValueType<infer O> ? NormalizeValueType<O> : never;
|
|
21
|
+
export type TupleSchemaOutput<T extends readonly SchemaTestable[]> = {
|
|
22
22
|
[P in keyof T]: SchemaOutput<T[P]>;
|
|
23
23
|
};
|
|
24
|
-
export
|
|
25
|
-
export
|
|
24
|
+
export type ObjectSchemaOrType<T = any> = ObjectSchema<T> | AbstractConstructor<T>;
|
|
25
|
+
export type ObjectSchema<T = any> = {
|
|
26
26
|
[schemaOutputTypeSymbol]?: T;
|
|
27
27
|
sourceType?: ValueType;
|
|
28
28
|
factory?: SchemaFactory<T>;
|
|
@@ -30,13 +30,13 @@ export declare type ObjectSchema<T = any> = {
|
|
|
30
30
|
mask?: boolean;
|
|
31
31
|
allowUnknownProperties?: OneOrMany<SchemaTestable>;
|
|
32
32
|
};
|
|
33
|
-
export
|
|
33
|
+
export type TypeSchema<T = any> = {
|
|
34
34
|
type: ValueType<T>;
|
|
35
35
|
};
|
|
36
|
-
export
|
|
36
|
+
export type NormalizedTypeSchema<T = any> = {
|
|
37
37
|
foo: ResolvedValueType<T>;
|
|
38
38
|
};
|
|
39
|
-
export
|
|
39
|
+
export type ValueSchema<T = unknown> = {
|
|
40
40
|
[schemaOutputTypeSymbol]?: T;
|
|
41
41
|
schema: OneOrMany<SchemaTestable<T>>;
|
|
42
42
|
array?: boolean;
|
|
@@ -50,15 +50,15 @@ export declare type ValueSchema<T = unknown> = {
|
|
|
50
50
|
arrayConstraints?: OneOrMany<SchemaArrayConstraint>;
|
|
51
51
|
valueConstraints?: OneOrMany<SchemaValueConstraint>;
|
|
52
52
|
};
|
|
53
|
-
export
|
|
54
|
-
export
|
|
53
|
+
export type ValueSchemaOptions = TypedOmit<ValueSchema, 'schema' | typeof schemaOutputTypeSymbol>;
|
|
54
|
+
export type NormalizedObjectSchema<T = any> = {
|
|
55
55
|
[schemaOutputTypeSymbol]?: T;
|
|
56
56
|
factory?: SchemaFactory<T>;
|
|
57
57
|
properties: NormalizedObjectSchemaProperties<T>;
|
|
58
58
|
mask?: boolean;
|
|
59
59
|
allowUnknownProperties: Set<Schema>;
|
|
60
60
|
};
|
|
61
|
-
export
|
|
61
|
+
export type NormalizedValueSchema<T = any> = {
|
|
62
62
|
[schemaOutputTypeSymbol]?: T;
|
|
63
63
|
schema: Set<Schema<T>>;
|
|
64
64
|
array: boolean;
|
|
@@ -70,21 +70,21 @@ export declare type NormalizedValueSchema<T = any> = {
|
|
|
70
70
|
arrayConstraints: readonly SchemaArrayConstraint[];
|
|
71
71
|
valueConstraints: readonly SchemaValueConstraint[];
|
|
72
72
|
};
|
|
73
|
-
export
|
|
73
|
+
export type SchemaContext = {
|
|
74
74
|
schema: NormalizedSchema;
|
|
75
75
|
options: SchemaTestOptions;
|
|
76
76
|
};
|
|
77
|
-
export
|
|
78
|
-
export
|
|
79
|
-
export
|
|
80
|
-
export
|
|
81
|
-
export
|
|
82
|
-
export
|
|
83
|
-
export
|
|
77
|
+
export type ConstraintContext = SchemaContext;
|
|
78
|
+
export type TransformerContext = SchemaContext;
|
|
79
|
+
export type CoercerContext = SchemaContext;
|
|
80
|
+
export type NormalizeValueType<T> = T extends String ? string : T extends Number ? number : T extends Boolean ? boolean : T extends BigInt ? bigint : T extends Symbol ? symbol : T extends 'undefined' ? undefined : T extends 'null' ? null : T extends 'any' ? any : T;
|
|
81
|
+
export type NormalizeToValueType<T> = T extends string | String ? typeof String : T extends number ? typeof Number : T extends boolean ? typeof Boolean : T extends bigint ? typeof BigInt : T extends symbol ? typeof Symbol : T extends undefined ? 'undefined' : T extends null ? 'null' : T extends any ? 'any' : never;
|
|
82
|
+
export type ValueType<T = any> = AbstractConstructor<T> | NormalizeToValueType<T> | DeferredValueType<T>;
|
|
83
|
+
export type DeferredValueType<T = any> = {
|
|
84
84
|
deferred: () => ValueType<T>;
|
|
85
85
|
};
|
|
86
|
-
export
|
|
87
|
-
export
|
|
86
|
+
export type ResolvedValueType<T = any> = Exclude<ValueType<T>, DeferredValueType>;
|
|
87
|
+
export type Coercible = {
|
|
88
88
|
coerce?: boolean;
|
|
89
89
|
};
|
|
90
90
|
export declare const primitiveConstructors: ValueType[];
|
|
@@ -92,7 +92,7 @@ export declare const primitiveConstructorSet: Set<ValueType<any>>;
|
|
|
92
92
|
export declare abstract class SchemaArrayConstraint {
|
|
93
93
|
abstract validate(value: readonly unknown[], path: JsonPath, context: ConstraintContext): ConstraintResult;
|
|
94
94
|
}
|
|
95
|
-
export
|
|
95
|
+
export type OptionKeys<T extends Record> = readonly (keyof T)[];
|
|
96
96
|
export declare abstract class SchemaValueConstraint {
|
|
97
97
|
abstract readonly suitableTypes: OneOrMany<ValueType>;
|
|
98
98
|
abstract readonly expects: OneOrMany<string>;
|
|
@@ -107,7 +107,7 @@ export declare abstract class SchemaValueCoercer {
|
|
|
107
107
|
abstract readonly targetType: ValueType;
|
|
108
108
|
abstract coerce(value: unknown, path: JsonPath, context: CoercerContext): CoerceResult;
|
|
109
109
|
}
|
|
110
|
-
export
|
|
110
|
+
export type SchemaTestOptions = {
|
|
111
111
|
/**
|
|
112
112
|
* Try to convert wrong input into desired output.
|
|
113
113
|
* Can be specified on definition and validation. If specified on both, definition has higher priority
|
|
@@ -123,7 +123,7 @@ export declare type SchemaTestOptions = {
|
|
|
123
123
|
*/
|
|
124
124
|
fastErrors?: boolean;
|
|
125
125
|
};
|
|
126
|
-
export
|
|
126
|
+
export type SchemaTestResult<T> = {
|
|
127
127
|
valid: true;
|
|
128
128
|
value: T;
|
|
129
129
|
error?: undefined;
|
|
@@ -132,14 +132,14 @@ export declare type SchemaTestResult<T> = {
|
|
|
132
132
|
value?: undefined;
|
|
133
133
|
error: SchemaError;
|
|
134
134
|
};
|
|
135
|
-
export
|
|
135
|
+
export type ConstraintResult = {
|
|
136
136
|
valid: true;
|
|
137
137
|
error?: undefined;
|
|
138
138
|
} | {
|
|
139
139
|
valid: false;
|
|
140
140
|
error: SchemaError;
|
|
141
141
|
};
|
|
142
|
-
export
|
|
142
|
+
export type CoerceResult = {
|
|
143
143
|
success: true;
|
|
144
144
|
value: any;
|
|
145
145
|
error?: undefined;
|
|
@@ -149,10 +149,10 @@ export declare type CoerceResult = {
|
|
|
149
149
|
error: SchemaError;
|
|
150
150
|
};
|
|
151
151
|
export declare const transformErrorResultSymbol: unique symbol;
|
|
152
|
-
export
|
|
152
|
+
export type TransformErrorResult = {
|
|
153
153
|
[transformErrorResultSymbol]: SchemaError;
|
|
154
154
|
};
|
|
155
|
-
export
|
|
155
|
+
export type TransformResult<T> = T | TransformErrorResult;
|
|
156
156
|
export declare function transformErrorResult(error: SchemaError): TransformErrorResult;
|
|
157
157
|
export declare function isTransformErrorResult(value: any): value is TransformErrorResult;
|
|
158
158
|
export declare function objectSchemaProperties<T extends Record>(properties: ObjectSchemaProperties<T>): ObjectSchemaProperties<T>;
|
package/schema/types.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.schemaTestableToSchema = exports.valueTypesOrSchemasToSchemas = exports.resolveValueType = exports.resolveValueTypes = exports.isDeferredValueType = exports.isTypeSchema = exports.isValueSchema = exports.isObjectSchema = exports.isSchema = exports.typeSchema = exports.valueSchema = exports.objectSchema = exports.objectSchemaProperties = exports.isTransformErrorResult = exports.transformErrorResult = exports.transformErrorResultSymbol = exports.SchemaValueCoercer = exports.SchemaValueTransformer = exports.SchemaValueConstraint = exports.SchemaArrayConstraint = exports.primitiveConstructorSet = exports.primitiveConstructors = void 0;
|
|
5
|
-
const object_1 = require("
|
|
6
|
-
const type_guards_1 = require("
|
|
5
|
+
const object_1 = require("#/utils/object/object");
|
|
6
|
+
const type_guards_1 = require("#/utils/type-guards");
|
|
7
7
|
exports.primitiveConstructors = [String, Number, Boolean, Symbol, BigInt, Function, 'undefined', 'null'];
|
|
8
8
|
exports.primitiveConstructorSet = new Set(exports.primitiveConstructors);
|
|
9
9
|
class SchemaArrayConstraint {
|
package/schema/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../source/schema/types.ts"],"names":[],"mappings":";AAAA,iDAAiD;;;AAIjD,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../source/schema/types.ts"],"names":[],"mappings":";AAAA,iDAAiD;;;AAIjD,kDAAqE;AACrE,qDAA+E;AAqHlE,QAAA,qBAAqB,GAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAwC,EAAE,MAAwC,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;AAClL,QAAA,uBAAuB,GAAG,IAAI,GAAG,CAAC,6BAAqB,CAAC,CAAC;AAEtE,MAAsB,qBAAqB;CAE1C;AAFD,sDAEC;AAID,MAAsB,qBAAqB;CAK1C;AALD,sDAKC;AAED,MAAsB,sBAAsB;CAI3C;AAJD,wDAIC;AAED,MAAsB,kBAAkB;CAKvC;AALD,gDAKC;AAkCY,QAAA,0BAA0B,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAKpE,SAAgB,oBAAoB,CAAC,KAAkB;IACrD,OAAO,EAAE,CAAC,kCAA0B,CAAC,EAAE,KAAK,EAAE,CAAC;AACjD,CAAC;AAFD,oDAEC;AAED,SAAgB,sBAAsB,CAAC,KAAU;IAC/C,OAAO,IAAA,sBAAQ,EAAC,KAAK,CAAC,IAAI,IAAA,uBAAc,EAAC,KAA6B,EAAE,kCAA0B,CAAC,CAAC;AACtG,CAAC;AAFD,wDAEC;AAED,SAAgB,sBAAsB,CAAmB,UAAqC;IAC5F,OAAO,IAAA,qBAAY,EAAC,UAAU,EAAE,uBAAS,CAA8B,CAAC;AAC1E,CAAC;AAFD,wDAEC;AAED,SAAgB,YAAY,CAAmB,MAAuB;IACpE,OAAO,IAAA,qBAAY,EAAC,MAAM,EAAE,uBAAS,CAAoB,CAAC;AAC5D,CAAC;AAFD,oCAEC;AAED,SAAgB,WAAW,CAAI,MAAoC,EAAE,OAA6C;IAChH,OAAO,IAAA,qBAAY,EAAC,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C,QAAQ,CAAC,CAAC;AAC9E,CAAC;AAFD,kDAEC;AAED,SAAgB,iBAAiB,CAAI,UAAmC;IACtE,IAAI,IAAA,qBAAO,EAAC,UAAU,CAAC,EAAE;QACvB,OAAO,UAAU,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;KACzC;IAED,OAAO,gBAAgB,CAAC,UAAU,CAAC,CAAC;AACtC,CAAC;AAND,8CAMC;AAED,SAAgB,gBAAgB,CAAI,SAAuB;IACzD,OAAO,mBAAmB,CAAC,SAAS,CAAC;QACnC,CAAC,CAAC,gBAAgB,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;QACxC,CAAC,CAAC,SAAiC,CAAC;AACxC,CAAC;AAJD,4CAIC;AAED,SAAgB,4BAA4B,CAAI,mBAAiD;IAC/F,IAAI,IAAA,qBAAO,EAAC,mBAAmB,CAAC,EAAE;QAChC,OAAO,mBAAmB,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;KACxD;IAED,OAAO,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;AACrD,CAAC;AAND,oEAMC;AAED,SAAgB,sBAAsB,CAAI,iBAAoC;IAC5E,IAAI,QAAQ,CAAI,iBAAiB,CAAC,EAAE;QAClC,OAAO,iBAAiB,CAAC;KAC1B;IAED,OAAO,UAAU,CAAC,iBAAiB,CAAc,CAAC;AACpD,CAAC;AAND,wDAMC"}
|
package/schema/utils/schema.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AbstractConstructor } from
|
|
1
|
+
import type { AbstractConstructor } from '#/types';
|
|
2
2
|
import type { NormalizedSchema, Schema } from '../schema';
|
|
3
3
|
import type { NormalizedObjectSchema, NormalizedTypeSchema, NormalizedValueSchema, ObjectSchema, ObjectSchemaOrType, TypeSchema, ValueSchema } from '../types';
|
|
4
4
|
export declare const normalizeSchema: typeof _normalizeSchema;
|
package/schema/utils/schema.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getObjectSchemaFromReflection = exports.getObjectSchema = exports.tryGetObjectSchemaFromReflection = exports.getArrayItemSchema = exports.normalizeTypeSchema = exports.normalizeValueSchema = exports.normalizeObjectSchema = exports.normalizeSchema = void 0;
|
|
4
|
-
const registry_1 = require("
|
|
5
|
-
const array_1 = require("
|
|
6
|
-
const memoize_1 = require("
|
|
7
|
-
const object_1 = require("
|
|
8
|
-
const type_guards_1 = require("
|
|
4
|
+
const registry_1 = require("#/reflection/registry");
|
|
5
|
+
const array_1 = require("#/utils/array/array");
|
|
6
|
+
const memoize_1 = require("#/utils/function/memoize");
|
|
7
|
+
const object_1 = require("#/utils/object/object");
|
|
8
|
+
const type_guards_1 = require("#/utils/type-guards");
|
|
9
9
|
const assign_1 = require("../schemas/assign");
|
|
10
10
|
const types_1 = require("../types");
|
|
11
11
|
exports.normalizeSchema = (0, memoize_1.memoizeSingle)(_normalizeSchema, { weak: true });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../source/schema/utils/schema.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../source/schema/utils/schema.ts"],"names":[],"mappings":";;;AACA,oDAA2D;AAE3D,+CAA8C;AAC9C,sDAAyD;AACzD,kDAAwD;AACxD,qDAAqG;AAGrG,8CAA2C;AAE3C,oCAA0K;AAE7J,QAAA,eAAe,GAAG,IAAA,uBAAa,EAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AAClE,QAAA,qBAAqB,GAAG,IAAA,uBAAa,EAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9E,QAAA,oBAAoB,GAAG,IAAA,uBAAa,EAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AA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#/types';
|
|
2
2
|
import type { SchemaTestable } from '../schema';
|
|
3
3
|
import type { ResolvedValueType, ValueType } from '../types';
|
|
4
4
|
export declare function getValueType(value: unknown): ResolvedValueType;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getSchemaValueTypes = exports.getSchemaTypeNames = exports.getValueTypeName = exports.includesValueType = exports.getValueType = void 0;
|
|
4
|
-
const array_1 = require("
|
|
5
|
-
const type_guards_1 = require("
|
|
4
|
+
const array_1 = require("#/utils/array/array");
|
|
5
|
+
const type_guards_1 = require("#/utils/type-guards");
|
|
6
6
|
const types_1 = require("../types");
|
|
7
7
|
function getValueType(value) {
|
|
8
8
|
if ((0, type_guards_1.isUndefined)(value)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value-type.js","sourceRoot":"","sources":["../../../source/schema/utils/value-type.ts"],"names":[],"mappings":";;;AACA
|
|
1
|
+
{"version":3,"file":"value-type.js","sourceRoot":"","sources":["../../../source/schema/utils/value-type.ts"],"names":[],"mappings":";;;AACA,+CAA8C;AAC9C,qDAAyF;AAGzF,oCAAiI;AAEjI,SAAgB,YAAY,CAAC,KAAc;IACzC,IAAI,IAAA,yBAAW,EAAC,KAAK,CAAC,EAAE;QACtB,OAAO,WAAW,CAAC;KACpB;IAED,IAAI,IAAA,oBAAM,EAAC,KAAK,CAAC,EAAE;QACjB,OAAO,MAAM,CAAC;KACf;IAED,OAAQ,KAAgB,CAAC,WAAkC,CAAC;AAC9D,CAAC;AAVD,oCAUC;AAED,SAAgB,iBAAiB,CAAC,SAAoB,EAAE,UAAgC;IACtF,MAAM,kBAAkB,GAAG,IAAA,yBAAiB,EAAC,UAAU,CAAC,CAAC;IACzD,MAAM,iBAAiB,GAAG,IAAA,wBAAgB,EAAC,SAAS,CAAC,CAAC;IAEtD,IAAI,IAAA,qBAAO,EAAC,kBAAkB,CAAC,EAAE;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,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;KAC1E;IAED,IAAI,IAAA,2BAAmB,EAAC,MAAM,CAAC,EAAE;QAC/B,OAAO,mBAAmB,CAAC,IAAA,wBAAgB,EAAC,MAAM,CAAC,CAAC,CAAC;KACtD;IAED,IAAI,IAAA,qBAAO,EAAC,MAAM,CAAC,EAAE;QACnB,OAAO,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;KAC5C;IAED,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;AACxC,CAAC;AA9BD,kDA8BC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Injectable } from
|
|
2
|
-
import { resolveArgumentType } from
|
|
3
|
-
import type { Entity } from
|
|
4
|
-
export
|
|
1
|
+
import type { Injectable } from '#/container';
|
|
2
|
+
import { resolveArgumentType } from '#/container';
|
|
3
|
+
import type { Entity } from '#/database';
|
|
4
|
+
export type ElasticSearchIndexConfigArgument<T extends Entity = Entity> = string | ElasticSearchIndexConfig<T>;
|
|
5
5
|
export declare abstract class ElasticSearchIndexConfig<T extends Entity = Entity> implements Injectable<ElasticSearchIndexConfigArgument> {
|
|
6
6
|
readonly indexName: string;
|
|
7
7
|
readonly [resolveArgumentType]: ElasticSearchIndexConfigArgument<T>;
|
|
@@ -13,8 +13,8 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.ElasticSearchIndexConfig = void 0;
|
|
16
|
-
const container_1 = require("
|
|
17
|
-
const type_guards_1 = require("
|
|
16
|
+
const container_1 = require("#/container");
|
|
17
|
+
const type_guards_1 = require("#/utils/type-guards");
|
|
18
18
|
let ElasticSearchIndexConfig = class ElasticSearchIndexConfig {
|
|
19
19
|
constructor(indexNameOrConfig) {
|
|
20
20
|
this.indexName = (0, type_guards_1.isString)(indexNameOrConfig) ? indexNameOrConfig : indexNameOrConfig.indexName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../source/search-index/elastic/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../source/search-index/elastic/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,2CAAyE;AAEzE,qDAA+C;AAKxC,IAAe,wBAAwB,GAAvC,MAAe,wBAAwB;IAI5C,YAAyB,iBAAuD;QAC9E,IAAI,CAAC,SAAS,GAAG,IAAA,sBAAQ,EAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,iBAAiB,CAAC,SAAS,CAAC;IACjG,CAAC;CACF,CAAA;AAPqB,wBAAwB;IAD7C,IAAA,sBAAU,GAAE;IAKE,WAAA,IAAA,qBAAS,GAAE,CAAA;;GAJJ,wBAAwB,CAO7C;AAPqB,4DAAwB"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
2
|
+
export type ElasticQuery = QueryDslQueryContainer;
|
|
3
|
+
export type ElasticBooleanQuery = Required<Pick<QueryDslQueryContainer, 'bool'>>;
|
|
4
|
+
export type ElasticIdsQuery = Required<Pick<QueryDslQueryContainer, 'ids'>>;
|
|
5
|
+
export type ElasticMatchAllQuery = Required<Pick<QueryDslQueryContainer, 'match_all'>>;
|
|
6
|
+
export type ElasticRangeQuery = Required<Pick<QueryDslQueryContainer, 'range'>>;
|
|
7
|
+
export type ElasticRegexQuery = Required<Pick<QueryDslQueryContainer, 'regexp'>>;
|
|
8
|
+
export type ElasticTermQuery = Required<Pick<QueryDslQueryContainer, 'term'>>;
|
|
9
|
+
export type ElasticTermsQuery = Required<Pick<QueryDslQueryContainer, 'terms'>>;
|
|
10
|
+
export type ElasticMatchQuery = Required<Pick<QueryDslQueryContainer, 'match'>>;
|
|
11
|
+
export type ElasticExistsQuery = Required<Pick<QueryDslQueryContainer, 'exists'>>;
|
|
12
|
+
export type ElasticMultiMatchQuery = Required<Pick<QueryDslQueryContainer, 'multi_match'>>;
|
|
13
|
+
export type ElasticGeoBoundingBoxQuery = Required<Pick<QueryDslQueryContainer, 'geo_bounding_box'>>;
|
|
14
|
+
export type ElasticGeoDistanceQuery = Required<Pick<QueryDslQueryContainer, 'geo_distance'>>;
|
|
15
|
+
export type ElasticGeoPolygonQuery = Required<Pick<QueryDslQueryContainer, 'geo_polygon'>>;
|
|
16
|
+
export type ElasticGeoShapeQuery = Required<Pick<QueryDslQueryContainer, 'geo_shape'>>;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import type { Entity } from
|
|
2
|
-
import type { DeepFlatten, StringMap, TypedOmit } from
|
|
1
|
+
import type { Entity } from '#/database';
|
|
2
|
+
import type { DeepFlatten, StringMap, TypedOmit } from '#/types';
|
|
3
3
|
import type { MappingBooleanProperty, MappingByteNumberProperty, MappingDateProperty, MappingDoubleNumberProperty, MappingFloatNumberProperty, MappingGeoPointProperty, MappingHalfFloatNumberProperty, MappingIntegerNumberProperty, MappingKeywordProperty, MappingLongNumberProperty, MappingNestedProperty, MappingObjectProperty, MappingPropertyBase, MappingScaledFloatNumberProperty, MappingShortNumberProperty, MappingTextProperty, MappingTypeMapping, MappingUnsignedLongNumberProperty } from '@elastic/elasticsearch/lib/api/types';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type ElasticIndexMapping<T extends Entity = Entity> = TypedOmit<MappingTypeMapping, 'properties'> & ElasticNestedIndexMapping<TypedOmit<T, 'id'>>;
|
|
5
|
+
export type ElasticNestedIndexMapping<T> = {
|
|
6
6
|
properties: {
|
|
7
7
|
[P in keyof Required<T>]: ElasticIndexMappingItem<DeepFlatten<Required<T>[P]>>;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
type StrippedBaseType<T extends MappingPropertyBase> = TypedOmit<T, 'properties' | 'fields'>;
|
|
11
|
+
type ElasticIndexMappingItemBase = {
|
|
12
12
|
index?: boolean;
|
|
13
13
|
fields?: StringMap<ElasticIndexMappingItem>;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
15
|
+
export type MappingNumberProperty = MappingByteNumberProperty | MappingDoubleNumberProperty | MappingFloatNumberProperty | MappingHalfFloatNumberProperty | MappingIntegerNumberProperty | MappingLongNumberProperty | MappingShortNumberProperty | MappingScaledFloatNumberProperty | MappingUnsignedLongNumberProperty;
|
|
16
|
+
export type ElasticKeywordIndexMappingItem = ElasticIndexMappingItemBase & StrippedBaseType<MappingKeywordProperty>;
|
|
17
|
+
export type ElasticTextIndexMappingItem = ElasticIndexMappingItemBase & StrippedBaseType<MappingTextProperty>;
|
|
18
|
+
export type ElasticNumberIndexMappingItem = ElasticIndexMappingItemBase & StrippedBaseType<MappingNumberProperty>;
|
|
19
|
+
export type ElasticBooleanIndexMappingItem = ElasticIndexMappingItemBase & StrippedBaseType<MappingBooleanProperty>;
|
|
20
|
+
export type ElasticDateIndexMappingItem = ElasticIndexMappingItemBase & StrippedBaseType<MappingDateProperty>;
|
|
21
|
+
export type ElasticGeoPointIndexMappingItem = ElasticIndexMappingItemBase & StrippedBaseType<MappingGeoPointProperty>;
|
|
22
|
+
export type ElasticObjectIndexMappingItem<T> = ElasticIndexMappingItemBase & StrippedBaseType<MappingObjectProperty> & ElasticNestedIndexMapping<T>;
|
|
23
|
+
export type ElasticNestedIndexMappingItem<T> = ElasticIndexMappingItemBase & StrippedBaseType<MappingNestedProperty> & ElasticNestedIndexMapping<T>;
|
|
24
|
+
export type ElasticIndexMappingItem<T = any> = ElasticKeywordIndexMappingItem | ElasticTextIndexMappingItem | ElasticNumberIndexMappingItem | ElasticBooleanIndexMappingItem | ElasticDateIndexMappingItem | ElasticGeoPointIndexMappingItem | ElasticObjectIndexMappingItem<T> | ElasticNestedIndexMappingItem<T>;
|
|
25
25
|
export declare function mergeElasticSearchMappings<T extends Entity>(mappings: ElasticIndexMapping<T>[]): ElasticIndexMapping<T>;
|
|
26
26
|
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.mergeElasticSearchMappings = void 0;
|
|
5
|
-
const merge_1 = require("
|
|
5
|
+
const merge_1 = require("#/utils/object/merge");
|
|
6
6
|
function mergeElasticSearchMappings(mappings) {
|
|
7
7
|
return (0, merge_1.mergeObjects)(mappings);
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-mapping.js","sourceRoot":"","sources":["../../../../source/search-index/elastic/model/index-mapping.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;AAIzD,
|
|
1
|
+
{"version":3,"file":"index-mapping.js","sourceRoot":"","sources":["../../../../source/search-index/elastic/model/index-mapping.ts"],"names":[],"mappings":";AAAA,yDAAyD;;;AAIzD,gDAAoD;AAqDpD,SAAgB,0BAA0B,CAAmB,QAAkC;IAC7F,OAAO,IAAA,oBAAY,EAAC,QAAQ,CAAC,CAAC;AAChC,CAAC;AAFD,gEAEC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Entity } from
|
|
1
|
+
import type { Entity } from '#/database';
|
|
2
2
|
import type { SortOptions as ElasticSortOptions, SortOptionsKeys } from '@elastic/elasticsearch/lib/api/types';
|
|
3
3
|
export type { SortOrder } from '@elastic/elasticsearch/lib/api/types';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
4
|
+
export type Sort<T extends Entity = Entity> = SortCombinations<T> | SortCombinations<T>[];
|
|
5
|
+
export type SortCombinations<T extends Entity = Entity> = keyof T | SortOptions<T>;
|
|
6
|
+
export type SortOptions<T extends Entity = Entity> = SortOptionsKeys & {
|
|
7
7
|
[P in keyof T]?: ElasticSortOptions[string];
|
|
8
8
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { Entity } from
|
|
1
|
+
import type { Entity } from '#/database';
|
|
2
2
|
import type { ClientOptions } from '@elastic/elasticsearch';
|
|
3
3
|
import type { ElasticSearchIndexConfigArgument } from './config';
|
|
4
4
|
import { ElasticSearchIndexConfig } from './config';
|
|
5
|
-
export
|
|
5
|
+
export type ElasticsearchModuleConfig = {
|
|
6
6
|
defaultOptions: ClientOptions;
|
|
7
7
|
logPrefix: string;
|
|
8
8
|
};
|
|
9
9
|
export declare const elasticsearchModuleConfig: ElasticsearchModuleConfig;
|
|
10
|
-
export declare const ELASTIC_SEARCH_INDEX_CONFIG: import("
|
|
10
|
+
export declare const ELASTIC_SEARCH_INDEX_CONFIG: import("#/container").InjectionToken<ElasticSearchIndexConfig<Entity<string>>, ElasticSearchIndexConfigArgument<Entity<string>>>;
|
|
11
11
|
export declare function configureElasticsearch(config?: Partial<ElasticsearchModuleConfig>): void;
|
|
12
12
|
export declare function getElasticSearchIndexConfig<T extends Entity>(indexName: string): ElasticSearchIndexConfig<T>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getElasticSearchIndexConfig = exports.configureElasticsearch = exports.ELASTIC_SEARCH_INDEX_CONFIG = exports.elasticsearchModuleConfig = void 0;
|
|
4
|
-
const container_1 = require("
|
|
5
|
-
const core_1 = require("
|
|
6
|
-
const logger_1 = require("
|
|
7
|
-
const type_guards_1 = require("
|
|
4
|
+
const container_1 = require("#/container");
|
|
5
|
+
const core_1 = require("#/core");
|
|
6
|
+
const logger_1 = require("#/logger");
|
|
7
|
+
const type_guards_1 = require("#/utils/type-guards");
|
|
8
8
|
const elasticsearch_1 = require("@elastic/elasticsearch");
|
|
9
9
|
const config_1 = require("./config");
|
|
10
10
|
exports.elasticsearchModuleConfig = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../source/search-index/elastic/module.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../source/search-index/elastic/module.ts"],"names":[],"mappings":";;;AAAA,2CAAwD;AACxD,iCAA2C;AAE3C,qCAAkC;AAClC,qDAAyF;AAEzF,0DAAgD;AAEhD,qCAAoD;AAOvC,QAAA,yBAAyB,GAA8B;IAClE,cAAc,EAAE,EAAE,IAAI,EAAE,uBAAuB,EAAE;IACjD,SAAS,EAAE,SAAS;CACrB,CAAC;AAEW,QAAA,2BAA2B,GAAG,IAAA,0BAAc,EAA6D,6BAA6B,CAAC,CAAC;AAErJ,SAAgB,sBAAsB,CAAC,SAA6C,EAAE;IACpF,iCAAyB,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,IAAI,iCAAyB,CAAC,cAAc,CAAC;IAC7G,iCAAyB,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,iCAAyB,CAAC,SAAS,CAAC;AAChG,CAAC;AAHD,wDAGC;AAED,qBAAS,CAAC,iBAAiB,CAAwB,sBAAM,EAAE;IACzD,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QAC5B,IAAA,2BAAa,EAAC,OAAO,EAAE,sCAAsC,CAAC,CAAC;QAE/D,MAAM,MAAM,GAAG,MAAM,qBAAS,CAAC,YAAY,CAAC,eAAM,EAAE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GAAG,CAAC,MAAM,CAAC,CAAC;QAC9B,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;KAC/B;IAED,IAAI,IAAA,sBAAQ,EAAC,IAAI,CAAC,EAAE;QAClB,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;KAC5B;IAED,OAAO,eAAe,CAAC;AACzB,CAAC"}
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BoolQueryBuilder = void 0;
|
|
4
4
|
class BoolQueryBuilder {
|
|
5
|
+
get totalQueries() {
|
|
6
|
+
return this._must.length + this._should.length + this._mustNot.length + this._filter.length;
|
|
7
|
+
}
|
|
5
8
|
constructor() {
|
|
6
9
|
this._must = [];
|
|
7
10
|
this._should = [];
|
|
8
11
|
this._mustNot = [];
|
|
9
12
|
this._filter = [];
|
|
10
13
|
}
|
|
11
|
-
get totalQueries() {
|
|
12
|
-
return this._must.length + this._should.length + this._mustNot.length + this._filter.length;
|
|
13
|
-
}
|
|
14
14
|
build() {
|
|
15
15
|
const queryObj = {
|
|
16
16
|
bool: {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boolean-query-builder.js","sourceRoot":"","sources":["../../../../source/search-index/elastic/query-builder/boolean-query-builder.ts"],"names":[],"mappings":";;;AAEA,MAAa,gBAAgB;
|
|
1
|
+
{"version":3,"file":"boolean-query-builder.js","sourceRoot":"","sources":["../../../../source/search-index/elastic/query-builder/boolean-query-builder.ts"],"names":[],"mappings":";;;AAEA,MAAa,gBAAgB;IAM3B,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IAC9F,CAAC;IAED;QACE,IAAI,CAAC,KAAK,GAAG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