@prisma/composer 0.6.0-dev.2 → 0.6.0-dev.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/{app-config-Cbv_lA38-BHJsd1DF.d.mts → app-config-aIrriqVU-Dpj1RqnY.d.mts} +43 -17
  2. package/dist/app-config-aIrriqVU-Dpj1RqnY.d.mts.map +1 -0
  3. package/dist/config-BeBRB-6m.d.mts +1 -0
  4. package/dist/config.d.mts +3 -3
  5. package/dist/control.d.mts +219 -0
  6. package/dist/control.d.mts.map +1 -0
  7. package/dist/control.mjs +70 -0
  8. package/dist/control.mjs.map +1 -0
  9. package/dist/deploy-BeBRB-6m.d.mts +1 -0
  10. package/dist/deploy.d.mts +2 -2
  11. package/dist/deploy.mjs +312 -1
  12. package/dist/deploy.mjs.map +1 -0
  13. package/dist/deployment-summary-DswOl_9E-C03NJ98H.mjs +70 -0
  14. package/dist/deployment-summary-DswOl_9E-C03NJ98H.mjs.map +1 -0
  15. package/dist/{dist-BdvFDCLV.mjs → dist-C5rZnr4n.mjs} +2 -2
  16. package/dist/{dist-BdvFDCLV.mjs.map → dist-C5rZnr4n.mjs.map} +1 -1
  17. package/dist/emulator-retry-DGonap4g-S8BNrXFD.mjs +24 -0
  18. package/dist/emulator-retry-DGonap4g-S8BNrXFD.mjs.map +1 -0
  19. package/dist/errors-0e8IVwzi.mjs +88 -0
  20. package/dist/errors-0e8IVwzi.mjs.map +1 -0
  21. package/dist/execute-deploy-destroy-DfVJUICu-Dbgn1GR_.mjs +275 -0
  22. package/dist/execute-deploy-destroy-DfVJUICu-Dbgn1GR_.mjs.map +1 -0
  23. package/dist/execute-dev-BMTFWfFc-CGDFqR4w.mjs +2014 -0
  24. package/dist/execute-dev-BMTFWfFc-CGDFqR4w.mjs.map +1 -0
  25. package/dist/execute-log-Cay9hlKW-ChlIv192.mjs +160 -0
  26. package/dist/execute-log-Cay9hlKW-ChlIv192.mjs.map +1 -0
  27. package/dist/{graph-DgbALPDo-BEHF94BN.mjs → graph-BJgUfGB0-kvgFzT4q.mjs} +13 -7
  28. package/dist/graph-BJgUfGB0-kvgFzT4q.mjs.map +1 -0
  29. package/dist/{graph-DDpXh7S8-b-93BcHn.d.mts → graph-DqklX5Sf-BNS2aO1j.d.mts} +3 -3
  30. package/dist/graph-DqklX5Sf-BNS2aO1j.d.mts.map +1 -0
  31. package/dist/{graph-types-C3FOaaXm-C6_rGzfn.d.mts → graph-types-N6brq1zY-1VMNwtkJ.d.mts} +88 -5
  32. package/dist/graph-types-N6brq1zY-1VMNwtkJ.d.mts.map +1 -0
  33. package/dist/{index-BQVrMGfe.d.mts → index-DryPyF9U.d.mts} +3 -3
  34. package/dist/{index-BQVrMGfe.d.mts.map → index-DryPyF9U.d.mts.map} +1 -1
  35. package/dist/index.d.mts +3 -3
  36. package/dist/index.mjs +2 -2
  37. package/dist/internal-error-BIc-ehme-Ck_lgxD_.mjs +18 -0
  38. package/dist/internal-error-BIc-ehme-Ck_lgxD_.mjs.map +1 -0
  39. package/dist/local-target-DnA2E8IN.mjs +47 -0
  40. package/dist/local-target-DnA2E8IN.mjs.map +1 -0
  41. package/dist/local-target.d.mts +1 -1
  42. package/dist/local-target.mjs +2 -46
  43. package/dist/{nextjs-DLyeRR7M-D47aMmfr.d.mts → nextjs-DLyeRR7M-DZODs9tk.d.mts} +3 -3
  44. package/dist/{nextjs-DLyeRR7M-D47aMmfr.d.mts.map → nextjs-DLyeRR7M-DZODs9tk.d.mts.map} +1 -1
  45. package/dist/nextjs-control.d.mts +4 -4
  46. package/dist/nextjs.d.mts +1 -1
  47. package/dist/node-control.d.mts +3 -3
  48. package/dist/node.d.mts +2 -2
  49. package/dist/pipeline-AoW8zq4I-CUon5KZH.mjs +452 -0
  50. package/dist/pipeline-AoW8zq4I-CUon5KZH.mjs.map +1 -0
  51. package/dist/report.d.mts +4 -3
  52. package/dist/report.d.mts.map +1 -1
  53. package/dist/report.mjs +4 -1
  54. package/dist/report.mjs.map +1 -1
  55. package/dist/result-CY_TB7bn.mjs +247 -0
  56. package/dist/result-CY_TB7bn.mjs.map +1 -0
  57. package/dist/run-alchemy-D44OZlyB-gVq_0gf4.mjs +93 -0
  58. package/dist/run-alchemy-D44OZlyB-gVq_0gf4.mjs.map +1 -0
  59. package/dist/service-rpc.d.mts +2 -2
  60. package/dist/service-rpc.mjs +2 -2
  61. package/dist/testing.d.mts +1 -1
  62. package/package.json +17 -21
  63. package/src/exports/control.ts +1 -0
  64. package/src/exports/testing.ts +5 -0
  65. package/dist/app-config-Cbv_lA38-BHJsd1DF.d.mts.map +0 -1
  66. package/dist/bin.mjs +0 -3283
  67. package/dist/bin.mjs.map +0 -1
  68. package/dist/config-whuqZ5xT.d.mts +0 -1
  69. package/dist/deploy-C4DxNkJ9-D73lmBqy.mjs +0 -313
  70. package/dist/deploy-C4DxNkJ9-D73lmBqy.mjs.map +0 -1
  71. package/dist/deploy-whuqZ5xT.d.mts +0 -1
  72. package/dist/graph-DDpXh7S8-b-93BcHn.d.mts.map +0 -1
  73. package/dist/graph-DgbALPDo-BEHF94BN.mjs.map +0 -1
  74. package/dist/graph-types-C3FOaaXm-C6_rGzfn.d.mts.map +0 -1
  75. package/dist/local-target.mjs.map +0 -1
