@prisma/composer 0.35.0 → 0.36.0

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 (83) hide show
  1. package/dist/app-config-CErnR6NK-D9NgSBH4.mjs +36 -0
  2. package/dist/app-config-CErnR6NK-D9NgSBH4.mjs.map +1 -0
  3. package/dist/{app-config-B_gQYj3K-DpMi9a4K.d.mts → app-config-DNnd7Zu--BQ1vHaMK.d.mts} +53 -31
  4. package/dist/app-config-DNnd7Zu--BQ1vHaMK.d.mts.map +1 -0
  5. package/dist/{config-CdxvLFzg.mjs → config-BFuriECI.mjs} +8 -5
  6. package/dist/config-BFuriECI.mjs.map +1 -0
  7. package/dist/config-RKyUvtGC.d.mts +1 -0
  8. package/dist/config.d.mts +3 -3
  9. package/dist/config.mjs +3 -3
  10. package/dist/control.d.mts +34 -26
  11. package/dist/control.d.mts.map +1 -1
  12. package/dist/control.mjs +20 -4
  13. package/dist/control.mjs.map +1 -1
  14. package/dist/deploy-RKyUvtGC.d.mts +1 -0
  15. package/dist/deploy.d.mts +3 -3
  16. package/dist/deploy.mjs +30 -15
  17. package/dist/deploy.mjs.map +1 -1
  18. package/dist/{deployment-summary-p88NV5m5-DTkPLzTp.d.mts → deployment-summary-p88NV5m5-SaPCCX2C.d.mts} +3 -3
  19. package/dist/{deployment-summary-p88NV5m5-DTkPLzTp.d.mts.map → deployment-summary-p88NV5m5-SaPCCX2C.d.mts.map} +1 -1
  20. package/dist/{dev-current-BB02pfSh-D-dYHs1q.mjs → dev-current-Brb4qugP-CG0_96FZ.mjs} +42 -8
  21. package/dist/dev-current-Brb4qugP-CG0_96FZ.mjs.map +1 -0
  22. package/dist/dev-environment-name-6eEr5PW8-CGk1ijP7.mjs +43 -0
  23. package/dist/dev-environment-name-6eEr5PW8-CGk1ijP7.mjs.map +1 -0
  24. package/dist/{dist-Xd2Pp_-u.mjs → dist-CZ_yEZ7F.mjs} +2 -2
  25. package/dist/dist-CZ_yEZ7F.mjs.map +1 -0
  26. package/dist/{execute-deploy-destroy-DwcoZIks-Cl-tWvo0.mjs → execute-deploy-destroy-CNt-xpE7-CYaa3sYk.mjs} +30 -35
  27. package/dist/execute-deploy-destroy-CNt-xpE7-CYaa3sYk.mjs.map +1 -0
  28. package/dist/{execute-dev-BHRWoEnd-D-YNpuEN.mjs → execute-dev-BUk-XWBJ-ZHX5A8cR.mjs} +60 -33
  29. package/dist/execute-dev-BUk-XWBJ-ZHX5A8cR.mjs.map +1 -0
  30. package/dist/{execute-dev-current-D4RkOtPA-CDBtbQUq.mjs → execute-dev-current-BdEqeKAB-BLUs2eQv.mjs} +71 -35
  31. package/dist/execute-dev-current-BdEqeKAB-BLUs2eQv.mjs.map +1 -0
  32. package/dist/{execute-log-DxjUaSwN-nVFDjZqy.mjs → execute-log-aiHhujIh-C_aXmb6j.mjs} +12 -8
  33. package/dist/execute-log-aiHhujIh-C_aXmb6j.mjs.map +1 -0
  34. package/dist/{graph-BmTgCiFm-qR5hnhOZ.d.mts → graph-BzTSXnoQ-BvGVq0bm.d.mts} +6 -7
  35. package/dist/graph-BzTSXnoQ-BvGVq0bm.d.mts.map +1 -0
  36. package/dist/{graph-D0ICjejE-CeQtHY5B.mjs → graph-MGOZJdDt-CyI8-9r7.mjs} +377 -58
  37. package/dist/graph-MGOZJdDt-CyI8-9r7.mjs.map +1 -0
  38. package/dist/{graph-types-Cegbwb_X-BU-H2pnt.d.mts → graph-types-DfsG9Rkg-D_ARjMo7.d.mts} +111 -25
  39. package/dist/graph-types-DfsG9Rkg-D_ARjMo7.d.mts.map +1 -0
  40. package/dist/http.d.mts +2 -2
  41. package/dist/http.mjs +2 -2
  42. package/dist/{index-B-9Dc0J7.d.mts → index-D89ftK2z.d.mts} +3 -3
  43. package/dist/{index-B-9Dc0J7.d.mts.map → index-D89ftK2z.d.mts.map} +1 -1
  44. package/dist/index.d.mts +4 -4
  45. package/dist/index.mjs +3 -3
  46. package/dist/{local-target-BUZG9uLx.mjs → local-target-DySKw61w.mjs} +2 -2
  47. package/dist/local-target-DySKw61w.mjs.map +1 -0
  48. package/dist/local-target.d.mts +2 -2
  49. package/dist/local-target.mjs +3 -3
  50. package/dist/{nextjs-DLyeRR7M-kVartQq-.d.mts → nextjs-DLyeRR7M-BeiYsLuZ.d.mts} +3 -3
  51. package/dist/{nextjs-DLyeRR7M-kVartQq-.d.mts.map → nextjs-DLyeRR7M-BeiYsLuZ.d.mts.map} +1 -1
  52. package/dist/nextjs-control.d.mts +4 -4
  53. package/dist/nextjs.d.mts +1 -1
  54. package/dist/node-control.d.mts +3 -3
  55. package/dist/node.d.mts +2 -2
  56. package/dist/report.d.mts +3 -3
  57. package/dist/{run-report-C2o98uD--AX8kpz4Q.mjs → run-report-CmBz2-xc-S50d4g5V.mjs} +5 -5
  58. package/dist/run-report-CmBz2-xc-S50d4g5V.mjs.map +1 -0
  59. package/dist/service-rpc.d.mts +2 -2
  60. package/dist/service-rpc.mjs +2 -2
  61. package/dist/testing.d.mts +1 -1
  62. package/dist/{pipeline-BmWt-Nhb-D9Eg14Sx.mjs → validate-environment-CEhUSEg2-DmAtiQhe.mjs} +20 -7
  63. package/dist/validate-environment-CEhUSEg2-DmAtiQhe.mjs.map +1 -0
  64. package/package.json +11 -11
  65. package/skills/prisma-composer-core-concepts/SKILL.md +84 -54
  66. package/dist/app-config-B_gQYj3K-DpMi9a4K.d.mts.map +0 -1
  67. package/dist/app-config-CGJHcFb--CIEFCG4V.mjs +0 -22
  68. package/dist/app-config-CGJHcFb--CIEFCG4V.mjs.map +0 -1
  69. package/dist/config-Bq3JlQ9_.d.mts +0 -1
  70. package/dist/config-CdxvLFzg.mjs.map +0 -1
  71. package/dist/deploy-Bq3JlQ9_.d.mts +0 -1
  72. package/dist/dev-current-BB02pfSh-D-dYHs1q.mjs.map +0 -1
  73. package/dist/dist-Xd2Pp_-u.mjs.map +0 -1
  74. package/dist/execute-deploy-destroy-DwcoZIks-Cl-tWvo0.mjs.map +0 -1
  75. package/dist/execute-dev-BHRWoEnd-D-YNpuEN.mjs.map +0 -1
  76. package/dist/execute-dev-current-D4RkOtPA-CDBtbQUq.mjs.map +0 -1
  77. package/dist/execute-log-DxjUaSwN-nVFDjZqy.mjs.map +0 -1
  78. package/dist/graph-BmTgCiFm-qR5hnhOZ.d.mts.map +0 -1
  79. package/dist/graph-D0ICjejE-CeQtHY5B.mjs.map +0 -1
  80. package/dist/graph-types-Cegbwb_X-BU-H2pnt.d.mts.map +0 -1
  81. package/dist/local-target-BUZG9uLx.mjs.map +0 -1
  82. package/dist/pipeline-BmWt-Nhb-D9Eg14Sx.mjs.map +0 -1
  83. package/dist/run-report-C2o98uD--AX8kpz4Q.mjs.map +0 -1
