import type { ConfigError } from "effect/Config"; import * as Context from "effect/Context"; import * as Effect from "effect/Effect"; import { FileSystem } from "effect/FileSystem"; import * as Layer from "effect/Layer"; import { Path } from "effect/Path"; import * as Scope from "effect/Scope"; import type { HttpClient } from "effect/unstable/http/HttpClient"; import type { ChildProcessSpawner } from "effect/unstable/process/ChildProcessSpawner"; import type { ActionLike } from "./Action.ts"; import { AlchemyContext } from "./AlchemyContext.ts"; import { type ArtifactStore } from "./Artifacts.ts"; import { AuthProviders } from "./Auth/AuthProvider.ts"; import { CredentialsStore } from "./Auth/Credentials.ts"; import { AlchemyProfile } from "./Auth/Profile.ts"; import { Cli } from "./Cli/Cli.ts"; import type { Input, InputProps } from "./Input.ts"; import * as Output from "./Output.ts"; import type { Provider, ProviderCollectionLike } from "./Provider.ts"; import type { ResourceBinding, ResourceLike } from "./Resource.ts"; import { Stage } from "./Stage.ts"; import type { State } from "./State/State.ts"; import { PlatformServices } from "./Util/PlatformServices.ts"; export type StackServices = Stack | Stage | Scope.Scope | FileSystem | Path | AlchemyContext | HttpClient | ChildProcessSpawner | AuthProviders | AlchemyProfile | ArtifactStore | CredentialsStore | Cli; export type ProviderServices = ProviderCollectionLike | Provider | EnvironmentLike | CredentialsLike | DockerLike; export interface EnvironmentLike { readonly kind: "Environment"; } export interface CredentialsLike { readonly kind: "Credentials"; } export interface DockerLike { readonly key: "@alchemy/Docker"; } export type StackEffect = Effect.Effect; export type Stack = Context.ServiceClass.Shape<"Stack", Omit>; export interface StackProps { providers: Layer.Layer, never, StackServices>; state: Layer.Layer; } export declare const Stack: Context.ServiceClass> & { make(stack: { Shape: A; }, effect: Effect.Effect : Input>, ConfigError, Req>): Effect.Effect, ConfigError>; (): { (stackName: string, options: StackProps>, eff: Effect.Effect): Effect.Effect & { new (_: never): A extends object ? A : {}; stage: { [stage: string]: Effect.Effect; }; }; }; (): { (stackName: string): Effect.Effect & { new (_: never): Output.ToOutput; make: (options: StackProps>, effect: Effect.Effect) => Effect.Effect, ConfigError>; stage: { [stage: string]: Effect.Effect; }; }; }; (stackName: string, options: StackProps>, eff: Effect.Effect): Effect.Effect, ConfigError>; }; export interface StackSpec { name: string; stage: string; resources: { [logicalId: string]: ResourceLike; }; bindings: { [logicalId: string]: ResourceBinding[]; }; /** Tasks registered on the stack, keyed by FQN. */ actions: { [logicalId: string]: ActionLike; }; output: Output; } export interface CompiledStack extends StackSpec { services: Context.Context; } export declare const StackName: Effect.Effect; export interface MakeStackProps { name: string; providers: Layer.Layer; state: Layer.Layer; /** @internal */ stack?: StackSpec; } export declare const make: (options: MakeStackProps) => (effect: Effect.Effect) => Effect.Effect, Err, AlchemyContext | AlchemyProfile | ArtifactStore | AuthProviders | ChildProcessSpawner | Cli | CredentialsStore | FileSystem | HttpClient | Path | Scope.Scope | Stage | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude | Exclude>; export declare const CurrentStack: Effect.Effect, "output"> | undefined, never, never>; export declare const evalStack: (effect: StackEffect, StackErr, Stage | AlchemyContext>, fn: (stack: CompiledStack) => Effect.Effect, options: { stage: string; dev?: boolean; /** * Optional caller-supplied scope. When provided, scoped resources * (e.g. the dev sidecar process) live until the caller closes this * scope instead of being torn down when `evalStack` resolves. Used * by the test harness so the sidecar survives across `beforeAll`, * tests, and `afterAll`. When omitted, behaves as before with a * private scope closed on completion. */ scope?: Scope.Scope; }) => Effect.Effect; //# sourceMappingURL=Stack.d.ts.map