@prisma/composer 0.6.0-dev.7 → 0.6.0-dev.8

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 (97) hide show
  1. package/dist/{app-config-Cbv_lA38-BHJsd1DF.d.mts → app-config-CFsSXEVj-B242oUnm.d.mts} +4 -4
  2. package/dist/{app-config-Cbv_lA38-BHJsd1DF.d.mts.map → app-config-CFsSXEVj-B242oUnm.d.mts.map} +1 -1
  3. package/dist/bin.mjs +6 -91
  4. package/dist/bin.mjs.map +1 -1
  5. package/dist/cli-B3sWzFlb-CxEIzKsQ.mjs +401 -0
  6. package/dist/cli-B3sWzFlb-CxEIzKsQ.mjs.map +1 -0
  7. package/dist/config-ku5b_2YD.d.mts +1 -0
  8. package/dist/config.d.mts +2 -2
  9. package/dist/container-transport-DKmKg5JQ-BMRhx5w-.mjs +75 -0
  10. package/dist/container-transport-DKmKg5JQ-BMRhx5w-.mjs.map +1 -0
  11. package/dist/control.d.mts +216 -0
  12. package/dist/control.d.mts.map +1 -0
  13. package/dist/control.mjs +70 -0
  14. package/dist/control.mjs.map +1 -0
  15. package/dist/deploy-ku5b_2YD.d.mts +1 -0
  16. package/dist/deploy.d.mts +2 -2
  17. package/dist/deploy.mjs +312 -1
  18. package/dist/deploy.mjs.map +1 -0
  19. package/dist/deployment-summary-r47O6kFr-CcMYVOn5.mjs +70 -0
  20. package/dist/deployment-summary-r47O6kFr-CcMYVOn5.mjs.map +1 -0
  21. package/dist/{dist-BdvFDCLV.mjs → dist-C5rZnr4n.mjs} +2 -2
  22. package/dist/{dist-BdvFDCLV.mjs.map → dist-C5rZnr4n.mjs.map} +1 -1
  23. package/dist/emulator-retry-DGonap4g-S8BNrXFD.mjs +24 -0
  24. package/dist/emulator-retry-DGonap4g-S8BNrXFD.mjs.map +1 -0
  25. package/dist/errors-0e8IVwzi.mjs +88 -0
  26. package/dist/errors-0e8IVwzi.mjs.map +1 -0
  27. package/dist/execute-deploy-destroy-IT4vGkMc-YM1Cv6cu.mjs +306 -0
  28. package/dist/execute-deploy-destroy-IT4vGkMc-YM1Cv6cu.mjs.map +1 -0
  29. package/dist/execute-deploy-destroy-IT4vGkMc-oO8yjHPH.mjs +265 -0
  30. package/dist/execute-deploy-destroy-IT4vGkMc-oO8yjHPH.mjs.map +1 -0
  31. package/dist/execute-dev-DLYyduEM-88uyvrbj.mjs +2009 -0
  32. package/dist/execute-dev-DLYyduEM-88uyvrbj.mjs.map +1 -0
  33. package/dist/execute-dev-DLYyduEM-BuUGTm0g.mjs +2006 -0
  34. package/dist/execute-dev-DLYyduEM-BuUGTm0g.mjs.map +1 -0
  35. package/dist/execute-log-VIOL4DBz-DBPH8By4.mjs +157 -0
  36. package/dist/execute-log-VIOL4DBz-DBPH8By4.mjs.map +1 -0
  37. package/dist/execute-log-VIOL4DBz-DKodBrxS.mjs +155 -0
  38. package/dist/execute-log-VIOL4DBz-DKodBrxS.mjs.map +1 -0
  39. package/dist/{graph-DgbALPDo-BEHF94BN.mjs → graph-BJgUfGB0-kvgFzT4q.mjs} +13 -7
  40. package/dist/graph-BJgUfGB0-kvgFzT4q.mjs.map +1 -0
  41. package/dist/{graph-DDpXh7S8-b-93BcHn.d.mts → graph-DqklX5Sf-BNS2aO1j.d.mts} +3 -3
  42. package/dist/graph-DqklX5Sf-BNS2aO1j.d.mts.map +1 -0
  43. package/dist/{graph-types-C3FOaaXm-C6_rGzfn.d.mts → graph-types-N6brq1zY-1VMNwtkJ.d.mts} +88 -5
  44. package/dist/graph-types-N6brq1zY-1VMNwtkJ.d.mts.map +1 -0
  45. package/dist/{index-BQVrMGfe.d.mts → index-DryPyF9U.d.mts} +3 -3
  46. package/dist/{index-BQVrMGfe.d.mts.map → index-DryPyF9U.d.mts.map} +1 -1
  47. package/dist/index.d.mts +3 -3
  48. package/dist/index.mjs +2 -2
  49. package/dist/internal-error-BIc-ehme-Ck_lgxD_.mjs +18 -0
  50. package/dist/internal-error-BIc-ehme-Ck_lgxD_.mjs.map +1 -0
  51. package/dist/local-target-DnA2E8IN.mjs +47 -0
  52. package/dist/local-target-DnA2E8IN.mjs.map +1 -0
  53. package/dist/local-target-DuSyWeYc.mjs +68 -0
  54. package/dist/local-target-DuSyWeYc.mjs.map +1 -0
  55. package/dist/local-target.d.mts +1 -1
  56. package/dist/local-target.mjs +2 -46
  57. package/dist/{nextjs-DLyeRR7M-D47aMmfr.d.mts → nextjs-DLyeRR7M-DZODs9tk.d.mts} +3 -3
  58. package/dist/{nextjs-DLyeRR7M-D47aMmfr.d.mts.map → nextjs-DLyeRR7M-DZODs9tk.d.mts.map} +1 -1
  59. package/dist/nextjs-control.d.mts +4 -4
  60. package/dist/nextjs.d.mts +1 -1
  61. package/dist/node-control.d.mts +3 -3
  62. package/dist/node.d.mts +2 -2
  63. package/dist/pipeline-D3QoVzAB-Ci2aJ2mE.mjs +331 -0
  64. package/dist/pipeline-D3QoVzAB-Ci2aJ2mE.mjs.map +1 -0
  65. package/dist/pipeline-D3QoVzAB-D_ufjg3N.mjs +857 -0
  66. package/dist/pipeline-D3QoVzAB-D_ufjg3N.mjs.map +1 -0
  67. package/dist/render-error-DsPN5qfr-CkVGj9uP.mjs +30 -0
  68. package/dist/render-error-DsPN5qfr-CkVGj9uP.mjs.map +1 -0
  69. package/dist/report.d.mts +4 -3
  70. package/dist/report.d.mts.map +1 -1
  71. package/dist/report.mjs +4 -1
  72. package/dist/report.mjs.map +1 -1
  73. package/dist/result-CFqJKiqg.mjs +106 -0
  74. package/dist/result-CFqJKiqg.mjs.map +1 -0
  75. package/dist/result-CzGChwbZ.mjs +231 -0
  76. package/dist/result-CzGChwbZ.mjs.map +1 -0
  77. package/dist/run-alchemy-hghRtddF-CQHOzlrW.mjs +48 -0
  78. package/dist/run-alchemy-hghRtddF-CQHOzlrW.mjs.map +1 -0
  79. package/dist/service-rpc.d.mts +2 -2
  80. package/dist/service-rpc.mjs +2 -2
  81. package/dist/shared-CCaR42wo-BvegvmA_.mjs +265 -0
  82. package/dist/shared-CCaR42wo-BvegvmA_.mjs.map +1 -0
  83. package/dist/testing.d.mts +1 -1
  84. package/package.json +11 -10
  85. package/src/exports/control.ts +1 -0
  86. package/dist/cli-IDJ-0ZFU-Dz2KMWtU.mjs +0 -3269
  87. package/dist/cli-IDJ-0ZFU-Dz2KMWtU.mjs.map +0 -1
  88. package/dist/cli-error-HxLpXiUX-LVlg5SlD.mjs +0 -16
  89. package/dist/cli-error-HxLpXiUX-LVlg5SlD.mjs.map +0 -1
  90. package/dist/config-whuqZ5xT.d.mts +0 -1
  91. package/dist/deploy-C4DxNkJ9-D73lmBqy.mjs +0 -313
  92. package/dist/deploy-C4DxNkJ9-D73lmBqy.mjs.map +0 -1
  93. package/dist/deploy-whuqZ5xT.d.mts +0 -1
  94. package/dist/graph-DDpXh7S8-b-93BcHn.d.mts.map +0 -1
  95. package/dist/graph-DgbALPDo-BEHF94BN.mjs.map +0 -1
  96. package/dist/graph-types-C3FOaaXm-C6_rGzfn.d.mts.map +0 -1
  97. package/dist/local-target.mjs.map +0 -1
