Skip to content

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.

Parameter Type
loaders StorageEntryLoaders

StorageRegistry

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 });