@prisma/composer 0.35.0-dev.3 → 0.35.0-dev.5

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 (52) 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-DR7ku-WW-Dun53zka.d.mts → app-config-XA11xusE-vPWWyUSk.d.mts} +29 -14
  4. package/dist/{app-config-DR7ku-WW-Dun53zka.d.mts.map → app-config-XA11xusE-vPWWyUSk.d.mts.map} +1 -1
  5. package/dist/{config-CdxvLFzg.mjs → config-BFuriECI.mjs} +8 -5
  6. package/dist/config-BFuriECI.mjs.map +1 -0
  7. package/dist/config-C82Nzw7p.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 +24 -9
  11. package/dist/control.d.mts.map +1 -1
  12. package/dist/control.mjs +3 -3
  13. package/dist/control.mjs.map +1 -1
  14. package/dist/deploy-C82Nzw7p.d.mts +1 -0
  15. package/dist/deploy.d.mts +2 -2
  16. package/dist/{deployment-summary-p88NV5m5-Btf0R5T3.d.mts → deployment-summary-p88NV5m5-CmEiTIAj.d.mts} +3 -3
  17. package/dist/{deployment-summary-p88NV5m5-Btf0R5T3.d.mts.map → deployment-summary-p88NV5m5-CmEiTIAj.d.mts.map} +1 -1
  18. package/dist/{dev-current-8HfFCN7C-C8Ste3qf.mjs → dev-current-DMzFQ3va-CuaeFUh5.mjs} +42 -8
  19. package/dist/dev-current-DMzFQ3va-CuaeFUh5.mjs.map +1 -0
  20. package/dist/dev-environment-name-6eEr5PW8-CGk1ijP7.mjs +43 -0
  21. package/dist/dev-environment-name-6eEr5PW8-CGk1ijP7.mjs.map +1 -0
  22. package/dist/{execute-deploy-destroy-DerNHILD-BStnE2yG.mjs → execute-deploy-destroy-C13H3wl--BJUHsAZQ.mjs} +5 -35
  23. package/dist/execute-deploy-destroy-C13H3wl--BJUHsAZQ.mjs.map +1 -0
  24. package/dist/{execute-dev-D_JvTKjS-BjlfRv3L.mjs → execute-dev-C_SQ02a6-B-4TNU12.mjs} +57 -31
  25. package/dist/execute-dev-C_SQ02a6-B-4TNU12.mjs.map +1 -0
  26. package/dist/{execute-dev-current-BRJkR4Y1-KETGQ-7f.mjs → execute-dev-current-BlIyvq-Q-DYNdH1v4.mjs} +71 -35
  27. package/dist/execute-dev-current-BlIyvq-Q-DYNdH1v4.mjs.map +1 -0
  28. package/dist/{execute-log-kq4gyrh9-DjAlYz6O.mjs → execute-log-BLiBVIIR-LcNvz-28.mjs} +12 -8
  29. package/dist/execute-log-BLiBVIIR-LcNvz-28.mjs.map +1 -0
  30. package/dist/{local-target-BUZG9uLx.mjs → local-target-DySKw61w.mjs} +2 -2
  31. package/dist/local-target-DySKw61w.mjs.map +1 -0
  32. package/dist/local-target.d.mts +2 -2
  33. package/dist/local-target.mjs +3 -3
  34. package/dist/nextjs-control.d.mts +3 -3
  35. package/dist/node-control.d.mts +3 -3
  36. package/dist/report.d.mts +3 -3
  37. package/dist/{pipeline-BmWt-Nhb-D9Eg14Sx.mjs → validate-environment-ymM9O00_-D9TtEyHs.mjs} +13 -3
  38. package/dist/validate-environment-ymM9O00_-D9TtEyHs.mjs.map +1 -0
  39. package/package.json +11 -11
  40. package/skills/prisma-composer-core-concepts/SKILL.md +11 -16
  41. package/dist/app-config-CGJHcFb--CIEFCG4V.mjs +0 -22
  42. package/dist/app-config-CGJHcFb--CIEFCG4V.mjs.map +0 -1
  43. package/dist/config-5sq9lPhi.d.mts +0 -1
  44. package/dist/config-CdxvLFzg.mjs.map +0 -1
  45. package/dist/deploy-5sq9lPhi.d.mts +0 -1
  46. package/dist/dev-current-8HfFCN7C-C8Ste3qf.mjs.map +0 -1
  47. package/dist/execute-deploy-destroy-DerNHILD-BStnE2yG.mjs.map +0 -1
  48. package/dist/execute-dev-D_JvTKjS-BjlfRv3L.mjs.map +0 -1
  49. package/dist/execute-dev-current-BRJkR4Y1-KETGQ-7f.mjs.map +0 -1
  50. package/dist/execute-log-kq4gyrh9-DjAlYz6O.mjs.map +0 -1
  51. package/dist/local-target-BUZG9uLx.mjs.map +0 -1
  52. package/dist/pipeline-BmWt-Nhb-D9Eg14Sx.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"}
