@tstdl/base 0.90.89 → 0.90.91
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.js +0 -1
- package/api/server/gateway.js +1 -1
- package/application/application.js +0 -1
- package/authentication/authentication.api.d.ts +1 -1
- package/authentication/client/api.client.d.ts +1 -1
- package/authentication/server/mongo/mongo-authentication-credentials.repository.js +1 -1
- package/authentication/server/mongo/mongo-authentication-session.repository.js +1 -1
- package/browser/browser-context-controller.js +1 -1
- package/browser/browser-controller.js +0 -1
- package/browser/browser.service.js +0 -1
- package/collections/awaitable/awaitable-set.d.ts +7 -0
- package/collections/awaitable/awaitable-set.js +21 -0
- package/collections/keyed-set.d.ts +7 -0
- package/collections/keyed-set.js +22 -0
- package/collections/observable/observable-set.d.ts +9 -2
- package/collections/observable/observable-set.js +21 -0
- package/context/context.d.ts +5 -16
- package/data-structures/distinct-collection.d.ts +10 -1
- package/data-structures/distinct-collection.js +26 -1
- package/data-structures/multi-key-set.d.ts +2 -1
- package/data-structures/multi-key-set.js +3 -0
- package/data-structures/set-collection.d.ts +9 -0
- package/data-structures/set-collection.js +29 -0
- package/database/mongo/classes.js +0 -2
- package/database/mongo/mongo-entity-repository.js +2 -2
- package/distributed-loop/distributed-loop.js +1 -1
- package/dom/observation/intersection-observer.d.ts +1 -1
- package/dom/observation/intersection-observer.js +30 -17
- package/http/client/adapters/undici.adapter.js +1 -1
- package/http/client/http-client.js +1 -1
- package/http/server/node/node-http-server.d.ts +0 -1
- package/image-service/imgproxy/imgproxy-image-service.js +1 -1
- package/import.js +1 -1
- package/intl/number-parser.d.ts +1 -1
- package/key-value-store/key-value.store.js +0 -1
- package/key-value-store/mongo/mongo-key-value.repository.js +1 -1
- package/lock/lock.js +0 -1
- package/lock/mongo/mongo-lock-repository.js +1 -1
- package/lock/provider.js +0 -1
- package/logger/logger.js +0 -1
- package/mail/mail.client.js +0 -1
- package/mail/repositories/mongo/mongo-mail-log.repository.js +1 -1
- package/message-bus/message-bus.js +0 -1
- package/migration/mongo/migration-state-repository.js +1 -1
- package/module/modules/web-server.module.js +0 -1
- package/object-storage/object-storage.js +0 -1
- package/openid-connect/mongo-oidc-state.repository.js +1 -1
- package/package.json +6 -6
- package/password/password-check.localization.d.ts +2 -2
- package/pdf/pdf.service.js +4 -2
- package/queue/mongo/mongo-job.repository.js +1 -1
- package/queue/mongo/queue.provider.js +0 -1
- package/queue/queue.js +0 -1
- package/rpc/endpoints/message-port.rpc-endpoint.d.ts +0 -1
- package/rpc/rpc.d.ts +5 -5
- package/schema/schema.d.ts +4 -4
- package/schema/schemas/object.d.ts +4 -4
- package/search-index/elastic/config.js +0 -1
- package/serializer/handlers/binary.d.ts +0 -1
- package/signals/to-lazy-signal.d.ts +2 -1
- package/templates/providers/file.template-provider.js +0 -1
- package/templates/resolvers/file.template-resolver.js +0 -1
- package/threading/thread-pool.d.ts +0 -1
- package/types.d.ts +1 -1
- package/utils/compression.d.ts +0 -3
- package/utils/factory-map.d.ts +1 -1
- package/utils/object/forward-ref.d.ts +5 -5
- package/utils/object/object.d.ts +3 -6
- package/utils/repl.d.ts +0 -1
- package/utils/stream/stream-helper-types.d.ts +0 -1
package/api/client/client.js
CHANGED
|
@@ -2,7 +2,6 @@ import { HttpClient, HttpClientRequest } from '../../http/client/index.js';
|
|
|
2
2
|
import { normalizeSingleHttpValue } from '../../http/types.js';
|
|
3
3
|
import { inject } from '../../injector/inject.js';
|
|
4
4
|
import { Injector } from '../../injector/injector.js';
|
|
5
|
-
import { resolveArgumentType } from '../../injector/interfaces.js';
|
|
6
5
|
import { Schema } from '../../schema/index.js';
|
|
7
6
|
import { ServerSentEvents } from '../../sse/server-sent-events.js';
|
|
8
7
|
import { toArray } from '../../utils/array/array.js';
|
package/api/server/gateway.js
CHANGED
|
@@ -15,7 +15,7 @@ import { BadRequestError } from '../../errors/bad-request.error.js';
|
|
|
15
15
|
import { NotFoundError } from '../../errors/not-found.error.js';
|
|
16
16
|
import { NotImplementedError } from '../../errors/not-implemented.error.js';
|
|
17
17
|
import { HttpServerResponse } from '../../http/server/index.js';
|
|
18
|
-
import { InjectArg, ResolveArg, Singleton
|
|
18
|
+
import { InjectArg, ResolveArg, Singleton } from '../../injector/index.js';
|
|
19
19
|
import { Logger } from '../../logger/index.js';
|
|
20
20
|
import { Schema } from '../../schema/index.js';
|
|
21
21
|
import { ServerSentEventsSource } from '../../sse/server-sent-events-source.js';
|
|
@@ -9,7 +9,6 @@ import { getGlobalInjector } from '../core.js';
|
|
|
9
9
|
import { Singleton } from '../injector/decorators.js';
|
|
10
10
|
import { inject, injectArgument, runInInjectionContext } from '../injector/inject.js';
|
|
11
11
|
import { Injector } from '../injector/injector.js';
|
|
12
|
-
import { resolveArgumentType } from '../injector/interfaces.js';
|
|
13
12
|
import { Logger } from '../logger/index.js';
|
|
14
13
|
import { ModuleBase } from '../module/module-base.js';
|
|
15
14
|
import { ModuleState } from '../module/module.js';
|
|
@@ -4,7 +4,7 @@ import type { ObjectSchemaOrType } from '../../schema/types/types.js';
|
|
|
4
4
|
import type { Record } from '../../types.js';
|
|
5
5
|
import type { AuthenticationApiDefinition } from '../authentication.api.js';
|
|
6
6
|
export declare function getAuthenticationApiClient<AdditionalTokenPayload extends Record, AuthenticationData, AdditionalInitSecretResetData extends Record>(additionalTokenPayloadSchema: ObjectSchemaOrType<AdditionalTokenPayload>, authenticationDataSchema: SchemaTestable<AuthenticationData>, additionalInitSecretResetData: ObjectSchemaOrType<AdditionalInitSecretResetData>): ApiClient<AuthenticationApiDefinition<AdditionalTokenPayload, AuthenticationData, AdditionalInitSecretResetData>>;
|
|
7
|
-
declare const defaultAuthenticationApiClient: ApiClient<AuthenticationApiDefinition<
|
|
7
|
+
declare const defaultAuthenticationApiClient: ApiClient<AuthenticationApiDefinition<import("../../types.js").ObjectLiteral, unknown, import("../../types.js").ObjectLiteral>>;
|
|
8
8
|
export declare class AuthenticationApiClient extends defaultAuthenticationApiClient {
|
|
9
9
|
}
|
|
10
10
|
export {};
|
|
@@ -12,7 +12,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
12
12
|
};
|
|
13
13
|
import { getNewId } from '../../../database/index.js';
|
|
14
14
|
import { Collection, MongoEntityRepository, noopTransformer } from '../../../database/mongo/index.js';
|
|
15
|
-
import { ForwardArg, Singleton
|
|
15
|
+
import { ForwardArg, Singleton } from '../../../injector/index.js';
|
|
16
16
|
import { Logger } from '../../../logger/index.js';
|
|
17
17
|
import { isUndefined } from '../../../utils/type-guards.js';
|
|
18
18
|
import { AuthenticationCredentialsRepository } from '../authentication-credentials.repository.js';
|
|
@@ -11,7 +11,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
13
|
import { Collection, MongoEntityRepository, noopTransformer } from '../../../database/mongo/index.js';
|
|
14
|
-
import { ForwardArg, Singleton
|
|
14
|
+
import { ForwardArg, Singleton } from '../../../injector/index.js';
|
|
15
15
|
import { Logger } from '../../../logger/index.js';
|
|
16
16
|
import { AuthenticationSessionRepository } from '../authentication-session.repository.js';
|
|
17
17
|
let defaultArgument;
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import { disposeAsync } from '../disposable/disposable.js';
|
|
11
11
|
import { Injectable } from '../injector/decorators.js';
|
|
12
|
-
import { afterResolve
|
|
12
|
+
import { afterResolve } from '../injector/interfaces.js';
|
|
13
13
|
import { filterUndefinedFromRecord } from '../utils/object/object.js';
|
|
14
14
|
import { isDefined } from '../utils/type-guards.js';
|
|
15
15
|
import { BrowserController } from './browser-controller.js';
|
|
@@ -10,7 +10,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
import { disposeAsync } from '../disposable/disposable.js';
|
|
11
11
|
import { Injectable } from '../injector/decorators.js';
|
|
12
12
|
import { inject } from '../injector/inject.js';
|
|
13
|
-
import { resolveArgumentType } from '../injector/interfaces.js';
|
|
14
13
|
import { filterUndefinedFromRecord } from '../utils/object/object.js';
|
|
15
14
|
import { isDefined } from '../utils/type-guards.js';
|
|
16
15
|
import { BrowserContextController } from './browser-context-controller.js';
|
|
@@ -12,7 +12,6 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
12
12
|
};
|
|
13
13
|
import { disposeAsync } from '../disposable/disposable.js';
|
|
14
14
|
import { InjectArg, Singleton } from '../injector/decorators.js';
|
|
15
|
-
import { resolveArgumentType } from '../injector/interfaces.js';
|
|
16
15
|
import { filterUndefinedFromRecord } from '../utils/object/object.js';
|
|
17
16
|
import { isDefined } from '../utils/type-guards.js';
|
|
18
17
|
import { BrowserContextController } from './browser-context-controller.js';
|
|
@@ -12,6 +12,13 @@ export declare class AwaitableSet<T> implements Set<T> {
|
|
|
12
12
|
add(value: T): this;
|
|
13
13
|
clear(): void;
|
|
14
14
|
delete(value: T): boolean;
|
|
15
|
+
union<U>(other: ReadonlySetLike<U>): Set<T | U>;
|
|
16
|
+
intersection<U>(other: ReadonlySetLike<U>): Set<T & U>;
|
|
17
|
+
difference<U>(other: ReadonlySetLike<U>): Set<T>;
|
|
18
|
+
symmetricDifference<U>(other: ReadonlySetLike<U>): Set<T | U>;
|
|
19
|
+
isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
20
|
+
isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
21
|
+
isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
|
|
15
22
|
forEach(callback: (value: T, value2: T, set: AwaitableSet<T>) => void, thisArg?: any): void;
|
|
16
23
|
has(value: T): boolean;
|
|
17
24
|
entries(): IterableIterator<[T, T]>;
|
|
@@ -43,6 +43,27 @@ export class AwaitableSet {
|
|
|
43
43
|
}
|
|
44
44
|
return success;
|
|
45
45
|
}
|
|
46
|
+
union(other) {
|
|
47
|
+
return this.backingSet.union(other);
|
|
48
|
+
}
|
|
49
|
+
intersection(other) {
|
|
50
|
+
return this.backingSet.intersection(other);
|
|
51
|
+
}
|
|
52
|
+
difference(other) {
|
|
53
|
+
return this.backingSet.difference(other);
|
|
54
|
+
}
|
|
55
|
+
symmetricDifference(other) {
|
|
56
|
+
return this.backingSet.symmetricDifference(other);
|
|
57
|
+
}
|
|
58
|
+
isSubsetOf(other) {
|
|
59
|
+
return this.backingSet.isSubsetOf(other);
|
|
60
|
+
}
|
|
61
|
+
isSupersetOf(other) {
|
|
62
|
+
return this.backingSet.isSupersetOf(other);
|
|
63
|
+
}
|
|
64
|
+
isDisjointFrom(other) {
|
|
65
|
+
return this.backingSet.isDisjointFrom(other);
|
|
66
|
+
}
|
|
46
67
|
forEach(callback, thisArg) {
|
|
47
68
|
const boundCallback = callback.bind(thisArg);
|
|
48
69
|
this.backingSet.forEach((value, value2) => boundCallback(value, value2, this));
|
|
@@ -13,6 +13,13 @@ export declare class KeyedSet<T> implements Set<T> {
|
|
|
13
13
|
add(value: T): this;
|
|
14
14
|
clear(): void;
|
|
15
15
|
delete(value: T): boolean;
|
|
16
|
+
union<U>(_other: ReadonlySetLike<U>): Set<T | U>;
|
|
17
|
+
intersection<U>(_other: ReadonlySetLike<U>): Set<T & U>;
|
|
18
|
+
difference<U>(_other: ReadonlySetLike<U>): Set<T>;
|
|
19
|
+
symmetricDifference<U>(_other: ReadonlySetLike<U>): Set<T | U>;
|
|
20
|
+
isSubsetOf(_other: ReadonlySetLike<unknown>): boolean;
|
|
21
|
+
isSupersetOf(_other: ReadonlySetLike<unknown>): boolean;
|
|
22
|
+
isDisjointFrom(_other: ReadonlySetLike<unknown>): boolean;
|
|
16
23
|
forEach(callback: (value: T, value2: T, set: KeyedSet<T>) => void, thisArg?: any): void;
|
|
17
24
|
has(value: T): boolean;
|
|
18
25
|
[Symbol.iterator](): IterableIterator<T>;
|
package/collections/keyed-set.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NotSupportedError } from '../errors/not-supported.error.js';
|
|
1
2
|
import { map } from '../utils/iterable-helpers/map.js';
|
|
2
3
|
export var KeyedSetMode;
|
|
3
4
|
(function (KeyedSetMode) {
|
|
@@ -33,6 +34,27 @@ export class KeyedSet {
|
|
|
33
34
|
const key = this.selector(value);
|
|
34
35
|
return this.backingMap.delete(key);
|
|
35
36
|
}
|
|
37
|
+
union(_other) {
|
|
38
|
+
throw new NotSupportedError();
|
|
39
|
+
}
|
|
40
|
+
intersection(_other) {
|
|
41
|
+
throw new NotSupportedError();
|
|
42
|
+
}
|
|
43
|
+
difference(_other) {
|
|
44
|
+
throw new NotSupportedError();
|
|
45
|
+
}
|
|
46
|
+
symmetricDifference(_other) {
|
|
47
|
+
throw new NotSupportedError();
|
|
48
|
+
}
|
|
49
|
+
isSubsetOf(_other) {
|
|
50
|
+
throw new NotSupportedError();
|
|
51
|
+
}
|
|
52
|
+
isSupersetOf(_other) {
|
|
53
|
+
throw new NotSupportedError();
|
|
54
|
+
}
|
|
55
|
+
isDisjointFrom(_other) {
|
|
56
|
+
throw new NotSupportedError();
|
|
57
|
+
}
|
|
36
58
|
forEach(callback, thisArg) {
|
|
37
59
|
const boundCallback = callback.bind(thisArg);
|
|
38
60
|
this.backingMap.forEach((value) => boundCallback(value, value, this));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { ObservableCollection } from './observable-collection.js';
|
|
2
1
|
import { ObservableCollectionBase } from './observable-collection-base.js';
|
|
2
|
+
import type { ObservableCollection } from './observable-collection.js';
|
|
3
3
|
export declare class ObservableSet<T> extends ObservableCollectionBase<T, ObservableSet<T>> implements Set<T>, ObservableCollection<T> {
|
|
4
4
|
private readonly backingSet;
|
|
5
5
|
readonly [Symbol.toStringTag]: 'ObservableSet';
|
|
6
|
-
get self():
|
|
6
|
+
get self(): this;
|
|
7
7
|
get length(): number;
|
|
8
8
|
get size(): number;
|
|
9
9
|
constructor(values?: Iterable<T> | null);
|
|
@@ -13,6 +13,13 @@ export declare class ObservableSet<T> extends ObservableCollectionBase<T, Observ
|
|
|
13
13
|
remove(value: T): boolean;
|
|
14
14
|
removeMany(values: T[]): number;
|
|
15
15
|
delete(value: T): boolean;
|
|
16
|
+
union<U>(other: ReadonlySetLike<U>): Set<T | U>;
|
|
17
|
+
intersection<U>(other: ReadonlySetLike<U>): Set<T & U>;
|
|
18
|
+
difference<U>(other: ReadonlySetLike<U>): Set<T>;
|
|
19
|
+
symmetricDifference<U>(other: ReadonlySetLike<U>): Set<T | U>;
|
|
20
|
+
isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
21
|
+
isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
22
|
+
isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
|
|
16
23
|
forEach(callback: (value: T, value2: T, set: ObservableSet<T>) => void, thisArg?: any): void;
|
|
17
24
|
has(value: T): boolean;
|
|
18
25
|
entries(): IterableIterator<[T, T]>;
|
|
@@ -54,6 +54,27 @@ export class ObservableSet extends ObservableCollectionBase {
|
|
|
54
54
|
delete(value) {
|
|
55
55
|
return this.remove(value);
|
|
56
56
|
}
|
|
57
|
+
union(other) {
|
|
58
|
+
return this.backingSet.union(other);
|
|
59
|
+
}
|
|
60
|
+
intersection(other) {
|
|
61
|
+
return this.backingSet.intersection(other);
|
|
62
|
+
}
|
|
63
|
+
difference(other) {
|
|
64
|
+
return this.backingSet.difference(other);
|
|
65
|
+
}
|
|
66
|
+
symmetricDifference(other) {
|
|
67
|
+
return this.backingSet.symmetricDifference(other);
|
|
68
|
+
}
|
|
69
|
+
isSubsetOf(other) {
|
|
70
|
+
return this.backingSet.isSubsetOf(other);
|
|
71
|
+
}
|
|
72
|
+
isSupersetOf(other) {
|
|
73
|
+
return this.backingSet.isSupersetOf(other);
|
|
74
|
+
}
|
|
75
|
+
isDisjointFrom(other) {
|
|
76
|
+
return this.backingSet.isDisjointFrom(other);
|
|
77
|
+
}
|
|
57
78
|
forEach(callback, thisArg) {
|
|
58
79
|
const boundCallback = callback.bind(thisArg);
|
|
59
80
|
this.backingSet.forEach((value, value2) => boundCallback(value, value2, this));
|
package/context/context.d.ts
CHANGED
|
@@ -1,29 +1,18 @@
|
|
|
1
|
+
import type { SimplifyObject } from '../types.js';
|
|
1
2
|
/**
|
|
2
3
|
* Creates a new context provider
|
|
3
4
|
* @param name name of of the context used for function names
|
|
4
5
|
*/
|
|
5
|
-
export declare function createContextProvider<Context, const Name extends string>(name: Name): { [P in `getCurrent${Name}Context`]: {
|
|
6
|
+
export declare function createContextProvider<Context, const Name extends string>(name: Name): SimplifyObject<{ [P in `getCurrent${Name}Context`]: {
|
|
6
7
|
(required: true, debugFn: Function): Context;
|
|
7
8
|
(required?: false | undefined, debugFn?: Function): Context | null;
|
|
8
9
|
(required: boolean, debugFn: Function): Context | null;
|
|
9
|
-
}; } & { [
|
|
10
|
+
}; } & { [P in `setCurrent${Name}Context`]: (context: Context | null) => Context | null; } & { [P in `runIn${Name}Context`]: <ReturnT>(context: Context, fn: () => ReturnT) => ReturnT; } & { [P in `isIn${Name}Context`]: {
|
|
10
11
|
(required: true, debugFn: Function): Context;
|
|
11
12
|
(required?: false | undefined, debugFn?: Function): Context | null;
|
|
12
13
|
(required: boolean, debugFn: Function): Context | null;
|
|
13
|
-
}; } & { [
|
|
14
|
+
}; } & { [P in `assertIn${Name}Context`]: {
|
|
14
15
|
(required: true, debugFn: Function): Context;
|
|
15
16
|
(required?: false | undefined, debugFn?: Function): Context | null;
|
|
16
17
|
(required: boolean, debugFn: Function): Context | null;
|
|
17
|
-
}; }
|
|
18
|
-
(required: true, debugFn: Function): Context;
|
|
19
|
-
(required?: false | undefined, debugFn?: Function): Context | null;
|
|
20
|
-
(required: boolean, debugFn: Function): Context | null;
|
|
21
|
-
}; } & { [P_1 in `setCurrent${Name}Context`]: (context: Context | null) => Context | null; } & { [P_2 in `runIn${Name}Context`]: <ReturnT>(context: Context, fn: () => ReturnT) => ReturnT; } & { [P_3 in `isIn${Name}Context`]: {
|
|
22
|
-
(required: true, debugFn: Function): Context;
|
|
23
|
-
(required?: false | undefined, debugFn?: Function): Context | null;
|
|
24
|
-
(required: boolean, debugFn: Function): Context | null;
|
|
25
|
-
}; } & { [P_4 in `assertIn${Name}Context`]: {
|
|
26
|
-
(required: true, debugFn: Function): Context;
|
|
27
|
-
(required?: false | undefined, debugFn?: Function): Context | null;
|
|
28
|
-
(required: boolean, debugFn: Function): Context | null;
|
|
29
|
-
}; })[K]; } : never;
|
|
18
|
+
}; }>;
|
|
@@ -1,20 +1,29 @@
|
|
|
1
1
|
import { Collection } from './collection.js';
|
|
2
2
|
export declare abstract class DistinctCollection<T, TThis extends DistinctCollection<T, TThis> = DistinctCollection<T, any>> extends Collection<T, TThis> {
|
|
3
|
-
/** Creates a new
|
|
3
|
+
/** Creates a new set and copies the items */
|
|
4
4
|
toSet(): Set<T>;
|
|
5
5
|
/** Returns an adapter that has the same interface as {@link Set}. No copying of data involved. */
|
|
6
6
|
asSet(): Set<T>;
|
|
7
7
|
abstract has(value: T): boolean;
|
|
8
8
|
abstract delete(value: T): boolean;
|
|
9
|
+
protected abstract _getBackingSet(): ReadonlySet<T> | undefined;
|
|
9
10
|
}
|
|
10
11
|
export declare class SetAdapter<T> implements Set<T> {
|
|
11
12
|
private readonly collection;
|
|
12
13
|
readonly [Symbol.toStringTag] = "SetAdapter";
|
|
14
|
+
private get fastestBackingSet();
|
|
13
15
|
get size(): number;
|
|
14
16
|
constructor(set: DistinctCollection<T, any>);
|
|
15
17
|
add(value: T): this;
|
|
16
18
|
clear(): void;
|
|
17
19
|
delete(value: T): boolean;
|
|
20
|
+
union<U>(other: ReadonlySetLike<U>): Set<T | U>;
|
|
21
|
+
intersection<U>(other: ReadonlySetLike<U>): Set<T & U>;
|
|
22
|
+
difference<U>(other: ReadonlySetLike<U>): Set<T>;
|
|
23
|
+
symmetricDifference<U>(other: ReadonlySetLike<U>): Set<T | U>;
|
|
24
|
+
isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
25
|
+
isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
26
|
+
isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
|
|
18
27
|
forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
|
|
19
28
|
has(value: T): boolean;
|
|
20
29
|
entries(): IterableIterator<[T, T]>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Collection } from './collection.js';
|
|
2
|
+
;
|
|
2
3
|
export class DistinctCollection extends Collection {
|
|
3
|
-
/** Creates a new
|
|
4
|
+
/** Creates a new set and copies the items */
|
|
4
5
|
toSet() {
|
|
5
6
|
return new Set(this);
|
|
6
7
|
}
|
|
@@ -12,6 +13,9 @@ export class DistinctCollection extends Collection {
|
|
|
12
13
|
export class SetAdapter {
|
|
13
14
|
collection;
|
|
14
15
|
[Symbol.toStringTag] = 'SetAdapter';
|
|
16
|
+
get fastestBackingSet() {
|
|
17
|
+
return this.collection._backingSet ?? this.collection.toSet();
|
|
18
|
+
}
|
|
15
19
|
get size() {
|
|
16
20
|
return this.collection.size;
|
|
17
21
|
}
|
|
@@ -28,6 +32,27 @@ export class SetAdapter {
|
|
|
28
32
|
delete(value) {
|
|
29
33
|
return this.collection.delete(value);
|
|
30
34
|
}
|
|
35
|
+
union(other) {
|
|
36
|
+
return this.fastestBackingSet.union(other);
|
|
37
|
+
}
|
|
38
|
+
intersection(other) {
|
|
39
|
+
return this.fastestBackingSet.intersection(other);
|
|
40
|
+
}
|
|
41
|
+
difference(other) {
|
|
42
|
+
return this.fastestBackingSet.difference(other);
|
|
43
|
+
}
|
|
44
|
+
symmetricDifference(other) {
|
|
45
|
+
return this.fastestBackingSet.symmetricDifference(other);
|
|
46
|
+
}
|
|
47
|
+
isSubsetOf(other) {
|
|
48
|
+
return this.fastestBackingSet.isSubsetOf(other);
|
|
49
|
+
}
|
|
50
|
+
isSupersetOf(other) {
|
|
51
|
+
return this.fastestBackingSet.isSupersetOf(other);
|
|
52
|
+
}
|
|
53
|
+
isDisjointFrom(other) {
|
|
54
|
+
return this.fastestBackingSet.isDisjointFrom(other);
|
|
55
|
+
}
|
|
31
56
|
forEach(callbackfn, thisArg) {
|
|
32
57
|
for (const value of this.collection) {
|
|
33
58
|
callbackfn.call(thisArg, value, value, this);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DistinctCollection } from './distinct-collection.js';
|
|
2
|
-
import { NewMapProvider } from './multi-key-map.js';
|
|
2
|
+
import { type NewMapProvider } from './multi-key-map.js';
|
|
3
3
|
export declare class MultiKeySet<T extends any[]> extends DistinctCollection<T> {
|
|
4
4
|
#private;
|
|
5
5
|
readonly [Symbol.toStringTag]: string;
|
|
@@ -15,5 +15,6 @@ export declare class MultiKeySet<T extends any[]> extends DistinctCollection<T>
|
|
|
15
15
|
clone(): MultiKeySet<T>;
|
|
16
16
|
items(): IterableIterator<T>;
|
|
17
17
|
protected _clear(): void;
|
|
18
|
+
protected _getBackingSet(): ReadonlySet<T> | undefined;
|
|
18
19
|
private updateSize;
|
|
19
20
|
}
|
|
@@ -3,17 +3,26 @@ export declare class SetCollection<T> extends DistinctCollection<T, SetCollectio
|
|
|
3
3
|
private readonly backingSet;
|
|
4
4
|
readonly [Symbol.toStringTag]: string;
|
|
5
5
|
constructor(items?: Iterable<T>);
|
|
6
|
+
private static withBackingSet;
|
|
6
7
|
includes(item: T): boolean;
|
|
7
8
|
add(item: T): this;
|
|
8
9
|
addMany(items: Iterable<T>): void;
|
|
9
10
|
clone(): SetCollection<T>;
|
|
10
11
|
items(): IterableIterator<T>;
|
|
11
12
|
delete(item: T): boolean;
|
|
13
|
+
union<U>(other: ReadonlySetLike<U>): SetCollection<T | U>;
|
|
14
|
+
intersection<U>(other: ReadonlySetLike<U>): SetCollection<T & U>;
|
|
15
|
+
difference<U>(other: ReadonlySetLike<U>): SetCollection<T>;
|
|
16
|
+
symmetricDifference<U>(other: ReadonlySetLike<U>): SetCollection<T | U>;
|
|
17
|
+
isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
18
|
+
isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
19
|
+
isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
|
|
12
20
|
forEach(callbackfn: (value: T, value2: T, set: globalThis.Set<T>) => void, thisArg?: any): void;
|
|
13
21
|
has(item: T): boolean;
|
|
14
22
|
entries(): IterableIterator<[T, T]>;
|
|
15
23
|
keys(): IterableIterator<T>;
|
|
16
24
|
values(): IterableIterator<T>;
|
|
17
25
|
protected _clear(): void;
|
|
26
|
+
protected _getBackingSet(): ReadonlySet<T> | undefined;
|
|
18
27
|
private updateSize;
|
|
19
28
|
}
|
|
@@ -7,6 +7,11 @@ export class SetCollection extends DistinctCollection {
|
|
|
7
7
|
this.backingSet = new globalThis.Set(items);
|
|
8
8
|
this.updateSize();
|
|
9
9
|
}
|
|
10
|
+
static withBackingSet(set) {
|
|
11
|
+
const collection = new SetCollection();
|
|
12
|
+
collection.backingSet = set;
|
|
13
|
+
return collection;
|
|
14
|
+
}
|
|
10
15
|
includes(item) {
|
|
11
16
|
return this.has(item);
|
|
12
17
|
}
|
|
@@ -32,6 +37,27 @@ export class SetCollection extends DistinctCollection {
|
|
|
32
37
|
this.updateSize();
|
|
33
38
|
return result;
|
|
34
39
|
}
|
|
40
|
+
union(other) {
|
|
41
|
+
return SetCollection.withBackingSet(this.backingSet.union(other));
|
|
42
|
+
}
|
|
43
|
+
intersection(other) {
|
|
44
|
+
return SetCollection.withBackingSet(this.backingSet.intersection(other));
|
|
45
|
+
}
|
|
46
|
+
difference(other) {
|
|
47
|
+
return SetCollection.withBackingSet(this.backingSet.difference(other));
|
|
48
|
+
}
|
|
49
|
+
symmetricDifference(other) {
|
|
50
|
+
return SetCollection.withBackingSet(this.backingSet.symmetricDifference(other));
|
|
51
|
+
}
|
|
52
|
+
isSubsetOf(other) {
|
|
53
|
+
return this.backingSet.isSubsetOf(other);
|
|
54
|
+
}
|
|
55
|
+
isSupersetOf(other) {
|
|
56
|
+
return this.backingSet.isSupersetOf(other);
|
|
57
|
+
}
|
|
58
|
+
isDisjointFrom(other) {
|
|
59
|
+
return this.backingSet.isDisjointFrom(other);
|
|
60
|
+
}
|
|
35
61
|
forEach(callbackfn, thisArg) {
|
|
36
62
|
this.backingSet.forEach(callbackfn, thisArg);
|
|
37
63
|
}
|
|
@@ -50,6 +76,9 @@ export class SetCollection extends DistinctCollection {
|
|
|
50
76
|
_clear() {
|
|
51
77
|
this.backingSet.clear();
|
|
52
78
|
}
|
|
79
|
+
_getBackingSet() {
|
|
80
|
+
return this.backingSet;
|
|
81
|
+
}
|
|
53
82
|
updateSize() {
|
|
54
83
|
this.setSize(this.backingSet.size);
|
|
55
84
|
}
|
|
@@ -4,8 +4,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
/* eslint-disable max-classes-per-file */
|
|
8
|
-
import { resolveArgumentType } from '../../injector/interfaces.js';
|
|
9
7
|
import { ReplaceClass } from '../../injector/decorators.js';
|
|
10
8
|
import { Db, Collection as MongoCollection, MongoClient as MongoMongoClient } from 'mongodb';
|
|
11
9
|
let MongoClient = class MongoClient extends MongoMongoClient {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EntityRepository } from '../../database/index.js';
|
|
2
2
|
import { afterResolve } from '../../injector/index.js';
|
|
3
3
|
import { equals } from '../../utils/equals.js';
|
|
4
|
-
import {
|
|
4
|
+
import { filterUndefinedObjectProperties, objectEntries, objectKeys } from '../../utils/object/object.js';
|
|
5
5
|
import { _throw } from '../../utils/throw.js';
|
|
6
6
|
import { isDefined, isUndefined } from '../../utils/type-guards.js';
|
|
7
7
|
import { MongoBaseRepository } from './mongo-base.repository.js';
|
|
@@ -263,7 +263,7 @@ export class MongoEntityRepository extends EntityRepository {
|
|
|
263
263
|
function normalizeIndex(index) {
|
|
264
264
|
const { name: providedName, unique, v, background, ns, ...indexRest } = index; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
265
265
|
const name = providedName ?? objectKeys(index.key).join('_');
|
|
266
|
-
return
|
|
266
|
+
return filterUndefinedObjectProperties({ name, unique: (unique == true) ? true : undefined, ...indexRest });
|
|
267
267
|
}
|
|
268
268
|
function convertOptions(options, mappingMap) {
|
|
269
269
|
if (options == undefined) {
|
|
@@ -11,7 +11,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
13
|
import { CancellationToken } from '../cancellation/index.js';
|
|
14
|
-
import { InjectArg, Injectable
|
|
14
|
+
import { InjectArg, Injectable } from '../injector/index.js';
|
|
15
15
|
import { LockProvider } from '../lock/index.js';
|
|
16
16
|
import { DeferredPromise } from '../promise/deferred-promise.js';
|
|
17
17
|
import { Timer } from '../utils/timer.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Signal } from '../../signals/api.js';
|
|
2
1
|
import { type Observable } from 'rxjs';
|
|
2
|
+
import { type Signal } from '../../signals/api.js';
|
|
3
3
|
export declare function observeIntersection$(element: Element, options?: IntersectionObserverInit): Observable<IntersectionObserverEntry>;
|
|
4
4
|
export declare function observeIntersection(elements: Element, options?: IntersectionObserverInit): Signal<IntersectionObserverEntry | undefined>;
|
|
@@ -1,25 +1,38 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Subject, filter, fromEventPattern, map, shareReplay, startWith } from 'rxjs';
|
|
2
2
|
import { toSignal } from '../../signals/api.js';
|
|
3
3
|
import { FactoryMap } from '../../utils/factory-map.js';
|
|
4
4
|
import { isDefined, isNumber } from '../../utils/type-guards.js';
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
const nullRoot = { nullRoot: true };
|
|
6
|
+
const rootMap = new FactoryMap((root) => {
|
|
7
|
+
const rootMarginMap = new FactoryMap((rootMargin) => {
|
|
8
|
+
const thresholdMap = new FactoryMap((threshold) => {
|
|
9
|
+
const observer = new IntersectionObserver((entries) => subject.next(entries), { root: root == nullRoot ? null : root, rootMargin, threshold });
|
|
10
|
+
const subject = new Subject();
|
|
11
|
+
const elementObservablesMap = new FactoryMap((element) => fromEventPattern((handler) => {
|
|
12
|
+
observer.observe(element);
|
|
13
|
+
return subject.pipe(startWith(observer.takeRecords()), map((entries) => entries.find((entry) => entry.target == element)), filter(isDefined)).subscribe((entry) => handler(entry));
|
|
14
|
+
}, (_, subscription) => {
|
|
15
|
+
observer.unobserve(element);
|
|
16
|
+
subscription.unsubscribe();
|
|
17
|
+
elementObservablesMap.delete(element);
|
|
18
|
+
if (elementObservablesMap.size == 0) {
|
|
19
|
+
thresholdMap.delete(threshold);
|
|
20
|
+
if (thresholdMap.size == 0) {
|
|
21
|
+
rootMarginMap.delete(rootMargin);
|
|
22
|
+
if (rootMarginMap.size == 0) {
|
|
23
|
+
rootMap.delete(root);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}).pipe(shareReplay({ bufferSize: 1, refCount: true })));
|
|
28
|
+
return elementObservablesMap;
|
|
29
|
+
}, undefined, (threshold) => isNumber(threshold) ? threshold : threshold?.join(','));
|
|
30
|
+
return thresholdMap;
|
|
19
31
|
});
|
|
20
|
-
|
|
32
|
+
return rootMarginMap;
|
|
33
|
+
});
|
|
21
34
|
export function observeIntersection$(element, options) {
|
|
22
|
-
return
|
|
35
|
+
return rootMap.get(options?.root ?? nullRoot).get(options?.rootMargin).get(options?.threshold).get(element);
|
|
23
36
|
}
|
|
24
37
|
export function observeIntersection(elements, options) {
|
|
25
38
|
return toSignal(observeIntersection$(elements, options));
|
|
@@ -8,7 +8,7 @@ import { Readable } from 'node:stream';
|
|
|
8
8
|
import { request, errors as undiciErrors } from 'undici';
|
|
9
9
|
import { HttpHeaders } from '../../../http/http-headers.js';
|
|
10
10
|
import { HttpError, HttpErrorReason } from '../../../http/http.error.js';
|
|
11
|
-
import { Singleton, injectArgument
|
|
11
|
+
import { Singleton, injectArgument } from '../../../injector/index.js';
|
|
12
12
|
import { Injector } from '../../../injector/injector.js';
|
|
13
13
|
import { toArray } from '../../../utils/array/array.js';
|
|
14
14
|
import { isBlob, isDefined, isUint8Array } from '../../../utils/type-guards.js';
|
|
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { hasErrorHandler, isErrorResponse, parseErrorResponse } from '../../api/response.js';
|
|
11
|
-
import { Singleton, inject, injectAll, injectArgument
|
|
11
|
+
import { Singleton, inject, injectAll, injectArgument } from '../../injector/index.js';
|
|
12
12
|
import { toArray } from '../../utils/array/array.js';
|
|
13
13
|
import { encodeBase64 } from '../../utils/base64.js';
|
|
14
14
|
import { encodeUtf8 } from '../../utils/encoding.js';
|
|
@@ -10,7 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
|
-
import { InjectArg, Singleton, injectionToken
|
|
13
|
+
import { InjectArg, Singleton, injectionToken } from '../../injector/index.js';
|
|
14
14
|
import { Injector } from '../../injector/injector.js';
|
|
15
15
|
import { encodeBase64Url } from '../../utils/base64.js';
|
|
16
16
|
import { concatArrayBufferViews } from '../../utils/binary.js';
|
package/import.js
CHANGED
package/intl/number-parser.d.ts
CHANGED
|
@@ -14,5 +14,5 @@ export declare class NumberParser {
|
|
|
14
14
|
*/
|
|
15
15
|
parse(value: string, loose?: boolean): number;
|
|
16
16
|
}
|
|
17
|
-
export declare const getNumberParser: (locale: string) => NumberParser
|
|
17
|
+
export declare const getNumberParser: (locale: string) => InstanceType<typeof NumberParser>;
|
|
18
18
|
export declare function parseNumber(locale: string, value: string, loose?: boolean): number;
|
|
@@ -11,7 +11,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
13
|
import { Collection, MongoEntityRepository, noopTransformer } from '../../database/mongo/index.js';
|
|
14
|
-
import { ForwardArg, ResolveArg, Singleton
|
|
14
|
+
import { ForwardArg, ResolveArg, Singleton } from '../../injector/index.js';
|
|
15
15
|
import { Logger } from '../../logger/index.js';
|
|
16
16
|
import { DEFAULT_KEY_VALUE_REPOSITORY_CONFIG } from './tokens.js';
|
|
17
17
|
const indexes = [
|
package/lock/lock.js
CHANGED
|
@@ -12,7 +12,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
12
12
|
};
|
|
13
13
|
import { getNewId } from '../../database/index.js';
|
|
14
14
|
import { Collection, MongoEntityRepository, noopTransformer } from '../../database/mongo/index.js';
|
|
15
|
-
import { ForwardArg, Singleton
|
|
15
|
+
import { ForwardArg, Singleton } from '../../injector/index.js';
|
|
16
16
|
import { Logger } from '../../logger/index.js';
|
|
17
17
|
import { now } from '../../utils/date-time.js';
|
|
18
18
|
import { MongoError } from 'mongodb';
|
package/lock/provider.js
CHANGED
package/logger/logger.js
CHANGED
package/mail/mail.client.js
CHANGED
|
@@ -7,7 +7,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
import { resolveArgumentType } from '../injector/index.js';
|
|
11
10
|
import { Property } from '../schema/decorators/property.js';
|
|
12
11
|
import { BooleanProperty } from '../schema/schemas/boolean.js';
|
|
13
12
|
import { Optional } from '../schema/schemas/optional.js';
|
|
@@ -11,7 +11,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
13
|
import { Collection, MongoEntityRepository, noopTransformer } from '../../../database/mongo/index.js';
|
|
14
|
-
import { ForwardArg, Singleton
|
|
14
|
+
import { ForwardArg, Singleton } from '../../../injector/index.js';
|
|
15
15
|
import { Logger } from '../../../logger/index.js';
|
|
16
16
|
export const mongoMailLogRepositoryConfig = {};
|
|
17
17
|
const indexes = [];
|
|
@@ -10,7 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
|
-
import { ForwardArg, ResolveArg, Singleton
|
|
13
|
+
import { ForwardArg, ResolveArg, Singleton } from '../../injector/index.js';
|
|
14
14
|
import { Logger } from '../../logger/index.js';
|
|
15
15
|
import { Collection } from '../../database/mongo/classes.js';
|
|
16
16
|
import { MongoEntityRepository, noopTransformer } from '../../database/mongo/mongo-entity-repository.js';
|
|
@@ -12,7 +12,6 @@ import { disposeAsync } from '../../disposable/disposable.js';
|
|
|
12
12
|
import { HttpServer } from '../../http/server/http-server.js';
|
|
13
13
|
import { Singleton } from '../../injector/decorators.js';
|
|
14
14
|
import { inject, injectArgument } from '../../injector/inject.js';
|
|
15
|
-
import { resolveArgumentType } from '../../injector/interfaces.js';
|
|
16
15
|
import { ModuleBase } from '../module-base.js';
|
|
17
16
|
import { ModuleMetricType } from '../module.js';
|
|
18
17
|
export const webServerModuleConfiguration = {
|
|
@@ -11,7 +11,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
13
|
import { Collection, MongoEntityRepository, mapTo } from '../database/mongo/index.js';
|
|
14
|
-
import { ForwardArg, ResolveArg, Singleton
|
|
14
|
+
import { ForwardArg, ResolveArg, Singleton } from '../injector/index.js';
|
|
15
15
|
import { Injector } from '../injector/injector.js';
|
|
16
16
|
import { Logger } from '../logger/index.js';
|
|
17
17
|
import { OidcStateRepository } from './oidc-state.repository.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tstdl/base",
|
|
3
|
-
"version": "0.90.
|
|
3
|
+
"version": "0.90.91",
|
|
4
4
|
"author": "Patrick Hein",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -123,15 +123,15 @@
|
|
|
123
123
|
"@types/mjml": "4.7",
|
|
124
124
|
"@types/node": "20",
|
|
125
125
|
"@types/nodemailer": "6.4",
|
|
126
|
-
"@typescript-eslint/eslint-plugin": "7.
|
|
126
|
+
"@typescript-eslint/eslint-plugin": "7.14",
|
|
127
127
|
"concurrently": "8.2",
|
|
128
128
|
"eslint": "8.57",
|
|
129
129
|
"eslint-import-resolver-typescript": "3.6",
|
|
130
130
|
"eslint-plugin-import": "2.29",
|
|
131
131
|
"tsc-alias": "1.8",
|
|
132
|
-
"typedoc": "0.
|
|
133
|
-
"typedoc-plugin-missing-exports": "
|
|
134
|
-
"typescript": "5.
|
|
132
|
+
"typedoc": "0.26",
|
|
133
|
+
"typedoc-plugin-missing-exports": "3.0",
|
|
134
|
+
"typescript": "5.5"
|
|
135
135
|
},
|
|
136
136
|
"peerDependencies": {
|
|
137
137
|
"@elastic/elasticsearch": "^8.14",
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
"mjml": "^4.15",
|
|
149
149
|
"mongodb": "^6.7",
|
|
150
150
|
"nodemailer": "^6.9",
|
|
151
|
-
"playwright": "^1.
|
|
151
|
+
"playwright": "^1.45",
|
|
152
152
|
"preact": "^10.22",
|
|
153
153
|
"preact-render-to-string": "^6.5",
|
|
154
154
|
"undici": "^6.19",
|
|
@@ -11,8 +11,8 @@ export type PasswordCheckLocalization = Localization<{
|
|
|
11
11
|
export declare const passwordCheckLocalizationKeys: import("../text/localization.service.js").ProxyLocalizationKeys<{
|
|
12
12
|
tstdl: {
|
|
13
13
|
passwordCheck: {
|
|
14
|
-
warnings: Record<keyof (typeof zxcvbnTranslationKeys)[
|
|
15
|
-
suggestions: Record<keyof (typeof zxcvbnTranslationKeys)[
|
|
14
|
+
warnings: Record<keyof (typeof zxcvbnTranslationKeys)["default"]["warnings"], LocalizeItem>;
|
|
15
|
+
suggestions: Record<keyof (typeof zxcvbnTranslationKeys)["default"]["suggestions"], LocalizeItem>;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
}>;
|
package/pdf/pdf.service.js
CHANGED
|
@@ -15,7 +15,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
15
15
|
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
|
|
16
16
|
if (value !== null && value !== void 0) {
|
|
17
17
|
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
18
|
-
var dispose;
|
|
18
|
+
var dispose, inner;
|
|
19
19
|
if (async) {
|
|
20
20
|
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
21
21
|
dispose = value[Symbol.asyncDispose];
|
|
@@ -23,8 +23,10 @@ var __addDisposableResource = (this && this.__addDisposableResource) || function
|
|
|
23
23
|
if (dispose === void 0) {
|
|
24
24
|
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
25
25
|
dispose = value[Symbol.dispose];
|
|
26
|
+
if (async) inner = dispose;
|
|
26
27
|
}
|
|
27
28
|
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
29
|
+
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
28
30
|
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
29
31
|
}
|
|
30
32
|
else if (async) {
|
|
@@ -64,7 +66,7 @@ import { tmpdir } from 'node:os';
|
|
|
64
66
|
import { BrowserContextController } from '../browser/browser-context-controller.js';
|
|
65
67
|
import { BrowserController } from '../browser/browser-controller.js';
|
|
66
68
|
import { PdfRenderOptions } from '../browser/pdf-options.js';
|
|
67
|
-
import { Singleton, inject, injectArgument
|
|
69
|
+
import { Singleton, inject, injectArgument } from '../injector/index.js';
|
|
68
70
|
import { LogLevel } from '../logger/level.js';
|
|
69
71
|
import { Logger } from '../logger/logger.js';
|
|
70
72
|
import { Optional } from '../schema/index.js';
|
|
@@ -12,7 +12,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
12
12
|
};
|
|
13
13
|
import { getNewId } from '../../database/index.js';
|
|
14
14
|
import { Collection, MongoEntityRepository, noopTransformer } from '../../database/mongo/index.js';
|
|
15
|
-
import { ForwardArg, ResolveArg, Singleton
|
|
15
|
+
import { ForwardArg, ResolveArg, Singleton } from '../../injector/index.js';
|
|
16
16
|
import { Logger } from '../../logger/index.js';
|
|
17
17
|
import { UniqueTagStrategy } from '../../queue/index.js';
|
|
18
18
|
const indexes = [
|
|
@@ -12,7 +12,6 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
12
12
|
};
|
|
13
13
|
import { ForwardArg, ResolveArg, Singleton } from '../../injector/decorators.js';
|
|
14
14
|
import { Injector } from '../../injector/injector.js';
|
|
15
|
-
import { resolveArgumentType } from '../../injector/interfaces.js';
|
|
16
15
|
import { LockProvider } from '../../lock/index.js';
|
|
17
16
|
import { MessageBusProvider } from '../../message-bus/index.js';
|
|
18
17
|
import { Queue, QueueProvider } from '../../queue/index.js';
|
package/queue/queue.js
CHANGED
package/rpc/rpc.d.ts
CHANGED
|
@@ -6,16 +6,16 @@ export declare const Rpc: {
|
|
|
6
6
|
listen(endpoint: RpcEndpoint): void;
|
|
7
7
|
connect<T extends RpcRemoteInput>(endpoint: RpcEndpoint, name?: string): Promise<RpcRemote<T>>;
|
|
8
8
|
expose(object: RpcRemoteInput, name?: string): void;
|
|
9
|
-
registerAdapter<
|
|
9
|
+
registerAdapter<T extends object, Data>(adapter: RpcAdapter<T, Data>): void;
|
|
10
10
|
/**
|
|
11
11
|
* mark object for proxy forward
|
|
12
12
|
* @param object object to forward as proxy
|
|
13
13
|
* @param root if object is a child of the actual passed value (to function calls, returns or whatever), this must be set to to mark the parent for serialization (required for children proxies)
|
|
14
14
|
* @returns
|
|
15
15
|
*/
|
|
16
|
-
proxy<
|
|
17
|
-
transfer<
|
|
18
|
-
serialize<
|
|
19
|
-
adapt<
|
|
16
|
+
proxy<T extends object>(object: T, root?: object): T;
|
|
17
|
+
transfer<T extends object>(object: T, transfer: any[]): T;
|
|
18
|
+
serialize<T extends object>(object: T, options?: SerializationOptions): T;
|
|
19
|
+
adapt<T extends object>(object: T, adapter: RpcAdapter<T>, root?: object): T;
|
|
20
20
|
isProxied(object: object): boolean;
|
|
21
21
|
};
|
package/schema/schema.d.ts
CHANGED
|
@@ -6,10 +6,10 @@ export type NormalizedSchema<T = any> = NormalizedObjectSchema<T> | NormalizedVa
|
|
|
6
6
|
export declare const Schema: {
|
|
7
7
|
registerDefaultCoercer(coercer: SchemaValueCoercer): void;
|
|
8
8
|
test<T>(schemaOrValueType: SchemaTestable<T>, value: unknown, options?: SchemaTestOptions, path?: JsonPath): SchemaTestResult<T>;
|
|
9
|
-
validate<
|
|
10
|
-
parse<
|
|
11
|
-
function<
|
|
12
|
-
asyncFunction<
|
|
9
|
+
validate<T>(schemaOrValueType: SchemaTestable<T>, value: unknown, options?: SchemaTestOptions): boolean;
|
|
10
|
+
parse<T>(schemaOrValueType: SchemaTestable<T>, value: unknown, options?: SchemaTestOptions): T;
|
|
11
|
+
function<T extends readonly SchemaTestable[], R extends SchemaTestable, F extends (...args: TupleSchemaOutput<T>) => SchemaOutput<R>>(argumentSchemas: T, returnSchema: R, handler: F): F;
|
|
12
|
+
asyncFunction<T extends readonly SchemaTestable[], R extends SchemaTestable, F extends (...args: TupleSchemaOutput<T>) => Promise<SchemaOutput<R>>>(argumentSchemas: T, returnSchema: R, handler: F): F;
|
|
13
13
|
};
|
|
14
14
|
export declare function testSchema<T>(schema: Schema<T>, value: unknown, options?: SchemaTestOptions, path?: JsonPath): SchemaTestResult<T>;
|
|
15
15
|
export declare function getExpectString(schema: SchemaTestable): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ObjectLiteral, Optionalize, Record, SimplifyObject, TypedOmit } from '../../types.js';
|
|
2
2
|
import type { IfNever } from 'type-fest';
|
|
3
|
-
import type
|
|
3
|
+
import { type ObjectSchema, type ObjectSchemaProperties, type TypedObjectSchemaUnknownProperties } from '../types/index.js';
|
|
4
4
|
export type ObjectOptions<T extends Record = Record> = TypedOmit<ObjectSchema<T>, 'properties' | 'unknownProperties' | 'unknownPropertiesKey'>;
|
|
5
5
|
export declare function explicitObject<T extends Record>(properties: ObjectSchemaProperties<T>, options?: ObjectOptions<T>): ObjectSchema<T>;
|
|
6
|
-
export declare function object<T extends Record = Record<never>, K extends PropertyKey = any, V = never>(properties: ObjectSchemaProperties<T>, options?: ObjectOptions<T> & TypedObjectSchemaUnknownProperties<K, V>): ObjectSchema<SimplifyObject<
|
|
7
|
-
export declare const emptyObjectSchema: ObjectSchema<
|
|
6
|
+
export declare function object<T extends Record = Record<never>, K extends PropertyKey = any, V = never>(properties: ObjectSchemaProperties<T>, options?: ObjectOptions<T> & TypedObjectSchemaUnknownProperties<K, V>): ObjectSchema<SimplifyObject<Optionalize<T> & IfNever<V, ObjectLiteral, Record<K, V>>>>;
|
|
7
|
+
export declare const emptyObjectSchema: ObjectSchema<ObjectLiteral>;
|
|
@@ -11,7 +11,6 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
13
|
import { InjectArg, Injectable } from '../../injector/decorators.js';
|
|
14
|
-
import { resolveArgumentType } from '../../injector/interfaces.js';
|
|
15
14
|
import { isString } from '../../utils/type-guards.js';
|
|
16
15
|
let ElasticSearchIndexConfig = class ElasticSearchIndexConfig {
|
|
17
16
|
indexName;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { toSignal } from './api.js';
|
|
2
|
+
export declare const toLazySignal: typeof toSignal;
|
|
@@ -13,7 +13,6 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
13
13
|
import * as path from 'node:path';
|
|
14
14
|
import { BadRequestError } from '../../errors/bad-request.error.js';
|
|
15
15
|
import { InjectArg, Singleton } from '../../injector/decorators.js';
|
|
16
|
-
import { resolveArgumentType } from '../../injector/interfaces.js';
|
|
17
16
|
import { Schema } from '../../schema/index.js';
|
|
18
17
|
import { Template } from '../template.model.js';
|
|
19
18
|
import { TemplateProvider } from '../template.provider.js';
|
|
@@ -14,7 +14,6 @@ import * as fs from 'node:fs/promises';
|
|
|
14
14
|
import * as path from 'node:path';
|
|
15
15
|
import { BadRequestError } from '../../errors/bad-request.error.js';
|
|
16
16
|
import { InjectArg, Singleton } from '../../injector/decorators.js';
|
|
17
|
-
import { resolveArgumentType } from '../../injector/interfaces.js';
|
|
18
17
|
import { Property } from '../../schema/index.js';
|
|
19
18
|
import { TemplateField } from '../template.model.js';
|
|
20
19
|
import { TemplateResolver } from '../template.resolver.js';
|
package/types.d.ts
CHANGED
|
@@ -103,6 +103,7 @@ export type ReplaceIfUnknown<T, U> = IfUnknown<T, U, T>;
|
|
|
103
103
|
export type OmitNever<T extends Record> = {
|
|
104
104
|
[K in keyof T as T[K] extends never ? never : K]: T[K];
|
|
105
105
|
};
|
|
106
|
+
export type BaseType<T extends Exclude<Primitive, null | undefined>> = T extends string ? string : never | T extends number ? number : never | T extends boolean ? boolean : never | T extends bigint ? bigint : never | T extends symbol ? symbol : never;
|
|
106
107
|
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>>>;
|
|
107
108
|
/**
|
|
108
109
|
* Omit properties from a type that extend from a specific type.
|
|
@@ -114,7 +115,6 @@ export type OmitBy<T, V> = Omit<T, {
|
|
|
114
115
|
* Normalize properties of a type that allow `undefined` to make them optional.
|
|
115
116
|
*/
|
|
116
117
|
export type Optionalize<T extends object> = OmitBy<T, undefined> & Partial<PickBy<T, undefined>>;
|
|
117
|
-
export type SimplifiedOptionalize<T extends object> = SimplifyObject<Optionalize<T>>;
|
|
118
118
|
export type Unoptionalize<T extends object> = SimplifyObject<OmitBy<T, undefined> & {
|
|
119
119
|
[P in PropertiesOfType<T, undefined>]: T[P] | undefined;
|
|
120
120
|
}>;
|
package/utils/compression.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
4
1
|
import type { Stream } from 'node:stream';
|
|
5
2
|
import type * as NodeZlib from 'node:zlib';
|
|
6
3
|
export interface CompressionResult {
|
package/utils/factory-map.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type Factory<
|
|
1
|
+
export type Factory<K, V> = (key: K) => V;
|
|
2
2
|
export type FactoryItemIdentityProvider<K, I> = (key: K) => I;
|
|
3
3
|
/** Same as {@link Map}, except that it will build the value with the provided factory on {@link get} if it doesnt exist */
|
|
4
4
|
export declare class FactoryMap<K, V, I = K> implements Map<K, V> {
|
|
@@ -11,10 +11,10 @@ export type ForwardRef<T extends object = object> = T & {
|
|
|
11
11
|
};
|
|
12
12
|
export declare const ForwardRef: {
|
|
13
13
|
create<T extends object>(options?: ForwardRefOptions<T>): ForwardRef<T>;
|
|
14
|
-
isForwardRef<
|
|
15
|
-
hasRef<
|
|
16
|
-
deref<
|
|
17
|
-
tryDeref<
|
|
18
|
-
setRef<
|
|
14
|
+
isForwardRef<T extends object = object>(value: any): value is ForwardRef<T>;
|
|
15
|
+
hasRef<T extends object>(forwardRef: ForwardRef<T> | T): boolean;
|
|
16
|
+
deref<T extends object>(forwardRef: ForwardRef<T> | T): T;
|
|
17
|
+
tryDeref<T extends object>(forwardRef: ForwardRef<T> | T): T | undefined;
|
|
18
|
+
setRef<T extends object>(forwardRef: ForwardRef<T> | T, reference: T | undefined): void;
|
|
19
19
|
};
|
|
20
20
|
export {};
|
package/utils/object/object.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { FromEntries, ObjectLiteral, PickBy, Record, SimplifyObject } from '../../types.js';
|
|
2
|
-
import type { IsEqual } from 'type-fest';
|
|
1
|
+
import type { BaseType, FromEntries, ObjectLiteral, Optionalize, PickBy, Record, SimplifyObject } from '../../types.js';
|
|
3
2
|
export declare function hasOwnProperty<T extends Record>(obj: T, key: keyof T): boolean;
|
|
4
3
|
/**
|
|
5
4
|
* Returns object entries including those with symbols keys (which Object.entries does not)
|
|
@@ -19,10 +18,8 @@ export declare function mapObjectValuesAsync<T extends ObjectLiteral, V>(object:
|
|
|
19
18
|
export declare function filterObject<T extends ObjectLiteral, U extends T[keyof T]>(object: T, predicate: (value: T[keyof T], key: keyof T) => value is U): PickBy<T, U>;
|
|
20
19
|
export declare function filterObject<T extends ObjectLiteral>(object: T, predicate: (value: T[keyof T], key: keyof T) => boolean): Partial<T>;
|
|
21
20
|
export declare function filterObjectAsync<T extends ObjectLiteral>(object: T, predicate: (value: T[keyof T], key: keyof T) => Promise<boolean>): Promise<Partial<T>>;
|
|
22
|
-
export declare function filterUndefinedFromRecord<
|
|
23
|
-
export declare function filterUndefinedObjectProperties<T extends ObjectLiteral>(object: T):
|
|
24
|
-
[P in keyof T]?: IsEqual<T[P], undefined> extends true ? never : Exclude<T[P], undefined>;
|
|
25
|
-
};
|
|
21
|
+
export declare function filterUndefinedFromRecord<K extends PropertyKey, V>(record: Record<K, V>): Record<BaseType<K>, Exclude<V, undefined>>;
|
|
22
|
+
export declare function filterUndefinedObjectProperties<T extends ObjectLiteral>(object: T): SimplifyObject<Optionalize<T>>;
|
|
26
23
|
export declare function copyObjectProperties<T extends ObjectLiteral, U extends T>(source: T, target: U): void;
|
|
27
24
|
export declare function getGetter<T extends ObjectLiteral, U extends keyof T>(obj: T, property: keyof T, bind: boolean): () => T[U];
|
|
28
25
|
export declare function deepObjectEntries(object: ObjectLiteral, keepInnerObjects?: boolean, prefix?: string): [string, any][];
|
package/utils/repl.d.ts
CHANGED