@prisma/composer 0.36.0-dev.5 → 0.36.0-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{app-config-BvxeTt2h-CcVmwsq6.d.mts → app-config-Bf_y5R7o-BEZAnKqM.d.mts} +31 -31
- package/dist/app-config-Bf_y5R7o-BEZAnKqM.d.mts.map +1 -0
- package/dist/app-configuration-file-CeJvBAti-D3uDlheX.mjs +221 -0
- package/dist/app-configuration-file-CeJvBAti-D3uDlheX.mjs.map +1 -0
- package/dist/arktype.mjs +1 -2
- package/dist/arktype.mjs.map +1 -1
- package/dist/config-CDkq5Ayl.d.mts +1 -0
- package/dist/config-adapters-DG-uhGfv-Bt1M9f8b.mjs +47 -0
- package/dist/config-adapters-DG-uhGfv-Bt1M9f8b.mjs.map +1 -0
- package/dist/config.d.mts +7 -9
- package/dist/config.d.mts.map +1 -1
- package/dist/config.mjs +1 -1
- package/dist/control.d.mts +6 -183
- package/dist/control.d.mts.map +1 -1
- package/dist/control.mjs +4 -4
- package/dist/control.mjs.map +1 -1
- package/dist/deploy-CmiYExQA.mjs +373 -0
- package/dist/deploy-CmiYExQA.mjs.map +1 -0
- package/dist/deploy-DQyaIoNe.d.mts +2 -0
- package/dist/deploy.d.mts +4 -3
- package/dist/deploy.mjs +3 -365
- package/dist/{deployment-summary-QkZexVIS-DqL4znd4.mjs → deployment-summary-BiBkPWlB-CyC2pudN.mjs} +9 -46
- package/dist/deployment-summary-BiBkPWlB-CyC2pudN.mjs.map +1 -0
- package/dist/{deployment-summary-Cm4lN6w9-Dc69sCgo.d.mts → deployment-summary-p88NV5m5-BJOosgmI.d.mts} +4 -5
- package/dist/deployment-summary-p88NV5m5-BJOosgmI.d.mts.map +1 -0
- package/dist/{secret-DoWGmN7m-CI5Yrldp.mjs → describe-kind-Cpm_euxo-CkhlGJUL.mjs} +13 -2
- package/dist/describe-kind-Cpm_euxo-CkhlGJUL.mjs.map +1 -0
- package/dist/{dev-current-BurA9uhA-C7E-BpRH.mjs → dev-current-D0Kn6Mf4-DDWYu-3j.mjs} +5 -5
- package/dist/{dev-current-BurA9uhA-C7E-BpRH.mjs.map → dev-current-D0Kn6Mf4-DDWYu-3j.mjs.map} +1 -1
- package/dist/{dev-environment-name-6eEr5PW8-BbNUVxlS.mjs → dev-environment-name-6eEr5PW8-BwusWVKi.mjs} +3 -3
- package/dist/{dev-environment-name-6eEr5PW8-BbNUVxlS.mjs.map → dev-environment-name-6eEr5PW8-BwusWVKi.mjs.map} +1 -1
- package/dist/{dist-DiYPSVUE.mjs → dist-BtzrklYG.mjs} +2 -2
- package/dist/{dist-DiYPSVUE.mjs.map → dist-BtzrklYG.mjs.map} +1 -1
- package/dist/{dist-0Iux8Khv.mjs → dist-C7SnNTD3.mjs} +2 -2
- package/dist/{dist-0Iux8Khv.mjs.map → dist-C7SnNTD3.mjs.map} +1 -1
- package/dist/{execute-deploy-destroy-Cww6zOSC-CIPx-m4I.mjs → execute-deploy-destroy-Dh1CQ9X6-DY4c9egd.mjs} +59 -35
- package/dist/execute-deploy-destroy-Dh1CQ9X6-DY4c9egd.mjs.map +1 -0
- package/dist/{execute-dev-4KYkqSMh-BP9S193k.mjs → execute-dev-Bl-5Q-Av-DILne6iY.mjs} +79 -48
- package/dist/execute-dev-Bl-5Q-Av-DILne6iY.mjs.map +1 -0
- package/dist/{execute-dev-current-Cd4YEUZk-C6bs4ONa.mjs → execute-dev-current-D3USgHJ4-CNQe5ADb.mjs} +6 -6
- package/dist/{execute-dev-current-Cd4YEUZk-C6bs4ONa.mjs.map → execute-dev-current-D3USgHJ4-CNQe5ADb.mjs.map} +1 -1
- package/dist/{execute-log-BC5o35wQ-C8QWELlP.mjs → execute-log-Dm3DkQQP-BSjoy6Wd.mjs} +6 -6
- package/dist/{execute-log-BC5o35wQ-C8QWELlP.mjs.map → execute-log-Dm3DkQQP-BSjoy6Wd.mjs.map} +1 -1
- package/dist/{graph-gE31_ToO-BouKBfIS.mjs → graph-Bqr7PSGl-BM-M-TlO.mjs} +183 -44
- package/dist/graph-Bqr7PSGl-BM-M-TlO.mjs.map +1 -0
- package/dist/{graph-CN8VuVZN-Ck2y98XZ.d.mts → graph-DI1v3WKX-3g1lTRbh.d.mts} +8 -4
- package/dist/graph-DI1v3WKX-3g1lTRbh.d.mts.map +1 -0
- package/dist/{graph-types-R38xjBnN-cDTIX_rZ.d.mts → graph-types-DRe9UUOp-C85Yr-sJ.d.mts} +138 -67
- package/dist/graph-types-DRe9UUOp-C85Yr-sJ.d.mts.map +1 -0
- package/dist/http.d.mts +2 -2
- package/dist/http.mjs +2 -2
- package/dist/{index-BHdm4Q39.d.mts → index-DWQ6BSgm.d.mts} +3 -3
- package/dist/{index-BHdm4Q39.d.mts.map → index-DWQ6BSgm.d.mts.map} +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +3 -3
- package/dist/internal-app-configuration-file.d.mts +19 -0
- package/dist/internal-app-configuration-file.d.mts.map +1 -0
- package/dist/internal-app-configuration-file.mjs +2 -0
- package/dist/{local-target-zSdLvLyy.mjs → local-target-Dd8FJEb5.mjs} +4 -3
- package/dist/{local-target-zSdLvLyy.mjs.map → local-target-Dd8FJEb5.mjs.map} +1 -1
- package/dist/local-target.d.mts +2 -2
- package/dist/local-target.d.mts.map +1 -1
- package/dist/local-target.mjs +1 -1
- package/dist/{nextjs-DLyeRR7M-CuGngjU4.d.mts → nextjs-DLyeRR7M-RtoHcY1c.d.mts} +3 -3
- package/dist/{nextjs-DLyeRR7M-CuGngjU4.d.mts.map → nextjs-DLyeRR7M-RtoHcY1c.d.mts.map} +1 -1
- package/dist/nextjs-control.d.mts +4 -4
- package/dist/nextjs-control.mjs +2 -2
- package/dist/nextjs.d.mts +1 -1
- package/dist/node-control.d.mts +3 -3
- package/dist/node-control.mjs +2 -2
- package/dist/node.d.mts +2 -2
- package/dist/redaction-Bf8FvTFH-BTsKD9B5.d.mts +183 -0
- package/dist/redaction-Bf8FvTFH-BTsKD9B5.d.mts.map +1 -0
- package/dist/redaction-HnbkSFrK-BXRZ3B33.mjs +295 -0
- package/dist/redaction-HnbkSFrK-BXRZ3B33.mjs.map +1 -0
- package/dist/report.d.mts +3 -3
- package/dist/report.mjs +1 -1
- package/dist/report.mjs.map +1 -1
- package/dist/{run-alchemy-B-Z6i3cD-C30mHT0u.mjs → run-alchemy-OS_ix5g0-DCvUYZ7T.mjs} +30 -13
- package/dist/run-alchemy-OS_ix5g0-DCvUYZ7T.mjs.map +1 -0
- package/dist/{run-report-CmBz2-xc-S50d4g5V.mjs → run-report-CmBz2-xc-Cc8rV1CX.mjs} +2 -2
- package/dist/{run-report-CmBz2-xc-S50d4g5V.mjs.map → run-report-CmBz2-xc-Cc8rV1CX.mjs.map} +1 -1
- package/dist/service-rpc.d.mts +2 -2
- package/dist/service-rpc.mjs +2 -2
- package/dist/testing.d.mts +1 -1
- package/dist/{validate-environment-BNZC6W46-B0ESzFBn.mjs → validate-environment-D_dECxgO-B-gqpVEf.mjs} +76 -13
- package/dist/validate-environment-D_dECxgO-B-gqpVEf.mjs.map +1 -0
- package/dist/zod.mjs +1 -2
- package/dist/zod.mjs.map +1 -1
- package/package.json +13 -13
- package/skills/prisma-composer-core-concepts/SKILL.md +7 -24
- package/src/exports/internal-app-configuration-file.ts +1 -0
- package/dist/app-config-BvxeTt2h-CcVmwsq6.d.mts.map +0 -1
- package/dist/config-Cn9vjklJ.d.mts +0 -1
- package/dist/config-adapters-BA_IeiX0-BiE51GeB.mjs +0 -84
- package/dist/config-adapters-BA_IeiX0-BiE51GeB.mjs.map +0 -1
- package/dist/config-pools-DiYw7wMu-DzeWrJdm.mjs +0 -63
- package/dist/config-pools-DiYw7wMu-DzeWrJdm.mjs.map +0 -1
- package/dist/deploy-Cn9vjklJ.d.mts +0 -1
- package/dist/deploy.mjs.map +0 -1
- package/dist/deployment-summary-Cm4lN6w9-Dc69sCgo.d.mts.map +0 -1
- package/dist/deployment-summary-QkZexVIS-DqL4znd4.mjs.map +0 -1
- package/dist/describe-kind-Cpm_euxo-JFh8ejof.mjs +0 -14
- package/dist/describe-kind-Cpm_euxo-JFh8ejof.mjs.map +0 -1
- package/dist/execute-deploy-destroy-Cww6zOSC-CIPx-m4I.mjs.map +0 -1
- package/dist/execute-dev-4KYkqSMh-BP9S193k.mjs.map +0 -1
- package/dist/graph-CN8VuVZN-Ck2y98XZ.d.mts.map +0 -1
- package/dist/graph-gE31_ToO-BouKBfIS.mjs.map +0 -1
- package/dist/graph-types-R38xjBnN-cDTIX_rZ.d.mts.map +0 -1
- package/dist/internal-pools.d.mts +0 -18
- package/dist/internal-pools.d.mts.map +0 -1
- package/dist/internal-pools.mjs +0 -2
- package/dist/run-alchemy-B-Z6i3cD-C30mHT0u.mjs.map +0 -1
- package/dist/secret-DoWGmN7m-CI5Yrldp.mjs.map +0 -1
- package/dist/validate-environment-BNZC6W46-B0ESzFBn.mjs.map +0 -1
- package/src/exports/internal-pools.ts +0 -1
|
@@ -88,7 +88,7 @@ function okVoid() {
|
|
|
88
88
|
return OK_VOID;
|
|
89
89
|
}
|
|
90
90
|
//#endregion
|
|
91
|
-
//#region ../../0-framework/3-tooling/cli/dist/dev-current-
|
|
91
|
+
//#region ../../0-framework/3-tooling/cli/dist/dev-current-D0Kn6Mf4.mjs
|
|
92
92
|
/**
|
|
93
93
|
* Reads the execution diagnostics an engine-failure error carries in
|
|
94
94
|
* `meta.diagnostics`; undefined for every other failure.
|
|
@@ -161,7 +161,7 @@ async function deployWithDeps(input, deps) {
|
|
|
161
161
|
const cwd = input.cwd ?? process.cwd();
|
|
162
162
|
let executor;
|
|
163
163
|
try {
|
|
164
|
-
executor = await import("./execute-deploy-destroy-
|
|
164
|
+
executor = await import("./execute-deploy-destroy-Dh1CQ9X6-DY4c9egd.mjs");
|
|
165
165
|
} catch (error) {
|
|
166
166
|
return notOk(executorLoadFailure("deploy", error));
|
|
167
167
|
}
|
|
@@ -182,7 +182,7 @@ async function devWithDeps(input, deps) {
|
|
|
182
182
|
const cwd = input.cwd ?? process.cwd();
|
|
183
183
|
let executor;
|
|
184
184
|
try {
|
|
185
|
-
executor = await import("./execute-dev-
|
|
185
|
+
executor = await import("./execute-dev-Bl-5Q-Av-DILne6iY.mjs");
|
|
186
186
|
} catch (error) {
|
|
187
187
|
return notOk(executorLoadFailure("dev", error));
|
|
188
188
|
}
|
|
@@ -190,7 +190,7 @@ async function devWithDeps(input, deps) {
|
|
|
190
190
|
}
|
|
191
191
|
async function loadExecutor(operation) {
|
|
192
192
|
try {
|
|
193
|
-
return ok(await import("./execute-dev-current-
|
|
193
|
+
return ok(await import("./execute-dev-current-D3USgHJ4-CNQe5ADb.mjs"));
|
|
194
194
|
} catch (error) {
|
|
195
195
|
return notOk(executorLoadFailure(operation, error));
|
|
196
196
|
}
|
|
@@ -210,4 +210,4 @@ async function devStop(input) {
|
|
|
210
210
|
//#endregion
|
|
211
211
|
export { executionDiagnostics as a, toStructured as c, okVoid as d, devUrl as i, notOk as l, dev as n, executorLoadFailure as o, devStop as r, requireContainerForEnvironment as s, deploy as t, ok as u };
|
|
212
212
|
|
|
213
|
-
//# sourceMappingURL=dev-current-
|
|
213
|
+
//# sourceMappingURL=dev-current-D0Kn6Mf4-DDWYu-3j.mjs.map
|
package/dist/{dev-current-BurA9uhA-C7E-BpRH.mjs.map → dev-current-D0Kn6Mf4-DDWYu-3j.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-current-BurA9uhA-C7E-BpRH.mjs","names":[],"sources":["../../../0-framework/0-foundation/foundation/dist/result.mjs","../../../0-framework/3-tooling/cli/dist/dev-current-BurA9uhA.mjs"],"sourcesContent":["import { t as blindCast } from \"./casts-DpaahrlC.mjs\";\nimport { t as InternalError } from \"./internal-error-Dfur7Zqt.mjs\";\n//#region src/result.ts\n/**\n* Generic Result type for representing success or failure outcomes.\n*\n* This is the standard way to return \"expected failures\" as values rather than\n* throwing exceptions. See docs/Error Handling.md for the full taxonomy.\n*\n* Naming rationale:\n* - `Ok<T>` / `NotOk<F>` mirror the `ok: true/false` discriminator\n* - `NotOk` avoids collision with domain types like \"Failure\" or \"Error\"\n* - `failure` property distinguishes from JS Error semantics\n*/\n/**\n* Result class that implements both Ok and NotOk variants.\n*/\nvar ResultImpl = class ResultImpl {\n\tok;\n\t_value;\n\t_failure;\n\tconstructor(ok, valueOrFailure) {\n\t\tthis.ok = ok;\n\t\tif (ok) this._value = blindCast(valueOrFailure);\n\t\telse this._failure = blindCast(valueOrFailure);\n\t\tObject.freeze(this);\n\t}\n\tget value() {\n\t\tif (!this.ok) throw new InternalError(\"Cannot access value on NotOk result\");\n\t\treturn this._value;\n\t}\n\tget failure() {\n\t\tif (this.ok) throw new InternalError(\"Cannot access failure on Ok result\");\n\t\treturn this._failure;\n\t}\n\t/**\n\t* Creates a successful result.\n\t*/\n\tstatic ok(value) {\n\t\treturn blindCast(new ResultImpl(true, value));\n\t}\n\t/**\n\t* Creates an unsuccessful result.\n\t*/\n\tstatic notOk(failure) {\n\t\treturn blindCast(new ResultImpl(false, failure));\n\t}\n\t/**\n\t* Asserts that this result is Ok and returns the value.\n\t* Throws if the result is NotOk.\n\t*/\n\tassertOk() {\n\t\tif (!this.ok) throw new InternalError(\"Expected Ok result but got NotOk\");\n\t\treturn this.value;\n\t}\n\t/**\n\t* Asserts that this result is NotOk and returns the failure.\n\t* Throws if the result is Ok.\n\t*/\n\tassertNotOk() {\n\t\tif (this.ok) throw new InternalError(\"Expected NotOk result but got Ok\");\n\t\treturn this.failure;\n\t}\n};\n/**\n* Creates a successful result.\n*/\nfunction ok(value) {\n\treturn ResultImpl.ok(value);\n}\n/**\n* Creates an unsuccessful result.\n*/\nfunction notOk(failure) {\n\treturn ResultImpl.notOk(failure);\n}\n/**\n* Singleton for void success results.\n* Use this for validation checks that don't produce a value.\n*/\nconst OK_VOID = ResultImpl.ok(void 0);\n/**\n* Returns a successful void result.\n* Use this for validation checks that don't produce a value.\n*/\nfunction okVoid() {\n\treturn OK_VOID;\n}\n//#endregion\nexport { notOk, ok, okVoid };\n\n//# sourceMappingURL=result.mjs.map","import { CliStructuredError } from \"@internal/foundation/errors\";\nimport { blindCast } from \"@internal/foundation/casts\";\nimport { notOk, ok } from \"@internal/foundation/result\";\n//#region src/operations/shared.ts\n/**\n* Reads the execution diagnostics an engine-failure error carries in\n* `meta.diagnostics`; undefined for every other failure.\n*/\nfunction executionDiagnostics(f) {\n\tconst diagnostics = f.meta?.[\"diagnostics\"];\n\tif (typeof diagnostics !== \"object\" || diagnostics === null) return void 0;\n\tconst candidate = blindCast(diagnostics);\n\tif (candidate[\"exitCode\"] !== void 0 && typeof candidate[\"exitCode\"] !== \"number\" || candidate[\"signal\"] !== void 0 && typeof candidate[\"signal\"] !== \"string\" || typeof candidate[\"stackFilePath\"] !== \"string\" || typeof candidate[\"reproduceCommand\"] !== \"string\" || typeof candidate[\"cwd\"] !== \"string\") return;\n\treturn blindCast(diagnostics);\n}\n/**\n* Site-specific wrap for foreign extension/environment causes — passthrough\n* when already structured; never a boundary fallback (base-type rule 6(ii)).\n*/\nfunction toStructured(code, error) {\n\treturn CliStructuredError.is(error) ? error : new CliStructuredError(code, error instanceof Error ? error.message : String(error), { cause: error });\n}\n/** A failed executor import: an environmental failure of the consumer's\n* installed tree, not a bug here. The import error rides as the cause. */\nfunction executorLoadFailure(operation, error) {\n\treturn new CliStructuredError(\"DEPS.EXECUTOR_UNLOADABLE\", `Could not load the ${operation} executor: ${error instanceof Error ? error.message : String(error)}`, {\n\t\twhy: `The ${operation} operation's executor imports the deploy engine's provider tree from your app's installed dependencies, and that import failed.`,\n\t\tfix: \"Reinstall your dependencies, and check that `alchemy` is installed and loadable from your app.\",\n\t\tcause: error\n\t});\n}\nconst RUN_OF = {\n\tdeploy: {\n\t\trunning: \"this deploy\",\n\t\truns: \"the deploy\"\n\t},\n\tdestroy: {\n\t\trunning: \"this destroy\",\n\t\truns: \"the destroy\"\n\t},\n\tdev: {\n\t\trunning: \"`prisma dev`\",\n\t\truns: \"`prisma dev`\"\n\t}\n};\n/**\n* An extension older than this Composer stores the input it is given but\n* resolves from a key without `environment`, so it may read every name as\n* production, or, locally, put every environment in one copy. Its\n* `deserialize` rebuilds only the fields it knows, so the container the\n* Alchemy child rebuilds shows which environment it really resolved.\n* Refusing here keeps a mismatched install from deploying into, destroying\n* or running the wrong place.\n*/\nfunction requireContainerForEnvironment(action, extensionId, descriptor, instance, environment) {\n\tlet rebuiltEnvironment;\n\ttry {\n\t\trebuiltEnvironment = descriptor.deserialize(instance.serialize()).input.environment;\n\t} catch {\n\t\trebuiltEnvironment = void 0;\n\t}\n\tif (rebuiltEnvironment === environment) return;\n\tconst { running, runs } = RUN_OF[action];\n\tthrow new CliStructuredError(\"DEPS.EXTENSION_INCOMPATIBLE\", `The extension ${extensionId} is older than the Composer running ${running}, so it would not resolve the environment ${environment}.`, { fix: `Install the same Composer version of ${extensionId} as the Composer that runs ${runs}.` });\n}\n//#endregion\n//#region src/operations/deploy.ts\n/** The environment `deploy` targets when none is named. */\nconst DEFAULT_DEPLOY_ENVIRONMENT = \"production\";\nasync function deploy(input) {\n\treturn deployWithDeps(input, {});\n}\n/** In-package variant threading the injection seam, which the family's\n* commands and the unit tests use. Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function deployWithDeps(input, deps) {\n\tconst startedAt = performance.now();\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-deploy-destroy-Cww6zOSC.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-4KYkqSMh.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-Cd4YEUZk.mjs\"));\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(operation, error));\n\t}\n}\n/** Where the node at `input.address` runs locally in the environment. */\nasync function devUrl(input) {\n\tconst executor = await loadExecutor(\"dev url\");\n\tif (!executor.ok) return executor;\n\treturn executor.value.executeDevUrl(input, input.cwd ?? process.cwd());\n}\n/** Stops the app's local copy in the environment: its service processes and database servers. Data and ports stay. */\nasync function devStop(input) {\n\tconst executor = await loadExecutor(\"dev stop\");\n\tif (!executor.ok) return executor;\n\treturn executor.value.executeDevStop(input, input.cwd ?? process.cwd());\n}\n//#endregion\nexport { DEFAULT_DEPLOY_ENVIRONMENT as a, executionDiagnostics as c, toStructured as d, devWithDeps as i, executorLoadFailure as l, devUrl as n, deploy as o, dev as r, deployWithDeps as s, devStop as t, requireContainerForEnvironment as u };\n\n//# sourceMappingURL=dev-current-BurA9uhA.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,IAAI,aAAa,MAAM,WAAW;CACjC;CACA;CACA;CACA,YAAY,IAAI,gBAAgB;EAC/B,KAAK,KAAK;EACV,IAAI,IAAI,KAAK,SAAS,UAAU,cAAc;OACzC,KAAK,WAAW,UAAU,cAAc;EAC7C,OAAO,OAAO,IAAI;CACnB;CACA,IAAI,QAAQ;EACX,IAAI,CAAC,KAAK,IAAI,MAAM,IAAI,cAAc,qCAAqC;EAC3E,OAAO,KAAK;CACb;CACA,IAAI,UAAU;E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C;AAC7B;;;;AAIA,eAAe,YAAY,OAAO,MAAM;CACvC,MAAM,MAAM,MAAM,OAAO,QAAQ,IAAI;CACrC,IAAI;CACJ,IAAI;EACH,WAAW,MAAM,OAAO;CACzB,SAAS,OAAO;EACf,OAAO,MAAM,oBAAoB,OAAO,KAAK,CAAC;CAC/C;CACA,OAAO,SAAS,WAAW,OAAO,MAAM,GAAG;AAC5C;AAGA,eAAe,aAAa,WAAW;CACtC,IAAI;EACH,OAAO,GAAG,MAAM,OAAO,8CAAqC;CAC7D,SAAS,OAAO;EACf,OAAO,MAAM,oBAAoB,WAAW,KAAK,CAAC;CACnD;AACD;;AAEA,eAAe,OAAO,OAAO;CAC5B,MAAM,WAAW,MAAM,aAAa,SAAS;CAC7C,IAAI,CAAC,SAAS,IAAI,OAAO;CACzB,OAAO,SAAS,MAAM,cAAc,OAAO,MAAM,OAAO,QAAQ,IAAI,CAAC;AACtE;;AAEA,eAAe,QAAQ,OAAO;CAC7B,MAAM,WAAW,MAAM,aAAa,UAAU;CAC9C,IAAI,CAAC,SAAS,IAAI,OAAO;CACzB,OAAO,SAAS,MAAM,eAAe,OAAO,MAAM,OAAO,QAAQ,IAAI,CAAC;AACvE"}
|
|
1
|
+
{"version":3,"file":"dev-current-D0Kn6Mf4-DDWYu-3j.mjs","names":[],"sources":["../../../0-framework/0-foundation/foundation/dist/result.mjs","../../../0-framework/3-tooling/cli/dist/dev-current-D0Kn6Mf4.mjs"],"sourcesContent":["import { t as blindCast } from \"./casts-DpaahrlC.mjs\";\nimport { t as InternalError } from \"./internal-error-Dfur7Zqt.mjs\";\n//#region src/result.ts\n/**\n* Generic Result type for representing success or failure outcomes.\n*\n* This is the standard way to return \"expected failures\" as values rather than\n* throwing exceptions. See docs/Error Handling.md for the full taxonomy.\n*\n* Naming rationale:\n* - `Ok<T>` / `NotOk<F>` mirror the `ok: true/false` discriminator\n* - `NotOk` avoids collision with domain types like \"Failure\" or \"Error\"\n* - `failure` property distinguishes from JS Error semantics\n*/\n/**\n* Result class that implements both Ok and NotOk variants.\n*/\nvar ResultImpl = class ResultImpl {\n\tok;\n\t_value;\n\t_failure;\n\tconstructor(ok, valueOrFailure) {\n\t\tthis.ok = ok;\n\t\tif (ok) this._value = blindCast(valueOrFailure);\n\t\telse this._failure = blindCast(valueOrFailure);\n\t\tObject.freeze(this);\n\t}\n\tget value() {\n\t\tif (!this.ok) throw new InternalError(\"Cannot access value on NotOk result\");\n\t\treturn this._value;\n\t}\n\tget failure() {\n\t\tif (this.ok) throw new InternalError(\"Cannot access failure on Ok result\");\n\t\treturn this._failure;\n\t}\n\t/**\n\t* Creates a successful result.\n\t*/\n\tstatic ok(value) {\n\t\treturn blindCast(new ResultImpl(true, value));\n\t}\n\t/**\n\t* Creates an unsuccessful result.\n\t*/\n\tstatic notOk(failure) {\n\t\treturn blindCast(new ResultImpl(false, failure));\n\t}\n\t/**\n\t* Asserts that this result is Ok and returns the value.\n\t* Throws if the result is NotOk.\n\t*/\n\tassertOk() {\n\t\tif (!this.ok) throw new InternalError(\"Expected Ok result but got NotOk\");\n\t\treturn this.value;\n\t}\n\t/**\n\t* Asserts that this result is NotOk and returns the failure.\n\t* Throws if the result is Ok.\n\t*/\n\tassertNotOk() {\n\t\tif (this.ok) throw new InternalError(\"Expected NotOk result but got Ok\");\n\t\treturn this.failure;\n\t}\n};\n/**\n* Creates a successful result.\n*/\nfunction ok(value) {\n\treturn ResultImpl.ok(value);\n}\n/**\n* Creates an unsuccessful result.\n*/\nfunction notOk(failure) {\n\treturn ResultImpl.notOk(failure);\n}\n/**\n* Singleton for void success results.\n* Use this for validation checks that don't produce a value.\n*/\nconst OK_VOID = ResultImpl.ok(void 0);\n/**\n* Returns a successful void result.\n* Use this for validation checks that don't produce a value.\n*/\nfunction okVoid() {\n\treturn OK_VOID;\n}\n//#endregion\nexport { notOk, ok, okVoid };\n\n//# sourceMappingURL=result.mjs.map","import { CliStructuredError } from \"@internal/foundation/errors\";\nimport { blindCast } from \"@internal/foundation/casts\";\nimport { notOk, ok } from \"@internal/foundation/result\";\n//#region src/operations/shared.ts\n/**\n* Reads the execution diagnostics an engine-failure error carries in\n* `meta.diagnostics`; undefined for every other failure.\n*/\nfunction executionDiagnostics(f) {\n\tconst diagnostics = f.meta?.[\"diagnostics\"];\n\tif (typeof diagnostics !== \"object\" || diagnostics === null) return void 0;\n\tconst candidate = blindCast(diagnostics);\n\tif (candidate[\"exitCode\"] !== void 0 && typeof candidate[\"exitCode\"] !== \"number\" || candidate[\"signal\"] !== void 0 && typeof candidate[\"signal\"] !== \"string\" || typeof candidate[\"stackFilePath\"] !== \"string\" || typeof candidate[\"reproduceCommand\"] !== \"string\" || typeof candidate[\"cwd\"] !== \"string\") return;\n\treturn blindCast(diagnostics);\n}\n/**\n* Site-specific wrap for foreign extension/environment causes — passthrough\n* when already structured; never a boundary fallback (base-type rule 6(ii)).\n*/\nfunction toStructured(code, error) {\n\treturn CliStructuredError.is(error) ? error : new CliStructuredError(code, error instanceof Error ? error.message : String(error), { cause: error });\n}\n/** A failed executor import: an environmental failure of the consumer's\n* installed tree, not a bug here. The import error rides as the cause. */\nfunction executorLoadFailure(operation, error) {\n\treturn new CliStructuredError(\"DEPS.EXECUTOR_UNLOADABLE\", `Could not load the ${operation} executor: ${error instanceof Error ? error.message : String(error)}`, {\n\t\twhy: `The ${operation} operation's executor imports the deploy engine's provider tree from your app's installed dependencies, and that import failed.`,\n\t\tfix: \"Reinstall your dependencies, and check that `alchemy` is installed and loadable from your app.\",\n\t\tcause: error\n\t});\n}\nconst RUN_OF = {\n\tdeploy: {\n\t\trunning: \"this deploy\",\n\t\truns: \"the deploy\"\n\t},\n\tdestroy: {\n\t\trunning: \"this destroy\",\n\t\truns: \"the destroy\"\n\t},\n\tdev: {\n\t\trunning: \"`prisma dev`\",\n\t\truns: \"`prisma dev`\"\n\t}\n};\n/**\n* An extension older than this Composer stores the input it is given but\n* resolves from a key without `environment`, so it may read every name as\n* production, or, locally, put every environment in one copy. Its\n* `deserialize` rebuilds only the fields it knows, so the container the\n* Alchemy child rebuilds shows which environment it really resolved.\n* Refusing here keeps a mismatched install from deploying into, destroying\n* or running the wrong place.\n*/\nfunction requireContainerForEnvironment(action, extensionId, descriptor, instance, environment) {\n\tlet rebuiltEnvironment;\n\ttry {\n\t\trebuiltEnvironment = descriptor.deserialize(instance.serialize()).input.environment;\n\t} catch {\n\t\trebuiltEnvironment = void 0;\n\t}\n\tif (rebuiltEnvironment === environment) return;\n\tconst { running, runs } = RUN_OF[action];\n\tthrow new CliStructuredError(\"DEPS.EXTENSION_INCOMPATIBLE\", `The extension ${extensionId} is older than the Composer running ${running}, so it would not resolve the environment ${environment}.`, { fix: `Install the same Composer version of ${extensionId} as the Composer that runs ${runs}.` });\n}\n//#endregion\n//#region src/operations/deploy.ts\n/** The environment `deploy` targets when none is named. */\nconst DEFAULT_DEPLOY_ENVIRONMENT = \"production\";\nasync function deploy(input) {\n\treturn deployWithDeps(input, {});\n}\n/** In-package variant threading the injection seam, which the family's\n* commands and the unit tests use. Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function deployWithDeps(input, deps) {\n\tconst startedAt = performance.now();\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-deploy-destroy-Dh1CQ9X6.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-Bl-5Q-Av.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-D3USgHJ4.mjs\"));\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(operation, error));\n\t}\n}\n/** Where the node at `input.address` runs locally in the environment. */\nasync function devUrl(input) {\n\tconst executor = await loadExecutor(\"dev url\");\n\tif (!executor.ok) return executor;\n\treturn executor.value.executeDevUrl(input, input.cwd ?? process.cwd());\n}\n/** Stops the app's local copy in the environment: its service processes and database servers. Data and ports stay. */\nasync function devStop(input) {\n\tconst executor = await loadExecutor(\"dev stop\");\n\tif (!executor.ok) return executor;\n\treturn executor.value.executeDevStop(input, input.cwd ?? process.cwd());\n}\n//#endregion\nexport { DEFAULT_DEPLOY_ENVIRONMENT as a, executionDiagnostics as c, toStructured as d, devWithDeps as i, executorLoadFailure as l, devUrl as n, deploy as o, dev as r, deployWithDeps as s, devStop as t, requireContainerForEnvironment as u };\n\n//# sourceMappingURL=dev-current-D0Kn6Mf4.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,IAAI,aAAa,MAAM,WAAW;CACjC;CACA;CACA;CACA,YAAY,IAAI,gBAAgB;EAC/B,KAAK,KAAK;EACV,IAAI,IAAI,KAAK,SAAS,UAAU,cAAc;OACzC,KAAK,WAAW,UAAU,cAAc;EAC7C,OAAO,OAAO,IAAI;CACnB;CACA,IAAI,QAAQ;EACX,IAAI,CAAC,KAAK,IAAI,MAAM,IAAI,cAAc,qCAAqC;EAC3E,OAAO,KAAK;CACb;CACA,IAAI,UAAU;EACb,IAAI,KAAK,IAAI,MAAM,IAAI,cAAc,oCAAoC;EACzE,OAAO,KAAK;CACb;;;;CAIA,OAAO,GAAG,OAAO;EAChB,OAAO,UAAU,IAAI,W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AM,OAAO;CACzB,SAAS,OAAO;EACf,OAAO,MAAM,oBAAoB,OAAO,KAAK,CAAC;CAC/C;CACA,OAAO,SAAS,WAAW,OAAO,MAAM,GAAG;AAC5C;AAGA,eAAe,aAAa,WAAW;CACtC,IAAI;EACH,OAAO,GAAG,MAAM,OAAO,8CAAqC;CAC7D,SAAS,OAAO;EACf,OAAO,MAAM,oBAAoB,WAAW,KAAK,CAAC;CACnD;AACD;;AAEA,eAAe,OAAO,OAAO;CAC5B,MAAM,WAAW,MAAM,aAAa,SAAS;CAC7C,IAAI,CAAC,SAAS,IAAI,OAAO;CACzB,OAAO,SAAS,MAAM,cAAc,OAAO,MAAM,OAAO,QAAQ,IAAI,CAAC;AACtE;;AAEA,eAAe,QAAQ,OAAO;CAC7B,MAAM,WAAW,MAAM,aAAa,UAAU;CAC9C,IAAI,CAAC,SAAS,IAAI,OAAO;CACzB,OAAO,SAAS,MAAM,eAAe,OAAO,MAAM,OAAO,QAAQ,IAAI,CAAC;AACvE"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as CliStructuredError } from "./errors-0e8IVwzi.mjs";
|
|
2
2
|
import { n as DEV_ENVIRONMENT_NAME_FILE } from "./app-config-CErnR6NK-D9NgSBH4.mjs";
|
|
3
|
-
import "./local-target-
|
|
4
|
-
import * as fs$1 from "node:fs";
|
|
3
|
+
import "./local-target-Dd8FJEb5.mjs";
|
|
5
4
|
import * as path$1 from "node:path";
|
|
5
|
+
import * as fs$1 from "node:fs";
|
|
6
6
|
//#region ../../0-framework/3-tooling/cli/dist/dev-environment-name-6eEr5PW8.mjs
|
|
7
7
|
/**
|
|
8
8
|
* Each environment's folder records the environment's exact name. On a
|
|
@@ -40,4 +40,4 @@ function claimDevEnvironmentName(devDir, environment) {
|
|
|
40
40
|
//#endregion
|
|
41
41
|
export { requireDevEnvironmentName as n, claimDevEnvironmentName as t };
|
|
42
42
|
|
|
43
|
-
//# sourceMappingURL=dev-environment-name-6eEr5PW8-
|
|
43
|
+
//# sourceMappingURL=dev-environment-name-6eEr5PW8-BwusWVKi.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-environment-name-6eEr5PW8-
|
|
1
|
+
{"version":3,"file":"dev-environment-name-6eEr5PW8-BwusWVKi.mjs","names":["path","fs"],"sources":["../../../0-framework/3-tooling/cli/dist/dev-environment-name-6eEr5PW8.mjs"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport { DEV_ENVIRONMENT_NAME_FILE } from \"@internal/core/local-target\";\n//#region src/operations/dev-environment-name.ts\n/**\n* Each environment's folder records the environment's exact name. On a\n* case-insensitive filesystem `--environment Dev` would otherwise open the\n* folder of `dev` and run, or `--fresh` delete, that copy.\n*/\nfunction recordedName(devDir) {\n\tconst file = path.join(devDir, DEV_ENVIRONMENT_NAME_FILE);\n\treturn fs.existsSync(file) ? fs.readFileSync(file, \"utf8\").trim() : void 0;\n}\nfunction nameMismatch(devDir, recorded, environment) {\n\treturn new CliStructuredError(\"DEV.ENVIRONMENT_NAME_MISMATCH\", `The folder ${devDir} holds the local copy of the environment ${recorded}, not ${environment}.`, {\n\t\twhy: \"On a case-insensitive filesystem, such as the default on macOS, environment names that differ only in case share one folder, so they cannot be separate local copies.\",\n\t\tfix: `Pass \\`--environment ${recorded}\\` for that copy, or pick a name that differs from ${recorded} by more than case.`,\n\t\tmeta: {\n\t\t\tdevDir,\n\t\t\trecorded,\n\t\t\tenvironment\n\t\t}\n\t});\n}\n/** Fails when the folder records another environment's name; a folder with no name recorded passes. */\nfunction requireDevEnvironmentName(devDir, environment) {\n\tconst recorded = recordedName(devDir);\n\tif (recorded !== void 0 && recorded !== environment) throw nameMismatch(devDir, recorded, environment);\n}\n/** Records the environment's name in its folder on first use; fails when the folder records another name. */\nfunction claimDevEnvironmentName(devDir, environment) {\n\tconst recorded = recordedName(devDir);\n\tif (recorded === environment) return;\n\tif (recorded !== void 0) throw nameMismatch(devDir, recorded, environment);\n\tfs.mkdirSync(devDir, { recursive: true });\n\tfs.writeFileSync(path.join(devDir, DEV_ENVIRONMENT_NAME_FILE), `${environment}\\n`);\n}\n//#endregion\nexport { requireDevEnvironmentName as n, claimDevEnvironmentName as t };\n\n//# sourceMappingURL=dev-environment-name-6eEr5PW8.mjs.map"],"mappings":";;;;;;;;;;;AAUA,SAAS,aAAa,QAAQ;CAC7B,MAAM,OAAOA,OAAK,KAAK,QAAQ,yBAAyB;CACxD,OAAOC,KAAG,WAAW,IAAI,IAAIA,KAAG,aAAa,MAAM,MAAM,CAAC,CAAC,KAAK,IAAI,KAAK;AAC1E;AACA,SAAS,aAAa,QAAQ,UAAU,aAAa;CACpD,OAAO,IAAI,mBAAmB,iCAAiC,cAAc,OAAO,2CAA2C,SAAS,QAAQ,YAAY,IAAI;EAC/J,KAAK;EACL,KAAK,wBAAwB,SAAS,qDAAqD,SAAS;EACpG,MAAM;GACL;GACA;GACA;EACD;CACD,CAAC;AACF;;AAEA,SAAS,0BAA0B,QAAQ,aAAa;CACvD,MAAM,WAAW,aAAa,MAAM;CACpC,IAAI,aAAa,KAAK,KAAK,aAAa,aAAa,MAAM,aAAa,QAAQ,UAAU,WAAW;AACtG;;AAEA,SAAS,wBAAwB,QAAQ,aAAa;CACrD,MAAM,WAAW,aAAa,MAAM;CACpC,IAAI,aAAa,aAAa;CAC9B,IAAI,aAAa,KAAK,GAAG,MAAM,aAAa,QAAQ,UAAU,WAAW;CACzE,KAAG,UAAU,QAAQ,EAAE,WAAW,KAAK,CAAC;CACxC,KAAG,cAAcD,OAAK,KAAK,QAAQ,yBAAyB,GAAG,GAAG,YAAY,GAAG;AAClF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
2
1
|
import path from "node:path";
|
|
2
|
+
import fs from "node:fs";
|
|
3
3
|
//#region ../../0-framework/2-authoring/bundle-paths/dist/index.mjs
|
|
4
4
|
/**
|
|
5
5
|
* The path-containment predicate and bundle-link validation shared by every
|
|
@@ -174,4 +174,4 @@ async function assertBundleSymlinksStayInside(bundleDir) {
|
|
|
174
174
|
//#endregion
|
|
175
175
|
export { repairWindowsDirectorySymlinks as a, isWithin as i, copyTreeVerbatim as n, createBundleLink as r, assertBundleSymlinksStayInside as t };
|
|
176
176
|
|
|
177
|
-
//# sourceMappingURL=dist-
|
|
177
|
+
//# sourceMappingURL=dist-BtzrklYG.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dist-DiYPSVUE.mjs","names":[],"sources":["../../../0-framework/2-authoring/bundle-paths/dist/index.mjs"],"sourcesContent":["import fs from \"node:fs\";\nimport path from \"node:path\";\n//#region src/bundle-paths.ts\n/**\n* The path-containment predicate and bundle-link validation shared by every\n* assembly and packaging seam (node/nextjs adapters, the compute artifact\n* writer, the local extractor). This predicate is the enforcement point of\n* ADR-0047's boundary — a symlink may be preserved only while its target\n* stays inside the assembled bundle — so it exists exactly once.\n*\n* Windows cannot create `dir`/`file` symlinks without Developer Mode or an\n* elevated token (`EPERM`). Directory junctions need no such privilege, so\n* assemble uses them on win32; file links fall back to a copy of the target.\n*/\n/** How a platform materializes a bundle link without needing symlink privilege. */\nfunction bundleLinkStrategy(platform, type) {\n\tif (platform !== \"win32\") return \"symlink\";\n\treturn type === \"dir\" ? \"junction\" : \"symlink-with-copy-fallback\";\n}\nfunction isNotPermitted(error) {\n\treturn error instanceof Error && Reflect.get(error, \"code\") === \"EPERM\";\n}\n/**\n* Creates a link at `linkPath` whose stored target is `target`.\n* `resolvedTarget` is the absolute path of that target in the destination\n* tree — junctions require it. The win32 file-copy fallback reads\n* `copySource` (source-tree path) when set, otherwise `resolvedTarget`, and\n* only when the target exists and stays inside `copyWithinRoot` (ADR-0047:\n* never dereference an escaping link into the artifact).\n*\n* Junction/symlink strategies may temporarily store an escaping\n* `resolvedTarget` (pnpm absolute junctions into the tracing-root store);\n* later staging rewrites them, and `assertBundleSymlinksStayInside` is the\n* final gate. Only the file-copy fallback must refuse escapes — copying would\n* materialize deploy-machine content as a regular file with no link left to\n* validate.\n*/\nasync function createBundleLink(linkPath, target, type, options) {\n\tconst strategy = bundleLinkStrategy(options.platform ?? process.platform, type);\n\tif (strategy === \"junction\") {\n\t\tawait fs.promises.symlink(options.resolvedTarget, linkPath, \"junction\");\n\t\treturn;\n\t}\n\tif (strategy === \"symlink\") {\n\t\tawait fs.promises.symlink(target, linkPath, type);\n\t\treturn;\n\t}\n\ttry {\n\t\tawait fs.promises.symlink(target, linkPath, \"file\");\n\t} catch (error) {\n\t\tif (!isNotPermitted(error)) throw error;\n\t\tif (!isWithin(path.resolve(options.copyWithinRoot), path.resolve(options.resolvedTarget))) throw new Error(`refusing to materialize a file link whose target escapes the bundle: ${linkPath} -> ${options.resolvedTarget}`, { cause: error });\n\t\tconst copyFrom = options.copySource ?? options.resolvedTarget;\n\t\ttry {\n\t\t\tawait fs.promises.stat(copyFrom);\n\t\t} catch {\n\t\t\tthrow new Error(`the assembled bundle contains a dangling symlink: ${linkPath}`);\n\t\t}\n\t\tawait fs.promises.copyFile(copyFrom, linkPath);\n\t}\n}\n/**\n* Map a link's stored target from the source tree into the destination tree.\n* pnpm on Windows often materializes directory links as junctions with absolute\n* targets; copying those verbatim leaves them pointing at the source, which\n* `assertBundleSymlinksStayInside` correctly rejects as an escape.\n*/\nfunction mapLinkIntoDestination(sourceRoot, destinationRoot, sourcePath, destinationPath, rawTarget) {\n\tconst resolvedSource = path.resolve(path.dirname(sourcePath), rawTarget);\n\tif (isWithin(sourceRoot, resolvedSource)) {\n\t\tconst resolvedTarget = path.resolve(destinationRoot, path.relative(sourceRoot, resolvedSource));\n\t\treturn {\n\t\t\ttarget: path.relative(path.dirname(destinationPath), resolvedTarget),\n\t\t\tresolvedTarget\n\t\t};\n\t}\n\treturn {\n\t\ttarget: rawTarget,\n\t\tresolvedTarget: path.resolve(path.dirname(destinationPath), rawTarget)\n\t};\n}\n/** Restores directory-link metadata lost by `fs.cp` on Windows. */\nasync function repairWindowsDirectorySymlinks(root) {\n\tif (process.platform !== \"win32\") return;\n\tconst visit = async (directory) => {\n\t\tfor (const entry of await fs.promises.readdir(directory, { withFileTypes: true })) {\n\t\t\tconst full = path.join(directory, entry.name);\n\t\t\tif (entry.isSymbolicLink()) {\n\t\t\t\tconst target = await fs.promises.readlink(full);\n\t\t\t\tif (path.isAbsolute(target)) continue;\n\t\t\t\tconst resolvedTarget = path.resolve(path.dirname(full), target);\n\t\t\t\tif (!isWithin(root, resolvedTarget)) continue;\n\t\t\t\ttry {\n\t\t\t\t\tif (!(await fs.promises.stat(resolvedTarget)).isDirectory()) continue;\n\t\t\t\t} catch {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tawait fs.promises.unlink(full);\n\t\t\t\tawait createBundleLink(full, target, \"dir\", {\n\t\t\t\t\tresolvedTarget,\n\t\t\t\t\tcopyWithinRoot: root\n\t\t\t\t});\n\t\t\t} else if (entry.isDirectory()) await visit(full);\n\t\t}\n\t};\n\tawait visit(root);\n}\n/** Copy without `fs.cp`'s symlink privilege requirement: real files first, then links. */\nasync function copyTreeVerbatimWalk(source, destination) {\n\tconst sourceRoot = path.resolve(source);\n\tconst destinationRoot = path.resolve(destination);\n\tconst links = [];\n\tconst copyNonLinks = async (sourceDir, destinationDir) => {\n\t\tawait fs.promises.mkdir(destinationDir, { recursive: true });\n\t\tfor (const entry of await fs.promises.readdir(sourceDir, { withFileTypes: true })) {\n\t\t\tconst sourcePath = path.join(sourceDir, entry.name);\n\t\t\tconst destinationPath = path.join(destinationDir, entry.name);\n\t\t\tif (entry.isSymbolicLink()) links.push({\n\t\t\t\tsourcePath,\n\t\t\t\tdestinationPath\n\t\t\t});\n\t\t\telse if (entry.isDirectory()) await copyNonLinks(sourcePath, destinationPath);\n\t\t\telse if (entry.isFile()) await fs.promises.copyFile(sourcePath, destinationPath);\n\t\t}\n\t};\n\tawait copyNonLinks(source, destination);\n\tfor (const { sourcePath, destinationPath } of links) {\n\t\tconst rawTarget = await fs.promises.readlink(sourcePath);\n\t\tconst resolvedSource = path.resolve(path.dirname(sourcePath), rawTarget);\n\t\tlet type = \"file\";\n\t\ttry {\n\t\t\ttype = (await fs.promises.stat(resolvedSource)).isDirectory() ? \"dir\" : \"file\";\n\t\t} catch {}\n\t\tconst mapped = mapLinkIntoDestination(sourceRoot, destinationRoot, sourcePath, destinationPath, rawTarget);\n\t\tawait fs.promises.mkdir(path.dirname(destinationPath), { recursive: true });\n\t\tawait createBundleLink(destinationPath, mapped.target, type, {\n\t\t\tresolvedTarget: mapped.resolvedTarget,\n\t\t\tcopySource: resolvedSource,\n\t\t\tcopyWithinRoot: destinationRoot\n\t\t});\n\t}\n}\nasync function copyTreeVerbatim(source, destination) {\n\tawait copyTreeVerbatimWalk(source, destination);\n}\n/** Lexical containment: `candidate` is `root` itself or below it. Both paths\n* must already be absolute or share a resolution base; no filesystem access. */\nfunction isWithin(root, candidate) {\n\tconst relative = path.relative(root, candidate);\n\treturn relative === \"\" || !relative.startsWith(`..${path.sep}`) && relative !== \"..\" && !path.isAbsolute(relative);\n}\n/** Walks the assembled bundle and rejects a dangling symlink or one whose\n* resolved target escapes the bundle root. Symlinked directories are not\n* descended: their targets are validated, and their contents belong to the\n* target's own location. */\nasync function assertBundleSymlinksStayInside(bundleDir) {\n\tconst realRoot = await fs.promises.realpath(bundleDir);\n\tconst walk = async (directory) => {\n\t\tfor (const entry of await fs.promises.readdir(directory, { withFileTypes: true })) {\n\t\t\tconst full = path.join(directory, entry.name);\n\t\t\tif (entry.isSymbolicLink()) {\n\t\t\t\tlet realTarget;\n\t\t\t\ttry {\n\t\t\t\t\trealTarget = await fs.promises.realpath(full);\n\t\t\t\t} catch {\n\t\t\t\t\tthrow new Error(`the assembled bundle contains a dangling symlink: ${full}`);\n\t\t\t\t}\n\t\t\t\tif (!isWithin(realRoot, realTarget)) throw new Error(`the assembled bundle contains a symlink whose target escapes the bundle: ${full} -> ${await fs.promises.readlink(full)}`);\n\t\t\t} else if (entry.isDirectory()) await walk(full);\n\t\t}\n\t};\n\tawait walk(bundleDir);\n}\n//#endregion\nexport { assertBundleSymlinksStayInside, bundleLinkStrategy, copyTreeVerbatim, createBundleLink, isWithin, repairWindowsDirectorySymlinks };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAeA,SAAS,mBAAmB,UAAU,MAAM;CAC3C,IAAI,aAAa,SAAS,OAAO;CACjC,OAAO,SAAS,QAAQ,aAAa;AACtC;AACA,SAAS,eAAe,OAAO;CAC9B,OAAO,iBAAiB,SAAS,QAAQ,IAAI,OAAO,MAAM,MAAM;AACjE;;;;;;;;;;;;;;;;AAgBA,eAAe,iBAAiB,UAAU,QAAQ,MAAM,SAAS;CAChE,MAAM,WAAW,mBAAmB,QAAQ,YAAY,QAAQ,UAAU,IAAI;CAC9E,IAAI,aAAa,YAAY;EAC5B,MAAM,GAAG,SAAS,QAAQ,QAAQ,gBAAgB,UAAU,UAAU;EACtE;CACD;CACA,IAAI,aAAa,WAAW;EAC3B,MAAM,GAAG,SAAS,QAAQ,QAAQ,UAAU,IAAI;EAChD;CACD;CACA,IAAI;EACH,MAAM,GAAG,SAAS,QAAQ,QAAQ,UAAU,MAAM;CACnD,SAAS,OAAO;EACf,IAAI,CAAC,eAAe,KAAK,GAAG,MAAM;EAClC,IAAI,CAAC,SAAS,KAAK,QAAQ,QAAQ,cAAc,GAAG,KAAK,QAAQ,QAAQ,cAAc,CAAC,GAAG,MAAM,IAAI,MAAM,wEAAwE,SAAS,MAAM,QAAQ,kBAAkB,EAAE,OAAO,MAAM,CAAC;EAC5O,MAAM,WAAW,QAAQ,cAAc,QAAQ;EAC/C,IAAI;GACH,MAAM,GAAG,SAAS,KAAK,QAAQ;EAChC,QAAQ;GACP,MAAM,IAAI,MAAM,qDAAqD,UAAU;EAChF;EACA,MAAM,GAAG,SAAS,SAAS,UAAU,QAAQ;CAC9C;AACD;;;;;;;AAOA,SAAS,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AAK,SAAS,MAAM,SAAS;CAC9C,OAAO,aAAa,MAAM,CAAC,SAAS,WAAW,KAAK,KAAK,KAAK,KAAK,aAAa,QAAQ,CAAC,KAAK,WAAW,QAAQ;AAClH;;;;;AAKA,eAAe,+BAA+B,WAAW;CACxD,MAAM,WAAW,MAAM,GAAG,SAAS,SAAS,SAAS;CACrD,MAAM,OAAO,OAAO,cAAc;EACjC,KAAK,MAAM,SAAS,MAAM,GAAG,SAAS,QAAQ,WAAW,EAAE,eAAe,KAAK,CAAC,GAAG;GAClF,MAAM,OAAO,KAAK,KAAK,WAAW,MAAM,IAAI;GAC5C,IAAI,MAAM,eAAe,GAAG;IAC3B,IAAI;IACJ,IAAI;KACH,aAAa,MAAM,GAAG,SAAS,SAAS,IAAI;IAC7C,QAAQ;KACP,MAAM,IAAI,MAAM,qDAAqD,MAAM;IAC5E;IACA,IAAI,CAAC,SAAS,UAAU,UAAU,GAAG,MAAM,IAAI,MAAM,4EAA4E,KAAK,MAAM,MAAM,GAAG,SAAS,SAAS,IAAI,GAAG;GAC/K,OAAO,IAAI,MAAM,YAAY,GAAG,MAAM,KAAK,IAAI;EAChD;CACD;CACA,MAAM,KAAK,SAAS;AACrB"}
|
|
1
|
+
{"version":3,"file":"dist-BtzrklYG.mjs","names":[],"sources":["../../../0-framework/2-authoring/bundle-paths/dist/index.mjs"],"sourcesContent":["import fs from \"node:fs\";\nimport path from \"node:path\";\n//#region src/bundle-paths.ts\n/**\n* The path-containment predicate and bundle-link validation shared by every\n* assembly and packaging seam (node/nextjs adapters, the compute artifact\n* writer, the local extractor). This predicate is the enforcement point of\n* ADR-0047's boundary — a symlink may be preserved only while its target\n* stays inside the assembled bundle — so it exists exactly once.\n*\n* Windows cannot create `dir`/`file` symlinks without Developer Mode or an\n* elevated token (`EPERM`). Directory junctions need no such privilege, so\n* assemble uses them on win32; file links fall back to a copy of the target.\n*/\n/** How a platform materializes a bundle link without needing symlink privilege. */\nfunction bundleLinkStrategy(platform, type) {\n\tif (platform !== \"win32\") return \"symlink\";\n\treturn type === \"dir\" ? \"junction\" : \"symlink-with-copy-fallback\";\n}\nfunction isNotPermitted(error) {\n\treturn error instanceof Error && Reflect.get(error, \"code\") === \"EPERM\";\n}\n/**\n* Creates a link at `linkPath` whose stored target is `target`.\n* `resolvedTarget` is the absolute path of that target in the destination\n* tree — junctions require it. The win32 file-copy fallback reads\n* `copySource` (source-tree path) when set, otherwise `resolvedTarget`, and\n* only when the target exists and stays inside `copyWithinRoot` (ADR-0047:\n* never dereference an escaping link into the artifact).\n*\n* Junction/symlink strategies may temporarily store an escaping\n* `resolvedTarget` (pnpm absolute junctions into the tracing-root store);\n* later staging rewrites them, and `assertBundleSymlinksStayInside` is the\n* final gate. Only the file-copy fallback must refuse escapes — copying would\n* materialize deploy-machine content as a regular file with no link left to\n* validate.\n*/\nasync function createBundleLink(linkPath, target, type, options) {\n\tconst strategy = bundleLinkStrategy(options.platform ?? process.platform, type);\n\tif (strategy === \"junction\") {\n\t\tawait fs.promises.symlink(options.resolvedTarget, linkPath, \"junction\");\n\t\treturn;\n\t}\n\tif (strategy === \"symlink\") {\n\t\tawait fs.promises.symlink(target, linkPath, type);\n\t\treturn;\n\t}\n\ttry {\n\t\tawait fs.promises.symlink(target, linkPath, \"file\");\n\t} catch (error) {\n\t\tif (!isNotPermitted(error)) throw error;\n\t\tif (!isWithin(path.resolve(options.copyWithinRoot), path.resolve(options.resolvedTarget))) throw new Error(`refusing to materialize a file link whose target escapes the bundle: ${linkPath} -> ${options.resolvedTarget}`, { cause: error });\n\t\tconst copyFrom = options.copySource ?? options.resolvedTarget;\n\t\ttry {\n\t\t\tawait fs.promises.stat(copyFrom);\n\t\t} catch {\n\t\t\tthrow new Error(`the assembled bundle contains a dangling symlink: ${linkPath}`);\n\t\t}\n\t\tawait fs.promises.copyFile(copyFrom, linkPath);\n\t}\n}\n/**\n* Map a link's stored target from the source tree into the destination tree.\n* pnpm on Windows often materializes directory links as junctions with absolute\n* targets; copying those verbatim leaves them pointing at the source, which\n* `assertBundleSymlinksStayInside` correctly rejects as an escape.\n*/\nfunction mapLinkIntoDestination(sourceRoot, destinationRoot, sourcePath, destinationPath, rawTarget) {\n\tconst resolvedSource = path.resolve(path.dirname(sourcePath), rawTarget);\n\tif (isWithin(sourceRoot, resolvedSource)) {\n\t\tconst resolvedTarget = path.resolve(destinationRoot, path.relative(sourceRoot, resolvedSource));\n\t\treturn {\n\t\t\ttarget: path.relative(path.dirname(destinationPath), resolvedTarget),\n\t\t\tresolvedTarget\n\t\t};\n\t}\n\treturn {\n\t\ttarget: rawTarget,\n\t\tresolvedTarget: path.resolve(path.dirname(destinationPath), rawTarget)\n\t};\n}\n/** Restores directory-link metadata lost by `fs.cp` on Windows. */\nasync function repairWindowsDirectorySymlinks(root) {\n\tif (process.platform !== \"win32\") return;\n\tconst visit = async (directory) => {\n\t\tfor (const entry of await fs.promises.readdir(directory, { withFileTypes: true })) {\n\t\t\tconst full = path.join(directory, entry.name);\n\t\t\tif (entry.isSymbolicLink()) {\n\t\t\t\tconst target = await fs.promises.readlink(full);\n\t\t\t\tif (path.isAbsolute(target)) continue;\n\t\t\t\tconst resolvedTarget = path.resolve(path.dirname(full), target);\n\t\t\t\tif (!isWithin(root, resolvedTarget)) continue;\n\t\t\t\ttry {\n\t\t\t\t\tif (!(await fs.promises.stat(resolvedTarget)).isDirectory()) continue;\n\t\t\t\t} catch {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tawait fs.promises.unlink(full);\n\t\t\t\tawait createBundleLink(full, target, \"dir\", {\n\t\t\t\t\tresolvedTarget,\n\t\t\t\t\tcopyWithinRoot: root\n\t\t\t\t});\n\t\t\t} else if (entry.isDirectory()) await visit(full);\n\t\t}\n\t};\n\tawait visit(root);\n}\n/** Copy without `fs.cp`'s symlink privilege requirement: real files first, then links. */\nasync function copyTreeVerbatimWalk(source, destination) {\n\tconst sourceRoot = path.resolve(source);\n\tconst destinationRoot = path.resolve(destination);\n\tconst links = [];\n\tconst copyNonLinks = async (sourceDir, destinationDir) => {\n\t\tawait fs.promises.mkdir(destinationDir, { recursive: true });\n\t\tfor (const entry of await fs.promises.readdir(sourceDir, { withFileTypes: true })) {\n\t\t\tconst sourcePath = path.join(sourceDir, entry.name);\n\t\t\tconst destinationPath = path.join(destinationDir, entry.name);\n\t\t\tif (entry.isSymbolicLink()) links.push({\n\t\t\t\tsourcePath,\n\t\t\t\tdestinationPath\n\t\t\t});\n\t\t\telse if (entry.isDirectory()) await copyNonLinks(sourcePath, destinationPath);\n\t\t\telse if (entry.isFile()) await fs.promises.copyFile(sourcePath, destinationPath);\n\t\t}\n\t};\n\tawait copyNonLinks(source, destination);\n\tfor (const { sourcePath, destinationPath } of links) {\n\t\tconst rawTarget = await fs.promises.readlink(sourcePath);\n\t\tconst resolvedSource = path.resolve(path.dirname(sourcePath), rawTarget);\n\t\tlet type = \"file\";\n\t\ttry {\n\t\t\ttype = (await fs.promises.stat(resolvedSource)).isDirectory() ? \"dir\" : \"file\";\n\t\t} catch {}\n\t\tconst mapped = mapLinkIntoDestination(sourceRoot, destinationRoot, sourcePath, destinationPath, rawTarget);\n\t\tawait fs.promises.mkdir(path.dirname(destinationPath), { recursive: true });\n\t\tawait createBundleLink(destinationPath, mapped.target, type, {\n\t\t\tresolvedTarget: mapped.resolvedTarget,\n\t\t\tcopySource: resolvedSource,\n\t\t\tcopyWithinRoot: destinationRoot\n\t\t});\n\t}\n}\nasync function copyTreeVerbatim(source, destination) {\n\tawait copyTreeVerbatimWalk(source, destination);\n}\n/** Lexical containment: `candidate` is `root` itself or below it. Both paths\n* must already be absolute or share a resolution base; no filesystem access. */\nfunction isWithin(root, candidate) {\n\tconst relative = path.relative(root, candidate);\n\treturn relative === \"\" || !relative.startsWith(`..${path.sep}`) && relative !== \"..\" && !path.isAbsolute(relative);\n}\n/** Walks the assembled bundle and rejects a dangling symlink or one whose\n* resolved target escapes the bundle root. Symlinked directories are not\n* descended: their targets are validated, and their contents belong to the\n* target's own location. */\nasync function assertBundleSymlinksStayInside(bundleDir) {\n\tconst realRoot = await fs.promises.realpath(bundleDir);\n\tconst walk = async (directory) => {\n\t\tfor (const entry of await fs.promises.readdir(directory, { withFileTypes: true })) {\n\t\t\tconst full = path.join(directory, entry.name);\n\t\t\tif (entry.isSymbolicLink()) {\n\t\t\t\tlet realTarget;\n\t\t\t\ttry {\n\t\t\t\t\trealTarget = await fs.promises.realpath(full);\n\t\t\t\t} catch {\n\t\t\t\t\tthrow new Error(`the assembled bundle contains a dangling symlink: ${full}`);\n\t\t\t\t}\n\t\t\t\tif (!isWithin(realRoot, realTarget)) throw new Error(`the assembled bundle contains a symlink whose target escapes the bundle: ${full} -> ${await fs.promises.readlink(full)}`);\n\t\t\t} else if (entry.isDirectory()) await walk(full);\n\t\t}\n\t};\n\tawait walk(bundleDir);\n}\n//#endregion\nexport { assertBundleSymlinksStayInside, bundleLinkStrategy, copyTreeVerbatim, createBundleLink, isWithin, repairWindowsDirectorySymlinks };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAeA,SAAS,mBAAmB,UAAU,MAAM;CAC3C,IAAI,aAAa,SAAS,OAAO;CACjC,OAAO,SAAS,QAAQ,aAAa;AACtC;AACA,SAAS,eAAe,OAAO;CAC9B,OAAO,iBAAiB,SAAS,QAAQ,IAAI,OAAO,MAAM,MAAM;AACjE;;;;;;;;;;;;;;;;AAgBA,eAAe,iBAAiB,UAAU,QAAQ,MAAM,SAAS;CAChE,MAAM,WAAW,mBAAmB,QAAQ,YAAY,QAAQ,UAAU,IAAI;CAC9E,IAAI,aAAa,YAAY;EAC5B,MAAM,GAAG,SAAS,QAAQ,QAAQ,gBAAgB,UAAU,UAAU;EACtE;CACD;CACA,IAAI,aAAa,WAAW;EAC3B,MAAM,GAAG,SAAS,QAAQ,QAAQ,UAAU,IAAI;EAChD;CACD;CACA,IAAI;EACH,MAAM,GAAG,SAAS,QAAQ,QAAQ,UAAU,MAAM;CACnD,SAAS,OA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
|
1
|
+
import "./graph-Bqr7PSGl-BM-M-TlO.mjs";
|
|
2
2
|
//#region ../../0-framework/1-core/core/dist/index.mjs
|
|
3
3
|
/**
|
|
4
4
|
* A data-only descriptor of a param's schema for introspection — the
|
|
@@ -133,4 +133,4 @@ function hydrateSync(root, config) {
|
|
|
133
133
|
//#endregion
|
|
134
134
|
export { number as a, secretSourceManifest as c, inputManifest as i, string as l, hydrate as n, param as o, hydrateSync as r, paramManifest as s, configOf as t };
|
|
135
135
|
|
|
136
|
-
//# sourceMappingURL=dist-
|
|
136
|
+
//# sourceMappingURL=dist-C7SnNTD3.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dist-
|
|
1
|
+
{"version":3,"file":"dist-C7SnNTD3.mjs","names":[],"sources":["../../../0-framework/1-core/core/dist/index.mjs"],"sourcesContent":["import { S as RESOURCE_OUT_PORT, _ as service, a as ResourceNodeBase, b as resolve, c as isNode, d as isSecretSource, f as module, g as secretSource, h as resource, l as isParamSource, m as provisionNeed, n as assertAppName, o as dependency, p as paramSource, s as freezeNode, t as Load, u as isProvisionNeed, v as slotsOf, x as LoadError, y as isValue } from \"./graph-Bqr7PSGl.mjs\";\nimport { isPlainPointer, isSecretPointer } from \"@internal/foundation/pointer\";\nimport { SecretBox, isSecretString } from \"@internal/foundation/secret\";\n//#region src/config.ts\n/**\n* A data-only descriptor of a param's schema for introspection — the\n* validator's vendor tag, never the schema's own `validate`. `configOf`\n* reports it where the old model reported `type: 'string' | 'number'`, so the\n* config surface stays enumerable without leaking a function. Nothing consumes\n* more than the vendor tag yet; a richer projection (e.g. a JSON-Schema export\n* when the vendor offers one) is an additive change if a consumer needs it.\n*/\nfunction projectSchema(schema) {\n\treturn { vendor: schema[\"~standard\"].vendor };\n}\n/**\n* Enumerates every config param the service declares: each input's connection\n* params, then the service's own params. Pure — reads `root.inputs`/`params`\n* directly, executes nothing but the (also pure) schema projection. Deliberately\n* does not go through `Load`: a service's connection-end inputs are legitimately\n* unwired from its own point of view (wiring is an enclosing module's concern),\n* and this introspects one service's declared shape regardless of how — or\n* whether — it composes into a larger graph.\n*/\nfunction configOf(root) {\n\tconst entries = [];\n\tfor (const [input, value] of Object.entries(root.inputs)) {\n\t\tif (typeof value !== \"object\" || value === null) continue;\n\t\tfor (const [name, param] of Object.entries(value.connection.params)) entries.push({\n\t\t\towner: { input },\n\t\t\tname,\n\t\t\tschema: projectSchema(param.schema),\n\t\t\toptional: param.optional === true,\n\t\t\tdefault: param.default\n\t\t});\n\t}\n\tfor (const [name, param] of Object.entries(root.params)) entries.push({\n\t\towner: \"service\",\n\t\tname,\n\t\tschema: projectSchema(param.schema),\n\t\toptional: param.optional === true,\n\t\tdefault: param.default\n\t});\n\treturn entries;\n}\n/**\n* The app's input manifest: every service input binding a `provision()` call\n* supplied (ADR-0042). Pure graph introspection, TARGET-AGNOSTIC — a deploy\n* target's recursive descent classifies the binding's leaves (its preflight\n* verifies each `envSecret` leaf's platform var exists before deploy; the\n* values are provisioned out-of-band).\n*/\nfunction inputManifest(graph) {\n\treturn graph.inputBindings;\n}\n/**\n* The app's param-binding manifest: every param a `provision()` call bound —\n* literal or an opaque, target-defined `ParamSource` — at the address that\n* declared it. The param sibling of `provisionManifest`, for a deploy\n* target's own preflight to consume. Pure graph introspection,\n* TARGET-AGNOSTIC; a param this manifest omits simply falls back to its own\n* `default` at `buildConfig`.\n*/\nfunction paramManifest(graph) {\n\treturn graph.params;\n}\n/**\n* Every secret source a binding in the graph names, wherever it sits: what a\n* deploy target's preflight checks.\n* Pure graph introspection, TARGET-AGNOSTIC.\n*/\nfunction secretSourceManifest(graph) {\n\treturn graph.secretSources;\n}\nfunction scalarSchema(name, check) {\n\treturn { \"~standard\": {\n\t\tversion: 1,\n\t\tvendor: \"@prisma/composer\",\n\t\tvalidate: (value) => check(value) ? { value } : { issues: [{ message: `expected ${name}, got ${typeof value}` }] }\n\t} };\n}\nconst stringSchema = scalarSchema(\"string\", (v) => typeof v === \"string\");\nconst numberSchema = scalarSchema(\"number\", (v) => typeof v === \"number\" && Number.isFinite(v));\nfunction withFacets(schema, opts) {\n\treturn {\n\t\tschema,\n\t\t...opts.optional !== void 0 ? { optional: opts.optional } : {},\n\t\t...opts.default !== void 0 ? { default: opts.default } : {},\n\t\t...opts.provision !== void 0 ? { provision: opts.provision } : {}\n\t};\n}\n/** A string-valued param. */\nfunction string(opts = {}) {\n\treturn withFacets(stringSchema, opts);\n}\n/** A number-valued param. */\nfunction number(opts = {}) {\n\treturn withFacets(numberSchema, opts);\n}\n/** A param over any caller-supplied Standard Schema — a structured `jobs`, say. */\nfunction param(schema, opts = {}) {\n\treturn withFacets(schema, opts);\n}\n//#endregion\n//#region src/hydrate.ts\n/**\n* Given a service and a concrete typed Config, hydrate every input\n* (connection.hydrate with its typed value slice). A resource dep and a\n* connection dep hydrate through identical machinery — the loaded client is\n* indistinguishable. The service's own params ride alongside in\n* `config.service`; the node's `load()` merges the two.\n*/\nasync function hydrate(root, config) {\n\tconst deps = {};\n\tfor (const [name, inputNode] of Object.entries(root.inputs)) {\n\t\tconst values = config.inputs[name] ?? {};\n\t\tdeps[name] = await inputNode.connection.hydrate(values);\n\t}\n\treturn deps;\n}\n/**\n* Synchronous hydrate — what the node's `load()` uses so\n* `const { db } = service.load()` reads without `await`. Requires every\n* connection.hydrate to return synchronously; a Promise return is a loud error\n* naming the input (an async client factory must use the async `hydrate` path).\n*/\nfunction hydrateSync(root, config) {\n\tconst deps = {};\n\tfor (const [name, inputNode] of Object.entries(root.inputs)) {\n\t\tconst values = config.inputs[name] ?? {};\n\t\tconst client = inputNode.connection.hydrate(values);\n\t\tif (client instanceof Promise) throw new Error(`Connection hydrate for input \"${name}\" returned a Promise; load() requires a synchronous client factory.`);\n\t\tdeps[name] = client;\n\t}\n\treturn deps;\n}\n//#endregion\nexport { Load, LoadError, RESOURCE_OUT_PORT, ResourceNodeBase, SecretBox, assertAppName, configOf, dependency, freezeNode, hydrate, hydrateSync, inputManifest, isNode, isParamSource, isPlainPointer, isProvisionNeed, isSecretPointer, isSecretSource, isSecretString, isValue, module, number, param, paramManifest, paramSource, provisionNeed, resolve, resource, secretSource, secretSourceManifest, service, slotsOf, string };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;;AAYA,SAAS,cAAc,QAAQ;CAC9B,OAAO,EAAE,QAAQ,OAAO,YAAY,CAAC,OAAO;AAC7C;;;;;;;;;;AAUA,SAAS,SAAS,MAAM;CACvB,MAAM,UAAU,CAAC;CACjB,KAAK,MAAM,CAAC,OAAO,UAAU,OAAO,QAAQ,KAAK,MAAM,GAAG;EACzD,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM;EACjD,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,MAAM,WAAW,MAAM,GAAG,QAAQ,KAAK;GACjF,OAAO,EAAE,MAAM;GACf;GACA,QAAQ,cAAc,MAAM,MAAM;GAClC,UAAU,MAAM,aAAa;GAC7B,SAAS,MAAM;EAChB,CAAC;CACF;CACA,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,KAAK,MAAM,GAAG,QAAQ,KAAK;EACrE,OAAO;EACP;EACA,QAAQ,cAAc,MAAM,MAAM;EAClC,UAAU,MAAM,aAAa;EAC7B,SAAS,MAAM;CAChB,CAAC;CACD,OAAO;AACR;;;;;;;;AAQA,SAAS,cAAc,OAAO;CAC7B,OAAO,MAAM;AACd;;;;;;;;;AASA,SAAS,cAAc,OAAO;CAC7B,OAAO,MAAM;AACd;;;;;;AAMA,SAAS,qBAAqB,OAAO;CACpC,OAAO,MAAM;AACd;AACA,SAAS,aAAa,MAAM,OAAO;CAClC,OAAO,EAAE,aAAa;EACrB,SAAS;EACT,QAAQ;EACR,WAAW,UAAU,MAAM,KAAK,IAAI,EAAE,MAAM,IAAI,EAAE,QAAQ,CAAC,EAAE,SAAS,YAAY,KAAK,QAAQ,OAAO,QAAQ,CAAC,EAAE;CAClH,EAAE;AACH;AACA,MAAM,eAAe,a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|
+
import { b as secretsKeys, m as nodeAddresses } from "./graph-Bqr7PSGl-BM-M-TlO.mjs";
|
|
1
2
|
import { t as CliStructuredError } from "./errors-0e8IVwzi.mjs";
|
|
2
3
|
import { t as containerEnv } from "./container-transport-HcvNOGZL-twPi2TIv.mjs";
|
|
3
4
|
import { n as preflightEnvVarName, t as preflightEnv } from "./config-BFuriECI.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { a as
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
5
|
+
import { i as prepareSecondProcess, o as removeLeftoverAppConfigurationFiles, t as deployAppConfigurationFile } from "./app-configuration-file-CeJvBAti-D3uDlheX.mjs";
|
|
6
|
+
import { c as toStructured, d as okVoid, l as notOk, s as requireContainerForEnvironment, u as ok } from "./dev-current-D0Kn6Mf4-DDWYu-3j.mjs";
|
|
7
|
+
import { a as writeRunReport, i as toRunReport, r as resolveRunReportPath, t as RUN_REPORT_FILE_ENV } from "./run-report-CmBz2-xc-Cc8rV1CX.mjs";
|
|
8
|
+
import "./deploy-CmiYExQA.mjs";
|
|
9
|
+
import { c as redactThrown, o as redactError, s as redactSummary, t as SecretRedaction } from "./redaction-HnbkSFrK-BXRZ3B33.mjs";
|
|
10
|
+
import { a as readEngineFailureCause, i as readDeploymentSummary, r as engineFailureFilePath, t as DEPLOYMENT_RESULT_FILE_ENV } from "./deployment-summary-BiBkPWlB-CyC2pudN.mjs";
|
|
11
|
+
import { a as noComposerExportMessage, i as validateEnvironmentName, r as runPipeline } from "./validate-environment-D_dECxgO-B-gqpVEf.mjs";
|
|
12
|
+
import { n as reproduceCommand, r as spawnAlchemy, t as alchemyInvocation } from "./run-alchemy-OS_ix5g0-DCvUYZ7T.mjs";
|
|
10
13
|
import * as path$1 from "node:path";
|
|
14
|
+
import * as fs$1 from "node:fs";
|
|
11
15
|
import { randomUUID } from "node:crypto";
|
|
12
|
-
//#region ../../0-framework/3-tooling/cli/dist/execute-deploy-destroy-
|
|
16
|
+
//#region ../../0-framework/3-tooling/cli/dist/execute-deploy-destroy-Dh1CQ9X6.mjs
|
|
13
17
|
/** Pipeline step 6: writes a regenerated-every-run, independently runnable stack module at `.prisma-composer/alchemy.run.ts`. */
|
|
14
18
|
const GENERATED_DIR = ".prisma-composer";
|
|
15
19
|
const GENERATED_FILE = "alchemy.run.ts";
|
|
@@ -28,7 +32,8 @@ function renderOptions(input) {
|
|
|
28
32
|
const lines = [];
|
|
29
33
|
lines.push(` name: ${quote(input.name)},`);
|
|
30
34
|
lines.push(` environment: ${quote(input.environment)},`);
|
|
31
|
-
lines.push("
|
|
35
|
+
lines.push(" appConfigurationRead: file.appConfigurationRead,");
|
|
36
|
+
lines.push(" firstProcessNodeAddresses: file.nodeAddresses,");
|
|
32
37
|
lines.push(" bundles: {");
|
|
33
38
|
for (const [id, bundle] of Object.entries(input.assembled.bundles)) lines.push(` ${quote(id)}: ${renderBundle(bundle)},`);
|
|
34
39
|
lines.push(" },");
|
|
@@ -42,17 +47,17 @@ function renderStackFile(input) {
|
|
|
42
47
|
const configImport = relativeImportSpecifier(generatedDir, input.configFile);
|
|
43
48
|
return `// Generated by Composer's deploy and destroy operations — overwritten on every
|
|
44
49
|
// run; do not edit by hand. Runnable from ${quote(input.cwd)} WITH the env the
|
|
45
|
-
// CLI passes its child (the PRISMA_COMPOSER_CONTAINER_*/_PREFLIGHT_* vars —
|
|
50
|
+
// CLI passes its child (the PRISMA_COMPOSER_CONTAINER_*/_PREFLIGHT_* vars and the app configuration file —
|
|
46
51
|
// without them lower() refuses because no container is resolved), by the
|
|
47
52
|
// command Composer starts, which a failed run prints:
|
|
48
53
|
//
|
|
49
54
|
// <node> <bin of the alchemy @prisma/composer depends on> deploy ${GENERATED_DIR}/${GENERATED_FILE} --yes --stage <stage>
|
|
50
55
|
//
|
|
51
56
|
// bisects a CLI bug from an Alchemy bug (deploy-cli.md § Implementation decisions).
|
|
52
|
-
// It
|
|
57
|
+
// 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.
|
|
53
58
|
import { lower } from '@prisma/composer/deploy';
|
|
54
59
|
import * as report from '@prisma/composer/report';
|
|
55
|
-
import {
|
|
60
|
+
import { readAppConfigurationFile } from '@prisma/composer/internal/app-configuration-file';
|
|
56
61
|
import prismaConfig from ${quote(configImport)};
|
|
57
62
|
import app from ${quote(appImport)};
|
|
58
63
|
|
|
@@ -61,11 +66,11 @@ if (config === undefined) {
|
|
|
61
66
|
throw new Error(${quote(noComposerExportMessage(input.configFile))});
|
|
62
67
|
}
|
|
63
68
|
|
|
64
|
-
const configPool = await readConfigPool(config, { environment: ${quote(input.environment)}, configFile: ${quote(input.configFile)} });
|
|
65
|
-
|
|
66
69
|
// The app's own @prisma/composer may predate the failure recorder.
|
|
67
70
|
report.captureEngineFailure?.();
|
|
68
71
|
|
|
72
|
+
const file = readAppConfigurationFile(process.env);
|
|
73
|
+
|
|
69
74
|
export default lower(app, config, {
|
|
70
75
|
${renderOptions(input)}
|
|
71
76
|
});
|
|
@@ -152,7 +157,8 @@ async function executeDeploy(input, deps, cwd) {
|
|
|
152
157
|
deps,
|
|
153
158
|
reportId: input.reportId,
|
|
154
159
|
reportPath: resolveRunReportPath(input.reportPath, process.env[RUN_REPORT_FILE_ENV], cwd),
|
|
155
|
-
steps: deploySteps(input.onEvent)
|
|
160
|
+
steps: deploySteps(input.onEvent),
|
|
161
|
+
redaction: new SecretRedaction(process.env)
|
|
156
162
|
});
|
|
157
163
|
if (!outcome.ok) return outcome;
|
|
158
164
|
return ok({ summary: outcome.value });
|
|
@@ -168,7 +174,8 @@ async function executeDestroy(input, deps, cwd) {
|
|
|
168
174
|
deps,
|
|
169
175
|
reportId: void 0,
|
|
170
176
|
reportPath: void 0,
|
|
171
|
-
steps: deploySteps(void 0)
|
|
177
|
+
steps: deploySteps(void 0),
|
|
178
|
+
redaction: new SecretRedaction(process.env)
|
|
172
179
|
});
|
|
173
180
|
if (!outcome.ok) return outcome;
|
|
174
181
|
return okVoid();
|
|
@@ -179,7 +186,7 @@ async function executeDestroy(input, deps, cwd) {
|
|
|
179
186
|
* has not started, and refusing to run it because an observer failed would
|
|
180
187
|
* invert the relationship.
|
|
181
188
|
*/
|
|
182
|
-
async function beginReporters(extensions, context) {
|
|
189
|
+
async function beginReporters(extensions, context, redaction) {
|
|
183
190
|
return (await Promise.all(extensions.map(async (extension) => {
|
|
184
191
|
if (extension.reporter === void 0) return void 0;
|
|
185
192
|
try {
|
|
@@ -190,30 +197,30 @@ async function beginReporters(extensions, context) {
|
|
|
190
197
|
};
|
|
191
198
|
} catch (error) {
|
|
192
199
|
const detail = error instanceof Error ? error.message : String(error);
|
|
193
|
-
console.warn(`\nCould not start deploy reporting for ${extension.id}: ${detail}`);
|
|
200
|
+
console.warn(`\nCould not start deploy reporting for ${extension.id}: ${redaction.redact(detail)}`);
|
|
194
201
|
return;
|
|
195
202
|
}
|
|
196
203
|
}))).filter((entry) => entry !== void 0);
|
|
197
204
|
}
|
|
198
205
|
/** Hands each session its own extension's resolved container, so it can attach the run to what that container names. */
|
|
199
|
-
async function attachReporters(reporters, containers) {
|
|
206
|
+
async function attachReporters(reporters, containers, redaction) {
|
|
200
207
|
await Promise.all(reporters.map(async ({ extensionId, reporter }) => {
|
|
201
208
|
try {
|
|
202
209
|
await reporter.attach({ container: containers.get(extensionId) });
|
|
203
210
|
} catch (error) {
|
|
204
211
|
const detail = error instanceof Error ? error.message : String(error);
|
|
205
|
-
console.warn(`\nCould not attach this deploy to its project for ${extensionId}: ${detail}`);
|
|
212
|
+
console.warn(`\nCould not attach this deploy to its project for ${extensionId}: ${redaction.redact(detail)}`);
|
|
206
213
|
}
|
|
207
214
|
}));
|
|
208
215
|
}
|
|
209
216
|
/** Every session's contribution to the alchemy child's environment, so reporting that happens inside the apply can find the run. */
|
|
210
|
-
function reporterChildEnv(reporters) {
|
|
217
|
+
function reporterChildEnv(reporters, redaction) {
|
|
211
218
|
const env = {};
|
|
212
219
|
for (const { extensionId, reporter } of reporters) try {
|
|
213
220
|
Object.assign(env, reporter.childEnv());
|
|
214
221
|
} catch (error) {
|
|
215
222
|
const detail = error instanceof Error ? error.message : String(error);
|
|
216
|
-
console.warn(`\nCould not pass deploy reporting into the apply for ${extensionId}: ${detail}`);
|
|
223
|
+
console.warn(`\nCould not pass deploy reporting into the apply for ${extensionId}: ${redaction.redact(detail)}`);
|
|
217
224
|
}
|
|
218
225
|
return env;
|
|
219
226
|
}
|
|
@@ -231,7 +238,7 @@ function wasInterrupted(failure) {
|
|
|
231
238
|
* failure — so this swallows anyway, and reports each session independently
|
|
232
239
|
* so one bad implementation cannot silence another.
|
|
233
240
|
*/
|
|
234
|
-
async function finishReporters(reporters, outcome) {
|
|
241
|
+
async function finishReporters(reporters, outcome, redaction) {
|
|
235
242
|
const entities = outcome.summary?.nodes.flatMap((node) => node.entities) ?? [];
|
|
236
243
|
await Promise.all(reporters.map(async ({ reporter }) => {
|
|
237
244
|
try {
|
|
@@ -244,7 +251,7 @@ async function finishReporters(reporters, outcome) {
|
|
|
244
251
|
});
|
|
245
252
|
} catch (error) {
|
|
246
253
|
const detail = error instanceof Error ? error.message : String(error);
|
|
247
|
-
console.warn(`\nCould not report this deploy's outcome: ${detail}`);
|
|
254
|
+
console.warn(`\nCould not report this deploy's outcome: ${redaction.redact(detail)}`);
|
|
248
255
|
}
|
|
249
256
|
}));
|
|
250
257
|
}
|
|
@@ -263,15 +270,17 @@ async function runStackPipeline(action, opts) {
|
|
|
263
270
|
} catch (error) {
|
|
264
271
|
opts.steps.failOpen();
|
|
265
272
|
opts.steps.start({ name: "record" });
|
|
273
|
+
const thrown = redactThrown(error, opts.redaction);
|
|
266
274
|
await finishReporters(reporters, {
|
|
267
275
|
ok: false,
|
|
268
276
|
cancelled: false,
|
|
269
277
|
code: "DEPLOY.UNEXPECTED",
|
|
270
|
-
message:
|
|
271
|
-
});
|
|
278
|
+
message: thrown.message
|
|
279
|
+
}, opts.redaction);
|
|
272
280
|
opts.steps.finish({ name: "record" });
|
|
273
|
-
throw
|
|
281
|
+
throw thrown;
|
|
274
282
|
}
|
|
283
|
+
if (!outcome.ok) outcome = notOk(redactError(outcome.failure, opts.redaction));
|
|
275
284
|
if (!outcome.ok) opts.steps.failOpen();
|
|
276
285
|
opts.steps.start({ name: "record" });
|
|
277
286
|
await finishReporters(reporters, outcome.ok ? {
|
|
@@ -283,7 +292,7 @@ async function runStackPipeline(action, opts) {
|
|
|
283
292
|
cancelled: wasInterrupted(outcome.failure),
|
|
284
293
|
code: outcome.failure.code,
|
|
285
294
|
message: outcome.failure.message
|
|
286
|
-
});
|
|
295
|
+
}, opts.redaction);
|
|
287
296
|
if (opts.reportPath === void 0 || writeRunReport(opts.reportPath, toRunReport({
|
|
288
297
|
summary: outcome.ok ? outcome.value : void 0,
|
|
289
298
|
environment: opts.environment,
|
|
@@ -301,6 +310,7 @@ async function runStackPipeline(action, opts) {
|
|
|
301
310
|
async function runStackPipelineInner(action, opts, reporters) {
|
|
302
311
|
const { entry, config: composerConfig, name, environment, cwd, onEvent, deps, steps } = opts;
|
|
303
312
|
steps.start({ name: "prepare" });
|
|
313
|
+
removeLeftoverAppConfigurationFiles(cwd);
|
|
304
314
|
try {
|
|
305
315
|
validateEnvironmentName(environment);
|
|
306
316
|
} catch (error) {
|
|
@@ -320,6 +330,7 @@ async function runStackPipelineInner(action, opts, reporters) {
|
|
|
320
330
|
pipeline = await runPipeline(entry, name, environment, cwd, composerConfig, {
|
|
321
331
|
runAssembler: deps.runAssembler,
|
|
322
332
|
readSecrets: action === "deploy",
|
|
333
|
+
redaction: opts.redaction,
|
|
323
334
|
onEvent: (event) => {
|
|
324
335
|
switch (event.kind) {
|
|
325
336
|
case "loaded":
|
|
@@ -356,7 +367,7 @@ async function runStackPipelineInner(action, opts, reporters) {
|
|
|
356
367
|
cwd,
|
|
357
368
|
reportId: opts.reportId,
|
|
358
369
|
credentials: deps.credentials
|
|
359
|
-
}));
|
|
370
|
+
}, opts.redaction));
|
|
360
371
|
containers = /* @__PURE__ */ new Map();
|
|
361
372
|
for (const extension of config.extensions) {
|
|
362
373
|
if (extension.container === void 0) continue;
|
|
@@ -381,7 +392,7 @@ async function runStackPipelineInner(action, opts, reporters) {
|
|
|
381
392
|
throw toStructured("DEPLOY.CONTAINER_FAILED", error);
|
|
382
393
|
}
|
|
383
394
|
}
|
|
384
|
-
await attachReporters(reporters, containers);
|
|
395
|
+
await attachReporters(reporters, containers, opts.redaction);
|
|
385
396
|
alchemyStage = containers.get(config.state.extension)?.alchemyStage ?? environment;
|
|
386
397
|
steps.finish({ name: "connect" });
|
|
387
398
|
if (action === "deploy") {
|
|
@@ -397,7 +408,8 @@ async function runStackPipelineInner(action, opts, reporters) {
|
|
|
397
408
|
graph,
|
|
398
409
|
container: containers.get(extension.id),
|
|
399
410
|
environment,
|
|
400
|
-
|
|
411
|
+
configuration: pipeline.configuration,
|
|
412
|
+
secrets: pipeline.secrets,
|
|
401
413
|
credentials: deps.credentials,
|
|
402
414
|
report
|
|
403
415
|
});
|
|
@@ -420,8 +432,16 @@ async function runStackPipelineInner(action, opts, reporters) {
|
|
|
420
432
|
}
|
|
421
433
|
let stackPath;
|
|
422
434
|
const resultFilePath = path$1.join(cwd, ".prisma-composer", `deployment-result-${String(process.pid)}-${randomUUID()}.json`);
|
|
435
|
+
let handover;
|
|
423
436
|
try {
|
|
424
437
|
try {
|
|
438
|
+
handover = prepareSecondProcess({
|
|
439
|
+
file: deployAppConfigurationFile(cwd, randomUUID()),
|
|
440
|
+
appConfigurationRead: pipeline.graph.appConfigurationRead,
|
|
441
|
+
nodeAddresses: nodeAddresses(pipeline.graph),
|
|
442
|
+
secretsKeys: secretsKeys(pipeline.graph),
|
|
443
|
+
knownSecrets: opts.redaction.knownSecrets
|
|
444
|
+
});
|
|
425
445
|
stackPath = writeStackFile({
|
|
426
446
|
entryPath: pipeline.entryModule.path,
|
|
427
447
|
cwd,
|
|
@@ -430,6 +450,7 @@ async function runStackPipelineInner(action, opts, reporters) {
|
|
|
430
450
|
environment,
|
|
431
451
|
assembled: pipeline.assembled
|
|
432
452
|
});
|
|
453
|
+
handover.writeFile();
|
|
433
454
|
} catch (error) {
|
|
434
455
|
return notOk(toStructured("DEPLOY.STACK_WRITE_FAILED", error));
|
|
435
456
|
}
|
|
@@ -441,9 +462,11 @@ async function runStackPipelineInner(action, opts, reporters) {
|
|
|
441
462
|
containerEnv: containerEnv(containers),
|
|
442
463
|
preflightEnv: preflightTransportEnv,
|
|
443
464
|
env: {
|
|
444
|
-
...reporterChildEnv(reporters),
|
|
465
|
+
...reporterChildEnv(reporters, opts.redaction),
|
|
466
|
+
...handover.env,
|
|
445
467
|
[DEPLOYMENT_RESULT_FILE_ENV]: resultFilePath
|
|
446
|
-
}
|
|
468
|
+
},
|
|
469
|
+
redactedValues: opts.redaction.allValues()
|
|
447
470
|
});
|
|
448
471
|
steps.start({ name: "apply" });
|
|
449
472
|
let outcome;
|
|
@@ -474,7 +497,7 @@ async function runStackPipelineInner(action, opts, reporters) {
|
|
|
474
497
|
} }));
|
|
475
498
|
const status = outcome.exitCode ?? 1;
|
|
476
499
|
if (status !== 0) {
|
|
477
|
-
const engineCause = readEngineFailureCause(resultFilePath,
|
|
500
|
+
const engineCause = readEngineFailureCause(resultFilePath, (text) => opts.redaction.redact(text));
|
|
478
501
|
const withCause = (sentence) => engineCause === void 0 ? sentence : `${sentence}\n${engineCause}`;
|
|
479
502
|
return notOk(new CliStructuredError("DEPLOY.ENGINE_FAILED", withCause(`alchemy ${action} exited with status ${status}.`), { meta: {
|
|
480
503
|
exitCode: status,
|
|
@@ -516,16 +539,17 @@ async function runStackPipelineInner(action, opts, reporters) {
|
|
|
516
539
|
if (CliStructuredError.is(error)) return notOk(error);
|
|
517
540
|
throw error;
|
|
518
541
|
}
|
|
519
|
-
if (action === "deploy") return ok(readDeploymentSummary(resultFilePath));
|
|
542
|
+
if (action === "deploy") return ok(redactSummary(readDeploymentSummary(resultFilePath), opts.redaction));
|
|
520
543
|
return ok(void 0);
|
|
521
544
|
} finally {
|
|
522
545
|
try {
|
|
523
546
|
fs$1.rmSync(resultFilePath, { force: true });
|
|
524
547
|
fs$1.rmSync(engineFailureFilePath(resultFilePath), { force: true });
|
|
525
548
|
} catch {}
|
|
549
|
+
handover?.removeFile();
|
|
526
550
|
}
|
|
527
551
|
}
|
|
528
552
|
//#endregion
|
|
529
553
|
export { executeDeploy, executeDestroy };
|
|
530
554
|
|
|
531
|
-
//# sourceMappingURL=execute-deploy-destroy-
|
|
555
|
+
//# sourceMappingURL=execute-deploy-destroy-Dh1CQ9X6-DY4c9egd.mjs.map
|