The best way to control Claude Code, Codex and more from any computer or phone

main
ts 45 lines 1.63 KB
Raw
1 import type * as amplify from "@distilled.cloud/aws/amplify";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { App } from "./App.ts";
5
6 export interface CreateDeploymentRequest extends Omit<amplify.CreateDeploymentRequest, "appId"> {}
7
8 /**
9 * Runtime binding for `amplify:CreateDeployment`.
10 *
11 * Bind an {@link App} in the function's init phase to get a callable that
12 * creates a manual deployment for a branch of an app with no connected
13 * repository. The result carries pre-signed upload URLs (`zipUploadUrl`, or
14 * per-file `fileUploadUrls` when a `fileMap` of MD5 hashes is supplied);
15 * upload the content there, then release it with {@link StartDeployment}.
16 * Provide the implementation with
17 * `Effect.provide(AWS.Amplify.CreateDeploymentHttp)`.
18 * ### Manual Deployments
19 * **Example:** Stage a Zip Deployment
20 * ```typescript
21 * // init — bind the operation to the app
22 * const createDeployment = yield* AWS.Amplify.CreateDeployment(app);
23 *
24 * // runtime — obtain the upload URL for the deployment artifact
25 * const { jobId, zipUploadUrl } = yield* createDeployment({
26 * branchName: "main",
27 * });
28 * // PUT the site zip to `zipUploadUrl`, then start the deployment with jobId
29 * ```
30 *
31 * @binding
32 */
33 export interface CreateDeployment extends Binding.Service<
34 CreateDeployment,
35 "AWS.Amplify.CreateDeployment",
36 (
37 app: App,
38 ) => Effect.Effect<
39 (
40 request: CreateDeploymentRequest,
41 ) => Effect.Effect<amplify.CreateDeploymentResult, amplify.CreateDeploymentError>
42 >
43 > {}
44
45 export const CreateDeployment = Binding.Service<CreateDeployment>("AWS.Amplify.CreateDeployment");