cursedbelt-server 4.12.0 → 4.13.1

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 (475) hide show
  1. package/dist/server/_bunOnly.d.ts +1 -0
  2. package/dist/server/_bunOnly.js +12 -0
  3. package/dist/server/activity/index.d.ts +4 -4
  4. package/dist/server/activity/index.js +3 -3
  5. package/dist/server/activity/migrations.d.ts +1 -1
  6. package/dist/server/activity/shareSource.d.ts +1 -1
  7. package/dist/server/activity/shareSource.js +1 -1
  8. package/dist/server/activity/store.js +2 -2
  9. package/dist/server/analytics/index.d.ts +2 -2
  10. package/dist/server/analytics/index.js +2 -2
  11. package/dist/server/app.d.ts +4 -4
  12. package/dist/server/app.js +6 -6
  13. package/dist/server/audit/index.d.ts +2 -2
  14. package/dist/server/audit/index.js +2 -2
  15. package/dist/server/audit/migrations.d.ts +1 -1
  16. package/dist/server/audit/sqliteSink.js +2 -2
  17. package/dist/server/audit/sqliteSink.test.js +1 -1
  18. package/dist/server/auth/csrf.js +1 -1
  19. package/dist/server/auth/fileTokenSigner.d.ts +1 -1
  20. package/dist/server/auth/getOnly.d.ts +1 -1
  21. package/dist/server/auth/getOnly.js +1 -1
  22. package/dist/server/auth/index.d.ts +12 -12
  23. package/dist/server/auth/index.js +11 -11
  24. package/dist/server/auth/jwt.d.ts +1 -1
  25. package/dist/server/auth/middleware.d.ts +1 -1
  26. package/dist/server/auth/middleware.js +3 -3
  27. package/dist/server/auth/password.js +4 -6
  28. package/dist/server/auth/sessionStore.d.ts +2 -2
  29. package/dist/server/auth/types.d.ts +1 -1
  30. package/dist/server/bench/assert.d.ts +1 -1
  31. package/dist/server/bench/assert.js +1 -1
  32. package/dist/server/bench/cpuBudget.d.ts +4 -4
  33. package/dist/server/bench/cpuBudget.js +3 -3
  34. package/dist/server/bench/index.d.ts +6 -6
  35. package/dist/server/bench/index.js +6 -6
  36. package/dist/server/bench/recorder.d.ts +2 -2
  37. package/dist/server/bench/recorder.js +1 -1
  38. package/dist/server/bench/runBench.d.ts +2 -2
  39. package/dist/server/ctgr.d.ts +1 -1
  40. package/dist/server/ctgr.js +1 -1
  41. package/dist/server/d1/fakeD1.d.ts +1 -1
  42. package/dist/server/d1/fakeD1.js +1 -1
  43. package/dist/server/d1/index.d.ts +8 -8
  44. package/dist/server/d1/index.js +8 -8
  45. package/dist/server/d1/invocation.d.ts +1 -1
  46. package/dist/server/d1/invocation.js +2 -2
  47. package/dist/server/d1/kysely.d.ts +2 -2
  48. package/dist/server/d1/kysely.js +2 -2
  49. package/dist/server/d1/limits.d.ts +1 -1
  50. package/dist/server/d1/limits.js +1 -1
  51. package/dist/server/d1/local.d.ts +1 -1
  52. package/dist/server/d1/local.js +3 -3
  53. package/dist/server/d1/localBackup.d.ts +1 -1
  54. package/dist/server/d1/localBackup.js +2 -2
  55. package/dist/server/d1/remote.d.ts +1 -1
  56. package/dist/server/d1/remote.js +3 -3
  57. package/dist/server/d1/scheduling.d.ts +1 -1
  58. package/dist/server/d1/values.d.ts +1 -1
  59. package/dist/server/d1/values.js +1 -1
  60. package/dist/server/db/kysely.d.ts +1 -1
  61. package/dist/server/dropzone/index.d.ts +2 -2
  62. package/dist/server/dropzone/index.js +2 -2
  63. package/dist/server/guard/argon2Binding.js +1 -1
  64. package/dist/server/guard/index.d.ts +5 -5
  65. package/dist/server/guard/index.js +5 -5
  66. package/dist/server/guard/kdfWorker.d.ts +1 -1
  67. package/dist/server/guard/kdfWorker.js +3 -3
  68. package/dist/server/guard/kdfWorkerEntry.js +1 -1
  69. package/dist/server/guard/passwordVerifier.d.ts +1 -1
  70. package/dist/server/guard/passwordVerifier.js +4 -4
  71. package/dist/server/guard/sessionSigner.d.ts +2 -2
  72. package/dist/server/guard/sessionSigner.js +1 -1
  73. package/dist/server/incidents/checks.d.ts +2 -2
  74. package/dist/server/incidents/index.d.ts +8 -8
  75. package/dist/server/incidents/index.js +8 -8
  76. package/dist/server/incidents/migrations.d.ts +1 -1
  77. package/dist/server/incidents/notifier.d.ts +3 -3
  78. package/dist/server/incidents/reporter.d.ts +1 -1
  79. package/dist/server/incidents/routes.d.ts +4 -4
  80. package/dist/server/incidents/routes.js +1 -1
  81. package/dist/server/incidents/store.d.ts +1 -1
  82. package/dist/server/incidents/store.js +3 -3
  83. package/dist/server/index.d.ts +26 -26
  84. package/dist/server/index.js +23 -23
  85. package/dist/server/jobs/fireQueue.d.ts +1 -1
  86. package/dist/server/jobs/fireQueue.js +3 -3
  87. package/dist/server/jobs/index.d.ts +7 -7
  88. package/dist/server/jobs/index.js +7 -7
  89. package/dist/server/jobs/logger.d.ts +1 -1
  90. package/dist/server/jobs/polling.d.ts +1 -1
  91. package/dist/server/jobs/polling.js +1 -1
  92. package/dist/server/jobs/runner.d.ts +1 -1
  93. package/dist/server/jobs/runner.js +5 -5
  94. package/dist/server/master-lock/accountsPage.d.ts +1 -1
  95. package/dist/server/master-lock/accountsPage.js +1 -1
  96. package/dist/server/master-lock/guard.d.ts +2 -2
  97. package/dist/server/master-lock/guard.js +2 -2
  98. package/dist/server/master-lock/index.d.ts +7 -7
  99. package/dist/server/master-lock/index.js +7 -7
  100. package/dist/server/master-lock/masterLock.js +1 -11
  101. package/dist/server/master-lock/principals.d.ts +1 -1
  102. package/dist/server/master-lock/principals.js +1 -1
  103. package/dist/server/master-lock/seed.d.ts +1 -1
  104. package/dist/server/master-lock/seed.js +1 -1
  105. package/dist/server/master-lock/store.d.ts +1 -1
  106. package/dist/server/media-bun/index.d.ts +3 -3
  107. package/dist/server/media-bun/index.js +3 -3
  108. package/dist/server/media-bun/video.d.ts +1 -1
  109. package/dist/server/media-bun/video.js +1 -1
  110. package/dist/server/metrics/telemetrySink.d.ts +1 -1
  111. package/dist/server/metrics/telemetrySink.js +1 -1
  112. package/dist/server/middleware/correlationId.d.ts +1 -1
  113. package/dist/server/middleware/errorEnvelope.d.ts +1 -1
  114. package/dist/server/middleware/errorEnvelope.js +1 -1
  115. package/dist/server/middleware/index.d.ts +10 -10
  116. package/dist/server/middleware/index.js +10 -10
  117. package/dist/server/middleware/rateLimit.js +1 -1
  118. package/dist/server/middleware/requestLogger.d.ts +3 -3
  119. package/dist/server/middleware/requestLogger.js +3 -3
  120. package/dist/server/middleware/zValidator.d.ts +1 -1
  121. package/dist/server/middleware/zValidator.js +1 -1
  122. package/dist/server/migration/runner.d.ts +1 -1
  123. package/dist/server/net/outboundGuard.js +1 -1
  124. package/dist/server/notifications/index.d.ts +7 -7
  125. package/dist/server/notifications/index.js +4 -4
  126. package/dist/server/notifications/migrations.d.ts +1 -1
  127. package/dist/server/notifications/routes.d.ts +1 -1
  128. package/dist/server/notifications/service.d.ts +1 -1
  129. package/dist/server/notifications/service.js +2 -2
  130. package/dist/server/resume/index.d.ts +2 -2
  131. package/dist/server/resume/index.js +2 -2
  132. package/dist/server/resume/routes.d.ts +1 -1
  133. package/dist/server/resume/routes.js +1 -1
  134. package/dist/server/retention/archive.js +1 -1
  135. package/dist/server/retention/fleet.d.ts +2 -2
  136. package/dist/server/retention/fleet.js +2 -2
  137. package/dist/server/retention/index.d.ts +6 -6
  138. package/dist/server/retention/index.js +6 -6
  139. package/dist/server/retention/store.d.ts +1 -1
  140. package/dist/server/retention/store.js +2 -2
  141. package/dist/server/retention/sweeper.d.ts +3 -3
  142. package/dist/server/retention/sweeper.js +2 -2
  143. package/dist/server/retention/target.d.ts +3 -3
  144. package/dist/server/retention/target.js +2 -2
  145. package/dist/server/search/index.d.ts +2 -2
  146. package/dist/server/search/index.js +2 -2
  147. package/dist/server/search/pgSearchProvider.js +2 -2
  148. package/dist/server/search/pgSearchProvider.pg.test.js +2 -2
  149. package/dist/server/sharing/index.d.ts +8 -8
  150. package/dist/server/sharing/index.js +5 -5
  151. package/dist/server/sharing/migrations.d.ts +1 -1
  152. package/dist/server/sharing/router.d.ts +1 -1
  153. package/dist/server/sharing/sql.js +1 -1
  154. package/dist/server/sharing/store.js +3 -3
  155. package/dist/server/sqlite/browse.js +1 -1
  156. package/dist/server/sqlite/export.js +1 -1
  157. package/dist/server/sqlite/import.js +1 -1
  158. package/dist/server/sqlite/index.d.ts +9 -9
  159. package/dist/server/sqlite/index.js +9 -9
  160. package/dist/server/sqlite/stats.js +1 -1
  161. package/dist/server/sqlite/viewer.js +2 -2
  162. package/dist/server/storage/binaryServerProcessing.d.ts +1 -1
  163. package/dist/server/storage/binaryServerProcessing.js +2 -2
  164. package/dist/server/storage/binaryServerStore.d.ts +2 -2
  165. package/dist/server/storage/binaryStore.d.ts +1 -1
  166. package/dist/server/storage/binaryStoreFake.d.ts +1 -1
  167. package/dist/server/storage/diskStore.d.ts +1 -1
  168. package/dist/server/storage/files/adapter.d.ts +4 -4
  169. package/dist/server/storage/files/adapter.js +1 -1
  170. package/dist/server/storage/files/catalogue.d.ts +3 -3
  171. package/dist/server/storage/files/catalogue.js +6 -6
  172. package/dist/server/storage/files/chunkedUpload.d.ts +3 -3
  173. package/dist/server/storage/files/chunkedUpload.js +1 -1
  174. package/dist/server/storage/files/fileRoutes.d.ts +4 -4
  175. package/dist/server/storage/files/fileRoutes.js +3 -3
  176. package/dist/server/storage/files/index.d.ts +9 -9
  177. package/dist/server/storage/files/index.js +8 -8
  178. package/dist/server/storage/files/migrations.d.ts +1 -1
  179. package/dist/server/storage/files/stack.d.ts +7 -7
  180. package/dist/server/storage/files/stack.js +10 -10
  181. package/dist/server/storage/files/storageOps.d.ts +1 -1
  182. package/dist/server/storage/files/types.d.ts +1 -1
  183. package/dist/server/storage/imageThumbnail.js +1 -1
  184. package/dist/server/storage/index.d.ts +15 -15
  185. package/dist/server/storage/index.js +14 -14
  186. package/dist/server/storage/mountMediaRoutes.d.ts +3 -3
  187. package/dist/server/storage/mountMediaRoutes.js +2 -2
  188. package/dist/server/storage/objectStoreMediaStore.d.ts +1 -1
  189. package/dist/server/storage/s3ObjectStore.js +1 -1
  190. package/dist/server/storage/sources.d.ts +2 -2
  191. package/dist/server/storage/sources.js +2 -2
  192. package/dist/server/storage/streamRange.d.ts +1 -1
  193. package/dist/server/storage/streamToken.js +1 -1
  194. package/dist/server/storage/videoProcessor.d.ts +1 -1
  195. package/dist/server/storage/videoProcessor.js +2 -2
  196. package/dist/server/sync/engine.d.ts +2 -2
  197. package/dist/server/sync/engine.js +1 -1
  198. package/dist/server/sync/http.d.ts +4 -4
  199. package/dist/server/sync/http.js +3 -3
  200. package/dist/server/sync/index.d.ts +11 -11
  201. package/dist/server/sync/index.js +11 -11
  202. package/dist/server/sync/opLog.d.ts +1 -1
  203. package/dist/server/sync/signal.d.ts +1 -1
  204. package/dist/server/sync/timer.d.ts +3 -3
  205. package/dist/server/sync/timer.js +1 -1
  206. package/dist/server/sync/tokens.d.ts +1 -1
  207. package/dist/server/sync/tokens.js +3 -2
  208. package/dist/server/ws/eventBus.d.ts +1 -1
  209. package/dist/server/ws/hub.d.ts +1 -1
  210. package/dist/server/ws/hub.js +3 -3
  211. package/dist/server/ws/index.d.ts +5 -5
  212. package/dist/server/ws/index.js +4 -4
  213. package/dist/server/ws/presence.d.ts +1 -1
  214. package/dist/server/ws/room.d.ts +1 -1
  215. package/dist/server/ws/types.d.ts +1 -1
  216. package/package.json +9 -9
  217. package/src/publicSurface.spec.ts +1 -1
  218. package/src/server/_bunOnly.ts +15 -0
  219. package/src/server/activity/index.ts +4 -4
  220. package/src/server/activity/migrations.ts +1 -1
  221. package/src/server/activity/shareSource.ts +2 -2
  222. package/src/server/activity/store.spec.ts +3 -3
  223. package/src/server/activity/store.ts +2 -2
  224. package/src/server/analytics/index.ts +2 -2
  225. package/src/server/analytics/injectedScripts.spec.ts +3 -3
  226. package/src/server/analytics/webAnalytics.spec.ts +1 -1
  227. package/src/server/app.spec.ts +9 -9
  228. package/src/server/app.ts +7 -7
  229. package/src/server/audit/index.ts +2 -2
  230. package/src/server/audit/migrations.ts +1 -1
  231. package/src/server/audit/sqliteSink.test.ts +1 -1
  232. package/src/server/audit/sqliteSink.ts +2 -2
  233. package/src/server/auth/cookie.spec.ts +1 -1
  234. package/src/server/auth/csrf.spec.ts +1 -1
  235. package/src/server/auth/csrf.ts +1 -1
  236. package/src/server/auth/fileTokenSigner.ts +1 -1
  237. package/src/server/auth/getOnly.spec.ts +2 -2
  238. package/src/server/auth/getOnly.ts +2 -2
  239. package/src/server/auth/index.ts +12 -12
  240. package/src/server/auth/jwt.spec.ts +2 -2
  241. package/src/server/auth/jwt.ts +1 -1
  242. package/src/server/auth/loginThrottle.spec.ts +1 -1
  243. package/src/server/auth/middleware.spec.ts +7 -7
  244. package/src/server/auth/middleware.ts +4 -4
  245. package/src/server/auth/password.spec.ts +1 -1
  246. package/src/server/auth/password.ts +4 -5
  247. package/src/server/auth/sessionStore.spec.ts +3 -3
  248. package/src/server/auth/sessionStore.ts +3 -3
  249. package/src/server/auth/totp.spec.ts +1 -1
  250. package/src/server/auth/types.ts +1 -1
  251. package/src/server/auth/vault.spec.ts +1 -1
  252. package/src/server/bench/assert.ts +2 -2
  253. package/src/server/bench/budget.spec.ts +2 -2
  254. package/src/server/bench/cpuBudget.spec.ts +6 -6
  255. package/src/server/bench/cpuBudget.ts +5 -5
  256. package/src/server/bench/cpuClock.spec.ts +2 -2
  257. package/src/server/bench/index.ts +6 -6
  258. package/src/server/bench/recorder.ts +2 -2
  259. package/src/server/bench/runBench.ts +2 -2
  260. package/src/server/ctgr.spec.ts +2 -2
  261. package/src/server/ctgr.ts +2 -2
  262. package/src/server/d1/backup.spec.ts +2 -2
  263. package/src/server/d1/fakeD1.ts +2 -2
  264. package/src/server/d1/index.ts +8 -8
  265. package/src/server/d1/invocation.spec.ts +6 -6
  266. package/src/server/d1/invocation.ts +2 -2
  267. package/src/server/d1/kysely.spec.ts +5 -5
  268. package/src/server/d1/kysely.ts +3 -3
  269. package/src/server/d1/limits.spec.ts +3 -3
  270. package/src/server/d1/limits.ts +1 -1
  271. package/src/server/d1/local.ts +3 -3
  272. package/src/server/d1/localBackup.ts +3 -3
  273. package/src/server/d1/remote.ts +3 -3
  274. package/src/server/d1/sameShape.spec.ts +4 -4
  275. package/src/server/d1/scheduling.spec.ts +1 -1
  276. package/src/server/d1/scheduling.ts +1 -1
  277. package/src/server/d1/values.ts +1 -1
  278. package/src/server/db/kysely.spec.ts +1 -1
  279. package/src/server/db/kysely.ts +1 -1
  280. package/src/server/dropzone/index.ts +2 -2
  281. package/src/server/dropzone/scan.spec.ts +1 -1
  282. package/src/server/errors.spec.ts +1 -1
  283. package/src/server/guard/argon2Binding.spec.ts +1 -1
  284. package/src/server/guard/argon2Binding.ts +1 -1
  285. package/src/server/guard/argon2Kat.spec.ts +1 -1
  286. package/src/server/guard/guard.spec.ts +3 -3
  287. package/src/server/guard/index.ts +5 -5
  288. package/src/server/guard/kdfWorker.spec.ts +3 -3
  289. package/src/server/guard/kdfWorker.ts +3 -3
  290. package/src/server/guard/kdfWorkerEntry.ts +1 -1
  291. package/src/server/guard/passwordVerifier.spec.ts +1 -1
  292. package/src/server/guard/passwordVerifier.ts +4 -4
  293. package/src/server/guard/revocationStore.spec.ts +2 -2
  294. package/src/server/guard/sessionSigner.ts +3 -3
  295. package/src/server/incidents/checks.ts +2 -2
  296. package/src/server/incidents/incidents.spec.ts +7 -7
  297. package/src/server/incidents/index.ts +8 -8
  298. package/src/server/incidents/migrations.ts +1 -1
  299. package/src/server/incidents/notifier.ts +3 -3
  300. package/src/server/incidents/reporter.ts +1 -1
  301. package/src/server/incidents/routes.ts +5 -5
  302. package/src/server/incidents/store.ts +3 -3
  303. package/src/server/index.ts +26 -26
  304. package/src/server/jobs/fireQueue.spec.ts +1 -1
  305. package/src/server/jobs/fireQueue.ts +3 -3
  306. package/src/server/jobs/index.ts +7 -7
  307. package/src/server/jobs/logger.ts +1 -1
  308. package/src/server/jobs/plainjobAdapter.spec.ts +1 -1
  309. package/src/server/jobs/polling.spec.ts +1 -1
  310. package/src/server/jobs/polling.ts +2 -2
  311. package/src/server/jobs/runner.spec.ts +3 -3
  312. package/src/server/jobs/runner.ts +5 -5
  313. package/src/server/jobs/timeout.spec.ts +1 -1
  314. package/src/server/master-lock/accounts.spec.ts +2 -2
  315. package/src/server/master-lock/accountsPage.spec.ts +4 -4
  316. package/src/server/master-lock/accountsPage.ts +1 -1
  317. package/src/server/master-lock/beaconNeverReachesTheWall.spec.ts +4 -4
  318. package/src/server/master-lock/guard.spec.ts +3 -3
  319. package/src/server/master-lock/guard.ts +3 -3
  320. package/src/server/master-lock/index.ts +7 -7
  321. package/src/server/master-lock/lockPage.spec.ts +2 -2
  322. package/src/server/master-lock/masterLock.spec.ts +2 -2
  323. package/src/server/master-lock/masterLock.ts +1 -10
  324. package/src/server/master-lock/principals.spec.ts +4 -4
  325. package/src/server/master-lock/principals.ts +1 -1
  326. package/src/server/master-lock/seed.spec.ts +3 -3
  327. package/src/server/master-lock/seed.ts +1 -1
  328. package/src/server/master-lock/store.ts +1 -1
  329. package/src/server/media-bun/image.spec.ts +1 -1
  330. package/src/server/media-bun/index.ts +3 -3
  331. package/src/server/media-bun/streaming.spec.ts +1 -1
  332. package/src/server/media-bun/video.spec.ts +1 -1
  333. package/src/server/media-bun/video.ts +1 -1
  334. package/src/server/metrics/normalizeRoute.spec.ts +1 -1
  335. package/src/server/metrics/telemetrySink.spec.ts +3 -3
  336. package/src/server/metrics/telemetrySink.ts +1 -1
  337. package/src/server/middleware/bodyLimit.spec.ts +1 -1
  338. package/src/server/middleware/correlationId.ts +1 -1
  339. package/src/server/middleware/corsAllowlist.spec.ts +2 -2
  340. package/src/server/middleware/errorEnvelope.ts +2 -2
  341. package/src/server/middleware/index.ts +10 -10
  342. package/src/server/middleware/localOrigin.spec.ts +1 -1
  343. package/src/server/middleware/rateLimit.spec.ts +1 -1
  344. package/src/server/middleware/rateLimit.ts +1 -1
  345. package/src/server/middleware/requestLogger.ts +5 -5
  346. package/src/server/middleware/zValidator.spec.ts +4 -4
  347. package/src/server/middleware/zValidator.ts +2 -2
  348. package/src/server/migration/runner.spec.ts +2 -2
  349. package/src/server/migration/runner.ts +1 -1
  350. package/src/server/net/outboundGuard.spec.ts +1 -1
  351. package/src/server/net/outboundGuard.ts +1 -1
  352. package/src/server/notifications/index.ts +7 -7
  353. package/src/server/notifications/migrations.ts +1 -1
  354. package/src/server/notifications/routes.ts +1 -1
  355. package/src/server/notifications/service.spec.ts +3 -3
  356. package/src/server/notifications/service.ts +2 -2
  357. package/src/server/paths/appDataHome.spec.ts +1 -1
  358. package/src/server/resume/index.ts +2 -2
  359. package/src/server/resume/resume.spec.ts +2 -2
  360. package/src/server/resume/routes.ts +1 -1
  361. package/src/server/retention/archive.spec.ts +2 -2
  362. package/src/server/retention/archive.ts +1 -1
  363. package/src/server/retention/fleet.ts +4 -4
  364. package/src/server/retention/index.ts +6 -6
  365. package/src/server/retention/policy.spec.ts +1 -1
  366. package/src/server/retention/store.spec.ts +3 -3
  367. package/src/server/retention/store.ts +3 -3
  368. package/src/server/retention/sweeper.spec.ts +5 -5
  369. package/src/server/retention/sweeper.ts +5 -5
  370. package/src/server/retention/target.spec.ts +3 -3
  371. package/src/server/retention/target.ts +5 -5
  372. package/src/server/search/index.ts +2 -2
  373. package/src/server/search/pgSearchProvider.pg.test.ts +2 -2
  374. package/src/server/search/pgSearchProvider.ts +2 -2
  375. package/src/server/sharing/index.ts +8 -8
  376. package/src/server/sharing/migrations.ts +1 -1
  377. package/src/server/sharing/router.spec.ts +2 -2
  378. package/src/server/sharing/router.ts +1 -1
  379. package/src/server/sharing/sql.ts +1 -1
  380. package/src/server/sharing/store.spec.ts +2 -2
  381. package/src/server/sharing/store.ts +3 -3
  382. package/src/server/sqlite/backup.spec.ts +1 -1
  383. package/src/server/sqlite/browse.spec.ts +1 -1
  384. package/src/server/sqlite/browse.ts +1 -1
  385. package/src/server/sqlite/export.spec.ts +2 -2
  386. package/src/server/sqlite/export.ts +1 -1
  387. package/src/server/sqlite/fts5.spec.ts +1 -1
  388. package/src/server/sqlite/health.spec.ts +1 -1
  389. package/src/server/sqlite/import.spec.ts +3 -3
  390. package/src/server/sqlite/import.ts +1 -1
  391. package/src/server/sqlite/index.ts +9 -9
  392. package/src/server/sqlite/readonlySql.spec.ts +1 -1
  393. package/src/server/sqlite/stats.spec.ts +1 -1
  394. package/src/server/sqlite/stats.ts +1 -1
  395. package/src/server/sqlite/viewer.spec.ts +1 -1
  396. package/src/server/sqlite/viewer.ts +2 -2
  397. package/src/server/storage/binaryServerProcessing.integration.spec.ts +2 -2
  398. package/src/server/storage/binaryServerProcessing.spec.ts +2 -2
  399. package/src/server/storage/binaryServerProcessing.ts +3 -3
  400. package/src/server/storage/binaryServerStore.ts +3 -3
  401. package/src/server/storage/binaryStore.spec.ts +2 -2
  402. package/src/server/storage/binaryStore.ts +1 -1
  403. package/src/server/storage/binaryStoreFake.ts +1 -1
  404. package/src/server/storage/chunked.integration.spec.ts +4 -4
  405. package/src/server/storage/diskStore.ts +1 -1
  406. package/src/server/storage/fileUploadClient-chunked.integration.spec.ts +6 -6
  407. package/src/server/storage/fileUploadClient.integration.spec.ts +7 -7
  408. package/src/server/storage/files/adapter.photo.display.spec.ts +10 -10
  409. package/src/server/storage/files/adapter.photo.spec.ts +9 -9
  410. package/src/server/storage/files/adapter.spec.ts +8 -8
  411. package/src/server/storage/files/adapter.ts +5 -5
  412. package/src/server/storage/files/catalogue.media-host.spec.ts +6 -6
  413. package/src/server/storage/files/catalogue.orderings.spec.ts +6 -6
  414. package/src/server/storage/files/catalogue.recover.spec.ts +5 -5
  415. package/src/server/storage/files/catalogue.sort.spec.ts +6 -6
  416. package/src/server/storage/files/catalogue.spec.ts +7 -7
  417. package/src/server/storage/files/catalogue.trash-import.spec.ts +6 -6
  418. package/src/server/storage/files/catalogue.ts +6 -6
  419. package/src/server/storage/files/chunkedUpload.spec.ts +7 -7
  420. package/src/server/storage/files/chunkedUpload.ts +4 -4
  421. package/src/server/storage/files/collections.spec.ts +6 -6
  422. package/src/server/storage/files/fileRoutes.replace.spec.ts +8 -8
  423. package/src/server/storage/files/fileRoutes.spec.ts +8 -8
  424. package/src/server/storage/files/fileRoutes.ts +6 -6
  425. package/src/server/storage/files/index.ts +9 -9
  426. package/src/server/storage/files/migrations.ts +1 -1
  427. package/src/server/storage/files/stack.spec.ts +5 -5
  428. package/src/server/storage/files/stack.ts +12 -12
  429. package/src/server/storage/files/storageOps.spec.ts +4 -4
  430. package/src/server/storage/files/storageOps.ts +1 -1
  431. package/src/server/storage/files/types.ts +1 -1
  432. package/src/server/storage/imageThumbnail.spec.ts +2 -2
  433. package/src/server/storage/imageThumbnail.ts +1 -1
  434. package/src/server/storage/index.ts +15 -15
  435. package/src/server/storage/mountMediaRoutes.ts +4 -4
  436. package/src/server/storage/objectStore.spec.ts +1 -1
  437. package/src/server/storage/objectStoreMediaStore.ts +1 -1
  438. package/src/server/storage/s3ObjectStore.ts +1 -1
  439. package/src/server/storage/sources.ts +3 -3
  440. package/src/server/storage/storage.spec.ts +6 -6
  441. package/src/server/storage/streamRange.ts +1 -1
  442. package/src/server/storage/streamToken.ts +1 -1
  443. package/src/server/storage/transcodeJobs.spec.ts +1 -1
  444. package/src/server/storage/videoDerivativeKeys.spec.ts +1 -1
  445. package/src/server/storage/videoProcessor.posterOnly.spec.ts +4 -4
  446. package/src/server/storage/videoProcessor.ts +2 -2
  447. package/src/server/sync/alarm.spec.ts +1 -1
  448. package/src/server/sync/commands.spec.ts +1 -1
  449. package/src/server/sync/engine.spec.ts +4 -4
  450. package/src/server/sync/engine.ts +2 -2
  451. package/src/server/sync/http.ts +5 -5
  452. package/src/server/sync/httpRemote.spec.ts +1 -1
  453. package/src/server/sync/index.ts +11 -11
  454. package/src/server/sync/opLog.spec.ts +1 -1
  455. package/src/server/sync/opLog.ts +1 -1
  456. package/src/server/sync/planner.spec.ts +1 -1
  457. package/src/server/sync/signal.spec.ts +1 -1
  458. package/src/server/sync/signal.ts +1 -1
  459. package/src/server/sync/status.spec.ts +1 -1
  460. package/src/server/sync/timer.spec.ts +3 -3
  461. package/src/server/sync/timer.ts +3 -3
  462. package/src/server/sync/tokens.spec.ts +1 -1
  463. package/src/server/sync/tokens.ts +4 -3
  464. package/src/server/ws/eventBus.spec.ts +2 -2
  465. package/src/server/ws/eventBus.ts +1 -1
  466. package/src/server/ws/hub.integration.spec.ts +5 -5
  467. package/src/server/ws/hub.spec.ts +3 -3
  468. package/src/server/ws/hub.ts +4 -4
  469. package/src/server/ws/index.ts +5 -5
  470. package/src/server/ws/presence.spec.ts +3 -3
  471. package/src/server/ws/presence.ts +1 -1
  472. package/src/server/ws/room.spec.ts +2 -2
  473. package/src/server/ws/room.ts +1 -1
  474. package/src/server/ws/types.ts +1 -1
  475. package/src/testTmpRoot.spec.ts +1 -1
