@devries-cameron20 / t3code Mirror · read-only
Fork 0

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, 04:45 UTC

main
ts 25 lines 1000 Bytes
Raw
1 import * as Context from "effect/Context";
2
3 /**
4 * Identity of the resource whose provider lifecycle operation (`diff`, `read`,
5 * `precreate`, `reconcile`, `delete`, …) is running. The engine provides it for
6 * the duration of each call, so helpers several calls below a reconciler
7 * (e.g. `Bundle.build`) can key per-resource state without the provider
8 * threading its identity through. Absent outside a lifecycle operation.
9 */
10 export class ResourceContext extends Context.Service<
11 ResourceContext,
12 {
13 /** Logical ID of the resource within its namespace, e.g. `Api`. */
14 readonly logicalId: string;
15 /**
16 * Fully-qualified name (namespace path + logical ID, see `./FQN.ts`),
17 * unique within the stack, e.g. `Backend/Api`.
18 */
19 readonly fqn: string;
20 /** Instance ID of the physical resource; changes on replacement. */
21 readonly instanceId: string;
22 /** Resource type, e.g. `Cloudflare.Worker`. */
23 readonly type: string;
24 }
25 >()("ResourceContext") {}