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
@@ -3,7 +3,6 @@
3
3
  import * as inflection from "inflection"
4
4
  import Controller from "./controller.js"
5
5
  import Response from "./http-server/client/response.js"
6
- import FrontendModelBaseResource from "./frontend-model-resource/base-resource.js"
7
6
  import {frontendModelResourceClassFromDefinition, frontendModelResourceConfigurationFromDefinition, frontendModelResourcePath, frontendModelResourcesForBackendProject} from "./frontend-models/resource-definition.js"
8
7
  import {normalizeGroup as normalizeQueryGroup, normalizeJoins as normalizeQueryJoins, normalizePluck as normalizeQueryPluck, normalizePreload as normalizeQueryPreload, normalizeSearchOperator as normalizeQuerySearchOperator, normalizeSort as normalizeQuerySort} from "./frontend-models/query.js"
9
8
  import {assignSafeProperty, deserializeFrontendModelTransportValue, isBackendModelInstance, serializeFrontendModelTransportValue} from "./frontend-models/transport-serialization.js"
@@ -75,7 +74,7 @@ function normalizeFrontendModelSelect(select, rootModelName = null) {
75
74
 
76
75
  /**
77
76
  * Normalized.
78
- @type {Record<string, string[]>} */
77
+ * @type {Record<string, string[]>} */
79
78
  const normalized = {}
80
79
 
81
80
  for (const [modelName, selectValue] of Object.entries(select)) {
@@ -152,7 +151,7 @@ const frontendModelDebugErrorEnvironments = new Set(["development", "test"])
152
151
  * @returns {import("./database/query/model-class-query.js").default & {[frontendModelJoinedPathsSymbol]?: Set<string>, [frontendModelGroupedColumnsSymbol]?: Set<string>}} - Query metadata access helper.
153
152
  */
154
153
  function frontendModelQueryMetadata(query) {
155
- return /** Narrows the runtime value to the documented type. @type {import("./database/query/model-class-query.js").default & {[frontendModelJoinedPathsSymbol]?: Set<string>, [frontendModelGroupedColumnsSymbol]?: Set<string>}} */ (query)
154
+ return /** @type {import("./database/query/model-class-query.js").default & {[frontendModelJoinedPathsSymbol]?: Set<string>, [frontendModelGroupedColumnsSymbol]?: Set<string>}} */ (query)
156
155
  }
157
156
 
158
157
  /**
@@ -191,9 +190,9 @@ function frontendModelValidationErrorForError(error) {
191
190
  function frontendModelErrorHasVelociousMetadata(error) {
192
191
  return Boolean(error && typeof error === "object" && /**
193
192
  * Types the following value.
194
- @type {?} */ (error).velocious && typeof /**
193
+ * @type {?} */ (error).velocious && typeof /**
195
194
  * Types the following value.
196
- @type {?} */ (error).velocious === "object")
195
+ * @type {?} */ (error).velocious === "object")
197
196
  }
198
197
 
199
198
  /**
@@ -203,9 +202,9 @@ function frontendModelErrorHasVelociousMetadata(error) {
203
202
  */
204
203
  function frontendModelVelociousMetadataForError(error) {
205
204
  if (!frontendModelErrorHasVelociousMetadata(error)) return null
206
- return /** Narrows the runtime value to the documented type. @type {Record<string, ?>} */ (/**
207
- * Types the following value.
208
- @type {?} */ (error).velocious)
205
+ return /** @type {Record<string, ?>} */ (/**
206
+ * Types the following value.
207
+ * @type {?} */ (error).velocious)
209
208
  }
210
209
 
211
210
  /**
@@ -287,7 +286,7 @@ function normalizeFrontendModelSearches(searches) {
287
286
 
288
287
  /**
289
288
  * Normalized.
290
- @type {FrontendModelSearch[]} */
289
+ * @type {FrontendModelSearch[]} */
291
290
  const normalized = []
292
291
 