@@ -0,0 +1,75 @@
1
+ import { a as CliStructuredError } from "./shared-CCaR42wo-BvegvmA_.mjs";
2
+ import * as fs from "node:fs";
3
+ import * as path from "node:path";
4
+ import { spawnSync } from "node:child_process";
5
+ //#region ../../0-framework/3-tooling/cli/dist/run-alchemy-hghRtddF.mjs
6
+ /**
7
+ * Pipeline step 7 (deploy-cli.md § The pipeline; design-notes.md's "Driving
8
+ * Alchemy" call): shell out to the generated stack file. Resolves the
9
+ * workspace's own installed `alchemy` bin (walking up `node_modules/.bin`
10
+ * from the generated file's package dir) rather than going through
11
+ * `bunx`/`npx`, so this works the same under node and bun — the resolved
12
+ * bin's own launcher (`alchemy/bin/cli.js`) does its own node/bun dispatch
13
+ * from there, driven by the env it inherits.
14
+ */
15
+ /** Walks up from `startDir` looking for `node_modules/.bin/alchemy`. */
16
+ function resolveAlchemyBin(startDir) {
17
+ let dir = startDir;
18
+ while (true) {
19
+ const candidate = path.join(dir, "node_modules", ".bin", "alchemy");
20
+ if (fs.existsSync(candidate)) return candidate;
21
+ const parent = path.dirname(dir);
22
+ if (parent === dir) throw new CliStructuredError("DEPLOY.ALCHEMY_BIN_MISSING", `Could not find an installed \`alchemy\` bin above "${startDir}".`, { fix: "Add \"alchemy\" as a dependency of your app." });
23
+ dir = parent;
24
+ }
25
+ }
26
+ /** Runs `alchemy deploy|destroy <stack file> --yes --stage <stage>`, inheriting stdio + env, plus every extension's resolved container. */
27
+ function runAlchemy(input) {
28
+ const result = spawnSync(resolveAlchemyBin(input.cwd), [
29
+ input.command,
30
+ input.stackFileRelativePath,
31
+ "--yes",
32
+ "--stage",
33
+ input.stage
34
+ ], {
35
+ cwd: input.cwd,
36
+ stdio: "inherit",
37
+ env: {
38
+ ...input.env ?? process.env,
39
+ ...input.containerEnv
40
+ }
41
+ });
42
+ if (result.error !== void 0) throw result.error;
43
+ return result.status ?? 1;
44
+ }
45
+ //#endregion
46
+ //#region ../../0-framework/1-core/core/dist/container-transport-DKmKg5JQ.mjs
47
+ /** '@prisma/composer-prisma-cloud' → 'PRISMA_COMPOSER_CONTAINER_PRISMA_COMPOSER_PRISMA_CLOUD' */
48
+ function containerEnvVarName(extensionId) {
49
+ return `PRISMA_COMPOSER_CONTAINER_${extensionId.toUpperCase().replace(/[^A-Z0-9]+/g, "_").replace(/^_+|_+$/g, "")}`;
50
+ }
51
+ function collisionError(a, b, varName) {
52
+ return /* @__PURE__ */ new Error(`Extension ids "${a}" and "${b}" both mangle to the container transport variable "${varName}" — rename one of the extensions.`);
53
+ }
54
+ function emptySerializeError(extensionId) {
55
+ return /* @__PURE__ */ new Error(`Extension "${extensionId}"'s container instance serialized to an empty string — ContainerInstance.serialize() must return a non-empty string.`);
56
+ }
57
+ /** The env entries the CLI sets on the alchemy process: `{ [containerEnvVarName(id)]: instance.serialize() }` for every resolved instance. */
58
+ function containerEnv(instances) {
59
+ const env = {};
60
+ const ownerByVarName = /* @__PURE__ */ new Map();
61
+ for (const [extensionId, instance] of instances) {
62
+ const varName = containerEnvVarName(extensionId);
63
+ const owner = ownerByVarName.get(varName);
64
+ if (owner !== void 0) throw collisionError(owner, extensionId, varName);
65
+ ownerByVarName.set(varName, extensionId);
66
+ const serialized = instance.serialize();
67
+ if (serialized.length === 0) throw emptySerializeError(extensionId);
68
+ env[varName] = serialized;
69
+ }
70
+ return env;
71
+ }
72
+ //#endregion
73
+ export { runAlchemy as n, containerEnv as t };
74
+
75
+ //# sourceMappingURL=container-transport-DKmKg5JQ-BMRhx5w-.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container-transport-DKmKg5JQ-BMRhx5w-.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/run-alchemy-hghRtddF.mjs","../../../0-framework/1-core/core/dist/container-transport-DKmKg5JQ.mjs"],"sourcesContent":["import { CliStructuredError } from \"@internal/foundation/errors\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { spawnSync } from \"node:child_process\";\n//#region src/run-alchemy.ts\n/**\n* Pipeline step 7 (deploy-cli.md § The pipeline; design-notes.md's \"Driving\n* Alchemy\" call): shell out to the generated stack file. Resolves the\n* workspace's own installed `alchemy` bin (walking up `node_modules/.bin`\n* from the generated file's package dir) rather than going through\n* `bunx`/`npx`, so this works the same under node and bun — the resolved\n* bin's own launcher (`alchemy/bin/cli.js`) does its own node/bun dispatch\n* from there, driven by the env it inherits.\n*/\n/** Walks up from `startDir` looking for `node_modules/.bin/alchemy`. */\nfunction resolveAlchemyBin(startDir) {\n\tlet dir = startDir;\n\twhile (true) {\n\t\tconst candidate = path.join(dir, \"node_modules\", \".bin\", \"alchemy\");\n\t\tif (fs.existsSync(candidate)) return candidate;\n\t\tconst parent = path.dirname(dir);\n\t\tif (parent === dir) throw new CliStructuredError(\"DEPLOY.ALCHEMY_BIN_MISSING\", `Could not find an installed \\`alchemy\\` bin above \"${startDir}\".`, { fix: \"Add \\\"alchemy\\\" as a dependency of your app.\" });\n\t\tdir = parent;\n\t}\n}\n/** Runs `alchemy deploy|destroy <stack file> --yes --stage <stage>`, inheriting stdio + env, plus every extension's resolved container. */\nfunction runAlchemy(input) {\n\tconst result = spawnSync(resolveAlchemyBin(input.cwd), [\n\t\tinput.command,\n\t\tinput.stackFileRelativePath,\n\t\t\"--yes\",\n\t\t\"--stage\",\n\t\tinput.stage\n\t], {\n\t\tcwd: input.cwd,\n\t\tstdio: \"inherit\",\n\t\tenv: {\n\t\t\t...input.env ?? process.env,\n\t\t\t...input.containerEnv\n\t\t}\n\t});\n\tif (result.error !== void 0) throw result.error;\n\treturn result.status ?? 1;\n}\n//#endregion\nexport { runAlchemy as n, resolveAlchemyBin as t };\n\n//# sourceMappingURL=run-alchemy-hghRtddF.mjs.map","//#region src/container-transport.ts\n/** '@prisma/composer-prisma-cloud' → 'PRISMA_COMPOSER_CONTAINER_PRISMA_COMPOSER_PRISMA_CLOUD' */\nfunction containerEnvVarName(extensionId) {\n\treturn `PRISMA_COMPOSER_CONTAINER_${extensionId.toUpperCase().replace(/[^A-Z0-9]+/g, \"_\").replace(/^_+|_+$/g, \"\")}`;\n}\nfunction collisionError(a, b, varName) {\n\treturn /* @__PURE__ */ new Error(`Extension ids \"${a}\" and \"${b}\" both mangle to the container transport variable \"${varName}\" — rename one of the extensions.`);\n}\nfunction emptySerializeError(extensionId) {\n\treturn /* @__PURE__ */ new Error(`Extension \"${extensionId}\"'s container instance serialized to an empty string — ContainerInstance.serialize() must return a non-empty string.`);\n}\n/** The env entries the CLI sets on the alchemy process: `{ [containerEnvVarName(id)]: instance.serialize() }` for every resolved instance. */\nfunction containerEnv(instances) {\n\tconst env = {};\n\tconst ownerByVarName = /* @__PURE__ */ new Map();\n\tfor (const [extensionId, instance] of instances) {\n\t\tconst varName = containerEnvVarName(extensionId);\n\t\tconst owner = ownerByVarName.get(varName);\n\t\tif (owner !== void 0) throw collisionError(owner, extensionId, varName);\n\t\townerByVarName.set(varName, extensionId);\n\t\tconst serialized = instance.serialize();\n\t\tif (serialized.length === 0) throw emptySerializeError(extensionId);\n\t\tenv[varName] = serialized;\n\t}\n\treturn env;\n}\n/**\n* The alchemy-process side: for each extension with a container descriptor\n* whose var is present in `env`, call its deserialize. Absent var → no entry.\n*/\nfunction deserializeContainers(extensions, env) {\n\tconst instances = /* @__PURE__ */ new Map();\n\tfor (const extension of extensions) {\n\t\tconst descriptor = extension.container;\n\t\tif (descriptor === void 0) continue;\n\t\tconst serialized = env[containerEnvVarName(extension.id)];\n\t\tif (serialized === void 0) continue;\n\t\tinstances.set(extension.id, descriptor.deserialize(serialized));\n\t}\n\treturn instances;\n}\n//#endregion\nexport { containerEnvVarName as n, deserializeContainers as r, containerEnv as t };\n\n//# sourceMappingURL=container-transport-DKmKg5JQ.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAeA,SAAS,kBAAkB,UAAU;CACpC,IAAI,MAAM;CACV,OAAO,MAAM;EACZ,MAAM,YAAY,KAAK,KAAK,KAAK,gBAAgB,QAAQ,SAAS;EAClE,IAAI,GAAG,WAAW,SAAS,GAAG,OAAO;EACrC,MAAM,SAAS,KAAK,QAAQ,GAAG;EAC/B,IAAI,WAAW,KAAK,MAAM,IAAI,mBAAmB,8BAA8B,sDAAsD,SAAS,KAAK,EAAE,KAAK,+CAA+C,CAAC;EAC1M,MAAM;CACP;AACD;;AAEA,SAAS,WAAW,OAAO;CAC1B,MAAM,SAAS,UAAU,kBAAkB,MAAM,GAAG,GAAG;EACtD,MAAM;EACN,MAAM;EACN;EACA;EACA,MAAM;CACP,GAAG;EACF,KAAK,MAAM;EACX,OAAO;EACP,KAAK;GACJ,GAAG,MAAM,OAAO,QAAQ;GACxB,GAAG,MAAM;EACV;CACD,CAAC;CACD,IAAI,OAAO,UAAU,KAAK,GAAG,MAAM,OAAO;CAC1C,OAAO,OAAO,UAAU;AACzB;;;;ACzCA,SAAS,oBAAoB,aAAa;CACzC,OAAO,6BAA6B,YAAY,YAAY,CAAC,CAAC,QAAQ,eAAe,GAAG,CAAC,CAAC,QAAQ,YAAY,EAAE;AACjH;AACA,SAAS,eAAe,GAAG,GAAG,SAAS;CACtC,uBAAuB,IAAI,MAAM,kBAAkB,EAAE,SAAS,EAAE,qDAAqD,QAAQ,kCAAkC;AAChK;AACA,SAAS,oBAAoB,aAAa;CACzC,uBAAuB,IAAI,MAAM,cAAc,YAAY,qHAAqH;AACjL;;AAEA,SAAS,aAAa,WAAW;CAChC,MAAM,MAAM,CAAC;CACb,MAAM,iCAAiC,IAAI,IAAI;CAC/C,KAAK,MAAM,CAAC,aAAa,aAAa,WAAW;EAChD,MAAM,UAAU,oBAAoB,WAAW;EAC/C,MAAM,QAAQ,eAAe,IAAI,OAAO;EACxC,IAAI,UAAU,KAAK,GAAG,MAAM,eAAe,OAAO,aAAa,OAAO;EACtE,eAAe,IAAI,SAAS,WAAW;EACvC,MAAM,aAAa,SAAS,UAAU;EACtC,IAAI,WAAW,WAAW,GAAG,MAAM,oBAAoB,WAAW;EAClE,IAAI,WAAW;CAChB;CACA,OAAO;AACR"}
@@ -0,0 +1,216 @@
1
+ import { dt as CliStructuredError } from "./graph-types-N6brq1zY-1VMNwtkJ.mjs";
2
+ import { l as DeployedEntity } from "./app-config-CFsSXEVj-B242oUnm.mjs";
3
+ import "./config-ku5b_2YD.mjs";
4
+ import "./index-DryPyF9U.mjs";
5
+ import "./deploy-ku5b_2YD.mjs";
6
+ //#region ../../0-framework/3-tooling/cli/dist/load-entry-BS8rSRif.d.mts
7
+ //#endregion
8
+ //#region src/operations/shared.d.ts
9
+ /** A running service's dotted address plus its local URL — what `dev` reports
10
+ * as the front door and `log` reports as the tailable services. */
11
+ interface ServiceEndpoint {
12
+ readonly address: string;
13
+ readonly url: string;
14
+ }
15
+ /**
16
+ * Where a failed execution left its artifacts — details of the CURRENT
17
+ * execution mechanism (a spawned deploy-engine child driving a generated
18
+ * stack file), for hosts that want to print a reproduce hint. The mechanism
19
+ * is not part of the surface's contract, so these fields may change or
20
+ * disappear if the mechanism does; branch on `code`/`message`/`cause` for
21
+ * anything durable.
22
+ */
23
+ interface ExecutionDiagnostics {
24
+ /** The child's exit status; undefined means the spawn itself threw. */
25
+ readonly exitCode: number | undefined;
26
+ readonly stackFilePath: string;
27
+ readonly reproduceCommand: string;
28
+ readonly cwd: string;
29
+ }
30
+ /**
31
+ * Reads the execution diagnostics an engine-failure error carries in
32
+ * `meta.diagnostics`; undefined for every other failure.
33
+ */
34
+ declare function executionDiagnostics(f: CliStructuredError): ExecutionDiagnostics | undefined;
35
+ //#endregion
36
+ //#region ../../0-framework/0-foundation/foundation/dist/result.d.mts
37
+ //#region src/result.d.ts
38
+ /**
39
+ * Represents a successful result containing a value.
40
+ */
41
+ interface Ok<T> {
42
+ readonly ok: true;
43
+ readonly value: T;
44
+ assertOk(): T;
45
+ assertNotOk(): never;
46
+ }
47
+ /**
48
+ * Represents an unsuccessful result containing failure details.
49
+ */
50
+ interface NotOk<F> {
51
+ readonly ok: false;
52
+ readonly failure: F;
53
+ assertOk(): never;
54
+ assertNotOk(): F;
55
+ }
56
+ /**
57
+ * A discriminated union representing either success (Ok) or failure (NotOk).
58
+ *
59
+ * @typeParam T - The success value type
60
+ * @typeParam F - The failure details type
61
+ */
62
+ type Result<T, F> = Ok<T> | NotOk<F>;
63
+ //#endregion
64
+ //#region ../../0-framework/3-tooling/cli/dist/control.d.mts
65
+ //#region src/deployment-summary.d.ts
66
+ /** The serializable projection of DeploymentResult — what CAN cross the process
67
+ * boundary. Writer (report hook) and reader (deploy operation) share this shape. */
68
+ interface DeployedNodeSummary {
69
+ readonly address: string;
70
+ readonly entities: readonly DeployedEntity[];
71
+ }
72
+ interface DeploymentSummary {
73
+ readonly app: string;
74
+ readonly nodes: readonly DeployedNodeSummary[];
75
+ }
76
+ //#endregion
77
+ //#region src/operations/deploy.d.ts
78
+ interface DeployInput {
79
+ /** Path to the entry module, resolved against `cwd` — same contract as `prisma-composer deploy <entry>`. */
80
+ readonly entry: string;
81
+ /** Override the root node's name (the `--name` flag's slot). */
82
+ readonly name?: string | undefined;
83
+ /** Target stage. ABSENT = production — bare deploy targets production (main.ts effectiveStage). */
84
+ readonly stage?: string | undefined;
85
+ /** Defaults to process.cwd(); the directory `.prisma-composer/` and `.alchemy` state live under. */
86
+ readonly cwd?: string | undefined;
87
+ }
88
+ interface DeploySuccess {
89
+ /** Parsed from the alchemy child's result file. Undefined when the child
90
+ * did not write one (injected fake alchemy, or a report-less apply). */
91
+ readonly summary: DeploymentSummary | undefined;
92
+ }
93
+ declare function deploy(input: DeployInput): Promise<Result<DeploySuccess, CliStructuredError>>;
94
+ //#endregion
95
+ //#region src/operations/destroy.d.ts
96
+ /** Destroy must name its target explicitly — no silent default to production. Encoded, not re-derived from flags. */
97
+ type DestroyTarget = {
98
+ readonly kind: 'production';
99
+ } | {
100
+ readonly kind: 'stage';
101
+ readonly stage: string;
102
+ };
103
+ type DestroyEvent =
104
+ /** Emitted before the pipeline when `<cwd>/.alchemy` is missing/empty. */
105
+ {
106
+ readonly kind: 'no-local-deploy-state';
107
+ readonly cwd: string;
108
+ };
109
+ interface DestroyInput {
110
+ readonly entry: string;
111
+ readonly name?: string | undefined;
112
+ readonly target: DestroyTarget;
113
+ readonly cwd?: string | undefined;
114
+ /** Mid-operation notifications, in real time. Rendering is the host's. */
115
+ readonly onEvent?: ((event: DestroyEvent) => void) | undefined;
116
+ }
117
+ declare function destroy(input: DestroyInput): Promise<Result<void, CliStructuredError>>;
118
+ //#endregion
119
+ //#region src/operations/dev.d.ts
120
+ type DevEvent =
121
+ /** Initial front door + after each successful re-converge. */
122
+ {
123
+ readonly kind: 'ready';
124
+ readonly endpoints: readonly ServiceEndpoint[];
125
+ } | {
126
+ readonly kind: 'unwatchable';
127
+ readonly address: string;
128
+ } | {
129
+ readonly kind: 'rebuild-failed';
130
+ readonly message: string;
131
+ } |
132
+ /** The file watcher itself errored (EMFILE, a vanished directory); the session keeps running. */
133
+ {
134
+ readonly kind: 'watch-error';
135
+ readonly message: string;
136
+ } |
137
+ /** The app keeps running, still watching. */
138
+ {
139
+ readonly kind: 'converge-failed';
140
+ readonly stackFilePath: string;
141
+ readonly reproduceCommand: string;
142
+ readonly cwd: string;
143
+ } | {
144
+ readonly kind: 'stopping';
145
+ } |
146
+ /** One service refused to stop during stop(); teardown continues and `stopped` still follows. */
147
+ {
148
+ readonly kind: 'stop-error';
149
+ readonly message: string;
150
+ } | {
151
+ readonly kind: 'stopped';
152
+ };
153
+ interface DevInput {
154
+ readonly entry: string;
155
+ readonly name?: string | undefined;
156
+ readonly fresh?: boolean | undefined;
157
+ readonly cwd?: string | undefined;
158
+ readonly onEvent?: ((event: DevEvent) => void) | undefined;
159
+ }
160
+ /** A running dev session. The operation NEVER touches process signal handlers —
161
+ * the host owns signals (and must evict alchemy's import-time SIGINT/SIGTERM
162
+ * listeners before installing its own; see run-dev.ts). */
163
+ interface DevSession {
164
+ /** The initial front door, already merged across attachments. */
165
+ readonly endpoints: readonly ServiceEndpoint[];
166
+ /** Stop the watch loop and the app's services (emulators and data stay up).
167
+ * Idempotent; emits 'stopping'/'stopped'; resolves `closed`. */
168
+ stop(): Promise<void>;
169
+ /** Settles when the session has fully stopped (via stop()). */
170
+ readonly closed: Promise<void>;
171
+ }
172
+ declare function dev(input: DevInput): Promise<Result<DevSession, CliStructuredError>>;
173
+ //#endregion
174
+ //#region src/operations/log.d.ts
175
+ interface LogLine {
176
+ readonly service: string;
177
+ readonly line: string;
178
+ }
179
+ type LogEvent =
180
+ /** One attachment's stream died; the others continue. */
181
+ {
182
+ readonly kind: 'stream-failed';
183
+ readonly message: string;
184
+ } |
185
+ /** The consumer fell behind and the bounded merge queue overflowed:
186
+ * `count` oldest lines were dropped since the last delivered line. */
187
+ {
188
+ readonly kind: 'lines-dropped';
189
+ readonly count: number;
190
+ };
191
+ interface LogInput {
192
+ readonly entry: string;
193
+ readonly name?: string | undefined;
194
+ /** Restrict to one service's dotted address; validated against running services. */
195
+ readonly address?: string | undefined;
196
+ /** Trailing history lines before live output. Defaults to 0 (live only) —
197
+ * the attachment contract's default; the CLI's user-facing default of 20 stays in main.ts. */
198
+ readonly tail?: number | undefined;
199
+ readonly cwd?: string | undefined;
200
+ /** Ends the stream when aborted. The host owns SIGINT/SIGTERM → abort. */
201
+ readonly signal?: AbortSignal | undefined;
202
+ readonly onEvent?: ((event: LogEvent) => void) | undefined;
203
+ }
204
+ interface LogAttached {
205
+ /** For the adapter's empty-services notice. */
206
+ readonly appName: string;
207
+ /** Every running service. EMPTY means nothing is running — a valid, non-failure state;
208
+ * `lines` is then an already-finished iterable. */
209
+ readonly services: readonly ServiceEndpoint[];
210
+ /** Merged, address-filtered stream; ends on signal abort or when every source ends. */
211
+ readonly lines: AsyncIterable<LogLine>;
212
+ }
213
+ declare function log(input: LogInput): Promise<Result<LogAttached, CliStructuredError>>;
214
+ //#endregion
215
+ export { type CliStructuredError, type DeployInput, type DeploySuccess, type DeployedNodeSummary, type DeploymentSummary, type DestroyEvent, type DestroyInput, type DestroyTarget, type DevEvent, type DevInput, type DevSession, type ExecutionDiagnostics, type LogAttached, type LogEvent, type LogInput, type LogLine, type NotOk, type Ok, type Result, type ServiceEndpoint, deploy, destroy, dev, executionDiagnostics, log };
216
+ //# sourceMappingURL=control.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control.d.mts","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/load-entry-BS8rSRif.d.mts","../../../0-framework/0-foundation/foundation/dist/result.d.mts","../../../0-framework/3-tooling/cli/dist/control.d.mts"],"mappings":";;;;;;;;;;UAyBU;WACC;WACA;;;;;;;;;;UAqBD;;WAEC;WACA;WACA;WACA;;;;;;iBAMM,qBAAqB,GAAG,qBAAqB;;;;;;;UCvDpD,GAAG;WACF;WACA,OAAO;EAChB,YAAY;EACZ;;;;;UAKQ,MAAM;WACL;WACA,SAAS;EAClB;EACA,eAAe;;;;;;;;KAQZ,OAAO,GAAG,KAAK,GAAG,KAAK,MAAM;;;;;;UCfxB;WACC;WACA,mBAAmB;;UAEpB;WACC;WACA,gBAAgB;;;;UAIjB;;WAEC;;WAEA;;WAEA;;WAEA;;UAED;;;WAGC,SAAS;;iBAEH,OAAO,OAAO,cAAc,QAAQ,OAAS,eAAe;;;;KAIxE;WACM;;WAEA;WACA;;KAEN;;;WAGM;WACA;;UAED;WACC;WACA;WACA,QAAQ;WACR;;WAEA,YAAY,OAAO;;iBAEb,QAAQ,OAAO,eAAe,QAAQ,aAAe;;;KAGjE;;;WAGM;WACA,oBAAoB;;WAEpB;WACA;;WAEA;WACA;;;;WAIA;WACA;;;;WAIA;WACA;WACA;WACA;;WAEA;;;;WAIA;WACA;;WAEA;;UAED;WACC;WACA;WACA;WACA;WACA,YAAY,OAAO;;;;;UAKpB;;WAEC,oBAAoB;;;EAG7B,QAAQ;;WAEC,QAAQ;;iBAEF,IAAI,OAAO,WAAW,QAAQ,OAAS,YAAY;;;UAG1D;WACC;WACA;;KAEN;;;WAGM;WACA;;;;;WAKA;WACA;;UAED;WACC;WACA;;WAEA;;;WAGA;WACA;;WAEA,SAAS;WACT,YAAY,OAAO;;UAEpB;;WAEC;;;WAGA,mBAAmB;;WAEnB,OAAO,cAAc;;iBAEf,IAAI,OAAO,WAAW,QAAQ,OAAS,aAAa"}
@@ -0,0 +1,70 @@
1
+ import { a as executorLoadFailure, i as executionDiagnostics, t as notOk } from "./result-CzGChwbZ.mjs";
2
+ //#region ../../0-framework/3-tooling/cli/dist/destroy-DPAo6kVj.mjs
3
+ async function dev(input) {
4
+ return devWithDeps(input, {});
5
+ }
6
+ /** In-package variant threading the injection seam (the CLI's RunDeps, unit
7
+ * tests). Deliberately NOT re-exported through `./control` — the seam mirrors
8
+ * internal types and is not part of the published surface. */
9
+ async function devWithDeps(input, deps) {
10
+ const cwd = input.cwd ?? process.cwd();
11
+ let executor;
12
+ try {
13
+ executor = await import("./execute-dev-DLYyduEM-88uyvrbj.mjs");
14
+ } catch (error) {
15
+ return notOk(executorLoadFailure("dev", error, cwd));
16
+ }
17
+ return executor.executeDev(input, deps, cwd);
18
+ }
19
+ async function log(input) {
20
+ return logWithDeps(input, {});
21
+ }
22
+ /** In-package variant threading the injection seam (the CLI's LogRunDeps,
23
+ * unit tests). Deliberately NOT re-exported through `./control` — the seam
24
+ * mirrors internal types and is not part of the published surface. */
25
+ async function logWithDeps(input, deps) {
26
+ const cwd = input.cwd ?? process.cwd();
27
+ let executor;
28
+ try {
29
+ executor = await import("./execute-log-VIOL4DBz-DBPH8By4.mjs");
30
+ } catch (error) {
31
+ return notOk(executorLoadFailure("log", error, cwd));
32
+ }
33
+ return executor.executeLog(input, deps, cwd);
34
+ }
35
+ async function deploy(input) {
36
+ return deployWithDeps(input, {});
37
+ }
38
+ /** In-package variant threading the injection seam (the CLI's RunDeps, unit
39
+ * tests). Deliberately NOT re-exported through `./control` — the seam mirrors
40
+ * internal types and is not part of the published surface. */
41
+ async function deployWithDeps(input, deps) {
42
+ const cwd = input.cwd ?? process.cwd();
43
+ let executor;
44
+ try {
45
+ executor = await import("./execute-deploy-destroy-IT4vGkMc-oO8yjHPH.mjs");
46
+ } catch (error) {
47
+ return notOk(executorLoadFailure("deploy", error, cwd));
48
+ }
49
+ return executor.executeDeploy(input, deps, cwd);
50
+ }
51
+ async function destroy(input) {
52
+ return destroyWithDeps(input, {});
53
+ }
54
+ /** In-package variant threading the injection seam (the CLI's RunDeps, unit
55
+ * tests). Deliberately NOT re-exported through `./control` — the seam mirrors
56
+ * internal types and is not part of the published surface. */
57
+ async function destroyWithDeps(input, deps) {
58
+ const cwd = input.cwd ?? process.cwd();
59
+ let executor;
60
+ try {
61
+ executor = await import("./execute-deploy-destroy-IT4vGkMc-oO8yjHPH.mjs");
62
+ } catch (error) {
63
+ return notOk(executorLoadFailure("destroy", error, cwd));
64
+ }
65
+ return executor.executeDestroy(input, deps, cwd);
66
+ }
67
+ //#endregion
68
+ export { deploy, destroy, dev, executionDiagnostics, log };
69
+
70
+ //# sourceMappingURL=control.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/destroy-DPAo6kVj.mjs"],"sourcesContent":["import { n as executorLoadFailure } from \"./shared-CCaR42wo.mjs\";\nimport { notOk } from \"@internal/foundation/result\";\n//#region src/operations/dev.ts\nasync function dev(input) {\n\treturn devWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's RunDeps, unit\n* tests). Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function devWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-dev-DLYyduEM.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"dev\", error, cwd));\n\t}\n\treturn executor.executeDev(input, deps, cwd);\n}\n//#endregion\n//#region src/operations/log.ts\nasync function log(input) {\n\treturn logWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's LogRunDeps,\n* unit tests). Deliberately NOT re-exported through `./control` — the seam\n* mirrors internal types and is not part of the published surface. */\nasync function logWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-log-VIOL4DBz.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"log\", error, cwd));\n\t}\n\treturn executor.executeLog(input, deps, cwd);\n}\n//#endregion\n//#region src/operations/deploy.ts\nasync function deploy(input) {\n\treturn deployWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's RunDeps, unit\n* tests). Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function deployWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-deploy-destroy-IT4vGkMc.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"deploy\", error, cwd));\n\t}\n\treturn executor.executeDeploy(input, deps, cwd);\n}\n//#endregion\n//#region src/operations/destroy.ts\nasync function destroy(input) {\n\treturn destroyWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's RunDeps, unit\n* tests). Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function destroyWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-deploy-destroy-IT4vGkMc.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"destroy\", error, cwd));\n\t}\n\treturn executor.executeDestroy(input, deps, cwd);\n}\n//#endregion\nexport { log as a, devWithDeps as c, deployWithDeps as i, destroyWithDeps as n, logWithDeps as o, deploy as r, dev as s, destroy as t };\n\n//# sourceMappingURL=destroy-DPAo6kVj.mjs.map"],"mappings":";;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,OAAO,GAAG,CAAC;CACpD;CACA,OAAO,SAAS,WAAW,OAAO,MAAM,GAAG;AAC5C;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,OAAO,GAAG,CAAC;CACpD;CACA,OAAO,SAAS,WAAW,OAAO,MAAM,GAAG;AAC5C;AAGA,eAAe,OAAO,OAAO;CAC5B,OAAO,eAAe,OAAO,CAAC,CAAC;AAChC;;;;AAIA,eAAe,eAAe,OAAO,MAAM;CAC1C,MAAM,MAAM,MAAM,OAAO,QAAQ,IAAI;CACrC,IAAI;CACJ,IAAI;EACH,WAAW,MAAM,OAAO;CACzB,SAAS,OAAO;EACf,OAAO,MAAM,oBAAoB,UAAU,OAAO,GAAG,CAAC;CACvD;CACA,OAAO,SAAS,cAAc,OAAO,MAAM,GAAG;AAC/C;AAGA,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,OAAO,GAAG,CAAC;CACxD;CACA,OAAO,SAAS,eAAe,OAAO,MAAM,GAAG;AAChD"}
@@ -0,0 +1 @@
1
+ import "./app-config-CFsSXEVj-B242oUnm.mjs";
package/dist/deploy.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { A as ProvisionerDescriptor, B as joinDeployment, C as Lowering, E as PackageInput, H as lowering, P as buildConfig, S as LoweredResult, T as Outputs, U as mergedProviders, V as lower, W as resolveStateLayer, a as Bundle, b as LowerError, d as DeploymentResult, i as AssembleInput, j as ServiceLowering, k as ProvisionEdge, l as DeployedEntity, n as ApplicationDescriptor, r as Artifact, t as AlchemyStateLayer, u as DeployedNode, x as LowerOptions, y as LowerContext } from "./app-config-Cbv_lA38-BHJsd1DF.mjs";
2
- import "./deploy-whuqZ5xT.mjs";
1
+ import { A as ProvisionerDescriptor, B as joinDeployment, C as Lowering, E as PackageInput, H as lowering, P as buildConfig, S as LoweredResult, T as Outputs, U as mergedProviders, V as lower, W as resolveStateLayer, a as Bundle, b as LowerError, d as DeploymentResult, i as AssembleInput, j as ServiceLowering, k as ProvisionEdge, l as DeployedEntity, n as ApplicationDescriptor, r as Artifact, t as AlchemyStateLayer, u as DeployedNode, x as LowerOptions, y as LowerContext } from "./app-config-CFsSXEVj-B242oUnm.mjs";
2
+ import "./deploy-ku5b_2YD.mjs";
3
3
  export { AlchemyStateLayer, ApplicationDescriptor, Artifact, AssembleInput, Bundle, DeployedEntity, DeployedNode, DeploymentResult, LowerContext, LowerError, LowerOptions, LoweredResult, Lowering, Outputs, PackageInput, ProvisionEdge, ProvisionerDescriptor, ServiceLowering, buildConfig, joinDeployment, lower, lowering, mergedProviders, resolveStateLayer };