The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 06:00 UTC
| 1 | import type * as ecrpublic from "@distilled.cloud/aws/ecr-public"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type * as Effect from "effect/Effect"; |
| 4 | import type { PublicRepository } from "./Repository.ts"; |
| 5 | |
| 6 | /** Request for {@link PutImage} — `repositoryName` is injected. */ |
| 7 | export interface PutImageRequest extends Omit<ecrpublic.PutImageRequest, "repositoryName"> {} |
| 8 | |
| 9 | /** |
| 10 | * Runtime binding for `ecr-public:PutImage`. |
| 11 | * |
| 12 | * Creates or updates an image manifest in the bound |
| 13 | * {@link PublicRepository} — the final step of an image push after all |
| 14 | * referenced layers are uploaded ({@link InitiateLayerUpload} → |
| 15 | * {@link UploadLayerPart} → {@link CompleteLayerUpload}). Provide the |
| 16 | * implementation with `Effect.provide(AWS.ECRPublic.PutImageHttp)`. |
| 17 | * |
| 18 | * ### Pushing Images |
| 19 | * **Example:** Put An Image Manifest |
| 20 | * ```typescript |
| 21 | * // init |
| 22 | * const putImage = yield* AWS.ECRPublic.PutImage(repository); |
| 23 | * |
| 24 | * // runtime |
| 25 | * const result = yield* putImage({ |
| 26 | * imageManifest: JSON.stringify(manifest), |
| 27 | * imageManifestMediaType: "application/vnd.oci.image.manifest.v1+json", |
| 28 | * imageTag: "latest", |
| 29 | * }); |
| 30 | * ``` |
| 31 | * |
| 32 | * @binding |
| 33 | */ |
| 34 | export interface PutImage extends Binding.Service< |
| 35 | PutImage, |
| 36 | "AWS.ECRPublic.PutImage", |
| 37 | <R extends PublicRepository>( |
| 38 | repository: R, |
| 39 | ) => Effect.Effect< |
| 40 | (request: PutImageRequest) => Effect.Effect<ecrpublic.PutImageResponse, ecrpublic.PutImageError> |
| 41 | > |
| 42 | > {} |
| 43 | |
| 44 | export const PutImage = Binding.Service<PutImage>("AWS.ECRPublic.PutImage"); |