@tstdl/base 0.93.76 → 0.93.78
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/prompts/instructions-formatter.d.ts +68 -5
- package/ai/prompts/instructions-formatter.js +11 -3
- package/authentication/client/http-client.middleware.js +2 -2
- package/authentication/models/authentication-credentials.model.d.ts +2 -2
- package/authentication/models/authentication-credentials.model.js +5 -3
- package/authentication/models/authentication-session.model.d.ts +2 -2
- package/authentication/models/authentication-session.model.js +5 -3
- package/authentication/models/index.d.ts +4 -0
- package/authentication/models/index.js +4 -0
- package/authentication/models/service-account.model.d.ts +7 -0
- package/authentication/models/service-account.model.js +31 -0
- package/authentication/models/subject.model.d.ts +16 -0
- package/authentication/models/subject.model.js +59 -0
- package/authentication/models/system-account.model.d.ts +5 -0
- package/authentication/models/system-account.model.js +25 -0
- package/authentication/models/user.model.d.ts +15 -0
- package/authentication/models/user.model.js +47 -0
- package/authentication/server/drizzle/0001_condemned_pretty_boy.sql +70 -0
- package/authentication/server/drizzle/meta/0001_snapshot.json +651 -0
- package/authentication/server/drizzle/meta/_journal.json +7 -0
- package/authentication/server/index.d.ts +1 -0
- package/authentication/server/index.js +1 -0
- package/authentication/server/schemas.d.ts +16 -1
- package/authentication/server/schemas.js +7 -1
- package/authentication/server/subject.service.d.ts +6 -0
- package/authentication/server/subject.service.js +44 -0
- package/circuit-breaker/circuit-breaker.d.ts +32 -0
- package/circuit-breaker/circuit-breaker.js +9 -0
- package/circuit-breaker/index.d.ts +2 -0
- package/circuit-breaker/index.js +2 -0
- package/circuit-breaker/postgres/circuit-breaker.d.ts +7 -0
- package/circuit-breaker/postgres/circuit-breaker.js +78 -0
- package/circuit-breaker/postgres/drizzle/0000_hard_shocker.sql +9 -0
- package/circuit-breaker/postgres/drizzle/meta/0000_snapshot.json +82 -0
- package/circuit-breaker/postgres/drizzle/meta/_journal.json +13 -0
- package/circuit-breaker/postgres/drizzle.config.d.ts +2 -0
- package/circuit-breaker/postgres/drizzle.config.js +11 -0
- package/circuit-breaker/postgres/index.d.ts +5 -0
- package/circuit-breaker/postgres/index.js +5 -0
- package/circuit-breaker/postgres/model.d.ts +9 -0
- package/circuit-breaker/postgres/model.js +40 -0
- package/circuit-breaker/postgres/module.d.ts +6 -0
- package/circuit-breaker/postgres/module.js +25 -0
- package/circuit-breaker/postgres/provider.d.ts +6 -0
- package/circuit-breaker/postgres/provider.js +21 -0
- package/circuit-breaker/postgres/schemas.d.ts +8 -0
- package/circuit-breaker/postgres/schemas.js +6 -0
- package/circuit-breaker/provider.d.ts +4 -0
- package/circuit-breaker/provider.js +2 -0
- package/circuit-breaker/tests/circuit-breaker.test.js +113 -0
- package/document-management/models/document.model.d.ts +0 -1
- package/document-management/models/document.model.js +0 -5
- package/document-management/server/api/document-management.api.js +1 -2
- package/document-management/server/drizzle/0002_round_warbird.sql +1 -0
- package/document-management/server/drizzle/meta/0002_snapshot.json +2722 -0
- package/document-management/server/drizzle/meta/_journal.json +7 -0
- package/document-management/server/services/document-collection.service.js +3 -3
- package/document-management/server/services/document-management-ancillary.service.d.ts +1 -1
- package/document-management/server/services/document-management.service.js +1 -1
- package/document-management/server/services/document-workflow.service.js +5 -5
- package/document-management/server/services/document.service.d.ts +0 -2
- package/document-management/server/services/document.service.js +1 -2
- package/document-management/service-models/enriched/enriched-document.view.d.ts +1 -1
- package/examples/document-management/main.d.ts +1 -1
- package/examples/document-management/main.js +1 -1
- package/logger/transports/console.d.ts +1 -1
- package/logger/transports/console.js +4 -1
- package/message-bus/message-bus-base.js +1 -1
- package/package.json +8 -5
- package/queue/enqueue-batch.d.ts +11 -11
- package/queue/enqueue-batch.js +2 -3
- package/queue/index.d.ts +1 -0
- package/queue/index.js +1 -0
- package/queue/postgres/drizzle/0003_tricky_venom.sql +30 -0
- package/queue/postgres/drizzle/meta/0003_snapshot.json +288 -0
- package/queue/postgres/drizzle/meta/_journal.json +7 -0
- package/queue/postgres/drizzle.config.js +2 -2
- package/queue/postgres/index.d.ts +1 -1
- package/queue/postgres/index.js +1 -1
- package/queue/postgres/module.d.ts +1 -1
- package/queue/postgres/module.js +1 -1
- package/queue/postgres/queue.d.ts +52 -23
- package/queue/postgres/queue.js +582 -64
- package/queue/postgres/queue.provider.d.ts +1 -1
- package/queue/postgres/schemas.d.ts +13 -2
- package/queue/postgres/schemas.js +4 -2
- package/queue/postgres/task.model.d.ts +24 -0
- package/queue/postgres/task.model.js +115 -0
- package/queue/provider.d.ts +1 -1
- package/queue/queue.d.ts +158 -37
- package/queue/queue.js +97 -19
- package/queue/task-context.d.ts +38 -0
- package/queue/task-context.js +102 -0
- package/queue/tests/queue.test.d.ts +1 -0
- package/queue/tests/queue.test.js +623 -0
- package/test4.d.ts +1 -1
- package/test4.js +1 -1
- package/utils/format-error.d.ts +17 -20
- package/utils/format-error.js +105 -47
- package/queue/postgres/job.model.d.ts +0 -12
- package/queue/postgres/job.model.js +0 -53
- package/test6.js +0 -33
- /package/{test6.d.ts → circuit-breaker/tests/circuit-breaker.test.d.ts} +0 -0
|
@@ -3,7 +3,7 @@ export declare class PostgresQueueModuleConfig {
|
|
|
3
3
|
database?: DatabaseConfig;
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
|
-
* configure
|
|
6
|
+
* configure queue module
|
|
7
7
|
*/
|
|
8
8
|
export declare function configurePostgresQueue(config?: PostgresQueueModuleConfig, register?: boolean): void;
|
|
9
9
|
export declare function migratePostgresQueueSchema(): Promise<void>;
|
package/queue/postgres/module.js
CHANGED
|
@@ -9,7 +9,7 @@ export class PostgresQueueModuleConfig {
|
|
|
9
9
|
database;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* configure
|
|
12
|
+
* configure queue module
|
|
13
13
|
*/
|
|
14
14
|
export function configurePostgresQueue(config, register = true) {
|
|
15
15
|
Injector.register(PostgresQueueModuleConfig, { useValue: config });
|
|
@@ -1,31 +1,60 @@
|
|
|
1
1
|
import { CancellationSignal } from '../../cancellation/index.js';
|
|
2
|
+
import type { Query } from '../../orm/index.js';
|
|
3
|
+
import { type Transaction } from '../../orm/server/index.js';
|
|
2
4
|
import type { ObjectLiteral } from '../../types/index.js';
|
|
3
|
-
import { Queue, type EnqueueManyItem, type EnqueueManyOptions, type EnqueueOneOptions, type
|
|
4
|
-
export declare class PostgresQueue<
|
|
5
|
+
import { Queue, type EnqueueManyItem, type EnqueueManyOptions, type EnqueueOneOptions, type Task, type TaskTag } from '../queue.js';
|
|
6
|
+
export declare class PostgresQueue<Data extends ObjectLiteral, State extends ObjectLiteral, Result extends ObjectLiteral> extends Queue<Data, State, Result> {
|
|
5
7
|
#private;
|
|
6
8
|
readonly processTimeout: number;
|
|
9
|
+
readonly executionTimeout: number;
|
|
7
10
|
readonly maxTries: number;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
readonly retryDelayMinimum: number;
|
|
12
|
+
readonly retryDelayMaximum: number;
|
|
13
|
+
readonly retryDelayGrowth: number;
|
|
14
|
+
readonly retentionPeriod: number;
|
|
15
|
+
readonly globalConcurrency: number | null;
|
|
16
|
+
enqueue(data: Data, options?: EnqueueOneOptions): Promise<Task<Data, State, Result>>;
|
|
17
|
+
enqueueMany(items: EnqueueManyItem<Data>[], options?: EnqueueManyOptions & {
|
|
18
|
+
returnTasks?: false;
|
|
11
19
|
}): Promise<void>;
|
|
12
|
-
enqueueMany(items: EnqueueManyItem<
|
|
13
|
-
|
|
14
|
-
}): Promise<
|
|
15
|
-
enqueueMany(items: EnqueueManyItem<
|
|
20
|
+
enqueueMany(items: EnqueueManyItem<Data>[], options: EnqueueManyOptions & {
|
|
21
|
+
returnTasks: true;
|
|
22
|
+
}): Promise<Task<Data, State, Result>[]>;
|
|
23
|
+
enqueueMany(items: EnqueueManyItem<Data>[], options?: EnqueueManyOptions): Promise<Task<Data, State, Result>[] | undefined>;
|
|
16
24
|
has(id: string): Promise<boolean>;
|
|
17
|
-
countByTag(tag:
|
|
18
|
-
get(id: string): Promise<
|
|
19
|
-
getByTag(tag:
|
|
20
|
-
getByTags(tags:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
countByTag(tag: TaskTag): Promise<number>;
|
|
26
|
+
get(id: string): Promise<Task<Data, State, Result> | undefined>;
|
|
27
|
+
getByTag(tag: TaskTag): Promise<Task<Data, State, Result>[]>;
|
|
28
|
+
getByTags(tags: TaskTag[]): Promise<Task<Data, State, Result>[]>;
|
|
29
|
+
getTree(idOrIds: string | string[], transaction?: Transaction): Promise<Task<unknown, unknown, unknown>[]>;
|
|
30
|
+
getTreeByQuery(query: Query<Task>, transaction?: Transaction): Promise<Task<unknown, unknown, unknown>[]>;
|
|
31
|
+
cancel(id: string, transaction?: Transaction): Promise<void>;
|
|
32
|
+
cancelMany(ids: string[], transaction?: Transaction): Promise<void>;
|
|
33
|
+
cancelByTag(tag: TaskTag): Promise<void>;
|
|
34
|
+
cancelManyByTag(tags: TaskTag[]): Promise<void>;
|
|
35
|
+
clear(): Promise<void>;
|
|
36
|
+
dequeue(): Promise<Task<Data, State, Result> | undefined>;
|
|
37
|
+
dequeueMany(count: number): Promise<Task<Data, State, Result>[]>;
|
|
38
|
+
reschedule(id: string, timestamp: number, transaction?: Transaction): Promise<void>;
|
|
39
|
+
rescheduleMany(ids: string[], timestamp: number, transaction?: Transaction): Promise<void>;
|
|
40
|
+
rescheduleByTag(tag: TaskTag, timestamp: number, transaction?: Transaction): Promise<void>;
|
|
41
|
+
rescheduleManyByTag(tags: TaskTag[], timestamp: number, transaction?: Transaction): Promise<void>;
|
|
42
|
+
touch(task: Task, options?: {
|
|
43
|
+
progress?: number;
|
|
44
|
+
state?: State;
|
|
45
|
+
transaction?: Transaction;
|
|
46
|
+
}): Promise<Task<Data, State, Result> | undefined>;
|
|
47
|
+
touchMany(tasks: Task[], progresses?: number[], states?: State[], transaction?: Transaction): Promise<string[]>;
|
|
48
|
+
acknowledge<R>(task: Task<any, any, R>, result?: R, transaction?: Transaction, { skipFanIn }?: {
|
|
49
|
+
skipFanIn?: boolean;
|
|
50
|
+
}): Promise<void>;
|
|
51
|
+
acknowledgeMany<R>(tasks: Task<any, any, R>[], results?: R[], transaction?: Transaction): Promise<void>;
|
|
52
|
+
fail(task: Task, error: any, fatal?: boolean, transaction?: Transaction, { skipFanIn }?: {
|
|
53
|
+
skipFanIn?: boolean;
|
|
54
|
+
}): Promise<void>;
|
|
55
|
+
failMany(tasks: Task[], errors: any[], transaction?: Transaction): Promise<void>;
|
|
56
|
+
prune(): Promise<void>;
|
|
57
|
+
restart(id: string, transaction?: Transaction): Promise<void>;
|
|
58
|
+
getConsumer(cancellationSignal: CancellationSignal): AsyncIterableIterator<Task<Data, State, Result>>;
|
|
59
|
+
getBatchConsumer(size: number, cancellationSignal: CancellationSignal): AsyncIterableIterator<Task<Data, State, Result>[]>;
|
|
31
60
|
}
|