@tstdl/base 0.92.43 → 0.92.47
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/ai/ai-file.service.d.ts +3 -3
- package/ai/ai.service.d.ts +4 -4
- package/api/client/client.js +1 -0
- package/api/server/gateway.js +1 -1
- package/application/application.d.ts +1 -2
- package/authentication/client/api.client.d.ts +3 -3
- 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.d.ts +1 -2
- package/browser/browser.service.d.ts +1 -2
- package/database/mongo/classes.d.ts +1 -2
- package/distributed-loop/distributed-loop.js +1 -1
- package/document-management/models/document-property-value.model.d.ts +1 -1
- package/document-management/models/document-request-template.d.ts +2 -2
- package/document-management/models/document-request.model.js +1 -0
- package/document-management/models/service-models/document.view-model.d.ts +1 -1
- package/document-management/server/services/document-management.service.d.ts +5 -5
- package/document-management/server/services/document-management.service.js +1 -1
- package/eslint.config.js +69 -0
- package/examples/reflection/basic.d.ts +1 -1
- package/examples/reflection/basic.js +2 -2
- package/http/client/adapters/undici.adapter.js +1 -1
- package/http/client/http-client.js +1 -1
- package/image-service/imgproxy/imgproxy-image-service.js +1 -1
- package/key-value-store/key-value.store.js +1 -0
- package/key-value-store/mongo/mongo-key-value.repository.js +1 -1
- package/lock/lock.js +1 -0
- package/lock/mongo/lock.js +3 -4
- package/lock/mongo/mongo-lock-repository.js +1 -1
- package/lock/provider.js +1 -0
- package/logger/logger.js +1 -0
- package/mail/mail.client.js +1 -0
- package/mail/repositories/mongo/mongo-mail-log.repository.js +1 -1
- package/message-bus/message-bus.js +1 -0
- package/migration/mongo/migration-state-repository.js +1 -1
- package/module/modules/web-server.module.d.ts +1 -2
- package/object-storage/object-storage.js +1 -0
- package/openid-connect/mongo-oidc-state.repository.js +1 -1
- package/orm/decorators.d.ts +2 -0
- package/orm/decorators.js +13 -7
- package/orm/entity.d.ts +4 -3
- package/orm/entity.js +1 -1
- package/orm/query.d.ts +2 -1
- package/orm/server/database.d.ts +2 -2
- package/orm/server/drizzle/schema-converter.d.ts +10 -11
- package/orm/server/drizzle/schema-converter.js +2 -2
- package/orm/server/repository.d.ts +9 -8
- package/orm/server/repository.js +1 -0
- package/orm/types.d.ts +19 -23
- package/orm/types.js +0 -1
- package/package.json +6 -10
- package/pdf/pdf.service.js +1 -1
- package/queue/mongo/mongo-job.repository.js +1 -1
- package/queue/mongo/queue.provider.js +1 -0
- package/queue/queue.d.ts +1 -2
- package/schema/schemas/literal.d.ts +2 -2
- package/search-index/elastic/config.d.ts +1 -2
- package/serializer/serializer.js +2 -2
- package/signals/implementation/to-signal.d.ts +2 -2
- package/signals/implementation/writable-signal.d.ts +3 -3
- package/signals/implementation/writable-signal.js +0 -1
- package/templates/providers/file.template-provider.d.ts +1 -2
- package/templates/resolvers/file.template-resolver.d.ts +1 -1
- package/templates/resolvers/file.template-resolver.js +1 -0
- package/templates/resolvers/jsx.template-resolver.d.ts +1 -1
- package/text/localization.service.d.ts +2 -4
- package/tsconfig.json +6 -10
- package/tsconfig.server.json +1 -1
- package/types/index.d.ts +2 -0
- package/types/index.js +1 -0
- package/types/tagged.d.ts +16 -0
- package/types/tagged.js +1 -0
- package/types.d.ts +6 -10
- package/utils/async-iterable-helpers/multiplex.js +1 -2
- package/utils/benchmark.js +1 -1
- package/utils/comparison.js +0 -1
- package/utils/cryptography.d.ts +2 -4
- package/utils/event-loop.js +1 -2
- package/utils/iterable-helpers/first-or-default.js +0 -1
- package/utils/iterable-helpers/first.js +0 -1
- package/utils/iterable-helpers/group-to-map.js +1 -1
- package/utils/iterable-helpers/last-or-default.js +1 -1
- package/utils/object/merge.js +2 -2
- package/utils/object/object.d.ts +2 -2
- package/utils/periodic-reporter.js +1 -2
- package/utils/reflection.js +1 -1
- package/utils/repl.d.ts +1 -1
- package/utils/repl.js +0 -1
- package/utils/set.js +0 -1
- package/utils/stream/slice.js +2 -2
- package/utils/stream/stream-reader.js +0 -1
- package/utils/stream/to-bytes-stream.js +2 -2
- package/utils/string/snake-case.js +1 -1
- package/utils/timing.js +2 -2
- package/utils/type-guards.js +0 -1
- package/utils/units.js +0 -1
- package/utils/z-base32.js +0 -1
- package/.eslintrc.json +0 -281
|
@@ -3,10 +3,11 @@ import { type PgColumnBuilder, type PgEnum, type PgSchema, type PgTableWithColum
|
|
|
3
3
|
import type { CamelCase, ConditionalPick, SnakeCase } from 'type-fest';
|
|
4
4
|
import { JsonPath } from '../../../json-path/json-path.js';
|
|
5
5
|
import { type Record } from '../../../schema/index.js';
|
|
6
|
-
import type { AbstractConstructor, Enumeration } from '../../../types.js';
|
|
6
|
+
import type { AbstractConstructor, Enumeration, UnionToIntersection } from '../../../types.js';
|
|
7
|
+
import type { Tagged } from '../../../types/index.js';
|
|
7
8
|
import type { OrmColumnReflectionData } from '../../decorators.js';
|
|
8
9
|
import type { EntityType } from '../../entity.js';
|
|
9
|
-
import type { ColumnBuilder,
|
|
10
|
+
import type { ColumnBuilder, EmbeddedConfigTag } from '../../types.js';
|
|
10
11
|
type Column<Name extends string, T> = null extends T ? ColumnBuilder<T, Name> : NotNull<ColumnBuilder<T, Name>>;
|
|
11
12
|
type ConverterContext = {
|
|
12
13
|
type: AbstractConstructor;
|
|
@@ -20,24 +21,22 @@ export type ColumnDefinition = {
|
|
|
20
21
|
dereferenceObjectPath: (obj: Record) => any;
|
|
21
22
|
};
|
|
22
23
|
export declare const getDrizzleTableFromType: typeof _getDrizzleTableFromType;
|
|
23
|
-
export type ColumnPrefix<T> = T extends {
|
|
24
|
+
export type ColumnPrefix<T> = T extends Tagged<unknown, EmbeddedConfigTag, {
|
|
24
25
|
prefix: infer Prefix;
|
|
25
|
-
} ? Prefix extends string ? Prefix : '' : '';
|
|
26
|
+
}> ? Prefix extends string ? Prefix : '' : '';
|
|
26
27
|
export type PgTableFromType<S extends string, T extends AbstractConstructor, TableName extends string = T extends Required<EntityType> ? SnakeCase<T['entityName']> : string> = PgTableWithColumns<{
|
|
27
28
|
name: TableName;
|
|
28
29
|
schema: S;
|
|
29
30
|
columns: BuildColumns<TableName, {
|
|
30
31
|
[P in Exclude<keyof InstanceType<T>, keyof EmbeddedProperties<InstanceType<T>>>]: Column<CamelCase<Extract<P, string>>, InstanceType<T>[P]>;
|
|
31
|
-
} & {
|
|
32
|
+
} & UnionToIntersection<{
|
|
32
33
|
[P in keyof EmbeddedProperties<InstanceType<T>>]: EmbeddedColumns<InstanceType<T>[P], ColumnPrefix<InstanceType<T>[P]>>;
|
|
33
|
-
}[keyof EmbeddedProperties<InstanceType<T>>]
|
|
34
|
+
}[keyof EmbeddedProperties<InstanceType<T>>]>, 'pg'>;
|
|
34
35
|
dialect: 'pg';
|
|
35
36
|
}>;
|
|
36
|
-
export type EmbeddedProperties<T> = ConditionalPick<T, {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
}>;
|
|
37
|
+
export type EmbeddedProperties<T> = ConditionalPick<T, Tagged<unknown, EmbeddedConfigTag, {
|
|
38
|
+
prefix: any;
|
|
39
|
+
}>>;
|
|
41
40
|
export type EmbeddedColumns<T, Prefix extends string> = {
|
|
42
41
|
[P in keyof T as CamelCase<`${Prefix}${Extract<P, string>}`>]: Column<CamelCase<`${Prefix}${Extract<P, string>}`>, T[P]>;
|
|
43
42
|
};
|
|
@@ -46,7 +46,7 @@ export function _getDrizzleTableFromType(type, schemaName, tableName = getDefaul
|
|
|
46
46
|
return column;
|
|
47
47
|
});
|
|
48
48
|
const indexFn = (data.options?.unique == true) ? uniqueIndex : index;
|
|
49
|
-
return indexFn().using(data.options?.using ?? 'btree', ...columns);
|
|
49
|
+
return indexFn(data.name).using(data.options?.using ?? 'btree', ...columns);
|
|
50
50
|
}
|
|
51
51
|
const columnEntries = columnDefinitions.map((entry) => [entry.name, entry.type]);
|
|
52
52
|
const drizzleSchema = dbSchema.table(tableName, fromEntries(columnEntries), (table) => [
|
|
@@ -68,7 +68,7 @@ export function _getDrizzleTableFromType(type, schemaName, tableName = getDefaul
|
|
|
68
68
|
...(tableReflectionData?.index?.map((data) => buildIndex(table, data)) ?? [])
|
|
69
69
|
]);
|
|
70
70
|
drizzleSchema[columnDefinitionsSymbol] = columnDefinitions;
|
|
71
|
-
return drizzleSchema;
|
|
71
|
+
return drizzleSchema;
|
|
72
72
|
}
|
|
73
73
|
function getPostgresColumnEntries(type, tableName, dbSchema, path = new JsonPath({ dollar: false }), prefix = '') {
|
|
74
74
|
const metadata = reflectionRegistry.getMetadata(type);
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { SQL } from 'drizzle-orm';
|
|
2
|
-
import { PgTransaction as DrizzlePgTransaction, PgColumn, PgInsertValue, PgQueryResultHKT, PgUpdateSetSource } from 'drizzle-orm/pg-core';
|
|
3
|
-
import { PartialDeep } from 'type-fest';
|
|
4
|
-
import { Resolvable, resolveArgumentType } from '../../injector/interfaces.js';
|
|
5
|
-
import type { DeepPartial, OneOrMany, Paths, Record, Type, TypedOmit
|
|
6
|
-
import {
|
|
7
|
-
import { ColumnDefinition, type PgTableFromType } from './drizzle/schema-converter.js';
|
|
1
|
+
import { type SQL } from 'drizzle-orm';
|
|
2
|
+
import { PgTransaction as DrizzlePgTransaction, type PgColumn, type PgInsertValue, type PgQueryResultHKT, type PgUpdateSetSource } from 'drizzle-orm/pg-core';
|
|
3
|
+
import type { PartialDeep } from 'type-fest';
|
|
4
|
+
import { type Resolvable, resolveArgumentType } from '../../injector/interfaces.js';
|
|
5
|
+
import type { DeepPartial, OneOrMany, Paths, Record, Type, TypedOmit } from '../../types.js';
|
|
6
|
+
import type { UntaggedDeep } from '../../types/index.js';
|
|
8
7
|
import type { Entity, EntityMetadata, EntityMetadataAttributes, EntityType, NewEntity } from '../entity.js';
|
|
9
8
|
import type { Query } from '../query.js';
|
|
10
|
-
import {
|
|
9
|
+
import { Database } from './database.js';
|
|
10
|
+
import { type ColumnDefinition, type PgTableFromType } from './drizzle/schema-converter.js';
|
|
11
|
+
import { type Transaction, type TransactionConfig } from './transaction.js';
|
|
11
12
|
type PgTransaction = DrizzlePgTransaction<PgQueryResultHKT, Record, Record>;
|
|
12
13
|
export declare const repositoryType: unique symbol;
|
|
13
14
|
export type OrderOptions<T extends Entity> = {
|
package/orm/server/repository.js
CHANGED
|
@@ -13,6 +13,7 @@ import { PgTransaction as DrizzlePgTransaction } from 'drizzle-orm/pg-core';
|
|
|
13
13
|
import { NotFoundError } from '../../errors/not-found.error.js';
|
|
14
14
|
import { Singleton } from '../../injector/decorators.js';
|
|
15
15
|
import { inject, injectArgument } from '../../injector/inject.js';
|
|
16
|
+
import { resolveArgumentType } from '../../injector/interfaces.js';
|
|
16
17
|
import { Schema } from '../../schema/schema.js';
|
|
17
18
|
import { toArray } from '../../utils/array/array.js';
|
|
18
19
|
import { fromDeepObjectEntries } from '../../utils/object/object.js';
|
package/orm/types.d.ts
CHANGED
|
@@ -1,31 +1,27 @@
|
|
|
1
1
|
import type { $Type, HasDefault as DrizzleHasDefault, IsPrimaryKey as DrizzleIsPrimaryKey } from 'drizzle-orm';
|
|
2
2
|
import type { boolean, date, doublePrecision, integer, jsonb, PgColumnBuilder, PgColumnBuilderBase, PgEnumColumnBuilderInitial, text, timestamp, uuid } from 'drizzle-orm/pg-core';
|
|
3
|
-
import type { GetTagMetadata, Tagged, UnwrapTagged } from 'type-fest';
|
|
4
3
|
import { Array, Integer } from '../schema/index.js';
|
|
5
4
|
import type { AbstractConstructor, EnumerationObject, EnumerationValue, ObjectLiteral, UnionToTuple } from '../types.js';
|
|
5
|
+
import type { GetTagMetadata, HasTag, Tagged, UnwrapTagged } from '../types/index.js';
|
|
6
6
|
import { Column, Embedded, Index, PrimaryKey, References, Unique } from './decorators.js';
|
|
7
7
|
import { Json, NumericDate, Timestamp, Uuid } from './schemas/index.js';
|
|
8
|
-
export type
|
|
9
|
-
export type
|
|
8
|
+
export type ColumnTypeTag = 'column';
|
|
9
|
+
export type EmbeddedConfigTag = 'embedded';
|
|
10
|
+
export type IsPrimaryKey<T> = T extends Tagged<unknown, ColumnTypeTag, PgColumnBuilderBase> ? Tagged<UnwrapTagged<T>, ColumnTypeTag, DrizzleIsPrimaryKey<GetTagMetadata<T, ColumnTypeTag>>> : Tagged<T, ColumnTypeTag, DrizzleIsPrimaryKey<ColumnBuilder<T>>>;
|
|
11
|
+
export type HasDefault<T> = T extends Tagged<unknown, ColumnTypeTag, PgColumnBuilderBase> ? Tagged<UnwrapTagged<T>, ColumnTypeTag, DrizzleHasDefault<GetTagMetadata<T, ColumnTypeTag>>> : Tagged<T, ColumnTypeTag, DrizzleHasDefault<ColumnBuilder<T>>>;
|
|
10
12
|
type EnumColumn<T extends EnumerationObject, ColumnName extends string = ''> = PgEnumColumnBuilderInitial<ColumnName, UnionToTuple<`${EnumerationValue<T>}`> extends [string, ...string[]] ? UnionToTuple<`${EnumerationValue<T>}`> : ['NO_VALUES_PROVIDED']>;
|
|
11
|
-
export type ColumnBuilder<T, ColumnName extends string = never> = T extends Tagged<T,
|
|
12
|
-
export type
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
export type
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export type
|
|
22
|
-
export type
|
|
23
|
-
export type
|
|
24
|
-
export type
|
|
25
|
-
export type Uuid = Tagged<string, 'column', ReturnType<typeof uuid>>;
|
|
26
|
-
export type Integer = Tagged<number, 'column', ReturnType<typeof integer>>;
|
|
27
|
-
export type DoublePrecision = Tagged<number, 'column', ReturnType<typeof doublePrecision>>;
|
|
28
|
-
export type Boolean = Tagged<number, 'column', ReturnType<typeof boolean>>;
|
|
29
|
-
export type NumericDate = Tagged<number, 'column', ReturnType<typeof date>>;
|
|
30
|
-
export type Timestamp = Tagged<number, 'column', ReturnType<typeof timestamp>>;
|
|
13
|
+
export type ColumnBuilder<T, ColumnName extends string = never> = HasTag<T> extends true ? T extends Tagged<T, ColumnTypeTag, any> ? GetTagMetadata<T, ColumnTypeTag> : never : T extends string ? string extends ColumnName ? ReturnType<typeof text<ColumnName, string, [string, ...string[]]>> : ReturnType<typeof text<string, [string, ...string[]]>> : T extends number ? string extends ColumnName ? ReturnType<typeof doublePrecision<ColumnName>> : ReturnType<typeof doublePrecision> : T extends boolean ? string extends ColumnName ? ReturnType<typeof boolean<ColumnName>> : ReturnType<typeof boolean> : T extends EnumerationObject ? string extends ColumnName ? EnumColumn<T, ColumnName> : EnumColumn<T> : T extends (infer U)[] ? string extends ColumnName ? ReturnType<ColumnBuilder<U, ColumnName>['array']> : ReturnType<ColumnBuilder<U>['array']> : never;
|
|
14
|
+
export type Embedded<T = AbstractConstructor, P extends string = ''> = Tagged<T, EmbeddedConfigTag, {
|
|
15
|
+
prefix: P;
|
|
16
|
+
}>;
|
|
17
|
+
export type Array<T extends Tagged<ObjectLiteral, ColumnTypeTag, PgColumnBuilder<any>>> = Tagged<UnwrapTagged<T>[], ColumnTypeTag, ReturnType<GetTagMetadata<T, ColumnTypeTag>['array']>>;
|
|
18
|
+
export type Json<T extends ObjectLiteral = ObjectLiteral> = Tagged<T, ColumnTypeTag, $Type<ReturnType<typeof jsonb>, T>>;
|
|
19
|
+
export type Enum<T extends EnumerationObject> = Tagged<EnumerationValue<T>, ColumnTypeTag, EnumColumn<T>>;
|
|
20
|
+
export type Text = Tagged<string, ColumnTypeTag, ReturnType<typeof text<string, [string, ...string[]]>>>;
|
|
21
|
+
export type Uuid = Tagged<string, ColumnTypeTag, ReturnType<typeof uuid>>;
|
|
22
|
+
export type Integer = Tagged<number, ColumnTypeTag, ReturnType<typeof integer>>;
|
|
23
|
+
export type DoublePrecision = Tagged<number, ColumnTypeTag, ReturnType<typeof doublePrecision>>;
|
|
24
|
+
export type Boolean = Tagged<number, ColumnTypeTag, ReturnType<typeof boolean>>;
|
|
25
|
+
export type NumericDate = Tagged<number, ColumnTypeTag, ReturnType<typeof date>>;
|
|
26
|
+
export type Timestamp = Tagged<number, ColumnTypeTag, ReturnType<typeof timestamp>>;
|
|
31
27
|
export { Array, Column, Embedded, Index, Integer, Json, NumericDate, PrimaryKey, References, Timestamp, Unique, Uuid };
|
package/orm/types.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-redeclare, @typescript-eslint/naming-convention */
|
|
2
1
|
import { Array, Integer } from '../schema/index.js';
|
|
3
2
|
import { Column, Embedded, Index, PrimaryKey, References, Unique } from './decorators.js';
|
|
4
3
|
import { Json, NumericDate, Timestamp, Uuid } from './schemas/index.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tstdl/base",
|
|
3
|
-
"version": "0.92.
|
|
3
|
+
"version": "0.92.47",
|
|
4
4
|
"author": "Patrick Hein",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
"build": "tsc && tsc-alias",
|
|
11
11
|
"build:watch": "concurrently --raw --kill-others npm:tsc:watch npm:tsc-alias:watch",
|
|
12
12
|
"build:production": "rm -rf dist && npm run build && npm run build:production:copy-files",
|
|
13
|
-
"build:production:copy-files": "cp package.json .
|
|
13
|
+
"build:production:copy-files": "cp package.json eslint.config.js tsconfig.server.json dist/ && cp tsconfig.base.json dist/tsconfig.json && npm run copy:document-management",
|
|
14
14
|
"build:docs": "typedoc",
|
|
15
15
|
"build:docs:watch": "typedoc --watch",
|
|
16
16
|
"generate:drizzle": "drizzle-kit generate --config dist/document-management/server/drizzle.config.js",
|
|
17
17
|
"copy:document-management": "rm -rf ./dist/document-management/server/drizzle && cp -r ./source/document-management/server/drizzle ./dist/document-management/server/",
|
|
18
|
-
"lint": "eslint --
|
|
18
|
+
"lint": "eslint --cache source/",
|
|
19
19
|
"pub": "npm run build:production && rm -vf dist/test* && rm -vrf dist/tools/ && npm publish dist/",
|
|
20
20
|
"tsc:watch": "tsc --watch",
|
|
21
21
|
"tsc-alias:watch": "tsc-alias --watch"
|
|
@@ -127,8 +127,7 @@
|
|
|
127
127
|
"type-fest": "4.35"
|
|
128
128
|
},
|
|
129
129
|
"devDependencies": {
|
|
130
|
-
"@
|
|
131
|
-
"@stylistic/eslint-plugin": "3.1",
|
|
130
|
+
"@stylistic/eslint-plugin": "4.0",
|
|
132
131
|
"@types/chroma-js": "2.4",
|
|
133
132
|
"@types/koa__router": "12.0",
|
|
134
133
|
"@types/luxon": "3.4",
|
|
@@ -140,12 +139,9 @@
|
|
|
140
139
|
"@typescript-eslint/eslint-plugin": "8.24",
|
|
141
140
|
"concurrently": "9.1",
|
|
142
141
|
"drizzle-kit": "0.30",
|
|
143
|
-
"eslint": "
|
|
144
|
-
"
|
|
145
|
-
"eslint-plugin-import": "2.31",
|
|
142
|
+
"eslint": "9.20",
|
|
143
|
+
"globals": "15.15",
|
|
146
144
|
"tsc-alias": "1.8",
|
|
147
|
-
"typedoc": "0.27",
|
|
148
|
-
"typedoc-plugin-missing-exports": "3.1",
|
|
149
145
|
"typescript": "5.7"
|
|
150
146
|
},
|
|
151
147
|
"peerDependencies": {
|
package/pdf/pdf.service.js
CHANGED
|
@@ -71,7 +71,7 @@ import { promisify } from 'node:util';
|
|
|
71
71
|
import { BrowserContextController } from '../browser/browser-context-controller.js';
|
|
72
72
|
import { BrowserController } from '../browser/browser-controller.js';
|
|
73
73
|
import { PdfRenderOptions } from '../browser/pdf-options.js';
|
|
74
|
-
import { Singleton, inject, injectArgument } from '../injector/index.js';
|
|
74
|
+
import { Singleton, inject, injectArgument, resolveArgumentType } from '../injector/index.js';
|
|
75
75
|
import { LogLevel } from '../logger/level.js';
|
|
76
76
|
import { Logger } from '../logger/logger.js';
|
|
77
77
|
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 } from '../../injector/index.js';
|
|
15
|
+
import { ForwardArg, ResolveArg, Singleton, resolveArgumentType } 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,6 +12,7 @@ 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';
|
|
15
16
|
import { LockProvider } from '../../lock/index.js';
|
|
16
17
|
import { MessageBusProvider } from '../../message-bus/index.js';
|
|
17
18
|
import { Queue, QueueProvider } from '../../queue/index.js';
|
package/queue/queue.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { CancellationSignal } from '../cancellation/token.js';
|
|
2
|
-
import type { Resolvable } from '../injector/interfaces.js';
|
|
3
|
-
import { resolveArgumentType } from '../injector/interfaces.js';
|
|
2
|
+
import type { Resolvable, resolveArgumentType } from '../injector/interfaces.js';
|
|
4
3
|
import { QueueEnqueueBatch } from './enqueue-batch.js';
|
|
5
4
|
export type JobTag = string | number | null;
|
|
6
5
|
export type Job<T> = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { JsonPath } from '../../json-path/json-path.js';
|
|
2
|
-
import { type
|
|
3
|
-
import { Schema, SchemaOptions, type SchemaTestOptions, type SchemaTestResult } from '../schema.js';
|
|
2
|
+
import { type SchemaDecoratorOptions, type SchemaPropertyDecorator } from '../decorators/index.js';
|
|
3
|
+
import { Schema, type SchemaOptions, type SchemaTestOptions, type SchemaTestResult } from '../schema.js';
|
|
4
4
|
export type LiteralSchemaOptions<T> = SchemaOptions<T>;
|
|
5
5
|
export declare class LiteralSchema<const T> extends Schema<T> {
|
|
6
6
|
readonly name: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Entity } from '../../database/index.js';
|
|
2
|
-
import { resolveArgumentType } from '../../injector/interfaces.js';
|
|
3
|
-
import type { Resolvable } from '../../injector/interfaces.js';
|
|
2
|
+
import type { Resolvable, resolveArgumentType } from '../../injector/interfaces.js';
|
|
4
3
|
export type ElasticSearchIndexConfigArgument<T extends Entity = Entity> = string | ElasticSearchIndexConfig<T>;
|
|
5
4
|
export declare abstract class ElasticSearchIndexConfig<T extends Entity = Entity> implements Resolvable<ElasticSearchIndexConfigArgument> {
|
|
6
5
|
readonly indexName: string;
|
package/serializer/serializer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-unsafe-return,
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-return, @typescript-eslint/no-deprecated */
|
|
2
2
|
import { CircularBuffer } from '../data-structures/circular-buffer.js';
|
|
3
3
|
import { SortedArrayList } from '../data-structures/sorted-array-list.js';
|
|
4
4
|
import { compareByValueSelection } from '../utils/comparison.js';
|
|
@@ -156,7 +156,7 @@ function _deserialize(serialized, context, path, depth) {
|
|
|
156
156
|
if (context.options.allowUnsafe !== true) {
|
|
157
157
|
throw new Error('functions are only allowed if allowUnsafe option is true');
|
|
158
158
|
}
|
|
159
|
-
const fn = eval(nonPrimitiveData);
|
|
159
|
+
const fn = eval(nonPrimitiveData);
|
|
160
160
|
context.references.set(path, fn);
|
|
161
161
|
return fn;
|
|
162
162
|
}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
8
|
import type { Observable, Subscribable } from 'rxjs';
|
|
9
|
-
import { SignalsInjector } from '../api.js';
|
|
9
|
+
import type { SignalsInjector } from '../api.js';
|
|
10
10
|
import type { Signal } from './api.js';
|
|
11
|
-
import { ValueEqualityFn } from './equality.js';
|
|
11
|
+
import type { ValueEqualityFn } from './equality.js';
|
|
12
12
|
export interface ToSignalOptions<T> {
|
|
13
13
|
/**
|
|
14
14
|
* Initial value for the signal produced by `toSignal`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Signal } from './api.js';
|
|
2
|
-
import { ValueEqualityFn } from './equality.js';
|
|
3
|
-
import { SignalGetter } from './signal.js';
|
|
1
|
+
import { type Signal } from './api.js';
|
|
2
|
+
import type { ValueEqualityFn } from './equality.js';
|
|
3
|
+
import { type SignalGetter } from './signal.js';
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
6
6
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { Resolvable } from '../../injector/interfaces.js';
|
|
2
|
-
import { resolveArgumentType } from '../../injector/interfaces.js';
|
|
1
|
+
import type { Resolvable, resolveArgumentType } from '../../injector/interfaces.js';
|
|
3
2
|
import { Template } from '../template.model.js';
|
|
4
3
|
import { TemplateProvider } from '../template.provider.js';
|
|
5
4
|
export type FileTemplateProviderConfig = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Resolvable, resolveArgumentType } from '../../injector/interfaces.js';
|
|
1
|
+
import { type Resolvable, resolveArgumentType } from '../../injector/interfaces.js';
|
|
2
2
|
import type { TypedOmit } from '../../types.js';
|
|
3
3
|
import { TemplateField } from '../template.model.js';
|
|
4
4
|
import type { TemplateRenderer, TemplateRendererOptions, TemplateRendererString } from '../template.renderer.js';
|
|
@@ -14,6 +14,7 @@ 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';
|
|
17
18
|
import { StringProperty } from '../../schema/index.js';
|
|
18
19
|
import { TemplateField } from '../template.model.js';
|
|
19
20
|
import { TemplateResolver } from '../template.resolver.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PartialProperty, Record, TypedOmit } from '../../types.js';
|
|
2
2
|
import type { ComponentClass, FunctionComponent } from 'preact';
|
|
3
|
-
import { Template, TemplateField } from '../template.model.js';
|
|
3
|
+
import { type Template, TemplateField } from '../template.model.js';
|
|
4
4
|
import type { TemplateRenderer, TemplateRendererOptions, TemplateRendererString } from '../template.renderer.js';
|
|
5
5
|
import { TemplateResolver } from '../template.resolver.js';
|
|
6
6
|
export type JsxTemplate<Context extends Record = any> = FunctionComponent<Context> | ComponentClass<Context, any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Observable } from 'rxjs';
|
|
2
2
|
import { Logger } from '../logger/index.js';
|
|
3
3
|
import type { Signal } from '../signals/api.js';
|
|
4
|
-
import type { Enumeration, EnumerationValue } from '../types.js';
|
|
4
|
+
import type { Enumeration, EnumerationValue, Record } from '../types.js';
|
|
5
5
|
import type { PropertyName } from '../utils/object/property-name.js';
|
|
6
6
|
export type Language = {
|
|
7
7
|
code: string;
|
|
@@ -15,9 +15,7 @@ export type LocalizeItem<Parameters = void> = string | LocalizeFunction<Paramete
|
|
|
15
15
|
type LocalizationTemplate = {
|
|
16
16
|
[key: string]: LocalizeItem<any> | LocalizationTemplate;
|
|
17
17
|
};
|
|
18
|
-
export type EnumerationLocalization<T extends Enumeration = Enumeration> =
|
|
19
|
-
[P in EnumerationValue<T>]: LocalizeItem<any>;
|
|
20
|
-
};
|
|
18
|
+
export type EnumerationLocalization<T extends Enumeration = Enumeration> = Record<EnumerationValue<T>, LocalizeItem<any>>;
|
|
21
19
|
export type EnumerationLocalizationEntry<T extends Enumeration = Enumeration> = [enumType: T, enumName: LocalizeItem<any> | undefined, enumValues: EnumerationLocalization<T>];
|
|
22
20
|
export type Localization<T extends LocalizationTemplate = LocalizationTemplate, Enums extends Enumeration[] = Enumeration[]> = {
|
|
23
21
|
language: Language;
|
package/tsconfig.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"module": "nodenext",
|
|
5
5
|
"moduleResolution": "nodenext",
|
|
6
6
|
"lib": ["esnext", "dom"],
|
|
7
|
-
"target": "
|
|
7
|
+
"target": "es2024",
|
|
8
8
|
"baseUrl": "source/",
|
|
9
9
|
"rootDir": "source/",
|
|
10
10
|
"outDir": "dist/",
|
|
@@ -20,27 +20,23 @@
|
|
|
20
20
|
"experimentalDecorators": true,
|
|
21
21
|
|
|
22
22
|
/* strictness */
|
|
23
|
+
"strict": true,
|
|
24
|
+
"strictPropertyInitialization": false,
|
|
23
25
|
"allowUnreachableCode": false,
|
|
24
26
|
"allowUnusedLabels": false,
|
|
25
|
-
"alwaysStrict": true,
|
|
26
27
|
"exactOptionalPropertyTypes": false,
|
|
27
28
|
"noFallthroughCasesInSwitch": true,
|
|
28
|
-
"noImplicitAny": true,
|
|
29
29
|
"noImplicitOverride": true,
|
|
30
30
|
"noImplicitReturns": true,
|
|
31
|
-
"
|
|
31
|
+
"noUncheckedSideEffectImports": true,
|
|
32
32
|
"noPropertyAccessFromIndexSignature": true,
|
|
33
33
|
"noUncheckedIndexedAccess": true,
|
|
34
34
|
"noUnusedLocals": false,
|
|
35
35
|
"noUnusedParameters": true,
|
|
36
|
-
"strict": true,
|
|
37
|
-
"strictBindCallApply": true,
|
|
38
|
-
"strictFunctionTypes": true,
|
|
39
|
-
"strictNullChecks": true,
|
|
40
|
-
"strictPropertyInitialization": false,
|
|
41
|
-
"useDefineForClassFields": true,
|
|
42
36
|
"useUnknownInCatchVariables": true,
|
|
37
|
+
|
|
43
38
|
"isolatedModules": true,
|
|
39
|
+
"verbatimModuleSyntax": true,
|
|
44
40
|
|
|
45
41
|
/* jsx */
|
|
46
42
|
"jsx": "react-jsx",
|
package/tsconfig.server.json
CHANGED
package/types/index.d.ts
ADDED
package/types/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Record } from '../types.js';
|
|
2
|
+
export declare const tag: unique symbol;
|
|
3
|
+
export declare const type: unique symbol;
|
|
4
|
+
export type TagContainer<Type, Token> = {
|
|
5
|
+
readonly [tag]?: Token;
|
|
6
|
+
readonly [type]?: Type;
|
|
7
|
+
};
|
|
8
|
+
export type Tag<Type, Token extends PropertyKey, TagMetadata> = TagContainer<Type, Record<Token, TagMetadata>>;
|
|
9
|
+
export type HasTag<T, Token = unknown> = T extends TagContainer<unknown, Token> ? true : false;
|
|
10
|
+
export type Tagged<Type = unknown, TagName extends PropertyKey = PropertyKey, TagMetadata = unknown> = Type & Tag<Type, TagName, TagMetadata>;
|
|
11
|
+
export type GetTagMetadata<Type extends Tag<unknown, TagName, unknown>, TagName extends PropertyKey> = NonNullable<Type[typeof tag]>[TagName];
|
|
12
|
+
export type UnwrapTagged<TaggedType extends Tag<unknown, PropertyKey, any>> = TaggedType extends Tagged<infer Type, PropertyKey, any> ? Type : never;
|
|
13
|
+
export type Untagged<T> = T extends Tagged ? UnwrapTagged<T> : T;
|
|
14
|
+
export type UntaggedDeep<T> = T extends Tagged ? UnwrapTagged<T> : T extends readonly (infer U)[] ? UntaggedDeep<U>[] : T extends Record ? {
|
|
15
|
+
[P in keyof T]: UntaggedDeep<T[P]>;
|
|
16
|
+
} : Untagged<T>;
|
package/types/tagged.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Observable } from 'rxjs';
|
|
2
|
-
import type { CamelCase, Except, IsEqual, LiteralUnion
|
|
2
|
+
import type { CamelCase, Except, IsEqual, LiteralUnion } from 'type-fest';
|
|
3
3
|
import type { Signal } from './signals/api.js';
|
|
4
4
|
export type ObjectLiteral = {};
|
|
5
5
|
export type Function<P extends any[] = any[], R = any> = (...params: P) => R;
|
|
@@ -94,10 +94,10 @@ export type DeepWritable<T> = T extends readonly (infer U)[] ? DeepWritable<U>[]
|
|
|
94
94
|
-readonly [P in keyof T]: DeepWritable<T[P]>;
|
|
95
95
|
};
|
|
96
96
|
export type RequiredKeys<T> = {
|
|
97
|
-
[K in keyof T]-?:
|
|
97
|
+
[K in keyof T]-?: ObjectLiteral extends Pick<T, K> ? never : K;
|
|
98
98
|
}[keyof T];
|
|
99
99
|
export type OptionalKeys<T> = {
|
|
100
|
-
[K in keyof T]-?:
|
|
100
|
+
[K in keyof T]-?: ObjectLiteral extends Pick<T, K> ? K : never;
|
|
101
101
|
}[keyof T];
|
|
102
102
|
export type TypedOmit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
103
103
|
export type TypedExtract<T, U extends T> = T extends U ? T : never;
|
|
@@ -105,7 +105,7 @@ export type ReplaceIfUnknown<T, U> = IfUnknown<T, U, T>;
|
|
|
105
105
|
export type OmitNever<T extends Record> = {
|
|
106
106
|
[K in keyof T as T[K] extends never ? never : K]: T[K];
|
|
107
107
|
};
|
|
108
|
-
export type BaseType<T extends Exclude<Primitive, null | undefined>> = T extends string ? string :
|
|
108
|
+
export type BaseType<T extends Exclude<Primitive, null | undefined>> = T extends string ? string : T extends number ? number : T extends boolean ? boolean : T extends bigint ? bigint : T extends symbol ? symbol : T extends null ? null : T extends undefined ? undefined : never;
|
|
109
109
|
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>>>;
|
|
110
110
|
/**
|
|
111
111
|
* Omit properties from a type that extend from a specific type.
|
|
@@ -158,7 +158,7 @@ export type IfAny<T, Then, Else = never> = true extends (false & T) ? Then : Els
|
|
|
158
158
|
export type IfUnknown<T, Then, Else = never> = unknown extends T ? Then : Else;
|
|
159
159
|
export type IsAny<T> = IfAny<T, true, false>;
|
|
160
160
|
export type IsUnknown<T> = IfUnknown<T, true, false>;
|
|
161
|
-
export type If<B extends
|
|
161
|
+
export type If<B extends boolean, Then, Else> = B extends true ? Then : Else;
|
|
162
162
|
export type Not<T extends boolean> = T extends true ? false : true;
|
|
163
163
|
export type Fallback<T, F> = [T] extends [never] ? F : T;
|
|
164
164
|
export type PartialProperty<T, P extends keyof T> = Omit<T, P> & Partial<Pick<T, P>>;
|
|
@@ -195,7 +195,7 @@ export type Paths<T extends Record> = T extends object ? {
|
|
|
195
195
|
export type TypeFromPath<T extends Record, Path extends Paths<T> | string> = {
|
|
196
196
|
[K in Path]: K extends keyof T ? T[K] : K extends `${infer P}.${infer S}` ? T[P] extends Record ? TypeFromPath<T[P], S> : never : never;
|
|
197
197
|
}[Path];
|
|
198
|
-
export type ConstructorParameterDecorator = (target:
|
|
198
|
+
export type ConstructorParameterDecorator = (target: object, propertyKey: undefined, parameterIndex: number) => void;
|
|
199
199
|
export type ReactiveValue<T> = T | Signal<T> | Observable<T>;
|
|
200
200
|
export type PascalCase<Value> = CamelCase<Value> extends string ? Capitalize<CamelCase<Value>> : CamelCase<Value>;
|
|
201
201
|
type PickOmitDeepSelection<T> = T extends (infer U)[] ? (boolean | PickOmitDeepSelection<U>) : T extends Record<any> ? (boolean | {
|
|
@@ -211,8 +211,4 @@ export type OmitDeep<T, S extends OmitDeepSelection<T>> = T extends Record<any>
|
|
|
211
211
|
S[Extract<P, keyof S>]
|
|
212
212
|
] extends ([false] | [never]) ? T[P] : S[Extract<P, keyof S>] extends Record<any> ? T[P] extends (infer U)[] ? S[Extract<P, keyof S>] extends OmitDeepSelection<U> ? OmitDeep<U, S[Extract<P, keyof S>]>[] : never : S[Extract<P, keyof S>] extends OmitDeepSelection<T[P]> ? OmitDeep<T[P], S[Extract<P, keyof S>]> : never : never;
|
|
213
213
|
}> : T;
|
|
214
|
-
export type Untagged<T> = T extends Tagged<unknown, any, any> ? UnwrapTagged<T> : T;
|
|
215
|
-
export type UntaggedDeep<T> = T extends Tagged<unknown, any, any> ? UnwrapTagged<T> : T extends readonly (infer U)[] ? UntaggedDeep<U>[] : T extends Record ? {
|
|
216
|
-
[P in keyof T]: UntaggedDeep<T[P]>;
|
|
217
|
-
} : Untagged<T>;
|
|
218
214
|
export {};
|
|
@@ -5,8 +5,7 @@ export function multiplexAsync(iterable, count, bufferSize) {
|
|
|
5
5
|
throw new Error('bufferSize must be greater than 0');
|
|
6
6
|
}
|
|
7
7
|
const feedableIterables = createArray(count, () => new FeedableAsyncIterable());
|
|
8
|
-
|
|
9
|
-
multiplexTo(iterable, feedableIterables, bufferSize);
|
|
8
|
+
void multiplexTo(iterable, feedableIterables, bufferSize);
|
|
10
9
|
return feedableIterables;
|
|
11
10
|
}
|
|
12
11
|
async function multiplexTo(input, outputs, bufferSize) {
|
package/utils/benchmark.js
CHANGED
|
@@ -26,7 +26,7 @@ export function measureBenchmarkOverhead(duration = 250) {
|
|
|
26
26
|
do {
|
|
27
27
|
warmupFunction();
|
|
28
28
|
operations++;
|
|
29
|
-
} while (timer.milliseconds < testDuration || warmupPhase);
|
|
29
|
+
} while (timer.milliseconds < testDuration || warmupPhase); // eslint-disable-line @typescript-eslint/no-unnecessary-condition
|
|
30
30
|
timer.stop();
|
|
31
31
|
microsecondsPerTimerRead = timer.microseconds / operations;
|
|
32
32
|
}
|
package/utils/comparison.js
CHANGED
|
@@ -46,7 +46,6 @@ export const orderRest = Symbol('Order rest');
|
|
|
46
46
|
export function compareByValueSelectionToOrder(order, selector) {
|
|
47
47
|
const indexMapEntries = order.map((orderItem, index) => [orderItem, index]);
|
|
48
48
|
const indexMap = new Map(indexMapEntries);
|
|
49
|
-
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
50
49
|
return function compareByValueSelectionToOrder(a, b) {
|
|
51
50
|
const selectedA = selector(a);
|
|
52
51
|
const selectedB = selector(b);
|
package/utils/cryptography.d.ts
CHANGED
|
@@ -27,10 +27,8 @@ export interface CryptionResult {
|
|
|
27
27
|
export interface DecryptionResult extends CryptionResult {
|
|
28
28
|
toUtf8(): Promise<string>;
|
|
29
29
|
}
|
|
30
|
-
export
|
|
31
|
-
|
|
32
|
-
export interface SignResult extends CryptionResult {
|
|
33
|
-
}
|
|
30
|
+
export type DigestResult = CryptionResult;
|
|
31
|
+
export type SignResult = CryptionResult;
|
|
34
32
|
/**
|
|
35
33
|
* Encrypt data
|
|
36
34
|
* @param algorithm algorithm as supported by Web Crypto API
|
package/utils/event-loop.js
CHANGED
|
@@ -17,6 +17,5 @@ export function runEventLoopWatcher(logger, cancellationSignal) {
|
|
|
17
17
|
.watch(0, 100, AggregationMode.ThirdQuartile)
|
|
18
18
|
.subscribe((delay) => logger.debug(`eventloop: ${formatDuration(delay, 2)}`));
|
|
19
19
|
sampler.start();
|
|
20
|
-
|
|
21
|
-
cancellationSignal.then(async () => sampler.stop());
|
|
20
|
+
void cancellationSignal.then(async () => sampler.stop());
|
|
22
21
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { filter } from './filter.js';
|
|
2
2
|
export function firstOrDefault(iterable, defaultValue, predicate) {
|
|
3
3
|
const source = (predicate == undefined) ? iterable : filter(iterable, predicate);
|
|
4
|
-
// eslint-disable-next-line no-unreachable-loop
|
|
5
4
|
for (const item of source) {
|
|
6
5
|
return item;
|
|
7
6
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { filter } from './filter.js';
|
|
2
2
|
export function first(iterable, predicate) {
|
|
3
3
|
const source = (predicate == undefined) ? iterable : filter(iterable, predicate);
|
|
4
|
-
// eslint-disable-next-line no-unreachable-loop
|
|
5
4
|
for (const item of source) {
|
|
6
5
|
return item;
|
|
7
6
|
}
|
|
@@ -15,7 +15,7 @@ export function groupToMap(iterable, ...selectors) {
|
|
|
15
15
|
}
|
|
16
16
|
const map = new MultiKeyMap();
|
|
17
17
|
for (const item of iterable) {
|
|
18
|
-
const groupKeys = selectors.map((selector) => selector(item, index));
|
|
18
|
+
const groupKeys = selectors.map((selector) => selector(item, index));
|
|
19
19
|
index++;
|
|
20
20
|
if (!map.has(groupKeys)) {
|
|
21
21
|
map.set(groupKeys, []);
|