@prisma/composer-cli 0.39.0-dev.11 → 0.39.0-dev.12
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-converge-bS1l9jIf-B1FOgxBQ.mjs → app-converge-DkTFs-ih-VPepJ4ZK.mjs} +3 -3
- package/dist/{app-converge-bS1l9jIf-B1FOgxBQ.mjs.map → app-converge-DkTFs-ih-VPepJ4ZK.mjs.map} +1 -1
- package/dist/dev-converge-worker.mjs +1 -1
- package/dist/dev-converge-worker.mjs.map +1 -1
- package/dist/{dev-current-lAlj53eX-DvAHNZFo.mjs → dev-current-C7rT6Yxw-DdlXRvfz.mjs} +5 -5
- package/dist/{dev-current-lAlj53eX-DvAHNZFo.mjs.map → dev-current-C7rT6Yxw-DdlXRvfz.mjs.map} +1 -1
- package/dist/{execute-deploy-destroy-DN16ETAk-CzORriUO.mjs → execute-deploy-destroy-C-aK5jh--DZdZgI7g.mjs} +4 -4
- package/dist/{execute-deploy-destroy-DN16ETAk-CzORriUO.mjs.map → execute-deploy-destroy-C-aK5jh--DZdZgI7g.mjs.map} +1 -1
- package/dist/{execute-dev-DnVmNpc1-BzK9Qns_.mjs → execute-dev-BtSLDMkv-C7vjxmdg.mjs} +4 -4
- package/dist/{execute-dev-DnVmNpc1-BzK9Qns_.mjs.map → execute-dev-BtSLDMkv-C7vjxmdg.mjs.map} +1 -1
- package/dist/{execute-dev-current-CZdmxVQ4-DxDflvNG.mjs → execute-dev-current-LEdiAZSw-CqLq03hv.mjs} +3 -3
- package/dist/{execute-dev-current-CZdmxVQ4-DxDflvNG.mjs.map → execute-dev-current-LEdiAZSw-CqLq03hv.mjs.map} +1 -1
- package/dist/family.mjs +2 -2
- package/dist/family.mjs.map +1 -1
- package/dist/{list-deployed-D6vTzpWu.mjs → list-deployed-C1cfd_XX.mjs} +2 -2
- package/dist/{list-deployed-D6vTzpWu.mjs.map → list-deployed-C1cfd_XX.mjs.map} +1 -1
- package/package.json +7 -7
|
@@ -4,8 +4,8 @@ import { createRequire } from "node:module";
|
|
|
4
4
|
import * as fs from "node:fs";
|
|
5
5
|
import * as path from "node:path";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
|
7
|
-
//#region ../../0-framework/3-tooling/cli/dist/app-converge-
|
|
8
|
-
var version = "0.39.0-dev.
|
|
7
|
+
//#region ../../0-framework/3-tooling/cli/dist/app-converge-DkTFs-ih.mjs
|
|
8
|
+
var version = "0.39.0-dev.12";
|
|
9
9
|
const ENTRY = "@prisma/composer/internal/converge";
|
|
10
10
|
const CONTRACT_ENTRY = "@prisma/composer/internal/converge-contract";
|
|
11
11
|
const ENTRY_FUNCTIONS = [
|
|
@@ -85,4 +85,4 @@ async function loadAppConvergeEntry(appDir, host = {
|
|
|
85
85
|
//#endregion
|
|
86
86
|
export { loadAppConvergeEntry as t };
|
|
87
87
|
|
|
88
|
-
//# sourceMappingURL=app-converge-
|
|
88
|
+
//# sourceMappingURL=app-converge-DkTFs-ih-VPepJ4ZK.mjs.map
|
package/dist/{app-converge-bS1l9jIf-B1FOgxBQ.mjs.map → app-converge-DkTFs-ih-VPepJ4ZK.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-converge-
|
|
1
|
+
{"version":3,"file":"app-converge-DkTFs-ih-VPepJ4ZK.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/app-converge-DkTFs-ih.mjs"],"sourcesContent":["import \"./converge-contract-DrO0Jt9l.mjs\";\nimport { createRequire } from \"node:module\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport { pathToFileURL } from \"node:url\";\nimport { blindCast } from \"@internal/foundation/casts\";\n//#region package.json\nvar version = \"0.39.0-dev.12\";\n//#endregion\n//#region src/app-converge.ts\nconst ENTRY = \"@prisma/composer/internal/converge\";\nconst CONTRACT_ENTRY = \"@prisma/composer/internal/converge-contract\";\nconst ENTRY_FUNCTIONS = [\n\t\"lower\",\n\t\"convergeInProcess\",\n\t\"localTargetProviders\",\n\t\"devState\"\n];\n/** The Composer version this host runs; every Composer package carries the same one. */\nconst HOST_COMPOSER_VERSION = version;\nfunction unresolvable(appDir, detail, cause) {\n\treturn new CliStructuredError(\"DEPS.CONVERGE_UNRESOLVABLE\", `Could not load the converge from the app's @prisma/composer in \"${appDir}\": ${detail}`, {\n\t\twhy: \"`prisma deploy` and `prisma dev` run the lowering and Alchemy from the app's own install of @prisma/composer, so the app, its extensions and Alchemy share one copy of alchemy.\",\n\t\tfix: \"Install @prisma/composer in the app, at the same version as the Composer the `prisma` CLI runs.\",\n\t\t...cause === void 0 ? {} : { cause }\n\t});\n}\nfunction installedVersion(require) {\n\ttry {\n\t\tconst parsed = JSON.parse(fs.readFileSync(require.resolve(\"@prisma/composer/package.json\"), \"utf8\"));\n\t\treturn typeof parsed === \"object\" && parsed !== null && \"version\" in parsed && typeof parsed.version === \"string\" ? parsed.version : void 0;\n\t} catch {\n\t\treturn;\n\t}\n}\nasync function importFile(appDir, file) {\n\ttry {\n\t\treturn await import(pathToFileURL(file).href);\n\t} catch (error) {\n\t\tthrow unresolvable(appDir, `${file} failed to load: ${error instanceof Error ? error.message : String(error)}`, error);\n\t}\n}\nfunction contractMismatch(host, app) {\n\tconst appVersion = app.version ?? \"an unknown version\";\n\tconst update = app.contract < host.contract ? `Upgrade the app's @prisma/composer to a release that speaks converge contract ${host.contract}, such as ${host.version}.` : `Upgrade the \\`prisma\\` CLI to one that runs a Composer speaking converge contract ${app.contract}, such as ${appVersion}.`;\n\treturn new CliStructuredError(\"DEPS.CONVERGE_CONTRACT_MISMATCH\", `The app's @prisma/composer ${appVersion} speaks converge contract ${app.contract}, and the \\`prisma\\` CLI's Composer ${host.version} speaks contract ${host.contract}.`, {\n\t\twhy: \"Deploy and dev call the app's @prisma/composer from the CLI's Composer, and the two read each other's data only when they speak the same converge contract.\",\n\t\tfix: update\n\t});\n}\n/**\n* The app's `lower`, converge and local target functions, from the install `appDir` resolves. Reads the app's\n* converge contract before loading anything else. Raises\n* DEPS.CONVERGE_UNRESOLVABLE when the install is missing or predates the\n* in-process converge, and DEPS.CONVERGE_CONTRACT_MISMATCH when it speaks\n* another contract than `host`.\n*/\nasync function loadAppConvergeEntry(appDir, host = {\n\tcontract: 2,\n\tversion: HOST_COMPOSER_VERSION\n}) {\n\tconst require = createRequire(path.join(appDir, \"package.json\"));\n\tlet contractFile;\n\tlet file;\n\ttry {\n\t\tcontractFile = require.resolve(CONTRACT_ENTRY);\n\t\tfile = require.resolve(ENTRY);\n\t} catch (error) {\n\t\tthrow unresolvable(appDir, `${CONTRACT_ENTRY} or ${ENTRY} does not resolve.`, error);\n\t}\n\tconst { CONVERGE_CONTRACT: appContract } = await importFile(appDir, contractFile);\n\tif (typeof appContract !== \"number\") throw unresolvable(appDir, `${contractFile} exports no CONVERGE_CONTRACT.`);\n\tif (appContract !== host.contract) throw contractMismatch(host, {\n\t\tcontract: appContract,\n\t\tversion: installedVersion(require)\n\t});\n\tconst entry = await importFile(appDir, file);\n\tconst missing = ENTRY_FUNCTIONS.filter((name) => typeof entry[name] !== \"function\");\n\tif (missing.length > 0) throw unresolvable(appDir, `${file} exports no ${missing.join(\", \")}.`);\n\treturn blindCast({\n\t\tlower: entry[\"lower\"],\n\t\tconverge: entry[\"convergeInProcess\"],\n\t\tlocalTargetProviders: entry[\"localTargetProviders\"],\n\t\tdevState: entry[\"devState\"]\n\t});\n}\n//#endregion\nexport { loadAppConvergeEntry as t };\n\n//# sourceMappingURL=app-converge-DkTFs-ih.mjs.map"],"mappings":";;;;;;;AAQA,IAAI,UAAU;AAGd,MAAM,QAAQ;AACd,MAAM,iBAAiB;AACvB,MAAM,kBAAkB;CACvB;CACA;CACA;CACA;AACD;;AAEA,MAAM,wBAAwB;AAC9B,SAAS,aAAa,QAAQ,QAAQ,OAAO;CAC5C,OAAO,IAAI,mBAAmB,8BAA8B,mEAAmE,OAAO,KAAK,UAA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mBAAmB,gBAAgB,MAAM,WAAW,QAAQ,YAAY;CAChF,IAAI,OAAO,gBAAgB,UAAU,MAAM,aAAa,QAAQ,GAAG,aAAa,+BAA+B;CAC/G,IAAI,gBAAgB,KAAK,UAAU,MAAM,iBAAiB,MAAM;EAC/D,UAAU;EACV,SAAS,iBAAiB,OAAO;CAClC,CAAC;CACD,MAAM,QAAQ,MAAM,WAAW,QAAQ,IAAI;CAC3C,MAAM,UAAU,gBAAgB,QAAQ,SAAS,OAAO,MAAM,UAAU,UAAU;CAClF,IAAI,QAAQ,SAAS,GAAG,MAAM,aAAa,QAAQ,GAAG,KAAK,cAAc,QAAQ,KAAK,IAAI,EAAE,EAAE;CAC9F,OAAO,UAAU;EAChB,OAAO,MAAM;EACb,UAAU,MAAM;EAChB,sBAAsB,MAAM;EAC5B,UAAU,MAAM;CACjB,CAAC;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as noComposerExportMessage, t as checkComposerConfig } from "./composer-config-QKdY85G--CEXrb2Uc.mjs";
|
|
2
2
|
import { a as loadEntry, i as appFilesNamedBy, o as namesDirectoryWithIndex, s as registerEntryResolution } from "./deploy-Br1yvLe3.mjs";
|
|
3
3
|
import { t as CliStructuredError } from "./errors-CVYwN2km.mjs";
|
|
4
|
-
import { t as loadAppConvergeEntry } from "./app-converge-
|
|
4
|
+
import { t as loadAppConvergeEntry } from "./app-converge-DkTFs-ih-VPepJ4ZK.mjs";
|
|
5
5
|
import { i as thrownResult, n as isAbortMessage, t as convergeDevJob } from "./dev-converge-messages-DML4rTz7-B6uxtpZG.mjs";
|
|
6
6
|
import { format } from "node:util";
|
|
7
7
|
import { pathToFileURL } from "node:url";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-converge-worker.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/dev-converge-worker.mjs"],"sourcesContent":["import { i as noComposerExportMessage, t as checkComposerConfig } from \"./composer-config-QKdY85G-.mjs\";\nimport { i as registerEntryResolution, n as appFilesNamedBy, r as namesDirectoryWithIndex, t as loadEntry } from \"./load-entry-CEoVBdMj.mjs\";\nimport { t as loadAppConvergeEntry } from \"./app-converge-
|
|
1
|
+
{"version":3,"file":"dev-converge-worker.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/dev-converge-worker.mjs"],"sourcesContent":["import { i as noComposerExportMessage, t as checkComposerConfig } from \"./composer-config-QKdY85G-.mjs\";\nimport { i as registerEntryResolution, n as appFilesNamedBy, r as namesDirectoryWithIndex, t as loadEntry } from \"./load-entry-CEoVBdMj.mjs\";\nimport { t as loadAppConvergeEntry } from \"./app-converge-DkTFs-ih.mjs\";\nimport { i as thrownResult, r as convergeDevJob, t as isAbortMessage } from \"./dev-converge-messages-DML4rTz7.mjs\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport { pathToFileURL } from \"node:url\";\nimport { format } from \"node:util\";\nimport { parentPort, workerData } from \"node:worker_threads\";\nimport { Writable } from \"node:stream\";\n//#region src/operations/dev-converge-worker.ts\n/**\n* The worker thread one `prisma dev` converge runs in (`dev-converge-in-worker.ts`\n* starts it). A new thread has its own module cache, so it imports the config\n* and the app as they are on disk now. It receives a `DevConvergeJob` as its\n* `workerData` and posts `WorkerMessage`s back.\n*/\nconst port = parentPort;\nif (port === null) throw new Error(\"dev-converge-worker runs only as a worker thread.\");\nconst post = (message) => port.postMessage(message);\nconst output = (text) => post({\n\tkind: \"output\",\n\ttext\n});\n/**\n* Methods that send only to an attached inspector and print nothing to the terminal, under Node or\n* Bun. They keep their own behaviour: `console.createTask` returns a task whose `run` callers use.\n*/\nconst INSPECTOR_ONLY = /* @__PURE__ */ new Set([\n\t\"context\",\n\t\"createTask\",\n\t\"profile\",\n\t\"profileEnd\",\n\t\"record\",\n\t\"recordEnd\",\n\t\"screenshot\",\n\t\"timeStamp\"\n]);\n/** Every function on `console` that can print, its own and inherited, except constructors. */\nfunction printingConsoleFunctionNames() {\n\tconst names = /* @__PURE__ */ new Set();\n\tfor (let level = console; level !== null && level !== Object.prototype;) {\n\t\tfor (const name of Object.getOwnPropertyNames(level)) {\n\t\t\tif (name === \"constructor\" || name === \"Console\" || INSPECTOR_ONLY.has(name)) continue;\n\t\t\tif (typeof Reflect.get(console, name) === \"function\") names.add(name);\n\t\t}\n\t\tlevel = Object.getPrototypeOf(level);\n\t}\n\treturn [...names];\n}\nconst textOf = (chunk) => typeof chunk === \"string\" ? chunk : Buffer.from(chunk).toString(\"utf8\");\n/** Bun's `console.write`: each argument's bytes one after another, returning how many were written. */\nfunction bunConsoleWrite(...args) {\n\tconst chunks = [];\n\ttry {\n\t\tif (args.length === 0) throw writeArgumentError(\"ERR_STREAM_NULL_VALUES\");\n\t\tfor (const arg of args) chunks.push(bytesOf(arg));\n\t} finally {\n\t\tif (chunks.length > 0) output(textOf(Buffer.concat(chunks)));\n\t}\n\treturn chunks.reduce((total, chunk) => total + chunk.byteLength, 0);\n}\nfunction bytesOf(arg) {\n\tif (typeof arg === \"string\") return Buffer.from(arg, \"utf8\");\n\tif (arg instanceof ArrayBuffer) return new Uint8Array(arg);\n\tif (ArrayBuffer.isView(arg)) return new Uint8Array(arg.buffer, arg.byteOffset, arg.byteLength);\n\tthrow writeArgumentError(\"ERR_INVALID_ARG_TYPE\");\n}\nfunction writeArgumentError(code) {\n\treturn Object.assign(/* @__PURE__ */ new TypeError(\"write() expects a string, ArrayBufferView, or ArrayBuffer\"), { code });\n}\nfor (const stream of [process.stdout, process.stderr]) stream.write = (chunk) => {\n\toutput(textOf(chunk));\n\treturn true;\n};\nconst sink = new Writable({ write(chunk, _encoding, done) {\n\toutput(textOf(chunk));\n\tdone();\n} });\nconst replacement = new console.Console({\n\tstdout: sink,\n\tstderr: sink\n});\nconst printed = (arg) => typeof arg === \"string\" || arg instanceof Uint8Array ? textOf(arg) : format(arg);\nfor (const name of printingConsoleFunctionNames()) {\n\tconst own = Reflect.get(replacement, name);\n\tReflect.set(console, name, name === \"write\" ? bunConsoleWrite : typeof own === \"function\" ? own.bind(replacement) : (...args) => output(args.map(printed).join(\" \")));\n}\nif (typeof process.versions.bun === \"string\") process.on(\"warning\", (warning) => output(`${warning.name}: ${warning.message}\\n`));\nregisterEntryResolution();\nconst controller = new AbortController();\nport.on(\"message\", (message) => {\n\tif (isAbortMessage(message)) controller.abort();\n});\nasync function importConfig(file) {\n\tconst exported = (await import(pathToFileURL(file).href)).default;\n\tconst section = typeof exported === \"object\" && exported !== null && \"composer\" in exported ? exported.composer : void 0;\n\tif (section === void 0) throw new Error(noComposerExportMessage(file));\n\tconst checked = checkComposerConfig(section, file);\n\tif (!checked.ok) {\n\t\tconst [finding] = checked.findings;\n\t\tthrow new CliStructuredError(finding.code, finding.summary, {\n\t\t\t...finding.why === void 0 ? {} : { why: finding.why },\n\t\t\tfix: finding.fix\n\t\t});\n\t}\n\treturn checked.value;\n}\nasync function run(job) {\n\tconst recorded = /* @__PURE__ */ new Set();\n\ttry {\n\t\tconst config = await importConfig(job.configFile);\n\t\tconst { root, files } = await loadEntry(job.entry, job.cwd, void 0, recorded);\n\t\treturn await convergeDevJob(job, {\n\t\t\tconfig,\n\t\t\troot,\n\t\t\tentry: await loadAppConvergeEntry(job.appDir),\n\t\t\tappFiles: files\n\t\t}, {\n\t\t\tonEvent: (event) => post({\n\t\t\t\tkind: \"event\",\n\t\t\t\tevent\n\t\t\t}),\n\t\t\toutput\n\t\t}, controller.signal);\n\t} catch (error) {\n\t\tconst result = thrownResult(error, [...recorded, ...appFilesNamedBy(error)]);\n\t\treturn result.kind === \"error\" && process.versions.bun !== void 0 && namesDirectoryWithIndex(error) ? {\n\t\t\t...result,\n\t\t\tlookupKept: true\n\t\t} : result;\n\t}\n}\nrun(workerData).then((result) => {\n\tpost({\n\t\tkind: \"result\",\n\t\tresult\n\t});\n\tprocess.exit(0);\n});\n//#endregion\nexport {};\n\n//# sourceMappingURL=dev-converge-worker.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAM,OAAO;AACb,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abB6.mjs";
|
|
3
|
-
//#region ../../0-framework/3-tooling/cli/dist/dev-current-
|
|
3
|
+
//#region ../../0-framework/3-tooling/cli/dist/dev-current-C7rT6Yxw.mjs
|
|
4
4
|
/**
|
|
5
5
|
* Site-specific wrap for foreign extension/environment causes — passthrough
|
|
6
6
|
* when already structured; never a boundary fallback (base-type rule 6(ii)).
|
|
@@ -65,7 +65,7 @@ async function deployWithDeps(input, deps) {
|
|
|
65
65
|
const cwd = input.cwd ?? process.cwd();
|
|
66
66
|
let executor;
|
|
67
67
|
try {
|
|
68
|
-
executor = await import("./execute-deploy-destroy-
|
|
68
|
+
executor = await import("./execute-deploy-destroy-C-aK5jh--DZdZgI7g.mjs");
|
|
69
69
|
} catch (error) {
|
|
70
70
|
return notOk(executorLoadFailure("deploy", error));
|
|
71
71
|
}
|
|
@@ -83,7 +83,7 @@ async function devWithDeps(input, deps) {
|
|
|
83
83
|
const cwd = input.cwd ?? process.cwd();
|
|
84
84
|
let executor;
|
|
85
85
|
try {
|
|
86
|
-
executor = await import("./execute-dev-
|
|
86
|
+
executor = await import("./execute-dev-BtSLDMkv-C7vjxmdg.mjs");
|
|
87
87
|
} catch (error) {
|
|
88
88
|
return notOk(executorLoadFailure("dev", error));
|
|
89
89
|
}
|
|
@@ -91,7 +91,7 @@ async function devWithDeps(input, deps) {
|
|
|
91
91
|
}
|
|
92
92
|
async function loadExecutor(operation) {
|
|
93
93
|
try {
|
|
94
|
-
return ok(await import("./execute-dev-current-
|
|
94
|
+
return ok(await import("./execute-dev-current-LEdiAZSw-CqLq03hv.mjs"));
|
|
95
95
|
} catch (error) {
|
|
96
96
|
return notOk(executorLoadFailure(operation, error));
|
|
97
97
|
}
|
|
@@ -111,4 +111,4 @@ async function devStop(input) {
|
|
|
111
111
|
//#endregion
|
|
112
112
|
export { devUrl as a, toStructured as c, devStop as i, convergeReasonsText as n, devWithDeps as o, deployWithDeps as r, requireContainerForEnvironment as s, DEFAULT_DEPLOY_ENVIRONMENT as t };
|
|
113
113
|
|
|
114
|
-
//# sourceMappingURL=dev-current-
|
|
114
|
+
//# sourceMappingURL=dev-current-C7rT6Yxw-DdlXRvfz.mjs.map
|
package/dist/{dev-current-lAlj53eX-DvAHNZFo.mjs.map → dev-current-C7rT6Yxw-DdlXRvfz.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-current-
|
|
1
|
+
{"version":3,"file":"dev-current-C7rT6Yxw-DdlXRvfz.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/dev-current-C7rT6Yxw.mjs"],"sourcesContent":["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/** A failed converge's reasons as text, one per line, without a tag the message already starts with. */\nfunction convergeReasonsText(reasons) {\n\treturn reasons.map(({ tag, message }) => tag === \"Error\" || tag === \"Unknown\" || message.startsWith(tag) ? message : `${tag}: ${message}`).join(\"\\n\");\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-C-aK5jh-.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-BtSLDMkv.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-LEdiAZSw.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, convergeReasonsText as c, requireContainerForEnvironment as d, toStructured as f, devWithDeps as i, executionDiagnostics as l, devUrl as n, deploy as o, dev as r, deployWithDeps as s, devStop as t, executorLoadFailure as u };\n\n//# sourceMappingURL=dev-current-C7rT6Yxw.mjs.map"],"mappings":";;;;;;;AAmBA,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;AACA,MAAM,SAAS;CACd,QAAQ;EACP,SAAS;EACT,MAAM;CACP;CACA,SAAS;EACR,SAAS;EACT,MAAM;CACP;CACA,KAAK;EACJ,SAAS;EACT,MAAM;CACP;AACD;;;;;;;;;;AAUA,SAAS,+BAA+B,QAAQ,aAAa,YAAY,UAAU,aAAa;CAC/F,IAAI;CACJ,IAAI;EACH,qBAAqB,WAAW,YAAY,SAAS,UAAU,CAAC,CAAC,CAAC,MAAM;CACzE,QAAQ;EACP,qBAAqB,KAAK;CAC3B;CACA,IAAI,uBAAuB,aAAa;CACxC,MAAM,EAAE,SAAS,SAAS,OAAO;CACjC,MAAM,IAAI,mBAAmB,+BAA+B,iBAAiB,YAAY,sCAAsC,QAAQ,4CAA4C,YAAY,IAAI,EAAE,KAAK,wCAAwC,YAAY,6BAA6B,KAAK,GAAG,CAAC;AACrS;;AAEA,SAAS,oBAAoB,SAAS;CACrC,OAAO,QAAQ,KAAK,EAAE,KAAK,cAAc,QAAQ,WAAW,QAAQ,aAAa,QAAQ,WAAW,GAAG,IAAI,UAAU,GAAG,IAAI,IAAI,SAAS,CAAC,CAAC,KAAK,IAAI;AAC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js";
|
|
|
5
5
|
import { a as redactError, c as redactUnsetPlatformVariable, n as StreamRedactor, o as redactSummary, r as credentialLookingValues, s as redactThrown, t as SecretRedaction } from "./redaction-DY6eDC12-BrK1aSN5.mjs";
|
|
6
6
|
import { r as preflightEnvVarName, t as containerEnv } from "./preflight-transport-2d6iIchu-ArIJUY1L.mjs";
|
|
7
7
|
import { n as ok, r as okVoid, t as notOk } from "./result-CttmabB6.mjs";
|
|
8
|
-
import { c as toStructured, n as convergeReasonsText, s as requireContainerForEnvironment } from "./dev-current-
|
|
9
|
-
import { t as loadAppConvergeEntry } from "./app-converge-
|
|
8
|
+
import { c as toStructured, n as convergeReasonsText, s as requireContainerForEnvironment } from "./dev-current-C7rT6Yxw-DdlXRvfz.mjs";
|
|
9
|
+
import { t as loadAppConvergeEntry } from "./app-converge-DkTFs-ih-VPepJ4ZK.mjs";
|
|
10
10
|
import { i as validateEnvironmentName, r as runPipeline } from "./validate-environment-DCZiNSlR-idVge-kq.mjs";
|
|
11
11
|
import { a as prepareSecondProcess, c as removeLeftoverAppConfigurationFiles, d as engineFailureFilePath, f as readEngineFailureCause, i as deployAppConfigurationFile, l as DEPLOYMENT_RESULT_FILE_ENV, m as withComposerAdvice, n as reportConvergeEvent, p as toDeploymentSummary, r as stepTracker, s as refuseSecretsInRootInput, t as interactionMessages, u as capFailureCause } from "./steps-BZXNqW6U-BM2Aa8Bp.mjs";
|
|
12
12
|
import { createRequire } from "node:module";
|
|
@@ -55,7 +55,7 @@ function writeRunReport(filePath, report) {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
//#endregion
|
|
58
|
-
//#region ../../0-framework/3-tooling/cli/dist/execute-deploy-destroy-
|
|
58
|
+
//#region ../../0-framework/3-tooling/cli/dist/execute-deploy-destroy-C-aK5jh-.mjs
|
|
59
59
|
/** Pipeline step 6: writes a regenerated-every-run, independently runnable stack module at `.prisma-composer/alchemy.run.ts`. */
|
|
60
60
|
const GENERATED_DIR = ".prisma-composer";
|
|
61
61
|
const GENERATED_FILE = "alchemy.run.ts";
|
|
@@ -890,4 +890,4 @@ async function convergeDeploy(opts, pipeline, entry, resolved) {
|
|
|
890
890
|
//#endregion
|
|
891
891
|
export { executeDeploy, executeDestroy };
|
|
892
892
|
|
|
893
|
-
//# sourceMappingURL=execute-deploy-destroy-
|
|
893
|
+
//# sourceMappingURL=execute-deploy-destroy-C-aK5jh--DZdZgI7g.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute-deploy-destroy-DN16ETAk-CzORriUO.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/run-report-CmBz2-xc.mjs","../../../0-framework/3-tooling/cli/dist/execute-deploy-destroy-DN16ETAk.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 = 2;\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: 2,\n\t\toutcome: input.failure === void 0 ? \"succeeded\" : \"failed\",\n\t\tapp: input.summary?.app ?? null,\n\t\tenvironment: input.environment,\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-CmBz2-xc.mjs.map","import { i as runPipeline, t as validateEnvironmentName } from \"./validate-environment-DCZiNSlR.mjs\";\nimport { i as noComposerExportMessage } from \"./composer-config-QKdY85G-.mjs\";\nimport { c as redactThrown, l as redactUnsetPlatformVariable, n as StreamRedactor, o as redactError, r as credentialLookingValues, s as redactSummary, t as SecretRedaction } from \"./redaction-DY6eDC12.mjs\";\nimport { a as readEngineFailureCause, i as engineFailureFilePath, n as capFailureCause, o as toDeploymentSummary, s as withComposerAdvice, t as DEPLOYMENT_RESULT_FILE_ENV } from \"./deployment-summary-CVJZn2v0.mjs\";\nimport { i as removeLeftoverAppConfigurationFiles, n as prepareSecondProcess, o as refuseSecretsInRootInput, t as deployAppConfigurationFile } from \"./app-configuration-file-D0rB5g65.mjs\";\nimport { c as convergeReasonsText, d as requireContainerForEnvironment, f as toStructured } from \"./dev-current-lAlj53eX.mjs\";\nimport { a as writeRunReport, i as toRunReport, r as resolveRunReportPath, t as RUN_REPORT_FILE_ENV } from \"./run-report-CmBz2-xc.mjs\";\nimport { t as loadAppConvergeEntry } from \"./app-converge-bS1l9jIf.mjs\";\nimport { n as reportConvergeEvent, r as stepTracker, t as interactionMessages } from \"./steps-BZXNqW6U.mjs\";\nimport { createRequire } from \"node:module\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { nodeAddresses } from \"@internal/core/deploy\";\nimport { CliStructuredError, InternalError } from \"@internal/foundation/errors\";\nimport { containerEnv, preflightEnvVarName } from \"@internal/core/config\";\nimport { notOk, ok, okVoid } from \"@internal/foundation/result\";\nimport { randomUUID } from \"node:crypto\";\nimport spawn from \"cross-spawn\";\n//#region src/generate-stack.ts\n/** Pipeline step 6: writes a regenerated-every-run, independently runnable stack module at `.prisma-composer/alchemy.run.ts`. */\nconst GENERATED_DIR = \".prisma-composer\";\nconst GENERATED_FILE = \"alchemy.run.ts\";\n/** A relative import specifier from `.prisma-composer/alchemy.run.ts` to `target` (posix separators). */\nfunction relativeImportSpecifier(generatedDir, target) {\n\tconst rel = path.relative(generatedDir, target).split(path.sep).join(\"/\");\n\treturn rel.startsWith(\".\") ? rel : `./${rel}`;\n}\nfunction quote(value) {\n\treturn JSON.stringify(value);\n}\nfunction renderBundle(bundle) {\n\treturn `{ dir: ${quote(bundle.dir)}, entry: ${quote(bundle.entry)} }`;\n}\nfunction renderOptions(input) {\n\tconst lines = [];\n\tlines.push(` name: ${quote(input.name)},`);\n\tlines.push(` environment: ${quote(input.environment)},`);\n\tlines.push(\" appConfigurationRead: file.appConfigurationRead,\");\n\tlines.push(\" firstProcessNodeAddresses: file.nodeAddresses,\");\n\tlines.push(\" bundles: {\");\n\tfor (const [id, bundle] of Object.entries(input.assembled.bundles)) lines.push(` ${quote(id)}: ${renderBundle(bundle)},`);\n\tlines.push(\" },\");\n\tlines.push(\" report: report.deploymentReport,\");\n\treturn lines.join(\"\\n\");\n}\n/** Renders the stack module's source (tests assert on it without touching disk) — uses `//` headers, not a block comment, since a cwd path with a star-slash could close one early. */\nfunction renderStackFile(input) {\n\tconst generatedDir = path.join(input.cwd, GENERATED_DIR);\n\tconst appImport = relativeImportSpecifier(generatedDir, input.entryPath);\n\tconst configImport = relativeImportSpecifier(generatedDir, input.configFile);\n\treturn `// Generated by Composer's deploy and destroy operations — overwritten on every\n// run; do not edit by hand. Runnable from ${quote(input.cwd)} WITH the env the\n// CLI passes its child (the PRISMA_COMPOSER_CONTAINER_*/_PREFLIGHT_* vars and the app configuration file —\n// without them lower() refuses because no container is resolved), by the\n// command Composer starts, which a failed run prints:\n//\n// <node> <bin of the alchemy @prisma/composer depends on> deploy ${GENERATED_DIR}/${GENERATED_FILE} --yes --stage <stage>\n//\n// bisects a CLI bug from an Alchemy bug (deploy-cli.md § Implementation decisions).\n// It runs no config adapter: it reads what the first process's Load read from the app configuration file named in PRISMA_COMPOSER_APP_CONFIGURATION_FILE.\nimport { lower } from '@prisma/composer/deploy';\nimport * as report from '@prisma/composer/report';\nimport { readAppConfigurationFile } from '@prisma/composer/internal/app-configuration-file';\nimport prismaConfig from ${quote(configImport)};\nimport app from ${quote(appImport)};\n\nconst config = prismaConfig.composer;\nif (config === undefined) {\n throw new Error(${quote(noComposerExportMessage(input.configFile))});\n}\n\n// The app's own @prisma/composer may predate the failure recorder.\nreport.captureEngineFailure?.();\n\nconst file = readAppConfigurationFile(process.env);\n\nexport default lower(app, config, {\n${renderOptions(input)}\n});\n`;\n}\n/** Writes the stack file, returning its absolute path. */\nfunction writeStackFile(input) {\n\tconst generatedDir = path.join(input.cwd, GENERATED_DIR);\n\tfs.mkdirSync(generatedDir, { recursive: true });\n\tconst filePath = path.join(generatedDir, GENERATED_FILE);\n\tfs.writeFileSync(filePath, renderStackFile(input));\n\treturn filePath;\n}\nconst GENERATED_STACK_RELATIVE_PATH = path.join(GENERATED_DIR, GENERATED_FILE);\n//#endregion\n//#region src/alchemy-bin.ts\n/**\n* Which Alchemy CLI runs a generated stack file: the `alchemy` that\n* `@prisma/composer` depends on, found from the app the way the stack file's\n* own `@prisma/composer/...` imports are. The CLI and the stack code then\n* come from one install, so the child loads one copy of `alchemy`.\n*\n* Node's resolver finds `@prisma/composer` from the app. It cannot find\n* `alchemy` from there: alchemy exports neither its `package.json` nor its\n* bin, and has no `require` condition. Bun has no `module.findPackageJSON`.\n* So the last step is Node's own lookup written out: each `node_modules`\n* above `@prisma/composer`'s real location, nearest first.\n*/\nconst FIX = \"Check that the app depends on @prisma/composer and that `alchemy`, which @prisma/composer depends on, is installed in a node_modules directory. Layouts without one, such as Yarn Plug'n'Play, are not supported.\";\nfunction binMissing(message) {\n\treturn new CliStructuredError(\"DEPLOY.ALCHEMY_BIN_MISSING\", message, { fix: FIX });\n}\nfunction composerPackageDir(appDir) {\n\ttry {\n\t\tconst manifest = createRequire(path.join(appDir, \"package.json\")).resolve(\"@prisma/composer/package.json\");\n\t\treturn path.dirname(fs.realpathSync(manifest));\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction alchemyPackageDirAbove(dir) {\n\tfor (let current = dir;; current = path.dirname(current)) {\n\t\tconst candidate = path.join(current, \"node_modules\", \"alchemy\");\n\t\tif (fs.existsSync(path.join(candidate, \"package.json\"))) return candidate;\n\t\tif (path.dirname(current) === current) return void 0;\n\t}\n}\nfunction readPackageJson(packageDir) {\n\ttry {\n\t\treturn JSON.parse(fs.readFileSync(path.join(packageDir, \"package.json\"), \"utf8\"));\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction binOf(packageDir) {\n\tconst manifest = readPackageJson(packageDir);\n\tif (typeof manifest !== \"object\" || manifest === null || !(\"bin\" in manifest)) return void 0;\n\tconst bin = manifest.bin;\n\tconst relative = typeof bin === \"string\" ? bin : typeof bin === \"object\" && bin !== null && \"alchemy\" in bin ? bin.alchemy : void 0;\n\tif (typeof relative !== \"string\") return void 0;\n\tconst entry = path.join(packageDir, relative);\n\treturn fs.existsSync(entry) ? entry : void 0;\n}\n/**\n* The JavaScript file `alchemy`'s `bin` names, for the app in `appDir`.\n* Raises DEPLOY.ALCHEMY_BIN_MISSING when the app does not resolve\n* `@prisma/composer` or no usable `alchemy` is installed beside it.\n*/\nfunction resolveAlchemyBin(appDir) {\n\tconst composerDir = composerPackageDir(appDir);\n\tif (composerDir === void 0) throw binMissing(`Could not resolve @prisma/composer from \"${appDir}\".`);\n\tconst alchemyDir = alchemyPackageDirAbove(composerDir);\n\tconst entry = alchemyDir === void 0 ? void 0 : binOf(alchemyDir);\n\tif (entry === void 0) throw binMissing(`Could not resolve the bin of the \\`alchemy\\` package @prisma/composer depends on, from \"${composerDir}\".`);\n\treturn entry;\n}\n//#endregion\n//#region src/run-alchemy.ts\n/**\n* Pipeline step 9 (deploy-cli.md § The pipeline; design-notes.md's \"Driving\n* Alchemy\" call): run the generated stack file and, for programmatic hosts, pipe its\n* output through redaction.\n*\n* Runs the bin of the `alchemy` the app's `@prisma/composer` depends on\n* (`resolveAlchemyBin`), started with Node (`nodeExecutable`). Never a\n* `node_modules/.bin` link, which pnpm creates only for an app's direct\n* dependencies.\n*\n* Only `destroy` still runs Alchemy in a child; `deploy` and `dev` converge\n* in-process (ADR-0066). This module composes the invocation; `spawnAlchemy`\n* starts it, piping the child's output through the stream redactor\n* (ADR-0062), and tests substitute their own runner.\n*/\nfunction currentRuntime() {\n\treturn {\n\t\tbun: process.versions.bun !== void 0,\n\t\texecPath: process.execPath,\n\t\tenv: process.env,\n\t\tplatform: process.platform,\n\t\texists: fs.existsSync\n\t};\n}\nfunction envValue(env, name) {\n\treturn Object.entries(env).find(([key]) => key.toLowerCase() === name.toLowerCase())?.[1];\n}\n/** The file names `node` may have in a PATH directory: PATHEXT's extensions on Windows. */\nfunction nodeFileNames(runtime) {\n\tif (runtime.platform !== \"win32\") return [\"node\"];\n\treturn (envValue(runtime.env, \"PATHEXT\") ?? \".COM;.EXE;.BAT;.CMD\").split(\";\").filter((extension) => extension.length > 0).map((extension) => `node${extension}`);\n}\n/**\n* The Node that starts Alchemy's launcher: this process's own runtime under\n* Node, and the first `node` on PATH under Bun. Alchemy's launcher may still\n* move itself to Bun when the package-manager environment says Bun invoked\n* it (`bunx`, `bun run`), so the runtime Alchemy ends up on follows how\n* `prisma` was invoked.\n*/\nfunction nodeExecutable(runtime = currentRuntime()) {\n\tif (!runtime.bun) return runtime.execPath;\n\tconst paths = runtime.platform === \"win32\" ? path.win32 : path.posix;\n\tconst names = nodeFileNames(runtime);\n\tfor (const rawDir of (envValue(runtime.env, \"PATH\") ?? \"\").split(paths.delimiter)) {\n\t\tconst dir = rawDir.replace(/^\"(.*)\"$/, \"$1\");\n\t\tif (dir.length === 0) continue;\n\t\tfor (const name of names) {\n\t\t\tconst candidate = paths.join(dir, name);\n\t\t\tif (runtime.exists(candidate)) return candidate;\n\t\t}\n\t}\n\tthrow new CliStructuredError(\"DEPLOY.NODE_MISSING\", \"Composer starts Alchemy with Node, and no `node` was found on PATH.\", { fix: \"Install Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer, and put it on PATH, or run `prisma` under Node.\" });\n}\n/**\n* Resolves the invocation against this machine — the step every adapter takes\n* and no caller should. Runs alchemy's JavaScript entry with Node, so no shell\n* shim is involved on any platform. Raises DEPLOY.ALCHEMY_BIN_MISSING when\n* Composer's alchemy cannot be resolved, and DEPLOY.NODE_MISSING when no Node\n* can run it.\n*/\nfunction alchemyCommandLine(invocation, alchemyBin = resolveAlchemyBin(invocation.cwd), node = nodeExecutable()) {\n\treturn {\n\t\tcommand: node,\n\t\targs: [\n\t\t\talchemyBin,\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\tredactedValues: input.redactedValues\n\t};\n}\n/**\n* The default runner for hosts with no engine: stdin inherited and output piped through redaction, 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 commandLine = alchemyCommandLine(invocation);\n\treturn {\n\t\t...await spawnCommandLine(commandLine, invocation.redactedValues),\n\t\tcommandLine\n\t};\n};\n/**\n* One argument as the platform's shell reads it literally: single quotes for\n* POSIX shells, double quotes for cmd.exe. cmd.exe expands `%VAR%` inside\n* double quotes, and strips or expands `!` when delayed expansion is on; no\n* quoting prevents either, so an argument containing them is not fully\n* literal there.\n*/\nfunction shellArg(arg, platform) {\n\tif (platform === \"win32\") return /^[\\w@+=:,./\\\\~-]+$/.test(arg) ? arg : `\"${arg.replaceAll(\"\\\"\", \"\\\"\\\"\")}\"`;\n\treturn /^[\\w@%+=:,./-]+$/.test(arg) ? arg : `'${arg.replaceAll(\"'\", \"'\\\\''\")}'`;\n}\n/**\n* The command a user runs from the invocation's directory to repeat a\n* converge: the command line the adapter started, or, from an adapter that\n* does not report one, `alchemy` with the same arguments.\n*/\nfunction reproduceCommand(invocation, outcome, platform = process.platform) {\n\treturn (outcome?.commandLine === void 0 ? [\n\t\t\"alchemy\",\n\t\tinvocation.action,\n\t\tinvocation.stackFileRelativePath,\n\t\t\"--yes\",\n\t\t\"--stage\",\n\t\tinvocation.stage\n\t] : [outcome.commandLine.command, ...outcome.commandLine.args]).map((arg) => shellArg(arg, platform)).join(\" \");\n}\n/** Starts a resolved command line with stdin inherited and its output piped through redaction, and returns how it ended. */\nfunction spawnCommandLine(line, redactedValues, outputs = process) {\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: [\n\t\t\t\t\"inherit\",\n\t\t\t\t\"pipe\",\n\t\t\t\t\"pipe\"\n\t\t\t],\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\tconst stdout = new StreamRedactor(redactedValues);\n\t\tconst stderr = new StreamRedactor(redactedValues);\n\t\tconst write = (stream, text) => {\n\t\t\tif (text.length > 0) stream.write(text);\n\t\t};\n\t\tchild.stdout?.setEncoding(\"utf8\").on(\"data\", (chunk) => write(outputs.stdout, stdout.push(chunk)));\n\t\tchild.stderr?.setEncoding(\"utf8\").on(\"data\", (chunk) => write(outputs.stderr, stderr.push(chunk)));\n\t\tchild.on(\"error\", reject);\n\t\tchild.on(\"close\", (exitCode, signal) => {\n\t\t\twrite(outputs.stdout, stdout.end());\n\t\t\twrite(outputs.stderr, stderr.end());\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\n//#region src/operations/execute-deploy-destroy.ts\n/**\n* The deploy/destroy executor — main.ts's pipeline orchestration with argv,\n* console, and exit codes removed: typed inputs in, structured results out.\n* Reached only by lazy import from deploy.ts/destroy.ts — this module's\n* static graph transitively loads alchemy's provider tree, so the control\n* entry must never import it statically.\n*/\nconst ALCHEMY_STATE_DIR = \".alchemy\";\n/** Destroy guardrail (moved from main.ts): true when `<cwd>/.alchemy` is missing or empty — likely wrong directory or nothing deployed yet. */\nfunction hasNoLocalDeployState(cwd) {\n\tconst stateDir = path.join(cwd, ALCHEMY_STATE_DIR);\n\treturn !(fs.existsSync(stateDir) && fs.readdirSync(stateDir).length > 0);\n}\n/** Times each deploy step for the host's `onEvent`. A step still open when the run fails is closed as failed, innermost first. */\nfunction deploySteps(onEvent) {\n\treturn stepTracker((step) => step.name === \"assemble-service\" ? `${step.name}:${step.address}` : step.name === \"apply-resource\" ? `${step.name}:${step.resourceId}` : step.name, onEvent);\n}\nasync function executeDeploy(input, deps, cwd) {\n\tconst outcome = await runStackPipeline(\"deploy\", {\n\t\tentry: input.entry,\n\t\tconfig: input.config,\n\t\tname: input.name,\n\t\tenvironment: input.environment ?? \"production\",\n\t\tcwd,\n\t\tonEvent: void 0,\n\t\tdeps,\n\t\treportId: input.reportId,\n\t\treportPath: resolveRunReportPath(input.reportPath, process.env[RUN_REPORT_FILE_ENV], cwd),\n\t\tsteps: deploySteps(input.onEvent),\n\t\tsignal: input.signal,\n\t\tredaction: deps.redaction ?? new SecretRedaction(process.env)\n\t});\n\tif (!outcome.ok) return outcome;\n\treturn ok({ summary: outcome.value });\n}\nasync function executeDestroy(input, deps, cwd) {\n\tconst outcome = await runStackPipeline(\"destroy\", {\n\t\tentry: input.entry,\n\t\tconfig: input.config,\n\t\tname: input.name,\n\t\tenvironment: input.environment,\n\t\tcwd,\n\t\tonEvent: input.onEvent,\n\t\tdeps,\n\t\treportId: void 0,\n\t\treportPath: void 0,\n\t\tsteps: deploySteps(void 0),\n\t\tsignal: void 0,\n\t\tredaction: new SecretRedaction(process.env)\n\t});\n\tif (!outcome.ok) return outcome;\n\treturn okVoid();\n}\n/**\n* Opens a session per extension that declares a reporter. A `begin` that\n* throws costs that extension its reporting and nothing else — the deploy\n* has not started, and refusing to run it because an observer failed would\n* invert the relationship.\n*/\nasync function beginReporters(extensions, context, redaction) {\n\treturn (await Promise.all(extensions.map(async (extension) => {\n\t\tif (extension.reporter === void 0) return void 0;\n\t\ttry {\n\t\t\tconst reporter = await extension.reporter.begin(context);\n\t\t\treturn reporter === void 0 ? void 0 : {\n\t\t\t\textensionId: extension.id,\n\t\t\t\treporter\n\t\t\t};\n\t\t} catch (error) {\n\t\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\t\tconsole.warn(`\\nCould not start deploy reporting for ${extension.id}: ${redaction.redact(detail)}`);\n\t\t\treturn;\n\t\t}\n\t}))).filter((entry) => entry !== void 0);\n}\n/** Hands each session its own extension's resolved container, so it can attach the run to what that container names. */\nasync function attachReporters(reporters, containers, redaction) {\n\tawait Promise.all(reporters.map(async ({ extensionId, reporter }) => {\n\t\ttry {\n\t\t\tawait reporter.attach({ container: containers.get(extensionId) });\n\t\t} catch (error) {\n\t\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\t\tconsole.warn(`\\nCould not attach this deploy to its project for ${extensionId}: ${redaction.redact(detail)}`);\n\t\t}\n\t}));\n}\n/** Every session's contribution to the apply's environment, so reporting that happens inside the apply can find the run. */\nfunction reporterEnv(reporters, redaction) {\n\tconst env = {};\n\tfor (const { extensionId, reporter } of reporters) try {\n\t\tObject.assign(env, reporter.childEnv());\n\t} catch (error) {\n\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\tconsole.warn(`\\nCould not pass deploy reporting into the apply for ${extensionId}: ${redaction.redact(detail)}`);\n\t}\n\treturn env;\n}\n/** `failingStep` is capped at 500 by the platform and `errorMessage` at 5000; truncating here keeps a long message from costing the whole report. */\nfunction truncate(value, limit) {\n\treturn value.length <= limit ? value : `${value.slice(0, limit - 1)}…`;\n}\n/** An interrupted converge — reported as `cancelled`, never as `failed`. */\nfunction wasInterrupted(failure) {\n\treturn failure.code === \"DEPLOY.INTERRUPTED\" || typeof failure.meta?.[\"signal\"] === \"string\";\n}\n/**\n* Ends every reporting session, whatever the run did. Sessions never reject\n* by contract, but a buggy one must not turn a converged deploy into a\n* failure — so this swallows anyway, and reports each session independently\n* so one bad implementation cannot silence another.\n*/\nasync function finishReporters(reporters, outcome, redaction) {\n\tconst entities = outcome.summary?.nodes.flatMap((node) => node.entities) ?? [];\n\tawait Promise.all(reporters.map(async ({ reporter }) => {\n\t\ttry {\n\t\t\tawait reporter.finish({\n\t\t\t\tok: outcome.ok,\n\t\t\t\tcancelled: outcome.cancelled,\n\t\t\t\tfailingStep: outcome.code === void 0 ? void 0 : truncate(outcome.code, 500),\n\t\t\t\terrorMessage: outcome.message === void 0 ? void 0 : truncate(outcome.message, 5e3),\n\t\t\t\tentities\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\t\tconsole.warn(`\\nCould not report this deploy's outcome: ${redaction.redact(detail)}`);\n\t\t}\n\t}));\n}\n/**\n* Owns the reporting sessions around the pipeline: the inner run opens them\n* once it knows which extensions are configured, and this closes them on\n* every exit path — a returned failure, a success, or a thrown defect — as\n* the `record` step, which also writes the run report.\n* Nothing here can change what the pipeline returns.\n*/\nasync function runStackPipeline(action, opts) {\n\tconst reporters = [];\n\tlet outcome;\n\ttry {\n\t\toutcome = await runStackPipelineInner(action, opts, reporters);\n\t} catch (error) {\n\t\topts.steps.closeOpen(\"failed\");\n\t\topts.steps.start({ name: \"record\" });\n\t\tconst thrown = redactThrown(error, opts.redaction);\n\t\tawait finishReporters(reporters, {\n\t\t\tok: false,\n\t\t\tcancelled: false,\n\t\t\tcode: \"DEPLOY.UNEXPECTED\",\n\t\t\tmessage: thrown.message\n\t\t}, opts.redaction);\n\t\topts.steps.finish({ name: \"record\" });\n\t\tthrow thrown;\n\t}\n\tif (!outcome.ok) outcome = notOk(redactError(outcome.failure, opts.redaction));\n\tif (!outcome.ok) opts.steps.closeOpen(\"failed\");\n\topts.steps.start({ name: \"record\" });\n\tawait finishReporters(reporters, outcome.ok ? {\n\t\tok: true,\n\t\tcancelled: false,\n\t\tsummary: outcome.value\n\t} : {\n\t\tok: false,\n\t\tcancelled: wasInterrupted(outcome.failure),\n\t\tcode: outcome.failure.code,\n\t\tmessage: outcome.failure.message\n\t}, opts.redaction);\n\tif (opts.reportPath === void 0 || writeRunReport(opts.reportPath, toRunReport({\n\t\tsummary: outcome.ok ? outcome.value : void 0,\n\t\tenvironment: opts.environment,\n\t\tfailure: outcome.ok ? void 0 : {\n\t\t\tcode: outcome.failure.code,\n\t\t\tmessage: outcome.failure.message\n\t\t}\n\t}))) opts.steps.finish({ name: \"record\" });\n\telse opts.steps.fail({ name: \"record\" });\n\treturn outcome;\n}\n/** The pipeline both actions share: validate, resolve containers, then for\n* deploy preflight and the in-process converge, and for destroy the stack\n* file, the alchemy child and the teardown/removal suffix. The value is only\n* ever a summary for deploy. */\nasync function runStackPipelineInner(action, opts, reporters) {\n\tconst { entry, config: composerConfig, name, environment, cwd, onEvent, deps, steps } = opts;\n\tsteps.start({ name: \"prepare\" });\n\tremoveLeftoverAppConfigurationFiles(cwd);\n\ttry {\n\t\tvalidateEnvironmentName(environment);\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\tthrow error;\n\t}\n\tlet appConvergeEntry;\n\tif (action === \"deploy\") {\n\t\tconst loaded = await prepareAppConvergeEntry(deps, path.dirname(path.resolve(cwd, composerConfig.file)));\n\t\tif (!loaded.ok) return loaded;\n\t\tappConvergeEntry = loaded.value;\n\t}\n\tconst platformCredentials = deps.credentials;\n\tif (action === \"destroy\" && hasNoLocalDeployState(cwd)) onEvent?.({\n\t\tkind: \"no-local-deploy-state\",\n\t\tcwd\n\t});\n\tlet pipeline;\n\tlet containers;\n\tlet alchemyStage;\n\tconst preflightPayloads = /* @__PURE__ */ new Map();\n\tconst unset = [];\n\tconst preflightTransportEnv = {};\n\ttry {\n\t\tpipeline = await runPipeline(entry, name, environment, cwd, composerConfig, {\n\t\t\trunAssembler: deps.runAssembler,\n\t\t\treadSecrets: action === \"deploy\",\n\t\t\tredaction: opts.redaction,\n\t\t\tonEvent: (event) => {\n\t\t\t\tswitch (event.kind) {\n\t\t\t\t\tcase \"loaded\":\n\t\t\t\t\t\tsteps.finish({ name: \"prepare\" });\n\t\t\t\t\t\tsteps.start({ name: \"assemble\" });\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase \"service-started\":\n\t\t\t\t\t\tsteps.start({\n\t\t\t\t\t\t\tname: \"assemble-service\",\n\t\t\t\t\t\t\taddress: event.address\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase \"service-assembled\":\n\t\t\t\t\t\tsteps.finish({\n\t\t\t\t\t\t\tname: \"assemble-service\",\n\t\t\t\t\t\t\taddress: event.address\n\t\t\t\t\t\t}, event.data);\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}, action === \"destroy\" ? (error) => new CliStructuredError(\"DEPLOY.BUILD_REQUIRED\", error.message, {\n\t\t\twhy: \"destroy evaluates the same stack program as deploy, which packages the built artifacts — so the app must be built first.\",\n\t\t\tfix: \"Run the build, then retry the destroy.\",\n\t\t\tcause: error\n\t\t}) : void 0);\n\t\tsteps.finish({ name: \"assemble\" });\n\t\tconst { graph, name: resolvedName } = pipeline;\n\t\tconst config = pipeline.configSource.value;\n\t\tif (action === \"deploy\") refuseSecretsInRootInput(graph.appConfigurationRead, opts.redaction.knownSecrets, \"A deploy sends every plain value Load read to the platform as plain configuration, and never sends a secret that way.\");\n\t\tsteps.start({ name: \"connect\" });\n\t\tif (action === \"deploy\") reporters.push(...await beginReporters(config.extensions, {\n\t\t\tappName: resolvedName,\n\t\t\tgraph,\n\t\t\tenvironment,\n\t\t\tcwd,\n\t\t\treportId: opts.reportId,\n\t\t\tcredentials: platformCredentials\n\t\t}, opts.redaction));\n\t\tcontainers = /* @__PURE__ */ new Map();\n\t\tfor (const extension of config.extensions) {\n\t\t\tif (extension.container === void 0) continue;\n\t\t\ttry {\n\t\t\t\tif (action === \"deploy\") {\n\t\t\t\t\tconst instance = await extension.container.ensure({\n\t\t\t\t\t\tappName: resolvedName,\n\t\t\t\t\t\tenvironment\n\t\t\t\t\t}, platformCredentials);\n\t\t\t\t\trequireContainerForEnvironment(action, extension.id, extension.container, instance, environment);\n\t\t\t\t\tcontainers.set(extension.id, instance);\n\t\t\t\t} else {\n\t\t\t\t\tconst instance = await extension.container.locate({\n\t\t\t\t\t\tappName: resolvedName,\n\t\t\t\t\t\tenvironment\n\t\t\t\t\t}, platformCredentials);\n\t\t\t\t\tif (instance === void 0) throw new CliStructuredError(\"DEPLOY.TARGET_NOT_FOUND\", `Nothing deployed for ${resolvedName} in the environment ${environment}.`, { fix: \"Deploy it first.\" });\n\t\t\t\t\trequireContainerForEnvironment(action, extension.id, extension.container, instance, environment);\n\t\t\t\t\tcontainers.set(extension.id, instance);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tthrow toStructured(\"DEPLOY.CONTAINER_FAILED\", error);\n\t\t\t}\n\t\t}\n\t\tawait attachReporters(reporters, containers, opts.redaction);\n\t\talchemyStage = containers.get(config.state.extension)?.alchemyStage ?? environment;\n\t\tsteps.finish({ name: \"connect\" });\n\t\tif (action === \"deploy\") {\n\t\t\tsteps.start({ name: \"preflight\" });\n\t\t\tlet checked = 0;\n\t\t\tconst report = (reported) => {\n\t\t\t\tchecked += reported.checked;\n\t\t\t\tunset.push(...reported.unset.map((variable) => redactUnsetPlatformVariable(variable, opts.redaction)));\n\t\t\t};\n\t\t\tfor (const extension of config.extensions) {\n\t\t\t\tif (extension.preflight === void 0) continue;\n\t\t\t\ttry {\n\t\t\t\t\tconst payload = await extension.preflight({\n\t\t\t\t\t\tgraph,\n\t\t\t\t\t\tcontainer: containers.get(extension.id),\n\t\t\t\t\t\tenvironment,\n\t\t\t\t\t\tconfiguration: pipeline.configuration,\n\t\t\t\t\t\tsecrets: pipeline.secrets,\n\t\t\t\t\t\tcredentials: platformCredentials,\n\t\t\t\t\t\treport\n\t\t\t\t\t});\n\t\t\t\t\tif (payload !== void 0) preflightPayloads.set(extension.id, payload);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthrow toStructured(\"DEPLOY.PREFLIGHT_FAILED\", error);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsteps.finish({ name: \"preflight\" }, {\n\t\t\t\tchecked,\n\t\t\t\tunset: unset.length\n\t\t\t});\n\t\t\tif (unset.length > 0) steps.emit({\n\t\t\t\tkind: \"preflight-findings\",\n\t\t\t\tfindings: { unset }\n\t\t\t});\n\t\t}\n\t\tif (action === \"destroy\") for (const extension of config.extensions) preflightTransportEnv[preflightEnvVarName(extension.id)] = \"\";\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\tthrow error;\n\t}\n\tif (appConvergeEntry !== void 0) return convergeDeploy(opts, pipeline, appConvergeEntry, {\n\t\tcontainers,\n\t\tstage: alchemyStage,\n\t\tpreflightPayloads,\n\t\tfindings: { unset },\n\t\tenv: reporterEnv(reporters, opts.redaction)\n\t});\n\tlet stackPath;\n\tconst resultFilePath = path.join(cwd, \".prisma-composer\", `deployment-result-${String(process.pid)}-${randomUUID()}.json`);\n\tlet handover;\n\ttry {\n\t\ttry {\n\t\t\thandover = prepareSecondProcess({\n\t\t\t\tfile: deployAppConfigurationFile(cwd, randomUUID()),\n\t\t\t\tappConfigurationRead: pipeline.graph.appConfigurationRead,\n\t\t\t\tplainVariableText: {},\n\t\t\t\tnodeAddresses: nodeAddresses(pipeline.graph),\n\t\t\t\tknownSecrets: opts.redaction.knownSecrets\n\t\t\t});\n\t\t\tstackPath = writeStackFile({\n\t\t\t\tentryPath: pipeline.entryModule.path,\n\t\t\t\tcwd,\n\t\t\t\tconfigFile: pipeline.configSource.file,\n\t\t\t\tname: pipeline.name,\n\t\t\t\tenvironment,\n\t\t\t\tassembled: pipeline.assembled\n\t\t\t});\n\t\t\thandover.writeFile();\n\t\t} catch (error) {\n\t\t\treturn notOk(toStructured(\"DEPLOY.STACK_WRITE_FAILED\", error));\n\t\t}\n\t\tconst invocation = alchemyInvocation({\n\t\t\tcommand: action,\n\t\t\tstackFileRelativePath: GENERATED_STACK_RELATIVE_PATH,\n\t\t\tcwd,\n\t\t\tstage: alchemyStage,\n\t\t\tcontainerEnv: containerEnv(containers),\n\t\t\tpreflightEnv: preflightTransportEnv,\n\t\t\tenv: {\n\t\t\t\t...reporterEnv(reporters, opts.redaction),\n\t\t\t\t...handover.env,\n\t\t\t\t[DEPLOYMENT_RESULT_FILE_ENV]: resultFilePath\n\t\t\t},\n\t\t\tredactedValues: opts.redaction.allValues()\n\t\t});\n\t\tsteps.start({ name: \"apply\" });\n\t\tlet outcome;\n\t\ttry {\n\t\t\toutcome = await (deps.alchemy ?? spawnAlchemy)(invocation);\n\t\t} catch (error) {\n\t\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\t\treturn notOk(new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", error instanceof Error ? error.message : String(error), {\n\t\t\t\tcause: error,\n\t\t\t\tmeta: { diagnostics: {\n\t\t\t\t\texitCode: void 0,\n\t\t\t\t\tstackFilePath: stackPath,\n\t\t\t\t\treproduceCommand: reproduceCommand(invocation),\n\t\t\t\t\tcwd\n\t\t\t\t} }\n\t\t\t}));\n\t\t}\n\t\tconst reproduce = reproduceCommand(invocation, outcome);\n\t\tif (outcome.signal !== null) return notOk(new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", `alchemy ${action} was interrupted by ${outcome.signal}.`, { meta: {\n\t\t\tsignal: outcome.signal,\n\t\t\tdiagnostics: {\n\t\t\t\texitCode: void 0,\n\t\t\t\tsignal: outcome.signal,\n\t\t\t\tstackFilePath: stackPath,\n\t\t\t\treproduceCommand: reproduce,\n\t\t\t\tcwd\n\t\t\t}\n\t\t} }));\n\t\tconst status = outcome.exitCode ?? 1;\n\t\tif (status !== 0) {\n\t\t\tconst engineCause = readEngineFailureCause(resultFilePath, (text) => opts.redaction.redact(text));\n\t\t\tconst withCause = (sentence) => engineCause === void 0 ? sentence : `${sentence}\\n${engineCause}`;\n\t\t\treturn notOk(new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", withCause(`alchemy ${action} exited with status ${status}.`), { meta: {\n\t\t\t\texitCode: status,\n\t\t\t\t...engineCause !== void 0 ? { engineCause } : {},\n\t\t\t\tdiagnostics: {\n\t\t\t\t\texitCode: status,\n\t\t\t\t\tstackFilePath: stackPath,\n\t\t\t\t\treproduceCommand: reproduce,\n\t\t\t\t\tcwd\n\t\t\t\t}\n\t\t\t} }));\n\t\t}\n\t\tsteps.finish({ name: \"apply\" });\n\t\ttry {\n\t\t\tif (action === \"destroy\") {\n\t\t\t\tfor (const extension of pipeline.configSource.value.extensions) {\n\t\t\t\t\tif (extension.teardown === void 0) continue;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait extension.teardown({\n\t\t\t\t\t\t\tcontainer: containers.get(extension.id),\n\t\t\t\t\t\t\tenvironment\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tthrow toStructured(\"DEPLOY.TEARDOWN_FAILED\", error);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (const extension of pipeline.configSource.value.extensions) {\n\t\t\t\t\tif (extension.container === void 0) continue;\n\t\t\t\t\tconst instance = containers.get(extension.id);\n\t\t\t\t\tif (instance === void 0) continue;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait extension.container.remove(instance, platformCredentials);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tthrow toStructured(\"DEPLOY.CONTAINER_REMOVE_FAILED\", error);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\t\tthrow error;\n\t\t}\n\t\treturn ok(void 0);\n\t} finally {\n\t\ttry {\n\t\t\tfs.rmSync(resultFilePath, { force: true });\n\t\t\tfs.rmSync(engineFailureFilePath(resultFilePath), { force: true });\n\t\t} catch {}\n\t\thandover?.removeFile();\n\t}\n}\n/** Loaded before anything is created, so a missing or incompatible install fails first. */\nasync function prepareAppConvergeEntry(deps, appDir) {\n\ttry {\n\t\treturn ok(deps.appConvergeEntry ?? await loadAppConvergeEntry(appDir));\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\tthrow error;\n\t}\n}\n/** The structured failure a converge that did not apply settles as. */\nfunction convergeFailure(outcome, redact) {\n\tswitch (outcome.kind) {\n\t\tcase \"interrupted\": return new CliStructuredError(\"DEPLOY.INTERRUPTED\", \"The deploy was interrupted.\", {\n\t\t\twhy: \"It stopped while Alchemy planned or applied it. Resources it had already changed stay as they are.\",\n\t\t\tfix: \"Deploy again to finish.\"\n\t\t});\n\t\tcase \"refused\": return outcome.reason === \"already-running\" ? new CliStructuredError(\"DEPLOY.CONVERGE_RUNNING\", \"Another deploy is already running in this process.\", {\n\t\t\twhy: \"A deploy sets the process's environment and working directory while Alchemy runs, so two cannot overlap.\",\n\t\t\tfix: \"Wait for the other deploy to finish, or run this one in its own process.\"\n\t\t}) : new CliStructuredError(\"DEPLOY.WORKER_THREAD\", \"Deploy cannot run in a worker thread when its cwd is not the process working directory.\", {\n\t\t\twhy: \"Alchemy reads `.env` and keeps `.alchemy` in the working directory, and a worker thread cannot change it.\",\n\t\t\tfix: \"Call deploy from the main thread, or with the process's working directory as its cwd.\"\n\t\t});\n\t\tcase \"failed\": {\n\t\t\tconst cause = capFailureCause(redact(withComposerAdvice(convergeReasonsText(outcome.reasons))));\n\t\t\treturn new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", `Alchemy could not deploy the app.\\n${cause}`, { meta: {\n\t\t\t\tengineCause: cause,\n\t\t\t\treasons: outcome.reasons.map(({ tag, message }) => ({\n\t\t\t\t\ttag,\n\t\t\t\t\tmessage: redact(message)\n\t\t\t\t}))\n\t\t\t} });\n\t\t}\n\t}\n\treturn new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", \"The converge ended with an outcome this Composer does not know.\");\n}\n/**\n* Deploy's converge: lowers the app with the containers and preflight\n* payloads this run resolved, then plans and applies it in this process.\n* The report hook runs inside the apply, here, so the summary comes back as\n* a value.\n*/\nasync function convergeDeploy(opts, pipeline, entry, resolved) {\n\tconst { cwd, environment, steps } = opts;\n\tconst config = pipeline.configSource.value;\n\tconst env = resolved.env;\n\topts.redaction.addCredentialLookingValues(credentialLookingValues(env));\n\tconst redact = (text) => opts.redaction.redact(text);\n\tlet summary;\n\tconst root = pipeline.graph.root.node;\n\tif (root.kind !== \"module\") throw new InternalError(\"runPipeline admitted a root that is not a module\");\n\tsteps.start({ name: \"apply\" });\n\tlet stack;\n\ttry {\n\t\tstack = entry.lower(root, config, {\n\t\t\tname: pipeline.name,\n\t\t\tenvironment,\n\t\t\tappConfigurationRead: pipeline.graph.appConfigurationRead,\n\t\t\tfirstProcessNodeAddresses: nodeAddresses(pipeline.graph),\n\t\t\tbundles: pipeline.assembled.bundles,\n\t\t\tcontainers: resolved.containers,\n\t\t\tpreflightPayloads: resolved.preflightPayloads,\n\t\t\tfindings: resolved.findings,\n\t\t\tcredentials: opts.deps.credentials,\n\t\t\treport: (result) => {\n\t\t\t\tsummary = toDeploymentSummary(result);\n\t\t\t}\n\t\t});\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\treturn notOk(new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", redact(error instanceof Error ? error.message : String(error))));\n\t}\n\tconst output = interactionMessages(steps, opts.redaction);\n\tlet outcome;\n\ttry {\n\t\toutcome = await entry.converge({\n\t\t\toperation: \"deploy\",\n\t\t\tstack,\n\t\t\tstage: resolved.stage,\n\t\t\tcwd,\n\t\t\tenv,\n\t\t\tsignal: opts.signal,\n\t\t\tonEvent: (event) => reportConvergeEvent(steps, event, redact, (resource) => ({\n\t\t\t\tname: \"apply-resource\",\n\t\t\t\t...resource\n\t\t\t})),\n\t\t\toutput: (text) => output.push(text)\n\t\t});\n\t} catch (error) {\n\t\treturn notOk(new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", redact(`Alchemy could not deploy the app.\\n${error instanceof Error ? error.message : String(error)}`)));\n\t} finally {\n\t\toutput.end();\n\t}\n\tif (outcome.kind !== \"applied\") return notOk(convergeFailure(outcome, redact));\n\tsteps.finish({ name: \"apply\" });\n\treturn ok(redactSummary(summary, opts.redaction));\n}\n//#endregion\nexport { executeDeploy, executeDestroy };\n\n//# sourceMappingURL=execute-deploy-destroy-DN16ETAk.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAM,sBAAsB;AAC5B,SAAS,YAAY,OAAO;CAC3B,OAAO;EACN,SAAS;EACT,SAAS,MAAM,YAAY,KAAK,IAAI,cAAc;EAClD,KAAK,MAAM,SAAS,OAAO;EAC3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,cAAc,SAAS,KAAK,SAAS,CAAC;AACjD"}
|
|
1
|
+
{"version":3,"file":"execute-deploy-destroy-C-aK5jh--DZdZgI7g.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/run-report-CmBz2-xc.mjs","../../../0-framework/3-tooling/cli/dist/execute-deploy-destroy-C-aK5jh-.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 = 2;\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: 2,\n\t\toutcome: input.failure === void 0 ? \"succeeded\" : \"failed\",\n\t\tapp: input.summary?.app ?? null,\n\t\tenvironment: input.environment,\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-CmBz2-xc.mjs.map","import { i as runPipeline, t as validateEnvironmentName } from \"./validate-environment-DCZiNSlR.mjs\";\nimport { i as noComposerExportMessage } from \"./composer-config-QKdY85G-.mjs\";\nimport { c as redactThrown, l as redactUnsetPlatformVariable, n as StreamRedactor, o as redactError, r as credentialLookingValues, s as redactSummary, t as SecretRedaction } from \"./redaction-DY6eDC12.mjs\";\nimport { a as readEngineFailureCause, i as engineFailureFilePath, n as capFailureCause, o as toDeploymentSummary, s as withComposerAdvice, t as DEPLOYMENT_RESULT_FILE_ENV } from \"./deployment-summary-CVJZn2v0.mjs\";\nimport { i as removeLeftoverAppConfigurationFiles, n as prepareSecondProcess, o as refuseSecretsInRootInput, t as deployAppConfigurationFile } from \"./app-configuration-file-D0rB5g65.mjs\";\nimport { c as convergeReasonsText, d as requireContainerForEnvironment, f as toStructured } from \"./dev-current-C7rT6Yxw.mjs\";\nimport { a as writeRunReport, i as toRunReport, r as resolveRunReportPath, t as RUN_REPORT_FILE_ENV } from \"./run-report-CmBz2-xc.mjs\";\nimport { t as loadAppConvergeEntry } from \"./app-converge-DkTFs-ih.mjs\";\nimport { n as reportConvergeEvent, r as stepTracker, t as interactionMessages } from \"./steps-BZXNqW6U.mjs\";\nimport { createRequire } from \"node:module\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { nodeAddresses } from \"@internal/core/deploy\";\nimport { CliStructuredError, InternalError } from \"@internal/foundation/errors\";\nimport { containerEnv, preflightEnvVarName } from \"@internal/core/config\";\nimport { notOk, ok, okVoid } from \"@internal/foundation/result\";\nimport { randomUUID } from \"node:crypto\";\nimport spawn from \"cross-spawn\";\n//#region src/generate-stack.ts\n/** Pipeline step 6: writes a regenerated-every-run, independently runnable stack module at `.prisma-composer/alchemy.run.ts`. */\nconst GENERATED_DIR = \".prisma-composer\";\nconst GENERATED_FILE = \"alchemy.run.ts\";\n/** A relative import specifier from `.prisma-composer/alchemy.run.ts` to `target` (posix separators). */\nfunction relativeImportSpecifier(generatedDir, target) {\n\tconst rel = path.relative(generatedDir, target).split(path.sep).join(\"/\");\n\treturn rel.startsWith(\".\") ? rel : `./${rel}`;\n}\nfunction quote(value) {\n\treturn JSON.stringify(value);\n}\nfunction renderBundle(bundle) {\n\treturn `{ dir: ${quote(bundle.dir)}, entry: ${quote(bundle.entry)} }`;\n}\nfunction renderOptions(input) {\n\tconst lines = [];\n\tlines.push(` name: ${quote(input.name)},`);\n\tlines.push(` environment: ${quote(input.environment)},`);\n\tlines.push(\" appConfigurationRead: file.appConfigurationRead,\");\n\tlines.push(\" firstProcessNodeAddresses: file.nodeAddresses,\");\n\tlines.push(\" bundles: {\");\n\tfor (const [id, bundle] of Object.entries(input.assembled.bundles)) lines.push(` ${quote(id)}: ${renderBundle(bundle)},`);\n\tlines.push(\" },\");\n\tlines.push(\" report: report.deploymentReport,\");\n\treturn lines.join(\"\\n\");\n}\n/** Renders the stack module's source (tests assert on it without touching disk) — uses `//` headers, not a block comment, since a cwd path with a star-slash could close one early. */\nfunction renderStackFile(input) {\n\tconst generatedDir = path.join(input.cwd, GENERATED_DIR);\n\tconst appImport = relativeImportSpecifier(generatedDir, input.entryPath);\n\tconst configImport = relativeImportSpecifier(generatedDir, input.configFile);\n\treturn `// Generated by Composer's deploy and destroy operations — overwritten on every\n// run; do not edit by hand. Runnable from ${quote(input.cwd)} WITH the env the\n// CLI passes its child (the PRISMA_COMPOSER_CONTAINER_*/_PREFLIGHT_* vars and the app configuration file —\n// without them lower() refuses because no container is resolved), by the\n// command Composer starts, which a failed run prints:\n//\n// <node> <bin of the alchemy @prisma/composer depends on> deploy ${GENERATED_DIR}/${GENERATED_FILE} --yes --stage <stage>\n//\n// bisects a CLI bug from an Alchemy bug (deploy-cli.md § Implementation decisions).\n// It runs no config adapter: it reads what the first process's Load read from the app configuration file named in PRISMA_COMPOSER_APP_CONFIGURATION_FILE.\nimport { lower } from '@prisma/composer/deploy';\nimport * as report from '@prisma/composer/report';\nimport { readAppConfigurationFile } from '@prisma/composer/internal/app-configuration-file';\nimport prismaConfig from ${quote(configImport)};\nimport app from ${quote(appImport)};\n\nconst config = prismaConfig.composer;\nif (config === undefined) {\n throw new Error(${quote(noComposerExportMessage(input.configFile))});\n}\n\n// The app's own @prisma/composer may predate the failure recorder.\nreport.captureEngineFailure?.();\n\nconst file = readAppConfigurationFile(process.env);\n\nexport default lower(app, config, {\n${renderOptions(input)}\n});\n`;\n}\n/** Writes the stack file, returning its absolute path. */\nfunction writeStackFile(input) {\n\tconst generatedDir = path.join(input.cwd, GENERATED_DIR);\n\tfs.mkdirSync(generatedDir, { recursive: true });\n\tconst filePath = path.join(generatedDir, GENERATED_FILE);\n\tfs.writeFileSync(filePath, renderStackFile(input));\n\treturn filePath;\n}\nconst GENERATED_STACK_RELATIVE_PATH = path.join(GENERATED_DIR, GENERATED_FILE);\n//#endregion\n//#region src/alchemy-bin.ts\n/**\n* Which Alchemy CLI runs a generated stack file: the `alchemy` that\n* `@prisma/composer` depends on, found from the app the way the stack file's\n* own `@prisma/composer/...` imports are. The CLI and the stack code then\n* come from one install, so the child loads one copy of `alchemy`.\n*\n* Node's resolver finds `@prisma/composer` from the app. It cannot find\n* `alchemy` from there: alchemy exports neither its `package.json` nor its\n* bin, and has no `require` condition. Bun has no `module.findPackageJSON`.\n* So the last step is Node's own lookup written out: each `node_modules`\n* above `@prisma/composer`'s real location, nearest first.\n*/\nconst FIX = \"Check that the app depends on @prisma/composer and that `alchemy`, which @prisma/composer depends on, is installed in a node_modules directory. Layouts without one, such as Yarn Plug'n'Play, are not supported.\";\nfunction binMissing(message) {\n\treturn new CliStructuredError(\"DEPLOY.ALCHEMY_BIN_MISSING\", message, { fix: FIX });\n}\nfunction composerPackageDir(appDir) {\n\ttry {\n\t\tconst manifest = createRequire(path.join(appDir, \"package.json\")).resolve(\"@prisma/composer/package.json\");\n\t\treturn path.dirname(fs.realpathSync(manifest));\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction alchemyPackageDirAbove(dir) {\n\tfor (let current = dir;; current = path.dirname(current)) {\n\t\tconst candidate = path.join(current, \"node_modules\", \"alchemy\");\n\t\tif (fs.existsSync(path.join(candidate, \"package.json\"))) return candidate;\n\t\tif (path.dirname(current) === current) return void 0;\n\t}\n}\nfunction readPackageJson(packageDir) {\n\ttry {\n\t\treturn JSON.parse(fs.readFileSync(path.join(packageDir, \"package.json\"), \"utf8\"));\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction binOf(packageDir) {\n\tconst manifest = readPackageJson(packageDir);\n\tif (typeof manifest !== \"object\" || manifest === null || !(\"bin\" in manifest)) return void 0;\n\tconst bin = manifest.bin;\n\tconst relative = typeof bin === \"string\" ? bin : typeof bin === \"object\" && bin !== null && \"alchemy\" in bin ? bin.alchemy : void 0;\n\tif (typeof relative !== \"string\") return void 0;\n\tconst entry = path.join(packageDir, relative);\n\treturn fs.existsSync(entry) ? entry : void 0;\n}\n/**\n* The JavaScript file `alchemy`'s `bin` names, for the app in `appDir`.\n* Raises DEPLOY.ALCHEMY_BIN_MISSING when the app does not resolve\n* `@prisma/composer` or no usable `alchemy` is installed beside it.\n*/\nfunction resolveAlchemyBin(appDir) {\n\tconst composerDir = composerPackageDir(appDir);\n\tif (composerDir === void 0) throw binMissing(`Could not resolve @prisma/composer from \"${appDir}\".`);\n\tconst alchemyDir = alchemyPackageDirAbove(composerDir);\n\tconst entry = alchemyDir === void 0 ? void 0 : binOf(alchemyDir);\n\tif (entry === void 0) throw binMissing(`Could not resolve the bin of the \\`alchemy\\` package @prisma/composer depends on, from \"${composerDir}\".`);\n\treturn entry;\n}\n//#endregion\n//#region src/run-alchemy.ts\n/**\n* Pipeline step 9 (deploy-cli.md § The pipeline; design-notes.md's \"Driving\n* Alchemy\" call): run the generated stack file and, for programmatic hosts, pipe its\n* output through redaction.\n*\n* Runs the bin of the `alchemy` the app's `@prisma/composer` depends on\n* (`resolveAlchemyBin`), started with Node (`nodeExecutable`). Never a\n* `node_modules/.bin` link, which pnpm creates only for an app's direct\n* dependencies.\n*\n* Only `destroy` still runs Alchemy in a child; `deploy` and `dev` converge\n* in-process (ADR-0066). This module composes the invocation; `spawnAlchemy`\n* starts it, piping the child's output through the stream redactor\n* (ADR-0062), and tests substitute their own runner.\n*/\nfunction currentRuntime() {\n\treturn {\n\t\tbun: process.versions.bun !== void 0,\n\t\texecPath: process.execPath,\n\t\tenv: process.env,\n\t\tplatform: process.platform,\n\t\texists: fs.existsSync\n\t};\n}\nfunction envValue(env, name) {\n\treturn Object.entries(env).find(([key]) => key.toLowerCase() === name.toLowerCase())?.[1];\n}\n/** The file names `node` may have in a PATH directory: PATHEXT's extensions on Windows. */\nfunction nodeFileNames(runtime) {\n\tif (runtime.platform !== \"win32\") return [\"node\"];\n\treturn (envValue(runtime.env, \"PATHEXT\") ?? \".COM;.EXE;.BAT;.CMD\").split(\";\").filter((extension) => extension.length > 0).map((extension) => `node${extension}`);\n}\n/**\n* The Node that starts Alchemy's launcher: this process's own runtime under\n* Node, and the first `node` on PATH under Bun. Alchemy's launcher may still\n* move itself to Bun when the package-manager environment says Bun invoked\n* it (`bunx`, `bun run`), so the runtime Alchemy ends up on follows how\n* `prisma` was invoked.\n*/\nfunction nodeExecutable(runtime = currentRuntime()) {\n\tif (!runtime.bun) return runtime.execPath;\n\tconst paths = runtime.platform === \"win32\" ? path.win32 : path.posix;\n\tconst names = nodeFileNames(runtime);\n\tfor (const rawDir of (envValue(runtime.env, \"PATH\") ?? \"\").split(paths.delimiter)) {\n\t\tconst dir = rawDir.replace(/^\"(.*)\"$/, \"$1\");\n\t\tif (dir.length === 0) continue;\n\t\tfor (const name of names) {\n\t\t\tconst candidate = paths.join(dir, name);\n\t\t\tif (runtime.exists(candidate)) return candidate;\n\t\t}\n\t}\n\tthrow new CliStructuredError(\"DEPLOY.NODE_MISSING\", \"Composer starts Alchemy with Node, and no `node` was found on PATH.\", { fix: \"Install Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer, and put it on PATH, or run `prisma` under Node.\" });\n}\n/**\n* Resolves the invocation against this machine — the step every adapter takes\n* and no caller should. Runs alchemy's JavaScript entry with Node, so no shell\n* shim is involved on any platform. Raises DEPLOY.ALCHEMY_BIN_MISSING when\n* Composer's alchemy cannot be resolved, and DEPLOY.NODE_MISSING when no Node\n* can run it.\n*/\nfunction alchemyCommandLine(invocation, alchemyBin = resolveAlchemyBin(invocation.cwd), node = nodeExecutable()) {\n\treturn {\n\t\tcommand: node,\n\t\targs: [\n\t\t\talchemyBin,\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\tredactedValues: input.redactedValues\n\t};\n}\n/**\n* The default runner for hosts with no engine: stdin inherited and output piped through redaction, 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 commandLine = alchemyCommandLine(invocation);\n\treturn {\n\t\t...await spawnCommandLine(commandLine, invocation.redactedValues),\n\t\tcommandLine\n\t};\n};\n/**\n* One argument as the platform's shell reads it literally: single quotes for\n* POSIX shells, double quotes for cmd.exe. cmd.exe expands `%VAR%` inside\n* double quotes, and strips or expands `!` when delayed expansion is on; no\n* quoting prevents either, so an argument containing them is not fully\n* literal there.\n*/\nfunction shellArg(arg, platform) {\n\tif (platform === \"win32\") return /^[\\w@+=:,./\\\\~-]+$/.test(arg) ? arg : `\"${arg.replaceAll(\"\\\"\", \"\\\"\\\"\")}\"`;\n\treturn /^[\\w@%+=:,./-]+$/.test(arg) ? arg : `'${arg.replaceAll(\"'\", \"'\\\\''\")}'`;\n}\n/**\n* The command a user runs from the invocation's directory to repeat a\n* converge: the command line the adapter started, or, from an adapter that\n* does not report one, `alchemy` with the same arguments.\n*/\nfunction reproduceCommand(invocation, outcome, platform = process.platform) {\n\treturn (outcome?.commandLine === void 0 ? [\n\t\t\"alchemy\",\n\t\tinvocation.action,\n\t\tinvocation.stackFileRelativePath,\n\t\t\"--yes\",\n\t\t\"--stage\",\n\t\tinvocation.stage\n\t] : [outcome.commandLine.command, ...outcome.commandLine.args]).map((arg) => shellArg(arg, platform)).join(\" \");\n}\n/** Starts a resolved command line with stdin inherited and its output piped through redaction, and returns how it ended. */\nfunction spawnCommandLine(line, redactedValues, outputs = process) {\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: [\n\t\t\t\t\"inherit\",\n\t\t\t\t\"pipe\",\n\t\t\t\t\"pipe\"\n\t\t\t],\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\tconst stdout = new StreamRedactor(redactedValues);\n\t\tconst stderr = new StreamRedactor(redactedValues);\n\t\tconst write = (stream, text) => {\n\t\t\tif (text.length > 0) stream.write(text);\n\t\t};\n\t\tchild.stdout?.setEncoding(\"utf8\").on(\"data\", (chunk) => write(outputs.stdout, stdout.push(chunk)));\n\t\tchild.stderr?.setEncoding(\"utf8\").on(\"data\", (chunk) => write(outputs.stderr, stderr.push(chunk)));\n\t\tchild.on(\"error\", reject);\n\t\tchild.on(\"close\", (exitCode, signal) => {\n\t\t\twrite(outputs.stdout, stdout.end());\n\t\t\twrite(outputs.stderr, stderr.end());\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\n//#region src/operations/execute-deploy-destroy.ts\n/**\n* The deploy/destroy executor — main.ts's pipeline orchestration with argv,\n* console, and exit codes removed: typed inputs in, structured results out.\n* Reached only by lazy import from deploy.ts/destroy.ts — this module's\n* static graph transitively loads alchemy's provider tree, so the control\n* entry must never import it statically.\n*/\nconst ALCHEMY_STATE_DIR = \".alchemy\";\n/** Destroy guardrail (moved from main.ts): true when `<cwd>/.alchemy` is missing or empty — likely wrong directory or nothing deployed yet. */\nfunction hasNoLocalDeployState(cwd) {\n\tconst stateDir = path.join(cwd, ALCHEMY_STATE_DIR);\n\treturn !(fs.existsSync(stateDir) && fs.readdirSync(stateDir).length > 0);\n}\n/** Times each deploy step for the host's `onEvent`. A step still open when the run fails is closed as failed, innermost first. */\nfunction deploySteps(onEvent) {\n\treturn stepTracker((step) => step.name === \"assemble-service\" ? `${step.name}:${step.address}` : step.name === \"apply-resource\" ? `${step.name}:${step.resourceId}` : step.name, onEvent);\n}\nasync function executeDeploy(input, deps, cwd) {\n\tconst outcome = await runStackPipeline(\"deploy\", {\n\t\tentry: input.entry,\n\t\tconfig: input.config,\n\t\tname: input.name,\n\t\tenvironment: input.environment ?? \"production\",\n\t\tcwd,\n\t\tonEvent: void 0,\n\t\tdeps,\n\t\treportId: input.reportId,\n\t\treportPath: resolveRunReportPath(input.reportPath, process.env[RUN_REPORT_FILE_ENV], cwd),\n\t\tsteps: deploySteps(input.onEvent),\n\t\tsignal: input.signal,\n\t\tredaction: deps.redaction ?? new SecretRedaction(process.env)\n\t});\n\tif (!outcome.ok) return outcome;\n\treturn ok({ summary: outcome.value });\n}\nasync function executeDestroy(input, deps, cwd) {\n\tconst outcome = await runStackPipeline(\"destroy\", {\n\t\tentry: input.entry,\n\t\tconfig: input.config,\n\t\tname: input.name,\n\t\tenvironment: input.environment,\n\t\tcwd,\n\t\tonEvent: input.onEvent,\n\t\tdeps,\n\t\treportId: void 0,\n\t\treportPath: void 0,\n\t\tsteps: deploySteps(void 0),\n\t\tsignal: void 0,\n\t\tredaction: new SecretRedaction(process.env)\n\t});\n\tif (!outcome.ok) return outcome;\n\treturn okVoid();\n}\n/**\n* Opens a session per extension that declares a reporter. A `begin` that\n* throws costs that extension its reporting and nothing else — the deploy\n* has not started, and refusing to run it because an observer failed would\n* invert the relationship.\n*/\nasync function beginReporters(extensions, context, redaction) {\n\treturn (await Promise.all(extensions.map(async (extension) => {\n\t\tif (extension.reporter === void 0) return void 0;\n\t\ttry {\n\t\t\tconst reporter = await extension.reporter.begin(context);\n\t\t\treturn reporter === void 0 ? void 0 : {\n\t\t\t\textensionId: extension.id,\n\t\t\t\treporter\n\t\t\t};\n\t\t} catch (error) {\n\t\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\t\tconsole.warn(`\\nCould not start deploy reporting for ${extension.id}: ${redaction.redact(detail)}`);\n\t\t\treturn;\n\t\t}\n\t}))).filter((entry) => entry !== void 0);\n}\n/** Hands each session its own extension's resolved container, so it can attach the run to what that container names. */\nasync function attachReporters(reporters, containers, redaction) {\n\tawait Promise.all(reporters.map(async ({ extensionId, reporter }) => {\n\t\ttry {\n\t\t\tawait reporter.attach({ container: containers.get(extensionId) });\n\t\t} catch (error) {\n\t\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\t\tconsole.warn(`\\nCould not attach this deploy to its project for ${extensionId}: ${redaction.redact(detail)}`);\n\t\t}\n\t}));\n}\n/** Every session's contribution to the apply's environment, so reporting that happens inside the apply can find the run. */\nfunction reporterEnv(reporters, redaction) {\n\tconst env = {};\n\tfor (const { extensionId, reporter } of reporters) try {\n\t\tObject.assign(env, reporter.childEnv());\n\t} catch (error) {\n\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\tconsole.warn(`\\nCould not pass deploy reporting into the apply for ${extensionId}: ${redaction.redact(detail)}`);\n\t}\n\treturn env;\n}\n/** `failingStep` is capped at 500 by the platform and `errorMessage` at 5000; truncating here keeps a long message from costing the whole report. */\nfunction truncate(value, limit) {\n\treturn value.length <= limit ? value : `${value.slice(0, limit - 1)}…`;\n}\n/** An interrupted converge — reported as `cancelled`, never as `failed`. */\nfunction wasInterrupted(failure) {\n\treturn failure.code === \"DEPLOY.INTERRUPTED\" || typeof failure.meta?.[\"signal\"] === \"string\";\n}\n/**\n* Ends every reporting session, whatever the run did. Sessions never reject\n* by contract, but a buggy one must not turn a converged deploy into a\n* failure — so this swallows anyway, and reports each session independently\n* so one bad implementation cannot silence another.\n*/\nasync function finishReporters(reporters, outcome, redaction) {\n\tconst entities = outcome.summary?.nodes.flatMap((node) => node.entities) ?? [];\n\tawait Promise.all(reporters.map(async ({ reporter }) => {\n\t\ttry {\n\t\t\tawait reporter.finish({\n\t\t\t\tok: outcome.ok,\n\t\t\t\tcancelled: outcome.cancelled,\n\t\t\t\tfailingStep: outcome.code === void 0 ? void 0 : truncate(outcome.code, 500),\n\t\t\t\terrorMessage: outcome.message === void 0 ? void 0 : truncate(outcome.message, 5e3),\n\t\t\t\tentities\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\t\tconsole.warn(`\\nCould not report this deploy's outcome: ${redaction.redact(detail)}`);\n\t\t}\n\t}));\n}\n/**\n* Owns the reporting sessions around the pipeline: the inner run opens them\n* once it knows which extensions are configured, and this closes them on\n* every exit path — a returned failure, a success, or a thrown defect — as\n* the `record` step, which also writes the run report.\n* Nothing here can change what the pipeline returns.\n*/\nasync function runStackPipeline(action, opts) {\n\tconst reporters = [];\n\tlet outcome;\n\ttry {\n\t\toutcome = await runStackPipelineInner(action, opts, reporters);\n\t} catch (error) {\n\t\topts.steps.closeOpen(\"failed\");\n\t\topts.steps.start({ name: \"record\" });\n\t\tconst thrown = redactThrown(error, opts.redaction);\n\t\tawait finishReporters(reporters, {\n\t\t\tok: false,\n\t\t\tcancelled: false,\n\t\t\tcode: \"DEPLOY.UNEXPECTED\",\n\t\t\tmessage: thrown.message\n\t\t}, opts.redaction);\n\t\topts.steps.finish({ name: \"record\" });\n\t\tthrow thrown;\n\t}\n\tif (!outcome.ok) outcome = notOk(redactError(outcome.failure, opts.redaction));\n\tif (!outcome.ok) opts.steps.closeOpen(\"failed\");\n\topts.steps.start({ name: \"record\" });\n\tawait finishReporters(reporters, outcome.ok ? {\n\t\tok: true,\n\t\tcancelled: false,\n\t\tsummary: outcome.value\n\t} : {\n\t\tok: false,\n\t\tcancelled: wasInterrupted(outcome.failure),\n\t\tcode: outcome.failure.code,\n\t\tmessage: outcome.failure.message\n\t}, opts.redaction);\n\tif (opts.reportPath === void 0 || writeRunReport(opts.reportPath, toRunReport({\n\t\tsummary: outcome.ok ? outcome.value : void 0,\n\t\tenvironment: opts.environment,\n\t\tfailure: outcome.ok ? void 0 : {\n\t\t\tcode: outcome.failure.code,\n\t\t\tmessage: outcome.failure.message\n\t\t}\n\t}))) opts.steps.finish({ name: \"record\" });\n\telse opts.steps.fail({ name: \"record\" });\n\treturn outcome;\n}\n/** The pipeline both actions share: validate, resolve containers, then for\n* deploy preflight and the in-process converge, and for destroy the stack\n* file, the alchemy child and the teardown/removal suffix. The value is only\n* ever a summary for deploy. */\nasync function runStackPipelineInner(action, opts, reporters) {\n\tconst { entry, config: composerConfig, name, environment, cwd, onEvent, deps, steps } = opts;\n\tsteps.start({ name: \"prepare\" });\n\tremoveLeftoverAppConfigurationFiles(cwd);\n\ttry {\n\t\tvalidateEnvironmentName(environment);\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\tthrow error;\n\t}\n\tlet appConvergeEntry;\n\tif (action === \"deploy\") {\n\t\tconst loaded = await prepareAppConvergeEntry(deps, path.dirname(path.resolve(cwd, composerConfig.file)));\n\t\tif (!loaded.ok) return loaded;\n\t\tappConvergeEntry = loaded.value;\n\t}\n\tconst platformCredentials = deps.credentials;\n\tif (action === \"destroy\" && hasNoLocalDeployState(cwd)) onEvent?.({\n\t\tkind: \"no-local-deploy-state\",\n\t\tcwd\n\t});\n\tlet pipeline;\n\tlet containers;\n\tlet alchemyStage;\n\tconst preflightPayloads = /* @__PURE__ */ new Map();\n\tconst unset = [];\n\tconst preflightTransportEnv = {};\n\ttry {\n\t\tpipeline = await runPipeline(entry, name, environment, cwd, composerConfig, {\n\t\t\trunAssembler: deps.runAssembler,\n\t\t\treadSecrets: action === \"deploy\",\n\t\t\tredaction: opts.redaction,\n\t\t\tonEvent: (event) => {\n\t\t\t\tswitch (event.kind) {\n\t\t\t\t\tcase \"loaded\":\n\t\t\t\t\t\tsteps.finish({ name: \"prepare\" });\n\t\t\t\t\t\tsteps.start({ name: \"assemble\" });\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase \"service-started\":\n\t\t\t\t\t\tsteps.start({\n\t\t\t\t\t\t\tname: \"assemble-service\",\n\t\t\t\t\t\t\taddress: event.address\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase \"service-assembled\":\n\t\t\t\t\t\tsteps.finish({\n\t\t\t\t\t\t\tname: \"assemble-service\",\n\t\t\t\t\t\t\taddress: event.address\n\t\t\t\t\t\t}, event.data);\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}, action === \"destroy\" ? (error) => new CliStructuredError(\"DEPLOY.BUILD_REQUIRED\", error.message, {\n\t\t\twhy: \"destroy evaluates the same stack program as deploy, which packages the built artifacts — so the app must be built first.\",\n\t\t\tfix: \"Run the build, then retry the destroy.\",\n\t\t\tcause: error\n\t\t}) : void 0);\n\t\tsteps.finish({ name: \"assemble\" });\n\t\tconst { graph, name: resolvedName } = pipeline;\n\t\tconst config = pipeline.configSource.value;\n\t\tif (action === \"deploy\") refuseSecretsInRootInput(graph.appConfigurationRead, opts.redaction.knownSecrets, \"A deploy sends every plain value Load read to the platform as plain configuration, and never sends a secret that way.\");\n\t\tsteps.start({ name: \"connect\" });\n\t\tif (action === \"deploy\") reporters.push(...await beginReporters(config.extensions, {\n\t\t\tappName: resolvedName,\n\t\t\tgraph,\n\t\t\tenvironment,\n\t\t\tcwd,\n\t\t\treportId: opts.reportId,\n\t\t\tcredentials: platformCredentials\n\t\t}, opts.redaction));\n\t\tcontainers = /* @__PURE__ */ new Map();\n\t\tfor (const extension of config.extensions) {\n\t\t\tif (extension.container === void 0) continue;\n\t\t\ttry {\n\t\t\t\tif (action === \"deploy\") {\n\t\t\t\t\tconst instance = await extension.container.ensure({\n\t\t\t\t\t\tappName: resolvedName,\n\t\t\t\t\t\tenvironment\n\t\t\t\t\t}, platformCredentials);\n\t\t\t\t\trequireContainerForEnvironment(action, extension.id, extension.container, instance, environment);\n\t\t\t\t\tcontainers.set(extension.id, instance);\n\t\t\t\t} else {\n\t\t\t\t\tconst instance = await extension.container.locate({\n\t\t\t\t\t\tappName: resolvedName,\n\t\t\t\t\t\tenvironment\n\t\t\t\t\t}, platformCredentials);\n\t\t\t\t\tif (instance === void 0) throw new CliStructuredError(\"DEPLOY.TARGET_NOT_FOUND\", `Nothing deployed for ${resolvedName} in the environment ${environment}.`, { fix: \"Deploy it first.\" });\n\t\t\t\t\trequireContainerForEnvironment(action, extension.id, extension.container, instance, environment);\n\t\t\t\t\tcontainers.set(extension.id, instance);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tthrow toStructured(\"DEPLOY.CONTAINER_FAILED\", error);\n\t\t\t}\n\t\t}\n\t\tawait attachReporters(reporters, containers, opts.redaction);\n\t\talchemyStage = containers.get(config.state.extension)?.alchemyStage ?? environment;\n\t\tsteps.finish({ name: \"connect\" });\n\t\tif (action === \"deploy\") {\n\t\t\tsteps.start({ name: \"preflight\" });\n\t\t\tlet checked = 0;\n\t\t\tconst report = (reported) => {\n\t\t\t\tchecked += reported.checked;\n\t\t\t\tunset.push(...reported.unset.map((variable) => redactUnsetPlatformVariable(variable, opts.redaction)));\n\t\t\t};\n\t\t\tfor (const extension of config.extensions) {\n\t\t\t\tif (extension.preflight === void 0) continue;\n\t\t\t\ttry {\n\t\t\t\t\tconst payload = await extension.preflight({\n\t\t\t\t\t\tgraph,\n\t\t\t\t\t\tcontainer: containers.get(extension.id),\n\t\t\t\t\t\tenvironment,\n\t\t\t\t\t\tconfiguration: pipeline.configuration,\n\t\t\t\t\t\tsecrets: pipeline.secrets,\n\t\t\t\t\t\tcredentials: platformCredentials,\n\t\t\t\t\t\treport\n\t\t\t\t\t});\n\t\t\t\t\tif (payload !== void 0) preflightPayloads.set(extension.id, payload);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthrow toStructured(\"DEPLOY.PREFLIGHT_FAILED\", error);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsteps.finish({ name: \"preflight\" }, {\n\t\t\t\tchecked,\n\t\t\t\tunset: unset.length\n\t\t\t});\n\t\t\tif (unset.length > 0) steps.emit({\n\t\t\t\tkind: \"preflight-findings\",\n\t\t\t\tfindings: { unset }\n\t\t\t});\n\t\t}\n\t\tif (action === \"destroy\") for (const extension of config.extensions) preflightTransportEnv[preflightEnvVarName(extension.id)] = \"\";\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\tthrow error;\n\t}\n\tif (appConvergeEntry !== void 0) return convergeDeploy(opts, pipeline, appConvergeEntry, {\n\t\tcontainers,\n\t\tstage: alchemyStage,\n\t\tpreflightPayloads,\n\t\tfindings: { unset },\n\t\tenv: reporterEnv(reporters, opts.redaction)\n\t});\n\tlet stackPath;\n\tconst resultFilePath = path.join(cwd, \".prisma-composer\", `deployment-result-${String(process.pid)}-${randomUUID()}.json`);\n\tlet handover;\n\ttry {\n\t\ttry {\n\t\t\thandover = prepareSecondProcess({\n\t\t\t\tfile: deployAppConfigurationFile(cwd, randomUUID()),\n\t\t\t\tappConfigurationRead: pipeline.graph.appConfigurationRead,\n\t\t\t\tplainVariableText: {},\n\t\t\t\tnodeAddresses: nodeAddresses(pipeline.graph),\n\t\t\t\tknownSecrets: opts.redaction.knownSecrets\n\t\t\t});\n\t\t\tstackPath = writeStackFile({\n\t\t\t\tentryPath: pipeline.entryModule.path,\n\t\t\t\tcwd,\n\t\t\t\tconfigFile: pipeline.configSource.file,\n\t\t\t\tname: pipeline.name,\n\t\t\t\tenvironment,\n\t\t\t\tassembled: pipeline.assembled\n\t\t\t});\n\t\t\thandover.writeFile();\n\t\t} catch (error) {\n\t\t\treturn notOk(toStructured(\"DEPLOY.STACK_WRITE_FAILED\", error));\n\t\t}\n\t\tconst invocation = alchemyInvocation({\n\t\t\tcommand: action,\n\t\t\tstackFileRelativePath: GENERATED_STACK_RELATIVE_PATH,\n\t\t\tcwd,\n\t\t\tstage: alchemyStage,\n\t\t\tcontainerEnv: containerEnv(containers),\n\t\t\tpreflightEnv: preflightTransportEnv,\n\t\t\tenv: {\n\t\t\t\t...reporterEnv(reporters, opts.redaction),\n\t\t\t\t...handover.env,\n\t\t\t\t[DEPLOYMENT_RESULT_FILE_ENV]: resultFilePath\n\t\t\t},\n\t\t\tredactedValues: opts.redaction.allValues()\n\t\t});\n\t\tsteps.start({ name: \"apply\" });\n\t\tlet outcome;\n\t\ttry {\n\t\t\toutcome = await (deps.alchemy ?? spawnAlchemy)(invocation);\n\t\t} catch (error) {\n\t\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\t\treturn notOk(new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", error instanceof Error ? error.message : String(error), {\n\t\t\t\tcause: error,\n\t\t\t\tmeta: { diagnostics: {\n\t\t\t\t\texitCode: void 0,\n\t\t\t\t\tstackFilePath: stackPath,\n\t\t\t\t\treproduceCommand: reproduceCommand(invocation),\n\t\t\t\t\tcwd\n\t\t\t\t} }\n\t\t\t}));\n\t\t}\n\t\tconst reproduce = reproduceCommand(invocation, outcome);\n\t\tif (outcome.signal !== null) return notOk(new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", `alchemy ${action} was interrupted by ${outcome.signal}.`, { meta: {\n\t\t\tsignal: outcome.signal,\n\t\t\tdiagnostics: {\n\t\t\t\texitCode: void 0,\n\t\t\t\tsignal: outcome.signal,\n\t\t\t\tstackFilePath: stackPath,\n\t\t\t\treproduceCommand: reproduce,\n\t\t\t\tcwd\n\t\t\t}\n\t\t} }));\n\t\tconst status = outcome.exitCode ?? 1;\n\t\tif (status !== 0) {\n\t\t\tconst engineCause = readEngineFailureCause(resultFilePath, (text) => opts.redaction.redact(text));\n\t\t\tconst withCause = (sentence) => engineCause === void 0 ? sentence : `${sentence}\\n${engineCause}`;\n\t\t\treturn notOk(new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", withCause(`alchemy ${action} exited with status ${status}.`), { meta: {\n\t\t\t\texitCode: status,\n\t\t\t\t...engineCause !== void 0 ? { engineCause } : {},\n\t\t\t\tdiagnostics: {\n\t\t\t\t\texitCode: status,\n\t\t\t\t\tstackFilePath: stackPath,\n\t\t\t\t\treproduceCommand: reproduce,\n\t\t\t\t\tcwd\n\t\t\t\t}\n\t\t\t} }));\n\t\t}\n\t\tsteps.finish({ name: \"apply\" });\n\t\ttry {\n\t\t\tif (action === \"destroy\") {\n\t\t\t\tfor (const extension of pipeline.configSource.value.extensions) {\n\t\t\t\t\tif (extension.teardown === void 0) continue;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait extension.teardown({\n\t\t\t\t\t\t\tcontainer: containers.get(extension.id),\n\t\t\t\t\t\t\tenvironment\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tthrow toStructured(\"DEPLOY.TEARDOWN_FAILED\", error);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (const extension of pipeline.configSource.value.extensions) {\n\t\t\t\t\tif (extension.container === void 0) continue;\n\t\t\t\t\tconst instance = containers.get(extension.id);\n\t\t\t\t\tif (instance === void 0) continue;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait extension.container.remove(instance, platformCredentials);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tthrow toStructured(\"DEPLOY.CONTAINER_REMOVE_FAILED\", error);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\t\tthrow error;\n\t\t}\n\t\treturn ok(void 0);\n\t} finally {\n\t\ttry {\n\t\t\tfs.rmSync(resultFilePath, { force: true });\n\t\t\tfs.rmSync(engineFailureFilePath(resultFilePath), { force: true });\n\t\t} catch {}\n\t\thandover?.removeFile();\n\t}\n}\n/** Loaded before anything is created, so a missing or incompatible install fails first. */\nasync function prepareAppConvergeEntry(deps, appDir) {\n\ttry {\n\t\treturn ok(deps.appConvergeEntry ?? await loadAppConvergeEntry(appDir));\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\tthrow error;\n\t}\n}\n/** The structured failure a converge that did not apply settles as. */\nfunction convergeFailure(outcome, redact) {\n\tswitch (outcome.kind) {\n\t\tcase \"interrupted\": return new CliStructuredError(\"DEPLOY.INTERRUPTED\", \"The deploy was interrupted.\", {\n\t\t\twhy: \"It stopped while Alchemy planned or applied it. Resources it had already changed stay as they are.\",\n\t\t\tfix: \"Deploy again to finish.\"\n\t\t});\n\t\tcase \"refused\": return outcome.reason === \"already-running\" ? new CliStructuredError(\"DEPLOY.CONVERGE_RUNNING\", \"Another deploy is already running in this process.\", {\n\t\t\twhy: \"A deploy sets the process's environment and working directory while Alchemy runs, so two cannot overlap.\",\n\t\t\tfix: \"Wait for the other deploy to finish, or run this one in its own process.\"\n\t\t}) : new CliStructuredError(\"DEPLOY.WORKER_THREAD\", \"Deploy cannot run in a worker thread when its cwd is not the process working directory.\", {\n\t\t\twhy: \"Alchemy reads `.env` and keeps `.alchemy` in the working directory, and a worker thread cannot change it.\",\n\t\t\tfix: \"Call deploy from the main thread, or with the process's working directory as its cwd.\"\n\t\t});\n\t\tcase \"failed\": {\n\t\t\tconst cause = capFailureCause(redact(withComposerAdvice(convergeReasonsText(outcome.reasons))));\n\t\t\treturn new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", `Alchemy could not deploy the app.\\n${cause}`, { meta: {\n\t\t\t\tengineCause: cause,\n\t\t\t\treasons: outcome.reasons.map(({ tag, message }) => ({\n\t\t\t\t\ttag,\n\t\t\t\t\tmessage: redact(message)\n\t\t\t\t}))\n\t\t\t} });\n\t\t}\n\t}\n\treturn new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", \"The converge ended with an outcome this Composer does not know.\");\n}\n/**\n* Deploy's converge: lowers the app with the containers and preflight\n* payloads this run resolved, then plans and applies it in this process.\n* The report hook runs inside the apply, here, so the summary comes back as\n* a value.\n*/\nasync function convergeDeploy(opts, pipeline, entry, resolved) {\n\tconst { cwd, environment, steps } = opts;\n\tconst config = pipeline.configSource.value;\n\tconst env = resolved.env;\n\topts.redaction.addCredentialLookingValues(credentialLookingValues(env));\n\tconst redact = (text) => opts.redaction.redact(text);\n\tlet summary;\n\tconst root = pipeline.graph.root.node;\n\tif (root.kind !== \"module\") throw new InternalError(\"runPipeline admitted a root that is not a module\");\n\tsteps.start({ name: \"apply\" });\n\tlet stack;\n\ttry {\n\t\tstack = entry.lower(root, config, {\n\t\t\tname: pipeline.name,\n\t\t\tenvironment,\n\t\t\tappConfigurationRead: pipeline.graph.appConfigurationRead,\n\t\t\tfirstProcessNodeAddresses: nodeAddresses(pipeline.graph),\n\t\t\tbundles: pipeline.assembled.bundles,\n\t\t\tcontainers: resolved.containers,\n\t\t\tpreflightPayloads: resolved.preflightPayloads,\n\t\t\tfindings: resolved.findings,\n\t\t\tcredentials: opts.deps.credentials,\n\t\t\treport: (result) => {\n\t\t\t\tsummary = toDeploymentSummary(result);\n\t\t\t}\n\t\t});\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\treturn notOk(new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", redact(error instanceof Error ? error.message : String(error))));\n\t}\n\tconst output = interactionMessages(steps, opts.redaction);\n\tlet outcome;\n\ttry {\n\t\toutcome = await entry.converge({\n\t\t\toperation: \"deploy\",\n\t\t\tstack,\n\t\t\tstage: resolved.stage,\n\t\t\tcwd,\n\t\t\tenv,\n\t\t\tsignal: opts.signal,\n\t\t\tonEvent: (event) => reportConvergeEvent(steps, event, redact, (resource) => ({\n\t\t\t\tname: \"apply-resource\",\n\t\t\t\t...resource\n\t\t\t})),\n\t\t\toutput: (text) => output.push(text)\n\t\t});\n\t} catch (error) {\n\t\treturn notOk(new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", redact(`Alchemy could not deploy the app.\\n${error instanceof Error ? error.message : String(error)}`)));\n\t} finally {\n\t\toutput.end();\n\t}\n\tif (outcome.kind !== \"applied\") return notOk(convergeFailure(outcome, redact));\n\tsteps.finish({ name: \"apply\" });\n\treturn ok(redactSummary(summary, opts.redaction));\n}\n//#endregion\nexport { executeDeploy, executeDestroy };\n\n//# sourceMappingURL=execute-deploy-destroy-C-aK5jh-.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAM,sBAAsB;AAC5B,SAAS,YAAY,OAAO;CAC3B,OAAO;EACN,SAAS;EACT,SAAS,MAAM,YAAY,KAAK,IAAI,cAAc;EAClD,KAAK,MAAM,SAAS,OAAO;EAC3B,aAAa,MAAM;EACnB,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,O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AsB,SAAS,MAAM;GACrC,2BAA2B,cAAc,SAAS,KAAK;GACvD,SAAS,SAAS,UAAU;GAC5B,YAAY,SAAS;GACrB,mBAAmB,SAAS;GAC5B,UAAU,SAAS;GACnB,aAAa,KAAK,KAAK;GACvB,SAAS,WAAW;IACnB,UAAU,oBAAoB,MAAM;GACrC;EACD,CAAC;CACF,SAAS,OAAO;EACf,IAAI,mBAAmB,GAAG,KAAK,GAAG,OAAO,MAAM,KAAK;EACpD,OAAO,MAAM,IAAI,mBAAmB,wBAAwB,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC,CAAC,CAAC;CAC5H;CACA,MAAM,SAAS,oBAAoB,OAAO,KAAK,SAAS;CACxD,IAAI;CACJ,IAAI;EACH,UAAU,MAAM,MAAM,SAAS;GAC9B,WAAW;GACX;GACA,OAAO,SAAS;GAChB;GACA;GACA,QAAQ,KAAK;GACb,UAAU,UAAU,oBAAoB,OAAO,OAAO,SAAS,cAAc;IAC5E,MAAM;IACN,GAAG;GACJ,EAAE;GACF,SAAS,SAAS,OAAO,KAAK,IAAI;EACnC,CAAC;CACF,SAAS,OAAO;EACf,OAAO,MAAM,IAAI,mBAAmB,wBAAwB,OAAO,sCAAsC,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,GAAG,CAAC,CAAC;CACpK,UAAU;EACT,OAAO,IAAI;CACZ;CACA,IAAI,QAAQ,SAAS,WAAW,OAAO,MAAM,gBAAgB,SAAS,MAAM,CAAC;CAC7E,MAAM,OAAO,EAAE,MAAM,QAAQ,CAAC;CAC9B,OAAO,GAAG,cAAc,SAAS,KAAK,SAAS,CAAC;AACjD"}
|
|
@@ -4,9 +4,9 @@ import { t as CliStructuredError } from "./errors-CVYwN2km.mjs";
|
|
|
4
4
|
import { a as redactError, i as redactDevEvent, s as redactThrown, t as SecretRedaction } from "./redaction-DY6eDC12-BrK1aSN5.mjs";
|
|
5
5
|
import { r as devEnvironmentDir } from "./app-config-CErnR6NK-DnKH4Kqc.mjs";
|
|
6
6
|
import { n as ok, t as notOk } from "./result-CttmabB6.mjs";
|
|
7
|
-
import { c as toStructured, n as convergeReasonsText, s as requireContainerForEnvironment } from "./dev-current-
|
|
7
|
+
import { c as toStructured, n as convergeReasonsText, s as requireContainerForEnvironment } from "./dev-current-C7rT6Yxw-DdlXRvfz.mjs";
|
|
8
8
|
import { t as valueReadsChangeText } from "./value-reads-change-text-DcRCv7Zy-Ca8m3bal.mjs";
|
|
9
|
-
import { t as loadAppConvergeEntry } from "./app-converge-
|
|
9
|
+
import { t as loadAppConvergeEntry } from "./app-converge-DkTFs-ih-VPepJ4ZK.mjs";
|
|
10
10
|
import { a as valueReadsSnapshot, i as thrownResult, o as holdingConvergeProcess, r as isWorkerMessage } from "./dev-converge-messages-DML4rTz7-B6uxtpZG.mjs";
|
|
11
11
|
import { t as resolveLocalTargets } from "./local-target-CZzICh5R.mjs";
|
|
12
12
|
import { i as validateEnvironmentName, r as runPipeline } from "./validate-environment-DCZiNSlR-idVge-kq.mjs";
|
|
@@ -1602,7 +1602,7 @@ var esm_default = {
|
|
|
1602
1602
|
FSWatcher
|
|
1603
1603
|
};
|
|
1604
1604
|
//#endregion
|
|
1605
|
-
//#region ../../0-framework/3-tooling/cli/dist/execute-dev-
|
|
1605
|
+
//#region ../../0-framework/3-tooling/cli/dist/execute-dev-BtSLDMkv.mjs
|
|
1606
1606
|
/**
|
|
1607
1607
|
* Local-dev spec § 6 `watch.ts`: watches each assembled bundle's declared
|
|
1608
1608
|
* `watch` paths and every authoring module (ADR-0056) — a directory watched
|
|
@@ -2539,4 +2539,4 @@ async function executeDevInner(input, deps, cwd, redaction) {
|
|
|
2539
2539
|
//#endregion
|
|
2540
2540
|
export { executeDev };
|
|
2541
2541
|
|
|
2542
|
-
//# sourceMappingURL=execute-dev-
|
|
2542
|
+
//# sourceMappingURL=execute-dev-BtSLDMkv-C7vjxmdg.mjs.map
|