velocious 1.0.449 → 1.0.451
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 +1 -1
- package/build/application.js +4 -4
- package/build/authorization/ability.js +8 -8
- package/build/authorization/base-resource.js +4 -4
- package/build/background-jobs/cron-expression.js +1 -1
- package/build/background-jobs/forked-runner-child.js +1 -1
- package/build/background-jobs/job-registry.js +1 -1
- package/build/background-jobs/job-runner.js +1 -1
- package/build/background-jobs/job.js +1 -1
- package/build/background-jobs/json-socket.js +4 -4
- package/build/background-jobs/main.js +21 -21
- package/build/background-jobs/scheduler.js +7 -7
- package/build/background-jobs/store.js +7 -7
- package/build/background-jobs/web/controller.js +2 -2
- package/build/background-jobs/worker.js +12 -12
- package/build/beacon/client.js +11 -8
- package/build/beacon/in-process-broker.js +2 -2
- package/build/beacon/in-process-client.js +2 -2
- package/build/beacon/server.js +3 -3
- package/build/cli/browser-cli.js +1 -1
- package/build/cli/commands/db/base-command.js +2 -2
- package/build/cli/index.js +2 -2
- package/build/cli/tenant-database-command-helper.js +3 -3
- package/build/cli/use-browser-cli.js +1 -1
- package/build/configuration-types.js +3 -1
- package/build/configuration.js +38 -38
- package/build/controller.js +8 -8
- package/build/current-configuration.js +1 -1
- package/build/database/annotations-async-hooks.js +2 -2
- package/build/database/annotations.js +3 -3
- 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 +10 -10
- package/build/database/drivers/mssql/index.js +1 -1
- package/build/database/drivers/mssql/table.js +1 -1
- package/build/database/drivers/mysql/index.js +3 -3
- package/build/database/drivers/mysql/query.js +1 -1
- package/build/database/drivers/mysql/table.js +1 -1
- package/build/database/drivers/pgsql/index.js +2 -2
- package/build/database/drivers/sqlite/base.js +16 -16
- package/build/database/drivers/sqlite/index.js +11 -11
- package/build/database/drivers/sqlite/index.native.js +1 -1
- package/build/database/drivers/sqlite/index.web.js +3 -3
- package/build/database/drivers/sqlite/query.js +1 -1
- package/build/database/drivers/sqlite/query.web.js +1 -1
- package/build/database/drivers/sqlite/sql/alter-table.js +2 -2
- package/build/database/drivers/sqlite/table.js +1 -1
- package/build/database/migrator/files-finder.js +1 -1
- package/build/database/migrator.js +6 -6
- package/build/database/pool/async-tracked-multi-connection.js +27 -27
- package/build/database/pool/base-methods-forward.js +4 -4
- package/build/database/pool/base.js +8 -8
- package/build/database/query/from-base.js +1 -1
- package/build/database/query/index.js +10 -10
- package/build/database/query/join-object.js +3 -3
- package/build/database/query/model-class-query.js +39 -39
- package/build/database/query/preloader/belongs-to.js +22 -22
- package/build/database/query/preloader/has-many.js +20 -20
- package/build/database/query/preloader/has-one.js +8 -8
- package/build/database/query/preloader/selection.js +3 -3
- package/build/database/query/preloader.js +8 -8
- package/build/database/query/query-data.js +9 -9
- package/build/database/query/where-model-class-hash.js +7 -7
- package/build/database/query/with-count.js +9 -9
- package/build/database/record/acts-as-list.js +15 -15
- package/build/database/record/attachments/handle.js +2 -2
- package/build/database/record/attachments/normalize-input.js +12 -12
- package/build/database/record/attachments/storage-drivers/s3.js +6 -6
- package/build/database/record/attachments/store.js +13 -13
- package/build/database/record/index.js +115 -121
- package/build/database/record/instance-relationships/base.js +11 -11
- package/build/database/record/instance-relationships/belongs-to.js +3 -3
- package/build/database/record/instance-relationships/has-many.js +8 -8
- package/build/database/record/instance-relationships/has-one.js +7 -7
- package/build/database/record/relationships/base.js +2 -2
- package/build/database/record/state-machine.js +7 -7
- package/build/database/record/validators/presence.js +1 -1
- package/build/database/record/validators/uniqueness.js +5 -5
- package/build/database/table-data/index.js +4 -4
- package/build/environment-handlers/base.js +2 -2
- package/build/environment-handlers/browser.js +7 -7
- package/build/environment-handlers/node/cli/commands/cli-command-context.js +1 -1
- package/build/environment-handlers/node/cli/commands/console.js +4 -4
- package/build/environment-handlers/node/cli/commands/db/schema/dump.js +1 -1
- package/build/environment-handlers/node/cli/commands/db/schema/load.js +3 -3
- package/build/environment-handlers/node/cli/commands/generate/frontend-models.js +836 -60
- package/build/environment-handlers/node.js +6 -6
- package/build/frontend-model-controller.js +81 -82
- package/build/frontend-model-resource/base-resource.js +78 -115
- package/build/frontend-models/base.js +162 -149
- package/build/frontend-models/clear-pending-debounced-callback.js +1 -1
- package/build/frontend-models/event-hook-models.js +2 -2
- package/build/frontend-models/outgoing-event-buffer.js +2 -2
- package/build/frontend-models/preloader.js +5 -5
- package/build/frontend-models/query.js +43 -38
- package/build/frontend-models/resource-definition.js +6 -6
- package/build/frontend-models/transport-serialization.js +11 -11
- package/build/frontend-models/use-destroyed-event.js +10 -10
- package/build/frontend-models/use-model-class-event.js +11 -11
- package/build/frontend-models/use-updated-event.js +11 -11
- package/build/frontend-models/websocket-channel.js +26 -17
- package/build/frontend-models/websocket-publishers.js +9 -9
- package/build/http-client/response.js +2 -2
- package/build/http-server/client/index.js +8 -8
- package/build/http-server/client/params-to-object.js +10 -10
- package/build/http-server/client/request-buffer/form-data-part.js +2 -2
- package/build/http-server/client/request-buffer/index.js +8 -8
- package/build/http-server/client/request-parser.js +3 -3
- package/build/http-server/client/request-runner.js +6 -6
- package/build/http-server/client/request-timing.js +5 -5
- package/build/http-server/client/request.js +1 -1
- package/build/http-server/client/response.js +5 -5
- package/build/http-server/client/websocket-request.js +4 -4
- package/build/http-server/client/websocket-session.js +18 -18
- package/build/http-server/development-reloader.js +5 -5
- package/build/http-server/index.js +12 -12
- package/build/http-server/remote-address.js +4 -4
- package/build/http-server/server-client.js +3 -3
- package/build/http-server/server-lock.js +4 -4
- package/build/http-server/websocket-channel-subscribers.js +3 -3
- package/build/http-server/websocket-channel.js +1 -1
- package/build/http-server/websocket-connection.js +1 -1
- package/build/http-server/websocket-event-log-store.js +6 -6
- package/build/http-server/websocket-events-host.js +2 -2
- package/build/http-server/worker-handler/in-process.js +7 -7
- package/build/http-server/worker-handler/index.js +4 -4
- package/build/http-server/worker-handler/worker-thread.js +3 -3
- package/build/logger/outputs/array-output.js +3 -3
- package/build/logger/outputs/console-output.js +1 -1
- package/build/logger/outputs/file-output.js +4 -4
- package/build/logger/outputs/stdout-output.js +1 -1
- package/build/logger.js +10 -10
- package/build/mailer/backends/smtp.js +3 -3
- package/build/mailer/base.js +8 -8
- package/build/mailer/delivery.js +4 -4
- package/build/plugins/sqljs-wasm-route-controller.js +1 -1
- package/build/routes/base-route.js +6 -6
- package/build/routes/basic-route.js +1 -1
- package/build/routes/hooks/frontend-model-command-route-hook.js +1 -1
- package/build/routes/index.js +1 -1
- package/build/routes/plugin-routes.js +1 -1
- package/build/routes/resolver.js +11 -11
- package/build/routes/resource-route.js +1 -1
- package/build/src/application.d.ts +3 -3
- package/build/src/application.d.ts.map +1 -1
- package/build/src/application.js +5 -5
- package/build/src/authorization/ability.d.ts +7 -7
- package/build/src/authorization/ability.d.ts.map +1 -1
- package/build/src/authorization/ability.js +9 -9
- package/build/src/authorization/base-resource.d.ts +1 -1
- package/build/src/authorization/base-resource.d.ts.map +1 -1
- package/build/src/authorization/base-resource.js +5 -5
- package/build/src/background-jobs/cron-expression.js +2 -2
- package/build/src/background-jobs/forked-runner-child.js +2 -2
- package/build/src/background-jobs/job-registry.d.ts +1 -1
- package/build/src/background-jobs/job-registry.d.ts.map +1 -1
- package/build/src/background-jobs/job-registry.js +2 -2
- package/build/src/background-jobs/job-runner.js +2 -2
- package/build/src/background-jobs/job.js +2 -2
- package/build/src/background-jobs/json-socket.d.ts +4 -4
- package/build/src/background-jobs/json-socket.d.ts.map +1 -1
- package/build/src/background-jobs/json-socket.js +5 -5
- package/build/src/background-jobs/main.d.ts +18 -18
- package/build/src/background-jobs/main.d.ts.map +1 -1
- package/build/src/background-jobs/main.js +22 -22
- package/build/src/background-jobs/scheduler.d.ts +5 -5
- package/build/src/background-jobs/scheduler.d.ts.map +1 -1
- package/build/src/background-jobs/scheduler.js +8 -8
- package/build/src/background-jobs/store.js +8 -8
- package/build/src/background-jobs/web/controller.js +3 -3
- package/build/src/background-jobs/worker.d.ts +6 -6
- package/build/src/background-jobs/worker.d.ts.map +1 -1
- package/build/src/background-jobs/worker.js +13 -13
- package/build/src/beacon/client.d.ts +4 -4
- package/build/src/beacon/client.d.ts.map +1 -1
- package/build/src/beacon/client.js +12 -9
- package/build/src/beacon/in-process-broker.d.ts.map +1 -1
- package/build/src/beacon/in-process-broker.js +3 -3
- package/build/src/beacon/in-process-client.d.ts +1 -1
- package/build/src/beacon/in-process-client.d.ts.map +1 -1
- package/build/src/beacon/in-process-client.js +3 -3
- package/build/src/beacon/server.d.ts +2 -2
- package/build/src/beacon/server.d.ts.map +1 -1
- package/build/src/beacon/server.js +4 -4
- package/build/src/cli/browser-cli.js +2 -2
- package/build/src/cli/commands/db/base-command.d.ts +2 -2
- package/build/src/cli/commands/db/base-command.d.ts.map +1 -1
- package/build/src/cli/commands/db/base-command.js +3 -3
- package/build/src/cli/index.js +3 -3
- package/build/src/cli/tenant-database-command-helper.d.ts +1 -1
- package/build/src/cli/tenant-database-command-helper.d.ts.map +1 -1
- package/build/src/cli/tenant-database-command-helper.js +4 -4
- package/build/src/cli/use-browser-cli.js +2 -2
- package/build/src/configuration-types.d.ts +12 -2
- package/build/src/configuration-types.d.ts.map +1 -1
- package/build/src/configuration-types.js +4 -2
- package/build/src/configuration.d.ts +14 -14
- package/build/src/configuration.d.ts.map +1 -1
- package/build/src/configuration.js +39 -39
- package/build/src/controller.js +10 -10
- package/build/src/current-configuration.js +2 -2
- package/build/src/database/annotations-async-hooks.js +3 -3
- package/build/src/database/annotations.d.ts.map +1 -1
- package/build/src/database/annotations.js +4 -4
- package/build/src/database/drivers/base-column.d.ts +1 -1
- 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-foreign-key.d.ts +1 -1
- 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 +1 -1
- 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 +6 -6
- package/build/src/database/drivers/base.d.ts.map +1 -1
- package/build/src/database/drivers/base.js +11 -11
- package/build/src/database/drivers/mssql/index.js +2 -2
- package/build/src/database/drivers/mssql/table.js +2 -2
- package/build/src/database/drivers/mysql/index.js +4 -4
- package/build/src/database/drivers/mysql/query.js +2 -2
- package/build/src/database/drivers/mysql/table.js +2 -2
- package/build/src/database/drivers/pgsql/index.js +3 -3
- package/build/src/database/drivers/sqlite/base.d.ts +3 -3
- package/build/src/database/drivers/sqlite/base.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/base.js +17 -17
- package/build/src/database/drivers/sqlite/index.d.ts +4 -4
- package/build/src/database/drivers/sqlite/index.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/index.js +12 -12
- package/build/src/database/drivers/sqlite/index.native.js +2 -2
- package/build/src/database/drivers/sqlite/index.web.d.ts +2 -2
- package/build/src/database/drivers/sqlite/index.web.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/index.web.js +4 -4
- package/build/src/database/drivers/sqlite/query.js +2 -2
- package/build/src/database/drivers/sqlite/query.web.js +2 -2
- package/build/src/database/drivers/sqlite/sql/alter-table.js +3 -3
- package/build/src/database/drivers/sqlite/table.js +2 -2
- package/build/src/database/migrator/files-finder.js +2 -2
- package/build/src/database/migrator.d.ts +1 -1
- package/build/src/database/migrator.d.ts.map +1 -1
- package/build/src/database/migrator.js +7 -7
- package/build/src/database/pool/async-tracked-multi-connection.d.ts +9 -9
- package/build/src/database/pool/async-tracked-multi-connection.d.ts.map +1 -1
- package/build/src/database/pool/async-tracked-multi-connection.js +28 -28
- package/build/src/database/pool/base-methods-forward.js +7 -7
- package/build/src/database/pool/base.d.ts +1 -1
- package/build/src/database/pool/base.d.ts.map +1 -1
- package/build/src/database/pool/base.js +9 -9
- package/build/src/database/query/from-base.d.ts +1 -1
- package/build/src/database/query/from-base.d.ts.map +1 -1
- package/build/src/database/query/from-base.js +2 -2
- package/build/src/database/query/index.d.ts +4 -4
- package/build/src/database/query/index.d.ts.map +1 -1
- package/build/src/database/query/index.js +11 -11
- package/build/src/database/query/join-object.js +4 -4
- package/build/src/database/query/model-class-query.d.ts +4 -4
- 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/preloader/belongs-to.js +23 -23
- package/build/src/database/query/preloader/has-many.js +21 -21
- package/build/src/database/query/preloader/has-one.js +9 -9
- package/build/src/database/query/preloader/selection.js +4 -4
- package/build/src/database/query/preloader.js +9 -9
- package/build/src/database/query/query-data.js +10 -10
- package/build/src/database/query/where-model-class-hash.js +8 -8
- package/build/src/database/query/with-count.js +10 -10
- package/build/src/database/record/acts-as-list.js +20 -20
- package/build/src/database/record/attachments/handle.d.ts +1 -1
- package/build/src/database/record/attachments/handle.d.ts.map +1 -1
- package/build/src/database/record/attachments/handle.js +3 -3
- package/build/src/database/record/attachments/normalize-input.js +15 -15
- package/build/src/database/record/attachments/storage-drivers/s3.js +7 -7
- package/build/src/database/record/attachments/store.d.ts +2 -2
- package/build/src/database/record/attachments/store.d.ts.map +1 -1
- package/build/src/database/record/attachments/store.js +14 -14
- package/build/src/database/record/index.d.ts +18 -25
- package/build/src/database/record/index.d.ts.map +1 -1
- package/build/src/database/record/index.js +135 -141
- package/build/src/database/record/instance-relationships/base.d.ts +3 -3
- package/build/src/database/record/instance-relationships/base.d.ts.map +1 -1
- package/build/src/database/record/instance-relationships/base.js +13 -13
- package/build/src/database/record/instance-relationships/belongs-to.js +4 -4
- package/build/src/database/record/instance-relationships/has-many.js +9 -9
- package/build/src/database/record/instance-relationships/has-one.d.ts +1 -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 +8 -8
- package/build/src/database/record/relationships/base.js +4 -4
- package/build/src/database/record/state-machine.js +8 -8
- package/build/src/database/record/validators/presence.js +2 -2
- package/build/src/database/record/validators/uniqueness.js +6 -6
- package/build/src/database/table-data/index.d.ts +4 -4
- package/build/src/database/table-data/index.d.ts.map +1 -1
- package/build/src/database/table-data/index.js +5 -5
- package/build/src/environment-handlers/base.js +3 -3
- package/build/src/environment-handlers/browser.d.ts +3 -3
- package/build/src/environment-handlers/browser.d.ts.map +1 -1
- package/build/src/environment-handlers/browser.js +8 -8
- package/build/src/environment-handlers/node/cli/commands/cli-command-context.js +2 -2
- 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/dump.js +2 -2
- 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/schema/load.js +4 -4
- package/build/src/environment-handlers/node/cli/commands/generate/frontend-models.d.ts +285 -12
- 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/frontend-models.js +712 -61
- package/build/src/environment-handlers/node.d.ts +2 -2
- package/build/src/environment-handlers/node.d.ts.map +1 -1
- package/build/src/environment-handlers/node.js +7 -7
- package/build/src/frontend-model-controller.d.ts +5 -6
- package/build/src/frontend-model-controller.d.ts.map +1 -1
- package/build/src/frontend-model-controller.js +88 -89
- package/build/src/frontend-model-resource/base-resource.d.ts +36 -27
- package/build/src/frontend-model-resource/base-resource.d.ts.map +1 -1
- package/build/src/frontend-model-resource/base-resource.js +67 -120
- package/build/src/frontend-models/base.d.ts +67 -59
- package/build/src/frontend-models/base.d.ts.map +1 -1
- package/build/src/frontend-models/base.js +171 -158
- package/build/src/frontend-models/clear-pending-debounced-callback.js +2 -2
- package/build/src/frontend-models/event-hook-models.d.ts.map +1 -1
- package/build/src/frontend-models/event-hook-models.js +3 -3
- package/build/src/frontend-models/outgoing-event-buffer.d.ts +1 -1
- package/build/src/frontend-models/outgoing-event-buffer.d.ts.map +1 -1
- package/build/src/frontend-models/outgoing-event-buffer.js +3 -3
- package/build/src/frontend-models/preloader.js +6 -6
- package/build/src/frontend-models/query.d.ts +16 -8
- package/build/src/frontend-models/query.d.ts.map +1 -1
- package/build/src/frontend-models/query.js +43 -39
- package/build/src/frontend-models/resource-definition.js +7 -7
- package/build/src/frontend-models/transport-serialization.js +12 -12
- package/build/src/frontend-models/use-destroyed-event.d.ts.map +1 -1
- package/build/src/frontend-models/use-destroyed-event.js +11 -11
- package/build/src/frontend-models/use-model-class-event.d.ts.map +1 -1
- package/build/src/frontend-models/use-model-class-event.js +12 -12
- package/build/src/frontend-models/use-updated-event.d.ts.map +1 -1
- package/build/src/frontend-models/use-updated-event.js +12 -12
- package/build/src/frontend-models/websocket-channel.d.ts +6 -1
- package/build/src/frontend-models/websocket-channel.d.ts.map +1 -1
- package/build/src/frontend-models/websocket-channel.js +26 -18
- package/build/src/frontend-models/websocket-publishers.js +11 -11
- package/build/src/http-client/response.d.ts +2 -2
- package/build/src/http-client/response.d.ts.map +1 -1
- package/build/src/http-client/response.js +3 -3
- package/build/src/http-server/client/index.d.ts +1 -1
- package/build/src/http-server/client/index.d.ts.map +1 -1
- package/build/src/http-server/client/index.js +9 -9
- package/build/src/http-server/client/params-to-object.js +11 -11
- package/build/src/http-server/client/request-buffer/form-data-part.d.ts +2 -2
- package/build/src/http-server/client/request-buffer/form-data-part.d.ts.map +1 -1
- package/build/src/http-server/client/request-buffer/form-data-part.js +3 -3
- package/build/src/http-server/client/request-buffer/index.d.ts +4 -4
- package/build/src/http-server/client/request-buffer/index.d.ts.map +1 -1
- package/build/src/http-server/client/request-buffer/index.js +9 -9
- package/build/src/http-server/client/request-parser.d.ts +1 -1
- package/build/src/http-server/client/request-parser.d.ts.map +1 -1
- package/build/src/http-server/client/request-parser.js +4 -4
- package/build/src/http-server/client/request-runner.js +7 -7
- package/build/src/http-server/client/request-timing.d.ts +5 -5
- package/build/src/http-server/client/request-timing.d.ts.map +1 -1
- package/build/src/http-server/client/request-timing.js +6 -6
- package/build/src/http-server/client/request.js +2 -2
- package/build/src/http-server/client/response.d.ts +3 -3
- package/build/src/http-server/client/response.d.ts.map +1 -1
- package/build/src/http-server/client/response.js +6 -6
- package/build/src/http-server/client/websocket-request.d.ts +3 -3
- package/build/src/http-server/client/websocket-request.d.ts.map +1 -1
- package/build/src/http-server/client/websocket-request.js +5 -5
- package/build/src/http-server/client/websocket-session.d.ts +6 -6
- package/build/src/http-server/client/websocket-session.d.ts.map +1 -1
- package/build/src/http-server/client/websocket-session.js +19 -19
- package/build/src/http-server/development-reloader.d.ts +3 -3
- package/build/src/http-server/development-reloader.d.ts.map +1 -1
- package/build/src/http-server/development-reloader.js +6 -6
- package/build/src/http-server/index.d.ts +7 -7
- package/build/src/http-server/index.d.ts.map +1 -1
- package/build/src/http-server/index.js +13 -13
- package/build/src/http-server/remote-address.js +6 -6
- package/build/src/http-server/server-client.js +4 -4
- package/build/src/http-server/server-lock.js +5 -5
- package/build/src/http-server/websocket-channel-subscribers.d.ts +1 -1
- package/build/src/http-server/websocket-channel-subscribers.d.ts.map +1 -1
- package/build/src/http-server/websocket-channel-subscribers.js +4 -4
- package/build/src/http-server/websocket-channel.d.ts +1 -1
- 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 +1 -1
- package/build/src/http-server/websocket-connection.d.ts.map +1 -1
- package/build/src/http-server/websocket-connection.js +2 -2
- package/build/src/http-server/websocket-event-log-store.d.ts +1 -1
- package/build/src/http-server/websocket-event-log-store.d.ts.map +1 -1
- package/build/src/http-server/websocket-event-log-store.js +7 -7
- package/build/src/http-server/websocket-events-host.d.ts +1 -1
- package/build/src/http-server/websocket-events-host.d.ts.map +1 -1
- package/build/src/http-server/websocket-events-host.js +3 -3
- package/build/src/http-server/worker-handler/in-process.d.ts +3 -3
- package/build/src/http-server/worker-handler/in-process.d.ts.map +1 -1
- package/build/src/http-server/worker-handler/in-process.js +9 -9
- package/build/src/http-server/worker-handler/index.d.ts +4 -4
- package/build/src/http-server/worker-handler/index.d.ts.map +1 -1
- package/build/src/http-server/worker-handler/index.js +5 -5
- package/build/src/http-server/worker-handler/worker-thread.d.ts +2 -2
- package/build/src/http-server/worker-handler/worker-thread.d.ts.map +1 -1
- package/build/src/http-server/worker-handler/worker-thread.js +4 -4
- package/build/src/logger/outputs/array-output.d.ts +3 -3
- package/build/src/logger/outputs/array-output.d.ts.map +1 -1
- package/build/src/logger/outputs/array-output.js +4 -4
- package/build/src/logger/outputs/console-output.d.ts +1 -1
- package/build/src/logger/outputs/console-output.d.ts.map +1 -1
- package/build/src/logger/outputs/console-output.js +2 -2
- package/build/src/logger/outputs/file-output.d.ts +4 -4
- package/build/src/logger/outputs/file-output.d.ts.map +1 -1
- package/build/src/logger/outputs/file-output.js +5 -5
- package/build/src/logger/outputs/stdout-output.d.ts.map +1 -1
- package/build/src/logger/outputs/stdout-output.js +2 -2
- package/build/src/logger.d.ts.map +1 -1
- package/build/src/logger.js +11 -11
- package/build/src/mailer/backends/smtp.d.ts.map +1 -1
- package/build/src/mailer/backends/smtp.js +5 -5
- package/build/src/mailer/base.js +11 -11
- package/build/src/mailer/delivery.d.ts +3 -3
- package/build/src/mailer/delivery.d.ts.map +1 -1
- package/build/src/mailer/delivery.js +5 -5
- package/build/src/plugins/sqljs-wasm-route-controller.js +2 -2
- package/build/src/routes/base-route.d.ts +6 -6
- package/build/src/routes/base-route.d.ts.map +1 -1
- package/build/src/routes/base-route.js +7 -7
- package/build/src/routes/basic-route.js +2 -2
- package/build/src/routes/hooks/frontend-model-command-route-hook.js +2 -2
- package/build/src/routes/index.js +2 -2
- package/build/src/routes/plugin-routes.js +2 -2
- package/build/src/routes/resolver.d.ts +1 -1
- package/build/src/routes/resolver.d.ts.map +1 -1
- package/build/src/routes/resolver.js +13 -13
- package/build/src/routes/resource-route.d.ts +1 -1
- package/build/src/routes/resource-route.d.ts.map +1 -1
- package/build/src/routes/resource-route.js +2 -2
- package/build/src/testing/browser-frontend-model-event-hook-scenarios.d.ts.map +1 -1
- package/build/src/testing/browser-frontend-model-event-hook-scenarios.js +8 -8
- package/build/src/testing/expect-utils.js +13 -13
- package/build/src/testing/expect.d.ts +1 -1
- package/build/src/testing/expect.d.ts.map +1 -1
- package/build/src/testing/expect.js +9 -9
- package/build/src/testing/test-files-finder.d.ts +8 -8
- package/build/src/testing/test-files-finder.d.ts.map +1 -1
- package/build/src/testing/test-files-finder.js +9 -9
- package/build/src/testing/test-filter-parser.js +3 -3
- package/build/src/testing/test-runner.d.ts +2 -2
- package/build/src/testing/test-runner.d.ts.map +1 -1
- package/build/src/testing/test-runner.js +17 -17
- package/build/src/testing/test-suite-splitter.js +2 -2
- package/build/src/testing/test.d.ts +2 -2
- package/build/src/testing/test.d.ts.map +1 -1
- package/build/src/testing/test.js +16 -16
- package/build/src/utils/backtrace-cleaner.d.ts +1 -1
- package/build/src/utils/backtrace-cleaner.d.ts.map +1 -1
- package/build/src/utils/backtrace-cleaner.js +2 -2
- package/build/src/utils/format-value.js +2 -2
- package/build/src/utils/model-scope.js +2 -2
- package/build/src/utils/ransack.js +27 -27
- package/build/src/utils/with-tracked-stack-async-hooks.js +8 -8
- package/build/src/utils/with-tracked-stack.js +4 -4
- package/build/testing/browser-frontend-model-event-hook-scenarios.js +7 -7
- package/build/testing/expect-utils.js +11 -11
- package/build/testing/expect.js +7 -7
- package/build/testing/test-files-finder.js +8 -8
- package/build/testing/test-filter-parser.js +2 -2
- package/build/testing/test-runner.js +16 -16
- package/build/testing/test-suite-splitter.js +1 -1
- package/build/testing/test.js +15 -15
- package/build/utils/backtrace-cleaner.js +1 -1
- package/build/utils/format-value.js +1 -1
- package/build/utils/model-scope.js +1 -1
- package/build/utils/ransack.js +26 -26
- package/build/utils/with-tracked-stack-async-hooks.js +7 -7
- package/build/utils/with-tracked-stack.js +3 -3
- package/package.json +2 -1
- package/src/application.js +4 -4
- package/src/authorization/ability.js +8 -8
- package/src/authorization/base-resource.js +4 -4
- package/src/background-jobs/cron-expression.js +1 -1
- package/src/background-jobs/forked-runner-child.js +1 -1
- package/src/background-jobs/job-registry.js +1 -1
- package/src/background-jobs/job-runner.js +1 -1
- package/src/background-jobs/job.js +1 -1
- package/src/background-jobs/json-socket.js +4 -4
- package/src/background-jobs/main.js +21 -21
- package/src/background-jobs/scheduler.js +7 -7
- package/src/background-jobs/store.js +7 -7
- package/src/background-jobs/web/controller.js +2 -2
- package/src/background-jobs/worker.js +12 -12
- package/src/beacon/client.js +11 -8
- package/src/beacon/in-process-broker.js +2 -2
- package/src/beacon/in-process-client.js +2 -2
- package/src/beacon/server.js +3 -3
- package/src/cli/browser-cli.js +1 -1
- package/src/cli/commands/db/base-command.js +2 -2
- package/src/cli/index.js +2 -2
- package/src/cli/tenant-database-command-helper.js +3 -3
- package/src/cli/use-browser-cli.js +1 -1
- package/src/configuration-types.js +3 -1
- package/src/configuration.js +38 -38
- package/src/controller.js +8 -8
- package/src/current-configuration.js +1 -1
- package/src/database/annotations-async-hooks.js +2 -2
- package/src/database/annotations.js +3 -3
- 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 +10 -10
- package/src/database/drivers/mssql/index.js +1 -1
- package/src/database/drivers/mssql/table.js +1 -1
- package/src/database/drivers/mysql/index.js +3 -3
- package/src/database/drivers/mysql/query.js +1 -1
- package/src/database/drivers/mysql/table.js +1 -1
- package/src/database/drivers/pgsql/index.js +2 -2
- package/src/database/drivers/sqlite/base.js +16 -16
- package/src/database/drivers/sqlite/index.js +11 -11
- package/src/database/drivers/sqlite/index.native.js +1 -1
- package/src/database/drivers/sqlite/index.web.js +3 -3
- package/src/database/drivers/sqlite/query.js +1 -1
- package/src/database/drivers/sqlite/query.web.js +1 -1
- package/src/database/drivers/sqlite/sql/alter-table.js +2 -2
- package/src/database/drivers/sqlite/table.js +1 -1
- package/src/database/migrator/files-finder.js +1 -1
- package/src/database/migrator.js +6 -6
- package/src/database/pool/async-tracked-multi-connection.js +27 -27
- package/src/database/pool/base-methods-forward.js +4 -4
- package/src/database/pool/base.js +8 -8
- package/src/database/query/from-base.js +1 -1
- package/src/database/query/index.js +10 -10
- package/src/database/query/join-object.js +3 -3
- package/src/database/query/model-class-query.js +39 -39
- package/src/database/query/preloader/belongs-to.js +22 -22
- package/src/database/query/preloader/has-many.js +20 -20
- package/src/database/query/preloader/has-one.js +8 -8
- package/src/database/query/preloader/selection.js +3 -3
- package/src/database/query/preloader.js +8 -8
- package/src/database/query/query-data.js +9 -9
- package/src/database/query/where-model-class-hash.js +7 -7
- package/src/database/query/with-count.js +9 -9
- package/src/database/record/acts-as-list.js +15 -15
- package/src/database/record/attachments/handle.js +2 -2
- package/src/database/record/attachments/normalize-input.js +12 -12
- package/src/database/record/attachments/storage-drivers/s3.js +6 -6
- package/src/database/record/attachments/store.js +13 -13
- package/src/database/record/index.js +115 -121
- package/src/database/record/instance-relationships/base.js +11 -11
- package/src/database/record/instance-relationships/belongs-to.js +3 -3
- package/src/database/record/instance-relationships/has-many.js +8 -8
- package/src/database/record/instance-relationships/has-one.js +7 -7
- package/src/database/record/relationships/base.js +2 -2
- package/src/database/record/state-machine.js +7 -7
- package/src/database/record/validators/presence.js +1 -1
- package/src/database/record/validators/uniqueness.js +5 -5
- package/src/database/table-data/index.js +4 -4
- package/src/environment-handlers/base.js +2 -2
- package/src/environment-handlers/browser.js +7 -7
- package/src/environment-handlers/node/cli/commands/cli-command-context.js +1 -1
- package/src/environment-handlers/node/cli/commands/console.js +4 -4
- package/src/environment-handlers/node/cli/commands/db/schema/dump.js +1 -1
- package/src/environment-handlers/node/cli/commands/db/schema/load.js +3 -3
- package/src/environment-handlers/node/cli/commands/generate/frontend-models.js +836 -60
- package/src/environment-handlers/node.js +6 -6
- package/src/frontend-model-controller.js +81 -82
- package/src/frontend-model-resource/base-resource.js +78 -115
- package/src/frontend-models/base.js +162 -149
- package/src/frontend-models/clear-pending-debounced-callback.js +1 -1
- package/src/frontend-models/event-hook-models.js +2 -2
- package/src/frontend-models/outgoing-event-buffer.js +2 -2
- package/src/frontend-models/preloader.js +5 -5
- package/src/frontend-models/query.js +43 -38
- package/src/frontend-models/resource-definition.js +6 -6
- package/src/frontend-models/transport-serialization.js +11 -11
- package/src/frontend-models/use-destroyed-event.js +10 -10
- package/src/frontend-models/use-model-class-event.js +11 -11
- package/src/frontend-models/use-updated-event.js +11 -11
- package/src/frontend-models/websocket-channel.js +26 -17
- package/src/frontend-models/websocket-publishers.js +9 -9
- package/src/http-client/response.js +2 -2
- package/src/http-server/client/index.js +8 -8
- package/src/http-server/client/params-to-object.js +10 -10
- package/src/http-server/client/request-buffer/form-data-part.js +2 -2
- package/src/http-server/client/request-buffer/index.js +8 -8
- package/src/http-server/client/request-parser.js +3 -3
- package/src/http-server/client/request-runner.js +6 -6
- package/src/http-server/client/request-timing.js +5 -5
- package/src/http-server/client/request.js +1 -1
- package/src/http-server/client/response.js +5 -5
- package/src/http-server/client/websocket-request.js +4 -4
- package/src/http-server/client/websocket-session.js +18 -18
- package/src/http-server/development-reloader.js +5 -5
- package/src/http-server/index.js +12 -12
- package/src/http-server/remote-address.js +4 -4
- package/src/http-server/server-client.js +3 -3
- package/src/http-server/server-lock.js +4 -4
- package/src/http-server/websocket-channel-subscribers.js +3 -3
- package/src/http-server/websocket-channel.js +1 -1
- package/src/http-server/websocket-connection.js +1 -1
- package/src/http-server/websocket-event-log-store.js +6 -6
- package/src/http-server/websocket-events-host.js +2 -2
- package/src/http-server/worker-handler/in-process.js +7 -7
- package/src/http-server/worker-handler/index.js +4 -4
- package/src/http-server/worker-handler/worker-thread.js +3 -3
- package/src/logger/outputs/array-output.js +3 -3
- package/src/logger/outputs/console-output.js +1 -1
- package/src/logger/outputs/file-output.js +4 -4
- package/src/logger/outputs/stdout-output.js +1 -1
- package/src/logger.js +10 -10
- package/src/mailer/backends/smtp.js +3 -3
- package/src/mailer/base.js +8 -8
- package/src/mailer/delivery.js +4 -4
- package/src/plugins/sqljs-wasm-route-controller.js +1 -1
- package/src/routes/base-route.js +6 -6
- package/src/routes/basic-route.js +1 -1
- package/src/routes/hooks/frontend-model-command-route-hook.js +1 -1
- package/src/routes/index.js +1 -1
- package/src/routes/plugin-routes.js +1 -1
- package/src/routes/resolver.js +11 -11
- package/src/routes/resource-route.js +1 -1
- package/src/testing/browser-frontend-model-event-hook-scenarios.js +7 -7
- package/src/testing/expect-utils.js +11 -11
- package/src/testing/expect.js +7 -7
- package/src/testing/test-files-finder.js +8 -8
- package/src/testing/test-filter-parser.js +2 -2
- package/src/testing/test-runner.js +16 -16
- package/src/testing/test-suite-splitter.js +1 -1
- package/src/testing/test.js +15 -15
- package/src/utils/backtrace-cleaner.js +1 -1
- package/src/utils/format-value.js +1 -1
- package/src/utils/model-scope.js +1 -1
- package/src/utils/ransack.js +26 -26
- package/src/utils/with-tracked-stack-async-hooks.js +7 -7
- package/src/utils/with-tracked-stack.js +3 -3
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* LoggingOutputPayload type.
|
|
5
|
-
|
|
5
|
+
* @typedef {import("../../configuration-types.js").LoggingOutputPayload} LoggingOutputPayload */
|
|
6
6
|
|
|
7
7
|
/** Logger array output. */
|
|
8
8
|
export default class LoggerArrayOutput {
|
|
9
9
|
_limit = 2000
|
|
10
10
|
/**
|
|
11
11
|
* Levels.
|
|
12
|
-
|
|
12
|
+
* @type {import("../../configuration-types.js").LogLevel[]} */
|
|
13
13
|
levels = ["debug", "info", "warn", "error"]
|
|
14
14
|
/**
|
|
15
15
|
* Logs.
|
|
16
|
-
|
|
16
|
+
* @type {LoggingOutputPayload[]} */
|
|
17
17
|
_logs = []
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* LoggingOutputPayload type.
|
|
5
|
-
|
|
5
|
+
* @typedef {import("../../configuration-types.js").LoggingOutputPayload} LoggingOutputPayload */
|
|
6
6
|
|
|
7
7
|
/** Logger console output. */
|
|
8
8
|
export default class LoggerConsoleOutput {
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* LoggingOutputPayload type.
|
|
5
|
-
|
|
5
|
+
* @typedef {import("../../configuration-types.js").LoggingOutputPayload} LoggingOutputPayload */
|
|
6
6
|
|
|
7
7
|
/** Logger file output. */
|
|
8
8
|
export default class LoggerFileOutput {
|
|
9
9
|
/**
|
|
10
10
|
* Configuration.
|
|
11
|
-
|
|
11
|
+
* @type {import("../../configuration.js").default | undefined} */
|
|
12
12
|
_configuration = undefined
|
|
13
13
|
/**
|
|
14
14
|
* File path.
|
|
15
|
-
|
|
15
|
+
* @type {string | undefined} */
|
|
16
16
|
_filePath = undefined
|
|
17
17
|
/**
|
|
18
18
|
* Get configuration.
|
|
19
|
-
|
|
19
|
+
* @type {(() => import("../../configuration.js").default | undefined) | undefined} */
|
|
20
20
|
_getConfiguration = undefined
|
|
21
21
|
|
|
22
22
|
/**
|
|
@@ -4,7 +4,7 @@ import useEnvSense from "env-sense/build/use-env-sense.js"
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* LoggingOutputPayload type.
|
|
7
|
-
|
|
7
|
+
* @typedef {import("../../configuration-types.js").LoggingOutputPayload} LoggingOutputPayload */
|
|
8
8
|
|
|
9
9
|
const {isBrowser} = useEnvSense()
|
|
10
10
|
const isNodeRuntime = typeof process !== "undefined" && Boolean(process.versions?.node)
|
package/src/logger.js
CHANGED
|
@@ -8,20 +8,20 @@ import restArgsError from "./utils/rest-args-error.js"
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* LogLevel type.
|
|
11
|
-
|
|
11
|
+
* @typedef {"debug-low-level" | "debug" | "info" | "warn" | "error"} LogLevel */
|
|
12
12
|
|
|
13
13
|
const DEFAULT_LOGGING_CONFIGURATION = {
|
|
14
14
|
console: true,
|
|
15
15
|
file: false,
|
|
16
16
|
/**
|
|
17
17
|
* Types the following value.
|
|
18
|
-
|
|
18
|
+
* @type {LogLevel[]} */
|
|
19
19
|
levels: ["info", "warn", "error"]
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Level order.
|
|
24
|
-
|
|
24
|
+
* @type {LogLevel[]} */
|
|
25
25
|
const LEVEL_ORDER = ["debug-low-level", "debug", "info", "warn", "error"]
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -190,7 +190,7 @@ function resolveLoggingOutputs({loggingConfiguration, configuration}) {
|
|
|
190
190
|
if (Array.isArray(loggingConfiguration.loggers)) {
|
|
191
191
|
/**
|
|
192
192
|
* Logger outputs.
|
|
193
|
-
|
|
193
|
+
* @type {import("./configuration-types.js").LoggingOutputConfig[]} */
|
|
194
194
|
const loggerOutputs = []
|
|
195
195
|
|
|
196
196
|
for (const logger of loggingConfiguration.loggers) {
|
|
@@ -198,7 +198,7 @@ function resolveLoggingOutputs({loggingConfiguration, configuration}) {
|
|
|
198
198
|
|
|
199
199
|
const loggerConfig = /**
|
|
200
200
|
* Types the following value.
|
|
201
|
-
|
|
201
|
+
* @type {?} */ (logger)
|
|
202
202
|
|
|
203
203
|
if (typeof loggerConfig.toOutputConfig === "function") {
|
|
204
204
|
loggerOutputs.push(loggerConfig.toOutputConfig({configuration}))
|
|
@@ -230,7 +230,7 @@ function resolveLoggingOutputs({loggingConfiguration, configuration}) {
|
|
|
230
230
|
|
|
231
231
|
/**
|
|
232
232
|
* Outputs.
|
|
233
|
-
|
|
233
|
+
* @type {import("./configuration-types.js").LoggingOutputConfig[]} */
|
|
234
234
|
const outputs = []
|
|
235
235
|
if (loggingConfiguration.console !== false) {
|
|
236
236
|
outputs.push({
|
|
@@ -319,15 +319,15 @@ async function writeLog({subject, level, messages, configuration, loggingConfigu
|
|
|
319
319
|
const writes = []
|
|
320
320
|
/**
|
|
321
321
|
* Types the following value.
|
|
322
|
-
|
|
322
|
+
* @type {Array<?> | undefined} */
|
|
323
323
|
let resolvedMessages
|
|
324
324
|
/**
|
|
325
325
|
* Types the following value.
|
|
326
|
-
|
|
326
|
+
* @type {string | undefined} */
|
|
327
327
|
let message
|
|
328
328
|
/**
|
|
329
329
|
* Payload.
|
|
330
|
-
|
|
330
|
+
* @type {import("./configuration-types.js").LoggingOutputPayload | null} */
|
|
331
331
|
let payload = null
|
|
332
332
|
|
|
333
333
|
for (const outputConfig of enabledOutputs) {
|
|
@@ -385,7 +385,7 @@ export default class Logger {
|
|
|
385
385
|
if (!this._configuration) {
|
|
386
386
|
const objectWithConfig = /**
|
|
387
387
|
* Types the following value.
|
|
388
|
-
|
|
388
|
+
* @type {{configuration?: import("./configuration.js").default}} */ (this._object)
|
|
389
389
|
this._configuration = objectWithConfig?.configuration || currentConfiguration()
|
|
390
390
|
}
|
|
391
391
|
|
|
@@ -4,7 +4,7 @@ import restArgsError from "../../utils/rest-args-error.js"
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Defines this typedef.
|
|
7
|
-
|
|
7
|
+
* @typedef {{auth?: Record<string, ?>, [key: string]: ?}} SmtpConnectionOptions */
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Runs normalize recipients.
|
|
@@ -162,9 +162,9 @@ export default class SmtpMailerBackend {
|
|
|
162
162
|
const sendMessage = () => {
|
|
163
163
|
connection.send({from: envelopeFrom, to: recipients}, /**
|
|
164
164
|
* Narrows the runtime value to the documented type.
|
|
165
|
-
|
|
165
|
+
* @type {?} */ (message), (/**
|
|
166
166
|
* Narrows the runtime value to the documented type.
|
|
167
|
-
|
|
167
|
+
* @type {Error | null | undefined} */ sendError) => {
|
|
168
168
|
if (sendError) {
|
|
169
169
|
rejectDelivery(sendError)
|
|
170
170
|
return
|
package/src/mailer/base.js
CHANGED
|
@@ -9,11 +9,11 @@ import MailerDelivery from "./delivery.js"
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Deliveries store.
|
|
12
|
-
|
|
12
|
+
* @type {import("./index.js").MailerDeliveryPayload[]} */
|
|
13
13
|
const deliveriesStore = []
|
|
14
14
|
/**
|
|
15
15
|
* Delivery handler.
|
|
16
|
-
|
|
16
|
+
* @type {((payload: import("./index.js").MailerDeliveryPayload) => Promise<?> | ?) | null} */
|
|
17
17
|
let deliveryHandler = null
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -60,9 +60,9 @@ function inferActionName(mailerClass, stack) {
|
|
|
60
60
|
if (Object.prototype.hasOwnProperty.call(VelociousMailerBase.prototype, frameActionName)) continue
|
|
61
61
|
if (typeof /**
|
|
62
62
|
* Narrows the runtime value to the documented type.
|
|
63
|
-
|
|
63
|
+
* @type {Record<string, ?>} */ (/**
|
|
64
64
|
* Narrows the runtime value to the documented type.
|
|
65
|
-
|
|
65
|
+
* @type {?} */ (prototype))[frameActionName] !== "function") continue
|
|
66
66
|
|
|
67
67
|
actionName = frameActionName
|
|
68
68
|
}
|
|
@@ -124,7 +124,7 @@ export class VelociousMailerBase {
|
|
|
124
124
|
|
|
125
125
|
const resolvedActionName = actionName || inferActionName(/**
|
|
126
126
|
* Narrows the runtime value to the documented type.
|
|
127
|
-
|
|
127
|
+
* @type {typeof VelociousMailerBase} */ (this.constructor), new Error().stack || "")
|
|
128
128
|
|
|
129
129
|
if (!resolvedActionName) {
|
|
130
130
|
throw new Error(`Missing actionName for ${this.constructor.name}.mail()`)
|
|
@@ -217,9 +217,9 @@ export class VelociousMailerBase {
|
|
|
217
217
|
const viewPath = `${configuration.getDirectory()}/src/mailers/${mailerDir}/${fileName}.ejs`
|
|
218
218
|
const translate = (/**
|
|
219
219
|
* Narrows the runtime value to the documented type.
|
|
220
|
-
|
|
220
|
+
* @type {string} */ msgID, /**
|
|
221
221
|
* Narrows the runtime value to the documented type.
|
|
222
|
-
|
|
222
|
+
* @type {Record<string, ?> | undefined} */ args) => configuration.getTranslator()(msgID, args)
|
|
223
223
|
const viewParams = incorporate({mailer: this, _: translate}, this._viewParams)
|
|
224
224
|
|
|
225
225
|
return await new Promise((resolve, reject) => {
|
|
@@ -227,7 +227,7 @@ export class VelociousMailerBase {
|
|
|
227
227
|
if (err) {
|
|
228
228
|
const errorCode = /**
|
|
229
229
|
* Narrows the runtime value to the documented type.
|
|
230
|
-
|
|
230
|
+
* @type {{code?: string}} */ (err).code
|
|
231
231
|
|
|
232
232
|
if (errorCode === "ENOENT") {
|
|
233
233
|
reject(new Error(`Missing mailer view file: ${viewPath}`))
|
package/src/mailer/delivery.js
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
export default class MailerDelivery {
|
|
7
7
|
/**
|
|
8
8
|
* Narrows the runtime value to the documented type.
|
|
9
|
-
|
|
9
|
+
* @type {import("./base.js").VelociousMailerBase} */
|
|
10
10
|
mailer
|
|
11
11
|
/**
|
|
12
12
|
* Narrows the runtime value to the documented type.
|
|
13
|
-
|
|
13
|
+
* @type {Promise<?>} */
|
|
14
14
|
actionPromise
|
|
15
15
|
/**
|
|
16
16
|
* Narrows the runtime value to the documented type.
|
|
17
|
-
|
|
17
|
+
* @type {string} */
|
|
18
18
|
actionName
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -37,7 +37,7 @@ export default class MailerDelivery {
|
|
|
37
37
|
async buildPayload() {
|
|
38
38
|
await this.actionPromise
|
|
39
39
|
|
|
40
|
-
return /**
|
|
40
|
+
return /** @type {import("./index.js").MailerDeliveryPayload} */ (await this.mailer._buildPayload())
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/**
|
|
@@ -54,7 +54,7 @@ export default class SqlJsWasmRouteController extends Controller {
|
|
|
54
54
|
} catch (error) {
|
|
55
55
|
const ensuredError = /**
|
|
56
56
|
* Narrows the runtime value to the documented type.
|
|
57
|
-
|
|
57
|
+
* @type {{code?: string}} */ (error)
|
|
58
58
|
|
|
59
59
|
if (ensuredError.code === "ENOENT") {
|
|
60
60
|
await this.render({json: {errorMessage: "Not found", status: "error"}, status: "not-found"})
|
package/src/routes/base-route.js
CHANGED
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
export default class VelociousBaseRoute {
|
|
4
4
|
/**
|
|
5
5
|
* Narrows the runtime value to the documented type.
|
|
6
|
-
|
|
6
|
+
* @type {typeof import("./get-route.js").default} */
|
|
7
7
|
static GetRouteType
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Narrows the runtime value to the documented type.
|
|
11
|
-
|
|
11
|
+
* @type {typeof import("./namespace-route.js").default} */
|
|
12
12
|
static NameSpaceRouteType
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Narrows the runtime value to the documented type.
|
|
16
|
-
|
|
16
|
+
* @type {typeof import("./post-route.js").default} */
|
|
17
17
|
static PostRouteType
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Narrows the runtime value to the documented type.
|
|
21
|
-
|
|
21
|
+
* @type {typeof import("./resource-route.js").default} */
|
|
22
22
|
static ResourceRouteType
|
|
23
23
|
|
|
24
24
|
/**
|
|
@@ -55,12 +55,12 @@ export default class VelociousBaseRoute {
|
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* Routes.
|
|
58
|
-
|
|
58
|
+
* @type {Array<VelociousBaseRoute>} */
|
|
59
59
|
routes = []
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
* Mounts.
|
|
63
|
-
|
|
63
|
+
* @type {Array<{mountable: {mountInto: (args: object) => void}, options: Record<string, ?>}>} */
|
|
64
64
|
mounts = []
|
|
65
65
|
|
|
66
66
|
constructor() {
|
|
@@ -42,7 +42,7 @@ export default class VelociousBasicRoute extends BaseRoute {
|
|
|
42
42
|
|
|
43
43
|
const at = /**
|
|
44
44
|
* Narrows the runtime value to the documented type.
|
|
45
|
-
|
|
45
|
+
* @type {Record<string, ?>} */ (options).at
|
|
46
46
|
|
|
47
47
|
if (typeof at !== "string" || !at.startsWith("/")) {
|
|
48
48
|
throw new Error(`mount requires an 'at' option starting with '/', got: ${String(at)}`)
|
|
@@ -36,7 +36,7 @@ export default async function frontendModelCommandRouteHook({configuration, curr
|
|
|
36
36
|
if (customCommandMatch) {
|
|
37
37
|
/**
|
|
38
38
|
* Params.
|
|
39
|
-
|
|
39
|
+
* @type {Record<string, ?>} */
|
|
40
40
|
const params = {
|
|
41
41
|
frontendModelCustomCommandMethodName: customCommandMatch.methodName,
|
|
42
42
|
frontendModelCustomCommandScope: customCommandMatch.scope,
|
package/src/routes/index.js
CHANGED
|
@@ -26,7 +26,7 @@ export default class VelociousRoutes {
|
|
|
26
26
|
getMounts() {
|
|
27
27
|
/**
|
|
28
28
|
* Collected.
|
|
29
|
-
|
|
29
|
+
* @type {Array<{mountable: {mountInto: (args: object) => void}, options: Record<string, ?>}>} */
|
|
30
30
|
const collected = []
|
|
31
31
|
|
|
32
32
|
/**
|
package/src/routes/resolver.js
CHANGED
|
@@ -54,7 +54,7 @@ function isMissingTargetModuleError({error, targetPath, targetImportSpecifier})
|
|
|
54
54
|
export default class VelociousRoutesResolver {
|
|
55
55
|
/**
|
|
56
56
|
* Narrows the runtime value to the documented type.
|
|
57
|
-
|
|
57
|
+
* @type {Logger | undefined} */
|
|
58
58
|
logger
|
|
59
59
|
|
|
60
60
|
/**
|
|
@@ -90,7 +90,7 @@ export default class VelociousRoutesResolver {
|
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
92
|
* Params.
|
|
93
|
-
|
|
93
|
+
* @type {Record<string, string>} */
|
|
94
94
|
const params = {}
|
|
95
95
|
const searchParams = new URLSearchParams(query)
|
|
96
96
|
|
|
@@ -181,7 +181,7 @@ export default class VelociousRoutesResolver {
|
|
|
181
181
|
const controllerClass = await this.resolveControllerClass({controllerPath})
|
|
182
182
|
const controllerRequest = /**
|
|
183
183
|
* Narrows the runtime value to the documented type.
|
|
184
|
-
|
|
184
|
+
* @type {import("../http-server/client/request.js").default} */ (this.request)
|
|
185
185
|
const controllerInstance = new controllerClass({
|
|
186
186
|
action,
|
|
187
187
|
configuration: this.configuration,
|
|
@@ -198,9 +198,9 @@ export default class VelociousRoutesResolver {
|
|
|
198
198
|
|
|
199
199
|
const actionHandlers = /**
|
|
200
200
|
* Narrows the runtime value to the documented type.
|
|
201
|
-
|
|
201
|
+
* @type {Record<string, () => void | Promise<void>>} */ (/**
|
|
202
202
|
* Narrows the runtime value to the documented type.
|
|
203
|
-
|
|
203
|
+
* @type {?} */ (controllerInstance))
|
|
204
204
|
|
|
205
205
|
const logMethod = this._logMethod()
|
|
206
206
|
|
|
@@ -262,7 +262,7 @@ export default class VelociousRoutesResolver {
|
|
|
262
262
|
|
|
263
263
|
const errorWithContext = /**
|
|
264
264
|
* Narrows the runtime value to the documented type.
|
|
265
|
-
|
|
265
|
+
* @type {{velociousContext?: object}} */ (ensuredError)
|
|
266
266
|
|
|
267
267
|
errorWithContext.velociousContext = {
|
|
268
268
|
...(errorWithContext.velociousContext || {}),
|
|
@@ -283,11 +283,11 @@ export default class VelociousRoutesResolver {
|
|
|
283
283
|
const controllerImportSpecifier = toImportSpecifier(controllerPath)
|
|
284
284
|
|
|
285
285
|
if (!this.routeHookControllerClass) {
|
|
286
|
-
return /**
|
|
286
|
+
return /** @type {typeof import("../controller.js").default} */ ((await import(controllerImportSpecifier)).default)
|
|
287
287
|
}
|
|
288
288
|
|
|
289
289
|
try {
|
|
290
|
-
return /**
|
|
290
|
+
return /** @type {typeof import("../controller.js").default} */ ((await import(controllerImportSpecifier)).default)
|
|
291
291
|
} catch (error) {
|
|
292
292
|
const isMissingControllerFileError = isMissingTargetModuleError({
|
|
293
293
|
error: ensureError(error),
|
|
@@ -297,7 +297,7 @@ export default class VelociousRoutesResolver {
|
|
|
297
297
|
|
|
298
298
|
if (!isMissingControllerFileError) throw ensureError(error)
|
|
299
299
|
|
|
300
|
-
return /**
|
|
300
|
+
return /** @type {typeof import("../controller.js").default} */ (this.routeHookControllerClass)
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
|
|
@@ -425,7 +425,7 @@ export default class VelociousRoutesResolver {
|
|
|
425
425
|
const remoteAddress = request.remoteAddress() || "unknown"
|
|
426
426
|
const loggedParams = /**
|
|
427
427
|
* Narrows the runtime value to the documented type.
|
|
428
|
-
|
|
428
|
+
* @type {Record<string, ?>} */ (this._sanitizeParamsForLogging(this.params))
|
|
429
429
|
|
|
430
430
|
delete loggedParams.action
|
|
431
431
|
delete loggedParams.controller
|
|
@@ -523,7 +523,7 @@ export default class VelociousRoutesResolver {
|
|
|
523
523
|
if (value && typeof value === "object") {
|
|
524
524
|
/**
|
|
525
525
|
* Result.
|
|
526
|
-
|
|
526
|
+
* @type {Record<string, ?>} */
|
|
527
527
|
const result = {}
|
|
528
528
|
|
|
529
529
|
for (const key of Object.keys(value)) {
|
|
@@ -20,7 +20,7 @@ class VelociousRouteResourceRoute extends BasicRoute {
|
|
|
20
20
|
this.regExp = new RegExp(`^(${escapeStringRegexp(name)})(.*)$`)
|
|
21
21
|
/**
|
|
22
22
|
* Narrows the runtime value to the documented type.
|
|
23
|
-
|
|
23
|
+
* @type {Set<string>} */
|
|
24
24
|
this.collectionRouteNames = new Set()
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -12,13 +12,13 @@ import wait from "awaitery/build/wait.js"
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* FrontendModelResourceConfig type.
|
|
15
|
-
|
|
15
|
+
* @typedef {import("../frontend-models/base.js").FrontendModelResourceConfig} FrontendModelResourceConfig */
|
|
16
16
|
/**
|
|
17
17
|
* Defines this typedef.
|
|
18
|
-
|
|
18
|
+
* @typedef {{id: string, model: FrontendModelBase}} FrontendModelHookTestCreateUpdatePayload */
|
|
19
19
|
/**
|
|
20
20
|
* Defines this typedef.
|
|
21
|
-
|
|
21
|
+
* @typedef {{id: string}} FrontendModelHookTestDestroyPayload */
|
|
22
22
|
/**
|
|
23
23
|
* FakeSubscriptions type.
|
|
24
24
|
* @typedef {object} FakeSubscriptions
|
|
@@ -251,7 +251,7 @@ async function classLifecycleScenario() {
|
|
|
251
251
|
const eventModel = buildFakeModel("1", buildFakeSubscriptions())
|
|
252
252
|
/**
|
|
253
253
|
* Received events.
|
|
254
|
-
|
|
254
|
+
* @type {Array<FrontendModelHookTestCreateUpdatePayload | FrontendModelHookTestDestroyPayload>} */
|
|
255
255
|
const receivedEvents = []
|
|
256
256
|
let connectedCount = 0
|
|
257
257
|
|
|
@@ -304,7 +304,7 @@ async function instanceLifecycleScenario() {
|
|
|
304
304
|
const model = buildFakeModel("task-1", subscriptions)
|
|
305
305
|
/**
|
|
306
306
|
* Received events.
|
|
307
|
-
|
|
307
|
+
* @type {Array<FrontendModelHookTestCreateUpdatePayload | FrontendModelHookTestDestroyPayload>} */
|
|
308
308
|
const receivedEvents = []
|
|
309
309
|
let connectedCount = 0
|
|
310
310
|
|
|
@@ -411,7 +411,7 @@ async function debounceUnmountScenario() {
|
|
|
411
411
|
const model = buildFakeModel("task-1", instanceSubscriptions)
|
|
412
412
|
/**
|
|
413
413
|
* Received events.
|
|
414
|
-
|
|
414
|
+
* @type {Array<FrontendModelHookTestCreateUpdatePayload | FrontendModelHookTestDestroyPayload>} */
|
|
415
415
|
const receivedEvents = []
|
|
416
416
|
|
|
417
417
|
/**
|
|
@@ -450,7 +450,7 @@ async function resubscribeInstanceScenario() {
|
|
|
450
450
|
const secondModel = buildFakeModel("task-1", secondSubscriptions)
|
|
451
451
|
/**
|
|
452
452
|
* Received events.
|
|
453
|
-
|
|
453
|
+
* @type {Array<FrontendModelHookTestCreateUpdatePayload | FrontendModelHookTestDestroyPayload>} */
|
|
454
454
|
const receivedEvents = []
|
|
455
455
|
|
|
456
456
|
/**
|
|
@@ -51,7 +51,7 @@ function isObjectLike(value) {
|
|
|
51
51
|
function isArrayContaining(value) {
|
|
52
52
|
return !!value && typeof value === "object" && (/**
|
|
53
53
|
* Narrows the runtime value to the documented type.
|
|
54
|
-
|
|
54
|
+
* @type {?} */ (value)).__velociousMatcher === "arrayContaining"
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
/**
|
|
@@ -62,7 +62,7 @@ function isArrayContaining(value) {
|
|
|
62
62
|
function isObjectContaining(value) {
|
|
63
63
|
return !!value && typeof value === "object" && (/**
|
|
64
64
|
* Narrows the runtime value to the documented type.
|
|
65
|
-
|
|
65
|
+
* @type {?} */ (value)).__velociousMatcher === "objectContaining"
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
/**
|
|
@@ -108,16 +108,16 @@ function collectMatchDifferences(actual, expected, path, differences) {
|
|
|
108
108
|
if (isObjectContaining(expected)) {
|
|
109
109
|
collectMatchDifferences(actual, /**
|
|
110
110
|
* Narrows the runtime value to the documented type.
|
|
111
|
-
|
|
111
|
+
* @type {?} */ (expected).value, path, differences)
|
|
112
112
|
return
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
if (isArrayContaining(expected)) {
|
|
116
116
|
const {matches} = matchArrayContaining(actual, /**
|
|
117
117
|
* Narrows the runtime value to the documented type.
|
|
118
|
-
|
|
118
|
+
* @type {Array<?>} */ (/**
|
|
119
119
|
* Narrows the runtime value to the documented type.
|
|
120
|
-
|
|
120
|
+
* @type {?} */ (expected).value))
|
|
121
121
|
|
|
122
122
|
if (!matches) {
|
|
123
123
|
differences[path || "$"] = [expected, actual]
|
|
@@ -148,10 +148,10 @@ function collectMatchDifferences(actual, expected, path, differences) {
|
|
|
148
148
|
|
|
149
149
|
const expectedObject = /**
|
|
150
150
|
* Narrows the runtime value to the documented type.
|
|
151
|
-
|
|
151
|
+
* @type {Record<string, ?>} */ (expected)
|
|
152
152
|
const actualObject = /**
|
|
153
153
|
* Narrows the runtime value to the documented type.
|
|
154
|
-
|
|
154
|
+
* @type {Record<string, ?>} */ (actual)
|
|
155
155
|
|
|
156
156
|
for (const key of Object.keys(expectedObject)) {
|
|
157
157
|
const nextPath = path ? `${path}.${key}` : key
|
|
@@ -181,7 +181,7 @@ function collectMatchDifferences(actual, expected, path, differences) {
|
|
|
181
181
|
function matchObject(actual, expected) {
|
|
182
182
|
/**
|
|
183
183
|
* Differences.
|
|
184
|
-
|
|
184
|
+
* @type {Record<string, Array<?>>} */
|
|
185
185
|
const differences = {}
|
|
186
186
|
|
|
187
187
|
collectMatchDifferences(actual, expected, "", differences)
|
|
@@ -201,7 +201,7 @@ function matchObject(actual, expected) {
|
|
|
201
201
|
function matchArrayContaining(actual, expected) {
|
|
202
202
|
/**
|
|
203
203
|
* Differences.
|
|
204
|
-
|
|
204
|
+
* @type {Record<string, Array<?>>} */
|
|
205
205
|
const differences = {}
|
|
206
206
|
|
|
207
207
|
if (!Array.isArray(actual)) {
|
|
@@ -220,7 +220,7 @@ function matchArrayContaining(actual, expected) {
|
|
|
220
220
|
if (isObjectContaining(expectedItem)) {
|
|
221
221
|
const {matches} = matchObject(actual[i], /**
|
|
222
222
|
* Narrows the runtime value to the documented type.
|
|
223
|
-
|
|
223
|
+
* @type {?} */ (expectedItem).value)
|
|
224
224
|
if (matches) {
|
|
225
225
|
matchedIndex = i
|
|
226
226
|
break
|
|
@@ -231,7 +231,7 @@ function matchArrayContaining(actual, expected) {
|
|
|
231
231
|
if (isArrayContaining(expectedItem)) {
|
|
232
232
|
const {matches} = matchArrayContaining(actual[i], /**
|
|
233
233
|
* Narrows the runtime value to the documented type.
|
|
234
|
-
|
|
234
|
+
* @type {?} */ (expectedItem).value)
|
|
235
235
|
if (matches) {
|
|
236
236
|
matchedIndex = i
|
|
237
237
|
break
|
package/src/testing/expect.js
CHANGED
|
@@ -22,7 +22,7 @@ export default class Expect extends BaseExpect {
|
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Narrows the runtime value to the documented type.
|
|
25
|
-
|
|
25
|
+
* @type {Array<Expect | ExpectToChange>} */
|
|
26
26
|
this.expectations = []
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -456,7 +456,7 @@ export default class Expect extends BaseExpect {
|
|
|
456
456
|
if (isObjectContaining(result)) {
|
|
457
457
|
const expectedValue = /**
|
|
458
458
|
* Narrows the runtime value to the documented type.
|
|
459
|
-
|
|
459
|
+
* @type {?} */ (result).value
|
|
460
460
|
const {matches, differences} = matchObject(this._object, expectedValue)
|
|
461
461
|
const objectPrint = formatValue(this._object)
|
|
462
462
|
const expectedPrint = formatValue(expectedValue)
|
|
@@ -477,9 +477,9 @@ export default class Expect extends BaseExpect {
|
|
|
477
477
|
if (isArrayContaining(result)) {
|
|
478
478
|
const expectedValue = /**
|
|
479
479
|
* Narrows the runtime value to the documented type.
|
|
480
|
-
|
|
480
|
+
* @type {Array<?>} */ (/**
|
|
481
481
|
* Narrows the runtime value to the documented type.
|
|
482
|
-
|
|
482
|
+
* @type {?} */ (result).value)
|
|
483
483
|
const {matches, differences} = matchArrayContaining(this._object, expectedValue)
|
|
484
484
|
const objectPrint = formatValue(this._object)
|
|
485
485
|
const expectedPrint = formatValue(expectedValue)
|
|
@@ -745,11 +745,11 @@ export default class Expect extends BaseExpect {
|
|
|
745
745
|
|
|
746
746
|
/**
|
|
747
747
|
* Differences.
|
|
748
|
-
|
|
748
|
+
* @type {Record<string, Array<?>>} */
|
|
749
749
|
const differences = {}
|
|
750
750
|
const objectAsRecord = /**
|
|
751
751
|
* Narrows the runtime value to the documented type.
|
|
752
|
-
|
|
752
|
+
* @type {Record<string, ?>} */ (this._object)
|
|
753
753
|
|
|
754
754
|
for (const key in result) {
|
|
755
755
|
const value = result[key]
|
|
@@ -758,7 +758,7 @@ export default class Expect extends BaseExpect {
|
|
|
758
758
|
|
|
759
759
|
const objectValue = /**
|
|
760
760
|
* Narrows the runtime value to the documented type.
|
|
761
|
-
|
|
761
|
+
* @type {() => ?} */ (objectAsRecord[key])()
|
|
762
762
|
|
|
763
763
|
if (value != objectValue) {
|
|
764
764
|
differences[key] = [value, objectValue]
|