@@ -1,8 +1,8 @@
1
1
  import type { ErrorHandler } from 'hono';
2
2
  import { HTTPException } from 'hono/http-exception';
3
3
  import type { ContentfulStatusCode } from 'hono/utils/http-status';
4
- import type { CursedbeltEnv } from '../context';
5
- import { ApiError, isAppError, toErrorEnvelope } from '../errors';
4
+ import type { CursedbeltEnv } from '../context.js';
5
+ import { ApiError, isAppError, toErrorEnvelope } from '../errors.js';
6
6
 
7
7
  /**
8
8
  * Hono `onError` handler. Converts ANY thrown value into the ONE canonical rich
@@ -1,10 +1,10 @@
1
1
  // The cross-cutting cursedbelt server middleware set.
2
- export { correlationId } from './correlationId';
3
- export { type CorsOpts, corsAllowlist, corsOptsFromEnv } from './corsAllowlist';
4
- export { errorEnvelope } from './errorEnvelope';
5
- export { crossOriginRefusal } from './localOrigin';
6
- export { clientIp, createRateLimiter, type RateLimitOpts } from './rateLimit';
7
- export { type RequestLoggerOpts, requestLogger } from './requestLogger';
2
+ export { correlationId } from './correlationId.js';
3
+ export { type CorsOpts, corsAllowlist, corsOptsFromEnv } from './corsAllowlist.js';
4
+ export { errorEnvelope } from './errorEnvelope.js';
5
+ export { crossOriginRefusal } from './localOrigin.js';
6
+ export { clientIp, createRateLimiter, type RateLimitOpts } from './rateLimit.js';
7
+ export { type RequestLoggerOpts, requestLogger } from './requestLogger.js';
8
8
  // The telemetry seam `requestLogger` writes through — re-exported here so a caller
9
9
  // that reaches `./middleware` for the logger can bind Analytics Engine in the same import.
10
10
  export {
@@ -13,16 +13,16 @@ export {
13
13
  type TelemetryEvent,
14
14
  type TelemetrySink,
15
15
  type TelemetrySinkOptions,
16
- } from '../metrics/telemetrySink';
16
+ } from '../metrics/telemetrySink.js';
17
17
  export {
18
18
  type CspDirectives,
19
19
  type SecurityHeadersOpts,
20
20
  securityHeaders,
21
- } from './securityHeaders';
21
+ } from './securityHeaders.js';
22
22
  export {
23
23
  toValidationIssues,
24
24
  VALIDATION_ERROR_CODE,
25
25
  type ValidationIssue,
26
26
  validationEnvelope,
27
- } from '../errors';
28
- export { type ZValidatorTarget, zValidator } from './zValidator';
27
+ } from '../errors.js';
28
+ export { type ZValidatorTarget, zValidator } from './zValidator.js';
@@ -3,7 +3,7 @@
3
3
  // block is not padding — it is the reason this can ship without a login.
4
4
 
5
5
  import { describe, expect, test } from 'bun:test';
6
- import { crossOriginRefusal } from './localOrigin';
6
+ import { crossOriginRefusal } from './localOrigin.js';
7
7
 
8
8
  function req(headers: Record<string, string>, url = 'http://127.0.0.1:4747/api/overview'): Request {
9
9
  return new Request(url, { headers });
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, it } from 'bun:test';
2
2
  import { Hono } from 'hono';
3
- import { clientIp, createRateLimiter } from './rateLimit';
3
+ import { clientIp, createRateLimiter } from './rateLimit.js';
4
4
 
5
5
  /**
6
6
  * `x-forwarded-for` is written by the caller. If the limiter keys on it without
@@ -1,6 +1,6 @@
1
1
  import type { Context, MiddlewareHandler } from 'hono';
2
2
  import { getConnInfo } from 'hono/bun';
3
- import { ApiError, toErrorEnvelope } from '../errors';
3
+ import { ApiError, toErrorEnvelope } from '../errors.js';
4
4
 
5
5
  /** How much of the forwarded-header chain, if any, this server may believe. */
