@prisma/composer 0.34.0 → 0.35.0-dev.2

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 (79) hide show
  1. package/dist/{app-config-BBPLNnZX-DzU21TVb.d.mts → app-config-DR7ku-WW-Dun53zka.d.mts} +75 -20
  2. package/dist/app-config-DR7ku-WW-Dun53zka.d.mts.map +1 -0
  3. package/dist/config-5sq9lPhi.d.mts +1 -0
  4. package/dist/config.d.mts +2 -2
  5. package/dist/control.d.mts +55 -34
  6. package/dist/control.d.mts.map +1 -1
  7. package/dist/control.mjs +20 -4
  8. package/dist/control.mjs.map +1 -1
  9. package/dist/deploy-5sq9lPhi.d.mts +1 -0
  10. package/dist/deploy.d.mts +3 -3
  11. package/dist/deploy.mjs +28 -1
  12. package/dist/deploy.mjs.map +1 -1
  13. package/dist/{deployment-summary-0-0eGWjc-ClB8FXcN.mjs → deployment-summary-CDHdLtnO-DrE7GsHq.mjs} +2 -2
  14. package/dist/{deployment-summary-0-0eGWjc-ClB8FXcN.mjs.map → deployment-summary-CDHdLtnO-DrE7GsHq.mjs.map} +1 -1
  15. package/dist/{deployment-summary-p88NV5m5-Ci2FsDKX.d.mts → deployment-summary-p88NV5m5-Btf0R5T3.d.mts} +3 -3
  16. package/dist/{deployment-summary-p88NV5m5-Ci2FsDKX.d.mts.map → deployment-summary-p88NV5m5-Btf0R5T3.d.mts.map} +1 -1
  17. package/dist/{dev-current-vAfxVcnD-DNeLJavU.mjs → dev-current-8HfFCN7C-C8Ste3qf.mjs} +5 -5
  18. package/dist/dev-current-8HfFCN7C-C8Ste3qf.mjs.map +1 -0
  19. package/dist/{dist-D5tj8ZhD.mjs → dist-Xd2Pp_-u.mjs} +2 -2
  20. package/dist/dist-Xd2Pp_-u.mjs.map +1 -0
  21. package/dist/{execute-deploy-destroy-CdjqjHzw-DNOFEr5H.mjs → execute-deploy-destroy-DerNHILD-BStnE2yG.mjs} +58 -33
  22. package/dist/execute-deploy-destroy-DerNHILD-BStnE2yG.mjs.map +1 -0
  23. package/dist/{execute-dev-C75Y_wIa-CBsKvWvl.mjs → execute-dev-D_JvTKjS-BjlfRv3L.mjs} +167 -38
  24. package/dist/execute-dev-D_JvTKjS-BjlfRv3L.mjs.map +1 -0
  25. package/dist/{execute-dev-current-C0y1X-EE-D6I5h2_B.mjs → execute-dev-current-BRJkR4Y1-KETGQ-7f.mjs} +8 -6
  26. package/dist/execute-dev-current-BRJkR4Y1-KETGQ-7f.mjs.map +1 -0
  27. package/dist/{execute-log-Cwa9F3BR-fhYWYzQk.mjs → execute-log-kq4gyrh9-DjAlYz6O.mjs} +5 -5
  28. package/dist/{execute-log-Cwa9F3BR-fhYWYzQk.mjs.map → execute-log-kq4gyrh9-DjAlYz6O.mjs.map} +1 -1
  29. package/dist/{graph-C4If3c5e-CVij_XGB.d.mts → graph-BmTgCiFm-qR5hnhOZ.d.mts} +8 -3
  30. package/dist/graph-BmTgCiFm-qR5hnhOZ.d.mts.map +1 -0
  31. package/dist/{graph-BPLLRt2I-m78iETnF.mjs → graph-D0ICjejE-CeQtHY5B.mjs} +23 -13
  32. package/dist/graph-D0ICjejE-CeQtHY5B.mjs.map +1 -0
  33. package/dist/http.d.mts +1 -1
  34. package/dist/http.mjs +2 -2
  35. package/dist/{index-vUfxWpWf.d.mts → index-B-9Dc0J7.d.mts} +2 -2
  36. package/dist/{index-vUfxWpWf.d.mts.map → index-B-9Dc0J7.d.mts.map} +1 -1
  37. package/dist/index.d.mts +3 -3
  38. package/dist/index.mjs +3 -3
  39. package/dist/local-target.d.mts +1 -1
  40. package/dist/{nextjs-DLyeRR7M-Btfuot-v.d.mts → nextjs-DLyeRR7M-kVartQq-.d.mts} +2 -2
  41. package/dist/{nextjs-DLyeRR7M-Btfuot-v.d.mts.map → nextjs-DLyeRR7M-kVartQq-.d.mts.map} +1 -1
  42. package/dist/nextjs-control.d.mts +11 -5
  43. package/dist/nextjs-control.d.mts.map +1 -1
  44. package/dist/nextjs-control.mjs +50 -2
  45. package/dist/nextjs-control.mjs.map +1 -1
  46. package/dist/nextjs.d.mts +1 -1
  47. package/dist/node-control.d.mts +10 -4
  48. package/dist/node-control.d.mts.map +1 -1
  49. package/dist/node-control.mjs +20 -3
  50. package/dist/node-control.mjs.map +1 -1
  51. package/dist/node.d.mts +10 -1
  52. package/dist/node.d.mts.map +1 -1
  53. package/dist/node.mjs +12 -8
  54. package/dist/node.mjs.map +1 -1
  55. package/dist/{pipeline-Dpesfd2j-CD3W79W6.mjs → pipeline-BmWt-Nhb-D9Eg14Sx.mjs} +100 -21
  56. package/dist/pipeline-BmWt-Nhb-D9Eg14Sx.mjs.map +1 -0
  57. package/dist/report.d.mts +3 -3
  58. package/dist/report.mjs +3 -2
  59. package/dist/report.mjs.map +1 -1
  60. package/dist/{run-alchemy-BqHpStQn-sYiodM6y.mjs → run-alchemy-Dl_MWw4g-BZaLckHp.mjs} +2 -2
  61. package/dist/{run-alchemy-BqHpStQn-sYiodM6y.mjs.map → run-alchemy-Dl_MWw4g-BZaLckHp.mjs.map} +1 -1
  62. package/dist/{run-report-C2o98uD--AX8kpz4Q.mjs → run-report-CmBz2-xc-S50d4g5V.mjs} +5 -5
  63. package/dist/run-report-CmBz2-xc-S50d4g5V.mjs.map +1 -0
  64. package/dist/service-rpc.d.mts +1 -1
  65. package/dist/service-rpc.mjs +2 -2
  66. package/package.json +11 -11
  67. package/skills/prisma-composer-core-concepts/SKILL.md +126 -47
  68. package/dist/app-config-BBPLNnZX-DzU21TVb.d.mts.map +0 -1
  69. package/dist/config-CRHoX2Pq.d.mts +0 -1
  70. package/dist/deploy-CRHoX2Pq.d.mts +0 -1
  71. package/dist/dev-current-vAfxVcnD-DNeLJavU.mjs.map +0 -1
  72. package/dist/dist-D5tj8ZhD.mjs.map +0 -1
  73. package/dist/execute-deploy-destroy-CdjqjHzw-DNOFEr5H.mjs.map +0 -1
  74. package/dist/execute-dev-C75Y_wIa-CBsKvWvl.mjs.map +0 -1
  75. package/dist/execute-dev-current-C0y1X-EE-D6I5h2_B.mjs.map +0 -1
  76. package/dist/graph-BPLLRt2I-m78iETnF.mjs.map +0 -1
  77. package/dist/graph-C4If3c5e-CVij_XGB.d.mts.map +0 -1
  78. package/dist/pipeline-Dpesfd2j-CD3W79W6.mjs.map +0 -1
  79. package/dist/run-report-C2o98uD--AX8kpz4Q.mjs.map +0 -1
