@decaf-ts/core 0.17.0 → 0.19.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/auth/constants.cjs +2 -2
- package/lib/cjs/auth/constants.cjs.map +1 -0
- package/lib/cjs/auth/decorators.cjs +1 -0
- package/lib/cjs/auth/decorators.cjs.map +1 -0
- package/lib/cjs/auth/index.cjs +1 -0
- package/lib/cjs/auth/index.cjs.map +1 -0
- package/lib/cjs/fs/FilesystemAdapter.cjs +40 -39
- package/lib/cjs/fs/FilesystemAdapter.cjs.map +1 -0
- package/lib/cjs/fs/FsDispatch.cjs +3 -2
- package/lib/cjs/fs/FsDispatch.cjs.map +1 -0
- package/lib/cjs/fs/helpers.cjs +1 -0
- package/lib/cjs/fs/helpers.cjs.map +1 -0
- package/lib/cjs/fs/index.cjs +1 -0
- package/lib/cjs/fs/index.cjs.map +1 -0
- package/lib/cjs/fs/indexStore.cjs +8 -7
- package/lib/cjs/fs/indexStore.cjs.map +1 -0
- package/lib/cjs/fs/locks/FilesystemLock.cjs +3 -2
- package/lib/cjs/fs/locks/FilesystemLock.cjs.map +1 -0
- package/lib/cjs/fs/locks/FilesystemMultiLock.cjs +5 -4
- package/lib/cjs/fs/locks/FilesystemMultiLock.cjs.map +1 -0
- package/lib/cjs/fs/types.cjs +1 -0
- package/lib/cjs/fs/types.cjs.map +1 -0
- package/lib/cjs/identity/decorators.cjs +11 -10
- package/lib/cjs/identity/decorators.cjs.map +1 -0
- package/lib/cjs/identity/index.cjs +1 -0
- package/lib/cjs/identity/index.cjs.map +1 -0
- package/lib/cjs/index.cjs +4 -3
- package/lib/cjs/index.cjs.map +1 -0
- package/lib/cjs/interfaces/ContextuallyLogged.cjs +1 -0
- package/lib/cjs/interfaces/ContextuallyLogged.cjs.map +1 -0
- package/lib/cjs/interfaces/ErrorParser.cjs +1 -0
- package/lib/cjs/interfaces/ErrorParser.cjs.map +1 -0
- package/lib/cjs/interfaces/Executor.cjs +1 -0
- package/lib/cjs/interfaces/Executor.cjs.map +1 -0
- package/lib/cjs/interfaces/Observable.cjs +1 -0
- package/lib/cjs/interfaces/Observable.cjs.map +1 -0
- package/lib/cjs/interfaces/Observer.cjs +1 -0
- package/lib/cjs/interfaces/Observer.cjs.map +1 -0
- package/lib/cjs/interfaces/Paginatable.cjs +1 -0
- package/lib/cjs/interfaces/Paginatable.cjs.map +1 -0
- package/lib/cjs/interfaces/Queriable.cjs +1 -0
- package/lib/cjs/interfaces/Queriable.cjs.map +1 -0
- package/lib/cjs/interfaces/RawExecutor.cjs +1 -0
- package/lib/cjs/interfaces/RawExecutor.cjs.map +1 -0
- package/lib/cjs/interfaces/SequenceOptions.cjs +1 -0
- package/lib/cjs/interfaces/SequenceOptions.cjs.map +1 -0
- package/lib/cjs/interfaces/index.cjs +1 -0
- package/lib/cjs/interfaces/index.cjs.map +1 -0
- package/lib/cjs/migrations/Migration.cjs +16 -15
- package/lib/cjs/migrations/Migration.cjs.map +1 -0
- package/lib/cjs/migrations/MigrationService.cjs +38 -37
- package/lib/cjs/migrations/MigrationService.cjs.map +1 -0
- package/lib/cjs/migrations/MigrationTaskBuilder.cjs +3 -2
- package/lib/cjs/migrations/MigrationTaskBuilder.cjs.map +1 -0
- package/lib/cjs/migrations/MigrationTasks.cjs +22 -17
- package/lib/cjs/migrations/MigrationTasks.cjs.map +1 -0
- package/lib/cjs/migrations/MigrationVersioning.cjs +1 -0
- package/lib/cjs/migrations/MigrationVersioning.cjs.map +1 -0
- package/lib/cjs/migrations/SemverMigrationVersioning.cjs +1 -0
- package/lib/cjs/migrations/SemverMigrationVersioning.cjs.map +1 -0
- package/lib/cjs/migrations/StandardMigrationVersioning.cjs +1 -0
- package/lib/cjs/migrations/StandardMigrationVersioning.cjs.map +1 -0
- package/lib/cjs/migrations/constants.cjs +3 -2
- package/lib/cjs/migrations/constants.cjs.map +1 -0
- package/lib/cjs/migrations/decorators.cjs +10 -9
- package/lib/cjs/migrations/decorators.cjs.map +1 -0
- package/lib/cjs/migrations/index.cjs +6 -5
- package/lib/cjs/migrations/index.cjs.map +1 -0
- package/lib/cjs/migrations/types.cjs +1 -0
- package/lib/cjs/migrations/types.cjs.map +1 -0
- package/lib/cjs/model/BaseModel.cjs +14 -8
- package/lib/cjs/model/BaseModel.cjs.map +1 -0
- package/lib/cjs/model/SequenceModel.cjs +19 -13
- package/lib/cjs/model/SequenceModel.cjs.map +1 -0
- package/lib/cjs/model/construction.cjs +27 -26
- package/lib/cjs/model/construction.cjs.map +1 -0
- package/lib/cjs/model/decorators.cjs +48 -47
- package/lib/cjs/model/decorators.cjs.map +1 -0
- package/lib/cjs/model/index.cjs +1 -0
- package/lib/cjs/model/index.cjs.map +1 -0
- package/lib/cjs/model/indexing.cjs +6 -5
- package/lib/cjs/model/indexing.cjs.map +1 -0
- package/lib/cjs/model/types.cjs +1 -0
- package/lib/cjs/model/types.cjs.map +1 -0
- package/lib/cjs/overrides/Metadata.cjs +1 -0
- package/lib/cjs/overrides/Metadata.cjs.map +1 -0
- package/lib/cjs/overrides/Model.cjs +1 -0
- package/lib/cjs/overrides/Model.cjs.map +1 -0
- package/lib/cjs/overrides/ModelBuilder.cjs +1 -0
- package/lib/cjs/overrides/ModelBuilder.cjs.map +1 -0
- package/lib/cjs/overrides/index.cjs +1 -0
- package/lib/cjs/overrides/index.cjs.map +1 -0
- package/lib/cjs/overrides/injectables.cjs +1 -0
- package/lib/cjs/overrides/injectables.cjs.map +1 -0
- package/lib/cjs/overrides/overrides.cjs +22 -21
- package/lib/cjs/overrides/overrides.cjs.map +1 -0
- package/lib/cjs/persistence/Adapter.cjs +47 -41
- package/lib/cjs/persistence/Adapter.cjs.map +1 -0
- package/lib/cjs/persistence/Context.cjs +10 -7
- package/lib/cjs/persistence/Context.cjs.map +1 -0
- package/lib/cjs/persistence/ContextLock.cjs +1 -0
- package/lib/cjs/persistence/ContextLock.cjs.map +1 -0
- package/lib/cjs/persistence/Dispatch.cjs +15 -14
- package/lib/cjs/persistence/Dispatch.cjs.map +1 -0
- package/lib/cjs/persistence/ObserverHandler.cjs +3 -2
- package/lib/cjs/persistence/ObserverHandler.cjs.map +1 -0
- package/lib/cjs/persistence/Sequence.cjs +19 -18
- package/lib/cjs/persistence/Sequence.cjs.map +1 -0
- package/lib/cjs/persistence/constants.cjs +14 -21
- package/lib/cjs/persistence/constants.cjs.map +1 -0
- package/lib/cjs/persistence/decorators.cjs +6 -5
- package/lib/cjs/persistence/decorators.cjs.map +1 -0
- package/lib/cjs/persistence/errors.cjs +1 -0
- package/lib/cjs/persistence/errors.cjs.map +1 -0
- package/lib/cjs/persistence/event-filters.cjs +5 -4
- package/lib/cjs/persistence/event-filters.cjs.map +1 -0
- package/lib/cjs/persistence/generators.cjs +1 -0
- package/lib/cjs/persistence/generators.cjs.map +1 -0
- package/lib/cjs/persistence/index.cjs +1 -0
- package/lib/cjs/persistence/index.cjs.map +1 -0
- package/lib/cjs/persistence/transactions.cjs +9 -8
- package/lib/cjs/persistence/transactions.cjs.map +1 -0
- package/lib/cjs/persistence/types.cjs +1 -0
- package/lib/cjs/persistence/types.cjs.map +1 -0
- package/lib/cjs/query/Condition.cjs +173 -165
- package/lib/cjs/query/Condition.cjs.map +1 -0
- package/lib/cjs/query/MethodQueryBuilder.cjs +37 -34
- package/lib/cjs/query/MethodQueryBuilder.cjs.map +1 -0
- package/lib/cjs/query/Paginator.cjs +28 -27
- package/lib/cjs/query/Paginator.cjs.map +1 -0
- package/lib/cjs/query/Statement.cjs +90 -84
- package/lib/cjs/query/Statement.cjs.map +1 -0
- package/lib/cjs/query/constants.cjs +5 -21
- package/lib/cjs/query/constants.cjs.map +1 -0
- package/lib/cjs/query/decorators.cjs +16 -15
- package/lib/cjs/query/decorators.cjs.map +1 -0
- package/lib/cjs/query/errors.cjs +1 -0
- package/lib/cjs/query/errors.cjs.map +1 -0
- package/lib/cjs/query/index.cjs +1 -0
- package/lib/cjs/query/index.cjs.map +1 -0
- package/lib/cjs/query/options.cjs +1 -0
- package/lib/cjs/query/options.cjs.map +1 -0
- package/lib/cjs/query/selectors.cjs +1 -0
- package/lib/cjs/query/selectors.cjs.map +1 -0
- package/lib/cjs/query/types.cjs +2 -13
- package/lib/cjs/query/types.cjs.map +1 -0
- package/lib/cjs/query/utils.cjs +10 -9
- package/lib/cjs/query/utils.cjs.map +1 -0
- package/lib/cjs/ram/RamAdapter.cjs +21 -20
- package/lib/cjs/ram/RamAdapter.cjs.map +1 -0
- package/lib/cjs/ram/RamPaginator.cjs +3 -2
- package/lib/cjs/ram/RamPaginator.cjs.map +1 -0
- package/lib/cjs/ram/RamStatement.cjs +38 -37
- package/lib/cjs/ram/RamStatement.cjs.map +1 -0
- package/lib/cjs/ram/constants.cjs +1 -0
- package/lib/cjs/ram/constants.cjs.map +1 -0
- package/lib/cjs/ram/handlers.cjs +3 -2
- package/lib/cjs/ram/handlers.cjs.map +1 -0
- package/lib/cjs/ram/index.cjs +8 -7
- package/lib/cjs/ram/index.cjs.map +1 -0
- package/lib/cjs/ram/types.cjs +1 -0
- package/lib/cjs/ram/types.cjs.map +1 -0
- package/lib/cjs/repository/Repository.cjs +85 -79
- package/lib/cjs/repository/Repository.cjs.map +1 -0
- package/lib/cjs/repository/constants.cjs +5 -20
- package/lib/cjs/repository/constants.cjs.map +1 -0
- package/lib/cjs/repository/decorators.cjs +7 -6
- package/lib/cjs/repository/decorators.cjs.map +1 -0
- package/lib/cjs/repository/errors.cjs +1 -0
- package/lib/cjs/repository/errors.cjs.map +1 -0
- package/lib/cjs/repository/index.cjs +1 -0
- package/lib/cjs/repository/index.cjs.map +1 -0
- package/lib/cjs/repository/injectables.cjs +14 -13
- package/lib/cjs/repository/injectables.cjs.map +1 -0
- package/lib/cjs/repository/types.cjs +1 -0
- package/lib/cjs/repository/types.cjs.map +1 -0
- package/lib/cjs/repository/utils.cjs +3 -2
- package/lib/cjs/repository/utils.cjs.map +1 -0
- package/lib/cjs/services/ModelService.cjs +36 -30
- package/lib/cjs/services/ModelService.cjs.map +1 -0
- package/lib/cjs/services/PersistenceService.cjs +9 -8
- package/lib/cjs/services/PersistenceService.cjs.map +1 -0
- package/lib/cjs/services/index.cjs +1 -0
- package/lib/cjs/services/index.cjs.map +1 -0
- package/lib/cjs/services/services.cjs +37 -31
- package/lib/cjs/services/services.cjs.map +1 -0
- package/lib/cjs/tasks/CleanUpTask.cjs +30 -24
- package/lib/cjs/tasks/CleanUpTask.cjs.map +1 -0
- package/lib/cjs/tasks/TaskContext.cjs +16 -15
- package/lib/cjs/tasks/TaskContext.cjs.map +1 -0
- package/lib/cjs/tasks/TaskEngine.cjs +112 -111
- package/lib/cjs/tasks/TaskEngine.cjs.map +1 -0
- package/lib/cjs/tasks/TaskErrors.cjs +1 -0
- package/lib/cjs/tasks/TaskErrors.cjs.map +1 -0
- package/lib/cjs/tasks/TaskEventBus.cjs +7 -6
- package/lib/cjs/tasks/TaskEventBus.cjs.map +1 -0
- package/lib/cjs/tasks/TaskEventService.cjs +8 -7
- package/lib/cjs/tasks/TaskEventService.cjs.map +1 -0
- package/lib/cjs/tasks/TaskHandler.cjs +5 -4
- package/lib/cjs/tasks/TaskHandler.cjs.map +1 -0
- package/lib/cjs/tasks/TaskHandlerRegistry.cjs +1 -0
- package/lib/cjs/tasks/TaskHandlerRegistry.cjs.map +1 -0
- package/lib/cjs/tasks/TaskService.cjs +43 -37
- package/lib/cjs/tasks/TaskService.cjs.map +1 -0
- package/lib/cjs/tasks/TaskStateChangeError.cjs +1 -0
- package/lib/cjs/tasks/TaskStateChangeError.cjs.map +1 -0
- package/lib/cjs/tasks/TaskTracker.cjs +62 -61
- package/lib/cjs/tasks/TaskTracker.cjs.map +1 -0
- package/lib/cjs/tasks/builder.cjs +30 -24
- package/lib/cjs/tasks/builder.cjs.map +1 -0
- package/lib/cjs/tasks/constants.cjs +6 -10
- package/lib/cjs/tasks/constants.cjs.map +1 -0
- package/lib/cjs/tasks/decorators.cjs +5 -4
- package/lib/cjs/tasks/decorators.cjs.map +1 -0
- package/lib/cjs/tasks/index.cjs +6 -5
- package/lib/cjs/tasks/index.cjs.map +1 -0
- package/lib/cjs/tasks/logging.cjs +12 -11
- package/lib/cjs/tasks/logging.cjs.map +1 -0
- package/lib/cjs/tasks/models/TaskBackoffModel.cjs +16 -10
- package/lib/cjs/tasks/models/TaskBackoffModel.cjs.map +1 -0
- package/lib/cjs/tasks/models/TaskErrorModel.cjs +11 -5
- package/lib/cjs/tasks/models/TaskErrorModel.cjs.map +1 -0
- package/lib/cjs/tasks/models/TaskEventModel.cjs +29 -23
- package/lib/cjs/tasks/models/TaskEventModel.cjs.map +1 -0
- package/lib/cjs/tasks/models/TaskIOSerializer.cjs +4 -3
- package/lib/cjs/tasks/models/TaskIOSerializer.cjs.map +1 -0
- package/lib/cjs/tasks/models/TaskLogEntryModel.cjs +11 -5
- package/lib/cjs/tasks/models/TaskLogEntryModel.cjs.map +1 -0
- package/lib/cjs/tasks/models/TaskModel.cjs +72 -66
- package/lib/cjs/tasks/models/TaskModel.cjs.map +1 -0
- package/lib/cjs/tasks/models/TaskStepResultModel.cjs +14 -8
- package/lib/cjs/tasks/models/TaskStepResultModel.cjs.map +1 -0
- package/lib/cjs/tasks/models/TaskStepSpecModel.cjs +11 -5
- package/lib/cjs/tasks/models/TaskStepSpecModel.cjs.map +1 -0
- package/lib/cjs/tasks/models/index.cjs +1 -0
- package/lib/cjs/tasks/models/index.cjs.map +1 -0
- package/lib/cjs/tasks/types.cjs +1 -0
- package/lib/cjs/tasks/types.cjs.map +1 -0
- package/lib/cjs/tasks/utils.cjs +6 -5
- package/lib/cjs/tasks/utils.cjs.map +1 -0
- package/lib/cjs/utils/ContextualLoggedClass.cjs +5 -4
- package/lib/cjs/utils/ContextualLoggedClass.cjs.map +1 -0
- package/lib/cjs/utils/decorators.cjs +9 -8
- package/lib/cjs/utils/decorators.cjs.map +1 -0
- package/lib/cjs/utils/errors.cjs +1 -0
- package/lib/cjs/utils/errors.cjs.map +1 -0
- package/lib/cjs/utils/index.cjs +1 -0
- package/lib/cjs/utils/index.cjs.map +1 -0
- package/lib/cjs/utils/throttling.cjs +4 -3
- package/lib/cjs/utils/throttling.cjs.map +1 -0
- package/lib/cjs/utils/types.cjs +1 -0
- package/lib/cjs/utils/types.cjs.map +1 -0
- package/lib/cjs/utils/utils.cjs +3 -2
- package/lib/cjs/utils/utils.cjs.map +1 -0
- package/lib/cjs/workers/TaskEngine.cjs +30 -29
- package/lib/cjs/workers/TaskEngine.cjs.map +1 -0
- package/lib/cjs/workers/WorkThreadEnvironment.cjs +1 -0
- package/lib/cjs/workers/WorkThreadEnvironment.cjs.map +1 -0
- package/lib/cjs/workers/index.cjs +1 -0
- package/lib/cjs/workers/index.cjs.map +1 -0
- package/lib/cjs/workers/messages.cjs +1 -0
- package/lib/cjs/workers/messages.cjs.map +1 -0
- package/lib/cjs/workers/types.cjs +1 -0
- package/lib/cjs/workers/types.cjs.map +1 -0
- package/lib/cjs/workers/workerThread.cjs +18 -17
- package/lib/cjs/workers/workerThread.cjs.map +1 -0
- package/lib/esm/index.js +1 -1
- package/lib/types/auth/constants.d.cts +5 -0
- package/lib/types/auth/constants.d.mts +5 -0
- package/lib/types/auth/decorators.d.cts +5 -0
- package/lib/types/auth/decorators.d.mts +5 -0
- package/lib/types/auth/index.d.cts +2 -0
- package/lib/types/auth/index.d.mts +2 -0
- package/lib/types/fs/FilesystemAdapter.d.cts +70 -0
- package/lib/types/fs/FilesystemAdapter.d.mts +70 -0
- package/lib/types/fs/FsDispatch.d.cts +7 -0
- package/lib/types/fs/FsDispatch.d.mts +7 -0
- package/lib/types/fs/helpers.d.cts +17 -0
- package/lib/types/fs/helpers.d.mts +17 -0
- package/lib/types/fs/index.d.cts +4 -0
- package/lib/types/fs/index.d.mts +4 -0
- package/lib/types/fs/indexStore.d.cts +28 -0
- package/lib/types/fs/indexStore.d.mts +28 -0
- package/lib/types/fs/locks/FilesystemLock.d.cts +13 -0
- package/lib/types/fs/locks/FilesystemLock.d.mts +13 -0
- package/lib/types/fs/locks/FilesystemMultiLock.d.cts +8 -0
- package/lib/types/fs/locks/FilesystemMultiLock.d.mts +8 -0
- package/lib/types/fs/types.d.cts +40 -0
- package/lib/types/fs/types.d.mts +40 -0
- package/lib/types/identity/decorators.d.cts +72 -0
- package/lib/types/identity/decorators.d.mts +72 -0
- package/lib/types/identity/index.d.cts +6 -0
- package/lib/types/identity/index.d.mts +6 -0
- package/lib/types/index.d.cts +34 -0
- package/lib/types/index.d.mts +34 -0
- package/lib/types/index.d.ts +1 -1
- package/lib/types/interfaces/ContextuallyLogged.d.cts +8 -0
- package/lib/types/interfaces/ContextuallyLogged.d.mts +8 -0
- package/lib/types/interfaces/ErrorParser.d.cts +16 -0
- package/lib/types/interfaces/ErrorParser.d.mts +16 -0
- package/lib/types/interfaces/Executor.d.cts +16 -0
- package/lib/types/interfaces/Executor.d.mts +16 -0
- package/lib/types/interfaces/Observable.d.cts +33 -0
- package/lib/types/interfaces/Observable.d.mts +33 -0
- package/lib/types/interfaces/Observer.d.cts +15 -0
- package/lib/types/interfaces/Observer.d.mts +15 -0
- package/lib/types/interfaces/Paginatable.d.cts +20 -0
- package/lib/types/interfaces/Paginatable.d.mts +20 -0
- package/lib/types/interfaces/Queriable.d.cts +47 -0
- package/lib/types/interfaces/Queriable.d.mts +47 -0
- package/lib/types/interfaces/RawExecutor.d.cts +28 -0
- package/lib/types/interfaces/RawExecutor.d.mts +28 -0
- package/lib/types/interfaces/SequenceOptions.d.cts +79 -0
- package/lib/types/interfaces/SequenceOptions.d.mts +79 -0
- package/lib/types/interfaces/index.d.cts +12 -0
- package/lib/types/interfaces/index.d.mts +12 -0
- package/lib/types/migrations/Migration.d.cts +19 -0
- package/lib/types/migrations/Migration.d.mts +19 -0
- package/lib/types/migrations/MigrationService.d.cts +63 -0
- package/lib/types/migrations/MigrationService.d.mts +63 -0
- package/lib/types/migrations/MigrationTaskBuilder.d.cts +10 -0
- package/lib/types/migrations/MigrationTaskBuilder.d.mts +10 -0
- package/lib/types/migrations/MigrationTasks.d.cts +9 -0
- package/lib/types/migrations/MigrationTasks.d.mts +9 -0
- package/lib/types/migrations/MigrationVersioning.d.cts +7 -0
- package/lib/types/migrations/MigrationVersioning.d.mts +7 -0
- package/lib/types/migrations/SemverMigrationVersioning.d.cts +10 -0
- package/lib/types/migrations/SemverMigrationVersioning.d.mts +10 -0
- package/lib/types/migrations/StandardMigrationVersioning.d.cts +12 -0
- package/lib/types/migrations/StandardMigrationVersioning.d.mts +12 -0
- package/lib/types/migrations/constants.d.cts +2 -0
- package/lib/types/migrations/constants.d.mts +2 -0
- package/lib/types/migrations/decorators.d.cts +12 -0
- package/lib/types/migrations/decorators.d.mts +12 -0
- package/lib/types/migrations/index.d.cts +15 -0
- package/lib/types/migrations/index.d.mts +15 -0
- package/lib/types/migrations/types.d.cts +46 -0
- package/lib/types/migrations/types.d.mts +46 -0
- package/lib/types/model/BaseModel.d.cts +37 -0
- package/lib/types/model/BaseModel.d.mts +37 -0
- package/lib/types/model/SequenceModel.d.cts +32 -0
- package/lib/types/model/SequenceModel.d.mts +32 -0
- package/lib/types/model/construction.d.cts +455 -0
- package/lib/types/model/construction.d.mts +455 -0
- package/lib/types/model/decorators.d.cts +237 -0
- package/lib/types/model/decorators.d.mts +237 -0
- package/lib/types/model/index.d.cts +11 -0
- package/lib/types/model/index.d.mts +11 -0
- package/lib/types/model/indexing.d.cts +20 -0
- package/lib/types/model/indexing.d.mts +20 -0
- package/lib/types/model/types.d.cts +60 -0
- package/lib/types/model/types.d.mts +60 -0
- package/lib/types/overrides/Metadata.d.cts +22 -0
- package/lib/types/overrides/Metadata.d.mts +22 -0
- package/lib/types/overrides/Model.d.cts +94 -0
- package/lib/types/overrides/Model.d.mts +94 -0
- package/lib/types/overrides/ModelBuilder.d.cts +31 -0
- package/lib/types/overrides/ModelBuilder.d.mts +31 -0
- package/lib/types/overrides/index.d.cts +11 -0
- package/lib/types/overrides/index.d.mts +11 -0
- package/lib/types/overrides/injectables.d.cts +10 -0
- package/lib/types/overrides/injectables.d.mts +10 -0
- package/lib/types/overrides/overrides.d.cts +1 -0
- package/lib/types/overrides/overrides.d.mts +1 -0
- package/lib/types/persistence/Adapter.d.cts +469 -0
- package/lib/types/persistence/Adapter.d.mts +469 -0
- package/lib/types/persistence/Context.d.cts +16 -0
- package/lib/types/persistence/Context.d.mts +16 -0
- package/lib/types/persistence/ContextLock.d.cts +18 -0
- package/lib/types/persistence/ContextLock.d.mts +18 -0
- package/lib/types/persistence/Dispatch.d.cts +128 -0
- package/lib/types/persistence/Dispatch.d.mts +128 -0
- package/lib/types/persistence/ObserverHandler.d.cts +111 -0
- package/lib/types/persistence/ObserverHandler.d.mts +111 -0
- package/lib/types/persistence/Sequence.d.cts +126 -0
- package/lib/types/persistence/Sequence.d.mts +126 -0
- package/lib/types/persistence/constants.d.cts +74 -0
- package/lib/types/persistence/constants.d.mts +74 -0
- package/lib/types/persistence/decorators.d.cts +28 -0
- package/lib/types/persistence/decorators.d.mts +28 -0
- package/lib/types/persistence/errors.d.cts +33 -0
- package/lib/types/persistence/errors.d.mts +33 -0
- package/lib/types/persistence/event-filters.d.cts +20 -0
- package/lib/types/persistence/event-filters.d.mts +20 -0
- package/lib/types/persistence/generators.d.cts +14 -0
- package/lib/types/persistence/generators.d.mts +14 -0
- package/lib/types/persistence/index.d.cts +18 -0
- package/lib/types/persistence/index.d.mts +18 -0
- package/lib/types/persistence/transactions.d.cts +4 -0
- package/lib/types/persistence/transactions.d.mts +4 -0
- package/lib/types/persistence/types.d.cts +86 -0
- package/lib/types/persistence/types.d.mts +86 -0
- package/lib/types/query/Condition.d.cts +131 -0
- package/lib/types/query/Condition.d.mts +131 -0
- package/lib/types/query/MethodQueryBuilder.d.cts +185 -0
- package/lib/types/query/MethodQueryBuilder.d.mts +185 -0
- package/lib/types/query/Paginator.d.cts +105 -0
- package/lib/types/query/Paginator.d.mts +105 -0
- package/lib/types/query/Statement.d.cts +136 -0
- package/lib/types/query/Statement.d.mts +136 -0
- package/lib/types/query/constants.d.cts +69 -0
- package/lib/types/query/constants.d.mts +69 -0
- package/lib/types/query/decorators.d.cts +8 -0
- package/lib/types/query/decorators.d.mts +8 -0
- package/lib/types/query/errors.d.cts +21 -0
- package/lib/types/query/errors.d.mts +21 -0
- package/lib/types/query/index.d.cts +16 -0
- package/lib/types/query/index.d.mts +16 -0
- package/lib/types/query/options.d.cts +393 -0
- package/lib/types/query/options.d.mts +393 -0
- package/lib/types/query/selectors.d.cts +39 -0
- package/lib/types/query/selectors.d.mts +39 -0
- package/lib/types/query/types.d.cts +158 -0
- package/lib/types/query/types.d.mts +158 -0
- package/lib/types/query/utils.d.cts +40 -0
- package/lib/types/query/utils.d.mts +40 -0
- package/lib/types/ram/RamAdapter.d.cts +341 -0
- package/lib/types/ram/RamAdapter.d.mts +341 -0
- package/lib/types/ram/RamPaginator.d.cts +54 -0
- package/lib/types/ram/RamPaginator.d.mts +54 -0
- package/lib/types/ram/RamStatement.d.cts +92 -0
- package/lib/types/ram/RamStatement.d.mts +92 -0
- package/lib/types/ram/constants.d.cts +8 -0
- package/lib/types/ram/constants.d.mts +8 -0
- package/lib/types/ram/handlers.d.cts +24 -0
- package/lib/types/ram/handlers.d.mts +24 -0
- package/lib/types/ram/index.d.cts +12 -0
- package/lib/types/ram/index.d.mts +12 -0
- package/lib/types/ram/types.d.cts +50 -0
- package/lib/types/ram/types.d.mts +50 -0
- package/lib/types/repository/Repository.d.cts +501 -0
- package/lib/types/repository/Repository.d.mts +501 -0
- package/lib/types/repository/constants.d.cts +36 -0
- package/lib/types/repository/constants.d.mts +36 -0
- package/lib/types/repository/decorators.d.cts +30 -0
- package/lib/types/repository/decorators.d.mts +30 -0
- package/lib/types/repository/errors.d.cts +19 -0
- package/lib/types/repository/errors.d.mts +19 -0
- package/lib/types/repository/index.d.cts +12 -0
- package/lib/types/repository/index.d.mts +12 -0
- package/lib/types/repository/injectables.d.cts +95 -0
- package/lib/types/repository/injectables.d.mts +95 -0
- package/lib/types/repository/types.d.cts +28 -0
- package/lib/types/repository/types.d.mts +28 -0
- package/lib/types/repository/utils.d.cts +36 -0
- package/lib/types/repository/utils.d.mts +36 -0
- package/lib/types/services/ModelService.d.cts +45 -0
- package/lib/types/services/ModelService.d.mts +45 -0
- package/lib/types/services/PersistenceService.d.cts +17 -0
- package/lib/types/services/PersistenceService.d.mts +17 -0
- package/lib/types/services/index.d.cts +8 -0
- package/lib/types/services/index.d.mts +8 -0
- package/lib/types/services/services.d.cts +96 -0
- package/lib/types/services/services.d.mts +96 -0
- package/lib/types/tasks/CleanUpTask.d.cts +15 -0
- package/lib/types/tasks/CleanUpTask.d.mts +15 -0
- package/lib/types/tasks/TaskContext.d.cts +30 -0
- package/lib/types/tasks/TaskContext.d.mts +30 -0
- package/lib/types/tasks/TaskEngine.d.cts +97 -0
- package/lib/types/tasks/TaskEngine.d.mts +97 -0
- package/lib/types/tasks/TaskErrors.d.cts +65 -0
- package/lib/types/tasks/TaskErrors.d.mts +65 -0
- package/lib/types/tasks/TaskEventBus.d.cts +17 -0
- package/lib/types/tasks/TaskEventBus.d.mts +17 -0
- package/lib/types/tasks/TaskEventService.d.cts +7 -0
- package/lib/types/tasks/TaskEventService.d.mts +7 -0
- package/lib/types/tasks/TaskHandler.d.cts +12 -0
- package/lib/types/tasks/TaskHandler.d.mts +12 -0
- package/lib/types/tasks/TaskHandlerRegistry.d.cts +8 -0
- package/lib/types/tasks/TaskHandlerRegistry.d.mts +8 -0
- package/lib/types/tasks/TaskService.d.cts +65 -0
- package/lib/types/tasks/TaskService.d.mts +65 -0
- package/lib/types/tasks/TaskStateChangeError.d.cts +11 -0
- package/lib/types/tasks/TaskStateChangeError.d.mts +11 -0
- package/lib/types/tasks/TaskTracker.d.cts +47 -0
- package/lib/types/tasks/TaskTracker.d.mts +47 -0
- package/lib/types/tasks/builder.d.cts +72 -0
- package/lib/types/tasks/builder.d.mts +72 -0
- package/lib/types/tasks/constants.d.cts +31 -0
- package/lib/types/tasks/constants.d.mts +31 -0
- package/lib/types/tasks/decorators.d.cts +4 -0
- package/lib/types/tasks/decorators.d.mts +4 -0
- package/lib/types/tasks/index.d.cts +23 -0
- package/lib/types/tasks/index.d.mts +23 -0
- package/lib/types/tasks/logging.d.cts +31 -0
- package/lib/types/tasks/logging.d.mts +31 -0
- package/lib/types/tasks/models/TaskBackoffModel.d.cts +9 -0
- package/lib/types/tasks/models/TaskBackoffModel.d.mts +9 -0
- package/lib/types/tasks/models/TaskErrorModel.d.cts +8 -0
- package/lib/types/tasks/models/TaskErrorModel.d.mts +8 -0
- package/lib/types/tasks/models/TaskEventModel.d.cts +11 -0
- package/lib/types/tasks/models/TaskEventModel.d.mts +11 -0
- package/lib/types/tasks/models/TaskIOSerializer.d.cts +33 -0
- package/lib/types/tasks/models/TaskIOSerializer.d.mts +33 -0
- package/lib/types/tasks/models/TaskLogEntryModel.d.cts +10 -0
- package/lib/types/tasks/models/TaskLogEntryModel.d.mts +10 -0
- package/lib/types/tasks/models/TaskModel.d.cts +43 -0
- package/lib/types/tasks/models/TaskModel.d.mts +43 -0
- package/lib/types/tasks/models/TaskStepResultModel.d.cts +9 -0
- package/lib/types/tasks/models/TaskStepResultModel.d.mts +9 -0
- package/lib/types/tasks/models/TaskStepSpecModel.d.cts +9 -0
- package/lib/types/tasks/models/TaskStepSpecModel.d.mts +9 -0
- package/lib/types/tasks/models/index.d.cts +8 -0
- package/lib/types/tasks/models/index.d.mts +8 -0
- package/lib/types/tasks/types.d.cts +71 -0
- package/lib/types/tasks/types.d.mts +71 -0
- package/lib/types/tasks/utils.d.cts +5 -0
- package/lib/types/tasks/utils.d.mts +5 -0
- package/lib/types/utils/ContextualLoggedClass.d.cts +37 -0
- package/lib/types/utils/ContextualLoggedClass.d.mts +37 -0
- package/lib/types/utils/decorators.d.cts +27 -0
- package/lib/types/utils/decorators.d.mts +27 -0
- package/lib/types/utils/errors.d.cts +56 -0
- package/lib/types/utils/errors.d.mts +56 -0
- package/lib/types/utils/index.d.cts +11 -0
- package/lib/types/utils/index.d.mts +11 -0
- package/lib/types/utils/throttling.d.cts +9 -0
- package/lib/types/utils/throttling.d.mts +9 -0
- package/lib/types/utils/types.d.cts +23 -0
- package/lib/types/utils/types.d.mts +23 -0
- package/lib/types/utils/utils.d.cts +22 -0
- package/lib/types/utils/utils.d.mts +22 -0
- package/lib/types/workers/TaskEngine.d.cts +40 -0
- package/lib/types/workers/TaskEngine.d.mts +40 -0
- package/lib/types/workers/WorkThreadEnvironment.d.cts +35 -0
- package/lib/types/workers/WorkThreadEnvironment.d.mts +35 -0
- package/lib/types/workers/index.d.cts +5 -0
- package/lib/types/workers/index.d.mts +5 -0
- package/lib/types/workers/messages.d.cts +69 -0
- package/lib/types/workers/messages.d.mts +69 -0
- package/lib/types/workers/types.d.cts +41 -0
- package/lib/types/workers/types.d.mts +41 -0
- package/lib/types/workers/workerThread.d.cts +1 -0
- package/lib/types/workers/workerThread.d.mts +1 -0
- package/package.json +4 -4
- package/lib/cjs/auth/constants.js.map +0 -1
- package/lib/cjs/auth/decorators.js.map +0 -1
- package/lib/cjs/auth/index.js.map +0 -1
- package/lib/cjs/fs/FilesystemAdapter.js.map +0 -1
- package/lib/cjs/fs/FsDispatch.js.map +0 -1
- package/lib/cjs/fs/helpers.js.map +0 -1
- package/lib/cjs/fs/index.js.map +0 -1
- package/lib/cjs/fs/indexStore.js.map +0 -1
- package/lib/cjs/fs/locks/FilesystemLock.js.map +0 -1
- package/lib/cjs/fs/locks/FilesystemMultiLock.js.map +0 -1
- package/lib/cjs/fs/types.js.map +0 -1
- package/lib/cjs/identity/decorators.js.map +0 -1
- package/lib/cjs/identity/index.js.map +0 -1
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/interfaces/ContextuallyLogged.js.map +0 -1
- package/lib/cjs/interfaces/ErrorParser.js.map +0 -1
- package/lib/cjs/interfaces/Executor.js.map +0 -1
- package/lib/cjs/interfaces/Observable.js.map +0 -1
- package/lib/cjs/interfaces/Observer.js.map +0 -1
- package/lib/cjs/interfaces/Paginatable.js.map +0 -1
- package/lib/cjs/interfaces/Queriable.js.map +0 -1
- package/lib/cjs/interfaces/RawExecutor.js.map +0 -1
- package/lib/cjs/interfaces/SequenceOptions.js.map +0 -1
- package/lib/cjs/interfaces/index.js.map +0 -1
- package/lib/cjs/migrations/Migration.js.map +0 -1
- package/lib/cjs/migrations/MigrationService.js.map +0 -1
- package/lib/cjs/migrations/MigrationTaskBuilder.js.map +0 -1
- package/lib/cjs/migrations/MigrationTasks.js.map +0 -1
- package/lib/cjs/migrations/MigrationVersioning.js.map +0 -1
- package/lib/cjs/migrations/SemverMigrationVersioning.js.map +0 -1
- package/lib/cjs/migrations/StandardMigrationVersioning.js.map +0 -1
- package/lib/cjs/migrations/constants.js.map +0 -1
- package/lib/cjs/migrations/decorators.js.map +0 -1
- package/lib/cjs/migrations/index.js.map +0 -1
- package/lib/cjs/migrations/types.js.map +0 -1
- package/lib/cjs/model/BaseModel.js.map +0 -1
- package/lib/cjs/model/SequenceModel.js.map +0 -1
- package/lib/cjs/model/construction.js.map +0 -1
- package/lib/cjs/model/decorators.js.map +0 -1
- package/lib/cjs/model/index.js.map +0 -1
- package/lib/cjs/model/indexing.js.map +0 -1
- package/lib/cjs/model/types.js.map +0 -1
- package/lib/cjs/overrides/Metadata.js.map +0 -1
- package/lib/cjs/overrides/Model.js.map +0 -1
- package/lib/cjs/overrides/ModelBuilder.js.map +0 -1
- package/lib/cjs/overrides/index.js.map +0 -1
- package/lib/cjs/overrides/injectables.js.map +0 -1
- package/lib/cjs/overrides/overrides.js.map +0 -1
- package/lib/cjs/persistence/Adapter.js.map +0 -1
- package/lib/cjs/persistence/Context.js.map +0 -1
- package/lib/cjs/persistence/ContextLock.js.map +0 -1
- package/lib/cjs/persistence/Dispatch.js.map +0 -1
- package/lib/cjs/persistence/ObserverHandler.js.map +0 -1
- package/lib/cjs/persistence/Sequence.js.map +0 -1
- package/lib/cjs/persistence/constants.js.map +0 -1
- package/lib/cjs/persistence/decorators.js.map +0 -1
- package/lib/cjs/persistence/errors.js.map +0 -1
- package/lib/cjs/persistence/event-filters.js.map +0 -1
- package/lib/cjs/persistence/generators.js.map +0 -1
- package/lib/cjs/persistence/index.js.map +0 -1
- package/lib/cjs/persistence/transactions.js.map +0 -1
- package/lib/cjs/persistence/types.js.map +0 -1
- package/lib/cjs/query/Condition.js.map +0 -1
- package/lib/cjs/query/MethodQueryBuilder.js.map +0 -1
- package/lib/cjs/query/Paginator.js.map +0 -1
- package/lib/cjs/query/Statement.js.map +0 -1
- package/lib/cjs/query/constants.js.map +0 -1
- package/lib/cjs/query/decorators.js.map +0 -1
- package/lib/cjs/query/errors.js.map +0 -1
- package/lib/cjs/query/index.js.map +0 -1
- package/lib/cjs/query/options.js.map +0 -1
- package/lib/cjs/query/selectors.js.map +0 -1
- package/lib/cjs/query/types.js.map +0 -1
- package/lib/cjs/query/utils.js.map +0 -1
- package/lib/cjs/ram/RamAdapter.js.map +0 -1
- package/lib/cjs/ram/RamPaginator.js.map +0 -1
- package/lib/cjs/ram/RamStatement.js.map +0 -1
- package/lib/cjs/ram/constants.js.map +0 -1
- package/lib/cjs/ram/handlers.js.map +0 -1
- package/lib/cjs/ram/index.js.map +0 -1
- package/lib/cjs/ram/types.js.map +0 -1
- package/lib/cjs/repository/Repository.js.map +0 -1
- package/lib/cjs/repository/constants.js.map +0 -1
- package/lib/cjs/repository/decorators.js.map +0 -1
- package/lib/cjs/repository/errors.js.map +0 -1
- package/lib/cjs/repository/index.js.map +0 -1
- package/lib/cjs/repository/injectables.js.map +0 -1
- package/lib/cjs/repository/types.js.map +0 -1
- package/lib/cjs/repository/utils.js.map +0 -1
- package/lib/cjs/services/ModelService.js.map +0 -1
- package/lib/cjs/services/PersistenceService.js.map +0 -1
- package/lib/cjs/services/index.js.map +0 -1
- package/lib/cjs/services/services.js.map +0 -1
- package/lib/cjs/tasks/CleanUpTask.js.map +0 -1
- package/lib/cjs/tasks/TaskContext.js.map +0 -1
- package/lib/cjs/tasks/TaskEngine.js.map +0 -1
- package/lib/cjs/tasks/TaskErrors.js.map +0 -1
- package/lib/cjs/tasks/TaskEventBus.js.map +0 -1
- package/lib/cjs/tasks/TaskEventService.js.map +0 -1
- package/lib/cjs/tasks/TaskHandler.js.map +0 -1
- package/lib/cjs/tasks/TaskHandlerRegistry.js.map +0 -1
- package/lib/cjs/tasks/TaskService.js.map +0 -1
- package/lib/cjs/tasks/TaskStateChangeError.js.map +0 -1
- package/lib/cjs/tasks/TaskTracker.js.map +0 -1
- package/lib/cjs/tasks/builder.js.map +0 -1
- package/lib/cjs/tasks/constants.js.map +0 -1
- package/lib/cjs/tasks/decorators.js.map +0 -1
- package/lib/cjs/tasks/index.js.map +0 -1
- package/lib/cjs/tasks/logging.js.map +0 -1
- package/lib/cjs/tasks/models/TaskBackoffModel.js.map +0 -1
- package/lib/cjs/tasks/models/TaskErrorModel.js.map +0 -1
- package/lib/cjs/tasks/models/TaskEventModel.js.map +0 -1
- package/lib/cjs/tasks/models/TaskIOSerializer.js.map +0 -1
- package/lib/cjs/tasks/models/TaskLogEntryModel.js.map +0 -1
- package/lib/cjs/tasks/models/TaskModel.js.map +0 -1
- package/lib/cjs/tasks/models/TaskStepResultModel.js.map +0 -1
- package/lib/cjs/tasks/models/TaskStepSpecModel.js.map +0 -1
- package/lib/cjs/tasks/models/index.js.map +0 -1
- package/lib/cjs/tasks/types.js.map +0 -1
- package/lib/cjs/tasks/utils.js.map +0 -1
- package/lib/cjs/utils/ContextualLoggedClass.js.map +0 -1
- package/lib/cjs/utils/decorators.js.map +0 -1
- package/lib/cjs/utils/errors.js.map +0 -1
- package/lib/cjs/utils/index.js.map +0 -1
- package/lib/cjs/utils/throttling.js.map +0 -1
- package/lib/cjs/utils/types.js.map +0 -1
- package/lib/cjs/utils/utils.js.map +0 -1
- package/lib/cjs/workers/TaskEngine.js.map +0 -1
- package/lib/cjs/workers/WorkThreadEnvironment.js.map +0 -1
- package/lib/cjs/workers/index.js.map +0 -1
- package/lib/cjs/workers/messages.js.map +0 -1
- package/lib/cjs/workers/types.js.map +0 -1
- package/lib/cjs/workers/workerThread.js.map +0 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { RawResult } from "../persistence/types.js";
|
|
2
|
+
/**
|
|
3
|
+
* @description Interface for executing raw queries
|
|
4
|
+
* @summary Defines a contract for objects that can execute raw queries of a specific type and return results
|
|
5
|
+
* @template Q - The query type that this executor can process
|
|
6
|
+
* @interface RawExecutor
|
|
7
|
+
* @memberOf module:core
|
|
8
|
+
*/
|
|
9
|
+
export interface RawExecutor<Q> {
|
|
10
|
+
/**
|
|
11
|
+
* @description Executes a raw query
|
|
12
|
+
* @summary Processes a raw query input and returns a promise that resolves to the result
|
|
13
|
+
* @template R - The result type that will be returned
|
|
14
|
+
* @param {Q} rawInput - The raw query to execute
|
|
15
|
+
* @return {Promise<R>} A promise that resolves to the result of type R
|
|
16
|
+
*/
|
|
17
|
+
raw<R>(rawInput: Q, ...args: any[]): Promise<R>;
|
|
18
|
+
}
|
|
19
|
+
export interface RawPagedExecutor<Q> {
|
|
20
|
+
/**
|
|
21
|
+
* @description Executes a raw query
|
|
22
|
+
* @summary Processes a raw query input and returns a promise that resolves to the result
|
|
23
|
+
* @template R - The result type that will be returned
|
|
24
|
+
* @param {Q} rawInput - The raw query to execute
|
|
25
|
+
* @return {Promise<R>} A promise that resolves to the result of type R
|
|
26
|
+
*/
|
|
27
|
+
raw<R, D extends boolean>(rawInput: Q, docsOnly: D, ...args: any[]): Promise<RawResult<R, D>>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Type of the sequence configuration options type property
|
|
3
|
+
* @summary Type of the sequence configuration options type property
|
|
4
|
+
* @interface SequenceOptionsType
|
|
5
|
+
* @memberOf module:core
|
|
6
|
+
*/
|
|
7
|
+
export type SequenceOptionsType = "Number" | "BigInt" | "String" | string | "serial" | "uuid" | StringConstructor | NumberConstructor | BigIntConstructor | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* @description Interface for sequence configuration options
|
|
10
|
+
* @summary Defines the configuration options for creating and managing sequences
|
|
11
|
+
* @interface SequenceOptions
|
|
12
|
+
* @memberOf module:core
|
|
13
|
+
*/
|
|
14
|
+
export interface SequenceOptions<TYPE = SequenceOptionsType> {
|
|
15
|
+
/**
|
|
16
|
+
* @description Optional name for the sequence
|
|
17
|
+
* @summary A unique identifier for the sequence
|
|
18
|
+
*/
|
|
19
|
+
name?: string;
|
|
20
|
+
generated?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* @description The data type of the sequence
|
|
23
|
+
* @summary Specifies whether the sequence generates Number or BigInt values
|
|
24
|
+
*/
|
|
25
|
+
type: TYPE;
|
|
26
|
+
/**
|
|
27
|
+
* @description The initial value of the sequence
|
|
28
|
+
* @summary The value that the sequence starts with
|
|
29
|
+
*/
|
|
30
|
+
startWith: number;
|
|
31
|
+
/**
|
|
32
|
+
* @description The increment value for each step in the sequence
|
|
33
|
+
* @summary The amount by which the sequence increases with each call
|
|
34
|
+
*/
|
|
35
|
+
incrementBy: number;
|
|
36
|
+
/**
|
|
37
|
+
* @description Optional minimum value for the sequence
|
|
38
|
+
* @summary The lowest value that the sequence can generate
|
|
39
|
+
*/
|
|
40
|
+
minValue?: number;
|
|
41
|
+
/**
|
|
42
|
+
* @description Optional maximum value for the sequence
|
|
43
|
+
* @summary The highest value that the sequence can generate
|
|
44
|
+
*/
|
|
45
|
+
maxValue?: number;
|
|
46
|
+
/**
|
|
47
|
+
* @description Whether the sequence should cycle when reaching its limits
|
|
48
|
+
* @summary If true, the sequence will restart from minValue when reaching maxValue
|
|
49
|
+
*/
|
|
50
|
+
cycle: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* @description Default options for sequences
|
|
54
|
+
* @summary Provides a standard configuration for number sequences starting at 0 and incrementing by 1
|
|
55
|
+
* @const NoneSequenceOptions
|
|
56
|
+
* @memberOf module:core
|
|
57
|
+
*/
|
|
58
|
+
export declare const NoneSequenceOptions: SequenceOptions;
|
|
59
|
+
/**
|
|
60
|
+
* @description Default options for sequences
|
|
61
|
+
* @summary Provides a standard configuration for number sequences starting at 0 and incrementing by 1
|
|
62
|
+
* @const DefaultSequenceOptions
|
|
63
|
+
* @memberOf module:core
|
|
64
|
+
*/
|
|
65
|
+
export declare const DefaultSequenceOptions: SequenceOptions;
|
|
66
|
+
/**
|
|
67
|
+
* @description Predefined options for numeric sequences
|
|
68
|
+
* @summary Configuration for standard number sequences starting at 0 and incrementing by 1
|
|
69
|
+
* @const NumericSequence
|
|
70
|
+
* @memberOf module:core
|
|
71
|
+
*/
|
|
72
|
+
export declare const NumericSequence: SequenceOptions;
|
|
73
|
+
/**
|
|
74
|
+
* @description Predefined options for BigInt sequences
|
|
75
|
+
* @summary Configuration for BigInt sequences starting at 0 and incrementing by 1
|
|
76
|
+
* @const BigIntSequence
|
|
77
|
+
* @memberOf module:core
|
|
78
|
+
*/
|
|
79
|
+
export declare const BigIntSequence: SequenceOptions;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Type of the sequence configuration options type property
|
|
3
|
+
* @summary Type of the sequence configuration options type property
|
|
4
|
+
* @interface SequenceOptionsType
|
|
5
|
+
* @memberOf module:core
|
|
6
|
+
*/
|
|
7
|
+
export type SequenceOptionsType = "Number" | "BigInt" | "String" | string | "serial" | "uuid" | StringConstructor | NumberConstructor | BigIntConstructor | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* @description Interface for sequence configuration options
|
|
10
|
+
* @summary Defines the configuration options for creating and managing sequences
|
|
11
|
+
* @interface SequenceOptions
|
|
12
|
+
* @memberOf module:core
|
|
13
|
+
*/
|
|
14
|
+
export interface SequenceOptions<TYPE = SequenceOptionsType> {
|
|
15
|
+
/**
|
|
16
|
+
* @description Optional name for the sequence
|
|
17
|
+
* @summary A unique identifier for the sequence
|
|
18
|
+
*/
|
|
19
|
+
name?: string;
|
|
20
|
+
generated?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* @description The data type of the sequence
|
|
23
|
+
* @summary Specifies whether the sequence generates Number or BigInt values
|
|
24
|
+
*/
|
|
25
|
+
type: TYPE;
|
|
26
|
+
/**
|
|
27
|
+
* @description The initial value of the sequence
|
|
28
|
+
* @summary The value that the sequence starts with
|
|
29
|
+
*/
|
|
30
|
+
startWith: number;
|
|
31
|
+
/**
|
|
32
|
+
* @description The increment value for each step in the sequence
|
|
33
|
+
* @summary The amount by which the sequence increases with each call
|
|
34
|
+
*/
|
|
35
|
+
incrementBy: number;
|
|
36
|
+
/**
|
|
37
|
+
* @description Optional minimum value for the sequence
|
|
38
|
+
* @summary The lowest value that the sequence can generate
|
|
39
|
+
*/
|
|
40
|
+
minValue?: number;
|
|
41
|
+
/**
|
|
42
|
+
* @description Optional maximum value for the sequence
|
|
43
|
+
* @summary The highest value that the sequence can generate
|
|
44
|
+
*/
|
|
45
|
+
maxValue?: number;
|
|
46
|
+
/**
|
|
47
|
+
* @description Whether the sequence should cycle when reaching its limits
|
|
48
|
+
* @summary If true, the sequence will restart from minValue when reaching maxValue
|
|
49
|
+
*/
|
|
50
|
+
cycle: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* @description Default options for sequences
|
|
54
|
+
* @summary Provides a standard configuration for number sequences starting at 0 and incrementing by 1
|
|
55
|
+
* @const NoneSequenceOptions
|
|
56
|
+
* @memberOf module:core
|
|
57
|
+
*/
|
|
58
|
+
export declare const NoneSequenceOptions: SequenceOptions;
|
|
59
|
+
/**
|
|
60
|
+
* @description Default options for sequences
|
|
61
|
+
* @summary Provides a standard configuration for number sequences starting at 0 and incrementing by 1
|
|
62
|
+
* @const DefaultSequenceOptions
|
|
63
|
+
* @memberOf module:core
|
|
64
|
+
*/
|
|
65
|
+
export declare const DefaultSequenceOptions: SequenceOptions;
|
|
66
|
+
/**
|
|
67
|
+
* @description Predefined options for numeric sequences
|
|
68
|
+
* @summary Configuration for standard number sequences starting at 0 and incrementing by 1
|
|
69
|
+
* @const NumericSequence
|
|
70
|
+
* @memberOf module:core
|
|
71
|
+
*/
|
|
72
|
+
export declare const NumericSequence: SequenceOptions;
|
|
73
|
+
/**
|
|
74
|
+
* @description Predefined options for BigInt sequences
|
|
75
|
+
* @summary Configuration for BigInt sequences starting at 0 and incrementing by 1
|
|
76
|
+
* @const BigIntSequence
|
|
77
|
+
* @memberOf module:core
|
|
78
|
+
*/
|
|
79
|
+
export declare const BigIntSequence: SequenceOptions;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Exports for the interfaces module.
|
|
3
|
+
* @summary This file exports all the necessary components for the interfaces functionality, including ErrorParser, Executor, and more.
|
|
4
|
+
* @module core/interfaces
|
|
5
|
+
*/
|
|
6
|
+
export * from "./ErrorParser.cjs";
|
|
7
|
+
export * from "./Executor.cjs";
|
|
8
|
+
export * from "./Observable.cjs";
|
|
9
|
+
export * from "./Observer.cjs";
|
|
10
|
+
export * from "./Queriable.cjs";
|
|
11
|
+
export * from "./RawExecutor.cjs";
|
|
12
|
+
export * from "./SequenceOptions.cjs";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Exports for the interfaces module.
|
|
3
|
+
* @summary This file exports all the necessary components for the interfaces functionality, including ErrorParser, Executor, and more.
|
|
4
|
+
* @module core/interfaces
|
|
5
|
+
*/
|
|
6
|
+
export * from "./ErrorParser.js";
|
|
7
|
+
export * from "./Executor.js";
|
|
8
|
+
export * from "./Observable.js";
|
|
9
|
+
export * from "./Observer.js";
|
|
10
|
+
export * from "./Queriable.js";
|
|
11
|
+
export * from "./RawExecutor.js";
|
|
12
|
+
export * from "./SequenceOptions.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ConnectionForAdapter, Migration } from "./types.cjs";
|
|
2
|
+
import { AbsContextual, ContextualArgs } from "../utils/ContextualLoggedClass.cjs";
|
|
3
|
+
import { Adapter } from "../persistence/Adapter.cjs";
|
|
4
|
+
import { ContextOf } from "../persistence/types.cjs";
|
|
5
|
+
export declare abstract class AbsMigration<A extends Adapter<any, any, any, any>, R = void> extends AbsContextual<ContextOf<A>> implements Migration<A, R> {
|
|
6
|
+
private _reference?;
|
|
7
|
+
private _precedence?;
|
|
8
|
+
transaction: boolean;
|
|
9
|
+
get reference(): string;
|
|
10
|
+
get precedence(): string | Migration<any, any>;
|
|
11
|
+
protected constructor();
|
|
12
|
+
protected get adapter(): A;
|
|
13
|
+
protected abstract getQueryRunner(conn: ConnectionForAdapter<A>): ConnectionForAdapter<A>;
|
|
14
|
+
private enforceRules;
|
|
15
|
+
private prefix;
|
|
16
|
+
abstract down(qr: ConnectionForAdapter<A>, adapter: A, ...args: ContextualArgs<ContextOf<A>>): Promise<void>;
|
|
17
|
+
abstract migrate(qr: ConnectionForAdapter<A>, adapter: A, ...args: ContextualArgs<ContextOf<A>>): Promise<R>;
|
|
18
|
+
abstract up(qr: ConnectionForAdapter<A>, adapter: A, ctx: ContextOf<A>): Promise<void>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ConnectionForAdapter, Migration } from "./types.js";
|
|
2
|
+
import { AbsContextual, ContextualArgs } from "../utils/ContextualLoggedClass.js";
|
|
3
|
+
import { Adapter } from "../persistence/Adapter.js";
|
|
4
|
+
import { ContextOf } from "../persistence/types.js";
|
|
5
|
+
export declare abstract class AbsMigration<A extends Adapter<any, any, any, any>, R = void> extends AbsContextual<ContextOf<A>> implements Migration<A, R> {
|
|
6
|
+
private _reference?;
|
|
7
|
+
private _precedence?;
|
|
8
|
+
transaction: boolean;
|
|
9
|
+
get reference(): string;
|
|
10
|
+
get precedence(): string | Migration<any, any>;
|
|
11
|
+
protected constructor();
|
|
12
|
+
protected get adapter(): A;
|
|
13
|
+
protected abstract getQueryRunner(conn: ConnectionForAdapter<A>): ConnectionForAdapter<A>;
|
|
14
|
+
private enforceRules;
|
|
15
|
+
private prefix;
|
|
16
|
+
abstract down(qr: ConnectionForAdapter<A>, adapter: A, ...args: ContextualArgs<ContextOf<A>>): Promise<void>;
|
|
17
|
+
abstract migrate(qr: ConnectionForAdapter<A>, adapter: A, ...args: ContextualArgs<ContextOf<A>>): Promise<R>;
|
|
18
|
+
abstract up(qr: ConnectionForAdapter<A>, adapter: A, ctx: ContextOf<A>): Promise<void>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Migration, MigrationConfig, PersistenceMigrationConfig } from "./types.cjs";
|
|
2
|
+
import { ClientBasedService } from "../services/services.cjs";
|
|
3
|
+
import { Adapter } from "../persistence/Adapter.cjs";
|
|
4
|
+
import { ContextOf } from "../persistence/types.cjs";
|
|
5
|
+
import { ContextualArgs, MaybeContextualArg } from "../utils/ContextualLoggedClass.cjs";
|
|
6
|
+
import { TaskModel } from "../tasks/models/TaskModel.cjs";
|
|
7
|
+
import { MigrationVersioning } from "./MigrationVersioning.cjs";
|
|
8
|
+
type ResolvedMigration = {
|
|
9
|
+
migration: Migration<any, any>;
|
|
10
|
+
flavour: string;
|
|
11
|
+
reference: string;
|
|
12
|
+
version: string;
|
|
13
|
+
};
|
|
14
|
+
type VersionTask = {
|
|
15
|
+
version: string;
|
|
16
|
+
task: TaskModel;
|
|
17
|
+
};
|
|
18
|
+
export declare class MigrationService<PERSIST extends boolean, A extends Adapter<any, any, any, any> = any, R = void> extends ClientBasedService<PERSIST extends boolean ? A : void, MigrationConfig<PERSIST>> implements Migration<A, R> {
|
|
19
|
+
protected versioning: MigrationVersioning;
|
|
20
|
+
protected queuedTaskChain: Array<{
|
|
21
|
+
id: string;
|
|
22
|
+
version: string;
|
|
23
|
+
}>;
|
|
24
|
+
flavour?: string;
|
|
25
|
+
readonly reference: string;
|
|
26
|
+
readonly precedence: Migration<any, any> | Migration<any, any>[] | null;
|
|
27
|
+
transaction: boolean;
|
|
28
|
+
constructor();
|
|
29
|
+
static migrateAdapters<AD extends Adapter<any, any, any, any> = Adapter<any, any, any, any>>(adapters: AD[], cfg?: PersistenceMigrationConfig<AD>, ...args: MaybeContextualArg<ContextOf<AD>>): Promise<MigrationService<true, AD>[]>;
|
|
30
|
+
initialize(...args: MaybeContextualArg<ContextOf<A>>): Promise<{
|
|
31
|
+
config: MigrationConfig<PERSIST>;
|
|
32
|
+
client: PERSIST extends boolean ? A : void;
|
|
33
|
+
}>;
|
|
34
|
+
down(qr: any, adapter: any, ...args: ContextualArgs<ContextOf<any>>): Promise<void>;
|
|
35
|
+
protected normalizeVersion(raw: string, precedenceHint?: string): string;
|
|
36
|
+
protected extractPrecedenceTokens(migration: Migration<any, any>): string[];
|
|
37
|
+
protected referencesMigration(candidate: Migration<any, any>, target: ResolvedMigration): boolean;
|
|
38
|
+
protected precedenceHint(migration: Migration<any, any>): string | undefined;
|
|
39
|
+
protected compareByPrecedence(migration1: ResolvedMigration, migration2: ResolvedMigration): number;
|
|
40
|
+
protected sort(migrations: ResolvedMigration[]): ResolvedMigration[];
|
|
41
|
+
protected resolveMigration(migration: Migration<any, any>): ResolvedMigration;
|
|
42
|
+
protected shouldIncludeMigration(migration: ResolvedMigration, targetFlavour?: string, includeGeneric?: boolean): boolean;
|
|
43
|
+
protected collectMigrations(targetFlavour?: string, includeGeneric?: boolean): ResolvedMigration[];
|
|
44
|
+
protected buildExecutionPlan(options?: {
|
|
45
|
+
fromVersion?: string;
|
|
46
|
+
toVersion?: string;
|
|
47
|
+
targetFlavour?: string;
|
|
48
|
+
includeGeneric?: boolean;
|
|
49
|
+
}): ResolvedMigration[];
|
|
50
|
+
protected executeMigration(migration: ResolvedMigration, ...args: ContextualArgs<ContextOf<any>>): Promise<void>;
|
|
51
|
+
protected buildMigrationTaskForPlan(plan: ResolvedMigration[], ...args: ContextualArgs<ContextOf<any>>): TaskModel;
|
|
52
|
+
protected buildMigrationTasksForPlan(plan: ResolvedMigration[], ...args: ContextualArgs<ContextOf<any>>): VersionTask[];
|
|
53
|
+
createMigrationTask(targetVersion?: string, fromVersion?: string, ...args: ContextualArgs<ContextOf<any>>): TaskModel;
|
|
54
|
+
createMigrationTasks(targetVersion?: string, fromVersion?: string, ...args: ContextualArgs<ContextOf<any>>): VersionTask[];
|
|
55
|
+
protected migrationTaskIdsFromContext(taskKey: string, args: ContextualArgs<ContextOf<any>>): string[];
|
|
56
|
+
migrate(qr?: any, adapter?: any, ...args: MaybeContextualArg<ContextOf<any>>): Promise<R>;
|
|
57
|
+
migrateNormally(qr?: any, adapter?: any, ...args: MaybeContextualArg<ContextOf<any>>): Promise<R>;
|
|
58
|
+
migrateViaTasks(qr?: any, adapter?: any, ...args: MaybeContextualArg<ContextOf<any>>): Promise<R>;
|
|
59
|
+
track(taskIds?: string[] | string, ...args: MaybeContextualArg<ContextOf<any>>): Promise<void>;
|
|
60
|
+
retry(taskIds?: string[] | string, ...args: MaybeContextualArg<ContextOf<any>>): Promise<void>;
|
|
61
|
+
up(qr: any, adapter: any, ...args: ContextualArgs<ContextOf<any>>): Promise<void>;
|
|
62
|
+
}
|
|
63
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Migration, MigrationConfig, PersistenceMigrationConfig } from "./types.js";
|
|
2
|
+
import { ClientBasedService } from "../services/services.js";
|
|
3
|
+
import { Adapter } from "../persistence/Adapter.js";
|
|
4
|
+
import { ContextOf } from "../persistence/types.js";
|
|
5
|
+
import { ContextualArgs, MaybeContextualArg } from "../utils/ContextualLoggedClass.js";
|
|
6
|
+
import { TaskModel } from "../tasks/models/TaskModel.js";
|
|
7
|
+
import { MigrationVersioning } from "./MigrationVersioning.js";
|
|
8
|
+
type ResolvedMigration = {
|
|
9
|
+
migration: Migration<any, any>;
|
|
10
|
+
flavour: string;
|
|
11
|
+
reference: string;
|
|
12
|
+
version: string;
|
|
13
|
+
};
|
|
14
|
+
type VersionTask = {
|
|
15
|
+
version: string;
|
|
16
|
+
task: TaskModel;
|
|
17
|
+
};
|
|
18
|
+
export declare class MigrationService<PERSIST extends boolean, A extends Adapter<any, any, any, any> = any, R = void> extends ClientBasedService<PERSIST extends boolean ? A : void, MigrationConfig<PERSIST>> implements Migration<A, R> {
|
|
19
|
+
protected versioning: MigrationVersioning;
|
|
20
|
+
protected queuedTaskChain: Array<{
|
|
21
|
+
id: string;
|
|
22
|
+
version: string;
|
|
23
|
+
}>;
|
|
24
|
+
flavour?: string;
|
|
25
|
+
readonly reference: string;
|
|
26
|
+
readonly precedence: Migration<any, any> | Migration<any, any>[] | null;
|
|
27
|
+
transaction: boolean;
|
|
28
|
+
constructor();
|
|
29
|
+
static migrateAdapters<AD extends Adapter<any, any, any, any> = Adapter<any, any, any, any>>(adapters: AD[], cfg?: PersistenceMigrationConfig<AD>, ...args: MaybeContextualArg<ContextOf<AD>>): Promise<MigrationService<true, AD>[]>;
|
|
30
|
+
initialize(...args: MaybeContextualArg<ContextOf<A>>): Promise<{
|
|
31
|
+
config: MigrationConfig<PERSIST>;
|
|
32
|
+
client: PERSIST extends boolean ? A : void;
|
|
33
|
+
}>;
|
|
34
|
+
down(qr: any, adapter: any, ...args: ContextualArgs<ContextOf<any>>): Promise<void>;
|
|
35
|
+
protected normalizeVersion(raw: string, precedenceHint?: string): string;
|
|
36
|
+
protected extractPrecedenceTokens(migration: Migration<any, any>): string[];
|
|
37
|
+
protected referencesMigration(candidate: Migration<any, any>, target: ResolvedMigration): boolean;
|
|
38
|
+
protected precedenceHint(migration: Migration<any, any>): string | undefined;
|
|
39
|
+
protected compareByPrecedence(migration1: ResolvedMigration, migration2: ResolvedMigration): number;
|
|
40
|
+
protected sort(migrations: ResolvedMigration[]): ResolvedMigration[];
|
|
41
|
+
protected resolveMigration(migration: Migration<any, any>): ResolvedMigration;
|
|
42
|
+
protected shouldIncludeMigration(migration: ResolvedMigration, targetFlavour?: string, includeGeneric?: boolean): boolean;
|
|
43
|
+
protected collectMigrations(targetFlavour?: string, includeGeneric?: boolean): ResolvedMigration[];
|
|
44
|
+
protected buildExecutionPlan(options?: {
|
|
45
|
+
fromVersion?: string;
|
|
46
|
+
toVersion?: string;
|
|
47
|
+
targetFlavour?: string;
|
|
48
|
+
includeGeneric?: boolean;
|
|
49
|
+
}): ResolvedMigration[];
|
|
50
|
+
protected executeMigration(migration: ResolvedMigration, ...args: ContextualArgs<ContextOf<any>>): Promise<void>;
|
|
51
|
+
protected buildMigrationTaskForPlan(plan: ResolvedMigration[], ...args: ContextualArgs<ContextOf<any>>): TaskModel;
|
|
52
|
+
protected buildMigrationTasksForPlan(plan: ResolvedMigration[], ...args: ContextualArgs<ContextOf<any>>): VersionTask[];
|
|
53
|
+
createMigrationTask(targetVersion?: string, fromVersion?: string, ...args: ContextualArgs<ContextOf<any>>): TaskModel;
|
|
54
|
+
createMigrationTasks(targetVersion?: string, fromVersion?: string, ...args: ContextualArgs<ContextOf<any>>): VersionTask[];
|
|
55
|
+
protected migrationTaskIdsFromContext(taskKey: string, args: ContextualArgs<ContextOf<any>>): string[];
|
|
56
|
+
migrate(qr?: any, adapter?: any, ...args: MaybeContextualArg<ContextOf<any>>): Promise<R>;
|
|
57
|
+
migrateNormally(qr?: any, adapter?: any, ...args: MaybeContextualArg<ContextOf<any>>): Promise<R>;
|
|
58
|
+
migrateViaTasks(qr?: any, adapter?: any, ...args: MaybeContextualArg<ContextOf<any>>): Promise<R>;
|
|
59
|
+
track(taskIds?: string[] | string, ...args: MaybeContextualArg<ContextOf<any>>): Promise<void>;
|
|
60
|
+
retry(taskIds?: string[] | string, ...args: MaybeContextualArg<ContextOf<any>>): Promise<void>;
|
|
61
|
+
up(qr: any, adapter: any, ...args: ContextualArgs<ContextOf<any>>): Promise<void>;
|
|
62
|
+
}
|
|
63
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CompositeTaskBuilder } from "../tasks/builder.cjs";
|
|
2
|
+
import { TaskModel } from "../tasks/models/TaskModel.cjs";
|
|
3
|
+
import { MigrationStepInput } from "./MigrationTasks.cjs";
|
|
4
|
+
export declare class MigrationTaskBuilder {
|
|
5
|
+
protected readonly builder: CompositeTaskBuilder;
|
|
6
|
+
constructor(name?: string);
|
|
7
|
+
addMigrationStep(step: MigrationStepInput): this;
|
|
8
|
+
addStep(classification: string, input?: any): this;
|
|
9
|
+
build(): TaskModel;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CompositeTaskBuilder } from "../tasks/builder.js";
|
|
2
|
+
import { TaskModel } from "../tasks/models/TaskModel.js";
|
|
3
|
+
import { MigrationStepInput } from "./MigrationTasks.js";
|
|
4
|
+
export declare class MigrationTaskBuilder {
|
|
5
|
+
protected readonly builder: CompositeTaskBuilder;
|
|
6
|
+
constructor(name?: string);
|
|
7
|
+
addMigrationStep(step: MigrationStepInput): this;
|
|
8
|
+
addStep(classification: string, input?: any): this;
|
|
9
|
+
build(): TaskModel;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TaskHandler } from "../tasks/TaskHandler.cjs";
|
|
2
|
+
import { TaskContext } from "../tasks/TaskContext.cjs";
|
|
3
|
+
export interface MigrationStepInput {
|
|
4
|
+
reference: string;
|
|
5
|
+
args?: any[];
|
|
6
|
+
}
|
|
7
|
+
export declare class MigrationTask extends TaskHandler<MigrationStepInput, void> {
|
|
8
|
+
run(input: MigrationStepInput, ctx: TaskContext): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TaskHandler } from "../tasks/TaskHandler.js";
|
|
2
|
+
import { TaskContext } from "../tasks/TaskContext.js";
|
|
3
|
+
export interface MigrationStepInput {
|
|
4
|
+
reference: string;
|
|
5
|
+
args?: any[];
|
|
6
|
+
}
|
|
7
|
+
export declare class MigrationTask extends TaskHandler<MigrationStepInput, void> {
|
|
8
|
+
run(input: MigrationStepInput, ctx: TaskContext): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MigrationVersioning } from "./MigrationVersioning.cjs";
|
|
2
|
+
export declare class SemverMigrationVersioning implements MigrationVersioning {
|
|
3
|
+
private coerce;
|
|
4
|
+
private slug;
|
|
5
|
+
isVersionHint(value: string): boolean;
|
|
6
|
+
normalize(reference: string, precedenceHint?: string): string;
|
|
7
|
+
compare(a: string, b: string): number;
|
|
8
|
+
gt(a: string, b: string): boolean;
|
|
9
|
+
lte(a: string, b: string): boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MigrationVersioning } from "./MigrationVersioning.js";
|
|
2
|
+
export declare class SemverMigrationVersioning implements MigrationVersioning {
|
|
3
|
+
private coerce;
|
|
4
|
+
private slug;
|
|
5
|
+
isVersionHint(value: string): boolean;
|
|
6
|
+
normalize(reference: string, precedenceHint?: string): string;
|
|
7
|
+
compare(a: string, b: string): number;
|
|
8
|
+
gt(a: string, b: string): boolean;
|
|
9
|
+
lte(a: string, b: string): boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MigrationVersioning } from "./MigrationVersioning.cjs";
|
|
2
|
+
/**
|
|
3
|
+
* Legacy non-semver migration ordering strategy.
|
|
4
|
+
* Keeps references as-is and compares using lexical order.
|
|
5
|
+
*/
|
|
6
|
+
export declare class StandardMigrationVersioning implements MigrationVersioning {
|
|
7
|
+
isVersionHint(value: string): boolean;
|
|
8
|
+
normalize(reference: string, precedenceHint?: string): string;
|
|
9
|
+
compare(a: string, b: string): number;
|
|
10
|
+
gt(a: string, b: string): boolean;
|
|
11
|
+
lte(a: string, b: string): boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MigrationVersioning } from "./MigrationVersioning.js";
|
|
2
|
+
/**
|
|
3
|
+
* Legacy non-semver migration ordering strategy.
|
|
4
|
+
* Keeps references as-is and compares using lexical order.
|
|
5
|
+
*/
|
|
6
|
+
export declare class StandardMigrationVersioning implements MigrationVersioning {
|
|
7
|
+
isVersionHint(value: string): boolean;
|
|
8
|
+
normalize(reference: string, precedenceHint?: string): string;
|
|
9
|
+
compare(a: string, b: string): number;
|
|
10
|
+
gt(a: string, b: string): boolean;
|
|
11
|
+
lte(a: string, b: string): boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Constructor } from "@decaf-ts/decoration";
|
|
2
|
+
import { Migration, MigrationRule } from "./types.cjs";
|
|
3
|
+
export declare function migration(reference: string): (target: object) => any;
|
|
4
|
+
export declare function migration(reference: string, precedence: Constructor<Migration<any, any>> | null): (target: object) => any;
|
|
5
|
+
export declare function migration(reference: string, flavour: string, rules?: MigrationRule[]): (target: object) => any;
|
|
6
|
+
export declare function migration(reference: string, precedence: Constructor<Migration<any, any>>, flavour: string): (target: object) => any;
|
|
7
|
+
export declare function migration(reference: string, precedence?: Constructor<Migration<any, any>> | string | null, flavour?: string | MigrationRule[], rules?: MigrationRule[]): (target: object) => any;
|
|
8
|
+
export declare function migration(reference: string, opts?: {
|
|
9
|
+
precedence?: Constructor<Migration<any, any>> | string | null;
|
|
10
|
+
flavour?: string;
|
|
11
|
+
rules?: MigrationRule[];
|
|
12
|
+
}): (target: object) => any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Constructor } from "@decaf-ts/decoration";
|
|
2
|
+
import { Migration, MigrationRule } from "./types.js";
|
|
3
|
+
export declare function migration(reference: string): (target: object) => any;
|
|
4
|
+
export declare function migration(reference: string, precedence: Constructor<Migration<any, any>> | null): (target: object) => any;
|
|
5
|
+
export declare function migration(reference: string, flavour: string, rules?: MigrationRule[]): (target: object) => any;
|
|
6
|
+
export declare function migration(reference: string, precedence: Constructor<Migration<any, any>>, flavour: string): (target: object) => any;
|
|
7
|
+
export declare function migration(reference: string, precedence?: Constructor<Migration<any, any>> | string | null, flavour?: string | MigrationRule[], rules?: MigrationRule[]): (target: object) => any;
|
|
8
|
+
export declare function migration(reference: string, opts?: {
|
|
9
|
+
precedence?: Constructor<Migration<any, any>> | string | null;
|
|
10
|
+
flavour?: string;
|
|
11
|
+
rules?: MigrationRule[];
|
|
12
|
+
}): (target: object) => any;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Exports for the migrations module.
|
|
3
|
+
* @summary This file exports all the necessary components for the migrations functionality, including constants, decorators, and more.
|
|
4
|
+
* @module core/migrations
|
|
5
|
+
*/
|
|
6
|
+
import "../overrides";
|
|
7
|
+
export * from "./constants.cjs";
|
|
8
|
+
export * from "./decorators.cjs";
|
|
9
|
+
export * from "./Migration.cjs";
|
|
10
|
+
export * from "./MigrationService.cjs";
|
|
11
|
+
export * from "./MigrationTaskBuilder.cjs";
|
|
12
|
+
export * from "./MigrationTasks.cjs";
|
|
13
|
+
export * from "./StandardMigrationVersioning.cjs";
|
|
14
|
+
export * from "./MigrationVersioning.cjs";
|
|
15
|
+
export * from "./types.cjs";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Exports for the migrations module.
|
|
3
|
+
* @summary This file exports all the necessary components for the migrations functionality, including constants, decorators, and more.
|
|
4
|
+
* @module core/migrations
|
|
5
|
+
*/
|
|
6
|
+
import "../overrides";
|
|
7
|
+
export * from "./constants.js";
|
|
8
|
+
export * from "./decorators.js";
|
|
9
|
+
export * from "./Migration.js";
|
|
10
|
+
export * from "./MigrationService.js";
|
|
11
|
+
export * from "./MigrationTaskBuilder.js";
|
|
12
|
+
export * from "./MigrationTasks.js";
|
|
13
|
+
export * from "./StandardMigrationVersioning.js";
|
|
14
|
+
export * from "./MigrationVersioning.js";
|
|
15
|
+
export * from "./types.js";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Adapter } from "../persistence/Adapter.cjs";
|
|
2
|
+
import { AdapterFlags, ContextOf } from "../persistence/types.cjs";
|
|
3
|
+
import { ContextualArgs } from "../utils/ContextualLoggedClass.cjs";
|
|
4
|
+
import { TaskService } from "../tasks/TaskService.cjs";
|
|
5
|
+
import type { MigrationVersioning } from "./MigrationVersioning.cjs";
|
|
6
|
+
export interface Migration<A extends Adapter<any, any, any, any>, R = void> {
|
|
7
|
+
flavour?: string;
|
|
8
|
+
precedence: Migration<any, any> | Migration<any, any>[] | string | null;
|
|
9
|
+
reference: string;
|
|
10
|
+
transaction: boolean;
|
|
11
|
+
up(qr: ConnectionForAdapter<A>, adapter: A, ...args: ContextualArgs<ContextOf<A>>): Promise<void>;
|
|
12
|
+
migrate(qr: ConnectionForAdapter<A>, adapter: A, ...args: ContextualArgs<ContextOf<A>>): Promise<R>;
|
|
13
|
+
down(qr: ConnectionForAdapter<A>, adapter: A, ...args: ContextualArgs<ContextOf<A>>): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
export type ConnectionForAdapter<A extends Adapter<any, any, any, any>> = A extends Adapter<any, any, infer CONN, any> ? CONN : never;
|
|
16
|
+
export type MigrationRule<A extends Adapter<any, any, any, any> = any, QUERYRUNNER = ConnectionForAdapter<A>> = (qr: QUERYRUNNER, adapter: A, ctx: ContextOf<A>) => Promise<boolean>;
|
|
17
|
+
export type MigrationMetadata = {
|
|
18
|
+
precedence?: Migration<any, any> | string;
|
|
19
|
+
flavour: string;
|
|
20
|
+
rules?: MigrationRule[];
|
|
21
|
+
};
|
|
22
|
+
export type RetrieveLastVersionHandler<A extends Adapter<any, any, any, any> = Adapter<any, any, any, any>> = (adapter: A, ...args: ContextualArgs<ContextOf<A>>) => Promise<string | undefined | null>;
|
|
23
|
+
export type SetCurrentVersionHandler<A extends Adapter<any, any, any, any> = Adapter<any, any, any, any>> = (version: string, adapter: A, ...args: ContextualArgs<ContextOf<A>>) => Promise<void>;
|
|
24
|
+
export type AdapterMigrationHandlers<AD extends Adapter<any, any, any, any> = Adapter<any, any, any, any>> = {
|
|
25
|
+
retrieveLastVersion?: RetrieveLastVersionHandler<AD>;
|
|
26
|
+
setCurrentVersion?: SetCurrentVersionHandler<AD>;
|
|
27
|
+
};
|
|
28
|
+
export type PersistenceMigrationConfig<AD extends Adapter<any, any, any, any> = Adapter<any, any, any, any>> = {
|
|
29
|
+
toVersion?: string;
|
|
30
|
+
taskMode?: boolean;
|
|
31
|
+
dryRun?: boolean;
|
|
32
|
+
flavours?: string[];
|
|
33
|
+
taskService?: TaskService<any>;
|
|
34
|
+
handlers?: Partial<Record<string, AdapterMigrationHandlers<AD>>>;
|
|
35
|
+
};
|
|
36
|
+
export type MigrationConfig<PERSIST extends boolean> = AdapterFlags<any> & {
|
|
37
|
+
persistMigrationSteps: PERSIST;
|
|
38
|
+
persistenceFlavour?: string;
|
|
39
|
+
targetVersion?: string;
|
|
40
|
+
taskMode?: boolean;
|
|
41
|
+
includeGenericInTaskMode?: boolean;
|
|
42
|
+
retrieveLastVersion?: RetrieveLastVersionHandler;
|
|
43
|
+
setCurrentVersion?: SetCurrentVersionHandler;
|
|
44
|
+
taskService?: TaskService<any>;
|
|
45
|
+
versioning?: MigrationVersioning;
|
|
46
|
+
};
|