6
6
  export interface ClientIpOptions {
@@ -1,15 +1,15 @@
1
1
  import type { Database } from 'bun:sqlite';
2
2
  import type { MiddlewareHandler } from 'hono';
3
3
  import { HTTPException } from 'hono/http-exception';
4
- import type { CursedbeltEnv } from '../context';
5
- import { isApiError } from '../errors';
6
- import type { MetricsBuffer } from '../metrics/metricsBuffer';
7
- import { normalizeRoute } from '../metrics/normalizeRoute';
4
+ import type { CursedbeltEnv } from '../context.js';
5
+ import { isApiError } from '../errors.js';
6
+ import type { MetricsBuffer } from '../metrics/metricsBuffer.js';
7
+ import { normalizeRoute } from '../metrics/normalizeRoute.js';
8
8
  import {
9
9
  type AnalyticsEngineDataset,
10
10
  createTelemetrySink,
11
11
  type TelemetrySink,
12
- } from '../metrics/telemetrySink';
12
+ } from '../metrics/telemetrySink.js';
13
13
 
14
14
  /**
15
15
  * Structured request/response logging. After each request it records one
@@ -3,15 +3,15 @@ import { Hono } from 'hono';
3
3
  import { z } from 'zod';
4
4
  import { ChunkStore } from 'cursedbelt-core/ctgr/chunk-store';
5
5
  import { encodeRequest } from 'cursedbelt-core/ctgr';
6
- import type { CursedbeltEnv } from '../context';
7
- import { CTGR_ROUTE_PATTERN, unGETify } from '../ctgr';
6
+ import type { CursedbeltEnv } from '../context.js';
7
+ import { CTGR_ROUTE_PATTERN, unGETify } from '../ctgr.js';
8
8
  import {
9
9
  toValidationIssues,
10
10
  VALIDATION_ERROR_CODE,
11
11
  type ValidationIssue,
12
12
  validationEnvelope,
13
- } from '../errors';
14
- import { zValidator } from './zValidator';
13
+ } from '../errors.js';
14
+ import { zValidator } from './zValidator.js';
15
15
 
16
16
  const ORIGIN = 'http://localhost';
17
17
  const json = (path: string, body: unknown) =>
@@ -29,8 +29,8 @@
29
29
  */