@@ -1,11 +1,11 @@
1
- import { F as ResourceNode, M as ProvisionNeed, U as ServiceNode, d as Graph, n as Config, t as BuildAdapter, w as NodeId, x as ModuleNode } from "./graph-types-C3FOaaXm-C6_rGzfn.mjs";
2
- import "./graph-DDpXh7S8-b-93BcHn.mjs";
1
+ import { F as ResourceNode, M as ProvisionNeed, U as ServiceNode, d as Graph, n as Config, t as BuildAdapter, w as NodeId, x as ModuleNode } from "./graph-types-N6brq1zY-1VMNwtkJ.mjs";
2
+ import "./graph-DqklX5Sf-BNS2aO1j.mjs";
3
3
  import * as Alchemy from "alchemy";
4
4
  import { Input, StackServices } from "alchemy";
5
5
  import * as Effect from "effect/Effect";
6
6
  import * as Layer from "effect/Layer";
7
7
  import { State } from "alchemy/State/State";
8
- //#region ../../0-framework/1-core/core/dist/app-config-Cbv_lA38.d.mts
8
+ //#region ../../0-framework/1-core/core/dist/app-config-aIrriqVU.d.mts
9
9
  //#region src/container-transport.d.ts
10
10
  /**
11
11
  * Carries resolved containers from the CLI process into the alchemy process
@@ -36,23 +36,42 @@ interface ContainerInstance {
36
36
  /** Serialize to a non-empty string for the process transport above. The format is the extension's own; only its `deserialize` reads it. */
37
37
  serialize(): string;
38
38
  }
39
+ /**
40
+ * What the caller has already authenticated, handed to one container
41
+ * lifecycle call. A caller that holds neither omits the argument, and the
42
+ * extension falls back to whatever credential protocol it defines for
43
+ * itself (for Prisma Cloud, its env vars — which is how the alchemy child
44
+ * process still resolves containers).
45
+ *
46
+ * `C` is the extension's own platform-client type, left as a type parameter
47
+ * because this shared-plane module must not import a platform SDK; the
48
+ * framework only carries the value, never calls it. The framework stores the
49
+ * erased `C = unknown` form and the extension recovers its concrete client
50
+ * through the same method bivariance that erases `I` below.
51
+ */
52
+ interface ContainerCredentials<C = unknown> {
53
+ /** The workspace the container lives in. `undefined` when the caller has no workspace to name — the extension decides whether it can proceed. */
54
+ readonly workspaceId: string | undefined;
55
+ /** An already-authenticated platform API client. Present means the extension must not build its own from the environment. */
56
+ readonly client?: C | undefined;
57
+ }
39
58
  /**
40
59
  * The platform containers an app deploys into, as one lifecycle. `I` is
41
60
  * the extension's own instance type — the same descriptor produces and
42
61
  * consumes it, so the extension gets full typing internally while the
43
- * framework stores the erased form. METHOD SYNTAX REQUIRED on all four
44
- * members: the erased assignment into ExtensionDescriptor compiles only
45
- * through method bivariance; property-arrow members are checked
46
- * contravariantly and the assignment fails (same rule as
47
- * ServiceLowering<P, S> — ADR-0033).
62
+ * framework stores the erased form; `C` erases the same way. METHOD SYNTAX
63
+ * REQUIRED on all four members: the erased assignment into
64
+ * ExtensionDescriptor compiles only through method bivariance;
65
+ * property-arrow members are checked contravariantly and the assignment
66
+ * fails (same rule as ServiceLowering<P, S> — ADR-0033).
48
67
  */
