UNPKG

alepha

Version:

Easy-to-use modern TypeScript framework for building many kind of applications.

237 lines 11.7 kB
import { AppEntry, AppEntryProvider, ViteBuildProvider } from "alepha/cli"; import { DetectedResources, GitHubSecretStore, NamingService, PlatformInspector, PlatformOptions, PlatformOrchestrator, ResolvedPlatformConfig, SecretFilterService, SecretStoreProvider } from "alepha/cli/platform-lib"; import { EnvUtils } from "alepha/command"; import { ConsoleColorProvider } from "alepha/logger"; //#region ../../src/cli/platform/commands/SecretsCommand.d.ts declare class SecretsCommand { protected readonly log: import("alepha/logger").Logger; protected readonly options: Readonly<{ name?: string | undefined; default?: string | undefined; tenancy?: "none" | "optional" | "required" | undefined; secrets?: { keys?: string[] | undefined; store?: "github" | undefined; environmentPattern?: string | undefined; } | undefined; environments: Record<string, { adapter: "cloudflare" | "vercel"; domain?: string | undefined; zone?: string | undefined; services?: { binding: string; service: string; }[] | undefined; jurisdiction?: "eu" | "fedramp" | undefined; accountId?: string | undefined; }>; } | undefined>; protected readonly inspector: PlatformInspector; protected readonly naming: NamingService; protected readonly envUtils: EnvUtils; protected readonly githubStore: GitHubSecretStore; protected readonly filter: SecretFilterService; protected readonly color: ConsoleColorProvider; protected readonly envFlags: import("zod").ZodObject<{ env: import("zod").ZodOptional<import("zod").ZodString>; }, import("zod/v4/core").$strip>; protected readonly list: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{ env: import("zod").ZodOptional<import("zod").ZodString>; format: import("zod").ZodOptional<import("zod").ZodString>; }, import("zod/v4/core").$strip>, import("alepha").ZType, import("alepha").TObject>; protected readonly diff: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{ env: import("zod").ZodOptional<import("zod").ZodString>; }, import("zod/v4/core").$strip>, import("alepha").ZType, import("alepha").TObject>; protected readonly apply: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{ env: import("zod").ZodOptional<import("zod").ZodString>; "dry-run": import("zod").ZodOptional<import("zod").ZodBoolean>; }, import("zod/v4/core").$strip>, import("alepha").ZType, import("alepha").TObject>; readonly secrets: import("alepha/command").CommandPrimitive<import("alepha").TObject, import("alepha").ZType, import("alepha").TObject>; resolveStore(): SecretStoreProvider; protected resolveEnvironmentName(project: string, env: string): string; } //#endregion //#region ../../src/cli/platform/commands/platform.d.ts declare class PlatformCommand { protected readonly log: import("alepha/logger").Logger; protected readonly options: Readonly<{ name?: string | undefined; default?: string | undefined; tenancy?: "none" | "optional" | "required" | undefined; secrets?: { keys?: string[] | undefined; store?: "github" | undefined; environmentPattern?: string | undefined; } | undefined; environments: Record<string, { adapter: "cloudflare" | "vercel"; domain?: string | undefined; zone?: string | undefined; services?: { binding: string; service: string; }[] | undefined; jurisdiction?: "eu" | "fedramp" | undefined; accountId?: string | undefined; }>; } | undefined>; protected readonly orchestrator: PlatformOrchestrator; protected readonly inspector: PlatformInspector; protected readonly naming: NamingService; protected readonly boot: AppEntryProvider; protected readonly viteBuild: ViteBuildProvider; protected readonly color: ConsoleColorProvider; protected readonly envUtils: EnvUtils; protected readonly secretsCommand: SecretsCommand; /** * Common flags for env targeting. */ protected readonly envFlags: import("zod").ZodObject<{ env: import("zod").ZodOptional<import("zod").ZodString>; tenant: import("zod").ZodOptional<import("zod").ZodString>; verbose: import("zod").ZodOptional<import("zod").ZodBoolean>; json: import("zod").ZodOptional<import("zod").ZodBoolean>; }, import("zod/v4/core").$strip>; protected readonly plan: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{ env: import("zod").ZodOptional<import("zod").ZodString>; tenant: import("zod").ZodOptional<import("zod").ZodString>; verbose: import("zod").ZodOptional<import("zod").ZodBoolean>; json: import("zod").ZodOptional<import("zod").ZodBoolean>; }, import("zod/v4/core").$strip>, import("alepha").ZType, import("alepha").TObject>; protected readonly up: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{ env: import("zod").ZodOptional<import("zod").ZodString>; tenant: import("zod").ZodOptional<import("zod").ZodString>; verbose: import("zod").ZodOptional<import("zod").ZodBoolean>; json: import("zod").ZodOptional<import("zod").ZodBoolean>; prebuilt: import("zod").ZodOptional<import("zod").ZodBoolean>; }, import("zod/v4/core").$strip>, import("alepha").ZType, import("alepha").TObject>; protected readonly down: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{ env: import("zod").ZodOptional<import("zod").ZodString>; tenant: import("zod").ZodOptional<import("zod").ZodString>; verbose: import("zod").ZodOptional<import("zod").ZodBoolean>; json: import("zod").ZodOptional<import("zod").ZodBoolean>; yes: import("zod").ZodOptional<import("zod").ZodBoolean>; }, import("zod/v4/core").$strip>, import("alepha").ZType, import("alepha").TObject>; protected readonly status: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{ env: import("zod").ZodOptional<import("zod").ZodString>; tenant: import("zod").ZodOptional<import("zod").ZodString>; verbose: import("zod").ZodOptional<import("zod").ZodBoolean>; json: import("zod").ZodOptional<import("zod").ZodBoolean>; }, import("zod/v4/core").$strip>, import("alepha").ZType, import("alepha").TObject>; protected readonly build: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{ env: import("zod").ZodOptional<import("zod").ZodString>; tenant: import("zod").ZodOptional<import("zod").ZodString>; verbose: import("zod").ZodOptional<import("zod").ZodBoolean>; json: import("zod").ZodOptional<import("zod").ZodBoolean>; }, import("zod/v4/core").$strip>, import("alepha").ZType, import("alepha").TObject>; protected readonly deploy: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{ env: import("zod").ZodOptional<import("zod").ZodString>; tenant: import("zod").ZodOptional<import("zod").ZodString>; verbose: import("zod").ZodOptional<import("zod").ZodBoolean>; json: import("zod").ZodOptional<import("zod").ZodBoolean>; }, import("zod/v4/core").$strip>, import("alepha").ZType, import("alepha").TObject>; protected readonly migrate: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{ env: import("zod").ZodOptional<import("zod").ZodString>; tenant: import("zod").ZodOptional<import("zod").ZodString>; verbose: import("zod").ZodOptional<import("zod").ZodBoolean>; json: import("zod").ZodOptional<import("zod").ZodBoolean>; }, import("zod/v4/core").$strip>, import("alepha").ZType, import("alepha").TObject>; protected readonly dbExport: import("alepha/command").CommandPrimitive<import("zod").ZodObject<{ env: import("zod").ZodOptional<import("zod").ZodString>; tenant: import("zod").ZodOptional<import("zod").ZodString>; verbose: import("zod").ZodOptional<import("zod").ZodBoolean>; json: import("zod").ZodOptional<import("zod").ZodBoolean>; output: import("zod").ZodOptional<import("zod").ZodString>; keepSql: import("zod").ZodOptional<import("zod").ZodBoolean>; }, import("zod/v4/core").$strip>, import("alepha").ZType, import("alepha").TObject>; /** * `db` subgroup — operations against the *deployed* database (export, * migrate). They live under `platform` (not core `alepha db`) because * they need the env config, tenancy, adapter, and resource naming. */ protected readonly db: import("alepha/command").CommandPrimitive<import("alepha").TObject, import("alepha").ZType, import("alepha").TObject>; readonly platform: import("alepha/command").CommandPrimitive<import("alepha").TObject, import("alepha").ZType, import("alepha").TObject>; /** * Resolve app definitions. * * For standalone: returns a single app from the root. * For monorepo: resolves each app path, introspects for resources. * * NOTE: Resource detection (hasDatabase, hasBucket, etc.) requires * ViteBuildProvider.init() per app. This is expensive -- only done * for up/down/status, not for plan. */ protected resolveApp(root: string, _config: ResolvedPlatformConfig, isServerless: boolean, options?: { prebuilt?: boolean; }): Promise<{ entry: AppEntry; resources: DetectedResources; }>; /** * @deprecated single-app projects; use `resolveApp` directly. * Kept temporarily so existing commands can be migrated one at a time. */ protected resolveApps(root: string, config: ResolvedPlatformConfig, isServerless: boolean, options?: { prebuilt?: boolean; }): Promise<Array<{ name: string; path: string; entry: AppEntry; resources: DetectedResources; }>>; protected isServerless(adapter: string): boolean; /** * Read `dist/manifest.json` if present. Returns `null` when the file * doesn't exist or isn't parseable — caller falls back to the * Vite-introspection path. */ protected readManifest(root: string): Promise<{ version: number; project: string; resources: DetectedResources; } | null>; protected detectResources(alepha: any): DetectedResources; } //#endregion //#region ../../src/cli/platform/index.d.ts /** * CLI plugin for multi-cloud deployment orchestration. * * Wraps `AlephaPlatformLibPlugin` (the framework-agnostic deploy * services) with `$command` instances so the orchestration is * reachable from `alepha platform …`. Non-CLI consumers (e.g. Alepha * Rocket) should depend on `alepha/cli/platform-lib` directly instead * of pulling in this command surface. * * Commands: * - `alepha platform plan` — show project topology and resource names * - `alepha platform up` — full deployment pipeline * - `alepha platform down` — teardown an environment * - `alepha platform status` — inspect deployed resources * - `alepha platform build` — build apps locally * - `alepha platform deploy` — deploy to cloud * - `alepha platform db migrate` — run database migrations * - `alepha platform db export` — pull the deployed DB into a local snapshot * - `alepha platform secrets` — manage external secret stores * * Configuration in `alepha.config.ts`: * * ```typescript * import { platform } from "alepha/cli/platform"; * * export default defineConfig({ * plugins: [ * platform({ * environments: { * production: { adapter: "cloudflare", domain: "myapp.com" }, * }, * }), * ], * }); * ``` */ declare const AlephaCliPlatformPlugin: import("alepha").Service<import("alepha").Module>; declare const platform: (options: PlatformOptions) => () => void; //#endregion export { AlephaCliPlatformPlugin, PlatformCommand, SecretsCommand, platform }; //# sourceMappingURL=index.d.ts.map