@prisma/composer 0.39.0-dev.11 → 0.39.0-dev.13

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 (111) hide show
  1. package/dist/{app-config-DriAu5RU-C8hYpR38.d.mts → app-config-Dhypzb6a-C3Kb0XtS.d.mts} +35 -63
  2. package/dist/app-config-Dhypzb6a-C3Kb0XtS.d.mts.map +1 -0
  3. package/dist/{app-converge-bS1l9jIf-DRGbjw2D.mjs → app-converge-CHMILMYi-JJnwJd2I.mjs} +5 -5
  4. package/dist/app-converge-CHMILMYi-JJnwJd2I.mjs.map +1 -0
  5. package/dist/config-D615fYD5.d.mts +1 -0
  6. package/dist/config.d.mts +3 -3
  7. package/dist/config.mjs +12 -2
  8. package/dist/config.mjs.map +1 -0
  9. package/dist/control.d.mts +236 -16
  10. package/dist/control.d.mts.map +1 -1
  11. package/dist/control.mjs +5 -5
  12. package/dist/control.mjs.map +1 -1
  13. package/dist/{converge-in-process-x89zb2MF-Dvj-J8xo.mjs → converge-in-process-CfeblFN9-B1KvX1Fa.mjs} +4 -4
  14. package/dist/{converge-in-process-x89zb2MF-Dvj-J8xo.mjs.map → converge-in-process-CfeblFN9-B1KvX1Fa.mjs.map} +1 -1
  15. package/dist/{converge-in-process-CTomEXaD-BnDylZP8.d.mts → converge-in-process-DZRf9uYm-Ohjvy0s_.d.mts} +6 -6
  16. package/dist/{converge-in-process-CTomEXaD-BnDylZP8.d.mts.map → converge-in-process-DZRf9uYm-Ohjvy0s_.d.mts.map} +1 -1
  17. package/dist/{deploy-DHgEJDpg.d.mts → deploy-CncPyRbo.d.mts} +4 -4
  18. package/dist/{deploy-DHgEJDpg.d.mts.map → deploy-CncPyRbo.d.mts.map} +1 -1
  19. package/dist/{deploy-CSU0kr4j.mjs → deploy-DPX4IXzF.mjs} +15 -43
  20. package/dist/deploy-DPX4IXzF.mjs.map +1 -0
  21. package/dist/deploy.d.mts +4 -4
  22. package/dist/deploy.mjs +3 -3
  23. package/dist/{dev-converge-messages-DML4rTz7-C_EAB5M_.mjs → dev-converge-messages-CElmPylA-BenEozC3.mjs} +7 -7
  24. package/dist/dev-converge-messages-CElmPylA-BenEozC3.mjs.map +1 -0
  25. package/dist/dev-converge-worker.mjs +3 -3
  26. package/dist/dev-converge-worker.mjs.map +1 -1
  27. package/dist/{dev-current-lAlj53eX-DrtBnAmA.mjs → dev-current-C7R8uqyQ-CM3PrTGG.mjs} +8 -19
  28. package/dist/dev-current-C7R8uqyQ-CM3PrTGG.mjs.map +1 -0
  29. package/dist/{dist-Cf_mZHaH.mjs → dist-Bw5O9TDx.mjs} +2 -2
  30. package/dist/{dist-Cf_mZHaH.mjs.map → dist-Bw5O9TDx.mjs.map} +1 -1
  31. package/dist/execute-deploy-destroy-BIRdFfwR-BjLOxnQd.mjs +476 -0
  32. package/dist/execute-deploy-destroy-BIRdFfwR-BjLOxnQd.mjs.map +1 -0
  33. package/dist/{execute-dev-DnVmNpc1-kSyPML7l.mjs → execute-dev-D9PxdbV3-CHISvcxU.mjs} +11 -15
  34. package/dist/execute-dev-D9PxdbV3-CHISvcxU.mjs.map +1 -0
  35. package/dist/{execute-dev-current-CZdmxVQ4-Bij2LeBY.mjs → execute-dev-current-BghQ0HLe-BC3mOHRQ.mjs} +4 -4
  36. package/dist/{execute-dev-current-CZdmxVQ4-Bij2LeBY.mjs.map → execute-dev-current-BghQ0HLe-BC3mOHRQ.mjs.map} +1 -1
  37. package/dist/{execute-log-Bl-j6izb-BTAo6tRM.mjs → execute-log-Bg7v1TBv-DigUuQSN.mjs} +4 -4
  38. package/dist/{execute-log-Bl-j6izb-BTAo6tRM.mjs.map → execute-log-Bg7v1TBv-DigUuQSN.mjs.map} +1 -1
  39. package/dist/{graph-D2WMLL43-CeiC5wdy.mjs → graph-BYo1OEqk-D5AtX8q4.mjs} +5 -5
  40. package/dist/graph-BYo1OEqk-D5AtX8q4.mjs.map +1 -0
  41. package/dist/{graph-CUYXjK8S-BzL-mhjq.d.mts → graph-CRFQxH8r-CI1p78T8.d.mts} +3 -3
  42. package/dist/graph-CRFQxH8r-CI1p78T8.d.mts.map +1 -0
  43. package/dist/{graph-types-D4PrtP-l-B0uuchTl.d.mts → graph-types-BeNeqIt4-LGyYX_Sm.d.mts} +9 -10
  44. package/dist/{graph-types-D4PrtP-l-B0uuchTl.d.mts.map → graph-types-BeNeqIt4-LGyYX_Sm.d.mts.map} +1 -1
  45. package/dist/http.d.mts +2 -2
  46. package/dist/http.mjs +2 -2
  47. package/dist/{index-D8chHe55.d.mts → index-DOJMK47O.d.mts} +3 -3
  48. package/dist/{index-D8chHe55.d.mts.map → index-DOJMK47O.d.mts.map} +1 -1
  49. package/dist/index.d.mts +3 -3
  50. package/dist/index.mjs +2 -2
  51. package/dist/internal-converge.d.mts +4 -4
  52. package/dist/internal-converge.mjs +2 -2
  53. package/dist/{load-entry-CEoVBdMj-CHOz7jKf.mjs → load-entry-CEoVBdMj-L1mXTtEO.mjs} +5 -5
  54. package/dist/load-entry-CEoVBdMj-L1mXTtEO.mjs.map +1 -0
  55. package/dist/{local-target-7KRsLMDO.d.mts → local-target-DZFvgvVK.d.mts} +2 -2
  56. package/dist/{local-target-7KRsLMDO.d.mts.map → local-target-DZFvgvVK.d.mts.map} +1 -1
  57. package/dist/local-target.d.mts +2 -2
  58. package/dist/{nextjs-DLyeRR7M-CzUbvPaJ.d.mts → nextjs-DLyeRR7M-C2z32CtL.d.mts} +3 -3
  59. package/dist/{nextjs-DLyeRR7M-CzUbvPaJ.d.mts.map → nextjs-DLyeRR7M-C2z32CtL.d.mts.map} +1 -1
  60. package/dist/nextjs-control.d.mts +4 -4
  61. package/dist/nextjs.d.mts +1 -1
  62. package/dist/node-control.d.mts +3 -3
  63. package/dist/node.d.mts +2 -2
  64. package/dist/{run-report-CmBz2-xc-Cc8rV1CX.mjs → run-report-HI2JqCSO-BWPG--nb.mjs} +5 -7
  65. package/dist/run-report-HI2JqCSO-BWPG--nb.mjs.map +1 -0
  66. package/dist/service-rpc.d.mts +2 -2
  67. package/dist/service-rpc.mjs +2 -2
  68. package/dist/steps-Det-FSAL-DRvo57Lf.mjs +174 -0
  69. package/dist/steps-Det-FSAL-DRvo57Lf.mjs.map +1 -0
  70. package/dist/testing.d.mts +1 -1
  71. package/dist/{validate-environment-DCZiNSlR-C7lv0cH1.mjs → validate-environment-BevPErw8-BDbXIt8U.mjs} +331 -9
  72. package/dist/validate-environment-BevPErw8-BDbXIt8U.mjs.map +1 -0
  73. package/package.json +11 -14
  74. package/skills/prisma-composer-core-concepts/SKILL.md +6 -23
  75. package/dist/app-config-DriAu5RU-C8hYpR38.d.mts.map +0 -1
  76. package/dist/app-configuration-file-D0rB5g65-CdMrjkCc.mjs +0 -186
  77. package/dist/app-configuration-file-D0rB5g65-CdMrjkCc.mjs.map +0 -1
  78. package/dist/app-converge-bS1l9jIf-DRGbjw2D.mjs.map +0 -1
  79. package/dist/config-Bpi8QVLB.d.mts +0 -1
  80. package/dist/deploy-CSU0kr4j.mjs.map +0 -1
  81. package/dist/deployment-summary-6LgQDUuu-Cu_6UNhc.d.mts +0 -33
  82. package/dist/deployment-summary-6LgQDUuu-Cu_6UNhc.d.mts.map +0 -1
  83. package/dist/deployment-summary-CVJZn2v0-Dz-gX1rp.mjs +0 -153
  84. package/dist/deployment-summary-CVJZn2v0-Dz-gX1rp.mjs.map +0 -1
  85. package/dist/dev-converge-messages-DML4rTz7-C_EAB5M_.mjs.map +0 -1
  86. package/dist/dev-current-lAlj53eX-DrtBnAmA.mjs.map +0 -1
  87. package/dist/execute-deploy-destroy-DN16ETAk-BaopEKsA.mjs +0 -855
  88. package/dist/execute-deploy-destroy-DN16ETAk-BaopEKsA.mjs.map +0 -1
  89. package/dist/execute-dev-DnVmNpc1-kSyPML7l.mjs.map +0 -1
  90. package/dist/graph-CUYXjK8S-BzL-mhjq.d.mts.map +0 -1
  91. package/dist/graph-D2WMLL43-CeiC5wdy.mjs.map +0 -1
  92. package/dist/internal-app-configuration-file.d.mts +0 -16
  93. package/dist/internal-app-configuration-file.d.mts.map +0 -1
  94. package/dist/internal-app-configuration-file.mjs +0 -2
  95. package/dist/load-entry-CEoVBdMj-CHOz7jKf.mjs.map +0 -1
  96. package/dist/preflight-transport-2d6iIchu-B-v7Di6I.mjs +0 -90
  97. package/dist/preflight-transport-2d6iIchu-B-v7Di6I.mjs.map +0 -1
  98. package/dist/redaction-DY6eDC12-W-FzW7_r.mjs +0 -339
  99. package/dist/redaction-DY6eDC12-W-FzW7_r.mjs.map +0 -1
  100. package/dist/redaction-Dn7BRdaP-BcLSPhLV.d.mts +0 -232
  101. package/dist/redaction-Dn7BRdaP-BcLSPhLV.d.mts.map +0 -1
  102. package/dist/report.d.mts +0 -19
  103. package/dist/report.d.mts.map +0 -1
  104. package/dist/report.mjs +0 -97
  105. package/dist/report.mjs.map +0 -1
  106. package/dist/run-report-CmBz2-xc-Cc8rV1CX.mjs.map +0 -1
  107. package/dist/steps-BZXNqW6U-C_ME2VLd.mjs +0 -112
  108. package/dist/steps-BZXNqW6U-C_ME2VLd.mjs.map +0 -1
  109. package/dist/validate-environment-DCZiNSlR-C7lv0cH1.mjs.map +0 -1
  110. package/src/exports/internal-app-configuration-file.ts +0 -1
  111. package/src/exports/report.ts +0 -1
