storageRegistryFrom
function storageRegistryFrom(loaders): StorageRegistry;Defined in: src/cli/index.ts:332
Build a StorageRegistry from entry-module loaders, with the kit’s env → options mapping.
Products pass their own wrapped entries, so the CLI gets the product’s capability layers
(webhooks’ claimDue) and persisted defaults (table names), which the kit’s
defaultStorageRegistry cannot know. Drivers without a loader are not available.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
loaders |
StorageEntryLoaders |
Returns
Section titled “Returns”Example
Section titled “Example”const drivers = storageRegistryFrom({ memory: () => import("./entry-storage-memory.ts"), redis: () => import("./entry-storage-redis.ts"), postgres: () => import("./entry-storage-postgres.ts"),});const storage = await storageFromEnv({ role, drivers });