49
- interface ContainerDescriptor<I extends ContainerInstance = ContainerInstance> {
68
+ interface ContainerDescriptor<I extends ContainerInstance = ContainerInstance, C = unknown> {
50
69
  /** Resolve the container for (appName, stage), creating anything absent. Called by `deploy`. */
51
- ensure(input: LocateContainerInput): Promise<I>;
70
+ ensure(input: LocateContainerInput, credentials?: ContainerCredentials<C>): Promise<I>;
52
71
  /** Find the container for (appName, stage); `undefined` when nothing exists. Called by `destroy` — never creates. */
53
- locate(input: LocateContainerInput): Promise<I | undefined>;
72
+ locate(input: LocateContainerInput, credentials?: ContainerCredentials<C>): Promise<I | undefined>;
54
73
  /** Remove the container after a successful destroy, after every extension's `teardown` has run. Failure policy is the extension's. */
55
- remove(instance: I): Promise<void>;
74
+ remove(instance: I, credentials?: ContainerCredentials<C>): Promise<void>;
56
75
  /** Reconstruct an instance from its own `serialize()` output — the far end of the framework's parent→child transport. */
57
76
  deserialize(serialized: string): I;
58
77
  }
@@ -348,8 +367,13 @@ interface ExtensionDescriptor {
348
367
  * runs. A target uses it to verify platform prerequisites (e.g. that every
349
368
  * secret env var in the provision manifest exists for the resolved stage) and
350
369
  * throws to abort the deploy. Async: it talks to the platform (ADR-0029).
370
+ *
371
+ * METHOD SYNTAX REQUIRED, for the same reason ContainerDescriptor's members
372
+ * need it: the framework hands over the erased `PreflightInput<unknown>`,
373
+ * and an extension that types the input against its own client type only
374
+ * assigns here through method bivariance.
351
375
  */
352
- readonly preflight?: (input: PreflightInput) => Promise<void>;
376
+ preflight?(input: PreflightInput): Promise<void>;
353
377
  /**
354
378
  * Destroy-time cleanup — the CLI runs it once, after `alchemy destroy`
355
379
  * succeeds and BEFORE the stage's Project/Branch are removed. A target uses
@@ -391,14 +415,16 @@ interface StateDescriptor {
391
415
  /** Build the state layer. `container` is the owning extension's resolved instance; `undefined` when it declared no container descriptor. */
392
416
  create(container: ContainerInstance | undefined): AlchemyStateLayer;
393
417
  }
394
- /** The resolved deploy context handed to an extension's `preflight` hook. */
395
- interface PreflightInput {
418
+ /** The resolved deploy context handed to an extension's `preflight` hook. `C` erases to `unknown` at the framework boundary — see ContainerCredentials. */
419
+ interface PreflightInput<C = unknown> {
396
420
  /** The loaded application graph — the manifest of prerequisites is read from it (`provisionManifest`). */
397
421
  readonly graph: Graph;
398
422
  /** The calling extension's own resolved container; `undefined` when it declares no container descriptor. Narrow with the extension's guard. */
399
423
  readonly container: ContainerInstance | undefined;
400
424
  /** The stage name (`--stage`), or `undefined` for the default stage — for diagnostics/scope. */
401
425
  readonly stage: string | undefined;
426
+ /** What the caller has already authenticated, for the platform calls preflight makes. Absent means the extension falls back to its own credential protocol. */
427
+ readonly credentials?: ContainerCredentials<C> | undefined;
402
428
  }
403
429
  /** The resolved destroy context handed to an extension's `teardown` hook. */
404
430
  interface TeardownInput {
@@ -493,5 +519,5 @@ interface PrismaAppConfig {
493
519
  /** Typed identity — exists so `prisma-composer.config.ts` gets checked against PrismaAppConfig where it is written. */
494
520
  declare function defineConfig(config: PrismaAppConfig): PrismaAppConfig;
495
521
  //#endregion
496
- export { ProvisionerDescriptor as A, joinDeployment as B, Lowering as C, PreflightInput as D, PackageInput as E, containerEnv as F, lowering as H, containerEnvVarName as I, defineConfig as L, StateDescriptor as M, TeardownInput as N, PrismaAppConfig as O, buildConfig as P, deserializeContainers as R, LoweredResult as S, Outputs as T, mergedProviders as U, lower as V, resolveStateLayer as W, LocalTargetProvidersInput as _, Bundle as a, LowerError as b, DEV_DIR as c, DeploymentResult as d, ExtensionDescriptor as f, LocalTargetEmulatorsInput as g, LocalTargetDescriptor as h, AssembleInput as i, ServiceLowering as j, ProvisionEdge as k, DeployedEntity as l, LocalTargetAttachment as m, ApplicationDescriptor as n, ContainerDescriptor as o, LocalTargetAttachInput as p, Artifact as r, ContainerInstance as s, AlchemyStateLayer as t, DeployedNode as u, LocateContainerInput as v, NodeDescriptor as w, LowerOptions as x, LowerContext as y, isBuildOnlyExtension as z };
497
- //# sourceMappingURL=app-config-Cbv_lA38-BHJsd1DF.d.mts.map
522
+ export { ProvisionEdge as A, isBuildOnlyExtension as B, LoweredResult as C, PackageInput as D, Outputs as E, buildConfig as F, resolveStateLayer as G, lower as H, containerEnv as I, containerEnvVarName as L, ServiceLowering as M, StateDescriptor as N, PreflightInput as O, TeardownInput as P, defineConfig as R, LowerOptions as S, NodeDescriptor as T, lowering as U, joinDeployment as V, mergedProviders as W, LocalTargetEmulatorsInput as _, Bundle as a, LowerContext as b, ContainerInstance as c, DeployedNode as d, DeploymentResult as f, LocalTargetDescriptor as g, LocalTargetAttachment as h, AssembleInput as i, ProvisionerDescriptor as j, PrismaAppConfig as k, DEV_DIR as l, LocalTargetAttachInput as m, ApplicationDescriptor as n, ContainerCredentials as o, ExtensionDescriptor as p, Artifact as r, ContainerDescriptor as s, AlchemyStateLayer as t, DeployedEntity as u, LocalTargetProvidersInput as v, Lowering as w, LowerError as x, LocateContainerInput as y, deserializeContainers as z };
523
+ //# sourceMappingURL=app-config-aIrriqVU-Dpj1RqnY.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-config-aIrriqVU-Dpj1RqnY.d.mts","names":[],"sources":["../../../0-framework/1-core/core/dist/app-config-aIrriqVU.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;UAmBU;;WAEC;;WAEA;;;;;;;UAOD;WACC,OAAO;;WAEP;;EAET;;;;;;;;;;;;;;;UAeQ,qBAAqB;;WAEpB;;WAEA,SAAS;;;;;;;;;;;;UAYV,oBAAoB,UAAU,oBAAoB,mBAAmB;;EAE7E,OAAO,OAAO,sBAAsB,cAAc,qBAAqB,KAAK,QAAQ;;EAEpF,OAAO,OAAO,sBAAsB,cAAc,qBAAqB,KAAK,QAAQ;;EAEpF,OAAO,UAAU,GAAG,cAAc,qBAAqB,KAAK;;EAE5D,YAAY,qBAAqB;;;iBAGlB,oBAAoB;;iBAEpB,aAAa,WAAW,oBAAoB,qBAAqB;;UAExE;WACC;WACA,YAAY;;;;;;iBAMN,sBAA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;WACC,YAAY;WACZ,OAAO;;;iBAGD,aAAa,QAAQ,kBAAkB"}
@@ -0,0 +1 @@
1
+ import "./app-config-aIrriqVU-Dpj1RqnY.mjs";
package/dist/config.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { D as PreflightInput, F as containerEnv, I as containerEnvVarName, L as defineConfig, M as StateDescriptor, N as TeardownInput, O as PrismaAppConfig, R as deserializeContainers, _ as LocalTargetProvidersInput, c as DEV_DIR, f as ExtensionDescriptor, g as LocalTargetEmulatorsInput, h as LocalTargetDescriptor, m as LocalTargetAttachment, o as ContainerDescriptor, p as LocalTargetAttachInput, s as ContainerInstance, v as LocateContainerInput, w as NodeDescriptor, z as isBuildOnlyExtension } from "./app-config-Cbv_lA38-BHJsd1DF.mjs";
2
- import "./config-whuqZ5xT.mjs";
3
- export { type ContainerDescriptor, type ContainerInstance, DEV_DIR, ExtensionDescriptor, LocalTargetAttachInput, LocalTargetAttachment, LocalTargetDescriptor, LocalTargetEmulatorsInput, LocalTargetProvidersInput, type LocateContainerInput, NodeDescriptor, PreflightInput, PrismaAppConfig, StateDescriptor, TeardownInput, containerEnv, containerEnvVarName, defineConfig, deserializeContainers, isBuildOnlyExtension };
1
+ import { B as isBuildOnlyExtension, I as containerEnv, L as containerEnvVarName, N as StateDescriptor, O as PreflightInput, P as TeardownInput, R as defineConfig, T as NodeDescriptor, _ as LocalTargetEmulatorsInput, c as ContainerInstance, g as LocalTargetDescriptor, h as LocalTargetAttachment, k as PrismaAppConfig, l as DEV_DIR, m as LocalTargetAttachInput, o as ContainerCredentials, p as ExtensionDescriptor, s as ContainerDescriptor, v as LocalTargetProvidersInput, y as LocateContainerInput, z as deserializeContainers } from "./app-config-aIrriqVU-Dpj1RqnY.mjs";
2
+ import "./config-BeBRB-6m.mjs";
3
+ export { type ContainerCredentials, type ContainerDescriptor, type ContainerInstance, DEV_DIR, ExtensionDescriptor, LocalTargetAttachInput, LocalTargetAttachment, LocalTargetDescriptor, LocalTargetEmulatorsInput, LocalTargetProvidersInput, type LocateContainerInput, NodeDescriptor, PreflightInput, PrismaAppConfig, StateDescriptor, TeardownInput, containerEnv, containerEnvVarName, defineConfig, deserializeContainers, isBuildOnlyExtension };
@@ -0,0 +1,219 @@
1
+ import { dt as CliStructuredError } from "./graph-types-N6brq1zY-1VMNwtkJ.mjs";
2
+ import { u as DeployedEntity } from "./app-config-aIrriqVU-Dpj1RqnY.mjs";
3
+ import "./config-BeBRB-6m.mjs";
4
+ import "./index-DryPyF9U.mjs";
5
+ import "./deploy-BeBRB-6m.mjs";
6
+ //#region ../../0-framework/0-foundation/foundation/dist/result.d.mts
7
+ //#region src/result.d.ts
8
+ /**
9
+ * Represents a successful result containing a value.
10
+ */
11
+ interface Ok<T> {
12
+ readonly ok: true;
13
+ readonly value: T;
14
+ assertOk(): T;
15
+ assertNotOk(): never;
16
+ }
17
+ /**
18
+ * Represents an unsuccessful result containing failure details.
19
+ */
20
+ interface NotOk<F> {
21
+ readonly ok: false;
22
+ readonly failure: F;
23
+ assertOk(): never;
24
+ assertNotOk(): F;
25
+ }
26
+ /**
27
+ * A discriminated union representing either success (Ok) or failure (NotOk).
28
+ *
29
+ * @typeParam T - The success value type
30
+ * @typeParam F - The failure details type
31
+ */
32
+ type Result<T, F> = Ok<T> | NotOk<F>;
33
+ //#endregion
34
+ //#region ../../0-framework/3-tooling/cli/dist/log-DRnnWupy.d.mts
35
+ //#region src/deployment-summary.d.ts
36
+ /** The serializable projection of DeploymentResult — what CAN cross the process
37
+ * boundary. Writer (report hook) and reader (deploy operation) share this shape. */
38
+ interface DeployedNodeSummary {
39
+ readonly address: string;
40
+ readonly entities: readonly DeployedEntity[];
41
+ }
42
+ interface DeploymentSummary {
43
+ readonly app: string;
44
+ readonly nodes: readonly DeployedNodeSummary[];
45
+ }
46
+ //#endregion
47
+ //#region src/operations/shared.d.ts
48
+ /** A running service's dotted address plus its local URL — what `dev` reports
49
+ * as the front door and `log` reports as the tailable services. */
50
+ interface ServiceEndpoint {
51
+ readonly address: string;
52
+ readonly url: string;
53
+ }
54
+ /**
55
+ * Where a failed execution left its artifacts — details of the CURRENT
56
+ * execution mechanism (a spawned deploy-engine child driving a generated
57
+ * stack file), for hosts that want to print a reproduce hint. The mechanism
58
+ * is not part of the surface's contract, so these fields may change or
59
+ * disappear if the mechanism does; branch on `code`/`message`/`cause` for
60
+ * anything durable.
61
+ */
62
+ interface ExecutionDiagnostics {
63
+ /** The child's exit status; undefined means the spawn itself threw, or the
64
+ * child was killed by a signal (`signal` then names it). */
65
+ readonly exitCode: number | undefined;
66
+ /** The signal that killed the child, when one did. A signal-killed converge
67
+ * is an abort the user asked for, not a failure of the deploy — a host
68
+ * should report it as an interruption and print no reproduce hint. */
69
+ readonly signal?: string | undefined;
70
+ readonly stackFilePath: string;
71
+ readonly reproduceCommand: string;
72
+ readonly cwd: string;
73
+ }
74
+ /**
75
+ * Reads the execution diagnostics an engine-failure error carries in
76
+ * `meta.diagnostics`; undefined for every other failure.
77
+ */
78
+ declare function executionDiagnostics(f: CliStructuredError): ExecutionDiagnostics | undefined;
79
+ //#endregion
80
+ //#region src/operations/deploy.d.ts
81
+ interface DeployInput {
82
+ /** Path to the entry module, resolved against `cwd` — same contract as `prisma-composer deploy <entry>`. */
83
+ readonly entry: string;
84
+ /** Override the root node's name (the `--name` flag's slot). */
85
+ readonly name?: string | undefined;
86
+ /** Target stage. ABSENT = production — bare deploy targets production (main.ts effectiveStage). */
87
+ readonly stage?: string | undefined;
88
+ /** Defaults to process.cwd(); the directory `.prisma-composer/` and `.alchemy` state live under. */
89
+ readonly cwd?: string | undefined;
90
+ }
91
+ interface DeploySuccess {
92
+ /** Parsed from the alchemy child's result file. Undefined when the child
93
+ * did not write one (injected fake alchemy, or a report-less apply). */
94
+ readonly summary: DeploymentSummary | undefined;
95
+ }
96
+ declare function deploy(input: DeployInput): Promise<Result<DeploySuccess, CliStructuredError>>;
97
+ //#endregion
98
+ //#region src/operations/destroy.d.ts
99
+ /** Destroy must name its target explicitly — no silent default to production. Encoded, not re-derived from flags. */
100
+ type DestroyTarget = {
101
+ readonly kind: 'production';
102
+ } | {
103
+ readonly kind: 'stage';
104
+ readonly stage: string;
105
+ };
106
+ type DestroyEvent =
107
+ /** Emitted before the pipeline when `<cwd>/.alchemy` is missing/empty. */
108
+ {
109
+ readonly kind: 'no-local-deploy-state';
110
+ readonly cwd: string;
111
+ };
112
+ interface DestroyInput {
113
+ readonly entry: string;
114
+ readonly name?: string | undefined;
115
+ readonly target: DestroyTarget;
116
+ readonly cwd?: string | undefined;
117
+ /** Mid-operation notifications, in real time. Rendering is the host's. */
118
+ readonly onEvent?: ((event: DestroyEvent) => void) | undefined;
119
+ }
120
+ declare function destroy(input: DestroyInput): Promise<Result<void, CliStructuredError>>;
121
+ //#endregion
122
+ //#region src/operations/dev.d.ts
123
+ type DevEvent =
124
+ /** Initial front door + after each successful re-converge. */
125
+ {
126
+ readonly kind: 'ready';
127
+ readonly endpoints: readonly ServiceEndpoint[];
128
+ } | {
129
+ readonly kind: 'unwatchable';
130
+ readonly address: string;
131
+ } | {
132
+ readonly kind: 'rebuild-failed';
133
+ readonly message: string;
134
+ } |
135
+ /** The file watcher itself errored (EMFILE, a vanished directory); the session keeps running. */
136
+ {
137
+ readonly kind: 'watch-error';
138
+ readonly message: string;
139
+ } |
140
+ /** The app keeps running, still watching. */
141
+ {
142
+ readonly kind: 'converge-failed';
143
+ readonly stackFilePath: string;
144
+ readonly reproduceCommand: string;
145
+ readonly cwd: string;
146
+ } | {
147
+ readonly kind: 'stopping';
148
+ } |
149
+ /** One service refused to stop during stop(); teardown continues and `stopped` still follows. */
150
+ {
151
+ readonly kind: 'stop-error';
152
+ readonly message: string;
153
+ } | {
154
+ readonly kind: 'stopped';
155
+ };
156
+ interface DevInput {
157
+ readonly entry: string;
158
+ readonly name?: string | undefined;
159
+ readonly fresh?: boolean | undefined;
160
+ readonly cwd?: string | undefined;
161
+ readonly onEvent?: ((event: DevEvent) => void) | undefined;
162
+ }
163
+ /** A running dev session. The operation NEVER touches process signal handlers —
164
+ * the host owns signals (and must evict alchemy's import-time SIGINT/SIGTERM
165
+ * listeners before installing its own; see run-dev.ts). */
166
+ interface DevSession {
167
+ /** The initial front door, already merged across attachments. */
168
+ readonly endpoints: readonly ServiceEndpoint[];
169
+ /** Stop the watch loop and the app's services (emulators and data stay up).
170
+ * Idempotent; emits 'stopping'/'stopped'; resolves `closed`. */
171
+ stop(): Promise<void>;
172
+ /** Settles when the session has fully stopped (via stop()). */
173
+ readonly closed: Promise<void>;
174
+ }
175
+ declare function dev(input: DevInput): Promise<Result<DevSession, CliStructuredError>>;
176
+ //#endregion
177
+ //#region src/operations/log.d.ts
178
+ interface LogLine {
179
+ readonly service: string;
180
+ readonly line: string;
181
+ }
182
+ type LogEvent =
183
+ /** One attachment's stream died; the others continue. */
184
+ {
185
+ readonly kind: 'stream-failed';
186
+ readonly message: string;
187
+ } |
188
+ /** The consumer fell behind and the bounded merge queue overflowed:
189
+ * `count` oldest lines were dropped since the last delivered line. */
190
+ {
191
+ readonly kind: 'lines-dropped';
192
+ readonly count: number;
193
+ };
194
+ interface LogInput {
195
+ readonly entry: string;
196
+ readonly name?: string | undefined;
197
+ /** Restrict to one service's dotted address; validated against running services. */
198
+ readonly address?: string | undefined;
199
+ /** Trailing history lines before live output. Defaults to 0 (live only) —
200
+ * the attachment contract's default; the CLI's user-facing default of 20 stays in main.ts. */
201
+ readonly tail?: number | undefined;
202
+ readonly cwd?: string | undefined;
203
+ /** Ends the stream when aborted. The host owns SIGINT/SIGTERM → abort. */
204
+ readonly signal?: AbortSignal | undefined;
205
+ readonly onEvent?: ((event: LogEvent) => void) | undefined;
206
+ }
207
+ interface LogAttached {
208
+ /** For the adapter's empty-services notice. */
209
+ readonly appName: string;
210
+ /** Every running service. EMPTY means nothing is running — a valid, non-failure state;
211
+ * `lines` is then an already-finished iterable. */
212
+ readonly services: readonly ServiceEndpoint[];
213
+ /** Merged, address-filtered stream; ends on signal abort or when every source ends. */
214
+ readonly lines: AsyncIterable<LogLine>;
215
+ }
216
+ declare function log(input: LogInput): Promise<Result<LogAttached, CliStructuredError>>;
217
+ //#endregion
218
+ export { type CliStructuredError, type DeployInput, type DeploySuccess, type DeployedNodeSummary, type DeploymentSummary, type DestroyEvent, type DestroyInput, type DestroyTarget, type DevEvent, type DevInput, type DevSession, type ExecutionDiagnostics, type LogAttached, type LogEvent, type LogInput, type LogLine, type NotOk, type Ok, type Result, type ServiceEndpoint, deploy, destroy, dev, executionDiagnostics, log };
219
+ //# sourceMappingURL=control.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control.d.mts","names":[],"sources":["../../../0-framework/0-foundation/foundation/dist/result.d.mts","../../../0-framework/3-tooling/cli/dist/log-DRnnWupy.d.mts"],"mappings":";;;;;;;;;;UAIU,GAAG;WACF;WACA,OAAO;EAChB,YAAY;EACZ;;;;;UAKQ,MAAM;WACL;WACA,SAAS;EAClB;EACA,eAAe;;;;;;;;KAQZ,OAAO,GAAG,KAAK,GAAG,KAAK,MAAM;;;;;;UCfxB;WACC;WACA,mBAAmB;;UAEpB;WACC;WACA,gBAAgB;;;;;;UAMjB;WACC;WACA;;;;;;;;;;UA2CD;;;WAGC;;;;WAIA;WACA;WACA;WACA;;;;;;iBAMM,qBAAqB,GAAG,qBAAqB;;;UAGpD;;WAEC;;WAEA;;WAEA;;WAEA;;UAED;;;WAGC,SAAS;;iBAEH,OAAO,OAAO,cAAc,QAAQ,OAAO,eAAe;;;;KAQtE;WACM;;WAEA;WACA;;KAEN;;;WAGM;WACA;;UAED;WACC;WACA;WACA,QAAQ;WACR;;WAEA,YAAY,OAAO;;iBAEb,QAAQ,OAAO,eAAe,QAAQ,aAAa;;;KAO/D;;;WAGM;WACA,oBAAoB;;WAEpB;WACA;;WAEA;WACA;;;;WAIA;WACA;;;;WAIA;WACA;WACA;WACA;;WAEA;;;;WAIA;WACA;;WAEA;;UAED;WACC;WACA;WACA;WACA;WACA,YAAY,OAAO;;;;;UAKpB;;WAEC,oBAAoB;;;EAG7B,QAAQ;;WAEC,QAAQ;;iBAEF,IAAI,OAAO,WAAW,QAAQ,OAAO,YAAY;;;UAcxD;WACC;WACA;;KAEN;;;WAGM;WACA;;;;;WAKA;WACA;;UAYD;WACC;WACA;;WAEA;;;WAGA;WACA;;WAEA,SAAS;WACT,YAAY,OAAO;;UAEpB;;WAEC;;;WAGA,mBAAmB;;WAEnB,OAAO,cAAc;;iBAEf,IAAI,OAAO,WAAW,QAAQ,OAAO,aAAa"}
@@ -0,0 +1,70 @@
1
+ import { a as executionDiagnostics, o as executorLoadFailure, t as notOk } from "./result-CY_TB7bn.mjs";
2
+ //#region ../../0-framework/3-tooling/cli/dist/log-DfT2hHqi.mjs
3
+ async function deploy(input) {
4
+ return deployWithDeps(input, {});
5
+ }
6
+ /** In-package variant threading the injection seam (the CLI's RunDeps, unit
7
+ * tests). Deliberately NOT re-exported through `./control` — the seam mirrors
8
+ * internal types and is not part of the published surface. */
9
+ async function deployWithDeps(input, deps) {
10
+ const cwd = input.cwd ?? process.cwd();
11
+ let executor;
12
+ try {
13
+ executor = await import("./execute-deploy-destroy-DfVJUICu-Dbgn1GR_.mjs");
14
+ } catch (error) {
15
+ return notOk(executorLoadFailure("deploy", error, cwd));
16
+ }
17
+ return executor.executeDeploy(input, deps, cwd);
18
+ }
19
+ async function destroy(input) {
20
+ return destroyWithDeps(input, {});
21
+ }
22
+ /** In-package variant threading the injection seam (the CLI's RunDeps, unit
23
+ * tests). Deliberately NOT re-exported through `./control` — the seam mirrors
24
+ * internal types and is not part of the published surface. */
25
+ async function destroyWithDeps(input, deps) {
26
+ const cwd = input.cwd ?? process.cwd();
27
+ let executor;
28
+ try {
29
+ executor = await import("./execute-deploy-destroy-DfVJUICu-Dbgn1GR_.mjs");
30
+ } catch (error) {
31
+ return notOk(executorLoadFailure("destroy", error, cwd));
32
+ }
33
+ return executor.executeDestroy(input, deps, cwd);
34
+ }
35
+ async function dev(input) {
36
+ return devWithDeps(input, {});
37
+ }
38
+ /** In-package variant threading the injection seam (the CLI's RunDeps, unit
39
+ * tests). Deliberately NOT re-exported through `./control` — the seam mirrors
40
+ * internal types and is not part of the published surface. */
41
+ async function devWithDeps(input, deps) {
42
+ const cwd = input.cwd ?? process.cwd();
43
+ let executor;
44
+ try {
45
+ executor = await import("./execute-dev-BMTFWfFc-CGDFqR4w.mjs");
46
+ } catch (error) {
47
+ return notOk(executorLoadFailure("dev", error, cwd));
48
+ }
49
+ return executor.executeDev(input, deps, cwd);
50
+ }
51
+ async function log(input) {
52
+ return logWithDeps(input, {});
53
+ }
54
+ /** In-package variant threading the injection seam (the CLI's LogRunDeps,
55
+ * unit tests). Deliberately NOT re-exported through `./control` — the seam
56
+ * mirrors internal types and is not part of the published surface. */
57
+ async function logWithDeps(input, deps) {
58
+ const cwd = input.cwd ?? process.cwd();
59
+ let executor;
60
+ try {
61
+ executor = await import("./execute-log-Cay9hlKW-ChlIv192.mjs");
62
+ } catch (error) {
63
+ return notOk(executorLoadFailure("log", error, cwd));
64
+ }
65
+ return executor.executeLog(input, deps, cwd);
66
+ }
67
+ //#endregion
68
+ export { deploy, destroy, dev, executionDiagnostics, log };
69
+
70
+ //# sourceMappingURL=control.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/log-DfT2hHqi.mjs"],"sourcesContent":["import { n as executorLoadFailure } from \"./shared-BTnATsqm.mjs\";\nimport { notOk } from \"@internal/foundation/result\";\n//#region src/operations/deploy.ts\nasync function deploy(input) {\n\treturn deployWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's RunDeps, unit\n* tests). Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function deployWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-deploy-destroy-DfVJUICu.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"deploy\", error, cwd));\n\t}\n\treturn executor.executeDeploy(input, deps, cwd);\n}\n//#endregion\n//#region src/operations/destroy.ts\nasync function destroy(input) {\n\treturn destroyWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's RunDeps, unit\n* tests). Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function destroyWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-deploy-destroy-DfVJUICu.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"destroy\", error, cwd));\n\t}\n\treturn executor.executeDestroy(input, deps, cwd);\n}\n//#endregion\n//#region src/operations/dev.ts\nasync function dev(input) {\n\treturn devWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's RunDeps, unit\n* tests). Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function devWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-dev-BMTFWfFc.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"dev\", error, cwd));\n\t}\n\treturn executor.executeDev(input, deps, cwd);\n}\n//#endregion\n//#region src/operations/log.ts\nasync function log(input) {\n\treturn logWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's LogRunDeps,\n* unit tests). Deliberately NOT re-exported through `./control` — the seam\n* mirrors internal types and is not part of the published surface. */\nasync function logWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-log-Cay9hlKW.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"log\", error, cwd));\n\t}\n\treturn executor.executeLog(input, deps, cwd);\n}\n//#endregion\nexport { destroy as a, deployWithDeps as c, devWithDeps as i, logWithDeps as n, destroyWithDeps as o,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MAAM,oBAAoB,OAAO,OAAO,GAAG,CAAC;CACpD;CACA,OAAO,SAAS,WAAW,OAAO,MAAM,GAAG;AAC5C"}
@@ -0,0 +1 @@
1
+ import "./app-config-aIrriqVU-Dpj1RqnY.mjs";
package/dist/deploy.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { A as ProvisionerDescriptor, B as joinDeployment, C as Lowering, E as PackageInput, H as lowering, P as buildConfig, S as LoweredResult, T as Outputs, U as mergedProviders, V as lower, W as resolveStateLayer, a as Bundle, b as LowerError, d as DeploymentResult, i as AssembleInput, j as ServiceLowering, k as ProvisionEdge, l as DeployedEntity, n as ApplicationDescriptor, r as Artifact, t as AlchemyStateLayer, u as DeployedNode, x as LowerOptions, y as LowerContext } from "./app-config-Cbv_lA38-BHJsd1DF.mjs";
2
- import "./deploy-whuqZ5xT.mjs";
1
+ import { A as ProvisionEdge, C as LoweredResult, D as PackageInput, E as Outputs, F as buildConfig, G as resolveStateLayer, H as lower, M as ServiceLowering, S as LowerOptions, U as lowering, V as joinDeployment, W as mergedProviders, a as Bundle, b as LowerContext, d as DeployedNode, f as DeploymentResult, i as AssembleInput, j as ProvisionerDescriptor, n as ApplicationDescriptor, r as Artifact, t as AlchemyStateLayer, u as DeployedEntity, w as Lowering, x as LowerError } from "./app-config-aIrriqVU-Dpj1RqnY.mjs";
2
+ import "./deploy-BeBRB-6m.mjs";
3
3
  export { AlchemyStateLayer, ApplicationDescriptor, Artifact, AssembleInput, Bundle, DeployedEntity, DeployedNode, DeploymentResult, LowerContext, LowerError, LowerOptions, LoweredResult, Lowering, Outputs, PackageInput, ProvisionEdge, ProvisionerDescriptor, ServiceLowering, buildConfig, joinDeployment, lower, lowering, mergedProviders, resolveStateLayer };