@decaf-ts/core 0.18.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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RamStatement = void 0;
|
|
4
|
-
const
|
|
4
|
+
const index_js_1 = require("./../query/index.cjs");
|
|
5
5
|
const db_decorators_1 = require("@decaf-ts/db-decorators");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
6
|
+
const Statement_js_1 = require("./../query/Statement.cjs");
|
|
7
|
+
const constants_js_1 = require("./../repository/constants.cjs");
|
|
8
8
|
const decoration_1 = require("@decaf-ts/decoration");
|
|
9
9
|
/**
|
|
10
10
|
* @description RAM-specific query statement builder
|
|
@@ -33,7 +33,7 @@ const decoration_1 = require("@decaf-ts/decoration");
|
|
|
33
33
|
* .execute();
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
|
-
class RamStatement extends
|
|
36
|
+
class RamStatement extends Statement_js_1.Statement {
|
|
37
37
|
constructor(adapter, overrides) {
|
|
38
38
|
super(adapter, overrides);
|
|
39
39
|
}
|
|
@@ -50,7 +50,7 @@ class RamStatement extends Statement_1.Statement {
|
|
|
50
50
|
throw new db_decorators_1.InternalError("orderBySelectors not set. Should be impossible");
|
|
51
51
|
for (const [key, direction] of selectors) {
|
|
52
52
|
const normalizedDirection = String(direction).toLowerCase();
|
|
53
|
-
const directionFactor = normalizedDirection ===
|
|
53
|
+
const directionFactor = normalizedDirection === constants_js_1.OrderDirection.ASC ? 1 : -1;
|
|
54
54
|
const comparison = this.compareByKey(el1, el2, key);
|
|
55
55
|
if (comparison !== 0)
|
|
56
56
|
return directionFactor * comparison;
|
|
@@ -85,7 +85,7 @@ class RamStatement extends Statement_1.Statement {
|
|
|
85
85
|
default:
|
|
86
86
|
break;
|
|
87
87
|
}
|
|
88
|
-
throw new
|
|
88
|
+
throw new index_js_1.QueryError(`sorting not supported for type ${resolvedType}`);
|
|
89
89
|
}
|
|
90
90
|
compareBooleans(a, b) {
|
|
91
91
|
return a === b ? 0 : a ? 1 : -1;
|
|
@@ -182,60 +182,60 @@ class RamStatement extends Statement_1.Statement {
|
|
|
182
182
|
return {
|
|
183
183
|
where: (m) => {
|
|
184
184
|
const { attr1, operator, comparison } = condition;
|
|
185
|
-
if ([
|
|
185
|
+
if ([index_js_1.GroupOperator.AND, index_js_1.GroupOperator.OR, index_js_1.Operator.NOT].indexOf(operator) === -1) {
|
|
186
186
|
switch (operator) {
|
|
187
|
-
case
|
|
187
|
+
case index_js_1.Operator.BIGGER:
|
|
188
188
|
return m[attr1] > comparison;
|
|
189
|
-
case
|
|
189
|
+
case index_js_1.Operator.BIGGER_EQ:
|
|
190
190
|
return m[attr1] >= comparison;
|
|
191
|
-
case
|
|
191
|
+
case index_js_1.Operator.DIFFERENT:
|
|
192
192
|
return m[attr1] !== comparison;
|
|
193
|
-
case
|
|
193
|
+
case index_js_1.Operator.EQUAL:
|
|
194
194
|
return m[attr1] === comparison;
|
|
195
|
-
case
|
|
195
|
+
case index_js_1.Operator.REGEXP:
|
|
196
196
|
if (typeof m[attr1] !== "string")
|
|
197
|
-
throw new
|
|
197
|
+
throw new index_js_1.QueryError(`Invalid regexp comparison on a non string attribute: ${m[attr1]}`);
|
|
198
198
|
return !!m[attr1].match(new RegExp(comparison, "g"));
|
|
199
|
-
case
|
|
199
|
+
case index_js_1.Operator.STARTS_WITH: {
|
|
200
200
|
const attr = attr1;
|
|
201
201
|
const attrName = attr;
|
|
202
202
|
const attrValue = m[attr];
|
|
203
203
|
if (typeof attrValue !== "string") {
|
|
204
|
-
throw new
|
|
204
|
+
throw new index_js_1.QueryError(`Invalid startsWith comparison on a non string attribute "${attrName}"`);
|
|
205
205
|
}
|
|
206
206
|
if (typeof comparison !== "string") {
|
|
207
|
-
throw new
|
|
207
|
+
throw new index_js_1.QueryError(`STARTS_WITH operator requires a string comparison, got ${typeof comparison}`);
|
|
208
208
|
}
|
|
209
209
|
return attrValue.startsWith(comparison);
|
|
210
210
|
}
|
|
211
|
-
case
|
|
211
|
+
case index_js_1.Operator.ENDS_WITH: {
|
|
212
212
|
const attr = attr1;
|
|
213
213
|
const attrName = attr;
|
|
214
214
|
const attrValue = m[attr];
|
|
215
215
|
if (typeof attrValue !== "string") {
|
|
216
|
-
throw new
|
|
216
|
+
throw new index_js_1.QueryError(`Invalid endsWith comparison on a non string attribute "${attrName}"`);
|
|
217
217
|
}
|
|
218
218
|
if (typeof comparison !== "string") {
|
|
219
|
-
throw new
|
|
219
|
+
throw new index_js_1.QueryError(`ENDS_WITH operator requires a string comparison, got ${typeof comparison}`);
|
|
220
220
|
}
|
|
221
221
|
return attrValue.endsWith(comparison);
|
|
222
222
|
}
|
|
223
|
-
case
|
|
223
|
+
case index_js_1.Operator.SMALLER:
|
|
224
224
|
return m[attr1] < comparison;
|
|
225
|
-
case
|
|
225
|
+
case index_js_1.Operator.SMALLER_EQ:
|
|
226
226
|
return m[attr1] <= comparison;
|
|
227
|
-
case
|
|
227
|
+
case index_js_1.Operator.IN:
|
|
228
228
|
if (!Array.isArray(comparison))
|
|
229
|
-
throw new
|
|
229
|
+
throw new index_js_1.QueryError(`IN operator requires an array, got: ${typeof comparison}`);
|
|
230
230
|
return comparison.includes(m[attr1]);
|
|
231
|
-
case
|
|
231
|
+
case index_js_1.Operator.BETWEEN: {
|
|
232
232
|
if (!Array.isArray(comparison) || comparison.length !== 2)
|
|
233
|
-
throw new
|
|
233
|
+
throw new index_js_1.QueryError(`BETWEEN operator requires an array with 2 values [min, max], got: ${JSON.stringify(comparison)}`);
|
|
234
234
|
const attr = attr1;
|
|
235
235
|
const attrName = attr;
|
|
236
236
|
const attrType = this.determineAttributeType(m.constructor, attrName, "BETWEEN");
|
|
237
237
|
if (!this.isNumericType(attrType) && attrType !== "date") {
|
|
238
|
-
throw new
|
|
238
|
+
throw new index_js_1.QueryError(`BETWEEN operator requires numeric or date attributes, but "${attrName}" is ${attrType ||
|
|
239
239
|
"unknown"}`);
|
|
240
240
|
}
|
|
241
241
|
const [min, max] = comparison;
|
|
@@ -251,8 +251,8 @@ class RamStatement extends Statement_1.Statement {
|
|
|
251
251
|
throw new db_decorators_1.InternalError(`Invalid operator for standard comparisons: ${operator}`);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
else if (operator ===
|
|
255
|
-
if (!(attr1 instanceof
|
|
254
|
+
else if (operator === index_js_1.Operator.NOT) {
|
|
255
|
+
if (!(attr1 instanceof index_js_1.Condition)) {
|
|
256
256
|
throw new db_decorators_1.InternalError("NOT operator requires a nested condition to negate");
|
|
257
257
|
}
|
|
258
258
|
const nested = this.parseCondition(attr1);
|
|
@@ -262,9 +262,9 @@ class RamStatement extends Statement_1.Statement {
|
|
|
262
262
|
const op1 = this.parseCondition(attr1);
|
|
263
263
|
const op2 = this.parseCondition(comparison);
|
|
264
264
|
switch (operator) {
|
|
265
|
-
case
|
|
265
|
+
case index_js_1.GroupOperator.AND:
|
|
266
266
|
return op1.where(m) && op2.where(m);
|
|
267
|
-
case
|
|
267
|
+
case index_js_1.GroupOperator.OR:
|
|
268
268
|
return op1.where(m) || op2.where(m);
|
|
269
269
|
default:
|
|
270
270
|
throw new db_decorators_1.InternalError(`Invalid operator for And/Or comparisons: ${operator}`);
|
|
@@ -286,7 +286,7 @@ class RamStatement extends Statement_1.Statement {
|
|
|
286
286
|
const attr = selector;
|
|
287
287
|
const type = this.determineAttributeType(this.fromSelector, attr, context);
|
|
288
288
|
if (!predicate(type)) {
|
|
289
|
-
throw new
|
|
289
|
+
throw new index_js_1.QueryError(`${context} requires a ${description} attribute, but "${attr}" is ${type || "unknown"}`);
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
292
|
determineAttributeType(clazz, attr, context) {
|
|
@@ -295,7 +295,7 @@ class RamStatement extends Statement_1.Statement {
|
|
|
295
295
|
decoration_1.Metadata.getPropDesignTypes(clazz, propKey)?.designType;
|
|
296
296
|
const resolved = this.normalizeMetaType(metaType);
|
|
297
297
|
if (!resolved) {
|
|
298
|
-
throw new
|
|
298
|
+
throw new index_js_1.QueryError(`${context} could not resolve property type for "${attr}"`);
|
|
299
299
|
}
|
|
300
300
|
return resolved;
|
|
301
301
|
}
|
|
@@ -315,17 +315,17 @@ class RamStatement extends Statement_1.Statement {
|
|
|
315
315
|
if (value == null) {
|
|
316
316
|
if (options?.allowNull)
|
|
317
317
|
return null;
|
|
318
|
-
throw new
|
|
318
|
+
throw new index_js_1.QueryError(`${context} requires a value for "${attrName}"`);
|
|
319
319
|
}
|
|
320
320
|
switch (attrType) {
|
|
321
321
|
case "date":
|
|
322
322
|
if (!(value instanceof Date)) {
|
|
323
|
-
throw new
|
|
323
|
+
throw new index_js_1.QueryError(`${context} on date attribute "${attrName}" requires Date values`);
|
|
324
324
|
}
|
|
325
325
|
return value.getTime();
|
|
326
326
|
case "number":
|
|
327
327
|
if (typeof value !== "number") {
|
|
328
|
-
throw new
|
|
328
|
+
throw new index_js_1.QueryError(`${context} on numeric attribute "${attrName}" requires number values`);
|
|
329
329
|
}
|
|
330
330
|
return value;
|
|
331
331
|
case "bigint":
|
|
@@ -333,11 +333,12 @@ class RamStatement extends Statement_1.Statement {
|
|
|
333
333
|
return value;
|
|
334
334
|
if (typeof value === "bigint")
|
|
335
335
|
return Number(value);
|
|
336
|
-
throw new
|
|
336
|
+
throw new index_js_1.QueryError(`${context} on bigint attribute "${attrName}" requires numeric values`);
|
|
337
337
|
default:
|
|
338
|
-
throw new
|
|
338
|
+
throw new index_js_1.QueryError(`${context} unsupported type "${attrType}" for attribute "${attrName}"`);
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
exports.RamStatement = RamStatement;
|
|
343
|
+
//# sourceMappingURL=RamStatement.js.map
|
|
343
344
|
//# sourceMappingURL=RamStatement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RamStatement.js","sourceRoot":"","sources":["RamStat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[],"mappings":";;;AAAA;;;;;;GAMG;AACU,QAAA,UAAU,GAAG,KAAK,CAAC;AAChC,qCAAqC"}
|
package/lib/cjs/ram/handlers.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createdByOnRamCreateUpdate = createdByOnRamCreateUpdate;
|
|
4
|
-
const
|
|
4
|
+
const index_js_1 = require("./../persistence/index.cjs");
|
|
5
5
|
/**
|
|
6
6
|
* @description Sets the created by field on a model during RAM create/update operations
|
|
7
7
|
* @summary Automatically populates a model field with the UUID from the context during create or update operations.
|
|
@@ -24,7 +24,8 @@ const persistence_1 = require("./../persistence/index.cjs");
|
|
|
24
24
|
async function createdByOnRamCreateUpdate(context, data, key, model) {
|
|
25
25
|
const uuid = context.get("UUID");
|
|
26
26
|
if (!uuid)
|
|
27
|
-
throw new
|
|
27
|
+
throw new index_js_1.UnsupportedError("This adapter does not support user identification");
|
|
28
28
|
model[key] = uuid;
|
|
29
29
|
}
|
|
30
|
+
//# sourceMappingURL=handlers.js.map
|
|
30
31
|
//# sourceMappingURL=handlers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlers.js","sourceRoot":"","sources":["handlers.js"],"names":[],"mappings":";;AAoBA,gEAKC;AAzBD,wDAA6D;AAC7D;;;;;;;;;;;;;;;;;;GAkBG;AACI,KAAK,UAAU,0BAA0B,CAAC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK;IACtE,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACjC,IAAI,CAAC,IAAI;QACL,MAAM,IAAI,2BAAgB,CAAC,mDAAmD,CAAC,CAAC;IACpF,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;AACtB,CAAC;AACD,oCAAoC"}
|
package/lib/cjs/ram/index.cjs
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @description Exports for the ram module.
|
|
4
|
-
* @summary This file exports all the necessary components for the ram functionality, including the RamAdapter, constants, handlers, and more.
|
|
5
|
-
* @module core/ram
|
|
6
|
-
*/
|
|
7
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
3
|
if (k2 === undefined) k2 = k;
|
|
9
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -19,10 +14,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
19
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
15
|
};
|
|
21
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/**
|
|
18
|
+
* @description Exports for the ram module.
|
|
19
|
+
* @summary This file exports all the necessary components for the ram functionality, including the RamAdapter, constants, handlers, and more.
|
|
20
|
+
* @module core/ram
|
|
21
|
+
*/
|
|
22
22
|
require("./../overrides/index.cjs");
|
|
23
|
-
const
|
|
23
|
+
const RamAdapter_js_1 = require("./RamAdapter.cjs");
|
|
24
24
|
// Invoked there to ensure decoration override
|
|
25
|
-
|
|
25
|
+
RamAdapter_js_1.RamAdapter.decoration();
|
|
26
26
|
__exportStar(require("./constants.cjs"), exports);
|
|
27
27
|
__exportStar(require("./handlers.cjs"), exports);
|
|
28
28
|
__exportStar(require("./RamPaginator.cjs"), exports);
|
|
@@ -30,4 +30,5 @@ __exportStar(require("./RamStatement.cjs"), exports);
|
|
|
30
30
|
__exportStar(require("./types.cjs"), exports);
|
|
31
31
|
// left to last on purpose
|
|
32
32
|
__exportStar(require("./RamAdapter.cjs"), exports);
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
33
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,mCAAiC;AACjC,mDAA6C;AAC7C,8CAA8C;AAC9C,0BAAU,CAAC,UAAU,EAAE,CAAC;AACxB,iDAA+B;AAC/B,gDAA8B;AAC9B,oDAAkC;AAClC,oDAAkC;AAClC,6CAA2B;AAC3B,0BAA0B;AAC1B,kDAAgC;AAChC,iCAAiC"}
|
package/lib/cjs/ram/types.cjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["types.js"],"names":[],"mappings":";;AACA,iCAAiC"}
|