@warlock.js/cascade 5.28.0 → 5.30.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/CHANGELOG.md +12 -0
- package/cjs/index.cjs +101 -101
- package/cjs/index.cjs.map +1 -1
- package/esm/context/database-data-source-context.d.mts +1 -1
- package/esm/context/database-data-source-context.d.mts.map +1 -1
- package/esm/context/database-data-source-context.mjs +1 -1
- package/esm/context/database-data-source-context.mjs.map +1 -1
- package/esm/context/database-transaction-context.d.mts +1 -1
- package/esm/context/database-transaction-context.d.mts.map +1 -1
- package/esm/context/database-transaction-context.mjs +1 -1
- package/esm/context/database-transaction-context.mjs.map +1 -1
- package/esm/contracts/database-driver.contract.d.mts +1 -1
- package/esm/contracts/database-driver.contract.d.mts.map +1 -1
- package/esm/contracts/database-id-generator.contract.d.mts +1 -1
- package/esm/contracts/database-id-generator.contract.d.mts.map +1 -1
- package/esm/contracts/database-remover.contract.d.mts +1 -1
- package/esm/contracts/database-remover.contract.d.mts.map +1 -1
- package/esm/contracts/database-restorer.contract.d.mts +1 -1
- package/esm/contracts/database-restorer.contract.d.mts.map +1 -1
- package/esm/contracts/database-writer.contract.d.mts +1 -1
- package/esm/contracts/database-writer.contract.d.mts.map +1 -1
- package/esm/contracts/driver-blueprint.contract.d.mts +1 -1
- package/esm/contracts/driver-blueprint.contract.d.mts.map +1 -1
- package/esm/contracts/migration-driver.contract.d.mts +1 -1
- package/esm/contracts/migration-driver.contract.d.mts.map +1 -1
- package/esm/contracts/query-builder.contract.d.mts +1 -1
- package/esm/contracts/query-builder.contract.d.mts.map +1 -1
- package/esm/contracts/sync-adapter.contract.d.mts +1 -1
- package/esm/contracts/sync-adapter.contract.d.mts.map +1 -1
- package/esm/data-source/data-source-registry.d.mts +1 -1
- package/esm/data-source/data-source-registry.d.mts.map +1 -1
- package/esm/data-source/data-source-registry.mjs +1 -1
- package/esm/data-source/data-source-registry.mjs.map +1 -1
- package/esm/data-source/data-source.d.mts +1 -1
- package/esm/data-source/data-source.d.mts.map +1 -1
- package/esm/data-source/data-source.mjs +1 -1
- package/esm/data-source/data-source.mjs.map +1 -1
- package/esm/database-dirty-tracker.d.mts +1 -1
- package/esm/database-dirty-tracker.d.mts.map +1 -1
- package/esm/database-dirty-tracker.mjs +1 -1
- package/esm/database-dirty-tracker.mjs.map +1 -1
- package/esm/drivers/mongodb/mongodb-blueprint.mjs +1 -1
- package/esm/drivers/mongodb/mongodb-blueprint.mjs.map +1 -1
- package/esm/drivers/mongodb/mongodb-driver.d.mts +1 -1
- package/esm/drivers/mongodb/mongodb-driver.d.mts.map +1 -1
- package/esm/drivers/mongodb/mongodb-driver.mjs +1 -1
- package/esm/drivers/mongodb/mongodb-driver.mjs.map +1 -1
- package/esm/drivers/mongodb/mongodb-id-generator.d.mts +1 -1
- package/esm/drivers/mongodb/mongodb-id-generator.d.mts.map +1 -1
- package/esm/drivers/mongodb/mongodb-id-generator.mjs +1 -1
- package/esm/drivers/mongodb/mongodb-id-generator.mjs.map +1 -1
- package/esm/drivers/mongodb/mongodb-migration-driver.d.mts +1 -1
- package/esm/drivers/mongodb/mongodb-migration-driver.d.mts.map +1 -1
- package/esm/drivers/mongodb/mongodb-migration-driver.mjs +1 -1
- package/esm/drivers/mongodb/mongodb-migration-driver.mjs.map +1 -1
- package/esm/drivers/mongodb/mongodb-query-builder.d.mts +1 -1
- package/esm/drivers/mongodb/mongodb-query-builder.d.mts.map +1 -1
- package/esm/drivers/mongodb/mongodb-query-builder.mjs +1 -1
- package/esm/drivers/mongodb/mongodb-query-builder.mjs.map +1 -1
- package/esm/drivers/mongodb/mongodb-query-operations.d.mts +1 -1
- package/esm/drivers/mongodb/mongodb-query-operations.d.mts.map +1 -1
- package/esm/drivers/mongodb/mongodb-query-operations.mjs +1 -1
- package/esm/drivers/mongodb/mongodb-query-operations.mjs.map +1 -1
- package/esm/drivers/mongodb/mongodb-query-parser.d.mts +1 -1
- package/esm/drivers/mongodb/mongodb-query-parser.d.mts.map +1 -1
- package/esm/drivers/mongodb/mongodb-query-parser.mjs +1 -1
- package/esm/drivers/mongodb/mongodb-query-parser.mjs.map +1 -1
- package/esm/drivers/mongodb/mongodb-sync-adapter.d.mts +1 -1
- package/esm/drivers/mongodb/mongodb-sync-adapter.d.mts.map +1 -1
- package/esm/drivers/mongodb/mongodb-sync-adapter.mjs +1 -1
- package/esm/drivers/mongodb/mongodb-sync-adapter.mjs.map +1 -1
- package/esm/drivers/mongodb/mongodb-update-translator.mjs +1 -1
- package/esm/drivers/mongodb/mongodb-update-translator.mjs.map +1 -1
- package/esm/drivers/mongodb/pipeline-stage-object.mjs +1 -1
- package/esm/drivers/mongodb/pipeline-stage-object.mjs.map +1 -1
- package/esm/drivers/mongodb/types.d.mts +1 -1
- package/esm/drivers/mongodb/types.d.mts.map +1 -1
- package/esm/drivers/postgres/naming.mjs +1 -1
- package/esm/drivers/postgres/naming.mjs.map +1 -1
- package/esm/drivers/postgres/postgres-blueprint.d.mts +1 -1
- package/esm/drivers/postgres/postgres-blueprint.d.mts.map +1 -1
- package/esm/drivers/postgres/postgres-blueprint.mjs +1 -1
- package/esm/drivers/postgres/postgres-blueprint.mjs.map +1 -1
- package/esm/drivers/postgres/postgres-dialect.d.mts +1 -1
- package/esm/drivers/postgres/postgres-dialect.d.mts.map +1 -1
- package/esm/drivers/postgres/postgres-dialect.mjs +1 -1
- package/esm/drivers/postgres/postgres-dialect.mjs.map +1 -1
- package/esm/drivers/postgres/postgres-driver.d.mts +1 -1
- package/esm/drivers/postgres/postgres-driver.d.mts.map +1 -1
- package/esm/drivers/postgres/postgres-driver.mjs +1 -1
- package/esm/drivers/postgres/postgres-driver.mjs.map +1 -1
- package/esm/drivers/postgres/postgres-migration-driver.d.mts +1 -1
- package/esm/drivers/postgres/postgres-migration-driver.d.mts.map +1 -1
- package/esm/drivers/postgres/postgres-migration-driver.mjs +1 -1
- package/esm/drivers/postgres/postgres-migration-driver.mjs.map +1 -1
- package/esm/drivers/postgres/postgres-query-builder.d.mts +1 -1
- package/esm/drivers/postgres/postgres-query-builder.d.mts.map +1 -1
- package/esm/drivers/postgres/postgres-query-builder.mjs +1 -1
- package/esm/drivers/postgres/postgres-query-builder.mjs.map +1 -1
- package/esm/drivers/postgres/postgres-query-parser.d.mts +1 -1
- package/esm/drivers/postgres/postgres-query-parser.d.mts.map +1 -1
- package/esm/drivers/postgres/postgres-query-parser.mjs +1 -1
- package/esm/drivers/postgres/postgres-query-parser.mjs.map +1 -1
- package/esm/drivers/postgres/postgres-sql-serializer.mjs +1 -1
- package/esm/drivers/postgres/postgres-sql-serializer.mjs.map +1 -1
- package/esm/drivers/postgres/postgres-ttl-purge.mjs +1 -1
- package/esm/drivers/postgres/postgres-ttl-purge.mjs.map +1 -1
- package/esm/drivers/postgres/postgres-type-converters.mjs +1 -1
- package/esm/drivers/postgres/postgres-type-converters.mjs.map +1 -1
- package/esm/drivers/postgres/postgres-update-validator.mjs +1 -1
- package/esm/drivers/postgres/postgres-update-validator.mjs.map +1 -1
- package/esm/drivers/postgres/types.d.mts +1 -1
- package/esm/drivers/postgres/types.d.mts.map +1 -1
- package/esm/drivers/sql/sql-dialect.contract.d.mts +1 -1
- package/esm/drivers/sql/sql-dialect.contract.d.mts.map +1 -1
- package/esm/drivers/sql/sql-types.d.mts +1 -1
- package/esm/drivers/sql/sql-types.d.mts.map +1 -1
- package/esm/errors/missing-data-source.error.d.mts +1 -1
- package/esm/errors/missing-data-source.error.d.mts.map +1 -1
- package/esm/errors/missing-data-source.error.mjs +1 -1
- package/esm/errors/missing-data-source.error.mjs.map +1 -1
- package/esm/errors/transaction-rollback.error.d.mts +1 -1
- package/esm/errors/transaction-rollback.error.d.mts.map +1 -1
- package/esm/errors/transaction-rollback.error.mjs +1 -1
- package/esm/errors/transaction-rollback.error.mjs.map +1 -1
- package/esm/errors/undefined-where-value.error.d.mts +1 -1
- package/esm/errors/undefined-where-value.error.d.mts.map +1 -1
- package/esm/errors/undefined-where-value.error.mjs +1 -1
- package/esm/errors/undefined-where-value.error.mjs.map +1 -1
- package/esm/errors/unsafe-filter.error.d.mts +1 -1
- package/esm/errors/unsafe-filter.error.d.mts.map +1 -1
- package/esm/errors/unsafe-filter.error.mjs +1 -1
- package/esm/errors/unsafe-filter.error.mjs.map +1 -1
- package/esm/errors/unsafe-raw-expression.error.d.mts +1 -1
- package/esm/errors/unsafe-raw-expression.error.d.mts.map +1 -1
- package/esm/errors/unsafe-raw-expression.error.mjs +1 -1
- package/esm/errors/unsafe-raw-expression.error.mjs.map +1 -1
- package/esm/errors/unsupported-lean-operation.error.d.mts +1 -1
- package/esm/errors/unsupported-lean-operation.error.d.mts.map +1 -1
- package/esm/errors/unsupported-lean-operation.error.mjs +1 -1
- package/esm/errors/unsupported-lean-operation.error.mjs.map +1 -1
- package/esm/errors/unsupported-lock-for-update.error.d.mts +1 -1
- package/esm/errors/unsupported-lock-for-update.error.d.mts.map +1 -1
- package/esm/errors/unsupported-lock-for-update.error.mjs +1 -1
- package/esm/errors/unsupported-lock-for-update.error.mjs.map +1 -1
- package/esm/errors/unsupported-query-operation.error.d.mts +1 -1
- package/esm/errors/unsupported-query-operation.error.d.mts.map +1 -1
- package/esm/errors/unsupported-query-operation.error.mjs +1 -1
- package/esm/errors/unsupported-query-operation.error.mjs.map +1 -1
- package/esm/errors/unsupported-update-operation.error.d.mts +1 -1
- package/esm/errors/unsupported-update-operation.error.d.mts.map +1 -1
- package/esm/errors/unsupported-update-operation.error.mjs +1 -1
- package/esm/errors/unsupported-update-operation.error.mjs.map +1 -1
- package/esm/events/model-events.d.mts +1 -1
- package/esm/events/model-events.d.mts.map +1 -1
- package/esm/events/model-events.mjs +1 -1
- package/esm/events/model-events.mjs.map +1 -1
- package/esm/expressions/aggregate-expressions.d.mts +1 -1
- package/esm/expressions/aggregate-expressions.d.mts.map +1 -1
- package/esm/expressions/aggregate-expressions.mjs +1 -1
- package/esm/expressions/aggregate-expressions.mjs.map +1 -1
- package/esm/expressions/column-expressions.d.mts +1 -1
- package/esm/expressions/column-expressions.d.mts.map +1 -1
- package/esm/expressions/column-expressions.mjs +1 -1
- package/esm/expressions/column-expressions.mjs.map +1 -1
- package/esm/migration/column-builder.d.mts +1 -1
- package/esm/migration/column-builder.d.mts.map +1 -1
- package/esm/migration/column-builder.mjs +1 -1
- package/esm/migration/column-builder.mjs.map +1 -1
- package/esm/migration/column-helpers.d.mts +1 -1
- package/esm/migration/column-helpers.d.mts.map +1 -1
- package/esm/migration/column-helpers.mjs +1 -1
- package/esm/migration/column-helpers.mjs.map +1 -1
- package/esm/migration/foreign-key-builder.d.mts +1 -1
- package/esm/migration/foreign-key-builder.d.mts.map +1 -1
- package/esm/migration/foreign-key-builder.mjs +1 -1
- package/esm/migration/foreign-key-builder.mjs.map +1 -1
- package/esm/migration/migration-order.mjs +1 -1
- package/esm/migration/migration-order.mjs.map +1 -1
- package/esm/migration/migration-runner.d.mts +1 -1
- package/esm/migration/migration-runner.d.mts.map +1 -1
- package/esm/migration/migration-runner.mjs +1 -1
- package/esm/migration/migration-runner.mjs.map +1 -1
- package/esm/migration/migration.d.mts +1 -1
- package/esm/migration/migration.d.mts.map +1 -1
- package/esm/migration/migration.mjs +1 -1
- package/esm/migration/migration.mjs.map +1 -1
- package/esm/migration/parse-created-at.mjs +1 -1
- package/esm/migration/parse-created-at.mjs.map +1 -1
- package/esm/migration/sql-grammar.mjs +1 -1
- package/esm/migration/sql-grammar.mjs.map +1 -1
- package/esm/migration/sql-serializer.d.mts +1 -1
- package/esm/migration/sql-serializer.d.mts.map +1 -1
- package/esm/migration/sql-serializer.mjs +1 -1
- package/esm/migration/sql-serializer.mjs.map +1 -1
- package/esm/migration/types.d.mts +1 -1
- package/esm/migration/types.d.mts.map +1 -1
- package/esm/model/generate-model-id.mjs +1 -1
- package/esm/model/generate-model-id.mjs.map +1 -1
- package/esm/model/methods/accessor-methods.mjs +1 -1
- package/esm/model/methods/accessor-methods.mjs.map +1 -1
- package/esm/model/methods/delete-methods.mjs +1 -1
- package/esm/model/methods/delete-methods.mjs.map +1 -1
- package/esm/model/methods/dirty-methods.mjs +1 -1
- package/esm/model/methods/dirty-methods.mjs.map +1 -1
- package/esm/model/methods/hydration-methods.mjs +1 -1
- package/esm/model/methods/hydration-methods.mjs.map +1 -1
- package/esm/model/methods/instance-event-methods.mjs +1 -1
- package/esm/model/methods/instance-event-methods.mjs.map +1 -1
- package/esm/model/methods/meta-methods.mjs +1 -1
- package/esm/model/methods/meta-methods.mjs.map +1 -1
- package/esm/model/methods/pivot-methods.mjs +1 -1
- package/esm/model/methods/pivot-methods.mjs.map +1 -1
- package/esm/model/methods/query-methods.mjs +1 -1
- package/esm/model/methods/query-methods.mjs.map +1 -1
- package/esm/model/methods/restore-methods.mjs +1 -1
- package/esm/model/methods/restore-methods.mjs.map +1 -1
- package/esm/model/methods/scope-methods.mjs +1 -1
- package/esm/model/methods/scope-methods.mjs.map +1 -1
- package/esm/model/methods/serialization-methods.mjs +1 -1
- package/esm/model/methods/serialization-methods.mjs.map +1 -1
- package/esm/model/methods/static-event-methods.mjs +1 -1
- package/esm/model/methods/static-event-methods.mjs.map +1 -1
- package/esm/model/methods/write-methods.d.mts +1 -1
- package/esm/model/methods/write-methods.d.mts.map +1 -1
- package/esm/model/methods/write-methods.mjs +1 -1
- package/esm/model/methods/write-methods.mjs.map +1 -1
- package/esm/model/model.d.mts +1 -1
- package/esm/model/model.d.mts.map +1 -1
- package/esm/model/model.mjs +1 -1
- package/esm/model/model.mjs.map +1 -1
- package/esm/model/model.types.d.mts +1 -1
- package/esm/model/model.types.d.mts.map +1 -1
- package/esm/model/register-model.d.mts +1 -1
- package/esm/model/register-model.d.mts.map +1 -1
- package/esm/model/register-model.mjs +1 -1
- package/esm/model/register-model.mjs.map +1 -1
- package/esm/model/relation-decorators.d.mts +1 -1
- package/esm/model/relation-decorators.d.mts.map +1 -1
- package/esm/model/relation-decorators.mjs +1 -1
- package/esm/model/relation-decorators.mjs.map +1 -1
- package/esm/operations/database.d.mts +1 -1
- package/esm/operations/database.d.mts.map +1 -1
- package/esm/operations/database.mjs +1 -1
- package/esm/operations/database.mjs.map +1 -1
- package/esm/operations/migrations.d.mts +1 -1
- package/esm/operations/migrations.d.mts.map +1 -1
- package/esm/operations/migrations.mjs +1 -1
- package/esm/operations/migrations.mjs.map +1 -1
- package/esm/query-builder/lean-records.mjs +1 -1
- package/esm/query-builder/lean-records.mjs.map +1 -1
- package/esm/query-builder/query-builder.d.mts +1 -1
- package/esm/query-builder/query-builder.d.mts.map +1 -1
- package/esm/query-builder/query-builder.mjs +1 -1
- package/esm/query-builder/query-builder.mjs.map +1 -1
- package/esm/relations/key-conventions.mjs +1 -1
- package/esm/relations/key-conventions.mjs.map +1 -1
- package/esm/relations/pivot-operations.d.mts +1 -1
- package/esm/relations/pivot-operations.d.mts.map +1 -1
- package/esm/relations/pivot-operations.mjs +1 -1
- package/esm/relations/pivot-operations.mjs.map +1 -1
- package/esm/relations/relation-hydrator.d.mts +1 -1
- package/esm/relations/relation-hydrator.d.mts.map +1 -1
- package/esm/relations/relation-hydrator.mjs +1 -1
- package/esm/relations/relation-hydrator.mjs.map +1 -1
- package/esm/relations/relation-loader.d.mts +1 -1
- package/esm/relations/relation-loader.d.mts.map +1 -1
- package/esm/relations/relation-loader.mjs +1 -1
- package/esm/relations/relation-loader.mjs.map +1 -1
- package/esm/relations/types.d.mts +1 -1
- package/esm/relations/types.d.mts.map +1 -1
- package/esm/remover/database-remover.d.mts +1 -1
- package/esm/remover/database-remover.d.mts.map +1 -1
- package/esm/remover/database-remover.mjs +1 -1
- package/esm/remover/database-remover.mjs.map +1 -1
- package/esm/restorer/database-restorer.d.mts +1 -1
- package/esm/restorer/database-restorer.d.mts.map +1 -1
- package/esm/restorer/database-restorer.mjs +1 -1
- package/esm/restorer/database-restorer.mjs.map +1 -1
- package/esm/sql-database-dirty-tracker.d.mts +1 -1
- package/esm/sql-database-dirty-tracker.d.mts.map +1 -1
- package/esm/sql-database-dirty-tracker.mjs +1 -1
- package/esm/sql-database-dirty-tracker.mjs.map +1 -1
- package/esm/sync/model-events.mjs +1 -1
- package/esm/sync/model-events.mjs.map +1 -1
- package/esm/sync/model-sync-operation.d.mts +1 -1
- package/esm/sync/model-sync-operation.d.mts.map +1 -1
- package/esm/sync/model-sync-operation.mjs +1 -1
- package/esm/sync/model-sync-operation.mjs.map +1 -1
- package/esm/sync/model-sync.d.mts +1 -1
- package/esm/sync/model-sync.d.mts.map +1 -1
- package/esm/sync/model-sync.mjs +1 -1
- package/esm/sync/model-sync.mjs.map +1 -1
- package/esm/sync/sync-context.d.mts +1 -1
- package/esm/sync/sync-context.d.mts.map +1 -1
- package/esm/sync/sync-context.mjs +1 -1
- package/esm/sync/sync-context.mjs.map +1 -1
- package/esm/sync/sync-fanout.mjs +1 -1
- package/esm/sync/sync-fanout.mjs.map +1 -1
- package/esm/sync/sync-manager.d.mts +1 -1
- package/esm/sync/sync-manager.d.mts.map +1 -1
- package/esm/sync/sync-manager.mjs +1 -1
- package/esm/sync/sync-manager.mjs.map +1 -1
- package/esm/sync/types.d.mts +1 -1
- package/esm/sync/types.d.mts.map +1 -1
- package/esm/transactions/after-commit.d.mts +1 -1
- package/esm/transactions/after-commit.d.mts.map +1 -1
- package/esm/transactions/after-commit.mjs +1 -1
- package/esm/transactions/after-commit.mjs.map +1 -1
- package/esm/types.d.mts +1 -1
- package/esm/types.d.mts.map +1 -1
- package/esm/utils/connect-to-database.d.mts +1 -1
- package/esm/utils/connect-to-database.d.mts.map +1 -1
- package/esm/utils/connect-to-database.mjs +1 -1
- package/esm/utils/connect-to-database.mjs.map +1 -1
- package/esm/utils/database-writer.utils.d.mts +1 -1
- package/esm/utils/database-writer.utils.d.mts.map +1 -1
- package/esm/utils/database-writer.utils.mjs +1 -1
- package/esm/utils/database-writer.utils.mjs.map +1 -1
- package/esm/utils/define-model.d.mts +1 -1
- package/esm/utils/define-model.d.mts.map +1 -1
- package/esm/utils/define-model.mjs +1 -1
- package/esm/utils/define-model.mjs.map +1 -1
- package/esm/utils/escape-regex.d.mts +1 -1
- package/esm/utils/escape-regex.d.mts.map +1 -1
- package/esm/utils/escape-regex.mjs +1 -1
- package/esm/utils/escape-regex.mjs.map +1 -1
- package/esm/utils/is-valid-date-value.mjs +1 -1
- package/esm/utils/is-valid-date-value.mjs.map +1 -1
- package/esm/utils/once-connected.d.mts +1 -1
- package/esm/utils/once-connected.d.mts.map +1 -1
- package/esm/utils/once-connected.mjs +1 -1
- package/esm/utils/once-connected.mjs.map +1 -1
- package/esm/utils/prune-empty-parents.mjs +1 -1
- package/esm/utils/prune-empty-parents.mjs.map +1 -1
- package/esm/utils/sanitize-filter.d.mts +1 -1
- package/esm/utils/sanitize-filter.d.mts.map +1 -1
- package/esm/utils/sanitize-filter.mjs +1 -1
- package/esm/utils/sanitize-filter.mjs.map +1 -1
- package/esm/validation/database-seal-plugins.mjs +1 -1
- package/esm/validation/database-seal-plugins.mjs.map +1 -1
- package/esm/validation/database-writer-validation-error.d.mts +1 -1
- package/esm/validation/database-writer-validation-error.d.mts.map +1 -1
- package/esm/validation/database-writer-validation-error.mjs +1 -1
- package/esm/validation/database-writer-validation-error.mjs.map +1 -1
- package/esm/validation/mutators/embed-mutator.mjs +1 -1
- package/esm/validation/mutators/embed-mutator.mjs.map +1 -1
- package/esm/validation/plugins/database-rules-plugin.d.mts +1 -1
- package/esm/validation/plugins/database-rules-plugin.d.mts.map +1 -1
- package/esm/validation/plugins/database-rules-plugin.mjs +1 -1
- package/esm/validation/plugins/database-rules-plugin.mjs.map +1 -1
- package/esm/validation/plugins/embed-validator-plugin.d.mts +1 -1
- package/esm/validation/plugins/embed-validator-plugin.d.mts.map +1 -1
- package/esm/validation/plugins/embed-validator-plugin.mjs +1 -1
- package/esm/validation/plugins/embed-validator-plugin.mjs.map +1 -1
- package/esm/validation/rules/database-model-rule.mjs +1 -1
- package/esm/validation/rules/database-model-rule.mjs.map +1 -1
- package/esm/validation/rules/exists-rule.mjs +1 -1
- package/esm/validation/rules/exists-rule.mjs.map +1 -1
- package/esm/validation/rules/unique-rule.mjs +1 -1
- package/esm/validation/rules/unique-rule.mjs.map +1 -1
- package/esm/validation/transformers/embed-model-transformer.mjs +1 -1
- package/esm/validation/transformers/embed-model-transformer.mjs.map +1 -1
- package/esm/validation/types.d.mts +1 -1
- package/esm/validation/types.d.mts.map +1 -1
- package/esm/validation/validators/embed-validator.d.mts +1 -1
- package/esm/validation/validators/embed-validator.d.mts.map +1 -1
- package/esm/validation/validators/embed-validator.mjs +1 -1
- package/esm/validation/validators/embed-validator.mjs.map +1 -1
- package/esm/writer/database-writer.d.mts +1 -1
- package/esm/writer/database-writer.d.mts.map +1 -1
- package/esm/writer/database-writer.mjs +1 -1
- package/esm/writer/database-writer.mjs.map +1 -1
- package/llms-full.txt +93 -93
- package/llms.txt +15 -15
- package/package.json +7 -6
- package/skills/README.md +17 -17
- package/skills/aggregate-data/SKILL.md +3 -3
- package/skills/alter-migration/SKILL.md +4 -4
- package/skills/cascade-basics/SKILL.md +21 -21
- package/skills/configure-delete-strategy/SKILL.md +6 -6
- package/skills/define-model/SKILL.md +8 -8
- package/skills/define-relations/SKILL.md +3 -3
- package/skills/manage-data-sources/SKILL.md +4 -4
- package/skills/manage-transactions/SKILL.md +4 -4
- package/skills/paginate-results/SKILL.md +4 -4
- package/skills/perform-atomic-ops/SKILL.md +5 -5
- package/skills/query-data/SKILL.md +10 -10
- package/skills/run-cascade-cli/SKILL.md +3 -3
- package/skills/search-by-vector/SKILL.md +3 -3
- package/skills/subscribe-to-model-events/SKILL.md +5 -5
- package/skills/track-changes/SKILL.md +3 -3
- package/skills/write-migration/SKILL.md +7 -7
package/cjs/index.cjs
CHANGED
|
@@ -41,7 +41,7 @@ fs = __toESM(fs, 1);
|
|
|
41
41
|
let path = require("path");
|
|
42
42
|
path = __toESM(path, 1);
|
|
43
43
|
|
|
44
|
-
//#region
|
|
44
|
+
//#region ../../packages/cascade/src/context/database-data-source-context.ts
|
|
45
45
|
/**
|
|
46
46
|
* Database DataSource Context
|
|
47
47
|
*
|
|
@@ -72,7 +72,7 @@ const databaseDataSourceContext = new DatabaseDataSourceContext();
|
|
|
72
72
|
_warlock_js_context.contextManager.register("db.datasource", databaseDataSourceContext);
|
|
73
73
|
|
|
74
74
|
//#endregion
|
|
75
|
-
//#region
|
|
75
|
+
//#region ../../packages/cascade/src/context/database-transaction-context.ts
|
|
76
76
|
/**
|
|
77
77
|
* Database Transaction Context
|
|
78
78
|
*
|
|
@@ -132,7 +132,7 @@ const databaseTransactionContext = new DatabaseTransactionContext();
|
|
|
132
132
|
_warlock_js_context.contextManager.register("db.transaction", databaseTransactionContext);
|
|
133
133
|
|
|
134
134
|
//#endregion
|
|
135
|
-
//#region
|
|
135
|
+
//#region ../../packages/cascade/src/transactions/after-commit.ts
|
|
136
136
|
function reportFailure(error) {
|
|
137
137
|
_warlock_js_logger.log.error("database", "afterCommit", `[cascade] afterCommit callback failed: ${error}`);
|
|
138
138
|
}
|
|
@@ -174,7 +174,7 @@ async function flushAfterCommit(callbacks) {
|
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
//#endregion
|
|
177
|
-
//#region
|
|
177
|
+
//#region ../../packages/cascade/src/data-source/data-source.ts
|
|
178
178
|
/**
|
|
179
179
|
* Wrapper that couples a driver with its metadata.
|
|
180
180
|
*
|
|
@@ -281,7 +281,7 @@ var DataSource = class {
|
|
|
281
281
|
};
|
|
282
282
|
|
|
283
283
|
//#endregion
|
|
284
|
-
//#region
|
|
284
|
+
//#region ../../packages/cascade/src/errors/missing-data-source.error.ts
|
|
285
285
|
/**
|
|
286
286
|
* Error thrown when a requested data source is not found in the registry.
|
|
287
287
|
*
|
|
@@ -310,7 +310,7 @@ var MissingDataSourceError = class MissingDataSourceError extends Error {
|
|
|
310
310
|
};
|
|
311
311
|
|
|
312
312
|
//#endregion
|
|
313
|
-
//#region
|
|
313
|
+
//#region ../../packages/cascade/src/data-source/data-source-registry.ts
|
|
314
314
|
/** Maintains registry of named data sources. */
|
|
315
315
|
var DataSourceRegistry = class {
|
|
316
316
|
sources = /* @__PURE__ */ new Map();
|
|
@@ -521,7 +521,7 @@ var DataSourceRegistry = class {
|
|
|
521
521
|
const dataSourceRegistry = new DataSourceRegistry();
|
|
522
522
|
|
|
523
523
|
//#endregion
|
|
524
|
-
//#region
|
|
524
|
+
//#region ../../packages/cascade/src/errors/transaction-rollback.error.ts
|
|
525
525
|
/**
|
|
526
526
|
* Error thrown when a transaction is explicitly rolled back via ctx.rollback().
|
|
527
527
|
*
|
|
@@ -548,7 +548,7 @@ var TransactionRollbackError = class TransactionRollbackError extends Error {
|
|
|
548
548
|
};
|
|
549
549
|
|
|
550
550
|
//#endregion
|
|
551
|
-
//#region
|
|
551
|
+
//#region ../../packages/cascade/src/errors/undefined-where-value.error.ts
|
|
552
552
|
/**
|
|
553
553
|
* Error thrown when a `where()`-family call is given `undefined` as the
|
|
554
554
|
* bound value.
|
|
@@ -584,7 +584,7 @@ var UndefinedWhereValueError = class UndefinedWhereValueError extends Error {
|
|
|
584
584
|
};
|
|
585
585
|
|
|
586
586
|
//#endregion
|
|
587
|
-
//#region
|
|
587
|
+
//#region ../../packages/cascade/src/errors/unsafe-filter.error.ts
|
|
588
588
|
/**
|
|
589
589
|
* Error thrown when a filter value in an equality position contains
|
|
590
590
|
* MongoDB operator keys (keys starting with `$`, e.g. `$ne`, `$gt`, `$where`).
|
|
@@ -622,7 +622,7 @@ var UnsafeFilterError = class UnsafeFilterError extends Error {
|
|
|
622
622
|
};
|
|
623
623
|
|
|
624
624
|
//#endregion
|
|
625
|
-
//#region
|
|
625
|
+
//#region ../../packages/cascade/src/errors/unsafe-raw-expression.error.ts
|
|
626
626
|
/**
|
|
627
627
|
* Error thrown when a string expression is passed to `whereRaw()` /
|
|
628
628
|
* `orWhereRaw()` on the MongoDB driver.
|
|
@@ -648,7 +648,7 @@ var UnsafeRawExpressionError = class UnsafeRawExpressionError extends Error {
|
|
|
648
648
|
};
|
|
649
649
|
|
|
650
650
|
//#endregion
|
|
651
|
-
//#region
|
|
651
|
+
//#region ../../packages/cascade/src/errors/unsupported-lean-operation.error.ts
|
|
652
652
|
/**
|
|
653
653
|
* Error thrown when a query in lean read mode (`.lean()`) asks for something
|
|
654
654
|
* that needs hydrated Model instances — eager-loading relations with `with()`
|
|
@@ -677,7 +677,7 @@ var UnsupportedLeanOperationError = class UnsupportedLeanOperationError extends
|
|
|
677
677
|
};
|
|
678
678
|
|
|
679
679
|
//#endregion
|
|
680
|
-
//#region
|
|
680
|
+
//#region ../../packages/cascade/src/errors/unsupported-lock-for-update.error.ts
|
|
681
681
|
/**
|
|
682
682
|
* Error thrown when `lockForUpdate()` is requested on MongoDB, whose document
|
|
683
683
|
* model has no row-level `SELECT ... FOR UPDATE` equivalent.
|
|
@@ -691,7 +691,7 @@ var UnsupportedLockForUpdateError = class UnsupportedLockForUpdateError extends
|
|
|
691
691
|
};
|
|
692
692
|
|
|
693
693
|
//#endregion
|
|
694
|
-
//#region
|
|
694
|
+
//#region ../../packages/cascade/src/errors/unsupported-query-operation.error.ts
|
|
695
695
|
/**
|
|
696
696
|
* Error thrown when a query builder is asked for a read operation its driver
|
|
697
697
|
* cannot express — e.g. a MongoDB-only aggregation stage such as `unwind()` or
|
|
@@ -726,7 +726,7 @@ var UnsupportedQueryOperationError = class UnsupportedQueryOperationError extend
|
|
|
726
726
|
};
|
|
727
727
|
|
|
728
728
|
//#endregion
|
|
729
|
-
//#region
|
|
729
|
+
//#region ../../packages/cascade/src/errors/unsupported-update-operation.error.ts
|
|
730
730
|
/**
|
|
731
731
|
* Error thrown when a driver is asked to perform an update it cannot express
|
|
732
732
|
* natively — e.g. an aggregation-pipeline update, `arrayFilters` or `$addToSet`
|
|
@@ -761,7 +761,7 @@ var UnsupportedUpdateOperationError = class UnsupportedUpdateOperationError exte
|
|
|
761
761
|
};
|
|
762
762
|
|
|
763
763
|
//#endregion
|
|
764
|
-
//#region
|
|
764
|
+
//#region ../../packages/cascade/src/utils/prune-empty-parents.ts
|
|
765
765
|
/**
|
|
766
766
|
* Remove the ancestors of `path` that became empty plain objects, walking from
|
|
767
767
|
* the leaf's parent up to (and including) the top-level field.
|
|
@@ -795,7 +795,7 @@ function pruneEmptyParents(root, path) {
|
|
|
795
795
|
}
|
|
796
796
|
|
|
797
797
|
//#endregion
|
|
798
|
-
//#region
|
|
798
|
+
//#region ../../packages/cascade/src/database-dirty-tracker.ts
|
|
799
799
|
function canBeFlatten(object) {
|
|
800
800
|
return (0, _mongez_supportive_is.isPlainObject)(object);
|
|
801
801
|
}
|
|
@@ -1248,7 +1248,7 @@ var DatabaseDirtyTracker = class {
|
|
|
1248
1248
|
};
|
|
1249
1249
|
|
|
1250
1250
|
//#endregion
|
|
1251
|
-
//#region
|
|
1251
|
+
//#region ../../packages/cascade/src/events/model-events.ts
|
|
1252
1252
|
/**
|
|
1253
1253
|
* Light-weight async event emitter used to power model lifecycle hooks.
|
|
1254
1254
|
*
|
|
@@ -1500,7 +1500,7 @@ var ModelEvents = class {
|
|
|
1500
1500
|
const globalModelEvents = new ModelEvents();
|
|
1501
1501
|
|
|
1502
1502
|
//#endregion
|
|
1503
|
-
//#region
|
|
1503
|
+
//#region ../../packages/cascade/src/relations/key-conventions.ts
|
|
1504
1504
|
/**
|
|
1505
1505
|
* @fileoverview Foreign-key naming conventions for relation defaults.
|
|
1506
1506
|
*
|
|
@@ -1625,7 +1625,7 @@ function inferPivotTable(selfModelName, relatedModelName, options) {
|
|
|
1625
1625
|
}
|
|
1626
1626
|
|
|
1627
1627
|
//#endregion
|
|
1628
|
-
//#region
|
|
1628
|
+
//#region ../../packages/cascade/src/model/relation-decorators.ts
|
|
1629
1629
|
/**
|
|
1630
1630
|
* @fileoverview TC39 Stage 3 class field decorators for declaring model
|
|
1631
1631
|
* relations directly on the field.
|
|
@@ -1812,7 +1812,7 @@ const HasMany = makeRelationDecorator("hasMany");
|
|
|
1812
1812
|
const BelongsToMany = makeRelationDecorator("belongsToMany");
|
|
1813
1813
|
|
|
1814
1814
|
//#endregion
|
|
1815
|
-
//#region
|
|
1815
|
+
//#region ../../packages/cascade/src/model/register-model.ts
|
|
1816
1816
|
/**
|
|
1817
1817
|
* Global model registry that maps model class names to their constructors.
|
|
1818
1818
|
* This allows for string-based model references to avoid circular dependencies.
|
|
@@ -1997,7 +1997,7 @@ function verifyRegisteredRelations() {
|
|
|
1997
1997
|
}
|
|
1998
1998
|
|
|
1999
1999
|
//#endregion
|
|
2000
|
-
//#region
|
|
2000
|
+
//#region ../../packages/cascade/src/relations/relation-loader.ts
|
|
2001
2001
|
/**
|
|
2002
2002
|
* @fileoverview Core relation loading logic for the Cascade ORM.
|
|
2003
2003
|
*
|
|
@@ -2443,7 +2443,7 @@ var RelationLoader = class RelationLoader {
|
|
|
2443
2443
|
};
|
|
2444
2444
|
|
|
2445
2445
|
//#endregion
|
|
2446
|
-
//#region
|
|
2446
|
+
//#region ../../packages/cascade/src/sync/model-events.ts
|
|
2447
2447
|
/**
|
|
2448
2448
|
* Model sync event name helpers.
|
|
2449
2449
|
*
|
|
@@ -2545,7 +2545,7 @@ async function triggerModelEvent(modelClass, eventType, ...args) {
|
|
|
2545
2545
|
}
|
|
2546
2546
|
|
|
2547
2547
|
//#endregion
|
|
2548
|
-
//#region
|
|
2548
|
+
//#region ../../packages/cascade/src/sync/sync-context.ts
|
|
2549
2549
|
/**
|
|
2550
2550
|
* Default maximum sync depth.
|
|
2551
2551
|
* Prevents infinite sync chains.
|
|
@@ -2638,7 +2638,7 @@ var SyncContextManager = class {
|
|
|
2638
2638
|
};
|
|
2639
2639
|
|
|
2640
2640
|
//#endregion
|
|
2641
|
-
//#region
|
|
2641
|
+
//#region ../../packages/cascade/src/sync/sync-manager.ts
|
|
2642
2642
|
/**
|
|
2643
2643
|
* Manages sync operations across models with multi-level support.
|
|
2644
2644
|
*/
|
|
@@ -3141,7 +3141,7 @@ var SyncManager = class {
|
|
|
3141
3141
|
};
|
|
3142
3142
|
|
|
3143
3143
|
//#endregion
|
|
3144
|
-
//#region
|
|
3144
|
+
//#region ../../packages/cascade/src/sync/model-sync-operation.ts
|
|
3145
3145
|
/**
|
|
3146
3146
|
* Model sync operation class.
|
|
3147
3147
|
*
|
|
@@ -3391,7 +3391,7 @@ var ModelSyncOperation = class {
|
|
|
3391
3391
|
};
|
|
3392
3392
|
|
|
3393
3393
|
//#endregion
|
|
3394
|
-
//#region
|
|
3394
|
+
//#region ../../packages/cascade/src/sync/model-sync.ts
|
|
3395
3395
|
/**
|
|
3396
3396
|
* ModelSync facade implementation.
|
|
3397
3397
|
*
|
|
@@ -3544,7 +3544,7 @@ var ModelSyncFacade = class {
|
|
|
3544
3544
|
const modelSync = new ModelSyncFacade();
|
|
3545
3545
|
|
|
3546
3546
|
//#endregion
|
|
3547
|
-
//#region
|
|
3547
|
+
//#region ../../packages/cascade/src/model/methods/accessor-methods.ts
|
|
3548
3548
|
/**
|
|
3549
3549
|
* Sentinel symbol to distinguish a genuinely missing field from a field
|
|
3550
3550
|
* whose value is `undefined`. Encapsulated here — callers use `hasField()`.
|
|
@@ -3640,7 +3640,7 @@ function getBooleanField(model, key, defaultValue) {
|
|
|
3640
3640
|
}
|
|
3641
3641
|
|
|
3642
3642
|
//#endregion
|
|
3643
|
-
//#region
|
|
3643
|
+
//#region ../../packages/cascade/src/sync/sync-fanout.ts
|
|
3644
3644
|
/**
|
|
3645
3645
|
* Serializes post-commit sync fan-out and retries transient failures without
|
|
3646
3646
|
* making the already-committed write, delete, or restore fail.
|
|
@@ -3703,7 +3703,7 @@ function enqueueSyncFanout(job) {
|
|
|
3703
3703
|
}
|
|
3704
3704
|
|
|
3705
3705
|
//#endregion
|
|
3706
|
-
//#region
|
|
3706
|
+
//#region ../../packages/cascade/src/remover/database-remover.ts
|
|
3707
3707
|
/**
|
|
3708
3708
|
* Database remover service that orchestrates model deletion.
|
|
3709
3709
|
*
|
|
@@ -3887,7 +3887,7 @@ var DatabaseRemover = class {
|
|
|
3887
3887
|
};
|
|
3888
3888
|
|
|
3889
3889
|
//#endregion
|
|
3890
|
-
//#region
|
|
3890
|
+
//#region ../../packages/cascade/src/utils/sanitize-filter.ts
|
|
3891
3891
|
/**
|
|
3892
3892
|
* Filter sanitization for equality-position values.
|
|
3893
3893
|
*
|
|
@@ -3978,7 +3978,7 @@ function sanitizeFilter(filter) {
|
|
|
3978
3978
|
}
|
|
3979
3979
|
|
|
3980
3980
|
//#endregion
|
|
3981
|
-
//#region
|
|
3981
|
+
//#region ../../packages/cascade/src/model/methods/delete-methods.ts
|
|
3982
3982
|
async function destroyModel(model, options) {
|
|
3983
3983
|
return new DatabaseRemover(model).destroy(options);
|
|
3984
3984
|
}
|
|
@@ -3994,7 +3994,7 @@ async function deleteOneRecord(ModelClass, filter) {
|
|
|
3994
3994
|
}
|
|
3995
3995
|
|
|
3996
3996
|
//#endregion
|
|
3997
|
-
//#region
|
|
3997
|
+
//#region ../../packages/cascade/src/model/methods/dirty-methods.ts
|
|
3998
3998
|
function checkHasChanges(model) {
|
|
3999
3999
|
return model.dirtyTracker.hasChanges();
|
|
4000
4000
|
}
|
|
@@ -4012,7 +4012,7 @@ function getDirtyColumns(model) {
|
|
|
4012
4012
|
}
|
|
4013
4013
|
|
|
4014
4014
|
//#endregion
|
|
4015
|
-
//#region
|
|
4015
|
+
//#region ../../packages/cascade/src/relations/relation-hydrator.ts
|
|
4016
4016
|
/**
|
|
4017
4017
|
* Restores eager-loaded relations from a plain snapshot onto a model instance.
|
|
4018
4018
|
*
|
|
@@ -4060,7 +4060,7 @@ var RelationHydrator = class {
|
|
|
4060
4060
|
};
|
|
4061
4061
|
|
|
4062
4062
|
//#endregion
|
|
4063
|
-
//#region
|
|
4063
|
+
//#region ../../packages/cascade/src/model/methods/hydration-methods.ts
|
|
4064
4064
|
/**
|
|
4065
4065
|
* Drivers re-inflate any ISO-looking string into a Date. Only fields the model
|
|
4066
4066
|
* schema declares as dates may be converted, so put every other string back.
|
|
@@ -4119,7 +4119,7 @@ function replaceModelData(model, data) {
|
|
|
4119
4119
|
}
|
|
4120
4120
|
|
|
4121
4121
|
//#endregion
|
|
4122
|
-
//#region
|
|
4122
|
+
//#region ../../packages/cascade/src/model/methods/static-event-methods.ts
|
|
4123
4123
|
/**
|
|
4124
4124
|
* Isolated event emitter registry — one ModelEvents instance per model constructor.
|
|
4125
4125
|
* Encapsulated here so no other module needs to know it exists.
|
|
@@ -4166,7 +4166,7 @@ function getGlobalEvents() {
|
|
|
4166
4166
|
}
|
|
4167
4167
|
|
|
4168
4168
|
//#endregion
|
|
4169
|
-
//#region
|
|
4169
|
+
//#region ../../packages/cascade/src/model/methods/instance-event-methods.ts
|
|
4170
4170
|
async function emitModelEvent(model, event, context) {
|
|
4171
4171
|
const ctor = model.constructor;
|
|
4172
4172
|
await model.events.emit(event, model, context);
|
|
@@ -4184,7 +4184,7 @@ function offModelEvent(model, event, listener) {
|
|
|
4184
4184
|
}
|
|
4185
4185
|
|
|
4186
4186
|
//#endregion
|
|
4187
|
-
//#region
|
|
4187
|
+
//#region ../../packages/cascade/src/model/generate-model-id.ts
|
|
4188
4188
|
/**
|
|
4189
4189
|
* Generate the next model id using the model's configured sequence options.
|
|
4190
4190
|
*
|
|
@@ -4205,7 +4205,7 @@ async function generateModelId(ModelClass) {
|
|
|
4205
4205
|
}
|
|
4206
4206
|
|
|
4207
4207
|
//#endregion
|
|
4208
|
-
//#region
|
|
4208
|
+
//#region ../../packages/cascade/src/validation/database-writer-validation-error.ts
|
|
4209
4209
|
/**
|
|
4210
4210
|
* Error thrown when model validation fails during database write operations.
|
|
4211
4211
|
*
|
|
@@ -4354,7 +4354,7 @@ var DatabaseWriterValidationError = class DatabaseWriterValidationError extends
|
|
|
4354
4354
|
};
|
|
4355
4355
|
|
|
4356
4356
|
//#endregion
|
|
4357
|
-
//#region
|
|
4357
|
+
//#region ../../packages/cascade/src/validation/rules/exists-rule.ts
|
|
4358
4358
|
/**
|
|
4359
4359
|
* Validates that a record exists in the database for the given column/value.
|
|
4360
4360
|
*
|
|
@@ -4380,7 +4380,7 @@ const existsRule = {
|
|
|
4380
4380
|
};
|
|
4381
4381
|
|
|
4382
4382
|
//#endregion
|
|
4383
|
-
//#region
|
|
4383
|
+
//#region ../../packages/cascade/src/validation/rules/unique-rule.ts
|
|
4384
4384
|
/**
|
|
4385
4385
|
* Validates that a value is unique against a database column.
|
|
4386
4386
|
*
|
|
@@ -4420,7 +4420,7 @@ const uniqueRule = {
|
|
|
4420
4420
|
};
|
|
4421
4421
|
|
|
4422
4422
|
//#endregion
|
|
4423
|
-
//#region
|
|
4423
|
+
//#region ../../packages/cascade/src/validation/plugins/database-rules-plugin.ts
|
|
4424
4424
|
/**
|
|
4425
4425
|
* Cascade's database-rules plugin for Seal.
|
|
4426
4426
|
*/
|
|
@@ -4457,7 +4457,7 @@ const databaseRulesPlugin = {
|
|
|
4457
4457
|
};
|
|
4458
4458
|
|
|
4459
4459
|
//#endregion
|
|
4460
|
-
//#region
|
|
4460
|
+
//#region ../../packages/cascade/src/validation/mutators/embed-mutator.ts
|
|
4461
4461
|
const databaseModelMutator = async (value, context) => {
|
|
4462
4462
|
const { model } = context?.options || {};
|
|
4463
4463
|
if (!model) throw new Error("Model option is required");
|
|
@@ -4486,7 +4486,7 @@ const databaseModelsMutator = async (value, context) => {
|
|
|
4486
4486
|
};
|
|
4487
4487
|
|
|
4488
4488
|
//#endregion
|
|
4489
|
-
//#region
|
|
4489
|
+
//#region ../../packages/cascade/src/validation/rules/database-model-rule.ts
|
|
4490
4490
|
const databaseModelRule = {
|
|
4491
4491
|
name: "databaseModel",
|
|
4492
4492
|
defaultErrorMessage: "The :input must be a valid :model model",
|
|
@@ -4513,7 +4513,7 @@ const databaseModelsRule = {
|
|
|
4513
4513
|
};
|
|
4514
4514
|
|
|
4515
4515
|
//#endregion
|
|
4516
|
-
//#region
|
|
4516
|
+
//#region ../../packages/cascade/src/validation/transformers/embed-model-transformer.ts
|
|
4517
4517
|
const databaseModelTransformer = (value, context) => {
|
|
4518
4518
|
const embed = context.options.embed ?? "embedData";
|
|
4519
4519
|
if (value instanceof Model === false && !Array.isArray(value)) return value;
|
|
@@ -4526,7 +4526,7 @@ const databaseModelTransformer = (value, context) => {
|
|
|
4526
4526
|
};
|
|
4527
4527
|
|
|
4528
4528
|
//#endregion
|
|
4529
|
-
//#region
|
|
4529
|
+
//#region ../../packages/cascade/src/validation/validators/embed-validator.ts
|
|
4530
4530
|
var EmbedModelValidator = class extends _warlock_js_seal.BaseValidator {
|
|
4531
4531
|
/**
|
|
4532
4532
|
* Check if value is a string type
|
|
@@ -4560,7 +4560,7 @@ var EmbedModelValidator = class extends _warlock_js_seal.BaseValidator {
|
|
|
4560
4560
|
};
|
|
4561
4561
|
|
|
4562
4562
|
//#endregion
|
|
4563
|
-
//#region
|
|
4563
|
+
//#region ../../packages/cascade/src/validation/plugins/embed-validator-plugin.ts
|
|
4564
4564
|
/**
|
|
4565
4565
|
* File validation plugin for Seal
|
|
4566
4566
|
*/
|
|
@@ -4581,12 +4581,12 @@ const embedValidator = {
|
|
|
4581
4581
|
};
|
|
4582
4582
|
|
|
4583
4583
|
//#endregion
|
|
4584
|
-
//#region
|
|
4584
|
+
//#region ../../packages/cascade/src/validation/database-seal-plugins.ts
|
|
4585
4585
|
(0, _warlock_js_seal.registerPlugin)(embedValidator);
|
|
4586
4586
|
(0, _warlock_js_seal.registerPlugin)(databaseRulesPlugin);
|
|
4587
4587
|
|
|
4588
4588
|
//#endregion
|
|
4589
|
-
//#region
|
|
4589
|
+
//#region ../../packages/cascade/src/writer/database-writer.ts
|
|
4590
4590
|
/**
|
|
4591
4591
|
* Database writer service that orchestrates model persistence.
|
|
4592
4592
|
*
|
|
@@ -4945,7 +4945,7 @@ var DatabaseWriter = class {
|
|
|
4945
4945
|
};
|
|
4946
4946
|
|
|
4947
4947
|
//#endregion
|
|
4948
|
-
//#region
|
|
4948
|
+
//#region ../../packages/cascade/src/model/methods/meta-methods.ts
|
|
4949
4949
|
/**
|
|
4950
4950
|
* Whether a subclass (or an intermediate base below `Model`) set the static
|
|
4951
4951
|
* itself. The base `Model` initialises several statics (strictMode,
|
|
@@ -5013,7 +5013,7 @@ async function performAtomicDecrement(model, field, amount = 1) {
|
|
|
5013
5013
|
}
|
|
5014
5014
|
|
|
5015
5015
|
//#endregion
|
|
5016
|
-
//#region
|
|
5016
|
+
//#region ../../packages/cascade/src/relations/pivot-operations.ts
|
|
5017
5017
|
/**
|
|
5018
5018
|
* Manages pivot table operations for many-to-many relationships.
|
|
5019
5019
|
*
|
|
@@ -5240,7 +5240,7 @@ function createPivotOperations(model, relationName) {
|
|
|
5240
5240
|
}
|
|
5241
5241
|
|
|
5242
5242
|
//#endregion
|
|
5243
|
-
//#region
|
|
5243
|
+
//#region ../../packages/cascade/src/model/methods/pivot-methods.ts
|
|
5244
5244
|
/**
|
|
5245
5245
|
* Get the pivot-operations handle for a `belongsToMany` relation.
|
|
5246
5246
|
*
|
|
@@ -5284,7 +5284,7 @@ async function detachPivotRelation(model, relation, ids) {
|
|
|
5284
5284
|
}
|
|
5285
5285
|
|
|
5286
5286
|
//#endregion
|
|
5287
|
-
//#region
|
|
5287
|
+
//#region ../../packages/cascade/src/model/methods/serialization-methods.ts
|
|
5288
5288
|
/**
|
|
5289
5289
|
* Field names that commonly hold credentials/secrets. Used only to emit a
|
|
5290
5290
|
* one-time warning when such a field exists in a model's schema but is not
|
|
@@ -5347,7 +5347,7 @@ function modelToJSON(model) {
|
|
|
5347
5347
|
}
|
|
5348
5348
|
|
|
5349
5349
|
//#endregion
|
|
5350
|
-
//#region
|
|
5350
|
+
//#region ../../packages/cascade/src/model/methods/query-methods.ts
|
|
5351
5351
|
function buildQuery(ModelClass, BaseModel) {
|
|
5352
5352
|
const queryBuilder = ModelClass.newQueryBuilder();
|
|
5353
5353
|
queryBuilder.pendingGlobalScopes = new Map([...BaseModel.globalScopes, ...ModelClass.globalScopes]);
|
|
@@ -5577,7 +5577,7 @@ function resolveDataSource(ModelClass) {
|
|
|
5577
5577
|
}
|
|
5578
5578
|
|
|
5579
5579
|
//#endregion
|
|
5580
|
-
//#region
|
|
5580
|
+
//#region ../../packages/cascade/src/restorer/database-restorer.ts
|
|
5581
5581
|
/**
|
|
5582
5582
|
* Database restorer service that orchestrates model restoration.
|
|
5583
5583
|
*
|
|
@@ -5919,7 +5919,7 @@ var DatabaseRestorer = class {
|
|
|
5919
5919
|
};
|
|
5920
5920
|
|
|
5921
5921
|
//#endregion
|
|
5922
|
-
//#region
|
|
5922
|
+
//#region ../../packages/cascade/src/model/methods/restore-methods.ts
|
|
5923
5923
|
async function restoreRecord(ModelClass, id, options) {
|
|
5924
5924
|
const result = await new DatabaseRestorer(ModelClass).restore(id, options);
|
|
5925
5925
|
if (!result.restoredRecord) throw new Error(`Failed to restore ${ModelClass.name} with ${ModelClass.primaryKey} ${id}: no record returned.`);
|
|
@@ -5931,7 +5931,7 @@ async function restoreAllRecords(ModelClass, options) {
|
|
|
5931
5931
|
}
|
|
5932
5932
|
|
|
5933
5933
|
//#endregion
|
|
5934
|
-
//#region
|
|
5934
|
+
//#region ../../packages/cascade/src/model/methods/scope-methods.ts
|
|
5935
5935
|
/**
|
|
5936
5936
|
* Give the model class its OWN scope map before mutating.
|
|
5937
5937
|
*
|
|
@@ -5963,7 +5963,7 @@ function removeLocalModelScope(ModelClass, name) {
|
|
|
5963
5963
|
}
|
|
5964
5964
|
|
|
5965
5965
|
//#endregion
|
|
5966
|
-
//#region
|
|
5966
|
+
//#region ../../packages/cascade/src/model/methods/write-methods.ts
|
|
5967
5967
|
/**
|
|
5968
5968
|
* Default number of rows processed per chunk by {@link createManyRecords}.
|
|
5969
5969
|
*
|
|
@@ -6185,7 +6185,7 @@ async function upsertRecord(ModelClass, filter, data, options) {
|
|
|
6185
6185
|
}
|
|
6186
6186
|
|
|
6187
6187
|
//#endregion
|
|
6188
|
-
//#region
|
|
6188
|
+
//#region ../../packages/cascade/src/model/model.ts
|
|
6189
6189
|
/**
|
|
6190
6190
|
* Base class that powers all Cascade models.
|
|
6191
6191
|
*
|
|
@@ -8110,7 +8110,7 @@ var Model = class Model {
|
|
|
8110
8110
|
};
|
|
8111
8111
|
|
|
8112
8112
|
//#endregion
|
|
8113
|
-
//#region
|
|
8113
|
+
//#region ../../packages/cascade/src/expressions/aggregate-expressions.ts
|
|
8114
8114
|
/**
|
|
8115
8115
|
* Checks if a value is an abstract aggregate expression.
|
|
8116
8116
|
*/
|
|
@@ -8413,7 +8413,7 @@ const $agg = {
|
|
|
8413
8413
|
};
|
|
8414
8414
|
|
|
8415
8415
|
//#endregion
|
|
8416
|
-
//#region
|
|
8416
|
+
//#region ../../packages/cascade/src/expressions/column-expressions.ts
|
|
8417
8417
|
/**
|
|
8418
8418
|
* Type guard: is `value` one of the typed column-expression nodes?
|
|
8419
8419
|
*
|
|
@@ -8563,7 +8563,7 @@ const $expr = {
|
|
|
8563
8563
|
};
|
|
8564
8564
|
|
|
8565
8565
|
//#endregion
|
|
8566
|
-
//#region
|
|
8566
|
+
//#region ../../packages/cascade/src/utils/is-valid-date-value.ts
|
|
8567
8567
|
const isoRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,6})?(Z|[+-]\d{2}:?\d{2})$/;
|
|
8568
8568
|
/**
|
|
8569
8569
|
* Check if the given value is a valid date value
|
|
@@ -8587,7 +8587,7 @@ function isValidDateValue(value) {
|
|
|
8587
8587
|
}
|
|
8588
8588
|
|
|
8589
8589
|
//#endregion
|
|
8590
|
-
//#region
|
|
8590
|
+
//#region ../../packages/cascade/src/drivers/mongodb/mongodb-blueprint.ts
|
|
8591
8591
|
var MongoDBBlueprint = class {
|
|
8592
8592
|
database;
|
|
8593
8593
|
/**
|
|
@@ -8637,7 +8637,7 @@ var MongoDBBlueprint = class {
|
|
|
8637
8637
|
};
|
|
8638
8638
|
|
|
8639
8639
|
//#endregion
|
|
8640
|
-
//#region
|
|
8640
|
+
//#region ../../packages/cascade/src/drivers/mongodb/mongodb-id-generator.ts
|
|
8641
8641
|
/** Number of times a reservation retries after a duplicate-key (E11000) error. */
|
|
8642
8642
|
const MAX_RESERVE_ATTEMPTS = 3;
|
|
8643
8643
|
/** MongoDB duplicate-key error code. */
|
|
@@ -8870,7 +8870,7 @@ var MongoIdGenerator = class {
|
|
|
8870
8870
|
};
|
|
8871
8871
|
|
|
8872
8872
|
//#endregion
|
|
8873
|
-
//#region
|
|
8873
|
+
//#region ../../packages/cascade/src/drivers/mongodb/mongodb-migration-driver.ts
|
|
8874
8874
|
/**
|
|
8875
8875
|
* MongoDB-specific migration driver implementation.
|
|
8876
8876
|
*
|
|
@@ -9398,7 +9398,7 @@ var MongoMigrationDriver = class {
|
|
|
9398
9398
|
};
|
|
9399
9399
|
|
|
9400
9400
|
//#endregion
|
|
9401
|
-
//#region
|
|
9401
|
+
//#region ../../packages/cascade/src/query-builder/lean-records.ts
|
|
9402
9402
|
/**
|
|
9403
9403
|
* Throw when a lean query also asks for eager-loaded relations.
|
|
9404
9404
|
*
|
|
@@ -9428,7 +9428,7 @@ function stripHiddenFromLeanRecords(records, modelClass) {
|
|
|
9428
9428
|
}
|
|
9429
9429
|
|
|
9430
9430
|
//#endregion
|
|
9431
|
-
//#region
|
|
9431
|
+
//#region ../../packages/cascade/src/query-builder/query-builder.ts
|
|
9432
9432
|
/**
|
|
9433
9433
|
* Pure, driver-agnostic query builder.
|
|
9434
9434
|
*
|
|
@@ -10695,7 +10695,7 @@ var QueryBuilder = class QueryBuilder {
|
|
|
10695
10695
|
};
|
|
10696
10696
|
|
|
10697
10697
|
//#endregion
|
|
10698
|
-
//#region
|
|
10698
|
+
//#region ../../packages/cascade/src/drivers/mongodb/mongodb-query-operations.ts
|
|
10699
10699
|
/**
|
|
10700
10700
|
* Helper class for constructing MongoDB aggregation pipeline operations.
|
|
10701
10701
|
*
|
|
@@ -10968,7 +10968,7 @@ var MongoQueryOperations = class {
|
|
|
10968
10968
|
};
|
|
10969
10969
|
|
|
10970
10970
|
//#endregion
|
|
10971
|
-
//#region
|
|
10971
|
+
//#region ../../packages/cascade/src/utils/escape-regex.ts
|
|
10972
10972
|
/**
|
|
10973
10973
|
* Regex escaping for pattern-matching helpers.
|
|
10974
10974
|
*
|
|
@@ -11042,7 +11042,7 @@ function resolveLikePattern(pattern) {
|
|
|
11042
11042
|
}
|
|
11043
11043
|
|
|
11044
11044
|
//#endregion
|
|
11045
|
-
//#region
|
|
11045
|
+
//#region ../../packages/cascade/src/drivers/mongodb/pipeline-stage-object.ts
|
|
11046
11046
|
/**
|
|
11047
11047
|
* Whether a value looks like one MongoDB aggregation stage: a plain object
|
|
11048
11048
|
* with exactly one key, and that key is a `$`-prefixed stage name
|
|
@@ -11064,7 +11064,7 @@ function isPipelineStageObject(value) {
|
|
|
11064
11064
|
}
|
|
11065
11065
|
|
|
11066
11066
|
//#endregion
|
|
11067
|
-
//#region
|
|
11067
|
+
//#region ../../packages/cascade/src/drivers/mongodb/mongodb-query-parser.ts
|
|
11068
11068
|
const isPlainObject = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
11069
11069
|
/**
|
|
11070
11070
|
* AND one `key: value` condition into `target`. Operators on the same field
|
|
@@ -12364,7 +12364,7 @@ var MongoQueryParser = class {
|
|
|
12364
12364
|
};
|
|
12365
12365
|
|
|
12366
12366
|
//#endregion
|
|
12367
|
-
//#region
|
|
12367
|
+
//#region ../../packages/cascade/src/drivers/mongodb/mongodb-query-builder.ts
|
|
12368
12368
|
/**
|
|
12369
12369
|
* MongoDB-specific query builder implementation using aggregation pipeline.
|
|
12370
12370
|
*/
|
|
@@ -14349,7 +14349,7 @@ var MongoQueryBuilder = class MongoQueryBuilder extends QueryBuilder {
|
|
|
14349
14349
|
};
|
|
14350
14350
|
|
|
14351
14351
|
//#endregion
|
|
14352
|
-
//#region
|
|
14352
|
+
//#region ../../packages/cascade/src/drivers/mongodb/mongodb-sync-adapter.ts
|
|
14353
14353
|
/**
|
|
14354
14354
|
* MongoDB implementation of the sync adapter.
|
|
14355
14355
|
* Handles array updates using positional operators and arrayFilters.
|
|
@@ -14465,7 +14465,7 @@ var MongoSyncAdapter = class {
|
|
|
14465
14465
|
};
|
|
14466
14466
|
|
|
14467
14467
|
//#endregion
|
|
14468
|
-
//#region
|
|
14468
|
+
//#region ../../packages/cascade/src/drivers/mongodb/mongodb-update-translator.ts
|
|
14469
14469
|
/**
|
|
14470
14470
|
* Translate cascade's driver-agnostic update into MongoDB's native form.
|
|
14471
14471
|
*
|
|
@@ -14488,7 +14488,7 @@ function toMongoUpdate(update) {
|
|
|
14488
14488
|
}
|
|
14489
14489
|
|
|
14490
14490
|
//#endregion
|
|
14491
|
-
//#region
|
|
14491
|
+
//#region ../../packages/cascade/src/drivers/mongodb/mongodb-driver.ts
|
|
14492
14492
|
const DEFAULT_TRANSACTION_OPTIONS = {
|
|
14493
14493
|
readPreference: "primary",
|
|
14494
14494
|
readConcern: { level: "local" },
|
|
@@ -15310,7 +15310,7 @@ var MongoDbDriver = class {
|
|
|
15310
15310
|
};
|
|
15311
15311
|
|
|
15312
15312
|
//#endregion
|
|
15313
|
-
//#region
|
|
15313
|
+
//#region ../../packages/cascade/src/drivers/postgres/postgres-blueprint.ts
|
|
15314
15314
|
/**
|
|
15315
15315
|
* PostgreSQL Blueprint.
|
|
15316
15316
|
*
|
|
@@ -15412,7 +15412,7 @@ var PostgresBlueprint = class {
|
|
|
15412
15412
|
};
|
|
15413
15413
|
|
|
15414
15414
|
//#endregion
|
|
15415
|
-
//#region
|
|
15415
|
+
//#region ../../packages/cascade/src/drivers/postgres/naming.ts
|
|
15416
15416
|
/** Convert a JavaScript camelCase key to a PostgreSQL snake_case column name. */
|
|
15417
15417
|
function camelToSnake(value) {
|
|
15418
15418
|
if (value === "*" || value.includes("_")) return value;
|
|
@@ -15428,7 +15428,7 @@ function snakeKeysToCamel(row) {
|
|
|
15428
15428
|
}
|
|
15429
15429
|
|
|
15430
15430
|
//#endregion
|
|
15431
|
-
//#region
|
|
15431
|
+
//#region ../../packages/cascade/src/drivers/postgres/postgres-dialect.ts
|
|
15432
15432
|
/**
|
|
15433
15433
|
* PostgreSQL-specific SQL dialect implementation.
|
|
15434
15434
|
*
|
|
@@ -15744,7 +15744,7 @@ function toFiniteNumber$1(value) {
|
|
|
15744
15744
|
}
|
|
15745
15745
|
|
|
15746
15746
|
//#endregion
|
|
15747
|
-
//#region
|
|
15747
|
+
//#region ../../packages/cascade/src/sql-database-dirty-tracker.ts
|
|
15748
15748
|
/**
|
|
15749
15749
|
* A dirty tracker designed for SQL databases where nested objects shouldn't be flattened.
|
|
15750
15750
|
* Since SQL drivers (like Postgres) replace the entire JSON column when updated,
|
|
@@ -15760,7 +15760,7 @@ var SqlDatabaseDirtyTracker = class extends DatabaseDirtyTracker {
|
|
|
15760
15760
|
};
|
|
15761
15761
|
|
|
15762
15762
|
//#endregion
|
|
15763
|
-
//#region
|
|
15763
|
+
//#region ../../packages/cascade/src/drivers/postgres/postgres-type-converters.ts
|
|
15764
15764
|
const toDate = (value) => new Date(value);
|
|
15765
15765
|
const toSafeInteger = (value) => {
|
|
15766
15766
|
const n = Number(value);
|
|
@@ -15815,7 +15815,7 @@ function convertPostgresValue(value, dataTypeID) {
|
|
|
15815
15815
|
}
|
|
15816
15816
|
|
|
15817
15817
|
//#endregion
|
|
15818
|
-
//#region
|
|
15818
|
+
//#region ../../packages/cascade/src/drivers/postgres/postgres-ttl-purge.ts
|
|
15819
15819
|
const TTL_PURGE_INTERVAL_MINUTES = 1;
|
|
15820
15820
|
const TTL_COMMENT_PREFIX = "warlock_ttl:";
|
|
15821
15821
|
let nextDriverId = 0;
|
|
@@ -15909,7 +15909,7 @@ async function loadPostgresTTLPurgeJobs(driver) {
|
|
|
15909
15909
|
}
|
|
15910
15910
|
|
|
15911
15911
|
//#endregion
|
|
15912
|
-
//#region
|
|
15912
|
+
//#region ../../packages/cascade/src/drivers/postgres/postgres-migration-driver.ts
|
|
15913
15913
|
/**
|
|
15914
15914
|
* PostgreSQL Migration Driver
|
|
15915
15915
|
*
|
|
@@ -16670,7 +16670,7 @@ var PostgresMigrationDriver = class {
|
|
|
16670
16670
|
};
|
|
16671
16671
|
|
|
16672
16672
|
//#endregion
|
|
16673
|
-
//#region
|
|
16673
|
+
//#region ../../packages/cascade/src/drivers/postgres/postgres-query-parser.ts
|
|
16674
16674
|
/** Allowed `::cast` type names, e.g. `int`, `numeric(10,2)`, `text[]`. */
|
|
16675
16675
|
const SAFE_CAST_PATTERN = /^[a-z_][a-z0-9_ ]*(\(\d+(,\d+)?\))?(\[\])?$/i;
|
|
16676
16676
|
/** Allowed orderBy direction, with optional NULLS placement. */
|
|
@@ -17616,7 +17616,7 @@ var PostgresQueryParser = class PostgresQueryParser {
|
|
|
17616
17616
|
};
|
|
17617
17617
|
|
|
17618
17618
|
//#endregion
|
|
17619
|
-
//#region
|
|
17619
|
+
//#region ../../packages/cascade/src/drivers/postgres/postgres-query-builder.ts
|
|
17620
17620
|
/**
|
|
17621
17621
|
* Cast an Op[] to PostgresParserOperation[] — the shapes are compatible since
|
|
17622
17622
|
* both have `type: string` and `data: Record<string, unknown>`.
|
|
@@ -18959,7 +18959,7 @@ var PostgresQueryBuilder = class PostgresQueryBuilder extends QueryBuilder {
|
|
|
18959
18959
|
};
|
|
18960
18960
|
|
|
18961
18961
|
//#endregion
|
|
18962
|
-
//#region
|
|
18962
|
+
//#region ../../packages/cascade/src/migration/sql-serializer.ts
|
|
18963
18963
|
/**
|
|
18964
18964
|
* Converts PendingOperation objects to SQL strings for a specific dialect.
|
|
18965
18965
|
*/
|
|
@@ -18983,7 +18983,7 @@ var SQLSerializer = class {
|
|
|
18983
18983
|
};
|
|
18984
18984
|
|
|
18985
18985
|
//#endregion
|
|
18986
|
-
//#region
|
|
18986
|
+
//#region ../../packages/cascade/src/drivers/postgres/postgres-sql-serializer.ts
|
|
18987
18987
|
/**
|
|
18988
18988
|
* PostgreSQL-specific SQL serializer.
|
|
18989
18989
|
*
|
|
@@ -19251,7 +19251,7 @@ var PostgresSQLSerializer = class extends SQLSerializer {
|
|
|
19251
19251
|
};
|
|
19252
19252
|
|
|
19253
19253
|
//#endregion
|
|
19254
|
-
//#region
|
|
19254
|
+
//#region ../../packages/cascade/src/drivers/postgres/postgres-update-validator.ts
|
|
19255
19255
|
/**
|
|
19256
19256
|
* Update operators the Postgres driver can express in SQL.
|
|
19257
19257
|
*
|
|
@@ -19283,7 +19283,7 @@ function assertPostgresUpdate(update, options) {
|
|
|
19283
19283
|
}
|
|
19284
19284
|
|
|
19285
19285
|
//#endregion
|
|
19286
|
-
//#region
|
|
19286
|
+
//#region ../../packages/cascade/src/drivers/postgres/postgres-driver.ts
|
|
19287
19287
|
/**
|
|
19288
19288
|
* PostgreSQL Driver
|
|
19289
19289
|
*
|
|
@@ -20690,7 +20690,7 @@ var PostgresDriver = class {
|
|
|
20690
20690
|
};
|
|
20691
20691
|
|
|
20692
20692
|
//#endregion
|
|
20693
|
-
//#region
|
|
20693
|
+
//#region ../../packages/cascade/src/utils/connect-to-database.ts
|
|
20694
20694
|
/**
|
|
20695
20695
|
* Connect to a database and register the data source.
|
|
20696
20696
|
*
|
|
@@ -20818,7 +20818,7 @@ function pickPostgresDriverOptions(driverOptions) {
|
|
|
20818
20818
|
}
|
|
20819
20819
|
|
|
20820
20820
|
//#endregion
|
|
20821
|
-
//#region
|
|
20821
|
+
//#region ../../packages/cascade/src/utils/database-writer.utils.ts
|
|
20822
20822
|
/**
|
|
20823
20823
|
* Transfer value before saving it into the database
|
|
20824
20824
|
*/
|
|
@@ -20842,7 +20842,7 @@ function useModelTransformer(callback) {
|
|
|
20842
20842
|
}
|
|
20843
20843
|
|
|
20844
20844
|
//#endregion
|
|
20845
|
-
//#region
|
|
20845
|
+
//#region ../../packages/cascade/src/utils/define-model.ts
|
|
20846
20846
|
/**
|
|
20847
20847
|
* Define a model with a clean, concise API.
|
|
20848
20848
|
*
|
|
@@ -20934,7 +20934,7 @@ function defineModel(options) {
|
|
|
20934
20934
|
}
|
|
20935
20935
|
|
|
20936
20936
|
//#endregion
|
|
20937
|
-
//#region
|
|
20937
|
+
//#region ../../packages/cascade/src/utils/once-connected.ts
|
|
20938
20938
|
/**
|
|
20939
20939
|
* Whether the given source is the registry's actual default (not just the `isDefault` option flag).
|
|
20940
20940
|
*/
|
|
@@ -21143,7 +21143,7 @@ function onceDisconnected(dataSourceOrNameOrCallback, callback) {
|
|
|
21143
21143
|
}
|
|
21144
21144
|
|
|
21145
21145
|
//#endregion
|
|
21146
|
-
//#region
|
|
21146
|
+
//#region ../../packages/cascade/src/migration/column-builder.ts
|
|
21147
21147
|
/**
|
|
21148
21148
|
* Fluent builder for defining column properties.
|
|
21149
21149
|
*
|
|
@@ -21673,7 +21673,7 @@ var ColumnBuilder = class {
|
|
|
21673
21673
|
};
|
|
21674
21674
|
|
|
21675
21675
|
//#endregion
|
|
21676
|
-
//#region
|
|
21676
|
+
//#region ../../packages/cascade/src/migration/foreign-key-builder.ts
|
|
21677
21677
|
/**
|
|
21678
21678
|
* Fluent builder for foreign key constraints.
|
|
21679
21679
|
*
|
|
@@ -21797,7 +21797,7 @@ var ForeignKeyBuilder = class {
|
|
|
21797
21797
|
};
|
|
21798
21798
|
|
|
21799
21799
|
//#endregion
|
|
21800
|
-
//#region
|
|
21800
|
+
//#region ../../packages/cascade/src/migration/column-helpers.ts
|
|
21801
21801
|
/**
|
|
21802
21802
|
* A no-op migration sink used by standalone column helpers.
|
|
21803
21803
|
*
|
|
@@ -22169,7 +22169,7 @@ function arrayJson() {
|
|
|
22169
22169
|
}
|
|
22170
22170
|
|
|
22171
22171
|
//#endregion
|
|
22172
|
-
//#region
|
|
22172
|
+
//#region ../../packages/cascade/src/migration/migration.ts
|
|
22173
22173
|
/**
|
|
22174
22174
|
* Base class for all database migrations.
|
|
22175
22175
|
*
|
|
@@ -24407,7 +24407,7 @@ Migration.alter = function alterMigration(model, schema, options = {}) {
|
|
|
24407
24407
|
Migration.__declarativeFactoriesAttached = true;
|
|
24408
24408
|
|
|
24409
24409
|
//#endregion
|
|
24410
|
-
//#region
|
|
24410
|
+
//#region ../../packages/cascade/src/migration/parse-created-at.ts
|
|
24411
24411
|
/**
|
|
24412
24412
|
* Parse a migration's `createdAt` stamp into a `Date`.
|
|
24413
24413
|
*
|
|
@@ -24473,7 +24473,7 @@ function compareCreatedAt(a, b) {
|
|
|
24473
24473
|
}
|
|
24474
24474
|
|
|
24475
24475
|
//#endregion
|
|
24476
|
-
//#region
|
|
24476
|
+
//#region ../../packages/cascade/src/migration/migration-order.ts
|
|
24477
24477
|
/**
|
|
24478
24478
|
* Comparator for applying migrations — oldest first.
|
|
24479
24479
|
*
|
|
@@ -24510,7 +24510,7 @@ function sortMigrationsForRollback(a, b) {
|
|
|
24510
24510
|
}
|
|
24511
24511
|
|
|
24512
24512
|
//#endregion
|
|
24513
|
-
//#region
|
|
24513
|
+
//#region ../../packages/cascade/src/migration/sql-grammar.ts
|
|
24514
24514
|
/**
|
|
24515
24515
|
* Parses and sorts SQL statements globally based on their execution phase,
|
|
24516
24516
|
* and classifies statements by their semantic type.
|
|
@@ -24631,7 +24631,7 @@ var SQLGrammar = class {
|
|
|
24631
24631
|
};
|
|
24632
24632
|
|
|
24633
24633
|
//#endregion
|
|
24634
|
-
//#region
|
|
24634
|
+
//#region ../../packages/cascade/src/migration/migration-runner.ts
|
|
24635
24635
|
/** Name of the lock document Mongo migrations claim inside the migrations collection. */
|
|
24636
24636
|
const MIGRATION_LOCK_NAME = "__warlock_migration_lock__";
|
|
24637
24637
|
const MIGRATION_LOCK_KEY = "warlock:migrations";
|
|
@@ -25501,7 +25501,7 @@ var MigrationRunner = class {
|
|
|
25501
25501
|
const migrationRunner = new MigrationRunner();
|
|
25502
25502
|
|
|
25503
25503
|
//#endregion
|
|
25504
|
-
//#region
|
|
25504
|
+
//#region ../../packages/cascade/src/operations/database.ts
|
|
25505
25505
|
/**
|
|
25506
25506
|
* Create a database on the configured data source. Returns `created: false`
|
|
25507
25507
|
* when the database already exists — drivers are responsible for the
|
|
@@ -25537,7 +25537,7 @@ async function dropAllTables(options = {}) {
|
|
|
25537
25537
|
}
|
|
25538
25538
|
|
|
25539
25539
|
//#endregion
|
|
25540
|
-
//#region
|
|
25540
|
+
//#region ../../packages/cascade/src/operations/migrations.ts
|
|
25541
25541
|
/**
|
|
25542
25542
|
* Run every pending migration registered on the migration runner.
|
|
25543
25543
|
*
|