velocious 1.0.577 → 1.0.579
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/README.md +12 -6
- package/build/application.js +3 -3
- package/build/authorization/ability.js +6 -6
- package/build/authorization/base-resource.js +1 -1
- package/build/background-jobs/client.js +2 -2
- package/build/background-jobs/forked-runner-child.js +4 -4
- package/build/background-jobs/job-runner.js +2 -2
- package/build/background-jobs/job.js +6 -6
- package/build/background-jobs/json-socket.js +1 -1
- package/build/background-jobs/main.js +13 -13
- package/build/background-jobs/normalize-error.js +2 -2
- package/build/background-jobs/pooled-runner-child.js +3 -3
- package/build/background-jobs/scheduler.js +1 -1
- package/build/background-jobs/status-reporter.js +2 -2
- package/build/background-jobs/store.js +23 -23
- package/build/background-jobs/types.js +6 -6
- package/build/background-jobs/web/controller.js +6 -6
- package/build/background-jobs/web/counts-channel.js +1 -1
- package/build/background-jobs/worker.js +8 -8
- package/build/beacon/client.js +3 -3
- package/build/beacon/in-process-client.js +3 -3
- package/build/beacon/types.js +1 -1
- package/build/cli/base-command.js +1 -1
- package/build/cli/commands/console.js +1 -1
- package/build/cli/commands/db/schema/dump.js +1 -1
- package/build/cli/commands/db/schema/load.js +1 -1
- package/build/cli/commands/db/seed.js +1 -1
- package/build/cli/commands/generate/frontend-models.js +1 -1
- package/build/cli/commands/lint/relationships.js +1 -1
- package/build/cli/commands/run-script.js +1 -1
- package/build/cli/commands/runner.js +1 -1
- package/build/cli/index.js +2 -2
- package/build/cli/tenant-database-command-helper.js +2 -2
- package/build/configuration-types.js +48 -47
- package/build/configuration.js +150 -65
- package/build/controller.js +11 -8
- package/build/current.js +2 -2
- package/build/database/annotations-async-hooks.js +3 -3
- package/build/database/annotations.js +1 -1
- package/build/database/drivers/base-column.js +1 -1
- package/build/database/drivers/base-foreign-key.js +1 -1
- package/build/database/drivers/base-table.js +1 -1
- package/build/database/drivers/base.js +18 -18
- package/build/database/drivers/mssql/column.js +1 -1
- package/build/database/drivers/mssql/index.js +2 -2
- package/build/database/drivers/mssql/options.js +1 -1
- package/build/database/drivers/mssql/structure-sql.js +1 -1
- package/build/database/drivers/mssql/table.js +1 -1
- package/build/database/drivers/mysql/column.js +1 -1
- package/build/database/drivers/mysql/index.js +4 -4
- package/build/database/drivers/mysql/options.js +1 -1
- package/build/database/drivers/mysql/query.js +7 -7
- package/build/database/drivers/mysql/structure-sql.js +71 -10
- package/build/database/drivers/pgsql/column.js +1 -1
- package/build/database/drivers/pgsql/index.js +6 -6
- package/build/database/drivers/pgsql/structure-sql.js +1 -1
- package/build/database/drivers/sqlite/base.js +7 -7
- package/build/database/drivers/sqlite/column.js +1 -1
- package/build/database/drivers/sqlite/connection-sql-js.js +1 -1
- package/build/database/drivers/sqlite/foreign-key.js +1 -1
- package/build/database/drivers/sqlite/index.js +1 -1
- package/build/database/drivers/sqlite/index.native.js +2 -2
- package/build/database/drivers/sqlite/index.web.js +2 -2
- package/build/database/drivers/sqlite/query.js +2 -2
- package/build/database/drivers/sqlite/query.native.js +2 -2
- package/build/database/drivers/sqlite/query.web.js +2 -2
- package/build/database/drivers/sqlite/table-rebuilder.js +1 -1
- package/build/database/migration/index.js +2 -2
- package/build/database/migrator/types.js +2 -2
- package/build/database/operation.js +59 -6
- package/build/database/pool/async-tracked-multi-connection.js +75 -24
- package/build/database/pool/base-methods-forward.js +2 -2
- package/build/database/pool/base.js +48 -17
- package/build/database/pool/single-multi-use.js +501 -103
- package/build/database/query/delete-base.js +1 -1
- package/build/database/query/index.js +3 -3
- package/build/database/query/insert-base.js +4 -4
- package/build/database/query/model-class-query.js +39 -39
- package/build/database/query/preloader/belongs-to.js +2 -2
- package/build/database/query/preloader/ensure-model-class-initialized.js +3 -2
- package/build/database/query/preloader/has-many.js +3 -3
- package/build/database/query/preloader/has-one.js +1 -1
- package/build/database/query/preloader.js +9 -2
- package/build/database/query/query-data.js +7 -7
- package/build/database/query/update-base.js +3 -3
- package/build/database/query/upsert-base.js +2 -2
- package/build/database/query/where-model-class-hash.js +13 -13
- package/build/database/query/with-count.js +12 -12
- package/build/database/query-parser/options.js +2 -2
- package/build/database/query-parser/select-parser.js +1 -1
- package/build/database/record/acts-as-list.js +2 -2
- package/build/database/record/attachments/handle.js +6 -6
- package/build/database/record/attachments/normalize-input.js +11 -11
- package/build/database/record/attachments/storage-drivers/filesystem.js +1 -1
- package/build/database/record/attachments/storage-drivers/native.js +5 -5
- package/build/database/record/attachments/storage-drivers/s3.js +10 -10
- package/build/database/record/attachments/store.js +24 -20
- package/build/database/record/auditing.js +123 -29
- package/build/database/record/counter-cache-magnitude.js +11 -11
- package/build/database/record/index.js +227 -174
- package/build/database/record/instance-relationships/base.js +4 -4
- package/build/database/record/instance-relationships/belongs-to.js +1 -1
- package/build/database/record/instance-relationships/has-many.js +3 -3
- package/build/database/record/instance-relationships/has-one.js +1 -1
- package/build/database/record/record-not-found-error.js +1 -0
- package/build/database/record/relationships/base.js +22 -0
- package/build/database/record/state-machine.js +6 -6
- package/build/database/record/validators/base.js +1 -1
- package/build/database/structure-sql-loader.js +3 -3
- package/build/database/table-data/table-column.js +3 -3
- package/build/database/use-live-query.js +3 -3
- package/build/environment-handlers/base.js +56 -37
- package/build/environment-handlers/browser.js +1 -1
- package/build/environment-handlers/node/cli/commands/console.js +4 -4
- package/build/environment-handlers/node/cli/commands/db/seed.js +2 -2
- package/build/environment-handlers/node/cli/commands/generate/base-models.js +1 -1
- package/build/environment-handlers/node/cli/commands/run-script.js +2 -2
- package/build/environment-handlers/node/cli/commands/runner.js +2 -2
- package/build/environment-handlers/node/cli/commands/server.js +1 -1
- package/build/environment-handlers/node.js +36 -36
- package/build/error-logger.js +2 -2
- package/build/error-reporting/request-details.js +32 -32
- package/build/frontend-model-controller.js +215 -213
- package/build/frontend-model-resource/base-resource.js +44 -44
- package/build/frontend-model-resource/velocious-attachment-resource.js +1 -1
- package/build/frontend-models/base.js +146 -142
- package/build/frontend-models/clear-pending-debounced-callback.js +2 -2
- package/build/frontend-models/model-registry.js +4 -4
- package/build/frontend-models/outgoing-event-buffer.js +1 -1
- package/build/frontend-models/preloader.js +1 -1
- package/build/frontend-models/query.js +60 -60
- package/build/frontend-models/resource-definition.js +9 -9
- package/build/frontend-models/transport-serialization.js +27 -27
- package/build/frontend-models/websocket-channel.js +4 -4
- package/build/frontend-models/websocket-publishers.js +1 -1
- package/build/http-client/request.js +1 -1
- package/build/http-client/response.js +1 -1
- package/build/http-server/client/index.js +4 -4
- package/build/http-server/client/params-to-object.js +16 -16
- package/build/http-server/client/request-buffer/index.js +5 -2
- package/build/http-server/client/request-parser.js +2 -2
- package/build/http-server/client/request-runner.js +2 -2
- package/build/http-server/client/request.js +2 -2
- package/build/http-server/client/websocket-request.js +6 -6
- package/build/http-server/client/websocket-session.js +28 -28
- package/build/http-server/cookie.js +2 -2
- package/build/http-server/development-reloader.js +1 -1
- package/build/http-server/index.js +5 -5
- package/build/http-server/remote-address.js +1 -1
- package/build/http-server/server-lock.js +4 -4
- package/build/http-server/websocket-channel-subscribers.js +4 -4
- package/build/http-server/websocket-channel.js +1 -1
- package/build/http-server/websocket-connection.js +3 -3
- package/build/http-server/websocket-event-log-store.js +9 -9
- package/build/http-server/websocket-events-host.js +7 -7
- package/build/http-server/websocket-events.js +4 -4
- package/build/http-server/worker-handler/channel-subscriber-dispatch.js +1 -1
- package/build/http-server/worker-handler/in-process.js +5 -5
- package/build/http-server/worker-handler/index.js +10 -10
- package/build/http-server/worker-handler/worker-thread.js +8 -8
- package/build/index.d.ts.map +1 -1
- package/build/logger/base-logger.js +1 -1
- package/build/logger.js +12 -12
- package/build/mailer/backends/smtp.js +3 -3
- package/build/mailer/base.js +14 -14
- package/build/mailer/delivery.js +3 -3
- package/build/mailer/index.js +1 -1
- package/build/mailer.js +1 -1
- package/build/plugins/sqljs-wasm-route-controller.js +1 -1
- package/build/record-payload-values.js +3 -3
- package/build/routes/base-route.js +5 -5
- package/build/routes/basic-route.js +4 -4
- package/build/routes/get-route.js +2 -2
- package/build/routes/hooks/frontend-model-command-route-hook.js +1 -1
- package/build/routes/index.js +3 -3
- package/build/routes/namespace-route.js +1 -1
- package/build/routes/plugin-routes.js +1 -1
- package/build/routes/post-route.js +2 -2
- package/build/routes/resolver.js +5 -5
- package/build/routes/resource-route.js +1 -1
- package/build/src/application.d.ts +26 -29
- package/build/src/application.d.ts.map +1 -1
- package/build/src/application.js +4 -4
- package/build/src/authorization/ability.d.ts +47 -53
- package/build/src/authorization/ability.d.ts.map +1 -1
- package/build/src/authorization/ability.js +7 -7
- package/build/src/authorization/base-resource.d.ts +13 -13
- package/build/src/authorization/base-resource.d.ts.map +1 -1
- package/build/src/authorization/base-resource.js +2 -2
- package/build/src/background-jobs/client.d.ts +9 -9
- package/build/src/background-jobs/client.d.ts.map +1 -1
- package/build/src/background-jobs/client.js +3 -3
- package/build/src/background-jobs/cron-expression.d.ts +25 -16
- package/build/src/background-jobs/cron-expression.d.ts.map +1 -1
- package/build/src/background-jobs/forked-runner-child.js +5 -5
- package/build/src/background-jobs/job-record.d.ts +4 -3
- package/build/src/background-jobs/job-record.d.ts.map +1 -1
- package/build/src/background-jobs/job-registry.d.ts +6 -6
- package/build/src/background-jobs/job-registry.d.ts.map +1 -1
- package/build/src/background-jobs/job-runner.d.ts +9 -9
- package/build/src/background-jobs/job-runner.d.ts.map +1 -1
- package/build/src/background-jobs/job-runner.js +3 -3
- package/build/src/background-jobs/job.d.ts +14 -14
- package/build/src/background-jobs/job.d.ts.map +1 -1
- package/build/src/background-jobs/job.js +7 -7
- package/build/src/background-jobs/json-socket.d.ts +9 -10
- package/build/src/background-jobs/json-socket.d.ts.map +1 -1
- package/build/src/background-jobs/json-socket.js +2 -2
- package/build/src/background-jobs/main.d.ts +56 -59
- package/build/src/background-jobs/main.d.ts.map +1 -1
- package/build/src/background-jobs/main.js +14 -14
- package/build/src/background-jobs/normalize-error.d.ts +2 -2
- package/build/src/background-jobs/normalize-error.d.ts.map +1 -1
- package/build/src/background-jobs/normalize-error.js +3 -3
- package/build/src/background-jobs/pooled-runner-child.js +4 -4
- package/build/src/background-jobs/runner-graceful-shutdown.d.ts +7 -12
- package/build/src/background-jobs/runner-graceful-shutdown.d.ts.map +1 -1
- package/build/src/background-jobs/runner-process-title.d.ts.map +1 -1
- package/build/src/background-jobs/scheduler.d.ts +41 -41
- package/build/src/background-jobs/scheduler.d.ts.map +1 -1
- package/build/src/background-jobs/scheduler.js +2 -2
- package/build/src/background-jobs/socket-request.d.ts +14 -14
- package/build/src/background-jobs/socket-request.d.ts.map +1 -1
- package/build/src/background-jobs/status-reporter.d.ts +28 -28
- package/build/src/background-jobs/status-reporter.d.ts.map +1 -1
- package/build/src/background-jobs/status-reporter.js +3 -3
- package/build/src/background-jobs/store.d.ts +100 -103
- package/build/src/background-jobs/store.d.ts.map +1 -1
- package/build/src/background-jobs/store.js +24 -24
- package/build/src/background-jobs/types.d.ts +124 -124
- package/build/src/background-jobs/types.d.ts.map +1 -1
- package/build/src/background-jobs/types.js +7 -7
- package/build/src/background-jobs/web/authorization.d.ts +2 -2
- package/build/src/background-jobs/web/authorization.d.ts.map +1 -1
- package/build/src/background-jobs/web/controller.d.ts +13 -13
- package/build/src/background-jobs/web/controller.d.ts.map +1 -1
- package/build/src/background-jobs/web/controller.js +7 -7
- package/build/src/background-jobs/web/counts-channel.d.ts +8 -8
- package/build/src/background-jobs/web/counts-channel.d.ts.map +1 -1
- package/build/src/background-jobs/web/counts-channel.js +2 -2
- package/build/src/background-jobs/web/index.d.ts +4 -4
- package/build/src/background-jobs/web/index.d.ts.map +1 -1
- package/build/src/background-jobs/web/path-matcher.d.ts +18 -13
- package/build/src/background-jobs/web/path-matcher.d.ts.map +1 -1
- package/build/src/background-jobs/web/registry.d.ts +21 -24
- package/build/src/background-jobs/web/registry.d.ts.map +1 -1
- package/build/src/background-jobs/worker.d.ts +74 -77
- package/build/src/background-jobs/worker.d.ts.map +1 -1
- package/build/src/background-jobs/worker.js +9 -9
- package/build/src/beacon/client.d.ts +30 -34
- package/build/src/beacon/client.d.ts.map +1 -1
- package/build/src/beacon/client.js +4 -4
- package/build/src/beacon/in-process-broker.d.ts +6 -9
- package/build/src/beacon/in-process-broker.d.ts.map +1 -1
- package/build/src/beacon/in-process-client.d.ts +17 -21
- package/build/src/beacon/in-process-client.d.ts.map +1 -1
- package/build/src/beacon/in-process-client.js +4 -4
- package/build/src/beacon/server.d.ts +15 -15
- package/build/src/beacon/server.d.ts.map +1 -1
- package/build/src/beacon/types.d.ts +21 -46
- package/build/src/beacon/types.d.ts.map +1 -1
- package/build/src/beacon/types.js +2 -2
- package/build/src/cli/base-command.d.ts +25 -28
- package/build/src/cli/base-command.d.ts.map +1 -1
- package/build/src/cli/base-command.js +2 -2
- package/build/src/cli/browser-cli.d.ts +1 -1
- package/build/src/cli/browser-cli.d.ts.map +1 -1
- package/build/src/cli/commands/background-jobs-main.d.ts +2 -1
- package/build/src/cli/commands/background-jobs-main.d.ts.map +1 -1
- package/build/src/cli/commands/background-jobs-runner.d.ts +2 -1
- package/build/src/cli/commands/background-jobs-runner.d.ts.map +1 -1
- package/build/src/cli/commands/background-jobs-worker.d.ts +2 -1
- package/build/src/cli/commands/background-jobs-worker.d.ts.map +1 -1
- package/build/src/cli/commands/beacon.d.ts +2 -1
- package/build/src/cli/commands/beacon.d.ts.map +1 -1
- package/build/src/cli/commands/console.d.ts +6 -1
- package/build/src/cli/commands/console.d.ts.map +1 -1
- package/build/src/cli/commands/console.js +2 -2
- package/build/src/cli/commands/db/base-command.d.ts +1 -1
- package/build/src/cli/commands/db/base-command.d.ts.map +1 -1
- package/build/src/cli/commands/db/create.d.ts +1 -1
- package/build/src/cli/commands/db/create.d.ts.map +1 -1
- package/build/src/cli/commands/db/drop.d.ts +1 -1
- package/build/src/cli/commands/db/drop.d.ts.map +1 -1
- package/build/src/cli/commands/db/migrate.d.ts +1 -1
- package/build/src/cli/commands/db/migrate.d.ts.map +1 -1
- package/build/src/cli/commands/db/reset.d.ts +1 -1
- package/build/src/cli/commands/db/reset.d.ts.map +1 -1
- package/build/src/cli/commands/db/rollback.d.ts +1 -1
- package/build/src/cli/commands/db/rollback.d.ts.map +1 -1
- package/build/src/cli/commands/db/schema/dump.d.ts +6 -1
- package/build/src/cli/commands/db/schema/dump.d.ts.map +1 -1
- package/build/src/cli/commands/db/schema/dump.js +2 -2
- package/build/src/cli/commands/db/schema/load.d.ts +6 -1
- package/build/src/cli/commands/db/schema/load.d.ts.map +1 -1
- package/build/src/cli/commands/db/schema/load.js +2 -2
- package/build/src/cli/commands/db/seed.d.ts +6 -1
- package/build/src/cli/commands/db/seed.d.ts.map +1 -1
- package/build/src/cli/commands/db/seed.js +2 -2
- package/build/src/cli/commands/db/tenants/check.d.ts +1 -1
- package/build/src/cli/commands/db/tenants/check.d.ts.map +1 -1
- package/build/src/cli/commands/db/tenants/create.d.ts +1 -1
- package/build/src/cli/commands/db/tenants/create.d.ts.map +1 -1
- package/build/src/cli/commands/db/tenants/drop.d.ts +1 -1
- package/build/src/cli/commands/db/tenants/drop.d.ts.map +1 -1
- package/build/src/cli/commands/db/tenants/migrate.d.ts +1 -1
- package/build/src/cli/commands/db/tenants/migrate.d.ts.map +1 -1
- package/build/src/cli/commands/destroy/migration.d.ts +2 -1
- package/build/src/cli/commands/destroy/migration.d.ts.map +1 -1
- package/build/src/cli/commands/generate/base-models.d.ts +2 -1
- package/build/src/cli/commands/generate/base-models.d.ts.map +1 -1
- package/build/src/cli/commands/generate/frontend-models.d.ts +6 -1
- package/build/src/cli/commands/generate/frontend-models.d.ts.map +1 -1
- package/build/src/cli/commands/generate/frontend-models.js +2 -2
- package/build/src/cli/commands/generate/migration.d.ts +2 -1
- package/build/src/cli/commands/generate/migration.d.ts.map +1 -1
- package/build/src/cli/commands/generate/model.d.ts +2 -1
- package/build/src/cli/commands/generate/model.d.ts.map +1 -1
- package/build/src/cli/commands/init.d.ts +4 -2
- package/build/src/cli/commands/init.d.ts.map +1 -1
- package/build/src/cli/commands/lint/relationships.d.ts +6 -1
- package/build/src/cli/commands/lint/relationships.d.ts.map +1 -1
- package/build/src/cli/commands/lint/relationships.js +2 -2
- package/build/src/cli/commands/routes.d.ts +2 -1
- package/build/src/cli/commands/routes.d.ts.map +1 -1
- package/build/src/cli/commands/run-script.d.ts +6 -1
- package/build/src/cli/commands/run-script.d.ts.map +1 -1
- package/build/src/cli/commands/run-script.js +2 -2
- package/build/src/cli/commands/runner.d.ts +6 -1
- package/build/src/cli/commands/runner.d.ts.map +1 -1
- package/build/src/cli/commands/runner.js +2 -2
- package/build/src/cli/commands/server.d.ts +2 -1
- package/build/src/cli/commands/server.d.ts.map +1 -1
- package/build/src/cli/commands/test.d.ts +2 -1
- package/build/src/cli/commands/test.d.ts.map +1 -1
- package/build/src/cli/index.d.ts +20 -20
- package/build/src/cli/index.d.ts.map +1 -1
- package/build/src/cli/index.js +3 -3
- package/build/src/cli/tenant-database-command-helper.d.ts +13 -13
- package/build/src/cli/tenant-database-command-helper.d.ts.map +1 -1
- package/build/src/cli/tenant-database-command-helper.js +3 -3
- package/build/src/cli/use-browser-cli.d.ts +1 -1
- package/build/src/cli/use-browser-cli.d.ts.map +1 -1
- package/build/src/configuration-resolver.d.ts +1 -1
- package/build/src/configuration-resolver.d.ts.map +1 -1
- package/build/src/configuration-types.d.ts +947 -1038
- package/build/src/configuration-types.d.ts.map +1 -1
- package/build/src/configuration-types.js +49 -48
- package/build/src/configuration.d.ts +145 -139
- package/build/src/configuration.d.ts.map +1 -1
- package/build/src/configuration.js +149 -66
- package/build/src/controller.d.ts +37 -35
- package/build/src/controller.d.ts.map +1 -1
- package/build/src/controller.js +11 -9
- package/build/src/current-configuration.d.ts +5 -4
- package/build/src/current-configuration.d.ts.map +1 -1
- package/build/src/current.d.ts +3 -3
- package/build/src/current.d.ts.map +1 -1
- package/build/src/current.js +3 -3
- package/build/src/database/advisory-lock-runner.d.ts +61 -60
- package/build/src/database/advisory-lock-runner.d.ts.map +1 -1
- package/build/src/database/annotations-async-hooks.js +4 -4
- package/build/src/database/annotations.d.ts +4 -6
- package/build/src/database/annotations.d.ts.map +1 -1
- package/build/src/database/annotations.js +2 -2
- package/build/src/database/column-types.d.ts +1 -1
- package/build/src/database/column-types.d.ts.map +1 -1
- package/build/src/database/datetime-storage.d.ts +6 -6
- package/build/src/database/datetime-storage.d.ts.map +1 -1
- package/build/src/database/drivers/base-column.d.ts +3 -3
- package/build/src/database/drivers/base-column.d.ts.map +1 -1
- package/build/src/database/drivers/base-column.js +2 -2
- package/build/src/database/drivers/base-columns-index.d.ts +2 -2
- package/build/src/database/drivers/base-columns-index.d.ts.map +1 -1
- package/build/src/database/drivers/base-foreign-key.d.ts +7 -7
- package/build/src/database/drivers/base-foreign-key.d.ts.map +1 -1
- package/build/src/database/drivers/base-foreign-key.js +2 -2
- package/build/src/database/drivers/base-table.d.ts +3 -3
- package/build/src/database/drivers/base-table.d.ts.map +1 -1
- package/build/src/database/drivers/base-table.js +2 -2
- package/build/src/database/drivers/base.d.ts +297 -342
- package/build/src/database/drivers/base.d.ts.map +1 -1
- package/build/src/database/drivers/base.js +19 -19
- package/build/src/database/drivers/index-metadata.d.ts +15 -18
- package/build/src/database/drivers/index-metadata.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/column.d.ts +10 -5
- package/build/src/database/drivers/mssql/column.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/column.js +2 -2
- package/build/src/database/drivers/mssql/columns-index.d.ts +30 -22
- package/build/src/database/drivers/mssql/columns-index.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/connect-connection.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/foreign-key.d.ts +1 -1
- package/build/src/database/drivers/mssql/foreign-key.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/index.d.ts +250 -9
- package/build/src/database/drivers/mssql/index.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/index.js +3 -3
- package/build/src/database/drivers/mssql/options.d.ts +31 -1
- package/build/src/database/drivers/mssql/options.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/options.js +2 -2
- package/build/src/database/drivers/mssql/query-parser.d.ts +1 -1
- package/build/src/database/drivers/mssql/query-parser.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/alter-table.d.ts +1 -1
- package/build/src/database/drivers/mssql/sql/alter-table.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/create-database.d.ts +3 -2
- package/build/src/database/drivers/mssql/sql/create-database.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/create-index.d.ts +1 -1
- package/build/src/database/drivers/mssql/sql/create-index.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/create-table.d.ts +1 -1
- package/build/src/database/drivers/mssql/sql/create-table.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/delete.d.ts +1 -1
- package/build/src/database/drivers/mssql/sql/delete.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/drop-database.d.ts +14 -1
- package/build/src/database/drivers/mssql/sql/drop-database.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/drop-table.d.ts +1 -1
- package/build/src/database/drivers/mssql/sql/drop-table.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/insert.d.ts +1 -1
- package/build/src/database/drivers/mssql/sql/insert.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/remove-index.d.ts +1 -1
- package/build/src/database/drivers/mssql/sql/remove-index.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/update.d.ts +1 -1
- package/build/src/database/drivers/mssql/sql/update.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/upsert.d.ts +1 -1
- package/build/src/database/drivers/mssql/sql/upsert.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/structure-sql.d.ts +3 -3
- package/build/src/database/drivers/mssql/structure-sql.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/structure-sql.js +2 -2
- package/build/src/database/drivers/mssql/table.d.ts +39 -29
- package/build/src/database/drivers/mssql/table.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/table.js +2 -2
- package/build/src/database/drivers/mysql/column.d.ts +10 -6
- package/build/src/database/drivers/mysql/column.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/column.js +2 -2
- package/build/src/database/drivers/mysql/columns-index.d.ts +3 -1
- package/build/src/database/drivers/mysql/columns-index.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/foreign-key.d.ts +1 -1
- package/build/src/database/drivers/mysql/foreign-key.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/index.d.ts +225 -6
- package/build/src/database/drivers/mysql/index.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/index.js +5 -5
- package/build/src/database/drivers/mysql/options.d.ts +7 -1
- package/build/src/database/drivers/mysql/options.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/options.js +2 -2
- package/build/src/database/drivers/mysql/query-parser.d.ts +1 -1
- package/build/src/database/drivers/mysql/query-parser.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/query-stream.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/query.d.ts +2 -2
- package/build/src/database/drivers/mysql/query.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/query.js +8 -8
- package/build/src/database/drivers/mysql/sql/alter-table.d.ts +12 -1
- package/build/src/database/drivers/mysql/sql/alter-table.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/sql/create-database.d.ts +6 -1
- package/build/src/database/drivers/mysql/sql/create-database.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/sql/create-index.d.ts +1 -1
- package/build/src/database/drivers/mysql/sql/create-index.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/sql/create-table.d.ts +1 -1
- package/build/src/database/drivers/mysql/sql/create-table.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/sql/delete.d.ts +1 -1
- package/build/src/database/drivers/mysql/sql/delete.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/sql/drop-database.d.ts +1 -1
- package/build/src/database/drivers/mysql/sql/drop-database.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/sql/drop-table.d.ts +1 -1
- package/build/src/database/drivers/mysql/sql/drop-table.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/sql/insert.d.ts +1 -1
- package/build/src/database/drivers/mysql/sql/insert.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/sql/remove-index.d.ts +1 -1
- package/build/src/database/drivers/mysql/sql/remove-index.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/sql/update.d.ts +1 -1
- package/build/src/database/drivers/mysql/sql/update.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/sql/upsert.d.ts +1 -1
- package/build/src/database/drivers/mysql/sql/upsert.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/structure-sql.d.ts +14 -3
- package/build/src/database/drivers/mysql/structure-sql.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/structure-sql.js +62 -11
- package/build/src/database/drivers/mysql/table.d.ts +11 -6
- package/build/src/database/drivers/mysql/table.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/column.d.ts +10 -5
- package/build/src/database/drivers/pgsql/column.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/column.js +2 -2
- package/build/src/database/drivers/pgsql/columns-index.d.ts +30 -22
- package/build/src/database/drivers/pgsql/columns-index.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/foreign-key.d.ts +1 -1
- package/build/src/database/drivers/pgsql/foreign-key.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/index.d.ts +157 -6
- package/build/src/database/drivers/pgsql/index.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/index.js +7 -7
- package/build/src/database/drivers/pgsql/options.d.ts +1 -1
- package/build/src/database/drivers/pgsql/options.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/query-parser.d.ts +1 -1
- package/build/src/database/drivers/pgsql/query-parser.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/alter-table.d.ts +1 -1
- package/build/src/database/drivers/pgsql/sql/alter-table.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/create-database.d.ts +2 -1
- package/build/src/database/drivers/pgsql/sql/create-database.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/create-index.d.ts +1 -1
- package/build/src/database/drivers/pgsql/sql/create-index.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/create-table.d.ts +1 -1
- package/build/src/database/drivers/pgsql/sql/create-table.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/delete.d.ts +1 -1
- package/build/src/database/drivers/pgsql/sql/delete.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/drop-database.d.ts +1 -1
- package/build/src/database/drivers/pgsql/sql/drop-database.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/drop-table.d.ts +1 -1
- package/build/src/database/drivers/pgsql/sql/drop-table.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/insert.d.ts +1 -1
- package/build/src/database/drivers/pgsql/sql/insert.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/remove-index.d.ts +1 -1
- package/build/src/database/drivers/pgsql/sql/remove-index.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/update.d.ts +1 -1
- package/build/src/database/drivers/pgsql/sql/update.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/sql/upsert.d.ts +1 -1
- package/build/src/database/drivers/pgsql/sql/upsert.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/structure-sql.d.ts +3 -3
- package/build/src/database/drivers/pgsql/structure-sql.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/structure-sql.js +2 -2
- package/build/src/database/drivers/pgsql/table.d.ts +33 -31
- package/build/src/database/drivers/pgsql/table.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/base.d.ts +162 -12
- package/build/src/database/drivers/sqlite/base.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/base.js +8 -8
- package/build/src/database/drivers/sqlite/column.d.ts +12 -6
- package/build/src/database/drivers/sqlite/column.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/column.js +2 -2
- package/build/src/database/drivers/sqlite/columns-index.d.ts +5 -1
- package/build/src/database/drivers/sqlite/columns-index.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/connection-sql-js.d.ts +9 -9
- package/build/src/database/drivers/sqlite/connection-sql-js.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/connection-sql-js.js +2 -2
- package/build/src/database/drivers/sqlite/foreign-key.d.ts +5 -4
- package/build/src/database/drivers/sqlite/foreign-key.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/foreign-key.js +2 -2
- package/build/src/database/drivers/sqlite/index.d.ts +53 -3
- package/build/src/database/drivers/sqlite/index.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/index.js +2 -2
- package/build/src/database/drivers/sqlite/index.native.d.ts +13 -5
- package/build/src/database/drivers/sqlite/index.native.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/index.native.js +3 -3
- package/build/src/database/drivers/sqlite/index.web.d.ts +48 -14
- package/build/src/database/drivers/sqlite/index.web.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/index.web.js +3 -3
- package/build/src/database/drivers/sqlite/options.d.ts +1 -1
- package/build/src/database/drivers/sqlite/options.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/query-parser.d.ts +1 -1
- package/build/src/database/drivers/sqlite/query-parser.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/query.d.ts +2 -2
- package/build/src/database/drivers/sqlite/query.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/query.js +3 -3
- package/build/src/database/drivers/sqlite/query.native.d.ts +4 -4
- package/build/src/database/drivers/sqlite/query.native.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/query.native.js +3 -3
- package/build/src/database/drivers/sqlite/query.web.d.ts +2 -2
- package/build/src/database/drivers/sqlite/query.web.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/query.web.js +3 -3
- package/build/src/database/drivers/sqlite/sql/alter-table.d.ts +19 -4
- package/build/src/database/drivers/sqlite/sql/alter-table.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/sql/create-index.d.ts +1 -1
- package/build/src/database/drivers/sqlite/sql/create-index.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/sql/create-table.d.ts +1 -1
- package/build/src/database/drivers/sqlite/sql/create-table.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/sql/delete.d.ts +1 -1
- package/build/src/database/drivers/sqlite/sql/delete.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/sql/drop-table.d.ts +1 -1
- package/build/src/database/drivers/sqlite/sql/drop-table.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/sql/insert.d.ts +1 -1
- package/build/src/database/drivers/sqlite/sql/insert.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/sql/remove-index.d.ts +1 -1
- package/build/src/database/drivers/sqlite/sql/remove-index.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/sql/update.d.ts +1 -1
- package/build/src/database/drivers/sqlite/sql/update.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/sql/upsert.d.ts +1 -1
- package/build/src/database/drivers/sqlite/sql/upsert.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/structure-sql.d.ts +1 -1
- package/build/src/database/drivers/sqlite/structure-sql.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/table-rebuilder.d.ts +5 -5
- package/build/src/database/drivers/sqlite/table-rebuilder.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/table-rebuilder.js +2 -2
- package/build/src/database/drivers/sqlite/table.d.ts +15 -5
- package/build/src/database/drivers/sqlite/table.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/web-persistence.d.ts +28 -34
- package/build/src/database/drivers/sqlite/web-persistence.d.ts.map +1 -1
- package/build/src/database/drivers/structure-sql/utils.d.ts +2 -2
- package/build/src/database/drivers/structure-sql/utils.d.ts.map +1 -1
- package/build/src/database/handler.d.ts.map +1 -1
- package/build/src/database/initializer-from-require-context.d.ts +18 -16
- package/build/src/database/initializer-from-require-context.d.ts.map +1 -1
- package/build/src/database/live-query.d.ts +13 -24
- package/build/src/database/live-query.d.ts.map +1 -1
- package/build/src/database/migration/index.d.ts +146 -169
- package/build/src/database/migration/index.d.ts.map +1 -1
- package/build/src/database/migration/index.js +3 -3
- package/build/src/database/migrations-ledger.d.ts.map +1 -1
- package/build/src/database/migrator/files-finder.d.ts +1 -1
- package/build/src/database/migrator/files-finder.d.ts.map +1 -1
- package/build/src/database/migrator/types.d.ts +26 -2
- package/build/src/database/migrator/types.d.ts.map +1 -1
- package/build/src/database/migrator/types.js +24 -1
- package/build/src/database/migrator.d.ts +10 -10
- package/build/src/database/migrator.d.ts.map +1 -1
- package/build/src/database/operation-connection.d.ts +3 -3
- package/build/src/database/operation-connection.d.ts.map +1 -1
- package/build/src/database/operation-lease.d.ts +4 -4
- package/build/src/database/operation-lease.d.ts.map +1 -1
- package/build/src/database/operation.d.ts +38 -7
- package/build/src/database/operation.d.ts.map +1 -1
- package/build/src/database/operation.js +55 -8
- package/build/src/database/pool/async-tracked-multi-connection.d.ts +174 -79
- package/build/src/database/pool/async-tracked-multi-connection.d.ts.map +1 -1
- package/build/src/database/pool/async-tracked-multi-connection.js +70 -25
- package/build/src/database/pool/base-methods-forward.d.ts.map +1 -1
- package/build/src/database/pool/base-methods-forward.js +3 -3
- package/build/src/database/pool/base.d.ts +93 -71
- package/build/src/database/pool/base.d.ts.map +1 -1
- package/build/src/database/pool/base.js +47 -17
- package/build/src/database/pool/single-multi-use.d.ts +243 -10
- package/build/src/database/pool/single-multi-use.d.ts.map +1 -1
- package/build/src/database/pool/single-multi-use.js +467 -103
- package/build/src/database/query/alter-table-base.d.ts +8 -3
- package/build/src/database/query/alter-table-base.d.ts.map +1 -1
- package/build/src/database/query/base.d.ts +3 -3
- package/build/src/database/query/base.d.ts.map +1 -1
- package/build/src/database/query/create-database-base.d.ts +28 -22
- package/build/src/database/query/create-database-base.d.ts.map +1 -1
- package/build/src/database/query/create-index-base.d.ts +32 -30
- package/build/src/database/query/create-index-base.d.ts.map +1 -1
- package/build/src/database/query/create-table-base.d.ts +7 -7
- package/build/src/database/query/create-table-base.d.ts.map +1 -1
- package/build/src/database/query/delete-base.d.ts +5 -5
- package/build/src/database/query/delete-base.d.ts.map +1 -1
- package/build/src/database/query/delete-base.js +2 -2
- package/build/src/database/query/drop-database-base.d.ts +22 -18
- package/build/src/database/query/drop-database-base.d.ts.map +1 -1
- package/build/src/database/query/drop-table-base.d.ts +11 -6
- package/build/src/database/query/drop-table-base.d.ts.map +1 -1
- package/build/src/database/query/from-base.d.ts.map +1 -1
- package/build/src/database/query/from-plain.d.ts +3 -2
- package/build/src/database/query/from-plain.d.ts.map +1 -1
- package/build/src/database/query/from-table.d.ts +3 -2
- package/build/src/database/query/from-table.d.ts.map +1 -1
- package/build/src/database/query/index.d.ts +92 -107
- package/build/src/database/query/index.d.ts.map +1 -1
- package/build/src/database/query/index.js +4 -4
- package/build/src/database/query/insert-base.d.ts +18 -18
- package/build/src/database/query/insert-base.d.ts.map +1 -1
- package/build/src/database/query/insert-base.js +5 -5
- package/build/src/database/query/join-base.d.ts +1 -1
- package/build/src/database/query/join-base.d.ts.map +1 -1
- package/build/src/database/query/join-object.d.ts +9 -15
- package/build/src/database/query/join-object.d.ts.map +1 -1
- package/build/src/database/query/join-plain.d.ts +2 -2
- package/build/src/database/query/join-plain.d.ts.map +1 -1
- package/build/src/database/query/join-tracker.d.ts +3 -3
- package/build/src/database/query/join-tracker.d.ts.map +1 -1
- package/build/src/database/query/model-class-query.d.ts +39 -36
- package/build/src/database/query/model-class-query.d.ts.map +1 -1
- package/build/src/database/query/model-class-query.js +40 -40
- package/build/src/database/query/order-base.d.ts +1 -1
- package/build/src/database/query/order-base.d.ts.map +1 -1
- package/build/src/database/query/order-column.d.ts +19 -22
- package/build/src/database/query/order-column.d.ts.map +1 -1
- package/build/src/database/query/order-plain.d.ts +3 -3
- package/build/src/database/query/order-plain.d.ts.map +1 -1
- package/build/src/database/query/preloader/belongs-to.d.ts +5 -5
- package/build/src/database/query/preloader/belongs-to.d.ts.map +1 -1
- package/build/src/database/query/preloader/belongs-to.js +3 -3
- package/build/src/database/query/preloader/ensure-model-class-initialized.d.ts +2 -1
- package/build/src/database/query/preloader/ensure-model-class-initialized.d.ts.map +1 -1
- package/build/src/database/query/preloader/ensure-model-class-initialized.js +4 -3
- package/build/src/database/query/preloader/has-many.d.ts +6 -6
- package/build/src/database/query/preloader/has-many.d.ts.map +1 -1
- package/build/src/database/query/preloader/has-many.js +4 -4
- package/build/src/database/query/preloader/has-one.d.ts +5 -5
- package/build/src/database/query/preloader/has-one.d.ts.map +1 -1
- package/build/src/database/query/preloader/has-one.js +2 -2
- package/build/src/database/query/preloader/query-for-model.d.ts.map +1 -1
- package/build/src/database/query/preloader/selection.d.ts +6 -6
- package/build/src/database/query/preloader/selection.d.ts.map +1 -1
- package/build/src/database/query/preloader.d.ts +8 -8
- package/build/src/database/query/preloader.d.ts.map +1 -1
- package/build/src/database/query/preloader.js +9 -3
- package/build/src/database/query/query-data.d.ts +43 -55
- package/build/src/database/query/query-data.d.ts.map +1 -1
- package/build/src/database/query/query-data.js +8 -8
- package/build/src/database/query/remove-index-base.d.ts +21 -19
- package/build/src/database/query/remove-index-base.d.ts.map +1 -1
- package/build/src/database/query/select-base.d.ts +1 -1
- package/build/src/database/query/select-base.d.ts.map +1 -1
- package/build/src/database/query/select-plain.d.ts +3 -2
- package/build/src/database/query/select-plain.d.ts.map +1 -1
- package/build/src/database/query/select-table-and-column.d.ts +4 -3
- package/build/src/database/query/select-table-and-column.d.ts.map +1 -1
- package/build/src/database/query/update-base.d.ts +10 -10
- package/build/src/database/query/update-base.d.ts.map +1 -1
- package/build/src/database/query/update-base.js +4 -4
- package/build/src/database/query/upsert-base.d.ts +9 -9
- package/build/src/database/query/upsert-base.d.ts.map +1 -1
- package/build/src/database/query/upsert-base.js +3 -3
- package/build/src/database/query/where-base.d.ts +1 -1
- package/build/src/database/query/where-base.d.ts.map +1 -1
- package/build/src/database/query/where-combinator.d.ts +9 -4
- package/build/src/database/query/where-combinator.d.ts.map +1 -1
- package/build/src/database/query/where-hash.d.ts +11 -9
- package/build/src/database/query/where-hash.d.ts.map +1 -1
- package/build/src/database/query/where-model-class-hash.d.ts +28 -26
- package/build/src/database/query/where-model-class-hash.d.ts.map +1 -1
- package/build/src/database/query/where-model-class-hash.js +14 -14
- package/build/src/database/query/where-not.d.ts +8 -3
- package/build/src/database/query/where-not.d.ts.map +1 -1
- package/build/src/database/query/where-plain.d.ts +4 -3
- package/build/src/database/query/where-plain.d.ts.map +1 -1
- package/build/src/database/query/with-count.d.ts +22 -28
- package/build/src/database/query/with-count.d.ts.map +1 -1
- package/build/src/database/query/with-count.js +12 -12
- package/build/src/database/query-aborted-error.d.ts +5 -5
- package/build/src/database/query-aborted-error.d.ts.map +1 -1
- package/build/src/database/query-parser/base-query-parser.d.ts +3 -3
- package/build/src/database/query-parser/base-query-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/from-parser.d.ts +2 -2
- package/build/src/database/query-parser/from-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/group-parser.d.ts +2 -2
- package/build/src/database/query-parser/group-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/joins-parser.d.ts +3 -3
- package/build/src/database/query-parser/joins-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/limit-parser.d.ts +2 -2
- package/build/src/database/query-parser/limit-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/options.d.ts +31 -34
- package/build/src/database/query-parser/options.d.ts.map +1 -1
- package/build/src/database/query-parser/options.js +3 -3
- package/build/src/database/query-parser/order-parser.d.ts +2 -2
- package/build/src/database/query-parser/order-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/select-parser.d.ts +2 -2
- package/build/src/database/query-parser/select-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/select-parser.js +2 -2
- package/build/src/database/query-parser/where-parser.d.ts +2 -2
- package/build/src/database/query-parser/where-parser.d.ts.map +1 -1
- package/build/src/database/record/acts-as-list.d.ts.map +1 -1
- package/build/src/database/record/acts-as-list.js +3 -3
- package/build/src/database/record/attachments/attachment-record.d.ts +7 -3
- package/build/src/database/record/attachments/attachment-record.d.ts.map +1 -1
- package/build/src/database/record/attachments/download.d.ts +9 -9
- package/build/src/database/record/attachments/download.d.ts.map +1 -1
- package/build/src/database/record/attachments/handle.d.ts +12 -12
- package/build/src/database/record/attachments/handle.d.ts.map +1 -1
- package/build/src/database/record/attachments/handle.js +7 -7
- package/build/src/database/record/attachments/normalize-input.d.ts +16 -22
- package/build/src/database/record/attachments/normalize-input.d.ts.map +1 -1
- package/build/src/database/record/attachments/normalize-input.js +12 -12
- package/build/src/database/record/attachments/storage-drivers/filesystem.d.ts +4 -4
- package/build/src/database/record/attachments/storage-drivers/filesystem.d.ts.map +1 -1
- package/build/src/database/record/attachments/storage-drivers/filesystem.js +2 -2
- package/build/src/database/record/attachments/storage-drivers/native.d.ts +12 -12
- package/build/src/database/record/attachments/storage-drivers/native.d.ts.map +1 -1
- package/build/src/database/record/attachments/storage-drivers/native.js +6 -6
- package/build/src/database/record/attachments/storage-drivers/s3.d.ts +17 -17
- package/build/src/database/record/attachments/storage-drivers/s3.d.ts.map +1 -1
- package/build/src/database/record/attachments/storage-drivers/s3.js +11 -11
- package/build/src/database/record/attachments/store.d.ts +38 -41
- package/build/src/database/record/attachments/store.d.ts.map +1 -1
- package/build/src/database/record/attachments/store.js +24 -21
- package/build/src/database/record/auditing.d.ts +67 -87
- package/build/src/database/record/auditing.d.ts.map +1 -1
- package/build/src/database/record/auditing.js +109 -30
- package/build/src/database/record/counter-cache-magnitude.d.ts +15 -35
- package/build/src/database/record/counter-cache-magnitude.d.ts.map +1 -1
- package/build/src/database/record/counter-cache-magnitude.js +12 -12
- package/build/src/database/record/index.d.ts +2390 -488
- package/build/src/database/record/index.d.ts.map +1 -1
- package/build/src/database/record/index.js +222 -172
- package/build/src/database/record/instance-relationships/base.d.ts +20 -23
- package/build/src/database/record/instance-relationships/base.d.ts.map +1 -1
- package/build/src/database/record/instance-relationships/base.js +5 -5
- package/build/src/database/record/instance-relationships/belongs-to.d.ts +9 -1
- package/build/src/database/record/instance-relationships/belongs-to.d.ts.map +1 -1
- package/build/src/database/record/instance-relationships/belongs-to.js +2 -2
- package/build/src/database/record/instance-relationships/has-many.d.ts +15 -3
- package/build/src/database/record/instance-relationships/has-many.d.ts.map +1 -1
- package/build/src/database/record/instance-relationships/has-many.js +4 -4
- package/build/src/database/record/instance-relationships/has-one.d.ts +19 -1
- package/build/src/database/record/instance-relationships/has-one.d.ts.map +1 -1
- package/build/src/database/record/instance-relationships/has-one.js +2 -2
- package/build/src/database/record/record-not-found-error.d.ts +1 -0
- package/build/src/database/record/record-not-found-error.d.ts.map +1 -1
- package/build/src/database/record/record-not-found-error.js +2 -1
- package/build/src/database/record/relationships/base.d.ts +83 -71
- package/build/src/database/record/relationships/base.d.ts.map +1 -1
- package/build/src/database/record/relationships/base.js +21 -1
- package/build/src/database/record/relationships/belongs-to.d.ts +11 -1
- package/build/src/database/record/relationships/belongs-to.d.ts.map +1 -1
- package/build/src/database/record/relationships/has-many.d.ts +11 -1
- package/build/src/database/record/relationships/has-many.d.ts.map +1 -1
- package/build/src/database/record/relationships/has-one.d.ts +11 -1
- package/build/src/database/record/relationships/has-one.d.ts.map +1 -1
- package/build/src/database/record/state-machine.d.ts +20 -29
- package/build/src/database/record/state-machine.d.ts.map +1 -1
- package/build/src/database/record/state-machine.js +7 -7
- package/build/src/database/record/user-module.d.ts +1 -1
- package/build/src/database/record/user-module.d.ts.map +1 -1
- package/build/src/database/record/validation-messages.d.ts +19 -22
- package/build/src/database/record/validation-messages.d.ts.map +1 -1
- package/build/src/database/record/validators/base.d.ts +4 -4
- package/build/src/database/record/validators/base.d.ts.map +1 -1
- package/build/src/database/record/validators/base.js +2 -2
- package/build/src/database/record/validators/format.d.ts +12 -1
- package/build/src/database/record/validators/format.d.ts.map +1 -1
- package/build/src/database/record/validators/length.d.ts +14 -1
- package/build/src/database/record/validators/length.d.ts.map +1 -1
- package/build/src/database/record/validators/presence.d.ts +11 -1
- package/build/src/database/record/validators/presence.d.ts.map +1 -1
- package/build/src/database/record/validators/uniqueness.d.ts +12 -1
- package/build/src/database/record/validators/uniqueness.d.ts.map +1 -1
- package/build/src/database/record-changes.d.ts +7 -18
- package/build/src/database/record-changes.d.ts.map +1 -1
- package/build/src/database/structure-sql-loader.d.ts +2 -2
- package/build/src/database/structure-sql-loader.d.ts.map +1 -1
- package/build/src/database/structure-sql-loader.js +4 -4
- package/build/src/database/table-data/index.d.ts +21 -24
- package/build/src/database/table-data/index.d.ts.map +1 -1
- package/build/src/database/table-data/table-column.d.ts +74 -80
- package/build/src/database/table-data/table-column.d.ts.map +1 -1
- package/build/src/database/table-data/table-column.js +4 -4
- package/build/src/database/table-data/table-foreign-key.d.ts +10 -10
- package/build/src/database/table-data/table-foreign-key.d.ts.map +1 -1
- package/build/src/database/table-data/table-index.d.ts +12 -15
- package/build/src/database/table-data/table-index.d.ts.map +1 -1
- package/build/src/database/table-data/table-reference.d.ts +2 -2
- package/build/src/database/table-data/table-reference.d.ts.map +1 -1
- package/build/src/database/tenants/data-copier.d.ts +7 -7
- package/build/src/database/tenants/data-copier.d.ts.map +1 -1
- package/build/src/database/tenants/schema-cloner.d.ts +3 -3
- package/build/src/database/tenants/schema-cloner.d.ts.map +1 -1
- package/build/src/database/tenants/tenant-table-plan.d.ts +20 -14
- package/build/src/database/tenants/tenant-table-plan.d.ts.map +1 -1
- package/build/src/database/tenants/tenant-table-plan.js +17 -1
- package/build/src/database/use-database.d.ts.map +1 -1
- package/build/src/database/use-live-query.d.ts +17 -29
- package/build/src/database/use-live-query.d.ts.map +1 -1
- package/build/src/database/use-live-query.js +4 -4
- package/build/src/environment-handlers/base.d.ts +112 -103
- package/build/src/environment-handlers/base.d.ts.map +1 -1
- package/build/src/environment-handlers/base.js +54 -38
- package/build/src/environment-handlers/browser.d.ts +63 -56
- package/build/src/environment-handlers/browser.d.ts.map +1 -1
- package/build/src/environment-handlers/browser.js +2 -2
- package/build/src/environment-handlers/node/attachment-path-source.d.ts +9 -9
- package/build/src/environment-handlers/node/attachment-path-source.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/background-jobs-main.d.ts +1 -1
- package/build/src/environment-handlers/node/cli/commands/background-jobs-main.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/background-jobs-runner.d.ts +1 -1
- package/build/src/environment-handlers/node/cli/commands/background-jobs-runner.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/background-jobs-worker.d.ts +1 -1
- package/build/src/environment-handlers/node/cli/commands/background-jobs-worker.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/beacon.d.ts +1 -1
- package/build/src/environment-handlers/node/cli/commands/beacon.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/cli-command-context.d.ts +7 -10
- package/build/src/environment-handlers/node/cli/commands/cli-command-context.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/console.d.ts +9 -7
- package/build/src/environment-handlers/node/cli/commands/console.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/console.js +5 -5
- package/build/src/environment-handlers/node/cli/commands/db/schema/dump.d.ts +1 -1
- package/build/src/environment-handlers/node/cli/commands/db/schema/dump.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/db/schema/load.d.ts +1 -1
- package/build/src/environment-handlers/node/cli/commands/db/schema/load.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/db/seed.d.ts +7 -5
- package/build/src/environment-handlers/node/cli/commands/db/seed.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/db/seed.js +3 -3
- package/build/src/environment-handlers/node/cli/commands/destroy/migration.d.ts +4 -7
- package/build/src/environment-handlers/node/cli/commands/destroy/migration.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/generate/base-models.d.ts +1 -1
- package/build/src/environment-handlers/node/cli/commands/generate/base-models.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/generate/base-models.js +2 -2
- package/build/src/environment-handlers/node/cli/commands/generate/frontend-models.d.ts +93 -108
- package/build/src/environment-handlers/node/cli/commands/generate/frontend-models.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/generate/generated-file-banner.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/generate/migration.d.ts +9 -12
- package/build/src/environment-handlers/node/cli/commands/generate/migration.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/generate/model.d.ts +8 -11
- package/build/src/environment-handlers/node/cli/commands/generate/model.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/init.d.ts +7 -9
- package/build/src/environment-handlers/node/cli/commands/init.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/lint/relationships.d.ts +7 -7
- package/build/src/environment-handlers/node/cli/commands/lint/relationships.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/routes.d.ts +1 -1
- package/build/src/environment-handlers/node/cli/commands/routes.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/run-script.d.ts +7 -5
- package/build/src/environment-handlers/node/cli/commands/run-script.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/run-script.js +3 -3
- package/build/src/environment-handlers/node/cli/commands/runner.d.ts +9 -7
- package/build/src/environment-handlers/node/cli/commands/runner.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/runner.js +3 -3
- package/build/src/environment-handlers/node/cli/commands/server.d.ts +24 -30
- package/build/src/environment-handlers/node/cli/commands/server.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/server.js +2 -2
- package/build/src/environment-handlers/node/cli/commands/test.d.ts +5 -5
- package/build/src/environment-handlers/node/cli/commands/test.d.ts.map +1 -1
- package/build/src/environment-handlers/node/source-peer-package.d.ts +5 -7
- package/build/src/environment-handlers/node/source-peer-package.d.ts.map +1 -1
- package/build/src/environment-handlers/node/source-peer-package.js +1 -1
- package/build/src/environment-handlers/node.d.ts +362 -13
- package/build/src/environment-handlers/node.d.ts.map +1 -1
- package/build/src/environment-handlers/node.js +37 -37
- package/build/src/error-logger.d.ts +3 -3
- package/build/src/error-logger.d.ts.map +1 -1
- package/build/src/error-logger.js +3 -3
- package/build/src/error-reporting/request-details.d.ts +1 -1
- package/build/src/error-reporting/request-details.d.ts.map +1 -1
- package/build/src/error-reporting/request-details.js +33 -33
- package/build/src/frontend-model-controller.d.ts +216 -230
- package/build/src/frontend-model-controller.d.ts.map +1 -1
- package/build/src/frontend-model-controller.js +217 -211
- package/build/src/frontend-model-resource/base-resource.d.ts +315 -365
- package/build/src/frontend-model-resource/base-resource.d.ts.map +1 -1
- package/build/src/frontend-model-resource/base-resource.js +45 -45
- package/build/src/frontend-model-resource/velocious-attachment-resource.d.ts +11 -5
- package/build/src/frontend-model-resource/velocious-attachment-resource.d.ts.map +1 -1
- package/build/src/frontend-model-resource/velocious-attachment-resource.js +2 -2
- package/build/src/frontend-models/base.d.ts +632 -726
- package/build/src/frontend-models/base.d.ts.map +1 -1
- package/build/src/frontend-models/base.js +147 -143
- package/build/src/frontend-models/built-in-resources.d.ts +2 -2
- package/build/src/frontend-models/built-in-resources.d.ts.map +1 -1
- package/build/src/frontend-models/clear-pending-debounced-callback.d.ts +2 -2
- package/build/src/frontend-models/clear-pending-debounced-callback.d.ts.map +1 -1
- package/build/src/frontend-models/clear-pending-debounced-callback.js +3 -3
- package/build/src/frontend-models/event-hook-models.d.ts +3 -6
- package/build/src/frontend-models/event-hook-models.d.ts.map +1 -1
- package/build/src/frontend-models/model-registry.d.ts +5 -5
- package/build/src/frontend-models/model-registry.d.ts.map +1 -1
- package/build/src/frontend-models/model-registry.js +5 -5
- package/build/src/frontend-models/outgoing-event-buffer.d.ts +20 -17
- package/build/src/frontend-models/outgoing-event-buffer.d.ts.map +1 -1
- package/build/src/frontend-models/outgoing-event-buffer.js +2 -2
- package/build/src/frontend-models/preloader.d.ts.map +1 -1
- package/build/src/frontend-models/preloader.js +2 -2
- package/build/src/frontend-models/query.d.ts +286 -331
- package/build/src/frontend-models/query.d.ts.map +1 -1
- package/build/src/frontend-models/query.js +61 -61
- package/build/src/frontend-models/resource-config-validation.d.ts +2 -2
- package/build/src/frontend-models/resource-config-validation.d.ts.map +1 -1
- package/build/src/frontend-models/resource-definition.d.ts +30 -33
- package/build/src/frontend-models/resource-definition.d.ts.map +1 -1
- package/build/src/frontend-models/resource-definition.js +10 -10
- package/build/src/frontend-models/transport-deadline.d.ts.map +1 -1
- package/build/src/frontend-models/transport-serialization.d.ts +26 -32
- package/build/src/frontend-models/transport-serialization.d.ts.map +1 -1
- package/build/src/frontend-models/transport-serialization.js +28 -28
- package/build/src/frontend-models/use-created-event.d.ts +4 -4
- package/build/src/frontend-models/use-created-event.d.ts.map +1 -1
- package/build/src/frontend-models/use-destroyed-event.d.ts +8 -29
- package/build/src/frontend-models/use-destroyed-event.d.ts.map +1 -1
- package/build/src/frontend-models/use-model-class-event.d.ts +9 -33
- package/build/src/frontend-models/use-model-class-event.d.ts.map +1 -1
- package/build/src/frontend-models/use-updated-event.d.ts +8 -29
- package/build/src/frontend-models/use-updated-event.d.ts.map +1 -1
- package/build/src/frontend-models/websocket-channel.d.ts +30 -34
- package/build/src/frontend-models/websocket-channel.d.ts.map +1 -1
- package/build/src/frontend-models/websocket-channel.js +5 -5
- package/build/src/frontend-models/websocket-publishers.d.ts +4 -4
- package/build/src/frontend-models/websocket-publishers.d.ts.map +1 -1
- package/build/src/frontend-models/websocket-publishers.js +2 -2
- package/build/src/http-client/header.d.ts +2 -2
- package/build/src/http-client/header.d.ts.map +1 -1
- package/build/src/http-client/index.d.ts +23 -23
- package/build/src/http-client/index.d.ts.map +1 -1
- package/build/src/http-client/request.d.ts +9 -9
- package/build/src/http-client/request.d.ts.map +1 -1
- package/build/src/http-client/request.js +2 -2
- package/build/src/http-client/response.d.ts +12 -12
- package/build/src/http-client/response.d.ts.map +1 -1
- package/build/src/http-client/response.js +2 -2
- package/build/src/http-client/websocket-client.d.ts +20 -4
- package/build/src/http-client/websocket-client.d.ts.map +1 -1
- package/build/src/http-server/client/index.d.ts +26 -26
- package/build/src/http-server/client/index.d.ts.map +1 -1
- package/build/src/http-server/client/index.js +5 -5
- package/build/src/http-server/client/params-to-object.d.ts +11 -11
- package/build/src/http-server/client/params-to-object.d.ts.map +1 -1
- package/build/src/http-server/client/params-to-object.js +17 -17
- package/build/src/http-server/client/request-buffer/form-data-part.d.ts +9 -9
- package/build/src/http-server/client/request-buffer/form-data-part.d.ts.map +1 -1
- package/build/src/http-server/client/request-buffer/header.d.ts +3 -3
- package/build/src/http-server/client/request-buffer/header.d.ts.map +1 -1
- package/build/src/http-server/client/request-buffer/index.d.ts +28 -30
- package/build/src/http-server/client/request-buffer/index.d.ts.map +1 -1
- package/build/src/http-server/client/request-buffer/index.js +5 -3
- package/build/src/http-server/client/request-parser.d.ts +11 -11
- package/build/src/http-server/client/request-parser.d.ts.map +1 -1
- package/build/src/http-server/client/request-parser.js +3 -3
- package/build/src/http-server/client/request-runner.d.ts +11 -11
- package/build/src/http-server/client/request-runner.d.ts.map +1 -1
- package/build/src/http-server/client/request-runner.js +3 -3
- package/build/src/http-server/client/request-timing.d.ts +5 -11
- package/build/src/http-server/client/request-timing.d.ts.map +1 -1
- package/build/src/http-server/client/request.d.ts +10 -10
- package/build/src/http-server/client/request.d.ts.map +1 -1
- package/build/src/http-server/client/request.js +3 -3
- package/build/src/http-server/client/response-compression.d.ts +5 -5
- package/build/src/http-server/client/response-compression.d.ts.map +1 -1
- package/build/src/http-server/client/response.d.ts +13 -13
- package/build/src/http-server/client/response.d.ts.map +1 -1
- package/build/src/http-server/client/uploaded-file/memory-uploaded-file.d.ts +8 -2
- package/build/src/http-server/client/uploaded-file/memory-uploaded-file.d.ts.map +1 -1
- package/build/src/http-server/client/uploaded-file/temporary-uploaded-file.d.ts +8 -2
- package/build/src/http-server/client/uploaded-file/temporary-uploaded-file.d.ts.map +1 -1
- package/build/src/http-server/client/uploaded-file/uploaded-file.d.ts +4 -4
- package/build/src/http-server/client/uploaded-file/uploaded-file.d.ts.map +1 -1
- package/build/src/http-server/client/websocket-request.d.ts +26 -26
- package/build/src/http-server/client/websocket-request.d.ts.map +1 -1
- package/build/src/http-server/client/websocket-request.js +7 -7
- package/build/src/http-server/client/websocket-session.d.ts +105 -108
- package/build/src/http-server/client/websocket-session.d.ts.map +1 -1
- package/build/src/http-server/client/websocket-session.js +29 -29
- package/build/src/http-server/client-delivery-queue.d.ts +30 -30
- package/build/src/http-server/client-delivery-queue.d.ts.map +1 -1
- package/build/src/http-server/cookie.d.ts +80 -108
- package/build/src/http-server/cookie.d.ts.map +1 -1
- package/build/src/http-server/cookie.js +3 -3
- package/build/src/http-server/development-reloader.d.ts +24 -24
- package/build/src/http-server/development-reloader.d.ts.map +1 -1
- package/build/src/http-server/development-reloader.js +2 -2
- package/build/src/http-server/index.d.ts +66 -72
- package/build/src/http-server/index.d.ts.map +1 -1
- package/build/src/http-server/index.js +6 -6
- package/build/src/http-server/remote-address.d.ts.map +1 -1
- package/build/src/http-server/remote-address.js +2 -2
- package/build/src/http-server/server-client.d.ts +9 -9
- package/build/src/http-server/server-client.d.ts.map +1 -1
- package/build/src/http-server/server-lock.d.ts +11 -11
- package/build/src/http-server/server-lock.d.ts.map +1 -1
- package/build/src/http-server/server-lock.js +5 -5
- package/build/src/http-server/websocket-channel-subscribers.d.ts +11 -10
- package/build/src/http-server/websocket-channel-subscribers.d.ts.map +1 -1
- package/build/src/http-server/websocket-channel-subscribers.js +6 -6
- package/build/src/http-server/websocket-channel.d.ts +8 -14
- package/build/src/http-server/websocket-channel.d.ts.map +1 -1
- package/build/src/http-server/websocket-channel.js +2 -2
- package/build/src/http-server/websocket-connection.d.ts +10 -10
- package/build/src/http-server/websocket-connection.d.ts.map +1 -1
- package/build/src/http-server/websocket-connection.js +4 -4
- package/build/src/http-server/websocket-event-log-store.d.ts +58 -64
- package/build/src/http-server/websocket-event-log-store.d.ts.map +1 -1
- package/build/src/http-server/websocket-event-log-store.js +10 -10
- package/build/src/http-server/websocket-events-host.d.ts +17 -16
- package/build/src/http-server/websocket-events-host.d.ts.map +1 -1
- package/build/src/http-server/websocket-events-host.js +8 -8
- package/build/src/http-server/websocket-events.d.ts +9 -9
- package/build/src/http-server/websocket-events.d.ts.map +1 -1
- package/build/src/http-server/websocket-events.js +5 -5
- package/build/src/http-server/worker-handler/channel-subscriber-dispatch.d.ts +2 -2
- package/build/src/http-server/worker-handler/channel-subscriber-dispatch.d.ts.map +1 -1
- package/build/src/http-server/worker-handler/channel-subscriber-dispatch.js +2 -2
- package/build/src/http-server/worker-handler/in-process.d.ts +22 -22
- package/build/src/http-server/worker-handler/in-process.d.ts.map +1 -1
- package/build/src/http-server/worker-handler/in-process.js +6 -6
- package/build/src/http-server/worker-handler/index.d.ts +50 -50
- package/build/src/http-server/worker-handler/index.d.ts.map +1 -1
- package/build/src/http-server/worker-handler/index.js +11 -11
- package/build/src/http-server/worker-handler/worker-thread.d.ts +61 -61
- package/build/src/http-server/worker-handler/worker-thread.d.ts.map +1 -1
- package/build/src/http-server/worker-handler/worker-thread.js +9 -9
- package/build/src/initializer.d.ts +2 -2
- package/build/src/initializer.d.ts.map +1 -1
- package/build/src/jobs/mail-delivery.d.ts +7 -2
- package/build/src/jobs/mail-delivery.d.ts.map +1 -1
- package/build/src/jobs/prune-terminal-background-jobs.d.ts +15 -2
- package/build/src/jobs/prune-terminal-background-jobs.d.ts.map +1 -1
- package/build/src/jobs/prune-terminal-background-jobs.js +1 -1
- package/build/src/logger/base-logger.d.ts.map +1 -1
- package/build/src/logger/base-logger.js +2 -2
- package/build/src/logger/console-logger.d.ts +3 -3
- package/build/src/logger/console-logger.d.ts.map +1 -1
- package/build/src/logger/file-logger.d.ts +4 -4
- package/build/src/logger/file-logger.d.ts.map +1 -1
- package/build/src/logger/outputs/array-output.d.ts +9 -12
- package/build/src/logger/outputs/array-output.d.ts.map +1 -1
- package/build/src/logger/outputs/console-output.d.ts +1 -4
- package/build/src/logger/outputs/console-output.d.ts.map +1 -1
- package/build/src/logger/outputs/file-output.d.ts +13 -16
- package/build/src/logger/outputs/file-output.d.ts.map +1 -1
- package/build/src/logger/outputs/stdout-output.d.ts +1 -4
- package/build/src/logger/outputs/stdout-output.d.ts.map +1 -1
- package/build/src/logger.d.ts +30 -29
- package/build/src/logger.d.ts.map +1 -1
- package/build/src/logger.js +13 -13
- package/build/src/mailer/backends/smtp.d.ts +8 -11
- package/build/src/mailer/backends/smtp.d.ts.map +1 -1
- package/build/src/mailer/backends/smtp.js +4 -4
- package/build/src/mailer/base.d.ts +61 -61
- package/build/src/mailer/base.d.ts.map +1 -1
- package/build/src/mailer/base.js +15 -15
- package/build/src/mailer/delivery.d.ts +16 -16
- package/build/src/mailer/delivery.d.ts.map +1 -1
- package/build/src/mailer/delivery.js +4 -4
- package/build/src/mailer/index.d.ts +8 -13
- package/build/src/mailer/index.d.ts.map +1 -1
- package/build/src/mailer/index.js +2 -2
- package/build/src/mailer.d.ts +9 -7
- package/build/src/mailer.d.ts.map +1 -1
- package/build/src/mailer.js +2 -2
- package/build/src/packages/velocious-package.d.ts +5 -5
- package/build/src/packages/velocious-package.d.ts.map +1 -1
- package/build/src/plugins/sqljs-wasm-route-controller.d.ts +1 -1
- package/build/src/plugins/sqljs-wasm-route-controller.d.ts.map +1 -1
- package/build/src/plugins/sqljs-wasm-route-controller.js +2 -2
- package/build/src/plugins/sqljs-wasm-route.d.ts +14 -20
- package/build/src/plugins/sqljs-wasm-route.d.ts.map +1 -1
- package/build/src/plugins/sqljs-wasm-route.js +1 -1
- package/build/src/record-payload-values.d.ts +14 -14
- package/build/src/record-payload-values.d.ts.map +1 -1
- package/build/src/record-payload-values.js +4 -4
- package/build/src/routes/app-routes.d.ts.map +1 -1
- package/build/src/routes/base-route.d.ts +11 -10
- package/build/src/routes/base-route.d.ts.map +1 -1
- package/build/src/routes/base-route.js +6 -6
- package/build/src/routes/basic-route.d.ts +36 -3
- package/build/src/routes/basic-route.d.ts.map +1 -1
- package/build/src/routes/basic-route.js +5 -5
- package/build/src/routes/built-in/api-manifest/controller.d.ts +1 -1
- package/build/src/routes/built-in/api-manifest/controller.d.ts.map +1 -1
- package/build/src/routes/built-in/debug/controller.d.ts +1 -1
- package/build/src/routes/built-in/debug/controller.d.ts.map +1 -1
- package/build/src/routes/built-in/errors/controller.d.ts +1 -1
- package/build/src/routes/built-in/errors/controller.d.ts.map +1 -1
- package/build/src/routes/get-route.d.ts +19 -4
- package/build/src/routes/get-route.d.ts.map +1 -1
- package/build/src/routes/get-route.js +3 -3
- package/build/src/routes/hooks/frontend-model-command-route-hook.d.ts +1 -1
- package/build/src/routes/hooks/frontend-model-command-route-hook.d.ts.map +1 -1
- package/build/src/routes/hooks/frontend-model-command-route-hook.js +2 -2
- package/build/src/routes/index.d.ts +5 -5
- package/build/src/routes/index.d.ts.map +1 -1
- package/build/src/routes/index.js +4 -4
- package/build/src/routes/namespace-route.d.ts +19 -4
- package/build/src/routes/namespace-route.d.ts.map +1 -1
- package/build/src/routes/namespace-route.js +2 -2
- package/build/src/routes/plugin-routes.d.ts +16 -19
- package/build/src/routes/plugin-routes.d.ts.map +1 -1
- package/build/src/routes/plugin-routes.js +2 -2
- package/build/src/routes/post-route.d.ts +19 -4
- package/build/src/routes/post-route.d.ts.map +1 -1
- package/build/src/routes/post-route.js +3 -3
- package/build/src/routes/resolver.d.ts +16 -16
- package/build/src/routes/resolver.d.ts.map +1 -1
- package/build/src/routes/resolver.js +6 -6
- package/build/src/routes/resource-route.d.ts +23 -8
- package/build/src/routes/resource-route.d.ts.map +1 -1
- package/build/src/routes/resource-route.js +2 -2
- package/build/src/routes/root-route.d.ts +1 -1
- package/build/src/routes/root-route.d.ts.map +1 -1
- package/build/src/sync/conflict-strategy.d.ts +50 -35
- package/build/src/sync/conflict-strategy.d.ts.map +1 -1
- package/build/src/sync/conflict-strategy.js +2 -2
- package/build/src/sync/device-identity.d.ts +109 -79
- package/build/src/sync/device-identity.d.ts.map +1 -1
- package/build/src/sync/local-mutation-log.d.ts +115 -92
- package/build/src/sync/local-mutation-log.d.ts.map +1 -1
- package/build/src/sync/offline-grant.d.ts +80 -63
- package/build/src/sync/offline-grant.d.ts.map +1 -1
- package/build/src/sync/peer-mutation-bundle.d.ts +33 -39
- package/build/src/sync/peer-mutation-bundle.d.ts.map +1 -1
- package/build/src/sync/query-scope.d.ts +3 -3
- package/build/src/sync/query-scope.d.ts.map +1 -1
- package/build/src/sync/query-scope.js +8 -8
- package/build/src/sync/server-change-feed.d.ts +129 -129
- package/build/src/sync/server-change-feed.d.ts.map +1 -1
- package/build/src/sync/server-change-feed.js +14 -14
- package/build/src/sync/server-sequence-allocator.d.ts +36 -36
- package/build/src/sync/server-sequence-allocator.d.ts.map +1 -1
- package/build/src/sync/server-sequence-allocator.js +6 -6
- package/build/src/sync/signed-sync-envelope-replay-service.d.ts +60 -48
- package/build/src/sync/signed-sync-envelope-replay-service.d.ts.map +1 -1
- package/build/src/sync/signed-sync-envelope-replay-service.js +21 -21
- package/build/src/sync/stable-json.d.ts +2 -2
- package/build/src/sync/stable-json.d.ts.map +1 -1
- package/build/src/sync/stable-json.js +5 -5
- package/build/src/sync/sync-api-client-types.d.ts +98 -25
- package/build/src/sync/sync-api-client-types.d.ts.map +1 -1
- package/build/src/sync/sync-api-client-types.js +73 -1
- package/build/src/sync/sync-api-client.d.ts +71 -71
- package/build/src/sync/sync-api-client.d.ts.map +1 -1
- package/build/src/sync/sync-api-client.js +30 -30
- package/build/src/sync/sync-api-controller.d.ts +23 -23
- package/build/src/sync/sync-api-controller.d.ts.map +1 -1
- package/build/src/sync/sync-change-fanout.d.ts +32 -38
- package/build/src/sync/sync-change-fanout.d.ts.map +1 -1
- package/build/src/sync/sync-change-fanout.js +7 -7
- package/build/src/sync/sync-channel-name.d.ts +1 -1
- package/build/src/sync/sync-channel-name.d.ts.map +1 -1
- package/build/src/sync/sync-client-registry.d.ts +4 -4
- package/build/src/sync/sync-client-registry.d.ts.map +1 -1
- package/build/src/sync/sync-client-registry.js +4 -4
- package/build/src/sync/sync-client-types.d.ts +130 -82
- package/build/src/sync/sync-client-types.d.ts.map +1 -1
- package/build/src/sync/sync-client-types.js +89 -1
- package/build/src/sync/sync-client.d.ts +76 -76
- package/build/src/sync/sync-client.d.ts.map +1 -1
- package/build/src/sync/sync-client.js +19 -19
- package/build/src/sync/sync-envelope-replay-service.d.ts +266 -298
- package/build/src/sync/sync-envelope-replay-service.d.ts.map +1 -1
- package/build/src/sync/sync-envelope-replay-service.js +77 -77
- package/build/src/sync/sync-model-change-feed-service.d.ts +23 -23
- package/build/src/sync/sync-model-change-feed-service.d.ts.map +1 -1
- package/build/src/sync/sync-model-change-feed-service.js +8 -8
- package/build/src/sync/sync-publish-suppression.d.ts +5 -5
- package/build/src/sync/sync-publish-suppression.d.ts.map +1 -1
- package/build/src/sync/sync-publish-suppression.js +3 -3
- package/build/src/sync/sync-publisher-types.d.ts +98 -55
- package/build/src/sync/sync-publisher-types.d.ts.map +1 -1
- package/build/src/sync/sync-publisher-types.js +75 -1
- package/build/src/sync/sync-publisher.d.ts +43 -43
- package/build/src/sync/sync-publisher.d.ts.map +1 -1
- package/build/src/sync/sync-publisher.js +20 -20
- package/build/src/sync/sync-realtime-bridge.d.ts +23 -23
- package/build/src/sync/sync-realtime-bridge.d.ts.map +1 -1
- package/build/src/sync/sync-realtime-bridge.js +9 -9
- package/build/src/sync/sync-replay-upsert-applier.d.ts +70 -70
- package/build/src/sync/sync-replay-upsert-applier.d.ts.map +1 -1
- package/build/src/sync/sync-replay-upsert-applier.js +17 -17
- package/build/src/sync/sync-resource-base.d.ts +52 -51
- package/build/src/sync/sync-resource-base.d.ts.map +1 -1
- package/build/src/sync/sync-resource-base.js +15 -15
- package/build/src/sync/sync-scope-attributes.d.ts +2 -2
- package/build/src/sync/sync-scope-attributes.d.ts.map +1 -1
- package/build/src/sync/sync-scope-attributes.js +2 -2
- package/build/src/sync/sync-scope-store.d.ts +36 -36
- package/build/src/sync/sync-scope-store.d.ts.map +1 -1
- package/build/src/sync/sync-scope-store.js +6 -6
- package/build/src/sync/sync-websocket-channel.d.ts +11 -6
- package/build/src/sync/sync-websocket-channel.d.ts.map +1 -1
- package/build/src/sync/sync-websocket-channel.js +6 -6
- package/build/src/tenants/default-tenant-database-provisioning.d.ts +4 -4
- package/build/src/tenants/default-tenant-database-provisioning.d.ts.map +1 -1
- package/build/src/tenants/default-tenant-database-provisioning.js +2 -2
- package/build/src/tenants/tenant-aggregator.d.ts +81 -81
- package/build/src/tenants/tenant-aggregator.d.ts.map +1 -1
- package/build/src/tenants/tenant-aggregator.js +13 -13
- package/build/src/tenants/tenant-handle.d.ts +64 -0
- package/build/src/tenants/tenant-handle.d.ts.map +1 -0
- package/build/src/tenants/tenant-handle.js +221 -0
- package/build/src/tenants/tenant-iterator.d.ts +17 -17
- package/build/src/tenants/tenant-iterator.d.ts.map +1 -1
- package/build/src/tenants/tenant-iterator.js +7 -7
- package/build/src/tenants/tenant-model-scope.d.ts +73 -0
- package/build/src/tenants/tenant-model-scope.d.ts.map +1 -0
- package/build/src/tenants/tenant-model-scope.js +115 -0
- package/build/src/tenants/tenant.d.ts +16 -6
- package/build/src/tenants/tenant.d.ts.map +1 -1
- package/build/src/tenants/tenant.js +15 -3
- package/build/src/testing/base-expect.d.ts.map +1 -1
- package/build/src/testing/browser-frontend-model-event-hook-scenarios.d.ts +19 -31
- package/build/src/testing/browser-frontend-model-event-hook-scenarios.d.ts.map +1 -1
- package/build/src/testing/browser-test-app.js +6 -6
- package/build/src/testing/expect-to-change.d.ts +9 -7
- package/build/src/testing/expect-to-change.d.ts.map +1 -1
- package/build/src/testing/expect-to-change.js +2 -2
- package/build/src/testing/expect-utils.d.ts +30 -29
- package/build/src/testing/expect-utils.d.ts.map +1 -1
- package/build/src/testing/expect-utils.js +30 -30
- package/build/src/testing/expect.d.ts +30 -30
- package/build/src/testing/expect.d.ts.map +1 -1
- package/build/src/testing/expect.js +19 -19
- package/build/src/testing/factory/association-declaration.d.ts +16 -16
- package/build/src/testing/factory/association-declaration.d.ts.map +1 -1
- package/build/src/testing/factory/association-declaration.js +3 -3
- package/build/src/testing/factory/declarations.d.ts +90 -115
- package/build/src/testing/factory/declarations.d.ts.map +1 -1
- package/build/src/testing/factory/declarations.js +6 -6
- package/build/src/testing/factory/definition-builder.d.ts +72 -70
- package/build/src/testing/factory/definition-builder.d.ts.map +1 -1
- package/build/src/testing/factory/definition-builder.js +40 -40
- package/build/src/testing/factory/errors.d.ts +30 -29
- package/build/src/testing/factory/errors.d.ts.map +1 -1
- package/build/src/testing/factory/evaluation-context.d.ts +29 -29
- package/build/src/testing/factory/evaluation-context.d.ts.map +1 -1
- package/build/src/testing/factory/evaluation-context.js +17 -17
- package/build/src/testing/factory/events.d.ts +4 -5
- package/build/src/testing/factory/events.d.ts.map +1 -1
- package/build/src/testing/factory/factory-definition.d.ts +14 -14
- package/build/src/testing/factory/factory-definition.d.ts.map +1 -1
- package/build/src/testing/factory/factory-definition.js +3 -3
- package/build/src/testing/factory/factory-registry.d.ts +56 -54
- package/build/src/testing/factory/factory-registry.d.ts.map +1 -1
- package/build/src/testing/factory/factory-registry.js +35 -35
- package/build/src/testing/factory/factory-runner.d.ts +67 -73
- package/build/src/testing/factory/factory-runner.d.ts.map +1 -1
- package/build/src/testing/factory/factory-runner.js +9 -9
- package/build/src/testing/factory/index.d.ts +7 -7
- package/build/src/testing/factory/index.d.ts.map +1 -1
- package/build/src/testing/factory/linter.d.ts +7 -7
- package/build/src/testing/factory/linter.d.ts.map +1 -1
- package/build/src/testing/factory/linter.js +3 -3
- package/build/src/testing/factory/model-contract.d.ts +3 -3
- package/build/src/testing/factory/model-contract.d.ts.map +1 -1
- package/build/src/testing/factory/model-contract.js +4 -4
- package/build/src/testing/factory/node/load-definitions.d.ts +2 -2
- package/build/src/testing/factory/node/load-definitions.d.ts.map +1 -1
- package/build/src/testing/factory/sequence.d.ts +19 -23
- package/build/src/testing/factory/sequence.d.ts.map +1 -1
- package/build/src/testing/factory/sequence.js +3 -3
- package/build/src/testing/factory/strategies/attributes-for.d.ts +3 -3
- package/build/src/testing/factory/strategies/attributes-for.d.ts.map +1 -1
- package/build/src/testing/factory/strategies/attributes-for.js +2 -2
- package/build/src/testing/factory/strategies/base.d.ts +32 -32
- package/build/src/testing/factory/strategies/base.d.ts.map +1 -1
- package/build/src/testing/factory/strategies/base.js +25 -25
- package/build/src/testing/factory/strategies/build.d.ts +3 -3
- package/build/src/testing/factory/strategies/build.d.ts.map +1 -1
- package/build/src/testing/factory/strategies/build.js +3 -3
- package/build/src/testing/factory/strategies/create.d.ts +6 -6
- package/build/src/testing/factory/strategies/create.d.ts.map +1 -1
- package/build/src/testing/factory/strategies/create.js +5 -5
- package/build/src/testing/factory/trait-definition.d.ts +4 -4
- package/build/src/testing/factory/trait-definition.d.ts.map +1 -1
- package/build/src/testing/request-client.d.ts +19 -19
- package/build/src/testing/request-client.d.ts.map +1 -1
- package/build/src/testing/test-files-finder.d.ts +15 -15
- package/build/src/testing/test-files-finder.d.ts.map +1 -1
- package/build/src/testing/test-files-finder.js +2 -2
- package/build/src/testing/test-filter-parser.d.ts +19 -12
- package/build/src/testing/test-filter-parser.d.ts.map +1 -1
- package/build/src/testing/test-runner.d.ts +204 -251
- package/build/src/testing/test-runner.d.ts.map +1 -1
- package/build/src/testing/test-runner.js +15 -15
- package/build/src/testing/test-suite-splitter.d.ts +25 -31
- package/build/src/testing/test-suite-splitter.d.ts.map +1 -1
- package/build/src/testing/test.d.ts +51 -55
- package/build/src/testing/test.d.ts.map +1 -1
- package/build/src/testing/test.js +20 -18
- package/build/src/testing/wait-for-event.d.ts +25 -25
- package/build/src/testing/wait-for-event.d.ts.map +1 -1
- package/build/src/testing/wait-for-event.js +6 -6
- package/build/src/time-zone.d.ts +3 -3
- package/build/src/time-zone.d.ts.map +1 -1
- package/build/src/utils/backtrace-cleaner-node.d.ts +35 -2
- package/build/src/utils/backtrace-cleaner-node.d.ts.map +1 -1
- package/build/src/utils/backtrace-cleaner-node.js +1 -1
- package/build/src/utils/backtrace-cleaner.d.ts +33 -28
- package/build/src/utils/backtrace-cleaner.d.ts.map +1 -1
- package/build/src/utils/bearer-token.d.ts +2 -2
- package/build/src/utils/bearer-token.d.ts.map +1 -1
- package/build/src/utils/deburr-column-name.d.ts.map +1 -1
- package/build/src/utils/event-emitter.d.ts +1 -1
- package/build/src/utils/event-emitter.d.ts.map +1 -1
- package/build/src/utils/event-emitter.js +2 -2
- package/build/src/utils/file-exists.d.ts.map +1 -1
- package/build/src/utils/format-value.d.ts +9 -8
- package/build/src/utils/format-value.d.ts.map +1 -1
- package/build/src/utils/format-value.js +7 -7
- package/build/src/utils/is-date.d.ts +2 -2
- package/build/src/utils/is-date.d.ts.map +1 -1
- package/build/src/utils/is-date.js +2 -2
- package/build/src/utils/model-scope.d.ts +29 -24
- package/build/src/utils/model-scope.d.ts.map +1 -1
- package/build/src/utils/model-scope.js +11 -11
- package/build/src/utils/mount-prefix.d.ts +2 -2
- package/build/src/utils/mount-prefix.d.ts.map +1 -1
- package/build/src/utils/nest-callbacks.d.ts.map +1 -1
- package/build/src/utils/plain-object.d.ts +3 -3
- package/build/src/utils/plain-object.d.ts.map +1 -1
- package/build/src/utils/plain-object.js +3 -3
- package/build/src/utils/ransack.d.ts +69 -90
- package/build/src/utils/ransack.d.ts.map +1 -1
- package/build/src/utils/ransack.js +36 -36
- package/build/src/utils/rest-args-error.d.ts.map +1 -1
- package/build/src/utils/sha256-hex.d.ts.map +1 -1
- package/build/src/utils/shutdown-lifecycle.d.ts +1 -1
- package/build/src/utils/shutdown-lifecycle.d.ts.map +1 -1
- package/build/src/utils/singularize-model-name.d.ts.map +1 -1
- package/build/src/utils/split-sql-statements.d.ts.map +1 -1
- package/build/src/utils/to-import-specifier.d.ts.map +1 -1
- package/build/src/utils/with-tracked-stack-async-hooks.d.ts +6 -5
- package/build/src/utils/with-tracked-stack-async-hooks.d.ts.map +1 -1
- package/build/src/utils/with-tracked-stack-async-hooks.js +9 -9
- package/build/src/utils/with-tracked-stack.d.ts +6 -5
- package/build/src/utils/with-tracked-stack.d.ts.map +1 -1
- package/build/src/utils/with-tracked-stack.js +7 -7
- package/build/src/velocious-error.d.ts +27 -17
- package/build/src/velocious-error.d.ts.map +1 -1
- package/build/src/velocious-error.js +10 -4
- package/build/sync/conflict-strategy.js +1 -1
- package/build/sync/query-scope.js +7 -7
- package/build/sync/server-change-feed.js +13 -13
- package/build/sync/server-sequence-allocator.js +5 -5
- package/build/sync/signed-sync-envelope-replay-service.js +20 -20
- package/build/sync/stable-json.js +4 -4
- package/build/sync/sync-api-client-types.js +7 -7
- package/build/sync/sync-api-client.js +26 -26
- package/build/sync/sync-change-fanout.js +6 -6
- package/build/sync/sync-client-registry.js +3 -3
- package/build/sync/sync-client-types.js +10 -10
- package/build/sync/sync-client.js +18 -18
- package/build/sync/sync-envelope-replay-service.js +76 -76
- package/build/sync/sync-model-change-feed-service.js +7 -7
- package/build/sync/sync-publish-suppression.js +2 -2
- package/build/sync/sync-publisher-types.js +11 -11
- package/build/sync/sync-publisher.js +19 -19
- package/build/sync/sync-realtime-bridge.js +8 -8
- package/build/sync/sync-replay-upsert-applier.js +16 -16
- package/build/sync/sync-resource-base.js +14 -14
- package/build/sync/sync-scope-attributes.js +1 -1
- package/build/sync/sync-scope-store.js +5 -5
- package/build/sync/sync-websocket-channel.js +5 -5
- package/build/tenants/default-tenant-database-provisioning.js +1 -1
- package/build/tenants/tenant-aggregator.js +13 -13
- package/build/tenants/tenant-handle.js +252 -0
- package/build/tenants/tenant-iterator.js +6 -6
- package/build/tenants/tenant-model-scope.js +132 -0
- package/build/tenants/tenant.js +15 -2
- package/build/testing/browser-test-app.js +2 -2
- package/build/testing/expect-to-change.js +1 -1
- package/build/testing/expect-utils.js +29 -29
- package/build/testing/expect.js +18 -18
- package/build/testing/factory/association-declaration.js +2 -2
- package/build/testing/factory/declarations.js +5 -5
- package/build/testing/factory/definition-builder.js +39 -39
- package/build/testing/factory/evaluation-context.js +16 -16
- package/build/testing/factory/factory-definition.js +2 -2
- package/build/testing/factory/factory-registry.js +34 -34
- package/build/testing/factory/factory-runner.js +8 -8
- package/build/testing/factory/linter.js +2 -2
- package/build/testing/factory/model-contract.js +3 -3
- package/build/testing/factory/sequence.js +2 -2
- package/build/testing/factory/strategies/attributes-for.js +1 -1
- package/build/testing/factory/strategies/base.js +24 -24
- package/build/testing/factory/strategies/build.js +2 -2
- package/build/testing/factory/strategies/create.js +4 -4
- package/build/testing/test-files-finder.js +1 -1
- package/build/testing/test-runner.js +14 -14
- package/build/testing/test.js +19 -17
- package/build/testing/wait-for-event.js +5 -5
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/utils/event-emitter.js +1 -1
- package/build/utils/format-value.js +6 -6
- package/build/utils/is-date.js +1 -1
- package/build/utils/model-scope.js +10 -10
- package/build/utils/plain-object.js +2 -2
- package/build/utils/ransack.js +35 -35
- package/build/utils/with-tracked-stack-async-hooks.js +8 -8
- package/build/utils/with-tracked-stack.js +6 -6
- package/build/velocious-error.js +9 -3
- package/package.json +3 -3
- package/src/application.js +3 -3
- package/src/authorization/ability.js +6 -6
- package/src/authorization/base-resource.js +1 -1
- package/src/background-jobs/client.js +2 -2
- package/src/background-jobs/forked-runner-child.js +4 -4
- package/src/background-jobs/job-runner.js +2 -2
- package/src/background-jobs/job.js +6 -6
- package/src/background-jobs/json-socket.js +1 -1
- package/src/background-jobs/main.js +13 -13
- package/src/background-jobs/normalize-error.js +2 -2
- package/src/background-jobs/pooled-runner-child.js +3 -3
- package/src/background-jobs/scheduler.js +1 -1
- package/src/background-jobs/status-reporter.js +2 -2
- package/src/background-jobs/store.js +23 -23
- package/src/background-jobs/types.js +6 -6
- package/src/background-jobs/web/controller.js +6 -6
- package/src/background-jobs/web/counts-channel.js +1 -1
- package/src/background-jobs/worker.js +8 -8
- package/src/beacon/client.js +3 -3
- package/src/beacon/in-process-client.js +3 -3
- package/src/beacon/types.js +1 -1
- package/src/cli/base-command.js +1 -1
- package/src/cli/commands/console.js +1 -1
- package/src/cli/commands/db/schema/dump.js +1 -1
- package/src/cli/commands/db/schema/load.js +1 -1
- package/src/cli/commands/db/seed.js +1 -1
- package/src/cli/commands/generate/frontend-models.js +1 -1
- package/src/cli/commands/lint/relationships.js +1 -1
- package/src/cli/commands/run-script.js +1 -1
- package/src/cli/commands/runner.js +1 -1
- package/src/cli/index.js +2 -2
- package/src/cli/tenant-database-command-helper.js +2 -2
- package/src/configuration-types.js +48 -47
- package/src/configuration.js +150 -65
- package/src/controller.js +11 -8
- package/src/current.js +2 -2
- package/src/database/annotations-async-hooks.js +3 -3
- package/src/database/annotations.js +1 -1
- package/src/database/drivers/base-column.js +1 -1
- package/src/database/drivers/base-foreign-key.js +1 -1
- package/src/database/drivers/base-table.js +1 -1
- package/src/database/drivers/base.js +18 -18
- package/src/database/drivers/mssql/column.js +1 -1
- package/src/database/drivers/mssql/index.js +2 -2
- package/src/database/drivers/mssql/options.js +1 -1
- package/src/database/drivers/mssql/structure-sql.js +1 -1
- package/src/database/drivers/mssql/table.js +1 -1
- package/src/database/drivers/mysql/column.js +1 -1
- package/src/database/drivers/mysql/index.js +4 -4
- package/src/database/drivers/mysql/options.js +1 -1
- package/src/database/drivers/mysql/query.js +7 -7
- package/src/database/drivers/mysql/structure-sql.js +71 -10
- package/src/database/drivers/pgsql/column.js +1 -1
- package/src/database/drivers/pgsql/index.js +6 -6
- package/src/database/drivers/pgsql/structure-sql.js +1 -1
- package/src/database/drivers/sqlite/base.js +7 -7
- package/src/database/drivers/sqlite/column.js +1 -1
- package/src/database/drivers/sqlite/connection-sql-js.js +1 -1
- package/src/database/drivers/sqlite/foreign-key.js +1 -1
- package/src/database/drivers/sqlite/index.js +1 -1
- package/src/database/drivers/sqlite/index.native.js +2 -2
- package/src/database/drivers/sqlite/index.web.js +2 -2
- package/src/database/drivers/sqlite/query.js +2 -2
- package/src/database/drivers/sqlite/query.native.js +2 -2
- package/src/database/drivers/sqlite/query.web.js +2 -2
- package/src/database/drivers/sqlite/table-rebuilder.js +1 -1
- package/src/database/migration/index.js +2 -2
- package/src/database/migrator/types.js +2 -2
- package/src/database/operation.js +59 -6
- package/src/database/pool/async-tracked-multi-connection.js +75 -24
- package/src/database/pool/base-methods-forward.js +2 -2
- package/src/database/pool/base.js +48 -17
- package/src/database/pool/single-multi-use.js +501 -103
- package/src/database/query/delete-base.js +1 -1
- package/src/database/query/index.js +3 -3
- package/src/database/query/insert-base.js +4 -4
- package/src/database/query/model-class-query.js +39 -39
- package/src/database/query/preloader/belongs-to.js +2 -2
- package/src/database/query/preloader/ensure-model-class-initialized.js +3 -2
- package/src/database/query/preloader/has-many.js +3 -3
- package/src/database/query/preloader/has-one.js +1 -1
- package/src/database/query/preloader.js +9 -2
- package/src/database/query/query-data.js +7 -7
- package/src/database/query/update-base.js +3 -3
- package/src/database/query/upsert-base.js +2 -2
- package/src/database/query/where-model-class-hash.js +13 -13
- package/src/database/query/with-count.js +12 -12
- package/src/database/query-parser/options.js +2 -2
- package/src/database/query-parser/select-parser.js +1 -1
- package/src/database/record/acts-as-list.js +2 -2
- package/src/database/record/attachments/handle.js +6 -6
- package/src/database/record/attachments/normalize-input.js +11 -11
- package/src/database/record/attachments/storage-drivers/filesystem.js +1 -1
- package/src/database/record/attachments/storage-drivers/native.js +5 -5
- package/src/database/record/attachments/storage-drivers/s3.js +10 -10
- package/src/database/record/attachments/store.js +24 -20
- package/src/database/record/auditing.js +123 -29
- package/src/database/record/counter-cache-magnitude.js +11 -11
- package/src/database/record/index.js +227 -174
- package/src/database/record/instance-relationships/base.js +4 -4
- package/src/database/record/instance-relationships/belongs-to.js +1 -1
- package/src/database/record/instance-relationships/has-many.js +3 -3
- package/src/database/record/instance-relationships/has-one.js +1 -1
- package/src/database/record/record-not-found-error.js +1 -0
- package/src/database/record/relationships/base.js +22 -0
- package/src/database/record/state-machine.js +6 -6
- package/src/database/record/validators/base.js +1 -1
- package/src/database/structure-sql-loader.js +3 -3
- package/src/database/table-data/table-column.js +3 -3
- package/src/database/use-live-query.js +3 -3
- package/src/environment-handlers/base.js +56 -37
- package/src/environment-handlers/browser.js +1 -1
- package/src/environment-handlers/node/cli/commands/console.js +4 -4
- package/src/environment-handlers/node/cli/commands/db/seed.js +2 -2
- package/src/environment-handlers/node/cli/commands/generate/base-models.js +1 -1
- package/src/environment-handlers/node/cli/commands/run-script.js +2 -2
- package/src/environment-handlers/node/cli/commands/runner.js +2 -2
- package/src/environment-handlers/node/cli/commands/server.js +1 -1
- package/src/environment-handlers/node.js +36 -36
- package/src/error-logger.js +2 -2
- package/src/error-reporting/request-details.js +32 -32
- package/src/frontend-model-controller.js +215 -213
- package/src/frontend-model-resource/base-resource.js +44 -44
- package/src/frontend-model-resource/velocious-attachment-resource.js +1 -1
- package/src/frontend-models/base.js +146 -142
- package/src/frontend-models/clear-pending-debounced-callback.js +2 -2
- package/src/frontend-models/model-registry.js +4 -4
- package/src/frontend-models/outgoing-event-buffer.js +1 -1
- package/src/frontend-models/preloader.js +1 -1
- package/src/frontend-models/query.js +60 -60
- package/src/frontend-models/resource-definition.js +9 -9
- package/src/frontend-models/transport-serialization.js +27 -27
- package/src/frontend-models/websocket-channel.js +4 -4
- package/src/frontend-models/websocket-publishers.js +1 -1
- package/src/http-client/request.js +1 -1
- package/src/http-client/response.js +1 -1
- package/src/http-server/client/index.js +4 -4
- package/src/http-server/client/params-to-object.js +16 -16
- package/src/http-server/client/request-buffer/index.js +5 -2
- package/src/http-server/client/request-parser.js +2 -2
- package/src/http-server/client/request-runner.js +2 -2
- package/src/http-server/client/request.js +2 -2
- package/src/http-server/client/websocket-request.js +6 -6
- package/src/http-server/client/websocket-session.js +28 -28
- package/src/http-server/cookie.js +2 -2
- package/src/http-server/development-reloader.js +1 -1
- package/src/http-server/index.js +5 -5
- package/src/http-server/remote-address.js +1 -1
- package/src/http-server/server-lock.js +4 -4
- package/src/http-server/websocket-channel-subscribers.js +4 -4
- package/src/http-server/websocket-channel.js +1 -1
- package/src/http-server/websocket-connection.js +3 -3
- package/src/http-server/websocket-event-log-store.js +9 -9
- package/src/http-server/websocket-events-host.js +7 -7
- package/src/http-server/websocket-events.js +4 -4
- package/src/http-server/worker-handler/channel-subscriber-dispatch.js +1 -1
- package/src/http-server/worker-handler/in-process.js +5 -5
- package/src/http-server/worker-handler/index.js +10 -10
- package/src/http-server/worker-handler/worker-thread.js +8 -8
- package/src/logger/base-logger.js +1 -1
- package/src/logger.js +12 -12
- package/src/mailer/backends/smtp.js +3 -3
- package/src/mailer/base.js +14 -14
- package/src/mailer/delivery.js +3 -3
- package/src/mailer/index.js +1 -1
- package/src/mailer.js +1 -1
- package/src/plugins/sqljs-wasm-route-controller.js +1 -1
- package/src/record-payload-values.js +3 -3
- package/src/routes/base-route.js +5 -5
- package/src/routes/basic-route.js +4 -4
- package/src/routes/get-route.js +2 -2
- package/src/routes/hooks/frontend-model-command-route-hook.js +1 -1
- package/src/routes/index.js +3 -3
- package/src/routes/namespace-route.js +1 -1
- package/src/routes/plugin-routes.js +1 -1
- package/src/routes/post-route.js +2 -2
- package/src/routes/resolver.js +5 -5
- package/src/routes/resource-route.js +1 -1
- package/src/sync/conflict-strategy.js +1 -1
- package/src/sync/query-scope.js +7 -7
- package/src/sync/server-change-feed.js +13 -13
- package/src/sync/server-sequence-allocator.js +5 -5
- package/src/sync/signed-sync-envelope-replay-service.js +20 -20
- package/src/sync/stable-json.js +4 -4
- package/src/sync/sync-api-client-types.js +7 -7
- package/src/sync/sync-api-client.js +26 -26
- package/src/sync/sync-change-fanout.js +6 -6
- package/src/sync/sync-client-registry.js +3 -3
- package/src/sync/sync-client-types.js +10 -10
- package/src/sync/sync-client.js +18 -18
- package/src/sync/sync-envelope-replay-service.js +76 -76
- package/src/sync/sync-model-change-feed-service.js +7 -7
- package/src/sync/sync-publish-suppression.js +2 -2
- package/src/sync/sync-publisher-types.js +11 -11
- package/src/sync/sync-publisher.js +19 -19
- package/src/sync/sync-realtime-bridge.js +8 -8
- package/src/sync/sync-replay-upsert-applier.js +16 -16
- package/src/sync/sync-resource-base.js +14 -14
- package/src/sync/sync-scope-attributes.js +1 -1
- package/src/sync/sync-scope-store.js +5 -5
- package/src/sync/sync-websocket-channel.js +5 -5
- package/src/tenants/default-tenant-database-provisioning.js +1 -1
- package/src/tenants/tenant-aggregator.js +13 -13
- package/src/tenants/tenant-handle.js +252 -0
- package/src/tenants/tenant-iterator.js +6 -6
- package/src/tenants/tenant-model-scope.js +132 -0
- package/src/tenants/tenant.js +15 -2
- package/src/testing/browser-test-app.js +2 -2
- package/src/testing/expect-to-change.js +1 -1
- package/src/testing/expect-utils.js +29 -29
- package/src/testing/expect.js +18 -18
- package/src/testing/factory/association-declaration.js +2 -2
- package/src/testing/factory/declarations.js +5 -5
- package/src/testing/factory/definition-builder.js +39 -39
- package/src/testing/factory/evaluation-context.js +16 -16
- package/src/testing/factory/factory-definition.js +2 -2
- package/src/testing/factory/factory-registry.js +34 -34
- package/src/testing/factory/factory-runner.js +8 -8
- package/src/testing/factory/linter.js +2 -2
- package/src/testing/factory/model-contract.js +3 -3
- package/src/testing/factory/sequence.js +2 -2
- package/src/testing/factory/strategies/attributes-for.js +1 -1
- package/src/testing/factory/strategies/base.js +24 -24
- package/src/testing/factory/strategies/build.js +2 -2
- package/src/testing/factory/strategies/create.js +4 -4
- package/src/testing/test-files-finder.js +1 -1
- package/src/testing/test-runner.js +14 -14
- package/src/testing/test.js +19 -17
- package/src/testing/wait-for-event.js +5 -5
- package/src/utils/event-emitter.js +1 -1
- package/src/utils/format-value.js +6 -6
- package/src/utils/is-date.js +1 -1
- package/src/utils/model-scope.js +10 -10
- package/src/utils/plain-object.js +2 -2
- package/src/utils/ransack.js +35 -35
- package/src/utils/with-tracked-stack-async-hooks.js +8 -8
- package/src/utils/with-tracked-stack.js +6 -6
- package/src/velocious-error.js +9 -3
package/build/configuration.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* WithConnectionsCallbackType type.
|
|
5
5
|
* @template T
|
|
6
|
-
* @typedef {
|
|
6
|
+
* @typedef {(arg: Record<string, import("./database/drivers/base.js").default>) => Promise<T>} WithConnectionsCallbackType
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* WithConnectionsOptionsType type.
|
|
@@ -37,7 +37,7 @@ export {CurrentConfigurationNotSetError}
|
|
|
37
37
|
* @returns {string | undefined} - Current working directory when the runtime exposes one.
|
|
38
38
|
*/
|
|
39
39
|
function currentWorkingDirectory() {
|
|
40
|
-
const processObject = /** @type {{cwd?:
|
|
40
|
+
const processObject = /** @type {{cwd?: ReturnType<typeof JSON.parse>} | undefined} */ (globalThis.process)
|
|
41
41
|
|
|
42
42
|
if (typeof processObject?.cwd !== "function") return undefined
|
|
43
43
|
|
|
@@ -68,17 +68,17 @@ function resolveWithConnectionsArgs(optionsOrCallback, callback, defaultName) {
|
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
* Runs canonical debug snapshot value.
|
|
71
|
-
* @param {
|
|
72
|
-
* @returns {
|
|
71
|
+
* @param {ReturnType<typeof JSON.parse>} value - Snapshot value to canonicalize.
|
|
72
|
+
* @returns {ReturnType<typeof JSON.parse>} Snapshot value with object keys sorted recursively.
|
|
73
73
|
*/
|
|
74
74
|
function canonicalDebugSnapshotValue(value) {
|
|
75
75
|
if (!value || typeof value !== "object") return value
|
|
76
76
|
if (Array.isArray(value)) return value.map((entry) => canonicalDebugSnapshotValue(entry))
|
|
77
77
|
|
|
78
78
|
return Object.keys(value).sort().reduce((result, key) => {
|
|
79
|
-
result[key] = canonicalDebugSnapshotValue(/** @type {Record<string,
|
|
79
|
+
result[key] = canonicalDebugSnapshotValue(/** @type {Record<string, ReturnType<typeof JSON.parse>>} */ (value)[key])
|
|
80
80
|
return result
|
|
81
|
-
}, /** @type {Record<string,
|
|
81
|
+
}, /** @type {Record<string, ReturnType<typeof JSON.parse>>} */ ({}))
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/**
|
|
@@ -106,7 +106,7 @@ function mergeDatabaseConfiguration(databaseConfiguration, overrideConfiguration
|
|
|
106
106
|
|
|
107
107
|
/**
|
|
108
108
|
* Resolves the grace window (ms) before a sustained beacon outage is reported.
|
|
109
|
-
* @param {
|
|
109
|
+
* @param {ReturnType<typeof JSON.parse>} value - Configured `unreachableReportMs`, if any.
|
|
110
110
|
* @returns {number} - The configured value when it's a finite number, otherwise the 30s default.
|
|
111
111
|
*/
|
|
112
112
|
function resolveBeaconUnreachableReportMs(value) {
|
|
@@ -126,7 +126,7 @@ const DEFAULT_COMPRESSION_GZIP_LEVEL = 6
|
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
128
|
* Validates a positive safe integer configuration value.
|
|
129
|
-
* @param {
|
|
129
|
+
* @param {ReturnType<typeof JSON.parse>} value - Configured positive safe integer.
|
|
130
130
|
* @param {string} name - Configuration key.
|
|
131
131
|
* @param {number} defaultValue - Default value.
|
|
132
132
|
* @returns {number} - Validated configured or default value.
|
|
@@ -142,7 +142,7 @@ function positiveSafeInteger(value, name, defaultValue) {
|
|
|
142
142
|
|
|
143
143
|
/**
|
|
144
144
|
* Validates an integer configuration value inside an inclusive range.
|
|
145
|
-
* @param {
|
|
145
|
+
* @param {ReturnType<typeof JSON.parse>} value - Configured integer.
|
|
146
146
|
* @param {string} name - Configuration key.
|
|
147
147
|
* @param {number} min - Minimum accepted value (inclusive).
|
|
148
148
|
* @param {number} max - Maximum accepted value (inclusive).
|
|
@@ -286,6 +286,19 @@ export default class VelociousConfiguration {
|
|
|
286
286
|
}
|
|
287
287
|
|
|
288
288
|
this._isInitialized = false
|
|
289
|
+
this._modelsInitialized = false
|
|
290
|
+
/**
|
|
291
|
+
* Invalidates model phases that started before database connections closed.
|
|
292
|
+
* @type {number}
|
|
293
|
+
*/
|
|
294
|
+
this._modelInitializationGeneration = 0
|
|
295
|
+
/**
|
|
296
|
+
* In-progress `initializeModels()` promise. Model initialization is an
|
|
297
|
+
* atomic bootstrap phase: concurrent callers share it, and a rejection
|
|
298
|
+
* leaves the phase eligible for a later complete attempt.
|
|
299
|
+
* @type {Promise<void> | undefined}
|
|
300
|
+
*/
|
|
301
|
+
this._initializeModelsPromise = undefined
|
|
289
302
|
/**
|
|
290
303
|
* In-progress `initialize()` promise, memoized so concurrent callers await
|
|
291
304
|
* the same bootstrap. Reset to undefined if initialization fails.
|
|
@@ -309,7 +322,7 @@ export default class VelociousConfiguration {
|
|
|
309
322
|
}
|
|
310
323
|
/**
|
|
311
324
|
* Stores the http server instance value.
|
|
312
|
-
* @type {{getDebugSnapshot: () => Promise<Record<string,
|
|
325
|
+
* @type {{getDebugSnapshot: () => Promise<Record<string, ReturnType<typeof JSON.parse>>>} | undefined} */
|
|
313
326
|
this._httpServerInstance = undefined
|
|
314
327
|
this.locale = locale
|
|
315
328
|
this.localeFallbacks = localeFallbacks
|
|
@@ -382,7 +395,7 @@ export default class VelociousConfiguration {
|
|
|
382
395
|
|
|
383
396
|
/**
|
|
384
397
|
* Stores the websocket session identity resolver value.
|
|
385
|
-
* @type {((session: import("./http-server/client/websocket-session.js").default) =>
|
|
398
|
+
* @type {((session: import("./http-server/client/websocket-session.js").default) => ReturnType<typeof JSON.parse> | Promise<ReturnType<typeof JSON.parse>>) | null} */
|
|
386
399
|
this._websocketSessionIdentityResolver = null
|
|
387
400
|
this._logging = logging
|
|
388
401
|
this._mailerBackend = mailerBackend
|
|
@@ -729,7 +742,7 @@ export default class VelociousConfiguration {
|
|
|
729
742
|
/**
|
|
730
743
|
* Runs resolve database configuration.
|
|
731
744
|
* @param {string} identifier - Identifier.
|
|
732
|
-
* @param {
|
|
745
|
+
* @param {ReturnType<typeof JSON.parse>} [tenant] - Tenant override.
|
|
733
746
|
* @returns {import("./configuration-types.js").DatabaseConfigurationType} - Resolved database configuration for the identifier.
|
|
734
747
|
*/
|
|
735
748
|
resolveDatabaseConfiguration(identifier, tenant = this.getCurrentTenant()) {
|
|
@@ -779,7 +792,7 @@ export default class VelociousConfiguration {
|
|
|
779
792
|
/**
|
|
780
793
|
* Runs is database identifier active.
|
|
781
794
|
* @param {string} identifier - Database identifier.
|
|
782
|
-
* @param {
|
|
795
|
+
* @param {ReturnType<typeof JSON.parse>} [tenant] - Tenant override.
|
|
783
796
|
* @returns {boolean} - Whether this database identifier is active in the current tenant context.
|
|
784
797
|
*/
|
|
785
798
|
isDatabaseIdentifierActive(identifier, tenant = this.getCurrentTenant()) {
|
|
@@ -815,7 +828,7 @@ export default class VelociousConfiguration {
|
|
|
815
828
|
|
|
816
829
|
/**
|
|
817
830
|
* Runs get debug snapshot.
|
|
818
|
-
* @returns {Promise<Record<string,
|
|
831
|
+
* @returns {Promise<Record<string, ReturnType<typeof JSON.parse>>>} - Human-readable server diagnostics.
|
|
819
832
|
*/
|
|
820
833
|
async getDebugSnapshot() {
|
|
821
834
|
const localSnapshot = this.getLocalDebugSnapshot()
|
|
@@ -828,7 +841,7 @@ export default class VelociousConfiguration {
|
|
|
828
841
|
|
|
829
842
|
/**
|
|
830
843
|
* Runs get local debug snapshot.
|
|
831
|
-
* @returns {Record<string,
|
|
844
|
+
* @returns {Record<string, ReturnType<typeof JSON.parse>>} - Human-readable diagnostics for this process only.
|
|
832
845
|
*/
|
|
833
846
|
getLocalDebugSnapshot() {
|
|
834
847
|
return {
|
|
@@ -843,10 +856,10 @@ export default class VelociousConfiguration {
|
|
|
843
856
|
|
|
844
857
|
/**
|
|
845
858
|
* Runs debug http server snapshot.
|
|
846
|
-
* @returns {Promise<Record<string,
|
|
859
|
+
* @returns {Promise<Record<string, ReturnType<typeof JSON.parse>>>} - HTTP server worker diagnostics.
|
|
847
860
|
*/
|
|
848
861
|
async _debugHttpServerSnapshot() {
|
|
849
|
-
const httpServer = /** @type {{getDebugSnapshot?: () => Promise<Record<string,
|
|
862
|
+
const httpServer = /** @type {{getDebugSnapshot?: () => Promise<Record<string, ReturnType<typeof JSON.parse>>>} | undefined} */ (this._httpServerInstance)
|
|
850
863
|
|
|
851
864
|
if (!httpServer?.getDebugSnapshot) {
|
|
852
865
|
return {configured: Boolean(this.httpServer), active: false}
|
|
@@ -857,7 +870,7 @@ export default class VelociousConfiguration {
|
|
|
857
870
|
|
|
858
871
|
/**
|
|
859
872
|
* Runs debug server snapshot.
|
|
860
|
-
* @returns {Record<string,
|
|
873
|
+
* @returns {Record<string, ReturnType<typeof JSON.parse>>} - Server runtime diagnostics.
|
|
861
874
|
*/
|
|
862
875
|
_debugServerSnapshot() {
|
|
863
876
|
const nodeProcess = typeof process === "undefined" ? undefined : process
|
|
@@ -874,7 +887,7 @@ export default class VelociousConfiguration {
|
|
|
874
887
|
|
|
875
888
|
/**
|
|
876
889
|
* Runs debug configuration snapshot.
|
|
877
|
-
* @returns {Record<string,
|
|
890
|
+
* @returns {Record<string, ReturnType<typeof JSON.parse>>} - Configuration diagnostics.
|
|
878
891
|
*/
|
|
879
892
|
_debugConfigurationSnapshot() {
|
|
880
893
|
return {
|
|
@@ -894,7 +907,7 @@ export default class VelociousConfiguration {
|
|
|
894
907
|
|
|
895
908
|
/**
|
|
896
909
|
* Runs debug background jobs snapshot.
|
|
897
|
-
* @returns {Record<string,
|
|
910
|
+
* @returns {Record<string, ReturnType<typeof JSON.parse>>} - Background job diagnostics.
|
|
898
911
|
*/
|
|
899
912
|
_debugBackgroundJobsSnapshot() {
|
|
900
913
|
return {
|
|
@@ -905,7 +918,7 @@ export default class VelociousConfiguration {
|
|
|
905
918
|
|
|
906
919
|
/**
|
|
907
920
|
* Runs debug database snapshot.
|
|
908
|
-
* @returns {Record<string,
|
|
921
|
+
* @returns {Record<string, ReturnType<typeof JSON.parse>>} - Database diagnostics.
|
|
909
922
|
*/
|
|
910
923
|
_debugDatabaseSnapshot() {
|
|
911
924
|
/**
|
|
@@ -928,7 +941,7 @@ export default class VelociousConfiguration {
|
|
|
928
941
|
|
|
929
942
|
/**
|
|
930
943
|
* Runs debug websocket snapshot.
|
|
931
|
-
* @returns {Record<string,
|
|
944
|
+
* @returns {Record<string, ReturnType<typeof JSON.parse>>} - WebSocket diagnostics.
|
|
932
945
|
*/
|
|
933
946
|
_debugWebsocketSnapshot() {
|
|
934
947
|
/**
|
|
@@ -942,11 +955,11 @@ export default class VelociousConfiguration {
|
|
|
942
955
|
const subscriptions = Array.from(this._websocketChannelSubscriptions.entries()).map(([channel, channelSubscriptions]) => {
|
|
943
956
|
/**
|
|
944
957
|
* Details buckets.
|
|
945
|
-
* @type {Map<string, {count: number, details: Record<string,
|
|
958
|
+
* @type {Map<string, {count: number, details: Record<string, ReturnType<typeof JSON.parse>>}>} */
|
|
946
959
|
const detailsBuckets = new Map()
|
|
947
960
|
|
|
948
961
|
for (const subscription of channelSubscriptions) {
|
|
949
|
-
const details = /** @type {Record<string,
|
|
962
|
+
const details = /** @type {Record<string, ReturnType<typeof JSON.parse>>} */ (canonicalDebugSnapshotValue(subscription.debugSnapshot()))
|
|
950
963
|
const key = JSON.stringify(details)
|
|
951
964
|
const existingBucket = detailsBuckets.get(key)
|
|
952
965
|
|
|
@@ -971,7 +984,7 @@ export default class VelociousConfiguration {
|
|
|
971
984
|
const channelSubscriptionBuckets = new Map()
|
|
972
985
|
|
|
973
986
|
for (const {channelType, subscription} of session._channelSubscriptions.values()) {
|
|
974
|
-
const details = /** @type {Record<string,
|
|
987
|
+
const details = /** @type {Record<string, ReturnType<typeof JSON.parse>>} */ (subscription.debugSnapshot())
|
|
975
988
|
const model = typeof details.model === "string" ? details.model : null
|
|
976
989
|
const key = JSON.stringify({channelType, model})
|
|
977
990
|
const existingBucket = channelSubscriptionBuckets.get(key)
|
|
@@ -1791,7 +1804,7 @@ export default class VelociousConfiguration {
|
|
|
1791
1804
|
_deliverBroadcastFromBeacon(message) {
|
|
1792
1805
|
/**
|
|
1793
1806
|
* Websocket events.
|
|
1794
|
-
* @type {
|
|
1807
|
+
* @type {ReturnType<typeof JSON.parse>} */
|
|
1795
1808
|
const websocketEvents = this._websocketEvents
|
|
1796
1809
|
|
|
1797
1810
|
if (websocketEvents && typeof websocketEvents.broadcastV2 === "function") {
|
|
@@ -2020,25 +2033,39 @@ export default class VelociousConfiguration {
|
|
|
2020
2033
|
* @returns {Promise<void>} - Resolves when complete.
|
|
2021
2034
|
*/
|
|
2022
2035
|
async initializeModels(args = {type: "server"}) {
|
|
2023
|
-
if (
|
|
2024
|
-
|
|
2036
|
+
if (this._modelsInitialized) return
|
|
2037
|
+
if (this._initializeModelsPromise) return await this._initializeModelsPromise
|
|
2025
2038
|
|
|
2039
|
+
const modelInitializationGeneration = this._modelInitializationGeneration
|
|
2040
|
+
const initializeModelsPromise = (async () => {
|
|
2026
2041
|
const shouldSkipDummyModelInitialization = process.env.VELOCIOUS_SKIP_DUMMY_MODEL_INITIALIZATION === "1"
|
|
2027
2042
|
&& process.env.VELOCIOUS_BROWSER_TESTS === "true"
|
|
2028
2043
|
&& this.getEnvironment() === "test"
|
|
2029
2044
|
|
|
2030
|
-
if (shouldSkipDummyModelInitialization) {
|
|
2031
|
-
|
|
2045
|
+
if (!shouldSkipDummyModelInitialization) {
|
|
2046
|
+
if (this._initializeModels) {
|
|
2047
|
+
await this._initializeModels({configuration: this, type: args.type})
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2050
|
+
await this.getEnvironmentHandler().initializePackageModels(this)
|
|
2051
|
+
await initializeAuditedModelRelationships(this)
|
|
2052
|
+
|
|
2053
|
+
await this.getEnvironmentHandler().initializeFrontendModelWebsocketPublishers(this)
|
|
2032
2054
|
}
|
|
2033
2055
|
|
|
2034
|
-
if (this.
|
|
2035
|
-
|
|
2056
|
+
if (this._modelInitializationGeneration === modelInitializationGeneration) {
|
|
2057
|
+
this._modelsInitialized = true
|
|
2036
2058
|
}
|
|
2059
|
+
})()
|
|
2037
2060
|
|
|
2038
|
-
|
|
2039
|
-
await initializeAuditedModelRelationships(this)
|
|
2061
|
+
this._initializeModelsPromise = initializeModelsPromise
|
|
2040
2062
|
|
|
2041
|
-
|
|
2063
|
+
try {
|
|
2064
|
+
await initializeModelsPromise
|
|
2065
|
+
} finally {
|
|
2066
|
+
if (this._initializeModelsPromise === initializeModelsPromise) {
|
|
2067
|
+
this._initializeModelsPromise = undefined
|
|
2068
|
+
}
|
|
2042
2069
|
}
|
|
2043
2070
|
}
|
|
2044
2071
|
|
|
@@ -2073,6 +2100,12 @@ export default class VelociousConfiguration {
|
|
|
2073
2100
|
|
|
2074
2101
|
this._initializePromise = (async () => {
|
|
2075
2102
|
await this.initializeModels({type})
|
|
2103
|
+
|
|
2104
|
+
// Model initialization can be invalidated by a concurrent connection close.
|
|
2105
|
+
// If models are not ready, stop without marking the configuration initialized
|
|
2106
|
+
// so the next caller retries a full bootstrap.
|
|
2107
|
+
if (!this._modelsInitialized) return
|
|
2108
|
+
|
|
2076
2109
|
await this.getEnvironmentHandler().autoDiscoverResources(this)
|
|
2077
2110
|
this._mergeDiscoveredAbilityResources()
|
|
2078
2111
|
this._validateResourceRelationshipsOnModels()
|
|
@@ -2104,6 +2137,13 @@ export default class VelociousConfiguration {
|
|
|
2104
2137
|
this._initializePromise = undefined
|
|
2105
2138
|
throw error
|
|
2106
2139
|
}
|
|
2140
|
+
|
|
2141
|
+
// If the inner IIFE returned without marking the configuration initialized
|
|
2142
|
+
// (e.g. because models were invalidated mid-bootstrap), clear the promise so
|
|
2143
|
+
// a later call retries a full bootstrap.
|
|
2144
|
+
if (!this._isInitialized) {
|
|
2145
|
+
this._initializePromise = undefined
|
|
2146
|
+
}
|
|
2107
2147
|
}
|
|
2108
2148
|
|
|
2109
2149
|
/**
|
|
@@ -2210,7 +2250,7 @@ export default class VelociousConfiguration {
|
|
|
2210
2250
|
|
|
2211
2251
|
/**
|
|
2212
2252
|
* Runs set translator.
|
|
2213
|
-
* @param {
|
|
2253
|
+
* @param {(arg1: string, arg2: Record<string, ReturnType<typeof JSON.parse>> | undefined) => string} callback - Translator callback.
|
|
2214
2254
|
* @returns {void} - No return value.
|
|
2215
2255
|
*/
|
|
2216
2256
|
setTranslator(callback) { this._translator = callback }
|
|
@@ -2218,7 +2258,7 @@ export default class VelociousConfiguration {
|
|
|
2218
2258
|
/**
|
|
2219
2259
|
* Runs default translator.
|
|
2220
2260
|
* @param {string} msgID - Msg id.
|
|
2221
|
-
* @param {Record<string,
|
|
2261
|
+
* @param {Record<string, ReturnType<typeof JSON.parse>>} [args] - Translator options and variables.
|
|
2222
2262
|
* @returns {string} - The default translator.
|
|
2223
2263
|
*/
|
|
2224
2264
|
_defaultTranslator(msgID, args) {
|
|
@@ -2246,7 +2286,7 @@ export default class VelociousConfiguration {
|
|
|
2246
2286
|
|
|
2247
2287
|
/**
|
|
2248
2288
|
* Runs get translator.
|
|
2249
|
-
* @returns {(msgID: string, args?: Record<string,
|
|
2289
|
+
* @returns {(msgID: string, args?: Record<string, ReturnType<typeof JSON.parse>>) => string} - The configured translator.
|
|
2250
2290
|
*/
|
|
2251
2291
|
getTranslator() {
|
|
2252
2292
|
if (this._translator) return this._translator
|
|
@@ -2432,8 +2472,8 @@ export default class VelociousConfiguration {
|
|
|
2432
2472
|
* `canSubscribe()` continue to receive broadcasts until they
|
|
2433
2473
|
* unsubscribe or the session ends.
|
|
2434
2474
|
* @param {string} name
|
|
2435
|
-
* @param {Record<string,
|
|
2436
|
-
* @param {
|
|
2475
|
+
* @param {Record<string, ReturnType<typeof JSON.parse>>} broadcastParams
|
|
2476
|
+
* @param {ReturnType<typeof JSON.parse>} body
|
|
2437
2477
|
* @returns {void}
|
|
2438
2478
|
*/
|
|
2439
2479
|
/**
|
|
@@ -2527,7 +2567,7 @@ export default class VelociousConfiguration {
|
|
|
2527
2567
|
*
|
|
2528
2568
|
* Return `null`/`undefined` to mean "no identity" — resumes still
|
|
2529
2569
|
* succeed if pause and resume both resolve to a nullish value.
|
|
2530
|
-
* @param {((session: import("./http-server/client/websocket-session.js").default) =>
|
|
2570
|
+
* @param {((session: import("./http-server/client/websocket-session.js").default) => ReturnType<typeof JSON.parse> | Promise<ReturnType<typeof JSON.parse>>) | null} resolver - Authenticated-caller identity resolver, or null to disable identity checks.
|
|
2531
2571
|
* @returns {void}
|
|
2532
2572
|
*/
|
|
2533
2573
|
setWebsocketSessionIdentityResolver(resolver) {
|
|
@@ -2536,7 +2576,7 @@ export default class VelociousConfiguration {
|
|
|
2536
2576
|
|
|
2537
2577
|
/**
|
|
2538
2578
|
* Runs get websocket session identity resolver.
|
|
2539
|
-
* @returns {((session: import("./http-server/client/websocket-session.js").default) =>
|
|
2579
|
+
* @returns {((session: import("./http-server/client/websocket-session.js").default) => ReturnType<typeof JSON.parse> | Promise<ReturnType<typeof JSON.parse>>) | null} - The configured identity resolver.
|
|
2540
2580
|
*/
|
|
2541
2581
|
getWebsocketSessionIdentityResolver() {
|
|
2542
2582
|
return this._websocketSessionIdentityResolver
|
|
@@ -2635,8 +2675,8 @@ export default class VelociousConfiguration {
|
|
|
2635
2675
|
/**
|
|
2636
2676
|
* Runs broadcast to channel.
|
|
2637
2677
|
* @param {string} name - Channel type receiving the broadcast.
|
|
2638
|
-
* @param {Record<string,
|
|
2639
|
-
* @param {
|
|
2678
|
+
* @param {Record<string, ReturnType<typeof JSON.parse>>} broadcastParams - Values used to match eligible subscriptions.
|
|
2679
|
+
* @param {ReturnType<typeof JSON.parse>} body - Broadcast payload delivered to matching subscriptions.
|
|
2640
2680
|
* @returns {void}
|
|
2641
2681
|
*/
|
|
2642
2682
|
broadcastToChannel(name, broadcastParams, body) {
|
|
@@ -2665,7 +2705,7 @@ export default class VelociousConfiguration {
|
|
|
2665
2705
|
// so fall through to the local dispatch.
|
|
2666
2706
|
/**
|
|
2667
2707
|
* Websocket events.
|
|
2668
|
-
* @type {
|
|
2708
|
+
* @type {ReturnType<typeof JSON.parse>} */
|
|
2669
2709
|
const websocketEvents = this._websocketEvents
|
|
2670
2710
|
|
|
2671
2711
|
if (websocketEvents && typeof websocketEvents.broadcastV2 === "function") {
|
|
@@ -2691,7 +2731,7 @@ export default class VelociousConfiguration {
|
|
|
2691
2731
|
async awaitPendingBroadcasts() {
|
|
2692
2732
|
/**
|
|
2693
2733
|
* Websocket events.
|
|
2694
|
-
* @type {
|
|
2734
|
+
* @type {ReturnType<typeof JSON.parse>} */
|
|
2695
2735
|
const websocketEvents = this._websocketEvents
|
|
2696
2736
|
|
|
2697
2737
|
if (websocketEvents && typeof websocketEvents.awaitPendingBroadcasts === "function") {
|
|
@@ -2704,8 +2744,8 @@ export default class VelociousConfiguration {
|
|
|
2704
2744
|
* directly (in-process mode) or by the worker thread after the
|
|
2705
2745
|
* main-process fan-out.
|
|
2706
2746
|
* @param {string} name - Channel name.
|
|
2707
|
-
* @param {Record<string,
|
|
2708
|
-
* @param {
|
|
2747
|
+
* @param {Record<string, ReturnType<typeof JSON.parse>>} broadcastParams - Params passed to each subscription's `matches()`.
|
|
2748
|
+
* @param {ReturnType<typeof JSON.parse>} body - Message body delivered via `sendMessage()`.
|
|
2709
2749
|
* @param {{eventId?: string}} [meta] - Optional event metadata for replay tracking.
|
|
2710
2750
|
* @returns {void}
|
|
2711
2751
|
*/
|
|
@@ -2785,7 +2825,7 @@ export default class VelociousConfiguration {
|
|
|
2785
2825
|
/**
|
|
2786
2826
|
* Runs resolve ability.
|
|
2787
2827
|
* @param {object} args - Ability resolver args.
|
|
2788
|
-
* @param {Record<string,
|
|
2828
|
+
* @param {Record<string, ReturnType<typeof JSON.parse>>} args.params - Request params.
|
|
2789
2829
|
* @param {import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default} [args.request] - Request object. Absent for websocket channel subscriptions resolved from subscribe params.
|
|
2790
2830
|
* @param {import("./http-server/client/response.js").default} [args.response] - Response object. Absent outside HTTP request handling.
|
|
2791
2831
|
* @returns {Promise<import("./authorization/ability.js").default | undefined>} - Resolved ability.
|
|
@@ -2812,8 +2852,8 @@ export default class VelociousConfiguration {
|
|
|
2812
2852
|
/**
|
|
2813
2853
|
* Runs run with ability.
|
|
2814
2854
|
* @param {import("./authorization/ability.js").default | undefined} ability - Ability instance.
|
|
2815
|
-
* @param {() => Promise
|
|
2816
|
-
* @returns {Promise
|
|
2855
|
+
* @param {() => Promise<ReturnType<typeof JSON.parse>>} callback - Callback.
|
|
2856
|
+
* @returns {Promise<ReturnType<typeof JSON.parse>>} - Callback result.
|
|
2817
2857
|
*/
|
|
2818
2858
|
async runWithAbility(ability, callback) {
|
|
2819
2859
|
return await this.getEnvironmentHandler().runWithAbility(ability, callback)
|
|
@@ -2822,8 +2862,8 @@ export default class VelociousConfiguration {
|
|
|
2822
2862
|
/**
|
|
2823
2863
|
* Runs run with request timing.
|
|
2824
2864
|
* @param {import("./http-server/client/request-timing.js").default | undefined} requestTiming - Request timing collector.
|
|
2825
|
-
* @param {() => Promise
|
|
2826
|
-
* @returns {Promise
|
|
2865
|
+
* @param {() => Promise<ReturnType<typeof JSON.parse>>} callback - Callback.
|
|
2866
|
+
* @returns {Promise<ReturnType<typeof JSON.parse>>} - Callback result.
|
|
2827
2867
|
*/
|
|
2828
2868
|
async runWithRequestTiming(requestTiming, callback) {
|
|
2829
2869
|
return await this.getEnvironmentHandler().runWithRequestTiming(requestTiming, callback)
|
|
@@ -2832,8 +2872,8 @@ export default class VelociousConfiguration {
|
|
|
2832
2872
|
/**
|
|
2833
2873
|
* Runs run with timezone.
|
|
2834
2874
|
* @param {string} timeZone - IANA timezone identifier.
|
|
2835
|
-
* @param {() => Promise
|
|
2836
|
-
* @returns {Promise
|
|
2875
|
+
* @param {() => Promise<ReturnType<typeof JSON.parse>>} callback - Callback.
|
|
2876
|
+
* @returns {Promise<ReturnType<typeof JSON.parse>>} - Callback result.
|
|
2837
2877
|
*/
|
|
2838
2878
|
async runWithTimezone(timeZone, callback) {
|
|
2839
2879
|
return await this.getEnvironmentHandler().runWithTimezone(timeZone, callback)
|
|
@@ -2857,7 +2897,7 @@ export default class VelociousConfiguration {
|
|
|
2857
2897
|
|
|
2858
2898
|
/**
|
|
2859
2899
|
* Runs get current tenant.
|
|
2860
|
-
* @returns {
|
|
2900
|
+
* @returns {ReturnType<typeof JSON.parse>} - Current tenant from context.
|
|
2861
2901
|
*/
|
|
2862
2902
|
getCurrentTenant() {
|
|
2863
2903
|
return this.getEnvironmentHandler().getCurrentTenant()
|
|
@@ -2865,9 +2905,9 @@ export default class VelociousConfiguration {
|
|
|
2865
2905
|
|
|
2866
2906
|
/**
|
|
2867
2907
|
* Runs run with tenant.
|
|
2868
|
-
* @param {
|
|
2869
|
-
* @param {() => Promise
|
|
2870
|
-
* @returns {Promise
|
|
2908
|
+
* @param {ReturnType<typeof JSON.parse>} tenant - Tenant.
|
|
2909
|
+
* @param {() => Promise<ReturnType<typeof JSON.parse>>} callback - Callback.
|
|
2910
|
+
* @returns {Promise<ReturnType<typeof JSON.parse>>} - Callback result.
|
|
2871
2911
|
*/
|
|
2872
2912
|
async runWithTenant(tenant, callback) {
|
|
2873
2913
|
return await this.getEnvironmentHandler().runWithTenant(tenant, callback)
|
|
@@ -2876,11 +2916,11 @@ export default class VelociousConfiguration {
|
|
|
2876
2916
|
/**
|
|
2877
2917
|
* Runs resolve tenant.
|
|
2878
2918
|
* @param {object} args - Tenant resolver args.
|
|
2879
|
-
* @param {Record<string,
|
|
2919
|
+
* @param {Record<string, ReturnType<typeof JSON.parse>>} args.params - Request params.
|
|
2880
2920
|
* @param {import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default | undefined} args.request - Request object.
|
|
2881
2921
|
* @param {import("./http-server/client/response.js").default | undefined} args.response - Response object.
|
|
2882
|
-
* @param {{channel: string, params?: Record<string,
|
|
2883
|
-
* @returns {Promise
|
|
2922
|
+
* @param {{channel: string, params?: Record<string, ReturnType<typeof JSON.parse>>}} [args.subscription] - Subscription metadata.
|
|
2923
|
+
* @returns {Promise<ReturnType<typeof JSON.parse>>} - Resolved tenant.
|
|
2884
2924
|
*/
|
|
2885
2925
|
async resolveTenant({params, request, response, subscription}) {
|
|
2886
2926
|
const resolver = this.getTenantResolver()
|
|
@@ -2983,15 +3023,19 @@ export default class VelociousConfiguration {
|
|
|
2983
3023
|
throw new Error(`Unknown or inactive database identifier: ${databaseIdentifier}`)
|
|
2984
3024
|
}
|
|
2985
3025
|
|
|
3026
|
+
const tenant = this.getCurrentTenant()
|
|
3027
|
+
const databaseConfiguration = this.resolveDatabaseConfiguration(databaseIdentifier, tenant)
|
|
2986
3028
|
const pool = this.getDatabasePool(databaseIdentifier)
|
|
2987
3029
|
|
|
2988
3030
|
return await pool.withOperationConnection({name}, async (connection, owner) => {
|
|
2989
3031
|
const operation = new DatabaseOperation({
|
|
2990
3032
|
configuration: this,
|
|
3033
|
+
databaseConfiguration,
|
|
2991
3034
|
configurationReuseKey: pool.getConnectionConfigurationReuseKey(connection),
|
|
2992
3035
|
connection,
|
|
2993
3036
|
databaseIdentifier,
|
|
2994
|
-
owner
|
|
3037
|
+
owner,
|
|
3038
|
+
tenant
|
|
2995
3039
|
})
|
|
2996
3040
|
|
|
2997
3041
|
try {
|
|
@@ -3002,6 +3046,45 @@ export default class VelociousConfiguration {
|
|
|
3002
3046
|
})
|
|
3003
3047
|
}
|
|
3004
3048
|
|
|
3049
|
+
/**
|
|
3050
|
+
* Runs explicit model work on one connection selected from a captured physical
|
|
3051
|
+
* database configuration. No ambient tenant value is read during checkout or
|
|
3052
|
+
* execution.
|
|
3053
|
+
* @template T
|
|
3054
|
+
* @param {{databaseConfiguration: import("./configuration-types.js").DatabaseConfigurationType, databaseIdentifier: string, name?: string, tenant?: object}} options - Captured operation options.
|
|
3055
|
+
* @param {(operation: DatabaseOperation) => Promise<T>} callback - Operation callback.
|
|
3056
|
+
* @returns {Promise<T>} - Callback result.
|
|
3057
|
+
*/
|
|
3058
|
+
async withDatabaseOperation({databaseConfiguration, databaseIdentifier, name = "Configuration.withDatabaseOperation", tenant, ...restArgs}, callback) {
|
|
3059
|
+
restArgsError(restArgs)
|
|
3060
|
+
|
|
3061
|
+
if (!databaseIdentifier) throw new Error("Configuration.withDatabaseOperation requires a databaseIdentifier")
|
|
3062
|
+
if (!databaseConfiguration) throw new Error("Configuration.withDatabaseOperation requires a databaseConfiguration")
|
|
3063
|
+
if (typeof callback != "function") throw new Error("Configuration.withDatabaseOperation requires a callback")
|
|
3064
|
+
|
|
3065
|
+
const pool = this.getDatabasePool(databaseIdentifier)
|
|
3066
|
+
const configurationReuseKey = pool.getConfigurationReuseKey(databaseConfiguration)
|
|
3067
|
+
|
|
3068
|
+
return await pool.withCapturedOperationConnection({databaseConfiguration, name}, async (connection, owner) => {
|
|
3069
|
+
const operation = new DatabaseOperation({
|
|
3070
|
+
configuration: this,
|
|
3071
|
+
databaseConfiguration,
|
|
3072
|
+
configurationReuseKey,
|
|
3073
|
+
connection,
|
|
3074
|
+
databaseIdentifier,
|
|
3075
|
+
enforceCurrentTenantReuseKey: false,
|
|
3076
|
+
owner,
|
|
3077
|
+
tenant
|
|
3078
|
+
})
|
|
3079
|
+
|
|
3080
|
+
try {
|
|
3081
|
+
return await callback(operation)
|
|
3082
|
+
} finally {
|
|
3083
|
+
operation.complete()
|
|
3084
|
+
}
|
|
3085
|
+
})
|
|
3086
|
+
}
|
|
3087
|
+
|
|
3005
3088
|
/**
|
|
3006
3089
|
* Runs callback with database connections for the requested identifiers.
|
|
3007
3090
|
* @template T
|
|
@@ -3113,7 +3196,7 @@ export default class VelociousConfiguration {
|
|
|
3113
3196
|
|
|
3114
3197
|
/**
|
|
3115
3198
|
* Runs is missing current connection error.
|
|
3116
|
-
* @param {
|
|
3199
|
+
* @param {ReturnType<typeof JSON.parse>} error - Error thrown while looking up the current connection.
|
|
3117
3200
|
* @returns {boolean} - Whether the error means no current connection is available.
|
|
3118
3201
|
*/
|
|
3119
3202
|
isMissingCurrentConnectionError(error) {
|
|
@@ -3244,8 +3327,10 @@ export default class VelociousConfiguration {
|
|
|
3244
3327
|
PoolClass.clearGlobalConnections(this)
|
|
3245
3328
|
}
|
|
3246
3329
|
|
|
3247
|
-
// Allow
|
|
3330
|
+
// Allow full re-initialization after connections are closed.
|
|
3331
|
+
this._modelInitializationGeneration += 1
|
|
3248
3332
|
this._modelsInitialized = false
|
|
3333
|
+
this._isInitialized = false
|
|
3249
3334
|
}
|
|
3250
3335
|
})()
|
|
3251
3336
|
|
package/build/controller.js
CHANGED
|
@@ -12,6 +12,9 @@ import querystring from "querystring"
|
|
|
12
12
|
import {serializeFrontendModelTransportValue} from "./frontend-models/transport-serialization.js"
|
|
13
13
|
|
|
14
14
|
export default class VelociousController {
|
|
15
|
+
/** @type {Array<string> | undefined} */
|
|
16
|
+
static _beforeActions = undefined
|
|
17
|
+
|
|
15
18
|
/**
|
|
16
19
|
* Runs before action.
|
|
17
20
|
* @param {string} methodName - Method name.
|
|
@@ -34,7 +37,7 @@ export default class VelociousController {
|
|
|
34
37
|
* @param {string} args.action - Action.
|
|
35
38
|
* @param {import("./configuration.js").default} args.configuration - Configuration instance.
|
|
36
39
|
* @param {string} args.controller - Controller.
|
|
37
|
-
* @param {Record<string,
|
|
40
|
+
* @param {Record<string, ReturnType<typeof JSON.parse>>} args.params - Parameters object.
|
|
38
41
|
* @param {import("./http-server/client/request.js").default} args.request - Request object.
|
|
39
42
|
* @param {import("./http-server/client/response.js").default} args.response - Response object.
|
|
40
43
|
* @param {string} args.viewPath - View path.
|
|
@@ -73,7 +76,7 @@ export default class VelociousController {
|
|
|
73
76
|
|
|
74
77
|
/**
|
|
75
78
|
* Runs get params.
|
|
76
|
-
* @returns {Record<string,
|
|
79
|
+
* @returns {Record<string, ReturnType<typeof JSON.parse>>} - The params.
|
|
77
80
|
*/
|
|
78
81
|
getParams() { return this._params }
|
|
79
82
|
|
|
@@ -98,7 +101,7 @@ export default class VelociousController {
|
|
|
98
101
|
/**
|
|
99
102
|
* Runs set cookie.
|
|
100
103
|
* @param {string} name - Cookie name.
|
|
101
|
-
* @param {
|
|
104
|
+
* @param {ReturnType<typeof JSON.parse>} value - Cookie value.
|
|
102
105
|
* @param {object} [args] - Options object.
|
|
103
106
|
* @param {string} [args.domain] - Domain.
|
|
104
107
|
* @param {Date} [args.expires] - Expires date.
|
|
@@ -169,7 +172,7 @@ export default class VelociousController {
|
|
|
169
172
|
const beforeActions = currentControllerClass._beforeActions
|
|
170
173
|
|
|
171
174
|
if (beforeActions) {
|
|
172
|
-
const controllerPrototype = /** @type {Record<string, ((...args: Array
|
|
175
|
+
const controllerPrototype = /** @type {Record<string, ((...args: Array<ReturnType<typeof JSON.parse>>) => ReturnType<typeof JSON.parse>) | undefined>} */ (/** @type {ReturnType<typeof JSON.parse>} */ (currentControllerClass.prototype))
|
|
173
176
|
|
|
174
177
|
for (const beforeActionName of beforeActions) {
|
|
175
178
|
const beforeAction = controllerPrototype[beforeActionName]
|
|
@@ -192,7 +195,7 @@ export default class VelociousController {
|
|
|
192
195
|
|
|
193
196
|
/**
|
|
194
197
|
* Runs params.
|
|
195
|
-
* @returns {Record<string,
|
|
198
|
+
* @returns {Record<string, ReturnType<typeof JSON.parse>>} - The params.
|
|
196
199
|
*/
|
|
197
200
|
params() {
|
|
198
201
|
// Merge query parameters so controllers can read them via params()
|
|
@@ -205,7 +208,7 @@ export default class VelociousController {
|
|
|
205
208
|
|
|
206
209
|
/**
|
|
207
210
|
* Runs query parameters.
|
|
208
|
-
* @returns {Record<string,
|
|
211
|
+
* @returns {Record<string, ReturnType<typeof JSON.parse>>} - The query parameters.
|
|
209
212
|
*/
|
|
210
213
|
queryParameters() {
|
|
211
214
|
const query = this._request.path().split("?")[1]
|
|
@@ -215,13 +218,13 @@ export default class VelociousController {
|
|
|
215
218
|
try {
|
|
216
219
|
/**
|
|
217
220
|
* Unparsed params.
|
|
218
|
-
* @type {Record<string,
|
|
221
|
+
* @type {Record<string, ReturnType<typeof JSON.parse>>} */
|
|
219
222
|
const unparsedParams = querystring.parse(query)
|
|
220
223
|
const paramsToObject = new ParamsToObject(unparsedParams)
|
|
221
224
|
|
|
222
225
|
return paramsToObject.toObject()
|
|
223
226
|
} catch (error) {
|
|
224
|
-
const ensuredError = /** @type {Error & {velociousContext?: Record<string,
|
|
227
|
+
const ensuredError = /** @type {Error & {velociousContext?: Record<string, ReturnType<typeof JSON.parse>>}} */ (error)
|
|
225
228
|
|
|
226
229
|
ensuredError.velociousContext = {
|
|
227
230
|
...(ensuredError.velociousContext || {}),
|
package/build/current.js
CHANGED
|
@@ -38,8 +38,8 @@ export default class Current {
|
|
|
38
38
|
/**
|
|
39
39
|
* Runs with ability.
|
|
40
40
|
* @param {import("./authorization/ability.js").default | undefined} ability - Ability.
|
|
41
|
-
* @param {() => Promise
|
|
42
|
-
* @returns {Promise
|
|
41
|
+
* @param {() => Promise<ReturnType<typeof JSON.parse>>} callback - Callback.
|
|
42
|
+
* @returns {Promise<ReturnType<typeof JSON.parse>>} - Callback result.
|
|
43
43
|
*/
|
|
44
44
|
static async withAbility(ability, callback) {
|
|
45
45
|
return await this.configuration().runWithAbility(ability, callback)
|
|
@@ -9,7 +9,7 @@ let asyncLocalStorage
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Database annotations global.
|
|
12
|
-
* @type {typeof globalThis & {velociousDatabaseAnnotations?: {getDatabaseAnnotations: () => string[], withDatabaseAnnotation: (annotation: string, callback: () => Promise
|
|
12
|
+
* @type {typeof globalThis & {velociousDatabaseAnnotations?: {getDatabaseAnnotations: () => string[], withDatabaseAnnotation: (annotation: string, callback: () => Promise<ReturnType<typeof JSON.parse>>) => Promise<ReturnType<typeof JSON.parse>>}}} */
|
|
13
13
|
const databaseAnnotationsGlobal = globalThis
|
|
14
14
|
|
|
15
15
|
if (AsyncLocalStorage) {
|
|
@@ -27,8 +27,8 @@ function getDatabaseAnnotations() {
|
|
|
27
27
|
/**
|
|
28
28
|
* Runs the callback with an annotation that is appended to database query comments.
|
|
29
29
|
* @param {string} annotation - Human-readable annotation for queries executed inside the callback.
|
|
30
|
-
* @param {() => Promise
|
|
31
|
-
* @returns {Promise
|
|
30
|
+
* @param {() => Promise<ReturnType<typeof JSON.parse>>} callback - Callback to execute inside the annotation context.
|
|
31
|
+
* @returns {Promise<ReturnType<typeof JSON.parse>>} - Resolves with the callback result.
|
|
32
32
|
*/
|
|
33
33
|
async function withDatabaseAnnotation(annotation, callback) {
|
|
34
34
|
if (!asyncLocalStorage) return await callback()
|