@prisma/composer-cli 0.25.0-dev.5 → 0.26.0-dev.1

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 (55) hide show
  1. package/dist/{result-D9vIrN7i.mjs → composer-config-CY9fET8H-KpGjlYgO.mjs} +89 -89
  2. package/dist/composer-config-CY9fET8H-KpGjlYgO.mjs.map +1 -0
  3. package/dist/{pipeline-DAYhea3J-uuBciVDS.mjs → container-transport-HcvNOGZL-CHqecFc7.mjs} +83 -71
  4. package/dist/container-transport-HcvNOGZL-CHqecFc7.mjs.map +1 -0
  5. package/dist/{execute-deploy-destroy-CF6DR7sA-jdelm-y5.mjs → execute-deploy-destroy-c0eko3AO-9npuGXd3.mjs} +70 -73
  6. package/dist/execute-deploy-destroy-c0eko3AO-9npuGXd3.mjs.map +1 -0
  7. package/dist/{execute-dev-DAIUT0es-DTdnJdOi.mjs → execute-dev-BICPaq1g-CSoZJuhB.mjs} +70 -9
  8. package/dist/execute-dev-BICPaq1g-CSoZJuhB.mjs.map +1 -0
  9. package/dist/{family-DB2Uf88c-DWEm0USb.d.mts → family-CgeZQdNg-gH8LuqqL.d.mts} +46 -140
  10. package/dist/family-CgeZQdNg-gH8LuqqL.d.mts.map +1 -0
  11. package/dist/family.d.mts +3 -28
  12. package/dist/family.d.mts.map +1 -1
  13. package/dist/family.mjs +12 -461
  14. package/dist/family.mjs.map +1 -1
  15. package/dist/{generate-dev-stack-CPpjJdTG-W0N0YgsI.mjs → generate-dev-stack-BUadNY_w-DF_lHVaP.mjs} +4 -4
  16. package/dist/{generate-dev-stack-CPpjJdTG-W0N0YgsI.mjs.map → generate-dev-stack-BUadNY_w-DF_lHVaP.mjs.map} +1 -1
  17. package/dist/run-alchemy-BEvB2sYQ-BgV2deuO.mjs +154 -0
  18. package/dist/run-alchemy-BEvB2sYQ-BgV2deuO.mjs.map +1 -0
  19. package/dist/testing.d.mts +10 -24
  20. package/dist/testing.d.mts.map +1 -1
  21. package/dist/testing.mjs +17 -46
  22. package/dist/testing.mjs.map +1 -1
  23. package/package.json +5 -8
  24. package/src/exports/testing.ts +2 -2
  25. package/dist/bin.mjs +0 -987
  26. package/dist/bin.mjs.map +0 -1
  27. package/dist/container-transport-HcvNOGZL-CIoZc7Rs.mjs +0 -34
  28. package/dist/container-transport-HcvNOGZL-CIoZc7Rs.mjs.map +0 -1
  29. package/dist/execute-deploy-destroy-CF6DR7sA-DGs5poBA.mjs +0 -556
  30. package/dist/execute-deploy-destroy-CF6DR7sA-DGs5poBA.mjs.map +0 -1
  31. package/dist/execute-deploy-destroy-CF6DR7sA-jdelm-y5.mjs.map +0 -1
  32. package/dist/execute-dev-DAIUT0es-CVW9TfgX.mjs +0 -2060
  33. package/dist/execute-dev-DAIUT0es-CVW9TfgX.mjs.map +0 -1
  34. package/dist/execute-dev-DAIUT0es-DTdnJdOi.mjs.map +0 -1
  35. package/dist/execute-log-PLs9-Qn3-BUBx5KmY.mjs +0 -155
  36. package/dist/execute-log-PLs9-Qn3-BUBx5KmY.mjs.map +0 -1
  37. package/dist/execute-log-PLs9-Qn3-D8DRuvDr.mjs +0 -154
  38. package/dist/execute-log-PLs9-Qn3-D8DRuvDr.mjs.map +0 -1
  39. package/dist/family-DB2Uf88c-DWEm0USb.d.mts.map +0 -1
  40. package/dist/local-target-B9cBl_6r.mjs +0 -68
  41. package/dist/local-target-B9cBl_6r.mjs.map +0 -1
  42. package/dist/local-target-P4-n1Ovh.mjs +0 -68
  43. package/dist/local-target-P4-n1Ovh.mjs.map +0 -1
  44. package/dist/pipeline-DAYhea3J-BEnHHWp8.mjs +0 -979
  45. package/dist/pipeline-DAYhea3J-BEnHHWp8.mjs.map +0 -1
  46. package/dist/pipeline-DAYhea3J-uuBciVDS.mjs.map +0 -1
  47. package/dist/result-D9vIrN7i.mjs.map +0 -1
  48. package/dist/result-SF9LFOuR.mjs +0 -461
  49. package/dist/result-SF9LFOuR.mjs.map +0 -1
  50. package/dist/run-alchemy-pANK8XNX-CqXC1tbs.mjs +0 -99
  51. package/dist/run-alchemy-pANK8XNX-CqXC1tbs.mjs.map +0 -1
  52. package/dist/run-alchemy-pANK8XNX-T_pHNDBo.mjs +0 -99
  53. package/dist/run-alchemy-pANK8XNX-T_pHNDBo.mjs.map +0 -1
  54. package/dist/shared-BAIiDgXa-DYP7EOSk.mjs +0 -33
  55. package/dist/shared-BAIiDgXa-DYP7EOSk.mjs.map +0 -1
