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
|
@@ -9,25 +9,25 @@ import useModelClassEvent from "./use-model-class-event.js"
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* FrontendModelClass type.
|
|
12
|
-
|
|
12
|
+
* @typedef {import("./base.js").FrontendModelClass} FrontendModelClass */
|
|
13
13
|
/**
|
|
14
14
|
* FrontendModelInstance type.
|
|
15
|
-
|
|
15
|
+
* @typedef {import("./base.js").default} FrontendModelInstance */
|
|
16
16
|
/**
|
|
17
17
|
* FrontendModelClassUpdateEventPayload type.
|
|
18
|
-
|
|
18
|
+
* @typedef {import("./use-model-class-event.js").FrontendModelCreateUpdateEventPayload} FrontendModelClassUpdateEventPayload */
|
|
19
19
|
/**
|
|
20
20
|
* Defines this typedef.
|
|
21
|
-
|
|
21
|
+
* @typedef {{id: string, model: FrontendModelInstance}} FrontendModelInstanceUpdateEventPayload */
|
|
22
22
|
/**
|
|
23
23
|
* FrontendModelUpdateEventPayload type.
|
|
24
|
-
|
|
24
|
+
* @typedef {FrontendModelClassUpdateEventPayload | FrontendModelInstanceUpdateEventPayload} FrontendModelUpdateEventPayload */
|
|
25
25
|
/**
|
|
26
26
|
* UseUpdatedEventOptions type.
|
|
27
|
-
|
|
27
|
+
* @typedef {import("./use-model-class-event.js").UseModelClassEventOptions} UseUpdatedEventOptions */
|
|
28
28
|
/**
|
|
29
29
|
* FrontendModelUpdateEventCallback type.
|
|
30
|
-
|
|
30
|
+
* @typedef {(payload: FrontendModelUpdateEventPayload) => void} FrontendModelUpdateEventCallback */
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* Runs assert no unknown options.
|
|
@@ -72,7 +72,7 @@ export default function useUpdatedEvent(modelClassOrModels, callback, options =
|
|
|
72
72
|
useModelClassEvent(classModel, "update", (payload) => {
|
|
73
73
|
callback(/**
|
|
74
74
|
* Narrows the runtime value to the documented type.
|
|
75
|
-
|
|
75
|
+
* @type {FrontendModelClassUpdateEventPayload} */ (payload))
|
|
76
76
|
}, {active: active && Boolean(classModel), debounce, onConnected, ...projectionOptions})
|
|
77
77
|
useInstanceUpdatedEvent(instanceModels, callback, {active: active && !classModel, debounce, onConnected, ...projectionOptions})
|
|
78
78
|
}
|
|
@@ -98,7 +98,7 @@ function useInstanceUpdatedEvent(modelOrModels, callback, options) {
|
|
|
98
98
|
const eventCallback = useMemo(() => {
|
|
99
99
|
const wrappedCallback = (/**
|
|
100
100
|
* Narrows the runtime value to the documented type.
|
|
101
|
-
|
|
101
|
+
* @type {FrontendModelInstanceUpdateEventPayload} */ payload) => {
|
|
102
102
|
if (activeRef.current) callbackRef.current(payload)
|
|
103
103
|
}
|
|
104
104
|
|
|
@@ -117,11 +117,11 @@ function useInstanceUpdatedEvent(modelOrModels, callback, options) {
|
|
|
117
117
|
let closed = false
|
|
118
118
|
/**
|
|
119
119
|
* Unsubscribe callbacks.
|
|
120
|
-
|
|
120
|
+
* @type {Array<() => void>} */
|
|
121
121
|
const unsubscribeCallbacks = []
|
|
122
122
|
const subscriptionCallback = (/**
|
|
123
123
|
* Narrows the runtime value to the documented type.
|
|
124
|
-
|
|
124
|
+
* @type {FrontendModelInstanceUpdateEventPayload} */ payload) => {
|
|
125
125
|
if (!closed) eventCallback(payload)
|
|
126
126
|
}
|
|
127
127
|
|
|
@@ -41,7 +41,7 @@ const EVENT_FILTER_KEYS = new Set(["joins", "key", "searches", "where"])
|
|
|
41
41
|
export default class FrontendModelWebsocketChannel extends VelociousWebsocketChannel {
|
|
42
42
|
/**
|
|
43
43
|
* Ability.
|
|
44
|
-
|
|
44
|
+
* @type {import("../authorization/ability.js").default | null} */
|
|
45
45
|
_ability = null
|
|
46
46
|
|
|
47
47
|
/**
|
|
@@ -68,7 +68,7 @@ export default class FrontendModelWebsocketChannel extends VelociousWebsocketCha
|
|
|
68
68
|
params: {...this.params, model: modelName},
|
|
69
69
|
request: /**
|
|
70
70
|
* Narrows the runtime value to the documented type.
|
|
71
|
-
|
|
71
|
+
* @type {import("../http-server/client/request.js").default} */ (this._syntheticRequest()),
|
|
72
72
|
response: new Response({configuration})
|
|
73
73
|
})
|
|
74
74
|
|
|
@@ -88,7 +88,7 @@ export default class FrontendModelWebsocketChannel extends VelociousWebsocketCha
|
|
|
88
88
|
|
|
89
89
|
return readRules.some((/**
|
|
90
90
|
* Narrows the runtime value to the documented type.
|
|
91
|
-
|
|
91
|
+
* @type {{effect: string}} */ rule) => rule.effect === "allow")
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
/**
|
|
@@ -139,7 +139,7 @@ export default class FrontendModelWebsocketChannel extends VelociousWebsocketCha
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
if (body.action === "destroy") {
|
|
142
|
-
if (!hasEventFilters || this._hasUnfilteredEventDelivery()) this.sendMessage(body, meta)
|
|
142
|
+
if (!hasEventFilters || this._hasDestroyEventDelivery() || this._hasUnfilteredEventDelivery()) this.sendMessage(body, meta)
|
|
143
143
|
return
|
|
144
144
|
}
|
|
145
145
|
|
|
@@ -157,7 +157,7 @@ export default class FrontendModelWebsocketChannel extends VelociousWebsocketCha
|
|
|
157
157
|
|
|
158
158
|
/**
|
|
159
159
|
* Deliver body.
|
|
160
|
-
|
|
160
|
+
* @type {FrontendModelLifecycleBroadcastBody} */
|
|
161
161
|
let deliverBody = body
|
|
162
162
|
|
|
163
163
|
if (this._hasProjectionParams()) {
|
|
@@ -171,7 +171,7 @@ export default class FrontendModelWebsocketChannel extends VelociousWebsocketCha
|
|
|
171
171
|
...deliverBody,
|
|
172
172
|
record: /**
|
|
173
173
|
* Narrows the runtime value to the documented type.
|
|
174
|
-
|
|
174
|
+
* @type {import("./query.js").FrontendModelTransportValue} */ (serializeFrontendModelTransportValue(projectedRecord))
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
|
|
@@ -204,6 +204,7 @@ export default class FrontendModelWebsocketChannel extends VelociousWebsocketCha
|
|
|
204
204
|
return {
|
|
205
205
|
abilities: this.params.abilities !== undefined,
|
|
206
206
|
eventFilterCount: eventFilters.length,
|
|
207
|
+
destroyEventDelivery: this.params.destroyEventDelivery === true,
|
|
207
208
|
model: this._modelName(),
|
|
208
209
|
preload: this.params.preload !== undefined,
|
|
209
210
|
queryData: this.params.queryData !== undefined,
|
|
@@ -253,6 +254,14 @@ export default class FrontendModelWebsocketChannel extends VelociousWebsocketCha
|
|
|
253
254
|
return this.params.unfilteredEventDelivery === true
|
|
254
255
|
}
|
|
255
256
|
|
|
257
|
+
/**
|
|
258
|
+
* Runs has destroy event delivery.
|
|
259
|
+
* @returns {boolean} - Whether id-only destroy events should be delivered with event filters.
|
|
260
|
+
*/
|
|
261
|
+
_hasDestroyEventDelivery() {
|
|
262
|
+
return this.params.destroyEventDelivery === true
|
|
263
|
+
}
|
|
264
|
+
|
|
256
265
|
/**
|
|
257
266
|
* Runs event filters.
|
|
258
267
|
* @returns {import("./query.js").FrontendModelEventFilterPayloadEntry[]} - Valid event filters.
|
|
@@ -270,7 +279,7 @@ export default class FrontendModelWebsocketChannel extends VelociousWebsocketCha
|
|
|
270
279
|
|
|
271
280
|
const eventFilter = /**
|
|
272
281
|
* Narrows the runtime value to the documented type.
|
|
273
|
-
|
|
282
|
+
* @type {Record<string, ?>} */ (entry)
|
|
274
283
|
const unknownKeys = Object.keys(eventFilter).filter((key) => !EVENT_FILTER_KEYS.has(key))
|
|
275
284
|
|
|
276
285
|
if (unknownKeys.length > 0) {
|
|
@@ -283,25 +292,25 @@ export default class FrontendModelWebsocketChannel extends VelociousWebsocketCha
|
|
|
283
292
|
|
|
284
293
|
/**
|
|
285
294
|
* Sanitized event filter.
|
|
286
|
-
|
|
295
|
+
* @type {import("./query.js").FrontendModelEventFilterPayloadEntry} */
|
|
287
296
|
const sanitizedEventFilter = {key: eventFilter.key}
|
|
288
297
|
|
|
289
298
|
if (eventFilter.joins !== undefined) {
|
|
290
299
|
sanitizedEventFilter.joins = /**
|
|
291
300
|
* Narrows the runtime value to the documented type.
|
|
292
|
-
|
|
301
|
+
* @type {Record<string, import("./query.js").FrontendModelTransportValue>} */ (eventFilter.joins)
|
|
293
302
|
}
|
|
294
303
|
|
|
295
304
|
if (eventFilter.searches !== undefined) {
|
|
296
305
|
sanitizedEventFilter.searches = /**
|
|
297
306
|
* Narrows the runtime value to the documented type.
|
|
298
|
-
|
|
307
|
+
* @type {import("./query.js").FrontendModelSearch[]} */ (eventFilter.searches)
|
|
299
308
|
}
|
|
300
309
|
|
|
301
310
|
if (eventFilter.where !== undefined) {
|
|
302
311
|
sanitizedEventFilter.where = /**
|
|
303
312
|
* Narrows the runtime value to the documented type.
|
|
304
|
-
|
|
313
|
+
* @type {Record<string, import("./query.js").FrontendModelTransportValue>} */ (eventFilter.where)
|
|
305
314
|
}
|
|
306
315
|
|
|
307
316
|
return sanitizedEventFilter
|
|
@@ -346,7 +355,7 @@ export default class FrontendModelWebsocketChannel extends VelociousWebsocketCha
|
|
|
346
355
|
},
|
|
347
356
|
request: /**
|
|
348
357
|
* Narrows the runtime value to the documented type.
|
|
349
|
-
|
|
358
|
+
* @type {import("../http-server/client/request.js").default} */ (this._syntheticRequest()),
|
|
350
359
|
response: new Response({configuration}),
|
|
351
360
|
viewPath: "/"
|
|
352
361
|
})
|
|
@@ -384,7 +393,7 @@ export default class FrontendModelWebsocketChannel extends VelociousWebsocketCha
|
|
|
384
393
|
async _matchedEventFilterKeysForEventId(id, FrontendModelController) {
|
|
385
394
|
/**
|
|
386
395
|
* Matched event filter keys.
|
|
387
|
-
|
|
396
|
+
* @type {string[]} */
|
|
388
397
|
const matchedEventFilterKeys = []
|
|
389
398
|
|
|
390
399
|
for (const eventFilter of this._eventFilters()) {
|
|
@@ -458,14 +467,14 @@ export default class FrontendModelWebsocketChannel extends VelociousWebsocketCha
|
|
|
458
467
|
for (const entry of controller.frontendModelWithCount()) {
|
|
459
468
|
/**
|
|
460
469
|
* Spec.
|
|
461
|
-
|
|
470
|
+
* @type {Record<string, boolean | {relationship?: string, where?: Record<string, import("./query.js").FrontendModelTransportValue>}>} */
|
|
462
471
|
const spec = {}
|
|
463
472
|
|
|
464
473
|
spec[entry.attributeName] = {
|
|
465
474
|
relationship: entry.relationshipName,
|
|
466
475
|
where: entry.where ? /**
|
|
467
476
|
* Narrows the runtime value to the documented type.
|
|
468
|
-
|
|
477
|
+
* @type {Record<string, import("./query.js").FrontendModelTransportValue>} */ (entry.where) : undefined
|
|
469
478
|
}
|
|
470
479
|
query.withCount(spec)
|
|
471
480
|
}
|
|
@@ -504,13 +513,13 @@ export default class FrontendModelWebsocketChannel extends VelociousWebsocketCha
|
|
|
504
513
|
_syntheticRequest() {
|
|
505
514
|
const upgradeRequest = /**
|
|
506
515
|
* Narrows the runtime value to the documented type.
|
|
507
|
-
|
|
516
|
+
* @type {FrontendModelWebsocketUpgradeRequest} */ (this.session.upgradeRequest)
|
|
508
517
|
const rawHeaders = typeof upgradeRequest?.headers === "function" ? upgradeRequest.headers() : {}
|
|
509
518
|
const metadata = typeof this.session.getMetadata === "function" ? this.session.getMetadata() : {}
|
|
510
519
|
const remoteAddress = typeof upgradeRequest?.remoteAddress === "function" ? upgradeRequest.remoteAddress() : undefined
|
|
511
520
|
/**
|
|
512
521
|
* Header map.
|
|
513
|
-
|
|
522
|
+
* @type {Record<string, string | string[] | undefined>} */
|
|
514
523
|
const headerMap = {}
|
|
515
524
|
|
|
516
525
|
for (const key of Object.keys(rawHeaders || {})) {
|
|
@@ -44,9 +44,9 @@ async function resolveAbilityResourcesList(configuration) {
|
|
|
44
44
|
if (typeof resolver === "function") {
|
|
45
45
|
const ability = await resolver({configuration, params: {}, request: /**
|
|
46
46
|
* Narrows the runtime value to the documented type.
|
|
47
|
-
|
|
47
|
+
* @type {?} */ (undefined), response: /**
|
|
48
48
|
* Narrows the runtime value to the documented type.
|
|
49
|
-
|
|
49
|
+
* @type {?} */ (undefined)})
|
|
50
50
|
|
|
51
51
|
if (ability?.resources && Array.isArray(ability.resources)) {
|
|
52
52
|
return ability.resources
|
|
@@ -64,7 +64,7 @@ async function resolveAbilityResourcesList(configuration) {
|
|
|
64
64
|
function frontendModelResourcesFromAbilityResourcesList(abilityResources) {
|
|
65
65
|
/**
|
|
66
66
|
* Resources.
|
|
67
|
-
|
|
67
|
+
* @type {Record<string, import("../configuration-types.js").FrontendModelResourceClassType>} */
|
|
68
68
|
const resources = {}
|
|
69
69
|
|
|
70
70
|
if (!abilityResources || abilityResources.length === 0) return resources
|
|
@@ -81,7 +81,7 @@ function frontendModelResourcesFromAbilityResourcesList(abilityResources) {
|
|
|
81
81
|
if (resourceClass.prototype instanceof FrontendModelBaseResource) {
|
|
82
82
|
const modelClass = /**
|
|
83
83
|
* Narrows the runtime value to the documented type.
|
|
84
|
-
|
|
84
|
+
* @type {import("../configuration-types.js").FrontendModelResourceClassType} */ (resourceClass).ModelClass
|
|
85
85
|
|
|
86
86
|
if (!modelClass) {
|
|
87
87
|
throw new Error(`Resource class ${resourceClass.name} is missing a static ModelClass property`)
|
|
@@ -95,7 +95,7 @@ function frontendModelResourcesFromAbilityResourcesList(abilityResources) {
|
|
|
95
95
|
|
|
96
96
|
resources[modelName] = /**
|
|
97
97
|
* Narrows the runtime value to the documented type.
|
|
98
|
-
|
|
98
|
+
* @type {import("../configuration-types.js").FrontendModelResourceClassType} */ (resourceClass)
|
|
99
99
|
} else if (resourceClass.prototype instanceof AuthorizationBaseResource) {
|
|
100
100
|
// Authorization-only resource — valid but not relevant for WebSocket publishing
|
|
101
101
|
} else {
|
|
@@ -116,7 +116,7 @@ export async function ensureFrontendModelWebsocketPublishersRegistered(configura
|
|
|
116
116
|
|
|
117
117
|
/**
|
|
118
118
|
* All frontend models.
|
|
119
|
-
|
|
119
|
+
* @type {Record<string, import("../configuration-types.js").FrontendModelResourceClassType>} */
|
|
120
120
|
let allFrontendModels = {}
|
|
121
121
|
|
|
122
122
|
for (const backendProject of configuration.getBackendProjects()) {
|
|
@@ -161,19 +161,19 @@ export async function ensureFrontendModelWebsocketPublishersRegistered(configura
|
|
|
161
161
|
modelClass.beforeCreate((model) => {
|
|
162
162
|
/**
|
|
163
163
|
* Narrows the runtime value to the documented type.
|
|
164
|
-
|
|
164
|
+
* @type {import("../database/record/index.js").default & {__frontendModelWebsocketAction?: "create" | "update"}} */ (model).__frontendModelWebsocketAction = "create"
|
|
165
165
|
})
|
|
166
166
|
|
|
167
167
|
modelClass.beforeUpdate((model) => {
|
|
168
168
|
/**
|
|
169
169
|
* Narrows the runtime value to the documented type.
|
|
170
|
-
|
|
170
|
+
* @type {import("../database/record/index.js").default & {__frontendModelWebsocketAction?: "create" | "update"}} */ (model).__frontendModelWebsocketAction = "update"
|
|
171
171
|
})
|
|
172
172
|
|
|
173
173
|
modelClass.afterSave((model) => {
|
|
174
174
|
const modelWithWebsocketAction = /**
|
|
175
175
|
* Narrows the runtime value to the documented type.
|
|
176
|
-
|
|
176
|
+
* @type {import("../database/record/index.js").default & {__frontendModelWebsocketAction?: "create" | "update"}} */ (model)
|
|
177
177
|
const action = modelWithWebsocketAction.__frontendModelWebsocketAction
|
|
178
178
|
|
|
179
179
|
if (action !== "create" && action !== "update") return
|
|
@@ -15,7 +15,7 @@ export default class Response {
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Narrows the runtime value to the documented type.
|
|
18
|
-
|
|
18
|
+
* @type {Header[]} */
|
|
19
19
|
this.headers = []
|
|
20
20
|
|
|
21
21
|
this.method = method.toUpperCase().trim()
|
|
@@ -24,7 +24,7 @@ export default class Response {
|
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Narrows the runtime value to the documented type.
|
|
27
|
-
|
|
27
|
+
* @type {Buffer} */
|
|
28
28
|
this.response = Buffer.alloc(0);
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -56,7 +56,7 @@ export default class VeoliciousHttpServerClient {
|
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
58
|
* Narrows the runtime value to the documented type.
|
|
59
|
-
|
|
59
|
+
* @type {RequestRunner[]} */
|
|
60
60
|
this.requestRunners = []
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -110,12 +110,12 @@ export default class VeoliciousHttpServerClient {
|
|
|
110
110
|
handleBadRequest(error) {
|
|
111
111
|
this.logger.warn(() => ["Failed to parse HTTP request", badRequestDetails(/**
|
|
112
112
|
* Narrows the runtime value to the documented type.
|
|
113
|
-
|
|
113
|
+
* @type {Error & {velociousContext?: Record<string, ?>}} */ (error))])
|
|
114
114
|
|
|
115
115
|
if (this.currentRequest && "getRequestParser" in this.currentRequest) {
|
|
116
116
|
const httpRequest = /**
|
|
117
117
|
* Narrows the runtime value to the documented type.
|
|
118
|
-
|
|
118
|
+
* @type {import("./request.js").default} */ (this.currentRequest)
|
|
119
119
|
|
|
120
120
|
httpRequest.getRequestParser().destroy()
|
|
121
121
|
}
|
|
@@ -179,7 +179,7 @@ export default class VeoliciousHttpServerClient {
|
|
|
179
179
|
try {
|
|
180
180
|
/**
|
|
181
181
|
* Remaining.
|
|
182
|
-
|
|
182
|
+
* @type {Buffer | undefined} */
|
|
183
183
|
let remaining = data
|
|
184
184
|
|
|
185
185
|
while (remaining) {
|
|
@@ -281,16 +281,16 @@ export default class VeoliciousHttpServerClient {
|
|
|
281
281
|
|
|
282
282
|
const resolvedThenable = /**
|
|
283
283
|
* Narrows the runtime value to the documented type.
|
|
284
|
-
|
|
284
|
+
* @type {{then?: (...args: Array<?>) => ?}} */ (resolvedHandler)
|
|
285
285
|
|
|
286
286
|
if (resolvedThenable?.then) {
|
|
287
287
|
messageHandlerPromise = /**
|
|
288
288
|
* Narrows the runtime value to the documented type.
|
|
289
|
-
|
|
289
|
+
* @type {Promise<import("../../configuration-types.js").WebsocketMessageHandler | void>} */ (resolvedHandler)
|
|
290
290
|
} else if (resolvedHandler) {
|
|
291
291
|
messageHandler = /**
|
|
292
292
|
* Narrows the runtime value to the documented type.
|
|
293
|
-
|
|
293
|
+
* @type {import("../../configuration-types.js").WebsocketMessageHandler} */ (resolvedHandler)
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
|
|
@@ -445,7 +445,7 @@ export default class VeoliciousHttpServerClient {
|
|
|
445
445
|
if ("getRequestParser" in request) {
|
|
446
446
|
const httpRequest = /**
|
|
447
447
|
* Narrows the runtime value to the documented type.
|
|
448
|
-
|
|
448
|
+
* @type {import("./request.js").default} */ (request)
|
|
449
449
|
httpRequest.getRequestParser().destroy()
|
|
450
450
|
}
|
|
451
451
|
}
|
|
@@ -12,7 +12,7 @@ function malformedNestedParamsKeyError(args) {
|
|
|
12
12
|
const error = new Error(`Could not parse nested params key "${key}" at rest "${rest}"`)
|
|
13
13
|
/**
|
|
14
14
|
* Typed error.
|
|
15
|
-
|
|
15
|
+
* @type {Error & {velociousContext?: Record<string, ?>}} */
|
|
16
16
|
const typedError = error
|
|
17
17
|
|
|
18
18
|
typedError.velociousContext = {
|
|
@@ -42,7 +42,7 @@ export default class ParamsToObject {
|
|
|
42
42
|
toObject() {
|
|
43
43
|
/**
|
|
44
44
|
* Result.
|
|
45
|
-
|
|
45
|
+
* @type {Record<string, ?>} */
|
|
46
46
|
const result = {}
|
|
47
47
|
|
|
48
48
|
for(const key in this.object) {
|
|
@@ -70,16 +70,16 @@ export default class ParamsToObject {
|
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* Defines newResult.
|
|
73
|
-
|
|
73
|
+
* @type {Array<?> | Record<string, ?>} */
|
|
74
74
|
let newResult
|
|
75
75
|
const objectResult = /**
|
|
76
76
|
* Narrows the runtime value to the documented type.
|
|
77
|
-
|
|
77
|
+
* @type {Record<string, ?>} */ (result)
|
|
78
78
|
|
|
79
79
|
if (inputName in objectResult) {
|
|
80
80
|
newResult = /**
|
|
81
81
|
* Narrows the runtime value to the documented type.
|
|
82
|
-
|
|
82
|
+
* @type {Array<?> | Record<string, ?>} */ (objectResult[inputName])
|
|
83
83
|
} else if (rest == "[]") {
|
|
84
84
|
newResult = []
|
|
85
85
|
objectResult[inputName] = newResult
|
|
@@ -92,7 +92,7 @@ export default class ParamsToObject {
|
|
|
92
92
|
} else {
|
|
93
93
|
const objectResult = /**
|
|
94
94
|
* Narrows the runtime value to the documented type.
|
|
95
|
-
|
|
95
|
+
* @type {Record<string, ?>} */ (result)
|
|
96
96
|
|
|
97
97
|
objectResult[key] = value
|
|
98
98
|
}
|
|
@@ -116,7 +116,7 @@ export default class ParamsToObject {
|
|
|
116
116
|
|
|
117
117
|
/**
|
|
118
118
|
* Defines newResult.
|
|
119
|
-
|
|
119
|
+
* @type {Array<?> | Record<string, ?>} */
|
|
120
120
|
let newResult
|
|
121
121
|
|
|
122
122
|
if (rest == "[]") {
|
|
@@ -128,16 +128,16 @@ export default class ParamsToObject {
|
|
|
128
128
|
} else if (newRest == "") {
|
|
129
129
|
/**
|
|
130
130
|
* Narrows the runtime value to the documented type.
|
|
131
|
-
|
|
131
|
+
* @type {Record<string, ?>} */ (result)[key] = value
|
|
132
132
|
} else {
|
|
133
133
|
const objectResult = /**
|
|
134
134
|
* Narrows the runtime value to the documented type.
|
|
135
|
-
|
|
135
|
+
* @type {Record<string, ?>} */ (result)
|
|
136
136
|
|
|
137
137
|
if (!Array.isArray(result) && key in objectResult) {
|
|
138
138
|
newResult = /**
|
|
139
139
|
* Narrows the runtime value to the documented type.
|
|
140
|
-
|
|
140
|
+
* @type {Array<?> | Record<string, ?>} */ (objectResult[key])
|
|
141
141
|
} else if (newRest == "[]") {
|
|
142
142
|
newResult = []
|
|
143
143
|
objectResult[key] = newResult
|
|
@@ -14,12 +14,12 @@ export default class FormDataPart {
|
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Headers.
|
|
17
|
-
|
|
17
|
+
* @type {Record<string, import("./header.js").default>} */
|
|
18
18
|
headers = {}
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Body.
|
|
22
|
-
|
|
22
|
+
* @type {number[]} */
|
|
23
23
|
body = []
|
|
24
24
|
|
|
25
25
|
/**
|
|
@@ -26,18 +26,18 @@ export default class RequestBuffer {
|
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Data.
|
|
29
|
-
|
|
29
|
+
* @type {number[]} */
|
|
30
30
|
data = []
|
|
31
31
|
|
|
32
32
|
events = new EventEmitter()
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
* Headers by name.
|
|
36
|
-
|
|
36
|
+
* @type {Record<string, Header>} */
|
|
37
37
|
headersByName = {}
|
|
38
38
|
/**
|
|
39
39
|
* Chunked body chars.
|
|
40
|
-
|
|
40
|
+
* @type {number[] | undefined} */
|
|
41
41
|
chunkedBodyChars = undefined
|
|
42
42
|
|
|
43
43
|
multiPartyFormData = false
|
|
@@ -98,7 +98,7 @@ export default class RequestBuffer {
|
|
|
98
98
|
chunkedBodyChars.push(char)
|
|
99
99
|
/**
|
|
100
100
|
* Current chunk bytes read.
|
|
101
|
-
|
|
101
|
+
* @type {number} */
|
|
102
102
|
const currentChunkBytesRead = (this.currentChunkBytesRead || 0) + 1
|
|
103
103
|
|
|
104
104
|
this.currentChunkBytesRead = currentChunkBytesRead
|
|
@@ -196,7 +196,7 @@ export default class RequestBuffer {
|
|
|
196
196
|
getHeadersHash() {
|
|
197
197
|
/**
|
|
198
198
|
* Result.
|
|
199
|
-
|
|
199
|
+
* @type {Record<string, string>} */
|
|
200
200
|
const result = {}
|
|
201
201
|
|
|
202
202
|
for (const headerFormattedName in this.headersByName) {
|
|
@@ -347,7 +347,7 @@ export default class RequestBuffer {
|
|
|
347
347
|
} else {
|
|
348
348
|
/**
|
|
349
349
|
* Narrows the runtime value to the documented type.
|
|
350
|
-
|
|
350
|
+
* @type {number[]} */
|
|
351
351
|
this.postBodyChars = []
|
|
352
352
|
|
|
353
353
|
// this.postBodyBuffer = new ArrayBuffer(this.contentLength)
|
|
@@ -498,7 +498,7 @@ export default class RequestBuffer {
|
|
|
498
498
|
const parsedQuery = querystring.parse(this.postBody)
|
|
499
499
|
/**
|
|
500
500
|
* Unparsed params.
|
|
501
|
-
|
|
501
|
+
* @type {Record<string, string | string[]>} */
|
|
502
502
|
const unparsedParams = {}
|
|
503
503
|
|
|
504
504
|
for (const [key, value] of Object.entries(parsedQuery)) {
|
|
@@ -514,7 +514,7 @@ export default class RequestBuffer {
|
|
|
514
514
|
} catch (error) {
|
|
515
515
|
const ensuredError = /**
|
|
516
516
|
* Narrows the runtime value to the documented type.
|
|
517
|
-
|
|
517
|
+
* @type {Error & {velociousContext?: Record<string, ?>}} */ (error)
|
|
518
518
|
|
|
519
519
|
ensuredError.velociousContext = {
|
|
520
520
|
...(ensuredError.velociousContext || {}),
|
|
@@ -21,7 +21,7 @@ export default class VelociousHttpServerClientRequestParser {
|
|
|
21
21
|
this.hasCompleted = false
|
|
22
22
|
/**
|
|
23
23
|
* Narrows the runtime value to the documented type.
|
|
24
|
-
|
|
24
|
+
* @type {Record<string, string | string[] | undefined | Record<string, ?> | Array<?>>} */
|
|
25
25
|
this.params = {}
|
|
26
26
|
|
|
27
27
|
this.requestBuffer = new RequestBuffer({configuration})
|
|
@@ -49,7 +49,7 @@ export default class VelociousHttpServerClientRequestParser {
|
|
|
49
49
|
onFormDataPart = (formDataPart) => {
|
|
50
50
|
/**
|
|
51
51
|
* Unordered params.
|
|
52
|
-
|
|
52
|
+
* @type {Record<string, string | string[] | import("./uploaded-file/uploaded-file.js").default>} */
|
|
53
53
|
const unorderedParams = {}
|
|
54
54
|
|
|
55
55
|
unorderedParams[formDataPart.getName()] = formDataPart.getValue()
|
|
@@ -62,7 +62,7 @@ export default class VelociousHttpServerClientRequestParser {
|
|
|
62
62
|
} catch (error) {
|
|
63
63
|
const ensuredError = /**
|
|
64
64
|
* Narrows the runtime value to the documented type.
|
|
65
|
-
|
|
65
|
+
* @type {Error & {velociousContext?: Record<string, ?>}} */ (error)
|
|
66
66
|
|
|
67
67
|
ensuredError.velociousContext = {
|
|
68
68
|
...(ensuredError.velociousContext || {}),
|
|
@@ -32,10 +32,10 @@ function requestErrorSummary(error, cleanedStackWithHeader) {
|
|
|
32
32
|
|
|
33
33
|
const errorCode = typeof /**
|
|
34
34
|
* Narrows the runtime value to the documented type.
|
|
35
|
-
|
|
35
|
+
* @type {?} */ (error).code === "string"
|
|
36
36
|
? /**
|
|
37
37
|
* Narrows the runtime value to the documented type.
|
|
38
|
-
|
|
38
|
+
* @type {?} */ (error).code
|
|
39
39
|
: undefined
|
|
40
40
|
const errorMessage = error.message || String(error)
|
|
41
41
|
|
|
@@ -182,17 +182,17 @@ export default class VelociousHttpServerClientRequestRunner {
|
|
|
182
182
|
const startTimeMs = Date.now()
|
|
183
183
|
/**
|
|
184
184
|
* Defines timeoutId.
|
|
185
|
-
|
|
185
|
+
* @type {ReturnType<typeof setTimeout> | undefined} */
|
|
186
186
|
let timeoutId
|
|
187
187
|
/**
|
|
188
188
|
* Defines timeoutReject.
|
|
189
|
-
|
|
189
|
+
* @type {((error: Error) => void) | undefined} */
|
|
190
190
|
let timeoutReject
|
|
191
191
|
let timedOut = false
|
|
192
192
|
|
|
193
193
|
const setRequestTimeoutSeconds = (/**
|
|
194
194
|
* Narrows the runtime value to the documented type.
|
|
195
|
-
|
|
195
|
+
* @type {number | undefined} */ timeoutSeconds) => {
|
|
196
196
|
if (timeoutId) {
|
|
197
197
|
clearTimeout(timeoutId)
|
|
198
198
|
timeoutId = undefined
|
|
@@ -257,7 +257,7 @@ export default class VelociousHttpServerClientRequestRunner {
|
|
|
257
257
|
const error = ensureError(e)
|
|
258
258
|
const errorWithContext = /**
|
|
259
259
|
* Narrows the runtime value to the documented type.
|
|
260
|
-
|
|
260
|
+
* @type {{velociousContext?: object}} */ (error)
|
|
261
261
|
const errorContext = errorWithContext.velociousContext || {stage: "request-runner"}
|
|
262
262
|
const logDetails = requestErrorLogDetails(error)
|
|
263
263
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
export default class RequestTiming {
|
|
18
18
|
/**
|
|
19
19
|
* Buckets.
|
|
20
|
-
|
|
20
|
+
* @type {Record<RequestTimingBucket, number>} */
|
|
21
21
|
buckets = {
|
|
22
22
|
controller: 0,
|
|
23
23
|
db: 0,
|
|
@@ -26,21 +26,21 @@ export default class RequestTiming {
|
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Bucket stack.
|
|
29
|
-
|
|
29
|
+
* @type {ActiveTimingBucket[]} */
|
|
30
30
|
bucketStack = []
|
|
31
31
|
|
|
32
32
|
dbQueryCount = 0
|
|
33
33
|
/**
|
|
34
34
|
* Completed log method.
|
|
35
|
-
|
|
35
|
+
* @type {"debug" | "info" | undefined} */
|
|
36
36
|
completedLogMethod = undefined
|
|
37
37
|
/**
|
|
38
38
|
* Completed log subject.
|
|
39
|
-
|
|
39
|
+
* @type {string | undefined} */
|
|
40
40
|
completedLogSubject = undefined
|
|
41
41
|
/**
|
|
42
42
|
* Response served at ms.
|
|
43
|
-
|
|
43
|
+
* @type {number | undefined} */
|
|
44
44
|
responseServedAtMs = undefined
|
|
45
45
|
startedAtMs = Date.now()
|
|
46
46
|
|
|
@@ -88,7 +88,7 @@ export default class VelociousHttpServerClientRequest {
|
|
|
88
88
|
const parsed = querystring.parse(query)
|
|
89
89
|
/**
|
|
90
90
|
* Params.
|
|
91
|
-
|
|
91
|
+
* @type {Record<string, string | string[]>} */
|
|
92
92
|
const params = Object.create(null)
|
|
93
93
|
|
|
94
94
|
for (const [key, value] of Object.entries(parsed)) {
|