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.
Files changed (636) hide show
  1. package/README.md +1 -1
  2. package/build/application.js +4 -4
  3. package/build/authorization/ability.js +8 -8
  4. package/build/authorization/base-resource.js +4 -4
  5. package/build/background-jobs/cron-expression.js +1 -1
  6. package/build/background-jobs/forked-runner-child.js +1 -1
  7. package/build/background-jobs/job-registry.js +1 -1
  8. package/build/background-jobs/job-runner.js +1 -1
  9. package/build/background-jobs/job.js +1 -1
  10. package/build/background-jobs/json-socket.js +4 -4
  11. package/build/background-jobs/main.js +21 -21
  12. package/build/background-jobs/scheduler.js +7 -7
  13. package/build/background-jobs/store.js +7 -7
  14. package/build/background-jobs/web/controller.js +2 -2
  15. package/build/background-jobs/worker.js +12 -12
  16. package/build/beacon/client.js +11 -8
  17. package/build/beacon/in-process-broker.js +2 -2
  18. package/build/beacon/in-process-client.js +2 -2
  19. package/build/beacon/server.js +3 -3
  20. package/build/cli/browser-cli.js +1 -1
  21. package/build/cli/commands/db/base-command.js +2 -2
  22. package/build/cli/index.js +2 -2
  23. package/build/cli/tenant-database-command-helper.js +3 -3
  24. package/build/cli/use-browser-cli.js +1 -1
  25. package/build/configuration-types.js +3 -1
  26. package/build/configuration.js +38 -38
  27. package/build/controller.js +8 -8
  28. package/build/current-configuration.js +1 -1
  29. package/build/database/annotations-async-hooks.js +2 -2
  30. package/build/database/annotations.js +3 -3
  31. package/build/database/drivers/base-column.js +1 -1
  32. package/build/database/drivers/base-foreign-key.js +1 -1
  33. package/build/database/drivers/base-table.js +1 -1
  34. package/build/database/drivers/base.js +10 -10
  35. package/build/database/drivers/mssql/index.js +1 -1
  36. package/build/database/drivers/mssql/table.js +1 -1
  37. package/build/database/drivers/mysql/index.js +3 -3
  38. package/build/database/drivers/mysql/query.js +1 -1
  39. package/build/database/drivers/mysql/table.js +1 -1
  40. package/build/database/drivers/pgsql/index.js +2 -2
  41. package/build/database/drivers/sqlite/base.js +16 -16
  42. package/build/database/drivers/sqlite/index.js +11 -11
  43. package/build/database/drivers/sqlite/index.native.js +1 -1
  44. package/build/database/drivers/sqlite/index.web.js +3 -3
  45. package/build/database/drivers/sqlite/query.js +1 -1
  46. package/build/database/drivers/sqlite/query.web.js +1 -1
  47. package/build/database/drivers/sqlite/sql/alter-table.js +2 -2
  48. package/build/database/drivers/sqlite/table.js +1 -1
  49. package/build/database/migrator/files-finder.js +1 -1
  50. package/build/database/migrator.js +6 -6
  51. package/build/database/pool/async-tracked-multi-connection.js +27 -27
  52. package/build/database/pool/base-methods-forward.js +4 -4
  53. package/build/database/pool/base.js +8 -8
  54. package/build/database/query/from-base.js +1 -1
  55. package/build/database/query/index.js +10 -10
  56. package/build/database/query/join-object.js +3 -3
  57. package/build/database/query/model-class-query.js +39 -39
  58. package/build/database/query/preloader/belongs-to.js +22 -22
  59. package/build/database/query/preloader/has-many.js +20 -20
  60. package/build/database/query/preloader/has-one.js +8 -8
  61. package/build/database/query/preloader/selection.js +3 -3
  62. package/build/database/query/preloader.js +8 -8
  63. package/build/database/query/query-data.js +9 -9
  64. package/build/database/query/where-model-class-hash.js +7 -7
  65. package/build/database/query/with-count.js +9 -9
  66. package/build/database/record/acts-as-list.js +15 -15
  67. package/build/database/record/attachments/handle.js +2 -2
  68. package/build/database/record/attachments/normalize-input.js +12 -12
  69. package/build/database/record/attachments/storage-drivers/s3.js +6 -6
  70. package/build/database/record/attachments/store.js +13 -13
  71. package/build/database/record/index.js +115 -121
  72. package/build/database/record/instance-relationships/base.js +11 -11
  73. package/build/database/record/instance-relationships/belongs-to.js +3 -3
  74. package/build/database/record/instance-relationships/has-many.js +8 -8
  75. package/build/database/record/instance-relationships/has-one.js +7 -7
  76. package/build/database/record/relationships/base.js +2 -2
  77. package/build/database/record/state-machine.js +7 -7
  78. package/build/database/record/validators/presence.js +1 -1
  79. package/build/database/record/validators/uniqueness.js +5 -5
  80. package/build/database/table-data/index.js +4 -4
  81. package/build/environment-handlers/base.js +2 -2
  82. package/build/environment-handlers/browser.js +7 -7
  83. package/build/environment-handlers/node/cli/commands/cli-command-context.js +1 -1
  84. package/build/environment-handlers/node/cli/commands/console.js +4 -4
  85. package/build/environment-handlers/node/cli/commands/db/schema/dump.js +1 -1
  86. package/build/environment-handlers/node/cli/commands/db/schema/load.js +3 -3
  87. package/build/environment-handlers/node/cli/commands/generate/frontend-models.js +836 -60
  88. package/build/environment-handlers/node.js +6 -6
  89. package/build/frontend-model-controller.js +81 -82
  90. package/build/frontend-model-resource/base-resource.js +78 -115
  91. package/build/frontend-models/base.js +162 -149
  92. package/build/frontend-models/clear-pending-debounced-callback.js +1 -1
  93. package/build/frontend-models/event-hook-models.js +2 -2
  94. package/build/frontend-models/outgoing-event-buffer.js +2 -2
  95. package/build/frontend-models/preloader.js +5 -5
  96. package/build/frontend-models/query.js +43 -38
  97. package/build/frontend-models/resource-definition.js +6 -6
  98. package/build/frontend-models/transport-serialization.js +11 -11
  99. package/build/frontend-models/use-destroyed-event.js +10 -10
  100. package/build/frontend-models/use-model-class-event.js +11 -11
  101. package/build/frontend-models/use-updated-event.js +11 -11
  102. package/build/frontend-models/websocket-channel.js +26 -17
  103. package/build/frontend-models/websocket-publishers.js +9 -9
  104. package/build/http-client/response.js +2 -2
  105. package/build/http-server/client/index.js +8 -8
  106. package/build/http-server/client/params-to-object.js +10 -10
  107. package/build/http-server/client/request-buffer/form-data-part.js +2 -2
  108. package/build/http-server/client/request-buffer/index.js +8 -8
  109. package/build/http-server/client/request-parser.js +3 -3
  110. package/build/http-server/client/request-runner.js +6 -6
  111. package/build/http-server/client/request-timing.js +5 -5
  112. package/build/http-server/client/request.js +1 -1
  113. package/build/http-server/client/response.js +5 -5
  114. package/build/http-server/client/websocket-request.js +4 -4
  115. package/build/http-server/client/websocket-session.js +18 -18
  116. package/build/http-server/development-reloader.js +5 -5
  117. package/build/http-server/index.js +12 -12
  118. package/build/http-server/remote-address.js +4 -4
  119. package/build/http-server/server-client.js +3 -3
  120. package/build/http-server/server-lock.js +4 -4
  121. package/build/http-server/websocket-channel-subscribers.js +3 -3
  122. package/build/http-server/websocket-channel.js +1 -1
  123. package/build/http-server/websocket-connection.js +1 -1
  124. package/build/http-server/websocket-event-log-store.js +6 -6
  125. package/build/http-server/websocket-events-host.js +2 -2
  126. package/build/http-server/worker-handler/in-process.js +7 -7
  127. package/build/http-server/worker-handler/index.js +4 -4
  128. package/build/http-server/worker-handler/worker-thread.js +3 -3
  129. package/build/logger/outputs/array-output.js +3 -3
  130. package/build/logger/outputs/console-output.js +1 -1
  131. package/build/logger/outputs/file-output.js +4 -4
  132. package/build/logger/outputs/stdout-output.js +1 -1
  133. package/build/logger.js +10 -10
  134. package/build/mailer/backends/smtp.js +3 -3
  135. package/build/mailer/base.js +8 -8
  136. package/build/mailer/delivery.js +4 -4
  137. package/build/plugins/sqljs-wasm-route-controller.js +1 -1
  138. package/build/routes/base-route.js +6 -6
  139. package/build/routes/basic-route.js +1 -1
  140. package/build/routes/hooks/frontend-model-command-route-hook.js +1 -1
  141. package/build/routes/index.js +1 -1
  142. package/build/routes/plugin-routes.js +1 -1
  143. package/build/routes/resolver.js +11 -11
  144. package/build/routes/resource-route.js +1 -1
  145. package/build/src/application.d.ts +3 -3
  146. package/build/src/application.d.ts.map +1 -1
  147. package/build/src/application.js +5 -5
  148. package/build/src/authorization/ability.d.ts +7 -7
  149. package/build/src/authorization/ability.d.ts.map +1 -1
  150. package/build/src/authorization/ability.js +9 -9
  151. package/build/src/authorization/base-resource.d.ts +1 -1
  152. package/build/src/authorization/base-resource.d.ts.map +1 -1
  153. package/build/src/authorization/base-resource.js +5 -5
  154. package/build/src/background-jobs/cron-expression.js +2 -2
  155. package/build/src/background-jobs/forked-runner-child.js +2 -2
  156. package/build/src/background-jobs/job-registry.d.ts +1 -1
  157. package/build/src/background-jobs/job-registry.d.ts.map +1 -1
  158. package/build/src/background-jobs/job-registry.js +2 -2
  159. package/build/src/background-jobs/job-runner.js +2 -2
  160. package/build/src/background-jobs/job.js +2 -2
  161. package/build/src/background-jobs/json-socket.d.ts +4 -4
  162. package/build/src/background-jobs/json-socket.d.ts.map +1 -1
  163. package/build/src/background-jobs/json-socket.js +5 -5
  164. package/build/src/background-jobs/main.d.ts +18 -18
  165. package/build/src/background-jobs/main.d.ts.map +1 -1
  166. package/build/src/background-jobs/main.js +22 -22
  167. package/build/src/background-jobs/scheduler.d.ts +5 -5
  168. package/build/src/background-jobs/scheduler.d.ts.map +1 -1
  169. package/build/src/background-jobs/scheduler.js +8 -8
  170. package/build/src/background-jobs/store.js +8 -8
  171. package/build/src/background-jobs/web/controller.js +3 -3
  172. package/build/src/background-jobs/worker.d.ts +6 -6
  173. package/build/src/background-jobs/worker.d.ts.map +1 -1
  174. package/build/src/background-jobs/worker.js +13 -13
  175. package/build/src/beacon/client.d.ts +4 -4
  176. package/build/src/beacon/client.d.ts.map +1 -1
  177. package/build/src/beacon/client.js +12 -9
  178. package/build/src/beacon/in-process-broker.d.ts.map +1 -1
  179. package/build/src/beacon/in-process-broker.js +3 -3
  180. package/build/src/beacon/in-process-client.d.ts +1 -1
  181. package/build/src/beacon/in-process-client.d.ts.map +1 -1
  182. package/build/src/beacon/in-process-client.js +3 -3
  183. package/build/src/beacon/server.d.ts +2 -2
  184. package/build/src/beacon/server.d.ts.map +1 -1
  185. package/build/src/beacon/server.js +4 -4
  186. package/build/src/cli/browser-cli.js +2 -2
  187. package/build/src/cli/commands/db/base-command.d.ts +2 -2
  188. package/build/src/cli/commands/db/base-command.d.ts.map +1 -1
  189. package/build/src/cli/commands/db/base-command.js +3 -3
  190. package/build/src/cli/index.js +3 -3
  191. package/build/src/cli/tenant-database-command-helper.d.ts +1 -1
  192. package/build/src/cli/tenant-database-command-helper.d.ts.map +1 -1
  193. package/build/src/cli/tenant-database-command-helper.js +4 -4
  194. package/build/src/cli/use-browser-cli.js +2 -2
  195. package/build/src/configuration-types.d.ts +12 -2
  196. package/build/src/configuration-types.d.ts.map +1 -1
  197. package/build/src/configuration-types.js +4 -2
  198. package/build/src/configuration.d.ts +14 -14
  199. package/build/src/configuration.d.ts.map +1 -1
  200. package/build/src/configuration.js +39 -39
  201. package/build/src/controller.js +10 -10
  202. package/build/src/current-configuration.js +2 -2
  203. package/build/src/database/annotations-async-hooks.js +3 -3
  204. package/build/src/database/annotations.d.ts.map +1 -1
  205. package/build/src/database/annotations.js +4 -4
  206. package/build/src/database/drivers/base-column.d.ts +1 -1
  207. package/build/src/database/drivers/base-column.d.ts.map +1 -1
  208. package/build/src/database/drivers/base-column.js +2 -2
  209. package/build/src/database/drivers/base-foreign-key.d.ts +1 -1
  210. package/build/src/database/drivers/base-foreign-key.d.ts.map +1 -1
  211. package/build/src/database/drivers/base-foreign-key.js +2 -2
  212. package/build/src/database/drivers/base-table.d.ts +1 -1
  213. package/build/src/database/drivers/base-table.d.ts.map +1 -1
  214. package/build/src/database/drivers/base-table.js +2 -2
  215. package/build/src/database/drivers/base.d.ts +6 -6
  216. package/build/src/database/drivers/base.d.ts.map +1 -1
  217. package/build/src/database/drivers/base.js +11 -11
  218. package/build/src/database/drivers/mssql/index.js +2 -2
  219. package/build/src/database/drivers/mssql/table.js +2 -2
  220. package/build/src/database/drivers/mysql/index.js +4 -4
  221. package/build/src/database/drivers/mysql/query.js +2 -2
  222. package/build/src/database/drivers/mysql/table.js +2 -2
  223. package/build/src/database/drivers/pgsql/index.js +3 -3
  224. package/build/src/database/drivers/sqlite/base.d.ts +3 -3
  225. package/build/src/database/drivers/sqlite/base.d.ts.map +1 -1
  226. package/build/src/database/drivers/sqlite/base.js +17 -17
  227. package/build/src/database/drivers/sqlite/index.d.ts +4 -4
  228. package/build/src/database/drivers/sqlite/index.d.ts.map +1 -1
  229. package/build/src/database/drivers/sqlite/index.js +12 -12
  230. package/build/src/database/drivers/sqlite/index.native.js +2 -2
  231. package/build/src/database/drivers/sqlite/index.web.d.ts +2 -2
  232. package/build/src/database/drivers/sqlite/index.web.d.ts.map +1 -1
  233. package/build/src/database/drivers/sqlite/index.web.js +4 -4
  234. package/build/src/database/drivers/sqlite/query.js +2 -2
  235. package/build/src/database/drivers/sqlite/query.web.js +2 -2
  236. package/build/src/database/drivers/sqlite/sql/alter-table.js +3 -3
  237. package/build/src/database/drivers/sqlite/table.js +2 -2
  238. package/build/src/database/migrator/files-finder.js +2 -2
  239. package/build/src/database/migrator.d.ts +1 -1
  240. package/build/src/database/migrator.d.ts.map +1 -1
  241. package/build/src/database/migrator.js +7 -7
  242. package/build/src/database/pool/async-tracked-multi-connection.d.ts +9 -9
  243. package/build/src/database/pool/async-tracked-multi-connection.d.ts.map +1 -1
  244. package/build/src/database/pool/async-tracked-multi-connection.js +28 -28
  245. package/build/src/database/pool/base-methods-forward.js +7 -7
  246. package/build/src/database/pool/base.d.ts +1 -1
  247. package/build/src/database/pool/base.d.ts.map +1 -1
  248. package/build/src/database/pool/base.js +9 -9
  249. package/build/src/database/query/from-base.d.ts +1 -1
  250. package/build/src/database/query/from-base.d.ts.map +1 -1
  251. package/build/src/database/query/from-base.js +2 -2
  252. package/build/src/database/query/index.d.ts +4 -4
  253. package/build/src/database/query/index.d.ts.map +1 -1
  254. package/build/src/database/query/index.js +11 -11
  255. package/build/src/database/query/join-object.js +4 -4
  256. package/build/src/database/query/model-class-query.d.ts +4 -4
  257. package/build/src/database/query/model-class-query.d.ts.map +1 -1
  258. package/build/src/database/query/model-class-query.js +40 -40
  259. package/build/src/database/query/preloader/belongs-to.js +23 -23
  260. package/build/src/database/query/preloader/has-many.js +21 -21
  261. package/build/src/database/query/preloader/has-one.js +9 -9
  262. package/build/src/database/query/preloader/selection.js +4 -4
  263. package/build/src/database/query/preloader.js +9 -9
  264. package/build/src/database/query/query-data.js +10 -10
  265. package/build/src/database/query/where-model-class-hash.js +8 -8
  266. package/build/src/database/query/with-count.js +10 -10
  267. package/build/src/database/record/acts-as-list.js +20 -20
  268. package/build/src/database/record/attachments/handle.d.ts +1 -1
  269. package/build/src/database/record/attachments/handle.d.ts.map +1 -1
  270. package/build/src/database/record/attachments/handle.js +3 -3
  271. package/build/src/database/record/attachments/normalize-input.js +15 -15
  272. package/build/src/database/record/attachments/storage-drivers/s3.js +7 -7
  273. package/build/src/database/record/attachments/store.d.ts +2 -2
  274. package/build/src/database/record/attachments/store.d.ts.map +1 -1
  275. package/build/src/database/record/attachments/store.js +14 -14
  276. package/build/src/database/record/index.d.ts +18 -25
  277. package/build/src/database/record/index.d.ts.map +1 -1
  278. package/build/src/database/record/index.js +135 -141
  279. package/build/src/database/record/instance-relationships/base.d.ts +3 -3
  280. package/build/src/database/record/instance-relationships/base.d.ts.map +1 -1
  281. package/build/src/database/record/instance-relationships/base.js +13 -13
  282. package/build/src/database/record/instance-relationships/belongs-to.js +4 -4
  283. package/build/src/database/record/instance-relationships/has-many.js +9 -9
  284. package/build/src/database/record/instance-relationships/has-one.d.ts +1 -1
  285. package/build/src/database/record/instance-relationships/has-one.d.ts.map +1 -1
  286. package/build/src/database/record/instance-relationships/has-one.js +8 -8
  287. package/build/src/database/record/relationships/base.js +4 -4
  288. package/build/src/database/record/state-machine.js +8 -8
  289. package/build/src/database/record/validators/presence.js +2 -2
  290. package/build/src/database/record/validators/uniqueness.js +6 -6
  291. package/build/src/database/table-data/index.d.ts +4 -4
  292. package/build/src/database/table-data/index.d.ts.map +1 -1
  293. package/build/src/database/table-data/index.js +5 -5
  294. package/build/src/environment-handlers/base.js +3 -3
  295. package/build/src/environment-handlers/browser.d.ts +3 -3
  296. package/build/src/environment-handlers/browser.d.ts.map +1 -1
  297. package/build/src/environment-handlers/browser.js +8 -8
  298. package/build/src/environment-handlers/node/cli/commands/cli-command-context.js +2 -2
  299. package/build/src/environment-handlers/node/cli/commands/console.d.ts.map +1 -1
  300. package/build/src/environment-handlers/node/cli/commands/console.js +5 -5
  301. package/build/src/environment-handlers/node/cli/commands/db/schema/dump.d.ts +1 -1
  302. package/build/src/environment-handlers/node/cli/commands/db/schema/dump.d.ts.map +1 -1
  303. package/build/src/environment-handlers/node/cli/commands/db/schema/dump.js +2 -2
  304. package/build/src/environment-handlers/node/cli/commands/db/schema/load.d.ts +1 -1
  305. package/build/src/environment-handlers/node/cli/commands/db/schema/load.d.ts.map +1 -1
  306. package/build/src/environment-handlers/node/cli/commands/db/schema/load.js +4 -4
  307. package/build/src/environment-handlers/node/cli/commands/generate/frontend-models.d.ts +285 -12
  308. package/build/src/environment-handlers/node/cli/commands/generate/frontend-models.d.ts.map +1 -1
  309. package/build/src/environment-handlers/node/cli/commands/generate/frontend-models.js +712 -61
  310. package/build/src/environment-handlers/node.d.ts +2 -2
  311. package/build/src/environment-handlers/node.d.ts.map +1 -1
  312. package/build/src/environment-handlers/node.js +7 -7
  313. package/build/src/frontend-model-controller.d.ts +5 -6
  314. package/build/src/frontend-model-controller.d.ts.map +1 -1
  315. package/build/src/frontend-model-controller.js +88 -89
  316. package/build/src/frontend-model-resource/base-resource.d.ts +36 -27
  317. package/build/src/frontend-model-resource/base-resource.d.ts.map +1 -1
  318. package/build/src/frontend-model-resource/base-resource.js +67 -120
  319. package/build/src/frontend-models/base.d.ts +67 -59
  320. package/build/src/frontend-models/base.d.ts.map +1 -1
  321. package/build/src/frontend-models/base.js +171 -158
  322. package/build/src/frontend-models/clear-pending-debounced-callback.js +2 -2
  323. package/build/src/frontend-models/event-hook-models.d.ts.map +1 -1
  324. package/build/src/frontend-models/event-hook-models.js +3 -3
  325. package/build/src/frontend-models/outgoing-event-buffer.d.ts +1 -1
  326. package/build/src/frontend-models/outgoing-event-buffer.d.ts.map +1 -1
  327. package/build/src/frontend-models/outgoing-event-buffer.js +3 -3
  328. package/build/src/frontend-models/preloader.js +6 -6
  329. package/build/src/frontend-models/query.d.ts +16 -8
  330. package/build/src/frontend-models/query.d.ts.map +1 -1
  331. package/build/src/frontend-models/query.js +43 -39
  332. package/build/src/frontend-models/resource-definition.js +7 -7
  333. package/build/src/frontend-models/transport-serialization.js +12 -12
  334. package/build/src/frontend-models/use-destroyed-event.d.ts.map +1 -1
  335. package/build/src/frontend-models/use-destroyed-event.js +11 -11
  336. package/build/src/frontend-models/use-model-class-event.d.ts.map +1 -1
  337. package/build/src/frontend-models/use-model-class-event.js +12 -12
  338. package/build/src/frontend-models/use-updated-event.d.ts.map +1 -1
  339. package/build/src/frontend-models/use-updated-event.js +12 -12
  340. package/build/src/frontend-models/websocket-channel.d.ts +6 -1
  341. package/build/src/frontend-models/websocket-channel.d.ts.map +1 -1
  342. package/build/src/frontend-models/websocket-channel.js +26 -18
  343. package/build/src/frontend-models/websocket-publishers.js +11 -11
  344. package/build/src/http-client/response.d.ts +2 -2
  345. package/build/src/http-client/response.d.ts.map +1 -1
  346. package/build/src/http-client/response.js +3 -3
  347. package/build/src/http-server/client/index.d.ts +1 -1
  348. package/build/src/http-server/client/index.d.ts.map +1 -1
  349. package/build/src/http-server/client/index.js +9 -9
  350. package/build/src/http-server/client/params-to-object.js +11 -11
  351. package/build/src/http-server/client/request-buffer/form-data-part.d.ts +2 -2
  352. package/build/src/http-server/client/request-buffer/form-data-part.d.ts.map +1 -1
  353. package/build/src/http-server/client/request-buffer/form-data-part.js +3 -3
  354. package/build/src/http-server/client/request-buffer/index.d.ts +4 -4
  355. package/build/src/http-server/client/request-buffer/index.d.ts.map +1 -1
  356. package/build/src/http-server/client/request-buffer/index.js +9 -9
  357. package/build/src/http-server/client/request-parser.d.ts +1 -1
  358. package/build/src/http-server/client/request-parser.d.ts.map +1 -1
  359. package/build/src/http-server/client/request-parser.js +4 -4
  360. package/build/src/http-server/client/request-runner.js +7 -7
  361. package/build/src/http-server/client/request-timing.d.ts +5 -5
  362. package/build/src/http-server/client/request-timing.d.ts.map +1 -1
  363. package/build/src/http-server/client/request-timing.js +6 -6
  364. package/build/src/http-server/client/request.js +2 -2
  365. package/build/src/http-server/client/response.d.ts +3 -3
  366. package/build/src/http-server/client/response.d.ts.map +1 -1
  367. package/build/src/http-server/client/response.js +6 -6
  368. package/build/src/http-server/client/websocket-request.d.ts +3 -3
  369. package/build/src/http-server/client/websocket-request.d.ts.map +1 -1
  370. package/build/src/http-server/client/websocket-request.js +5 -5
  371. package/build/src/http-server/client/websocket-session.d.ts +6 -6
  372. package/build/src/http-server/client/websocket-session.d.ts.map +1 -1
  373. package/build/src/http-server/client/websocket-session.js +19 -19
  374. package/build/src/http-server/development-reloader.d.ts +3 -3
  375. package/build/src/http-server/development-reloader.d.ts.map +1 -1
  376. package/build/src/http-server/development-reloader.js +6 -6
  377. package/build/src/http-server/index.d.ts +7 -7
  378. package/build/src/http-server/index.d.ts.map +1 -1
  379. package/build/src/http-server/index.js +13 -13
  380. package/build/src/http-server/remote-address.js +6 -6
  381. package/build/src/http-server/server-client.js +4 -4
  382. package/build/src/http-server/server-lock.js +5 -5
  383. package/build/src/http-server/websocket-channel-subscribers.d.ts +1 -1
  384. package/build/src/http-server/websocket-channel-subscribers.d.ts.map +1 -1
  385. package/build/src/http-server/websocket-channel-subscribers.js +4 -4
  386. package/build/src/http-server/websocket-channel.d.ts +1 -1
  387. package/build/src/http-server/websocket-channel.d.ts.map +1 -1
  388. package/build/src/http-server/websocket-channel.js +2 -2
  389. package/build/src/http-server/websocket-connection.d.ts +1 -1
  390. package/build/src/http-server/websocket-connection.d.ts.map +1 -1
  391. package/build/src/http-server/websocket-connection.js +2 -2
  392. package/build/src/http-server/websocket-event-log-store.d.ts +1 -1
  393. package/build/src/http-server/websocket-event-log-store.d.ts.map +1 -1
  394. package/build/src/http-server/websocket-event-log-store.js +7 -7
  395. package/build/src/http-server/websocket-events-host.d.ts +1 -1
  396. package/build/src/http-server/websocket-events-host.d.ts.map +1 -1
  397. package/build/src/http-server/websocket-events-host.js +3 -3
  398. package/build/src/http-server/worker-handler/in-process.d.ts +3 -3
  399. package/build/src/http-server/worker-handler/in-process.d.ts.map +1 -1
  400. package/build/src/http-server/worker-handler/in-process.js +9 -9
  401. package/build/src/http-server/worker-handler/index.d.ts +4 -4
  402. package/build/src/http-server/worker-handler/index.d.ts.map +1 -1
  403. package/build/src/http-server/worker-handler/index.js +5 -5
  404. package/build/src/http-server/worker-handler/worker-thread.d.ts +2 -2
  405. package/build/src/http-server/worker-handler/worker-thread.d.ts.map +1 -1
  406. package/build/src/http-server/worker-handler/worker-thread.js +4 -4
  407. package/build/src/logger/outputs/array-output.d.ts +3 -3
  408. package/build/src/logger/outputs/array-output.d.ts.map +1 -1
  409. package/build/src/logger/outputs/array-output.js +4 -4
  410. package/build/src/logger/outputs/console-output.d.ts +1 -1
  411. package/build/src/logger/outputs/console-output.d.ts.map +1 -1
  412. package/build/src/logger/outputs/console-output.js +2 -2
  413. package/build/src/logger/outputs/file-output.d.ts +4 -4
  414. package/build/src/logger/outputs/file-output.d.ts.map +1 -1
  415. package/build/src/logger/outputs/file-output.js +5 -5
  416. package/build/src/logger/outputs/stdout-output.d.ts.map +1 -1
  417. package/build/src/logger/outputs/stdout-output.js +2 -2
  418. package/build/src/logger.d.ts.map +1 -1
  419. package/build/src/logger.js +11 -11
  420. package/build/src/mailer/backends/smtp.d.ts.map +1 -1
  421. package/build/src/mailer/backends/smtp.js +5 -5
  422. package/build/src/mailer/base.js +11 -11
  423. package/build/src/mailer/delivery.d.ts +3 -3
  424. package/build/src/mailer/delivery.d.ts.map +1 -1
  425. package/build/src/mailer/delivery.js +5 -5
  426. package/build/src/plugins/sqljs-wasm-route-controller.js +2 -2
  427. package/build/src/routes/base-route.d.ts +6 -6
  428. package/build/src/routes/base-route.d.ts.map +1 -1
  429. package/build/src/routes/base-route.js +7 -7
  430. package/build/src/routes/basic-route.js +2 -2
  431. package/build/src/routes/hooks/frontend-model-command-route-hook.js +2 -2
  432. package/build/src/routes/index.js +2 -2
  433. package/build/src/routes/plugin-routes.js +2 -2
  434. package/build/src/routes/resolver.d.ts +1 -1
  435. package/build/src/routes/resolver.d.ts.map +1 -1
  436. package/build/src/routes/resolver.js +13 -13
  437. package/build/src/routes/resource-route.d.ts +1 -1
  438. package/build/src/routes/resource-route.d.ts.map +1 -1
  439. package/build/src/routes/resource-route.js +2 -2
  440. package/build/src/testing/browser-frontend-model-event-hook-scenarios.d.ts.map +1 -1
  441. package/build/src/testing/browser-frontend-model-event-hook-scenarios.js +8 -8
  442. package/build/src/testing/expect-utils.js +13 -13
  443. package/build/src/testing/expect.d.ts +1 -1
  444. package/build/src/testing/expect.d.ts.map +1 -1
  445. package/build/src/testing/expect.js +9 -9
  446. package/build/src/testing/test-files-finder.d.ts +8 -8
  447. package/build/src/testing/test-files-finder.d.ts.map +1 -1
  448. package/build/src/testing/test-files-finder.js +9 -9
  449. package/build/src/testing/test-filter-parser.js +3 -3
  450. package/build/src/testing/test-runner.d.ts +2 -2
  451. package/build/src/testing/test-runner.d.ts.map +1 -1
  452. package/build/src/testing/test-runner.js +17 -17
  453. package/build/src/testing/test-suite-splitter.js +2 -2
  454. package/build/src/testing/test.d.ts +2 -2
  455. package/build/src/testing/test.d.ts.map +1 -1
  456. package/build/src/testing/test.js +16 -16
  457. package/build/src/utils/backtrace-cleaner.d.ts +1 -1
  458. package/build/src/utils/backtrace-cleaner.d.ts.map +1 -1
  459. package/build/src/utils/backtrace-cleaner.js +2 -2
  460. package/build/src/utils/format-value.js +2 -2
  461. package/build/src/utils/model-scope.js +2 -2
  462. package/build/src/utils/ransack.js +27 -27
  463. package/build/src/utils/with-tracked-stack-async-hooks.js +8 -8
  464. package/build/src/utils/with-tracked-stack.js +4 -4
  465. package/build/testing/browser-frontend-model-event-hook-scenarios.js +7 -7
  466. package/build/testing/expect-utils.js +11 -11
  467. package/build/testing/expect.js +7 -7
  468. package/build/testing/test-files-finder.js +8 -8
  469. package/build/testing/test-filter-parser.js +2 -2
  470. package/build/testing/test-runner.js +16 -16
  471. package/build/testing/test-suite-splitter.js +1 -1
  472. package/build/testing/test.js +15 -15
  473. package/build/utils/backtrace-cleaner.js +1 -1
  474. package/build/utils/format-value.js +1 -1
  475. package/build/utils/model-scope.js +1 -1
  476. package/build/utils/ransack.js +26 -26
  477. package/build/utils/with-tracked-stack-async-hooks.js +7 -7
  478. package/build/utils/with-tracked-stack.js +3 -3
  479. package/package.json +2 -1
  480. package/src/application.js +4 -4
  481. package/src/authorization/ability.js +8 -8
  482. package/src/authorization/base-resource.js +4 -4
  483. package/src/background-jobs/cron-expression.js +1 -1
  484. package/src/background-jobs/forked-runner-child.js +1 -1
  485. package/src/background-jobs/job-registry.js +1 -1
  486. package/src/background-jobs/job-runner.js +1 -1
  487. package/src/background-jobs/job.js +1 -1
  488. package/src/background-jobs/json-socket.js +4 -4
  489. package/src/background-jobs/main.js +21 -21
  490. package/src/background-jobs/scheduler.js +7 -7
  491. package/src/background-jobs/store.js +7 -7
  492. package/src/background-jobs/web/controller.js +2 -2
  493. package/src/background-jobs/worker.js +12 -12
  494. package/src/beacon/client.js +11 -8
  495. package/src/beacon/in-process-broker.js +2 -2
  496. package/src/beacon/in-process-client.js +2 -2
  497. package/src/beacon/server.js +3 -3
  498. package/src/cli/browser-cli.js +1 -1
  499. package/src/cli/commands/db/base-command.js +2 -2
  500. package/src/cli/index.js +2 -2
  501. package/src/cli/tenant-database-command-helper.js +3 -3
  502. package/src/cli/use-browser-cli.js +1 -1
  503. package/src/configuration-types.js +3 -1
  504. package/src/configuration.js +38 -38
  505. package/src/controller.js +8 -8
  506. package/src/current-configuration.js +1 -1
  507. package/src/database/annotations-async-hooks.js +2 -2
  508. package/src/database/annotations.js +3 -3
  509. package/src/database/drivers/base-column.js +1 -1
  510. package/src/database/drivers/base-foreign-key.js +1 -1
  511. package/src/database/drivers/base-table.js +1 -1
  512. package/src/database/drivers/base.js +10 -10
  513. package/src/database/drivers/mssql/index.js +1 -1
  514. package/src/database/drivers/mssql/table.js +1 -1
  515. package/src/database/drivers/mysql/index.js +3 -3
  516. package/src/database/drivers/mysql/query.js +1 -1
  517. package/src/database/drivers/mysql/table.js +1 -1
  518. package/src/database/drivers/pgsql/index.js +2 -2
  519. package/src/database/drivers/sqlite/base.js +16 -16
  520. package/src/database/drivers/sqlite/index.js +11 -11
  521. package/src/database/drivers/sqlite/index.native.js +1 -1
  522. package/src/database/drivers/sqlite/index.web.js +3 -3
  523. package/src/database/drivers/sqlite/query.js +1 -1
  524. package/src/database/drivers/sqlite/query.web.js +1 -1
  525. package/src/database/drivers/sqlite/sql/alter-table.js +2 -2
  526. package/src/database/drivers/sqlite/table.js +1 -1
  527. package/src/database/migrator/files-finder.js +1 -1
  528. package/src/database/migrator.js +6 -6
  529. package/src/database/pool/async-tracked-multi-connection.js +27 -27
  530. package/src/database/pool/base-methods-forward.js +4 -4
  531. package/src/database/pool/base.js +8 -8
  532. package/src/database/query/from-base.js +1 -1
  533. package/src/database/query/index.js +10 -10
  534. package/src/database/query/join-object.js +3 -3
  535. package/src/database/query/model-class-query.js +39 -39
  536. package/src/database/query/preloader/belongs-to.js +22 -22
  537. package/src/database/query/preloader/has-many.js +20 -20
  538. package/src/database/query/preloader/has-one.js +8 -8
  539. package/src/database/query/preloader/selection.js +3 -3
  540. package/src/database/query/preloader.js +8 -8
  541. package/src/database/query/query-data.js +9 -9
  542. package/src/database/query/where-model-class-hash.js +7 -7
  543. package/src/database/query/with-count.js +9 -9
  544. package/src/database/record/acts-as-list.js +15 -15
  545. package/src/database/record/attachments/handle.js +2 -2
  546. package/src/database/record/attachments/normalize-input.js +12 -12
  547. package/src/database/record/attachments/storage-drivers/s3.js +6 -6
  548. package/src/database/record/attachments/store.js +13 -13
  549. package/src/database/record/index.js +115 -121
  550. package/src/database/record/instance-relationships/base.js +11 -11
  551. package/src/database/record/instance-relationships/belongs-to.js +3 -3
  552. package/src/database/record/instance-relationships/has-many.js +8 -8
  553. package/src/database/record/instance-relationships/has-one.js +7 -7
  554. package/src/database/record/relationships/base.js +2 -2
  555. package/src/database/record/state-machine.js +7 -7
  556. package/src/database/record/validators/presence.js +1 -1
  557. package/src/database/record/validators/uniqueness.js +5 -5
  558. package/src/database/table-data/index.js +4 -4
  559. package/src/environment-handlers/base.js +2 -2
  560. package/src/environment-handlers/browser.js +7 -7
  561. package/src/environment-handlers/node/cli/commands/cli-command-context.js +1 -1
  562. package/src/environment-handlers/node/cli/commands/console.js +4 -4
  563. package/src/environment-handlers/node/cli/commands/db/schema/dump.js +1 -1
  564. package/src/environment-handlers/node/cli/commands/db/schema/load.js +3 -3
  565. package/src/environment-handlers/node/cli/commands/generate/frontend-models.js +836 -60
  566. package/src/environment-handlers/node.js +6 -6
  567. package/src/frontend-model-controller.js +81 -82
  568. package/src/frontend-model-resource/base-resource.js +78 -115
  569. package/src/frontend-models/base.js +162 -149
  570. package/src/frontend-models/clear-pending-debounced-callback.js +1 -1
  571. package/src/frontend-models/event-hook-models.js +2 -2
  572. package/src/frontend-models/outgoing-event-buffer.js +2 -2
  573. package/src/frontend-models/preloader.js +5 -5
  574. package/src/frontend-models/query.js +43 -38
  575. package/src/frontend-models/resource-definition.js +6 -6
  576. package/src/frontend-models/transport-serialization.js +11 -11
  577. package/src/frontend-models/use-destroyed-event.js +10 -10
  578. package/src/frontend-models/use-model-class-event.js +11 -11
  579. package/src/frontend-models/use-updated-event.js +11 -11
  580. package/src/frontend-models/websocket-channel.js +26 -17
  581. package/src/frontend-models/websocket-publishers.js +9 -9
  582. package/src/http-client/response.js +2 -2
  583. package/src/http-server/client/index.js +8 -8
  584. package/src/http-server/client/params-to-object.js +10 -10
  585. package/src/http-server/client/request-buffer/form-data-part.js +2 -2
  586. package/src/http-server/client/request-buffer/index.js +8 -8
  587. package/src/http-server/client/request-parser.js +3 -3
  588. package/src/http-server/client/request-runner.js +6 -6
  589. package/src/http-server/client/request-timing.js +5 -5
  590. package/src/http-server/client/request.js +1 -1
  591. package/src/http-server/client/response.js +5 -5
  592. package/src/http-server/client/websocket-request.js +4 -4
  593. package/src/http-server/client/websocket-session.js +18 -18
  594. package/src/http-server/development-reloader.js +5 -5
  595. package/src/http-server/index.js +12 -12
  596. package/src/http-server/remote-address.js +4 -4
  597. package/src/http-server/server-client.js +3 -3
  598. package/src/http-server/server-lock.js +4 -4
  599. package/src/http-server/websocket-channel-subscribers.js +3 -3
  600. package/src/http-server/websocket-channel.js +1 -1
  601. package/src/http-server/websocket-connection.js +1 -1
  602. package/src/http-server/websocket-event-log-store.js +6 -6
  603. package/src/http-server/websocket-events-host.js +2 -2
  604. package/src/http-server/worker-handler/in-process.js +7 -7
  605. package/src/http-server/worker-handler/index.js +4 -4
  606. package/src/http-server/worker-handler/worker-thread.js +3 -3
  607. package/src/logger/outputs/array-output.js +3 -3
  608. package/src/logger/outputs/console-output.js +1 -1
  609. package/src/logger/outputs/file-output.js +4 -4
  610. package/src/logger/outputs/stdout-output.js +1 -1
  611. package/src/logger.js +10 -10
  612. package/src/mailer/backends/smtp.js +3 -3
  613. package/src/mailer/base.js +8 -8
  614. package/src/mailer/delivery.js +4 -4
  615. package/src/plugins/sqljs-wasm-route-controller.js +1 -1
  616. package/src/routes/base-route.js +6 -6
  617. package/src/routes/basic-route.js +1 -1
  618. package/src/routes/hooks/frontend-model-command-route-hook.js +1 -1
  619. package/src/routes/index.js +1 -1
  620. package/src/routes/plugin-routes.js +1 -1
  621. package/src/routes/resolver.js +11 -11
  622. package/src/routes/resource-route.js +1 -1
  623. package/src/testing/browser-frontend-model-event-hook-scenarios.js +7 -7
  624. package/src/testing/expect-utils.js +11 -11
  625. package/src/testing/expect.js +7 -7
  626. package/src/testing/test-files-finder.js +8 -8
  627. package/src/testing/test-filter-parser.js +2 -2
  628. package/src/testing/test-runner.js +16 -16
  629. package/src/testing/test-suite-splitter.js +1 -1
  630. package/src/testing/test.js +15 -15
  631. package/src/utils/backtrace-cleaner.js +1 -1
  632. package/src/utils/format-value.js +1 -1
  633. package/src/utils/model-scope.js +1 -1
  634. package/src/utils/ransack.js +26 -26
  635. package/src/utils/with-tracked-stack-async-hooks.js +7 -7
  636. package/src/utils/with-tracked-stack.js +3 -3