@@ -1,11 +1,11 @@
1
- import { F as ModuleNode, K as ProvisionNeed, R as NodeId, Z as ResourceNode, o as BuildAdapter, r as AppRootNode, s as Config, st as ServiceNode, t as AppConfigurationRead, y as Graph } from "./graph-types-D4PrtP-l-B0uuchTl.mjs";
2
- import "./graph-CUYXjK8S-BzL-mhjq.mjs";
1
+ import { F as ModuleNode, K as ProvisionNeed, R as NodeId, Z as ResourceNode, o as BuildAdapter, r as AppRootNode, s as Config, st as ServiceNode, t as AppConfigurationRead, y as Graph } from "./graph-types-BeNeqIt4-LGyYX_Sm.mjs";
2
+ import "./graph-CRFQxH8r-CI1p78T8.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-DriAu5RU.d.mts
8
+ //#region ../../0-framework/1-core/core/dist/app-config-Dhypzb6a.d.mts
9
9
  //#region src/caller-credentials.d.ts
10
10
  /**
11
11
  * What the caller has already authenticated, handed unchanged to every
@@ -19,7 +19,7 @@ interface CallerCredentials<C = unknown> {
19
19
  readonly client?: C | undefined;
20
20
  }
21
21
  //#endregion
22
- //#region src/container-transport.d.ts
22
+ //#region src/container.d.ts
23
23
  /** The key an extension resolves a container from: which app, which environment. */
