velocious 1.0.448 → 1.0.450
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/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.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 +127 -128
- 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/base-models.js +1 -16
- package/build/environment-handlers/node/cli/commands/generate/frontend-models.js +179 -89
- package/build/environment-handlers/node.js +6 -6
- package/build/frontend-model-controller.js +90 -82
- package/build/frontend-model-resource/base-resource.js +343 -167
- package/build/frontend-models/base.js +362 -205
- 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 +8 -7
- 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-record.d.ts +2 -1
- package/build/src/background-jobs/job-record.d.ts.map +1 -1
- 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.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.d.ts +2 -2
- package/build/src/database/query/preloader/belongs-to.d.ts.map +1 -1
- package/build/src/database/query/preloader/belongs-to.js +23 -23
- package/build/src/database/query/preloader/has-many.d.ts +1 -1
- package/build/src/database/query/preloader/has-many.d.ts.map +1 -1
- package/build/src/database/query/preloader/has-many.js +21 -21
- package/build/src/database/query/preloader/has-one.d.ts +2 -2
- package/build/src/database/query/preloader/has-one.d.ts.map +1 -1
- 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.d.ts +1 -1
- package/build/src/database/query/preloader.d.ts.map +1 -1
- 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 +2 -2
- 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 +35 -32
- package/build/src/database/record/index.d.ts.map +1 -1
- package/build/src/database/record/index.js +147 -148
- 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/base-models.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/generate/base-models.js +2 -15
- package/build/src/environment-handlers/node/cli/commands/generate/frontend-models.d.ts +105 -33
- 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 +172 -87
- 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 +95 -89
- package/build/src/frontend-model-resource/base-resource.d.ts +239 -91
- package/build/src/frontend-model-resource/base-resource.d.ts.map +1 -1
- package/build/src/frontend-model-resource/base-resource.js +302 -172
- package/build/src/frontend-models/base.d.ts +186 -115
- package/build/src/frontend-models/base.d.ts.map +1 -1
- package/build/src/frontend-models/base.js +347 -218
- 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.d.ts.map +1 -1
- package/build/src/frontend-models/preloader.js +9 -8
- 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 +9 -9
- package/build/src/testing/expect-utils.js +13 -13
- package/build/src/testing/expect.d.ts +7 -1
- package/build/src/testing/expect.d.ts.map +1 -1
- package/build/src/testing/expect.js +17 -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 +8 -8
- package/build/testing/expect-utils.js +11 -11
- package/build/testing/expect.js +16 -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.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 +127 -128
- 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/base-models.js +1 -16
- package/src/environment-handlers/node/cli/commands/generate/frontend-models.js +179 -89
- package/src/environment-handlers/node.js +6 -6
- package/src/frontend-model-controller.js +90 -82
- package/src/frontend-model-resource/base-resource.js +343 -167
- package/src/frontend-models/base.js +362 -205
- 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 +8 -7
- 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 +8 -8
- package/src/testing/expect-utils.js +11 -11
- package/src/testing/expect.js +16 -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
package/build/application.js
CHANGED
|
@@ -9,7 +9,7 @@ import restArgsError from "./utils/rest-args-error.js"
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* HttpServerConfiguration type.
|
|
12
|
-
|
|
12
|
+
* @typedef {import("./configuration-types.js").HttpServerConfiguration} HttpServerConfiguration */
|
|
13
13
|
|
|
14
14
|
export default class VelociousApplication {
|
|
15
15
|
/**
|
|
@@ -28,14 +28,14 @@ export default class VelociousApplication {
|
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Stores the http server configuration value.
|
|
31
|
-
|
|
31
|
+
* @type {HttpServerConfiguration} */
|
|
32
32
|
this.httpServerConfiguration = httpServer ?? {}
|
|
33
33
|
|
|
34
34
|
this.logger = new Logger(this)
|
|
35
35
|
this._type = type
|
|
36
36
|
/**
|
|
37
37
|
* Stores the http server lock value.
|
|
38
|
-
|
|
38
|
+
* @type {HttpServerLock | undefined} */
|
|
39
39
|
this.httpServerLock = undefined
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -121,7 +121,7 @@ export default class VelociousApplication {
|
|
|
121
121
|
if (!configuration.getWebsocketEvents()) {
|
|
122
122
|
configuration.setWebsocketEvents(/**
|
|
123
123
|
* Types the following value.
|
|
124
|
-
|
|
124
|
+
* @type {?} */ (websocketEventsHost))
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
await configuration.connectBeacon({peerType: "server"})
|
|
@@ -19,27 +19,27 @@
|
|
|
19
19
|
export default class VelociousAuthorizationAbility {
|
|
20
20
|
/**
|
|
21
21
|
* Create.
|
|
22
|
-
|
|
22
|
+
* @type {string[]} */
|
|
23
23
|
static CREATE = ["create"]
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Read.
|
|
27
|
-
|
|
27
|
+
* @type {string[]} */
|
|
28
28
|
static READ = ["read"]
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Update.
|
|
32
|
-
|
|
32
|
+
* @type {string[]} */
|
|
33
33
|
static UPDATE = ["update"]
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* Destroy.
|
|
37
|
-
|
|
37
|
+
* @type {string[]} */
|
|
38
38
|
static DESTROY = ["destroy"]
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* Crud.
|
|
42
|
-
|
|
42
|
+
* @type {string[]} */
|
|
43
43
|
static CRUD = ["create", "read", "update", "destroy"]
|
|
44
44
|
|
|
45
45
|
/**
|
|
@@ -56,12 +56,12 @@ export default class VelociousAuthorizationAbility {
|
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
58
|
* Narrows the runtime value to the documented type.
|
|
59
|
-
|
|
59
|
+
* @type {AbilityRuleType[]} */
|
|
60
60
|
this.rules = []
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
* Narrows the runtime value to the documented type.
|
|
64
|
-
|
|
64
|
+
* @type {Record<string, boolean>} */
|
|
65
65
|
this.loadedModelClassAbilities = {}
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -78,7 +78,7 @@ export default class VelociousAuthorizationAbility {
|
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* Resolved.
|
|
81
|
-
|
|
81
|
+
* @type {Array<typeof import("./base-resource.js").default>} */
|
|
82
82
|
const resolved = []
|
|
83
83
|
const backendProjects = configuration.getBackendProjects()
|
|
84
84
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
export default class AuthorizationBaseResource {
|
|
5
5
|
/**
|
|
6
6
|
* Model class.
|
|
7
|
-
|
|
7
|
+
* @type {typeof import("../database/record/index.js").default | undefined} */
|
|
8
8
|
static ModelClass = undefined
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -37,7 +37,7 @@ export default class AuthorizationBaseResource {
|
|
|
37
37
|
*/
|
|
38
38
|
can(actions, conditions) {
|
|
39
39
|
this.assertResourceConditionsSignature({conditions, methodName: "can"})
|
|
40
|
-
this.requiredAbility().can(actions, this.requiredModelClass(), /**
|
|
40
|
+
this.requiredAbility().can(actions, this.requiredModelClass(), /** @type {import("./ability.js").AbilityConditionsType<typeof import("../database/record/index.js").default> | undefined} */ (conditions))
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/**
|
|
@@ -49,7 +49,7 @@ export default class AuthorizationBaseResource {
|
|
|
49
49
|
*/
|
|
50
50
|
cannot(actions, conditions) {
|
|
51
51
|
this.assertResourceConditionsSignature({conditions, methodName: "cannot"})
|
|
52
|
-
this.requiredAbility().cannot(actions, this.requiredModelClass(), /**
|
|
52
|
+
this.requiredAbility().cannot(actions, this.requiredModelClass(), /** @type {import("./ability.js").AbilityConditionsType<typeof import("../database/record/index.js").default> | undefined} */ (conditions))
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
@@ -71,7 +71,7 @@ export default class AuthorizationBaseResource {
|
|
|
71
71
|
requiredModelClass() {
|
|
72
72
|
const modelClass = /**
|
|
73
73
|
* Narrows the runtime value to the documented type.
|
|
74
|
-
|
|
74
|
+
* @type {typeof AuthorizationBaseResource} */ (this.constructor).modelClass()
|
|
75
75
|
|
|
76
76
|
if (!modelClass) {
|
|
77
77
|
throw new Error(`${this.constructor.name} must define static ModelClass before calling ability helpers.`)
|
|
@@ -62,7 +62,7 @@ export function parseCronExpression(expression) {
|
|
|
62
62
|
const trimmed = expression.trim().toLowerCase()
|
|
63
63
|
const expanded = SHORTCUTS[/**
|
|
64
64
|
* Narrows the runtime value to the documented type.
|
|
65
|
-
|
|
65
|
+
* @type {keyof typeof SHORTCUTS} */ (trimmed)] || trimmed
|
|
66
66
|
const fields = expanded.split(/\s+/)
|
|
67
67
|
|
|
68
68
|
if (fields.length !== 5) {
|
|
@@ -14,7 +14,7 @@ function isJobMessage(message) {
|
|
|
14
14
|
|
|
15
15
|
const messageRecord = /**
|
|
16
16
|
* Narrows the runtime value to the documented type.
|
|
17
|
-
|
|
17
|
+
* @type {{type?: ?, payload?: ?}} */ (message)
|
|
18
18
|
|
|
19
19
|
return messageRecord.type === "job" && Object.hasOwn(messageRecord, "payload")
|
|
20
20
|
}
|
|
@@ -15,7 +15,7 @@ export default class BackgroundJobRegistry {
|
|
|
15
15
|
this.configuration = configuration
|
|
16
16
|
/**
|
|
17
17
|
* Narrows the runtime value to the documented type.
|
|
18
|
-
|
|
18
|
+
* @type {Map<string, typeof VelociousJob>} */
|
|
19
19
|
this.jobsByName = new Map()
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -65,7 +65,7 @@ export default async function runJobPayload(payload) {
|
|
|
65
65
|
const jobInstance = new JobClass()
|
|
66
66
|
/**
|
|
67
67
|
* Perform.
|
|
68
|
-
|
|
68
|
+
* @type {(...args: Array<?>) => Promise<void>} */
|
|
69
69
|
const perform = jobInstance.perform
|
|
70
70
|
|
|
71
71
|
try {
|
|
@@ -60,7 +60,7 @@ export default class VelociousJob {
|
|
|
60
60
|
if (isOptionsArg) {
|
|
61
61
|
const {jobOptions} = /**
|
|
62
62
|
* Narrows the runtime value to the documented type.
|
|
63
|
-
|
|
63
|
+
* @type {{jobOptions: import("./types.js").BackgroundJobOptions}} */ (lastArg)
|
|
64
64
|
return {jobArgs: args.slice(0, -1), jobOptions: jobOptions || {}}
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -12,19 +12,19 @@ export default class JsonSocket extends EventEmitter {
|
|
|
12
12
|
this.socket = socket
|
|
13
13
|
/**
|
|
14
14
|
* Narrows the runtime value to the documented type.
|
|
15
|
-
|
|
15
|
+
* @type {string | undefined} */
|
|
16
16
|
this.workerId = undefined
|
|
17
17
|
/**
|
|
18
18
|
* Narrows the runtime value to the documented type.
|
|
19
|
-
|
|
19
|
+
* @type {boolean} */
|
|
20
20
|
this.acceptsSpawnedJobs = true
|
|
21
21
|
/**
|
|
22
22
|
* Narrows the runtime value to the documented type.
|
|
23
|
-
|
|
23
|
+
* @type {boolean} */
|
|
24
24
|
this.acceptsForkedJobs = true
|
|
25
25
|
/**
|
|
26
26
|
* Narrows the runtime value to the documented type.
|
|
27
|
-
|
|
27
|
+
* @type {boolean} */
|
|
28
28
|
this.acceptsInlineJobs = true
|
|
29
29
|
this.buffer = ""
|
|
30
30
|
this.socket.setEncoding("utf8")
|
|
@@ -29,7 +29,7 @@ const MAX_TIMER_MS = 2_147_483_647 // ~24.8 days
|
|
|
29
29
|
*/
|
|
30
30
|
/**
|
|
31
31
|
* Worker execution mode capabilities.
|
|
32
|
-
|
|
32
|
+
* @type {WorkerExecutionModeCapability[]} */
|
|
33
33
|
const WORKER_EXECUTION_MODE_CAPABILITIES = [
|
|
34
34
|
{executionMode: "inline", accepts: (worker) => worker.acceptsInlineJobs !== false},
|
|
35
35
|
{executionMode: "forked", accepts: (worker) => worker.acceptsForkedJobs !== false},
|
|
@@ -58,50 +58,50 @@ export default class BackgroundJobsMain {
|
|
|
58
58
|
this.logger = new Logger(this)
|
|
59
59
|
/**
|
|
60
60
|
* Narrows the runtime value to the documented type.
|
|
61
|
-
|
|
61
|
+
* @type {Set<JsonSocket>} */
|
|
62
62
|
this.workers = new Set()
|
|
63
63
|
/**
|
|
64
64
|
* Narrows the runtime value to the documented type.
|
|
65
|
-
|
|
65
|
+
* @type {Set<JsonSocket>} */
|
|
66
66
|
this.readyWorkers = new Set()
|
|
67
67
|
/**
|
|
68
68
|
* Narrows the runtime value to the documented type.
|
|
69
|
-
|
|
69
|
+
* @type {net.Server | undefined} */
|
|
70
70
|
this.server = undefined
|
|
71
71
|
/**
|
|
72
72
|
* Narrows the runtime value to the documented type.
|
|
73
|
-
|
|
73
|
+
* @type {NodeJS.Timeout | undefined} */
|
|
74
74
|
this._pollTimer = undefined
|
|
75
75
|
/**
|
|
76
76
|
* Narrows the runtime value to the documented type.
|
|
77
|
-
|
|
77
|
+
* @type {NodeJS.Timeout | undefined} */
|
|
78
78
|
this._scheduledTimer = undefined
|
|
79
79
|
/**
|
|
80
80
|
* Narrows the runtime value to the documented type.
|
|
81
|
-
|
|
81
|
+
* @type {NodeJS.Timeout | undefined} */
|
|
82
82
|
this._errorRetryTimer = undefined
|
|
83
83
|
/**
|
|
84
84
|
* Narrows the runtime value to the documented type.
|
|
85
|
-
|
|
85
|
+
* @type {NodeJS.Timeout | undefined} */
|
|
86
86
|
this._orphanTimer = undefined
|
|
87
87
|
/**
|
|
88
88
|
* Narrows the runtime value to the documented type.
|
|
89
|
-
|
|
89
|
+
* @type {BackgroundJobsScheduler | undefined} */
|
|
90
90
|
this.scheduler = undefined
|
|
91
91
|
this._draining = false
|
|
92
92
|
this._redrainQueued = false
|
|
93
93
|
this._stopped = false
|
|
94
94
|
/**
|
|
95
95
|
* Narrows the runtime value to the documented type.
|
|
96
|
-
|
|
96
|
+
* @type {(() => void) | undefined} */
|
|
97
97
|
this._unsubscribeBeacon = undefined
|
|
98
98
|
/**
|
|
99
99
|
* Narrows the runtime value to the documented type.
|
|
100
|
-
|
|
100
|
+
* @type {((...args: Array<?>) => void) | undefined} */
|
|
101
101
|
this._beaconConnectHandler = undefined
|
|
102
102
|
/**
|
|
103
103
|
* Narrows the runtime value to the documented type.
|
|
104
|
-
|
|
104
|
+
* @type {import("../beacon/client.js").default | import("../beacon/in-process-client.js").default | undefined} */
|
|
105
105
|
this._beaconClient = undefined
|
|
106
106
|
}
|
|
107
107
|
|
|
@@ -178,7 +178,7 @@ export default class BackgroundJobsMain {
|
|
|
178
178
|
|
|
179
179
|
/**
|
|
180
180
|
* Runs close workers.
|
|
181
|
-
|
|
181
|
+
* @returns {void} */
|
|
182
182
|
_closeWorkers() {
|
|
183
183
|
for (const worker of this.workers) {
|
|
184
184
|
worker.close()
|
|
@@ -187,7 +187,7 @@ export default class BackgroundJobsMain {
|
|
|
187
187
|
|
|
188
188
|
/**
|
|
189
189
|
* Runs clear timers.
|
|
190
|
-
|
|
190
|
+
* @returns {void} */
|
|
191
191
|
_clearTimers() {
|
|
192
192
|
if (this._pollTimer) clearInterval(this._pollTimer)
|
|
193
193
|
if (this._scheduledTimer) clearTimeout(this._scheduledTimer)
|
|
@@ -201,7 +201,7 @@ export default class BackgroundJobsMain {
|
|
|
201
201
|
|
|
202
202
|
/**
|
|
203
203
|
* Runs disconnect beacon handlers.
|
|
204
|
-
|
|
204
|
+
* @returns {void} */
|
|
205
205
|
_disconnectBeaconHandlers() {
|
|
206
206
|
if (this._unsubscribeBeacon) {
|
|
207
207
|
this._unsubscribeBeacon()
|
|
@@ -217,7 +217,7 @@ export default class BackgroundJobsMain {
|
|
|
217
217
|
|
|
218
218
|
/**
|
|
219
219
|
* Runs stop beacon and server.
|
|
220
|
-
|
|
220
|
+
* @returns {Promise<void>} */
|
|
221
221
|
async _stopBeaconAndServer() {
|
|
222
222
|
try {
|
|
223
223
|
await this.configuration.disconnectBeacon()
|
|
@@ -228,7 +228,7 @@ export default class BackgroundJobsMain {
|
|
|
228
228
|
|
|
229
229
|
/**
|
|
230
230
|
* Runs close server and database connections.
|
|
231
|
-
|
|
231
|
+
* @returns {Promise<void>} */
|
|
232
232
|
async _closeServerAndDatabaseConnections() {
|
|
233
233
|
try {
|
|
234
234
|
await this._closeServer()
|
|
@@ -239,7 +239,7 @@ export default class BackgroundJobsMain {
|
|
|
239
239
|
|
|
240
240
|
/**
|
|
241
241
|
* Runs close server.
|
|
242
|
-
|
|
242
|
+
* @returns {Promise<void>} */
|
|
243
243
|
async _closeServer() {
|
|
244
244
|
if (!this.server) return
|
|
245
245
|
|
|
@@ -327,7 +327,7 @@ export default class BackgroundJobsMain {
|
|
|
327
327
|
const jsonSocket = new JsonSocket(socket)
|
|
328
328
|
/**
|
|
329
329
|
* Role.
|
|
330
|
-
|
|
330
|
+
* @type {import("./types.js").BackgroundJobSocketRole | null} */
|
|
331
331
|
let role = null
|
|
332
332
|
|
|
333
333
|
const cleanup = () => {
|
|
@@ -697,7 +697,7 @@ export default class BackgroundJobsMain {
|
|
|
697
697
|
|
|
698
698
|
/**
|
|
699
699
|
* Runs clear error retry timer.
|
|
700
|
-
|
|
700
|
+
* @returns {void} */
|
|
701
701
|
_clearErrorRetryTimer() {
|
|
702
702
|
if (this._errorRetryTimer) {
|
|
703
703
|
clearTimeout(this._errorRetryTimer)
|
|
@@ -839,7 +839,7 @@ export default class BackgroundJobsMain {
|
|
|
839
839
|
this._addAcceptedExecutionModes({executionModes, worker})
|
|
840
840
|
}
|
|
841
841
|
|
|
842
|
-
return /**
|
|
842
|
+
return /** @type {import("./types.js").BackgroundJobExecutionMode[]} */ ([...executionModes])
|
|
843
843
|
}
|
|
844
844
|
|
|
845
845
|
/**
|
|
@@ -23,7 +23,7 @@ const DURATION_MULTIPLIERS = {
|
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* DurationUnit type.
|
|
26
|
-
|
|
26
|
+
* @typedef {keyof typeof DURATION_MULTIPLIERS} DurationUnit */
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* Runs the parseScheduledDuration helper.
|
|
@@ -54,7 +54,7 @@ export function parseScheduledDuration(value, fieldName) {
|
|
|
54
54
|
const numericValue = Number(match[1])
|
|
55
55
|
const multiplier = DURATION_MULTIPLIERS[/**
|
|
56
56
|
* Narrows the runtime value to the documented type.
|
|
57
|
-
|
|
57
|
+
* @type {DurationUnit} */ (match[2])]
|
|
58
58
|
|
|
59
59
|
if (!multiplier) {
|
|
60
60
|
throw new Error(`Invalid scheduled background job ${fieldName}: ${value}`)
|
|
@@ -77,11 +77,11 @@ export default class BackgroundJobsScheduler {
|
|
|
77
77
|
this.logger = new Logger(this)
|
|
78
78
|
/**
|
|
79
79
|
* Narrows the runtime value to the documented type.
|
|
80
|
-
|
|
80
|
+
* @type {Array<ReturnType<typeof setInterval>>} */
|
|
81
81
|
this.intervalIds = []
|
|
82
82
|
/**
|
|
83
83
|
* Narrows the runtime value to the documented type.
|
|
84
|
-
|
|
84
|
+
* @type {Array<ReturnType<typeof setTimeout>>} */
|
|
85
85
|
this.timeoutIds = []
|
|
86
86
|
/**
|
|
87
87
|
* Narrows the runtime value to the documented type.
|
|
@@ -92,7 +92,7 @@ export default class BackgroundJobsScheduler {
|
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
94
|
* Runs start.
|
|
95
|
-
|
|
95
|
+
* @returns {Promise<void>} */
|
|
96
96
|
async start() {
|
|
97
97
|
this.stopped = false
|
|
98
98
|
|
|
@@ -115,7 +115,7 @@ export default class BackgroundJobsScheduler {
|
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
117
|
* Runs stop.
|
|
118
|
-
|
|
118
|
+
* @returns {void} */
|
|
119
119
|
stop() {
|
|
120
120
|
this.stopped = true
|
|
121
121
|
|
|
@@ -170,7 +170,7 @@ export default class BackgroundJobsScheduler {
|
|
|
170
170
|
scheduleEveryJob({jobConfiguration, jobKey}) {
|
|
171
171
|
const everyConfig = /**
|
|
172
172
|
* Narrows the runtime value to the documented type.
|
|
173
|
-
|
|
173
|
+
* @type {NonNullable<typeof jobConfiguration.every>} */ (jobConfiguration.every)
|
|
174
174
|
const {everyValue, firstInValue} = this.normalizeEvery(everyConfig)
|
|
175
175
|
const intervalMs = parseScheduledDuration(everyValue, `${jobKey}.every`)
|
|
176
176
|
const firstInMs = firstInValue !== undefined ? parseScheduledDuration(firstInValue, `${jobKey}.first_in`) : intervalMs
|
|
@@ -15,7 +15,7 @@ const DEFAULT_MAX_RETRIES = 10
|
|
|
15
15
|
const ORPHANED_AFTER_MS = 2 * 60 * 60 * 1000
|
|
16
16
|
/**
|
|
17
17
|
* Execution modes.
|
|
18
|
-
|
|
18
|
+
* @type {import("./types.js").BackgroundJobExecutionMode[]} */
|
|
19
19
|
const EXECUTION_MODES = ["inline", "forked", "spawned"]
|
|
20
20
|
const DEFAULT_EXECUTION_MODE = "forked"
|
|
21
21
|
|
|
@@ -233,13 +233,13 @@ export default class BackgroundJobsStore {
|
|
|
233
233
|
|
|
234
234
|
/**
|
|
235
235
|
* Counts.
|
|
236
|
-
|
|
236
|
+
* @type {Record<string, number>} */
|
|
237
237
|
const counts = {}
|
|
238
238
|
|
|
239
239
|
for (const row of rows) {
|
|
240
240
|
const typedRow = /**
|
|
241
241
|
* Narrows the runtime value to the documented type.
|
|
242
|
-
|
|
242
|
+
* @type {Record<string, ?>} */ (row)
|
|
243
243
|
|
|
244
244
|
counts[String(typedRow.status)] = this._normalizeNumber(typedRow.count) || 0
|
|
245
245
|
}
|
|
@@ -267,7 +267,7 @@ export default class BackgroundJobsStore {
|
|
|
267
267
|
const rows = await query.results()
|
|
268
268
|
const countRow = /**
|
|
269
269
|
* Narrows the runtime value to the documented type.
|
|
270
|
-
|
|
270
|
+
* @type {Record<string, ?>} */ (rows[0] || {})
|
|
271
271
|
|
|
272
272
|
return this._normalizeNumber(countRow.count) || 0
|
|
273
273
|
})
|
|
@@ -734,7 +734,7 @@ export default class BackgroundJobsStore {
|
|
|
734
734
|
_failureUpdate({failureMessage, markOrphaned, nextAttempt, now, scheduledAt, shouldRetry}) {
|
|
735
735
|
/**
|
|
736
736
|
* Update.
|
|
737
|
-
|
|
737
|
+
* @type {Record<string, ?>} */
|
|
738
738
|
const update = {
|
|
739
739
|
attempts: nextAttempt,
|
|
740
740
|
handed_off_at_ms: null,
|
|
@@ -926,7 +926,7 @@ export default class BackgroundJobsStore {
|
|
|
926
926
|
let callbackCalled = false
|
|
927
927
|
/**
|
|
928
928
|
* Defines result.
|
|
929
|
-
|
|
929
|
+
* @type {T | undefined} */
|
|
930
930
|
let result
|
|
931
931
|
|
|
932
932
|
await pool.withConnection({name: "Background jobs store"}, async (db) => {
|
|
@@ -938,7 +938,7 @@ export default class BackgroundJobsStore {
|
|
|
938
938
|
throw new Error("Background jobs store callback was not invoked")
|
|
939
939
|
}
|
|
940
940
|
|
|
941
|
-
return /**
|
|
941
|
+
return /** @type {T} */ (result)
|
|
942
942
|
}
|
|
943
943
|
|
|
944
944
|
/**
|
|
@@ -112,7 +112,7 @@ export default class VelociousBackgroundJobsWebController extends Controller {
|
|
|
112
112
|
const counts = await this._store().countsByStatus()
|
|
113
113
|
/**
|
|
114
114
|
* By status.
|
|
115
|
-
|
|
115
|
+
* @type {Record<string, number>} */
|
|
116
116
|
const byStatus = {}
|
|
117
117
|
let total = 0
|
|
118
118
|
|
|
@@ -224,7 +224,7 @@ export default class VelociousBackgroundJobsWebController extends Controller {
|
|
|
224
224
|
return Object.keys(jobs).map((name) => {
|
|
225
225
|
const entry = jobs[name] || /**
|
|
226
226
|
* Narrows the runtime value to the documented type.
|
|
227
|
-
|
|
227
|
+
* @type {?} */ ({})
|
|
228
228
|
|
|
229
229
|
return {
|
|
230
230
|
args: redactArgs ? undefined : (entry.args || []),
|
|
@@ -14,7 +14,7 @@ const FORKED_CHILD_SIGKILL_GRACE_MS = 5000
|
|
|
14
14
|
const FORKED_RUNNER_ENTRY_PATH = fileURLToPath(new URL("./forked-runner-child.js", import.meta.url))
|
|
15
15
|
/**
|
|
16
16
|
* Execution modes.
|
|
17
|
-
|
|
17
|
+
* @type {import("./types.js").BackgroundJobExecutionMode[]} */
|
|
18
18
|
const EXECUTION_MODES = ["inline", "forked", "spawned"]
|
|
19
19
|
|
|
20
20
|
export default class BackgroundJobsWorker {
|
|
@@ -31,11 +31,11 @@ export default class BackgroundJobsWorker {
|
|
|
31
31
|
constructor({configuration, host, port, maxConcurrentForkedJobs, maxConcurrentInlineJobs, forkedChildSigkillGraceMs} = {}) {
|
|
32
32
|
/**
|
|
33
33
|
* Narrows the runtime value to the documented type.
|
|
34
|
-
|
|
34
|
+
* @type {Promise<import("../configuration.js").default>} */
|
|
35
35
|
this.configurationPromise = configuration ? Promise.resolve(configuration) : configurationResolver()
|
|
36
36
|
/**
|
|
37
37
|
* Narrows the runtime value to the documented type.
|
|
38
|
-
|
|
38
|
+
* @type {import("../configuration.js").default | undefined} */
|
|
39
39
|
this.configuration = undefined
|
|
40
40
|
this.host = host
|
|
41
41
|
this.port = port
|
|
@@ -50,7 +50,7 @@ export default class BackgroundJobsWorker {
|
|
|
50
50
|
: undefined
|
|
51
51
|
/**
|
|
52
52
|
* Narrows the runtime value to the documented type.
|
|
53
|
-
|
|
53
|
+
* @type {number | undefined} */
|
|
54
54
|
this.maxConcurrentForkedJobsOverride = typeof maxConcurrentForkedJobs === "number" && maxConcurrentForkedJobs >= 1
|
|
55
55
|
? maxConcurrentForkedJobs
|
|
56
56
|
: undefined
|
|
@@ -62,7 +62,7 @@ export default class BackgroundJobsWorker {
|
|
|
62
62
|
this.maxConcurrentInlineJobs = this.maxConcurrentInlineJobsOverride || 4
|
|
63
63
|
/**
|
|
64
64
|
* Narrows the runtime value to the documented type.
|
|
65
|
-
|
|
65
|
+
* @type {number} */
|
|
66
66
|
this.maxConcurrentForkedJobs = this.maxConcurrentForkedJobsOverride || 4
|
|
67
67
|
/**
|
|
68
68
|
* Grace period between SIGTERM and SIGKILL when reaping process runners that
|
|
@@ -76,11 +76,11 @@ export default class BackgroundJobsWorker {
|
|
|
76
76
|
this.workerId = randomUUID()
|
|
77
77
|
/**
|
|
78
78
|
* Narrows the runtime value to the documented type.
|
|
79
|
-
|
|
79
|
+
* @type {JsonSocket | undefined} */
|
|
80
80
|
this.jsonSocket = undefined
|
|
81
81
|
/**
|
|
82
82
|
* Narrows the runtime value to the documented type.
|
|
83
|
-
|
|
83
|
+
* @type {BackgroundJobsStatusReporter | undefined} */
|
|
84
84
|
this.statusReporter = undefined
|
|
85
85
|
/**
|
|
86
86
|
* Up to `this.maxConcurrentInlineJobs` of these run in parallel. They
|
|
@@ -275,10 +275,10 @@ export default class BackgroundJobsWorker {
|
|
|
275
275
|
if (!payload.id) throw new Error("Background job payload missing id")
|
|
276
276
|
/**
|
|
277
277
|
* Identified payload.
|
|
278
|
-
|
|
278
|
+
* @type {import("./types.js").BackgroundJobPayload & {id: string}} */
|
|
279
279
|
const identifiedPayload = /**
|
|
280
280
|
* Narrows the runtime value to the documented type.
|
|
281
|
-
|
|
281
|
+
* @type {?} */ (payload)
|
|
282
282
|
|
|
283
283
|
const executionMode = this._executionModeForPayload(identifiedPayload)
|
|
284
284
|
|
|
@@ -322,7 +322,7 @@ export default class BackgroundJobsWorker {
|
|
|
322
322
|
// regardless of success or failure.
|
|
323
323
|
/**
|
|
324
324
|
* Defines inflight.
|
|
325
|
-
|
|
325
|
+
* @type {Promise<void>} */
|
|
326
326
|
let inflight
|
|
327
327
|
|
|
328
328
|
inflight = this._runInlineJobAndReport(payload).finally(() => {
|
|
@@ -375,7 +375,7 @@ export default class BackgroundJobsWorker {
|
|
|
375
375
|
_trackProcessJob(processJob) {
|
|
376
376
|
/**
|
|
377
377
|
* Defines inflight.
|
|
378
|
-
|
|
378
|
+
* @type {Promise<void>} */
|
|
379
379
|
let inflight
|
|
380
380
|
|
|
381
381
|
inflight = processJob.finally(() => {
|
|
@@ -464,7 +464,7 @@ export default class BackgroundJobsWorker {
|
|
|
464
464
|
const jobInstance = new JobClass()
|
|
465
465
|
/**
|
|
466
466
|
* Perform.
|
|
467
|
-
|
|
467
|
+
* @type {(...args: Array<?>) => Promise<void>} */
|
|
468
468
|
const perform = jobInstance.perform
|
|
469
469
|
|
|
470
470
|
await configuration.withConnections({name: `Background job worker inline: ${payload.jobName}`}, async () => {
|
package/build/beacon/client.js
CHANGED
|
@@ -55,22 +55,22 @@ export default class BeaconClient extends EventEmitter {
|
|
|
55
55
|
this._reconnectDelayMs = this._initialReconnectDelayMs
|
|
56
56
|
/**
|
|
57
57
|
* Narrows the runtime value to the documented type.
|
|
58
|
-
|
|
58
|
+
* @type {JsonSocket | undefined} */
|
|
59
59
|
this._jsonSocket = undefined
|
|
60
60
|
/**
|
|
61
61
|
* Narrows the runtime value to the documented type.
|
|
62
|
-
|
|
62
|
+
* @type {net.Socket | undefined} */
|
|
63
63
|
this._socket = undefined
|
|
64
64
|
this._connected = false
|
|
65
65
|
this._ready = false
|
|
66
66
|
this._closed = false
|
|
67
67
|
/**
|
|
68
68
|
* Narrows the runtime value to the documented type.
|
|
69
|
-
|
|
69
|
+
* @type {NodeJS.Timeout | undefined} */
|
|
70
70
|
this._reconnectTimer = undefined
|
|
71
71
|
/**
|
|
72
72
|
* Narrows the runtime value to the documented type.
|
|
73
|
-
|
|
73
|
+
* @type {Promise<void> | undefined} */
|
|
74
74
|
this._connectPromise = undefined
|
|
75
75
|
/**
|
|
76
76
|
* Last socket error observed while connected, surfaced as the disconnect reason.
|
|
@@ -118,7 +118,7 @@ export default class BeaconClient extends EventEmitter {
|
|
|
118
118
|
}
|
|
119
119
|
const onError = (/**
|
|
120
120
|
* Narrows the runtime value to the documented type.
|
|
121
|
-
|
|
121
|
+
* @type {Error} */ error) => {
|
|
122
122
|
this.off("connect", onConnect)
|
|
123
123
|
this.off("connect-error", onError)
|
|
124
124
|
reject(error)
|
|
@@ -145,7 +145,10 @@ export default class BeaconClient extends EventEmitter {
|
|
|
145
145
|
async waitForReady({timeoutMs} = {}) {
|
|
146
146
|
if (this._ready) return
|
|
147
147
|
|
|
148
|
-
/**
|
|
148
|
+
/**
|
|
149
|
+
* Cleans up the ready listener and timeout.
|
|
150
|
+
* @type {() => void}
|
|
151
|
+
*/
|
|
149
152
|
let cleanup = () => {}
|
|
150
153
|
const readyPromise = new Promise((resolve) => {
|
|
151
154
|
const onReady = () => {
|
|
@@ -184,7 +187,7 @@ export default class BeaconClient extends EventEmitter {
|
|
|
184
187
|
|
|
185
188
|
/**
|
|
186
189
|
* Message.
|
|
187
|
-
|
|
190
|
+
* @type {import("./types.js").BeaconBroadcastMessage} */
|
|
188
191
|
const message = {
|
|
189
192
|
type: "broadcast",
|
|
190
193
|
channel,
|
|
@@ -270,7 +273,7 @@ export default class BeaconClient extends EventEmitter {
|
|
|
270
273
|
|
|
271
274
|
jsonSocket.on("message", (/**
|
|
272
275
|
* Narrows the runtime value to the documented type.
|
|
273
|
-
|
|
276
|
+
* @type {import("./types.js").BeaconSocketMessage} */ message) => {
|
|
274
277
|
if (message?.type === "hello-ack" && message.peerId === this.peerId) {
|
|
275
278
|
this._ready = true
|
|
276
279
|
this.emit("ready")
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Defines this typedef.
|
|
23
|
-
|
|
23
|
+
* @typedef {{_receiveBroadcast: (message: import("./types.js").BeaconBroadcastMessage) => void}} InProcessPeer */
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Peers.
|
|
27
|
-
|
|
27
|
+
* @type {Set<InProcessPeer>} */
|
|
28
28
|
const peers = new Set()
|
|
29
29
|
|
|
30
30
|
/**
|