@decaf-ts/core 0.23.0 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.cjs +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/types/auth/decorators.d.cts +2 -2
- package/lib/types/auth/decorators.d.mts +2 -2
- package/lib/types/auth/index.d.cts +2 -2
- package/lib/types/auth/index.d.mts +2 -2
- package/lib/types/fs/FilesystemAdapter.d.cts +5 -5
- package/lib/types/fs/FilesystemAdapter.d.mts +5 -5
- package/lib/types/fs/FsDispatch.d.cts +4 -4
- package/lib/types/fs/FsDispatch.d.mts +4 -4
- package/lib/types/fs/index.d.cts +4 -4
- package/lib/types/fs/index.d.mts +4 -4
- package/lib/types/fs/indexStore.d.cts +2 -2
- package/lib/types/fs/indexStore.d.mts +2 -2
- package/lib/types/fs/types.d.cts +2 -2
- package/lib/types/fs/types.d.mts +2 -2
- package/lib/types/identity/decorators.d.cts +3 -3
- package/lib/types/identity/decorators.d.mts +3 -3
- package/lib/types/identity/index.d.cts +1 -1
- package/lib/types/identity/index.d.mts +1 -1
- package/lib/types/index.d.cts +13 -13
- package/lib/types/index.d.mts +13 -13
- package/lib/types/interfaces/ContextuallyLogged.d.cts +2 -2
- package/lib/types/interfaces/ContextuallyLogged.d.mts +2 -2
- package/lib/types/interfaces/Observable.d.cts +1 -1
- package/lib/types/interfaces/Observable.d.mts +1 -1
- package/lib/types/interfaces/Paginatable.d.cts +1 -1
- package/lib/types/interfaces/Paginatable.d.mts +1 -1
- package/lib/types/interfaces/Queriable.d.cts +2 -2
- package/lib/types/interfaces/Queriable.d.mts +2 -2
- package/lib/types/interfaces/RawExecutor.d.cts +1 -1
- package/lib/types/interfaces/RawExecutor.d.mts +1 -1
- package/lib/types/interfaces/index.d.cts +7 -7
- package/lib/types/interfaces/index.d.mts +7 -7
- package/lib/types/migrations/Migration.d.cts +4 -4
- package/lib/types/migrations/Migration.d.mts +4 -4
- package/lib/types/migrations/MigrationService.d.cts +7 -7
- package/lib/types/migrations/MigrationService.d.mts +7 -7
- package/lib/types/migrations/MigrationTaskBuilder.d.cts +3 -3
- package/lib/types/migrations/MigrationTaskBuilder.d.mts +3 -3
- package/lib/types/migrations/MigrationTasks.d.cts +2 -2
- package/lib/types/migrations/MigrationTasks.d.mts +2 -2
- package/lib/types/migrations/SemverMigrationVersioning.d.cts +1 -1
- package/lib/types/migrations/SemverMigrationVersioning.d.mts +1 -1
- package/lib/types/migrations/StandardMigrationVersioning.d.cts +1 -1
- package/lib/types/migrations/StandardMigrationVersioning.d.mts +1 -1
- package/lib/types/migrations/constants.d.cts +1 -1
- package/lib/types/migrations/constants.d.mts +1 -1
- package/lib/types/migrations/decorators.d.cts +1 -1
- package/lib/types/migrations/decorators.d.mts +1 -1
- package/lib/types/migrations/index.d.cts +9 -9
- package/lib/types/migrations/index.d.mts +9 -9
- package/lib/types/migrations/types.d.cts +5 -5
- package/lib/types/migrations/types.d.mts +5 -5
- package/lib/types/model/SequenceModel.d.cts +1 -1
- package/lib/types/model/SequenceModel.d.mts +1 -1
- package/lib/types/model/construction.d.cts +4 -4
- package/lib/types/model/construction.d.mts +4 -4
- package/lib/types/model/decorators.d.cts +4 -4
- package/lib/types/model/decorators.d.mts +4 -4
- package/lib/types/model/index.d.cts +6 -6
- package/lib/types/model/index.d.mts +6 -6
- package/lib/types/model/indexing.d.cts +1 -1
- package/lib/types/model/indexing.d.mts +1 -1
- package/lib/types/model/types.d.cts +2 -2
- package/lib/types/model/types.d.mts +2 -2
- package/lib/types/overrides/Metadata.d.cts +6 -6
- package/lib/types/overrides/Metadata.d.mts +6 -6
- package/lib/types/overrides/Model.d.cts +3 -3
- package/lib/types/overrides/Model.d.mts +3 -3
- package/lib/types/overrides/index.d.cts +5 -5
- package/lib/types/overrides/index.d.mts +5 -5
- package/lib/types/overrides/injectables.d.cts +2 -2
- package/lib/types/overrides/injectables.d.mts +2 -2
- package/lib/types/persistence/Adapter.d.cts +15 -15
- package/lib/types/persistence/Adapter.d.mts +15 -15
- package/lib/types/persistence/Context.d.cts +1 -1
- package/lib/types/persistence/Context.d.mts +1 -1
- package/lib/types/persistence/ContextLock.d.cts +1 -1
- package/lib/types/persistence/ContextLock.d.mts +1 -1
- package/lib/types/persistence/Dispatch.d.cts +4 -4
- package/lib/types/persistence/Dispatch.d.mts +4 -4
- package/lib/types/persistence/ObserverHandler.d.cts +4 -4
- package/lib/types/persistence/ObserverHandler.d.mts +4 -4
- package/lib/types/persistence/Sequence.d.cts +7 -7
- package/lib/types/persistence/Sequence.d.mts +7 -7
- package/lib/types/persistence/constants.d.cts +2 -2
- package/lib/types/persistence/constants.d.mts +2 -2
- package/lib/types/persistence/decorators.d.cts +3 -3
- package/lib/types/persistence/decorators.d.mts +3 -3
- package/lib/types/persistence/event-filters.d.cts +2 -2
- package/lib/types/persistence/event-filters.d.mts +2 -2
- package/lib/types/persistence/index.d.cts +13 -13
- package/lib/types/persistence/index.d.mts +13 -13
- package/lib/types/persistence/transactions.d.cts +2 -2
- package/lib/types/persistence/transactions.d.mts +2 -2
- package/lib/types/persistence/types.d.cts +8 -8
- package/lib/types/persistence/types.d.mts +8 -8
- package/lib/types/query/Condition.d.cts +2 -2
- package/lib/types/query/Condition.d.mts +2 -2
- package/lib/types/query/MethodQueryBuilder.d.cts +1 -1
- package/lib/types/query/MethodQueryBuilder.d.mts +1 -1
- package/lib/types/query/Paginator.d.cts +3 -3
- package/lib/types/query/Paginator.d.mts +3 -3
- package/lib/types/query/Statement.d.cts +11 -11
- package/lib/types/query/Statement.d.mts +11 -11
- package/lib/types/query/decorators.d.cts +3 -3
- package/lib/types/query/decorators.d.mts +3 -3
- package/lib/types/query/index.d.cts +11 -11
- package/lib/types/query/index.d.mts +11 -11
- package/lib/types/query/options.d.cts +4 -4
- package/lib/types/query/options.d.mts +4 -4
- package/lib/types/query/selectors.d.cts +1 -1
- package/lib/types/query/selectors.d.mts +1 -1
- package/lib/types/query/types.d.cts +3 -3
- package/lib/types/query/types.d.mts +3 -3
- package/lib/types/query/utils.d.cts +1 -1
- package/lib/types/query/utils.d.mts +1 -1
- package/lib/types/ram/RamAdapter.d.cts +7 -7
- package/lib/types/ram/RamAdapter.d.mts +7 -7
- package/lib/types/ram/RamPaginator.d.cts +4 -4
- package/lib/types/ram/RamPaginator.d.mts +4 -4
- package/lib/types/ram/RamStatement.d.cts +5 -5
- package/lib/types/ram/RamStatement.d.mts +5 -5
- package/lib/types/ram/handlers.d.cts +3 -3
- package/lib/types/ram/handlers.d.mts +3 -3
- package/lib/types/ram/index.d.cts +6 -6
- package/lib/types/ram/index.d.mts +6 -6
- package/lib/types/ram/types.d.cts +3 -3
- package/lib/types/ram/types.d.mts +3 -3
- package/lib/types/repository/Repository.d.cts +13 -13
- package/lib/types/repository/Repository.d.mts +13 -13
- package/lib/types/repository/constants.d.cts +1 -1
- package/lib/types/repository/constants.d.mts +1 -1
- package/lib/types/repository/index.d.cts +7 -7
- package/lib/types/repository/index.d.mts +7 -7
- package/lib/types/repository/types.d.cts +1 -1
- package/lib/types/repository/types.d.mts +1 -1
- package/lib/types/services/ModelService.d.cts +8 -8
- package/lib/types/services/ModelService.d.mts +8 -8
- package/lib/types/services/PersistenceService.d.cts +4 -4
- package/lib/types/services/PersistenceService.d.mts +4 -4
- package/lib/types/services/index.d.cts +3 -3
- package/lib/types/services/index.d.mts +3 -3
- package/lib/types/services/services.d.cts +5 -5
- package/lib/types/services/services.d.mts +5 -5
- package/lib/types/tasks/CleanUpTask.d.cts +5 -5
- package/lib/types/tasks/CleanUpTask.d.mts +5 -5
- package/lib/types/tasks/TaskContext.d.cts +7 -7
- package/lib/types/tasks/TaskContext.d.mts +7 -7
- package/lib/types/tasks/TaskEngine.d.cts +18 -18
- package/lib/types/tasks/TaskEngine.d.mts +18 -18
- package/lib/types/tasks/TaskErrors.d.cts +2 -2
- package/lib/types/tasks/TaskErrors.d.mts +2 -2
- package/lib/types/tasks/TaskEventBus.d.cts +7 -7
- package/lib/types/tasks/TaskEventBus.d.mts +7 -7
- package/lib/types/tasks/TaskEventService.d.cts +3 -3
- package/lib/types/tasks/TaskEventService.d.mts +3 -3
- package/lib/types/tasks/TaskHandler.d.cts +3 -3
- package/lib/types/tasks/TaskHandler.d.mts +3 -3
- package/lib/types/tasks/TaskHandlerRegistry.d.cts +1 -1
- package/lib/types/tasks/TaskHandlerRegistry.d.mts +1 -1
- package/lib/types/tasks/TaskService.d.cts +15 -15
- package/lib/types/tasks/TaskService.d.mts +15 -15
- package/lib/types/tasks/TaskStateChangeError.d.cts +2 -2
- package/lib/types/tasks/TaskStateChangeError.d.mts +2 -2
- package/lib/types/tasks/TaskTracker.d.cts +8 -8
- package/lib/types/tasks/TaskTracker.d.mts +8 -8
- package/lib/types/tasks/builder.d.cts +4 -4
- package/lib/types/tasks/builder.d.mts +4 -4
- package/lib/types/tasks/constants.d.cts +1 -1
- package/lib/types/tasks/constants.d.mts +1 -1
- package/lib/types/tasks/index.d.cts +17 -17
- package/lib/types/tasks/index.d.mts +17 -17
- package/lib/types/tasks/logging.d.cts +1 -1
- package/lib/types/tasks/logging.d.mts +1 -1
- package/lib/types/tasks/models/TaskBackoffModel.d.cts +1 -1
- package/lib/types/tasks/models/TaskBackoffModel.d.mts +1 -1
- package/lib/types/tasks/models/TaskEventModel.d.cts +1 -1
- package/lib/types/tasks/models/TaskEventModel.d.mts +1 -1
- package/lib/types/tasks/models/TaskModel.d.cts +6 -6
- package/lib/types/tasks/models/TaskModel.d.mts +6 -6
- package/lib/types/tasks/models/TaskStepResultModel.d.cts +2 -2
- package/lib/types/tasks/models/TaskStepResultModel.d.mts +2 -2
- package/lib/types/tasks/models/index.d.cts +8 -8
- package/lib/types/tasks/models/index.d.mts +8 -8
- package/lib/types/tasks/types.d.cts +10 -10
- package/lib/types/tasks/types.d.mts +10 -10
- package/lib/types/tasks/utils.d.cts +2 -2
- package/lib/types/tasks/utils.d.mts +2 -2
- package/lib/types/utils/ContextualLoggedClass.d.cts +4 -4
- package/lib/types/utils/ContextualLoggedClass.d.mts +4 -4
- package/lib/types/utils/decorators.d.cts +1 -1
- package/lib/types/utils/decorators.d.mts +1 -1
- package/lib/types/utils/index.d.cts +6 -6
- package/lib/types/utils/index.d.mts +6 -6
- package/lib/types/workers/TaskEngine.d.cts +6 -6
- package/lib/types/workers/TaskEngine.d.mts +6 -6
- package/lib/types/workers/WorkThreadEnvironment.d.cts +1 -1
- package/lib/types/workers/WorkThreadEnvironment.d.mts +1 -1
- package/lib/types/workers/index.d.cts +4 -4
- package/lib/types/workers/index.d.mts +4 -4
- package/lib/types/workers/messages.d.cts +1 -1
- package/lib/types/workers/messages.d.mts +1 -1
- package/lib/types/workers/types.d.cts +3 -3
- package/lib/types/workers/types.d.mts +3 -3
- package/package.json +1 -1
- package/lib/types/auth/constants.d.ts +0 -5
- package/lib/types/auth/decorators.d.ts +0 -5
- package/lib/types/auth/index.d.ts +0 -2
- package/lib/types/fs/FilesystemAdapter.d.ts +0 -70
- package/lib/types/fs/FsDispatch.d.ts +0 -7
- package/lib/types/fs/helpers.d.ts +0 -17
- package/lib/types/fs/index.d.ts +0 -4
- package/lib/types/fs/indexStore.d.ts +0 -28
- package/lib/types/fs/locks/FilesystemLock.d.ts +0 -13
- package/lib/types/fs/locks/FilesystemMultiLock.d.ts +0 -8
- package/lib/types/fs/types.d.ts +0 -40
- package/lib/types/identity/decorators.d.ts +0 -72
- package/lib/types/identity/index.d.ts +0 -6
- package/lib/types/index.d.ts +0 -34
- package/lib/types/interfaces/ContextuallyLogged.d.ts +0 -8
- package/lib/types/interfaces/ErrorParser.d.ts +0 -16
- package/lib/types/interfaces/Executor.d.ts +0 -16
- package/lib/types/interfaces/Observable.d.ts +0 -33
- package/lib/types/interfaces/Observer.d.ts +0 -15
- package/lib/types/interfaces/Paginatable.d.ts +0 -20
- package/lib/types/interfaces/Queriable.d.ts +0 -47
- package/lib/types/interfaces/RawExecutor.d.ts +0 -28
- package/lib/types/interfaces/SequenceOptions.d.ts +0 -79
- package/lib/types/interfaces/index.d.ts +0 -12
- package/lib/types/migrations/Migration.d.ts +0 -19
- package/lib/types/migrations/MigrationService.d.ts +0 -63
- package/lib/types/migrations/MigrationTaskBuilder.d.ts +0 -10
- package/lib/types/migrations/MigrationTasks.d.ts +0 -9
- package/lib/types/migrations/MigrationVersioning.d.ts +0 -7
- package/lib/types/migrations/SemverMigrationVersioning.d.ts +0 -10
- package/lib/types/migrations/StandardMigrationVersioning.d.ts +0 -12
- package/lib/types/migrations/constants.d.ts +0 -2
- package/lib/types/migrations/decorators.d.ts +0 -12
- package/lib/types/migrations/index.d.ts +0 -15
- package/lib/types/migrations/types.d.ts +0 -46
- package/lib/types/model/BaseModel.d.ts +0 -37
- package/lib/types/model/SequenceModel.d.ts +0 -32
- package/lib/types/model/construction.d.ts +0 -455
- package/lib/types/model/decorators.d.ts +0 -237
- package/lib/types/model/index.d.ts +0 -11
- package/lib/types/model/indexing.d.ts +0 -20
- package/lib/types/model/types.d.ts +0 -60
- package/lib/types/overrides/Metadata.d.ts +0 -22
- package/lib/types/overrides/Model.d.ts +0 -94
- package/lib/types/overrides/ModelBuilder.d.ts +0 -31
- package/lib/types/overrides/index.d.ts +0 -11
- package/lib/types/overrides/injectables.d.ts +0 -10
- package/lib/types/overrides/overrides.d.ts +0 -1
- package/lib/types/persistence/Adapter.d.ts +0 -469
- package/lib/types/persistence/Context.d.ts +0 -16
- package/lib/types/persistence/ContextLock.d.ts +0 -18
- package/lib/types/persistence/Dispatch.d.ts +0 -128
- package/lib/types/persistence/ObserverHandler.d.ts +0 -111
- package/lib/types/persistence/Sequence.d.ts +0 -126
- package/lib/types/persistence/constants.d.ts +0 -74
- package/lib/types/persistence/decorators.d.ts +0 -28
- package/lib/types/persistence/errors.d.ts +0 -33
- package/lib/types/persistence/event-filters.d.ts +0 -20
- package/lib/types/persistence/generators.d.ts +0 -14
- package/lib/types/persistence/index.d.ts +0 -18
- package/lib/types/persistence/transactions.d.ts +0 -4
- package/lib/types/persistence/types.d.ts +0 -86
- package/lib/types/query/Condition.d.ts +0 -131
- package/lib/types/query/MethodQueryBuilder.d.ts +0 -185
- package/lib/types/query/Paginator.d.ts +0 -105
- package/lib/types/query/Statement.d.ts +0 -136
- package/lib/types/query/constants.d.ts +0 -69
- package/lib/types/query/decorators.d.ts +0 -8
- package/lib/types/query/errors.d.ts +0 -21
- package/lib/types/query/index.d.ts +0 -16
- package/lib/types/query/options.d.ts +0 -393
- package/lib/types/query/selectors.d.ts +0 -39
- package/lib/types/query/types.d.ts +0 -158
- package/lib/types/query/utils.d.ts +0 -40
- package/lib/types/ram/RamAdapter.d.ts +0 -341
- package/lib/types/ram/RamPaginator.d.ts +0 -54
- package/lib/types/ram/RamStatement.d.ts +0 -92
- package/lib/types/ram/constants.d.ts +0 -8
- package/lib/types/ram/handlers.d.ts +0 -24
- package/lib/types/ram/index.d.ts +0 -12
- package/lib/types/ram/types.d.ts +0 -50
- package/lib/types/repository/Repository.d.ts +0 -501
- package/lib/types/repository/constants.d.ts +0 -36
- package/lib/types/repository/decorators.d.ts +0 -30
- package/lib/types/repository/errors.d.ts +0 -19
- package/lib/types/repository/index.d.ts +0 -12
- package/lib/types/repository/injectables.d.ts +0 -95
- package/lib/types/repository/types.d.ts +0 -28
- package/lib/types/repository/utils.d.ts +0 -36
- package/lib/types/services/ModelService.d.ts +0 -45
- package/lib/types/services/PersistenceService.d.ts +0 -17
- package/lib/types/services/index.d.ts +0 -8
- package/lib/types/services/services.d.ts +0 -96
- package/lib/types/tasks/CleanUpTask.d.ts +0 -15
- package/lib/types/tasks/TaskContext.d.ts +0 -30
- package/lib/types/tasks/TaskEngine.d.ts +0 -97
- package/lib/types/tasks/TaskErrors.d.ts +0 -65
- package/lib/types/tasks/TaskEventBus.d.ts +0 -17
- package/lib/types/tasks/TaskEventService.d.ts +0 -7
- package/lib/types/tasks/TaskHandler.d.ts +0 -12
- package/lib/types/tasks/TaskHandlerRegistry.d.ts +0 -8
- package/lib/types/tasks/TaskService.d.ts +0 -65
- package/lib/types/tasks/TaskStateChangeError.d.ts +0 -11
- package/lib/types/tasks/TaskTracker.d.ts +0 -47
- package/lib/types/tasks/builder.d.ts +0 -72
- package/lib/types/tasks/constants.d.ts +0 -31
- package/lib/types/tasks/decorators.d.ts +0 -4
- package/lib/types/tasks/index.d.ts +0 -23
- package/lib/types/tasks/logging.d.ts +0 -31
- package/lib/types/tasks/models/TaskBackoffModel.d.ts +0 -9
- package/lib/types/tasks/models/TaskErrorModel.d.ts +0 -8
- package/lib/types/tasks/models/TaskEventModel.d.ts +0 -11
- package/lib/types/tasks/models/TaskIOSerializer.d.ts +0 -33
- package/lib/types/tasks/models/TaskLogEntryModel.d.ts +0 -10
- package/lib/types/tasks/models/TaskModel.d.ts +0 -43
- package/lib/types/tasks/models/TaskStepResultModel.d.ts +0 -9
- package/lib/types/tasks/models/TaskStepSpecModel.d.ts +0 -9
- package/lib/types/tasks/models/index.d.ts +0 -8
- package/lib/types/tasks/types.d.ts +0 -71
- package/lib/types/tasks/utils.d.ts +0 -5
- package/lib/types/utils/ContextualLoggedClass.d.ts +0 -37
- package/lib/types/utils/decorators.d.ts +0 -27
- package/lib/types/utils/errors.d.ts +0 -56
- package/lib/types/utils/index.d.ts +0 -11
- package/lib/types/utils/throttling.d.ts +0 -9
- package/lib/types/utils/types.d.ts +0 -23
- package/lib/types/utils/utils.d.ts +0 -22
- package/lib/types/workers/TaskEngine.d.ts +0 -40
- package/lib/types/workers/WorkThreadEnvironment.d.ts +0 -35
- package/lib/types/workers/index.d.ts +0 -5
- package/lib/types/workers/messages.d.ts +0 -69
- package/lib/types/workers/types.d.ts +0 -41
- package/lib/types/workers/workerThread.d.ts +0 -1
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description Exports for the utils module.
|
|
3
|
-
* @summary This file exports all the necessary components for the utils functionality, including the ContextualLoggedClass, decorators, errors, and more.
|
|
4
|
-
* @module core/utils
|
|
5
|
-
*/
|
|
6
|
-
export * from "./ContextualLoggedClass";
|
|
7
|
-
export * from "./decorators";
|
|
8
|
-
export * from "./errors";
|
|
9
|
-
export * from "./utils";
|
|
10
|
-
export * from "./throttling";
|
|
11
|
-
export * from "./types";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export type BseThrottlingConfig = {
|
|
2
|
-
delayMs?: number;
|
|
3
|
-
};
|
|
4
|
-
export type ThrottlingConfig = ({
|
|
5
|
-
count: number;
|
|
6
|
-
} | {
|
|
7
|
-
bufferSize: number;
|
|
8
|
-
}) & BseThrottlingConfig;
|
|
9
|
-
export declare function throttle(cfg?: ThrottlingConfig | ((...args: any[]) => ThrottlingConfig), argIndex?: number | number[]): (target: object, propertyKey?: any, descriptor?: any) => void;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export type HttpVerbs = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
2
|
-
export type DecafApiProperty = {
|
|
3
|
-
name: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
required?: boolean;
|
|
6
|
-
type?: any;
|
|
7
|
-
};
|
|
8
|
-
export type DecafModelRoute = {
|
|
9
|
-
path: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
apiProperties: DecafApiProperty[];
|
|
12
|
-
getPK: (...args: Array<string | number>) => string;
|
|
13
|
-
};
|
|
14
|
-
export type DecafParamProps = {
|
|
15
|
-
raw: Record<string, string | number>;
|
|
16
|
-
keysInOrder: Array<string>;
|
|
17
|
-
valuesInOrder: Array<string | number>;
|
|
18
|
-
};
|
|
19
|
-
export interface DecafRouteDecOptions {
|
|
20
|
-
path: string;
|
|
21
|
-
httpMethod: HttpVerbs;
|
|
22
|
-
handler: PropertyDescriptor;
|
|
23
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { BlockOperationKind, CrudOperations } from "@decaf-ts/db-decorators";
|
|
2
|
-
import type { ModelConstructor } from "@decaf-ts/decorator-validation";
|
|
3
|
-
import { Constructor } from "@decaf-ts/decoration";
|
|
4
|
-
export declare function injectableServiceKey(name: string | symbol | Constructor): string;
|
|
5
|
-
export declare function promiseSequence<T>(tasks: (() => Promise<T>)[], continueOnError?: false): Promise<T[]>;
|
|
6
|
-
export declare function promiseSequence<T>(tasks: (() => Promise<T>)[], continueOnError: true): Promise<PromiseSettledResult<T>[]>;
|
|
7
|
-
export declare function isOperationBlocked(ModelConstructor: ModelConstructor<any>, op: CrudOperations): boolean;
|
|
8
|
-
export declare function isOperationBlocked(ModelConstructor: ModelConstructor<any>, kind: BlockOperationKind, value: string): boolean;
|
|
9
|
-
/**
|
|
10
|
-
* @description Normalizes imports to handle both CommonJS and ESModule formats.
|
|
11
|
-
* @summary Utility function to handle module import differences between formats.
|
|
12
|
-
*
|
|
13
|
-
* @template T - Type of the imported module.
|
|
14
|
-
* @param {Promise<T>} importPromise - Promise returned by dynamic import.
|
|
15
|
-
* @return {Promise<T>} Normalized module.
|
|
16
|
-
*
|
|
17
|
-
* @function normalizeImport
|
|
18
|
-
*
|
|
19
|
-
* @memberOf module:core
|
|
20
|
-
*/
|
|
21
|
-
export declare function normalizeImport<T>(importPromise: Promise<T>): Promise<T>;
|
|
22
|
-
export declare function prefixMethod(obj: any, after: (...args: any[]) => any, prefix: (...args: any[]) => any, afterName?: string): void;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Adapter } from "../persistence/Adapter";
|
|
2
|
-
import { ContextOf } from "../persistence/types";
|
|
3
|
-
import { MaybeContextualArg } from "../utils/ContextualLoggedClass";
|
|
4
|
-
import { Constructor } from "@decaf-ts/decoration";
|
|
5
|
-
import { TaskModel } from "../tasks/models/TaskModel";
|
|
6
|
-
import { TaskContext, TaskEngine as TE } from "../tasks";
|
|
7
|
-
import { TaskEngineConfig, TaskWorkerThread, WorkerJobState, WorkThreadPoolConfig } from "./types";
|
|
8
|
-
export declare class TaskEngine<A extends Adapter<any, any, any, any>> extends TE<A, TaskEngineConfig<A>> {
|
|
9
|
-
protected workerPoolConfig?: WorkThreadPoolConfig;
|
|
10
|
-
protected workerThreads: TaskWorkerThread[];
|
|
11
|
-
protected workerJobQueue: WorkerJobState[];
|
|
12
|
-
protected workerJobs: Map<string, WorkerJobState>;
|
|
13
|
-
protected workerCounter: number;
|
|
14
|
-
protected workerThreadCapacity: number;
|
|
15
|
-
protected get Context(): Constructor<ContextOf<A>>;
|
|
16
|
-
constructor(config: TaskEngineConfig<A>);
|
|
17
|
-
private normalizeWorkerPoolConfig;
|
|
18
|
-
private hasWorkerPool;
|
|
19
|
-
private getWorkerCount;
|
|
20
|
-
private getWorkerExecutionSlots;
|
|
21
|
-
private canDispatchToWorkers;
|
|
22
|
-
private getExecutionConcurrency;
|
|
23
|
-
private computeWorkerModules;
|
|
24
|
-
start(...args: MaybeContextualArg<any>): Promise<void>;
|
|
25
|
-
stop(...args: MaybeContextualArg<any>): Promise<void>;
|
|
26
|
-
protected spawnWorkers(): Promise<void>;
|
|
27
|
-
protected createWorker(): Promise<void> | undefined;
|
|
28
|
-
private shutdownWorkers;
|
|
29
|
-
private handleWorkerError;
|
|
30
|
-
private handleWorkerExit;
|
|
31
|
-
private handleWorkerMessage;
|
|
32
|
-
private applyWorkerCache;
|
|
33
|
-
private processWorkerQueue;
|
|
34
|
-
private assignWorker;
|
|
35
|
-
private enqueueWorkerJob;
|
|
36
|
-
protected runHandlerInline(classification: string, input: any, ctx: TaskContext): Promise<any>;
|
|
37
|
-
private dispatchToWorker;
|
|
38
|
-
private invokeHandler;
|
|
39
|
-
protected executeClaimed(task: TaskModel): Promise<void>;
|
|
40
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { TaskEngineAutoShutdownConfig } from "../tasks/types";
|
|
2
|
-
type WorkerMode = "node" | "browser";
|
|
3
|
-
export interface WorkThreadPersistenceConfig {
|
|
4
|
-
adapterModule: string;
|
|
5
|
-
adapterClass?: string;
|
|
6
|
-
adapterArgs?: any[];
|
|
7
|
-
flavour?: string;
|
|
8
|
-
alias?: string;
|
|
9
|
-
modules?: WorkThreadModulesConfig;
|
|
10
|
-
}
|
|
11
|
-
export interface WorkThreadTaskEngineConfig {
|
|
12
|
-
concurrency: number;
|
|
13
|
-
leaseMs: number;
|
|
14
|
-
pollMsIdle: number;
|
|
15
|
-
pollMsBusy: number;
|
|
16
|
-
logTailMax: number;
|
|
17
|
-
streamBufferSize: number;
|
|
18
|
-
maxLoggingBuffer: number;
|
|
19
|
-
loggingBufferTruncation: number;
|
|
20
|
-
gracefulShutdownMsTimeout: number;
|
|
21
|
-
autoShutdown?: TaskEngineAutoShutdownConfig;
|
|
22
|
-
}
|
|
23
|
-
export interface WorkThreadModulesConfig {
|
|
24
|
-
imports: string[];
|
|
25
|
-
}
|
|
26
|
-
export interface WorkThreadEnvironmentShape {
|
|
27
|
-
workerId: string;
|
|
28
|
-
mode: WorkerMode;
|
|
29
|
-
persistence: WorkThreadPersistenceConfig;
|
|
30
|
-
taskEngine: WorkThreadTaskEngineConfig;
|
|
31
|
-
modules: WorkThreadModulesConfig;
|
|
32
|
-
}
|
|
33
|
-
export declare const DefaultWorkThreadEnvironment: WorkThreadEnvironmentShape;
|
|
34
|
-
export declare const WorkThreadEnvironment: any;
|
|
35
|
-
export {};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { LogLevel } from "@decaf-ts/logging";
|
|
2
|
-
import { TaskStateChangeRequest } from "../tasks/TaskStateChangeError";
|
|
3
|
-
export type WorkerLogEntry = [LogLevel, string] | [LogLevel, string, any];
|
|
4
|
-
export interface WorkerJobPayload {
|
|
5
|
-
jobId: string;
|
|
6
|
-
taskId: string;
|
|
7
|
-
classification: string;
|
|
8
|
-
input: any;
|
|
9
|
-
attempt: number;
|
|
10
|
-
resultCache?: Record<string, any>;
|
|
11
|
-
streamBufferSize: number;
|
|
12
|
-
maxLoggingBuffer: number;
|
|
13
|
-
loggingBufferTruncation: number;
|
|
14
|
-
}
|
|
15
|
-
export type WorkerToMainMessage = {
|
|
16
|
-
type: "ready";
|
|
17
|
-
workerId: string;
|
|
18
|
-
} | {
|
|
19
|
-
type: "log";
|
|
20
|
-
workerId: string;
|
|
21
|
-
jobId: string;
|
|
22
|
-
entries: WorkerLogEntry[];
|
|
23
|
-
} | {
|
|
24
|
-
type: "progress";
|
|
25
|
-
workerId: string;
|
|
26
|
-
jobId: string;
|
|
27
|
-
payload: any;
|
|
28
|
-
} | {
|
|
29
|
-
type: "heartbeat";
|
|
30
|
-
workerId: string;
|
|
31
|
-
jobId: string;
|
|
32
|
-
} | {
|
|
33
|
-
type: "result";
|
|
34
|
-
workerId: string;
|
|
35
|
-
jobId: string;
|
|
36
|
-
status: "success";
|
|
37
|
-
output: any;
|
|
38
|
-
cache?: Record<string, any>;
|
|
39
|
-
} | {
|
|
40
|
-
type: "result";
|
|
41
|
-
workerId: string;
|
|
42
|
-
jobId: string;
|
|
43
|
-
status: "error";
|
|
44
|
-
error: {
|
|
45
|
-
name?: string;
|
|
46
|
-
message: string;
|
|
47
|
-
stack?: string;
|
|
48
|
-
};
|
|
49
|
-
cache?: Record<string, any>;
|
|
50
|
-
} | {
|
|
51
|
-
type: "result";
|
|
52
|
-
workerId: string;
|
|
53
|
-
jobId: string;
|
|
54
|
-
status: "state-change";
|
|
55
|
-
request: TaskStateChangeRequest;
|
|
56
|
-
cache?: Record<string, any>;
|
|
57
|
-
} | {
|
|
58
|
-
type: "error";
|
|
59
|
-
workerId: string;
|
|
60
|
-
error: string;
|
|
61
|
-
stack?: string;
|
|
62
|
-
};
|
|
63
|
-
export type MainToWorkerMessage = {
|
|
64
|
-
type: "control";
|
|
65
|
-
command: "stop" | "shutdown";
|
|
66
|
-
} | {
|
|
67
|
-
type: "execute";
|
|
68
|
-
job: WorkerJobPayload;
|
|
69
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Worker } from "worker_threads";
|
|
2
|
-
import { TaskContext, TaskModel, TaskEngineConfig as TEC, TaskServiceConfig as TSC } from "../tasks/index";
|
|
3
|
-
export type TaskWorkerThread = {
|
|
4
|
-
id: string;
|
|
5
|
-
worker: Worker;
|
|
6
|
-
ready: boolean;
|
|
7
|
-
activeJobs: number;
|
|
8
|
-
capacity: number;
|
|
9
|
-
readyPromise?: Promise<void>;
|
|
10
|
-
resolveReady?: () => void;
|
|
11
|
-
rejectReady?: (error: Error) => void;
|
|
12
|
-
};
|
|
13
|
-
export type WorkerJobState = {
|
|
14
|
-
id: string;
|
|
15
|
-
classification: string;
|
|
16
|
-
input: any;
|
|
17
|
-
task: TaskModel;
|
|
18
|
-
ctx: TaskContext;
|
|
19
|
-
resolve: (value: any) => void;
|
|
20
|
-
reject: (error: any) => void;
|
|
21
|
-
worker?: TaskWorkerThread;
|
|
22
|
-
};
|
|
23
|
-
import { WorkThreadModulesConfig, WorkThreadPersistenceConfig } from "./WorkThreadEnvironment";
|
|
24
|
-
import { Adapter } from "../persistence/index";
|
|
25
|
-
export type WorkerAdapterDescriptor = WorkThreadPersistenceConfig;
|
|
26
|
-
export type WorkThreadPoolConfig = {
|
|
27
|
-
size?: number;
|
|
28
|
-
mode?: "node" | "browser";
|
|
29
|
-
entry: string;
|
|
30
|
-
modules?: WorkThreadModulesConfig;
|
|
31
|
-
};
|
|
32
|
-
export type TaskEngineConfig<A extends Adapter<any, any, any, any>> = TEC<A> & {
|
|
33
|
-
workerAdapter?: WorkerAdapterDescriptor;
|
|
34
|
-
workerPool?: WorkThreadPoolConfig;
|
|
35
|
-
workerConcurrency?: number;
|
|
36
|
-
};
|
|
37
|
-
export type TaskServiceConfig<A extends Adapter<any, any, any, any>> = TSC<A> & {
|
|
38
|
-
workerAdapter?: WorkerAdapterDescriptor;
|
|
39
|
-
workerPool?: WorkThreadPoolConfig;
|
|
40
|
-
workerConcurrency?: number;
|
|
41
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "../overrides";
|