@@ -0,0 +1,36 @@
1
+ //#region ../../0-framework/1-core/core/dist/app-config-CErnR6NK.mjs
2
+ /** `<cwd>/.prisma-composer/dev` — local dev's state directory (ADR-0041, ADR-0004's tool-state rule), holding one folder per environment. */
3
+ const DEV_DIR = ".prisma-composer/dev";
4
+ /**
5
+ * The folder, relative to the cwd, that holds one environment's local copy.
6
+ * The environment name is percent-encoded (`encodeURIComponent`), so a name
7
+ * with `/` stays one folder and `decodeURIComponent` gives the name back.
8
+ */
9
+ function devEnvironmentDir(environment) {
10
+ return `${DEV_DIR}/${encodeURIComponent(environment)}`;
11
+ }
12
+ /**
13
+ * The file in an environment's folder that holds the environment's exact
14
+ * name. On a case-insensitive filesystem `Dev` and `dev` share one folder;
15
+ * the recorded name tells them apart.
16
+ */
17
+ const DEV_ENVIRONMENT_NAME_FILE = "environment-name";
18
+ /**
19
+ * True when an extension only participates in assembly (every `nodes` entry
20
+ * is `kind: 'build'`, and it declares none of `providers`/`application`/
21
+ * `provisions`/`container`) — it owns no resources or services, so it has
22
+ * nothing to emulate and is exempt from local-target-capability requirements
23
+ * (ADR-0041). Shared by `localTargetProviders` and every local-target hook
24
+ * iteration.
25
+ */
26
+ function isBuildOnlyExtension(extension) {
27
+ return Object.values(extension.nodes).every((node) => node.kind === "build") && extension.providers === void 0 && extension.application === void 0 && extension.provisions === void 0 && extension.container === void 0;
28
+ }
29
+ /** Typed identity — exists so the `composer` section of `prisma.config.ts` gets checked against PrismaAppConfig where it is written. */
30
+ function defineConfig(config) {
31
+ return config;
32
+ }
33
+ //#endregion
34
+ export { isBuildOnlyExtension as a, devEnvironmentDir as i, DEV_ENVIRONMENT_NAME_FILE as n, defineConfig as r, DEV_DIR as t };
35
+
36
+ //# sourceMappingURL=app-config-CErnR6NK-D9NgSBH4.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-config-CErnR6NK-D9NgSBH4.mjs","names":[],"sources":["../../../0-framework/1-core/core/dist/app-config-CErnR6NK.mjs"],"sourcesContent":["//#region src/control/app-config.ts\n/** `<cwd>/.prisma-composer/dev` — local dev's state directory (ADR-0041, ADR-0004's tool-state rule), holding one folder per environment. */\nconst DEV_DIR = \".prisma-composer/dev\";\n/**\n* The folder, relative to the cwd, that holds one environment's local copy.\n* The environment name is percent-encoded (`encodeURIComponent`), so a name\n* with `/` stays one folder and `decodeURIComponent` gives the name back.\n*/\nfunction devEnvironmentDir(environment) {\n\treturn `${DEV_DIR}/${encodeURIComponent(environment)}`;\n}\n/**\n* The file in an environment's folder that holds the environment's exact\n* name. On a case-insensitive filesystem `Dev` and `dev` share one folder;\n* the recorded name tells them apart.\n*/\nconst DEV_ENVIRONMENT_NAME_FILE = \"environment-name\";\n/**\n* True when an extension only participates in assembly (every `nodes` entry\n* is `kind: 'build'`, and it declares none of `providers`/`application`/\n* `provisions`/`container`) — it owns no resources or services, so it has\n* nothing to emulate and is exempt from local-target-capability requirements\n* (ADR-0041). Shared by `localTargetProviders` and every local-target hook\n* iteration.\n*/\nfunction isBuildOnlyExtension(extension) {\n\treturn Object.values(extension.nodes).every((node) => node.kind === \"build\") && extension.providers === void 0 && extension.application === void 0 && extension.provisions === void 0 && extension.container === void 0;\n}\n/** Typed identity — exists so the `composer` section of `prisma.config.ts` gets checked against PrismaAppConfig where it is written. */\nfunction defineConfig(config) {\n\treturn config;\n}\n//#endregion\nexport { isBuildOnlyExtension as a, devEnvironmentDir as i, DEV_ENVIRONMENT_NAME_FILE as n, defineConfig as r, DEV_DIR as t };\n\n//# sourceMappingURL=app-config-CErnR6NK.mjs.map"],"mappings":";;AAEA,MAAM,UAAU;;;;;;AAMhB,SAAS,kBAAkB,aAAa;CACvC,OAAO,GAAG,QAAQ,GAAG,mBAAmB,WAAW;AACpD;;;;;;AAMA,MAAM,4BAA4B;;;;;;;;;AASlC,SAAS,qBAAqB,WAAW;CACxC,OAAO,OAAO,OAAO,UAAU,KAAK,CAAC,CAAC,OAAO,SAAS,KAAK,SAAS,OAAO,KAAK,UAAU,cAAc,KAAK,KAAK,UAAU,gBAAgB,KAAK,KAAK,UAAU,eAAe,KAAK,KAAK,UAAU,cAAc,KAAK;AACvN;;AAEA,SAAS,aAAa,QAAQ;CAC7B,OAAO;AACR"}
@@ -1,11 +1,11 @@
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-BmTgCiFm-qR5hnhOZ.mjs";
1
+ import { A as NodeId, B as ProvisionNeed, D as ModuleNode, G as ResourceNode, g as Graph, i as Config, r as BuildAdapter, tt as ServiceNode } from "./graph-types-DfsG9Rkg-D_ARjMo7.mjs";
2
+ import "./graph-BzTSXnoQ-BvGVq0bm.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-B_gQYj3K.d.mts
8
+ //#region ../../0-framework/1-core/core/dist/app-config-DNnd7Zu-.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>;
@@ -267,8 +267,9 @@ interface DeploymentResult {
267
267
  interface LowerOptions {
268
268
  /** Stack + root node id. */
269
269
  readonly name: string;
270
+ /** The environment being deployed, as `--environment` gave it. Required by any value over `environment.name`; the generated stack files always pass it. */
271
+ readonly environment?: string;
270
272
  readonly bundles: Record<string, Bundle>;
271
- readonly stage?: string;
272
273
  /** Alchemy state store for the stack. Defaults to the config's own state layer. */
273
274
  readonly state?: AlchemyStateLayer;
274
275
  /** Explicit provider set for the stack. Defaults to the config's own merged `providers()` (`mergedProviders`) — the same override precedence as `state`. The dev stack module passes `localTargetProviders(...)` here (ADR-0041); `lower()` itself learns nothing about the local target. */
@@ -350,6 +351,12 @@ declare class LowerError extends Error {
350
351
  * here, naming the edge, rather than reaching the consumer as `undefined`.
351
352
  */
352
353
  declare function buildConfig(node: ServiceNode, id: NodeId, graph: Graph, lowered: ReadonlyMap<NodeId, Outputs>, provisioned: ReadonlyMap<string, unknown>): Config;
354
+ /**
355
+ * The connection params of each of a service's or resource's dependency
356
+ * slots, resolved against the producer's lowered outputs or the minted
357
+ * `provisioned` value, with the connection contract enforced (see `buildConfig`).
358
+ */
359
+ declare function connectionInputs(ctx: LowerContext): Readonly<Record<string, Readonly<Record<string, unknown>>>>;
353
360
  /**
354
361
  * Joins resolved report entries back to their graph nodes — the last step of a
355
362
  * deploy report, run inside the Action with apply's resolved values.
@@ -416,7 +423,7 @@ interface ExtensionDescriptor {
416
423
  * Deploy-time prerequisite check — the CLI runs it once, after the app's
417
424
  * Project/Branch are resolved and BEFORE any stack file is written or Alchemy
418
425
  * runs. A target uses it to verify platform prerequisites (e.g. that every
419
- * secret env var in the provision manifest exists for the resolved stage) and
426
+ * secret env var in the provision manifest exists for the resolved environment) and
420
427
  * throws to abort the deploy. Async: it talks to the platform (ADR-0029).
421
428
  *
422
429
  * What it returns is carried to the alchemy process for this same extension
@@ -434,7 +441,7 @@ interface ExtensionDescriptor {
434
441
  preflight?(input: PreflightInput): Promise<PreflightPayload>;
435
442
  /**
436
443
  * Destroy-time cleanup — the CLI runs it once, after `alchemy destroy`
437
- * succeeds and BEFORE the stage's Project/Branch are removed. A target uses
444
+ * succeeds and BEFORE the environment's containers are removed. A target uses
438
445
  * it to remove infrastructure it owns outside the stack (e.g. the deploy
439
446
  * state store, which the destroy above was still reading). Throwing aborts
440
447
  * the destroy before the containers go; a target that would rather warn than
@@ -485,8 +492,8 @@ interface PreflightInput<C = unknown> {
485
492
  readonly graph: Graph;
486
493
  /** The calling extension's own resolved container; `undefined` when it declares no container descriptor. Narrow with the extension's guard. */
487
494
  readonly container: ContainerInstance | undefined;
488
- /** The stage name (`--stage`), or `undefined` for the default stage — for diagnostics/scope. */
489
- readonly stage: string | undefined;
495
+ /** The environment name. */
496
+ readonly environment: string;
490
497
  /** What the caller has already authenticated, for the platform calls preflight makes. Absent means the extension falls back to its own credential protocol. */
491
498
  readonly credentials?: ContainerCredentials<C> | undefined;
492
499
  /** 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. */
@@ -496,8 +503,8 @@ interface PreflightInput<C = unknown> {
496
503
  interface TeardownInput {
497
504
  /** The calling extension's own resolved container; `undefined` when it declares no container descriptor. Narrow with the extension's guard. */
498
505
  readonly container: ContainerInstance | undefined;
499
- /** The stage name (`--stage`), or `undefined` for the default stage — for diagnostics/scope. */
500
- readonly stage: string | undefined;
506
+ /** The environment name. */
507
+ readonly environment: string;
501
508
  }
502
509
  /** The deploy context handed to `ReporterDescriptor.begin`. `C` erases to `unknown` at the framework boundary, exactly as on `PreflightInput`. */
503
510
  interface ReportBeginInput<C = unknown> {
@@ -511,8 +518,8 @@ interface ReportBeginInput<C = unknown> {
511
518
  * loaded (a breaking addition to this published type).
512
519
  */
513
520
  readonly graph: Graph;
514
- /** The stage name (`--stage`), or `undefined` for the default stage. */
515
- readonly stage: string | undefined;
521
+ /** The environment name. */
522
+ readonly environment: string;
516
523
  /** The directory the deploy command was run from — where a reporter reads repository metadata. */
517
524
  readonly cwd: string;
518
525
  /**
@@ -594,8 +601,8 @@ interface LocalTargetDescriptor {
594
601
  providers(input: LocalTargetProvidersInput): Layer.Layer<never>;
595
602
  /** A stable local identity — resolved without any platform call. */
596
603
  readonly container: ContainerDescriptor;
597
- /** Value sourcing (secrets/env-params) — runs where deploy's preflight runs. */
598
- preflight?(input: PreflightInput): Promise<void>;
604
+ /** Value sourcing (secrets/env-params) — runs where deploy's preflight runs. What it returns reaches the alchemy process the same way deploy's preflight payload does. */
605
+ preflight?(input: PreflightInput): Promise<PreflightPayload>;
599
606
  /** 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). */
600
607
  emulators?(input: LocalTargetEmulatorsInput): Promise<void>;
601
608
  /** The dev session's view of the running app. Core renders it and never learns an emulator's API. */
@@ -603,18 +610,20 @@ interface LocalTargetDescriptor {
603
610
  /** `--fresh`: remove every local trace of the dev instance — emulator instances, state, data. */
604
611
  teardown?(input: TeardownInput): Promise<void>;
605
612
  /**
606
- * The app `prisma dev` last ran from a directory, read from its dev state
607
- * directory alone — no entry, no graph, no container — so a command can
608
- * find or stop a running app without running the pipeline. Undefined when
609
- * this extension recorded nothing there.
613
+ * The local copy of an app in one environment, read from the environment's
614
+ * dev state directory alone — no entry, no graph, no container — so a
615
+ * command can find or stop a running app without running the pipeline.
616
+ * Undefined when this extension recorded nothing for the app there.
610
617
  */
611
618
  current?(input: LocalTargetCurrentInput): Promise<LocalTargetCurrentApp | undefined>;
612
619
  }
613
620
  interface LocalTargetCurrentInput {
614
- /** Absolute path of the dev state directory (`<cwd>/.prisma-composer/dev`). */
621
+ /** Absolute path of the environment's dev state directory (`devEnvironmentDir`, under the cwd). */
615
622
  readonly devDir: string;
623
+ readonly app: string;
624
+ readonly environment: string;
616
625
  }
617
- /** The app `prisma dev` last ran from a directory, as one extension recorded it. */
626
+ /** The local copy of an app in one environment, as one extension recorded it. */
618
627
  interface LocalTargetCurrentApp {
619
628
  readonly app: string;
620
629
  /** Every node address recorded for the app. */
@@ -658,18 +667,19 @@ interface LocalNodeStopped {
658
667
  interface LocalTargetProvidersInput {
659
668
  /** This extension's resolved local-target container (its `input.appName` is the emulator app namespace). */
660
669
  readonly container: ContainerInstance | undefined;
661
- /** Absolute path of the dev state directory (`<cwd>/.prisma-composer/dev`). */
670
+ /** Absolute path of the environment's dev state directory (`devEnvironmentDir`, under the cwd). */
662
671
  readonly devDir: string;
663
672
  }
664
673
  interface LocalTargetEmulatorsInput {
665
674
  /** The loaded application graph — inspected for which node kinds need an emulator. */
666
675
  readonly graph: Graph;
667
676
  readonly container: ContainerInstance | undefined;
668
- /** Absolute path of the dev state directory (`<cwd>/.prisma-composer/dev`). */
677
+ /** Absolute path of the environment's dev state directory (`devEnvironmentDir`, under the cwd). */
669
678
  readonly devDir: string;
670
679
  }
671
680
  interface LocalTargetAttachInput {
672
681
  readonly container: ContainerInstance | undefined;
682
+ /** Absolute path of the environment's dev state directory (`devEnvironmentDir`, under the cwd). */
673
683
  readonly devDir: string;
674
684
  }
675
685
  interface LocalTargetAttachment {
@@ -704,8 +714,20 @@ interface LocalTargetAttachment {
704
714
  /** Stop everything the target runs for the app, so nothing of it keeps running after the session (emulators and data persist). */
705
715
  stopApp(): Promise<void>;
706
716
  }
707
- /** `<cwd>/.prisma-composer/dev` — the dev instance's app-scoped state directory (ADR-0041, ADR-0004's tool-state rule). "dev" names the user-facing feature/dir (naming, operator 2026-07-23) — this constant's name and value are unchanged by the localTarget rename. */
717
+ /** `<cwd>/.prisma-composer/dev` — local dev's state directory (ADR-0041, ADR-0004's tool-state rule), holding one folder per environment. */
708
718
  declare const DEV_DIR = ".prisma-composer/dev";
719
+ /**
720
+ * The folder, relative to the cwd, that holds one environment's local copy.
721
+ * The environment name is percent-encoded (`encodeURIComponent`), so a name
722
+ * with `/` stays one folder and `decodeURIComponent` gives the name back.
723
+ */
724
+ declare function devEnvironmentDir(environment: string): string;
725
+ /**
726
+ * The file in an environment's folder that holds the environment's exact
727
+ * name. On a case-insensitive filesystem `Dev` and `dev` share one folder;
728
+ * the recorded name tells them apart.
729
+ */
730
+ declare const DEV_ENVIRONMENT_NAME_FILE = "environment-name";
709
731
  /**
710
732
  * True when an extension only participates in assembly (every `nodes` entry
711
733
  * is `kind: 'build'`, and it declares none of `providers`/`application`/
@@ -747,5 +769,5 @@ interface PrismaAppConfig {
747
769
  /** Typed identity — exists so the `composer` section of `prisma.config.ts` gets checked against PrismaAppConfig where it is written. */
748
770
  declare function defineConfig(config: PrismaAppConfig): PrismaAppConfig;
749
771
  //#endregion
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-B_gQYj3K-DpMi9a4K.d.mts.map
772
+ export { defineConfig as $, LoweredResult as A, ReportAttachInput as B, LocalTargetDescriptor as C, LowerContext as D, LocateContainerInput as E, PreflightInput as F, ServeInput as G, ReporterDescriptor as H, PreflightPayload as I, TeardownInput as J, ServiceLowering as K, PrismaAppConfig as L, NodeDescriptor as M, Outputs as N, LowerError as O, PackageInput as P, containerEnvVarName as Q, ProvisionEdge as R, LocalTargetCurrentInput as S, LocalTargetProvidersInput as T, RunOutcome as U, ReportBeginInput as V, RunReporter as W, connectionInputs as X, buildConfig as Y, containerEnv as Z, LocalNodeLocation as _, Bundle as a, lowering as at, LocalTargetAttachment as b, ContainerInstance as c, preflightEnvVarName as ct, DeployedEntity as d, deserializeContainers as et, DeployedNode as f, LocalNodeCondition as g, ExtensionDescriptor as h, AssembleInput as i, lower as it, Lowering as j, LowerOptions as k, DEV_DIR as l, readPreflightPayload as lt, DevServer as m, ApplicationDescriptor as n, isBuildOnlyExtension as nt, ContainerCredentials as o, mergedProviders as ot, DeploymentResult as p, StateDescriptor as q, Artifact as r, joinDeployment as rt, ContainerDescriptor as s, preflightEnv as st, AlchemyStateLayer as t, devEnvironmentDir as tt, DEV_ENVIRONMENT_NAME_FILE as u, resolveStateLayer as ut, LocalNodeStopped as v, LocalTargetEmulatorsInput as w, LocalTargetCurrentApp as x, LocalTargetAttachInput as y, ProvisionerDescriptor as z };
773
+ //# sourceMappingURL=app-config-DNnd7Zu--BQ1vHaMK.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-config-DNnd7Zu--BQ1vHaMK.d.mts","names":[],"s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;WACA;;UAED;;WAEC,WAAW;;WAEX;;UAED;;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;MACf;aACO;;;EAGX,WAAW;;;cAGC;;;;;;iBAMG,kBAAkB;;;;;;cAMrB;;;;;;;;;iBASG,qBAAqB,WAAW;;;;;;KAM5C;WACM;IACP;WACO;IACP;WACO;EACT,SAAS,OAAO,gBAAgB,QAAQ;;;;;EAKxC,OAAO,OAAO,aAAa,QAAQ;;;;;;;UAO3B;;WAEC;WACA,YAAY;WACZ,OAAO;;;iBAGD,aAAa,QAAQ,kBAAkB"}
@@ -1,11 +1,14 @@
1
1
  import { i as envVarSafeExtensionId } from "./container-transport-HcvNOGZL-twPi2TIv.mjs";
2
2
  //#region ../../0-framework/1-core/core/dist/config.mjs
3
3
  /**
4
- * Carries an extension's deploy-preflight payload from the CLI process to the
4
+ * Carries an extension's preflight payload from the CLI process to the
5
5
  * alchemy child (which re-imports the config from scratch) — one env var per
6
- * extension, same channel as containers (container-transport.ts). The
7
- * framework never reads the contents. Payloads carry metadata only, never
8
- * secret values: the child's environment is not a secret store.
6
+ * extension, same channel as containers (container-transport.ts), filled by
7
+ * whichever preflight the run executed: the deploy preflight or the local
8
+ * target's dev preflight. The framework never reads the contents, so an
9
+ * extension that implements both must tell its own payload kinds apart.
10
+ * Payloads carry metadata only, never secret values: the child's environment
11
+ * is not a secret store.
9
12
  */
10
13
  /** '@prisma/composer-prisma-cloud' → 'PRISMA_COMPOSER_PREFLIGHT_PRISMA_COMPOSER_PRISMA_CLOUD' */
11
14
  function preflightEnvVarName(extensionId) {
@@ -33,4 +36,4 @@ function readPreflightPayload(extensionId, env) {
33
36
  //#endregion
34
37
  export { preflightEnvVarName as n, readPreflightPayload as r, preflightEnv as t };
35
38
 
36
- //# sourceMappingURL=config-CdxvLFzg.mjs.map
39
+ //# sourceMappingURL=config-BFuriECI.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-BFuriECI.mjs","names":[],"sources":["../../../0-framework/1-core/core/dist/config.mjs"],"sourcesContent":["import { i as envVarSafeExtensionId, n as containerEnvVarName, r as deserializeContainers, t as containerEnv } from \"./container-transport-HcvNOGZL.mjs\";\nimport { 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-transport.ts\n/**\n* Carries an extension's preflight payload from the CLI process to the\n* alchemy child (which re-imports the config from scratch) — one env var per\n* extension, same channel as containers (container-transport.ts), filled by\n* whichever preflight the run executed: the deploy preflight or the local\n* target's dev preflight. The framework never reads the contents, so an\n* extension that implements both must tell its own payload kinds apart.\n* Payloads carry metadata only, never secret values: the child's environment\n* is not a secret store.\n*/\n/** '@prisma/composer-prisma-cloud' → 'PRISMA_COMPOSER_PREFLIGHT_PRISMA_COMPOSER_PRISMA_CLOUD' */\nfunction preflightEnvVarName(extensionId) {\n\treturn `PRISMA_COMPOSER_PREFLIGHT_${envVarSafeExtensionId(extensionId)}`;\n}\n/** The env entries the CLI sets on the alchemy process: `{ [preflightEnvVarName(id)]: payload }` for every extension whose preflight returned one. */\nfunction preflightEnv(payloads) {\n\tconst env = {};\n\tconst ownerByVarName = /* @__PURE__ */ new Map();\n\tfor (const [extensionId, payload] of payloads) {\n\t\tif (payload.length === 0) continue;\n\t\tconst varName = preflightEnvVarName(extensionId);\n\t\tconst owner = ownerByVarName.get(varName);\n\t\tif (owner !== void 0) throw new Error(`Extension ids \"${owner}\" and \"${extensionId}\" both map to the preflight transport variable \"${varName}\" — rename one of the extensions.`);\n\t\townerByVarName.set(varName, extensionId);\n\t\tenv[varName] = payload;\n\t}\n\treturn env;\n}\n/** 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). */\nfunction readPreflightPayload(extensionId, env) {\n\tconst payload = env[preflightEnvVarName(extensionId)];\n\treturn payload === void 0 || payload.length === 0 ? void 0 : payload;\n}\n//#endregion\nexport { DEV_DIR, DEV_ENVIRONMENT_NAME_FILE, containerEnv, containerEnvVarName, defineConfig, deserializeContainers, devEnvironmentDir, isBuildOnlyExtension, preflightEnv, preflightEnvVarName, readPreflightPayload };\n\n//# sourceMappingURL=config.mjs.map"],"mappings":";;;;;;;;;;;;;AAcA,SAAS,oBAAoB,aAAa;CACzC,OAAO,6BAA6B,sBAAsB,WAAW;AACtE;;AAEA,SAAS,aAAa,UAAU;CAC/B,MAAM,MAAM,CAAC;CACb,MAAM,iCAAiC,IAAI,IAAI;CAC/C,KAAK,MAAM,CAAC,aAAa,YAAY,UAAU;EAC9C,IAAI,QAAQ,WAAW,GAAG;EAC1B,MAAM,UAAU,oBAAoB,WAAW;EAC/C,MAAM,QAAQ,eAAe,IAAI,OAAO;EACxC,IAAI,UAAU,KAAK,GAAG,MAAM,IAAI,MAAM,kBAAkB,MAAM,SAAS,YAAY,kDAAkD,QAAQ,kCAAkC;EAC/K,eAAe,IAAI,SAAS,WAAW;EACvC,IAAI,WAAW;CAChB;CACA,OAAO;AACR;;AAEA,SAAS,qBAAqB,aAAa,KAAK;CAC/C,MAAM,UAAU,IAAI,oBAAoB,WAAW;CACnD,OAAO,YAAY,KAAK,KAAK,QAAQ,WAAW,IAAI,KAAK,IAAI;AAC9D"}
@@ -0,0 +1 @@
1
+ import "./app-config-DNnd7Zu--BQ1vHaMK.mjs";
package/dist/config.d.mts CHANGED
@@ -1,3 +1,3 @@
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-B_gQYj3K-DpMi9a4K.mjs";
2
- import "./config-Bq3JlQ9_.mjs";
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
+ import { $ as defineConfig, B as ReportAttachInput, C as LocalTargetDescriptor, E as LocateContainerInput, F as PreflightInput, H as ReporterDescriptor, I as PreflightPayload, J as TeardownInput, L as PrismaAppConfig, M as NodeDescriptor, Q as containerEnvVarName, S as LocalTargetCurrentInput, T as LocalTargetProvidersInput, U as RunOutcome, V as ReportBeginInput, W as RunReporter, Z as containerEnv, _ as LocalNodeLocation, b as LocalTargetAttachment, c as ContainerInstance, ct as preflightEnvVarName, d as DeployedEntity, et as deserializeContainers, g as LocalNodeCondition, h as ExtensionDescriptor, l as DEV_DIR, lt as readPreflightPayload, nt as isBuildOnlyExtension, o as ContainerCredentials, q as StateDescriptor, s as ContainerDescriptor, st as preflightEnv, tt as devEnvironmentDir, u as DEV_ENVIRONMENT_NAME_FILE, v as LocalNodeStopped, w as LocalTargetEmulatorsInput, x as LocalTargetCurrentApp, y as LocalTargetAttachInput } from "./app-config-DNnd7Zu--BQ1vHaMK.mjs";
2
+ import "./config-RKyUvtGC.mjs";
3
+ export { type ContainerCredentials, type ContainerDescriptor, type ContainerInstance, DEV_DIR, DEV_ENVIRONMENT_NAME_FILE, 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, devEnvironmentDir, isBuildOnlyExtension, preflightEnv, preflightEnvVarName, readPreflightPayload };
package/dist/config.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
  import { n as containerEnvVarName, r as deserializeContainers, t as containerEnv } from "./container-transport-HcvNOGZL-twPi2TIv.mjs";
2
- import { n as defineConfig, r as isBuildOnlyExtension, t as DEV_DIR } from "./app-config-CGJHcFb--CIEFCG4V.mjs";
3
- import { n as preflightEnvVarName, r as readPreflightPayload, t as preflightEnv } from "./config-CdxvLFzg.mjs";
4
- export { DEV_DIR, containerEnv, containerEnvVarName, defineConfig, deserializeContainers, isBuildOnlyExtension, preflightEnv, preflightEnvVarName, readPreflightPayload };
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";
3
+ import { n as preflightEnvVarName, r as readPreflightPayload, t as preflightEnv } from "./config-BFuriECI.mjs";
4
+ export { DEV_DIR, DEV_ENVIRONMENT_NAME_FILE, containerEnv, containerEnvVarName, defineConfig, deserializeContainers, devEnvironmentDir, isBuildOnlyExtension, preflightEnv, preflightEnvVarName, readPreflightPayload };
@@ -1,9 +1,9 @@
1
- import { gt as CliStructuredError } from "./graph-types-Cegbwb_X-BU-H2pnt.mjs";
2
- import { I as PrismaAppConfig } from "./app-config-B_gQYj3K-DpMi9a4K.mjs";
3
- import "./config-Bq3JlQ9_.mjs";
4
- import "./index-B-9Dc0J7.mjs";
5
- import "./deploy-Bq3JlQ9_.mjs";
6
- import { n as DeploymentSummary, t as DeployedNodeSummary } from "./deployment-summary-p88NV5m5-DTkPLzTp.mjs";
1
+ import { Dt as CliStructuredError } from "./graph-types-DfsG9Rkg-D_ARjMo7.mjs";
2
+ import { L as PrismaAppConfig } from "./app-config-DNnd7Zu--BQ1vHaMK.mjs";
3
+ import "./config-RKyUvtGC.mjs";
4
+ import "./index-D89ftK2z.mjs";
5
+ import "./deploy-RKyUvtGC.mjs";
6
+ import { n as DeploymentSummary, t as DeployedNodeSummary } from "./deployment-summary-p88NV5m5-SaPCCX2C.mjs";
7
7
  //#region ../../0-framework/3-tooling/cli/dist/composer-config-BJrPWlDx.d.mts
8
8
  //#region src/composer-config.d.ts
9
9
  /** Composer's configuration and the `prisma.config.ts` that declares it. */
@@ -42,7 +42,7 @@ interface NotOk<F> {
42
42
  */
43
43
  type Result<T, F> = Ok<T> | NotOk<F>;
44
44
  //#endregion
45
- //#region ../../0-framework/3-tooling/cli/dist/dev-current-BTqcYKDd.d.mts
45
+ //#region ../../0-framework/3-tooling/cli/dist/dev-current-CcIkmpk0.d.mts
46
46
  //#endregion
47
47
  //#region src/operations/shared.d.ts
48
48
  /** A running service's dotted address plus its local URL — what `dev` reports
@@ -107,8 +107,8 @@ interface DeployInput {
107
107
  readonly entry?: string | undefined;
108
108
  /** Override the root node's name (the `--name` flag's slot). */
109
109
  readonly name?: string | undefined;
110
- /** Target stage. ABSENT = production — bare deploy targets production (main.ts effectiveStage). */
111
- readonly stage?: string | undefined;
110
+ /** The environment to deploy to. Defaults to `production`. */
111
+ readonly environment?: string | undefined;
112
112
  /** Defaults to process.cwd(); the directory `.prisma-composer/` and `.alchemy` state live under. */
113
113
  readonly cwd?: string | undefined;
114
114
  /**
@@ -122,7 +122,7 @@ interface DeployInput {
122
122
  * An existing report record this deploy belongs to — the `--build-id` flag's
123
123
  * slot. A CI job that opens the record before invoking Composer passes the
124
124
  * id here, and the target's reporter joins that record instead of creating
125
- * 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.
126
126
  */
127
127
  readonly reportId?: string | undefined;
128
128
  /** Each step as it starts and finishes, in real time. Rendering is the host's. */
@@ -203,6 +203,9 @@ interface DevInput {
203
203
  /** The entry module, resolved against `cwd`. Overrides the `entry` in `config`; without either the operation fails with `CONFIG.ENTRY_MISSING`. */
204
204
  readonly entry?: string | undefined;
205
205
  readonly name?: string | undefined;
206
+ /** The environment to run as: a complete local copy of the app with its own services, databases and buckets. Defaults to `dev`. */
207
+ readonly environment?: string | undefined;
208
+ /** Deletes the environment's local copy of the app, and its data, before starting. Other environments are untouched. */
206
209
  readonly fresh?: boolean | undefined;
207
210
  /**
208
211
  * Return once every service answers and leave the app running, with no
@@ -231,8 +234,10 @@ declare function dev(input: DevInput): Promise<Result<DevSession, CliStructuredE
231
234
  interface DevUrlInput {
232
235
  /** Composer's configuration: the `composer` section of `prisma.config.ts` and that file. It names the extensions whose local targets recorded the app. */
233
236
  readonly config: ComposerConfigSource;
234
- /** A node's dotted address in the app, such as `gateway` or `catalog.database`. */
237
+ /** A node's full dotted address, starting with the app name, such as `shop.gateway`. The app is read from it. */
235
238
  readonly address: string;
239
+ /** The environment whose local copy to read. Defaults to `dev`. */
240
+ readonly environment?: string | undefined;
236
241
  /** The directory `prisma dev` ran from. Defaults to the process's working directory. */
237
242
  readonly cwd?: string | undefined;
238
243
  }
@@ -249,32 +254,33 @@ interface DevUrl {
249
254
  }
250
255
  interface DevStopInput {
251
256
  readonly config: ComposerConfigSource;
257
+ /** The entry module, resolved against `cwd`. Overrides the `entry` in `config`; the app is its root's name. */
258
+ readonly entry?: string | undefined;
259
+ /** The app to stop, in place of the entry root's name. */
260
+ readonly name?: string | undefined;
261
+ /** The environment whose local copy to stop. Defaults to `dev`. */
262
+ readonly environment?: string | undefined;
252
263
  /** The directory `prisma dev` ran from. Defaults to the process's working directory. */
253
264
  readonly cwd?: string | undefined;
254
265
  }
255
266
  interface DevStopped {
256
- /** The app that was stopped: the one `prisma dev` last ran from the directory. */
267
+ /** The app that was stopped. */
257
268
  readonly app: string;
269
+ /** The environment whose local copy was stopped. */
270
+ readonly environment: string;
258
271
  /** Each node whose process or server was stopped. Data and ports are kept. */
259
272
  readonly stopped: readonly {
260
273
  readonly address: string;
261
274
  readonly kind: string;
262
275
  }[];
263
276
  }
264
- /** Where the node at `input.address` of the directory's current app runs locally. */
277
+ /** Where the node at `input.address` runs locally in the environment. */
265
278
  declare function devUrl(input: DevUrlInput): Promise<Result<DevUrl, CliStructuredError>>;
266
- /** Stops the directory's current app: its service processes and database servers. Data and ports stay. */
279
+ /** Stops the app's local copy in the environment: its service processes and database servers. Data and ports stay. */
267
280
  declare function devStop(input: DevStopInput): Promise<Result<DevStopped, CliStructuredError>>;
268
281
  //#endregion
269
282
  //#region ../../0-framework/3-tooling/cli/dist/control.d.mts
270
283
  //#region src/operations/destroy.d.ts
271
- /** Destroy must name its target explicitly — no silent default to production. Encoded, not re-derived from flags. */
272
- type DestroyTarget = {
273
- readonly kind: 'production';
274
- } | {
275
- readonly kind: 'stage';
276
- readonly stage: string;
277
- };
278
284
  type DestroyEvent =
279
285
  /** Emitted before the pipeline when `<cwd>/.alchemy` is missing/empty. */
280
286
  {
@@ -289,7 +295,8 @@ interface DestroyInput {
289
295
  /** The entry module, resolved against `cwd`. Overrides the `entry` in `config`; without either the operation fails with `CONFIG.ENTRY_MISSING`. */
290
296
  readonly entry?: string | undefined;
291
297
  readonly name?: string | undefined;
292
- readonly target: DestroyTarget;
298
+ /** The environment to destroy. Required: destroy never defaults to production. */
299
+ readonly environment: string;
293
300
  readonly cwd?: string | undefined;
294
301
  /** Mid-operation notifications, in real time. Rendering is the host's. */
295
302
  readonly onEvent?: ((event: DestroyEvent) => void) | undefined;
@@ -322,6 +329,8 @@ interface LogInput {
322
329
  /** The entry module, resolved against `cwd`. Overrides the `entry` in `config`; without either the operation fails with `CONFIG.ENTRY_MISSING`. */
323
330
  readonly entry?: string | undefined;
324
331
  readonly name?: string | undefined;
332
+ /** The environment whose local copy to read. Defaults to `dev`. */
333
+ readonly environment?: string | undefined;
325
334
  /** Restrict to one service's dotted address; validated against running services. */
326
335
  readonly address?: string | undefined;
327
336
  /** Trailing history lines before live output. Defaults to 0 (live only). */
@@ -344,7 +353,7 @@ declare function log(input: LogInput): Promise<Result<LogAttached, CliStructured
344
353
  //#endregion
345
354
  //#region src/run-report.d.ts
346
355
  /** Bump when a change would break a consumer that reads the current shape. */
347
- declare const RUN_REPORT_VERSION = 1;
356
+ declare const RUN_REPORT_VERSION = 2;
348
357
  /** Names the file to write the run report to, when `--report` is not passed. */
349
358
  declare const RUN_REPORT_FILE_ENV = "PRISMA_COMPOSER_REPORT_FILE";
350
359
  interface RunReportFailure {
@@ -362,11 +371,10 @@ interface RunReport {
362
371
  readonly outcome: 'succeeded' | 'failed';
363
372
  /** Null when the run failed before it produced a deployment summary. */
364
373
  readonly app: string | null;
365
- /** Null for the default stage. */
366
- readonly stage: string | null;
374
+ readonly environment: string;
367
375
  readonly nodes: readonly DeployedNodeSummary[];
368
376
  readonly failure: RunReportFailure | null;
369
377
  }
370
378
  //#endregion
371
- 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 };
379
+ 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 };
372
380
  //# sourceMappingURL=control.d.mts.map
@@ -1 +1 @@
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-BTqcYKDd.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;;UAEjB;;;;WAIC,QAAQ;;WAER;;WAEA;;WAEA;;WAEA;;;;;;;WAOA;;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.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-CcIkmpk0.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;;WAEA;;WAEA;;;;;;WAMA;WACA;WACA,YAAY,OAAO;;;;;UAKpB;;WAEC,oBAAoB;;;EAG7B,QAAQ;;WAEC,QAAQ;;iBAEF,IAAI,OAAO,WAAW,QAAQ,OAAO,YAAY;;;UAOxD;;WAEC,QAAQ;;WAER;;WAEA;;WAEA;;UAED;WACC;;WAEA;;WAEA;;WAEA;;WAEA;;UAED;WACC,QAAQ;;WAER;;WAEA;;WAEA;;WAEA;;UAED;;WAEC;;WAEA;;WAEA;aACE;aACA;;;;iBAII,OAAO,OAAO,cAAc,QAAQ,OAAO,QAAQ;;iBAEnD,QAAQ,OAAO,eAAe,QAAQ,OAAO,YAAY;;;;KC1VrE;;;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;;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-BB02pfSh-D-dYHs1q.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, i as devUrl, l as notOk, n as dev, o as executorLoadFailure, r as devStop, t as deploy } from "./dev-current-Brb4qugP-CG0_96FZ.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-DwcoZIks-Cl-tWvo0.mjs");
24
+ executor = await import("./execute-deploy-destroy-CNt-xpE7-CYaa3sYk.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-DxjUaSwN-nVFDjZqy.mjs");
46
+ executor = await import("./execute-log-aiHhujIh-C_aXmb6j.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-BB02pfSh.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-DwcoZIks.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-DxjUaSwN.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-Brb4qugP.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-CNt-xpE7.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-aiHhujIh.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-DNnd7Zu--BQ1vHaMK.mjs";
package/dist/deploy.d.mts CHANGED
@@ -1,3 +1,3 @@
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-B_gQYj3K-DpMi9a4K.mjs";
2
- import "./deploy-Bq3JlQ9_.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 };
1
+ import { A as LoweredResult, D as LowerContext, G as ServeInput, K as ServiceLowering, N as Outputs, O as LowerError, P as PackageInput, R as ProvisionEdge, X as connectionInputs, Y as buildConfig, a as Bundle, at as lowering, d as DeployedEntity, f as DeployedNode, i as AssembleInput, it as lower, j as Lowering, k as LowerOptions, m as DevServer, n as ApplicationDescriptor, ot as mergedProviders, p as DeploymentResult, r as Artifact, rt as joinDeployment, t as AlchemyStateLayer, ut as resolveStateLayer, z as ProvisionerDescriptor } from "./app-config-DNnd7Zu--BQ1vHaMK.mjs";
2
+ import "./deploy-RKyUvtGC.mjs";
3
+ export { AlchemyStateLayer, ApplicationDescriptor, Artifact, AssembleInput, Bundle, DeployedEntity, DeployedNode, DeploymentResult, DevServer, LowerContext, LowerError, LowerOptions, LoweredResult, Lowering, Outputs, PackageInput, ProvisionEdge, ProvisionerDescriptor, ServeInput, ServiceLowering, buildConfig, connectionInputs, joinDeployment, lower, lowering, mergedProviders, resolveStateLayer };