feat(storage): retire photos as a configurable category — served-only via the ServedCategory seam

This commit is contained in:
jubnl
2026-08-20 20:20:43 +02:00
parent bbede7ab98
commit 49976ab383
10 changed files with 74 additions and 35 deletions
+6 -2
View File
@@ -127,17 +127,21 @@ describe('storageConfigSchema wire compatibility', () => {
expect(storageConfigSchema.safeParse({ backends: [], categories: { backups: '' } }).success).toBe(false);
});
it('exposes the canonical nine-category list (relocated from the server)', () => {
it('exposes the canonical eight-category list — photos is served-legacy, retired from config', () => {
expect(STORAGE_CATEGORIES).toEqual([
'files',
'journey',
'covers',
'avatars',
'places',
'photos',
'photos-google',
'photos-trek',
'backups',
]);
});
it('rejects the retired photos category in a config document', () => {
const result = storageConfigSchema.safeParse({ backends: [], categories: { photos: 'uploads-local' } });
expect(result.success).toBe(false);
});
});
+5 -4
View File
@@ -17,9 +17,11 @@ import { z } from 'zod';
*/
/**
* Canonical category list — relocated here from server storage.types.ts
* (which re-exports it) because the wire schema needs it and a second copy
* is forbidden.
* Canonical CONFIGURABLE category list — relocated here from server
* storage.types.ts (which re-exports it) because the wire schema needs it and
* a second copy is forbidden. The legacy `photos` directory is served and
* backed up but not configurable — the server's SERVED_CATEGORIES extension
* (storage.types.ts) carries it.
*/
export const STORAGE_CATEGORIES = [
'files',
@@ -27,7 +29,6 @@ export const STORAGE_CATEGORIES = [
'covers',
'avatars',
'places',
'photos',
'photos-google',
'photos-trek',
'backups',