@@ -12,13 +12,13 @@ import wait from "awaitery/build/wait.js"
12
12
 
13
13
  /**
14
14
  * FrontendModelResourceConfig type.
15
- @typedef {import("../frontend-models/base.js").FrontendModelResourceConfig} FrontendModelResourceConfig */
15
+ * @typedef {import("../frontend-models/base.js").FrontendModelResourceConfig} FrontendModelResourceConfig */
16
16
  /**
17
17
  * Defines this typedef.
18
- @typedef {{id: string, model: FrontendModelBase}} FrontendModelHookTestCreateUpdatePayload */
18
+ * @typedef {{id: string, model: FrontendModelBase}} FrontendModelHookTestCreateUpdatePayload */
19
19
  /**
20
20
  * Defines this typedef.
21
- @typedef {{id: string}} FrontendModelHookTestDestroyPayload */
21
+ * @typedef {{id: string}} FrontendModelHookTestDestroyPayload */
22
22
  /**
23
23
  * FakeSubscriptions type.
24
24
  * @typedef {object} FakeSubscriptions
@@ -251,7 +251,7 @@ async function classLifecycleScenario() {
251
251
  const eventModel = buildFakeModel("1", buildFakeSubscriptions())
252
252
  /**
253
253
  * Received events.
254
- @type {Array<FrontendModelHookTestCreateUpdatePayload | FrontendModelHookTestDestroyPayload>} */
254
+ * @type {Array<FrontendModelHookTestCreateUpdatePayload | FrontendModelHookTestDestroyPayload>} */
255
255
  const receivedEvents = []
