Skip to content

ShelfConfig

Defined in: packages/core/src/config.ts:94

Shelf-level configuration (validated by shelfConfigSchema).

optional adapters?: Record<string, AdapterSnapshot>

Defined in: packages/core/src/config.ts:152


optional adminToken?: string

Defined in: packages/core/src/config.ts:113

Bootstrap site-admin bearer token (STORYSHELF_ADMIN_TOKEN/ADMIN_TOKEN). Grants site-admin API access when no admin user exists yet; never mint sessions from it. Distinct from secret (session signing).


optional branchGcIntervalMs?: number

Defined in: packages/core/src/config.ts:130

Branch GC interval, ms; daily sweep via interval clock (default 86_400_000).


optional branchTtlDays?: number | null

Defined in: packages/core/src/config.ts:128

Branch baseline TTL, days; null disables branch GC (default 30).


optional maxInlineUnzipSize?: number

Defined in: packages/core/src/config.ts:143

Largest zip (bytes) extracted inline in the upload request; a larger zip is published by a publish job (or refused with 413 on a host that runs no consumer). The count is taken while the upload streams, never from Content-Length. Default 50 MB; 0 sends every zip to a publish job.


optional maxUnzippedBytes?: number

Defined in: packages/core/src/config.ts:150

Most uncompressed bytes an uploaded Storybook zip may expand to (default 2 GiB), counted while extracting; more fails the publish. The compressed size is no bound on its own.


optional maxUploadBytes?: number

Defined in: packages/core/src/config.ts:131


optional maxZipEntries?: number

Defined in: packages/core/src/config.ts:145

Most entries an uploaded Storybook zip may hold (default 50 000); more fails the publish.


optional migrateCredentialsOnBoot?: boolean

Defined in: packages/core/src/config.ts:107

Re-encrypt credentials still under previousSecret at boot. Default false: site admins can run it from the System page instead. No effect without previousSecret.


optional previousSecret?: string

Defined in: packages/core/src/config.ts:101

The secret secret replaced. Used only to decrypt stored credentials (webhook, git-token, and notification secrets) written before a rotation; new writes always use secret. Remove once credentials are re-encrypted.


optional publicBaseUrl?: string

Defined in: packages/core/src/config.ts:120

Public base URL of this deployment (e.g. https://shelf.example.com). Used as the issuer in the /.well-known/openid-configuration relying-party helper document; falls back to the request origin when unset.


optional publishedBaseDomain?: string

Defined in: packages/core/src/config.ts:114


optional purgeTtlDays?: number

Defined in: packages/core/src/config.ts:126


optional scratchDir?: string

Defined in: packages/core/src/config.ts:125

Working directory for capture and inline statics extraction. Defaults to <os.tmpdir()>/storyshelf; publishing and capture extract there.


optional secret?: string

Defined in: packages/core/src/config.ts:95


optional serverTiming?: boolean

Defined in: packages/core/src/config.ts:136

Emit Server-Timing response headers (total + db/storage roll-ups). Opt-in, off by default — some deployments prefer no timing headers.


optional viewports?: ShelfViewport[]

Defined in: packages/core/src/config.ts:151