@@ -5,7 +5,7 @@ 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-DR7ku-WW.d.mts
8
+ //#region ../../0-framework/1-core/core/dist/app-config-XA11xusE.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
@@ -594,8 +594,8 @@ interface LocalTargetDescriptor {
594
594
  providers(input: LocalTargetProvidersInput): Layer.Layer<never>;
595
595
  /** A stable local identity — resolved without any platform call. */
596
596
  readonly container: ContainerDescriptor;
597
- /** Value sourcing (secrets/env-params) — runs where deploy's preflight runs. */
598
- preflight?(input: PreflightInput): Promise<void>;
597
+ /** 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. */
598
+ preflight?(input: PreflightInput): Promise<PreflightPayload>;
599
599
  /** 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
600
  emulators?(input: LocalTargetEmulatorsInput): Promise<void>;
601
601
  /** The dev session's view of the running app. Core renders it and never learns an emulator's API. */
@@ -603,18 +603,20 @@ interface LocalTargetDescriptor {
603
603
  /** `--fresh`: remove every local trace of the dev instance — emulator instances, state, data. */
604
604
  teardown?(input: TeardownInput): Promise<void>;
605
605
  /**
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.
606
+ * The local copy of an app in one environment, read from the environment's
607
+ * dev state directory alone — no entry, no graph, no container — so a
608
+ * command can find or stop a running app without running the pipeline.
609
+ * Undefined when this extension recorded nothing for the app there.
610
610
  */
611
611
  current?(input: LocalTargetCurrentInput): Promise<LocalTargetCurrentApp | undefined>;
612
612
  }
613
613
  interface LocalTargetCurrentInput {
614
- /** Absolute path of the dev state directory (`<cwd>/.prisma-composer/dev`). */
614
+ /** Absolute path of the environment's dev state directory (`devEnvironmentDir`, under the cwd). */
615
615
  readonly devDir: string;
616
+ readonly app: string;
617
+ readonly environment: string;
616
618
  }
617
- /** The app `prisma dev` last ran from a directory, as one extension recorded it. */
619
+ /** The local copy of an app in one environment, as one extension recorded it. */
618
620
  interface LocalTargetCurrentApp {
619
621
  readonly app: string;
620
622
  /** Every node address recorded for the app. */
@@ -658,18 +660,19 @@ interface LocalNodeStopped {
658
660
  interface LocalTargetProvidersInput {
659
661
  /** This extension's resolved local-target container (its `input.appName` is the emulator app namespace). */
660
662
  readonly container: ContainerInstance | undefined;
661
- /** Absolute path of the dev state directory (`<cwd>/.prisma-composer/dev`). */
663
+ /** Absolute path of the environment's dev state directory (`devEnvironmentDir`, under the cwd). */
662
664
  readonly devDir: string;
663
665
  }
664
666
  interface LocalTargetEmulatorsInput {
665
667
  /** The loaded application graph — inspected for which node kinds need an emulator. */
666
668
  readonly graph: Graph;
667
669
  readonly container: ContainerInstance | undefined;
668
- /** 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). */
669
671
  readonly devDir: string;
670
672
  }
671
673
  interface LocalTargetAttachInput {
672
674
  readonly container: ContainerInstance | undefined;
675
+ /** Absolute path of the environment's dev state directory (`devEnvironmentDir`, under the cwd). */
673
676
  readonly devDir: string;
674
677
  }
675
678
  interface LocalTargetAttachment {
@@ -704,8 +707,20 @@ interface LocalTargetAttachment {
704
707
  /** Stop everything the target runs for the app, so nothing of it keeps running after the session (emulators and data persist). */
705
708
  stopApp(): Promise<void>;
706
709
  }
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. */
710
+ /** `<cwd>/.prisma-composer/dev` — local dev's state directory (ADR-0041, ADR-0004's tool-state rule), holding one folder per environment. */
708
711
  declare const DEV_DIR = ".prisma-composer/dev";
712
+ /**
713
+ * The folder, relative to the cwd, that holds one environment's local copy.
714
+ * The environment name is percent-encoded (`encodeURIComponent`), so a name
715
+ * with `/` stays one folder and `decodeURIComponent` gives the name back.
716
+ */
717
+ declare function devEnvironmentDir(environment: string): string;
718
+ /**
719
+ * The file in an environment's folder that holds the environment's exact
720
+ * name. On a case-insensitive filesystem `Dev` and `dev` share one folder;
721
+ * the recorded name tells them apart.
722
+ */
723
+ declare const DEV_ENVIRONMENT_NAME_FILE = "environment-name";
709
724
  /**
710
725
  * True when an extension only participates in assembly (every `nodes` entry
711
726
  * is `kind: 'build'`, and it declares none of `providers`/`application`/
@@ -747,5 +762,5 @@ interface PrismaAppConfig {
747
762
  /** Typed identity — exists so the `composer` section of `prisma.config.ts` gets checked against PrismaAppConfig where it is written. */
748
763
  declare function defineConfig(config: PrismaAppConfig): PrismaAppConfig;
749
764
  //#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-DR7ku-WW-Dun53zka.d.mts.map
765
+ export { deserializeContainers 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, defineConfig as Q, ProvisionEdge as R, LocalTargetCurrentInput as S, LocalTargetProvidersInput as T, RunOutcome as U, ReportBeginInput as V, RunReporter as W, containerEnv as X, buildConfig as Y, containerEnvVarName as Z, LocalNodeLocation as _, Bundle as a, mergedProviders as at, LocalTargetAttachment as b, ContainerInstance as c, readPreflightPayload as ct, DeployedEntity as d, devEnvironmentDir as et, DeployedNode as f, LocalNodeCondition as g, ExtensionDescriptor as h, AssembleInput as i, lowering as it, Lowering as j, LowerOptions as k, DEV_DIR as l, resolveStateLayer as lt, DevServer as m, ApplicationDescriptor as n, joinDeployment as nt, ContainerCredentials as o, preflightEnv as ot, DeploymentResult as p, StateDescriptor as q, Artifact as r, lower as rt, ContainerDescriptor as s, preflightEnvVarName as st, AlchemyStateLayer as t, isBuildOnlyExtension as tt, DEV_ENVIRONMENT_NAME_FILE as u, LocalNodeStopped as v, LocalTargetEmulatorsInput as w, LocalTargetCurrentApp as x, LocalTargetAttachInput as y, ProvisionerDescriptor as z };
766
+ //# sourceMappingURL=app-config-XA11xusE-vPWWyUSk.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-config-DR7ku-WW-Dun53zka.d.mts","names":[],"sources":["../../../0-framework/1-core/core/dist/app-config-DR7ku-WW.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;UAmBU;;WAEC;;WAEA;;;;;;;UAOD;WACC,OAAO;;WAEP;;EAET;;;;;;;;;;;;;;;UAeQ,qBAAqB;;WAEpB;;WAEA,SAAS;;;;;;;;;;;;UAYV,oBAAoB,UAAU,oBAAoB,mBAAmB;;EAE7E,OAAO,OAAO,sBAAsB,cAAc,qBAAqB,KAAK,QAAQ;;EAEpF,OAAO,OAAO,sBAAsB,cAAc,qBAAqB,KAAK,QAAQ;;EAEpF,OAAO,UAAU,GAAG,cAAc,qBAAqB,KAAK;;EAE5D,YAAY,qBAAqB;;;iBAGlB,oBAAoB;;iBAEpB,aAAa,WAAW,oBAAoB,qBAAqB;;UAExE;WACC;WACA,YAAY;;;;;;iBAMN,sBAAsB,qBAAqB,+BAA+B,KAAK,SAAS,sCAAsC,oBAAoB;;;;KAI9J;;iBAEY,oBAAoB;;iBAEpB,aAAa,UAAU,8BAA8B;;iBAErD,qBAAqB,qBAAqB,KAAK,SAAS,sCAAsC;;;;KAI1G,oBAAoB,MAAM,MAAM,cAAc;;;;;;UAMzC;EACR,UAAU,KAAK,eAAe,OAAO;;;;;;;;UAQ7B;;WAEC;WACA;WACA;WACA;WACA;;WAEA,MAAM;;;UAGP;;EAER,UAAU,MAAM,gBAAgB,OAAO;;;;;;;;;;;;;;UAc/B,gBAAgB,aAAa;;;;;EAKrC,UAAU,KAAK,eAAe,OAAO,OAAO;;;;;;EAM5C,UAAU,KAAK,cAAc,aAA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;;UAE1C;;WAEC;;;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;;UAED;;WAEC,OAAO;WACP,WAAW;;WAEX;;UAED;WACC,WAAW;WACX;;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;;;;;;;;;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
+ {"version":3,"file":"app-config-XA11xusE-vPWWyUSk.d.mts","names":[],"sources":["../../../0-framework/1-core/core/dist/app-config-XA11xusE.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;UAmBU;;WAEC;;WAEA;;;;;;;UAOD;WACC,OAAO;;WAEP;;EAET;;;;;;;;;;;;;;;UAeQ,qBAAqB;;WAEpB;;WAEA,SAAS;;;;;;;;;;;;UAYV,oBAAoB,UAAU,oBAAoB,mBAAmB;;EAE7E,OAAO,OAAO,sBAAsB,cAAc,qBAAqB,KAAK,QAAQ;;EAEpF,OAAO,OAAO,sBAAsB,cAAc,qBAAqB,KAAK,QAAQ;;EAEpF,OAAO,UAAU,GAAG,cAAc,qBAAqB,KAAK;;EAE5D,YAAY,qBAAqB;;;iBAGlB,oBAAoB;;iBAEpB,aAAa,WAAW,oBAAoB,qBAAqB;;UAExE;WACC;WACA,YA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arSafeExtensionId } 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-XA11xusE-vPWWyUSk.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-DR7ku-WW-Dun53zka.mjs";
2
- import "./config-5sq9lPhi.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 deserializeContainers, 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 defineConfig, S as LocalTargetCurrentInput, T as LocalTargetProvidersInput, U as RunOutcome, V as ReportBeginInput, W as RunReporter, X as containerEnv, Z as containerEnvVarName, _ as LocalNodeLocation, b as LocalTargetAttachment, c as ContainerInstance, ct as readPreflightPayload, d as DeployedEntity, et as devEnvironmentDir, g as LocalNodeCondition, h as ExtensionDescriptor, l as DEV_DIR, o as ContainerCredentials, ot as preflightEnv, q as StateDescriptor, s as ContainerDescriptor, st as preflightEnvVarName, tt as isBuildOnlyExtension, u as DEV_ENVIRONMENT_NAME_FILE, v as LocalNodeStopped, w as LocalTargetEmulatorsInput, x as LocalTargetCurrentApp, y as LocalTargetAttachInput } from "./app-config-XA11xusE-vPWWyUSk.mjs";
2
+ import "./config-C82Nzw7p.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
1
  import { gt as CliStructuredError } from "./graph-types-Cegbwb_X-BU-H2pnt.mjs";
2
- import { I as PrismaAppConfig } from "./app-config-DR7ku-WW-Dun53zka.mjs";
3
- import "./config-5sq9lPhi.mjs";
2
+ import { L as PrismaAppConfig } from "./app-config-XA11xusE-vPWWyUSk.mjs";
3
+ import "./config-C82Nzw7p.mjs";
4
4
  import "./index-B-9Dc0J7.mjs";
5
- import "./deploy-5sq9lPhi.mjs";
6
- import { n as DeploymentSummary, t as DeployedNodeSummary } from "./deployment-summary-p88NV5m5-Btf0R5T3.mjs";
5
+ import "./deploy-C82Nzw7p.mjs";
6
+ import { n as DeploymentSummary, t as DeployedNodeSummary } from "./deployment-summary-p88NV5m5-CmEiTIAj.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-BApQuViv.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
@@ -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,21 +254,29 @@ 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
@@ -316,6 +329,8 @@ interface LogInput {
316
329
  /** The entry module, resolved against `cwd`. Overrides the `entry` in `config`; without either the operation fails with `CONFIG.ENTRY_MISSING`. */
317
330
  readonly entry?: string | undefined;
318
331
  readonly name?: string | undefined;
332
+ /** The environment whose local copy to read. Defaults to `dev`. */
333
+ readonly environment?: string | undefined;
319
334
  /** Restrict to one service's dotted address; validated against running services. */
320
335
  readonly address?: string | undefined;
321
336
  /** Trailing history lines before live output. Defaults to 0 (live only). */
@@ -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-BApQuViv.d.mts","../../../0-framework/3-tooling/cli/dist/control.d.mts"],"mappings":";;;;;;;;;UAGU;;WAEC,OAAO;;WAEP;;;;;;;;UCHD,GAAG;WACF;WACA,OAAO;EAChB,YAAY;EACZ;;;;;UAKQ,MAAM;WACL;WACA,SAAS;EAClB;EACA,eAAe;;;;;;;;KAQZ,OAAO,GAAG,KAAK,GAAG,KAAK,MAAM;;;;;;;UCwDxB;WACC;WACA;;WAEA;;;;;;;;;;UA0CD;;;WAGC;;;;WAIA;WACA;WACA;WACA;;;;;;iBAMM,qBAAqB,GAAG,qBAAqB;;;;KAIzD;WACM;;WAEA;WACA;;KAEN;WACM;WACA,MAAM;;WAEN;WACA,MAAM;WACN;WACA;;WAEA,OAAO,SAAS;;UAIjB;;;;WAIC,QAAQ;;WAER;;WAEA;;WAEA;;WAEA;;;;;;;WAOA;;;;;;;WAOA;;WAEA,YAAY,OAAO;;UAEpB;;;WAGC,SAAS;;WAET;;iBAEM,OAAO,OAAO,cAAc,QAAQ,OAAO,eAAe;;;KAOtE;;;WAGM;WACA,oBAAoB;;WAEpB;WACA;;WAEA;WACA;;;;WAIA;WACA;;;;WAIA;WACA;;;;WAIA;WACA;WACA;WACA;;;;WAIA;WACA;WACA;WACA;;;;WAIA;WACA;WACA;;;;WAIA;WACA;WACA;;WAEA;;;;WAIA;WACA;;WAEA;;UAED;;;;WAIC,QAAQ;;WAER;WACA;WACA;;;;;;WAMA;WACA;WACA,YAAY,OAAO;;;;;UAKpB;;WAEC,oBAAoB;;;EAG7B,QAAQ;;WAEC,QAAQ;;iBAEF,IAAI,OAAO,WAAW,QAAQ,OAAO,YAAY;;;UAOxD;;WAEC,QAAQ;;WAER;;WAEA;;UAED;WACC;;WAEA;;WAEA;;WAEA;;WAEA;;UAED;WACC,QAAQ;;WAER;;UAED;;WAEC;;WAEA;aACE;aACA;;;;iBAII,OAAO,OAAO,cAAc,QAAQ,OAAO,QAAQ;;iBAEnD,QAAQ,OAAO,eAAe,QAAQ,OAAO,YAAY;;;;KC7UrE;;;WAGM;WACA;;UAED;;;;WAIC,QAAQ;;WAER;WACA;;WAEA;WACA;;WAEA,YAAY,OAAO;;iBAEb,QAAQ,OAAO,eAAe,QAAQ,aAAe;;;UAG5D;WACC;WACA;;KAEN;;;WAGM;WACA;;;;;WAKA;WACA;;UAED;;;;;WAKC,QAAQ;;WAER;WACA;;WAEA;;WAEA;WACA;;WAEA,SAAS;WACT,YAAY,OAAO;;UAEpB;;WAEC;;;WAGA,mBAAmB;;WAEnB,OAAO,cAAc;;iBAEf,IAAI,OAAO,WAAW,QAAQ,OAAS,aAAa;;;;cAIvD;;cAEA;UACJ;;WAEC;WACA;;;;;;;UAOD;WACC;WACA;;WAEA;WACA;WACA,gBAAgB;WAChB,SAAS"}
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-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;;;;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dist/control.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as CliStructuredError } from "./errors-0e8IVwzi.mjs";
2
- import { a as executionDiagnostics, c as notOk, i as devUrl, n as dev, o as executorLoadFailure, r as devStop, t as deploy } from "./dev-current-8HfFCN7C-C8Ste3qf.mjs";
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-DMzFQ3va-CuaeFUh5.mjs";
3
3
  import { n as RUN_REPORT_VERSION, t as RUN_REPORT_FILE_ENV } from "./run-report-CmBz2-xc-S50d4g5V.mjs";
4
4
  //#region ../../0-framework/3-tooling/cli/dist/control.mjs
5
5
  /**
@@ -21,7 +21,7 @@ async function destroyWithDeps(input, deps) {
21
21
  const cwd = input.cwd ?? process.cwd();
22
22
  let executor;
23
23
  try {
24
- executor = await import("./execute-deploy-destroy-DerNHILD-BStnE2yG.mjs");
24
+ executor = await import("./execute-deploy-destroy-C13H3wl--BJUHsAZQ.mjs");
25
25
  } catch (error) {
26
26
  return notOk(executorLoadFailure("destroy", error));
27
27
  }
@@ -43,7 +43,7 @@ async function logWithDeps(input, deps) {
43
43
  const cwd = input.cwd ?? process.cwd();
44
44
  let executor;
45
45
  try {
46
- executor = await import("./execute-log-kq4gyrh9-DjAlYz6O.mjs");
46
+ executor = await import("./execute-log-BLiBVIIR-LcNvz-28.mjs");
47
47
  } catch (error) {
48
48
  return notOk(executorLoadFailure("log", error));
49
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"control.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/control.mjs"],"sourcesContent":["import { c as executionDiagnostics, l as executorLoadFailure, n as devUrl, o as deploy, r as dev, t as devStop } from \"./dev-current-8HfFCN7C.mjs\";\nimport { n as RUN_REPORT_VERSION, t as RUN_REPORT_FILE_ENV } from \"./run-report-CmBz2-xc.mjs\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport { notOk } from \"@internal/foundation/result\";\n//#region src/operations/destroy.ts\n/**\n* The programmatic `destroy` operation (`@prisma/composer/control`): typed\n* input, structured result, no argv, no console, no process.exit. No CLI\n* command wraps it. The executor\n* loads lazily, so importing this module executes nothing; an executor that\n* fails to load comes back as a structured failure, never a throw out of\n* the host.\n*/\nasync function destroy(input) {\n\treturn destroyWithDeps(input, {});\n}\n/** In-package variant threading the injection seam, for the unit tests.\n* Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function destroyWithDeps(input, deps) {\n\tif (typeof input.environment !== \"string\" || input.environment.length === 0) return notOk(environmentRequired());\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-deploy-destroy-DerNHILD.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"destroy\", error));\n\t}\n\treturn executor.executeDestroy(input, deps, cwd);\n}\nfunction environmentRequired() {\n\treturn new CliStructuredError(\"DEPLOY.ENVIRONMENT_REQUIRED\", \"destroy needs the name of the environment to destroy.\", {\n\t\twhy: \"Destroy never defaults to production, so a call without a name has no target.\",\n\t\tfix: \"Pass `environment`, for example `destroy({ environment: 'staging', config })`.\"\n\t});\n}\n//#endregion\n//#region src/operations/log.ts\nasync function log(input) {\n\treturn logWithDeps(input, {});\n}\n/** In-package variant threading the injection seam, for the unit tests.\n* Deliberately NOT re-exported through `./control` — the seam\n* mirrors internal types and is not part of the published surface. */\nasync function logWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-log-kq4gyrh9.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"log\", error));\n\t}\n\treturn executor.executeLog(input, deps, cwd);\n}\n//#endregion\nexport { RUN_REPORT_FILE_ENV, RUN_REPORT_VERSION, deploy, destroy, dev, devStop, devUrl, executionDiagnostics, log };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;AAaA,eAAe,QAAQ,OAAO;CAC7B,OAAO,gBAAgB,OAAO,CAAC,CAAC;AACjC;;;;AAIA,eAAe,gBAAgB,OAAO,MAAM;CAC3C,IAAI,OAAO,MAAM,gBAAgB,YAAY,MAAM,YAAY,WAAW,GAAG,OAAO,MAAM,oBAAoB,CAAC;CAC/G,MAAM,MAAM,MAAM,OAAO,QAAQ,IAAI;CACrC,IAAI;CACJ,IAAI;EACH,WAAW,MAAM,OAAO;CACzB,SAAS,OAAO;EACf,OAAO,MAAM,oBAAoB,WAAW,KAAK,CAAC;CACnD;CACA,OAAO,SAAS,eAAe,OAAO,MAAM,GAAG;AAChD;AACA,SAAS,sBAAsB;CAC9B,OAAO,IAAI,mBAAmB,+BAA+B,yDAAyD;EACrH,KAAK;EACL,KAAK;CACN,CAAC;AACF;AAGA,eAAe,IAAI,OAAO;CACzB,OAAO,YAAY,OAAO,CAAC,CAAC;AAC7B;;;;AAIA,eAAe,YAAY,OAAO,MAAM;CACvC,MAAM,MAAM,MAAM,OAAO,QAAQ,IAAI;CACrC,IAAI;CACJ,IAAI;EACH,WAAW,MAAM,OAAO;CACzB,SAAS,OAAO;EACf,OAAO,MAAM,oBAAoB,OAAO,KAAK,CAAC;CAC/C;CACA,OAAO,SAAS,WAAW,OAAO,MAAM,GAAG;AAC5C"}
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-DMzFQ3va.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-C13H3wl-.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-BLiBVIIR.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-XA11xusE-vPWWyUSk.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-DR7ku-WW-Dun53zka.mjs";
2
- import "./deploy-5sq9lPhi.mjs";
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, Y as buildConfig, a as Bundle, at as mergedProviders, d as DeployedEntity, f as DeployedNode, i as AssembleInput, it as lowering, j as Lowering, k as LowerOptions, lt as resolveStateLayer, m as DevServer, n as ApplicationDescriptor, nt as joinDeployment, p as DeploymentResult, r as Artifact, rt as lower, t as AlchemyStateLayer, z as ProvisionerDescriptor } from "./app-config-XA11xusE-vPWWyUSk.mjs";
2
+ import "./deploy-C82Nzw7p.mjs";
3
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,5 +1,5 @@
1
- import { u as DeployedEntity } from "./app-config-DR7ku-WW-Dun53zka.mjs";
2
- import "./deploy-5sq9lPhi.mjs";
1
+ import { d as DeployedEntity } from "./app-config-XA11xusE-vPWWyUSk.mjs";
2
+ import "./deploy-C82Nzw7p.mjs";
3
3
  //#region ../../0-framework/3-tooling/cli/dist/deployment-summary-p88NV5m5.d.mts
4
4
  //#region src/deployment-summary.d.ts
5
5
  /** The serializable projection of DeploymentResult — what CAN cross the process
@@ -27,4 +27,4 @@ interface DeploymentSummary {
27
27
  declare function captureEngineFailure(): void;
28
28
  //#endregion
29
29
  export { DeploymentSummary as n, captureEngineFailure as r, DeployedNodeSummary as t };
30
- //# sourceMappingURL=deployment-summary-p88NV5m5-Btf0R5T3.d.mts.map
30
+ //# sourceMappingURL=deployment-summary-p88NV5m5-CmEiTIAj.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deployment-summary-p88NV5m5-Btf0R5T3.d.mts","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/deployment-summary-p88NV5m5.d.mts"],"mappings":";;;;;;UAIU;WACC;WACA,mBAAmB;;UAEpB;WACC;WACA,gBAAgB;;;;;;;;;;;;;;iBAcV"}
1
+ {"version":3,"file":"deployment-summary-p88NV5m5-CmEiTIAj.d.mts","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/deployment-summary-p88NV5m5.d.mts"],"mappings":";;;;;;UAIU;WACC;WACA,mBAAmB;;UAEpB;WACC;WACA,gBAAgB;;;;;;;;;;;;;;iBAcV"}
@@ -88,7 +88,7 @@ function okVoid() {
88
88
  return OK_VOID;
89
89
  }
90
90
  //#endregion
91
- //#region ../../0-framework/3-tooling/cli/dist/dev-current-8HfFCN7C.mjs
91
+ //#region ../../0-framework/3-tooling/cli/dist/dev-current-DMzFQ3va.mjs
92
92
  /**
93
93
  * Reads the execution diagnostics an engine-failure error carries in
94
94
  * `meta.diagnostics`; undefined for every other failure.
@@ -116,6 +116,40 @@ function executorLoadFailure(operation, error) {
116
116
  cause: error
117
117
  });
118
118
  }
119
+ const RUN_OF = {
120
+ deploy: {
121
+ running: "this deploy",
122
+ runs: "the deploy"
123
+ },
124
+ destroy: {
125
+ running: "this destroy",
126
+ runs: "the destroy"
127
+ },
128
+ dev: {
129
+ running: "`prisma dev`",
130
+ runs: "`prisma dev`"
131
+ }
132
+ };
133
+ /**
134
+ * An extension older than this Composer stores the input it is given but
135
+ * resolves from a key without `environment`, so it may read every name as
136
+ * production, or, locally, put every environment in one copy. Its
137
+ * `deserialize` rebuilds only the fields it knows, so the container the
138
+ * Alchemy child rebuilds shows which environment it really resolved.
139
+ * Refusing here keeps a mismatched install from deploying into, destroying
140
+ * or running the wrong place.
141
+ */
142
+ function requireContainerForEnvironment(action, extensionId, descriptor, instance, environment) {
143
+ let rebuiltEnvironment;
144
+ try {
145
+ rebuiltEnvironment = descriptor.deserialize(instance.serialize()).input.environment;
146
+ } catch {
147
+ rebuiltEnvironment = void 0;
148
+ }
149
+ if (rebuiltEnvironment === environment) return;
150
+ const { running, runs } = RUN_OF[action];
151
+ throw new CliStructuredError("DEPS.EXTENSION_INCOMPATIBLE", `The extension ${extensionId} is older than the Composer running ${running}, so it would not resolve the environment ${environment}.`, { fix: `Install the same Composer version of ${extensionId} as the Composer that runs ${runs}.` });
152
+ }
119
153
  async function deploy(input) {
120
154
  return deployWithDeps(input, {});
121
155
  }
@@ -127,7 +161,7 @@ async function deployWithDeps(input, deps) {
127
161
  const cwd = input.cwd ?? process.cwd();
128
162
  let executor;
129
163
  try {
130
- executor = await import("./execute-deploy-destroy-DerNHILD-BStnE2yG.mjs");
164
+ executor = await import("./execute-deploy-destroy-C13H3wl--BJUHsAZQ.mjs");
131
165
  } catch (error) {
132
166
  return notOk(executorLoadFailure("deploy", error));
133
167
  }
@@ -148,7 +182,7 @@ async function devWithDeps(input, deps) {
148
182
  const cwd = input.cwd ?? process.cwd();
149
183
  let executor;
150
184
  try {
151
- executor = await import("./execute-dev-D_JvTKjS-BjlfRv3L.mjs");
185
+ executor = await import("./execute-dev-C_SQ02a6-B-4TNU12.mjs");
152
186
  } catch (error) {
153
187
  return notOk(executorLoadFailure("dev", error));
154
188
  }
@@ -156,24 +190,24 @@ async function devWithDeps(input, deps) {
156
190
  }
157
191
  async function loadExecutor(operation) {
158
192
  try {
159
- return ok(await import("./execute-dev-current-BRJkR4Y1-KETGQ-7f.mjs"));
193
+ return ok(await import("./execute-dev-current-BlIyvq-Q-DYNdH1v4.mjs"));
160
194
  } catch (error) {
161
195
  return notOk(executorLoadFailure(operation, error));
162
196
  }
163
197
  }
164
- /** Where the node at `input.address` of the directory's current app runs locally. */
198
+ /** Where the node at `input.address` runs locally in the environment. */
165
199
  async function devUrl(input) {
166
200
  const executor = await loadExecutor("dev url");
167
201
  if (!executor.ok) return executor;
168
202
  return executor.value.executeDevUrl(input, input.cwd ?? process.cwd());
169
203
  }
170
- /** Stops the directory's current app: its service processes and database servers. Data and ports stay. */
204
+ /** Stops the app's local copy in the environment: its service processes and database servers. Data and ports stay. */
171
205
  async function devStop(input) {
172
206
  const executor = await loadExecutor("dev stop");
173
207
  if (!executor.ok) return executor;
174
208
  return executor.value.executeDevStop(input, input.cwd ?? process.cwd());
175
209
  }
176
210
  //#endregion
177
- export { executionDiagnostics as a, notOk as c, devUrl as i, ok as l, dev as n, executorLoadFailure as o, devStop as r, toStructured as s, deploy as t, okVoid as u };
211
+ export { executionDiagnostics as a, toStructured as c, okVoid as d, devUrl as i, notOk as l, dev as n, executorLoadFailure as o, devStop as r, requireContainerForEnvironment as s, deploy as t, ok as u };
178
212
 
179
- //# sourceMappingURL=dev-current-8HfFCN7C-C8Ste3qf.mjs.map
213
+ //# sourceMappingURL=dev-current-DMzFQ3va-CuaeFUh5.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-current-DMzFQ3va-CuaeFUh5.mjs","names":[],"sources":["../../../0-framework/0-foundation/foundation/dist/result.mjs","../../../0-framework/3-tooling/cli/dist/dev-current-DMzFQ3va.mjs"],"sourcesContent":["import { t as blindCast } from \"./casts-DpaahrlC.mjs\";\nimport { t as InternalError } from \"./internal-error-Dfur7Zqt.mjs\";\n//#region src/result.ts\n/**\n* Generic Result type for representing success or failure outcomes.\n*\n* This is the standard way to return \"expected failures\" as values rather than\n* throwing exceptions. See docs/Error Handling.md for the full taxonomy.\n*\n* Naming rationale:\n* - `Ok<T>` / `NotOk<F>` mirror the `ok: true/false` discriminator\n* - `NotOk` avoids collision with domain types like \"Failure\" or \"Error\"\n* - `failure` property distinguishes from JS Error semantics\n*/\n/**\n* Result class that implements both Ok and NotOk variants.\n*/\nvar ResultImpl = class ResultImpl {\n\tok;\n\t_value;\n\t_failure;\n\tconstructor(ok, valueOrFailure) {\n\t\tthis.ok = ok;\n\t\tif (ok) this._value = blindCast(valueOrFailure);\n\t\telse this._failure = blindCast(valueOrFailure);\n\t\tObject.freeze(this);\n\t}\n\tget value() {\n\t\tif (!this.ok) throw new InternalError(\"Cannot access value on NotOk result\");\n\t\treturn this._value;\n\t}\n\tget failure() {\n\t\tif (this.ok) throw new InternalError(\"Cannot access failure on Ok result\");\n\t\treturn this._failure;\n\t}\n\t/**\n\t* Creates a successful result.\n\t*/\n\tstatic ok(value) {\n\t\treturn blindCast(new ResultImpl(true, value));\n\t}\n\t/**\n\t* Creates an unsuccessful result.\n\t*/\n\tstatic notOk(failure) {\n\t\treturn blindCast(new ResultImpl(false, failure));\n\t}\n\t/**\n\t* Asserts that this result is Ok and returns the value.\n\t* Throws if the result is NotOk.\n\t*/\n\tassertOk() {\n\t\tif (!this.ok) throw new InternalError(\"Expected Ok result but got NotOk\");\n\t\treturn this.value;\n\t}\n\t/**\n\t* Asserts that this result is NotOk and returns the failure.\n\t* Throws if the result is Ok.\n\t*/\n\tassertNotOk() {\n\t\tif (this.ok) throw new InternalError(\"Expected NotOk result but got Ok\");\n\t\treturn this.failure;\n\t}\n};\n/**\n* Creates a successful result.\n*/\nfunction ok(value) {\n\treturn ResultImpl.ok(value);\n}\n/**\n* Creates an unsuccessful result.\n*/\nfunction notOk(failure) {\n\treturn ResultImpl.notOk(failure);\n}\n/**\n* Singleton for void success results.\n* Use this for validation checks that don't produce a value.\n*/\nconst OK_VOID = ResultImpl.ok(void 0);\n/**\n* Returns a successful void result.\n* Use this for validation checks that don't produce a value.\n*/\nfunction okVoid() {\n\treturn OK_VOID;\n}\n//#endregion\nexport { notOk, ok, okVoid };\n\n//# sourceMappingURL=result.mjs.map","import { CliStructuredError } from \"@internal/foundation/errors\";\nimport { blindCast } from \"@internal/foundation/casts\";\nimport { notOk, ok } from \"@internal/foundation/result\";\n//#region src/operations/shared.ts\n/**\n* Reads the execution diagnostics an engine-failure error carries in\n* `meta.diagnostics`; undefined for every other failure.\n*/\nfunction executionDiagnostics(f) {\n\tconst diagnostics = f.meta?.[\"diagnostics\"];\n\tif (typeof diagnostics !== \"object\" || diagnostics === null) return void 0;\n\tconst candidate = blindCast(diagnostics);\n\tif (candidate[\"exitCode\"] !== void 0 && typeof candidate[\"exitCode\"] !== \"number\" || candidate[\"signal\"] !== void 0 && typeof candidate[\"signal\"] !== \"string\" || typeof candidate[\"stackFilePath\"] !== \"string\" || typeof candidate[\"reproduceCommand\"] !== \"string\" || typeof candidate[\"cwd\"] !== \"string\") return;\n\treturn blindCast(diagnostics);\n}\n/**\n* Site-specific wrap for foreign extension/environment causes — passthrough\n* when already structured; never a boundary fallback (base-type rule 6(ii)).\n*/\nfunction toStructured(code, error) {\n\treturn CliStructuredError.is(error) ? error : new CliStructuredError(code, error instanceof Error ? error.message : String(error), { cause: error });\n}\n/** A failed executor import: an environmental failure of the consumer's\n* installed tree, not a bug here. The import error rides as the cause. */\nfunction executorLoadFailure(operation, error) {\n\treturn new CliStructuredError(\"DEPS.EXECUTOR_UNLOADABLE\", `Could not load the ${operation} executor: ${error instanceof Error ? error.message : String(error)}`, {\n\t\twhy: `The ${operation} operation's executor imports the deploy engine's provider tree from your app's installed dependencies, and that import failed.`,\n\t\tfix: \"Reinstall your dependencies, and check that `alchemy` is installed and loadable from your app.\",\n\t\tcause: error\n\t});\n}\nconst RUN_OF = {\n\tdeploy: {\n\t\trunning: \"this deploy\",\n\t\truns: \"the deploy\"\n\t},\n\tdestroy: {\n\t\trunning: \"this destroy\",\n\t\truns: \"the destroy\"\n\t},\n\tdev: {\n\t\trunning: \"`prisma dev`\",\n\t\truns: \"`prisma dev`\"\n\t}\n};\n/**\n* An extension older than this Composer stores the input it is given but\n* resolves from a key without `environment`, so it may read every name as\n* production, or, locally, put every environment in one copy. Its\n* `deserialize` rebuilds only the fields it knows, so the container the\n* Alchemy child rebuilds shows which environment it really resolved.\n* Refusing here keeps a mismatched install from deploying into, destroying\n* or running the wrong place.\n*/\nfunction requireContainerForEnvironment(action, extensionId, descriptor, instance, environment) {\n\tlet rebuiltEnvironment;\n\ttry {\n\t\trebuiltEnvironment = descriptor.deserialize(instance.serialize()).input.environment;\n\t} catch {\n\t\trebuiltEnvironment = void 0;\n\t}\n\tif (rebuiltEnvironment === environment) return;\n\tconst { running, runs } = RUN_OF[action];\n\tthrow new CliStructuredError(\"DEPS.EXTENSION_INCOMPATIBLE\", `The extension ${extensionId} is older than the Composer running ${running}, so it would not resolve the environment ${environment}.`, { fix: `Install the same Composer version of ${extensionId} as the Composer that runs ${runs}.` });\n}\n//#endregion\n//#region src/operations/deploy.ts\n/** The environment `deploy` targets when none is named. */\nconst DEFAULT_DEPLOY_ENVIRONMENT = \"production\";\nasync function deploy(input) {\n\treturn deployWithDeps(input, {});\n}\n/** In-package variant threading the injection seam, which the family's\n* commands and the unit tests use. Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function deployWithDeps(input, deps) {\n\tconst startedAt = performance.now();\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-deploy-destroy-C13H3wl-.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"deploy\", error));\n\t}\n\tconst result = await executor.executeDeploy(input, deps, cwd);\n\tif (!result.ok) return result;\n\treturn ok({\n\t\t...result.value,\n\t\tdurationMs: Math.round(performance.now() - startedAt)\n\t});\n}\n//#endregion\n//#region src/operations/dev.ts\nasync function dev(input) {\n\treturn devWithDeps(input, {});\n}\n/** In-package variant threading the injection seam, which the family's\n* commands and the unit tests use. Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function devWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-dev-C_SQ02a6.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"dev\", error));\n\t}\n\treturn executor.executeDev(input, deps, cwd);\n}\n//#endregion\n//#region src/operations/dev-current.ts\nasync function loadExecutor(operation) {\n\ttry {\n\t\treturn ok(await import(\"./execute-dev-current-BlIyvq-Q.mjs\"));\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(operation, error));\n\t}\n}\n/** Where the node at `input.address` runs locally in the environment. */\nasync function devUrl(input) {\n\tconst executor = await loadExecutor(\"dev url\");\n\tif (!executor.ok) return executor;\n\treturn executor.value.executeDevUrl(input, input.cwd ?? process.cwd());\n}\n/** Stops the app's local copy in the environment: its service processes and database servers. Data and ports stay. */\nasync function devStop(input) {\n\tconst executor = await loadExecutor(\"dev stop\");\n\tif (!executor.ok) return executor;\n\treturn executor.value.executeDevStop(input, input.cwd ?? process.cwd());\n}\n//#endregion\nexport { DEFAULT_DEPLOY_ENVIRONMENT as a, executionDiagnostics as c, toStructured as d, devWithDeps as i, executorLoadFailure as l, devUrl as n, deploy as o, dev as r, deployWithDeps as s, devStop as t, requireContainerForEnvironment as u };\n\n//# sourceMappingURL=dev-current-DMzFQ3va.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,IAAI,aAAa,MAAM,WAAW;CACjC;CACA;CACA;CACA,YAAY,IAAI,gBAAgB;EAC/B,KAAK,KAAK;EACV,IAAI,IAAI,KAAK,SAAS,UAAU,cAAc;OACzC,KAAK,WAAW,UAAU,cAAc;EAC7C,OAAO,OAAO,IAAI;CACnB;CACA,IAAI,QAAQ;EACX,IAAI,CAAC,KAAK,IAAI,MAAM,IAAI,cAAc,qCAAqC;EAC3E,OAAO,KAAK;CACb;CACA,IAAI,UAAU;EACb,IAAI,KAAK,IAAI,MAAM,IAAI,cAAc,oCAAoC;EACzE,OAAO,KAAK;CACb;;;;CAIA,OAAO,GAAG,OAAO;EAChB,OAAO,UAAU,IAAI,WAAW,MAAM,KAAK,CAAC;CAC7C;;;;CAIA,OAAO,MAAM,SAAS;EACrB,OAAO,UAAU,IAAI,WAAW,OAAO,OAAO,CAAC;CAChD;;;;;CAKA,WAAW;EACV,IAAI,CAAC,KAAK,IAAI,MAAM,IAAI,cAAc,kCAAkC;EACxE,OAAO,KAAK;CACb;;;;;CAKA,cAAc;EACb,IAAI,KAAK,IAAI,MAAM,IAAI,cAAc,kCAAkC;EACvE,OAAO,KAAK;CACb;AACD;;;;AAIA,SAAS,GAAG,OAAO;CAClB,OAAO,WAAW,GAAG,KAAK;AAC3B;;;;AAIA,SAAS,MAAM,SAAS;CACvB,OAAO,WAA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MAAM,OAAO,QAAQ,IAAI,CAAC;AACtE;;AAEA,eAAe,QAAQ,OAAO;CAC7B,MAAM,WAAW,MAAM,aAAa,UAAU;CAC9C,IAAI,CAAC,SAAS,IAAI,OAAO;CACzB,OAAO,SAAS,MAAM,eAAe,OAAO,MAAM,OAAO,QAAQ,IAAI,CAAC;AACvE"}
@@ -0,0 +1,43 @@
1
+ import { t as CliStructuredError } from "./errors-0e8IVwzi.mjs";
2
+ import { n as DEV_ENVIRONMENT_NAME_FILE } from "./app-config-CErnR6NK-D9NgSBH4.mjs";
3
+ import "./local-target-DySKw61w.mjs";
4
+ import * as fs$1 from "node:fs";
5
+ import * as path$1 from "node:path";
6
+ //#region ../../0-framework/3-tooling/cli/dist/dev-environment-name-6eEr5PW8.mjs
7
+ /**
8
+ * Each environment's folder records the environment's exact name. On a
9
+ * case-insensitive filesystem `--environment Dev` would otherwise open the
10
+ * folder of `dev` and run, or `--fresh` delete, that copy.
11
+ */
12
+ function recordedName(devDir) {
13
+ const file = path$1.join(devDir, DEV_ENVIRONMENT_NAME_FILE);
14
+ return fs$1.existsSync(file) ? fs$1.readFileSync(file, "utf8").trim() : void 0;
15
+ }
16
+ function nameMismatch(devDir, recorded, environment) {
17
+ return new CliStructuredError("DEV.ENVIRONMENT_NAME_MISMATCH", `The folder ${devDir} holds the local copy of the environment ${recorded}, not ${environment}.`, {
18
+ why: "On a case-insensitive filesystem, such as the default on macOS, environment names that differ only in case share one folder, so they cannot be separate local copies.",
19
+ fix: `Pass \`--environment ${recorded}\` for that copy, or pick a name that differs from ${recorded} by more than case.`,
20
+ meta: {
21
+ devDir,
22
+ recorded,
23
+ environment
24
+ }
25
+ });
26
+ }
27
+ /** Fails when the folder records another environment's name; a folder with no name recorded passes. */
28
+ function requireDevEnvironmentName(devDir, environment) {
29
+ const recorded = recordedName(devDir);
30
+ if (recorded !== void 0 && recorded !== environment) throw nameMismatch(devDir, recorded, environment);
31
+ }
32
+ /** Records the environment's name in its folder on first use; fails when the folder records another name. */
33
+ function claimDevEnvironmentName(devDir, environment) {
34
+ const recorded = recordedName(devDir);
35
+ if (recorded === environment) return;
36
+ if (recorded !== void 0) throw nameMismatch(devDir, recorded, environment);
37
+ fs$1.mkdirSync(devDir, { recursive: true });
38
+ fs$1.writeFileSync(path$1.join(devDir, DEV_ENVIRONMENT_NAME_FILE), `${environment}\n`);
39
+ }
40
+ //#endregion
41
+ export { requireDevEnvironmentName as n, claimDevEnvironmentName as t };
42
+
43
+ //# sourceMappingURL=dev-environment-name-6eEr5PW8-CGk1ijP7.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-environment-name-6eEr5PW8-CGk1ijP7.mjs","names":["path","fs"],"sources":["../../../0-framework/3-tooling/cli/dist/dev-environment-name-6eEr5PW8.mjs"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport { DEV_ENVIRONMENT_NAME_FILE } from \"@internal/core/local-target\";\n//#region src/operations/dev-environment-name.ts\n/**\n* Each environment's folder records the environment's exact name. On a\n* case-insensitive filesystem `--environment Dev` would otherwise open the\n* folder of `dev` and run, or `--fresh` delete, that copy.\n*/\nfunction recordedName(devDir) {\n\tconst file = path.join(devDir, DEV_ENVIRONMENT_NAME_FILE);\n\treturn fs.existsSync(file) ? fs.readFileSync(file, \"utf8\").trim() : void 0;\n}\nfunction nameMismatch(devDir, recorded, environment) {\n\treturn new CliStructuredError(\"DEV.ENVIRONMENT_NAME_MISMATCH\", `The folder ${devDir} holds the local copy of the environment ${recorded}, not ${environment}.`, {\n\t\twhy: \"On a case-insensitive filesystem, such as the default on macOS, environment names that differ only in case share one folder, so they cannot be separate local copies.\",\n\t\tfix: `Pass \\`--environment ${recorded}\\` for that copy, or pick a name that differs from ${recorded} by more than case.`,\n\t\tmeta: {\n\t\t\tdevDir,\n\t\t\trecorded,\n\t\t\tenvironment\n\t\t}\n\t});\n}\n/** Fails when the folder records another environment's name; a folder with no name recorded passes. */\nfunction requireDevEnvironmentName(devDir, environment) {\n\tconst recorded = recordedName(devDir);\n\tif (recorded !== void 0 && recorded !== environment) throw nameMismatch(devDir, recorded, environment);\n}\n/** Records the environment's name in its folder on first use; fails when the folder records another name. */\nfunction claimDevEnvironmentName(devDir, environment) {\n\tconst recorded = recordedName(devDir);\n\tif (recorded === environment) return;\n\tif (recorded !== void 0) throw nameMismatch(devDir, recorded, environment);\n\tfs.mkdirSync(devDir, { recursive: true });\n\tfs.writeFileSync(path.join(devDir, DEV_ENVIRONMENT_NAME_FILE), `${environment}\\n`);\n}\n//#endregion\nexport { requireDevEnvironmentName as n, claimDevEnvironmentName as t };\n\n//# sourceMappingURL=dev-environment-name-6eEr5PW8.mjs.map"],"mappings":";;;;;;;;;;;AAUA,SAAS,aAAa,QAAQ;CAC7B,MAAM,OAAOA,OAAK,KAAK,QAAQ,yBAAyB;CACxD,OAAOC,KAAG,WAAW,IAAI,IAAIA,KAAG,aAAa,MAAM,MAAM,CAAC,CAAC,KAAK,IAAI,KAAK;AAC1E;AACA,SAAS,aAAa,QAAQ,UAAU,aAAa;CACpD,OAAO,IAAI,mBAAmB,iCAAiC,cAAc,OAAO,2CAA2C,SAAS,QAAQ,YAAY,IAAI;EAC/J,KAAK;EACL,KAAK,wBAAwB,SAAS,qDAAqD,SAAS;EACpG,MAAM;GACL;GACA;GACA;EACD;CACD,CAAC;AACF;;AAEA,SAAS,0BAA0B,QAAQ,aAAa;CACvD,MAAM,WAAW,aAAa,MAAM;CACpC,IAAI,aAAa,KAAK,KAAK,aAAa,aAAa,MAAM,aAAa,QAAQ,UAAU,WAAW;AACtG;;AAEA,SAAS,wBAAwB,QAAQ,aAAa;CACrD,MAAM,WAAW,aAAa,MAAM;CACpC,IAAI,aAAa,aAAa;CAC9B,IAAI,aAAa,KAAK,GAAG,MAAM,aAAa,QAAQ,UAAU,WAAW;CACzE,KAAG,UAAU,QAAQ,EAAE,WAAW,KAAK,CAAC;CACxC,KAAG,cAAcD,OAAK,KAAK,QAAQ,yBAAyB,GAAG,GAAG,YAAY,GAAG;AAClF"}