24
24
  interface LocateContainerInput {
25
25
  /** The application name (root node's name, or `--name`). */
@@ -34,9 +34,9 @@ interface LocateContainerInput {
34
34
  */
35
35
  interface ContainerInstance {
36
36
  readonly input: LocateContainerInput;
37
- /** 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. */
37
+ /** The stage the operation passes to Alchemy — 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. */
38
38
  readonly alchemyStage?: string | undefined;
39
- /** Serialize to a non-empty string for the process transport above. The format is the extension's own; only its `deserialize` reads it. */
39
+ /** Serialize to a non-empty string. The format is the extension's own; only its `deserialize` reads it. */
40
40
  serialize(): string;
41
41
  }
42
42
  /**
@@ -56,33 +56,14 @@ interface ContainerDescriptor<I extends ContainerInstance = ContainerInstance, C
56
56
  locate(input: LocateContainerInput, credentials?: CallerCredentials<C>): Promise<I | undefined>;
57
57
  /** Remove the container after a successful destroy, after every extension's `teardown` has run. Failure policy is the extension's. */
58
58
  remove(instance: I, credentials?: CallerCredentials<C>): Promise<void>;
59
- /** Reconstruct an instance from its own `serialize()` output — the far end of the framework's parent→child transport. */
59
+ /** Reconstruct an instance from its own `serialize()` output. */
60
60
  deserialize(serialized: string): I;
61
61
  }
62
- /** '@prisma/composer-prisma-cloud' → 'PRISMA_COMPOSER_CONTAINER_PRISMA_COMPOSER_PRISMA_CLOUD' */
63
- declare function containerEnvVarName(extensionId: string): string;
64
- /** The env entries the CLI sets on the alchemy process: `{ [containerEnvVarName(id)]: instance.serialize() }` for every resolved instance. */
65
- declare function containerEnv(instances: ReadonlyMap<string, ContainerInstance>): Record<string, string>;
66
- /** The slice of `PrismaAppConfig.extensions` this module needs — kept narrow so this shared-plane module never imports the control-plane `ExtensionDescriptor`/`PrismaAppConfig` types (ADR-0028's plane split). */
67
- interface ContainerTransportExtension {
68
- readonly id: string;
69
- readonly container?: ContainerDescriptor;
70
- }
71
- /**
72
- * The alchemy-process side: for each extension with a container descriptor
73
- * whose var is present in `env`, call its deserialize. Absent var → no entry.
74
- */
75
- declare function deserializeContainers(extensions: readonly ContainerTransportExtension[], env: Readonly<Record<string, string | undefined>>): ReadonlyMap<string, ContainerInstance>;
76
62
  //#endregion
77
- //#region src/preflight-transport.d.ts
78
- /** A string only this extension reads back, or `undefined` when it has nothing to carry. */
63
+ //#region src/preflight.d.ts
64
+ /** What an extension's deploy or dev preflight hands its own lowering, and what a deploy preflight found. */
65
+ /** A string only this extension reads back, or `undefined` when it has nothing to carry. Metadata only, never a secret value. */
79
66
  type PreflightPayload = string | undefined;
80
- /** '@prisma/composer-prisma-cloud' → 'PRISMA_COMPOSER_PREFLIGHT_PRISMA_COMPOSER_PRISMA_CLOUD' */
81
- declare function preflightEnvVarName(extensionId: string): string;
82
- /** The env entries the CLI sets on the alchemy process: `{ [preflightEnvVarName(id)]: payload }` for every extension whose preflight returned one. */
83
- declare function preflightEnv(payloads: ReadonlyMap<string, string>): Record<string, string>;
84
- /** The alchemy-process side: the payload this extension's own preflight wrote, or `undefined` when it wrote none (or when nothing ran a preflight at all). */
85
- declare function readPreflightPayload(extensionId: string, env: Readonly<Record<string, string | undefined>>): PreflightPayload;
86
67
  /** Where a platform variable is named: a service's input field, or a resource no service reads. */
87
68
  type PlatformVariableReader = {
88
69
  readonly kind: 'field';
@@ -281,8 +262,8 @@ interface LowerOptions {
281
262
  readonly environment?: string;
282
263
  /** What the caller's Load read from the app configuration (ADR-0062). Load takes the root's input from it. */
283
264
  readonly appConfigurationRead?: AppConfigurationRead;
284
- /** The node addresses of the graph the caller built. When given, lowering refuses a graph whose addresses differ. */
285
- readonly firstProcessNodeAddresses?: readonly string[];
265
+ /** The node addresses of the graph the caller prepared. When given, lowering refuses a graph whose addresses differ. */
266
+ readonly preparedNodeAddresses?: readonly string[];
286
267
  readonly bundles: Record<string, Bundle>;
287
268
  /** Alchemy state store for the stack. Defaults to the config's own state layer. */
288
269
  readonly state?: AlchemyStateLayer;
@@ -298,10 +279,10 @@ interface LowerOptions {
298
279
  readonly report?: (result: DeploymentResult) => void;
299
280
  /** Addresses lowered without an artifact: `package` and `deploy` are skipped and `reserve` runs instead (ADR-0056). Only `prisma dev` sets it. */
300
281
  readonly unassembled?: readonly string[];
301
- /** Each extension's resolved container, by extension id. Pass both `containers` and `preflightPayloads`, or neither. When both are absent, `lower()` reads both from the environment transports through `transportedLowerInputs(config)`. When exactly one is passed, `lower()` throws. */
302
- readonly containers?: ReadonlyMap<string, ContainerInstance> | undefined;
282
+ /** Each extension's resolved container, by extension id. */
283
+ readonly containers: ReadonlyMap<string, ContainerInstance>;
303
284
  /** What each extension's preflight returned, by extension id. Each lowering context gets its own extension's entry as `LowerContext.preflight`. */
304
- readonly preflightPayloads?: ReadonlyMap<string, string> | undefined;
285
+ readonly preflightPayloads: ReadonlyMap<string, string>;
305
286
  /** The platform variables with no value that the deploy preflight found. The deploy report carries them. Absent means none. */
306
287
  readonly findings?: PreflightFindings;
307
288
  /** What the caller already authenticated, handed to every extension's `providers()` and to the state descriptor's `create()`. Absent means each extension falls back to its own credential protocol. */
@@ -360,7 +341,7 @@ interface Artifact {
360
341
  declare class LowerError extends Error {
361
342
  constructor(message: string);
362
343
  }
363
- /** The `name` of the error `lower()` fails with when it builds a graph whose node addresses differ from `firstProcessNodeAddresses`. */
344
+ /** The `name` of the error `lower()` fails with when it builds a graph whose node addresses differ from `preparedNodeAddresses`. */
364
345
  declare const GRAPH_CHANGED_ERROR = "GraphChangedError";
365
346
  /**
366
347
  * Assembles a service's typed Config. Connection params come from the
@@ -422,16 +403,10 @@ declare function mergedProviders(config: PrismaAppConfig, credentials?: CallerCr
422
403
  * Fails with LowerError or whatever an extension's lowering raises — the error type is open.
423
404
  */
424
405
  declare function lowering(root: ModuleNode | AppRootNode, config: PrismaAppConfig, opts: LowerOptions): Effect.Effect<undefined, LowerError, unknown>;
425
- interface TransportedLowerInputs {
426
- readonly containers: ReadonlyMap<string, ContainerInstance>;
427
- readonly preflightPayloads: ReadonlyMap<string, string>;
428
- }
429
- /** The containers and preflight payloads a host wrote into the environment of a stack file it runs as a child. */
430
- declare function transportedLowerInputs(config: PrismaAppConfig): TransportedLowerInputs;
431
406
  /**
432
407
  * The whole-stack wrapper: Load → route each node through the config's
433
- * extension registries → an Alchemy Stack, which `deploy` hands to
434
- * `Alchemist.plan` and a generated stack file exports for the alchemy CLI.
408
+ * extension registries → an Alchemy Stack, which the operations hand to
409
+ * `Alchemist.plan`.
435
410
  */
436
411
  declare function lower(root: ModuleNode | AppRootNode, config: PrismaAppConfig, opts: LowerOptions): Alchemy.ConfiguredStack<undefined, never>;
437
412
  //#endregion
@@ -459,18 +434,16 @@ interface ExtensionDescriptor {
459
434
  readonly checkGraph?: (graph: Graph) => void;
460
435
  /**
461
436
  * Deploy-time prerequisite check — the CLI runs it once, after the app's
462
- * Project/Branch are resolved and BEFORE any stack file is written or Alchemy
437
+ * Project/Branch are resolved and BEFORE Alchemy
463
438
  * runs. A target uses it to verify platform prerequisites (e.g. that every
464
439
  * platform variable a service needs has a value) and throws to abort the
465
440
  * deploy. Async: it talks to the platform (ADR-0064).
466
441
  *
467
442
  * What it returns reaches this same extension's lowering as
468
- * `LowerContext.preflight`: as a value under `deploy` and `prisma dev`, and
469
- * through the environment (preflight-transport.ts) for `destroy`'s alchemy
470
- * child, which re-imports the config from scratch. The payload
471
- * is the extension's own opaque string; the framework never reads it, and a
472
- * secret value must never go in it. What it hands `input.report` reaches the
473
- * deploy report through the framework's own transport, not this payload.
443
+ * `LowerContext.preflight`. The payload is the extension's own opaque
444
+ * string; the framework never reads it, and a secret value must never go in
445
+ * it. What it hands `input.report` reaches the deploy report through the
446
+ * framework, not this payload.
474
447
  *
475
448
  * METHOD SYNTAX REQUIRED, for the same reason ContainerDescriptor's members
476
449
  * need it: the framework hands over the erased `PreflightInput<unknown>`,
@@ -479,7 +452,7 @@ interface ExtensionDescriptor {
479
452
  */
480
453
  preflight?(input: PreflightInput): Promise<PreflightPayload>;
481
454
  /**
482
- * Destroy-time cleanup — the CLI runs it once, after `alchemy destroy`
455
+ * Destroy-time cleanup — the CLI runs it once, after Alchemy's destroy
483
456
  * succeeds and BEFORE the environment's containers are removed. A target uses
484
457
  * it to remove infrastructure it owns outside the stack (e.g. the deploy
485
458
  * state store, which the destroy above was still reading). Throwing aborts
@@ -489,10 +462,9 @@ interface ExtensionDescriptor {
489
462
  readonly teardown?: (input: TeardownInput) => Promise<void>;
490
463
  /**
491
464
  * The extension's container lifecycle, when its platform has containers
492
- * (ADR-0038). The CLI resolves containers after assembly and before any
493
- * stack file or Alchemy run (deploy ensures, destroy locates); the
494
- * resolved instance reaches the alchemy process through the env transport
495
- * in container-transport.ts.
465
+ * (ADR-0038). The CLI resolves containers after assembly and before
466
+ * Alchemy runs (deploy ensures, destroy locates), and hands each resolved
467
+ * instance to the lowering.
496
468
  */
497
469
  readonly container?: ContainerDescriptor;
498
470
  /**
@@ -620,12 +592,12 @@ interface RunOutcome {
620
592
  */
621
593
  interface RunReporter {
622
594
  /**
623
- * Extra environment for the alchemy child, so reporting that happens
624
- * inside the apply can find the run this session belongs to. Read once,
625
- * after `attach`, and merged into the child's environment.
595
+ * Variables a deploy sets in the process environment while Alchemy plans
596
+ * and applies, so reporting that happens inside the apply can find the run
597
+ * this session belongs to. Read once, after `attach`.
626
598
  */
627
599
  childEnv(): Readonly<Record<string, string>>;
628
- /** Called once the extension's own container is resolved, before any stack file is written — the moment the run's project and branch first exist to be referenced. */
600
+ /** Called once the extension's own container is resolved, before Alchemy runs — the moment the run's project and branch first exist to be referenced. */
629
601
  attach(input: ReportAttachInput): Promise<void>;
630
602
  /** Called exactly once, on every exit path including a thrown error. */
631
603
  finish(outcome: RunOutcome): Promise<void>;
@@ -655,7 +627,7 @@ interface LocalTargetDescriptor {
655
627
  providers(input: LocalTargetProvidersInput): Layer.Layer<never>;
656
628
  /** A stable local identity — resolved without any platform call. */
657
629
  readonly container: ContainerDescriptor;
658
- /** Works out the platform variables' values, where deploy's preflight runs. Its payload reaches the alchemy process the same way deploy's preflight payload does. */
630
+ /** Works out the platform variables' values, where deploy's preflight runs. Its payload reaches this extension's lowering as its preflight payload, as deploy's does. */
659
631
  preflight?(input: PreflightInput): Promise<DevPreflightResult>;
660
632
  /** Ensure the emulator daemons this topology's node kinds need are running, plus any per-node emulator state that must exist before converge (idempotent; daemons persist across sessions). */
661
633
  emulators?(input: LocalTargetEmulatorsInput): Promise<void>;
@@ -838,7 +810,7 @@ interface ConfigAdapterInput {
838
810
  }
839
811
  /** The values one adapter returns, by name. */
840
812
  type ConfigValues = Readonly<Record<string, unknown>>;
841
- /** A function in the `config` or `secrets` list of the `composer` section (ADR-0062): it receives the environment and returns that environment's values. Only the command's first process calls it; the second process reads what the first read from the app configuration file. */
813
+ /** A function in the `config` or `secrets` list of the `composer` section (ADR-0062): it receives the environment and returns that environment's values. Only a command's first Load calls it; a later Load, such as the one `lower()` runs, takes what the first one read. */
842
814
  type ConfigAdapter = (input: ConfigAdapterInput) => ConfigValues | Promise<ConfigValues>;
843
815
  /** The app configuration (ADR-0062): what the `config` adapters return, merged by top-level key, a later adapter winning. It is the root's input, and under `prisma dev` it also holds the text of each plain platform variable. */
844
816
  type AppConfiguration = Readonly<Record<string, unknown>>;
@@ -865,5 +837,5 @@ interface PrismaAppConfig {
865
837
  /** Typed identity — exists so the `composer` section of `prisma.config.ts` gets checked against PrismaAppConfig where it is written. */
866
838
  declare function defineConfig(config: PrismaAppConfig): PrismaAppConfig;
867
839
  //#endregion
868
- export { ReportBeginInput as $, LocalTargetDescriptor as A, NodeDescriptor as B, LocalNodeCondition as C, preflightEnvVarName as Ct, LocalTargetAttachment as D, LocalTargetAttachInput as E, transportedLowerInputs as Et, LowerError as F, PreflightFindings as G, PackageInput as H, LowerOptions as I, PrismaAppConfig as J, PreflightInput as K, LoweredResult as L, LocalTargetProvidersInput as M, LocateContainerInput as N, LocalTargetCurrentApp as O, LowerContext as P, ReportAttachInput as Q, Lowering as R, GRAPH_CHANGED_ERROR as S, preflightEnv as St, LocalNodeStopped as T, resolveStateLayer as Tt, PlatformVariableCheck as U, Outputs as V, PlatformVariableReader as W, ProvisionEdge as X, ProvidersInput as Y, ProvisionerDescriptor as Z, DeployedNode as _, joinDeployment as _t, Artifact as a, StateDescriptor as at, DevServer as b, mergedProviders as bt, CallerCredentials as c, buildConfig as ct, ConfigValues as d, containerEnvVarName as dt, ReporterDescriptor as et, ContainerDescriptor as f, defineConfig as ft, DeployedEntity as g, isBuildOnlyExtension as gt, DEV_ENVIRONMENT_NAME_FILE as h, devEnvironmentDir as ht, ApplicationDescriptor as i, ServiceLowering as it, LocalTargetEmulatorsInput as j, LocalTargetCurrentInput as k, ConfigAdapter as l, connectionInputs as lt, DEV_DIR as m, deserializeContainers as mt, AppConfiguration as n, RunReporter as nt, AssembleInput as o, TeardownInput as ot, ContainerInstance as p, deploymentResult as pt, PreflightPayload as q, AppSecrets as r, ServeInput as rt, Bundle as s, UnsetPlatformVariable as st, AlchemyStateLayer as t, RunOutcome as tt, ConfigAdapterInput as u, containerEnv as ut, DeploymentResult as v, lower as vt, LocalNodeLocation as w, readPreflightPayload as wt, ExtensionDescriptor as x, platformVariableReaderText as xt, DevPreflightResult as y, lowering as yt, NamedSecrets as z };
869
- //# sourceMappingURL=app-config-DriAu5RU-C8hYpR38.d.mts.map
840
+ export { ReportBeginInput as $, LocalTargetDescriptor as A, NodeDescriptor as B, LocalNodeCondition as C, LocalTargetAttachment as D, LocalTargetAttachInput as E, LowerError as F, PreflightFindings as G, PackageInput as H, LowerOptions as I, PrismaAppConfig as J, PreflightInput as K, LoweredResult as L, LocalTargetProvidersInput as M, LocateContainerInput as N, LocalTargetCurrentApp as O, LowerContext as P, ReportAttachInput as Q, Lowering as R, GRAPH_CHANGED_ERROR as S, LocalNodeStopped as T, PlatformVariableCheck as U, Outputs as V, PlatformVariableReader as W, ProvisionEdge as X, ProvidersInput as Y, ProvisionerDescriptor as Z, DeployedNode as _, mergedProviders as _t, Artifact as a, StateDescriptor as at, DevServer as b, CallerCredentials as c, buildConfig as ct, ConfigValues as d, deploymentResult as dt, ReporterDescriptor as et, ContainerDescriptor as f, devEnvironmentDir as ft, DeployedEntity as g, lowering as gt, DEV_ENVIRONMENT_NAME_FILE as h, lower as ht, ApplicationDescriptor as i, ServiceLowering as it, LocalTargetEmulatorsInput as j, LocalTargetCurrentInput as k, ConfigAdapter as l, connectionInputs as lt, DEV_DIR as m, joinDeployment as mt, AppConfiguration as n, RunReporter as nt, AssembleInput as o, TeardownInput as ot, ContainerInstance as p, isBuildOnlyExtension as pt, PreflightPayload as q, AppSecrets as r, ServeInput as rt, Bundle as s, UnsetPlatformVariable as st, AlchemyStateLayer as t, RunOutcome as tt, ConfigAdapterInput as u, defineConfig as ut, DeploymentResult as v, platformVariableReaderText as vt, LocalNodeLocation as w, ExtensionDescriptor as x, DevPreflightResult as y, resolveStateLayer as yt, NamedSecrets as z };
841
+ //# sourceMappingURL=app-config-Dhypzb6a-C3Kb0XtS.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-config-Dhypzb6a-C3Kb0XtS.d.mts","names":[],"sources":["../../../0-framework/1-core/core/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BAAmB,SAAS;;UAE7B;;WAEC;WACA;WACA;;;UAGD;WACC;;WAEA;;EAET,OAAO,kBAAkB,QAAQ;;EAEjC,QAAQ,iBAAiB;;;KAGtB;WACM;WACA;WACA;;WAEA;;WAEA;WACA,WAAW;;WAEX;;WAEA;;WAEA;WACA;;WAEA;;;;;;;;KAQN;UACK;WACC;WACA;;UAED;;WAEC,WAAW;;WAEX;;WAEA,mBAAmB,SAAS;;WAE5B,cAAc;;UAEf;;WAEC,OAAO;WACP,WAAW;;WAEX;;UAED;WACC,WAAW;;WAEX;;UAED;;EAER,iBAAiB;;EAEjB,aAAa;aACF;aACA;;;EAGX,KAAK,QAAQ,aAAa;aACf;aACA;MACP;aACO;aACA;;;;;;;;EAQX,OAAO;aACI;aACA,MAAM;aACN,QAAQ;;aAER,eAAe;;aAEf,SAAS;MAChB;aACO;;;EAGX,WAAW;;;;;;EAMX;;;cAGY;;;;;;iBAMG,kBAAkB;;;;;;cAMrB;;;;;;;;;iBASG,qBAAqB,WAAW;;;;;;KAM5C;WACM;IACP;WACO;IACP;WACO;EACT,SAAS,OAAO,gBAAgB,QAAQ;;;;;EAKxC,OAAO,OAAO,aAAa,QAAQ;;;UAG3B;;WAEC;;WAEA;;;KAGN,eAAe,SAAS;;KAExB,iBAAiB,OAAO,uBAAuB,eAAe,QAAQ;;KAEtE,mBAAmB,SAAS;;KAE5B,aAAa,SAAS;;KAEtB,eAAe,SAAS;;;;;;;UAOnB;;WAEC;WACA,YAAY;WACZ,OAAO;;WAEP,kBAAkB;;WAElB,mBAAmB;;;iBAGb,aAAa,QAAQ,kBAAkB"}
@@ -4,8 +4,8 @@ import { createRequire } from "node:module";
4
4
  import * as path$1 from "node:path";
5
5
  import * as fs$1 from "node:fs";
6
6
  import { pathToFileURL } from "node:url";
7
- //#region ../../0-framework/3-tooling/cli/dist/app-converge-bS1l9jIf.mjs
8
- var version = "0.39.0-dev.11";
7
+ //#region ../../0-framework/3-tooling/cli/dist/app-converge-CHMILMYi.mjs
8
+ var version = "0.39.0-dev.13";
9
9
  const ENTRY = "@prisma/composer/internal/converge";
10
10
  const CONTRACT_ENTRY = "@prisma/composer/internal/converge-contract";
11
11
  const ENTRY_FUNCTIONS = [
@@ -18,7 +18,7 @@ const ENTRY_FUNCTIONS = [
18
18
  const HOST_COMPOSER_VERSION = version;
19
19
  function unresolvable(appDir, detail, cause) {
20
20
  return new CliStructuredError("DEPS.CONVERGE_UNRESOLVABLE", `Could not load the converge from the app's @prisma/composer in "${appDir}": ${detail}`, {
21
- why: "`prisma deploy` and `prisma dev` run the lowering and Alchemy from the app's own install of @prisma/composer, so the app, its extensions and Alchemy share one copy of alchemy.",
21
+ why: "`prisma deploy`, `prisma dev` and `destroy` run the lowering and Alchemy from the app's own install of @prisma/composer, so the app, its extensions and Alchemy share one copy of alchemy.",
22
22
  fix: "Install @prisma/composer in the app, at the same version as the Composer the `prisma` CLI runs.",
23
23
  ...cause === void 0 ? {} : { cause }
24
24
  });
@@ -42,7 +42,7 @@ function contractMismatch(host, app) {
42
42
  const appVersion = app.version ?? "an unknown version";
43
43
  const update = app.contract < host.contract ? `Upgrade the app's @prisma/composer to a release that speaks converge contract ${host.contract}, such as ${host.version}.` : `Upgrade the \`prisma\` CLI to one that runs a Composer speaking converge contract ${app.contract}, such as ${appVersion}.`;
44
44
  return new CliStructuredError("DEPS.CONVERGE_CONTRACT_MISMATCH", `The app's @prisma/composer ${appVersion} speaks converge contract ${app.contract}, and the \`prisma\` CLI's Composer ${host.version} speaks contract ${host.contract}.`, {
45
- why: "Deploy and dev call the app's @prisma/composer from the CLI's Composer, and the two read each other's data only when they speak the same converge contract.",
45
+ why: "`prisma deploy`, `prisma dev` and `destroy` call the app's @prisma/composer from the CLI's Composer, and the two read each other's data only when they speak the same converge contract.",
46
46
  fix: update
47
47
  });
48
48
  }
@@ -85,4 +85,4 @@ async function loadAppConvergeEntry(appDir, host = {
85
85
  //#endregion
86
86
  export { loadAppConvergeEntry as t };
87
87
 
88
- //# sourceMappingURL=app-converge-bS1l9jIf-DRGbjw2D.mjs.map
88
+ //# sourceMappingURL=app-converge-CHMILMYi-JJnwJd2I.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-converge-CHMILMYi-JJnwJd2I.mjs","names":["fs","path"],"sources":["../../../0-framework/3-tooling/cli/dist/app-converge-CHMILMYi.mjs"],"sourcesContent":["import \"./converge-contract-DrO0Jt9l.mjs\";\nimport { createRequire } from \"node:module\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport { pathToFileURL } from \"node:url\";\nimport { blindCast } from \"@internal/foundation/casts\";\n//#region package.json\nvar version = \"0.39.0-dev.13\";\n//#endregion\n//#region src/app-converge.ts\nconst ENTRY = \"@prisma/composer/internal/converge\";\nconst CONTRACT_ENTRY = \"@prisma/composer/internal/converge-contract\";\nconst ENTRY_FUNCTIONS = [\n\t\"lower\",\n\t\"convergeInProcess\",\n\t\"localTargetProviders\",\n\t\"devState\"\n];\n/** The Composer version this host runs; every Composer package carries the same one. */\nconst HOST_COMPOSER_VERSION = version;\nfunction unresolvable(appDir, detail, cause) {\n\treturn new CliStructuredError(\"DEPS.CONVERGE_UNRESOLVABLE\", `Could not load the converge from the app's @prisma/composer in \"${appDir}\": ${detail}`, {\n\t\twhy: \"`prisma deploy`, `prisma dev` and `destroy` run the lowering and Alchemy from the app's own install of @prisma/composer, so the app, its extensions and Alchemy share one copy of alchemy.\",\n\t\tfix: \"Install @prisma/composer in the app, at the same version as the Composer the `prisma` CLI runs.\",\n\t\t...cause === void 0 ? {} : { cause }\n\t});\n}\nfunction installedVersion(require) {\n\ttry {\n\t\tconst parsed = JSON.parse(fs.readFileSync(require.resolve(\"@prisma/composer/package.json\"), \"utf8\"));\n\t\treturn typeof parsed === \"object\" && parsed !== null && \"version\" in parsed && typeof parsed.version === \"string\" ? parsed.version : void 0;\n\t} catch {\n\t\treturn;\n\t}\n}\nasync function importFile(appDir, file) {\n\ttry {\n\t\treturn await import(pathToFileURL(file).href);\n\t} catch (error) {\n\t\tthrow unresolvable(appDir, `${file} failed to load: ${error instanceof Error ? error.message : String(error)}`, error);\n\t}\n}\nfunction contractMismatch(host, app) {\n\tconst appVersion = app.version ?? \"an unknown version\";\n\tconst update = app.contract < host.contract ? `Upgrade the app's @prisma/composer to a release that speaks converge contract ${host.contract}, such as ${host.version}.` : `Upgrade the \\`prisma\\` CLI to one that runs a Composer speaking converge contract ${app.contract}, such as ${appVersion}.`;\n\treturn new CliStructuredError(\"DEPS.CONVERGE_CONTRACT_MISMATCH\", `The app's @prisma/composer ${appVersion} speaks converge contract ${app.contract}, and the \\`prisma\\` CLI's Composer ${host.version} speaks contract ${host.contract}.`, {\n\t\twhy: \"`prisma deploy`, `prisma dev` and `destroy` call the app's @prisma/composer from the CLI's Composer, and the two read each other's data only when they speak the same converge contract.\",\n\t\tfix: update\n\t});\n}\n/**\n* The app's `lower`, converge and local target functions, from the install `appDir` resolves. Reads the app's\n* converge contract before loading anything else. Raises\n* DEPS.CONVERGE_UNRESOLVABLE when the install is missing or predates the\n* in-process converge, and DEPS.CONVERGE_CONTRACT_MISMATCH when it speaks\n* another contract than `host`.\n*/\nasync function loadAppConvergeEntry(appDir, host = {\n\tcontract: 2,\n\tversion: HOST_COMPOSER_VERSION\n}) {\n\tconst require = createRequire(path.join(appDir, \"package.json\"));\n\tlet contractFile;\n\tlet file;\n\ttry {\n\t\tcontractFile = require.resolve(CONTRACT_ENTRY);\n\t\tfile = require.resolve(ENTRY);\n\t} catch (error) {\n\t\tthrow unresolvable(appDir, `${CONTRACT_ENTRY} or ${ENTRY} does not resolve.`, error);\n\t}\n\tconst { CONVERGE_CONTRACT: appContract } = await importFile(appDir, contractFile);\n\tif (typeof appContract !== \"number\") throw unresolvable(appDir, `${contractFile} exports no CONVERGE_CONTRACT.`);\n\tif (appContract !== host.contract) throw contractMismatch(host, {\n\t\tcontract: appContract,\n\t\tversion: installedVersion(require)\n\t});\n\tconst entry = await importFile(appDir, file);\n\tconst missing = ENTRY_FUNCTIONS.filter((name) => typeof entry[name] !== \"function\");\n\tif (missing.length > 0) throw unresolvable(appDir, `${file} exports no ${missing.join(\", \")}.`);\n\treturn blindCast({\n\t\tlower: entry[\"lower\"],\n\t\tconverge: entry[\"convergeInProcess\"],\n\t\tlocalTargetProviders: entry[\"localTargetProviders\"],\n\t\tdevState: entry[\"devState\"]\n\t});\n}\n//#endregion\nexport { loadAppConvergeEntry as t };\n\n//# sourceMappingURL=app-converge-CHMILMYi.mjs.map"],"mappings":";;;;;;;AAQA,IAAI,UAAU;AAGd,MAAM,QAAQ;AACd,MAAM,iBAAiB;AACvB,MAAM,kBAAkB;CACvB;CACA;CACA;CACA;AACD;;AAEA,MAAM,wBAAwB;AAC9B,SAAS,aAAa,QAAQ,QAAQ,OAAO;CAC5C,OAAO,IAAI,mBAAmB,8BAA8B,mEAAmE,OAAO,KAAK,UAAU;EACpJ,KAAK;EACL,KAAK;EACL,GAAG,UAAU,KAAK,IAAI,CAAC,IAAI,EAAE,MAAM;CACpC,CAAC;AACF;AACA,SAAS,iBAAiB,SAAS;CAClC,IAAI;EACH,MAAM,SAAS,KAAK,MAAMA,KAAG,aAAa,QAAQ,QAAQ,+BAA+B,GAAG,MAAM,CAAC;EACnG,OAAO,OAAO,WAAW,YAAY,WAAW,QAAQ,aAAa,UAAU,OAAO,OAAO,YAAY,WAAW,OAAO,UAAU,KAAK;CAC3I,QAAQ;EACP;CACD;AACD;AACA,eAAe,WAAW,QAAQ,MAAM;CACvC,IAAI;EACH,OAAO,MAAM,OAAO,cAAc,IAAI,CAAC,CAAC;CACzC,SAAS,OAAO;EACf,MAAM,aAAa,QAAQ,GAAG,KAAK,mBAAmB,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,KAAK,KAAK;CACtH;AACD;AACA,SAAS,iBAAiB,MAAM,KAAK;CACpC,MAAM,aAAa,IAAI,WAAW;CAClC,MAAM,SAAS,IAAI,WAAW,KA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ReportBeginInput, A as LocalTargetDescriptor, B as NodeDescriptor, C as LocalNodeCondition, Ct as preflightEnvVarName, D as LocalTargetAttachment, E as LocalTargetAttachInput, G as PreflightFindings, J as PrismaAppConfig, K as PreflightInput, M as LocalTargetProvidersInput, N as LocateContainerInput, O as LocalTargetCurrentApp, Q as ReportAttachInput, St as preflightEnv, T as LocalNodeStopped, U as PlatformVariableCheck, W as PlatformVariableReader, Y as ProvidersInput, at as StateDescriptor, c as CallerCredentials, d as ConfigValues, dt as containerEnvVarName, et as ReporterDescriptor, f as ContainerDescriptor, ft as defineConfig, g as DeployedEntity, gt as isBuildOnlyExtension, h as DEV_ENVIRONMENT_NAME_FILE, ht as devEnvironmentDir, j as LocalTargetEmulatorsInput, k as LocalTargetCurrentInput, l as ConfigAdapter, m as DEV_DIR, mt as deserializeContainers, n as AppConfiguration, nt as RunReporter, ot as TeardownInput, p as ContainerInstance, q as PreflightPayload, r as AppSecrets, st as UnsetPlatformVariable, tt as RunOutcome, u as ConfigAdapterInput, ut as containerEnv, w as LocalNodeLocation, wt as readPreflightPayload, x as ExtensionDescriptor, xt as platformVariableReaderText, y as DevPreflightResult, z as NamedSecrets } from "./app-config-DriAu5RU-C8hYpR38.mjs";
2
- import "./config-Bpi8QVLB.mjs";
1
+ import { $ as ReportBeginInput, A as LocalTargetDescriptor, B as NodeDescriptor, C as LocalNodeCondition, D as LocalTargetAttachment, E as LocalTargetAttachInput, G as PreflightFindings, J as PrismaAppConfig, K as PreflightInput, M as LocalTargetProvidersInput, N as LocateContainerInput, O as LocalTargetCurrentApp, Q as ReportAttachInput, T as LocalNodeStopped, U as PlatformVariableCheck, W as PlatformVariableReader, Y as ProvidersInput, at as StateDescriptor, c as CallerCredentials, d as ConfigValues, et as ReporterDescriptor, f as ContainerDescriptor, ft as devEnvironmentDir, g as DeployedEntity, h as DEV_ENVIRONMENT_NAME_FILE, j as LocalTargetEmulatorsInput, k as LocalTargetCurrentInput, l as ConfigAdapter, m as DEV_DIR, n as AppConfiguration, nt as RunReporter, ot as TeardownInput, p as ContainerInstance, pt as isBuildOnlyExtension, q as PreflightPayload, r as AppSecrets, st as UnsetPlatformVariable, tt as RunOutcome, u as ConfigAdapterInput, ut as defineConfig, vt as platformVariableReaderText, w as LocalNodeLocation, x as ExtensionDescriptor, y as DevPreflightResult, z as NamedSecrets } from "./app-config-Dhypzb6a-C3Kb0XtS.mjs";
2
+ import "./config-D615fYD5.mjs";
3
3
  //#region ../../0-framework/3-tooling/cli/dist/config.d.mts
4
4
  //#region src/config-adapters.d.ts
5
5
  /** Reads the process environment when called: every variable whose value is a string. The default for both `config` and `secrets`. */
@@ -12,5 +12,5 @@ declare function environmentVariables(): ConfigAdapter;
12
12
  */
13
13
  declare function dotenv(): ConfigAdapter;
14
14
  //#endregion
15
- export { AppConfiguration, AppSecrets, type CallerCredentials, ConfigAdapter, ConfigAdapterInput, ConfigValues, type ContainerDescriptor, type ContainerInstance, DEV_DIR, DEV_ENVIRONMENT_NAME_FILE, type DeployedEntity, DevPreflightResult, ExtensionDescriptor, LocalNodeCondition, LocalNodeLocation, LocalNodeStopped, LocalTargetAttachInput, LocalTargetAttachment, LocalTargetCurrentApp, LocalTargetCurrentInput, LocalTargetDescriptor, LocalTargetEmulatorsInput, LocalTargetProvidersInput, type LocateContainerInput, NamedSecrets, NodeDescriptor, PlatformVariableCheck, type PlatformVariableReader, type PreflightFindings, PreflightInput, type PreflightPayload, PrismaAppConfig, ProvidersInput, ReportAttachInput, ReportBeginInput, ReporterDescriptor, RunOutcome, RunReporter, StateDescriptor, TeardownInput, type UnsetPlatformVariable, containerEnv, containerEnvVarName, defineConfig, deserializeContainers, devEnvironmentDir, dotenv, environmentVariables, isBuildOnlyExtension, platformVariableReaderText, preflightEnv, preflightEnvVarName, readPreflightPayload };
15
+ export { AppConfiguration, AppSecrets, type CallerCredentials, ConfigAdapter, ConfigAdapterInput, ConfigValues, type ContainerDescriptor, type ContainerInstance, DEV_DIR, DEV_ENVIRONMENT_NAME_FILE, type DeployedEntity, DevPreflightResult, ExtensionDescriptor, LocalNodeCondition, LocalNodeLocation, LocalNodeStopped, LocalTargetAttachInput, LocalTargetAttachment, LocalTargetCurrentApp, LocalTargetCurrentInput, LocalTargetDescriptor, LocalTargetEmulatorsInput, LocalTargetProvidersInput, type LocateContainerInput, NamedSecrets, NodeDescriptor, PlatformVariableCheck, type PlatformVariableReader, type PreflightFindings, PreflightInput, type PreflightPayload, PrismaAppConfig, ProvidersInput, ReportAttachInput, ReportBeginInput, ReporterDescriptor, RunOutcome, RunReporter, StateDescriptor, TeardownInput, type UnsetPlatformVariable, defineConfig, devEnvironmentDir, dotenv, environmentVariables, isBuildOnlyExtension, platformVariableReaderText };
16
16
  //# sourceMappingURL=config.d.mts.map
package/dist/config.mjs CHANGED
@@ -1,4 +1,14 @@
1
1
  import { n as environmentVariables, t as dotenv } from "./config-adapters-DG-uhGfv-Bt1M9f8b.mjs";
2
- import { a as preflightEnv, i as platformVariableReaderText, n as containerEnvVarName, o as preflightEnvVarName, r as deserializeContainers, s as readPreflightPayload, t as containerEnv } from "./preflight-transport-2d6iIchu-B-v7Di6I.mjs";
3
2
  import { a as isBuildOnlyExtension, i as devEnvironmentDir, n as DEV_ENVIRONMENT_NAME_FILE, r as defineConfig, t as DEV_DIR } from "./app-config-CErnR6NK-D9NgSBH4.mjs";
4
- export { DEV_DIR, DEV_ENVIRONMENT_NAME_FILE, containerEnv, containerEnvVarName, defineConfig, deserializeContainers, devEnvironmentDir, dotenv, environmentVariables, isBuildOnlyExtension, platformVariableReaderText, preflightEnv, preflightEnvVarName, readPreflightPayload };
3
+ //#region ../../0-framework/1-core/core/dist/config.mjs
4
+ /** One reader as the deploy prints it, for example `read by service "shop.email", field "apiKey"`. */
5
+ function platformVariableReaderText(reader) {
6
+ switch (reader.kind) {
7
+ case "field": return `read by service "${reader.service}", field "${reader.path === "" ? "(root)" : reader.path}"`;
8
+ case "unread": return `named by resource "${reader.node}", read by no service`;
9
+ }
10
+ }
11
+ //#endregion
12
+ export { DEV_DIR, DEV_ENVIRONMENT_NAME_FILE, defineConfig, devEnvironmentDir, dotenv, environmentVariables, isBuildOnlyExtension, platformVariableReaderText };
13
+
14
+ //# sourceMappingURL=config.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.mjs","names":[],"sources":["../../../0-framework/1-core/core/dist/config.mjs"],"sourcesContent":["import { a as isBuildOnlyExtension, i as devEnvironmentDir, n as DEV_ENVIRONMENT_NAME_FILE, r as defineConfig, t as DEV_DIR } from \"./app-config-CErnR6NK.mjs\";\n//#region src/preflight.ts\n/** One reader as the deploy prints it, for example `read by service \"shop.email\", field \"apiKey\"`. */\nfunction platformVariableReaderText(reader) {\n\tswitch (reader.kind) {\n\t\tcase \"field\": return `read by service \"${reader.service}\", field \"${reader.path === \"\" ? \"(root)\" : reader.path}\"`;\n\t\tcase \"unread\": return `named by resource \"${reader.node}\", read by no service`;\n\t}\n}\n//#endregion\nexport { DEV_DIR, DEV_ENVIRONMENT_NAME_FILE, defineConfig, devEnvironmentDir, isBuildOnlyExtension, platformVariableReaderText };\n\n//# sourceMappingURL=config.mjs.map"],"mappings":";;;;AAGA,SAAS,2BAA2B,QAAQ;CAC3C,QAAQ,OAAO,MAAf;EACC,KAAK,SAAS,OAAO,oBAAoB,OAAO,QAAQ,YAAY,OAAO,SAAS,KAAK,WAAW,OAAO,KAAK;EAChH,KAAK,UAAU,OAAO,sBAAsB,OAAO,KAAK;CACzD;AACD"}
@@ -1,14 +1,75 @@
1
- import { Rt as CliStructuredError } from "./graph-types-D4PrtP-l-B0uuchTl.mjs";
2
- import { G as PreflightFindings, W as PlatformVariableReader, st as UnsetPlatformVariable } from "./app-config-DriAu5RU-C8hYpR38.mjs";
3
- import "./config-Bpi8QVLB.mjs";
4
- import { n as DeploymentSummary, t as DeployedNodeSummary } from "./deployment-summary-6LgQDUuu-Cu_6UNhc.mjs";
5
- import "./index-D8chHe55.mjs";
6
- import { a as ExecutionDiagnostics, c as dev, d as Ok, f as Result, i as DevSession, l as executionDiagnostics, n as DevEvent, o as ServiceEndpoint, r as DevInput, s as StepEvent, t as ComposerConfigSource, u as NotOk } from "./redaction-Dn7BRdaP-BcLSPhLV.mjs";
7
- //#region ../../0-framework/3-tooling/cli/dist/dev-current-BiJzvHNz.d.mts
8
- //#region src/operations/deploy.d.ts
9
- /** A deploy step. `assemble-service` steps run inside `assemble`, one per service, and `apply-resource` steps inside `apply`, one per resource Alchemy touches. */
10
- type DeployStep = {
11
- readonly name: 'prepare' | 'assemble' | 'connect' | 'preflight' | 'apply' | 'record';
1
+ import { Rt as CliStructuredError } from "./graph-types-BeNeqIt4-LGyYX_Sm.mjs";
2
+ import { G as PreflightFindings, J as PrismaAppConfig, W as PlatformVariableReader, g as DeployedEntity, st as UnsetPlatformVariable } from "./app-config-Dhypzb6a-C3Kb0XtS.mjs";
3
+ import "./config-D615fYD5.mjs";
4
+ import "./deploy-CncPyRbo.mjs";
5
+ import "./converge-in-process-DZRf9uYm-Ohjvy0s_.mjs";
6
+ import "./index-DOJMK47O.mjs";
7
+ import "./local-target-DZFvgvVK.mjs";
8
+ //#region ../../0-framework/0-foundation/foundation/dist/result.d.mts
9
+ //#region src/result.d.ts
10
+ /**
11
+ * Represents a successful result containing a value.
12
+ */
13
+ interface Ok<T> {
14
+ readonly ok: true;
15
+ readonly value: T;
16
+ assertOk(): T;
17
+ assertNotOk(): never;
18
+ }
19
+ /**
20
+ * Represents an unsuccessful result containing failure details.
21
+ */
22
+ interface NotOk<F> {
23
+ readonly ok: false;
24
+ readonly failure: F;
25
+ assertOk(): never;
26
+ assertNotOk(): F;
27
+ }
28
+ /**
29
+ * A discriminated union representing either success (Ok) or failure (NotOk).
30
+ *
31
+ * @typeParam T - The success value type
32
+ * @typeParam F - The failure details type
33
+ */
34
+ type Result<T, F> = Ok<T> | NotOk<F>;
35
+ //#endregion
36
+ //#region ../../0-framework/3-tooling/cli/dist/redaction-msB1S2rG.d.mts
37
+ //#region src/composer-config.d.ts
38
+ /** Composer's configuration and the `prisma.config.ts` that declares it. */
39
+ interface ComposerConfigSource {
40
+ /** The `composer` section: the `composer` property of that file's default export. */
41
+ readonly value: PrismaAppConfig;
42
+ /** The declaring `prisma.config.ts`. A relative path resolves against the operation's `cwd`. */
43
+ readonly file: string;
44
+ }
45
+ //#endregion
46
+ //#region src/deployment-summary.d.ts
47
+ /** The serializable projection of DeploymentResult. */
48
+ interface DeployedNodeSummary {
49
+ readonly address: string;
50
+ readonly entities: readonly DeployedEntity[];
51
+ }
52
+ interface DeploymentSummary {
53
+ readonly app: string;
54
+ readonly nodes: readonly DeployedNodeSummary[];
55
+ /** The platform variables with no value that the deploy preflight found. */
56
+ readonly findings: PreflightFindings;
57
+ }
58
+ //#endregion
59
+ //#region src/operations/shared.d.ts
60
+ /** A running service's dotted address plus its local URL — what `dev` reports
61
+ * as the front door and `log` reports as the tailable services. */
62
+ interface ServiceEndpoint {
63
+ readonly address: string;
64
+ readonly url: string;
65
+ /** 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). */
66
+ readonly devServer?: string;
67
+ }
68
+ //#endregion
69
+ //#region src/operations/steps.d.ts
70
+ /** The steps a deploy and a destroy both run. */
71
+ type StackStep = {
72
+ readonly name: 'prepare' | 'assemble' | 'connect' | 'apply' | 'record';
12
73
  } | {
13
74
  readonly name: 'assemble-service';
14
75
  readonly address: string;
@@ -20,6 +81,160 @@ type DeployStep = {
20
81
  /** Alchemy's word for what is happening to the resource, such as `creating` or `created`, for people to read. It changes between a step's start and finish, and its values are Alchemy's, so do not branch on it. */
21
82
  readonly status: string;
22
83
  };
84
+ /** A step event, over the operation's own step type. */
85
+ type StepEvent<Step> = {
86
+ readonly kind: 'step-started';
87
+ readonly step: Step;
88
+ } | {
89
+ readonly kind: 'message';
90
+ readonly severity: 'info' | 'warn' | 'verbose';
91
+ /** A line Alchemy logged while it planned or applied. */
92
+ readonly text: string;
93
+ } | {
94
+ readonly kind: 'step-finished';
95
+ readonly step: Step;
96
+ readonly outcome: 'ok' | 'failed';
97
+ readonly durationMs: number;
98
+ /** What the step measured, as its build adapter or deploy target reported it. The fields vary by adapter and target. */
99
+ readonly data?: Readonly<Record<string, string | number>> | undefined;
100
+ };
101
+ //#endregion
102
+ //#region src/operations/dev.d.ts
103
+ /** A step of a converge. Each converge is one `converge` step, `dev.converge` for the first and `dev.rebuild.<n>` for the n-th rebuild, and each resource Alchemy touches is an `apply-resource` step inside it. */
104
+ type DevStep = {
105
+ readonly name: 'converge';
106
+ readonly id: string;
107
+ } | {
108
+ readonly name: 'apply-resource';
109
+ /** The id of the converge step it belongs to. */
110
+ readonly converge: string;
111
+ /** The resource's ID (ADR-0057): its node's address, or the address and the resource's role in that node. */
112
+ readonly resourceId: string;
113
+ readonly resourceType: string;
114
+ /** Alchemy's status word for what is happening to it, such as `creating` or `created`. */
115
+ readonly status: string;
116
+ };
117
+ type DevEvent =
118
+ /** A converge's steps and Alchemy's log lines. Every step a converge opens is finished when it ends, as `failed` when it failed or was interrupted. */
119
+ StepEvent<DevStep> |
120
+ /** Initial front door + after each successful re-converge. */
121
+ {
122
+ readonly kind: 'ready';
123
+ readonly endpoints: readonly ServiceEndpoint[];
124
+ } | {
125
+ readonly kind: 'unwatchable';
126
+ readonly address: string;
127
+ } |
128
+ /** A target's preflight warned about the graph; the session still starts. */
129
+ {
130
+ readonly kind: 'target-warning';
131
+ readonly message: string;
132
+ } | {
133
+ readonly kind: 'rebuild-failed';
134
+ readonly message: string;
135
+ } |
136
+ /** The file watcher itself errored (EMFILE, a vanished directory); the session keeps running. */
137
+ {
138
+ readonly kind: 'watch-error';
139
+ readonly message: string;
140
+ } |
141
+ /** `prisma.config.ts` changed. The session keeps the config it started with and stops rebuilding until it is restarted. */
142
+ {
143
+ readonly kind: 'config-changed';
144
+ readonly file: string;
145
+ } |
146
+ /** What the `config` or `secrets` adapters return changed since the session started. The session keeps the values it started with and stops rebuilding until it is restarted. */
147
+ {
148
+ readonly kind: 'values-changed';
149
+ } |
150
+ /** The value resources the app reads changed since the session started. `added` holds the nodes whose reads were only added, `removed` those whose reads were only removed, and `changed` every other changed node, each by address. The session stops rebuilding until it is restarted. */
151
+ {
152
+ readonly kind: 'value-reads-changed';
153
+ readonly added: readonly string[];
154
+ readonly removed: readonly string[];
155
+ readonly changed: readonly string[];
156
+ } |
157
+ /** A rebuild's converge failed, or was refused: `DEV.CONVERGE_RUNNING` when another converge on this thread holds the process state, `DEV.WORKER_THREAD` when dev was called from a thread that cannot change the process's working directory. The app keeps running, still watching. */
158
+ {
159
+ readonly kind: 'converge-failed';
160
+ readonly code: 'DEV.CONVERGE_FAILED' | 'DEV.CONVERGE_RUNNING' | 'DEV.WORKER_THREAD';
161
+ readonly message: string;
162
+ readonly reasons: readonly {
163
+ readonly tag: string;
164
+ readonly message: string;
165
+ }[];
166
+ } |
167
+ /** Once per service that runs its build adapter's dev server, before the first converge (ADR-0056). `cwd` is absolute. */
168
+ {
169
+ readonly kind: 'dev-server';
170
+ readonly address: string;
171
+ readonly command: string;
172
+ readonly cwd: string;
173
+ } |
174
+ /** A reconverge changed a dev server's environment, so the emulator restarted it. */
175
+ {
176
+ readonly kind: 'dev-server-restarted';
177
+ readonly address: string;
178
+ readonly command: string;
179
+ } |
180
+ /** One line a dev server wrote, while the session runs. */
181
+ {
182
+ readonly kind: 'dev-server-output';
183
+ readonly address: string;
184
+ readonly line: string;
185
+ } | {
186
+ readonly kind: 'stopping';
187
+ } |
188
+ /** One service refused to stop during stop(); teardown continues and `stopped` still follows. */
189
+ {
190
+ readonly kind: 'stop-error';
191
+ readonly message: string;
192
+ } | {
193
+ readonly kind: 'stopped';
194
+ };
195
+ interface DevInput {
196
+ /**
197
+ * 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.
198
+ */
199
+ readonly config: ComposerConfigSource;
200
+ /** The entry module, resolved against `cwd`. Overrides the `entry` in `config`; without either the operation fails with `CONFIG.ENTRY_MISSING`. */
201
+ readonly entry?: string | undefined;
202
+ readonly name?: string | undefined;
203
+ /** The environment to run as: a complete local copy of the app with its own services, databases and buckets. Defaults to `dev`. */
204
+ readonly environment?: string | undefined;
205
+ /** Deletes the environment's local copy of the app, and its data, before starting. Other environments are untouched. */
206
+ readonly fresh?: boolean | undefined;
207
+ /**
208
+ * Return once every service answers and leave the app running, with no
209
+ * watch loop: the session is already closed and stopping it stops nothing.
210
+ * `devStop` stops the app later.
211
+ */
212
+ readonly detach?: boolean | undefined;
213
+ /** The app's directory, where `.prisma-composer/` and Alchemy's `.alchemy` live. Defaults to `process.cwd()`. For the length of each converge, the process's working directory is `cwd`; it is restored after. */
214
+ readonly cwd?: string | undefined;
215
+ readonly onEvent?: ((event: DevEvent) => void) | undefined;
216
+ /** Interrupts a running converge and stops dev. During the first converge, dev then fails with `DEV.INTERRUPTED`; once the session has started, it stops as `stop()` stops it. Only one converge runs at a time on the thread that called dev, which holds the converge flag while dev's converge worker runs: a `deploy` on that thread while dev converges is refused, and so is a dev converge while a deploy runs there. A converge on another thread of the process is not refused. */
217
+ readonly signal?: AbortSignal | undefined;
218
+ }
219
+ /** A running dev session. The operation NEVER touches process signal handlers: the host owns signals. */
220
+ interface DevSession {
221
+ /** The initial front door, already merged across attachments. */
222
+ readonly endpoints: readonly ServiceEndpoint[];
223
+ /** Stop the watch loop and the app's services (emulators and data stay up).
224
+ * A converge still running is interrupted, and its worker thread ends before the services stop.
225
+ * Idempotent; emits 'stopping'/'stopped'; resolves `closed`. A no-op for a detached session. */
226
+ stop(): Promise<void>;
227
+ /** Settles when the session has fully stopped (via stop()); already settled for a detached session. */
228
+ readonly closed: Promise<void>;
229
+ }
230
+ declare function dev(input: DevInput): Promise<Result<DevSession, CliStructuredError>>;
231
+ //#endregion
232
+ //#region ../../0-framework/3-tooling/cli/dist/dev-current-B6d98iUl.d.mts
233
+ //#region src/operations/deploy.d.ts
234
+ /** A deploy step. `assemble-service` steps run inside `assemble`, one per service, and `apply-resource` steps inside `apply`, one per resource Alchemy touches. */
235
+ type DeployStep = StackStep | {
236
+ readonly name: 'preflight';
237
+ };
23
238
  type DeployEvent = StepEvent<DeployStep> |
24
239
  /** Right after the preflight step, when it found platform variables with no value that no service needs. */
25
240
  {
@@ -117,12 +332,15 @@ declare function devStop(input: DevStopInput): Promise<Result<DevStopped, CliStr
117
332
  //#endregion
118
333
  //#region ../../0-framework/3-tooling/cli/dist/control.d.mts
119
334
  //#region src/operations/destroy.d.ts
120
- type DestroyEvent =
121
- /** Emitted before the pipeline when `<cwd>/.alchemy` is missing/empty. */
122
- {
335
+ /** Emitted as `prepare` starts, when `<cwd>/.alchemy` is missing or empty. */
336
+ interface NoLocalDeployStateEvent {
123
337
  readonly kind: 'no-local-deploy-state';
124
338
  readonly cwd: string;
125
- };
339
+ }
340
+ /** A destroy step: every deploy step except `preflight`, which destroy does not run. */
341
+ type DestroyStep = StackStep;
342
+ /** Each step as it starts and finishes, the messages Alchemy logs, and the missing local state notice. */
343
+ type DestroyEvent = StepEvent<DestroyStep> | NoLocalDeployStateEvent;
126
344
  interface DestroyInput {
127
345
  /**
128
346
  * 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.
@@ -136,6 +354,8 @@ interface DestroyInput {
136
354
  readonly cwd?: string | undefined;
137
355
  /** Mid-operation notifications, in real time. Rendering is the host's. */
138
356
  readonly onEvent?: ((event: DestroyEvent) => void) | undefined;
357
+ /** Interrupts the plan or apply when it aborts. The destroy then fails with `DEPLOY.INTERRUPTED`, after releasing the environment's state lease, and removes no container. */
358
+ readonly signal?: AbortSignal | undefined;
139
359
  }
140
360
  declare function destroy(input: DestroyInput): Promise<Result<void, CliStructuredError>>;
141
361
  //#endregion
@@ -212,5 +432,5 @@ interface RunReport {
212
432
  readonly failure: RunReportFailure | null;
213
433
  }
214
434
  //#endregion
215
- 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, type PlatformVariableReader, type PreflightFindings, RUN_REPORT_FILE_ENV, RUN_REPORT_VERSION, type Result, type RunReport, type RunReportFailure, type ServiceEndpoint, type UnsetPlatformVariable, deploy, destroy, dev, devStop, devUrl, executionDiagnostics, log };
435
+ export { type CliStructuredError, type ComposerConfigSource, type DeployEvent, type DeployInput, type DeployStep, type DeploySuccess, type DeployedNodeSummary, type DeploymentSummary, type DestroyEvent, type DestroyInput, type DestroyStep, type DevEvent, type DevInput, type DevSession, type DevStopInput, type DevStopped, type DevUrl, type DevUrlInput, type LogAttached, type LogEvent, type LogInput, type LogLine, type NoLocalDeployStateEvent, type NotOk, type Ok, type PlatformVariableReader, type PreflightFindings, RUN_REPORT_FILE_ENV, RUN_REPORT_VERSION, type Result, type RunReport, type RunReportFailure, type ServiceEndpoint, type UnsetPlatformVariable, deploy, destroy, dev, devStop, devUrl, log };
216
436
  //# sourceMappingURL=control.d.mts.map