30
30
  import type { Env, MiddlewareHandler } from 'hono';
31
31
  import type { ZodType, z } from 'zod';
32
- import type { CursedbeltEnv } from '../context';
33
- import { validationEnvelope } from '../errors';
32
+ import type { CursedbeltEnv } from '../context.js';
33
+ import { validationEnvelope } from '../errors.js';
34
34
 
35
35
  /** The request locations a schema can validate. Mirrors Hono's body/non-body split. */
36
36
  export type ZValidatorTarget = 'json' | 'form' | 'query' | 'param';
@@ -1,7 +1,7 @@
1
1
  import { Database } from 'bun:sqlite';
2
2
  import { describe, expect, test } from 'bun:test';
3
- import { addColumnIfMissing, applyRecommendedPragmas, columnExists, runMigrations } from './runner';
4
- import type { Migration } from './types';
3
+ import { addColumnIfMissing, applyRecommendedPragmas, columnExists, runMigrations } from './runner.js';
4
+ import type { Migration } from './types.js';
5
5
 
6
6
  describe('runMigrations', () => {
7
7
  test('applies pending migrations once, in order, and is idempotent', () => {
@@ -1,6 +1,6 @@
1
1
  import type { Database } from 'bun:sqlite';
2
2
  import { applyCcPragmas } from 'cwip/sqlite';
3
- import type { Migration } from './types';
3
+ import type { Migration } from './types.js';
4
4
 
5
5
  /**
6
6
  * The versioned SQLite migration runner — a tiny `_migrations`-sentinel runner, NOT
@@ -1,5 +1,5 @@
1
1
  import { describe, expect, it } from 'bun:test';
2
- import { assertPublicOutboundUrl, assertResolvedPublicUrl, OUTBOUND_URL_BLOCKED } from './outboundGuard';
2
+ import { assertPublicOutboundUrl, assertResolvedPublicUrl, OUTBOUND_URL_BLOCKED } from './outboundGuard.js';
3
3
 
4
4
  const code = (fn: () => unknown): string | undefined => {
5
5
  try {
@@ -33,7 +33,7 @@
33
33
  */
34
34
  import { isIP } from 'node:net';
35
35
  import { lookup } from 'node:dns/promises';
36
- import { AppError } from '../errors';
36
+ import { AppError } from '../errors.js';
37
37
 
38
38
  export const OUTBOUND_URL_BLOCKED = 'OUTBOUND_URL_BLOCKED';
39
39
 
@@ -36,22 +36,22 @@
36
36
  * route that notifies somebody else; producing is server-side code calling
37
37
  * `center.notify*`.
38
38
  */
39
- export { createNotificationHub } from "./hub";
39
+ export { createNotificationHub } from "./hub.js";
40
40
  export type {
41
41
  NotificationHub,
42
42
  NotificationHubEvent,
43
43
  NotificationHubListener,
44
44
  NotificationHubOptions,
45
- } from "./hub";
46
- export { NOTIFICATION_MIGRATIONS, NOTIFICATIONS_TABLE } from "./migrations";
47
- export { mountNotificationRoutes } from "./routes";
48
- export type { NotificationRouteCenter, NotificationRoutesOptions } from "./routes";
49
- export { createNotificationService } from "./service";
45
+ } from "./hub.js";
46
+ export { NOTIFICATION_MIGRATIONS, NOTIFICATIONS_TABLE } from "./migrations.js";
47
+ export { mountNotificationRoutes } from "./routes.js";
48
+ export type { NotificationRouteCenter, NotificationRoutesOptions } from "./routes.js";
49
+ export { createNotificationService } from "./service.js";
50
50
  export type {
51
51
  CreateNotificationServiceOptions,
52
52
  NotificationService,
53
53
  NotificationServiceMountOptions,
54
- } from "./service";
54
+ } from "./service.js";
55
55
  // Re-exported so a server consumer needs ONE import for the whole contract —
56
56
  // the same courtesy `server/sharing` extends over `cursedbelt-core/sharing`. The
57
57
  // engine remains cwip's; this is a door, not a copy.
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import type { Database } from "bun:sqlite";
17
17
  import { migrateNotificationsSchema, type NotificationDb } from "cwip/notifications";
18
- import type { Migration } from "../migration/types";
18
+ import type { Migration } from "../migration/types.js";
19
19
 
20
20
  export const NOTIFICATIONS_TABLE = "notifications";
21
21
 
@@ -35,7 +35,7 @@
35
35
  */
36
36
  import type { Context, Hono } from "hono";
37
37
  import type { NotificationCenter, NotificationFilter } from "cwip/notifications";
38
- import type { NotificationHub } from "./hub";
38
+ import type { NotificationHub } from "./hub.js";
39
39
 
40
40
  /** The slice of the center these routes use — `createNotificationCenter(...)`
41
41
  * satisfies it, and so does any app-specific facade over one. */
@@ -10,9 +10,9 @@
10
10
  import { Database } from "bun:sqlite";
11
11
  import { afterEach, beforeEach, describe, expect, test } from "bun:test";
12
12
  import { Hono } from "hono";
13
- import { createNotificationHub } from "./hub";
14
- import { NOTIFICATION_MIGRATIONS, NOTIFICATIONS_TABLE } from "./migrations";
15
- import { createNotificationService, type NotificationService } from "./service";
13
+ import { createNotificationHub } from "./hub.js";
14
+ import { NOTIFICATION_MIGRATIONS, NOTIFICATIONS_TABLE } from "./migrations.js";
15
+ import { createNotificationService, type NotificationService } from "./service.js";
16
16
 
17
17
  let db: Database;
18
18
  let service: NotificationService;
@@ -21,8 +21,8 @@ import {
21
21
  type NotificationStore,
22
22
  } from "cwip/notifications";
23
23
  import type { Context, Hono } from "hono";
24
- import { createNotificationHub, type NotificationHub } from "./hub";
25
- import { mountNotificationRoutes } from "./routes";
24
+ import { createNotificationHub, type NotificationHub } from "./hub.js";
25
+ import { mountNotificationRoutes } from "./routes.js";
26
26
 
27
27
  export interface CreateNotificationServiceOptions {
28
28
  /** The app's own database — the table lands beside its rows. */
@@ -1,7 +1,7 @@
1
1
  import { describe, expect, it } from "bun:test";
2
2
  import { homedir } from "node:os";
3
3
  import { join } from "node:path";
4
- import { APP_DATA_HOME_ENV, resolveAppDataHome, XDG_DATA_HOME_ENV } from "./appDataHome";
4
+ import { APP_DATA_HOME_ENV, resolveAppDataHome, XDG_DATA_HOME_ENV } from "./appDataHome.js";
5
5
 
6
6
  /**
7
7
  * The published-library defect this file is the gate for: a resolver that knows
@@ -4,5 +4,5 @@ export {
4
4
  type ResumeRecord,
5
5
  type ResumeStore,
6
6
  type ResumeStoreOptions,
7
- } from './store';
8
- export { mountResumeRoutes, RESUME_KEY_PATTERN, type ResumeRoutesOptions } from './routes';
7
+ } from './store.js';
8
+ export { mountResumeRoutes, RESUME_KEY_PATTERN, type ResumeRoutesOptions } from './routes.js';
@@ -1,8 +1,8 @@
1
1
  import { describe, expect, test } from 'bun:test';
2
2
  import { Database } from 'bun:sqlite';
3
3
  import { Hono } from 'hono';
4
- import { mountResumeRoutes } from './routes';
5
- import { createSqliteResumeStore, MAX_LOCATION_LENGTH } from './store';
4
+ import { mountResumeRoutes } from './routes.js';
5
+ import { createSqliteResumeStore, MAX_LOCATION_LENGTH } from './store.js';
6
6
 
7
7
  const storeOf = () => createSqliteResumeStore(new Database(':memory:'));
8
8
 
@@ -17,7 +17,7 @@
17
17
  * screen it names.
18
18
  */
19
19
  import type { Context, Hono } from 'hono';
20
- import { MAX_LOCATION_LENGTH, type ResumeStore } from './store';
20
+ import { MAX_LOCATION_LENGTH, type ResumeStore } from './store.js';
21
21
 
22
22
  export interface ResumeRoutesOptions {
23
23
  store: ResumeStore;
@@ -9,14 +9,14 @@ import { afterEach, describe, expect, test } from "bun:test";
9
9
  import { chmodSync, existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
10
10
  import { tmpdir } from "node:os";
11
11
  import { join } from "node:path";
12
- import { resolveAppDataHome } from "../paths/appDataHome";
12
+ import { resolveAppDataHome } from "../paths/appDataHome.js";
13
13
  import {
14
14
  archiveStamp,
15
15
  createJsonlArchive,
16
16
  resolveArchiveHome,
17
17
  verifyArchive,
18
18
  type ArchiveHome,
19
- } from "./archive";
19
+ } from "./archive.js";
20
20
 
21
21
  const temps: string[] = [];
22
22
  const tmp = (): string => {
@@ -58,7 +58,7 @@ import {
58
58
  writeSync,
59
59
  } from "node:fs";
60
60
  import { join } from "node:path";
61
- import { APP_DATA_HOME_ENV, resolveAppDataHome } from "../paths/appDataHome";
61
+ import { APP_DATA_HOME_ENV, resolveAppDataHome } from "../paths/appDataHome.js";
62
62
 
63
63
  /** One sealed archive file. */
64
64
  export interface ArchiveSegment {
@@ -9,10 +9,10 @@
9
9
  * up as data that vanished earlier than the screen said it would — which is the
10
10
  * one failure mode that would make the owner stop trusting the control.
11
11
  */
12
- import type { EffectiveRetentionPolicy, RetentionOverride } from "./policy";
13
- import { RETENTION_CATEGORIES, resolveRetentionPolicy } from "./policy";
14
- import type { PublishedResource, RetentionPublication } from "./store";
15
- import { readRetentionOverrides, readRetentionRegistry, resolveRetentionHome } from "./store";
12
+ import type { EffectiveRetentionPolicy, RetentionOverride } from "./policy.js";
13
+ import { RETENTION_CATEGORIES, resolveRetentionPolicy } from "./policy.js";
14
+ import type { PublishedResource, RetentionPublication } from "./store.js";
15
+ import { readRetentionOverrides, readRetentionRegistry, resolveRetentionHome } from "./store.js";
16
16
 
17
17
  export interface RetentionFleetRow extends PublishedResource {
18
18
  key: string;
@@ -40,7 +40,7 @@ export {
40
40
  type ArchiveSegment,
41
41
  type ArchiveSink,
42
42
  type JsonlArchiveOptions,
43
- } from "./archive";
43
+ } from "./archive.js";
44
44
  export {
45
45
  ARCHIVING_RETENTION_CATEGORIES,
46
46
  assertRetentionDeclaration,
@@ -65,7 +65,7 @@ export {
65
65
  type RetentionFieldSource,
66
66
  type RetentionOverride,
67
67
  type RetentionUnit,
68
- } from "./policy";
68
+ } from "./policy.js";
69
69
  export {
70
70
  publishRetention,
71
71
  readRetentionOverrides,
@@ -78,7 +78,7 @@ export {
78
78
  type RetentionOverridesFile,
79
79
  type RetentionPublication,
80
80
  type RetentionSweepReport,
81
- } from "./store";
81
+ } from "./store.js";
82
82
  export {
83
83
  createArchivingSqliteTableTarget,
84
84
  createFileDirTarget,
@@ -88,7 +88,7 @@ export {
88
88
  type RetentionPreview,
89
89
  type RetentionTarget,
90
90
  type SqliteTableTargetOptions,
91
- } from "./target";
91
+ } from "./target.js";
92
92
  export {
93
93
  createRetentionSweeper,
94
94
  DEFAULT_SWEEP_INTERVAL_MS,
@@ -97,5 +97,5 @@ export {
97
97
  type ResourceOutcome,
98
98
  type RetentionRunReport,
99
99
  type RetentionSweeper,
100
- } from "./sweeper";
101
- export { buildRetentionFleetView, type RetentionFleetRow, type RetentionFleetView } from "./fleet";
100
+ } from "./sweeper.js";
101
+ export { buildRetentionFleetView, type RetentionFleetRow, type RetentionFleetView } from "./fleet.js";
@@ -11,7 +11,7 @@ import {
11
11
  resolveRetentionPolicy,
12
12
  retentionKey,
13
13
  type RetentionDeclaration,
14
- } from "./policy";
14
+ } from "./policy.js";
15
15
 
16
16
  const decl = (over: Partial<RetentionDeclaration> = {}): RetentionDeclaration => ({
17
17
  app: "orch",
@@ -2,8 +2,8 @@ import { afterEach, beforeEach, describe, expect, test } from "bun:test";
2
2
  import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
3
3
  import { tmpdir } from "node:os";
4
4
  import { join } from "node:path";
5
- import { resolveAppDataHome } from "../paths/appDataHome";
6
- import type { RetentionDeclaration } from "./policy";
5
+ import { resolveAppDataHome } from "../paths/appDataHome.js";
6
+ import type { RetentionDeclaration } from "./policy.js";
7
7
  import {
8
8
  publishRetention,
9
9
  readRetentionOverrides,
@@ -11,7 +11,7 @@ import {
11
11
  resolveRetentionHome,
12
12
  setRetentionHomeForTests,
13
13
  writeRetentionOverride,
14
- } from "./store";
14
+ } from "./store.js";
15
15
 
16
16
  const decl = (app: string, id: string): RetentionDeclaration => ({
17
17
  app,
@@ -54,9 +54,9 @@ import {
54
54
  writeFileSync,
55
55
  } from "node:fs";
56
56
  import { join } from "node:path";
57
- import { APP_DATA_HOME_ENV, resolveAppDataHome } from "../paths/appDataHome";
58
- import type { RetentionDeclaration, RetentionOverride } from "./policy";
59
- import { retentionKey } from "./policy";
57
+ import { APP_DATA_HOME_ENV, resolveAppDataHome } from "../paths/appDataHome.js";
58
+ import type { RetentionDeclaration, RetentionOverride } from "./policy.js";
59
+ import { retentionKey } from "./policy.js";
60
60
 
61
61
  /** What one sweep of one resource did. Published so the UI can show it. */
62
62
  export interface RetentionSweepReport {
@@ -3,11 +3,11 @@ import { afterEach, beforeEach, describe, expect, test } from "bun:test";
3
3
  import { mkdtempSync, rmSync } from "node:fs";
4
4
  import { tmpdir } from "node:os";
5
5
  import { join } from "node:path";
6
- import { buildRetentionFleetView } from "./fleet";
7
- import { DAY_MS, type RetentionDeclaration } from "./policy";
8
- import { readRetentionRegistry, setRetentionHomeForTests, writeRetentionOverride } from "./store";
9
- import { createRetentionSweeper } from "./sweeper";
10
- import { createSqliteTableTarget, type RetentionTarget } from "./target";
6
+ import { buildRetentionFleetView } from "./fleet.js";
7
+ import { DAY_MS, type RetentionDeclaration } from "./policy.js";
8
+ import { readRetentionRegistry, setRetentionHomeForTests, writeRetentionOverride } from "./store.js";
9
+ import { createRetentionSweeper } from "./sweeper.js";
10
+ import { createSqliteTableTarget, type RetentionTarget } from "./target.js";
11
11
 
12
12
  const NOW = 1_800_000_000_000;
13
13
 
@@ -19,11 +19,11 @@
19
19
  */
20
20
  import { statSync } from "node:fs";
21
21
  import { join } from "node:path";
22
- import type { EffectiveRetentionPolicy } from "./policy";
23
- import { assertRetentionDeclaration, resolveRetentionPolicy, retentionKey } from "./policy";
24
- import type { PublishedResource, RetentionSweepReport } from "./store";
25
- import { publishRetention, readRetentionOverrides, resolveRetentionHome } from "./store";
26
- import type { RetentionTarget } from "./target";
22
+ import type { EffectiveRetentionPolicy } from "./policy.js";
23
+ import { assertRetentionDeclaration, resolveRetentionPolicy, retentionKey } from "./policy.js";
24
+ import type { PublishedResource, RetentionSweepReport } from "./store.js";
25
+ import { publishRetention, readRetentionOverrides, resolveRetentionHome } from "./store.js";
26
+ import type { RetentionTarget } from "./target.js";
27
27
 
28
28
  /** Default cadence. Diagnostic data is not urgent; four sweeps a day is plenty. */
29
29
  export const DEFAULT_SWEEP_INTERVAL_MS = 6 * 60 * 60 * 1000;
@@ -11,13 +11,13 @@ import {
11
11
  } from "node:fs";
12
12
  import { tmpdir } from "node:os";
13
13
  import { join } from "node:path";
14
- import { DAY_MS, resolveRetentionPolicy, type RetentionDeclaration } from "./policy";
15
- import { createJsonlArchive, verifyArchive } from "./archive";
14
+ import { DAY_MS, resolveRetentionPolicy, type RetentionDeclaration } from "./policy.js";
15
+ import { createJsonlArchive, verifyArchive } from "./archive.js";
16
16
  import {
17
17
  createArchivingSqliteTableTarget,
18
18
  createFileDirTarget,
19
19
  createSqliteTableTarget,
20
- } from "./target";
20
+ } from "./target.js";
21
21
 
22
22
  const NOW = 1_800_000_000_000;
23
23
  const daysAgo = (n: number): number => NOW - n * DAY_MS;
@@ -17,11 +17,11 @@
17
17
  import type { Database } from "bun:sqlite";
18
18
  import { readdirSync, rmSync, statSync } from "node:fs";
19
19
  import { join } from "node:path";
20
- import type { ArchiveSink } from "./archive";
21
- import { DEFAULT_PENDING_ARCHIVE_BUDGET_BYTES } from "./archive";
22
- import type { EffectiveRetentionPolicy, RetentionDeclaration } from "./policy";
23
- import { categoryArchivesBeforeDelete, cutoffFor, retentionKey } from "./policy";
24
- import type { RetentionMeasurement, RetentionSweepReport } from "./store";
20
+ import type { ArchiveSink } from "./archive.js";
21
+ import { DEFAULT_PENDING_ARCHIVE_BUDGET_BYTES } from "./archive.js";
22
+ import type { EffectiveRetentionPolicy, RetentionDeclaration } from "./policy.js";
23
+ import { categoryArchivesBeforeDelete, cutoffFor, retentionKey } from "./policy.js";
24
+ import type { RetentionMeasurement, RetentionSweepReport } from "./store.js";
25
25
 
26
26
  export interface RetentionPreview {
27
27
  /** Items the age rule would remove. */
@@ -2,11 +2,11 @@
2
2
  // Postgres. `createSaasHostServices` is the near side a deployment actually
3
3
  // calls; these are exported for a host that wires the tier by hand and for the
4
4
  // migration step that creates the schema.
5
- export { createPgSearchProvider, type PgSearchProviderOptions } from './pgSearchProvider';
5
+ export { createPgSearchProvider, type PgSearchProviderOptions } from './pgSearchProvider.js';
6
6
  export {
7
7
  ensureSaasSearchSchema,
8
8
  PG_RANK_WEIGHTS,
9
9
  PG_SEARCH_CHUNKS_DDL,
10
10
  PG_SEARCH_DDL,
11
11
  PG_SEARCH_DOCS_DDL,
12
- } from './pgSearchSchema';
12
+ } from './pgSearchSchema.js';
@@ -24,8 +24,8 @@
24
24
  import { SQL } from 'bun';
25
25
  import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'bun:test';
26
26
  import type { SaasConnection, SaasPool } from 'cwip/storage';
27
- import { createPgSearchProvider } from './pgSearchProvider';
28
- import { ensureSaasSearchSchema } from './pgSearchSchema';
27
+ import { createPgSearchProvider } from './pgSearchProvider.js';
28
+ import { ensureSaasSearchSchema } from './pgSearchSchema.js';
29
29
 
30
30
  const ADMIN_URL = process.env.CC_PG_URL;
31
31
 
@@ -87,8 +87,8 @@ import {
87
87
  type StatementExecutor,
88
88
  type WriteResult,
89
89
  } from 'cwip/storage';
90
- import { AppError } from '../errors';
91
- import { PG_RANK_WEIGHTS } from './pgSearchSchema';
90
+ import { AppError } from '../errors.js';
91
+ import { PG_RANK_WEIGHTS } from './pgSearchSchema.js';
92
92
 
93
93
  const DEFAULT_LIMIT = 20;
94
94
  const MAX_LIMIT = 200;
@@ -6,23 +6,23 @@
6
6
  * `./store.ts`'s header for the five properties it guarantees and `./sql.ts` for
7
7
  * why the row filter is a SQL fragment rather than a list of ids.
8
8
  */
9
- export { SHARE_MIGRATIONS } from "./migrations";
9
+ export { SHARE_MIGRATIONS } from "./migrations.js";
10
10
  export {
11
11
  SHARE_EVENTS_TABLE,
12
12
  SHARE_GRANTS_TABLE,
13
13
  SHARE_GROUPS_TABLE,
14
14
  SHARE_GROUP_MEMBERS_TABLE,
15
- } from "./migrations";
15
+ } from "./migrations.js";
16
16
  export {
17
17
  GROUP_SUBJECT_PREFIX,
18
18
  mountShareRoutes,
19
19
  parseSubjectParam,
20
20
  subjectParam,
21
- } from "./router";
22
- export type { ShareRouterOptions, ShareRouterViewer, ShareRoutesPayload } from "./router";
23
- export { sharedResourceSql, sqlColumn, sqlLiteral } from "./sql";
24
- export type { SharedResourceSqlOptions } from "./sql";
25
- export { createShareStore, group, user } from "./store";
21
+ } from "./router.js";
22
+ export type { ShareRouterOptions, ShareRouterViewer, ShareRoutesPayload } from "./router.js";
23
+ export { sharedResourceSql, sqlColumn, sqlLiteral } from "./sql.js";
24
+ export type { SharedResourceSqlOptions } from "./sql.js";
25
+ export { createShareStore, group, user } from "./store.js";
26
26
  export type {
27
27
  GrantInput,
28
28
  RevokeInput,
@@ -30,7 +30,7 @@ export type {
30
30
  ShareStore,
31
31
  ShareStoreOptions,
32
32
  ShareTarget,
33
- } from "./store";
33
+ } from "./store.js";
34
34
  // Re-exported so a server consumer needs ONE import for the whole contract; the
35
35
  // pure entry (`cursedbelt-core/sharing`) stays available for a browser or a test.
36
36
  export {
@@ -31,7 +31,7 @@
31
31
  * deleting a group deletes its membership and appends one per removal.
32
32
  */
33
33
  import type { Database } from "bun:sqlite";
34
- import type { Migration } from "../migration/types";
34
+ import type { Migration } from "../migration/types.js";
35
35
 
36
36
  export const SHARE_GRANTS_TABLE = "share_grants";
37
37
  export const SHARE_GROUPS_TABLE = "share_groups";
@@ -10,8 +10,8 @@
10
10
  import { Database } from "bun:sqlite";
11
11
  import { beforeEach, describe, expect, test } from "bun:test";
12
12
  import { Hono } from "hono";
13
- import { mountShareRoutes, parseSubjectParam, subjectParam } from "./router";
14
- import { createShareStore, user } from "./store";
13
+ import { mountShareRoutes, parseSubjectParam, subjectParam } from "./router.js";
14
+ import { createShareStore, user } from "./store.js";
15
15
 
16
16
  let db: Database;
17
17
  let shares: ReturnType<typeof createShareStore>;
@@ -44,7 +44,7 @@
44
44
  */
45
45
  import type { Context, Hono } from 'hono';
46
46
  import type { ShareEvent, ShareGrant, ShareLevel } from 'cursedbelt-core/sharing/model';
47
- import type { ShareStore } from './store';
47
+ import type { ShareStore } from './store.js';
48
48
 
49
49
  /** The `group:` prefix that lets a group subject travel in a path segment. Exported so a
50
50
  * client and a route cannot disagree about it. */
@@ -26,7 +26,7 @@
26
26
  * tested with hostile input; a consumer never quotes anything itself.
27
27
  */
28
28
  import { levelsMeeting, normalizeSubjectId, type ShareLevel } from "cursedbelt-core/sharing/model";
29
- import { SHARE_GRANTS_TABLE, SHARE_GROUP_MEMBERS_TABLE } from "./migrations";
29
+ import { SHARE_GRANTS_TABLE, SHARE_GROUP_MEMBERS_TABLE } from "./migrations.js";
30
30
 
31
31
  /**
32
32
  * Quote a string as a SQL literal.