256
256
  let connectedCount = 0
257
257
 
@@ -304,7 +304,7 @@ async function instanceLifecycleScenario() {
304
304
  const model = buildFakeModel("task-1", subscriptions)
305
305
  /**
306
306
  * Received events.
307
- @type {Array<FrontendModelHookTestCreateUpdatePayload | FrontendModelHookTestDestroyPayload>} */
307
+ * @type {Array<FrontendModelHookTestCreateUpdatePayload | FrontendModelHookTestDestroyPayload>} */
308
308
  const receivedEvents = []
309
309
  let connectedCount = 0
310
310
 
@@ -411,7 +411,7 @@ async function debounceUnmountScenario() {
411
411
  const model = buildFakeModel("task-1", instanceSubscriptions)
412
412
  /**
413
413
  * Received events.
414
- @type {Array<FrontendModelHookTestCreateUpdatePayload | FrontendModelHookTestDestroyPayload>} */
414
+ * @type {Array<FrontendModelHookTestCreateUpdatePayload | FrontendModelHookTestDestroyPayload>} */
415
415
  const receivedEvents = []
416
416
 
417
417
  /**
@@ -450,7 +450,7 @@ async function resubscribeInstanceScenario() {
450
450
  const secondModel = buildFakeModel("task-1", secondSubscriptions)
451
451
  /**
452
452
  * Received events.
453
- @type {Array<FrontendModelHookTestCreateUpdatePayload | FrontendModelHookTestDestroyPayload>} */
453
+ * @type {Array<FrontendModelHookTestCreateUpdatePayload | FrontendModelHookTestDestroyPayload>} */
454
454
  const receivedEvents = []
455
455
 
456
456
  /**
@@ -51,7 +51,7 @@ function isObjectLike(value) {
51
51
  function isArrayContaining(value) {
52
52
  return !!value && typeof value === "object" && (/**
53
53
  * Narrows the runtime value to the documented type.
54
- @type {?} */ (value)).__velociousMatcher === "arrayContaining"
54
+ * @type {?} */ (value)).__velociousMatcher === "arrayContaining"
55
55
  }