@@ -1,99 +0,0 @@
1
- import { c as CliStructuredError } from "./result-D9vIrN7i.mjs";
2
- import * as fs from "node:fs";
3
- import * as path from "node:path";
4
- import spawn from "cross-spawn";
5
- //#region ../../0-framework/3-tooling/cli/dist/run-alchemy-pANK8XNX.mjs
6
- /**
7
- * Pipeline step 7 (deploy-cli.md § The pipeline; design-notes.md's "Driving
8
- * Alchemy" call): hand the terminal to the generated stack file.
9
- *
10
- * Resolves the installed `alchemy` bin and launches package-manager shims with
11
- * cross-spawn.
12
- *
13
- * This module composes the invocation; it does not decide how the child is
14
- * started. Under the CLI the engine starts it (`ctx.spawn`), which is what
15
- * makes Ctrl-C reach the child natively and keeps signal policy in one place.
16
- * `spawnAlchemy` is the default for programmatic hosts driving
17
- * `@prisma/composer/control`, which have no engine to borrow.
18
- */
19
- /** Walks up from `startDir` looking for the installed Alchemy executable. */
20
- function resolveAlchemyBin(startDir) {
21
- const names = process.platform === "win32" ? [
22
- "alchemy.exe",
23
- "alchemy.cmd",
24
- "alchemy"
25
- ] : ["alchemy"];
26
- let dir = startDir;
27
- while (true) {
28
- for (const name of names) {
29
- const candidate = path.join(dir, "node_modules", ".bin", name);
30
- if (fs.existsSync(candidate)) return candidate;
31
- }
32
- const parent = path.dirname(dir);
33
- 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." });
34
- dir = parent;
35
- }
36
- }
37
- /**
38
- * Resolves the invocation against this machine — the step every adapter takes
39
- * and no caller should. Raises DEPLOY.ALCHEMY_BIN_MISSING when the app has no
40
- * alchemy installed.
41
- */
42
- function alchemyCommandLine(invocation) {
43
- return {
44
- command: resolveAlchemyBin(invocation.cwd),
45
- args: [
46
- invocation.action,
47
- invocation.stackFileRelativePath,
48
- "--yes",
49
- "--stage",
50
- invocation.stage
51
- ],
52
- cwd: invocation.cwd,
53
- env: invocation.env
54
- };
55
- }
56
- /** What becomes `alchemy deploy|destroy <stack file> --yes --stage <stage>`. */
57
- function alchemyInvocation(input) {
58
- return {
59
- action: input.command,
60
- stackFileRelativePath: input.stackFileRelativePath,
61
- cwd: input.cwd,
62
- stage: input.stage,
63
- env: {
64
- ...input.containerEnv,
65
- ...input.preflightEnv,
66
- ...input.env
67
- }
68
- };
69
- }
70
- /**
71
- * The default runner for hosts with no engine: inherited stdio, the caller's
72
- * own process group, and the child's status returned verbatim. It does not
73
- * collapse a signal into an exit code — that collapse is what made a
74
- * Ctrl-C'd deploy report itself as a failure.
75
- */
76
- const spawnAlchemy = async (invocation) => {
77
- const line = alchemyCommandLine(invocation);
78
- return new Promise((resolve, reject) => {
79
- const child = spawn(line.command, [...line.args], {
80
- cwd: line.cwd,
81
- stdio: "inherit",
82
- env: {
83
- ...process.env,
84
- ...line.env
85
- }
86
- });
87
- child.on("error", reject);
88
- child.on("close", (exitCode, signal) => {
89
- resolve({
90
- exitCode,
91
- signal
92
- });
93
- });
94
- });
95
- };
96
- //#endregion
97
- export { alchemyInvocation as n, spawnAlchemy as r, alchemyCommandLine as t };
98
-
99
- //# sourceMappingURL=run-alchemy-pANK8XNX-T_pHNDBo.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"run-alchemy-pANK8XNX-T_pHNDBo.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/run-alchemy-pANK8XNX.mjs"],"sourcesContent":["import { CliStructuredError } from \"@internal/foundation/errors\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport spawn from \"cross-spawn\";\n//#region src/run-alchemy.ts\n/**\n* Pipeline step 7 (deploy-cli.md § The pipeline; design-notes.md's \"Driving\n* Alchemy\" call): hand the terminal to the generated stack file.\n*\n* Resolves the installed `alchemy` bin and launches package-manager shims with\n* cross-spawn.\n*\n* This module composes the invocation; it does not decide how the child is\n* started. Under the CLI the engine starts it (`ctx.spawn`), which is what\n* makes Ctrl-C reach the child natively and keeps signal policy in one place.\n* `spawnAlchemy` is the default for programmatic hosts driving\n* `@prisma/composer/control`, which have no engine to borrow.\n*/\n/** Walks up from `startDir` looking for the installed Alchemy executable. */\nfunction resolveAlchemyBin(startDir) {\n\tconst names = process.platform === \"win32\" ? [\n\t\t\"alchemy.exe\",\n\t\t\"alchemy.cmd\",\n\t\t\"alchemy\"\n\t] : [\"alchemy\"];\n\tlet dir = startDir;\n\twhile (true) {\n\t\tfor (const name of names) {\n\t\t\tconst candidate = path.join(dir, \"node_modules\", \".bin\", name);\n\t\t\tif (fs.existsSync(candidate)) return candidate;\n\t\t}\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/**\n* Resolves the invocation against this machine — the step every adapter takes\n* and no caller should. Raises DEPLOY.ALCHEMY_BIN_MISSING when the app has no\n* alchemy installed.\n*/\nfunction alchemyCommandLine(invocation) {\n\treturn {\n\t\tcommand: resolveAlchemyBin(invocation.cwd),\n\t\targs: [\n\t\t\tinvocation.action,\n\t\t\tinvocation.stackFileRelativePath,\n\t\t\t\"--yes\",\n\t\t\t\"--stage\",\n\t\t\tinvocation.stage\n\t\t],\n\t\tcwd: invocation.cwd,\n\t\tenv: invocation.env\n\t};\n}\n/** What becomes `alchemy deploy|destroy <stack file> --yes --stage <stage>`. */\nfunction alchemyInvocation(input) {\n\treturn {\n\t\taction: input.command,\n\t\tstackFileRelativePath: input.stackFileRelativePath,\n\t\tcwd: input.cwd,\n\t\tstage: input.stage,\n\t\tenv: {\n\t\t\t...input.containerEnv,\n\t\t\t...input.preflightEnv,\n\t\t\t...input.env\n\t\t}\n\t};\n}\n/**\n* The default runner for hosts with no engine: inherited stdio, the caller's\n* own process group, and the child's status returned verbatim. It does not\n* collapse a signal into an exit code — that collapse is what made a\n* Ctrl-C'd deploy report itself as a failure.\n*/\nconst spawnAlchemy = async (invocation) => {\n\tconst line = alchemyCommandLine(invocation);\n\treturn new Promise((resolve, reject) => {\n\t\tconst child = spawn(line.command, [...line.args], {\n\t\t\tcwd: line.cwd,\n\t\t\tstdio: \"inherit\",\n\t\t\tenv: {\n\t\t\t\t...process.env,\n\t\t\t\t...line.env\n\t\t\t}\n\t\t});\n\t\tchild.on(\"error\", reject);\n\t\tchild.on(\"close\", (exitCode, signal) => {\n\t\t\tresolve({\n\t\t\t\texitCode,\n\t\t\t\tsignal\n\t\t\t});\n\t\t});\n\t});\n};\n//#endregion\nexport { spawnAlchemy as i, alchemyInvocation as n, resolveAlchemyBin as r, alchemyCommandLine as t };\n\n//# sourceMappingURL=run-alchemy-pANK8XNX.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA,SAAS,kBAAkB,UAAU;CACpC,MAAM,QAAQ,QAAQ,aAAa,UAAU;EAC5C;EACA;EACA;CACD,IAAI,CAAC,SAAS;CACd,IAAI,MAAM;CACV,OAAO,MAAM;EACZ,KAAK,MAAM,QAAQ,OAAO;GACzB,MAAM,YAAY,KAAK,KAAK,KAAK,gBAAgB,QAAQ,IAAI;GAC7D,IAAI,GAAG,WAAW,SAAS,GAAG,OAAO;EACtC;EACA,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;;;;;;AAMA,SAAS,mBAAmB,YAAY;CACvC,OAAO;EACN,SAAS,kBAAkB,WAAW,GAAG;EACzC,MAAM;GACL,WAAW;GACX,WAAW;GACX;GACA;GACA,WAAW;EACZ;EACA,KAAK,WAAW;EAChB,KAAK,WAAW;CACjB;AACD;;AAEA,SAAS,kBAAkB,OAAO;CACjC,OAAO;EACN,QAAQ,MAAM;EACd,uBAAuB,MAAM;EAC7B,KAAK,MAAM;EACX,OAAO,MAAM;EACb,KAAK;GACJ,GAAG,MAAM;GACT,GAAG,MAAM;GACT,GAAG,MAAM;EACV;CACD;AACD;;;;;;;AAOA,MAAM,eAAe,OAAO,eAAe;CAC1C,MAAM,OAAO,mBAAmB,UAAU;CAC1C,OAAO,IAAI,SAAS,SAAS,WAAW;EACvC,MAAM,QAAQ,MAAM,KAAK,SAAS,CAAC,GAAG,KAAK,IAAI,GAAG;GACjD,KAAK,KAAK;GACV,OAAO;GACP,KAAK;IACJ,GAAG,QAAQ;IACX,GAAG,KAAK;GACT;EACD,CAAC;EACD,MAAM,GAAG,SAAS,MAAM;EACxB,MAAM,GAAG,UAAU,UAAU,WAAW;GACvC,QAAQ;IACP;IACA;GACD,CAAC;EACF,CAAC;CACF,CAAC;AACF"}
@@ -1,33 +0,0 @@
1
- import { c as CliStructuredError, u as blindCast } from "./result-D9vIrN7i.mjs";
2
- //#region ../../0-framework/3-tooling/cli/dist/shared-BAIiDgXa.mjs
3
- /**
4
- * Reads the execution diagnostics an engine-failure error carries in
5
- * `meta.diagnostics`; undefined for every other failure.
6
- */
7
- function executionDiagnostics(f) {
8
- const diagnostics = f.meta?.["diagnostics"];
9
- if (typeof diagnostics !== "object" || diagnostics === null) return void 0;
10
- const candidate = blindCast(diagnostics);
11
- if (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;
12
- return blindCast(diagnostics);
13
- }
14
- /**
15
- * Site-specific wrap for foreign extension/environment causes — passthrough
16
- * when already structured; never a boundary fallback (base-type rule 6(ii)).
17
- */
18
- function toStructured(code, error) {
19
- return CliStructuredError.is(error) ? error : new CliStructuredError(code, error instanceof Error ? error.message : String(error), { cause: error });
20
- }
21
- /** A failed executor import: an environmental failure of the consumer's
22
- * installed tree, not a bug here. The import error rides as the cause. */
23
- function executorLoadFailure(operation, error) {
24
- return new CliStructuredError("DEPS.EXECUTOR_UNLOADABLE", `Could not load the ${operation} executor: ${error instanceof Error ? error.message : String(error)}`, {
25
- why: `The ${operation} operation's executor imports the deploy engine's provider tree from your app's installed dependencies, and that import failed.`,
26
- fix: "Reinstall your dependencies, and check that `alchemy` is installed and loadable from your app.",
27
- cause: error
28
- });
29
- }
30
- //#endregion
31
- export { executorLoadFailure as n, toStructured as r, executionDiagnostics as t };
32
-
33
- //# sourceMappingURL=shared-BAIiDgXa-DYP7EOSk.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shared-BAIiDgXa-DYP7EOSk.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/shared-BAIiDgXa.mjs"],"sourcesContent":["import { CliStructuredError } from \"@internal/foundation/errors\";\nimport { blindCast } from \"@internal/foundation/casts\";\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}\n//#endregion\nexport { executorLoadFailure as n, toStructured as r, executionDiagnostics as t };\n\n//# sourceMappingURL=shared-BAIiDgXa.mjs.map"],"mappings":";;;;;;AAOA,SAAS,qBAAqB,GAAG;CAChC,MAAM,cAAc,EAAE,OAAO;CAC7B,IAAI,OAAO,gBAAgB,YAAY,gBAAgB,MAAM,OAAO,KAAK;CACzE,MAAM,YAAY,UAAU,WAAW;CACvC,IAAI,UAAU,gBAAgB,KAAK,KAAK,OAAO,UAAU,gBAAgB,YAAY,UAAU,cAAc,KAAK,KAAK,OAAO,UAAU,cAAc,YAAY,OAAO,UAAU,qBAAqB,YAAY,OAAO,UAAU,wBAAwB,YAAY,OAAO,UAAU,WAAW,UAAU;CAC/S,OAAO,UAAU,WAAW;AAC7B;;;;;AAKA,SAAS,aAAa,MAAM,OAAO;CAClC,OAAO,mBAAmB,GAAG,KAAK,IAAI,QAAQ,IAAI,mBAAmB,MAAM,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,GAAG,EAAE,OAAO,MAAM,CAAC;AACpJ;;;AAGA,SAAS,oBAAoB,WAAW,OAAO;CAC9C,OAAO,IAAI,mBAAmB,4BAA4B,sBAAsB,UAAU,aAAa,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,KAAK;EAChK,KAAK,OAAO,UAAU;EACtB,KAAK;EACL,OAAO;CACR,CAAC;AACF"}