293
292
  for (const search of searches) {
@@ -420,11 +419,11 @@ function normalizeFrontendModelDistinct(distinct) {
420
419
  function buildFrontendModelJoinObjectFromPath(path) {
421
420
  /**
422
421
  * Join object.
423
- @type {Record<string, ?>} */
422
+ * @type {Record<string, ?>} */
424
423
  const joinObject = {}
425
424
  /**
426
425
  * Current node.
427
- @type {Record<string, ?>} */
426
+ * @type {Record<string, ?>} */
428
427
  let currentNode = joinObject
429
428
 
430
429
  for (const relationshipName of path) {
@@ -511,15 +510,15 @@ function frontendModelMutationAttributes(params) {
511
510
  export default class FrontendModelController extends Controller {
512
511
  /**
513
512
  * Frontend model params.
514
- @type {Record<string, ?> | undefined} */
513
+ * @type {Record<string, ?> | undefined} */
515
514
  _frontendModelParams = undefined
516
515
  /**
517
516
  * Frontend model params override.
518
- @type {Record<string, ?> | undefined} */
517
+ * @type {Record<string, ?> | undefined} */
519
518
  _frontendModelParamsOverride = undefined
520
519
  /**
521
520
  * Frontend model ability override.
522
- @type {import("./authorization/ability.js").default | undefined} */
521
+ * @type {import("./authorization/ability.js").default | undefined} */
523
522
  _frontendModelAbilityOverride = undefined
524
523
 
525
524
  /**
@@ -533,7 +532,7 @@ export default class FrontendModelController extends Controller {
533
532
 
534
533
  this._frontendModelParams ||= /**
535
534
  * Types the following value.
536
- @type {Record<string, ?>} */ (deserializeFrontendModelTransportValue(this.params()))
535
+ * @type {Record<string, ?>} */ (deserializeFrontendModelTransportValue(this.params()))
537
536
 
538
537
  return this._frontendModelParams
539
538
  }
@@ -585,7 +584,7 @@ export default class FrontendModelController extends Controller {
585
584
  })
586
585
  /**
587
586
  * Previous ability override.
588
- @type {import("./authorization/ability.js").default | undefined} */
587
+ * @type {import("./authorization/ability.js").default | undefined} */
589
588
  const previousAbilityOverride = this._frontendModelAbilityOverride
590
589
 
591
590
  this._frontendModelAbilityOverride = ability
@@ -825,7 +824,7 @@ export default class FrontendModelController extends Controller {
825
824
  modelClass: targetModelClass,
826
825
  preload: /**
827
826
  * Types the following value.
828
- @type {import("./database/query/index.js").NestedPreloadRecord} */ (relationshipPreload)
827
+ * @type {import("./database/query/index.js").NestedPreloadRecord} */ (relationshipPreload)
829
828
  })
830
829
  }
831
830
  }
@@ -917,7 +916,7 @@ export default class FrontendModelController extends Controller {
917
916
 
918
917
  /**
919
918
  * Runs frontend model resource instance.
920
- * @returns {FrontendModelBaseResource} - Backend resource instance for current frontend-model action.
919
+ * @returns {import("./frontend-model-resource/base-resource.js").default} - Backend resource instance for current frontend-model action.
921
920
  */
922
921
  frontendModelResourceInstance() {
923
922
  const frontendModelResource = this.frontendModelResourceConfiguration()
@@ -1218,7 +1217,7 @@ export default class FrontendModelController extends Controller {
1218
1217
 
1219
1218
  /**
1220
1219
  * Entries.
1221
- @type {Array<{attributeName: string, relationshipName: string, where?: Record<string, ?>}>} */
1220
+ * @type {Array<{attributeName: string, relationshipName: string, where?: Record<string, ?>}>} */
1222
1221
  const entries = []
1223
1222
 
1224
1223
  for (const entry of raw) {
@@ -1285,16 +1284,16 @@ export default class FrontendModelController extends Controller {
1285
1284
  _frontendModelCollectRecordsForName(rootModels, modelName) {
1286
1285
  /**
1287
1286
  * Out.
1288
- @type {import("./database/record/index.js").default[]} */
1287
+ * @type {import("./database/record/index.js").default[]} */
1289
1288
  const out = []
1290
1289
  /**
1291
1290
  * Seen.
1292
- @type {Set<import("./database/record/index.js").default>} */
1291
+ * @type {Set<import("./database/record/index.js").default>} */
1293
1292
  const seen = new Set()
1294
1293
 
1295
1294
  /**
1296
1295
  * Walk.
1297
- @param {import("./database/record/index.js").default | null | undefined} record */
1296
+ * @param {import("./database/record/index.js").default | null | undefined} record */
1298
1297
  const walk = (record) => {
1299
1298
  if (!record || typeof record !== "object") return
1300
1299
  if (seen.has(record)) return
@@ -1404,7 +1403,7 @@ export default class FrontendModelController extends Controller {
1404
1403
 
1405
1404
  /**
1406
1405
  * Entries.
1407
- @type {Array<{modelName: string, actions: string[]}>} */
1406
+ * @type {Array<{modelName: string, actions: string[]}>} */
1408
1407
  const entries = []
1409
1408
 
1410
1409
  for (const entry of raw) {
@@ -1415,7 +1414,7 @@ export default class FrontendModelController extends Controller {
1415
1414
  const actions = entry.actions.filter(
1416
1415
  (/**
1417
1416
  * Types the following value.
1418
- @type {?} */ action) => typeof action === "string" && action.length > 0
1417
+ * @type {?} */ action) => typeof action === "string" && action.length > 0
1419
1418
  )
1420
1419
 
1421
1420
  if (actions.length === 0) continue
@@ -1515,7 +1514,7 @@ export default class FrontendModelController extends Controller {
1515
1514
  for (const entry of withCount) {
1516
1515
  /**
1517
1516
  * Spec.
1518
- @type {Record<string, boolean | {relationship?: string, where?: Record<string, ?>}>} */
1517
+ * @type {Record<string, boolean | {relationship?: string, where?: Record<string, ?>}>} */
1519
1518
  const spec = {}
1520
1519
  spec[entry.attributeName] = {relationship: entry.relationshipName, where: entry.where}
1521
1520
  query.withCount(spec)
@@ -1579,7 +1578,7 @@ export default class FrontendModelController extends Controller {
1579
1578
  const pluckQuery = query.clone()
1580
1579
  /**
1581
1580
  * Aliases.
1582
- @type {string[]} */
1581
+ * @type {string[]} */
1583
1582
  const aliases = []
1584
1583
  const queryMetadata = frontendModelQueryMetadata(query)
1585
1584
  const pluckQueryMetadata = frontendModelQueryMetadata(pluckQuery)
@@ -1619,13 +1618,13 @@ export default class FrontendModelController extends Controller {
1619
1618
 
1620
1619
  return rows.map((row) => /**
1621
1620
  * Types the following value.
1622
- @type {Record<string, ?>} */ (row)[alias])
1621
+ * @type {Record<string, ?>} */ (row)[alias])
1623
1622
  }
1624
1623
 
1625
1624
  return rows.map((row) => {
1626
1625
  const rowHash = /**
1627
1626
  * Types the following value.
1628
- @type {Record<string, ?>} */ (row)
1627
+ * @type {Record<string, ?>} */ (row)
1629
1628
 
1630
1629
  return aliases.map((alias) => rowHash[alias])
1631
1630
  })
@@ -2071,7 +2070,7 @@ export default class FrontendModelController extends Controller {
2071
2070
  const resource = this.frontendModelResourceInstance()
2072
2071
  const resourceClass = /**
2073
2072
  * Types the following value.
2074
- @type {typeof import("./frontend-model-resource/base-resource.js").default} */ (resource.constructor)
2073
+ * @type {typeof import("./frontend-model-resource/base-resource.js").default} */ (resource.constructor)
2075
2074
  const translatedSet = new Set(resourceClass.translatedAttributes || [])
2076
2075
  let needsTranslations = false
2077
2076
 
@@ -2079,9 +2078,9 @@ export default class FrontendModelController extends Controller {
2079
2078
  const hookName = `${attributeName}AttributeSelected`
2080
2079
  const dynamicResource = /**
2081
2080
  * Types the following value.
2082
- @type {Record<string, ?>} */ (/**
2081
+ * @type {Record<string, ?>} */ (/**
2083
2082
  * Types the following value.
2084
- @type {?} */ (resource))
2083
+ * @type {?} */ (resource))
2085
2084
 
2086
2085
  if (typeof dynamicResource[hookName] === "function") {
2087
2086
  const result = dynamicResource[hookName]({query})
@@ -2251,7 +2250,7 @@ export default class FrontendModelController extends Controller {
2251
2250
 
2252
2251
  const config = /**
2253
2252
  * Types the following value.
2254
- @type {Record<string, ?>} */ (entry)
2253
+ * @type {Record<string, ?>} */ (entry)
2255
2254
 
2256
2255
  if (config && config.selectedByDefault === false) return false
2257
2256
 
@@ -2259,7 +2258,7 @@ export default class FrontendModelController extends Controller {
2259
2258
  })
2260
2259
  .map((entry) => typeof entry === "string" ? entry : /**
2261
2260
  * Types the following value.
2262
- @type {Record<string, ?>} */ (entry).name)
2261
+ * @type {Record<string, ?>} */ (entry).name)
2263
2262
  }
2264
2263
 
2265
2264
  if (typeof attributes === "object") {
@@ -2267,7 +2266,7 @@ export default class FrontendModelController extends Controller {
2267
2266
  .filter(([, config]) => {
2268
2267
  if (!config || typeof config !== "object") return true
2269
2268
 
2270
- return /** Narrows the runtime value to the documented type. @type {Record<string, ?>} */ (config).selectedByDefault !== false
2269
+ return /** @type {Record<string, ?>} */ (config).selectedByDefault !== false
2271
2270
  })
2272
2271
  .map(([name]) => name)
2273
2272
  }
@@ -2291,20 +2290,20 @@ export default class FrontendModelController extends Controller {
2291
2290
  .filter((entry) => {
2292
2291
  if (typeof entry !== "object" || !entry) return false
2293
2292
 
2294
- return /** Narrows the runtime value to the documented type. @type {Record<string, ?>} */ (entry).selectedByDefault === false
2293
+ return /** @type {Record<string, ?>} */ (entry).selectedByDefault === false
2295
2294
  })
2296
2295
  .map((entry) => /**
2297
2296
  * Types the following value.
2298
- @type {Record<string, ?>} */ (/**
2297
+ * @type {Record<string, ?>} */ (/**
2299
2298
  * Types the following value.
2300
- @type {?} */ (entry)).name)
2299
+ * @type {?} */ (entry)).name)
2301
2300
  }
2302
2301
 
2303
2302
  if (typeof attributes === "object") {
2304
2303
  return Object.entries(attributes)
2305
2304
  .filter(([, config]) => typeof config === "object" && config && /**
2306
2305
  * Types the following value.
2307
- @type {Record<string, ?>} */ (config).selectedByDefault === false)
2306
+ * @type {Record<string, ?>} */ (config).selectedByDefault === false)
2308
2307
  .map(([name]) => name)
2309
2308
  }
2310
2309
 
@@ -2319,7 +2318,7 @@ export default class FrontendModelController extends Controller {
2319
2318
  async serializeFrontendModelAttributes(model) {
2320
2319
  const modelClass = /**
2321
2320
  * Types the following value.
2322
- @type {typeof import("./database/record/index.js").default} */ (model.constructor)
2321
+ * @type {typeof import("./database/record/index.js").default} */ (model.constructor)
2323
2322
  const modelAttributes = model.attributes()
2324
2323
  const selectedAttributes = this.frontendModelEffectiveSelectedAttributesForModelClass(modelClass, Object.keys(modelAttributes))
2325
2324
  const defaultAttributes = this.frontendModelDefaultAttributesForModelClass(modelClass)
@@ -2340,9 +2339,9 @@ export default class FrontendModelController extends Controller {
2340
2339
 
2341
2340
  return resourceInstance && typeof /**
2342
2341
  * Types the following value.
2343
- @type {Record<string, ?>} */ (/**
2342
+ * @type {Record<string, ?>} */ (/**
2344
2343
  * Types the following value.
2345
- @type {?} */ (resourceInstance))[methodName] === "function"
2344
+ * @type {?} */ (resourceInstance))[methodName] === "function"
2346
2345
  }
2347
2346
 
2348
2347
  /**
@@ -2377,9 +2376,9 @@ export default class FrontendModelController extends Controller {
2377
2376
 
2378
2377
  return await /**
2379
2378
  * Types the following value.
2380
- @type {Record<string, Function>} */ (/**
2379
+ * @type {Record<string, Function>} */ (/**
2381
2380
  * Types the following value.
2382
- @type {?} */ (resourceInstance))[methodName](model)
2381
+ * @type {?} */ (resourceInstance))[methodName](model)
2383
2382
  }
2384
2383
 
2385
2384
  // Fall back to model method
@@ -2400,7 +2399,7 @@ export default class FrontendModelController extends Controller {
2400
2399
  const attributeExists = (attributeName) => {
2401
2400
  return (attributeName in modelAttributes) || (attributeName in /**
2402
2401
  * Types the following value.
2403
- @type {Record<string, ?>} */ (model)) || resourceHasAttribute(attributeName)
2402
+ * @type {Record<string, ?>} */ (model)) || resourceHasAttribute(attributeName)
2404
2403
  }
2405
2404
 
2406
2405
  if (!selectedAttributes) {
@@ -2425,7 +2424,7 @@ export default class FrontendModelController extends Controller {
2425
2424
 
2426
2425
  /**
2427
2426
  * Serialized attributes.
2428
- @type {Record<string, ?>} */
2427
+ * @type {Record<string, ?>} */
2429
2428
  const serializedAttributes = {}
2430
2429
 
2431
2430
  for (const attributeName of selectedAttributes) {
@@ -2452,7 +2451,7 @@ export default class FrontendModelController extends Controller {
2452
2451
  const backendProjects = configuration.getBackendProjects?.() || []
2453
2452
  const modelClassName = /**
2454
2453
  * Types the following value.
2455
- @type {typeof import("./database/record/index.js").default} */ (model.constructor).getModelName()
2454
+ * @type {typeof import("./database/record/index.js").default} */ (model.constructor).getModelName()
2456
2455
 
2457
2456
  for (const backendProject of backendProjects) {
2458
2457
  const resources = frontendModelResourcesForBackendProject(backendProject)
@@ -2466,12 +2465,12 @@ export default class FrontendModelController extends Controller {
2466
2465
  locals: this.currentAbility()?.getLocals() || {},
2467
2466
  modelClass: /**
2468
2467
  * Types the following value.
2469
- @type {typeof import("./database/record/index.js").default} */ (model.constructor),
2468
+ * @type {typeof import("./database/record/index.js").default} */ (model.constructor),
2470
2469
  modelName: modelClassName,
2471
2470
  params: {},
2472
2471
  resourceConfiguration: /**
2473
2472
  * Types the following value.
2474
- @type {import("./configuration-types.js").FrontendModelResourceConfiguration | undefined} */ (typeof resourceClass.resourceConfig === "function" ? resourceClass.resourceConfig() : undefined)
2473
+ * @type {import("./configuration-types.js").FrontendModelResourceConfiguration | undefined} */ (typeof resourceClass.resourceConfig === "function" ? resourceClass.resourceConfig() : undefined)
2475
2474
  })
2476
2475
  }
2477
2476
  }
@@ -2492,13 +2491,13 @@ export default class FrontendModelController extends Controller {
2492
2491
 
2493
2492
  /**
2494
2493
  * Models by class.
2495
- @type {Map<typeof import("./database/record/index.js").default, import("./database/record/index.js").default[]>} */
2494
+ * @type {Map<typeof import("./database/record/index.js").default, import("./database/record/index.js").default[]>} */
2496
2495
  const modelsByClass = new Map()
2497
2496
 
2498
2497
  for (const model of models) {
2499
2498
  const relatedModelClass = /**
2500
2499
  * Types the following value.
2501
- @type {typeof import("./database/record/index.js").default} */ (model.constructor)
2500
+ * @type {typeof import("./database/record/index.js").default} */ (model.constructor)
2502
2501
  const existingModelsForClass = modelsByClass.get(relatedModelClass) || []
2503
2502
 
2504
2503
  existingModelsForClass.push(model)
@@ -2507,11 +2506,11 @@ export default class FrontendModelController extends Controller {
2507
2506
 
2508
2507
  /**
2509
2508
  * Authorized ids by class.
2510
- @type {Map<typeof import("./database/record/index.js").default, Set<string>>} */
2509
+ * @type {Map<typeof import("./database/record/index.js").default, Set<string>>} */
2511
2510
  const authorizedIdsByClass = new Map()
2512
2511
  /**
2513
2512
  * Primary keys by class.
2514
- @type {Map<typeof import("./database/record/index.js").default, string>} */
2513
+ * @type {Map<typeof import("./database/record/index.js").default, string>} */
2515
2514
  const primaryKeysByClass = new Map()
2516
2515
 
2517
2516
  for (const [relatedModelClass, relatedModels] of modelsByClass.entries()) {
@@ -2553,7 +2552,7 @@ export default class FrontendModelController extends Controller {
2553
2552
  return models.filter((model) => {
2554
2553
  const relatedModelClass = /**
2555
2554
  * Types the following value.
2556
- @type {typeof import("./database/record/index.js").default} */ (model.constructor)
2555
+ * @type {typeof import("./database/record/index.js").default} */ (model.constructor)
2557
2556
  const authorizedIds = authorizedIdsByClass.get(relatedModelClass)
2558
2557
  const primaryKey = primaryKeysByClass.get(relatedModelClass)
2559
2558
 
@@ -2575,7 +2574,7 @@ export default class FrontendModelController extends Controller {
2575
2574
  isSerializableFrontendModel(value) {
2576
2575
  return Boolean(value && typeof value === "object" && typeof /**
2577
2576
  * Types the following value.
2578
- @type {?} */ (value).attributes === "function")
2577
+ * @type {?} */ (value).attributes === "function")
2579
2578
  }
2580
2579
 
2581
2580
  /**
@@ -2588,22 +2587,22 @@ export default class FrontendModelController extends Controller {
2588
2587
 
2589
2588
  /**
2590
2589
  * Preloaded relationships per model.
2591
- @type {Array<Record<string, ?>>} */
2590
+ * @type {Array<Record<string, ?>>} */
2592
2591
  const preloadedRelationshipsPerModel = Array.from({length: models.length}, () => ({}))
2593
2592
 
2594
2593
  /**
2595
2594
  * Collection relationship entries.
2596
- @type {Array<{loadedModels: import("./database/record/index.js").default[], modelIndex: number, relationshipName: string}>} */
2595
+ * @type {Array<{loadedModels: import("./database/record/index.js").default[], modelIndex: number, relationshipName: string}>} */
2597
2596
  const collectionRelationshipEntries = []
2598
2597
  /**
2599
2598
  * Singular relationship entries.
2600
- @type {Array<{loadedModel: import("./database/record/index.js").default, modelIndex: number, relationshipName: string}>} */
2599
+ * @type {Array<{loadedModel: import("./database/record/index.js").default, modelIndex: number, relationshipName: string}>} */
2601
2600
  const singularRelationshipEntries = []
2602
2601
 
2603
2602
  models.forEach((model, modelIndex) => {
2604
2603
  const modelClass = /**
2605
2604
  * Types the following value.
2606
- @type {typeof import("./database/record/index.js").default} */ (model.constructor)
2605
+ * @type {typeof import("./database/record/index.js").default} */ (model.constructor)
2607
2606
  const relationshipsMap = modelClass.getRelationshipsMap()
2608
2607
  const resource = this._serializationResourceInstanceForModel(model)
2609
2608
  const resourceConfiguration = resource ? resource.resourceConfiguration() : null
@@ -2673,7 +2672,7 @@ export default class FrontendModelController extends Controller {
2673
2672
 
2674
2673
  /**
2675
2674
  * Serialized models.
2676
- @type {Record<string, ?>[]} */
2675
+ * @type {Record<string, ?>[]} */
2677
2676
  const serializedModels = []
2678
2677
 
2679
2678
  for (const [modelIndex, model] of models.entries()) {
@@ -2700,7 +2699,7 @@ export default class FrontendModelController extends Controller {
2700
2699
 
2701
2700
  /**
2702
2701
  * Serialized.
2703
- @type {Record<string, ?>} */
2702
+ * @type {Record<string, ?>} */
2704
2703
  const serialized = {...serializedAttributes}
2705
2704
 
2706
2705
  if (hasPreloaded) serialized.__preloadedRelationships = preloadedRelationships
@@ -2735,10 +2734,10 @@ export default class FrontendModelController extends Controller {
2735
2734
 
2736
2735
  const renderError = /**
2737
2736
  * Types the following value.
2738
- @type {((errorMessage: string) => Promise<void>) | undefined} */ (
2737
+ * @type {((errorMessage: string) => Promise<void>) | undefined} */ (
2739
2738
  /**
2740
2739
  * Types the following value.
2741
- @type {?} */ (this).renderError
2740
+ * @type {?} */ (this).renderError
2742
2741
  )
2743
2742
 
2744
2743
  if (typeof renderError === "function") {
@@ -2749,7 +2748,7 @@ export default class FrontendModelController extends Controller {
2749
2748
  await this.render({
2750
2749
  json: /**
2751
2750
  * Types the following value.
2752
- @type {Record<string, ?>} */ (serializeFrontendModelTransportValue({
2751
+ * @type {Record<string, ?>} */ (serializeFrontendModelTransportValue({
2753
2752
  errorMessage: frontendModelClientSafeErrorMessage,
2754
2753
  status: "error"
2755
2754
  }))
@@ -2792,7 +2791,7 @@ export default class FrontendModelController extends Controller {
2792
2791
  const model = error.getModel()
2793
2792
  /**
2794
2793
  * Structured errors.
2795
- @type {Record<string, {type: string, message: string, fullMessage: string}[]>} */
2794
+ * @type {Record<string, {type: string, message: string, fullMessage: string}[]>} */
2796
2795
  const structuredErrors = {}
2797
2796
 
2798
2797
  for (const attributeName in validationErrors) {
@@ -2901,7 +2900,7 @@ export default class FrontendModelController extends Controller {
2901
2900
  await this.render({
2902
2901
  json: /**
2903
2902
  * Types the following value.
2904
- @type {Record<string, ?>} */ (serializeFrontendModelTransportValue(responsePayload))
2903
+ * @type {Record<string, ?>} */ (serializeFrontendModelTransportValue(responsePayload))
2905
2904
  })
2906
2905
  } catch (error) {
2907
2906
  await this.frontendModelLogEndpointError({action, commandType: action, error})
@@ -2909,7 +2908,7 @@ export default class FrontendModelController extends Controller {
2909
2908
  await this.render({
2910
2909
  json: /**
2911
2910
  * Types the following value.
2912
- @type {Record<string, ?>} */ (serializeFrontendModelTransportValue(await this.frontendModelClientErrorPayloadForError(error)))
2911
+ * @type {Record<string, ?>} */ (serializeFrontendModelTransportValue(await this.frontendModelClientErrorPayloadForError(error)))
2913
2912
  })
2914
2913
  }
2915
2914
  }
@@ -3126,11 +3125,11 @@ export default class FrontendModelController extends Controller {
3126
3125
 
3127
3126
  const params = /**
3128
3127
  * Types the following value.
3129
- @type {Record<string, ?>} */ (deserializeFrontendModelTransportValue(this.params()))
3128
+ * @type {Record<string, ?>} */ (deserializeFrontendModelTransportValue(this.params()))
3130
3129
  const requests = Array.isArray(params.requests) ? params.requests : [params]
3131
3130
  /**
3132
3131
  * Responses.
3133
- @type {Array<Record<string, ?>>} */
3132
+ * @type {Array<Record<string, ?>>} */
3134
3133
  const responses = []
3135
3134
 
3136
3135
  for (const requestEntry of requests) {
@@ -3202,7 +3201,7 @@ export default class FrontendModelController extends Controller {
3202
3201
  await this.render({
3203
3202
  json: /**
3204
3203
  * Types the following value.
3205
- @type {Record<string, ?>} */ (serializeFrontendModelTransportValue({
3204
+ * @type {Record<string, ?>} */ (serializeFrontendModelTransportValue({
3206
3205
  responses,
3207
3206
  status: "success"
3208
3207
  }))
@@ -3259,7 +3258,7 @@ export default class FrontendModelController extends Controller {
3259
3258
  params: controllerParams,
3260
3259
  request: /**
3261
3260
  * Types the following value.
3262
- @type {import("./http-server/client/request.js").default} */ (this.getRequest()),
3261
+ * @type {import("./http-server/client/request.js").default} */ (this.getRequest()),
3263
3262
  response,
3264
3263
  viewPath
3265
3264
  })
@@ -3268,9 +3267,9 @@ export default class FrontendModelController extends Controller {
3268
3267
  await controllerInstance._runBeforeCallbacks()
3269
3268
  const controllerMethods = /**
3270
3269
  * Types the following value.
3271
- @type {Record<string, () => Promise<void> | void>} */ (/**
3270
+ * @type {Record<string, () => Promise<void> | void>} */ (/**
3272
3271
  * Types the following value.
3273
- @type {?} */ (controllerInstance))
3272
+ * @type {?} */ (controllerInstance))
3274
3273
 
3275
3274
  await controllerMethods[action]()
3276
3275
  })
@@ -3289,7 +3288,7 @@ export default class FrontendModelController extends Controller {
3289
3288
 
3290
3289
  // Preserve nested transport markers so the outer shared frontend-model API
3291
3290
  // can return them unchanged and let the client hydrate once at the edge.
3292
- return /** Narrows the runtime value to the documented type. @type {Record<string, ?>} */ (JSON.parse(responseBody))
3291
+ return /** @type {Record<string, ?>} */ (JSON.parse(responseBody))
3293
3292
  }
3294
3293
 
3295
3294
  /**
@@ -3412,7 +3411,7 @@ export default class FrontendModelController extends Controller {
3412
3411
  await this.render({
3413
3412
  json: /**
3414
3413
  * Types the following value.
3415
- @type {Record<string, ?>} */ (serializeFrontendModelTransportValue(responsePayload))
3414
+ * @type {Record<string, ?>} */ (serializeFrontendModelTransportValue(responsePayload))
3416
3415
  })
3417
3416
  } catch (error) {
3418
3417
  await this.frontendModelLogEndpointError({action: "frontendCustomCommand", commandType: "custom-command", error})
@@ -3420,7 +3419,7 @@ export default class FrontendModelController extends Controller {
3420
3419
  await this.render({
3421
3420
  json: /**
3422
3421
  * Types the following value.
3423
- @type {Record<string, ?>} */ (serializeFrontendModelTransportValue(await this.frontendModelClientErrorPayloadForError(error)))
3422
+ * @type {Record<string, ?>} */ (serializeFrontendModelTransportValue(await this.frontendModelClientErrorPayloadForError(error)))
3424
3423
  })
3425
3424
  }
3426
3425
  }
@@ -3444,7 +3443,7 @@ export default class FrontendModelController extends Controller {
3444
3443
 
3445
3444
  const resource = /**
3446
3445
  * Types the following value.
3447
- @type {Record<string, ?>} */ (this.frontendModelResourceInstance())
3446
+ * @type {Record<string, ?>} */ (this.frontendModelResourceInstance())
3448
3447
  const commandMethod = resource[methodName]
3449
3448
 
3450
3449
  if (typeof commandMethod !== "function") {
@@ -3457,12 +3456,12 @@ export default class FrontendModelController extends Controller {
3457
3456
  return {status: "success"}
3458
3457
  }
3459
3458
 
3460
- return /** Narrows the runtime value to the documented type. @type {Record<string, ?>} */ (
3459
+ return /** @type {Record<string, ?>} */ (
3461
3460
  await this.autoSerializeFrontendModelsInPayload(
3462
3461
  responsePayload,
3463
3462
  /**
3464
3463
  * Types the following value.
3465
- @type {{serialize: (model: ?, action: string) => Promise<Record<string, ?>>}} */ (resource),
3464
+ * @type {{serialize: (model: ?, action: string) => Promise<Record<string, ?>>}} */ (resource),
3466
3465
  methodName
3467
3466
  )
3468
3467
  )
@@ -3490,7 +3489,7 @@ export default class FrontendModelController extends Controller {
3490
3489
  const richSerialized = await resource.serialize(value, action)
3491
3490
  const modelClass = /**
3492
3491
  * Types the following value.
3493
- @type {{constructor: {getModelName?: () => string, name?: string}}} */ (value).constructor
3492
+ * @type {{constructor: {getModelName?: () => string, name?: string}}} */ (value).constructor
3494
3493
  const modelName = typeof modelClass.getModelName === "function" ? modelClass.getModelName() : (modelClass.name || "")
3495
3494
 
3496
3495
  // Wrap the resource-serialized payload in the frontend_model transport
@@ -3508,7 +3507,7 @@ export default class FrontendModelController extends Controller {
3508
3507
  if (Array.isArray(value)) {
3509
3508
  /**
3510
3509
  * Result.
3511
- @type {Array<?>} */
3510
+ * @type {Array<?>} */
3512
3511
  const result = []
3513
3512
 
3514
3513
  for (const entry of value) {
@@ -3521,7 +3520,7 @@ export default class FrontendModelController extends Controller {
3521
3520
  if (typeof value === "object" && Object.getPrototypeOf(value) === Object.prototype) {
3522
3521
  const container = /**
3523
3522
  * Types the following value.
3524
- @type {Record<string, ?>} */ (value)
3523
+ * @type {Record<string, ?>} */ (value)
3525
3524
 
3526
3525
  if (seen.has(container)) {
3527
3526
  // Cyclic back-reference along the current recursion path; the
@@ -3538,7 +3537,7 @@ export default class FrontendModelController extends Controller {
3538
3537
  try {
3539
3538
  /**
3540
3539
  * Result.
3541
- @type {Record<string, ?>} */
3540
+ * @type {Record<string, ?>} */
3542
3541
  const result = {}
3543
3542
 
3544
3543
  for (const [key, nested] of Object.entries(container)) {