@@ -1,11 +1,11 @@
1
1
  import { B as ResourceNode, D as NodeId, I as ProvisionNeed, J as ServiceNode, i as Config, m as Graph, r as BuildAdapter, w as ModuleNode } from "./graph-types-Cegbwb_X-BU-H2pnt.mjs";
2
- import "./graph-C4If3c5e-CVij_XGB.mjs";
2
+ import "./graph-BmTgCiFm-qR5hnhOZ.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-BBPLNnZX.d.mts
8
+ //#region ../../0-framework/1-core/core/dist/app-config-DR7ku-WW.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
@@ -17,12 +17,12 @@ import { State } from "alchemy/State/State";
17
17
  * `deserializeContainers` reads each var back through the same extension's
18
18
  * descriptor. The framework owns the vars; it never reads their contents.
19
19
  */
20
- /** The key an extension resolves a container from: which app, which stage. */
20
+ /** The key an extension resolves a container from: which app, which environment. */
21
21
  interface LocateContainerInput {
22
22
  /** The application name (root node's name, or `--name`). */
23
23
  readonly appName: string;
24
- /** The USER-FACING stage name — `--stage <name>` as the user typed it (git-ref validated), or `undefined` for the default (production) stage. Alchemy's stage is the container's `alchemyStage` when supplied, with this value as the explicit-user-stage fallback; when neither exists, the CLI fails before Alchemy runs. */
25
- readonly stage: string | undefined;
24
+ /** The environment name, git-ref validated. Core never interprets it; the extension maps it onto its platform. */
25
+ readonly environment: string;
26
26
  }
27
27
  /**
28
28
  * One resolved container. The framework sees only this interface; the
@@ -31,7 +31,7 @@ interface LocateContainerInput {
31
31
  */
