@tstdl/base 0.81.34 → 0.82.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/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.service.d.ts +6 -0
- package/authentication/authentication-session.service.js +17 -0
- package/authentication/authentication-session.service.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 +6 -0
- package/authentication/models/authentication-credentials.model.js +37 -0
- package/authentication/models/authentication-credentials.model.js.map +1 -0
- package/authentication/models/authentication-session.model.d.ts +9 -0
- package/authentication/models/authentication-session.model.js +52 -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/decorators.d.ts +3 -3
- package/container/interfaces.d.ts +1 -1
- package/container/provider.d.ts +6 -6
- package/container/resolve-chain.d.ts +2 -2
- 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/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 +1 -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 +1 -1
- package/mail/repositories/mongo-mail-log.repository.d.ts +2 -2
- 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 +1 -1
- package/notification/module.d.ts +1 -1
- 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/types.d.ts +4 -4
- package/package.json +4 -4
- 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/registry.d.ts +9 -9
- package/reflection/types.d.ts +32 -32
- package/reflection/utils.d.ts +5 -5
- 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/constraints/generic.d.ts +2 -2
- package/schema/constraints/length.d.ts +1 -1
- package/schema/decorators/types.d.ts +3 -3
- 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 +1 -1
- package/schema/schemas/assign.d.ts +2 -0
- package/schema/schemas/assign.js.map +1 -1
- package/schema/schemas/boolean.d.ts +1 -1
- package/schema/schemas/date.d.ts +1 -1
- package/schema/schemas/enumeration.d.ts +1 -1
- package/schema/schemas/instance.d.ts +1 -1
- package/schema/schemas/literal.d.ts +1 -1
- package/schema/schemas/nullable.d.ts +1 -1
- package/schema/schemas/number.d.ts +1 -1
- package/schema/schemas/object.d.ts +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 +1 -1
- package/schema/schemas/uint8-array.d.ts +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.d.ts +31 -31
- package/schema/utils/schema.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/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/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
|
@@ -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,IAAA,2BAAa,EAAC,IAAI,CAAC,EAAE;QACvB,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;KACrC;IAED,IAAI,CAA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AAC,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","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;A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
|
|
|
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
|
*/
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Context<T> = {
|
|
2
2
|
item: T;
|
|
3
3
|
readonly index: number;
|
|
4
4
|
};
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
5
|
+
export type TypePredicate<T, TPredicate extends T> = (item: T, index: number) => item is TPredicate;
|
|
6
|
+
export type Predicate<T> = (item: T, index: number) => boolean;
|
|
7
|
+
export type IteratorFunction<TIn, TOut> = (item: TIn, index: number) => TOut;
|
|
8
|
+
export type Reducer<T, U> = (previous: U, current: T, index: number) => U;
|
|
9
|
+
export type IterableItemMetadata<T> = {
|
|
10
10
|
index: number;
|
|
11
11
|
isFirst: boolean;
|
|
12
12
|
isLast: boolean;
|
package/utils/jwt.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { OneOrMany, StringMap } from '../types';
|
|
2
2
|
import type { Key } from './cryptography';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type JwtTokenAlgorithm = 'HS256' | 'HS384' | 'HS512';
|
|
4
|
+
export type JwtTokenHeader<T extends StringMap = StringMap> = {
|
|
5
5
|
alg: JwtTokenAlgorithm;
|
|
6
6
|
typ: 'JWT';
|
|
7
7
|
} & T;
|
|
8
|
-
export
|
|
8
|
+
export type JwtToken<TPayload = StringMap, THeader extends JwtTokenHeader = JwtTokenHeader> = {
|
|
9
9
|
readonly header: THeader;
|
|
10
10
|
readonly payload: TPayload;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type JwtTokenParseResult<T extends JwtToken = JwtToken> = {
|
|
13
13
|
raw: string;
|
|
14
14
|
token: T;
|
|
15
15
|
encoded: {
|
package/utils/math.d.ts
CHANGED
package/utils/merge.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Record } from "../types";
|
|
2
2
|
import type { Merge } from 'type-fest';
|
|
3
|
-
|
|
3
|
+
type BaseType = Record | any[] | Map<any, any> | Set<any>;
|
|
4
4
|
export declare function merge<A extends BaseType, B extends BaseType>(a: A | undefined, b: B | undefined): A extends (infer T)[] ? B extends (infer U)[] ? (T | U)[] : never : A extends Map<infer K, infer V> ? B extends Map<infer K2, infer V2> ? Map<K | K2, V | V2> : never : A extends Set<infer T> ? B extends Set<infer U> ? Set<T | U> : never : A extends Record ? B extends Record ? Merge<A, B> : never : never;
|
|
5
5
|
export {};
|
package/utils/middleware.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
1
|
+
export type ComposedMiddleware<TIn, TOut, Context = unknown> = (value: TIn, context: Context) => TOut;
|
|
2
|
+
export type MiddlewareHandler<TIn, TOut, Context = unknown> = (value: TIn, context: Context) => TOut;
|
|
3
|
+
export type MiddlewareNext<TIn, TOut> = (value: TIn) => TOut;
|
|
4
|
+
export type Middleware<TIn, TOut, Context = unknown> = (value: TIn, next: MiddlewareNext<TIn, TOut>, context: Context) => TOut | TOut;
|
|
5
|
+
export type ComposedAsyncMiddleware<TIn, TOut, Context = unknown> = (value: TIn, context: Context) => Promise<TOut>;
|
|
6
|
+
export type AsyncMiddlewareHandler<TIn, TOut, Context = unknown> = (value: TIn, context: Context) => TOut | Promise<TOut>;
|
|
7
|
+
export type AsyncMiddlewareNext<TIn, TOut> = (value: TIn) => TOut | Promise<TOut>;
|
|
8
|
+
export type AsyncMiddleware<TIn, TOut, Context = unknown> = (value: TIn, next: AsyncMiddlewareNext<TIn, TOut>, context: Context) => TOut | Promise<TOut>;
|
|
9
|
+
export type MiddlewareOptions = {
|
|
10
10
|
allowMultipleNextCalls?: boolean;
|
|
11
11
|
};
|
|
12
12
|
export declare function composeMiddleware<TIn, TOut, Context = unknown>(middlewares: Middleware<TIn, TOut, Context>[], handler: MiddlewareHandler<TIn, TOut, Context>, options?: MiddlewareOptions): ComposedMiddleware<TIn, TOut, Context>;
|
package/utils/moving-metric.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare enum MetricAggregation {
|
|
|
9
9
|
Rate = 7,
|
|
10
10
|
RateBySum = 8
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export type MetricAggregationOptions<T extends MetricAggregation> = T extends MetricAggregation.Quantile ? {
|
|
13
13
|
scalar: number;
|
|
14
14
|
} : never;
|
|
15
15
|
export declare class MovingMetric {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { JsonPathInput } from "../../json-path";
|
|
2
|
-
export
|
|
2
|
+
export type CompiledDereferencer = (object: object) => unknown;
|
|
3
3
|
/**
|
|
4
4
|
* compiles a dereferencer for a specific reference
|
|
5
5
|
* @param object object to dereference
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare const isForwardRef: unique symbol;
|
|
2
|
-
export
|
|
2
|
+
export type ForwardRefOptions<T extends object = object> = {
|
|
3
3
|
reference?: T;
|
|
4
4
|
initializer?: () => T;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type ForwardRef<T extends object = object> = T & {
|
|
7
7
|
[isForwardRef]: true;
|
|
8
8
|
};
|
|
9
9
|
export declare const ForwardRef: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IfUnknown } from "../../types";
|
|
2
2
|
declare const lazyObjectValueSymbol: unique symbol;
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type LazyPropertyInitializer<T, K extends keyof T> = (this: T, key: K) => T[K];
|
|
4
|
+
export type LazyPropertyObjectDefinition<T extends object, P extends keyof T> = LazyPropertyDescriptor & {
|
|
5
5
|
/** define property with existing value */
|
|
6
6
|
value?: T[P];
|
|
7
7
|
/** define property with getter */
|
|
@@ -11,12 +11,12 @@ export declare type LazyPropertyObjectDefinition<T extends object, P extends key
|
|
|
11
11
|
/** lazily define property with initializer */
|
|
12
12
|
initializer?: LazyPropertyInitializer<T, P>;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type LazyObjectValue<T> = {
|
|
15
15
|
[lazyObjectValueSymbol]: typeof lazyObjectValueSymbol;
|
|
16
16
|
value: T;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
19
|
-
export
|
|
18
|
+
export type LazyInitializerItem<T extends object, P extends keyof T> = Exclude<IfUnknown<T[P], never, T[P]>, Function | object> | LazyPropertyInitializer<T, P> | LazyPropertyObjectDefinition<T, P> | LazyObjectValue<T[P]>;
|
|
19
|
+
export type LazyPropertyDescriptor = {
|
|
20
20
|
/**
|
|
21
21
|
* true if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object
|
|
22
22
|
* @default true
|
package/utils/object/merge.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import type { DeepFlatten, DeepNonNullable, Record } from "../../types";
|
|
2
2
|
export declare const propertyName: unique symbol;
|
|
3
3
|
export declare const cast: unique symbol;
|
|
4
|
-
export
|
|
4
|
+
export type PropertyName = {
|
|
5
5
|
[propertyName]: string;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type PropertyNameProxy<T extends Record> = {
|
|
8
8
|
[P in keyof DeepNonNullable<T>]: PropertyNameProxyChild<T[P]>;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type PropertyNameProxyChild<T> = (T extends Record ? (PropertyNameProxy<T> & PropertyName) : (PropertyName)) & {
|
|
11
11
|
[cast]: <U extends T>() => PropertyNameProxyChild<U>;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type PropertyNameOfExpressionObject<T> = {
|
|
14
14
|
[P in keyof DeepNonNullable<T>]: PropertyNameOfExpressionObject<DeepNonNullable<T>[P]> & {
|
|
15
15
|
[cast]: <U extends DeepNonNullable<T>[P]>() => PropertyNameOfExpressionObject<U>;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type FlatPropertyNameOfExpressionObject<T> = {
|
|
19
19
|
[P in keyof DeepFlatten<DeepNonNullable<T>>]: FlatPropertyNameOfExpressionObject<DeepFlatten<DeepNonNullable<T>>[P]> & {
|
|
20
20
|
[cast]: <U extends DeepFlatten<DeepNonNullable<T>>[P]>() => FlatPropertyNameOfExpressionObject<U>;
|
|
21
21
|
};
|
package/utils/patch-worker.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Record, StringMap } from "../types";
|
|
2
2
|
import type { Observable } from 'rxjs';
|
|
3
|
-
export
|
|
3
|
+
export type PatchWorkerOptions<T extends StringMap> = {
|
|
4
4
|
debounceTime?: number;
|
|
5
5
|
retryDelay?: number;
|
|
6
6
|
handleOn?: Observable<any>;
|
|
@@ -7,7 +7,7 @@ export declare enum AggregationMode {
|
|
|
7
7
|
FirstQuartile = 4,
|
|
8
8
|
ThirdQuartile = 5
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type SampleFunction = () => number | Promise<number>;
|
|
11
11
|
export declare class PeriodicSampler {
|
|
12
12
|
private readonly sampleFunction;
|
|
13
13
|
private readonly subject;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type ProviderFunction<T> = () => ProviderFunctionResult<T> | Promise<ProviderFunctionResult<T>>;
|
|
2
|
+
export type ProviderFunctionResult<T> = {
|
|
3
3
|
hasItem: boolean;
|
|
4
4
|
item: T;
|
|
5
5
|
} | {
|
package/utils/proxy.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const reflectMethodsMap: Record<keyof ProxyHandler<object>, true>;
|
|
2
|
-
export
|
|
2
|
+
export type ReflectMethodsReturnTypeMap = {
|
|
3
3
|
[P in keyof ProxyHandler<object>]-?: ReturnType<Required<ProxyHandler<object>>[P]>;
|
|
4
4
|
};
|
|
5
5
|
export declare const reflectMethods: (keyof ProxyHandler<object>)[];
|
package/utils/singleton.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type Builder<T> = () => T;
|
|
2
|
+
export type AsyncBuilder<T> = () => Promise<T>;
|
|
3
3
|
export declare function singleton<T>(type: any, builder: Builder<T>): T;
|
|
4
4
|
export declare function singleton<T>(type: any, builder: AsyncBuilder<T>): Promise<T>;
|
|
5
5
|
export declare function singleton<T>(scope: any, type: any, builder: Builder<T>): T;
|
package/utils/sort.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type Comparator<T> = (a: T, b: T) => number;
|
|
2
|
+
export type AsyncComparator<T> = (a: T, b: T) => number | Promise<number>;
|
|
3
3
|
export declare function quickSort<T>(array: T[], comparator?: Comparator<T>, left?: number, right?: number): T[];
|
|
4
4
|
export declare function quickSortAsync<T>(array: T[], comparator?: AsyncComparator<T>, left?: number, right?: number): Promise<T[]>;
|
|
5
5
|
export declare function quickSortInPlace<T>(array: T[], comparator?: Comparator<T>, left?: number, right?: number): void;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
declare const nonObjectBufferModeSymbol: unique symbol;
|
|
3
3
|
declare const nonObjectStringModeSymbol: unique symbol;
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type NonObjectMode = NonObjectBufferMode | NonObjectStringMode;
|
|
5
|
+
export type NonObjectBufferMode = {
|
|
6
6
|
readonly [nonObjectBufferModeSymbol]: never;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type NonObjectStringMode = {
|
|
9
9
|
readonly [nonObjectStringModeSymbol]: never;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type NonObjectModeTypes = string | Buffer | Uint8Array;
|
|
12
|
+
export type Data<T> = T extends NonObjectStringMode ? string : T extends NonObjectBufferMode ? Buffer : (T extends null ? never : T);
|
|
13
13
|
export {};
|
package/utils/type-guards.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AbstractConstructor, TypedArray } from "../types";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
2
|
+
export type InferIsType<T> = T extends (value: any) => value is infer R ? R : never;
|
|
3
|
+
export type InferIsNotType<ValueType, T> = T extends (value: any) => value is infer R ? Exclude<ValueType, R> : never;
|
|
4
|
+
export type AssertionMessage = string | (() => string);
|
|
5
5
|
export declare function assert(condition: boolean, message?: AssertionMessage): asserts condition;
|
|
6
6
|
export declare function assertNot(condition: boolean, message?: AssertionMessage): asserts condition;
|
|
7
7
|
export declare function isType<T>(type: AbstractConstructor<T>, value: any): value is T;
|
package/utils/url-builder.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { UndefinableJsonObject, UndefinableJsonPrimitive } from '../types';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
2
|
+
export type UrlBuilderParameterValue = UndefinableJsonPrimitive;
|
|
3
|
+
export type UrlBuilderParameters = UndefinableJsonObject;
|
|
4
|
+
export type UrlBuilderOptions = {
|
|
5
5
|
arraySeparator?: string;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type UrlBuilderResult = {
|
|
8
8
|
parsedUrl: string;
|
|
9
9
|
parametersRest: UrlBuilderParameters;
|
|
10
10
|
};
|
package/web-types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export type InputType = 'checkbox' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'image' | 'month' | 'number' | 'password' | 'radio' | 'range' | 'search' | 'tel' | 'text' | 'time' | 'url' | 'week';
|
|
2
|
+
export type InputMode = 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
|
|
3
|
+
export type InputAutocomplete = 'off' | 'on' | 'name' | 'honorific-prefix' | 'given-name' | 'additional-name' | 'family-name' | 'honorific-suffix' | 'nickname' | 'email' | 'username' | 'new-password' | 'current-password' | 'one-time-code' | 'organization-title' | 'organization' | 'street-address' | 'address-line1' | 'address-line2' | 'address-line3' | 'address-level4' | 'address-level3' | 'address-level2' | 'address-level1' | 'country' | 'country-name' | 'postal-code' | 'cc-name' | 'cc-given-name' | 'cc-additional-name' | 'cc-family-name' | 'cc-number' | 'cc-exp' | 'cc-exp-month' | 'cc-exp-year' | 'cc-csc' | 'cc-type' | 'transaction-currency' | 'transaction-amount' | 'language' | 'bday' | 'bday-day' | 'bday-month' | 'bday-year' | 'sex' | 'tel' | 'tel-country-code' | 'tel-national' | 'tel-area-code' | 'tel-local' | 'tel-extension' | 'impp' | 'url' | 'photo';
|
|
4
|
+
export type InputAttributes = {
|
|
5
5
|
accept?: string;
|
|
6
6
|
autocomplete?: InputAutocomplete;
|
|
7
7
|
autofocus?: boolean;
|