@prisma/composer 0.39.0-dev.1 → 0.39.0-dev.11
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-UeKFBma7-CohaMmWp.d.mts → app-config-DriAu5RU-C8hYpR38.d.mts} +88 -83
- package/dist/app-config-DriAu5RU-C8hYpR38.d.mts.map +1 -0
- package/dist/{app-configuration-file-CeJvBAti-D3uDlheX.mjs → app-configuration-file-D0rB5g65-CdMrjkCc.mjs} +50 -85
- package/dist/app-configuration-file-D0rB5g65-CdMrjkCc.mjs.map +1 -0
- package/dist/app-converge-bS1l9jIf-DRGbjw2D.mjs +88 -0
- package/dist/app-converge-bS1l9jIf-DRGbjw2D.mjs.map +1 -0
- package/dist/arktype.d.mts +7 -5
- package/dist/arktype.d.mts.map +1 -1
- package/dist/arktype.mjs +7 -5
- package/dist/arktype.mjs.map +1 -1
- package/dist/config-Bpi8QVLB.d.mts +1 -0
- package/dist/config.d.mts +3 -3
- package/dist/config.mjs +2 -2
- package/dist/control.d.mts +19 -21
- 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-CTomEXaD-BnDylZP8.d.mts +67 -0
- package/dist/converge-in-process-CTomEXaD-BnDylZP8.d.mts.map +1 -0
- 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-3EXLVrtG.mjs → deploy-CSU0kr4j.mjs} +130 -38
- package/dist/deploy-CSU0kr4j.mjs.map +1 -0
- 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-p88NV5m5-SgniM8TX.d.mts → deployment-summary-6LgQDUuu-Cu_6UNhc.d.mts} +7 -4
- package/dist/deployment-summary-6LgQDUuu-Cu_6UNhc.d.mts.map +1 -0
- package/dist/{deployment-summary-D74WrJX7-DQ3LDUuO.mjs → deployment-summary-CVJZn2v0-Dz-gX1rp.mjs} +16 -44
- package/dist/deployment-summary-CVJZn2v0-Dz-gX1rp.mjs.map +1 -0
- package/dist/{describe-kind-Cpm_euxo-CkhlGJUL.mjs → describe-kind-Cpm_euxo-DsSPENQa.mjs} +4 -4
- package/dist/describe-kind-Cpm_euxo-DsSPENQa.mjs.map +1 -0
- 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-wD5YDLjA-CzyFYXni.mjs → dev-current-lAlj53eX-DrtBnAmA.mjs} +11 -7
- package/dist/dev-current-lAlj53eX-DrtBnAmA.mjs.map +1 -0
- package/dist/{dev-environment-name-6eEr5PW8-BwusWVKi.mjs → dev-environment-name-6eEr5PW8-7ntm9Xhs.mjs} +3 -3
- package/dist/{dev-environment-name-6eEr5PW8-BwusWVKi.mjs.map → dev-environment-name-6eEr5PW8-7ntm9Xhs.mjs.map} +1 -1
- package/dist/{dist-ynqBR6y8.mjs → dist-Cf_mZHaH.mjs} +4 -26
- package/dist/dist-Cf_mZHaH.mjs.map +1 -0
- 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-DOzo2Psp-DmS5miT4.mjs → execute-deploy-destroy-DN16ETAk-BaopEKsA.mjs} +376 -86
- package/dist/execute-deploy-destroy-DN16ETAk-BaopEKsA.mjs.map +1 -0
- package/dist/{execute-dev-BIyOI3Ys-BbDOLlV4.mjs → execute-dev-DnVmNpc1-kSyPML7l.mjs} +455 -221
- package/dist/execute-dev-DnVmNpc1-kSyPML7l.mjs.map +1 -0
- package/dist/{execute-dev-current-CKOzjWuO-BPecs6Lf.mjs → execute-dev-current-CZdmxVQ4-Bij2LeBY.mjs} +7 -7
- package/dist/{execute-dev-current-CKOzjWuO-BPecs6Lf.mjs.map → execute-dev-current-CZdmxVQ4-Bij2LeBY.mjs.map} +1 -1
- package/dist/{execute-log-BDdHor71-B2p8Zae2.mjs → execute-log-Bl-j6izb-BTAo6tRM.mjs} +8 -8
- package/dist/{execute-log-BDdHor71-B2p8Zae2.mjs.map → execute-log-Bl-j6izb-BTAo6tRM.mjs.map} +1 -1
- package/dist/{graph-C7mdtisq-RnKiwVsx.d.mts → graph-CUYXjK8S-BzL-mhjq.d.mts} +3 -3
- package/dist/graph-CUYXjK8S-BzL-mhjq.d.mts.map +1 -0
- package/dist/{graph-BzPLUUsB-D7EnB1F5.mjs → graph-D2WMLL43-CeiC5wdy.mjs} +150 -107
- package/dist/graph-D2WMLL43-CeiC5wdy.mjs.map +1 -0
- package/dist/{graph-types-s5V7pGj2-BxSqB1ZH.d.mts → graph-types-D4PrtP-l-B0uuchTl.d.mts} +101 -98
- package/dist/graph-types-D4PrtP-l-B0uuchTl.d.mts.map +1 -0
- package/dist/http.d.mts +2 -2
- package/dist/http.mjs +2 -2
- package/dist/{index-DyuwxTtd.d.mts → index-D8chHe55.d.mts} +3 -3
- package/dist/{index-DyuwxTtd.d.mts.map → index-D8chHe55.d.mts.map} +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +4 -4
- package/dist/internal-app-configuration-file.d.mts +7 -10
- 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 +16 -0
- package/dist/internal-converge-contract.d.mts.map +1 -0
- package/dist/internal-converge-contract.mjs +16 -0
- package/dist/internal-converge-contract.mjs.map +1 -0
- package/dist/internal-converge.d.mts +5 -0
- package/dist/internal-converge.mjs +4 -0
- 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-Dd8FJEb5.mjs → local-target-DhU1vaxd.mjs} +8 -8
- package/dist/{local-target-Dd8FJEb5.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-0lw_cBIr.d.mts → nextjs-DLyeRR7M-CzUbvPaJ.d.mts} +3 -3
- package/dist/{nextjs-DLyeRR7M-0lw_cBIr.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/{pointer-CyQZZugO-D7k3vibs.d.mts → pointer-BX2KJ720-BxcfpaHP.d.mts} +8 -6
- package/dist/{pointer-CyQZZugO-D7k3vibs.d.mts.map → pointer-BX2KJ720-BxcfpaHP.d.mts.map} +1 -1
- package/dist/{preflight-transport-DmmtoFPH-CnDWufmu.mjs → preflight-transport-2d6iIchu-B-v7Di6I.mjs} +7 -44
- package/dist/preflight-transport-2d6iIchu-B-v7Di6I.mjs.map +1 -0
- package/dist/{redaction-DXung4ip-bBoNomi3.mjs → redaction-DY6eDC12-W-FzW7_r.mjs} +32 -15
- package/dist/redaction-DY6eDC12-W-FzW7_r.mjs.map +1 -0
- package/dist/{redaction-Bf8FvTFH-D_HvoMrf.d.mts → redaction-Dn7BRdaP-BcLSPhLV.d.mts} +65 -16
- 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/dist/zod.d.mts +6 -5
- package/dist/zod.d.mts.map +1 -1
- package/dist/zod.mjs +6 -5
- package/dist/zod.mjs.map +1 -1
- package/package.json +15 -13
- package/skills/prisma-composer-core-concepts/SKILL.md +47 -66
- package/src/exports/dev-converge-worker.ts +2 -0
- package/src/exports/internal-converge-contract.ts +1 -0
- package/src/exports/internal-converge.ts +1 -0
- package/dist/app-config-UeKFBma7-CohaMmWp.d.mts.map +0 -1
- package/dist/app-configuration-file-CeJvBAti-D3uDlheX.mjs.map +0 -1
- package/dist/config-BeZEgGCg.d.mts +0 -1
- package/dist/deploy-3EXLVrtG.mjs.map +0 -1
- package/dist/deploy-Xi4_JrtE.d.mts +0 -2
- package/dist/deployment-summary-D74WrJX7-DQ3LDUuO.mjs.map +0 -1
- package/dist/deployment-summary-p88NV5m5-SgniM8TX.d.mts.map +0 -1
- package/dist/describe-kind-Cpm_euxo-CkhlGJUL.mjs.map +0 -1
- package/dist/dev-current-wD5YDLjA-CzyFYXni.mjs.map +0 -1
- package/dist/dist-ynqBR6y8.mjs.map +0 -1
- package/dist/execute-deploy-destroy-DOzo2Psp-DmS5miT4.mjs.map +0 -1
- package/dist/execute-dev-BIyOI3Ys-BbDOLlV4.mjs.map +0 -1
- package/dist/graph-BzPLUUsB-D7EnB1F5.mjs.map +0 -1
- package/dist/graph-C7mdtisq-RnKiwVsx.d.mts.map +0 -1
- package/dist/graph-types-s5V7pGj2-BxSqB1ZH.d.mts.map +0 -1
- package/dist/local-target.d.mts.map +0 -1
- package/dist/preflight-transport-DmmtoFPH-CnDWufmu.mjs.map +0 -1
- package/dist/redaction-Bf8FvTFH-D_HvoMrf.d.mts.map +0 -1
- package/dist/redaction-DXung4ip-bBoNomi3.mjs.map +0 -1
- package/dist/run-alchemy-CRLAyOtt-CBUV28We.mjs +0 -236
- package/dist/run-alchemy-CRLAyOtt-CBUV28We.mjs.map +0 -1
- package/dist/validate-environment-D1BTCkTs-BQprjyNP.mjs +0 -739
- package/dist/validate-environment-D1BTCkTs-BQprjyNP.mjs.map +0 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import "./graph-types-D4PrtP-l-B0uuchTl.mjs";
|
|
2
|
+
import "./graph-CUYXjK8S-BzL-mhjq.mjs";
|
|
3
|
+
import "./app-config-DriAu5RU-C8hYpR38.mjs";
|
|
4
|
+
import * as Provider from "alchemy/Provider";
|
|
5
|
+
//#region ../../0-framework/1-core/core/dist/deploy.d.mts
|
|
6
|
+
//#region src/comparable-props.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Resource props as plain data that `structuredClone` copies unchanged, so two props compare by
|
|
9
|
+
* content with `isDeepStrictEqual` even after one crossed a thread. Every object or array is
|
|
10
|
+
* tagged by what it was, so no two different props give the same data:
|
|
11
|
+
*
|
|
12
|
+
* - a `Value` is described by what core knows of it: a source by its kind, pointer kind, label,
|
|
13
|
+
* secrets key and payload; any other value only as derived, with the kind of its origin;
|
|
14
|
+
* - a `Date`, `RegExp`, `Map` or `Set` keeps its content;
|
|
15
|
+
* - an instance of another class keeps its class name and own enumerable fields;
|
|
16
|
+
* - a function or symbol becomes its text;
|
|
17
|
+
* - a reference back to an object that contains it becomes a cycle marker.
|
|
18
|
+
*/
|
|
19
|
+
declare function comparableProps(props: unknown): unknown;
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/control/provider-error.d.ts
|
|
22
|
+
/** What a provider operation threw, as the error Alchemy's lifecycle methods fail with: an error with a `_tag` as it is, anything else wrapped in a `ProviderFailure`. */
|
|
23
|
+
declare function toProviderError(cause: unknown): Provider.ProviderError;
|
|
24
|
+
/** The original error of a provider failure `toProviderError` wrapped, or `undefined` for any other error. */
|
|
25
|
+
declare function wrappedProviderError(error: unknown): unknown;
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/resolve-values.d.ts
|
|
28
|
+
/** The `name` of the error a Load that takes what an earlier Load read fails with when it needs a root input field that Load did not read. */
|
|
29
|
+
declare const ROOT_INPUT_UNREAD_ERROR = "RootInputUnreadError";
|
|
30
|
+
//#endregion
|
|
31
|
+
export { wrappedProviderError as i, comparableProps as n, toProviderError as r, ROOT_INPUT_UNREAD_ERROR as t };
|
|
32
|
+
//# sourceMappingURL=deploy-DHgEJDpg.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-DHgEJDpg.d.mts","names":[],"sources":["../../../0-framework/1-core/core/dist/deploy.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;iBAkBiB,gBAAgB;;;;iBAIhB,gBAAgB,iBAAiB,SAAS;;iBAE1C,qBAAqB;;;;cAIxB"}
|
package/dist/deploy.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as secretsKeys, r as nodeAddresses } from "./graph-
|
|
2
|
-
import { F as
|
|
3
|
-
import "./deploy-
|
|
4
|
-
export { AlchemyStateLayer, ApplicationDescriptor, Artifact, AssembleInput, Bundle, DeployedEntity, DeployedNode, DeploymentResult, DevServer, LowerContext, LowerError, LowerOptions, LoweredResult, Lowering, Outputs, PackageInput, ProvisionEdge, ProvisionerDescriptor, ServeInput, ServiceLowering, buildConfig, connectionInputs, deploymentResult, joinDeployment, lower, lowering, mergedProviders, nodeAddresses, resolveStateLayer, secretsKeys };
|
|
1
|
+
import { i as secretsKeys, r as nodeAddresses } from "./graph-CUYXjK8S-BzL-mhjq.mjs";
|
|
2
|
+
import { Et as transportedLowerInputs, F as LowerError, H as PackageInput, I as LowerOptions, L as LoweredResult, P as LowerContext, R as Lowering, S as GRAPH_CHANGED_ERROR, Tt as resolveStateLayer, V as Outputs, X as ProvisionEdge, Z as ProvisionerDescriptor, _ as DeployedNode, _t as joinDeployment, a as Artifact, b as DevServer, bt as mergedProviders, ct as buildConfig, g as DeployedEntity, i as ApplicationDescriptor, it as ServiceLowering, lt as connectionInputs, o as AssembleInput, pt as deploymentResult, rt as ServeInput, s as Bundle, t as AlchemyStateLayer, v as DeploymentResult, vt as lower, yt as lowering } from "./app-config-DriAu5RU-C8hYpR38.mjs";
|
|
3
|
+
import { i as wrappedProviderError, n as comparableProps, r as toProviderError, t as ROOT_INPUT_UNREAD_ERROR } from "./deploy-DHgEJDpg.mjs";
|
|
4
|
+
export { AlchemyStateLayer, ApplicationDescriptor, Artifact, AssembleInput, Bundle, DeployedEntity, DeployedNode, DeploymentResult, DevServer, GRAPH_CHANGED_ERROR, LowerContext, LowerError, LowerOptions, LoweredResult, Lowering, Outputs, PackageInput, ProvisionEdge, ProvisionerDescriptor, ROOT_INPUT_UNREAD_ERROR, ServeInput, ServiceLowering, buildConfig, comparableProps, connectionInputs, deploymentResult, joinDeployment, lower, lowering, mergedProviders, nodeAddresses, resolveStateLayer, secretsKeys, toProviderError, transportedLowerInputs, wrappedProviderError };
|
package/dist/deploy.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
export { LowerError, buildConfig, connectionInputs, deploymentResult, joinDeployment, lower, lowering, mergedProviders, nodeAddresses, resolveStateLayer, secretsKeys };
|
|
1
|
+
import { E as secretsKeys, a as ROOT_INPUT_UNREAD_ERROR, y as nodeAddresses } from "./graph-D2WMLL43-CeiC5wdy.mjs";
|
|
2
|
+
import { a as connectionInputs, c as lower, d as resolveStateLayer, f as toProviderError, i as comparableProps, l as lowering, m as wrappedProviderError, n as LowerError, o as deploymentResult, p as transportedLowerInputs, r as buildConfig, s as joinDeployment, t as GRAPH_CHANGED_ERROR, u as mergedProviders } from "./deploy-CSU0kr4j.mjs";
|
|
3
|
+
export { GRAPH_CHANGED_ERROR, LowerError, ROOT_INPUT_UNREAD_ERROR, buildConfig, comparableProps, connectionInputs, deploymentResult, joinDeployment, lower, lowering, mergedProviders, nodeAddresses, resolveStateLayer, secretsKeys, toProviderError, transportedLowerInputs, wrappedProviderError };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { g as DeployedEntity } from "./app-config-
|
|
2
|
-
import "./
|
|
3
|
-
|
|
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
|
+
//#region ../../0-framework/3-tooling/cli/dist/deployment-summary-6LgQDUuu.d.mts
|
|
4
5
|
//#region src/deployment-summary.d.ts
|
|
5
6
|
/** The serializable projection of DeploymentResult — what CAN cross the process
|
|
6
7
|
* boundary. Writer (report hook) and reader (deploy operation) share this shape. */
|
|
@@ -11,6 +12,8 @@ interface DeployedNodeSummary {
|
|
|
11
12
|
interface DeploymentSummary {
|
|
12
13
|
readonly app: string;
|
|
13
14
|
readonly nodes: readonly DeployedNodeSummary[];
|
|
15
|
+
/** The platform variables with no value that the deploy preflight found. */
|
|
16
|
+
readonly findings: PreflightFindings;
|
|
14
17
|
}
|
|
15
18
|
/**
|
|
16
19
|
* Child half of the failure protocol, called by the generated stack file.
|
|
@@ -27,4 +30,4 @@ interface DeploymentSummary {
|
|
|
27
30
|
declare function captureEngineFailure(): void;
|
|
28
31
|
//#endregion
|
|
29
32
|
export { DeploymentSummary as n, captureEngineFailure as r, DeployedNodeSummary as t };
|
|
30
|
-
//# sourceMappingURL=deployment-summary-
|
|
33
|
+
//# sourceMappingURL=deployment-summary-6LgQDUuu-Cu_6UNhc.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
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-D74WrJX7-DQ3LDUuO.mjs → deployment-summary-CVJZn2v0-Dz-gX1rp.mjs}
RENAMED
|
@@ -1,31 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as redactCredentialLooking } from "./redaction-DXung4ip-bBoNomi3.mjs";
|
|
1
|
+
import { i as redactCredentialLooking } from "./redaction-DY6eDC12-W-FzW7_r.mjs";
|
|
3
2
|
import * as fs$1 from "node:fs";
|
|
4
3
|
import { format, stripVTControlCharacters } from "node:util";
|
|
5
|
-
//#region ../../0-framework/3-tooling/cli/dist/deployment-summary-
|
|
4
|
+
//#region ../../0-framework/3-tooling/cli/dist/deployment-summary-CVJZn2v0.mjs
|
|
6
5
|
/**
|
|
7
|
-
* The deploy result
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* references (ADR-0033) — so the writer projects it down to what CAN.
|
|
13
|
-
*
|
|
14
|
-
* The summary is best-effort by contract: the writer never fails the child
|
|
15
|
-
* over it, and the reader maps absent or malformed to `undefined`. So is the
|
|
16
|
-
* failure cause the child leaves beside it when it exits non-zero.
|
|
6
|
+
* The deploy result as data, and what a stack file run as a child hands back
|
|
7
|
+
* to the CLI: the summary file the report hook writes, and the failure cause
|
|
8
|
+
* the child records when it exits non-zero. `DeploymentResult` holds live
|
|
9
|
+
* graph nodes (ADR-0033), so the summary keeps only what can be serialized.
|
|
10
|
+
* Both files are best-effort: a write failure never fails the child.
|
|
17
11
|
*/
|
|
18
12
|
/** Env var the deploy operation sets on the alchemy child: when present,
|
|
19
13
|
* the report hook also writes the JSON DeploymentSummary there. */
|
|
20
14
|
const DEPLOYMENT_RESULT_FILE_ENV = "PRISMA_COMPOSER_DEPLOYMENT_RESULT_FILE";
|
|
21
|
-
/** Pure projection: keeps app
|
|
15
|
+
/** Pure projection: keeps app, each node's address/entities and the findings, drops the in-process `node`. */
|
|
22
16
|
function toDeploymentSummary(result) {
|
|
23
17
|
return {
|
|
24
18
|
app: result.app,
|
|
25
19
|
nodes: result.nodes.map((node) => ({
|
|
26
20
|
address: node.address,
|
|
27
21
|
entities: node.entities
|
|
28
|
-
}))
|
|
22
|
+
})),
|
|
23
|
+
findings: result.findings
|
|
29
24
|
};
|
|
30
25
|
}
|
|
31
26
|
/**
|
|
@@ -40,33 +35,6 @@ function writeDeploymentSummaryFile(result) {
|
|
|
40
35
|
fs$1.writeFileSync(file, JSON.stringify(toDeploymentSummary(result)));
|
|
41
36
|
} catch {}
|
|
42
37
|
}
|
|
43
|
-
function isRecord(value) {
|
|
44
|
-
return typeof value === "object" && value !== null;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Reader half, run by the deploy operation after the child exits. Absent or
|
|
48
|
-
* malformed → undefined — the summary is best-effort, never a deploy failure.
|
|
49
|
-
*/
|
|
50
|
-
function readDeploymentSummary(resultFilePath) {
|
|
51
|
-
let raw;
|
|
52
|
-
try {
|
|
53
|
-
raw = fs$1.readFileSync(resultFilePath, "utf8");
|
|
54
|
-
} catch {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
let parsed;
|
|
58
|
-
try {
|
|
59
|
-
parsed = JSON.parse(raw);
|
|
60
|
-
} catch {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
if (!isRecord(parsed) || typeof parsed["app"] !== "string" || !Array.isArray(parsed["nodes"])) return;
|
|
64
|
-
for (const node of parsed["nodes"]) {
|
|
65
|
-
if (!isRecord(node) || typeof node["address"] !== "string" || !Array.isArray(node["entities"])) return;
|
|
66
|
-
for (const entity of node["entities"]) if (!isRecord(entity) || typeof entity["kind"] !== "string" || typeof entity["id"] !== "string") return;
|
|
67
|
-
}
|
|
68
|
-
return blindCast(parsed);
|
|
69
|
-
}
|
|
70
38
|
/** The child's failure cause rides beside the result file, so the one env var names both and the parent's cleanup removes both. */
|
|
71
39
|
function engineFailureFilePath(resultFilePath) {
|
|
72
40
|
return `${resultFilePath}.failure.txt`;
|
|
@@ -175,7 +143,11 @@ function engineFailureCause(output, env) {
|
|
|
175
143
|
const cause = redactCredentialLooking(kept.map((line) => line.text).join("\n"), env);
|
|
176
144
|
return cause.length <= ENGINE_FAILURE_CAUSE_LIMIT ? cause : `${cause.slice(0, ENGINE_FAILURE_CAUSE_LIMIT - 1)}…`;
|
|
177
145
|
}
|
|
146
|
+
/** A failure cause capped to fit the platform build's error message. */
|
|
147
|
+
function capFailureCause(cause) {
|
|
148
|
+
return cause.length <= ENGINE_FAILURE_CAUSE_LIMIT ? cause : `${cause.slice(0, ENGINE_FAILURE_CAUSE_LIMIT - 1)}…`;
|
|
149
|
+
}
|
|
178
150
|
//#endregion
|
|
179
|
-
export { readEngineFailureCause as a,
|
|
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 };
|
|
180
152
|
|
|
181
|
-
//# sourceMappingURL=deployment-summary-
|
|
153
|
+
//# sourceMappingURL=deployment-summary-CVJZn2v0-Dz-gX1rp.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
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;CAC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A6B,QAAQ,GAAG,MAAM,MAAM,GAAG,6BAA6B,CAAC,EAAE;AAC/G"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as blindCast } from "./casts-DpaahrlC-C5XMnP9S.mjs";
|
|
2
|
-
//#region ../../0-framework/0-foundation/foundation/dist/pointer-
|
|
3
|
-
/** A pointer: what a value known only at boot holds at deploy. It names the platform
|
|
2
|
+
//#region ../../0-framework/0-foundation/foundation/dist/pointer-B3LgR6R4.mjs
|
|
3
|
+
/** A pointer: what a value known only at boot holds at deploy. It names the variable on the platform that the service reads at boot, and records whether that variable holds a secret. */
|
|
4
4
|
const POINTER = blindCast(Symbol.for("prisma:pointer"));
|
|
5
5
|
function kindOf(value) {
|
|
6
6
|
if (typeof value !== "object" || value === null) return void 0;
|
|
7
7
|
return Reflect.get(value, POINTER);
|
|
8
8
|
}
|
|
9
|
-
/** True for a plain pointer: a value known only at boot
|
|
9
|
+
/** True for a plain pointer: a value known only at boot that is not a secret. */
|
|
10
10
|
function isPlainPointer(value) {
|
|
11
11
|
return kindOf(value) === "plain";
|
|
12
12
|
}
|
|
@@ -79,4 +79,4 @@ function describeKind(value) {
|
|
|
79
79
|
//#endregion
|
|
80
80
|
export { isPlainPointer as a, POINTER as i, SecretBox as n, isSecretPointer as o, isSecretString as r, describeKind as t };
|
|
81
81
|
|
|
82
|
-
//# sourceMappingURL=describe-kind-Cpm_euxo-
|
|
82
|
+
//# sourceMappingURL=describe-kind-Cpm_euxo-DsSPENQa.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describe-kind-Cpm_euxo-DsSPENQa.mjs","names":["#value"],"sources":["../../../0-framework/0-foundation/foundation/dist/pointer-B3LgR6R4.mjs","../../../0-framework/0-foundation/foundation/dist/secret-DoWGmN7m.mjs","../../../0-framework/0-foundation/foundation/dist/describe-kind-Cpm_euxo.mjs"],"sourcesContent":["import { t as blindCast } from \"./casts-DpaahrlC.mjs\";\n//#region src/pointer.ts\n/** A pointer: what a value known only at boot holds at deploy. It names the variable on the platform that the service reads at boot, and records whether that variable holds a secret. */\nconst POINTER = blindCast(Symbol.for(\"prisma:pointer\"));\nfunction kindOf(value) {\n\tif (typeof value !== \"object\" || value === null) return void 0;\n\treturn Reflect.get(value, POINTER);\n}\n/** True for a plain pointer: a value known only at boot that is not a secret. */\nfunction isPlainPointer(value) {\n\treturn kindOf(value) === \"plain\";\n}\n/** True for a secret pointer: a value known only at boot whose variable holds a secret. */\nfunction isSecretPointer(value) {\n\treturn kindOf(value) === \"secret\";\n}\n//#endregion\nexport { isPlainPointer as n, isSecretPointer as r, POINTER as t };\n\n//# sourceMappingURL=pointer-B3LgR6R4.mjs.map","import { t as blindCast } from \"./casts-DpaahrlC.mjs\";\n//#region src/secret.ts\n/**\n* A value wrapper that redacts everywhere except the one explicit reader,\n* `expose()`. Sensitivity is carried by the TYPE (`SecretBox<T>`), not a flag a\n* sink must remember to check: `String(box)`, template interpolation,\n* `JSON.stringify`, and `console.log`/`util.inspect` all print `[REDACTED]`, so\n* a secret can't leak through an accidental log or serialization.\n*\n* Every box carries a brand property keyed by the registered symbol\n* `Symbol.for('prisma:secret-box')`, which is what `isSecretString` checks. A\n* symbol key is invisible to `JSON.stringify` and `Object.keys`, so the box's\n* public shape still matches the platform's own `secrecy` type\n* (pdp-control-plane).\n*/\nconst REDACTED = \"[REDACTED]\";\nconst SECRET_BOX = blindCast(Symbol.for(\"prisma:secret-box\"));\nvar SecretBox = class {\n\t[SECRET_BOX] = true;\n\t#value;\n\tconstructor(value) {\n\t\tthis.#value = value;\n\t}\n\t/** The sole explicit door to the wrapped value. */\n\texpose() {\n\t\treturn this.#value;\n\t}\n\ttoString() {\n\t\treturn REDACTED;\n\t}\n\ttoJSON() {\n\t\treturn REDACTED;\n\t}\n\tvalueOf() {\n\t\treturn REDACTED;\n\t}\n\t[Symbol.toPrimitive]() {\n\t\treturn REDACTED;\n\t}\n\t[Symbol.for(\"nodejs.util.inspect.custom\")]() {\n\t\treturn REDACTED;\n\t}\n};\n/**\n* True for a redacting secret box — what a schema's secret leaf checks\n* (ADR-0042). Reads the brand rather than `instanceof`, so a box from a\n* duplicated module copy in a bundle counts and a look-alike does not.\n*/\nfunction isSecretString(value) {\n\treturn typeof value === \"object\" && value !== null && blindCast(value)[SECRET_BOX] === true;\n}\n//#endregion\nexport { isSecretString as n, SecretBox as t };\n\n//# sourceMappingURL=secret-DoWGmN7m.mjs.map","//#region src/describe-kind.ts\n/** How an error names the kind of a value it did not expect, without printing the value. */\nfunction describeKind(value) {\n\tif (value === void 0) return \"nothing\";\n\tif (value === null) return \"null\";\n\tif (Array.isArray(value)) return \"an array\";\n\tif (typeof value === \"function\") return \"a function\";\n\tif (typeof value === \"object\") return \"an object\";\n\treturn `a ${typeof value}`;\n}\n//#endregion\nexport { describeKind as t };\n\n//# sourceMappingURL=describe-kind-Cpm_euxo.mjs.map"],"mappings":";;;AAGA,MAAM,UAAU,UAAU,OAAO,IAAI,gBAAgB,CAAC;AACtD,SAAS,OAAO,OAAO;CACtB,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO,KAAK;CAC7D,OAAO,QAAQ,IAAI,OAAO,OAAO;AAClC;;AAEA,SAAS,eAAe,OAAO;CAC9B,OAAO,OAAO,KAAK,MAAM;AAC1B;;AAEA,SAAS,gBAAgB,OAAO;CAC/B,OAAO,OAAO,KAAK,MAAM;AAC1B;;;;;;;;;;;;;;;;ACAA,MAAM,WAAW;AACjB,MAAM,aAAa,UAAU,OAAO,IAAI,mBAAmB,CAAC;AAC5D,IAAI,YAAY,MAAM;CACrB,CAAC,cAAc;CACf;CACA,YAAY,OAAO;EAClB,KAAKA,SAAS;CACf;;CAEA,SAAS;EACR,OAAO,KAAKA;CACb;CACA,WAAW;EACV,OAAO;CACR;CACA,SAAS;EACR,OAAO;CACR;CACA,UAAU;EACT,OAAO;CACR;CACA,CAAC,OAAO,eAAe;EACtB,OAAO;CACR;CACA,CAAC,OAAO,IAAI,4BAA4B,KAAK;EAC5C,OAAO;CACR;AACD;;;;;;AAMA,SAAS,eAAe,OAAO;CAC9B,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,UAAU,KAAK,CAAC,CAAC,gBAAgB;AACxF;;;;AChDA,SAAS,aAAa,OAAO;CAC5B,IAAI,UAAU,KAAK,GAAG,OAAO;CAC7B,IAAI,UAAU,MAAM,OAAO;CAC3B,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO;CACjC,IAAI,OAAO,UAAU,YAAY,OAAO;CACxC,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,OAAO,KAAK,OAAO;AACpB"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { n as Load } from "./graph-D2WMLL43-CeiC5wdy.mjs";
|
|
2
|
+
import { t as CliStructuredError } from "./errors-DI3TBXE-.mjs";
|
|
3
|
+
import "./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;EAClC,MAAM,OAAO,WAAW,IAAI,KAAK,QAAQ,qBAAqB,IAAI,IAAI;EACtE,KAAK,IAAI,QAAQ,IAAI,CAAC;EACtB,WAAW,IAAI,KAAK,UAAU,IAAI;CACnC;CACA,OAAO;AACR;AACA,SAAS,QAAQ,OAAO,SAAS;CAChC,MAAM,QAAQ,MAAM,MAAM,MAAM,UAAU,MAAM,OAAO,OAAO,CAAC,EAAE;CACjE,OAAO,OAAO,SAAS,aAAa,MAAM,QAAQ,KAAK;AACxD;AACA,SAAS,mBAAmB,OAAO;CAClC,OAAO;EACN,OAAO,MAAM,WAAW,KAAK,EAAE,QAAQ,UAAU,YAAY;GAC5D;GACA;GACA;EACD,EAAE;EACF,OAAO,OAAO,YAAY,MAAM,WAAW,KAAK,EAAE,eAAe,CAAC,UAAU,gBAAgB,QAAQ,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC;CACxH;AACD;AACA,MAAM,kBAAkB,MAAM,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC,MAAM,QAAQ,CAAC,MAAM,IAAI,GAAG,CAAC;AAC/E,SAAS,iBAAiB,SAAS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;AAGA,SAAS,SAAS,OAAO;CACxB,OAAO,OAAO,UAAU,YAAY,UAAU;AAC/C;AACA,SAAS,eAAe,OAAO;CAC9B,OAAO,SAAS,KAAK,KAAK,MAAM,YAAY;AAC7C;AACA,SAAS,gBAAgB,OAAO;CAC/B,IAAI,CAAC,SAAS,KAAK,GAAG,OAAO;CAC7B,QAAQ,MAAM,SAAd;EACC,KAAK,SAAS,OAAO,SAAS,MAAM,QAAQ;EAC5C,KAAK,UAAU,OAAO,OAAO,MAAM,YAAY;EAC/C,KAAK,UAAU,OAAO,SAAS,MAAM,SAAS,KAAK,OAAO,MAAM,SAAS,CAAC,YAAY;EACtF,SAAS,OAAO;CACjB;AACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { t as CliStructuredError } from "./errors-DI3TBXE-.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-bS1l9jIf-DRGbjw2D.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-bS1l9jIf.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,mDAA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