import type { Adapter } from "../index.js"; /** * One registry entry per provider. Each entry knows how to lazy-import its * adapter module and construct an instance from a flat opts blob. * * Provider-specific env vars are read by the adapter itself (every adapter * calls `readEnv` for its own conventions — `AWS_*`, `BLOB_READ_WRITE_TOKEN`, * etc.), so the registry only needs to thread the values the CLI captured * from flags or `--config-json`. */ export interface ProviderRegistration { /** Human-readable list of required flags or env vars, for `--help` and errors. */ required: readonly string[]; /** * Optional one-line note surfaced in errors and `--help`. Use this for * providers whose configuration doesn't fit the typed flag set — most * commonly the OAuth-token providers, where the only path is * `--config-json` (or the adapter's own env vars). */ notes?: string; /** Construct the adapter from a flat opts object. */ load: (opts: ProviderOpts) => Promise; } /** * Union of every shortcut flag the CLI surfaces, plus a passthrough * `extra` blob populated from `--config-json`. Each provider's `load` * picks the fields it knows about and ignores the rest. */ export interface ProviderOpts { bucket?: string; region?: string; endpoint?: string; forcePathStyle?: boolean; accessKeyId?: string; secretAccessKey?: string; sessionToken?: string; publicBaseUrl?: string; defaultUrlExpiresIn?: number; root?: string; urlBaseUrl?: string; token?: string; access?: "public" | "private"; accountName?: string; accountKey?: string; container?: string; connectionString?: string; siteId?: string; storeName?: string; accountId?: string; url?: string; serviceRoleKey?: string; applicationKeyId?: string; applicationKey?: string; projectId?: string; keyFilename?: string; extra?: Record; } export declare const PROVIDERS: Record; /** * Providers in the `files-sdk/providers` catalog that the CLI deliberately * does not surface. `bun-s3` is Bun-only; the CLI runs under Node, where * `Bun.S3Client` doesn't exist — Node users reach for the `s3` provider * instead. `convex` is constructed from a live in-function context * (`ctx.storage`) that only exists inside a running Convex function, so it * can't be built from CLI config/env. `memory` is process-local and * non-persistent — each `files` invocation is a fresh process with an empty * store, so a CLI command could only ever see what it just wrote in the same * run, which is useless. The `providers.test.ts` drift guard treats these as * the only allowed gaps between the catalog and this registry. */ export declare const CLI_EXCLUDED_PROVIDERS: Set; export declare const PROVIDER_NAMES: string[]; //# sourceMappingURL=registry.d.ts.map