@stedefast/providers
v0.2.2
Published
Provider-agnostic interfaces for Stedefast dynamic modules (KV, Database, ObjectStore, Email)
Downloads
557
Readme
@stedefast/providers
Provider-agnostic interfaces for Stedefast dynamic modules — defines Database, KVStore, ObjectStore, and EmailSender interfaces so modules can be written without coupling to a specific cloud provider.
Installation
pnpm add @stedefast/providersThis package is a peer dependency of Stedefast modules. You generally won't install it directly — it's used when building custom modules or provider adapters.
Usage
import type { Database, KVStore, ModuleProviders } from "@stedefast/providers";
// Implement a custom provider adapter
export function createMyProvider(): StedefastProvider {
return {
name: "my-provider",
createProviders(env): ModuleProviders {
return {
db: new MyDatabase(env.DB),
kv: new MyKVStore(env.KV),
};
},
};
}Documentation
Full docs at stedefast.dev/docs/deployment/providers.
License
MIT