56
56
 
57
57
  /**
@@ -62,7 +62,7 @@ function isArrayContaining(value) {
62
62
  function isObjectContaining(value) {
63
63
  return !!value && typeof value === "object" && (/**
64
64
  * Narrows the runtime value to the documented type.
65
- @type {?} */ (value)).__velociousMatcher === "objectContaining"
65
+ * @type {?} */ (value)).__velociousMatcher === "objectContaining"
66
66
  }
67
67
 
68
68
  /**
@@ -108,16 +108,16 @@ function collectMatchDifferences(actual, expected, path, differences) {
108
108
  if (isObjectContaining(expected)) {
109
109
  collectMatchDifferences(actual, /**
110
110
  * Narrows the runtime value to the documented type.
111
- @type {?} */ (expected).value, path, differences)
111
+ * @type {?} */ (expected).value, path, differences)
112
112
  return
113
113
  }
114
114
 
115
115
  if (isArrayContaining(expected)) {
116
116
  const {matches} = matchArrayContaining(actual, /**
117
117
  * Narrows the runtime value to the documented type.
118
- @type {Array<?>} */ (/**
118
+ * @type {Array<?>} */ (/**
119
119
  * Narrows the runtime value to the documented type.
120
- @type {?} */ (expected).value))
120
+ * @type {?} */ (expected).value))
121
121
 
