@prisma/composer 0.6.0-dev.9 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{app-config-CFsSXEVj-B242oUnm.d.mts → app-config-BinBcpPf-1akTl5h4.d.mts} +128 -15
- package/dist/app-config-BinBcpPf-1akTl5h4.d.mts.map +1 -0
- package/dist/config-647Wkm51.d.mts +1 -0
- package/dist/config.d.mts +3 -3
- package/dist/control.d.mts +79 -35
- package/dist/control.d.mts.map +1 -1
- package/dist/control.mjs +34 -33
- package/dist/control.mjs.map +1 -1
- package/dist/deploy-647Wkm51.d.mts +1 -0
- package/dist/deploy.d.mts +2 -2
- package/dist/{deployment-summary-r47O6kFr-CcMYVOn5.mjs → deployment-summary-DswOl_9E-B9MhYYDt.mjs} +5 -5
- package/dist/deployment-summary-DswOl_9E-B9MhYYDt.mjs.map +1 -0
- package/dist/dist-CVk7Pk4B.mjs +42 -0
- package/dist/dist-CVk7Pk4B.mjs.map +1 -0
- package/dist/{execute-deploy-destroy-IT4vGkMc-oO8yjHPH.mjs → execute-deploy-destroy-DRl6Tfg9-B8LE2Lh5.mjs} +171 -31
- package/dist/execute-deploy-destroy-DRl6Tfg9-B8LE2Lh5.mjs.map +1 -0
- package/dist/{execute-dev-DLYyduEM-88uyvrbj.mjs → execute-dev-BMTFWfFc-7MifQgpp.mjs} +53 -48
- package/dist/execute-dev-BMTFWfFc-7MifQgpp.mjs.map +1 -0
- package/dist/{execute-log-VIOL4DBz-DBPH8By4.mjs → execute-log-Cay9hlKW-BcvKPOW1.mjs} +10 -7
- package/dist/execute-log-Cay9hlKW-BcvKPOW1.mjs.map +1 -0
- package/dist/local-target.d.mts +1 -1
- package/dist/nextjs-control.d.mts +3 -3
- package/dist/nextjs-control.mjs +138 -34
- package/dist/nextjs-control.mjs.map +1 -1
- package/dist/node-control.d.mts +3 -3
- package/dist/node-control.mjs +21814 -55
- package/dist/node-control.mjs.map +1 -1
- package/dist/{pipeline-D3QoVzAB-Ci2aJ2mE.mjs → pipeline-AoW8zq4I-Dg8xQ7nC.mjs} +170 -49
- package/dist/pipeline-AoW8zq4I-Dg8xQ7nC.mjs.map +1 -0
- package/dist/report.d.mts +2 -2
- package/dist/report.mjs +1 -1
- package/dist/report.mjs.map +1 -1
- package/dist/{result-CzGChwbZ.mjs → result-D95kAAek.mjs} +36 -20
- package/dist/result-D95kAAek.mjs.map +1 -0
- package/dist/run-alchemy-D44OZlyB-Cw5CVbUQ.mjs +93 -0
- package/dist/run-alchemy-D44OZlyB-Cw5CVbUQ.mjs.map +1 -0
- package/dist/run-report-C2o98uD--AX8kpz4Q.mjs +60 -0
- package/dist/run-report-C2o98uD--AX8kpz4Q.mjs.map +1 -0
- package/package.json +14 -19
- package/src/exports/testing.ts +5 -0
- package/dist/app-config-CFsSXEVj-B242oUnm.d.mts.map +0 -1
- package/dist/bin.mjs +0 -19
- package/dist/bin.mjs.map +0 -1
- package/dist/cli-B3sWzFlb-CxEIzKsQ.mjs +0 -401
- package/dist/cli-B3sWzFlb-CxEIzKsQ.mjs.map +0 -1
- package/dist/config-ku5b_2YD.d.mts +0 -1
- package/dist/container-transport-DKmKg5JQ-BMRhx5w-.mjs +0 -75
- package/dist/container-transport-DKmKg5JQ-BMRhx5w-.mjs.map +0 -1
- package/dist/deploy-ku5b_2YD.d.mts +0 -1
- package/dist/deployment-summary-r47O6kFr-CcMYVOn5.mjs.map +0 -1
- package/dist/execute-deploy-destroy-IT4vGkMc-YM1Cv6cu.mjs +0 -306
- package/dist/execute-deploy-destroy-IT4vGkMc-YM1Cv6cu.mjs.map +0 -1
- package/dist/execute-deploy-destroy-IT4vGkMc-oO8yjHPH.mjs.map +0 -1
- package/dist/execute-dev-DLYyduEM-88uyvrbj.mjs.map +0 -1
- package/dist/execute-dev-DLYyduEM-BuUGTm0g.mjs +0 -2006
- package/dist/execute-dev-DLYyduEM-BuUGTm0g.mjs.map +0 -1
- package/dist/execute-log-VIOL4DBz-DBPH8By4.mjs.map +0 -1
- package/dist/execute-log-VIOL4DBz-DKodBrxS.mjs +0 -155
- package/dist/execute-log-VIOL4DBz-DKodBrxS.mjs.map +0 -1
- package/dist/local-target-DuSyWeYc.mjs +0 -68
- package/dist/local-target-DuSyWeYc.mjs.map +0 -1
- package/dist/pipeline-D3QoVzAB-Ci2aJ2mE.mjs.map +0 -1
- package/dist/pipeline-D3QoVzAB-D_ufjg3N.mjs +0 -857
- package/dist/pipeline-D3QoVzAB-D_ufjg3N.mjs.map +0 -1
- package/dist/render-error-DsPN5qfr-CkVGj9uP.mjs +0 -30
- package/dist/render-error-DsPN5qfr-CkVGj9uP.mjs.map +0 -1
- package/dist/result-CFqJKiqg.mjs +0 -106
- package/dist/result-CFqJKiqg.mjs.map +0 -1
- package/dist/result-CzGChwbZ.mjs.map +0 -1
- package/dist/run-alchemy-hghRtddF-CQHOzlrW.mjs +0 -48
- package/dist/run-alchemy-hghRtddF-CQHOzlrW.mjs.map +0 -1
- package/dist/shared-CCaR42wo-BvegvmA_.mjs +0 -265
- package/dist/shared-CCaR42wo-BvegvmA_.mjs.map +0 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { t as CliStructuredError } from "./errors-0e8IVwzi.mjs";
|
|
2
|
+
import * as fs$1 from "node:fs";
|
|
3
|
+
import * as path$1 from "node:path";
|
|
4
|
+
import { spawn } from "node:child_process";
|
|
5
|
+
//#region ../../0-framework/3-tooling/cli/dist/run-alchemy-D44OZlyB.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. 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
|
+
* This module composes the invocation; it does not decide how the child is
|
|
16
|
+
* started. Under the CLI the engine starts it (`ctx.spawn`), which is what
|
|
17
|
+
* makes Ctrl-C reach the child natively and keeps signal policy in one place.
|
|
18
|
+
* `spawnAlchemy` is the default for programmatic hosts driving
|
|
19
|
+
* `@prisma/composer/control`, which have no engine to borrow.
|
|
20
|
+
*/
|
|
21
|
+
/** Walks up from `startDir` looking for `node_modules/.bin/alchemy`. */
|
|
22
|
+
function resolveAlchemyBin(startDir) {
|
|
23
|
+
let dir = startDir;
|
|
24
|
+
while (true) {
|
|
25
|
+
const candidate = path$1.join(dir, "node_modules", ".bin", "alchemy");
|
|
26
|
+
if (fs$1.existsSync(candidate)) return candidate;
|
|
27
|
+
const parent = path$1.dirname(dir);
|
|
28
|
+
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." });
|
|
29
|
+
dir = parent;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Resolves the invocation against this machine — the step every adapter takes
|
|
34
|
+
* and no caller should. Raises DEPLOY.ALCHEMY_BIN_MISSING when the app has no
|
|
35
|
+
* alchemy installed.
|
|
36
|
+
*/
|
|
37
|
+
function alchemyCommandLine(invocation) {
|
|
38
|
+
return {
|
|
39
|
+
command: resolveAlchemyBin(invocation.cwd),
|
|
40
|
+
args: [
|
|
41
|
+
invocation.action,
|
|
42
|
+
invocation.stackFileRelativePath,
|
|
43
|
+
"--yes",
|
|
44
|
+
"--stage",
|
|
45
|
+
invocation.stage
|
|
46
|
+
],
|
|
47
|
+
cwd: invocation.cwd,
|
|
48
|
+
env: invocation.env
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/** What becomes `alchemy deploy|destroy <stack file> --yes --stage <stage>`. */
|
|
52
|
+
function alchemyInvocation(input) {
|
|
53
|
+
return {
|
|
54
|
+
action: input.command,
|
|
55
|
+
stackFileRelativePath: input.stackFileRelativePath,
|
|
56
|
+
cwd: input.cwd,
|
|
57
|
+
stage: input.stage,
|
|
58
|
+
env: {
|
|
59
|
+
...input.containerEnv,
|
|
60
|
+
...input.env
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The default runner for hosts with no engine: inherited stdio, the caller's
|
|
66
|
+
* own process group, and the child's status returned verbatim. It does not
|
|
67
|
+
* collapse a signal into an exit code — that collapse is what made a
|
|
68
|
+
* Ctrl-C'd deploy report itself as a failure.
|
|
69
|
+
*/
|
|
70
|
+
const spawnAlchemy = async (invocation) => {
|
|
71
|
+
const line = alchemyCommandLine(invocation);
|
|
72
|
+
return new Promise((resolve, reject) => {
|
|
73
|
+
const child = spawn(line.command, [...line.args], {
|
|
74
|
+
cwd: line.cwd,
|
|
75
|
+
stdio: "inherit",
|
|
76
|
+
env: {
|
|
77
|
+
...process.env,
|
|
78
|
+
...line.env
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
child.on("error", reject);
|
|
82
|
+
child.on("close", (exitCode, signal) => {
|
|
83
|
+
resolve({
|
|
84
|
+
exitCode,
|
|
85
|
+
signal
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
//#endregion
|
|
91
|
+
export { spawnAlchemy as n, alchemyInvocation as t };
|
|
92
|
+
|
|
93
|
+
//# sourceMappingURL=run-alchemy-D44OZlyB-Cw5CVbUQ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-alchemy-D44OZlyB-Cw5CVbUQ.mjs","names":["path","fs"],"sources":["../../../0-framework/3-tooling/cli/dist/run-alchemy-D44OZlyB.mjs"],"sourcesContent":["import { CliStructuredError } from \"@internal/foundation/errors\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { spawn } 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): hand the terminal 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* 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 `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/**\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.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-D44OZlyB.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,SAAS,kBAAkB,UAAU;CACpC,IAAI,MAAM;CACV,OAAO,MAAM;EACZ,MAAM,YAAYA,OAAK,KAAK,KAAK,gBAAgB,QAAQ,SAAS;EAClE,IAAIC,KAAG,WAAW,SAAS,GAAG,OAAO;EACrC,MAAM,SAASD,OAAK,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;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"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as fs$1 from "node:fs";
|
|
2
|
+
import * as path$1 from "node:path";
|
|
3
|
+
//#region ../../0-framework/3-tooling/cli/dist/run-report-C2o98uD-.mjs
|
|
4
|
+
/**
|
|
5
|
+
* The run report: one deploy's outcome as JSON, for tools that consume a
|
|
6
|
+
* deploy rather than watch one — the Prisma GitHub Action reads it to build a
|
|
7
|
+
* pull-request comment carrying preview links.
|
|
8
|
+
*
|
|
9
|
+
* Deliberately separate from `deployment-summary.ts`. That file is a private
|
|
10
|
+
* carrier between the alchemy child and this process, written to a
|
|
11
|
+
* per-run path the parent deletes in a `finally` so resource ids and URLs do
|
|
12
|
+
* not accumulate on disk. This one is written where the operator asked for
|
|
13
|
+
* it, survives the run, is written on the failure path too, and carries a
|
|
14
|
+
* version so a consumer can depend on its shape.
|
|
15
|
+
*/
|
|
16
|
+
/** Bump when a change would break a consumer that reads the current shape. */
|
|
17
|
+
const RUN_REPORT_VERSION = 1;
|
|
18
|
+
/** Names the file to write the run report to, when `--report` is not passed. */
|
|
19
|
+
const RUN_REPORT_FILE_ENV = "PRISMA_COMPOSER_REPORT_FILE";
|
|
20
|
+
function toRunReport(input) {
|
|
21
|
+
return {
|
|
22
|
+
version: 1,
|
|
23
|
+
outcome: input.failure === void 0 ? "succeeded" : "failed",
|
|
24
|
+
app: input.summary?.app ?? null,
|
|
25
|
+
stage: input.stage ?? null,
|
|
26
|
+
nodes: input.summary?.nodes ?? [],
|
|
27
|
+
failure: input.failure ?? null
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The path to write to: the `--report` flag first, then the env var. Relative
|
|
32
|
+
* paths resolve against the deploy's cwd. `undefined` means no report was
|
|
33
|
+
* asked for, which is the common case and writes nothing.
|
|
34
|
+
*/
|
|
35
|
+
function resolveRunReportPath(flag, env, cwd) {
|
|
36
|
+
const requested = flag !== void 0 && flag.length > 0 ? flag : env;
|
|
37
|
+
if (requested === void 0 || requested.length === 0) return void 0;
|
|
38
|
+
return path$1.resolve(cwd, requested);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Writes the report, creating the parent directory if needed. A write failure
|
|
42
|
+
* warns and returns false rather than failing a deploy that already
|
|
43
|
+
* converged — but it is never silent, because the operator asked for this
|
|
44
|
+
* file and a consumer is waiting on it.
|
|
45
|
+
*/
|
|
46
|
+
function writeRunReport(filePath, report) {
|
|
47
|
+
try {
|
|
48
|
+
fs$1.mkdirSync(path$1.dirname(filePath), { recursive: true });
|
|
49
|
+
fs$1.writeFileSync(filePath, `${JSON.stringify(report, null, 2)}\n`);
|
|
50
|
+
return true;
|
|
51
|
+
} catch (error) {
|
|
52
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
53
|
+
console.warn(`\nCould not write the run report to ${filePath}: ${detail}`);
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { writeRunReport as a, toRunReport as i, RUN_REPORT_VERSION as n, resolveRunReportPath as r, RUN_REPORT_FILE_ENV as t };
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=run-report-C2o98uD--AX8kpz4Q.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-report-C2o98uD--AX8kpz4Q.mjs","names":["path"],"sources":["../../../0-framework/3-tooling/cli/dist/run-report-C2o98uD-.mjs"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\n//#region src/run-report.ts\n/**\n* The run report: one deploy's outcome as JSON, for tools that consume a\n* deploy rather than watch one — the Prisma GitHub Action reads it to build a\n* pull-request comment carrying preview links.\n*\n* Deliberately separate from `deployment-summary.ts`. That file is a private\n* carrier between the alchemy child and this process, written to a\n* per-run path the parent deletes in a `finally` so resource ids and URLs do\n* not accumulate on disk. This one is written where the operator asked for\n* it, survives the run, is written on the failure path too, and carries a\n* version so a consumer can depend on its shape.\n*/\n/** Bump when a change would break a consumer that reads the current shape. */\nconst RUN_REPORT_VERSION = 1;\n/** Names the file to write the run report to, when `--report` is not passed. */\nconst RUN_REPORT_FILE_ENV = \"PRISMA_COMPOSER_REPORT_FILE\";\nfunction toRunReport(input) {\n\treturn {\n\t\tversion: 1,\n\t\toutcome: input.failure === void 0 ? \"succeeded\" : \"failed\",\n\t\tapp: input.summary?.app ?? null,\n\t\tstage: input.stage ?? null,\n\t\tnodes: input.summary?.nodes ?? [],\n\t\tfailure: input.failure ?? null\n\t};\n}\n/**\n* The path to write to: the `--report` flag first, then the env var. Relative\n* paths resolve against the deploy's cwd. `undefined` means no report was\n* asked for, which is the common case and writes nothing.\n*/\nfunction resolveRunReportPath(flag, env, cwd) {\n\tconst requested = flag !== void 0 && flag.length > 0 ? flag : env;\n\tif (requested === void 0 || requested.length === 0) return void 0;\n\treturn path.resolve(cwd, requested);\n}\n/**\n* Writes the report, creating the parent directory if needed. A write failure\n* warns and returns false rather than failing a deploy that already\n* converged — but it is never silent, because the operator asked for this\n* file and a consumer is waiting on it.\n*/\nfunction writeRunReport(filePath, report) {\n\ttry {\n\t\tfs.mkdirSync(path.dirname(filePath), { recursive: true });\n\t\tfs.writeFileSync(filePath, `${JSON.stringify(report, null, 2)}\\n`);\n\t\treturn true;\n\t} catch (error) {\n\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\tconsole.warn(`\\nCould not write the run report to ${filePath}: ${detail}`);\n\t\treturn false;\n\t}\n}\n//#endregion\nexport { writeRunReport as a, toRunReport as i, RUN_REPORT_VERSION as n, resolveRunReportPath as r, RUN_REPORT_FILE_ENV as t };\n\n//# sourceMappingURL=run-report-C2o98uD-.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAM,qBAAqB;;AAE3B,MAAM,sBAAsB;AAC5B,SAAS,YAAY,OAAO;CAC3B,OAAO;EACN,SAAS;EACT,SAAS,MAAM,YAAY,KAAK,IAAI,cAAc;EAClD,KAAK,MAAM,SAAS,OAAO;EAC3B,OAAO,MAAM,SAAS;EACtB,OAAO,MAAM,SAAS,SAAS,CAAC;EAChC,SAAS,MAAM,WAAW;CAC3B;AACD;;;;;;AAMA,SAAS,qBAAqB,MAAM,KAAK,KAAK;CAC7C,MAAM,YAAY,SAAS,KAAK,KAAK,KAAK,SAAS,IAAI,OAAO;CAC9D,IAAI,cAAc,KAAK,KAAK,UAAU,WAAW,GAAG,OAAO,KAAK;CAChE,OAAOA,OAAK,QAAQ,KAAK,SAAS;AACnC;;;;;;;AAOA,SAAS,eAAe,UAAU,QAAQ;CACzC,IAAI;EACH,KAAG,UAAUA,OAAK,QAAQ,QAAQ,GAAG,EAAE,WAAW,KAAK,CAAC;EACxD,KAAG,cAAc,UAAU,GAAG,KAAK,UAAU,QAAQ,MAAM,CAAC,EAAE,GAAG;EACjE,OAAO;CACR,SAAS,OAAO;EACf,MAAM,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;EACpE,QAAQ,KAAK,uCAAuC,SAAS,IAAI,QAAQ;EACzE,OAAO;CACR;AACD"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/composer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "Prisma Composer — build a Prisma App by composing Modules. Core authoring, deploy pipeline,
|
|
6
|
-
"bin": {
|
|
7
|
-
"prisma-composer": "./dist/bin.mjs"
|
|
8
|
-
},
|
|
5
|
+
"description": "Prisma Composer — build a Prisma App by composing Modules. Core authoring, deploy pipeline, and the service-rpc/node/nextjs authoring surfaces. The `prisma-composer` CLI lives in @prisma/composer-cli.",
|
|
9
6
|
"exports": {
|
|
10
7
|
".": "./dist/index.mjs",
|
|
11
8
|
"./config": "./dist/config.mjs",
|
|
@@ -29,27 +26,25 @@
|
|
|
29
26
|
"src"
|
|
30
27
|
],
|
|
31
28
|
"dependencies": {
|
|
32
|
-
"@effect/vitest": "4.0.0-beta.103",
|
|
33
29
|
"@standard-schema/spec": "^1.1.0",
|
|
34
30
|
"alchemy": "2.0.0-beta.67",
|
|
35
31
|
"arktype": "^2.2.3",
|
|
36
32
|
"c12": "^3.3.4",
|
|
37
|
-
"clipanion": "^3.2.1",
|
|
38
33
|
"effect": "4.0.0-beta.103",
|
|
39
34
|
"esbuild": "^0.28.1",
|
|
40
|
-
"
|
|
41
|
-
"@prisma/management-api-sdk": "^1.50.0"
|
|
35
|
+
"@prisma/management-api-sdk": "^1.60.0"
|
|
42
36
|
},
|
|
43
37
|
"devDependencies": {
|
|
44
|
-
"@
|
|
45
|
-
"@internal/
|
|
46
|
-
"@internal/
|
|
47
|
-
"@internal/
|
|
48
|
-
"@internal/
|
|
49
|
-
"@internal/
|
|
50
|
-
"@internal/
|
|
51
|
-
"@internal/
|
|
52
|
-
"@internal/
|
|
38
|
+
"@effect/vitest": "4.0.0-beta.103",
|
|
39
|
+
"@internal/assemble": "0.7.0",
|
|
40
|
+
"@internal/cli": "0.7.0",
|
|
41
|
+
"@internal/core": "0.7.0",
|
|
42
|
+
"@internal/foundation": "0.7.0",
|
|
43
|
+
"@internal/lowering": "0.7.0",
|
|
44
|
+
"@internal/nextjs": "0.7.0",
|
|
45
|
+
"@internal/node": "0.7.0",
|
|
46
|
+
"@internal/service-rpc": "0.7.0",
|
|
47
|
+
"@internal/tsdown-config": "0.7.0",
|
|
53
48
|
"@types/node": "^26.0.1",
|
|
54
49
|
"tsdown": "^0.22.7",
|
|
55
50
|
"typescript": "^6.0.3"
|
|
@@ -61,7 +56,7 @@
|
|
|
61
56
|
"directory": "packages/9-public/composer"
|
|
62
57
|
},
|
|
63
58
|
"engines": {
|
|
64
|
-
"node": ">=
|
|
59
|
+
"node": ">=22.18.0"
|
|
65
60
|
},
|
|
66
61
|
"publishConfig": {
|
|
67
62
|
"access": "public"
|
package/src/exports/testing.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-config-CFsSXEVj-B242oUnm.d.mts","names":[],"sources":["../../../0-framework/1-core/core/dist/app-config-CFsSXEVj.d.mts"],"mappings":"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"}
|
package/dist/bin.mjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { a as CliStructuredError, t as checkEffectResolution } from "./shared-CCaR42wo-BvegvmA_.mjs";
|
|
3
|
-
import { n as renderErrorEnvelope } from "./render-error-DsPN5qfr-CkVGj9uP.mjs";
|
|
4
|
-
//#region ../../0-framework/3-tooling/cli/dist/bin.mjs
|
|
5
|
-
try {
|
|
6
|
-
checkEffectResolution(process.cwd());
|
|
7
|
-
} catch (error) {
|
|
8
|
-
if (CliStructuredError.is(error)) {
|
|
9
|
-
console.error(renderErrorEnvelope(error.toEnvelope()));
|
|
10
|
-
process.exit(2);
|
|
11
|
-
}
|
|
12
|
-
throw error;
|
|
13
|
-
}
|
|
14
|
-
const { cli } = await import("./cli-B3sWzFlb-CxEIzKsQ.mjs");
|
|
15
|
-
cli();
|
|
16
|
-
//#endregion
|
|
17
|
-
export {};
|
|
18
|
-
|
|
19
|
-
//# sourceMappingURL=bin.mjs.map
|
package/dist/bin.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bin.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/bin.mjs"],"sourcesContent":["#!/usr/bin/env node\nimport { i as checkEffectResolution } from \"./shared-CCaR42wo.mjs\";\nimport { n as renderErrorEnvelope } from \"./render-error-DsPN5qfr.mjs\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\n//#region src/bin.ts\ntry {\n\tcheckEffectResolution(process.cwd());\n} catch (error) {\n\tif (CliStructuredError.is(error)) {\n\t\tconsole.error(renderErrorEnvelope(error.toEnvelope()));\n\t\tprocess.exit(2);\n\t}\n\tthrow error;\n}\nconst { cli } = await import(\"./cli-B3sWzFlb.mjs\");\ncli();\n//#endregion\nexport {};\n\n//# sourceMappingURL=bin.mjs.map"],"mappings":";;;;AAKA,IAAI;CACH,sBAAsB,QAAQ,IAAI,CAAC;AACpC,SAAS,OAAO;CACf,IAAI,mBAAmB,GAAG,KAAK,GAAG;EACjC,QAAQ,MAAM,oBAAoB,MAAM,WAAW,CAAC,CAAC;EACrD,QAAQ,KAAK,CAAC;CACf;CACA,MAAM;AACP;AACA,MAAM,EAAE,QAAQ,MAAM,OAAO;AAC7B,IAAI"}
|