@prisma/composer 0.39.0-dev.7 → 0.39.0-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{app-config-DmCj4luV-BC36-MeB.d.mts → app-config-DriAu5RU-C8hYpR38.d.mts} +17 -15
- package/dist/app-config-DriAu5RU-C8hYpR38.d.mts.map +1 -0
- package/dist/{app-configuration-file-Bbfq5PR3-D4DUNKUM.mjs → app-configuration-file-D0rB5g65-CdMrjkCc.mjs} +10 -40
- package/dist/app-configuration-file-D0rB5g65-CdMrjkCc.mjs.map +1 -0
- package/dist/app-converge-CVlo9uw2-B-fdr0nr.mjs +88 -0
- package/dist/app-converge-CVlo9uw2-B-fdr0nr.mjs.map +1 -0
- package/dist/config-Bpi8QVLB.d.mts +1 -0
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +1 -1
- package/dist/control.d.mts +8 -23
- package/dist/control.d.mts.map +1 -1
- package/dist/control.mjs +4 -4
- package/dist/control.mjs.map +1 -1
- package/dist/{converge-in-process-BBBeood8-BCIPOG8X.d.mts → converge-in-process-CTomEXaD-BnDylZP8.d.mts} +5 -5
- package/dist/{converge-in-process-BBBeood8-BCIPOG8X.d.mts.map → converge-in-process-CTomEXaD-BnDylZP8.d.mts.map} +1 -1
- package/dist/converge-in-process-x89zb2MF-Dvj-J8xo.mjs +258 -0
- package/dist/converge-in-process-x89zb2MF-Dvj-J8xo.mjs.map +1 -0
- package/dist/{deploy-B2kxaH5E.mjs → deploy-CSU0kr4j.mjs} +65 -5
- package/dist/{deploy-B2kxaH5E.mjs.map → deploy-CSU0kr4j.mjs.map} +1 -1
- package/dist/deploy-DHgEJDpg.d.mts +32 -0
- package/dist/deploy-DHgEJDpg.d.mts.map +1 -0
- package/dist/deploy.d.mts +4 -4
- package/dist/deploy.mjs +3 -3
- package/dist/{deployment-summary-6LgQDUuu-Dp8kwMs_.d.mts → deployment-summary-6LgQDUuu-Cu_6UNhc.d.mts} +4 -4
- package/dist/{deployment-summary-6LgQDUuu-Dp8kwMs_.d.mts.map → deployment-summary-6LgQDUuu-Cu_6UNhc.d.mts.map} +1 -1
- package/dist/{deployment-summary-YP7eMPJI-CQsj7BHh.mjs → deployment-summary-CVJZn2v0-Dz-gX1rp.mjs} +3 -3
- package/dist/{deployment-summary-YP7eMPJI-CQsj7BHh.mjs.map → deployment-summary-CVJZn2v0-Dz-gX1rp.mjs.map} +1 -1
- package/dist/dev-converge-messages-DML4rTz7-C_EAB5M_.mjs +165 -0
- package/dist/dev-converge-messages-DML4rTz7-C_EAB5M_.mjs.map +1 -0
- package/dist/dev-converge-worker.d.mts +1 -0
- package/dist/dev-converge-worker.mjs +142 -0
- package/dist/dev-converge-worker.mjs.map +1 -0
- package/dist/{dev-current-gQnmjB4V-BaNhcGpK.mjs → dev-current-ByY2RrbK-DbU6y3PF.mjs} +11 -7
- package/dist/dev-current-ByY2RrbK-DbU6y3PF.mjs.map +1 -0
- package/dist/{dev-environment-name-6eEr5PW8-6sPgQZG3.mjs → dev-environment-name-6eEr5PW8-7ntm9Xhs.mjs} +3 -3
- package/dist/{dev-environment-name-6eEr5PW8-6sPgQZG3.mjs.map → dev-environment-name-6eEr5PW8-7ntm9Xhs.mjs.map} +1 -1
- package/dist/{dist-CyrEbDx6.mjs → dist-Cf_mZHaH.mjs} +2 -2
- package/dist/{dist-CyrEbDx6.mjs.map → dist-Cf_mZHaH.mjs.map} +1 -1
- package/dist/{emulator-retry-CV8rl69G-BgUzkxc-.mjs → emulator-retry-CV8rl69G-scQ105wk.mjs} +2 -2
- package/dist/{emulator-retry-CV8rl69G-BgUzkxc-.mjs.map → emulator-retry-CV8rl69G-scQ105wk.mjs.map} +1 -1
- package/dist/{errors-0e8IVwzi.mjs → errors-DI3TBXE-.mjs} +7 -2
- package/dist/{errors-0e8IVwzi.mjs.map → errors-DI3TBXE-.mjs.map} +1 -1
- package/dist/{execute-deploy-destroy-DKbsBkqK-BWXh0zXQ.mjs → execute-deploy-destroy-D1jnaYqU-RAlTx-NX.mjs} +246 -193
- package/dist/execute-deploy-destroy-D1jnaYqU-RAlTx-NX.mjs.map +1 -0
- package/dist/{execute-dev-DVCWURmI-Cp3i7Hrp.mjs → execute-dev-BP0Shlpd-BNFvs2LF.mjs} +434 -261
- package/dist/execute-dev-BP0Shlpd-BNFvs2LF.mjs.map +1 -0
- package/dist/{execute-dev-current-Dt_9srY2-COEgQ9h4.mjs → execute-dev-current-B792f_1m-BYJ-Rl8m.mjs} +7 -7
- package/dist/{execute-dev-current-Dt_9srY2-COEgQ9h4.mjs.map → execute-dev-current-B792f_1m-BYJ-Rl8m.mjs.map} +1 -1
- package/dist/{execute-log-B34AeU97-CkJiGdIc.mjs → execute-log-BiRHQq6Q-BkQk0Kvo.mjs} +8 -8
- package/dist/{execute-log-B34AeU97-CkJiGdIc.mjs.map → execute-log-BiRHQq6Q-BkQk0Kvo.mjs.map} +1 -1
- package/dist/{graph-1ILOBl8O-DBaUZL2D.d.mts → graph-CUYXjK8S-BzL-mhjq.d.mts} +3 -3
- package/dist/graph-CUYXjK8S-BzL-mhjq.d.mts.map +1 -0
- package/dist/{graph-C6Fqe2gn-qJQBxs_C.mjs → graph-D2WMLL43-CeiC5wdy.mjs} +18 -9
- package/dist/graph-D2WMLL43-CeiC5wdy.mjs.map +1 -0
- package/dist/{graph-types-CaH3flhT-DgrCdRA3.d.mts → graph-types-D4PrtP-l-B0uuchTl.d.mts} +13 -11
- package/dist/{graph-types-CaH3flhT-DgrCdRA3.d.mts.map → graph-types-D4PrtP-l-B0uuchTl.d.mts.map} +1 -1
- package/dist/http.d.mts +2 -2
- package/dist/http.mjs +2 -2
- package/dist/{index-Cnbf_d0q.d.mts → index-D8chHe55.d.mts} +3 -3
- package/dist/{index-Cnbf_d0q.d.mts.map → index-D8chHe55.d.mts.map} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/internal-app-configuration-file.d.mts +5 -9
- package/dist/internal-app-configuration-file.d.mts.map +1 -1
- package/dist/internal-app-configuration-file.mjs +2 -2
- package/dist/internal-converge-contract.d.mts +6 -4
- package/dist/internal-converge-contract.d.mts.map +1 -1
- package/dist/internal-converge-contract.mjs +7 -5
- package/dist/internal-converge-contract.mjs.map +1 -1
- package/dist/internal-converge.d.mts +5 -4
- package/dist/internal-converge.mjs +4 -228
- package/dist/load-entry-CEoVBdMj-CHOz7jKf.mjs +527 -0
- package/dist/load-entry-CEoVBdMj-CHOz7jKf.mjs.map +1 -0
- package/dist/local-target-7KRsLMDO.d.mts +31 -0
- package/dist/local-target-7KRsLMDO.d.mts.map +1 -0
- package/dist/{local-target-COdS1iNs.mjs → local-target-DhU1vaxd.mjs} +6 -6
- package/dist/{local-target-COdS1iNs.mjs.map → local-target-DhU1vaxd.mjs.map} +1 -1
- package/dist/local-target.d.mts +3 -31
- package/dist/local-target.mjs +1 -1
- package/dist/{nextjs-DLyeRR7M-CSKy5tFv.d.mts → nextjs-DLyeRR7M-CzUbvPaJ.d.mts} +3 -3
- package/dist/{nextjs-DLyeRR7M-CSKy5tFv.d.mts.map → nextjs-DLyeRR7M-CzUbvPaJ.d.mts.map} +1 -1
- package/dist/nextjs-control.d.mts +4 -4
- package/dist/nextjs.d.mts +1 -1
- package/dist/node-control.d.mts +3 -3
- package/dist/node.d.mts +2 -2
- package/dist/{preflight-transport-C7_3abXW-Bza_hn9G.mjs → preflight-transport-2d6iIchu-B-v7Di6I.mjs} +5 -4
- package/dist/preflight-transport-2d6iIchu-B-v7Di6I.mjs.map +1 -0
- package/dist/{redaction-CjMYXtGp-CEQ5z1PK.mjs → redaction-DY6eDC12-W-FzW7_r.mjs} +16 -4
- package/dist/{redaction-CjMYXtGp-CEQ5z1PK.mjs.map → redaction-DY6eDC12-W-FzW7_r.mjs.map} +1 -1
- package/dist/{redaction-CIaE4m9U-DyJoGPRw.d.mts → redaction-Dn7BRdaP-BcLSPhLV.d.mts} +58 -17
- package/dist/redaction-Dn7BRdaP-BcLSPhLV.d.mts.map +1 -0
- package/dist/report.d.mts +3 -3
- package/dist/report.mjs +2 -2
- package/dist/report.mjs.map +1 -1
- package/dist/service-rpc.d.mts +2 -2
- package/dist/service-rpc.mjs +2 -2
- package/dist/steps-BZXNqW6U-C_ME2VLd.mjs +112 -0
- package/dist/steps-BZXNqW6U-C_ME2VLd.mjs.map +1 -0
- package/dist/testing.d.mts +1 -1
- package/dist/validate-environment-DCZiNSlR-C7lv0cH1.mjs +344 -0
- package/dist/validate-environment-DCZiNSlR-C7lv0cH1.mjs.map +1 -0
- package/package.json +11 -11
- package/skills/prisma-composer-core-concepts/SKILL.md +8 -8
- package/src/exports/dev-converge-worker.ts +2 -0
- package/dist/app-config-DmCj4luV-BC36-MeB.d.mts.map +0 -1
- package/dist/app-configuration-file-Bbfq5PR3-D4DUNKUM.mjs.map +0 -1
- package/dist/config-vv8LBErH.d.mts +0 -1
- package/dist/deploy-w-BcRS8b.d.mts +0 -12
- package/dist/deploy-w-BcRS8b.d.mts.map +0 -1
- package/dist/dev-current-gQnmjB4V-BaNhcGpK.mjs.map +0 -1
- package/dist/execute-deploy-destroy-DKbsBkqK-BWXh0zXQ.mjs.map +0 -1
- package/dist/execute-dev-DVCWURmI-Cp3i7Hrp.mjs.map +0 -1
- package/dist/graph-1ILOBl8O-DBaUZL2D.d.mts.map +0 -1
- package/dist/graph-C6Fqe2gn-qJQBxs_C.mjs.map +0 -1
- package/dist/internal-converge.mjs.map +0 -1
- package/dist/local-target.d.mts.map +0 -1
- package/dist/preflight-transport-C7_3abXW-Bza_hn9G.mjs.map +0 -1
- package/dist/redaction-CIaE4m9U-DyJoGPRw.d.mts.map +0 -1
- package/dist/run-alchemy-BlYyc4Oh-mIzYC4lq.mjs +0 -236
- package/dist/run-alchemy-BlYyc4Oh-mIzYC4lq.mjs.map +0 -1
- package/dist/validate-environment-XwVDifWN-D14WhSH0.mjs +0 -739
- package/dist/validate-environment-XwVDifWN-D14WhSH0.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./config-
|
|
3
|
-
import "./deploy-
|
|
1
|
+
import { G as PreflightFindings, g as DeployedEntity } from "./app-config-DriAu5RU-C8hYpR38.mjs";
|
|
2
|
+
import "./config-Bpi8QVLB.mjs";
|
|
3
|
+
import "./deploy-DHgEJDpg.mjs";
|
|
4
4
|
//#region ../../0-framework/3-tooling/cli/dist/deployment-summary-6LgQDUuu.d.mts
|
|
5
5
|
//#region src/deployment-summary.d.ts
|
|
6
6
|
/** The serializable projection of DeploymentResult — what CAN cross the process
|
|
@@ -30,4 +30,4 @@ interface DeploymentSummary {
|
|
|
30
30
|
declare function captureEngineFailure(): void;
|
|
31
31
|
//#endregion
|
|
32
32
|
export { DeploymentSummary as n, captureEngineFailure as r, DeployedNodeSummary as t };
|
|
33
|
-
//# sourceMappingURL=deployment-summary-6LgQDUuu-
|
|
33
|
+
//# sourceMappingURL=deployment-summary-6LgQDUuu-Cu_6UNhc.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployment-summary-6LgQDUuu-
|
|
1
|
+
{"version":3,"file":"deployment-summary-6LgQDUuu-Cu_6UNhc.d.mts","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/deployment-summary-6LgQDUuu.d.mts"],"mappings":";;;;;;;UAKU;WACC;WACA,mBAAmB;;UAEpB;WACC;WACA,gBAAgB;;WAEhB,UAAU;;;;;;;;;;;;;;iBAcJ"}
|
package/dist/{deployment-summary-YP7eMPJI-CQsj7BHh.mjs → deployment-summary-CVJZn2v0-Dz-gX1rp.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as redactCredentialLooking } from "./redaction-
|
|
1
|
+
import { i as redactCredentialLooking } from "./redaction-DY6eDC12-W-FzW7_r.mjs";
|
|
2
2
|
import * as fs$1 from "node:fs";
|
|
3
3
|
import { format, stripVTControlCharacters } from "node:util";
|
|
4
|
-
//#region ../../0-framework/3-tooling/cli/dist/deployment-summary-
|
|
4
|
+
//#region ../../0-framework/3-tooling/cli/dist/deployment-summary-CVJZn2v0.mjs
|
|
5
5
|
/**
|
|
6
6
|
* The deploy result as data, and what a stack file run as a child hands back
|
|
7
7
|
* to the CLI: the summary file the report hook writes, and the failure cause
|
|
@@ -150,4 +150,4 @@ function capFailureCause(cause) {
|
|
|
150
150
|
//#endregion
|
|
151
151
|
export { readEngineFailureCause as a, writeDeploymentSummaryFile as c, engineFailureFilePath as i, capFailureCause as n, toDeploymentSummary as o, captureEngineFailure as r, withComposerAdvice as s, DEPLOYMENT_RESULT_FILE_ENV as t };
|
|
152
152
|
|
|
153
|
-
//# sourceMappingURL=deployment-summary-
|
|
153
|
+
//# sourceMappingURL=deployment-summary-CVJZn2v0-Dz-gX1rp.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployment-summary-YP7eMPJI-CQsj7BHh.mjs","names":["fs"],"sources":["../../../0-framework/3-tooling/cli/dist/deployment-summary-YP7eMPJI.mjs"],"sourcesContent":["import { a as redactCredentialLooking } from \"./redaction-CjMYXtGp.mjs\";\nimport * as fs from \"node:fs\";\nimport { format, stripVTControlCharacters } from \"node:util\";\n//#region src/deployment-summary.ts\n/**\n* The deploy result as data, and what a stack file run as a child hands back\n* to the CLI: the summary file the report hook writes, and the failure cause\n* the child records when it exits non-zero. `DeploymentResult` holds live\n* graph nodes (ADR-0033), so the summary keeps only what can be serialized.\n* Both files are best-effort: a write failure never fails the child.\n*/\n/** Env var the deploy operation sets on the alchemy child: when present,\n* the report hook also writes the JSON DeploymentSummary there. */\nconst DEPLOYMENT_RESULT_FILE_ENV = \"PRISMA_COMPOSER_DEPLOYMENT_RESULT_FILE\";\n/** Pure projection: keeps app, each node's address/entities and the findings, drops the in-process `node`. */\nfunction toDeploymentSummary(result) {\n\treturn {\n\t\tapp: result.app,\n\t\tnodes: result.nodes.map((node) => ({\n\t\t\taddress: node.address,\n\t\t\tentities: node.entities\n\t\t})),\n\t\tfindings: result.findings\n\t};\n}\n/**\n* Writer half, called by the report hook inside the alchemy child: when the\n* env var names a file, write the summary there. Best-effort — a write\n* failure must not fail a deploy that already converged, so it is swallowed.\n*/\nfunction writeDeploymentSummaryFile(result) {\n\tconst file = process.env[DEPLOYMENT_RESULT_FILE_ENV];\n\tif (file === void 0 || file.length === 0) return;\n\ttry {\n\t\tfs.writeFileSync(file, JSON.stringify(toDeploymentSummary(result)));\n\t} catch {}\n}\n/** The child's failure cause rides beside the result file, so the one env var names both and the parent's cleanup removes both. */\nfunction engineFailureFilePath(resultFilePath) {\n\treturn `${resultFilePath}.failure.txt`;\n}\n/** Fits the platform's 5000-character build `errorMessage` with room for the exit-status prefix. */\nconst ENGINE_FAILURE_CAUSE_LIMIT = 1e3;\n/** Alchemy's advice to rerun its own CLI with `--adopt` or to import a resource with adoption, which a Composer user has no way to do. */\nconst ALCHEMY_ADOPT_ADVICE = [\n\t[/Re-run with `--adopt` \\(or wrap the effect in `adopt\\(true\\)`\\) to take it over\\./g, \"Something other than this app holds it. Remove that resource, then deploy again.\"],\n\t[/Re-run with `--adopt` \\(or wrap the effect in `adopt\\(true\\)`\\) to replace it anyway\\./g, \"Remove that resource, then deploy again.\"],\n\t[/\\(re-deploy with --adopt to take ownership, then destroy\\)/g, \"(remove it by hand)\"],\n\t[/Import it with explicit adoption (?:instead of silently taking it over|or choose a different [\\w ]+ name)\\./g, \"Something other than this app holds it. Remove that resource, then deploy again.\"],\n\t[/; rerun with adoption enabled if it is the intended [\\w ]+\\./g, \". Remove that resource, then deploy again.\"]\n];\n/** Replaces Alchemy CLI advice in engine output with steps that work from Composer. */\nfunction withComposerAdvice(text) {\n\treturn ALCHEMY_ADOPT_ADVICE.reduce((current, [advice, replacement]) => current.replace(advice, replacement), text);\n}\nconst STDOUT_CONSOLE_METHODS = /* @__PURE__ */ new Set([\n\t\"log\",\n\t\"info\",\n\t\"debug\"\n]);\n/**\n* Child half of the failure protocol, called by the generated stack file.\n* Keeps a bounded tail of everything this process logs through `console`,\n* passing every call through except Alchemy's CLI advice (see\n* {@link withComposerAdvice}), and on a non-zero exit writes the\n* redacted cause beside the result file. `console`, not the output streams:\n* alchemy's logger and its error reporting both go through it, and under Bun\n* `console` does not reach `process.stdout.write`.\n*\n* When stdout is not a terminal it carries the parent's data lines, so\n* everything this process prints goes to stderr instead.\n*/\nfunction captureEngineFailure() {\n\tconst resultFile = process.env[DEPLOYMENT_RESULT_FILE_ENV];\n\tif (resultFile === void 0 || resultFile.length === 0) return;\n\tconst stdoutToStderr = process.stdout.isTTY !== true;\n\tif (stdoutToStderr) process.stdout.write = process.stderr.write.bind(process.stderr);\n\tlet tail = \"\";\n\tfor (const method of [\n\t\t\"log\",\n\t\t\"info\",\n\t\t\"warn\",\n\t\t\"error\",\n\t\t\"debug\"\n\t]) {\n\t\tconst original = stdoutToStderr && STDOUT_CONSOLE_METHODS.has(method) ? console.error : console[method];\n\t\tconsole[method] = (...args) => {\n\t\t\tconst text = format(...args);\n\t\t\tconst shown = withComposerAdvice(text);\n\t\t\ttail = `${tail}${redactCredentialLooking(shown, process.env)}\\n`.slice(-65536);\n\t\t\tif (shown === text) original.apply(console, args);\n\t\t\telse original.call(console, shown);\n\t\t};\n\t}\n\tprocess.once(\"exit\", (code) => {\n\t\tif (code === 0) return;\n\t\tconst cause = engineFailureCause(tail, process.env);\n\t\tif (cause === void 0) return;\n\t\ttry {\n\t\t\tfs.writeFileSync(engineFailureFilePath(resultFile), cause);\n\t\t} catch {}\n\t});\n}\n/** Parent half: the cause the child recorded, passed through `redact`, or undefined when it recorded none. The child redacts only what its own environment names as a credential; the parent also knows the known secrets. */\nfunction readEngineFailureCause(resultFilePath, redact) {\n\tlet cause;\n\ttry {\n\t\tcause = fs.readFileSync(engineFailureFilePath(resultFilePath), \"utf8\");\n\t} catch {\n\t\treturn;\n\t}\n\treturn cause.length > 0 ? redact(cause) : void 0;\n}\n/** Effect's pretty log prefix, e.g. `[10:29:16.556] INFO (#53): `. */\nconst LOG_PREFIX = /^\\[[\\d:.]+\\] ([A-Z]+) \\(#\\d+\\): ?/;\n/** Alchemy's per-resource failure row, e.g. `[web] fail — UnknownError: …`. */\nconst RESOURCE_FAIL_ROW = /^\\[[^\\]]+\\] fail\\b/;\nconst STACK_FRAME = /^\\s*at /;\n/**\n* The failure the output describes: every line from the first failure line\n* (a failed resource row, an ERROR log, or an `error:` line) to the end, minus\n* blank lines, stack frames and info logs; the last five lines when there is no\n* failure line. Redacted, then capped.\n*/\nfunction engineFailureCause(output, env) {\n\tconst lines = [];\n\tfor (const raw of stripVTControlCharacters(output).split(/\\r\\n|\\r|\\n/)) {\n\t\tconst clean = raw.replace(/(?![\\t])\\p{Cc}/gu, \"\").trimEnd();\n\t\tconst prefix = LOG_PREFIX.exec(clean);\n\t\tconst text = (prefix === null ? clean : clean.slice(prefix[0].length)).trim();\n\t\tif (text.length === 0 || text === \"{\" || text === \"}\" || STACK_FRAME.test(text)) continue;\n\t\tconst level = prefix?.[1];\n\t\tconst failure = level === \"ERROR\" || level === \"FATAL\" || RESOURCE_FAIL_ROW.test(text) || /^\\W*error:/i.test(text);\n\t\tlines.push({\n\t\t\ttext,\n\t\t\tfailure,\n\t\t\tinfo: !failure && level !== void 0\n\t\t});\n\t}\n\tconst start = lines.findIndex((line) => line.failure);\n\tconst kept = start === -1 ? lines.slice(-5) : lines.slice(start).filter((line) => !line.info);\n\tif (kept.length === 0) return void 0;\n\tconst cause = redactCredentialLooking(kept.map((line) => line.text).join(\"\\n\"), env);\n\treturn cause.length <= ENGINE_FAILURE_CAUSE_LIMIT ? cause : `${cause.slice(0, ENGINE_FAILURE_CAUSE_LIMIT - 1)}…`;\n}\n/** A failure cause capped to fit the platform build's error message. */\nfunction capFailureCause(cause) {\n\treturn cause.length <= ENGINE_FAILURE_CAUSE_LIMIT ? cause : `${cause.slice(0, ENGINE_FAILURE_CAUSE_LIMIT - 1)}…`;\n}\n//#endregion\nexport { readEngineFailureCause as a, writeDeploymentSummaryFile as c, engineFailureFilePath as i, capFailureCause as n, toDeploymentSummary as o, captureEngineFailure as r, withComposerAdvice as s, DEPLOYMENT_RESULT_FILE_ENV as t };\n\n//# sourceMappingURL=deployment-summary-YP7eMPJI.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,6BAA6B;;AAEnC,SAAS,oBAAoB,QAAQ;CACpC,OAAO;EACN,KAAK,OAAO;EACZ,OAAO,OAAO,MAAM,KAAK,UAAU;GAClC,SAAS,KAAK;GACd,UAAU,KAAK;EAChB,EAAE;EACF,UAAU,OAAO;CAClB;AACD;;;;;;AAMA,SAAS,2BAA2B,QAAQ;CAC3C,MAAM,OAAO,QAAQ,IAAI;CACzB,IAAI,SAAS,KAAK,KAAK,KAAK,WAAW,GAAG;CAC1C,IAAI;EACH,KAAG,cAAc,MAAM,KAAK,UAAU,oBAAoB,MAAM,CAAC,CAAC;CACnE,QAAQ,CAAC;AACV;;AAEA,SAAS,sBAAsB,gBAAgB;CAC9C,OAAO,GAAG,eAAe;AAC1B;;AAEA,MAAM,6BAA6B;;AAEnC,MAAM,uBAAuB;CAC5B,CAAC,sFAAsF,kFAAkF;CACzK,CAAC,2FAA2F,0CAA0C;CACtI,CAAC,+DAA+D,qBAAqB;CACrF,CAAC,gHAAgH,kFAAkF;CACnM,CAAC,iEAAiE,4CAA4C;AAC/G;;AAEA,SAAS,mBAAmB,MAAM;CACjC,OAAO,qBAAqB,QAAQ,SAAS,CAAC,QAAQ,iBAAiB,QAAQ,QAAQ,QAAQ,WAAW,GAAG,IAAI;AAClH;AACA,MAAM,yCAAyC,IAAI,IAAI;CACtD;CACA;CACA;AACD,CAAC;;;;;;;;;;;;;AAaD,SAAS,uBAAuB;CAC/B,MAAM,aAAa,QAAQ,IAAI;CAC/B,IAAI,eAAe,KAAK,KAAK,WAAW,WAAW,GAAG;CACtD,MAAM,iBAAiB,QAAQ,OAAO,UAAU;CAChD,IAAI,gBAAgB,QAAQ,OAAO,QAAQ,QAAQ,OAAO,MAAM,KAAK,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CAAG,KAAK;EAC5E,IAAI,KAAK,WAAW,KAAK,SAAS,OAAO,SAAS,OAAO,YAAY,KAAK,IAAI,GAAG;EACjF,MAAM,QAAQ,SAAS;EACvB,MAAM,UAAU,UAAU,WAAW,UAAU,WAAW,kBAAkB,KAAK,IAAI,KAAK,cAAc,KAAK,IAAI;EACjH,MAAM,KAAK;GACV;GACA;GACA,MAAM,CAAC,WAAW,UAAU,KAAK;EAClC,CAAC;CACF;CACA,MAAM,QAAQ,MAAM,WAAW,SAAS,KAAK,OAAO;CACpD,MAAM,OAAO,UAAU,KAAK,MAAM,MAAM,EAAE,IAAI,MAAM,MAAM,KAAK,CAAC,CAAC,QAAQ,SAAS,CAAC,KAAK,IAAI;CAC5F,IAAI,KAAK,WAAW,GAAG,OAAO,KAAK;CACnC,MAAM,QAAQ,wBAAwB,KAAK,KAAK,SAAS,KAAK,IAAI,CAAC,CAAC,KAAK,IAAI,GAAG,GAAG;CACnF,OAAO,MAAM,UAAU,6BAA6B,QAAQ,GAAG,MAAM,MAAM,GAAG,6BAA6B,CAAC,EAAE;AAC/G;;AAEA,SAAS,gBAAgB,OAAO;CAC/B,OAAO,MAAM,UAAU,6BAA6B,QAAQ,GAAG,MAAM,MAAM,GAAG,6BAA6B,CAAC,EAAE;AAC/G"}
|
|
1
|
+
{"version":3,"file":"deployment-summary-CVJZn2v0-Dz-gX1rp.mjs","names":["fs"],"sources":["../../../0-framework/3-tooling/cli/dist/deployment-summary-CVJZn2v0.mjs"],"sourcesContent":["import { i as redactCredentialLooking } from \"./redaction-DY6eDC12.mjs\";\nimport * as fs from \"node:fs\";\nimport { format, stripVTControlCharacters } from \"node:util\";\n//#region src/deployment-summary.ts\n/**\n* The deploy result as data, and what a stack file run as a child hands back\n* to the CLI: the summary file the report hook writes, and the failure cause\n* the child records when it exits non-zero. `DeploymentResult` holds live\n* graph nodes (ADR-0033), so the summary keeps only what can be serialized.\n* Both files are best-effort: a write failure never fails the child.\n*/\n/** Env var the deploy operation sets on the alchemy child: when present,\n* the report hook also writes the JSON DeploymentSummary there. */\nconst DEPLOYMENT_RESULT_FILE_ENV = \"PRISMA_COMPOSER_DEPLOYMENT_RESULT_FILE\";\n/** Pure projection: keeps app, each node's address/entities and the findings, drops the in-process `node`. */\nfunction toDeploymentSummary(result) {\n\treturn {\n\t\tapp: result.app,\n\t\tnodes: result.nodes.map((node) => ({\n\t\t\taddress: node.address,\n\t\t\tentities: node.entities\n\t\t})),\n\t\tfindings: result.findings\n\t};\n}\n/**\n* Writer half, called by the report hook inside the alchemy child: when the\n* env var names a file, write the summary there. Best-effort — a write\n* failure must not fail a deploy that already converged, so it is swallowed.\n*/\nfunction writeDeploymentSummaryFile(result) {\n\tconst file = process.env[DEPLOYMENT_RESULT_FILE_ENV];\n\tif (file === void 0 || file.length === 0) return;\n\ttry {\n\t\tfs.writeFileSync(file, JSON.stringify(toDeploymentSummary(result)));\n\t} catch {}\n}\n/** The child's failure cause rides beside the result file, so the one env var names both and the parent's cleanup removes both. */\nfunction engineFailureFilePath(resultFilePath) {\n\treturn `${resultFilePath}.failure.txt`;\n}\n/** Fits the platform's 5000-character build `errorMessage` with room for the exit-status prefix. */\nconst ENGINE_FAILURE_CAUSE_LIMIT = 1e3;\n/** Alchemy's advice to rerun its own CLI with `--adopt` or to import a resource with adoption, which a Composer user has no way to do. */\nconst ALCHEMY_ADOPT_ADVICE = [\n\t[/Re-run with `--adopt` \\(or wrap the effect in `adopt\\(true\\)`\\) to take it over\\./g, \"Something other than this app holds it. Remove that resource, then deploy again.\"],\n\t[/Re-run with `--adopt` \\(or wrap the effect in `adopt\\(true\\)`\\) to replace it anyway\\./g, \"Remove that resource, then deploy again.\"],\n\t[/\\(re-deploy with --adopt to take ownership, then destroy\\)/g, \"(remove it by hand)\"],\n\t[/Import it with explicit adoption (?:instead of silently taking it over|or choose a different [\\w ]+ name)\\./g, \"Something other than this app holds it. Remove that resource, then deploy again.\"],\n\t[/; rerun with adoption enabled if it is the intended [\\w ]+\\./g, \". Remove that resource, then deploy again.\"]\n];\n/** Replaces Alchemy CLI advice in engine output with steps that work from Composer. */\nfunction withComposerAdvice(text) {\n\treturn ALCHEMY_ADOPT_ADVICE.reduce((current, [advice, replacement]) => current.replace(advice, replacement), text);\n}\nconst STDOUT_CONSOLE_METHODS = /* @__PURE__ */ new Set([\n\t\"log\",\n\t\"info\",\n\t\"debug\"\n]);\n/**\n* Child half of the failure protocol, called by the generated stack file.\n* Keeps a bounded tail of everything this process logs through `console`,\n* passing every call through except Alchemy's CLI advice (see\n* {@link withComposerAdvice}), and on a non-zero exit writes the\n* redacted cause beside the result file. `console`, not the output streams:\n* alchemy's logger and its error reporting both go through it, and under Bun\n* `console` does not reach `process.stdout.write`.\n*\n* When stdout is not a terminal it carries the parent's data lines, so\n* everything this process prints goes to stderr instead.\n*/\nfunction captureEngineFailure() {\n\tconst resultFile = process.env[DEPLOYMENT_RESULT_FILE_ENV];\n\tif (resultFile === void 0 || resultFile.length === 0) return;\n\tconst stdoutToStderr = process.stdout.isTTY !== true;\n\tif (stdoutToStderr) process.stdout.write = process.stderr.write.bind(process.stderr);\n\tlet tail = \"\";\n\tfor (const method of [\n\t\t\"log\",\n\t\t\"info\",\n\t\t\"warn\",\n\t\t\"error\",\n\t\t\"debug\"\n\t]) {\n\t\tconst original = stdoutToStderr && STDOUT_CONSOLE_METHODS.has(method) ? console.error : console[method];\n\t\tconsole[method] = (...args) => {\n\t\t\tconst text = format(...args);\n\t\t\tconst shown = withComposerAdvice(text);\n\t\t\ttail = `${tail}${redactCredentialLooking(shown, process.env)}\\n`.slice(-65536);\n\t\t\tif (shown === text) original.apply(console, args);\n\t\t\telse original.call(console, shown);\n\t\t};\n\t}\n\tprocess.once(\"exit\", (code) => {\n\t\tif (code === 0) return;\n\t\tconst cause = engineFailureCause(tail, process.env);\n\t\tif (cause === void 0) return;\n\t\ttry {\n\t\t\tfs.writeFileSync(engineFailureFilePath(resultFile), cause);\n\t\t} catch {}\n\t});\n}\n/** Parent half: the cause the child recorded, passed through `redact`, or undefined when it recorded none. The child redacts only what its own environment names as a credential; the parent also knows the known secrets. */\nfunction readEngineFailureCause(resultFilePath, redact) {\n\tlet cause;\n\ttry {\n\t\tcause = fs.readFileSync(engineFailureFilePath(resultFilePath), \"utf8\");\n\t} catch {\n\t\treturn;\n\t}\n\treturn cause.length > 0 ? redact(cause) : void 0;\n}\n/** Effect's pretty log prefix, e.g. `[10:29:16.556] INFO (#53): `. */\nconst LOG_PREFIX = /^\\[[\\d:.]+\\] ([A-Z]+) \\(#\\d+\\): ?/;\n/** Alchemy's per-resource failure row, e.g. `[web] fail — UnknownError: …`. */\nconst RESOURCE_FAIL_ROW = /^\\[[^\\]]+\\] fail\\b/;\nconst STACK_FRAME = /^\\s*at /;\n/**\n* The failure the output describes: every line from the first failure line\n* (a failed resource row, an ERROR log, or an `error:` line) to the end, minus\n* blank lines, stack frames and info logs; the last five lines when there is no\n* failure line. Redacted, then capped.\n*/\nfunction engineFailureCause(output, env) {\n\tconst lines = [];\n\tfor (const raw of stripVTControlCharacters(output).split(/\\r\\n|\\r|\\n/)) {\n\t\tconst clean = raw.replace(/(?![\\t])\\p{Cc}/gu, \"\").trimEnd();\n\t\tconst prefix = LOG_PREFIX.exec(clean);\n\t\tconst text = (prefix === null ? clean : clean.slice(prefix[0].length)).trim();\n\t\tif (text.length === 0 || text === \"{\" || text === \"}\" || STACK_FRAME.test(text)) continue;\n\t\tconst level = prefix?.[1];\n\t\tconst failure = level === \"ERROR\" || level === \"FATAL\" || RESOURCE_FAIL_ROW.test(text) || /^\\W*error:/i.test(text);\n\t\tlines.push({\n\t\t\ttext,\n\t\t\tfailure,\n\t\t\tinfo: !failure && level !== void 0\n\t\t});\n\t}\n\tconst start = lines.findIndex((line) => line.failure);\n\tconst kept = start === -1 ? lines.slice(-5) : lines.slice(start).filter((line) => !line.info);\n\tif (kept.length === 0) return void 0;\n\tconst cause = redactCredentialLooking(kept.map((line) => line.text).join(\"\\n\"), env);\n\treturn cause.length <= ENGINE_FAILURE_CAUSE_LIMIT ? cause : `${cause.slice(0, ENGINE_FAILURE_CAUSE_LIMIT - 1)}…`;\n}\n/** A failure cause capped to fit the platform build's error message. */\nfunction capFailureCause(cause) {\n\treturn cause.length <= ENGINE_FAILURE_CAUSE_LIMIT ? cause : `${cause.slice(0, ENGINE_FAILURE_CAUSE_LIMIT - 1)}…`;\n}\n//#endregion\nexport { readEngineFailureCause as a, writeDeploymentSummaryFile as c, engineFailureFilePath as i, capFailureCause as n, toDeploymentSummary as o, captureEngineFailure as r, withComposerAdvice as s, DEPLOYMENT_RESULT_FILE_ENV as t };\n\n//# sourceMappingURL=deployment-summary-CVJZn2v0.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,6BAA6B;;AAEnC,SAAS,oBAAoB,QAAQ;CACpC,OAAO;EACN,KAAK,OAAO;EACZ,OAAO,OAAO,MAAM,KAAK,UAAU;GAClC,SAAS,KAAK;GACd,UAAU,KAAK;EAChB,EAAE;EACF,UAAU,OAAO;CAClB;AACD;;;;;;AAMA,SAAS,2BAA2B,QAAQ;CAC3C,MAAM,OAAO,QAAQ,IAAI;CACzB,IAAI,SAAS,KAAK,KAAK,KAAK,WAAW,GAAG;CAC1C,IAAI;EACH,KAAG,cAAc,MAAM,KAAK,UAAU,oBAAoB,MAAM,CAAC,CAAC;CACnE,QAAQ,CAAC;AACV;;AAEA,SAAS,sBAAsB,gBAAgB;CAC9C,OAAO,GAAG,eAAe;AAC1B;;AAEA,MAAM,6BAA6B;;AAEnC,MAAM,uBAAuB;CAC5B,CAAC,sFAAsF,kFAAkF;CACzK,CAAC,2FAA2F,0CAA0C;CACtI,CAAC,+DAA+D,qBAAqB;CACrF,CAAC,gHAAgH,kFAAkF;CACnM,CAAC,iEAAiE,4CAA4C;AAC/G;;AAEA,SAAS,mBAAmB,MAAM;CACjC,OAAO,qBAAqB,QAAQ,SAAS,CAAC,QAAQ,iBAAiB,QAAQ,QAAQ,QAAQ,WAAW,GAAG,IAAI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dist-Cf_mZHaH.mjs";
|
|
4
|
+
import { i as comparableProps } from "./deploy-CSU0kr4j.mjs";
|
|
5
|
+
import { n as failureReasonOf } from "./converge-in-process-x89zb2MF-Dvj-J8xo.mjs";
|
|
6
|
+
import { r as resolveLocalTargets } from "./local-target-DhU1vaxd.mjs";
|
|
7
|
+
import { isDeepStrictEqual } from "node:util";
|
|
8
|
+
//#region ../../0-framework/3-tooling/cli/dist/dev-converge-messages-DML4rTz7.mjs
|
|
9
|
+
const readKey = (read) => JSON.stringify([
|
|
10
|
+
read.reader,
|
|
11
|
+
read.resource,
|
|
12
|
+
read.path
|
|
13
|
+
]);
|
|
14
|
+
function readsByResource(snapshot) {
|
|
15
|
+
const byResource = /* @__PURE__ */ new Map();
|
|
16
|
+
for (const read of snapshot.reads) {
|
|
17
|
+
const keys = byResource.get(read.resource) ?? /* @__PURE__ */ new Set();
|
|
18
|
+
keys.add(readKey(read));
|
|
19
|
+
byResource.set(read.resource, keys);
|
|
20
|
+
}
|
|
21
|
+
return byResource;
|
|
22
|
+
}
|
|
23
|
+
function propsAt(graph, address) {
|
|
24
|
+
const found = graph.nodes.find((entry) => entry.id === address)?.node;
|
|
25
|
+
return found?.kind === "resource" ? found.props : void 0;
|
|
26
|
+
}
|
|
27
|
+
function valueReadsSnapshot(graph) {
|
|
28
|
+
return {
|
|
29
|
+
reads: graph.valueReads.map(({ reader, resource, path }) => ({
|
|
30
|
+
reader,
|
|
31
|
+
resource,
|
|
32
|
+
path
|
|
33
|
+
})),
|
|
34
|
+
props: Object.fromEntries(graph.valueReads.map(({ resource }) => [resource, comparableProps(propsAt(graph, resource))]))
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const hasMemberNotIn = (keys, other) => [...keys].some((key) => !other.has(key));
|
|
38
|
+
function valueReadsChange(started, rebuilt) {
|
|
39
|
+
const before = readsByResource(started);
|
|
40
|
+
const after = readsByResource(rebuilt);
|
|
41
|
+
const added = [];
|
|
42
|
+
const removed = [];
|
|
43
|
+
const changed = [];
|
|
44
|
+
for (const address of /* @__PURE__ */ new Set([...before.keys(), ...after.keys()])) {
|
|
45
|
+
const was = before.get(address) ?? /* @__PURE__ */ new Set();
|
|
46
|
+
const is = after.get(address) ?? /* @__PURE__ */ new Set();
|
|
47
|
+
const gained = hasMemberNotIn(is, was);
|
|
48
|
+
const lost = hasMemberNotIn(was, is);
|
|
49
|
+
if (was.size > 0 && is.size > 0 && !isDeepStrictEqual(started.props[address], rebuilt.props[address]) || gained && lost) changed.push(address);
|
|
50
|
+
else if (gained) added.push(address);
|
|
51
|
+
else if (lost) removed.push(address);
|
|
52
|
+
}
|
|
53
|
+
if (added.length + removed.length + changed.length === 0) return void 0;
|
|
54
|
+
return {
|
|
55
|
+
added,
|
|
56
|
+
removed,
|
|
57
|
+
changed
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* One `prisma dev` converge as plain data, and the steps that run it: Load,
|
|
62
|
+
* `lower()` against the local target, then Alchemy's plan and apply. The
|
|
63
|
+
* default runs it in a new worker thread (`dev-converge-in-worker.ts`), so each
|
|
64
|
+
* converge imports the app's definition files as they are on disk.
|
|
65
|
+
*/
|
|
66
|
+
function cloneable(envelope) {
|
|
67
|
+
try {
|
|
68
|
+
return structuredClone(envelope);
|
|
69
|
+
} catch {
|
|
70
|
+
const { meta: _meta, ...rest } = envelope;
|
|
71
|
+
return rest;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/** `error` as a result: a structured error as its envelope, any other as a failed outcome. */
|
|
75
|
+
function thrownResult(error, appFiles = []) {
|
|
76
|
+
return CliStructuredError.is(error) ? {
|
|
77
|
+
kind: "error",
|
|
78
|
+
error: cloneable(error.toEnvelope()),
|
|
79
|
+
appFiles
|
|
80
|
+
} : {
|
|
81
|
+
kind: "outcome",
|
|
82
|
+
outcome: {
|
|
83
|
+
kind: "failed",
|
|
84
|
+
reasons: [failureReasonOf(error)]
|
|
85
|
+
},
|
|
86
|
+
appFiles
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function containersOf(job, resolved) {
|
|
90
|
+
const containers = /* @__PURE__ */ new Map();
|
|
91
|
+
for (const [id, text] of Object.entries(job.containers)) {
|
|
92
|
+
const descriptor = resolved.get(id);
|
|
93
|
+
if (descriptor !== void 0) containers.set(id, descriptor.container.deserialize(text));
|
|
94
|
+
}
|
|
95
|
+
return containers;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Lowers `app` against the local target and plans and applies it, as `job` describes. First it
|
|
99
|
+
* Loads the app as `lower()` will, and refuses to converge when its value reads differ from the
|
|
100
|
+
* ones the session started with.
|
|
101
|
+
*/
|
|
102
|
+
async function convergeDevJob(job, app, report, signal) {
|
|
103
|
+
try {
|
|
104
|
+
const graph = Load(app.root, {
|
|
105
|
+
id: job.name,
|
|
106
|
+
environment: { name: job.environment },
|
|
107
|
+
appConfigurationRead: job.appConfigurationRead
|
|
108
|
+
});
|
|
109
|
+
const change = valueReadsChange(job.valueReads, valueReadsSnapshot(graph));
|
|
110
|
+
if (change !== void 0) return {
|
|
111
|
+
kind: "value-reads-changed",
|
|
112
|
+
change,
|
|
113
|
+
appFiles: app.appFiles
|
|
114
|
+
};
|
|
115
|
+
const resolved = await resolveLocalTargets(app.config);
|
|
116
|
+
const containers = containersOf(job, resolved);
|
|
117
|
+
const stack = app.entry.lower(app.root, app.config, {
|
|
118
|
+
name: job.name,
|
|
119
|
+
environment: job.environment,
|
|
120
|
+
appConfigurationRead: job.appConfigurationRead,
|
|
121
|
+
firstProcessNodeAddresses: job.nodeAddresses,
|
|
122
|
+
bundles: { ...job.bundles },
|
|
123
|
+
unassembled: job.unassembled,
|
|
124
|
+
containers,
|
|
125
|
+
preflightPayloads: new Map(Object.entries(job.preflightPayloads)),
|
|
126
|
+
providers: app.entry.localTargetProviders(resolved, containers, job.devDir, job.plainVariableText, job.namedSecrets),
|
|
127
|
+
state: app.entry.devState()
|
|
128
|
+
});
|
|
129
|
+
return {
|
|
130
|
+
kind: "outcome",
|
|
131
|
+
outcome: await app.entry.converge({
|
|
132
|
+
operation: "deploy",
|
|
133
|
+
stack,
|
|
134
|
+
stage: job.environment,
|
|
135
|
+
cwd: job.cwd,
|
|
136
|
+
env: {},
|
|
137
|
+
signal,
|
|
138
|
+
onEvent: report.onEvent,
|
|
139
|
+
output: report.output
|
|
140
|
+
}),
|
|
141
|
+
appFiles: app.appFiles
|
|
142
|
+
};
|
|
143
|
+
} catch (error) {
|
|
144
|
+
return thrownResult(error, app.appFiles);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
function isRecord(value) {
|
|
148
|
+
return typeof value === "object" && value !== null;
|
|
149
|
+
}
|
|
150
|
+
function isAbortMessage(value) {
|
|
151
|
+
return isRecord(value) && value["kind"] === "abort";
|
|
152
|
+
}
|
|
153
|
+
function isWorkerMessage(value) {
|
|
154
|
+
if (!isRecord(value)) return false;
|
|
155
|
+
switch (value["kind"]) {
|
|
156
|
+
case "event": return isRecord(value["event"]);
|
|
157
|
+
case "output": return typeof value["text"] === "string";
|
|
158
|
+
case "result": return isRecord(value["result"]) && typeof value["result"]["kind"] === "string";
|
|
159
|
+
default: return false;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
//#endregion
|
|
163
|
+
export { valueReadsSnapshot as a, thrownResult as i, isAbortMessage as n, isWorkerMessage as r, convergeDevJob as t };
|
|
164
|
+
|
|
165
|
+
//# sourceMappingURL=dev-converge-messages-DML4rTz7-C_EAB5M_.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-converge-messages-DML4rTz7-C_EAB5M_.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/dev-converge-messages-DML4rTz7.mjs"],"sourcesContent":["import { n as failureReasonOf } from \"./converge-in-process-x89zb2MF.mjs\";\nimport { Load } from \"@internal/core\";\nimport { comparableProps } from \"@internal/core/deploy\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport { isDeepStrictEqual } from \"node:util\";\nimport { resolveLocalTargets } from \"@internal/core/local-target\";\n//#region src/dev/value-reads-change.ts\nconst readKey = (read) => JSON.stringify([\n\tread.reader,\n\tread.resource,\n\tread.path\n]);\nfunction readsByResource(snapshot) {\n\tconst byResource = /* @__PURE__ */ new Map();\n\tfor (const read of snapshot.reads) {\n\t\tconst keys = byResource.get(read.resource) ?? /* @__PURE__ */ new Set();\n\t\tkeys.add(readKey(read));\n\t\tbyResource.set(read.resource, keys);\n\t}\n\treturn byResource;\n}\nfunction propsAt(graph, address) {\n\tconst found = graph.nodes.find((entry) => entry.id === address)?.node;\n\treturn found?.kind === \"resource\" ? found.props : void 0;\n}\nfunction valueReadsSnapshot(graph) {\n\treturn {\n\t\treads: graph.valueReads.map(({ reader, resource, path }) => ({\n\t\t\treader,\n\t\t\tresource,\n\t\t\tpath\n\t\t})),\n\t\tprops: Object.fromEntries(graph.valueReads.map(({ resource }) => [resource, comparableProps(propsAt(graph, resource))]))\n\t};\n}\nconst hasMemberNotIn = (keys, other) => [...keys].some((key) => !other.has(key));\nfunction valueReadsChange(started, rebuilt) {\n\tconst before = readsByResource(started);\n\tconst after = readsByResource(rebuilt);\n\tconst added = [];\n\tconst removed = [];\n\tconst changed = [];\n\tfor (const address of /* @__PURE__ */ new Set([...before.keys(), ...after.keys()])) {\n\t\tconst was = before.get(address) ?? /* @__PURE__ */ new Set();\n\t\tconst is = after.get(address) ?? /* @__PURE__ */ new Set();\n\t\tconst gained = hasMemberNotIn(is, was);\n\t\tconst lost = hasMemberNotIn(was, is);\n\t\tif (was.size > 0 && is.size > 0 && !isDeepStrictEqual(started.props[address], rebuilt.props[address]) || gained && lost) changed.push(address);\n\t\telse if (gained) added.push(address);\n\t\telse if (lost) removed.push(address);\n\t}\n\tif (added.length + removed.length + changed.length === 0) return void 0;\n\treturn {\n\t\tadded,\n\t\tremoved,\n\t\tchanged\n\t};\n}\n//#endregion\n//#region src/operations/dev-converge.ts\n/**\n* One `prisma dev` converge as plain data, and the steps that run it: Load,\n* `lower()` against the local target, then Alchemy's plan and apply. The\n* default runs it in a new worker thread (`dev-converge-in-worker.ts`), so each\n* converge imports the app's definition files as they are on disk.\n*/\nfunction cloneable(envelope) {\n\ttry {\n\t\treturn structuredClone(envelope);\n\t} catch {\n\t\tconst { meta: _meta, ...rest } = envelope;\n\t\treturn rest;\n\t}\n}\n/** `error` as a result: a structured error as its envelope, any other as a failed outcome. */\nfunction thrownResult(error, appFiles = []) {\n\treturn CliStructuredError.is(error) ? {\n\t\tkind: \"error\",\n\t\terror: cloneable(error.toEnvelope()),\n\t\tappFiles\n\t} : {\n\t\tkind: \"outcome\",\n\t\toutcome: {\n\t\t\tkind: \"failed\",\n\t\t\treasons: [failureReasonOf(error)]\n\t\t},\n\t\tappFiles\n\t};\n}\nfunction containersOf(job, resolved) {\n\tconst containers = /* @__PURE__ */ new Map();\n\tfor (const [id, text] of Object.entries(job.containers)) {\n\t\tconst descriptor = resolved.get(id);\n\t\tif (descriptor !== void 0) containers.set(id, descriptor.container.deserialize(text));\n\t}\n\treturn containers;\n}\n/**\n* Lowers `app` against the local target and plans and applies it, as `job` describes. First it\n* Loads the app as `lower()` will, and refuses to converge when its value reads differ from the\n* ones the session started with.\n*/\nasync function convergeDevJob(job, app, report, signal) {\n\ttry {\n\t\tconst graph = Load(app.root, {\n\t\t\tid: job.name,\n\t\t\tenvironment: { name: job.environment },\n\t\t\tappConfigurationRead: job.appConfigurationRead\n\t\t});\n\t\tconst change = valueReadsChange(job.valueReads, valueReadsSnapshot(graph));\n\t\tif (change !== void 0) return {\n\t\t\tkind: \"value-reads-changed\",\n\t\t\tchange,\n\t\t\tappFiles: app.appFiles\n\t\t};\n\t\tconst resolved = await resolveLocalTargets(app.config);\n\t\tconst containers = containersOf(job, resolved);\n\t\tconst stack = app.entry.lower(app.root, app.config, {\n\t\t\tname: job.name,\n\t\t\tenvironment: job.environment,\n\t\t\tappConfigurationRead: job.appConfigurationRead,\n\t\t\tfirstProcessNodeAddresses: job.nodeAddresses,\n\t\t\tbundles: { ...job.bundles },\n\t\t\tunassembled: job.unassembled,\n\t\t\tcontainers,\n\t\t\tpreflightPayloads: new Map(Object.entries(job.preflightPayloads)),\n\t\t\tproviders: app.entry.localTargetProviders(resolved, containers, job.devDir, job.plainVariableText, job.namedSecrets),\n\t\t\tstate: app.entry.devState()\n\t\t});\n\t\treturn {\n\t\t\tkind: \"outcome\",\n\t\t\toutcome: await app.entry.converge({\n\t\t\t\toperation: \"deploy\",\n\t\t\t\tstack,\n\t\t\t\tstage: job.environment,\n\t\t\t\tcwd: job.cwd,\n\t\t\t\tenv: {},\n\t\t\t\tsignal,\n\t\t\t\tonEvent: report.onEvent,\n\t\t\t\toutput: report.output\n\t\t\t}),\n\t\t\tappFiles: app.appFiles\n\t\t};\n\t} catch (error) {\n\t\treturn thrownResult(error, app.appFiles);\n\t}\n}\n//#endregion\n//#region src/operations/dev-converge-messages.ts\nfunction isRecord(value) {\n\treturn typeof value === \"object\" && value !== null;\n}\nfunction isAbortMessage(value) {\n\treturn isRecord(value) && value[\"kind\"] === \"abort\";\n}\nfunction isWorkerMessage(value) {\n\tif (!isRecord(value)) return false;\n\tswitch (value[\"kind\"]) {\n\t\tcase \"event\": return isRecord(value[\"event\"]);\n\t\tcase \"output\": return typeof value[\"text\"] === \"string\";\n\t\tcase \"result\": return isRecord(value[\"result\"]) && typeof value[\"result\"][\"kind\"] === \"string\";\n\t\tdefault: return false;\n\t}\n}\n//#endregion\nexport { valueReadsSnapshot as a, thrownResult as i, isWorkerMessage as n, convergeDevJob as r, isAbortMessage as t };\n\n//# sourceMappingURL=dev-converge-messages-DML4rTz7.mjs.map"],"mappings":";;;;;;;;AAOA,MAAM,WAAW,SAAS,KAAK,UAAU;CACxC,KAAK;CACL,KAAK;CACL,KAAK;AACN,CAAC;AACD,SAAS,gBAAgB,UAAU;CAClC,MAAM,6BAA6B,IAAI,IAAI;CAC3C,KAAK,MAAM,QAAQ,SAAS,OAAO;EACl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BXE-.mjs";
|
|
2
|
+
import { a as checkComposerConfig, c as noComposerExportMessage, i as registerEntryResolution, n as loadEntry, r as namesDirectoryWithIndex, t as appFilesNamedBy } from "./load-entry-CEoVBdMj-CHOz7jKf.mjs";
|
|
3
|
+
import { t as loadAppConvergeEntry } from "./app-converge-CVlo9uw2-B-fdr0nr.mjs";
|
|
4
|
+
import { i as thrownResult, n as isAbortMessage, t as convergeDevJob } from "./dev-converge-messages-DML4rTz7-C_EAB5M_.mjs";
|
|
5
|
+
import { parentPort, workerData } from "node:worker_threads";
|
|
6
|
+
import { pathToFileURL } from "node:url";
|
|
7
|
+
import { format } from "node:util";
|
|
8
|
+
import { Writable } from "node:stream";
|
|
9
|
+
//#region ../../0-framework/3-tooling/cli/dist/dev-converge-worker.mjs
|
|
10
|
+
/**
|
|
11
|
+
* The worker thread one `prisma dev` converge runs in (`dev-converge-in-worker.ts`
|
|
12
|
+
* starts it). A new thread has its own module cache, so it imports the config
|
|
13
|
+
* and the app as they are on disk now. It receives a `DevConvergeJob` as its
|
|
14
|
+
* `workerData` and posts `WorkerMessage`s back.
|
|
15
|
+
*/
|
|
16
|
+
const port = parentPort;
|
|
17
|
+
if (port === null) throw new Error("dev-converge-worker runs only as a worker thread.");
|
|
18
|
+
const post = (message) => port.postMessage(message);
|
|
19
|
+
const output = (text) => post({
|
|
20
|
+
kind: "output",
|
|
21
|
+
text
|
|
22
|
+
});
|
|
23
|
+
/**
|
|
24
|
+
* Methods that send only to an attached inspector and print nothing to the terminal, under Node or
|
|
25
|
+
* Bun. They keep their own behaviour: `console.createTask` returns a task whose `run` callers use.
|
|
26
|
+
*/
|
|
27
|
+
const INSPECTOR_ONLY = /* @__PURE__ */ new Set([
|
|
28
|
+
"context",
|
|
29
|
+
"createTask",
|
|
30
|
+
"profile",
|
|
31
|
+
"profileEnd",
|
|
32
|
+
"record",
|
|
33
|
+
"recordEnd",
|
|
34
|
+
"screenshot",
|
|
35
|
+
"timeStamp"
|
|
36
|
+
]);
|
|
37
|
+
/** Every function on `console` that can print, its own and inherited, except constructors. */
|
|
38
|
+
function printingConsoleFunctionNames() {
|
|
39
|
+
const names = /* @__PURE__ */ new Set();
|
|
40
|
+
for (let level = console; level !== null && level !== Object.prototype;) {
|
|
41
|
+
for (const name of Object.getOwnPropertyNames(level)) {
|
|
42
|
+
if (name === "constructor" || name === "Console" || INSPECTOR_ONLY.has(name)) continue;
|
|
43
|
+
if (typeof Reflect.get(console, name) === "function") names.add(name);
|
|
44
|
+
}
|
|
45
|
+
level = Object.getPrototypeOf(level);
|
|
46
|
+
}
|
|
47
|
+
return [...names];
|
|
48
|
+
}
|
|
49
|
+
const textOf = (chunk) => typeof chunk === "string" ? chunk : Buffer.from(chunk).toString("utf8");
|
|
50
|
+
/** Bun's `console.write`: each argument's bytes one after another, returning how many were written. */
|
|
51
|
+
function bunConsoleWrite(...args) {
|
|
52
|
+
const chunks = [];
|
|
53
|
+
try {
|
|
54
|
+
if (args.length === 0) throw writeArgumentError("ERR_STREAM_NULL_VALUES");
|
|
55
|
+
for (const arg of args) chunks.push(bytesOf(arg));
|
|
56
|
+
} finally {
|
|
57
|
+
if (chunks.length > 0) output(textOf(Buffer.concat(chunks)));
|
|
58
|
+
}
|
|
59
|
+
return chunks.reduce((total, chunk) => total + chunk.byteLength, 0);
|
|
60
|
+
}
|
|
61
|
+
function bytesOf(arg) {
|
|
62
|
+
if (typeof arg === "string") return Buffer.from(arg, "utf8");
|
|
63
|
+
if (arg instanceof ArrayBuffer) return new Uint8Array(arg);
|
|
64
|
+
if (ArrayBuffer.isView(arg)) return new Uint8Array(arg.buffer, arg.byteOffset, arg.byteLength);
|
|
65
|
+
throw writeArgumentError("ERR_INVALID_ARG_TYPE");
|
|
66
|
+
}
|
|
67
|
+
function writeArgumentError(code) {
|
|
68
|
+
return Object.assign(/* @__PURE__ */ new TypeError("write() expects a string, ArrayBufferView, or ArrayBuffer"), { code });
|
|
69
|
+
}
|
|
70
|
+
for (const stream of [process.stdout, process.stderr]) stream.write = (chunk) => {
|
|
71
|
+
output(textOf(chunk));
|
|
72
|
+
return true;
|
|
73
|
+
};
|
|
74
|
+
const sink = new Writable({ write(chunk, _encoding, done) {
|
|
75
|
+
output(textOf(chunk));
|
|
76
|
+
done();
|
|
77
|
+
} });
|
|
78
|
+
const replacement = new console.Console({
|
|
79
|
+
stdout: sink,
|
|
80
|
+
stderr: sink
|
|
81
|
+
});
|
|
82
|
+
const printed = (arg) => typeof arg === "string" || arg instanceof Uint8Array ? textOf(arg) : format(arg);
|
|
83
|
+
for (const name of printingConsoleFunctionNames()) {
|
|
84
|
+
const own = Reflect.get(replacement, name);
|
|
85
|
+
Reflect.set(console, name, name === "write" ? bunConsoleWrite : typeof own === "function" ? own.bind(replacement) : (...args) => output(args.map(printed).join(" ")));
|
|
86
|
+
}
|
|
87
|
+
if (typeof process.versions.bun === "string") process.on("warning", (warning) => output(`${warning.name}: ${warning.message}\n`));
|
|
88
|
+
registerEntryResolution();
|
|
89
|
+
const controller = new AbortController();
|
|
90
|
+
port.on("message", (message) => {
|
|
91
|
+
if (isAbortMessage(message)) controller.abort();
|
|
92
|
+
});
|
|
93
|
+
async function importConfig(file) {
|
|
94
|
+
const exported = (await import(pathToFileURL(file).href)).default;
|
|
95
|
+
const section = typeof exported === "object" && exported !== null && "composer" in exported ? exported.composer : void 0;
|
|
96
|
+
if (section === void 0) throw new Error(noComposerExportMessage(file));
|
|
97
|
+
const checked = checkComposerConfig(section, file);
|
|
98
|
+
if (!checked.ok) {
|
|
99
|
+
const [finding] = checked.findings;
|
|
100
|
+
throw new CliStructuredError(finding.code, finding.summary, {
|
|
101
|
+
...finding.why === void 0 ? {} : { why: finding.why },
|
|
102
|
+
fix: finding.fix
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
return checked.value;
|
|
106
|
+
}
|
|
107
|
+
async function run(job) {
|
|
108
|
+
const recorded = /* @__PURE__ */ new Set();
|
|
109
|
+
try {
|
|
110
|
+
const config = await importConfig(job.configFile);
|
|
111
|
+
const { root, files } = await loadEntry(job.entry, job.cwd, void 0, recorded);
|
|
112
|
+
return await convergeDevJob(job, {
|
|
113
|
+
config,
|
|
114
|
+
root,
|
|
115
|
+
entry: await loadAppConvergeEntry(job.appDir),
|
|
116
|
+
appFiles: files
|
|
117
|
+
}, {
|
|
118
|
+
onEvent: (event) => post({
|
|
119
|
+
kind: "event",
|
|
120
|
+
event
|
|
121
|
+
}),
|
|
122
|
+
output
|
|
123
|
+
}, controller.signal);
|
|
124
|
+
} catch (error) {
|
|
125
|
+
const result = thrownResult(error, [...recorded, ...appFilesNamedBy(error)]);
|
|
126
|
+
return result.kind === "error" && process.versions.bun !== void 0 && namesDirectoryWithIndex(error) ? {
|
|
127
|
+
...result,
|
|
128
|
+
lookupKept: true
|
|
129
|
+
} : result;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
run(workerData).then((result) => {
|
|
133
|
+
post({
|
|
134
|
+
kind: "result",
|
|
135
|
+
result
|
|
136
|
+
});
|
|
137
|
+
process.exit(0);
|
|
138
|
+
});
|
|
139
|
+
//#endregion
|
|
140
|
+
export {};
|
|
141
|
+
|
|
142
|
+
//# sourceMappingURL=dev-converge-worker.mjs.map
|
|
@@ -0,0 +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-CVlo9uw2.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,IAAI,SAAS,MAAM,MAAM,IAAI,MAAM,mDAAmD;AACtF,MAAM,QAAQ,YAAY,KAAK,YAAY,OAAO;AAClD,MAAM,UAAU,SAAS,KAAK;CAC7B,MAAM;CACN;AACD,CAAC;;;;;AAKD,MAAM,iCAAiC,IAAI,IAAI;CAC9C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;;AAED,SAAS,+BAA+B;CACvC,MAAM,wBAAwB,IAAI,IAAI;CACtC,KAAK,IAAI,QAAQ,SAAS,UAAU,QAAQ,UAAU,OAAO,YAAY;EACxE,KAAK,MAAM,QAAQ,OAAO,oBAAoB,KAAK,GAAG;GACrD,IAAI,SAAS,iBAAiB,SAAS,aAAa,eAAe,IAAI,IAAI,GAAG;GAC9E,IAAI,OAAO,QAAQ,IAAI,SAAS,IAAI,MAAM,YAAY,MAAM,IAAI,IAAI;EACrE;EACA,QAAQ,OAAO,eAAe,KAAK;CACp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,GAAG,QAAQ;EAC5E,OAAO,MAAM,eAAe,KAAK;GAChC;GACA;GACA,OAAO,MAAM,qBAAqB,IAAI,MAAM;GAC5C,UAAU;EACX,GAAG;GACF,UAAU,UAAU,KAAK;IACxB,MAAM;IACN;GACD,CAAC;GACD;EACD,GAAG,WAAW,MAAM;CACrB,SAAS,OAAO;EACf,MAAM,SAAS,aAAa,OAAO,CAAC,GAAG,UAAU,GAAG,gBAAgB,KAAK,CAAC,CAAC;EAC3E,OAAO,OAAO,SAAS,WAAW,QAAQ,SAAS,QAAQ,KAAK,KAAK,wBAAwB,KAAK,IAAI;GACrG,GAAG;GACH,YAAY;EACb,IAAI;CACL;AACD;AACA,IAAI,UAAU,CAAC,CAAC,MAAM,WAAW;CAChC,KAAK;EACJ,MAAM;EACN;CACD,CAAC;CACD,QAAQ,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as blindCast } from "./casts-DpaahrlC-C5XMnP9S.mjs";
|
|
2
2
|
import { t as InternalError } from "./internal-error-Dfur7Zqt-D96dWHZK.mjs";
|
|
3
|
-
import { t as CliStructuredError } from "./errors-
|
|
3
|
+
import { t as CliStructuredError } from "./errors-DI3TBXE-.mjs";
|
|
4
4
|
//#region ../../0-framework/0-foundation/foundation/dist/result.mjs
|
|
5
5
|
/**
|
|
6
6
|
* Generic Result type for representing success or failure outcomes.
|
|
@@ -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-ByY2RrbK.mjs
|
|
92
92
|
/**
|
|
93
93
|
* Reads the execution diagnostics an engine-failure error carries in
|
|
94
94
|
* `meta.diagnostics`; undefined for every other failure.
|
|
@@ -150,6 +150,10 @@ function requireContainerForEnvironment(action, extensionId, descriptor, instanc
|
|
|
150
150
|
const { running, runs } = RUN_OF[action];
|
|
151
151
|
throw 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}.` });
|
|
152
152
|
}
|
|
153
|
+
/** A failed converge's reasons as text, one per line, without a tag the message already starts with. */
|
|
154
|
+
function convergeReasonsText(reasons) {
|
|
155
|
+
return reasons.map(({ tag, message }) => tag === "Error" || tag === "Unknown" || message.startsWith(tag) ? message : `${tag}: ${message}`).join("\n");
|
|
156
|
+
}
|
|
153
157
|
async function deploy(input) {
|
|
154
158
|
return deployWithDeps(input, {});
|
|
155
159
|
}
|
|
@@ -161,7 +165,7 @@ async function deployWithDeps(input, deps) {
|
|
|
161
165
|
const cwd = input.cwd ?? process.cwd();
|
|
162
166
|
let executor;
|
|
163
167
|
try {
|
|
164
|
-
executor = await import("./execute-deploy-destroy-
|
|
168
|
+
executor = await import("./execute-deploy-destroy-D1jnaYqU-RAlTx-NX.mjs");
|
|
165
169
|
} catch (error) {
|
|
166
170
|
return notOk(executorLoadFailure("deploy", error));
|
|
167
171
|
}
|
|
@@ -182,7 +186,7 @@ async function devWithDeps(input, deps) {
|
|
|
182
186
|
const cwd = input.cwd ?? process.cwd();
|
|
183
187
|
let executor;
|
|
184
188
|
try {
|
|
185
|
-
executor = await import("./execute-dev-
|
|
189
|
+
executor = await import("./execute-dev-BP0Shlpd-BNFvs2LF.mjs");
|
|
186
190
|
} catch (error) {
|
|
187
191
|
return notOk(executorLoadFailure("dev", error));
|
|
188
192
|
}
|
|
@@ -190,7 +194,7 @@ async function devWithDeps(input, deps) {
|
|
|
190
194
|
}
|
|
191
195
|
async function loadExecutor(operation) {
|
|
192
196
|
try {
|
|
193
|
-
return ok(await import("./execute-dev-current-
|
|
197
|
+
return ok(await import("./execute-dev-current-B792f_1m-BYJ-Rl8m.mjs"));
|
|
194
198
|
} catch (error) {
|
|
195
199
|
return notOk(executorLoadFailure(operation, error));
|
|
196
200
|
}
|
|
@@ -208,6 +212,6 @@ async function devStop(input) {
|
|
|
208
212
|
return executor.value.executeDevStop(input, input.cwd ?? process.cwd());
|
|
209
213
|
}
|
|
210
214
|
//#endregion
|
|
211
|
-
export {
|
|
215
|
+
export { devUrl as a, requireContainerForEnvironment as c, ok as d, okVoid as f, devStop as i, toStructured as l, deploy as n, executionDiagnostics as o, dev as r, executorLoadFailure as s, convergeReasonsText as t, notOk as u };
|
|
212
216
|
|
|
213
|
-
//# sourceMappingURL=dev-current-
|
|
217
|
+
//# sourceMappingURL=dev-current-ByY2RrbK-DbU6y3PF.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-current-ByY2RrbK-DbU6y3PF.mjs","names":[],"sources":["../../../0-framework/0-foundation/foundation/dist/result.mjs","../../../0-framework/3-tooling/cli/dist/dev-current-ByY2RrbK.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/** 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-D1jnaYqU.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-BP0Shlpd.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-B792f_1m.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-ByY2RrbK.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,WAAW,MAAM,KAAK,CAAC;CAC7C;;;;CAIA,OAAO,MAAM,SAAS;EACrB,OAAO,UAAU,IAAI,WAAW,OAAO,OAAO,CAAC;CAChD;;;;;CAKA,WAAW;EACV,IAAI,CAAC,KAAK,IAA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AI;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,6 +1,6 @@
|
|
|
1
|
-
import { t as CliStructuredError } from "./errors-
|
|
1
|
+
import { t as CliStructuredError } from "./errors-DI3TBXE-.mjs";
|
|
2
2
|
import { n as DEV_ENVIRONMENT_NAME_FILE } from "./app-config-CErnR6NK-D9NgSBH4.mjs";
|
|
3
|
-
import "./local-target-
|
|
3
|
+
import "./local-target-DhU1vaxd.mjs";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
5
5
|
import * as fs$1 from "node:fs";
|
|
6
6
|
//#region ../../0-framework/3-tooling/cli/dist/dev-environment-name-6eEr5PW8.mjs
|
|
@@ -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-7ntm9Xhs.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-environment-name-6eEr5PW8-
|
|
1
|
+
{"version":3,"file":"dev-environment-name-6eEr5PW8-7ntm9Xhs.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,4 +1,4 @@
|
|
|
1
|
-
import "./graph-
|
|
1
|
+
import "./graph-D2WMLL43-CeiC5wdy.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
|
|
@@ -111,4 +111,4 @@ function hydrateSync(root, config) {
|
|
|
111
111
|
//#endregion
|
|
112
112
|
export { number as a, inputManifest as i, hydrate as n, param as o, hydrateSync as r, string as s, configOf as t };
|
|
113
113
|
|
|
114
|
-
//# sourceMappingURL=dist-
|
|
114
|
+
//# sourceMappingURL=dist-Cf_mZHaH.mjs.map
|