@tstdl/base 0.81.35 → 0.82.1
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 -3
- package/api/default-error-handlers.d.ts +1 -1
- package/api/response.d.ts +8 -8
- package/api/server/api-controller.d.ts +1 -1
- package/api/server/gateway.d.ts +9 -9
- package/api/server/middlewares/cors.middleware.d.ts +1 -1
- package/api/server/module.d.ts +1 -1
- package/api/types.d.ts +30 -30
- package/api/utils.d.ts +1 -1
- package/api/utils.js +3 -1
- package/api/utils.js.map +1 -1
- package/authentication/authentication-credentials.service.d.ts +6 -0
- package/authentication/authentication-credentials.service.js +17 -0
- package/authentication/authentication-credentials.service.js.map +1 -0
- package/authentication/authentication-session.repository.d.ts +6 -0
- package/authentication/authentication-session.repository.js +18 -0
- package/authentication/authentication-session.repository.js.map +1 -0
- package/authentication/authentication-token-payload.provider.d.ts +3 -0
- package/authentication/authentication-token-payload.provider.js +17 -0
- package/authentication/authentication-token-payload.provider.js.map +1 -0
- package/authentication/authentication.service.d.ts +42 -0
- package/authentication/authentication.service.js +133 -0
- package/authentication/authentication.service.js.map +1 -0
- package/authentication/models/authentication-credentials.model.d.ts +11 -0
- package/authentication/models/authentication-credentials.model.js +44 -0
- package/authentication/models/authentication-credentials.model.js.map +1 -0
- package/authentication/models/authentication-session.model.d.ts +14 -0
- package/authentication/models/authentication-session.model.js +59 -0
- package/authentication/models/authentication-session.model.js.map +1 -0
- package/authentication/models/index.d.ts +2 -0
- package/authentication/models/index.js +19 -0
- package/authentication/models/index.js.map +1 -0
- package/authentication/tokens.d.ts +2 -0
- package/authentication/tokens.js +6 -0
- package/authentication/tokens.js.map +1 -0
- package/collections/keyed-set.d.ts +1 -1
- package/collections/observable/observable-collection.d.ts +1 -1
- package/collections/observable/observable-list.d.ts +2 -2
- package/container/container.d.ts +3 -3
- package/container/container.js +3 -3
- package/container/container.js.map +1 -1
- package/container/decorators.d.ts +3 -3
- package/container/decorators.js +0 -1
- package/container/decorators.js.map +1 -1
- package/container/interfaces.d.ts +1 -1
- package/container/provider.d.ts +6 -6
- package/container/resolve-chain.d.ts +2 -2
- package/container/resolve-chain.js +1 -1
- package/container/resolve-chain.js.map +1 -1
- package/container/token.d.ts +3 -3
- package/container/type-info.d.ts +1 -1
- package/container/types.d.ts +4 -4
- package/core.d.ts +1 -1
- package/data-structures/linked-list.d.ts +1 -1
- package/data-structures/multi-key-map.d.ts +2 -2
- package/data-structures/sorted-array-list.d.ts +1 -1
- package/database/entity-repository.d.ts +2 -2
- package/database/entity.d.ts +3 -3
- package/database/module.d.ts +1 -1
- package/database/mongo/classes.d.ts +3 -3
- package/database/mongo/model/document.d.ts +3 -3
- package/database/mongo/module.d.ts +1 -1
- package/database/mongo/mongo-base.repository.d.ts +11 -11
- package/database/mongo/mongo-bulk.d.ts +1 -1
- package/database/mongo/mongo-entity-repository.d.ts +7 -7
- package/database/mongo/types.d.ts +16 -16
- package/database/query.d.ts +38 -38
- package/disposable/async-disposer.d.ts +3 -3
- package/distributed-loop/distributed-loop.d.ts +2 -2
- package/error/custom.error.d.ts +1 -1
- package/http/client/adapters/undici-http-client.adapter.d.ts +1 -1
- package/http/client/http-client-request.d.ts +5 -5
- package/http/client/http-client-response.d.ts +2 -2
- package/http/client/http-client.d.ts +5 -5
- package/http/http-body.d.ts +3 -1
- package/http/http-body.js +18 -12
- 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-query.d.ts +2 -2
- package/http/http-url-parameters.d.ts +2 -2
- package/http/http-value-map.d.ts +1 -1
- package/http/server/http-server-request.d.ts +1 -1
- package/http/server/http-server-response.d.ts +1 -1
- package/http/server/http-server.d.ts +1 -1
- package/http/server/node/node-http-server.d.ts +1 -1
- package/http/types.d.ts +5 -5
- package/http/utils.d.ts +3 -3
- package/image-service/imgproxy/imgproxy-image-service.d.ts +1 -1
- package/json-path/json-path.d.ts +4 -4
- package/key-value-store/key-value.store.d.ts +1 -1
- package/key-value-store/mongo/module.d.ts +1 -1
- package/key-value-store/mongo/mongo-key-value.model.d.ts +1 -1
- package/lock/lock.d.ts +4 -4
- package/lock/mongo/model.d.ts +1 -1
- package/lock/mongo/module.d.ts +1 -1
- package/lock/provider.d.ts +1 -1
- package/logger/logger.d.ts +6 -6
- package/mail/mail.client.d.ts +1 -1
- package/mail/mail.service.d.ts +3 -1
- package/mail/mail.service.js +11 -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 -1
- package/mail/models/mail-log.model.d.ts +2 -2
- package/mail/models/mail-send-result.model.d.ts +1 -1
- package/mail/models/mail-template.model.d.ts +1 -1
- package/mail/module.d.ts +4 -2
- package/mail/module.js +6 -2
- package/mail/module.js.map +1 -1
- package/mail/repositories/mongo-mail-log.repository.d.ts +2 -2
- package/mail/tokens.d.ts +1 -0
- package/mail/tokens.js +2 -1
- package/mail/tokens.js.map +1 -1
- package/message-bus/local/types.d.ts +1 -1
- package/message-bus/message-bus.d.ts +1 -1
- package/migration/migration-state.d.ts +2 -2
- package/migration/migrator.d.ts +4 -4
- package/migration/mongo/module.d.ts +1 -1
- package/module/module-metric-reporter.d.ts +2 -2
- package/module/module.d.ts +1 -1
- package/module/modules/function.module.d.ts +1 -1
- package/module/modules/web-server.module.d.ts +1 -1
- package/notification/api.d.ts +3 -6
- package/notification/api.js +2 -5
- package/notification/api.js.map +1 -1
- package/notification/models/index.d.ts +2 -0
- package/notification/models/index.js +19 -0
- package/notification/models/index.js.map +1 -0
- package/notification/models/notification-channel-job.model.d.ts +3 -0
- package/notification/models/notification-channel-job.model.js +3 -0
- package/notification/models/notification-channel-job.model.js.map +1 -0
- package/notification/models/notification.model.d.ts +27 -0
- package/notification/{model.js → models/notification.model.js} +28 -16
- package/notification/models/notification.model.js.map +1 -0
- package/notification/module.d.ts +1 -1
- package/notification/notification-channel.service.d.ts +5 -0
- package/notification/notification-channel.service.js +7 -0
- package/notification/notification-channel.service.js.map +1 -0
- package/notification/notification.service.d.ts +8 -0
- package/notification/notification.service.js +40 -0
- package/notification/notification.service.js.map +1 -0
- package/object-storage/object-storage.d.ts +2 -2
- package/object-storage/object.d.ts +1 -1
- package/object-storage/s3/s3.object-storage-provider.d.ts +1 -1
- package/openid-connect/mongo-oidc-state.repository.d.ts +1 -1
- package/openid-connect/oidc-configuration.service.d.ts +1 -1
- package/openid-connect/oidc-state.model.d.ts +2 -2
- package/openid-connect/oidc.service-model.d.ts +8 -8
- package/orm/decorators.d.ts +26 -0
- package/orm/decorators.js +170 -0
- package/orm/decorators.js.map +1 -1
- package/orm/entity-definition.model.d.ts +51 -0
- package/orm/entity-definition.model.js +27 -0
- package/orm/entity-definition.model.js.map +1 -0
- package/orm/index.d.ts +1 -0
- package/orm/index.js +18 -0
- package/orm/index.js.map +1 -0
- package/orm/models/entity.d.ts +22 -0
- package/orm/models/entity.js +87 -0
- package/orm/models/entity.js.map +1 -0
- package/orm/models/index.d.ts +1 -0
- package/orm/models/index.js +18 -0
- package/orm/models/index.js.map +1 -0
- package/orm/repository/mongo/classes.d.ts +25 -0
- package/orm/repository/mongo/classes.js +33 -0
- package/orm/repository/mongo/classes.js.map +1 -0
- package/orm/repository/mongo/module.d.ts +8 -0
- package/orm/repository/mongo/module.js +88 -0
- package/orm/repository/mongo/module.js.map +1 -0
- package/orm/repository/mongo/mongo-repository.d.ts +11 -0
- package/orm/repository/mongo/mongo-repository.js +55 -0
- package/orm/repository/mongo/mongo-repository.js.map +1 -0
- package/orm/repository/mongo/mongo-transaction.d.ts +10 -0
- package/orm/repository/mongo/mongo-transaction.js +28 -0
- package/orm/repository/mongo/mongo-transaction.js.map +1 -0
- package/orm/repository/repository.d.ts +75 -0
- package/orm/repository/repository.js +182 -0
- package/orm/repository/repository.js.map +1 -0
- package/orm/repository/transaction.d.ts +26 -0
- package/orm/repository/transaction.js +65 -0
- package/orm/repository/transaction.js.map +1 -0
- package/orm/{types.d.ts → types/definition.d.ts} +5 -5
- package/orm/{types.js → types/definition.js} +8 -8
- package/orm/types/definition.js.map +1 -0
- package/orm/types/index.d.ts +3 -0
- package/orm/types/index.js +20 -0
- package/orm/types/index.js.map +1 -0
- package/orm/types/options.d.ts +36 -0
- package/orm/types/options.js +5 -0
- package/orm/types/options.js.map +1 -0
- package/orm/types/query.d.ts +110 -0
- package/orm/types/query.js +10 -0
- package/orm/types/query.js.map +1 -0
- package/package.json +5 -5
- package/pdf/pdf.service.d.ts +3 -3
- package/pool/pool.d.ts +4 -4
- package/promise/cancelable-promise.d.ts +1 -1
- package/promise/lazy-promise.d.ts +1 -1
- package/queue/mongo/job.d.ts +2 -2
- package/queue/mongo/queue.js +2 -2
- package/queue/mongo/queue.js.map +1 -1
- package/queue/queue.d.ts +11 -6
- package/queue/queue.js +2 -1
- package/queue/queue.js.map +1 -1
- package/reflection/decorator-data.js +2 -1
- package/reflection/decorator-data.js.map +1 -1
- package/reflection/registry.d.ts +18 -17
- package/reflection/registry.js +25 -10
- package/reflection/registry.js.map +1 -1
- package/reflection/types.d.ts +34 -34
- package/reflection/utils.d.ts +8 -8
- package/reflection/utils.js +6 -6
- package/reflection/utils.js.map +1 -1
- package/rpc/endpoints/message-port.rpc-endpoint.d.ts +3 -3
- package/rpc/model.d.ts +22 -22
- package/rpc/rpc.d.ts +1 -1
- package/rxjs/intersection-observer.d.ts +1 -1
- package/rxjs/mutation-observer.d.ts +1 -1
- package/rxjs/performance-observer.d.ts +1 -1
- package/rxjs/resize-observer.d.ts +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/maximum-length.js +2 -2
- package/schema/array-constraints/maximum-length.js.map +1 -1
- package/schema/array-constraints/minimum-length.d.ts +2 -2
- package/schema/array-constraints/minimum-length.js +2 -2
- package/schema/array-constraints/minimum-length.js.map +1 -1
- package/schema/constraints/enumeration.d.ts +4 -4
- package/schema/constraints/enumeration.js +5 -5
- package/schema/constraints/enumeration.js.map +1 -1
- package/schema/constraints/generic.d.ts +4 -4
- package/schema/constraints/generic.js +2 -2
- package/schema/constraints/generic.js.map +1 -1
- package/schema/constraints/integer.d.ts +2 -2
- package/schema/constraints/integer.js +3 -2
- package/schema/constraints/integer.js.map +1 -1
- package/schema/constraints/length.d.ts +1 -1
- package/schema/constraints/literal.d.ts +2 -2
- package/schema/constraints/literal.js +2 -2
- package/schema/constraints/literal.js.map +1 -1
- package/schema/constraints/maximum-date.d.ts +2 -2
- package/schema/constraints/maximum-date.js +3 -2
- package/schema/constraints/maximum-date.js.map +1 -1
- package/schema/constraints/maximum-length.d.ts +2 -2
- package/schema/constraints/maximum-length.js +2 -2
- package/schema/constraints/maximum-length.js.map +1 -1
- package/schema/constraints/maximum.d.ts +2 -2
- package/schema/constraints/maximum.js +3 -2
- package/schema/constraints/maximum.js.map +1 -1
- package/schema/constraints/minimum-date.d.ts +2 -2
- package/schema/constraints/minimum-date.js +3 -2
- package/schema/constraints/minimum-date.js.map +1 -1
- package/schema/constraints/minimum-length.d.ts +2 -2
- package/schema/constraints/minimum-length.js +2 -2
- package/schema/constraints/minimum-length.js.map +1 -1
- package/schema/constraints/minimum.d.ts +2 -2
- package/schema/constraints/minimum.js +3 -2
- package/schema/constraints/minimum.js.map +1 -1
- package/schema/constraints/pattern.d.ts +2 -2
- package/schema/constraints/pattern.js +3 -2
- package/schema/constraints/pattern.js.map +1 -1
- package/schema/decorators/types.d.ts +3 -3
- package/schema/decorators/utils.d.ts +4 -1
- package/schema/decorators/utils.js +1 -1
- package/schema/decorators/utils.js.map +1 -1
- package/schema/schema.d.ts +4 -4
- package/schema/schema.error.d.ts +1 -1
- package/schema/schema.js +10 -13
- package/schema/schema.js.map +1 -1
- package/schema/schemas/any.d.ts +1 -1
- package/schema/schemas/array.d.ts +2 -2
- package/schema/schemas/array.js +2 -2
- package/schema/schemas/array.js.map +1 -1
- package/schema/schemas/boolean.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/enumeration.d.ts +2 -2
- package/schema/schemas/enumeration.js +2 -2
- 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 +2 -2
- package/schema/schemas/literal.js.map +1 -1
- package/schema/schemas/nullable.d.ts +1 -1
- 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 +1 -1
- package/schema/schemas/omit.d.ts +2 -2
- package/schema/schemas/omit.js.map +1 -1
- package/schema/schemas/one-or-many.d.ts +2 -2
- package/schema/schemas/optional.d.ts +1 -1
- package/schema/schemas/readable-stream.d.ts +1 -1
- package/schema/schemas/record.d.ts +1 -1
- package/schema/schemas/regexp.d.ts +1 -1
- package/schema/schemas/string.d.ts +2 -2
- package/schema/schemas/string.js +3 -3
- package/schema/schemas/string.js.map +1 -1
- package/schema/schemas/uint8-array.d.ts +2 -2
- package/schema/schemas/uint8-array.js +3 -3
- package/schema/schemas/uint8-array.js.map +1 -1
- package/schema/schemas/union.d.ts +1 -1
- package/schema/schemas/unknown.d.ts +1 -1
- package/schema/transformers/generic.d.ts +1 -1
- package/schema/types/index.d.ts +5 -0
- package/schema/types/index.js +22 -0
- package/schema/types/index.js.map +1 -0
- package/schema/types/schema-array-constraint.d.ts +5 -0
- package/schema/types/schema-array-constraint.js +7 -0
- package/schema/types/schema-array-constraint.js.map +1 -0
- package/schema/types/schema-value-coercer.d.ts +8 -0
- package/schema/types/schema-value-coercer.js +7 -0
- package/schema/types/schema-value-coercer.js.map +1 -0
- package/schema/types/schema-value-constraint.d.ts +8 -0
- package/schema/types/schema-value-constraint.js +7 -0
- package/schema/types/schema-value-constraint.js.map +1 -0
- package/schema/types/schema-value-transformer.d.ts +7 -0
- package/schema/types/schema-value-transformer.js +7 -0
- package/schema/types/schema-value-transformer.js.map +1 -0
- package/schema/{types.d.ts → types/types.d.ts} +47 -57
- package/schema/types/types.js +174 -0
- package/schema/types/types.js.map +1 -0
- package/schema/utils/schema.js +1 -1
- package/schema/utils/schema.js.map +1 -1
- package/schema/utils/value-type.d.ts +1 -1
- package/schema/utils/value-type.js +1 -1
- package/schema/utils/value-type.js.map +1 -1
- package/search-index/elastic/config.d.ts +1 -1
- package/search-index/elastic/model/elastic-query.d.ts +15 -15
- package/search-index/elastic/model/index-mapping.d.ts +14 -14
- package/search-index/elastic/model/sort.d.ts +3 -3
- package/search-index/elastic/module.d.ts +1 -1
- package/search-index/search-index.d.ts +1 -1
- package/search-index/search-result.d.ts +2 -2
- 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/set.d.ts +1 -1
- package/serializer/serializable.d.ts +6 -6
- package/serializer/serializer.d.ts +1 -1
- package/serializer/types.d.ts +15 -15
- package/sse/server-sent-events.d.ts +3 -3
- package/tailwind/theme-adapter.d.ts +1 -1
- package/templates/module.d.ts +1 -1
- package/templates/providers/file.provider-template.d.ts +2 -2
- package/templates/providers/file.provider-template.js +2 -1
- package/templates/providers/file.provider-template.js.map +1 -1
- package/templates/renderers/handlebars.template-renderer.d.ts +9 -9
- package/templates/renderers/mjml.template-renderer.d.ts +3 -3
- package/templates/renderers/string.template-renderer.d.ts +1 -1
- package/templates/resolvers/file.template-resolver.d.ts +2 -2
- package/templates/template.model.d.ts +1 -1
- package/templates/template.renderer.d.ts +4 -4
- package/templates/template.service.d.ts +1 -1
- package/text/dynamic-text.model.d.ts +1 -1
- package/text/localizable-text.model.d.ts +1 -1
- package/text/localization.service.d.ts +11 -11
- package/theme/theme-service.d.ts +6 -6
- package/threading/thread-pool.d.ts +1 -1
- package/threading/thread-worker.d.ts +1 -1
- package/types/geo-json.d.ts +12 -12
- package/types.d.ts +91 -91
- package/utils/any-iterable-iterator.d.ts +3 -3
- package/utils/array/array.d.ts +14 -1
- package/utils/array/array.js +16 -2
- package/utils/array/array.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/benchmark.d.ts +1 -1
- package/utils/binary-search.d.ts +1 -1
- package/utils/binary.js.map +1 -1
- package/utils/cancellation-token.d.ts +1 -1
- package/utils/compression.d.ts +1 -1
- package/utils/cryptography.d.ts +11 -11
- package/utils/date-time.d.ts +8 -7
- package/utils/date-time.js +6 -2
- package/utils/date-time.js.map +1 -1
- package/utils/equals.d.ts +3 -3
- package/utils/factory-map.d.ts +1 -1
- package/utils/format-error.d.ts +1 -1
- package/utils/function/memoize.d.ts +1 -1
- package/utils/helpers.d.ts +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/merge.d.ts +1 -1
- package/utils/middleware.d.ts +9 -9
- package/utils/moving-metric.d.ts +1 -1
- package/utils/object/decycle.d.ts +1 -1
- package/utils/object/dereference.d.ts +1 -1
- package/utils/object/forward-ref.d.ts +2 -2
- package/utils/object/lazy-property.d.ts +5 -5
- package/utils/object/merge.d.ts +1 -1
- package/utils/object/object.js +1 -2
- package/utils/object/object.js.map +1 -1
- package/utils/object/property-name.d.ts +5 -5
- package/utils/patch-worker.d.ts +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/singleton.d.ts +2 -2
- package/utils/sort.d.ts +2 -2
- package/utils/stream/stream-helper-types.d.ts +5 -5
- package/utils/type-guards.d.ts +3 -3
- package/utils/url-builder.d.ts +4 -4
- package/web-types.d.ts +4 -4
- package/notification/model.d.ts +0 -18
- package/notification/model.js.map +0 -1
- package/orm/mongo/mongo-repository.d.ts +0 -2
- package/orm/mongo/mongo-repository.js +0 -7
- package/orm/mongo/mongo-repository.js.map +0 -1
- package/orm/types.js.map +0 -1
- package/schema/types.js +0 -102
- package/schema/types.js.map +0 -1
package/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { UnionToIntersection } from 'type-fest';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type ObjectLiteral = {};
|
|
3
|
+
export type PrimitiveTypeMap = {
|
|
4
4
|
'string': string;
|
|
5
5
|
'number': number;
|
|
6
6
|
'boolean': boolean;
|
|
@@ -10,162 +10,162 @@ export declare type PrimitiveTypeMap = {
|
|
|
10
10
|
'function': Function;
|
|
11
11
|
'undefined': undefined;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
13
|
+
export type PrimitiveTypeString<T extends PrimitiveTypeMap[keyof PrimitiveTypeMap] = PrimitiveTypeMap[keyof PrimitiveTypeMap]> = Simplify<keyof PickBy<PrimitiveTypeMap, T>>;
|
|
14
|
+
export type PrimitiveType<T extends keyof PrimitiveTypeMap = keyof PrimitiveTypeMap> = Simplify<PrimitiveTypeMap[T]>;
|
|
15
|
+
export type Nested<T> = T | NestedObject<T> | NestedArray<T>;
|
|
16
|
+
export type NestedObject<T> = {
|
|
17
17
|
[key: string]: Nested<T>;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
19
|
+
export type NestedArray<T> = T[];
|
|
20
|
+
export type FilledArray<T> = [T, ...(T)[]];
|
|
21
|
+
export type FilledReadonlyArray<T> = readonly [T, ...(T)[]];
|
|
22
|
+
export type Primitive = string | number | boolean | bigint | null | undefined | symbol;
|
|
23
|
+
export type PrimitiveValue = Primitive | PrimitiveObject | PrimitiveArray;
|
|
24
|
+
export type PrimitiveObject = {
|
|
25
25
|
[key: string]: PrimitiveValue;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
27
|
+
export type PrimitiveArray = PrimitiveValue[];
|
|
28
|
+
export type BuiltIn = Primitive | RegExp | Date | Function;
|
|
29
|
+
export type Json = JsonPrimitive | JsonObject | JsonArray;
|
|
30
|
+
export type JsonPrimitive = string | number | boolean | null;
|
|
31
|
+
export type JsonObject = {
|
|
32
32
|
[key: string]: Json;
|
|
33
33
|
};
|
|
34
|
-
export
|
|
35
|
-
export
|
|
36
|
-
export
|
|
37
|
-
export
|
|
38
|
-
export
|
|
34
|
+
export type JsonArray = Json[];
|
|
35
|
+
export type UndefinableJson = JsonPrimitive | UndefinableJsonObject | UndefinableJsonArray;
|
|
36
|
+
export type UndefinableJsonInnerNode = UndefinableJsonPrimitive | UndefinableJsonObject | UndefinableJsonArray;
|
|
37
|
+
export type UndefinableJsonPrimitive = JsonPrimitive | undefined;
|
|
38
|
+
export type UndefinableJsonObject = {
|
|
39
39
|
[key: string]: UndefinableJsonInnerNode;
|
|
40
40
|
};
|
|
41
|
-
export
|
|
42
|
-
export
|
|
43
|
-
export
|
|
44
|
-
export
|
|
45
|
-
export
|
|
46
|
-
export
|
|
47
|
-
export
|
|
41
|
+
export type UndefinableJsonArray = UndefinableJsonInnerNode[];
|
|
42
|
+
export type ArrayItem<T extends readonly any[]> = T extends readonly (infer U)[] ? U : never;
|
|
43
|
+
export type Enumeration = EnumerationArray | EnumerationObject;
|
|
44
|
+
export type EnumerationArray = readonly [string | number, ...(string | number)[]];
|
|
45
|
+
export type EnumerationObject = Record<string, string | number>;
|
|
46
|
+
export type EnumerationKey<T extends EnumerationObject = EnumerationObject> = Extract<keyof T, string>;
|
|
47
|
+
export type EnumerationMap<T extends EnumerationObject = EnumerationObject> = SimplifyObject<{
|
|
48
48
|
[P in EnumerationKey<T>]: (T[P] extends number ? (`${T[P]}` extends `${infer U extends number}` ? U : never) : `${T[P]}`) | T[P];
|
|
49
49
|
}>;
|
|
50
|
-
export
|
|
51
|
-
export
|
|
50
|
+
export type EnumerationValue<T extends Enumeration = Enumeration> = T extends EnumerationObject ? Simplify<EnumerationMap<T>[keyof EnumerationMap<T>]> : T extends EnumerationArray ? T[number] : never;
|
|
51
|
+
export type EnumerationEntry<T extends EnumerationObject = EnumerationObject> = {
|
|
52
52
|
[P in EnumerationKey<T>]: [P, EnumerationMap<T>[P]];
|
|
53
53
|
}[EnumerationKey<T>];
|
|
54
|
-
|
|
54
|
+
type EnumerationEntriesHelper<T extends EnumerationObject = EnumerationObject, Tuple = UnionToTuple<EnumerationKey<T>>> = {
|
|
55
55
|
[P in keyof Tuple]: [Tuple[P], Tuple[P] extends EnumerationKey<T> ? EnumerationMap<T>[Tuple[P]] : never];
|
|
56
56
|
};
|
|
57
|
-
export
|
|
58
|
-
export
|
|
57
|
+
export type EnumerationEntries<T extends EnumerationObject = EnumerationObject> = EnumerationEntriesHelper<T> extends (infer U)[] ? U[] : never;
|
|
58
|
+
export type Type<T = any, Arguments extends any[] = any> = Constructor<T, Arguments> & {
|
|
59
59
|
prototype: T;
|
|
60
60
|
};
|
|
61
|
-
export
|
|
62
|
-
export
|
|
61
|
+
export type Constructor<T = any, Arguments extends any[] = any> = new (...args: Arguments) => T;
|
|
62
|
+
export type AbstractType<T = any, Arguments extends any[] = any> = AbstractConstructor<T, Arguments> & {
|
|
63
63
|
prototype: T;
|
|
64
64
|
};
|
|
65
|
-
export
|
|
66
|
-
export
|
|
67
|
-
export
|
|
65
|
+
export type AbstractConstructor<T = any, Arguments extends any[] = any> = abstract new (...args: Arguments) => T;
|
|
66
|
+
export type ReturnTypeOrT<T> = T extends (...args: any) => infer R ? R : T;
|
|
67
|
+
export type Record<K extends PropertyKey = PropertyKey, V = any> = {
|
|
68
68
|
[P in K]: V;
|
|
69
69
|
};
|
|
70
|
-
export
|
|
70
|
+
export type DeepRecord<K extends PropertyKey = PropertyKey, V = any> = {
|
|
71
71
|
[P in K]: V | DeepRecord<K, V>;
|
|
72
72
|
};
|
|
73
|
-
export
|
|
74
|
-
export
|
|
75
|
-
export
|
|
73
|
+
export type StringMap<T = any> = Record<string, T>;
|
|
74
|
+
export type NumberMap<T = any> = Record<number, T>;
|
|
75
|
+
export type StringNumberMap<T = any> = {
|
|
76
76
|
[key: string]: T;
|
|
77
77
|
[key: number]: T;
|
|
78
78
|
};
|
|
79
|
-
export
|
|
80
|
-
export
|
|
81
|
-
export
|
|
79
|
+
export type OneOrMany<T> = T | readonly T[];
|
|
80
|
+
export type WritableOneOrMany<T> = T | T[];
|
|
81
|
+
export type Writable<T> = {
|
|
82
82
|
-readonly [P in keyof T]: T[P];
|
|
83
83
|
};
|
|
84
|
-
export
|
|
84
|
+
export type RequiredKeys<T> = {
|
|
85
85
|
[K in keyof T]-?: {} extends Pick<T, K> ? never : K;
|
|
86
86
|
}[keyof T];
|
|
87
|
-
export
|
|
87
|
+
export type OptionalKeys<T> = {
|
|
88
88
|
[K in keyof T]-?: {} extends Pick<T, K> ? K : never;
|
|
89
89
|
}[keyof T];
|
|
90
|
-
export
|
|
91
|
-
export
|
|
92
|
-
export
|
|
93
|
-
export
|
|
90
|
+
export type TypedOmit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
91
|
+
export type TypedExtract<T, U extends T> = T extends U ? T : never;
|
|
92
|
+
export type ReplaceIfUnknown<T, U> = IfUnknown<T, U, T>;
|
|
93
|
+
export type OmitNever<T extends Record> = {
|
|
94
94
|
[K in keyof T as T[K] extends never ? never : K]: T[K];
|
|
95
95
|
};
|
|
96
|
-
export
|
|
96
|
+
export type SharedProperties<A, B, C = unknown, D = unknown, E = unknown, F = unknown, G = unknown, H = unknown, I = unknown, J = unknown> = OmitNever<Pick<A & B & C & D & E & F & G & H & I & J, keyof A & keyof B & keyof ReplaceIfUnknown<C, never> & keyof ReplaceIfUnknown<D, never> & keyof ReplaceIfUnknown<E, never> & keyof ReplaceIfUnknown<F, never> & keyof ReplaceIfUnknown<G, never> & keyof ReplaceIfUnknown<H, never> & keyof ReplaceIfUnknown<I, never> & keyof ReplaceIfUnknown<J, never>>>;
|
|
97
97
|
/**
|
|
98
98
|
* omit properties from a type that extend from a specific type.
|
|
99
99
|
*/
|
|
100
|
-
export
|
|
100
|
+
export type OmitBy<T, V> = Omit<T, {
|
|
101
101
|
[K in keyof T]: V extends Extract<T[K], V> ? K : never;
|
|
102
102
|
}[keyof T]>;
|
|
103
103
|
/**
|
|
104
104
|
* normalize properties of a type that allow `undefined` to make them optional.
|
|
105
105
|
*/
|
|
106
|
-
export
|
|
107
|
-
export
|
|
106
|
+
export type Optionalize<T extends object> = OmitBy<T, undefined> & Partial<PickBy<T, undefined>>;
|
|
107
|
+
export type SimplifiedOptionalize<T extends object> = Simplify<Optionalize<T>>;
|
|
108
108
|
/**
|
|
109
109
|
* remove nested type information
|
|
110
110
|
*/
|
|
111
|
-
export
|
|
111
|
+
export type Simplify<T> = T extends (Primitive | Function | Date | RegExp) ? T : T extends (infer AT)[] ? Simplify<AT>[] : T extends readonly (infer AT)[] ? readonly Simplify<AT>[] : T extends Record ? SimplifyObject<T> : T;
|
|
112
112
|
/**
|
|
113
113
|
* remove type information on object
|
|
114
114
|
*/
|
|
115
|
-
export
|
|
115
|
+
export type SimplifyObject<T extends Record> = {
|
|
116
116
|
[K in keyof T]: T[K];
|
|
117
117
|
} & {};
|
|
118
|
-
export
|
|
119
|
-
export
|
|
118
|
+
export type UnionToTuple<T, Tuple extends any[] = []> = UnionToIntersection<T extends any ? () => T : never> extends () => infer R ? UnionToTuple<Exclude<T, R>, [R, ...Tuple]> : Tuple;
|
|
119
|
+
export type UndefinableObject<T extends Record> = {
|
|
120
120
|
[K in keyof T]: T[K] | undefined;
|
|
121
121
|
};
|
|
122
122
|
/**
|
|
123
123
|
* pick properties from a type that extend from a specific type.
|
|
124
124
|
*/
|
|
125
|
-
export
|
|
125
|
+
export type PickBy<T, V> = Pick<T, {
|
|
126
126
|
[K in keyof T]: V extends Extract<T[K], V> ? K : never;
|
|
127
127
|
}[keyof T]>;
|
|
128
|
-
export
|
|
129
|
-
export
|
|
130
|
-
export
|
|
128
|
+
export type NonNullable<T> = T extends null ? never : T;
|
|
129
|
+
export type NonUndefinable<T> = T extends undefined ? never : T;
|
|
130
|
+
export type NonNullOrUndefinable<T> = T extends null | undefined ? never : T;
|
|
131
131
|
/**
|
|
132
132
|
* makes optional properties required and removes null and undefined
|
|
133
133
|
*/
|
|
134
|
-
export
|
|
134
|
+
export type DeepNonNullable<T> = T extends Record ? {
|
|
135
135
|
[P in keyof T]-?: DeepNonNullable<T[P]>;
|
|
136
136
|
} : NonNullable<T>;
|
|
137
|
-
export
|
|
138
|
-
export
|
|
139
|
-
export
|
|
140
|
-
export
|
|
141
|
-
export
|
|
142
|
-
export
|
|
143
|
-
export
|
|
144
|
-
export
|
|
145
|
-
export
|
|
137
|
+
export type IfAny<T, Then, Else = never> = true extends (false & T) ? Then : Else;
|
|
138
|
+
export type IfUnknown<T, Then, Else = never> = unknown extends T ? Then : Else;
|
|
139
|
+
export type IsAny<T> = IfAny<T, true, false>;
|
|
140
|
+
export type IsUnknown<T> = IfUnknown<T, true, false>;
|
|
141
|
+
export type If<B extends Boolean, Then, Else> = B extends true ? Then : Else;
|
|
142
|
+
export type PartialProperty<T, P extends keyof T> = Omit<T, P> & Partial<Pick<T, P>>;
|
|
143
|
+
export type TypeOf<T extends object, P extends keyof T> = T[P];
|
|
144
|
+
export type PropertyOf<T extends object, P extends keyof T> = Property<Of<T>, P>;
|
|
145
|
+
export type Property<T extends object, P extends keyof T> = {
|
|
146
146
|
[P2 in keyof T[P]]: T[P][P2];
|
|
147
147
|
};
|
|
148
|
-
export
|
|
149
|
-
export
|
|
150
|
-
export
|
|
151
|
-
export
|
|
148
|
+
export type Of<T> = T;
|
|
149
|
+
export type PropertiesOfType<T, U> = keyof PickBy<T, U>;
|
|
150
|
+
export type Flatten<T> = T extends readonly (infer R)[] ? R : T;
|
|
151
|
+
export type DeepFlatten<T> = T extends readonly (infer R)[] ? DeepFlatten<R> : T extends Record ? {
|
|
152
152
|
[P in keyof T]: DeepFlatten<T[P]>;
|
|
153
153
|
} : T;
|
|
154
|
-
export
|
|
155
|
-
export
|
|
156
|
-
export
|
|
154
|
+
export type DeepArray<T> = (T | DeepArray<T>)[];
|
|
155
|
+
export type DeepReadonly<T> = T extends BuiltIn ? T : T extends (any[] | readonly any[]) ? DeepReadonlyArray<T[number]> : DeepReadonlyObject<T>;
|
|
156
|
+
export type DeepReadonlyObject<T> = {
|
|
157
157
|
readonly [P in keyof T]: DeepReadonly<T[P]>;
|
|
158
158
|
};
|
|
159
|
-
export
|
|
160
|
-
export
|
|
161
|
-
export
|
|
159
|
+
export type DeepReadonlyArray<T> = readonly DeepReadonly<T>[];
|
|
160
|
+
export type DeepPartial<T> = T extends BuiltIn ? T : T extends any[] ? DeepPartialArray<T[number]> : T extends readonly any[] ? Readonly<DeepPartialArray<T[number]>> : DeepPartialObject<T>;
|
|
161
|
+
export type DeepPartialObject<T> = {
|
|
162
162
|
[P in keyof T]?: DeepPartial<T[P]>;
|
|
163
163
|
};
|
|
164
|
-
export
|
|
165
|
-
export
|
|
166
|
-
export
|
|
167
|
-
|
|
168
|
-
|
|
164
|
+
export type DeepPartialArray<T> = DeepPartial<T>[];
|
|
165
|
+
export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
|
|
166
|
+
export type BinaryData = ArrayBuffer | ArrayBufferView;
|
|
167
|
+
type JoinPaths<K, P> = K extends string | number ? P extends string | number ? `${K}${'' extends P ? '' : '.'}${P}` : never : never;
|
|
168
|
+
type Prev = [
|
|
169
169
|
never,
|
|
170
170
|
0,
|
|
171
171
|
1,
|
|
@@ -190,10 +190,10 @@ declare type Prev = [
|
|
|
190
190
|
20,
|
|
191
191
|
...0[]
|
|
192
192
|
];
|
|
193
|
-
export
|
|
193
|
+
export type Paths<T, D extends number = 10> = [D] extends [never] ? never : T extends object ? {
|
|
194
194
|
[K in keyof T]-?: K extends string | number ? `${K}` | (Paths<T[K], Prev[D]> extends infer R ? JoinPaths<K, R> : never) : never;
|
|
195
195
|
}[keyof T] : '';
|
|
196
|
-
export
|
|
196
|
+
export type LeavePaths<T, D extends number = 10> = [D] extends [never] ? never : T extends object ? {
|
|
197
197
|
[K in keyof T]-?: JoinPaths<K, LeavePaths<T[K], Prev[D]>>;
|
|
198
198
|
}[keyof T] : '';
|
|
199
199
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export type AnyIterable<T> = Iterable<T> | AsyncIterable<T>;
|
|
2
|
+
export type AnyIterator<T> = Iterator<T> | AsyncIterator<T>;
|
|
3
|
+
export type AnyIterableIterator<T> = IterableIterator<T> | AsyncIterableIterator<T>;
|
|
4
4
|
export declare function isAnyIterable<T = any>(obj: any): obj is AnyIterable<T>;
|
package/utils/array/array.d.ts
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Returns value as is, if it is an array, otherwise puts the single value into an array.
|
|
3
|
+
*/
|
|
4
|
+
export declare function toArray<T>(value: T | T[]): T[];
|
|
5
|
+
export declare function toArray<T>(value: T | readonly T[]): readonly T[];
|
|
6
|
+
/**
|
|
7
|
+
* Return copy of value, if it is an array, otherwise puts the single value into an array.
|
|
8
|
+
*/
|
|
9
|
+
export declare function toArrayCopy<T>(value: T | T[] | readonly T[]): T[];
|
|
10
|
+
/**
|
|
11
|
+
* Returns element of value at index 0, if it is an array and has exactly one element, otherweise returns value as is.
|
|
12
|
+
*/
|
|
13
|
+
export declare function extractValueOfArrayIfSingleElement<T>(value: T | T[]): T | T[];
|
|
14
|
+
export declare function extractValueOfArrayIfSingleElement<T>(value: T | readonly T[]): T | readonly T[];
|
|
2
15
|
/**
|
|
3
16
|
* creates a new array of specified length and fills it with values from the specified value provider function
|
|
4
17
|
* @param length length of the new array
|
package/utils/array/array.js
CHANGED
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.randomItems = exports.randomItem = exports.shuffle = exports.createArray = exports.toArray = void 0;
|
|
3
|
+
exports.randomItems = exports.randomItem = exports.shuffle = exports.createArray = exports.extractValueOfArrayIfSingleElement = exports.toArrayCopy = exports.toArray = void 0;
|
|
4
4
|
const math_1 = require("../math");
|
|
5
5
|
const type_guards_1 = require("../type-guards");
|
|
6
6
|
function toArray(value) {
|
|
7
|
-
return
|
|
7
|
+
return (0, type_guards_1.isArray)(value) ? value : [value];
|
|
8
8
|
}
|
|
9
9
|
exports.toArray = toArray;
|
|
10
|
+
/**
|
|
11
|
+
* Return copy of value, if it is an array, otherwise puts the single value into an array.
|
|
12
|
+
*/
|
|
13
|
+
function toArrayCopy(value) {
|
|
14
|
+
return (0, type_guards_1.isArray)(value) ? [...value] : [value];
|
|
15
|
+
}
|
|
16
|
+
exports.toArrayCopy = toArrayCopy;
|
|
17
|
+
function extractValueOfArrayIfSingleElement(value) {
|
|
18
|
+
if ((0, type_guards_1.isArray)(value)) {
|
|
19
|
+
return (value.length == 1) ? value[0] : value;
|
|
20
|
+
}
|
|
21
|
+
return value;
|
|
22
|
+
}
|
|
23
|
+
exports.extractValueOfArrayIfSingleElement = extractValueOfArrayIfSingleElement;
|
|
10
24
|
/**
|
|
11
25
|
* creates a new array of specified length and fills it with values from the specified value provider function
|
|
12
26
|
* @param length length of the new array
|
package/utils/array/array.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array.js","sourceRoot":"","sources":["../../../source/utils/array/array.ts"],"names":[],"mappings":";;;AAAA,kCAAoC;AACpC,
|
|
1
|
+
{"version":3,"file":"array.js","sourceRoot":"","sources":["../../../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AC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE;QAC/B,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;KACvC;IAED,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAEhC,OAAO,WAAW,CAAI,KAAK,EAAE,GAAG,EAAE;QAChC,OAAO,IAAI,EAAE;YACX,MAAM,KAAK,GAAG,IAAA,gBAAS,EAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YAE7C,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;gBACrB,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;gBACjB,OAAO,KAAK,CAAC,KAAK,CAAE,CAAC;aACtB;SACF;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAzBD,kCAyBC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type FeedFunction<T> = (item: T, index: number) => void;
|
|
2
|
+
export type ParallelFeedIteratorFunction<TIn, TOut> = (item: TIn, index: number, feed: FeedFunction<TOut>) => Promise<void>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export type { Context } from '../iterable-helpers/types';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
2
|
+
export type AsyncIteratorFunction<TIn, TOut> = (item: TIn, index: number) => TOut | Promise<TOut>;
|
|
3
|
+
export type AsyncPredicate<T> = (item: T, index: number) => boolean | Promise<boolean>;
|
|
4
|
+
export type AsyncRetryPredicate<T> = (error: Error, item: T, index: number) => boolean | Promise<boolean>;
|
|
5
|
+
export type AsyncReducer<T, U> = (previous: U, current: T, index: number) => U | Promise<U>;
|
|
6
|
+
export type ParallelizableIteratorFunction<TIn, TOut> = (item: TIn, index: number) => Promise<TOut>;
|
|
7
|
+
export type ParallelizablePredicate<T> = ParallelizableIteratorFunction<T, boolean>;
|
|
8
|
+
export type ThrottleFunction = () => Promise<void>;
|
package/utils/backoff.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReadonlyCancellationToken } from './cancellation-token';
|
|
2
2
|
import { CancellationToken } from './cancellation-token';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type BackoffStrategy = 'linear' | 'exponential';
|
|
4
|
+
export type BackoffOptions = {
|
|
5
5
|
/**
|
|
6
6
|
* how to increase delay
|
|
7
7
|
*/
|
|
@@ -19,7 +19,7 @@ export declare type BackoffOptions = {
|
|
|
19
19
|
*/
|
|
20
20
|
maximumDelay?: number;
|
|
21
21
|
};
|
|
22
|
-
export
|
|
22
|
+
export type BackoffLoopController = {
|
|
23
23
|
/**
|
|
24
24
|
* backoff before next iteration
|
|
25
25
|
*/
|
|
@@ -29,11 +29,11 @@ export declare type BackoffLoopController = {
|
|
|
29
29
|
*/
|
|
30
30
|
break: () => void;
|
|
31
31
|
};
|
|
32
|
-
export
|
|
32
|
+
export type BackoffLoopFunction = (controller: BackoffLoopController) => void | Promise<void>;
|
|
33
33
|
/**
|
|
34
34
|
* @param continueToken token to continue loop immediately
|
|
35
35
|
*/
|
|
36
|
-
export
|
|
36
|
+
export type BackoffGeneratorYield = (continueToken?: CancellationToken) => void;
|
|
37
37
|
export declare class BackoffHelper {
|
|
38
38
|
private readonly strategy;
|
|
39
39
|
private readonly initialDelay;
|
package/utils/benchmark.d.ts
CHANGED
package/utils/binary-search.d.ts
CHANGED
package/utils/binary.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binary.js","sourceRoot":"","sources":["../../source/utils/binary.ts"],"names":[],"mappings":";;;AAAA,0CAA4C;AAE5C,+CAAsD;AAEtD;;;;GAIG;AACH,SAAgB,aAAa,CAAC,IAAgB,EAAE,QAAiB,KAAK;IACpE,IAAI,I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EhD,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAE,CAAC,WAAW,CAAC;IAEpC,IAAI,yBAAc,IAAI,CAAC,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,UAAU,CAAC,CAAC,EAAE;QAChE,OAAO,MAAM,CAAC,MAAM,CAAC,MAA6B,EAAE,WAAW,CAAiB,CAAC;KAClF;IAED,MAAM,UAAU,GAAG,WAAW,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IAC3F,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC;IAE1C,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;QAC1B,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC9C,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;QACrC,YAAY,IAAI,UAAU,CAAC,UAAU,CAAC;KACvC;IAED,OAAO,IAAK,IAA8B,CAAC,MAAM,CAAC,MAAM,CAAiB,CAAC;AAC5E,CAAC;AApBD,wDAoBC"}
|
package/utils/compression.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export interface CompressionResult {
|
|
|
13
13
|
export interface DecompressionResult extends CompressionResult {
|
|
14
14
|
toUtf8(): Promise<string>;
|
|
15
15
|
}
|
|
16
|
-
export
|
|
16
|
+
export type CompressionAlgorithm = 'gzip' | 'brotli' | 'deflate' | 'deflate-raw';
|
|
17
17
|
export declare function compressString(input: string, algorithm: 'gzip' | 'deflate' | 'deflate-raw', options?: ZlibType.ZlibOptions): CompressionResult;
|
|
18
18
|
export declare function compressString(input: string, algorithm: 'brotli', options?: ZlibType.BrotliOptions): CompressionResult;
|
|
19
19
|
export declare function compressString(input: string, algorithm: CompressionAlgorithm, options?: ZlibType.ZlibOptions | ZlibType.BrotliOptions): CompressionResult;
|
package/utils/cryptography.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { BinaryData, TypedExtract } from "../types";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
2
|
+
export type AesMode = 'CBC' | 'CTR' | 'GCM' | 'KW';
|
|
3
|
+
export type EcdsaCurve = 'P-256' | 'P-384' | 'P-521';
|
|
4
|
+
export type HashAlgorithm = 'SHA-1' | 'SHA-256' | 'SHA-384' | 'SHA-512';
|
|
5
|
+
export type SymmetricAlgorithm = `AES-${AesMode}`;
|
|
6
|
+
export type AsymmetricAlgorithm = 'RSASSA-PKCS1-v1_5' | 'RSA-PSS' | 'RSA-OAEP' | 'ECDSA' | 'ECDH' | 'NODE-DSA' | 'NODE-DH' | 'NODE-ED25519' | 'NODE-ED448';
|
|
7
|
+
export type CryptionAlgorithm = Parameters<typeof crypto.subtle.encrypt>[0];
|
|
8
|
+
export type SignAlgorithm = Parameters<typeof crypto.subtle.sign>[0];
|
|
9
|
+
export type KeyAlgorithm = Parameters<typeof crypto.subtle.generateKey>[0];
|
|
10
|
+
export type KeyType = 'raw' | 'pkcs8' | 'spki' | 'jwk';
|
|
11
|
+
export type Key = JsonWebKey | BinaryData;
|
|
12
|
+
export type ScryptOptions = {
|
|
13
13
|
cost?: number;
|
|
14
14
|
blockSize?: number;
|
|
15
15
|
parallelization?: number;
|
package/utils/date-time.d.ts
CHANGED
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
import type { DateObjectUnits, DateTimeJSOptions } from 'luxon';
|
|
2
2
|
import { DateTime } from 'luxon';
|
|
3
|
-
export
|
|
3
|
+
export type DateObject = {
|
|
4
4
|
year: number;
|
|
5
5
|
month: number;
|
|
6
6
|
day: number;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type ZonedDateObject = DateObject & {
|
|
9
9
|
zone: string;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type TimeObject = {
|
|
12
12
|
hour: number;
|
|
13
13
|
minute: number;
|
|
14
14
|
second: number;
|
|
15
15
|
millisecond: number;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type ZonedTimeObject = TimeObject & {
|
|
18
18
|
zone: string;
|
|
19
19
|
};
|
|
20
|
-
export
|
|
21
|
-
export
|
|
20
|
+
export type SimpleDateTimeObject = DateObject & TimeObject;
|
|
21
|
+
export type ZonedDateTimeObject = SimpleDateTimeObject & {
|
|
22
22
|
zone: string;
|
|
23
23
|
};
|
|
24
|
-
export
|
|
24
|
+
export type NumericDateTime = {
|
|
25
25
|
date: number;
|
|
26
26
|
time: number;
|
|
27
27
|
};
|
|
28
28
|
export declare function now(): Date;
|
|
29
29
|
export declare function currentTimestamp(): number;
|
|
30
30
|
export declare function currentTimestampSeconds(): number;
|
|
31
|
+
export declare function timestampToTimestampSeconds(timestamp: number): number;
|
|
31
32
|
export declare function currentDate(): number;
|
|
32
33
|
export declare function currentTime(): number;
|
|
33
34
|
export declare function timestampToNumericDate(timestamp: number): number;
|
package/utils/date-time.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.numericDateTimeToDateTime = exports.dateTimeToTime = exports.numericDateToDateTime = exports.dateTimeToNumericDate = exports.zonedDateObjectToDateTime = exports.numericDateTimeToTimestamp = exports.numericDateToDate = exports.numericDateToTimestamp = exports.timestampToNumericDateAndTime = exports.numericTimeToTimeObject = exports.timeObjectToNumericTime = exports.timestampToTime = exports.dateToNumericDate = exports.timestampToNumericDate = exports.currentTime = exports.currentDate = exports.currentTimestampSeconds = exports.currentTimestamp = exports.now = void 0;
|
|
3
|
+
exports.numericDateTimeToDateTime = exports.dateTimeToTime = exports.numericDateToDateTime = exports.dateTimeToNumericDate = exports.zonedDateObjectToDateTime = exports.numericDateTimeToTimestamp = exports.numericDateToDate = exports.numericDateToTimestamp = exports.timestampToNumericDateAndTime = exports.numericTimeToTimeObject = exports.timeObjectToNumericTime = exports.timestampToTime = exports.dateToNumericDate = exports.timestampToNumericDate = exports.currentTime = exports.currentDate = exports.timestampToTimestampSeconds = exports.currentTimestampSeconds = exports.currentTimestamp = exports.now = void 0;
|
|
4
4
|
const luxon_1 = require("luxon");
|
|
5
5
|
const units_1 = require("./units");
|
|
6
6
|
function now() {
|
|
@@ -12,9 +12,13 @@ function currentTimestamp() {
|
|
|
12
12
|
}
|
|
13
13
|
exports.currentTimestamp = currentTimestamp;
|
|
14
14
|
function currentTimestampSeconds() {
|
|
15
|
-
return
|
|
15
|
+
return timestampToTimestampSeconds(currentTimestamp());
|
|
16
16
|
}
|
|
17
17
|
exports.currentTimestampSeconds = currentTimestampSeconds;
|
|
18
|
+
function timestampToTimestampSeconds(timestamp) {
|
|
19
|
+
return Math.floor(timestamp / 1000);
|
|
20
|
+
}
|
|
21
|
+
exports.timestampToTimestampSeconds = timestampToTimestampSeconds;
|
|
18
22
|
function currentDate() {
|
|
19
23
|
const timestamp = currentTimestamp();
|
|
20
24
|
return timestampToNumericDate(timestamp);
|
package/utils/date-time.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-time.js","sourceRoot":"","sources":["../../source/utils/date-time.ts"],"names":[],"mappings":";;;AACA,iCAAiC;AACjC,mCAAgH;AAkChH,SAAgB,GAAG;IACjB,OAAO,IAAI,IAAI,EAAE,CAAC;AACpB,CAAC;AAFD,kBAEC;AAED,SAAgB,gBAAgB;IAC9B,OAAO,IAAI,CAAC,GAAG,EAAE,CAAC;AACpB,CAAC;AAFD,4CAEC;AAED,SAAgB,uBAAuB;IACrC,OAAO,
|
|
1
|
+
{"version":3,"file":"date-time.js","s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AC,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;AACrF,CAAC;AAFD,8DAEC"}
|
package/utils/equals.d.ts
CHANGED
|
@@ -7,13 +7,13 @@ declare const equalsSymbol: unique symbol;
|
|
|
7
7
|
export declare const Equals: {
|
|
8
8
|
readonly symbol: typeof equalsSymbol;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
11
|
-
export
|
|
10
|
+
export type ArrayEqualsComparator<A, B> = (a: A, b: B) => boolean;
|
|
11
|
+
export type ArrayEqualsOptions<A, B> = {
|
|
12
12
|
sort?: Comparator<A | B>;
|
|
13
13
|
comparator?: ArrayEqualsComparator<A, B>;
|
|
14
14
|
};
|
|
15
15
|
export declare function arrayEquals<A, B>(a: readonly A[], b: readonly B[], options?: ArrayEqualsOptions<A, B>): boolean;
|
|
16
|
-
export
|
|
16
|
+
export type EqualsOptions = {
|
|
17
17
|
deep?: boolean;
|
|
18
18
|
arrayDeep?: boolean;
|
|
19
19
|
sortArray?: boolean;
|
package/utils/factory-map.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Factory<Key, Value> = (key: Key) => Value;
|
|
2
2
|
/** same as {@link Map}, except that it will build the value with the provided factory on {@link get} if it doesnt exist */
|
|
3
3
|
export declare class FactoryMap<K, V> implements Map<K, V> {
|
|
4
4
|
private readonly factory;
|
package/utils/format-error.d.ts
CHANGED
package/utils/helpers.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export declare function parseFirstAndFamilyName(name: string): {
|
|
|
26
26
|
firstName: string | undefined;
|
|
27
27
|
familyName: string | undefined;
|
|
28
28
|
};
|
|
29
|
-
export
|
|
29
|
+
export type NormalizeTextOptions = {
|
|
30
30
|
/**
|
|
31
31
|
* remove leading and trailing whitespace
|
|
32
32
|
*/
|