122
122
  if (!matches) {
123
123
  differences[path || "$"] = [expected, actual]
@@ -148,10 +148,10 @@ function collectMatchDifferences(actual, expected, path, differences) {
148
148
 
149
149
  const expectedObject = /**
150
150
  * Narrows the runtime value to the documented type.
151
- @type {Record<string, ?>} */ (expected)
151
+ * @type {Record<string, ?>} */ (expected)
152
152
  const actualObject = /**
153
153
  * Narrows the runtime value to the documented type.
154
- @type {Record<string, ?>} */ (actual)
154
+ * @type {Record<string, ?>} */ (actual)
155
155
 
156
156
  for (const key of Object.keys(expectedObject)) {
157
157
  const nextPath = path ? `${path}.${key}` : key
@@ -181,7 +181,7 @@ function collectMatchDifferences(actual, expected, path, differences) {
181
181
  function matchObject(actual, expected) {
182
182
  /**
183
183
  * Differences.
184
- @type {Record<string, Array<?>>} */
184
+ * @type {Record<string, Array<?>>} */
185
185
  const differences = {}
186
186
 
187
187
  collectMatchDifferences(actual, expected, "", differences)
@@ -201,7 +201,7 @@ function matchObject(actual, expected) {
201
201
  function matchArrayContaining(actual, expected) {
202
202
  /**
203
203
  * Differences.
204
- @type {Record<string, Array<?>>} */
204
+ * @type {Record<string, Array<?>>} */
205
205
  const differences = {}
206
206
 
207
207
  if (!Array.isArray(actual)) {
@@ -220,7 +220,7 @@ function matchArrayContaining(actual, expected) {
220
220
  if (isObjectContaining(expectedItem)) {
221
221
  const {matches} = matchObject(actual[i], /**
222
222
  * Narrows the runtime value to the documented type.
223
- @type {?} */ (expectedItem).value)
223
+ * @type {?} */ (expectedItem).value)
224
224
  if (matches) {
225
225
  matchedIndex = i
226
226
  break
@@ -231,7 +231,7 @@ function matchArrayContaining(actual, expected) {
231
231
  if (isArrayContaining(expectedItem)) {
232
232
  const {matches} = matchArrayContaining(actual[i], /**
233
233
  * Narrows the runtime value to the documented type.
234
- @type {?} */ (expectedItem).value)
234
+ * @type {?} */ (expectedItem).value)
235
235
  if (matches) {
236
236
  matchedIndex = i
237
237
  break
@@ -22,7 +22,7 @@ export default class Expect extends BaseExpect {
22
22
 
23
23
  /**
24
24
  * Narrows the runtime value to the documented type.
25
- @type {Array<Expect | ExpectToChange>} */
25
+ * @type {Array<Expect | ExpectToChange>} */
26
26
  this.expectations = []
27
27
  }
28
28
 
@@ -456,7 +456,7 @@ export default class Expect extends BaseExpect {
456
456
  if (isObjectContaining(result)) {
457
457
  const expectedValue = /**
458
458
  * Narrows the runtime value to the documented type.
459
- @type {?} */ (result).value
459
+ * @type {?} */ (result).value
460
460
  const {matches, differences} = matchObject(this._object, expectedValue)
461
461
  const objectPrint = formatValue(this._object)
462
462
  const expectedPrint = formatValue(expectedValue)
@@ -477,9 +477,9 @@ export default class Expect extends BaseExpect {
477
477
  if (isArrayContaining(result)) {
478
478
  const expectedValue = /**
479
479
  * Narrows the runtime value to the documented type.
480
- @type {Array<?>} */ (/**
480
+ * @type {Array<?>} */ (/**
481
481
  * Narrows the runtime value to the documented type.
482
- @type {?} */ (result).value)
482
+ * @type {?} */ (result).value)
483
483
  const {matches, differences} = matchArrayContaining(this._object, expectedValue)
484
484
  const objectPrint = formatValue(this._object)
485
485
  const expectedPrint = formatValue(expectedValue)
@@ -745,11 +745,11 @@ export default class Expect extends BaseExpect {
745
745
 
746
746
  /**
747
747
  * Differences.
748
- @type {Record<string, Array<?>>} */
748
+ * @type {Record<string, Array<?>>} */
749
749
  const differences = {}
750
750
  const objectAsRecord = /**
751
751
  * Narrows the runtime value to the documented type.
752
- @type {Record<string, ?>} */ (this._object)
752
+ * @type {Record<string, ?>} */ (this._object)
753
753
 
754
754
  for (const key in result) {
755
755
  const value = result[key]
@@ -758,7 +758,7 @@ export default class Expect extends BaseExpect {
758
758
 
759
759
  const objectValue = /**
760
760
  * Narrows the runtime value to the documented type.
761
- @type {() => ?} */ (objectAsRecord[key])()
761
+ * @type {() => ?} */ (objectAsRecord[key])()
762
762
 
763
763
  if (value != objectValue) {
764
764
  differences[key] = [value, objectValue]
@@ -39,42 +39,42 @@ export default class TestFilesFinder {
39
39
 
40
40
  /**
41
41
  * Narrows the runtime value to the documented type.
42
- @type {string[]} */
42
+ * @type {string[]} */
43
43
  this.foundFiles = []
44
44
 
45
45
  /**
46
46
  * Narrows the runtime value to the documented type.
47
- @type {Record<number, Promise<void>>} */
47
+ * @type {Record<number, Promise<void>>} */
48
48
  this.findingPromises = {}
49
49
 
50
50
  /**
51
51
  * Narrows the runtime value to the documented type.
52
- @type {string[]} */
52
+ * @type {string[]} */
53
53
  this.testArgs = this.processArgs.filter((processArg, index) => index != 0)
54
54
 
55
55
  /**
56
56
  * Narrows the runtime value to the documented type.
57
- @type {string[]} */
57
+ * @type {string[]} */
58
58
  this.directoryArgs = []
59
59
 
60
60
  /**
61
61
  * Narrows the runtime value to the documented type.
62
- @type {string[]} */
62
+ * @type {string[]} */
63
63
  this.directoryFullPaths = []
64
64
 
65
65
  /**
66
66
  * Narrows the runtime value to the documented type.
67
- @type {string[]} */
67
+ * @type {string[]} */
68
68
  this.fileArgs = []
69
69
 
70
70
  /**
71
71
  * Narrows the runtime value to the documented type.
72
- @type {string[]} */
72
+ * @type {string[]} */
73
73
  this.explicitFiles = []
74
74
 
75
75
  /**
76
76
  * Narrows the runtime value to the documented type.
77
- @type {Record<string, number[]>} */
77
+ * @type {Record<string, number[]>} */
78
78
  this.lineFiltersByFile = {}
79
79
 
80
80
  this._argsPrepared = false
@@ -74,11 +74,11 @@ export function parseFilters(processArgs) {
74
74
 
75
75
  /**
76
76
  * Defines groups.
77
- @type {number | undefined} */
77
+ * @type {number | undefined} */
78
78
  let groups
79
79
  /**
80
80
  * Defines groupNumber.
81
- @type {number | undefined} */
81
+ * @type {number | undefined} */
82
82
  let groupNumber
83
83
 
84
84
  let inRestArgs = false
@@ -39,11 +39,11 @@ function runWithTimeout(promise, timeoutMs, testDescription) {
39
39
 
40
40
  /**
41
41
  * ConsoleMethodName type.
42
- @typedef {"log" | "info" | "warn" | "error" | "debug"} ConsoleMethodName */
42
+ * @typedef {"log" | "info" | "warn" | "error" | "debug"} ConsoleMethodName */
43
43
 
44
44
  /**
45
45
  * Captured console methods.
46
- @type {ConsoleMethodName[]} */
46
+ * @type {ConsoleMethodName[]} */
47
47
  const CAPTURED_CONSOLE_METHODS = ["log", "info", "warn", "error", "debug"]
48
48
 
49
49
  /**
@@ -149,12 +149,12 @@ function toFileSlug(value) {
149
149
  export default class TestRunner {
150
150
  /**
151
151
  * Narrows the runtime value to the documented type.
152
- @type {ActiveAfterAllScopeEntry[]} */
152
+ * @type {ActiveAfterAllScopeEntry[]} */
153
153
  _activeAfterAllScopes
154
154
 
155
155
  /**
156
156
  * Narrows the runtime value to the documented type.
157
- @type {FailedTestDetail[]} */
157
+ * @type {FailedTestDetail[]} */
158
158
  _failedTestDetails
159
159
 
160
160
  /**
@@ -343,7 +343,7 @@ export default class TestRunner {
343
343
  getExcludeTagSet() {
344
344
  /**
345
345
  * Config tags.
346
- @type {string[]} */
346
+ * @type {string[]} */
347
347
  const configTags = Array.isArray(testConfig.excludeTags) ? testConfig.excludeTags : []
348
348
 
349
349
  return new Set([...this._excludeTags, ...configTags])
@@ -379,7 +379,7 @@ export default class TestRunner {
379
379
  const testData = tests.tests[testDescription]
380
380
  const testArgs = /**
381
381
  * Narrows the runtime value to the documented type.
382
- @type {TestArgs} */ (Object.assign({}, testData.args))
382
+ * @type {TestArgs} */ (Object.assign({}, testData.args))
383
383
  const includeByLine = lineMatchedInScope || this.matchesLineFilter(testData)
384
384
 
385
385
  if (this._onlyFocussed && !testArgs.focus) continue
@@ -719,7 +719,7 @@ export default class TestRunner {
719
719
 
720
720
  if (!shouldRunAnyTests) return
721
721
 
722
- /** Scope entry. @type {ActiveAfterAllScopeEntry} */
722
+ /** @type {ActiveAfterAllScopeEntry} */
723
723
  const scopeEntry = {tests, afterAllsRun: false}
724
724
  this._activeAfterAllScopes.push(scopeEntry)
725
725
 
@@ -732,7 +732,7 @@ export default class TestRunner {
732
732
  const testData = tests.tests[testDescription]
733
733
  const testArgs = /**
734
734
  * Narrows the runtime value to the documented type.
735
- @type {TestArgs} */ (Object.assign({}, testData.args))
735
+ * @type {TestArgs} */ (Object.assign({}, testData.args))
736
736
  const includeByLine = scopeLineMatch || this.matchesLineFilter(testData)
737
737
 
738
738
  if (this._onlyFocussed && !testArgs.focus) continue
@@ -757,7 +757,7 @@ export default class TestRunner {
757
757
  let attemptNumber = 1
758
758
  /**
759
759
  * Attempt console outputs.
760
- @type {AttemptConsoleOutput[]} */
760
+ * @type {AttemptConsoleOutput[]} */
761
761
  const attemptConsoleOutputs = []
762
762
 
763
763
  console.log(`${leftPadding}it ${testDescription}`)
@@ -766,15 +766,15 @@ export default class TestRunner {
766
766
  let shouldRetry = false
767
767
  /**
768
768
  * Defines caughtError.
769
- @type {?} */
769
+ * @type {?} */
770
770
  let caughtError
771
771
  /**
772
772
  * Defines failedError.
773
- @type {?} */
773
+ * @type {?} */
774
774
  let failedError
775
775
  /**
776
776
  * Defines lastError.
777
- @type {?} */
777
+ * @type {?} */
778
778
  let lastError
779
779
  let willRetry = false
780
780
  const stopConsoleCapture = this.startConsoleCapture({
@@ -1120,17 +1120,17 @@ export default class TestRunner {
1120
1120
  startConsoleCapture({passthrough = false} = {}) {
1121
1121
  /**
1122
1122
  * Lines.
1123
- @type {string[]} */
1123
+ * @type {string[]} */
1124
1124
  const lines = []
1125
1125
  /**
1126
1126
  * Console object.
1127
- @type {Record<ConsoleMethodName, (...args: Array<?>) => void>} */
1127
+ * @type {Record<ConsoleMethodName, (...args: Array<?>) => void>} */
1128
1128
  const consoleObject = /**
1129
1129
  * Narrows the runtime value to the documented type.
1130
- @type {Record<ConsoleMethodName, (...args: Array<?>) => void>} */ (console)
1130
+ * @type {Record<ConsoleMethodName, (...args: Array<?>) => void>} */ (console)
1131
1131
  /**
1132
1132
  * Original console methods.
1133
- @type {Record<ConsoleMethodName, (...args: Array<?>) => void>} */
1133
+ * @type {Record<ConsoleMethodName, (...args: Array<?>) => void>} */
1134
1134
  const originalConsoleMethods = {
1135
1135
  debug: consoleObject.debug.bind(console),
1136
1136
  error: consoleObject.error.bind(console),
@@ -140,7 +140,7 @@ export default class TestSuiteSplitter {
140
140
  distributeGreedily(sortedFiles) {
141
141
  /**
142
142
  * Buckets.
143
- @type {GroupBucket[]} */
143
+ * @type {GroupBucket[]} */
144
144
  const buckets = []
145
145
 
146
146
  for (let i = 0; i < this._groups; i++) {
@@ -8,25 +8,25 @@ import {arrayContaining, objectContaining} from "./expect-utils.js"
8
8
 
9
9
  /**
10
10
  * Tests.
11
- @type {import("./test-runner.js").TestsArgument} */
11
+ * @type {import("./test-runner.js").TestsArgument} */
12
12
  const tests = {
13
13
  /**
14
14
  * Narrows the runtime value to the documented type.
15
- @type {import("./test-runner.js").AfterBeforeEachCallbackObjectType[]} */
15
+ * @type {import("./test-runner.js").AfterBeforeEachCallbackObjectType[]} */
16
16
  afterEaches: [],
17
17
  /**
18
18
  * Narrows the runtime value to the documented type.
19
- @type {import("./test-runner.js").BeforeAfterAllCallbackObjectType[]} */
19
+ * @type {import("./test-runner.js").BeforeAfterAllCallbackObjectType[]} */
20
20
  afterAlls: [],
21
21
  args: {},
22
22
 
23
23
  /**
24
24
  * Narrows the runtime value to the documented type.
25
- @type {import("./test-runner.js").BeforeAfterAllCallbackObjectType[]} */
25
+ * @type {import("./test-runner.js").BeforeAfterAllCallbackObjectType[]} */
26
26
  beforeAlls: [],
27
27
  /**
28
28
  * Narrows the runtime value to the documented type.
29
- @type {import("./test-runner.js").AfterBeforeEachCallbackObjectType[]} */
29
+ * @type {import("./test-runner.js").AfterBeforeEachCallbackObjectType[]} */
30
30
  beforeEaches: [],
31
31
  filePath: undefined,
32
32
  line: undefined,
@@ -99,7 +99,7 @@ function normalizeTags(tags) {
99
99
 
100
100
  /**
101
101
  * Test config.
102
- @type {VelociousTestConfig} */
102
+ * @type {VelociousTestConfig} */
103
103
  const testConfig = {
104
104
  consoleOutput: "failure",
105
105
  failedConsoleOutputMaxLines: 200,
@@ -212,7 +212,7 @@ function afterAll(callback) {
212
212
  async function describe(description, arg1, arg2) {
213
213
  /**
214
214
  * Defines testArgs.
215
- @type {Record<string, ?>} */
215
+ * @type {Record<string, ?>} */
216
216
  let testArgs, testFunction
217
217
 
218
218
  if (typeof arg2 == "function") {
@@ -278,23 +278,23 @@ function it(description, arg1, arg2) {
278
278
  const currentTest = currentPath[currentPath.length - 1]
279
279
  /**
280
280
  * Defines testArgs.
281
- @type {Record<string, ?>} */
281
+ * @type {Record<string, ?>} */
282
282
  let testArgs
283
283
 
284
284
  /**
285
285
  * Defines testFunction.
286
- @type {() => (void|Promise<void>)} */
286
+ * @type {() => (void|Promise<void>)} */
287
287
  let testFunction
288
288
 
289
289
  if (typeof arg1 == "function") {
290
290
  testFunction = /**
291
291
  * Narrows the runtime value to the documented type.
292
- @type {() => (void|Promise<void>)} */ (arg1)
292
+ * @type {() => (void|Promise<void>)} */ (arg1)
293
293
  testArgs = {}
294
294
  } else if (typeof arg2 == "function") {
295
295
  testFunction = /**
296
296
  * Narrows the runtime value to the documented type.
297
- @type {() => (void|Promise<void>)} */ (arg2)
297
+ * @type {() => (void|Promise<void>)} */ (arg2)
298
298
  testArgs = arg1
299
299
  } else {
300
300
  throw new Error(`Invalid arguments for it: ${description}, ${arg1}`)
@@ -322,23 +322,23 @@ function it(description, arg1, arg2) {
322
322
  function fit(description, arg1, arg2) {
323
323
  /**
324
324
  * Defines testArgs.
325
- @type {Record<string, ?>} */
325
+ * @type {Record<string, ?>} */
326
326
  let testArgs
327
327
 
328
328
  /**
329
329
  * Defines testFunction.
330
- @type {() => (void|Promise<void>)} */
330
+ * @type {() => (void|Promise<void>)} */
331
331
  let testFunction
332
332
 
333
333
  if (typeof arg1 == "function") {
334
334
  testFunction = /**
335
335
  * Narrows the runtime value to the documented type.
336
- @type {() => (void|Promise<void>)} */ (arg1)
336
+ * @type {() => (void|Promise<void>)} */ (arg1)
337
337
  testArgs = {focus: true}
338
338
  } else if (typeof arg2 == "function") {
339
339
  testFunction = /**
340
340
  * Narrows the runtime value to the documented type.
341
- @type {() => (void|Promise<void>)} */ (arg2)
341
+ * @type {() => (void|Promise<void>)} */ (arg2)
342
342
  testArgs = Object.assign({focus: true}, arg1)
343
343
  } else {
344
344
  throw new Error(`Invalid arguments for it: ${description}, ${arg1}`)
@@ -107,7 +107,7 @@ function relativeApplicationPath(sourcePath, applicationDirectory) {
107
107
  export default class BacktraceCleaner {
108
108
  /**
109
109
  * Framework source directory.
110
- @type {string | undefined} */
110
+ * @type {string | undefined} */
111
111
  frameworkSourceDirectory = undefined
112
112
 
113
113
  /**
@@ -51,7 +51,7 @@ function minifiedStringify(value) {
51
51
 
52
52
  /**
53
53
  * Output.
54
- @type {Record<string, ?>} */
54
+ * @type {Record<string, ?>} */
55
55
  const output = {}
56
56
 
57
57
  for (const key of Object.keys(current)) {
@@ -52,5 +52,5 @@ export function defineModelScope({callback, modelClass, startQuery}) {
52
52
  export function isModelScopeDescriptor(value) {
53
53
  return Boolean(value && typeof value === "object" && /**
54
54
  * Narrows the runtime value to the documented type.
55
- @type {Record<string, ?>} */ (value)[MODEL_SCOPE_DESCRIPTOR_MARKER] === true)
55
+ * @type {Record<string, ?>} */ (value)[MODEL_SCOPE_DESCRIPTOR_MARKER] === true)
56
56
  }