cursedbelt-server 4.12.0 → 4.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/_bunOnly.d.ts +1 -0
- package/dist/server/_bunOnly.js +12 -0
- package/dist/server/activity/index.d.ts +4 -4
- package/dist/server/activity/index.js +3 -3
- package/dist/server/activity/migrations.d.ts +1 -1
- package/dist/server/activity/shareSource.d.ts +1 -1
- package/dist/server/activity/shareSource.js +1 -1
- package/dist/server/activity/store.js +2 -2
- package/dist/server/analytics/index.d.ts +2 -2
- package/dist/server/analytics/index.js +2 -2
- package/dist/server/app.d.ts +4 -4
- package/dist/server/app.js +6 -6
- package/dist/server/audit/index.d.ts +2 -2
- package/dist/server/audit/index.js +2 -2
- package/dist/server/audit/migrations.d.ts +1 -1
- package/dist/server/audit/sqliteSink.js +2 -2
- package/dist/server/audit/sqliteSink.test.js +1 -1
- package/dist/server/auth/csrf.js +1 -1
- package/dist/server/auth/fileTokenSigner.d.ts +1 -1
- package/dist/server/auth/getOnly.d.ts +1 -1
- package/dist/server/auth/getOnly.js +1 -1
- package/dist/server/auth/index.d.ts +12 -12
- package/dist/server/auth/index.js +11 -11
- package/dist/server/auth/jwt.d.ts +1 -1
- package/dist/server/auth/middleware.d.ts +1 -1
- package/dist/server/auth/middleware.js +3 -3
- package/dist/server/auth/sessionStore.d.ts +2 -2
- package/dist/server/auth/types.d.ts +1 -1
- package/dist/server/bench/assert.d.ts +1 -1
- package/dist/server/bench/assert.js +1 -1
- package/dist/server/bench/cpuBudget.d.ts +4 -4
- package/dist/server/bench/cpuBudget.js +3 -3
- package/dist/server/bench/index.d.ts +6 -6
- package/dist/server/bench/index.js +6 -6
- package/dist/server/bench/recorder.d.ts +2 -2
- package/dist/server/bench/recorder.js +1 -1
- package/dist/server/bench/runBench.d.ts +2 -2
- package/dist/server/ctgr.d.ts +1 -1
- package/dist/server/ctgr.js +1 -1
- package/dist/server/d1/fakeD1.d.ts +1 -1
- package/dist/server/d1/fakeD1.js +1 -1
- package/dist/server/d1/index.d.ts +8 -8
- package/dist/server/d1/index.js +8 -8
- package/dist/server/d1/invocation.d.ts +1 -1
- package/dist/server/d1/invocation.js +2 -2
- package/dist/server/d1/kysely.d.ts +2 -2
- package/dist/server/d1/kysely.js +2 -2
- package/dist/server/d1/limits.d.ts +1 -1
- package/dist/server/d1/limits.js +1 -1
- package/dist/server/d1/local.d.ts +1 -1
- package/dist/server/d1/local.js +3 -3
- package/dist/server/d1/localBackup.d.ts +1 -1
- package/dist/server/d1/localBackup.js +2 -2
- package/dist/server/d1/remote.d.ts +1 -1
- package/dist/server/d1/remote.js +3 -3
- package/dist/server/d1/scheduling.d.ts +1 -1
- package/dist/server/d1/values.d.ts +1 -1
- package/dist/server/d1/values.js +1 -1
- package/dist/server/db/kysely.d.ts +1 -1
- package/dist/server/dropzone/index.d.ts +2 -2
- package/dist/server/dropzone/index.js +2 -2
- package/dist/server/guard/argon2Binding.js +1 -1
- package/dist/server/guard/index.d.ts +5 -5
- package/dist/server/guard/index.js +5 -5
- package/dist/server/guard/kdfWorker.d.ts +1 -1
- package/dist/server/guard/kdfWorker.js +3 -3
- package/dist/server/guard/kdfWorkerEntry.js +1 -1
- package/dist/server/guard/passwordVerifier.js +1 -1
- package/dist/server/guard/sessionSigner.d.ts +2 -2
- package/dist/server/guard/sessionSigner.js +1 -1
- package/dist/server/incidents/checks.d.ts +2 -2
- package/dist/server/incidents/index.d.ts +8 -8
- package/dist/server/incidents/index.js +8 -8
- package/dist/server/incidents/migrations.d.ts +1 -1
- package/dist/server/incidents/notifier.d.ts +3 -3
- package/dist/server/incidents/reporter.d.ts +1 -1
- package/dist/server/incidents/routes.d.ts +4 -4
- package/dist/server/incidents/routes.js +1 -1
- package/dist/server/incidents/store.d.ts +1 -1
- package/dist/server/incidents/store.js +3 -3
- package/dist/server/index.d.ts +26 -26
- package/dist/server/index.js +23 -23
- package/dist/server/jobs/fireQueue.d.ts +1 -1
- package/dist/server/jobs/fireQueue.js +3 -3
- package/dist/server/jobs/index.d.ts +7 -7
- package/dist/server/jobs/index.js +7 -7
- package/dist/server/jobs/logger.d.ts +1 -1
- package/dist/server/jobs/polling.d.ts +1 -1
- package/dist/server/jobs/polling.js +1 -1
- package/dist/server/jobs/runner.d.ts +1 -1
- package/dist/server/jobs/runner.js +5 -5
- package/dist/server/master-lock/accountsPage.d.ts +1 -1
- package/dist/server/master-lock/accountsPage.js +1 -1
- package/dist/server/master-lock/guard.d.ts +2 -2
- package/dist/server/master-lock/guard.js +2 -2
- package/dist/server/master-lock/index.d.ts +7 -7
- package/dist/server/master-lock/index.js +7 -7
- package/dist/server/master-lock/masterLock.js +1 -11
- package/dist/server/master-lock/principals.d.ts +1 -1
- package/dist/server/master-lock/principals.js +1 -1
- package/dist/server/master-lock/seed.d.ts +1 -1
- package/dist/server/master-lock/seed.js +1 -1
- package/dist/server/master-lock/store.d.ts +1 -1
- package/dist/server/media-bun/index.d.ts +3 -3
- package/dist/server/media-bun/index.js +3 -3
- package/dist/server/media-bun/video.d.ts +1 -1
- package/dist/server/media-bun/video.js +1 -1
- package/dist/server/metrics/telemetrySink.d.ts +1 -1
- package/dist/server/metrics/telemetrySink.js +1 -1
- package/dist/server/middleware/correlationId.d.ts +1 -1
- package/dist/server/middleware/errorEnvelope.d.ts +1 -1
- package/dist/server/middleware/errorEnvelope.js +1 -1
- package/dist/server/middleware/index.d.ts +10 -10
- package/dist/server/middleware/index.js +10 -10
- package/dist/server/middleware/rateLimit.js +1 -1
- package/dist/server/middleware/requestLogger.d.ts +3 -3
- package/dist/server/middleware/requestLogger.js +3 -3
- package/dist/server/middleware/zValidator.d.ts +1 -1
- package/dist/server/middleware/zValidator.js +1 -1
- package/dist/server/migration/runner.d.ts +1 -1
- package/dist/server/net/outboundGuard.js +1 -1
- package/dist/server/notifications/index.d.ts +7 -7
- package/dist/server/notifications/index.js +4 -4
- package/dist/server/notifications/migrations.d.ts +1 -1
- package/dist/server/notifications/routes.d.ts +1 -1
- package/dist/server/notifications/service.d.ts +1 -1
- package/dist/server/notifications/service.js +2 -2
- package/dist/server/resume/index.d.ts +2 -2
- package/dist/server/resume/index.js +2 -2
- package/dist/server/resume/routes.d.ts +1 -1
- package/dist/server/resume/routes.js +1 -1
- package/dist/server/retention/archive.js +1 -1
- package/dist/server/retention/fleet.d.ts +2 -2
- package/dist/server/retention/fleet.js +2 -2
- package/dist/server/retention/index.d.ts +6 -6
- package/dist/server/retention/index.js +6 -6
- package/dist/server/retention/store.d.ts +1 -1
- package/dist/server/retention/store.js +2 -2
- package/dist/server/retention/sweeper.d.ts +3 -3
- package/dist/server/retention/sweeper.js +2 -2
- package/dist/server/retention/target.d.ts +3 -3
- package/dist/server/retention/target.js +2 -2
- package/dist/server/search/index.d.ts +2 -2
- package/dist/server/search/index.js +2 -2
- package/dist/server/search/pgSearchProvider.js +2 -2
- package/dist/server/search/pgSearchProvider.pg.test.js +2 -2
- package/dist/server/sharing/index.d.ts +8 -8
- package/dist/server/sharing/index.js +5 -5
- package/dist/server/sharing/migrations.d.ts +1 -1
- package/dist/server/sharing/router.d.ts +1 -1
- package/dist/server/sharing/sql.js +1 -1
- package/dist/server/sharing/store.js +3 -3
- package/dist/server/sqlite/browse.js +1 -1
- package/dist/server/sqlite/export.js +1 -1
- package/dist/server/sqlite/import.js +1 -1
- package/dist/server/sqlite/index.d.ts +9 -9
- package/dist/server/sqlite/index.js +9 -9
- package/dist/server/sqlite/stats.js +1 -1
- package/dist/server/sqlite/viewer.js +2 -2
- package/dist/server/storage/binaryServerProcessing.d.ts +1 -1
- package/dist/server/storage/binaryServerProcessing.js +2 -2
- package/dist/server/storage/binaryServerStore.d.ts +2 -2
- package/dist/server/storage/binaryStore.d.ts +1 -1
- package/dist/server/storage/binaryStoreFake.d.ts +1 -1
- package/dist/server/storage/diskStore.d.ts +1 -1
- package/dist/server/storage/files/adapter.d.ts +4 -4
- package/dist/server/storage/files/adapter.js +1 -1
- package/dist/server/storage/files/catalogue.d.ts +3 -3
- package/dist/server/storage/files/catalogue.js +6 -6
- package/dist/server/storage/files/chunkedUpload.d.ts +3 -3
- package/dist/server/storage/files/chunkedUpload.js +1 -1
- package/dist/server/storage/files/fileRoutes.d.ts +4 -4
- package/dist/server/storage/files/fileRoutes.js +3 -3
- package/dist/server/storage/files/index.d.ts +9 -9
- package/dist/server/storage/files/index.js +8 -8
- package/dist/server/storage/files/migrations.d.ts +1 -1
- package/dist/server/storage/files/stack.d.ts +7 -7
- package/dist/server/storage/files/stack.js +10 -10
- package/dist/server/storage/files/storageOps.d.ts +1 -1
- package/dist/server/storage/files/types.d.ts +1 -1
- package/dist/server/storage/imageThumbnail.js +1 -1
- package/dist/server/storage/index.d.ts +15 -15
- package/dist/server/storage/index.js +14 -14
- package/dist/server/storage/mountMediaRoutes.d.ts +3 -3
- package/dist/server/storage/mountMediaRoutes.js +2 -2
- package/dist/server/storage/objectStoreMediaStore.d.ts +1 -1
- package/dist/server/storage/s3ObjectStore.js +1 -1
- package/dist/server/storage/sources.d.ts +2 -2
- package/dist/server/storage/sources.js +2 -2
- package/dist/server/storage/streamRange.d.ts +1 -1
- package/dist/server/storage/streamToken.js +1 -1
- package/dist/server/storage/videoProcessor.d.ts +1 -1
- package/dist/server/storage/videoProcessor.js +2 -2
- package/dist/server/sync/engine.d.ts +2 -2
- package/dist/server/sync/engine.js +1 -1
- package/dist/server/sync/http.d.ts +4 -4
- package/dist/server/sync/http.js +3 -3
- package/dist/server/sync/index.d.ts +11 -11
- package/dist/server/sync/index.js +11 -11
- package/dist/server/sync/opLog.d.ts +1 -1
- package/dist/server/sync/signal.d.ts +1 -1
- package/dist/server/sync/timer.d.ts +3 -3
- package/dist/server/sync/timer.js +1 -1
- package/dist/server/ws/eventBus.d.ts +1 -1
- package/dist/server/ws/hub.d.ts +1 -1
- package/dist/server/ws/hub.js +3 -3
- package/dist/server/ws/index.d.ts +5 -5
- package/dist/server/ws/index.js +4 -4
- package/dist/server/ws/presence.d.ts +1 -1
- package/dist/server/ws/room.d.ts +1 -1
- package/dist/server/ws/types.d.ts +1 -1
- package/package.json +9 -9
- package/src/publicSurface.spec.ts +1 -1
- package/src/server/_bunOnly.ts +15 -0
- package/src/server/activity/index.ts +4 -4
- package/src/server/activity/migrations.ts +1 -1
- package/src/server/activity/shareSource.ts +2 -2
- package/src/server/activity/store.spec.ts +3 -3
- package/src/server/activity/store.ts +2 -2
- package/src/server/analytics/index.ts +2 -2
- package/src/server/analytics/injectedScripts.spec.ts +3 -3
- package/src/server/analytics/webAnalytics.spec.ts +1 -1
- package/src/server/app.spec.ts +9 -9
- package/src/server/app.ts +7 -7
- package/src/server/audit/index.ts +2 -2
- package/src/server/audit/migrations.ts +1 -1
- package/src/server/audit/sqliteSink.test.ts +1 -1
- package/src/server/audit/sqliteSink.ts +2 -2
- package/src/server/auth/cookie.spec.ts +1 -1
- package/src/server/auth/csrf.spec.ts +1 -1
- package/src/server/auth/csrf.ts +1 -1
- package/src/server/auth/fileTokenSigner.ts +1 -1
- package/src/server/auth/getOnly.spec.ts +2 -2
- package/src/server/auth/getOnly.ts +2 -2
- package/src/server/auth/index.ts +12 -12
- package/src/server/auth/jwt.spec.ts +2 -2
- package/src/server/auth/jwt.ts +1 -1
- package/src/server/auth/loginThrottle.spec.ts +1 -1
- package/src/server/auth/middleware.spec.ts +7 -7
- package/src/server/auth/middleware.ts +4 -4
- package/src/server/auth/password.spec.ts +1 -1
- package/src/server/auth/sessionStore.spec.ts +3 -3
- package/src/server/auth/sessionStore.ts +3 -3
- package/src/server/auth/totp.spec.ts +1 -1
- package/src/server/auth/types.ts +1 -1
- package/src/server/auth/vault.spec.ts +1 -1
- package/src/server/bench/assert.ts +2 -2
- package/src/server/bench/budget.spec.ts +2 -2
- package/src/server/bench/cpuBudget.spec.ts +6 -6
- package/src/server/bench/cpuBudget.ts +5 -5
- package/src/server/bench/cpuClock.spec.ts +2 -2
- package/src/server/bench/index.ts +6 -6
- package/src/server/bench/recorder.ts +2 -2
- package/src/server/bench/runBench.ts +2 -2
- package/src/server/ctgr.spec.ts +2 -2
- package/src/server/ctgr.ts +2 -2
- package/src/server/d1/backup.spec.ts +2 -2
- package/src/server/d1/fakeD1.ts +2 -2
- package/src/server/d1/index.ts +8 -8
- package/src/server/d1/invocation.spec.ts +6 -6
- package/src/server/d1/invocation.ts +2 -2
- package/src/server/d1/kysely.spec.ts +5 -5
- package/src/server/d1/kysely.ts +3 -3
- package/src/server/d1/limits.spec.ts +3 -3
- package/src/server/d1/limits.ts +1 -1
- package/src/server/d1/local.ts +3 -3
- package/src/server/d1/localBackup.ts +3 -3
- package/src/server/d1/remote.ts +3 -3
- package/src/server/d1/sameShape.spec.ts +4 -4
- package/src/server/d1/scheduling.spec.ts +1 -1
- package/src/server/d1/scheduling.ts +1 -1
- package/src/server/d1/values.ts +1 -1
- package/src/server/db/kysely.spec.ts +1 -1
- package/src/server/db/kysely.ts +1 -1
- package/src/server/dropzone/index.ts +2 -2
- package/src/server/dropzone/scan.spec.ts +1 -1
- package/src/server/errors.spec.ts +1 -1
- package/src/server/guard/argon2Binding.spec.ts +1 -1
- package/src/server/guard/argon2Binding.ts +1 -1
- package/src/server/guard/argon2Kat.spec.ts +1 -1
- package/src/server/guard/guard.spec.ts +3 -3
- package/src/server/guard/index.ts +5 -5
- package/src/server/guard/kdfWorker.spec.ts +3 -3
- package/src/server/guard/kdfWorker.ts +3 -3
- package/src/server/guard/kdfWorkerEntry.ts +1 -1
- package/src/server/guard/passwordVerifier.spec.ts +1 -1
- package/src/server/guard/passwordVerifier.ts +1 -1
- package/src/server/guard/revocationStore.spec.ts +2 -2
- package/src/server/guard/sessionSigner.ts +3 -3
- package/src/server/incidents/checks.ts +2 -2
- package/src/server/incidents/incidents.spec.ts +7 -7
- package/src/server/incidents/index.ts +8 -8
- package/src/server/incidents/migrations.ts +1 -1
- package/src/server/incidents/notifier.ts +3 -3
- package/src/server/incidents/reporter.ts +1 -1
- package/src/server/incidents/routes.ts +5 -5
- package/src/server/incidents/store.ts +3 -3
- package/src/server/index.ts +26 -26
- package/src/server/jobs/fireQueue.spec.ts +1 -1
- package/src/server/jobs/fireQueue.ts +3 -3
- package/src/server/jobs/index.ts +7 -7
- package/src/server/jobs/logger.ts +1 -1
- package/src/server/jobs/plainjobAdapter.spec.ts +1 -1
- package/src/server/jobs/polling.spec.ts +1 -1
- package/src/server/jobs/polling.ts +2 -2
- package/src/server/jobs/runner.spec.ts +3 -3
- package/src/server/jobs/runner.ts +5 -5
- package/src/server/jobs/timeout.spec.ts +1 -1
- package/src/server/master-lock/accounts.spec.ts +2 -2
- package/src/server/master-lock/accountsPage.spec.ts +4 -4
- package/src/server/master-lock/accountsPage.ts +1 -1
- package/src/server/master-lock/beaconNeverReachesTheWall.spec.ts +4 -4
- package/src/server/master-lock/guard.spec.ts +3 -3
- package/src/server/master-lock/guard.ts +3 -3
- package/src/server/master-lock/index.ts +7 -7
- package/src/server/master-lock/lockPage.spec.ts +2 -2
- package/src/server/master-lock/masterLock.spec.ts +2 -2
- package/src/server/master-lock/masterLock.ts +1 -10
- package/src/server/master-lock/principals.spec.ts +4 -4
- package/src/server/master-lock/principals.ts +1 -1
- package/src/server/master-lock/seed.spec.ts +3 -3
- package/src/server/master-lock/seed.ts +1 -1
- package/src/server/master-lock/store.ts +1 -1
- package/src/server/media-bun/image.spec.ts +1 -1
- package/src/server/media-bun/index.ts +3 -3
- package/src/server/media-bun/streaming.spec.ts +1 -1
- package/src/server/media-bun/video.spec.ts +1 -1
- package/src/server/media-bun/video.ts +1 -1
- package/src/server/metrics/normalizeRoute.spec.ts +1 -1
- package/src/server/metrics/telemetrySink.spec.ts +3 -3
- package/src/server/metrics/telemetrySink.ts +1 -1
- package/src/server/middleware/bodyLimit.spec.ts +1 -1
- package/src/server/middleware/correlationId.ts +1 -1
- package/src/server/middleware/corsAllowlist.spec.ts +2 -2
- package/src/server/middleware/errorEnvelope.ts +2 -2
- package/src/server/middleware/index.ts +10 -10
- package/src/server/middleware/localOrigin.spec.ts +1 -1
- package/src/server/middleware/rateLimit.spec.ts +1 -1
- package/src/server/middleware/rateLimit.ts +1 -1
- package/src/server/middleware/requestLogger.ts +5 -5
- package/src/server/middleware/zValidator.spec.ts +4 -4
- package/src/server/middleware/zValidator.ts +2 -2
- package/src/server/migration/runner.spec.ts +2 -2
- package/src/server/migration/runner.ts +1 -1
- package/src/server/net/outboundGuard.spec.ts +1 -1
- package/src/server/net/outboundGuard.ts +1 -1
- package/src/server/notifications/index.ts +7 -7
- package/src/server/notifications/migrations.ts +1 -1
- package/src/server/notifications/routes.ts +1 -1
- package/src/server/notifications/service.spec.ts +3 -3
- package/src/server/notifications/service.ts +2 -2
- package/src/server/paths/appDataHome.spec.ts +1 -1
- package/src/server/resume/index.ts +2 -2
- package/src/server/resume/resume.spec.ts +2 -2
- package/src/server/resume/routes.ts +1 -1
- package/src/server/retention/archive.spec.ts +2 -2
- package/src/server/retention/archive.ts +1 -1
- package/src/server/retention/fleet.ts +4 -4
- package/src/server/retention/index.ts +6 -6
- package/src/server/retention/policy.spec.ts +1 -1
- package/src/server/retention/store.spec.ts +3 -3
- package/src/server/retention/store.ts +3 -3
- package/src/server/retention/sweeper.spec.ts +5 -5
- package/src/server/retention/sweeper.ts +5 -5
- package/src/server/retention/target.spec.ts +3 -3
- package/src/server/retention/target.ts +5 -5
- package/src/server/search/index.ts +2 -2
- package/src/server/search/pgSearchProvider.pg.test.ts +2 -2
- package/src/server/search/pgSearchProvider.ts +2 -2
- package/src/server/sharing/index.ts +8 -8
- package/src/server/sharing/migrations.ts +1 -1
- package/src/server/sharing/router.spec.ts +2 -2
- package/src/server/sharing/router.ts +1 -1
- package/src/server/sharing/sql.ts +1 -1
- package/src/server/sharing/store.spec.ts +2 -2
- package/src/server/sharing/store.ts +3 -3
- package/src/server/sqlite/backup.spec.ts +1 -1
- package/src/server/sqlite/browse.spec.ts +1 -1
- package/src/server/sqlite/browse.ts +1 -1
- package/src/server/sqlite/export.spec.ts +2 -2
- package/src/server/sqlite/export.ts +1 -1
- package/src/server/sqlite/fts5.spec.ts +1 -1
- package/src/server/sqlite/health.spec.ts +1 -1
- package/src/server/sqlite/import.spec.ts +3 -3
- package/src/server/sqlite/import.ts +1 -1
- package/src/server/sqlite/index.ts +9 -9
- package/src/server/sqlite/readonlySql.spec.ts +1 -1
- package/src/server/sqlite/stats.spec.ts +1 -1
- package/src/server/sqlite/stats.ts +1 -1
- package/src/server/sqlite/viewer.spec.ts +1 -1
- package/src/server/sqlite/viewer.ts +2 -2
- package/src/server/storage/binaryServerProcessing.integration.spec.ts +2 -2
- package/src/server/storage/binaryServerProcessing.spec.ts +2 -2
- package/src/server/storage/binaryServerProcessing.ts +3 -3
- package/src/server/storage/binaryServerStore.ts +3 -3
- package/src/server/storage/binaryStore.spec.ts +2 -2
- package/src/server/storage/binaryStore.ts +1 -1
- package/src/server/storage/binaryStoreFake.ts +1 -1
- package/src/server/storage/chunked.integration.spec.ts +4 -4
- package/src/server/storage/diskStore.ts +1 -1
- package/src/server/storage/fileUploadClient-chunked.integration.spec.ts +6 -6
- package/src/server/storage/fileUploadClient.integration.spec.ts +7 -7
- package/src/server/storage/files/adapter.photo.display.spec.ts +10 -10
- package/src/server/storage/files/adapter.photo.spec.ts +9 -9
- package/src/server/storage/files/adapter.spec.ts +8 -8
- package/src/server/storage/files/adapter.ts +5 -5
- package/src/server/storage/files/catalogue.media-host.spec.ts +6 -6
- package/src/server/storage/files/catalogue.orderings.spec.ts +6 -6
- package/src/server/storage/files/catalogue.recover.spec.ts +5 -5
- package/src/server/storage/files/catalogue.sort.spec.ts +6 -6
- package/src/server/storage/files/catalogue.spec.ts +7 -7
- package/src/server/storage/files/catalogue.trash-import.spec.ts +6 -6
- package/src/server/storage/files/catalogue.ts +6 -6
- package/src/server/storage/files/chunkedUpload.spec.ts +7 -7
- package/src/server/storage/files/chunkedUpload.ts +4 -4
- package/src/server/storage/files/collections.spec.ts +6 -6
- package/src/server/storage/files/fileRoutes.replace.spec.ts +8 -8
- package/src/server/storage/files/fileRoutes.spec.ts +8 -8
- package/src/server/storage/files/fileRoutes.ts +6 -6
- package/src/server/storage/files/index.ts +9 -9
- package/src/server/storage/files/migrations.ts +1 -1
- package/src/server/storage/files/stack.spec.ts +5 -5
- package/src/server/storage/files/stack.ts +12 -12
- package/src/server/storage/files/storageOps.spec.ts +4 -4
- package/src/server/storage/files/storageOps.ts +1 -1
- package/src/server/storage/files/types.ts +1 -1
- package/src/server/storage/imageThumbnail.spec.ts +2 -2
- package/src/server/storage/imageThumbnail.ts +1 -1
- package/src/server/storage/index.ts +15 -15
- package/src/server/storage/mountMediaRoutes.ts +4 -4
- package/src/server/storage/objectStore.spec.ts +1 -1
- package/src/server/storage/objectStoreMediaStore.ts +1 -1
- package/src/server/storage/s3ObjectStore.ts +1 -1
- package/src/server/storage/sources.ts +3 -3
- package/src/server/storage/storage.spec.ts +6 -6
- package/src/server/storage/streamRange.ts +1 -1
- package/src/server/storage/streamToken.ts +1 -1
- package/src/server/storage/transcodeJobs.spec.ts +1 -1
- package/src/server/storage/videoDerivativeKeys.spec.ts +1 -1
- package/src/server/storage/videoProcessor.posterOnly.spec.ts +4 -4
- package/src/server/storage/videoProcessor.ts +2 -2
- package/src/server/sync/alarm.spec.ts +1 -1
- package/src/server/sync/commands.spec.ts +1 -1
- package/src/server/sync/engine.spec.ts +4 -4
- package/src/server/sync/engine.ts +2 -2
- package/src/server/sync/http.ts +5 -5
- package/src/server/sync/httpRemote.spec.ts +1 -1
- package/src/server/sync/index.ts +11 -11
- package/src/server/sync/opLog.spec.ts +1 -1
- package/src/server/sync/opLog.ts +1 -1
- package/src/server/sync/planner.spec.ts +1 -1
- package/src/server/sync/signal.spec.ts +1 -1
- package/src/server/sync/signal.ts +1 -1
- package/src/server/sync/status.spec.ts +1 -1
- package/src/server/sync/timer.spec.ts +3 -3
- package/src/server/sync/timer.ts +3 -3
- package/src/server/sync/tokens.spec.ts +1 -1
- package/src/server/ws/eventBus.spec.ts +2 -2
- package/src/server/ws/eventBus.ts +1 -1
- package/src/server/ws/hub.integration.spec.ts +5 -5
- package/src/server/ws/hub.spec.ts +3 -3
- package/src/server/ws/hub.ts +4 -4
- package/src/server/ws/index.ts +5 -5
- package/src/server/ws/presence.spec.ts +3 -3
- package/src/server/ws/presence.ts +1 -1
- package/src/server/ws/room.spec.ts +2 -2
- package/src/server/ws/room.ts +1 -1
- package/src/server/ws/types.ts +1 -1
- package/src/testTmpRoot.spec.ts +1 -1
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
* WAL is the only reason `../sqlite/backup.ts` is safe.
|
|
33
33
|
*/
|
|
34
34
|
import type { Database } from 'bun:sqlite';
|
|
35
|
-
import type { DatabaseBackup, TimeTravelOpts } from './backup';
|
|
35
|
+
import type { DatabaseBackup, TimeTravelOpts } from './backup.js';
|
|
36
36
|
export interface LocalBackupOpts {
|
|
37
37
|
/** The live handle — checkpointed before the snapshot is taken. */
|
|
38
38
|
db: Database;
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
*/
|
|
34
34
|
import { existsSync, mkdirSync } from 'node:fs';
|
|
35
35
|
import { join } from 'node:path';
|
|
36
|
-
import { snapshotSqlite } from '../sqlite/backup';
|
|
37
|
-
import { createTimeTravelBackup } from './backup';
|
|
36
|
+
import { snapshotSqlite } from '../sqlite/backup.js';
|
|
37
|
+
import { createTimeTravelBackup } from './backup.js';
|
|
38
38
|
/**
|
|
39
39
|
* Force the WAL back into the principal database and truncate the log file.
|
|
40
40
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* a real binding satisfies it without a cast, and the test suite can satisfy it with a
|
|
15
15
|
* fake that has no `workerd` in sight.
|
|
16
16
|
*/
|
|
17
|
-
import { type D1LikeDatabase } from './types';
|
|
17
|
+
import { type D1LikeDatabase } from './types.js';
|
|
18
18
|
/** What D1 reports back about a statement. Its `meta` is richer than the local driver's. */
|
|
19
19
|
export interface D1BindingMeta {
|
|
20
20
|
duration?: number;
|
package/dist/server/d1/remote.js
CHANGED
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
* a real binding satisfies it without a cast, and the test suite can satisfy it with a
|
|
15
15
|
* fake that has no `workerd` in sight.
|
|
16
16
|
*/
|
|
17
|
-
import { assertBatchSize, assertWithinLimits } from './limits';
|
|
18
|
-
import { D1UnsupportedError, } from './types';
|
|
19
|
-
import { makeMeta, normalizeBinds, normalizeRows, normalizeValue } from './values';
|
|
17
|
+
import { assertBatchSize, assertWithinLimits } from './limits.js';
|
|
18
|
+
import { D1UnsupportedError, } from './types.js';
|
|
19
|
+
import { makeMeta, normalizeBinds, normalizeRows, normalizeValue } from './values.js';
|
|
20
20
|
/**
|
|
21
21
|
* D1 reports a failed statement by RESOLVING with `success: false` in some paths rather
|
|
22
22
|
* than rejecting, so a driver that only catches rejections reports a silent no-op as a
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
* all, and {@link classifySchedule} says so by name instead of silently rounding them up to
|
|
34
34
|
* a minute, which would change behaviour in production and nowhere else.
|
|
35
35
|
*/
|
|
36
|
-
import type { D1LikeDatabase } from './types';
|
|
36
|
+
import type { D1LikeDatabase } from './types.js';
|
|
37
37
|
/** The Workers primitive a piece of scheduled work maps onto. */
|
|
38
38
|
export type WorkersPrimitive = 'cron-trigger' | 'queue' | 'durable-object-alarm' | 'unportable';
|
|
39
39
|
/** How a job is triggered — the input to the choice, not the choice itself. */
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* Every rule below was measured against `bun:sqlite` on 2026-09-16 (`Bun 1.3`), not
|
|
12
12
|
* recalled: the probe wrote each type into a `CREATE TABLE t (v)` column and read it back.
|
|
13
13
|
*/
|
|
14
|
-
import { type D1LikeBindable, type D1LikeMeta, type D1LikeValue } from './types';
|
|
14
|
+
import { type D1LikeBindable, type D1LikeMeta, type D1LikeValue } from './types.js';
|
|
15
15
|
/**
|
|
16
16
|
* Normalize one bound parameter to something BOTH drivers accept, or throw.
|
|
17
17
|
*
|
package/dist/server/d1/values.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* Every rule below was measured against `bun:sqlite` on 2026-09-16 (`Bun 1.3`), not
|
|
12
12
|
* recalled: the probe wrote each type into a `CREATE TABLE t (v)` column and read it back.
|
|
13
13
|
*/
|
|
14
|
-
import { D1BindError } from './types';
|
|
14
|
+
import { D1BindError } from './types.js';
|
|
15
15
|
/**
|
|
16
16
|
* The largest integer a JS number holds exactly. A `bigint` beyond this cannot survive the
|
|
17
17
|
* round trip through either driver — measured, `bun:sqlite` returns `9007199254740992` for
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Database } from 'bun:sqlite';
|
|
2
2
|
import { Kysely } from 'kysely';
|
|
3
|
-
import type { PlumbingSchema } from './plumbingTypes';
|
|
3
|
+
import type { PlumbingSchema } from './plumbingTypes.js';
|
|
4
4
|
/**
|
|
5
5
|
* A Kysely query builder typed to the {@link PlumbingSchema} plumbing tables, on the
|
|
6
6
|
* `bun:sqlite` dialect. Use it for type-checked reads/writes of sessions, config,
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* Consumers (2026-08-13): `apps/music`, `apps/family`, `apps/collections` in
|
|
10
10
|
* cursed-satellites. Each supplies a `DropHandler` and nothing else.
|
|
11
11
|
*/
|
|
12
|
-
export { describeSweep, isJunkName, isStable, pruneEmptyDirs, scanDropzone, sweepDropzone, type DropHandler, type DropOutcome, type DroppedFile, type ScanOptions, type SweepReport, } from "./scan";
|
|
13
|
-
export { askBinaryServerAboutDuplicate, hashFile, type DuplicateVerdict, type DuplicateQuestion, } from "./duplicates";
|
|
12
|
+
export { describeSweep, isJunkName, isStable, pruneEmptyDirs, scanDropzone, sweepDropzone, type DropHandler, type DropOutcome, type DroppedFile, type ScanOptions, type SweepReport, } from "./scan.js";
|
|
13
|
+
export { askBinaryServerAboutDuplicate, hashFile, type DuplicateVerdict, type DuplicateQuestion, } from "./duplicates.js";
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* Consumers (2026-08-13): `apps/music`, `apps/family`, `apps/collections` in
|
|
10
10
|
* cursed-satellites. Each supplies a `DropHandler` and nothing else.
|
|
11
11
|
*/
|
|
12
|
-
export { describeSweep, isJunkName, isStable, pruneEmptyDirs, scanDropzone, sweepDropzone, } from "./scan";
|
|
13
|
-
export { askBinaryServerAboutDuplicate, hashFile, } from "./duplicates";
|
|
12
|
+
export { describeSweep, isJunkName, isStable, pruneEmptyDirs, scanDropzone, sweepDropzone, } from "./scan.js";
|
|
13
|
+
export { askBinaryServerAboutDuplicate, hashFile, } from "./duplicates.js";
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* promise AND (usually) a string.
|
|
24
24
|
*/
|
|
25
25
|
import { assertArgon2idReady, CC_ARGON2ID_VERSION, setArgon2idDeriver, } from 'cwip/guard';
|
|
26
|
-
import { AppError } from '../errors';
|
|
26
|
+
import { AppError } from '../errors.js';
|
|
27
27
|
/** argon2id's variant number in the `@node-rs/argon2` / reference-implementation vocabulary. */
|
|
28
28
|
export const ARGON2ID_ALGORITHM = 2;
|
|
29
29
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './argon2Binding';
|
|
2
|
-
export * from './passwordVerifier';
|
|
3
|
-
export * from './verifier';
|
|
4
|
-
export * from './revocationStore';
|
|
5
|
-
export * from './sessionSigner';
|
|
1
|
+
export * from './argon2Binding.js';
|
|
2
|
+
export * from './passwordVerifier.js';
|
|
3
|
+
export * from './verifier.js';
|
|
4
|
+
export * from './revocationStore.js';
|
|
5
|
+
export * from './sessionSigner.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// The GuardEngine server wiring (02 §4): the argon2id binding adapter that arms
|
|
2
2
|
// cwip's KDF seam, and the Ed25519 session signer that mints and revokes.
|
|
3
|
-
export * from './argon2Binding';
|
|
4
|
-
export * from './passwordVerifier';
|
|
5
|
-
export * from './verifier';
|
|
6
|
-
export * from './revocationStore';
|
|
7
|
-
export * from './sessionSigner';
|
|
3
|
+
export * from './argon2Binding.js';
|
|
4
|
+
export * from './passwordVerifier.js';
|
|
5
|
+
export * from './verifier.js';
|
|
6
|
+
export * from './revocationStore.js';
|
|
7
|
+
export * from './sessionSigner.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createInProcessPasswordVerifier, type PasswordVerifierPort } from './passwordVerifier';
|
|
1
|
+
import { createInProcessPasswordVerifier, type PasswordVerifierPort } from './passwordVerifier.js';
|
|
2
2
|
/** Raised when the worker thread dies, fails to start, or is disposed mid-flight. */
|
|
3
3
|
export declare const GUARD_KDF_WORKER_FAILED = "GUARD_KDF_WORKER_FAILED";
|
|
4
4
|
/** Raised when the worker does not answer within the configured budget. */
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
* `createMarshalWorkerClient` documents in `core/wire/marshalWorker.ts`; it is
|
|
42
42
|
* repeated here deliberately in the same shape so both read alike.
|
|
43
43
|
*/
|
|
44
|
-
import { AppError } from '../errors';
|
|
45
|
-
import { createInProcessPasswordVerifier, sealPasswordVerifier, verifyPasswordEnvelope, } from './passwordVerifier';
|
|
46
|
-
import { registerNodeRsArgon2id } from './argon2Binding';
|
|
44
|
+
import { AppError } from '../errors.js';
|
|
45
|
+
import { createInProcessPasswordVerifier, sealPasswordVerifier, verifyPasswordEnvelope, } from './passwordVerifier.js';
|
|
46
|
+
import { registerNodeRsArgon2id } from './argon2Binding.js';
|
|
47
47
|
/** Raised when the worker thread dies, fails to start, or is disposed mid-flight. */
|
|
48
48
|
export const GUARD_KDF_WORKER_FAILED = 'GUARD_KDF_WORKER_FAILED';
|
|
49
49
|
/** Raised when the worker does not answer within the configured budget. */
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
*/
|
|
32
32
|
import { timingSafeEqual } from 'node:crypto';
|
|
33
33
|
import { createSecretEnvelopeManager, mintEnvelopeSalt, parseSecretEnvelope, serializeSecretEnvelope, zeroize, } from 'cwip/guard';
|
|
34
|
-
import { isAppError } from '../errors';
|
|
34
|
+
import { isAppError } from '../errors.js';
|
|
35
35
|
/**
|
|
36
36
|
* The reserved AAD app namespace for password verifiers. `SecretEnvelope` forbids
|
|
37
37
|
* a ':' in the appId (it separates the AAD fields), so this is a plain token; the
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import { type KeyObject } from 'node:crypto';
|
|
22
22
|
import { type CCUserClaims } from 'cursedbelt-core/session/claims';
|
|
23
|
-
import type { GuardVerifier } from './verifier';
|
|
24
|
-
import type { AsyncRevocationStore } from './revocationStore';
|
|
23
|
+
import type { GuardVerifier } from './verifier.js';
|
|
24
|
+
import type { AsyncRevocationStore } from './revocationStore.js';
|
|
25
25
|
export interface SessionSignerOptions {
|
|
26
26
|
/**
|
|
27
27
|
* Ed25519 private key (PEM/DER/`KeyObject`). Omitted ⇒ an ephemeral pair is
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import { createPrivateKey, createPublicKey, generateKeyPairSync, sign, verify } from 'node:crypto';
|
|
22
22
|
import { CCUserClaimsSchema } from 'cursedbelt-core/session/claims';
|
|
23
|
-
import { AppError } from '../errors';
|
|
23
|
+
import { AppError } from '../errors.js';
|
|
24
24
|
const b64url = (input) => Buffer.from(input).toString('base64url');
|
|
25
25
|
/** Ceiling on a client-supplied device label — display text, not a payload. */
|
|
26
26
|
const MAX_DEVICE_LABEL = 64;
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
* a sweep reports its own failures so the console can show a detector that has
|
|
19
19
|
* stopped working, rather than showing an empty incident list and looking calm.
|
|
20
20
|
*/
|
|
21
|
-
import type { IncidentStore } from "./store";
|
|
22
|
-
import type { IncidentReport, IncidentTransitions } from "./types";
|
|
21
|
+
import type { IncidentStore } from "./store.js";
|
|
22
|
+
import type { IncidentReport, IncidentTransitions } from "./types.js";
|
|
23
23
|
export interface IncidentCheck {
|
|
24
24
|
/** Stable key. Owns every incident it has ever opened — see `reconcile`. */
|
|
25
25
|
readonly key: string;
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
* await notifier.announce(result.transitions); // usually sends nothing
|
|
42
42
|
* ```
|
|
43
43
|
*/
|
|
44
|
-
export { type ChannelMessage, type ChannelOutcome, type ChannelResult, createEmailChannel, createInAppChannel, createRelayEmailChannel, createTextChannel, type EmailChannelOptions, type IncidentChannel, type SendEmail, type TextChannelOptions, } from "./channels";
|
|
45
|
-
export { type CheckOutcome, type IncidentCheck, runIncidentSweep, type SweepResult, } from "./checks";
|
|
46
|
-
export { INCIDENT_MIGRATIONS, INCIDENTS_TABLE } from "./migrations";
|
|
47
|
-
export { type AnnounceResult, composeOpened, composeResolved, type CreateNotifierOptions, createIncidentNotifier, type IncidentNotifier, } from "./notifier";
|
|
48
|
-
export { createIncidentReporter, type IncidentReporter, type IncidentReporterOptions, } from "./reporter";
|
|
49
|
-
export { type IncidentRoutesOptions, mountIncidentMachineRoutes, mountIncidentOwnerRoutes, } from "./routes";
|
|
50
|
-
export { assertNoContent, createIncidentStore, type IncidentStore, type ReconcileOptions, } from "./store";
|
|
51
|
-
export { fingerprint, type Incident, type IncidentFact, type IncidentReport, type IncidentSeverity, type IncidentState, type IncidentTransitions, } from "./types";
|
|
44
|
+
export { type ChannelMessage, type ChannelOutcome, type ChannelResult, createEmailChannel, createInAppChannel, createRelayEmailChannel, createTextChannel, type EmailChannelOptions, type IncidentChannel, type SendEmail, type TextChannelOptions, } from "./channels.js";
|
|
45
|
+
export { type CheckOutcome, type IncidentCheck, runIncidentSweep, type SweepResult, } from "./checks.js";
|
|
46
|
+
export { INCIDENT_MIGRATIONS, INCIDENTS_TABLE } from "./migrations.js";
|
|
47
|
+
export { type AnnounceResult, composeOpened, composeResolved, type CreateNotifierOptions, createIncidentNotifier, type IncidentNotifier, } from "./notifier.js";
|
|
48
|
+
export { createIncidentReporter, type IncidentReporter, type IncidentReporterOptions, } from "./reporter.js";
|
|
49
|
+
export { type IncidentRoutesOptions, mountIncidentMachineRoutes, mountIncidentOwnerRoutes, } from "./routes.js";
|
|
50
|
+
export { assertNoContent, createIncidentStore, type IncidentStore, type ReconcileOptions, } from "./store.js";
|
|
51
|
+
export { fingerprint, type Incident, type IncidentFact, type IncidentReport, type IncidentSeverity, type IncidentState, type IncidentTransitions, } from "./types.js";
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
* await notifier.announce(result.transitions); // usually sends nothing
|
|
42
42
|
* ```
|
|
43
43
|
*/
|
|
44
|
-
export { createEmailChannel, createInAppChannel, createRelayEmailChannel, createTextChannel, } from "./channels";
|
|
45
|
-
export { runIncidentSweep, } from "./checks";
|
|
46
|
-
export { INCIDENT_MIGRATIONS, INCIDENTS_TABLE } from "./migrations";
|
|
47
|
-
export { composeOpened, composeResolved, createIncidentNotifier, } from "./notifier";
|
|
48
|
-
export { createIncidentReporter, } from "./reporter";
|
|
49
|
-
export { mountIncidentMachineRoutes, mountIncidentOwnerRoutes, } from "./routes";
|
|
50
|
-
export { assertNoContent, createIncidentStore, } from "./store";
|
|
51
|
-
export { fingerprint, } from "./types";
|
|
44
|
+
export { createEmailChannel, createInAppChannel, createRelayEmailChannel, createTextChannel, } from "./channels.js";
|
|
45
|
+
export { runIncidentSweep, } from "./checks.js";
|
|
46
|
+
export { INCIDENT_MIGRATIONS, INCIDENTS_TABLE } from "./migrations.js";
|
|
47
|
+
export { composeOpened, composeResolved, createIncidentNotifier, } from "./notifier.js";
|
|
48
|
+
export { createIncidentReporter, } from "./reporter.js";
|
|
49
|
+
export { mountIncidentMachineRoutes, mountIncidentOwnerRoutes, } from "./routes.js";
|
|
50
|
+
export { assertNoContent, createIncidentStore, } from "./store.js";
|
|
51
|
+
export { fingerprint, } from "./types.js";
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
* the store (`assertNoContent`). A text message is the least private surface
|
|
29
29
|
* this fleet has and several of its apps are private by construction.
|
|
30
30
|
*/
|
|
31
|
-
import type { ChannelMessage, ChannelResult, IncidentChannel } from "./channels";
|
|
32
|
-
import type { IncidentStore } from "./store";
|
|
33
|
-
import type { Incident, IncidentTransitions } from "./types";
|
|
31
|
+
import type { ChannelMessage, ChannelResult, IncidentChannel } from "./channels.js";
|
|
32
|
+
import type { IncidentStore } from "./store.js";
|
|
33
|
+
import type { Incident, IncidentTransitions } from "./types.js";
|
|
34
34
|
export interface IncidentNotifier {
|
|
35
35
|
/** Send for every transition in `t`. Returns one result per message sent. */
|
|
36
36
|
announce: (t: IncidentTransitions) => Promise<AnnounceResult[]>;
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* than one with no alerting. Every failure here is logged and swallowed, and the
|
|
29
29
|
* console notices the silence by other means (the service's own health probe).
|
|
30
30
|
*/
|
|
31
|
-
import type { IncidentReport } from "./types";
|
|
31
|
+
import type { IncidentReport } from "./types.js";
|
|
32
32
|
export interface IncidentReporterOptions {
|
|
33
33
|
/** e.g. `http://127.0.0.1:3024/api/station/incidents/report`. */
|
|
34
34
|
url: string;
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
* correct.
|
|
36
36
|
*/
|
|
37
37
|
import type { Hono } from "hono";
|
|
38
|
-
import type { IncidentChannel } from "./channels";
|
|
39
|
-
import type { IncidentNotifier } from "./notifier";
|
|
40
|
-
import { type IncidentStore } from "./store";
|
|
41
|
-
import type { SweepResult } from "./checks";
|
|
38
|
+
import type { IncidentChannel } from "./channels.js";
|
|
39
|
+
import type { IncidentNotifier } from "./notifier.js";
|
|
40
|
+
import { type IncidentStore } from "./store.js";
|
|
41
|
+
import type { SweepResult } from "./checks.js";
|
|
42
42
|
export interface IncidentRoutesOptions {
|
|
43
43
|
store: IncidentStore;
|
|
44
44
|
/** Owner-only gate for the read + write surface. Return false to 403. */
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* of all across the restart a deploy of the console itself performs.
|
|
29
29
|
*/
|
|
30
30
|
import type { Database } from "bun:sqlite";
|
|
31
|
-
import { type Incident, type IncidentReport, type IncidentTransitions } from "./types";
|
|
31
|
+
import { type Incident, type IncidentReport, type IncidentTransitions } from "./types.js";
|
|
32
32
|
/**
|
|
33
33
|
* The privacy gate, enforced rather than reviewed. `facts` is for numbers —
|
|
34
34
|
* bytes free, items failed, commits behind — and a string slipping in there is
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { runMigrations } from "../migration/runner";
|
|
2
|
-
import { INCIDENT_MIGRATIONS, INCIDENTS_TABLE } from "./migrations";
|
|
3
|
-
import { fingerprint, } from "./types";
|
|
1
|
+
import { runMigrations } from "../migration/runner.js";
|
|
2
|
+
import { INCIDENT_MIGRATIONS, INCIDENTS_TABLE } from "./migrations.js";
|
|
3
|
+
import { fingerprint, } from "./types.js";
|
|
4
4
|
const toIncident = (r) => ({
|
|
5
5
|
fingerprint: r.fingerprint,
|
|
6
6
|
source: r.source,
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
export { ChunkStore, type ChunkStoreOpts, CTGR_WIRE_VERSION, type CtgrDecoded, type CtgrMethod, decodeRequest, type EncodedRequest, type EncodeOpts, encodeRequest, type UploadedFile, } from 'cursedbelt-core/ctgr';
|
|
2
|
-
export { type CreateAppOpts, createApp, type ServeBunOpts, serveBun } from './app';
|
|
3
|
-
export { type AppJwtPayload, AUTH_COOKIE_NAME, type AuthEnv, type AuthUser, type AuthVariables, type CreateSessionInput, CSRF_COOKIE_NAME, CSRF_HEADER_NAME, type CsrfOptions, clearAuthCookie, createAuthMiddleware, createCsrfMiddleware, clientKeyOf, clientKeyOfContext, createLoginThrottle, createSessionStore, createRs256FileTokenSigner, DEFAULT_TOTP_ISSUER, decryptVaultItem, deriveVaultKey, encryptVaultItem, generateRecoveryCodes, generateTotpSecret, getOnlyEnforcement, getTotpUri, hashPassword, isGetOnlyViolation, type LoginThrottle, type LoginThrottleOptions, type ThrottleVerdict, needsRehash, type Rs256FileTokenSignerOptions, type Session, type SessionStore, type SessionStoreOptions, signToken, type TokenPurpose, verifyPassword, verifyPurposeToken, verifyRecoveryCode, verifyToken, verifyTotpCode, } from './auth';
|
|
4
|
-
export type { CursedbeltEnv, CursedbeltVariables } from './context';
|
|
5
|
-
export { buildRoutes, CTGR_ROUTE_PATTERN, getCtgrDecoded, unGETify } from './ctgr';
|
|
6
|
-
export { createKysely, type PlumbingDb } from './db/kysely';
|
|
7
|
-
export type { AppConfigRow, AuthSessionRow, EmailFailureRow, EventLogRow, JobRunRow, JobStateRow, MigrationRow, PlumbingSchema, RequestMetricRow, SystemSampleRow, } from './db/plumbingTypes';
|
|
8
|
-
export { ApiError, type ApiErrorOptions, type ErrorEnvelope, isApiError, toErrorEnvelope, toValidationIssues, VALIDATION_ERROR_CODE, type ValidationIssue, validationEnvelope, } from './errors';
|
|
9
|
-
export { type CreateJobRunnerOptions, createFireQueue, createJobRunner, createPollingJob, DEFAULT_FIRE_INTERVAL_MS, DEFAULT_JOB_TIMEOUT_MS, defaultJobLogger, type FireQueue, type FireQueueOpts, type JobContext, type JobDef, type JobLogger, type JobRunner, type JobRunRecord, JobTimeoutError, type PollingJob, type PollingJobOpts, } from './jobs';
|
|
10
|
-
export { buildProbeArgs, buildThumbnailArgs, buildTrimArgs, extractThumbnail, ffmpegTimeToSeconds, isFfmpegAvailable, isFfprobeAvailable, type ProbeResult, parseFfmpegProgress, parseFfprobe, probeMedia, renderImage, trimVideo, type VideoCodecPlan, videoCodecPlan, } from './media-bun';
|
|
11
|
-
export { createMetricsBuffer, type MetricRow, type MetricsBuffer, type MetricsBufferOptions, } from './metrics/metricsBuffer';
|
|
12
|
-
export { normalizeRoute } from './metrics/normalizeRoute';
|
|
13
|
-
export { type AnalyticsEngineDataset, createTelemetrySink, TELEMETRY_POINT_VERSION, type TelemetryEvent, type TelemetrySink, type TelemetrySinkOptions, toDataPoint, } from './metrics/telemetrySink';
|
|
14
|
-
export { correlationId } from './middleware/correlationId';
|
|
15
|
-
export { type CorsOpts, corsAllowlist, corsOptsFromEnv } from './middleware/corsAllowlist';
|
|
16
|
-
export { errorEnvelope } from './middleware/errorEnvelope';
|
|
17
|
-
export { crossOriginRefusal } from './middleware/localOrigin';
|
|
18
|
-
export { clientIp, createRateLimiter, type RateLimitOpts } from './middleware/rateLimit';
|
|
19
|
-
export { type RequestLoggerOpts, requestLogger } from './middleware/requestLogger';
|
|
20
|
-
export { type CspDirectives, type SecurityHeadersOpts, securityHeaders, } from './middleware/securityHeaders';
|
|
21
|
-
export { type ZValidatorTarget, zValidator } from './middleware/zValidator';
|
|
22
|
-
export { addColumnIfMissing, applyRecommendedPragmas, columnExists, runMigrations } from './migration/runner';
|
|
23
|
-
export type { Migration } from './migration/types';
|
|
24
|
-
export { AUDIT_LOG_MIGRATIONS, auditStateAt, auditStateAtVersion, auditStep, createSqliteAuditSink, } from './audit';
|
|
25
|
-
export { applyFtsSchema, type BackupInfo, buildFtsSchema, clampLimit, clampOffset, collectSqliteStats, createFts5Search, createSqliteBackupService, createSqliteHealthChecks, createSqliteViewerMiddleware, type DbStats, exportSqliteSnapshot, exportSqliteTable, type Fts5Search, type FtsHighlightOpts, type FtsResult, type FtsSearchOpts, type FtsSnippetOpts, type FtsTableSpec, type ImportMode, type ImportResult, importRowsIntoSqliteTable, isKnownTable, isReadOnlySql, listSqliteTables, NotReadOnlyError, quoteIdent, type RestoreResult, readSqliteTable, restoreSqliteSnapshot, runReadonlySqlite, type SnapshotExport, type SqliteBackupOpts, type SqliteBackupS3Opts, type SqliteBackupService, type SqliteHealthCheck, type SqliteHealthOpts, type SqliteHealthResult, type SqliteHealthStatus, type SqliteTableInfo, type SqliteTablePage, sanitizeFtsQuery, snapshotSqlite, type TableExport, type TableExportFormat, type TableStat, UnknownTableError, } from './sqlite';
|
|
26
|
-
export { computePresence, createEventBus, createWsHub, type EventBus, type EventBusData, joinRoom, leaveRoom, type PresenceEntry, type PresenceState, ROOM_META_KEY, roomOf, type WsChannel, type WsClient, type WsData, type WsHandshake, type WsHub, type WsHubOpts, type WsMessage, } from './ws';
|
|
27
|
-
export { resolveAppDataHome } from './paths/appDataHome';
|
|
2
|
+
export { type CreateAppOpts, createApp, type ServeBunOpts, serveBun } from './app.js';
|
|
3
|
+
export { type AppJwtPayload, AUTH_COOKIE_NAME, type AuthEnv, type AuthUser, type AuthVariables, type CreateSessionInput, CSRF_COOKIE_NAME, CSRF_HEADER_NAME, type CsrfOptions, clearAuthCookie, createAuthMiddleware, createCsrfMiddleware, clientKeyOf, clientKeyOfContext, createLoginThrottle, createSessionStore, createRs256FileTokenSigner, DEFAULT_TOTP_ISSUER, decryptVaultItem, deriveVaultKey, encryptVaultItem, generateRecoveryCodes, generateTotpSecret, getOnlyEnforcement, getTotpUri, hashPassword, isGetOnlyViolation, type LoginThrottle, type LoginThrottleOptions, type ThrottleVerdict, needsRehash, type Rs256FileTokenSignerOptions, type Session, type SessionStore, type SessionStoreOptions, signToken, type TokenPurpose, verifyPassword, verifyPurposeToken, verifyRecoveryCode, verifyToken, verifyTotpCode, } from './auth/index.js';
|
|
4
|
+
export type { CursedbeltEnv, CursedbeltVariables } from './context.js';
|
|
5
|
+
export { buildRoutes, CTGR_ROUTE_PATTERN, getCtgrDecoded, unGETify } from './ctgr.js';
|
|
6
|
+
export { createKysely, type PlumbingDb } from './db/kysely.js';
|
|
7
|
+
export type { AppConfigRow, AuthSessionRow, EmailFailureRow, EventLogRow, JobRunRow, JobStateRow, MigrationRow, PlumbingSchema, RequestMetricRow, SystemSampleRow, } from './db/plumbingTypes.js';
|
|
8
|
+
export { ApiError, type ApiErrorOptions, type ErrorEnvelope, isApiError, toErrorEnvelope, toValidationIssues, VALIDATION_ERROR_CODE, type ValidationIssue, validationEnvelope, } from './errors.js';
|
|
9
|
+
export { type CreateJobRunnerOptions, createFireQueue, createJobRunner, createPollingJob, DEFAULT_FIRE_INTERVAL_MS, DEFAULT_JOB_TIMEOUT_MS, defaultJobLogger, type FireQueue, type FireQueueOpts, type JobContext, type JobDef, type JobLogger, type JobRunner, type JobRunRecord, JobTimeoutError, type PollingJob, type PollingJobOpts, } from './jobs/index.js';
|
|
10
|
+
export { buildProbeArgs, buildThumbnailArgs, buildTrimArgs, extractThumbnail, ffmpegTimeToSeconds, isFfmpegAvailable, isFfprobeAvailable, type ProbeResult, parseFfmpegProgress, parseFfprobe, probeMedia, renderImage, trimVideo, type VideoCodecPlan, videoCodecPlan, } from './media-bun/index.js';
|
|
11
|
+
export { createMetricsBuffer, type MetricRow, type MetricsBuffer, type MetricsBufferOptions, } from './metrics/metricsBuffer.js';
|
|
12
|
+
export { normalizeRoute } from './metrics/normalizeRoute.js';
|
|
13
|
+
export { type AnalyticsEngineDataset, createTelemetrySink, TELEMETRY_POINT_VERSION, type TelemetryEvent, type TelemetrySink, type TelemetrySinkOptions, toDataPoint, } from './metrics/telemetrySink.js';
|
|
14
|
+
export { correlationId } from './middleware/correlationId.js';
|
|
15
|
+
export { type CorsOpts, corsAllowlist, corsOptsFromEnv } from './middleware/corsAllowlist.js';
|
|
16
|
+
export { errorEnvelope } from './middleware/errorEnvelope.js';
|
|
17
|
+
export { crossOriginRefusal } from './middleware/localOrigin.js';
|
|
18
|
+
export { clientIp, createRateLimiter, type RateLimitOpts } from './middleware/rateLimit.js';
|
|
19
|
+
export { type RequestLoggerOpts, requestLogger } from './middleware/requestLogger.js';
|
|
20
|
+
export { type CspDirectives, type SecurityHeadersOpts, securityHeaders, } from './middleware/securityHeaders.js';
|
|
21
|
+
export { type ZValidatorTarget, zValidator } from './middleware/zValidator.js';
|
|
22
|
+
export { addColumnIfMissing, applyRecommendedPragmas, columnExists, runMigrations } from './migration/runner.js';
|
|
23
|
+
export type { Migration } from './migration/types.js';
|
|
24
|
+
export { AUDIT_LOG_MIGRATIONS, auditStateAt, auditStateAtVersion, auditStep, createSqliteAuditSink, } from './audit/index.js';
|
|
25
|
+
export { applyFtsSchema, type BackupInfo, buildFtsSchema, clampLimit, clampOffset, collectSqliteStats, createFts5Search, createSqliteBackupService, createSqliteHealthChecks, createSqliteViewerMiddleware, type DbStats, exportSqliteSnapshot, exportSqliteTable, type Fts5Search, type FtsHighlightOpts, type FtsResult, type FtsSearchOpts, type FtsSnippetOpts, type FtsTableSpec, type ImportMode, type ImportResult, importRowsIntoSqliteTable, isKnownTable, isReadOnlySql, listSqliteTables, NotReadOnlyError, quoteIdent, type RestoreResult, readSqliteTable, restoreSqliteSnapshot, runReadonlySqlite, type SnapshotExport, type SqliteBackupOpts, type SqliteBackupS3Opts, type SqliteBackupService, type SqliteHealthCheck, type SqliteHealthOpts, type SqliteHealthResult, type SqliteHealthStatus, type SqliteTableInfo, type SqliteTablePage, sanitizeFtsQuery, snapshotSqlite, type TableExport, type TableExportFormat, type TableStat, UnknownTableError, } from './sqlite/index.js';
|
|
26
|
+
export { computePresence, createEventBus, createWsHub, type EventBus, type EventBusData, joinRoom, leaveRoom, type PresenceEntry, type PresenceState, ROOM_META_KEY, roomOf, type WsChannel, type WsClient, type WsData, type WsHandshake, type WsHub, type WsHubOpts, type WsMessage, } from './ws/index.js';
|
|
27
|
+
export { resolveAppDataHome } from './paths/appDataHome.js';
|
package/dist/server/index.js
CHANGED
|
@@ -7,52 +7,52 @@
|
|
|
7
7
|
// ── ctgr (isomorphic codec re-exports + the Hono GET-tunnel transport) ───────
|
|
8
8
|
export { ChunkStore, CTGR_WIRE_VERSION, decodeRequest, encodeRequest, } from 'cursedbelt-core/ctgr';
|
|
9
9
|
// ── HTTP app ────────────────────────────────────────────────────────────────
|
|
10
|
-
export { createApp, serveBun } from './app';
|
|
10
|
+
export { createApp, serveBun } from './app.js';
|
|
11
11
|
// ── Auth toolkit (task 26): jose JWT, cookies, CSRF, getOnly, session store, ──
|
|
12
12
|
// login throttle, argon2id passwords, TOTP, vault crypto, the composed middleware.
|
|
13
|
-
export { AUTH_COOKIE_NAME, CSRF_COOKIE_NAME, CSRF_HEADER_NAME, clearAuthCookie, createAuthMiddleware, createCsrfMiddleware, clientKeyOf, clientKeyOfContext, createLoginThrottle, createSessionStore, createRs256FileTokenSigner, DEFAULT_TOTP_ISSUER, decryptVaultItem, deriveVaultKey, encryptVaultItem, generateRecoveryCodes, generateTotpSecret, getOnlyEnforcement, getTotpUri, hashPassword, isGetOnlyViolation, needsRehash, signToken, verifyPassword, verifyPurposeToken, verifyRecoveryCode, verifyToken, verifyTotpCode, } from './auth';
|
|
14
|
-
export { buildRoutes, CTGR_ROUTE_PATTERN, getCtgrDecoded, unGETify } from './ctgr';
|
|
13
|
+
export { AUTH_COOKIE_NAME, CSRF_COOKIE_NAME, CSRF_HEADER_NAME, clearAuthCookie, createAuthMiddleware, createCsrfMiddleware, clientKeyOf, clientKeyOfContext, createLoginThrottle, createSessionStore, createRs256FileTokenSigner, DEFAULT_TOTP_ISSUER, decryptVaultItem, deriveVaultKey, encryptVaultItem, generateRecoveryCodes, generateTotpSecret, getOnlyEnforcement, getTotpUri, hashPassword, isGetOnlyViolation, needsRehash, signToken, verifyPassword, verifyPurposeToken, verifyRecoveryCode, verifyToken, verifyTotpCode, } from './auth/index.js';
|
|
14
|
+
export { buildRoutes, CTGR_ROUTE_PATTERN, getCtgrDecoded, unGETify } from './ctgr.js';
|
|
15
15
|
// ── Kysely-typed plumbing tables ────────────────────────────────────────────
|
|
16
|
-
export { createKysely } from './db/kysely';
|
|
16
|
+
export { createKysely } from './db/kysely.js';
|
|
17
17
|
// ── Errors ──────────────────────────────────────────────────────────────────
|
|
18
|
-
export { ApiError, isApiError, toErrorEnvelope, toValidationIssues, VALIDATION_ERROR_CODE, validationEnvelope, } from './errors';
|
|
18
|
+
export { ApiError, isApiError, toErrorEnvelope, toValidationIssues, VALIDATION_ERROR_CODE, validationEnvelope, } from './errors.js';
|
|
19
19
|
// ── Jobs & scheduler (task 29): plainjob-backed cron runner + restart-aware ───
|
|
20
20
|
// pollers + the due-row fire queue. App job *definitions* stay business.
|
|
21
|
-
export { createFireQueue, createJobRunner, createPollingJob, DEFAULT_FIRE_INTERVAL_MS, DEFAULT_JOB_TIMEOUT_MS, defaultJobLogger, JobTimeoutError, } from './jobs';
|
|
21
|
+
export { createFireQueue, createJobRunner, createPollingJob, DEFAULT_FIRE_INTERVAL_MS, DEFAULT_JOB_TIMEOUT_MS, defaultJobLogger, JobTimeoutError, } from './jobs/index.js';
|
|
22
22
|
// ── Media adapter (task 19): image rendering via sharp (lazy/optional peer) + ──
|
|
23
23
|
// video trim / probe / thumbnail via native ffmpeg. Also at the dedicated
|
|
24
24
|
// media-bun entry below; sharp is imported lazily inside renderImage,
|
|
25
25
|
// so importing this barrel never loads the native binary.
|
|
26
|
-
export { buildProbeArgs, buildThumbnailArgs, buildTrimArgs, extractThumbnail, ffmpegTimeToSeconds, isFfmpegAvailable, isFfprobeAvailable, parseFfmpegProgress, parseFfprobe, probeMedia, renderImage, trimVideo, videoCodecPlan, } from './media-bun';
|
|
26
|
+
export { buildProbeArgs, buildThumbnailArgs, buildTrimArgs, extractThumbnail, ffmpegTimeToSeconds, isFfmpegAvailable, isFfprobeAvailable, parseFfmpegProgress, parseFfprobe, probeMedia, renderImage, trimVideo, videoCodecPlan, } from './media-bun/index.js';
|
|
27
27
|
// ── Metrics ───────────────────────────────────────────────────────────────────
|
|
28
|
-
export { createMetricsBuffer, } from './metrics/metricsBuffer';
|
|
29
|
-
export { normalizeRoute } from './metrics/normalizeRoute';
|
|
30
|
-
export { createTelemetrySink, TELEMETRY_POINT_VERSION, toDataPoint, } from './metrics/telemetrySink';
|
|
28
|
+
export { createMetricsBuffer, } from './metrics/metricsBuffer.js';
|
|
29
|
+
export { normalizeRoute } from './metrics/normalizeRoute.js';
|
|
30
|
+
export { createTelemetrySink, TELEMETRY_POINT_VERSION, toDataPoint, } from './metrics/telemetrySink.js';
|
|
31
31
|
// ── Middleware ────────────────────────────────────────────────────────────────
|
|
32
|
-
export { correlationId } from './middleware/correlationId';
|
|
33
|
-
export { corsAllowlist, corsOptsFromEnv } from './middleware/corsAllowlist';
|
|
34
|
-
export { errorEnvelope } from './middleware/errorEnvelope';
|
|
35
|
-
export { crossOriginRefusal } from './middleware/localOrigin';
|
|
36
|
-
export { clientIp, createRateLimiter } from './middleware/rateLimit';
|
|
37
|
-
export { requestLogger } from './middleware/requestLogger';
|
|
38
|
-
export { securityHeaders, } from './middleware/securityHeaders';
|
|
32
|
+
export { correlationId } from './middleware/correlationId.js';
|
|
33
|
+
export { corsAllowlist, corsOptsFromEnv } from './middleware/corsAllowlist.js';
|
|
34
|
+
export { errorEnvelope } from './middleware/errorEnvelope.js';
|
|
35
|
+
export { crossOriginRefusal } from './middleware/localOrigin.js';
|
|
36
|
+
export { clientIp, createRateLimiter } from './middleware/rateLimit.js';
|
|
37
|
+
export { requestLogger } from './middleware/requestLogger.js';
|
|
38
|
+
export { securityHeaders, } from './middleware/securityHeaders.js';
|
|
39
39
|
// ── zod validation toolkit ────────────────────────────────────────────────────
|
|
40
40
|
// (the `validationEnvelope`/`toValidationIssues`/`ValidationIssue` builders now
|
|
41
41
|
// live with the canonical envelope in `./errors`, re-exported above.)
|
|
42
|
-
export { zValidator } from './middleware/zValidator';
|
|
42
|
+
export { zValidator } from './middleware/zValidator.js';
|
|
43
43
|
// ── Migration runner ──────────────────────────────────────────────────────────
|
|
44
|
-
export { addColumnIfMissing, applyRecommendedPragmas, columnExists, runMigrations } from './migration/runner';
|
|
44
|
+
export { addColumnIfMissing, applyRecommendedPragmas, columnExists, runMigrations } from './migration/runner.js';
|
|
45
45
|
// ── Audit log: the SQLite-backed AuditSink cursedshell's service dispatch ─────
|
|
46
46
|
// writes to (see `cwip/audit` for the storage-agnostic contract + the
|
|
47
47
|
// zero-config in-memory default).
|
|
48
|
-
export { AUDIT_LOG_MIGRATIONS, auditStateAt, auditStateAtVersion, auditStep, createSqliteAuditSink, } from './audit';
|
|
48
|
+
export { AUDIT_LOG_MIGRATIONS, auditStateAt, auditStateAtVersion, auditStep, createSqliteAuditSink, } from './audit/index.js';
|
|
49
49
|
// ── SQLite toolkit extras (task 30): FTS5 ranked search + DDL generator, the ───
|
|
50
50
|
// read-only DB viewer middleware, the VACUUM-INTO backup service, DB health probes.
|
|
51
|
-
export { applyFtsSchema, buildFtsSchema, clampLimit, clampOffset, collectSqliteStats, createFts5Search, createSqliteBackupService, createSqliteHealthChecks, createSqliteViewerMiddleware, exportSqliteSnapshot, exportSqliteTable, importRowsIntoSqliteTable, isKnownTable, isReadOnlySql, listSqliteTables, NotReadOnlyError, quoteIdent, readSqliteTable, restoreSqliteSnapshot, runReadonlySqlite, sanitizeFtsQuery, snapshotSqlite, UnknownTableError, } from './sqlite';
|
|
51
|
+
export { applyFtsSchema, buildFtsSchema, clampLimit, clampOffset, collectSqliteStats, createFts5Search, createSqliteBackupService, createSqliteHealthChecks, createSqliteViewerMiddleware, exportSqliteSnapshot, exportSqliteTable, importRowsIntoSqliteTable, isKnownTable, isReadOnlySql, listSqliteTables, NotReadOnlyError, quoteIdent, readSqliteTable, restoreSqliteSnapshot, runReadonlySqlite, sanitizeFtsQuery, snapshotSqlite, UnknownTableError, } from './sqlite/index.js';
|
|
52
52
|
// ── WebSocket hub (task 28): Bun-native upgrade, channel registry, heartbeat, ──
|
|
53
53
|
// presence-as-a-view, room helpers, and the push-only event-bus subset (ru).
|
|
54
|
-
export { computePresence, createEventBus, createWsHub, joinRoom, leaveRoom, ROOM_META_KEY, roomOf, } from './ws';
|
|
54
|
+
export { computePresence, createEventBus, createWsHub, joinRoom, leaveRoom, ROOM_META_KEY, roomOf, } from './ws/index.js';
|
|
55
55
|
// The app-data root resolver. Exported at the root (2026-09-15, task 148) because
|
|
56
56
|
// `cursedbelt-cc`'s localHost needs it and it answers a question about the HOST, not
|
|
57
57
|
// about any one subsystem — so no subpath barrel is its natural home.
|
|
58
|
-
export { resolveAppDataHome } from './paths/appDataHome';
|
|
58
|
+
export { resolveAppDataHome } from './paths/appDataHome.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type FireQueue, type FireQueueOpts } from './types';
|
|
1
|
+
import { type FireQueue, type FireQueueOpts } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* The "select due rows → deliver each → mark sent" pattern, as a {@link PollingJob}.
|
|
4
4
|
* This is ca's `event_reminders` / `alarms` delivery loop generalized: each poll
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defaultJobLogger } from './logger';
|
|
2
|
-
import { createPollingJob } from './polling';
|
|
3
|
-
import { DEFAULT_FIRE_INTERVAL_MS } from './types';
|
|
1
|
+
import { defaultJobLogger } from './logger.js';
|
|
2
|
+
import { createPollingJob } from './polling.js';
|
|
3
|
+
import { DEFAULT_FIRE_INTERVAL_MS } from './types.js';
|
|
4
4
|
/**
|
|
5
5
|
* The "select due rows → deliver each → mark sent" pattern, as a {@link PollingJob}.
|
|
6
6
|
* This is ca's `event_reminders` / `alarms` delivery loop generalized: each poll
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { createFireQueue } from './fireQueue';
|
|
2
|
-
export { defaultJobLogger } from './logger';
|
|
3
|
-
export { createPlainjobConnection } from './plainjobAdapter';
|
|
4
|
-
export { createPollingJob } from './polling';
|
|
5
|
-
export { createJobRunner } from './runner';
|
|
6
|
-
export { JobTimeoutError } from './timeout';
|
|
7
|
-
export { type CreateJobRunnerOptions, DEFAULT_FIRE_INTERVAL_MS, DEFAULT_JOB_RETENTION, DEFAULT_JOB_TIMEOUT_MS, type FireQueue, type FireQueueOpts, type JobContext, type JobDef, type JobLogger, type JobRetentionOptions, type JobRunner, type JobRunRecord, type PollingJob, type PollingJobOpts, } from './types';
|
|
1
|
+
export { createFireQueue } from './fireQueue.js';
|
|
2
|
+
export { defaultJobLogger } from './logger.js';
|
|
3
|
+
export { createPlainjobConnection } from './plainjobAdapter.js';
|
|
4
|
+
export { createPollingJob } from './polling.js';
|
|
5
|
+
export { createJobRunner } from './runner.js';
|
|
6
|
+
export { JobTimeoutError } from './timeout.js';
|
|
7
|
+
export { type CreateJobRunnerOptions, DEFAULT_FIRE_INTERVAL_MS, DEFAULT_JOB_RETENTION, DEFAULT_JOB_TIMEOUT_MS, type FireQueue, type FireQueueOpts, type JobContext, type JobDef, type JobLogger, type JobRetentionOptions, type JobRunner, type JobRunRecord, type PollingJob, type PollingJobOpts, } from './types.js';
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
// ca + ru. cursedbelt owns the mechanism (durable cron scheduling via plainjob,
|
|
3
3
|
// restart-aware pollers, the due-row fire queue, run auditing); app job
|
|
4
4
|
// *definitions* stay business and consume these primitives.
|
|
5
|
-
export { createFireQueue } from './fireQueue';
|
|
6
|
-
export { defaultJobLogger } from './logger';
|
|
7
|
-
export { createPlainjobConnection } from './plainjobAdapter';
|
|
8
|
-
export { createPollingJob } from './polling';
|
|
9
|
-
export { createJobRunner } from './runner';
|
|
10
|
-
export { JobTimeoutError } from './timeout';
|
|
11
|
-
export { DEFAULT_FIRE_INTERVAL_MS, DEFAULT_JOB_RETENTION, DEFAULT_JOB_TIMEOUT_MS, } from './types';
|
|
5
|
+
export { createFireQueue } from './fireQueue.js';
|
|
6
|
+
export { defaultJobLogger } from './logger.js';
|
|
7
|
+
export { createPlainjobConnection } from './plainjobAdapter.js';
|
|
8
|
+
export { createPollingJob } from './polling.js';
|
|
9
|
+
export { createJobRunner } from './runner.js';
|
|
10
|
+
export { JobTimeoutError } from './timeout.js';
|
|
11
|
+
export { DEFAULT_FIRE_INTERVAL_MS, DEFAULT_JOB_RETENTION, DEFAULT_JOB_TIMEOUT_MS, } from './types.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PollingJob, PollingJobOpts } from './types';
|
|
1
|
+
import type { PollingJob, PollingJobOpts } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* A periodic, restart-aware poller — the engine behind ca's `setInterval`
|
|
4
4
|
* scheduler, alarm check, and metrics flush. On each tick it runs the handler and,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Database } from 'bun:sqlite';
|
|
2
|
-
import { type CreateJobRunnerOptions, type JobRunner } from './types';
|
|
2
|
+
import { type CreateJobRunnerOptions, type JobRunner } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Create the durable cron job runner — a thin facade over **plainjob** (MIT,
|
|
5
5
|
* SQLite-backed, no Redis). It generalizes ca's scattered `setInterval` cron-ish
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineQueue, defineWorker } from 'plainjob';
|
|
2
|
-
import { ApiError } from '../errors';
|
|
3
|
-
import { defaultJobLogger } from './logger';
|
|
4
|
-
import { createPlainjobConnection } from './plainjobAdapter';
|
|
5
|
-
import { withTimeout } from './timeout';
|
|
6
|
-
import { DEFAULT_JOB_RETENTION, DEFAULT_JOB_TIMEOUT_MS, } from './types';
|
|
2
|
+
import { ApiError } from '../errors.js';
|
|
3
|
+
import { defaultJobLogger } from './logger.js';
|
|
4
|
+
import { createPlainjobConnection } from './plainjobAdapter.js';
|
|
5
|
+
import { withTimeout } from './timeout.js';
|
|
6
|
+
import { DEFAULT_JOB_RETENTION, DEFAULT_JOB_TIMEOUT_MS, } from './types.js';
|
|
7
7
|
/**
|
|
8
8
|
* Create the durable cron job runner — a thin facade over **plainjob** (MIT,
|
|
9
9
|
* SQLite-backed, no Redis). It generalizes ca's scattered `setInterval` cron-ish
|