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
|
@@ -2,5 +2,5 @@
|
|
|
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 } from './pgSearchProvider';
|
|
6
|
-
export { ensureSaasSearchSchema, PG_RANK_WEIGHTS, PG_SEARCH_CHUNKS_DDL, PG_SEARCH_DDL, PG_SEARCH_DOCS_DDL, } from './pgSearchSchema';
|
|
5
|
+
export { createPgSearchProvider } from './pgSearchProvider.js';
|
|
6
|
+
export { ensureSaasSearchSchema, PG_RANK_WEIGHTS, PG_SEARCH_CHUNKS_DDL, PG_SEARCH_DDL, PG_SEARCH_DOCS_DDL, } from './pgSearchSchema.js';
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
*/
|
|
64
64
|
import { assertNonEmpty, clampLimit, clampPositive, countChunks, docKey, fuseSearchTiers, rankChunksByVector, UNKNOWN_EMBED_MODEL, writeDocChunks, } from 'cwip/search-provider';
|
|
65
65
|
import { createPostgresControlExecutor, saasSetTenantSql, } from 'cwip/storage';
|
|
66
|
-
import { AppError } from '../errors';
|
|
67
|
-
import { PG_RANK_WEIGHTS } from './pgSearchSchema';
|
|
66
|
+
import { AppError } from '../errors.js';
|
|
67
|
+
import { PG_RANK_WEIGHTS } from './pgSearchSchema.js';
|
|
68
68
|
const DEFAULT_LIMIT = 20;
|
|
69
69
|
const MAX_LIMIT = 200;
|
|
70
70
|
/** Mirrors the SQLite provider's fusion depth — see its `FUSION_DEPTH`. */
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
*/
|
|
24
24
|
import { SQL } from 'bun';
|
|
25
25
|
import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'bun:test';
|
|
26
|
-
import { createPgSearchProvider } from './pgSearchProvider';
|
|
27
|
-
import { ensureSaasSearchSchema } from './pgSearchSchema';
|
|
26
|
+
import { createPgSearchProvider } from './pgSearchProvider.js';
|
|
27
|
+
import { ensureSaasSearchSchema } from './pgSearchSchema.js';
|
|
28
28
|
const ADMIN_URL = process.env.CC_PG_URL;
|
|
29
29
|
/**
|
|
30
30
|
* A dedicated NON-SUPERUSER owner, and the reason is the finding this suite
|
|
@@ -6,13 +6,13 @@
|
|
|
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";
|
|
10
|
-
export { SHARE_EVENTS_TABLE, SHARE_GRANTS_TABLE, SHARE_GROUPS_TABLE, SHARE_GROUP_MEMBERS_TABLE, } from "./migrations";
|
|
11
|
-
export { GROUP_SUBJECT_PREFIX, mountShareRoutes, parseSubjectParam, subjectParam, } from "./router";
|
|
12
|
-
export type { ShareRouterOptions, ShareRouterViewer, ShareRoutesPayload } from "./router";
|
|
13
|
-
export { sharedResourceSql, sqlColumn, sqlLiteral } from "./sql";
|
|
14
|
-
export type { SharedResourceSqlOptions } from "./sql";
|
|
15
|
-
export { createShareStore, group, user } from "./store";
|
|
16
|
-
export type { GrantInput, RevokeInput, ShareEventQuery, ShareStore, ShareStoreOptions, ShareTarget, } from "./store";
|
|
9
|
+
export { SHARE_MIGRATIONS } from "./migrations.js";
|
|
10
|
+
export { SHARE_EVENTS_TABLE, SHARE_GRANTS_TABLE, SHARE_GROUPS_TABLE, SHARE_GROUP_MEMBERS_TABLE, } from "./migrations.js";
|
|
11
|
+
export { GROUP_SUBJECT_PREFIX, mountShareRoutes, parseSubjectParam, subjectParam, } from "./router.js";
|
|
12
|
+
export type { ShareRouterOptions, ShareRouterViewer, ShareRoutesPayload } from "./router.js";
|
|
13
|
+
export { sharedResourceSql, sqlColumn, sqlLiteral } from "./sql.js";
|
|
14
|
+
export type { SharedResourceSqlOptions } from "./sql.js";
|
|
15
|
+
export { createShareStore, group, user } from "./store.js";
|
|
16
|
+
export type { GrantInput, RevokeInput, ShareEventQuery, ShareStore, ShareStoreOptions, ShareTarget, } from "./store.js";
|
|
17
17
|
export { accessMeets, describeAccess, describeShareEvent, isShareAccess, isShareLevel, isShareSubjectType, levelsMeeting, normalizeSubject, normalizeSubjectId, resolveAccess, resourceKey, sameResource, sameSubject, SHARE_ACTIONS, strongerAccess, } from "cursedbelt-core/sharing/model";
|
|
18
18
|
export type { ShareAccess, ShareAction, ShareEvent, ShareGrant, ShareGroup, ShareGroupMember, ShareLevel, ShareResource, ShareSubject, ShareSubjectType, ShareViewer, } from "cursedbelt-core/sharing/model";
|
|
@@ -6,11 +6,11 @@
|
|
|
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";
|
|
10
|
-
export { SHARE_EVENTS_TABLE, SHARE_GRANTS_TABLE, SHARE_GROUPS_TABLE, SHARE_GROUP_MEMBERS_TABLE, } from "./migrations";
|
|
11
|
-
export { GROUP_SUBJECT_PREFIX, mountShareRoutes, parseSubjectParam, subjectParam, } from "./router";
|
|
12
|
-
export { sharedResourceSql, sqlColumn, sqlLiteral } from "./sql";
|
|
13
|
-
export { createShareStore, group, user } from "./store";
|
|
9
|
+
export { SHARE_MIGRATIONS } from "./migrations.js";
|
|
10
|
+
export { SHARE_EVENTS_TABLE, SHARE_GRANTS_TABLE, SHARE_GROUPS_TABLE, SHARE_GROUP_MEMBERS_TABLE, } from "./migrations.js";
|
|
11
|
+
export { GROUP_SUBJECT_PREFIX, mountShareRoutes, parseSubjectParam, subjectParam, } from "./router.js";
|
|
12
|
+
export { sharedResourceSql, sqlColumn, sqlLiteral } from "./sql.js";
|
|
13
|
+
export { createShareStore, group, user } from "./store.js";
|
|
14
14
|
// Re-exported so a server consumer needs ONE import for the whole contract; the
|
|
15
15
|
// pure entry (`cursedbelt-core/sharing`) stays available for a browser or a test.
|
|
16
16
|
export { accessMeets, describeAccess, describeShareEvent, isShareAccess, isShareLevel, isShareSubjectType, levelsMeeting, normalizeSubject, normalizeSubjectId, resolveAccess, resourceKey, sameResource, sameSubject, SHARE_ACTIONS, strongerAccess, } from "cursedbelt-core/sharing/model";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Migration } from "../migration/types";
|
|
1
|
+
import type { Migration } from "../migration/types.js";
|
|
2
2
|
export declare const SHARE_GRANTS_TABLE = "share_grants";
|
|
3
3
|
export declare const SHARE_GROUPS_TABLE = "share_groups";
|
|
4
4
|
export declare const SHARE_GROUP_MEMBERS_TABLE = "share_group_members";
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
*/
|
|
45
45
|
import type { Context, Hono } from 'hono';
|
|
46
46
|
import type { ShareEvent, ShareGrant } from 'cursedbelt-core/sharing/model';
|
|
47
|
-
import type { ShareStore } from './store';
|
|
47
|
+
import type { ShareStore } from './store.js';
|
|
48
48
|
/** The `group:` prefix that lets a group subject travel in a path segment. Exported so a
|
|
49
49
|
* client and a route cannot disagree about it. */
|
|
50
50
|
export declare const GROUP_SUBJECT_PREFIX = "group:";
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* tested with hostile input; a consumer never quotes anything itself.
|
|
27
27
|
*/
|
|
28
28
|
import { levelsMeeting, normalizeSubjectId } 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
|
* Quote a string as a SQL literal.
|
|
32
32
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { levelsMeeting, normalizeSubjectId, strongerAccess, } from "cursedbelt-core/sharing/model";
|
|
2
|
-
import { runMigrations } from "../migration/runner";
|
|
3
|
-
import { SHARE_EVENTS_TABLE, SHARE_GRANTS_TABLE, SHARE_GROUPS_TABLE, SHARE_GROUP_MEMBERS_TABLE, SHARE_MIGRATIONS, } from "./migrations";
|
|
4
|
-
import { sharedResourceSql } from "./sql";
|
|
2
|
+
import { runMigrations } from "../migration/runner.js";
|
|
3
|
+
import { SHARE_EVENTS_TABLE, SHARE_GRANTS_TABLE, SHARE_GROUPS_TABLE, SHARE_GROUP_MEMBERS_TABLE, SHARE_MIGRATIONS, } from "./migrations.js";
|
|
4
|
+
import { sharedResourceSql } from "./sql.js";
|
|
5
5
|
/** Shorthand for the common subject. `group(id)` is its sibling. */
|
|
6
6
|
export const user = (id) => ({ type: "user", id });
|
|
7
7
|
export const group = (id) => ({ type: "group", id });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { clampPageLimit } from 'cwip/math';
|
|
2
|
-
import { isReadOnlySql } from './readonlySql';
|
|
2
|
+
import { isReadOnlySql } from './readonlySql.js';
|
|
3
3
|
/**
|
|
4
4
|
* Hono-free read-only SQLite browse primitives — the shared core beneath
|
|
5
5
|
* `createSqliteViewerMiddleware` (viewer.ts) AND any consumer that can't mount a
|
|
@@ -2,7 +2,7 @@ import { readFileSync, rmSync } from 'node:fs';
|
|
|
2
2
|
import { tmpdir } from 'node:os';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { toCsv } from 'cwip/csv';
|
|
5
|
-
import { isKnownTable, quoteIdent, UnknownTableError } from './browse';
|
|
5
|
+
import { isKnownTable, quoteIdent, UnknownTableError } from './browse.js';
|
|
6
6
|
/** All rows of one table serialized to CSV or JSON. Throws {@link UnknownTableError}. */
|
|
7
7
|
export function exportSqliteTable(db, table, format) {
|
|
8
8
|
if (!isKnownTable(db, table))
|
|
@@ -3,7 +3,7 @@ import { withForeignKeysOff } from 'cwip/sqlite';
|
|
|
3
3
|
import { rmSync, writeFileSync } from 'node:fs';
|
|
4
4
|
import { tmpdir } from 'node:os';
|
|
5
5
|
import { join } from 'node:path';
|
|
6
|
-
import { isKnownTable, quoteIdent, UnknownTableError } from './browse';
|
|
6
|
+
import { isKnownTable, quoteIdent, UnknownTableError } from './browse.js';
|
|
7
7
|
/** Real column names of a table, in declared order. */
|
|
8
8
|
function tableColumns(db, table) {
|
|
9
9
|
return db
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { type BackupInfo, createSqliteBackupService, snapshotSqlite, type SqliteBackupOpts, type SqliteBackupS3Opts, type SqliteBackupService, } from './backup';
|
|
2
|
-
export { clampLimit, clampOffset, isKnownTable, listSqliteTables, NotReadOnlyError, quoteIdent, readSqliteTable, runReadonlySqlite, type SqliteTableInfo, type SqliteTablePage, UnknownTableError, } from './browse';
|
|
3
|
-
export { exportSqliteSnapshot, exportSqliteTable, type SnapshotExport, type TableExport, type TableExportFormat, } from './export';
|
|
4
|
-
export { applyFtsSchema, buildFtsSchema, createFts5Search, type Fts5Search, type FtsHighlightOpts, type FtsResult, type FtsSearchOpts, type FtsSnippetOpts, type FtsTableSpec, sanitizeFtsQuery, } from './fts5';
|
|
5
|
-
export { createSqliteHealthChecks, type SqliteHealthCheck, type SqliteHealthOpts, type SqliteHealthResult, type SqliteHealthStatus, } from './health';
|
|
6
|
-
export { type ImportMode, type ImportResult, importRowsIntoSqliteTable, type RestoreResult, restoreSqliteSnapshot, } from './import';
|
|
7
|
-
export { isReadOnlySql } from './readonlySql';
|
|
8
|
-
export { collectSqliteStats, type DbStats, type TableStat } from './stats';
|
|
9
|
-
export { createSqliteViewerMiddleware } from './viewer';
|
|
1
|
+
export { type BackupInfo, createSqliteBackupService, snapshotSqlite, type SqliteBackupOpts, type SqliteBackupS3Opts, type SqliteBackupService, } from './backup.js';
|
|
2
|
+
export { clampLimit, clampOffset, isKnownTable, listSqliteTables, NotReadOnlyError, quoteIdent, readSqliteTable, runReadonlySqlite, type SqliteTableInfo, type SqliteTablePage, UnknownTableError, } from './browse.js';
|
|
3
|
+
export { exportSqliteSnapshot, exportSqliteTable, type SnapshotExport, type TableExport, type TableExportFormat, } from './export.js';
|
|
4
|
+
export { applyFtsSchema, buildFtsSchema, createFts5Search, type Fts5Search, type FtsHighlightOpts, type FtsResult, type FtsSearchOpts, type FtsSnippetOpts, type FtsTableSpec, sanitizeFtsQuery, } from './fts5.js';
|
|
5
|
+
export { createSqliteHealthChecks, type SqliteHealthCheck, type SqliteHealthOpts, type SqliteHealthResult, type SqliteHealthStatus, } from './health.js';
|
|
6
|
+
export { type ImportMode, type ImportResult, importRowsIntoSqliteTable, type RestoreResult, restoreSqliteSnapshot, } from './import.js';
|
|
7
|
+
export { isReadOnlySql } from './readonlySql.js';
|
|
8
|
+
export { collectSqliteStats, type DbStats, type TableStat } from './stats.js';
|
|
9
|
+
export { createSqliteViewerMiddleware } from './viewer.js';
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
// export / import / stats primitives that back both the viewer middleware and any
|
|
5
5
|
// bespoke-transport consumer (a cursedshell plugin, the encrypted-GET "f" app). All
|
|
6
6
|
// app-agnostic; the apps supply table names, paths, and thresholds.
|
|
7
|
-
export { createSqliteBackupService, snapshotSqlite, } from './backup';
|
|
8
|
-
export { clampLimit, clampOffset, isKnownTable, listSqliteTables, NotReadOnlyError, quoteIdent, readSqliteTable, runReadonlySqlite, UnknownTableError, } from './browse';
|
|
9
|
-
export { exportSqliteSnapshot, exportSqliteTable, } from './export';
|
|
10
|
-
export { applyFtsSchema, buildFtsSchema, createFts5Search, sanitizeFtsQuery, } from './fts5';
|
|
11
|
-
export { createSqliteHealthChecks, } from './health';
|
|
12
|
-
export { importRowsIntoSqliteTable, restoreSqliteSnapshot, } from './import';
|
|
13
|
-
export { isReadOnlySql } from './readonlySql';
|
|
14
|
-
export { collectSqliteStats } from './stats';
|
|
15
|
-
export { createSqliteViewerMiddleware } from './viewer';
|
|
7
|
+
export { createSqliteBackupService, snapshotSqlite, } from './backup.js';
|
|
8
|
+
export { clampLimit, clampOffset, isKnownTable, listSqliteTables, NotReadOnlyError, quoteIdent, readSqliteTable, runReadonlySqlite, UnknownTableError, } from './browse.js';
|
|
9
|
+
export { exportSqliteSnapshot, exportSqliteTable, } from './export.js';
|
|
10
|
+
export { applyFtsSchema, buildFtsSchema, createFts5Search, sanitizeFtsQuery, } from './fts5.js';
|
|
11
|
+
export { createSqliteHealthChecks, } from './health.js';
|
|
12
|
+
export { importRowsIntoSqliteTable, restoreSqliteSnapshot, } from './import.js';
|
|
13
|
+
export { isReadOnlySql } from './readonlySql.js';
|
|
14
|
+
export { collectSqliteStats } from './stats.js';
|
|
15
|
+
export { createSqliteViewerMiddleware } from './viewer.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { listSqliteTables } from './browse';
|
|
1
|
+
import { listSqliteTables } from './browse.js';
|
|
2
2
|
/** Whole-database size from the page pragmas (works without `dbstat`). */
|
|
3
3
|
function fileBytes(db) {
|
|
4
4
|
const pageCount = db.query('PRAGMA page_count').get()?.page_count ?? 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Hono } from 'hono';
|
|
2
|
-
import { ApiError, toErrorEnvelope } from '../errors';
|
|
3
|
-
import { listSqliteTables, NotReadOnlyError, readSqliteTable, runReadonlySqlite, UnknownTableError, } from './browse';
|
|
2
|
+
import { ApiError, toErrorEnvelope } from '../errors.js';
|
|
3
|
+
import { listSqliteTables, NotReadOnlyError, readSqliteTable, runReadonlySqlite, UnknownTableError, } from './browse.js';
|
|
4
4
|
/**
|
|
5
5
|
* A read-only SQLite browser as a Hono sub-app — a thin HTTP wrapper over the
|
|
6
6
|
* Hono-free primitives in `browse.ts` (the same primitives a cursedshell plugin or
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ImageDerivatives, VideoProcessor } from './files/catalogue';
|
|
1
|
+
import type { ImageDerivatives, VideoProcessor } from './files/catalogue.js';
|
|
2
2
|
export type BinaryServerProcessingConfig = {
|
|
3
3
|
/** e.g. 'https://binary-server.cursedalchemy.com' — same value as the byte store's baseUrl. */
|
|
4
4
|
baseUrl: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createTranscodeJobClient } from './transcodeJobs';
|
|
2
|
-
import { fsHlsPrefix, fsMp4Key, fsPosterKey, fsSpriteKey, fsVttKey } from './types';
|
|
1
|
+
import { createTranscodeJobClient } from './transcodeJobs.js';
|
|
2
|
+
import { fsHlsPrefix, fsMp4Key, fsPosterKey, fsSpriteKey, fsVttKey } from './types.js';
|
|
3
3
|
export function createBinaryServerProcessing(cfg) {
|
|
4
4
|
const jobs = createTranscodeJobClient(cfg);
|
|
5
5
|
const { appKey, submit, poll } = jobs;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { BinaryServerConfig, MediaStore } from './types';
|
|
2
|
-
export type { BinaryServerConfig, FileTokenClaims, FileTokenSigner } from './types';
|
|
1
|
+
import type { BinaryServerConfig, MediaStore } from './types.js';
|
|
2
|
+
export type { BinaryServerConfig, FileTokenClaims, FileTokenSigner } from './types.js';
|
|
3
3
|
export declare function createBinaryServerStore(cfg: BinaryServerConfig): MediaStore;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FileTokenClaims } from './types';
|
|
1
|
+
import type { FileTokenClaims } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* The claims binary-server verifies, re-exported from `./types` (the fleet's single
|
|
4
4
|
* source of truth — `cursedbelt-server/storage/types`). See there for the per-field
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { MediaStore } from './types';
|
|
1
|
+
import type { MediaStore } from './types.js';
|
|
2
2
|
export declare function createDiskStore(root: string): MediaStore;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { MediaUrls } from '../sources';
|
|
2
|
-
import type { MediaGallerySource, MediaSource, PhotoSource } from '../types';
|
|
3
|
-
import type { FileUrls } from './fileRoutes';
|
|
4
|
-
import type { FileCatalogue, FileToPlayable } from './types';
|
|
1
|
+
import type { MediaUrls } from '../sources.js';
|
|
2
|
+
import type { MediaGallerySource, MediaSource, PhotoSource } from '../types.js';
|
|
3
|
+
import type { FileUrls } from './fileRoutes.js';
|
|
4
|
+
import type { FileCatalogue, FileToPlayable } from './types.js';
|
|
5
5
|
/** Resolve a video FileRecord to a PlayableVideo with tokenised URLs. Non-video ⇒ null. */
|
|
6
6
|
export declare function createFileToPlayable(urls: MediaUrls, sourceId: string): FileToPlayable;
|
|
7
7
|
/** Expose a FileCatalogue as a video-only `MediaSource` — the gallery is a view, not a store. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isBrowserRenderableImage } from '../imageThumbnail';
|
|
1
|
+
import { isBrowserRenderableImage } from '../imageThumbnail.js';
|
|
2
2
|
/** Build the image→GalleryPhoto mapper shared by the photo source and the mixed media source.
|
|
3
3
|
* The primary image is served by the file byte route (fileUrls); the grid thumbnail + HEIC
|
|
4
4
|
* display derivative by the type-agnostic poster route (mediaUrls) when ingest produced one. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Database } from 'bun:sqlite';
|
|
2
|
-
import { type MediaCtx, type MediaStore } from '../types';
|
|
3
|
-
import { type ProcessOptions, type ProcessResult } from '../videoProcessor';
|
|
4
|
-
import { type FileCatalogue } from './types';
|
|
2
|
+
import { type MediaCtx, type MediaStore } from '../types.js';
|
|
3
|
+
import { type ProcessOptions, type ProcessResult } from '../videoProcessor.js';
|
|
4
|
+
import { type FileCatalogue } from './types.js';
|
|
5
5
|
/** Swappable video ingest→derivatives implementation. The default runs ffmpeg
|
|
6
6
|
* locally ({@link processVideo}); a remote backend (binary-server) delegates
|
|
7
7
|
* the heavy work to the storage host instead — see binaryServerProcessing. */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { readdir, stat as fsStat } from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import { renderImage } from '../../media-bun/image';
|
|
4
|
-
import { ffmpegImageThumbnail, isBrowserRenderableImage } from '../imageThumbnail';
|
|
5
|
-
import { fsDisplayKey, fsHlsPrefix, fsMp4Key, fsPosterKey, fsSourceKey, fsSpriteKey, fsVttKey, } from '../types';
|
|
6
|
-
import { processVideo } from '../videoProcessor';
|
|
7
|
-
import { mimeByExt } from './mimeByExt';
|
|
8
|
-
import { classifyFileType, } from './types';
|
|
3
|
+
import { renderImage } from '../../media-bun/image.js';
|
|
4
|
+
import { ffmpegImageThumbnail, isBrowserRenderableImage } from '../imageThumbnail.js';
|
|
5
|
+
import { fsDisplayKey, fsHlsPrefix, fsMp4Key, fsPosterKey, fsSourceKey, fsSpriteKey, fsVttKey, } from '../types.js';
|
|
6
|
+
import { processVideo } from '../videoProcessor.js';
|
|
7
|
+
import { mimeByExt } from './mimeByExt.js';
|
|
8
|
+
import { classifyFileType, } from './types.js';
|
|
9
9
|
// The general primary binary for a NON-video file (images/docs/…) lives here; video files store a
|
|
10
10
|
// raw source (fsSourceKey) + derived mp4/HLS/poster/sprite via the shared video keyspace.
|
|
11
11
|
export const fileBinaryKey = (owner, id) => `fs/${owner}/${id}`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { MediaCtx } from '../types';
|
|
2
|
-
import type { StorageOpsLedger } from './storageOps';
|
|
3
|
-
import type { FileCatalogue, FileRecord } from './types';
|
|
1
|
+
import type { MediaCtx } from '../types.js';
|
|
2
|
+
import type { StorageOpsLedger } from './storageOps.js';
|
|
3
|
+
import type { FileCatalogue, FileRecord } from './types.js';
|
|
4
4
|
export type ChunkedInit = {
|
|
5
5
|
fileId: string;
|
|
6
6
|
/** Chunk session id — also the ledger op id; echoed to the backend as sid so its assemble event
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DEFAULT_UPLOAD_CHUNK_SIZE } from 'cursedbelt-core/media/upload-limits';
|
|
2
|
-
import { catalogueUploadKey } from './catalogue';
|
|
2
|
+
import { catalogueUploadKey } from './catalogue.js';
|
|
3
3
|
// ── Chunked upload (large files, direct-to-backend) ──────────────────────────────
|
|
4
4
|
// For multi-GB uploads we don't proxy bytes through the app origin. Instead: the client asks the
|
|
5
5
|
// app to START an upload (init) → the app mints per-chunk PUT URLs that go DIRECT to the byte
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Context, Hono } from 'hono';
|
|
2
|
-
import type { StreamTokenService } from '../streamToken';
|
|
3
|
-
import type { MediaCtx, MediaStore } from '../types';
|
|
4
|
-
import type { ChunkedUploadService } from './chunkedUpload';
|
|
5
|
-
import { type FileCatalogue } from './types';
|
|
2
|
+
import type { StreamTokenService } from '../streamToken.js';
|
|
3
|
+
import type { MediaCtx, MediaStore } from '../types.js';
|
|
4
|
+
import type { ChunkedUploadService } from './chunkedUpload.js';
|
|
5
|
+
import { type FileCatalogue } from './types.js';
|
|
6
6
|
/** The 413 message a single-PUT over the cap returns — the client treats it as a hard error. */
|
|
7
7
|
export declare const SINGLE_UPLOAD_TOO_LARGE = "file too large for a single request \u2014 use chunked upload";
|
|
8
8
|
export interface FileUrls {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MAX_SINGLE_UPLOAD_BYTES } from 'cursedbelt-core/media/upload-limits';
|
|
2
|
-
import { serveRange } from '../streamRange';
|
|
3
|
-
import { fileBinaryKey } from './catalogue';
|
|
4
|
-
import { FILE_SORTS } from './types';
|
|
2
|
+
import { serveRange } from '../streamRange.js';
|
|
3
|
+
import { fileBinaryKey } from './catalogue.js';
|
|
4
|
+
import { FILE_SORTS } from './types.js';
|
|
5
5
|
// ── File binary + upload routes ─────────────────────────────────────────────────
|
|
6
6
|
// The FileCatalogue's byte edge for GENERAL files (images/docs/audio/any) — the piece
|
|
7
7
|
// mountMediaRoutes (video-only: mp4/hls/poster/sprite) doesn't cover. A file's primary binary
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { createCatalogueMediaSource, createCataloguePhotoSource, createCatalogueVideoSource, createFileToPlayable, } from './adapter';
|
|
2
|
-
export { catalogueUploadKey, createSqliteFileCatalogue, fileBinaryKey, type ImageDerivatives, type ImageDerivativesOptions, type SqliteFileCatalogueOptions, type VideoProcessor, } from './catalogue';
|
|
3
|
-
export type { CatalogueStats } from './types';
|
|
4
|
-
export { type ChunkedInit, type ChunkedUploadService, createChunkedUploadService, type MintChunkUpload, } from './chunkedUpload';
|
|
5
|
-
export { createFileUrls, type FileUrls, type MountFileRoutesOptions, mountFileRoutes, SINGLE_UPLOAD_TOO_LARGE, } from './fileRoutes';
|
|
6
|
-
export { FILE_CATALOGUE_MIGRATIONS } from './migrations';
|
|
7
|
-
export { createFilesStack, type FilesStack, type FilesStackMountAuth, type FilesStackOptions, } from './stack';
|
|
8
|
-
export { createLedgeredDeletes, createStorageOpsLedger, createStorageReconciler, type StorageAction, type StorageOpRow, type StorageOpsLedger, type StorageReconciler, } from './storageOps';
|
|
9
|
-
export { type CollectionKind, type CollectionVisibility, classifyFileType, FILE_SORTS, type FileCatalogue, type FileCollection, type FilePage, type FileRecord, type FileSort, type FileToPlayable, type FileType, type ListFilesOptions, type TagFacet, } from './types';
|
|
1
|
+
export { createCatalogueMediaSource, createCataloguePhotoSource, createCatalogueVideoSource, createFileToPlayable, } from './adapter.js';
|
|
2
|
+
export { catalogueUploadKey, createSqliteFileCatalogue, fileBinaryKey, type ImageDerivatives, type ImageDerivativesOptions, type SqliteFileCatalogueOptions, type VideoProcessor, } from './catalogue.js';
|
|
3
|
+
export type { CatalogueStats } from './types.js';
|
|
4
|
+
export { type ChunkedInit, type ChunkedUploadService, createChunkedUploadService, type MintChunkUpload, } from './chunkedUpload.js';
|
|
5
|
+
export { createFileUrls, type FileUrls, type MountFileRoutesOptions, mountFileRoutes, SINGLE_UPLOAD_TOO_LARGE, } from './fileRoutes.js';
|
|
6
|
+
export { FILE_CATALOGUE_MIGRATIONS } from './migrations.js';
|
|
7
|
+
export { createFilesStack, type FilesStack, type FilesStackMountAuth, type FilesStackOptions, } from './stack.js';
|
|
8
|
+
export { createLedgeredDeletes, createStorageOpsLedger, createStorageReconciler, type StorageAction, type StorageOpRow, type StorageOpsLedger, type StorageReconciler, } from './storageOps.js';
|
|
9
|
+
export { type CollectionKind, type CollectionVisibility, classifyFileType, FILE_SORTS, type FileCatalogue, type FileCollection, type FilePage, type FileRecord, type FileSort, type FileToPlayable, type FileType, type ListFilesOptions, type TagFacet, } from './types.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// cursedbelt-server/storage FileCatalogue — a SQLite-backed tagged flat file system over the
|
|
2
2
|
// MediaStore + media pipeline. One source of truth for a user's binaries; the
|
|
3
3
|
// video gallery is a video-filtered view over it.
|
|
4
|
-
export { createCatalogueMediaSource, createCataloguePhotoSource, createCatalogueVideoSource, createFileToPlayable, } from './adapter';
|
|
5
|
-
export { catalogueUploadKey, createSqliteFileCatalogue, fileBinaryKey, } from './catalogue';
|
|
6
|
-
export { createChunkedUploadService, } from './chunkedUpload';
|
|
7
|
-
export { createFileUrls, mountFileRoutes, SINGLE_UPLOAD_TOO_LARGE, } from './fileRoutes';
|
|
8
|
-
export { FILE_CATALOGUE_MIGRATIONS } from './migrations';
|
|
9
|
-
export { createFilesStack, } from './stack';
|
|
10
|
-
export { createLedgeredDeletes, createStorageOpsLedger, createStorageReconciler, } from './storageOps';
|
|
11
|
-
export { classifyFileType, FILE_SORTS, } from './types';
|
|
4
|
+
export { createCatalogueMediaSource, createCataloguePhotoSource, createCatalogueVideoSource, createFileToPlayable, } from './adapter.js';
|
|
5
|
+
export { catalogueUploadKey, createSqliteFileCatalogue, fileBinaryKey, } from './catalogue.js';
|
|
6
|
+
export { createChunkedUploadService, } from './chunkedUpload.js';
|
|
7
|
+
export { createFileUrls, mountFileRoutes, SINGLE_UPLOAD_TOO_LARGE, } from './fileRoutes.js';
|
|
8
|
+
export { FILE_CATALOGUE_MIGRATIONS } from './migrations.js';
|
|
9
|
+
export { createFilesStack, } from './stack.js';
|
|
10
|
+
export { createLedgeredDeletes, createStorageOpsLedger, createStorageReconciler, } from './storageOps.js';
|
|
11
|
+
export { classifyFileType, FILE_SORTS, } from './types.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Migration } from '../../migration/types';
|
|
1
|
+
import type { Migration } from '../../migration/types.js';
|
|
2
2
|
export declare const FILE_CATALOGUE_MIGRATIONS: readonly Migration[];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { Database } from 'bun:sqlite';
|
|
2
2
|
import type { Context, Hono } from 'hono';
|
|
3
|
-
import { type MediaUrls, SourceRegistry } from '../sources';
|
|
4
|
-
import { type StreamTokenService } from '../streamToken';
|
|
5
|
-
import type { MediaCtx, MediaGallerySource, MediaSource, MediaStore, PhotoSource } from '../types';
|
|
6
|
-
import { type SqliteFileCatalogueOptions } from './catalogue';
|
|
7
|
-
import { type ChunkedUploadService, type MintChunkUpload } from './chunkedUpload';
|
|
8
|
-
import { type FileUrls } from './fileRoutes';
|
|
9
|
-
import type { FileCatalogue } from './types';
|
|
3
|
+
import { type MediaUrls, SourceRegistry } from '../sources.js';
|
|
4
|
+
import { type StreamTokenService } from '../streamToken.js';
|
|
5
|
+
import type { MediaCtx, MediaGallerySource, MediaSource, MediaStore, PhotoSource } from '../types.js';
|
|
6
|
+
import { type SqliteFileCatalogueOptions } from './catalogue.js';
|
|
7
|
+
import { type ChunkedUploadService, type MintChunkUpload } from './chunkedUpload.js';
|
|
8
|
+
import { type FileUrls } from './fileRoutes.js';
|
|
9
|
+
import type { FileCatalogue } from './types.js';
|
|
10
10
|
export interface FilesStackOptions {
|
|
11
11
|
/** The catalogue database. The stack runs FILE_CATALOGUE_MIGRATIONS on it itself. */
|
|
12
12
|
db: Database;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { runMigrations } from '../../migration/runner';
|
|
2
|
-
import { mountMediaRoutes } from '../mountMediaRoutes';
|
|
3
|
-
import { createMediaUrls, SourceRegistry } from '../sources';
|
|
4
|
-
import { createStreamTokenService } from '../streamToken';
|
|
5
|
-
import { createCatalogueMediaSource, createCataloguePhotoSource, createCatalogueVideoSource, } from './adapter';
|
|
6
|
-
import { createSqliteFileCatalogue } from './catalogue';
|
|
7
|
-
import { createChunkedUploadService, } from './chunkedUpload';
|
|
8
|
-
import { createFileUrls, mountFileRoutes } from './fileRoutes';
|
|
9
|
-
import { FILE_CATALOGUE_MIGRATIONS } from './migrations';
|
|
10
|
-
import { createStorageOpsLedger } from './storageOps';
|
|
1
|
+
import { runMigrations } from '../../migration/runner.js';
|
|
2
|
+
import { mountMediaRoutes } from '../mountMediaRoutes.js';
|
|
3
|
+
import { createMediaUrls, SourceRegistry } from '../sources.js';
|
|
4
|
+
import { createStreamTokenService } from '../streamToken.js';
|
|
5
|
+
import { createCatalogueMediaSource, createCataloguePhotoSource, createCatalogueVideoSource, } from './adapter.js';
|
|
6
|
+
import { createSqliteFileCatalogue } from './catalogue.js';
|
|
7
|
+
import { createChunkedUploadService, } from './chunkedUpload.js';
|
|
8
|
+
import { createFileUrls, mountFileRoutes } from './fileRoutes.js';
|
|
9
|
+
import { FILE_CATALOGUE_MIGRATIONS } from './migrations.js';
|
|
10
|
+
import { createStorageOpsLedger } from './storageOps.js';
|
|
11
11
|
/** Assemble the whole files/media server stack from one options bag. See {@link FilesStack}. */
|
|
12
12
|
export function createFilesStack(opts) {
|
|
13
13
|
const owner = opts.owner ?? ((c) => c.userId);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Database } from 'bun:sqlite';
|
|
2
|
-
import type { MediaStore } from '../types';
|
|
2
|
+
import type { MediaStore } from '../types.js';
|
|
3
3
|
export type StorageAction = 'upload' | 'delete' | 'delete_prefix';
|
|
4
4
|
export type StorageOpStatus = 'pending' | 'done' | 'failed';
|
|
5
5
|
export type StorageOpRow = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PlayableVideo, ProcessingStatus } from 'cursedbelt-core/media';
|
|
2
|
-
import type { MediaCtx } from '../types';
|
|
2
|
+
import type { MediaCtx } from '../types.js';
|
|
3
3
|
export type FileType = 'image' | 'video' | 'audio' | 'doc' | 'code' | 'other';
|
|
4
4
|
/** User-defined groupings (Apple-Photos-style). `favorites` is a system singleton per owner;
|
|
5
5
|
* `custom` are free-form. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mkdir, rm } from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import { imageThumbnailArgs, runFfmpegProgress } from '../media-bun';
|
|
3
|
+
import { imageThumbnailArgs, runFfmpegProgress } from '../media-bun/index.js';
|
|
4
4
|
// Image mimes browsers CANNOT render inline (so the full-view <img> needs a JPEG derivative, not
|
|
5
5
|
// the original). Chrome/Firefox reject HEIC/HEIF; the rest (jpeg/png/webp/gif/avif/bmp/svg) render
|
|
6
6
|
// natively. Safari can show HEIC, but we normalize for everyone.
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export { DERIVATIVE_SUFFIXES, hlsMasterKeyFor, hlsPrefixFor, isDerivativeKey, posterKeyFor, spriteKeyFor, spriteVttKeyFor, webPlayableKeyFor, } from './videoDerivativeKeys';
|
|
2
|
-
export type { BinaryServerConfig, FileTokenClaims, FileTokenSigner } from './binaryServerStore';
|
|
3
|
-
export { createBinaryServerStore } from './binaryServerStore';
|
|
4
|
-
export { type BinaryServerProcessingConfig, createBinaryServerProcessing, } from './binaryServerProcessing';
|
|
5
|
-
export { createTranscodeJobClient, type TranscodeJobClient, type TranscodeJobClientConfig, type TranscodeJobResult, type TranscodeJobStatus, type TranscodeJobStatusBody, } from './transcodeJobs';
|
|
6
|
-
export { createDiskStore } from './diskStore';
|
|
7
|
-
export { type CatalogueStats, type ChunkedInit, type ChunkedUploadService, catalogueUploadKey, classifyFileType, createCatalogueMediaSource, createCataloguePhotoSource, createCatalogueVideoSource, createChunkedUploadService, createFilesStack, createFileToPlayable, createFileUrls, createLedgeredDeletes, createSqliteFileCatalogue, createStorageOpsLedger, createStorageReconciler, FILE_CATALOGUE_MIGRATIONS, type FileCatalogue, type FilePage, type FileRecord, type FilesStack, type FilesStackMountAuth, type FilesStackOptions, type FileToPlayable, type FileType, type FileUrls, fileBinaryKey, type ImageDerivatives, type ImageDerivativesOptions, type ListFilesOptions, type MintChunkUpload, type MountFileRoutesOptions, mountFileRoutes, type SqliteFileCatalogueOptions, type StorageAction, type StorageOpRow, type StorageOpsLedger, type StorageReconciler, type VideoProcessor, } from './files';
|
|
8
|
-
export { type CorsResolver, type MountMediaOptions, mountMediaRoutes } from './mountMediaRoutes';
|
|
9
|
-
export { createDiskSource, createMediaUrls, type DiskSource, type MediaUrls, SourceRegistry, } from './sources';
|
|
10
|
-
export { createS3ObjectStore, type S3ClientLike, type S3ObjectHandle, type S3ObjectStoreOptions, type S3ObjectWriter, } from './s3ObjectStore';
|
|
11
|
-
export { decodeRange, type RangeDecision, type ServeRangeOpts, serveRange } from './streamRange';
|
|
12
|
-
export { createStreamTokenService, type StreamGrant, type StreamTokenService } from './streamToken';
|
|
13
|
-
export { fsHlsFileKey, fsHlsMasterKey, fsHlsPrefix, fsMp4Key, fsPosterKey, fsSourceKey, fsSpriteKey, fsVttKey, type MediaCtx, type MediaGallerySource, type MediaSource, type MediaStore, type PhotoSource, } from './types';
|
|
14
|
-
export { type ProcessOptions, type ProcessResult, processVideo, } from './videoProcessor';
|
|
15
|
-
export { objectStoreAsMediaStore } from './objectStoreMediaStore';
|
|
1
|
+
export { DERIVATIVE_SUFFIXES, hlsMasterKeyFor, hlsPrefixFor, isDerivativeKey, posterKeyFor, spriteKeyFor, spriteVttKeyFor, webPlayableKeyFor, } from './videoDerivativeKeys.js';
|
|
2
|
+
export type { BinaryServerConfig, FileTokenClaims, FileTokenSigner } from './binaryServerStore.js';
|
|
3
|
+
export { createBinaryServerStore } from './binaryServerStore.js';
|
|
4
|
+
export { type BinaryServerProcessingConfig, createBinaryServerProcessing, } from './binaryServerProcessing.js';
|
|
5
|
+
export { createTranscodeJobClient, type TranscodeJobClient, type TranscodeJobClientConfig, type TranscodeJobResult, type TranscodeJobStatus, type TranscodeJobStatusBody, } from './transcodeJobs.js';
|
|
6
|
+
export { createDiskStore } from './diskStore.js';
|
|
7
|
+
export { type CatalogueStats, type ChunkedInit, type ChunkedUploadService, catalogueUploadKey, classifyFileType, createCatalogueMediaSource, createCataloguePhotoSource, createCatalogueVideoSource, createChunkedUploadService, createFilesStack, createFileToPlayable, createFileUrls, createLedgeredDeletes, createSqliteFileCatalogue, createStorageOpsLedger, createStorageReconciler, FILE_CATALOGUE_MIGRATIONS, type FileCatalogue, type FilePage, type FileRecord, type FilesStack, type FilesStackMountAuth, type FilesStackOptions, type FileToPlayable, type FileType, type FileUrls, fileBinaryKey, type ImageDerivatives, type ImageDerivativesOptions, type ListFilesOptions, type MintChunkUpload, type MountFileRoutesOptions, mountFileRoutes, type SqliteFileCatalogueOptions, type StorageAction, type StorageOpRow, type StorageOpsLedger, type StorageReconciler, type VideoProcessor, } from './files/index.js';
|
|
8
|
+
export { type CorsResolver, type MountMediaOptions, mountMediaRoutes } from './mountMediaRoutes.js';
|
|
9
|
+
export { createDiskSource, createMediaUrls, type DiskSource, type MediaUrls, SourceRegistry, } from './sources.js';
|
|
10
|
+
export { createS3ObjectStore, type S3ClientLike, type S3ObjectHandle, type S3ObjectStoreOptions, type S3ObjectWriter, } from './s3ObjectStore.js';
|
|
11
|
+
export { decodeRange, type RangeDecision, type ServeRangeOpts, serveRange } from './streamRange.js';
|
|
12
|
+
export { createStreamTokenService, type StreamGrant, type StreamTokenService } from './streamToken.js';
|
|
13
|
+
export { fsHlsFileKey, fsHlsMasterKey, fsHlsPrefix, fsMp4Key, fsPosterKey, fsSourceKey, fsSpriteKey, fsVttKey, type MediaCtx, type MediaGallerySource, type MediaSource, type MediaStore, type PhotoSource, } from './types.js';
|
|
14
|
+
export { type ProcessOptions, type ProcessResult, processVideo, } from './videoProcessor.js';
|
|
15
|
+
export { objectStoreAsMediaStore } from './objectStoreMediaStore.js';
|
|
@@ -5,23 +5,23 @@
|
|
|
5
5
|
// The derivative NAME contract — the seam between binary-server (which writes these names),
|
|
6
6
|
// satellite-kit (which re-exports them for the satellite apps) and this package's own token
|
|
7
7
|
// minting. Pure string transforms: nothing here can resolve a stored object.
|
|
8
|
-
export { DERIVATIVE_SUFFIXES, hlsMasterKeyFor, hlsPrefixFor, isDerivativeKey, posterKeyFor, spriteKeyFor, spriteVttKeyFor, webPlayableKeyFor, } from './videoDerivativeKeys';
|
|
9
|
-
export { createBinaryServerStore } from './binaryServerStore';
|
|
10
|
-
export { createBinaryServerProcessing, } from './binaryServerProcessing';
|
|
8
|
+
export { DERIVATIVE_SUFFIXES, hlsMasterKeyFor, hlsPrefixFor, isDerivativeKey, posterKeyFor, spriteKeyFor, spriteVttKeyFor, webPlayableKeyFor, } from './videoDerivativeKeys.js';
|
|
9
|
+
export { createBinaryServerStore } from './binaryServerStore.js';
|
|
10
|
+
export { createBinaryServerProcessing, } from './binaryServerProcessing.js';
|
|
11
11
|
// The transcode API as a plain job client, for apps whose binaries do NOT live in the file
|
|
12
12
|
// catalogue (apps/notes keys attachments by sha256). One derivative pipeline, two doors.
|
|
13
|
-
export { createTranscodeJobClient, } from './transcodeJobs';
|
|
14
|
-
export { createDiskStore } from './diskStore';
|
|
13
|
+
export { createTranscodeJobClient, } from './transcodeJobs.js';
|
|
14
|
+
export { createDiskStore } from './diskStore.js';
|
|
15
15
|
// The FileCatalogue: a SQLite-backed tagged flat file system over this storage layer — one
|
|
16
16
|
// source of truth for a user's binaries (the video gallery is a video-filtered view over it).
|
|
17
|
-
export { catalogueUploadKey, classifyFileType, createCatalogueMediaSource, createCataloguePhotoSource, createCatalogueVideoSource, createChunkedUploadService, createFilesStack, createFileToPlayable, createFileUrls, createLedgeredDeletes, createSqliteFileCatalogue, createStorageOpsLedger, createStorageReconciler, FILE_CATALOGUE_MIGRATIONS, fileBinaryKey, mountFileRoutes, } from './files';
|
|
18
|
-
export { mountMediaRoutes } from './mountMediaRoutes';
|
|
19
|
-
export { createDiskSource, createMediaUrls, SourceRegistry, } from './sources';
|
|
17
|
+
export { catalogueUploadKey, classifyFileType, createCatalogueMediaSource, createCataloguePhotoSource, createCatalogueVideoSource, createChunkedUploadService, createFilesStack, createFileToPlayable, createFileUrls, createLedgeredDeletes, createSqliteFileCatalogue, createStorageOpsLedger, createStorageReconciler, FILE_CATALOGUE_MIGRATIONS, fileBinaryKey, mountFileRoutes, } from './files/index.js';
|
|
18
|
+
export { mountMediaRoutes } from './mountMediaRoutes.js';
|
|
19
|
+
export { createDiskSource, createMediaUrls, SourceRegistry, } from './sources.js';
|
|
20
20
|
// The saas profile's `ObjectStore` (08 §1b). Its local counterpart is
|
|
21
21
|
// `createFsObjectStore` in `cwip/storage` — same interface, different issuer.
|
|
22
|
-
export { createS3ObjectStore, } from './s3ObjectStore';
|
|
23
|
-
export { decodeRange, serveRange } from './streamRange';
|
|
24
|
-
export { createStreamTokenService } from './streamToken';
|
|
25
|
-
export { fsHlsFileKey, fsHlsMasterKey, fsHlsPrefix, fsMp4Key, fsPosterKey, fsSourceKey, fsSpriteKey, fsVttKey, } from './types';
|
|
26
|
-
export { processVideo, } from './videoProcessor';
|
|
27
|
-
export { objectStoreAsMediaStore } from './objectStoreMediaStore';
|
|
22
|
+
export { createS3ObjectStore, } from './s3ObjectStore.js';
|
|
23
|
+
export { decodeRange, serveRange } from './streamRange.js';
|
|
24
|
+
export { createStreamTokenService } from './streamToken.js';
|
|
25
|
+
export { fsHlsFileKey, fsHlsMasterKey, fsHlsPrefix, fsMp4Key, fsPosterKey, fsSourceKey, fsSpriteKey, fsVttKey, } from './types.js';
|
|
26
|
+
export { processVideo, } from './videoProcessor.js';
|
|
27
|
+
export { objectStoreAsMediaStore } from './objectStoreMediaStore.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Context, Hono } from 'hono';
|
|
2
|
-
import type { SourceRegistry } from './sources';
|
|
3
|
-
import type { StreamTokenService } from './streamToken';
|
|
4
|
-
import { type MediaCtx, type MediaStore } from './types';
|
|
2
|
+
import type { SourceRegistry } from './sources.js';
|
|
3
|
+
import type { StreamTokenService } from './streamToken.js';
|
|
4
|
+
import { type MediaCtx, type MediaStore } from './types.js';
|
|
5
5
|
/** Resolves the Access-Control-Allow-Origin for a request origin: a fixed origin, an allowlist
|
|
6
6
|
* (echoes the request origin when allowed), or a custom resolver (return null to deny). */
|
|
7
7
|
export type CorsResolver = string | string[] | ((requestOrigin: string | undefined) => string | null | undefined);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { serveRange } from './streamRange';
|
|
2
|
-
import { fsDisplayKey, fsHlsFileKey, fsMp4Key, fsPosterKey, fsSourceKey, fsSpriteKey, fsVttKey, } from './types';
|
|
1
|
+
import { serveRange } from './streamRange.js';
|
|
2
|
+
import { fsDisplayKey, fsHlsFileKey, fsMp4Key, fsPosterKey, fsSourceKey, fsSpriteKey, fsVttKey, } from './types.js';
|
|
3
3
|
const EXPOSE_HEADERS = 'Content-Range, Content-Length, Accept-Ranges';
|
|
4
4
|
function resolveAcao(cors, reqOrigin) {
|
|
5
5
|
if (!cors)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ObjectStore } from 'cwip/storage';
|
|
2
|
-
import type { MediaStore } from './types';
|
|
2
|
+
import type { MediaStore } from './types.js';
|
|
3
3
|
/** Adapt an {@link ObjectStore} to the {@link MediaStore} contract `processVideo` expects. */
|
|
4
4
|
export declare function objectStoreAsMediaStore(objects: ObjectStore): MediaStore;
|