32
32
  interface ContainerInstance {
33
33
  readonly input: LocateContainerInput;
34
- /** The exact string the CLI hands `alchemy` as its stage — the deploy-state scope. Distinct from `input.stage`, the user-facing name: for Prisma Cloud this is the resolved Branch id (stable across renames, machine-independent). Framework-visible like `input` — NOT part of the `serialize()` payload, which stays extension-owned. */
34
+ /** The exact string the CLI hands `alchemy` as its stage — the deploy-state scope. Distinct from `input.environment`: for Prisma Cloud this is the resolved Branch id (stable across renames, machine-independent). Framework-visible like `input` — NOT part of the `serialize()` payload, which stays extension-owned. */
35
35
  readonly alchemyStage?: string | undefined;
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;
@@ -66,9 +66,9 @@ interface ContainerCredentials<C = unknown> {
66
66
  * fails (same rule as ServiceLowering<P, S> — ADR-0033).
67
67
  */
68
68
  interface ContainerDescriptor<I extends ContainerInstance = ContainerInstance, C = unknown> {
69
- /** Resolve the container for (appName, stage), creating anything absent. Called by `deploy`. */
69
+ /** Resolve the container for (appName, environment), creating anything absent. Called by `deploy`. */
70
70
  ensure(input: LocateContainerInput, credentials?: ContainerCredentials<C>): Promise<I>;
71
- /** Find the container for (appName, stage); `undefined` when nothing exists. Called by `destroy` — never creates. */
71
+ /** Find the container for (appName, environment); `undefined` when nothing exists. Called by `destroy` — never creates. */
72
72
  locate(input: LocateContainerInput, credentials?: ContainerCredentials<C>): Promise<I | undefined>;
73
73
  /** Remove the container after a successful destroy, after every extension's `teardown` has run. Failure policy is the extension's. */
74
74
  remove(instance: I, credentials?: ContainerCredentials<C>): Promise<void>;
@@ -118,6 +118,8 @@ interface ApplicationDescriptor {
118
118
  * derive from it and stay stable across redeploys.
119
119
  */
120
120
  interface ProvisionEdge {
121
+ /** The deployed app name: the first segment of every address. */
122
+ readonly app: string;
121
123
  readonly edgeId: string;
122
124
  readonly consumerAddress: string;
123
125
  readonly providerAddress: string;
@@ -162,6 +164,12 @@ interface ServiceLowering<P = unknown, S = unknown> {
162
164
  package(ctx: LowerContext, input: PackageInput): Effect.Effect<Artifact, unknown, unknown>;
163
165
  /** Ships the packaged artifact into the provisioned thing and runs it. Returns the node's outputs for dependents, plus the entities it became on the deployment target. */
164
166
  deploy(ctx: LowerContext, provisioned: P, artifact: Artifact, serialized: S): Effect.Effect<LoweredResult, unknown, unknown>;
167
+ /**
168
+ * Lowers the service without an artifact: the outputs and entities `deploy` returns, with no
169
+ * deployment behind them. Called in place of `package` and `deploy` for an address in
170
+ * `LowerOptions.unassembled` (ADR-0056). Optional: a descriptor without it cannot run a dev server.
171
+ */
172
+ reserve?(ctx: LowerContext, provisioned: P, serialized: S): Effect.Effect<LoweredResult, unknown, unknown>;
165
173
  }
166
174
  /** Input to an extension's package() step: the built bundle and the node's graph address. */
167
175
  interface PackageInput {
@@ -176,7 +184,7 @@ interface LowerContext {
176
184
  readonly id: NodeId;
177
185
  /**
178
186
  * The node's deployment address: its full, dot-joined hierarchical
179
- * position in the graph (e.g. "auth.api"). The config-key namespace and
187
+ * position in the graph, starting with the app name (e.g. "shop.auth.api"). The config-key namespace and
180
188
  * the bootstrap parameter.
181
189
  */
182
190
  readonly address: string;
@@ -273,6 +281,8 @@ interface LowerOptions {
273
281
  * declared at all.
274
282
  */
275
283
  readonly report?: (result: DeploymentResult) => void;
284
+ /** Addresses lowered without an artifact: `package` and `deploy` are skipped and `reserve` runs instead (ADR-0056). Only the dev stack file sets it. */
285
+ readonly unassembled?: readonly string[];
276
286
  }
277
287
  /** A build descriptor's normalized output: the produced bundle dir plus the app's runnable entry within it. */
278
288
  interface Bundle {
@@ -297,6 +307,28 @@ interface AssembleInput {
297
307
  /** Counts and labels this assemble measured, for the deploy's progress output. Core never reads them. */
298
308
  readonly report?: ((data: Readonly<Record<string, string | number>>) => void) | undefined;
299
309
  }
310
+ /** Input to a build descriptor's `serve` step (ADR-0056). */
311
+ interface ServeInput {
312
+ /** The service's build adapter declaration, as `assemble` receives it: paths relative to `dirname(build.module)`. */
313
+ readonly build: BuildAdapter;
314
+ /** The service's graph address, as `assemble` receives it. */
315
+ readonly address: string;
316
+ }
317
+ /** How a service runs in development: what its build adapter's `serve` step returns (ADR-0056). */
318
+ interface DevServer {
319
+ /** Absolute. The command's working directory. */
320
+ readonly cwd: string;
321
+ /**
322
+ * The command for the port and host the service is given. `argv[0]` is an absolute path, or a bare
323
+ * name the emulator resolves on the command's `PATH`. The same input always returns the same argv.
324
+ */
325
+ argv(input: {
326
+ readonly port: number;
327
+ readonly host: string;
328
+ }): readonly string[];
329
+ /** The command as the front door and `dev url` show it: `argv` without the port and host flags, joined by spaces. */
330
+ readonly display: string;
331
+ }
300
332
  /** package()'s product. */
301
333
  interface Artifact {
302
334
  readonly path: string;
@@ -384,7 +416,7 @@ interface ExtensionDescriptor {
384
416
  * Deploy-time prerequisite check — the CLI runs it once, after the app's
385
417
  * Project/Branch are resolved and BEFORE any stack file is written or Alchemy
386
418
  * runs. A target uses it to verify platform prerequisites (e.g. that every
387
- * secret env var in the provision manifest exists for the resolved stage) and
419
+ * secret env var in the provision manifest exists for the resolved environment) and
388
420
  * throws to abort the deploy. Async: it talks to the platform (ADR-0029).
389
421
  *
390
422
  * What it returns is carried to the alchemy process for this same extension
@@ -402,7 +434,7 @@ interface ExtensionDescriptor {
402
434
  preflight?(input: PreflightInput): Promise<PreflightPayload>;
403
435
  /**
404
436
  * Destroy-time cleanup — the CLI runs it once, after `alchemy destroy`
405
- * succeeds and BEFORE the stage's Project/Branch are removed. A target uses
437
+ * succeeds and BEFORE the environment's containers are removed. A target uses
406
438
  * it to remove infrastructure it owns outside the stack (e.g. the deploy
407
439
  * state store, which the destroy above was still reading). Throwing aborts
408
440
  * the destroy before the containers go; a target that would rather warn than
@@ -453,8 +485,8 @@ interface PreflightInput<C = unknown> {
453
485
  readonly graph: Graph;
454
486
  /** The calling extension's own resolved container; `undefined` when it declares no container descriptor. Narrow with the extension's guard. */
455
487
  readonly container: ContainerInstance | undefined;
456
- /** The stage name (`--stage`), or `undefined` for the default stage — for diagnostics/scope. */
457
- readonly stage: string | undefined;
488
+ /** The environment name. */
489
+ readonly environment: string;
458
490
  /** What the caller has already authenticated, for the platform calls preflight makes. Absent means the extension falls back to its own credential protocol. */
459
491
  readonly credentials?: ContainerCredentials<C> | undefined;
460
492
  /** Hands the deploy's progress output what the check covered, as counts (e.g. `{ checked: 53, filled: 0, missing: 0 }`). Counts only: never a name or a value. */
@@ -464,8 +496,8 @@ interface PreflightInput<C = unknown> {
464
496
  interface TeardownInput {
465
497
  /** The calling extension's own resolved container; `undefined` when it declares no container descriptor. Narrow with the extension's guard. */
466
498
  readonly container: ContainerInstance | undefined;
467
- /** The stage name (`--stage`), or `undefined` for the default stage — for diagnostics/scope. */
468
- readonly stage: string | undefined;
499
+ /** The environment name. */
500
+ readonly environment: string;
469
501
  }
470
502
  /** The deploy context handed to `ReporterDescriptor.begin`. `C` erases to `unknown` at the framework boundary, exactly as on `PreflightInput`. */
471
503
  interface ReportBeginInput<C = unknown> {
@@ -479,8 +511,8 @@ interface ReportBeginInput<C = unknown> {
479
511
  * loaded (a breaking addition to this published type).
480
512
  */
481
513
  readonly graph: Graph;
482
- /** The stage name (`--stage`), or `undefined` for the default stage. */
483
- readonly stage: string | undefined;
514
+ /** The environment name. */
515
+ readonly environment: string;
484
516
  /** The directory the deploy command was run from — where a reporter reads repository metadata. */
485
517
  readonly cwd: string;
486
518
  /**
@@ -604,6 +636,8 @@ type LocalNodeLocation = {
604
636
  readonly condition: LocalNodeCondition;
605
637
  /** Where the node's own output is written, when the target keeps it in a file. */
606
638
  readonly logPath?: string;
639
+ /** The argv the node runs in place of an artifact, when it runs its build adapter's dev server (ADR-0056). */
640
+ readonly command?: readonly string[];
607
641
  } | {
608
642
  readonly address: string;
609
643
  readonly kind: string;
@@ -646,13 +680,27 @@ interface LocalTargetAttachment {
646
680
  readonly address: string;
647
681
  readonly url: string;
648
682
  }[]>;
649
- /** Merged, line-oriented log stream across the app's services (including services that appear after later converges). `opts.tail` is how many trailing lines of existing history to emit before live output (default 0 — live only). Ends when `signal` aborts. */
683
+ /** Merged, line-oriented log stream across the app's services (including services that appear after later converges). `opts.tail` is how many trailing lines of existing history to emit before live output (default 0 — live only). `opts.addresses`, when given, follows only those services. Ends when `signal` aborts. */
650
684
  logs(signal: AbortSignal, opts?: {
651
685
  readonly tail?: number;
686
+ readonly addresses?: readonly string[];
652
687
  }): AsyncIterable<{
653
688
  readonly service: string;
654
689
  readonly line: string;
655
690
  }>;
691
+ /**
692
+ * Runs a command on the service's instance in place of its artifact, with the environment the
693
+ * service's deployment would get. Returns once the command accepts connections on the instance's
694
+ * port. `restarted` is whether a process was started; an unchanged command already running is
695
+ * left alone (ADR-0056). Optional: a target without it cannot run a dev server.
696
+ */
697
+ serve?(input: {
698
+ readonly address: string;
699
+ readonly node: ServiceNode;
700
+ readonly server: DevServer;
701
+ }): Promise<{
702
+ readonly restarted: boolean;
703
+ }>;
656
704
  /** Stop everything the target runs for the app, so nothing of it keeps running after the session (emulators and data persist). */
657
705
  stopApp(): Promise<void>;
658
706
  }
@@ -679,6 +727,11 @@ type NodeDescriptor = ({
679
727
  } & ServiceLowering) | {
680
728
  readonly kind: 'build';
681
729
  assemble(input: AssembleInput): Promise<Bundle>;
730
+ /**
731
+ * How this app runs in development, or `undefined` when it has no dev server and is assembled instead.
732
+ * Never spawns anything: it resolves paths and binaries and returns data (ADR-0056).
733
+ */
734
+ serve?(input: ServeInput): Promise<DevServer | undefined>;
682
735
  };
683
736
  /**
684
737
  * The config file's default export. `extensions` lists every extension the
@@ -686,11 +739,13 @@ type NodeDescriptor = ({
686
739
  * platform-agnostic, never defaulted by an extension.
687
740
  */
688
741
  interface PrismaAppConfig {
742
+ /** The module whose default export is the app root, relative to `prisma.config.ts`. `--entry` overrides it. */
743
+ readonly entry?: string;
689
744
  readonly extensions: ExtensionDescriptor[];
690
745
  readonly state: StateDescriptor;
691
746
  }
692
747
  /** Typed identity — exists so the `composer` section of `prisma.config.ts` gets checked against PrismaAppConfig where it is written. */
693
748
  declare function defineConfig(config: PrismaAppConfig): PrismaAppConfig;
694
749
  //#endregion
695
- export { lower as $, NodeDescriptor as A, ReporterDescriptor as B, LocalTargetProvidersInput as C, LowerOptions as D, LowerError as E, PrismaAppConfig as F, TeardownInput as G, RunReporter as H, ProvisionEdge as I, containerEnvVarName as J, buildConfig as K, ProvisionerDescriptor as L, PackageInput as M, PreflightInput as N, LoweredResult as O, PreflightPayload as P, joinDeployment as Q, ReportAttachInput as R, LocalTargetEmulatorsInput as S, LowerContext as T, ServiceLowering as U, RunOutcome as V, StateDescriptor as W, deserializeContainers as X, defineConfig as Y, isBuildOnlyExtension as Z, LocalTargetAttachInput as _, Bundle as a, resolveStateLayer as at, LocalTargetCurrentInput as b, ContainerInstance as c, DeployedNode as d, lowering as et, DeploymentResult as f, LocalNodeStopped as g, LocalNodeLocation as h, AssembleInput as i, readPreflightPayload as it, Outputs as j, Lowering as k, DEV_DIR as l, LocalNodeCondition as m, ApplicationDescriptor as n, preflightEnv as nt, ContainerCredentials as o, ExtensionDescriptor as p, containerEnv as q, Artifact as r, preflightEnvVarName as rt, ContainerDescriptor as s, AlchemyStateLayer as t, mergedProviders as tt, DeployedEntity as u, LocalTargetAttachment as v, LocateContainerInput as w, LocalTargetDescriptor as x, LocalTargetCurrentApp as y, ReportBeginInput as z };
696
- //# sourceMappingURL=app-config-BBPLNnZX-DzU21TVb.d.mts.map
750
+ export { isBuildOnlyExtension as $, Lowering as A, ReportBeginInput as B, LocalTargetEmulatorsInput as C, LowerError as D, LowerContext as E, PreflightPayload as F, ServiceLowering as G, RunOutcome as H, PrismaAppConfig as I, buildConfig as J, StateDescriptor as K, ProvisionEdge as L, Outputs as M, PackageInput as N, LowerOptions as O, PreflightInput as P, deserializeContainers as Q, ProvisionerDescriptor as R, LocalTargetDescriptor as S, LocateContainerInput as T, RunReporter as U, ReporterDescriptor as V, ServeInput as W, containerEnvVarName as X, containerEnv as Y, defineConfig as Z, LocalNodeStopped as _, Bundle as a, preflightEnvVarName as at, LocalTargetCurrentApp as b, ContainerInstance as c, DeployedNode as d, joinDeployment as et, DeploymentResult as f, LocalNodeLocation as g, LocalNodeCondition as h, AssembleInput as i, preflightEnv as it, NodeDescriptor as j, LoweredResult as k, DEV_DIR as l, ExtensionDescriptor as m, ApplicationDescriptor as n, lowering as nt, ContainerCredentials as o, readPreflightPayload as ot, DevServer as p, TeardownInput as q, Artifact as r, mergedProviders as rt, ContainerDescriptor as s, resolveStateLayer as st, AlchemyStateLayer as t, lower as tt, DeployedEntity as u, LocalTargetAttachInput as v, LocalTargetProvidersInput as w, LocalTargetCurrentInput as x, LocalTargetAttachment as y, ReportAttachInput as z };
751
+ //# sourceMappingURL=app-config-DR7ku-WW-Dun53zka.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-config-DR7ku-WW-Dun53zka.d.mts","names":[],"sources":["../../../0-framework/1-core/core/dist/app-config-DR7ku-WW.d.mts"],"mappings":"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"}
@@ -0,0 +1 @@
1
+ import "./app-config-DR7ku-WW-Dun53zka.mjs";
package/dist/config.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { A as NodeDescriptor, B as ReporterDescriptor, C as LocalTargetProvidersInput, F as PrismaAppConfig, G as TeardownInput, H as RunReporter, J as containerEnvVarName, N as PreflightInput, P as PreflightPayload, R as ReportAttachInput, S as LocalTargetEmulatorsInput, V as RunOutcome, W as StateDescriptor, X as deserializeContainers, Y as defineConfig, Z as isBuildOnlyExtension, _ as LocalTargetAttachInput, b as LocalTargetCurrentInput, c as ContainerInstance, g as LocalNodeStopped, h as LocalNodeLocation, it as readPreflightPayload, l as DEV_DIR, m as LocalNodeCondition, nt as preflightEnv, o as ContainerCredentials, p as ExtensionDescriptor, q as containerEnv, rt as preflightEnvVarName, s as ContainerDescriptor, u as DeployedEntity, v as LocalTargetAttachment, w as LocateContainerInput, x as LocalTargetDescriptor, y as LocalTargetCurrentApp, z as ReportBeginInput } from "./app-config-BBPLNnZX-DzU21TVb.mjs";
2
- import "./config-CRHoX2Pq.mjs";
1
+ import { $ as isBuildOnlyExtension, B as ReportBeginInput, C as LocalTargetEmulatorsInput, F as PreflightPayload, H as RunOutcome, I as PrismaAppConfig, K as StateDescriptor, P as PreflightInput, Q as deserializeContainers, S as LocalTargetDescriptor, T as LocateContainerInput, U as RunReporter, V as ReporterDescriptor, X as containerEnvVarName, Y as containerEnv, Z as defineConfig, _ as LocalNodeStopped, at as preflightEnvVarName, b as LocalTargetCurrentApp, c as ContainerInstance, g as LocalNodeLocation, h as LocalNodeCondition, it as preflightEnv, j as NodeDescriptor, l as DEV_DIR, m as ExtensionDescriptor, o as ContainerCredentials, ot as readPreflightPayload, q as TeardownInput, s as ContainerDescriptor, u as DeployedEntity, v as LocalTargetAttachInput, w as LocalTargetProvidersInput, x as LocalTargetCurrentInput, y as LocalTargetAttachment, z as ReportAttachInput } from "./app-config-DR7ku-WW-Dun53zka.mjs";
2
+ import "./config-5sq9lPhi.mjs";
3
3
  export { type ContainerCredentials, type ContainerDescriptor, type ContainerInstance, DEV_DIR, type DeployedEntity, ExtensionDescriptor, LocalNodeCondition, LocalNodeLocation, LocalNodeStopped, LocalTargetAttachInput, LocalTargetAttachment, LocalTargetCurrentApp, LocalTargetCurrentInput, LocalTargetDescriptor, LocalTargetEmulatorsInput, LocalTargetProvidersInput, type LocateContainerInput, NodeDescriptor, PreflightInput, type PreflightPayload, PrismaAppConfig, ReportAttachInput, ReportBeginInput, ReporterDescriptor, RunOutcome, RunReporter, StateDescriptor, TeardownInput, containerEnv, containerEnvVarName, defineConfig, deserializeContainers, isBuildOnlyExtension, preflightEnv, preflightEnvVarName, readPreflightPayload };
@@ -1,9 +1,19 @@
1
1
  import { gt as CliStructuredError } from "./graph-types-Cegbwb_X-BU-H2pnt.mjs";
2
- import { F as PrismaAppConfig } from "./app-config-BBPLNnZX-DzU21TVb.mjs";
3
- import "./config-CRHoX2Pq.mjs";
4
- import "./deploy-CRHoX2Pq.mjs";
5
- import { n as DeploymentSummary, t as DeployedNodeSummary } from "./deployment-summary-p88NV5m5-Ci2FsDKX.mjs";
6
- import "./index-vUfxWpWf.mjs";
2
+ import { I as PrismaAppConfig } from "./app-config-DR7ku-WW-Dun53zka.mjs";
3
+ import "./config-5sq9lPhi.mjs";
4
+ import "./index-B-9Dc0J7.mjs";
5
+ import "./deploy-5sq9lPhi.mjs";
6
+ import { n as DeploymentSummary, t as DeployedNodeSummary } from "./deployment-summary-p88NV5m5-Btf0R5T3.mjs";
7
+ //#region ../../0-framework/3-tooling/cli/dist/composer-config-BJrPWlDx.d.mts
8
+ //#region src/composer-config.d.ts
9
+ /** Composer's configuration and the `prisma.config.ts` that declares it. */
10
+ interface ComposerConfigSource {
11
+ /** The `composer` section: the `composer` property of that file's default export. */
12
+ readonly value: PrismaAppConfig;
13
+ /** The declaring `prisma.config.ts`. The deploy's generated stack file imports it. A relative path resolves against the operation's `cwd`. */
14
+ readonly file: string;
15
+ }
16
+ //#endregion
7
17
  //#region ../../0-framework/0-foundation/foundation/dist/result.d.mts
8
18
  //#region src/result.d.ts
9
19
  /**
@@ -32,15 +42,7 @@ interface NotOk<F> {
32
42
  */
33
43
  type Result<T, F> = Ok<T> | NotOk<F>;
34
44
  //#endregion
35
- //#region ../../0-framework/3-tooling/cli/dist/dev-current-L2Eto4fR.d.mts
36
- //#region src/composer-config.d.ts
37
- /** Composer's configuration and the `prisma.config.ts` that declares it. */
38
- interface ComposerConfigSource {
39
- /** The `composer` section: the `composer` property of that file's default export. */
40
- readonly value: PrismaAppConfig;
41
- /** The declaring `prisma.config.ts`. The deploy's generated stack file imports it. A relative path resolves against the operation's `cwd`. */
42
- readonly file: string;
43
- }
45
+ //#region ../../0-framework/3-tooling/cli/dist/dev-current-BApQuViv.d.mts
44
46
  //#endregion
45
47
  //#region src/operations/shared.d.ts
46
48
  /** A running service's dotted address plus its local URL — what `dev` reports
@@ -48,6 +50,8 @@ interface ComposerConfigSource {
48
50
  interface ServiceEndpoint {
49
51
  readonly address: string;
50
52
  readonly url: string;
53
+ /** The dev server the service runs in place of its artifact, as its build adapter displays it (`next dev`) — absent for a service that runs its artifact (ADR-0056). */
54
+ readonly devServer?: string;
51
55
  }
52
56
  /**
53
57
  * Where a failed execution left its artifacts — details of the CURRENT
@@ -99,12 +103,12 @@ interface DeployInput {
99
103
  * Composer's configuration: the `composer` section of `prisma.config.ts` and that file. The operation does not look for a config file; it refuses a section the CLI would refuse, before any work starts.
100
104
  */
101
105
  readonly config: ComposerConfigSource;
102
- /** Path to the entry module, resolved against `cwd` — same contract as `prisma deploy <entry>`. */
103
- readonly entry: string;
106
+ /** The entry module, resolved against `cwd`. Overrides the `entry` in `config`; without either the operation fails with `CONFIG.ENTRY_MISSING`. */
107
+ readonly entry?: string | undefined;
104
108
  /** Override the root node's name (the `--name` flag's slot). */
105
109
  readonly name?: string | undefined;
106
- /** Target stage. ABSENT = production — bare deploy targets production (main.ts effectiveStage). */
107
- readonly stage?: string | undefined;
110
+ /** The environment to deploy to. Defaults to `production`. */
111
+ readonly environment?: string | undefined;
108
112
  /** Defaults to process.cwd(); the directory `.prisma-composer/` and `.alchemy` state live under. */
109
113
  readonly cwd?: string | undefined;
110
114
  /**
@@ -118,7 +122,7 @@ interface DeployInput {
118
122
  * An existing report record this deploy belongs to — the `--build-id` flag's
119
123
  * slot. A CI job that opens the record before invoking Composer passes the
120
124
  * id here, and the target's reporter joins that record instead of creating
121
- * one. Absent falls back to whatever the target reads from the environment.
125
+ * one. Absent falls back to whatever the target reads from environment variables.
122
126
  */
123
127
  readonly reportId?: string | undefined;
124
128
  /** Each step as it starts and finishes, in real time. Rendering is the host's. */
@@ -162,6 +166,25 @@ type DevEvent =
162
166
  readonly stackFilePath: string;
163
167
  readonly reproduceCommand: string;
164
168
  readonly cwd: string;
169
+ } |
170
+ /** Once per service that runs its build adapter's dev server, before the first converge (ADR-0056). `cwd` is absolute. */
171
+ {
172
+ readonly kind: 'dev-server';
173
+ readonly address: string;
174
+ readonly command: string;
175
+ readonly cwd: string;
176
+ } |
177
+ /** A reconverge changed a dev server's environment, so the emulator restarted it. */
178
+ {
179
+ readonly kind: 'dev-server-restarted';
180
+ readonly address: string;
181
+ readonly command: string;
182
+ } |
183
+ /** One line a dev server wrote, while the session runs. */
184
+ {
185
+ readonly kind: 'dev-server-output';
186
+ readonly address: string;
187
+ readonly line: string;
165
188
  } | {
166
189
  readonly kind: 'stopping';
167
190
  } |
@@ -177,7 +200,8 @@ interface DevInput {
177
200
  * Composer's configuration: the `composer` section of `prisma.config.ts` and that file. The operation does not look for a config file; it refuses a section the CLI would refuse, before any work starts.
178
201
  */
179
202
  readonly config: ComposerConfigSource;
180
- readonly entry: string;
203
+ /** The entry module, resolved against `cwd`. Overrides the `entry` in `config`; without either the operation fails with `CONFIG.ENTRY_MISSING`. */
204
+ readonly entry?: string | undefined;
181
205
  readonly name?: string | undefined;
182
206
  readonly fresh?: boolean | undefined;
183
207
  /**
@@ -220,6 +244,8 @@ interface DevUrl {
220
244
  readonly url: string;
221
245
  /** Always `running`: a node that is not running is a failure. */
222
246
  readonly state: string;
247
+ /** `"dev-server"` when a service runs its build adapter's dev server, `"artifact"` for every other service; absent for a database or bucket (ADR-0056). */
248
+ readonly runs?: 'artifact' | 'dev-server';
223
249
  }
224
250
  interface DevStopInput {
225
251
  readonly config: ComposerConfigSource;
@@ -242,13 +268,6 @@ declare function devStop(input: DevStopInput): Promise<Result<DevStopped, CliStr
242
268
  //#endregion
243
269
  //#region ../../0-framework/3-tooling/cli/dist/control.d.mts
244
270
  //#region src/operations/destroy.d.ts
245
- /** Destroy must name its target explicitly — no silent default to production. Encoded, not re-derived from flags. */
246
- type DestroyTarget = {
247
- readonly kind: 'production';
248
- } | {
249
- readonly kind: 'stage';
250
- readonly stage: string;
251
- };
252
271
  type DestroyEvent =
253
272
  /** Emitted before the pipeline when `<cwd>/.alchemy` is missing/empty. */
254
273
  {
@@ -260,9 +279,11 @@ interface DestroyInput {
260
279
  * Composer's configuration: the `composer` section of `prisma.config.ts` and that file. The operation does not look for a config file; it refuses a section the CLI would refuse, before any work starts.
261
280
  */
262
281
  readonly config: ComposerConfigSource;
263
- readonly entry: string;
282
+ /** The entry module, resolved against `cwd`. Overrides the `entry` in `config`; without either the operation fails with `CONFIG.ENTRY_MISSING`. */
283
+ readonly entry?: string | undefined;
264
284
  readonly name?: string | undefined;
265
- readonly target: DestroyTarget;
285
+ /** The environment to destroy. Required: destroy never defaults to production. */
286
+ readonly environment: string;
266
287
  readonly cwd?: string | undefined;
267
288
  /** Mid-operation notifications, in real time. Rendering is the host's. */
268
289
  readonly onEvent?: ((event: DestroyEvent) => void) | undefined;
@@ -292,7 +313,8 @@ interface LogInput {
292
313
  * `log` reads only the section; it takes the same input as the other operations so a host builds it once.
293
314
  */
294
315
  readonly config: ComposerConfigSource;
295
- readonly entry: string;
316
+ /** The entry module, resolved against `cwd`. Overrides the `entry` in `config`; without either the operation fails with `CONFIG.ENTRY_MISSING`. */
317
+ readonly entry?: string | undefined;
296
318
  readonly name?: string | undefined;
297
319
  /** Restrict to one service's dotted address; validated against running services. */
298
320
  readonly address?: string | undefined;
@@ -316,7 +338,7 @@ declare function log(input: LogInput): Promise<Result<LogAttached, CliStructured
316
338
  //#endregion
317
339
  //#region src/run-report.d.ts
318
340
  /** Bump when a change would break a consumer that reads the current shape. */
319
- declare const RUN_REPORT_VERSION = 1;
341
+ declare const RUN_REPORT_VERSION = 2;
320
342
  /** Names the file to write the run report to, when `--report` is not passed. */
321
343
  declare const RUN_REPORT_FILE_ENV = "PRISMA_COMPOSER_REPORT_FILE";
322
344
  interface RunReportFailure {
@@ -334,11 +356,10 @@ interface RunReport {
334
356
  readonly outcome: 'succeeded' | 'failed';
335
357
  /** Null when the run failed before it produced a deployment summary. */
336
358
  readonly app: string | null;
337
- /** Null for the default stage. */
338
- readonly stage: string | null;
359
+ readonly environment: string;
339
360
  readonly nodes: readonly DeployedNodeSummary[];
340
361
  readonly failure: RunReportFailure | null;
341
362
  }
342
363
  //#endregion
343
- export { type CliStructuredError, type ComposerConfigSource, type DeployEvent, type DeployInput, type DeployStep, type DeploySuccess, type DeployedNodeSummary, type DeploymentSummary, type DestroyEvent, type DestroyInput, type DestroyTarget, type DevEvent, type DevInput, type DevSession, type DevStopInput, type DevStopped, type DevUrl, type DevUrlInput, type ExecutionDiagnostics, type LogAttached, type LogEvent, type LogInput, type LogLine, type NotOk, type Ok, RUN_REPORT_FILE_ENV, RUN_REPORT_VERSION, type Result, type RunReport, type RunReportFailure, type ServiceEndpoint, deploy, destroy, dev, devStop, devUrl, executionDiagnostics, log };
364
+ export { type CliStructuredError, type ComposerConfigSource, type DeployEvent, type DeployInput, type DeployStep, type DeploySuccess, type DeployedNodeSummary, type DeploymentSummary, type DestroyEvent, type DestroyInput, type DevEvent, type DevInput, type DevSession, type DevStopInput, type DevStopped, type DevUrl, type DevUrlInput, type ExecutionDiagnostics, type LogAttached, type LogEvent, type LogInput, type LogLine, type NotOk, type Ok, RUN_REPORT_FILE_ENV, RUN_REPORT_VERSION, type Result, type RunReport, type RunReportFailure, type ServiceEndpoint, deploy, destroy, dev, devStop, devUrl, executionDiagnostics, log };
344
365
  //# sourceMappingURL=control.d.mts.map
@@ -1 +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/dev-current-L2Eto4fR.d.mts","../../../0-framework/3-tooling/cli/dist/control.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;;;;;UCjBxB;;WAEC,OAAO;;WAEP;;;;;;UA4ED;WACC;WACA;;;;;;;;;;UA0CD;;;WAGC;;;;WAIA;WACA;WACA;WACA;;;;;;iBAMM,qBAAqB,GAAG,qBAAqB;;;;KAIzD;WACM;;WAEA;WACA;;KAEN;WACM;WACA,MAAM;;WAEN;WACA,MAAM;WACN;WACA;;WAEA,OAAO,SAAS;;UAEjB;;;;WAIC,QAAQ;;WAER;;WAEA;;WAEA;;WAEA;;;;;;;WAOA;;;;;;;WAOA;;WAEA,YAAY,OAAO;;UAEpB;;;WAGC,SAAS;;WAET;;iBAEM,OAAO,OAAO,cAAc,QAAQ,OAAO,eAAe;;;KAOtE;;;WAGM;WACA,oBAAoB;;WAEpB;WACA;;WAEA;WACA;;;;WAIA;WACA;;;;WAIA;WACA;;;;WAIA;WACA;WACA;WACA;;WAEA;;;;WAIA;WACA;;WAEA;;UAED;;;;WAIC,QAAQ;WACR;WACA;WACA;;;;;;WAMA;WACA;WACA,YAAY,OAAO;;;;;UAKpB;;WAEC,oBAAoB;;;EAG7B,QAAQ;;WAEC,QAAQ;;iBAEF,IAAI,OAAO,WAAW,QAAQ,OAAO,YAAY;;;UAOxD;;WAEC,QAAQ;;WAER;;WAEA;;UAED;WACC;;WAEA;;WAEA;;WAEA;;UAED;WACC,QAAQ;;WAER;;UAED;;WAEC;;WAEA;aACE;aACA;;;;iBAII,OAAO,OAAO,cAAc,QAAQ,OAAO,QAAQ;;iBAEnD,QAAQ,OAAO,eAAe,QAAQ,OAAO,YAAY;;;;;KCxTrE;WACM;;WAEA;WACA;;KAEN;;;WAGM;WACA;;UAED;;;;WAIC,QAAQ;WACR;WACA;WACA,QAAQ;WACR;;WAEA,YAAY,OAAO;;iBAEb,QAAQ,OAAO,eAAe,QAAQ,aAAe;;;UAG5D;WACC;WACA;;KAEN;;;WAGM;WACA;;;;;WAKA;WACA;;UAED;;;;;WAKC,QAAQ;WACR;WACA;;WAEA;;WAEA;WACA;;WAEA,SAAS;WACT,YAAY,OAAO;;UAEpB;;WAEC;;;WAGA,mBAAmB;;WAEnB,OAAO,cAAc;;iBAEf,IAAI,OAAO,WAAW,QAAQ,OAAS,aAAa;;;;cAIvD;;cAEA;UACJ;;WAEC;WACA;;;;;;;UAOD;WACC;WACA;;WAEA;;WAEA;WACA,gBAAgB;WAChB,SAAS"}
1
+ {"version":3,"file":"control.d.mts","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/composer-config-BJrPWlDx.d.mts","../../../0-framework/0-foundation/foundation/dist/result.d.mts","../../../0-framework/3-tooling/cli/dist/dev-current-BApQuViv.d.mts","../../../0-framework/3-tooling/cli/dist/control.d.mts"],"mappings":";;;;;;;;;UAGU;;WAEC,OAAO;;WAEP;;;;;;;;UCHD,GAAG;WACF;WACA,OAAO;EAChB,YAAY;EACZ;;;;;UAKQ,MAAM;WACL;WACA,SAAS;EAClB;EACA,eAAe;;;;;;;;KAQZ,OAAO,GAAG,KAAK,GAAG,KAAK,MAAM;;;;;;;UCwDxB;WACC;WACA;;WAEA;;;;;;;;;;UA0CD;;;WAGC;;;;WAIA;WACA;WACA;WACA;;;;;;iBAMM,qBAAqB,GAAG,qBAAqB;;;;KAIzD;WACM;;WAEA;WACA;;KAEN;WACM;WACA,MAAM;;WAEN;WACA,MAAM;WACN;WACA;;WAEA,OAAO,SAAS;;UAIjB;;;;WAIC,QAAQ;;WAER;;WAEA;;WAEA;;WAEA;;;;;;;WAOA;;;;;;;WAOA;;WAEA,YAAY,OAAO;;UAEpB;;;WAGC,SAAS;;WAET;;iBAEM,OAAO,OAAO,cAAc,QAAQ,OAAO,eAAe;;;KAOtE;;;WAGM;WACA,oBAAoB;;WAEpB;WACA;;WAEA;WACA;;;;WAIA;WACA;;;;WAIA;WACA;;;;WAIA;WACA;WACA;WACA;;;;WAIA;WACA;WACA;WACA;;;;WAIA;WACA;WACA;;;;WAIA;WACA;WACA;;WAEA;;;;WAIA;WACA;;WAEA;;UAED;;;;WAIC,QAAQ;;WAER;WACA;WACA;;;;;;WAMA;WACA;WACA,YAAY,OAAO;;;;;UAKpB;;WAEC,oBAAoB;;;EAG7B,QAAQ;;WAEC,QAAQ;;iBAEF,IAAI,OAAO,WAAW,QAAQ,OAAO,YAAY;;;UAOxD;;WAEC,QAAQ;;WAER;;WAEA;;UAED;WACC;;WAEA;;WAEA;;WAEA;;WAEA;;UAED;WACC,QAAQ;;WAER;;UAED;;WAEC;;WAEA;aACE;aACA;;;;iBAII,OAAO,OAAO,cAAc,QAAQ,OAAO,QAAQ;;iBAEnD,QAAQ,OAAO,eAAe,QAAQ,OAAO,YAAY;;;;KC7UrE;;;WAGM;WACA;;UAED;;;;WAIC,QAAQ;;WAER;WACA;;WAEA;WACA;;WAEA,YAAY,OAAO;;iBAEb,QAAQ,OAAO,eAAe,QAAQ,aAAe;;;UAG5D;WACC;WACA;;KAEN;;;WAGM;WACA;;;;;WAKA;WACA;;UAED;;;;;WAKC,QAAQ;;WAER;WACA;;WAEA;;WAEA;WACA;;WAEA,SAAS;WACT,YAAY,OAAO;;UAEpB;;WAEC;;;WAGA,mBAAmB;;WAEnB,OAAO,cAAc;;iBAEf,IAAI,OAAO,WAAW,QAAQ,OAAS,aAAa;;;;cAIvD;;cAEA;UACJ;;WAEC;WACA;;;;;;;UAOD;WACC;WACA;;WAEA;WACA;WACA,gBAAgB;WAChB,SAAS"}
package/dist/control.mjs CHANGED
@@ -1,6 +1,15 @@
1
- import { a as executionDiagnostics, c as notOk, i as devUrl, n as dev, o as executorLoadFailure, r as devStop, t as deploy } from "./dev-current-vAfxVcnD-DNeLJavU.mjs";
2
- import { n as RUN_REPORT_VERSION, t as RUN_REPORT_FILE_ENV } from "./run-report-C2o98uD--AX8kpz4Q.mjs";
1
+ import { t as CliStructuredError } from "./errors-0e8IVwzi.mjs";
2
+ import { a as executionDiagnostics, c as notOk, i as devUrl, n as dev, o as executorLoadFailure, r as devStop, t as deploy } from "./dev-current-8HfFCN7C-C8Ste3qf.mjs";
3
+ import { n as RUN_REPORT_VERSION, t as RUN_REPORT_FILE_ENV } from "./run-report-CmBz2-xc-S50d4g5V.mjs";
3
4
  //#region ../../0-framework/3-tooling/cli/dist/control.mjs
5
+ /**
6
+ * The programmatic `destroy` operation (`@prisma/composer/control`): typed
7
+ * input, structured result, no argv, no console, no process.exit. No CLI
8
+ * command wraps it. The executor
9
+ * loads lazily, so importing this module executes nothing; an executor that
10
+ * fails to load comes back as a structured failure, never a throw out of
11
+ * the host.
12
+ */
4
13
  async function destroy(input) {
5
14
  return destroyWithDeps(input, {});
6
15
  }
@@ -8,15 +17,22 @@ async function destroy(input) {
8
17
  * Deliberately NOT re-exported through `./control` — the seam mirrors
9
18
  * internal types and is not part of the published surface. */
10
19
  async function destroyWithDeps(input, deps) {
20
+ if (typeof input.environment !== "string" || input.environment.length === 0) return notOk(environmentRequired());
11
21
  const cwd = input.cwd ?? process.cwd();
12
22
  let executor;
13
23
  try {
14
- executor = await import("./execute-deploy-destroy-CdjqjHzw-DNOFEr5H.mjs");
24
+ executor = await import("./execute-deploy-destroy-DerNHILD-BStnE2yG.mjs");
15
25
  } catch (error) {
16
26
  return notOk(executorLoadFailure("destroy", error));
17
27
  }
18
28
  return executor.executeDestroy(input, deps, cwd);
19
29
  }
30
+ function environmentRequired() {
31
+ return new CliStructuredError("DEPLOY.ENVIRONMENT_REQUIRED", "destroy needs the name of the environment to destroy.", {
32
+ why: "Destroy never defaults to production, so a call without a name has no target.",
33
+ fix: "Pass `environment`, for example `destroy({ environment: 'staging', config })`."
34
+ });
35
+ }
20
36
  async function log(input) {
21
37
  return logWithDeps(input, {});
22
38
  }
@@ -27,7 +43,7 @@ async function logWithDeps(input, deps) {
27
43
  const cwd = input.cwd ?? process.cwd();
28
44
  let executor;
29
45
  try {
30
- executor = await import("./execute-log-Cwa9F3BR-fhYWYzQk.mjs");
46
+ executor = await import("./execute-log-kq4gyrh9-DjAlYz6O.mjs");
31
47
  } catch (error) {
32
48
  return notOk(executorLoadFailure("log", error));
33
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"control.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/control.mjs"],"sourcesContent":["import { a as deploy, c as executorLoadFailure, n as devUrl, r as dev, s as executionDiagnostics, t as devStop } from \"./dev-current-vAfxVcnD.mjs\";\nimport { n as RUN_REPORT_VERSION, t as RUN_REPORT_FILE_ENV } from \"./run-report-C2o98uD-.mjs\";\nimport { notOk } from \"@internal/foundation/result\";\n//#region src/operations/destroy.ts\nasync function destroy(input) {\n\treturn destroyWithDeps(input, {});\n}\n/** In-package variant threading the injection seam, for the unit tests.\n* 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-CdjqjHzw.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"destroy\", error));\n\t}\n\treturn executor.executeDestroy(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, for the unit tests.\n* 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-Cwa9F3BR.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"log\", error));\n\t}\n\treturn executor.executeLog(input, deps, cwd);\n}\n//#endregion\nexport { RUN_REPORT_FILE_ENV, RUN_REPORT_VERSION, deploy, destroy, dev, devStop, devUrl, executionDiagnostics, log };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;AAIA,eAAe,QAAQ,OAAO;CAC7B,OAAO,gBAAgB,OAAO,CAAC,CAAC;AACjC;;;;AAIA,eAAe,gBAAgB,OAAO,MAAM;CAC3C,MAAM,MAAM,MAAM,OAAO,QAAQ,IAAI;CACrC,IAAI;CACJ,IAAI;EACH,WAAW,MAAM,OAAO;CACzB,SAAS,OAAO;EACf,OAAO,MAAM,oBAAoB,WAAW,KAAK,CAAC;CACnD;CACA,OAAO,SAAS,eAAe,OAAO,MAAM,GAAG;AAChD;AAGA,eAAe,IAAI,OAAO;CACzB,OAAO,YAAY,OAAO,CAAC,CAAC;AAC7B;;;;AAIA,eAAe,YAAY,OAAO,MAAM;CACvC,MAAM,MAAM,MAAM,OAAO,QAAQ,IAAI;CACrC,IAAI;CACJ,IAAI;EACH,WAAW,MAAM,OAAO;CACzB,SAAS,OAAO;EACf,OAAO,MAAM,oBAAoB,OAAO,KAAK,CAAC;CAC/C;CACA,OAAO,SAAS,WAAW,OAAO,MAAM,GAAG;AAC5C"}
1
+ {"version":3,"file":"control.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/control.mjs"],"sourcesContent":["import { c as executionDiagnostics, l as executorLoadFailure, n as devUrl, o as deploy, r as dev, t as devStop } from \"./dev-current-8HfFCN7C.mjs\";\nimport { n as RUN_REPORT_VERSION, t as RUN_REPORT_FILE_ENV } from \"./run-report-CmBz2-xc.mjs\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport { notOk } from \"@internal/foundation/result\";\n//#region src/operations/destroy.ts\n/**\n* The programmatic `destroy` operation (`@prisma/composer/control`): typed\n* input, structured result, no argv, no console, no process.exit. No CLI\n* command wraps it. The executor\n* loads lazily, so importing this module executes nothing; an executor that\n* fails to load comes back as a structured failure, never a throw out of\n* the host.\n*/\nasync function destroy(input) {\n\treturn destroyWithDeps(input, {});\n}\n/** In-package variant threading the injection seam, for the unit tests.\n* 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\tif (typeof input.environment !== \"string\" || input.environment.length === 0) return notOk(environmentRequired());\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-deploy-destroy-DerNHILD.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"destroy\", error));\n\t}\n\treturn executor.executeDestroy(input, deps, cwd);\n}\nfunction environmentRequired() {\n\treturn new CliStructuredError(\"DEPLOY.ENVIRONMENT_REQUIRED\", \"destroy needs the name of the environment to destroy.\", {\n\t\twhy: \"Destroy never defaults to production, so a call without a name has no target.\",\n\t\tfix: \"Pass `environment`, for example `destroy({ environment: 'staging', config })`.\"\n\t});\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, for the unit tests.\n* 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-kq4gyrh9.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"log\", error));\n\t}\n\treturn executor.executeLog(input, deps, cwd);\n}\n//#endregion\nexport { RUN_REPORT_FILE_ENV, RUN_REPORT_VERSION, deploy, destroy, dev, devStop, devUrl, executionDiagnostics, log };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;AAaA,eAAe,QAAQ,OAAO;CAC7B,OAAO,gBAAgB,OAAO,CAAC,CAAC;AACjC;;;;AAIA,eAAe,gBAAgB,OAAO,MAAM;CAC3C,IAAI,OAAO,MAAM,gBAAgB,YAAY,MAAM,YAAY,WAAW,GAAG,OAAO,MAAM,oBAAoB,CAAC;CAC/G,MAAM,MAAM,MAAM,OAAO,QAAQ,IAAI;CACrC,IAAI;CACJ,IAAI;EACH,WAAW,MAAM,OAAO;CACzB,SAAS,OAAO;EACf,OAAO,MAAM,oBAAoB,WAAW,KAAK,CAAC;CACnD;CACA,OAAO,SAAS,eAAe,OAAO,MAAM,GAAG;AAChD;AACA,SAAS,sBAAsB;CAC9B,OAAO,IAAI,mBAAmB,+BAA+B,yDAAyD;EACrH,KAAK;EACL,KAAK;CACN,CAAC;AACF;AAGA,eAAe,IAAI,OAAO;CACzB,OAAO,YAAY,OAAO,CAAC,CAAC;AAC7B;;;;AAIA,eAAe,YAAY,OAAO,MAAM;CACvC,MAAM,MAAM,MAAM,OAAO,QAAQ,IAAI;CACrC,IAAI;CACJ,IAAI;EACH,WAAW,MAAM,OAAO;CACzB,SAAS,OAAO;EACf,OAAO,MAAM,oBAAoB,OAAO,KAAK,CAAC;CAC/C;CACA,OAAO,SAAS,WAAW,OAAO,MAAM,GAAG;AAC5C"}
@@ -0,0 +1 @@
1
+ import "./app-config-DR7ku-WW-Dun53zka.mjs";
package/dist/deploy.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as lower, D as LowerOptions, E as LowerError, I as ProvisionEdge, K as buildConfig, L as ProvisionerDescriptor, M as PackageInput, O as LoweredResult, Q as joinDeployment, T as LowerContext, U as ServiceLowering, a as Bundle, at as resolveStateLayer, d as DeployedNode, et as lowering, f as DeploymentResult, i as AssembleInput, j as Outputs, k as Lowering, n as ApplicationDescriptor, r as Artifact, t as AlchemyStateLayer, tt as mergedProviders, u as DeployedEntity } from "./app-config-BBPLNnZX-DzU21TVb.mjs";
2
- import "./deploy-CRHoX2Pq.mjs";
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 };
1
+ import { A as Lowering, D as LowerError, E as LowerContext, G as ServiceLowering, J as buildConfig, L as ProvisionEdge, M as Outputs, N as PackageInput, O as LowerOptions, R as ProvisionerDescriptor, W as ServeInput, a as Bundle, d as DeployedNode, et as joinDeployment, f as DeploymentResult, i as AssembleInput, k as LoweredResult, n as ApplicationDescriptor, nt as lowering, p as DevServer, r as Artifact, rt as mergedProviders, st as resolveStateLayer, t as AlchemyStateLayer, tt as lower, u as DeployedEntity } from "./app-config-DR7ku-WW-Dun53zka.mjs";
2
+ import "./deploy-5sq9lPhi.mjs";
3
+ export { AlchemyStateLayer, ApplicationDescriptor, Artifact, AssembleInput, Bundle, DeployedEntity, DeployedNode, DeploymentResult, DevServer, LowerContext, LowerError, LowerOptions, LoweredResult, Lowering, Outputs, PackageInput, ProvisionEdge, ProvisionerDescriptor, ServeInput, ServiceLowering, buildConfig, joinDeployment, lower, lowering, mergedProviders, resolveStateLayer };
package/dist/deploy.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { c as isParamSource, t as Load } from "./graph-BPLLRt2I-m78iETnF.mjs";
1
+ import { l as isParamSource, t as Load } from "./graph-D0ICjejE-CeQtHY5B.mjs";
2
2
  import { r as deserializeContainers } from "./container-transport-HcvNOGZL-twPi2TIv.mjs";
3
3
  import * as Alchemy from "alchemy";
4
4
  import * as Effect from "effect/Effect";
@@ -112,6 +112,16 @@ function joinDeployment(graph, entries) {
112
112
  function missingBundleError(id) {
113
113
  return new LowerError(`No bundle provided for service "${id}" (opts.bundles["${id}"] is required).`);
114
114
  }
115
+ /** The message `prisma dev` structures as `DEV.DEV_SERVER_UNSUPPORTED` (ADR-0056). */
116
+ function noReserveError(id, extension, type) {
117
+ return new LowerError(`service "${id}" runs a dev server but its descriptor (${extension}/${type}) has no \`reserve\` step`);
118
+ }
119
+ function unassembledWithBundleError(address) {
120
+ return new LowerError(`"${address}" is listed in opts.unassembled and also has a bundle in opts.bundles — a service is either assembled or not.`);
121
+ }
122
+ function unassembledNotServiceError(address) {
123
+ return new LowerError(`"${address}" is listed in opts.unassembled but is not a service in the graph.`);
124
+ }
115
125
  function duplicateExtensionError(id) {
116
126
  return new LowerError(`Extension "${id}" is listed more than once in \`extensions\` — each extension id must be unique.`);
117
127
  }
@@ -226,6 +236,7 @@ function lowering(root, config, opts) {
226
236
  const provisioner = extension.provisions?.get(need.brand);
227
237
  if (provisioner === void 0) return yield* Effect.fail(unknownProvisionerError(extension, need.brand, edgeId));
228
238
  const ref = yield* provisioner.provision({
239
+ app: graph.root.id,
229
240
  edgeId,
230
241
  consumerAddress: edge.to,
231
242
  providerAddress: edge.from,
@@ -234,6 +245,12 @@ function lowering(root, config, opts) {
234
245
  });
235
246
  provisioned.set(edgeId, ref);
236
247
  }
248
+ const unassembled = new Set(opts.unassembled ?? []);
249
+ for (const address of unassembled) {
250
+ if (address in opts.bundles) return yield* Effect.fail(unassembledWithBundleError(address));
251
+ const found = graph.nodes.find((n) => n.id === address);
252
+ if (found === void 0 || found.node.kind !== "service") return yield* Effect.fail(unassembledNotServiceError(address));
253
+ }
237
254
  const services = /* @__PURE__ */ new Map();
238
255
  const ctxFor = (id, node) => ({
239
256
  id,
@@ -272,6 +289,16 @@ function lowering(root, config, opts) {
272
289
  const provisionedNode = services.get(id);
273
290
  const typedConfig = buildConfig(service, id, graph, lowered, provisioned);
274
291
  const serialized = yield* descriptor.serialize(ctx, provisionedNode, typedConfig);
292
+ if (unassembled.has(id)) {
293
+ if (descriptor.reserve === void 0) return yield* Effect.fail(noReserveError(id, node.extension, node.type));
294
+ const result = yield* descriptor.reserve(ctx, provisionedNode, serialized);
295
+ lowered.set(id, result.outputs);
296
+ entries.push({
297
+ address: id,
298
+ entities: result.entities
299
+ });
300
+ continue;
301
+ }
275
302
  const bundle = opts.bundles[id];
276
303
  if (bundle === void 0) return yield* Effect.fail(missingBundleError(id));
277
304
  const artifact = yield* descriptor.package(ctx, {