@prisma/composer 0.39.0-dev.11 → 0.39.0-dev.13
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-DriAu5RU-C8hYpR38.d.mts → app-config-Dhypzb6a-C3Kb0XtS.d.mts} +35 -63
- package/dist/app-config-Dhypzb6a-C3Kb0XtS.d.mts.map +1 -0
- package/dist/{app-converge-bS1l9jIf-DRGbjw2D.mjs → app-converge-CHMILMYi-JJnwJd2I.mjs} +5 -5
- package/dist/app-converge-CHMILMYi-JJnwJd2I.mjs.map +1 -0
- package/dist/config-D615fYD5.d.mts +1 -0
- package/dist/config.d.mts +3 -3
- package/dist/config.mjs +12 -2
- package/dist/config.mjs.map +1 -0
- package/dist/control.d.mts +236 -16
- package/dist/control.d.mts.map +1 -1
- package/dist/control.mjs +5 -5
- package/dist/control.mjs.map +1 -1
- package/dist/{converge-in-process-x89zb2MF-Dvj-J8xo.mjs → converge-in-process-CfeblFN9-B1KvX1Fa.mjs} +4 -4
- package/dist/{converge-in-process-x89zb2MF-Dvj-J8xo.mjs.map → converge-in-process-CfeblFN9-B1KvX1Fa.mjs.map} +1 -1
- package/dist/{converge-in-process-CTomEXaD-BnDylZP8.d.mts → converge-in-process-DZRf9uYm-Ohjvy0s_.d.mts} +6 -6
- package/dist/{converge-in-process-CTomEXaD-BnDylZP8.d.mts.map → converge-in-process-DZRf9uYm-Ohjvy0s_.d.mts.map} +1 -1
- package/dist/{deploy-DHgEJDpg.d.mts → deploy-CncPyRbo.d.mts} +4 -4
- package/dist/{deploy-DHgEJDpg.d.mts.map → deploy-CncPyRbo.d.mts.map} +1 -1
- package/dist/{deploy-CSU0kr4j.mjs → deploy-DPX4IXzF.mjs} +15 -43
- package/dist/deploy-DPX4IXzF.mjs.map +1 -0
- package/dist/deploy.d.mts +4 -4
- package/dist/deploy.mjs +3 -3
- package/dist/{dev-converge-messages-DML4rTz7-C_EAB5M_.mjs → dev-converge-messages-CElmPylA-BenEozC3.mjs} +7 -7
- package/dist/dev-converge-messages-CElmPylA-BenEozC3.mjs.map +1 -0
- package/dist/dev-converge-worker.mjs +3 -3
- package/dist/dev-converge-worker.mjs.map +1 -1
- package/dist/{dev-current-lAlj53eX-DrtBnAmA.mjs → dev-current-C7R8uqyQ-CM3PrTGG.mjs} +8 -19
- package/dist/dev-current-C7R8uqyQ-CM3PrTGG.mjs.map +1 -0
- package/dist/{dist-Cf_mZHaH.mjs → dist-Bw5O9TDx.mjs} +2 -2
- package/dist/{dist-Cf_mZHaH.mjs.map → dist-Bw5O9TDx.mjs.map} +1 -1
- package/dist/execute-deploy-destroy-BIRdFfwR-BjLOxnQd.mjs +476 -0
- package/dist/execute-deploy-destroy-BIRdFfwR-BjLOxnQd.mjs.map +1 -0
- package/dist/{execute-dev-DnVmNpc1-kSyPML7l.mjs → execute-dev-D9PxdbV3-CHISvcxU.mjs} +11 -15
- package/dist/execute-dev-D9PxdbV3-CHISvcxU.mjs.map +1 -0
- package/dist/{execute-dev-current-CZdmxVQ4-Bij2LeBY.mjs → execute-dev-current-BghQ0HLe-BC3mOHRQ.mjs} +4 -4
- package/dist/{execute-dev-current-CZdmxVQ4-Bij2LeBY.mjs.map → execute-dev-current-BghQ0HLe-BC3mOHRQ.mjs.map} +1 -1
- package/dist/{execute-log-Bl-j6izb-BTAo6tRM.mjs → execute-log-Bg7v1TBv-DigUuQSN.mjs} +4 -4
- package/dist/{execute-log-Bl-j6izb-BTAo6tRM.mjs.map → execute-log-Bg7v1TBv-DigUuQSN.mjs.map} +1 -1
- package/dist/{graph-D2WMLL43-CeiC5wdy.mjs → graph-BYo1OEqk-D5AtX8q4.mjs} +5 -5
- package/dist/graph-BYo1OEqk-D5AtX8q4.mjs.map +1 -0
- package/dist/{graph-CUYXjK8S-BzL-mhjq.d.mts → graph-CRFQxH8r-CI1p78T8.d.mts} +3 -3
- package/dist/graph-CRFQxH8r-CI1p78T8.d.mts.map +1 -0
- package/dist/{graph-types-D4PrtP-l-B0uuchTl.d.mts → graph-types-BeNeqIt4-LGyYX_Sm.d.mts} +9 -10
- package/dist/{graph-types-D4PrtP-l-B0uuchTl.d.mts.map → graph-types-BeNeqIt4-LGyYX_Sm.d.mts.map} +1 -1
- package/dist/http.d.mts +2 -2
- package/dist/http.mjs +2 -2
- package/dist/{index-D8chHe55.d.mts → index-DOJMK47O.d.mts} +3 -3
- package/dist/{index-D8chHe55.d.mts.map → index-DOJMK47O.d.mts.map} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/internal-converge.d.mts +4 -4
- package/dist/internal-converge.mjs +2 -2
- package/dist/{load-entry-CEoVBdMj-CHOz7jKf.mjs → load-entry-CEoVBdMj-L1mXTtEO.mjs} +5 -5
- package/dist/load-entry-CEoVBdMj-L1mXTtEO.mjs.map +1 -0
- package/dist/{local-target-7KRsLMDO.d.mts → local-target-DZFvgvVK.d.mts} +2 -2
- package/dist/{local-target-7KRsLMDO.d.mts.map → local-target-DZFvgvVK.d.mts.map} +1 -1
- package/dist/local-target.d.mts +2 -2
- package/dist/{nextjs-DLyeRR7M-CzUbvPaJ.d.mts → nextjs-DLyeRR7M-C2z32CtL.d.mts} +3 -3
- package/dist/{nextjs-DLyeRR7M-CzUbvPaJ.d.mts.map → nextjs-DLyeRR7M-C2z32CtL.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/{run-report-CmBz2-xc-Cc8rV1CX.mjs → run-report-HI2JqCSO-BWPG--nb.mjs} +5 -7
- package/dist/run-report-HI2JqCSO-BWPG--nb.mjs.map +1 -0
- package/dist/service-rpc.d.mts +2 -2
- package/dist/service-rpc.mjs +2 -2
- package/dist/steps-Det-FSAL-DRvo57Lf.mjs +174 -0
- package/dist/steps-Det-FSAL-DRvo57Lf.mjs.map +1 -0
- package/dist/testing.d.mts +1 -1
- package/dist/{validate-environment-DCZiNSlR-C7lv0cH1.mjs → validate-environment-BevPErw8-BDbXIt8U.mjs} +331 -9
- package/dist/validate-environment-BevPErw8-BDbXIt8U.mjs.map +1 -0
- package/package.json +11 -14
- package/skills/prisma-composer-core-concepts/SKILL.md +6 -23
- package/dist/app-config-DriAu5RU-C8hYpR38.d.mts.map +0 -1
- package/dist/app-configuration-file-D0rB5g65-CdMrjkCc.mjs +0 -186
- package/dist/app-configuration-file-D0rB5g65-CdMrjkCc.mjs.map +0 -1
- package/dist/app-converge-bS1l9jIf-DRGbjw2D.mjs.map +0 -1
- package/dist/config-Bpi8QVLB.d.mts +0 -1
- package/dist/deploy-CSU0kr4j.mjs.map +0 -1
- package/dist/deployment-summary-6LgQDUuu-Cu_6UNhc.d.mts +0 -33
- package/dist/deployment-summary-6LgQDUuu-Cu_6UNhc.d.mts.map +0 -1
- package/dist/deployment-summary-CVJZn2v0-Dz-gX1rp.mjs +0 -153
- package/dist/deployment-summary-CVJZn2v0-Dz-gX1rp.mjs.map +0 -1
- package/dist/dev-converge-messages-DML4rTz7-C_EAB5M_.mjs.map +0 -1
- package/dist/dev-current-lAlj53eX-DrtBnAmA.mjs.map +0 -1
- package/dist/execute-deploy-destroy-DN16ETAk-BaopEKsA.mjs +0 -855
- package/dist/execute-deploy-destroy-DN16ETAk-BaopEKsA.mjs.map +0 -1
- package/dist/execute-dev-DnVmNpc1-kSyPML7l.mjs.map +0 -1
- package/dist/graph-CUYXjK8S-BzL-mhjq.d.mts.map +0 -1
- package/dist/graph-D2WMLL43-CeiC5wdy.mjs.map +0 -1
- package/dist/internal-app-configuration-file.d.mts +0 -16
- package/dist/internal-app-configuration-file.d.mts.map +0 -1
- package/dist/internal-app-configuration-file.mjs +0 -2
- package/dist/load-entry-CEoVBdMj-CHOz7jKf.mjs.map +0 -1
- package/dist/preflight-transport-2d6iIchu-B-v7Di6I.mjs +0 -90
- package/dist/preflight-transport-2d6iIchu-B-v7Di6I.mjs.map +0 -1
- package/dist/redaction-DY6eDC12-W-FzW7_r.mjs +0 -339
- package/dist/redaction-DY6eDC12-W-FzW7_r.mjs.map +0 -1
- package/dist/redaction-Dn7BRdaP-BcLSPhLV.d.mts +0 -232
- package/dist/redaction-Dn7BRdaP-BcLSPhLV.d.mts.map +0 -1
- package/dist/report.d.mts +0 -19
- package/dist/report.d.mts.map +0 -1
- package/dist/report.mjs +0 -97
- package/dist/report.mjs.map +0 -1
- package/dist/run-report-CmBz2-xc-Cc8rV1CX.mjs.map +0 -1
- package/dist/steps-BZXNqW6U-C_ME2VLd.mjs +0 -112
- package/dist/steps-BZXNqW6U-C_ME2VLd.mjs.map +0 -1
- package/dist/validate-environment-DCZiNSlR-C7lv0cH1.mjs.map +0 -1
- package/src/exports/internal-app-configuration-file.ts +0 -1
- package/src/exports/report.ts +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as SecretBox, i as isSecretPointer, n as Pointer, o as SecretString, r as isPlainPointer, s as isSecretString, t as PlainPointer } from "./pointer-BX2KJ720-BxcfpaHP.mjs";
|
|
2
|
-
import { $ as ResourceProps, A as LoadOptions, At as provisionNeed, B as ParamBindings, C as HydratedDeps, Ct as isSecretSource, D as InputRef, Dt as number, E as InputBindingUse, Et as module, F as ModuleNode, Ft as slotsOf, G as PortEndpoint, H as ParamSourceOptions, I as ModuleOutputs, It as string, J as RESOURCE_OUT_PORT, K as ProvisionNeed, L as NODE, Lt as valueResource, M as ModuleContext, Mt as resource, N as ModuleInput, Nt as secretSource, O as InputValueOf, Ot as param, P as ModuleInputField, Pt as service, Q as ResourceNodeBase, R as NodeId, S as Hydrated, St as isProvisionNeed, T as InputBindingOf, Tt as isValueResource, U as Params, V as ParamSource, W as PlainData, X as RefPort, Y as RealValuesOf, Z as ResourceNode, _ as EnvironmentFacts, _t as dependency, a as BoundaryPort, at as SecretSourceOptions, b as GraphCheckError, bt as isNode, c as ConfigDeclaration, ct as SourceOptions, d as Contract, dt as Value, et as ResourcePropsMember, f as ContractStyle, ft as ValueRead, g as Edge, gt as configOf, h as Deps, ht as appRoot, i as AuthoredEdge, it as SecretSource, j as ModuleBuilder, jt as resolve, k as LoadError, kt as paramSource, l as ConfigParam, lt as SourceValue, m as DependencyEnd, mt as Values, n as AppRootContext, nt as RunnableServiceNode, o as BuildAdapter, ot as SecretSourceUse, p as DepBindings, pt as ValueResourceNode, q as ProvisionedRef, r as AppRootNode, rt as RuntimeValue, s as Config, st as ServiceNode, t as AppConfigurationRead, tt as RootInputField, u as Connection, ut as VALUE_RESOURCE, v as Expose, vt as freezeNode, w as InputBinding, wt as isValue, x as GraphNode, xt as isParamSource, y as Graph, yt as inputManifest, z as ParamBinding } from "./graph-types-
|
|
3
|
-
import { n as assertAppName, t as Load } from "./graph-
|
|
4
|
-
import { n as hydrateSync, t as hydrate } from "./index-
|
|
2
|
+
import { $ as ResourceProps, A as LoadOptions, At as provisionNeed, B as ParamBindings, C as HydratedDeps, Ct as isSecretSource, D as InputRef, Dt as number, E as InputBindingUse, Et as module, F as ModuleNode, Ft as slotsOf, G as PortEndpoint, H as ParamSourceOptions, I as ModuleOutputs, It as string, J as RESOURCE_OUT_PORT, K as ProvisionNeed, L as NODE, Lt as valueResource, M as ModuleContext, Mt as resource, N as ModuleInput, Nt as secretSource, O as InputValueOf, Ot as param, P as ModuleInputField, Pt as service, Q as ResourceNodeBase, R as NodeId, S as Hydrated, St as isProvisionNeed, T as InputBindingOf, Tt as isValueResource, U as Params, V as ParamSource, W as PlainData, X as RefPort, Y as RealValuesOf, Z as ResourceNode, _ as EnvironmentFacts, _t as dependency, a as BoundaryPort, at as SecretSourceOptions, b as GraphCheckError, bt as isNode, c as ConfigDeclaration, ct as SourceOptions, d as Contract, dt as Value, et as ResourcePropsMember, f as ContractStyle, ft as ValueRead, g as Edge, gt as configOf, h as Deps, ht as appRoot, i as AuthoredEdge, it as SecretSource, j as ModuleBuilder, jt as resolve, k as LoadError, kt as paramSource, l as ConfigParam, lt as SourceValue, m as DependencyEnd, mt as Values, n as AppRootContext, nt as RunnableServiceNode, o as BuildAdapter, ot as SecretSourceUse, p as DepBindings, pt as ValueResourceNode, q as ProvisionedRef, r as AppRootNode, rt as RuntimeValue, s as Config, st as ServiceNode, t as AppConfigurationRead, tt as RootInputField, u as Connection, ut as VALUE_RESOURCE, v as Expose, vt as freezeNode, w as InputBinding, wt as isValue, x as GraphNode, xt as isParamSource, y as Graph, yt as inputManifest, z as ParamBinding } from "./graph-types-BeNeqIt4-LGyYX_Sm.mjs";
|
|
3
|
+
import { n as assertAppName, t as Load } from "./graph-CRFQxH8r-CI1p78T8.mjs";
|
|
4
|
+
import { n as hydrateSync, t as hydrate } from "./index-DOJMK47O.mjs";
|
|
5
5
|
export { type AppConfigurationRead, type AppRootContext, type AppRootNode, type AuthoredEdge, type BoundaryPort, type BuildAdapter, type Config, type ConfigDeclaration, type ConfigParam, type Connection, type Contract, type ContractStyle, type DepBindings, type DependencyEnd, type Deps, type Edge, type EnvironmentFacts, type Expose, type Graph, GraphCheckError, type GraphNode, type Hydrated, type HydratedDeps, type InputBinding, type InputBindingOf, type InputBindingUse, type InputRef, type InputValueOf, Load, LoadError, type LoadOptions, type ModuleBuilder, type ModuleContext, type ModuleInput, type ModuleInputField, type ModuleNode, type ModuleOutputs, type NODE, type NodeId, type ParamBinding, type ParamBindings, type ParamSource, type ParamSourceOptions, type Params, type PlainData, type PlainPointer, type Pointer, type PortEndpoint, type ProvisionNeed, type ProvisionedRef, RESOURCE_OUT_PORT, type RealValuesOf, type RefPort, type ResourceNode, ResourceNodeBase, type ResourceProps, type ResourcePropsMember, type RootInputField, type RunnableServiceNode, type RuntimeValue, SecretBox, type SecretSource, type SecretSourceOptions, type SecretSourceUse, type SecretString, type ServiceNode, type SourceOptions, type SourceValue, type VALUE_RESOURCE, type Value, type ValueRead, type ValueResourceNode, type Values, appRoot, assertAppName, configOf, dependency, freezeNode, hydrate, hydrateSync, inputManifest, isNode, isParamSource, isPlainPointer, isProvisionNeed, isSecretPointer, isSecretSource, isSecretString, isValue, isValueResource, module, number, param, paramSource, provisionNeed, resolve, resource, secretSource, service, slotsOf, string, valueResource };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { a as isPlainPointer, n as SecretBox, o as isSecretPointer, r as isSecretString } from "./describe-kind-Cpm_euxo-DsSPENQa.mjs";
|
|
2
|
-
import { C as resolve, D as service, O as slotsOf, S as provisionNeed, T as secretSource, _ as isValueResource, c as assertAppName, d as isNode, f as isParamSource, g as isValue, h as isSecretSource, i as RESOURCE_OUT_PORT, k as valueResource, l as dependency, m as isProvisionNeed, n as Load, o as ResourceNodeBase, r as LoadError, s as appRoot, t as GraphCheckError, u as freezeNode, v as module, w as resource, x as paramSource } from "./graph-
|
|
3
|
-
import { a as number, i as inputManifest, n as hydrate, o as param, r as hydrateSync, s as string, t as configOf } from "./dist-
|
|
2
|
+
import { C as resolve, D as service, O as slotsOf, S as provisionNeed, T as secretSource, _ as isValueResource, c as assertAppName, d as isNode, f as isParamSource, g as isValue, h as isSecretSource, i as RESOURCE_OUT_PORT, k as valueResource, l as dependency, m as isProvisionNeed, n as Load, o as ResourceNodeBase, r as LoadError, s as appRoot, t as GraphCheckError, u as freezeNode, v as module, w as resource, x as paramSource } from "./graph-BYo1OEqk-D5AtX8q4.mjs";
|
|
3
|
+
import { a as number, i as inputManifest, n as hydrate, o as param, r as hydrateSync, s as string, t as configOf } from "./dist-Bw5O9TDx.mjs";
|
|
4
4
|
export { GraphCheckError, Load, LoadError, RESOURCE_OUT_PORT, ResourceNodeBase, SecretBox, appRoot, assertAppName, configOf, dependency, freezeNode, hydrate, hydrateSync, inputManifest, isNode, isParamSource, isPlainPointer, isProvisionNeed, isSecretPointer, isSecretSource, isSecretString, isValue, isValueResource, module, number, param, paramSource, provisionNeed, resolve, resource, secretSource, service, slotsOf, string, valueResource };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./deploy-
|
|
3
|
-
import { a as ConvergeRequest, i as ConvergeOutcome, n as ConvergeEvent, o as LoweredStack, r as ConvergeFailureReason, s as convergeInProcess, t as Converge } from "./converge-in-process-
|
|
4
|
-
import { n as localTargetProviders, t as devState } from "./local-target-
|
|
1
|
+
import { ht as lower } from "./app-config-Dhypzb6a-C3Kb0XtS.mjs";
|
|
2
|
+
import "./deploy-CncPyRbo.mjs";
|
|
3
|
+
import { a as ConvergeRequest, i as ConvergeOutcome, n as ConvergeEvent, o as LoweredStack, r as ConvergeFailureReason, s as convergeInProcess, t as Converge } from "./converge-in-process-DZRf9uYm-Ohjvy0s_.mjs";
|
|
4
|
+
import { n as localTargetProviders, t as devState } from "./local-target-DZFvgvVK.mjs";
|
|
5
5
|
export { type Converge, type ConvergeEvent, type ConvergeFailureReason, type ConvergeOutcome, type ConvergeRequest, type LoweredStack, convergeInProcess, devState, localTargetProviders, lower };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as lower } from "./deploy-
|
|
2
|
-
import { t as convergeInProcess } from "./converge-in-process-
|
|
1
|
+
import { c as lower } from "./deploy-DPX4IXzF.mjs";
|
|
2
|
+
import { t as convergeInProcess } from "./converge-in-process-CfeblFN9-B1KvX1Fa.mjs";
|
|
3
3
|
import { n as localTargetProviders, t as devState } from "./local-target-DhU1vaxd.mjs";
|
|
4
4
|
export { convergeInProcess, devState, localTargetProviders, lower };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as blindCast } from "./casts-DpaahrlC-C5XMnP9S.mjs";
|
|
2
|
-
import { d as isNode } from "./graph-
|
|
2
|
+
import { d as isNode } from "./graph-BYo1OEqk-D5AtX8q4.mjs";
|
|
3
3
|
import { t as CliStructuredError } from "./errors-DI3TBXE-.mjs";
|
|
4
|
-
import "./dist-
|
|
4
|
+
import "./dist-Bw5O9TDx.mjs";
|
|
5
5
|
import * as mod from "node:module";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
7
7
|
import * as fs$1 from "node:fs";
|
|
8
8
|
import { existsSync, statSync } from "node:fs";
|
|
9
9
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
10
|
-
//#region ../../0-framework/3-tooling/cli/dist/composer-config-
|
|
10
|
+
//#region ../../0-framework/3-tooling/cli/dist/composer-config-aL0W4HPG.mjs
|
|
11
11
|
/**
|
|
12
12
|
* What makes a `composer` section valid, shared by the CLI's section validator and the programmatic operations.
|
|
13
13
|
* It imports nothing from the CLI engine, because `@prisma/composer` must not depend on it.
|
|
@@ -22,7 +22,7 @@ const RETIRED_FILE_NAMES = [
|
|
|
22
22
|
"mjs",
|
|
23
23
|
"js"
|
|
24
24
|
].map((extension) => `prisma-composer.config.${extension}`);
|
|
25
|
-
/** What
|
|
25
|
+
/** What `prisma dev`'s converge worker throws when the file it imports has no `composer` export. */
|
|
26
26
|
function noComposerExportMessage(configFile) {
|
|
27
27
|
return `${configFile} declares no \`composer\` section. Pass the prisma.config.ts that declares it.`;
|
|
28
28
|
}
|
|
@@ -524,4 +524,4 @@ async function loadEntry(entryArg, cwd, unloadableFix, recorded) {
|
|
|
524
524
|
//#endregion
|
|
525
525
|
export { checkComposerConfig as a, noComposerExportMessage as c, registerEntryResolution as i, loadEntry as n, configFileMissing as o, namesDirectoryWithIndex as r, entryMissing as s, appFilesNamedBy as t };
|
|
526
526
|
|
|
527
|
-
//# sourceMappingURL=load-entry-CEoVBdMj-
|
|
527
|
+
//# sourceMappingURL=load-entry-CEoVBdMj-L1mXTtEO.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-entry-CEoVBdMj-L1mXTtEO.mjs","names":["fs","path","path"],"sources":["../../../0-framework/3-tooling/cli/dist/composer-config-aL0W4HPG.mjs","../../../0-framework/3-tooling/cli/dist/load-entry-CEoVBdMj.mjs"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\n//#region src/composer-config.ts\n/**\n* What makes a `composer` section valid, shared by the CLI's section validator and the programmatic operations.\n* It imports nothing from the CLI engine, because `@prisma/composer` must not depend on it.\n*/\nconst SECTION_FIX = \"Write `composer: composer({ entry: './module.ts', extensions: [...], state: ... })` in prisma.config.ts, with `import { defineConfig as composer } from '@prisma/composer/config'`.\";\nconst MOVE_TO_SECTION_FIX = `${SECTION_FIX} If the project has a prisma-composer.config.ts, move its extensions and state into that section and delete the file.`;\nconst SECTION_IS_THE_ONLY_SOURCE = \"Composer reads its configuration only from the `composer` section of prisma.config.ts.\";\nconst DESCRIPTOR_FIX = \"Use the descriptor the extension factory returns, unchanged, instead of building one by hand.\";\nconst RETIRED_FILE_NAMES = [\n\t\"ts\",\n\t\"mts\",\n\t\"mjs\",\n\t\"js\"\n].map((extension) => `prisma-composer.config.${extension}`);\nconst sectionMissing = {\n\tcode: \"CONFIG.SECTION_MISSING\",\n\tsummary: \"No loaded prisma.config.ts declares a `composer` section.\",\n\twhy: `${SECTION_IS_THE_ONLY_SOURCE} A prisma-composer.config.ts file is no longer read.`,\n\tfix: MOVE_TO_SECTION_FIX\n};\n/** What `prisma dev`'s converge worker throws when the file it imports has no `composer` export. */\nfunction noComposerExportMessage(configFile) {\n\treturn `${configFile} declares no \\`composer\\` section. Pass the prisma.config.ts that declares it.`;\n}\nfunction configFileMissing(file) {\n\treturn {\n\t\tcode: \"CONFIG.FILE_MISSING\",\n\t\tsummary: `${file} does not exist.`,\n\t\tfix: \"Pass the path of the prisma.config.ts that declares the `composer` section.\",\n\t\twhere: file\n\t};\n}\n/** A prisma-composer.config.* beside the declaring file would otherwise be silently ignored. */\n/** The path with symlinks resolved; the path itself when it cannot be resolved, so the check never throws. */\nfunction realPath(file) {\n\ttry {\n\t\treturn fs.realpathSync(file);\n\t} catch {\n\t\treturn file;\n\t}\n}\nfunction retiredFileFinding(configFile) {\n\tconst directory = path.dirname(realPath(configFile));\n\tconst found = RETIRED_FILE_NAMES.map((name) => path.join(directory, name)).find((file) => fs.existsSync(file));\n\tif (found === void 0) return void 0;\n\treturn {\n\t\tcode: \"CONFIG.FILE_RETIRED\",\n\t\tsummary: `${found} is no longer read.`,\n\t\twhy: SECTION_IS_THE_ONLY_SOURCE,\n\t\tfix: MOVE_TO_SECTION_FIX,\n\t\twhere: found\n\t};\n}\nfunction isObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction isExtensionDescriptor(value) {\n\treturn isObject(value) && typeof value[\"id\"] === \"string\" && value[\"id\"].length > 0 && isObject(value[\"nodes\"]);\n}\nfunction isStateDescriptor(value) {\n\treturn isObject(value) && typeof value[\"extension\"] === \"string\" && typeof value[\"create\"] === \"function\";\n}\nconst stateInvalid = {\n\tcode: \"CONFIG.FIELD_INVALID\",\n\tsummary: \"`composer.state` must be a state descriptor with a string `extension` and a `create` function.\",\n\tfix: \"Set `state` to the state descriptor an extension provides, e.g. `state: prismaState()`.\",\n\tfield: \"state\"\n};\nconst SECTION_FIELDS = /* @__PURE__ */ new Set([\n\t\"entry\",\n\t\"extensions\",\n\t\"state\",\n\t\"config\",\n\t\"secrets\"\n]);\nconst entryInvalid = {\n\tcode: \"CONFIG.FIELD_INVALID\",\n\tsummary: \"`composer.entry` must be a non-empty string: the path to the module whose default export is the app.\",\n\tfix: \"Set `entry` to that module's path, relative to prisma.config.ts, e.g. `entry: './module.ts'`.\",\n\tfield: \"entry\"\n};\n/** Neither the section's `entry` nor an override names the module whose default export is the app. */\nconst entryMissing = {\n\tcode: \"CONFIG.ENTRY_MISSING\",\n\tsummary: \"No entry module is set, so there is no app to load.\",\n\twhy: \"The entry is the module whose default export is the app root, built with appRoot(...).\",\n\tfix: \"Set `entry: './module.ts'` in the `composer` section of prisma.config.ts, or pass `--entry <path>` (the `entry` input when calling @prisma/composer/control).\",\n\tfield: \"entry\"\n};\nfunction unknownField(key) {\n\treturn {\n\t\tcode: \"CONFIG.FIELD_UNKNOWN\",\n\t\tsummary: `The \\`composer\\` section has no field \\`${key}\\`.`,\n\t\tfix: key === \"composer\" ? \"Pass the `composer` property of the prisma.config.ts export, not the whole export. The section takes only `entry`, `extensions`, `state`, `config` and `secrets`.\" : `Remove \\`${key}\\`. The section takes only \\`entry\\`, \\`extensions\\`, \\`state\\`, \\`config\\` and \\`secrets\\`.`,\n\t\tfield: key\n\t};\n}\nfunction checkExtensions(value) {\n\tif (!Array.isArray(value)) return {\n\t\textensions: [],\n\t\tfindings: [{\n\t\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\t\tsummary: \"`composer.extensions` must be an array of extension descriptors.\",\n\t\t\tfix: \"Set `extensions` to the descriptors your extensions provide, e.g. `extensions: [nodeBuild()]`.\",\n\t\t\tfield: \"extensions\"\n\t\t}]\n\t};\n\tconst findings = [];\n\tconst extensions = [];\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const [index, entry] of value.entries()) {\n\t\tconst field = `extensions[${index}]`;\n\t\tif (!isObject(entry)) {\n\t\t\tfindings.push({\n\t\t\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\t\t\tsummary: `\\`composer.${field}\\` must be an extension descriptor object.`,\n\t\t\t\tfix: \"Put the descriptor an extension factory returns here, e.g. `nodeBuild()`, not the factory itself.\",\n\t\t\t\tfield\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst id = entry[\"id\"];\n\t\tif (typeof id !== \"string\" || id.length === 0) findings.push({\n\t\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\t\tsummary: `\\`composer.${field}.id\\` must be a non-empty string (the extension package name).`,\n\t\t\tfix: DESCRIPTOR_FIX,\n\t\t\tfield: `${field}.id`\n\t\t});\n\t\telse if (seen.has(id)) findings.push({\n\t\t\tcode: \"CONFIG.EXTENSION_DUPLICATE\",\n\t\t\tsummary: `Extension \"${id}\" is listed more than once in \\`composer.extensions\\`.`,\n\t\t\tfix: `Remove the repeated \"${id}\" entry from \\`extensions\\`.`,\n\t\t\tfield: `${field}.id`\n\t\t});\n\t\telse seen.add(id);\n\t\tif (!isObject(entry[\"nodes\"])) findings.push({\n\t\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\t\tsummary: `\\`composer.${field}.nodes\\` must be an object (the node-ID → control registry).`,\n\t\t\tfix: DESCRIPTOR_FIX,\n\t\t\tfield: `${field}.nodes`\n\t\t});\n\t\tif (isExtensionDescriptor(entry)) extensions.push(entry);\n\t}\n\treturn {\n\t\tfindings,\n\t\textensions\n\t};\n}\nfunction isAdapterList(value) {\n\treturn Array.isArray(value) && value.every((entry) => typeof entry === \"function\");\n}\nfunction checkAdapters(list, value) {\n\tif (value === void 0) return [];\n\tif (!Array.isArray(value)) return [{\n\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\tsummary: `\\`composer.${list}\\` must be an array of adapters.`,\n\t\tfix: `Set \\`${list}\\` to a list of adapters, e.g. \\`${list}: [dotenv(), environmentVariables()]\\`, imported from '@prisma/composer/config'.`,\n\t\tfield: list\n\t}];\n\treturn value.flatMap((entry, index) => typeof entry === \"function\" ? [] : [{\n\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\tsummary: `\\`composer.${list}[${index}]\\` must be an adapter: a function that receives the environment and returns its values.`,\n\t\tfix: \"Put an adapter here, e.g. `dotenv()`.\",\n\t\tfield: `${list}[${index}]`\n\t}]);\n}\nfunction checkFields(section) {\n\tif (Object.hasOwn(section, \"configPath\")) return {\n\t\tok: false,\n\t\tfindings: [{\n\t\t\tcode: \"CONFIG.FIELD_RETIRED\",\n\t\t\tsummary: \"`composer.configPath` is no longer supported: prisma-composer.config.ts is no longer read.\",\n\t\t\twhy: SECTION_IS_THE_ONLY_SOURCE,\n\t\t\tfix: `Replace \\`configPath\\` with the section itself. ${MOVE_TO_SECTION_FIX}`,\n\t\t\tfield: \"configPath\"\n\t\t}]\n\t};\n\tif (Object.hasOwn(section, \"composer\")) return {\n\t\tok: false,\n\t\tfindings: [unknownField(\"composer\")]\n\t};\n\tconst findings = Object.keys(section).filter((key) => !SECTION_FIELDS.has(key)).map(unknownField);\n\tconst checked = checkExtensions(section[\"extensions\"]);\n\tfindings.push(...checked.findings);\n\tconst state = section[\"state\"];\n\tif (!isStateDescriptor(state)) findings.push(stateInvalid);\n\tconst entry = section[\"entry\"];\n\tconst entryValid = entry === void 0 || typeof entry === \"string\" && entry.length > 0;\n\tif (!entryValid) findings.push(entryInvalid);\n\tconst config = section[\"config\"];\n\tconst secrets = section[\"secrets\"];\n\tfindings.push(...checkAdapters(\"config\", config), ...checkAdapters(\"secrets\", secrets));\n\tconst [first, ...rest] = findings;\n\tif (first === void 0 && isStateDescriptor(state) && entryValid && (config === void 0 || isAdapterList(config)) && (secrets === void 0 || isAdapterList(secrets))) return {\n\t\tok: true,\n\t\tvalue: {\n\t\t\textensions: checked.extensions,\n\t\t\tstate,\n\t\t\t...entry === void 0 ? {} : { entry },\n\t\t\t...config === void 0 ? {} : { config },\n\t\t\t...secrets === void 0 ? {} : { secrets }\n\t\t}\n\t};\n\treturn {\n\t\tok: false,\n\t\tfindings: [first ?? stateInvalid, ...rest]\n\t};\n}\n/**\n* Checks the fields that identify each descriptor and returns the descriptors as the config file's own objects.\n* Never throws: a section's values are user code, and a throwing getter or Proxy trap becomes a finding.\n*/\nfunction checkComposerSection(raw) {\n\tif (!isObject(raw)) return {\n\t\tok: false,\n\t\tfindings: [{\n\t\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\t\tsummary: \"The `composer` section of prisma.config.ts must be an object.\",\n\t\t\tfix: SECTION_FIX\n\t\t}]\n\t};\n\ttry {\n\t\treturn checkFields({ ...raw });\n\t} catch (cause) {\n\t\treturn {\n\t\t\tok: false,\n\t\t\tfindings: [{\n\t\t\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\t\t\tsummary: \"The `composer` section of prisma.config.ts could not be read.\",\n\t\t\t\twhy: `Reading it threw: ${cause instanceof Error ? cause.message : String(cause)}`,\n\t\t\t\tfix: SECTION_FIX\n\t\t\t}]\n\t\t};\n\t}\n}\n/**\n* The whole check, shared by the section validator and the programmatic operations so both report the same findings in the same order: the retired file beside the declaring `configFile` (resolved through symlinks), then every field finding.\n*/\nfunction checkComposerConfig(raw, configFile) {\n\tconst retired = retiredFileFinding(configFile);\n\tconst checked = checkComposerSection(raw);\n\tif (retired === void 0) return checked;\n\treturn {\n\t\tok: false,\n\t\tfindings: checked.ok ? [retired] : [retired, ...checked.findings]\n\t};\n}\n//#endregion\nexport { sectionMissing as a, noComposerExportMessage as i, configFileMissing as n, entryMissing as r, checkComposerConfig as t };\n\n//# sourceMappingURL=composer-config-aL0W4HPG.mjs.map","import * as mod from \"node:module\";\nimport { existsSync, statSync } from \"node:fs\";\nimport * as path from \"node:path\";\nimport { isNode } from \"@internal/core\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport { fileURLToPath, pathToFileURL } from \"node:url\";\nimport { blindCast } from \"@internal/foundation/casts\";\n//#region src/entry-resolution.ts\n/**\n* Synchronous Node resolve hook so that entry modules may import relative\n* files using the specifier forms TypeScript accepts by default —\n* extensionless `./service` and `./service.js` for a `.ts` source file —\n* without requiring `allowImportingTsExtensions` in every consumer's tsconfig.\n*\n* Resolution only; uses TypeScript's own documented mapping: for a specifier\n* Node could not resolve, strip any JS-family extension and probe the\n* corresponding TypeScript source; first candidate that exists on disk wins.\n* Format-specific rules: `.mjs` → `.mts`; `.cjs` → `.cts`; `.js` and\n* extensionless → `.ts`, `.mts`, `.tsx`, then `./index.ts`. Bare and package\n* specifiers are never touched. Existing `./x.ts` imports keep working —\n* Node resolves them before the hook fires (ADR-0005: no transform, no\n* guessing, deterministic TypeScript rule).\n*\n* Bun resolves `./x.js` and `./x` to `x.ts` natively, so the hook is a\n* no-op under Bun. Nothing is registered there.\n*\n* The hook also observes, without changing anything: `recordAppFiles` uses\n* it to learn which app files an entry import loaded.\n*/\nlet registered = false;\nlet recording;\n/** An app file: a `file:` module outside every `node_modules` directory. */\nfunction appFile(url) {\n\tif (!url.startsWith(\"file:\")) return void 0;\n\tconst file = fileURLToPath(url);\n\treturn file.split(path.sep).includes(\"node_modules\") ? void 0 : file;\n}\nfunction record(url) {\n\tconst file = recording === void 0 ? void 0 : appFile(url);\n\tif (file !== void 0) recording?.add(file);\n}\n/**\n* Runs `load` and returns the app files it imported: every module outside\n* `node_modules` that the runtime loaded for the first time while it ran,\n* static and dynamic imports alike. Under Node the resolve hook records them;\n* under Bun they are the modules `require.cache` gained, which includes ES\n* modules. A module already loaded before `load` started, and what only it\n* imports, is not recorded. Each file is also added to `recorded` as it is\n* found, so a caller still has them when `load` throws.\n*/\nasync function recordAppFiles(load, recorded = /* @__PURE__ */ new Set()) {\n\tif (typeof process.versions.bun === \"string\") {\n\t\tconst cache = mod.createRequire(import.meta.url).cache;\n\t\tconst before = new Set(Object.keys(cache));\n\t\tconst files = [];\n\t\ttry {\n\t\t\treturn {\n\t\t\t\tvalue: await load(),\n\t\t\t\tfiles\n\t\t\t};\n\t\t} finally {\n\t\t\tfor (const key of Object.keys(cache)) {\n\t\t\t\tif (before.has(key) || !path.isAbsolute(key)) continue;\n\t\t\t\tif (key.split(path.sep).includes(\"node_modules\")) continue;\n\t\t\t\tfiles.push(key);\n\t\t\t\trecorded.add(key);\n\t\t\t}\n\t\t}\n\t}\n\tregisterEntryResolution();\n\tconst files = /* @__PURE__ */ new Set();\n\trecording = files;\n\ttry {\n\t\treturn {\n\t\t\tvalue: await load(),\n\t\t\tfiles: [...files]\n\t\t};\n\t} finally {\n\t\trecording = void 0;\n\t\tfor (const file of files) recorded.add(file);\n\t}\n}\n/** The path of a `file:` URL, or `undefined` for one that names no local file, such as one with a host. */\nfunction pathOfFileUrl(url) {\n\ttry {\n\t\treturn fileURLToPath(url);\n\t} catch {\n\t\treturn;\n\t}\n}\n/**\n* The app files an import error names: the module that could not be found, or the file that did\n* not parse, when the runtime says which. A module that could not be found comes with every file\n* the resolve hook would try for it, since the user may create any of them. A directory is never\n* returned: in its place come the files the hook would try inside it. Follows `cause`.\n*/\nfunction appFilesNamedBy(error) {\n\tconst named = appPathNamedBy(error);\n\treturn named === void 0 ? [] : filesFor(named);\n}\n/** Whether an import error names a directory of the app that holds an `index.ts`, which the import should have loaded. */\nfunction namesDirectoryWithIndex(error) {\n\tconst named = appPathNamedBy(error);\n\treturn named !== void 0 && isDirectory(named) && filesFor(named).some(existsSync);\n}\nfunction appPathNamedBy(error) {\n\tconst visited = /* @__PURE__ */ new Set();\n\tfor (let current = error; typeof current === \"object\" && current !== null;) {\n\t\tif (visited.has(current)) break;\n\t\tvisited.add(current);\n\t\tconst named = fileNamedBy(current);\n\t\tif (named !== void 0 && !named.split(path.sep).includes(\"node_modules\")) return path.resolve(named);\n\t\tcurrent = \"cause\" in current ? current.cause : void 0;\n\t}\n}\nfunction filesFor(named) {\n\tconst candidates = () => sourceCandidates(pathToFileURL(named)).map((url) => fileURLToPath(url));\n\tif (isDirectory(named)) return candidates().filter((candidate) => candidate.startsWith(named + path.sep));\n\tif (existsSync(named)) return [named];\n\treturn [named, ...candidates()];\n}\nfunction isDirectory(file) {\n\ttry {\n\t\treturn statSync(file).isDirectory();\n\t} catch {\n\t\treturn false;\n\t}\n}\nfunction fileNamedBy(error) {\n\tif (\"url\" in error && typeof error.url === \"string\" && error.url.startsWith(\"file:\")) return pathOfFileUrl(error.url);\n\tif (\"specifier\" in error && typeof error.specifier === \"string\" && \"referrer\" in error && typeof error.referrer === \"string\" && isRelativeSpecifier(error.specifier)) {\n\t\tconst referrer = error.referrer.startsWith(\"file:\") ? pathOfFileUrl(error.referrer) : error.referrer;\n\t\treturn referrer === void 0 ? void 0 : path.resolve(path.dirname(referrer), error.specifier);\n\t}\n\tif (\"position\" in error && typeof error.position === \"object\" && error.position !== null && \"file\" in error.position && typeof error.position.file === \"string\" && path.isAbsolute(error.position.file)) return error.position.file;\n}\n/**\n* Registers the resolve hook once (idempotent). Call at the start of\n* `loadEntry` so every module in the entry graph benefits, including those\n* imported lazily after the entry itself loads.\n*/\nfunction registerEntryResolution() {\n\tif (registered || typeof process.versions.bun === \"string\") return;\n\tif (typeof mod.registerHooks !== \"function\") return;\n\tregistered = true;\n\tmod.registerHooks({ resolve(specifier, context, nextResolve) {\n\t\ttry {\n\t\t\tconst resolved = nextResolve(specifier, context);\n\t\t\trecord(resolved.url);\n\t\t\treturn resolved;\n\t\t} catch (error) {\n\t\t\tif (!isRelativeSpecifier(specifier) || context.parentURL === void 0 || !isModuleNotFoundError(error)) throw error;\n\t\t\tfor (const candidate of sourceCandidates(new URL(specifier, context.parentURL))) if (existsSync(fileURLToPath(candidate))) {\n\t\t\t\tconst resolved = nextResolve(candidate.href, context);\n\t\t\t\trecord(resolved.url);\n\t\t\t\treturn resolved;\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t} });\n}\n/**\n* TypeScript's extension mapping: for a JS-family or extensionless URL,\n* produce the source candidates to probe. Format-specific: `.mjs` maps only\n* to `.mts`; `.cjs` maps only to `.cts`; `.js` and extensionless probe\n* `.ts`, `.mts`, `.tsx` (keeping `.tsx` so the JSX diagnostic fires), then\n* `./index.ts`. A URL that already has a TypeScript extension has none.\n*/\nfunction sourceCandidates(resolved) {\n\tconst href = resolved.href;\n\tif (/\\.(ts|mts|cts|tsx)$/.test(href)) return [];\n\tif (href.endsWith(\".mjs\")) {\n\t\tconst base = href.slice(0, -4);\n\t\treturn [new URL(`${base}.mts`)];\n\t}\n\tif (href.endsWith(\".cjs\")) {\n\t\tconst base = href.slice(0, -4);\n\t\treturn [new URL(`${base}.cts`)];\n\t}\n\tconst base = href.endsWith(\".js\") ? href.slice(0, -3) : href;\n\treturn [\n\t\tnew URL(`${base}.ts`),\n\t\tnew URL(`${base}.mts`),\n\t\tnew URL(`${base}.tsx`),\n\t\tnew URL(`${base}/index.ts`)\n\t];\n}\nfunction isRelativeSpecifier(specifier) {\n\treturn specifier === \".\" || specifier === \"..\" || specifier.startsWith(\"./\") || specifier.startsWith(\"../\");\n}\nfunction isModuleNotFoundError(error) {\n\tif (!(error instanceof Error)) return false;\n\tif (!(\"code\" in error)) return false;\n\treturn error.code === \"ERR_MODULE_NOT_FOUND\";\n}\n//#endregion\n//#region src/jsx-load-error.ts\n/**\n* `loadEntry` imports a user's topology with the host runtime's own module\n* loader — under node (the CLI's shebang runtime), that loader strips\n* TypeScript types but has no JSX transform (ADR-0005: the framework\n* doesn't bundle or transform the app's code; deploy loading is no\n* exception). A `.tsx`/`.jsx` file anywhere in the topology's import graph\n* dies with node's raw `ERR_UNKNOWN_FILE_EXTENSION`, which names the file\n* but not the cause or the fix. This turns that one case into structured\n* error parts (summary/why/fix) that do — every other load failure (syntax\n* errors, missing files, non-JSX unknown extensions) is untouched.\n*/\nconst UNKNOWN_EXTENSION_CODE = \"ERR_UNKNOWN_FILE_EXTENSION\";\nconst JSX_EXTENSIONS = [\".tsx\", \".jsx\"];\nfunction errorCode(error) {\n\treturn \"code\" in error && typeof error.code === \"string\" ? error.code : void 0;\n}\nfunction unknownExtensionPath(error) {\n\tif (!(error instanceof Error)) return void 0;\n\tif (errorCode(error) !== UNKNOWN_EXTENSION_CODE) return void 0;\n\treturn /Unknown file extension \"\\.\\w+\" for (.+)$/.exec(error.message)?.[1];\n}\n/**\n* Returns structured error parts when `error` is node's\n* `ERR_UNKNOWN_FILE_EXTENSION` for a `.tsx`/`.jsx` file — `undefined` for\n* every other error (including unknown-extension failures for some other\n* extension), so the caller can fall through to its normal rethrow.\n*/\nfunction explainJsxLoadError(error, entryPath) {\n\tconst offendingPath = unknownExtensionPath(error);\n\tif (offendingPath === void 0) return void 0;\n\tif (!JSX_EXTENSIONS.some((ext) => offendingPath.endsWith(ext))) return void 0;\n\treturn {\n\t\tsummary: `\"${offendingPath}\" can't be loaded.`,\n\t\twhy: `deploy loads \"${entryPath}\"'s topology with node's own module loader, which strips TypeScript types but has no JSX transform — so a .tsx/.jsx file can't sit anywhere in that import graph.`,\n\t\tfix: \"Precompile that file in your own build (transform the JSX away, keep the real npm packages external) and import the compiled output instead of the raw .tsx/.jsx — see examples/email/scripts/build.ts in the prisma/composer repo for a worked example.\"\n\t};\n}\n//#endregion\n//#region src/load-entry.ts\n/**\n* Pipeline step 2 (deploy-cli.md § The pipeline): import the entry module\n* (resolved against cwd) and require its default export to be the app's root:\n* an app root built with `appRoot()`, or a module built with `module()`\n* (ADR-0003).\n*/\n/**\n* `unloadableFix`, when given, says where the path came from, so a wrong path names its source.\n* `recorded` receives each app file the import loads, so a caller has them when it throws.\n*/\nasync function loadEntry(entryArg, cwd, unloadableFix, recorded) {\n\tregisterEntryResolution();\n\tconst resolvedPath = path.resolve(cwd, entryArg);\n\tlet mod;\n\tlet files;\n\ttry {\n\t\t({value: mod, files} = await recordAppFiles(() => import(pathToFileURL(resolvedPath).href), recorded));\n\t} catch (error) {\n\t\tconst explained = explainJsxLoadError(error, resolvedPath);\n\t\tif (explained !== void 0) throw new CliStructuredError(\"COMPOSE.ENTRY_UNLOADABLE\", explained.summary, {\n\t\t\twhy: explained.why,\n\t\t\tfix: explained.fix,\n\t\t\twhere: { path: resolvedPath },\n\t\t\tcause: error\n\t\t});\n\t\tthrow new CliStructuredError(\"COMPOSE.ENTRY_UNLOADABLE\", `Failed to import entry module \"${resolvedPath}\": ${error instanceof Error ? error.message : String(error)}`, {\n\t\t\t...unloadableFix === void 0 ? {} : { fix: unloadableFix },\n\t\t\twhere: { path: resolvedPath },\n\t\t\tcause: error\n\t\t});\n\t}\n\tconst root = blindCast(mod).default;\n\tif (isNode(root) && root.kind === \"service\") throw new CliStructuredError(\"COMPOSE.ROOT_NOT_MODULE\", `The entry \"${resolvedPath}\" default-exports a service. The app's root must be a module, built with appRoot().`, {\n\t\tfix: \"Provision the service inside a root, e.g. export default appRoot('name', ({ provision }) => { provision(service); }).\",\n\t\twhere: { path: resolvedPath }\n\t});\n\tif (!isNode(root) || root.kind !== \"module\") throw new CliStructuredError(\"COMPOSE.ENTRY_EXPORT_INVALID\", `Entry module \"${resolvedPath}\" must default-export the app's root.`, {\n\t\tfix: \"Build it with appRoot() from @prisma/composer.\",\n\t\twhere: { path: resolvedPath }\n\t});\n\treturn {\n\t\tpath: resolvedPath,\n\t\tfiles: [.../* @__PURE__ */ new Set([resolvedPath, ...files])],\n\t\troot\n\t};\n}\n//#endregion\nexport { registerEntryResolution as i, appFilesNamedBy as n, namesDirectoryWithIndex as r, loadEntry as t };\n\n//# sourceMappingURL=load-entry-CEoVBdMj.mjs.map"],"mappings":";;;;;;;;;;;;;;AAOA,MAAM,cAAc;AACpB,MAAM,sBAAsB,GAAG,YAAY;AAC3C,MAAM,6BAA6B;AACnC,MAAM,iBAAiB;AACvB,MAAM,qBAAqB;CAC1B;CACA;CACA;CACA;AACD,CAAC,CAAC,KAAK,cAAc,0BAA0B,WAAW;;AAQ1D,SAAS,wBAAwB,YAAY;CAC5C,OAAO,GAAG,WAAW;AACtB;AACA,SAAS,kBAAkB,MAAM;CAChC,OAAO;EACN,MAAM;EACN,SAAS,GAAG,KAAK;EACjB,KAAK;EACL,OAAO;CACR;AACD;;;AAGA,SAAS,SAAS,MAAM;CACvB,IAAI;EACH,OAAOA,KAAG,aAAa,IAAI;CAC5B,QAAQ;EACP,OAAO;CACR;AACD;AACA,SAAS,mBAAmB,YAAY;CACvC,MAAM,YAAYC,OAAK,QAAQ,SAAS,UAAU,CAAC;CACnD,MAAM,QAAQ,mBAAmB,KAAK,SAASA,OAAK,KAAK,WAAW,IAAI,CAAC,CAAC,CAAC,MAAM,SAASD,KAAG,WAAW,IAAI,CAAC;CAC7G,IAAI,UAAU,KAAK,GAAG,OAAO,KAAK;CAClC,OAAO;EACN,MAAM;EACN,SAAS,GAAG,MAAM;EAClB,KAAK;EACL,KAAK;EACL,OAAO;CACR;AACD;AACA,SAAS,SAAS,OAAO;CACxB,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC3E;AACA,SAAS,sBAAsB,OAAO;CACrC,OAAO,SAAS,KAAK,KAAK,OAAO,MAAM,UAAU,YAAY,MAAM,KAAK,CAAC,SAAS,KAAK,SAAS,MAAM,QAAQ;AAC/G;AACA,SAAS,kBAAkB,OAAO;CACjC,OAAO,SAAS,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;EACrN,KAAK;EACL,OAAO,EAAE,MAAM,aAAa;CAC7B,CAAC;CACD,IAAI,CAAC,OAAO,IAAI,KAAK,KAAK,SAAS,UAAU,MAAM,IAAI,mBAAmB,gCAAgC,iBAAiB,aAAa,wCAAwC;EAC/K,KAAK;EACL,OAAO,EAAE,MAAM,aAAa;CAC7B,CAAC;CACD,OAAO;EACN,MAAM;EACN,OAAO,CAAC,mBAAmB,IAAI,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,CAAC;EAC5D;CACD;AACD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as LocalTargetDescriptor, J as PrismaAppConfig, p as ContainerInstance, t as AlchemyStateLayer, z as NamedSecrets } from "./app-config-
|
|
1
|
+
import { A as LocalTargetDescriptor, J as PrismaAppConfig, p as ContainerInstance, t as AlchemyStateLayer, z as NamedSecrets } from "./app-config-Dhypzb6a-C3Kb0XtS.mjs";
|
|
2
2
|
import * as Layer from "effect/Layer";
|
|
3
3
|
//#region ../../0-framework/1-core/core/dist/local-target.d.mts
|
|
4
4
|
//#region src/control/local-target.d.ts
|
|
@@ -28,4 +28,4 @@ declare function localTargetProviders(resolved: ReadonlyMap<string, LocalTargetD
|
|
|
28
28
|
declare function devState(): AlchemyStateLayer;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { localTargetProviders as n, resolveLocalTargets as r, devState as t };
|
|
31
|
-
//# sourceMappingURL=local-target-
|
|
31
|
+
//# sourceMappingURL=local-target-DZFvgvVK.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-target-
|
|
1
|
+
{"version":3,"file":"local-target-DZFvgvVK.d.mts","names":[],"sources":["../../../0-framework/1-core/core/dist/local-target.d.mts"],"mappings":";;;;;;;;;;;;;;;;;iBAgBiB,oBAAoB,QAAQ,kBAAkB,QAAQ,oBAAoB;;;;;;;;iBAQ1E,qBAAqB,UAAU,oBAAoB,wBAAwB,YAAY,oBAAoB,oBAAoB,gBAAgB,mBAAmB,SAAS,yBAAyB,cAAc,eAAe,MAAM;;iBAEvO,YAAY"}
|
package/dist/local-target.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as LocalTargetDescriptor, C as LocalNodeCondition, D as LocalTargetAttachment, E as LocalTargetAttachInput, M as LocalTargetProvidersInput, O as LocalTargetCurrentApp, T as LocalNodeStopped,
|
|
2
|
-
import { n as localTargetProviders, r as resolveLocalTargets, t as devState } from "./local-target-
|
|
1
|
+
import { A as LocalTargetDescriptor, C as LocalNodeCondition, D as LocalTargetAttachment, E as LocalTargetAttachInput, M as LocalTargetProvidersInput, O as LocalTargetCurrentApp, T as LocalNodeStopped, ft as devEnvironmentDir, h as DEV_ENVIRONMENT_NAME_FILE, j as LocalTargetEmulatorsInput, k as LocalTargetCurrentInput, m as DEV_DIR, w as LocalNodeLocation, y as DevPreflightResult } from "./app-config-Dhypzb6a-C3Kb0XtS.mjs";
|
|
2
|
+
import { n as localTargetProviders, r as resolveLocalTargets, t as devState } from "./local-target-DZFvgvVK.mjs";
|
|
3
3
|
export { DEV_DIR, DEV_ENVIRONMENT_NAME_FILE, type DevPreflightResult, type LocalNodeCondition, type LocalNodeLocation, type LocalNodeStopped, type LocalTargetAttachInput, type LocalTargetAttachment, type LocalTargetCurrentApp, type LocalTargetCurrentInput, type LocalTargetDescriptor, type LocalTargetEmulatorsInput, type LocalTargetProvidersInput, devEnvironmentDir, devState, localTargetProviders, resolveLocalTargets };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as BuildAdapter } from "./graph-types-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { o as BuildAdapter } from "./graph-types-BeNeqIt4-LGyYX_Sm.mjs";
|
|
2
|
+
import "./index-DOJMK47O.mjs";
|
|
3
3
|
//#region ../../0-framework/2-authoring/nextjs/dist/nextjs-DLyeRR7M.d.mts
|
|
4
4
|
//#region src/nextjs.d.ts
|
|
5
5
|
/** The nextjs build adapter's descriptor — `appDir` is this kind's own extra path input (the Next app root), beyond the shared `{ extension, type, module, entry }`. `entry` is a placeholder; the assembler locates `server.js` in the standalone tree. */
|
|
@@ -13,4 +13,4 @@ declare const nextjsBuild: (opts: {
|
|
|
13
13
|
}) => NextjsBuildAdapter;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { nextjsBuild as n, NextjsBuildAdapter as t };
|
|
16
|
-
//# sourceMappingURL=nextjs-DLyeRR7M-
|
|
16
|
+
//# sourceMappingURL=nextjs-DLyeRR7M-C2z32CtL.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nextjs-DLyeRR7M-
|
|
1
|
+
{"version":3,"file":"nextjs-DLyeRR7M-C2z32CtL.d.mts","names":[],"sources":["../../../0-framework/2-authoring/nextjs/dist/nextjs-DLyeRR7M.d.mts"],"mappings":";;;;;UAGU,2BAA2B;WAC1B;WACA;;cAEG,cAAc;EAC1B;EACA;MACI"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b as DevServer, o as AssembleInput, rt as ServeInput, s as Bundle, x as ExtensionDescriptor } from "./app-config-
|
|
2
|
-
import "./config-
|
|
3
|
-
import "./deploy-
|
|
4
|
-
import { t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-
|
|
1
|
+
import { b as DevServer, o as AssembleInput, rt as ServeInput, s as Bundle, x as ExtensionDescriptor } from "./app-config-Dhypzb6a-C3Kb0XtS.mjs";
|
|
2
|
+
import "./config-D615fYD5.mjs";
|
|
3
|
+
import "./deploy-CncPyRbo.mjs";
|
|
4
|
+
import { t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-C2z32CtL.mjs";
|
|
5
5
|
//#region ../../0-framework/2-authoring/nextjs/dist/control.d.mts
|
|
6
6
|
//#region src/control/build.d.ts
|
|
7
7
|
/** The built standalone server.js for a nextjs build — `appDir`'s standalone root plus the app subpath Next recorded. Single-sourced so `assemble()` (deploy) and the integration-test seam can't drift. */
|
package/dist/nextjs.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as nextjsBuild, t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-
|
|
1
|
+
import { n as nextjsBuild, t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-C2z32CtL.mjs";
|
|
2
2
|
export { type NextjsBuildAdapter, nextjsBuild as default };
|
package/dist/node-control.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { b as DevServer, o as AssembleInput, rt as ServeInput, s as Bundle, x as ExtensionDescriptor } from "./app-config-
|
|
2
|
-
import "./config-
|
|
3
|
-
import "./deploy-
|
|
1
|
+
import { b as DevServer, o as AssembleInput, rt as ServeInput, s as Bundle, x as ExtensionDescriptor } from "./app-config-Dhypzb6a-C3Kb0XtS.mjs";
|
|
2
|
+
import "./config-D615fYD5.mjs";
|
|
3
|
+
import "./deploy-CncPyRbo.mjs";
|
|
4
4
|
//#region ../../0-framework/2-authoring/node/dist/control.d.mts
|
|
5
5
|
//#region src/control/build.d.ts
|
|
6
6
|
declare function assemble(input: AssembleInput): Promise<Bundle>;
|
package/dist/node.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as BuildAdapter } from "./graph-types-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { o as BuildAdapter } from "./graph-types-BeNeqIt4-LGyYX_Sm.mjs";
|
|
2
|
+
import "./index-DOJMK47O.mjs";
|
|
3
3
|
//#region ../../0-framework/2-authoring/node/dist/index.d.mts
|
|
4
4
|
//#region src/node.d.ts
|
|
5
5
|
/** The node build adapter's descriptor. `dir` is the directory form's own extra path input (the built tree to copy verbatim), beyond the shared `{ extension, type, module, entry }`; absent, `entry` is the whole built runnable. */
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import * as path$1 from "node:path";
|
|
2
2
|
import * as fs$1 from "node:fs";
|
|
3
|
-
//#region ../../0-framework/3-tooling/cli/dist/run-report-
|
|
3
|
+
//#region ../../0-framework/3-tooling/cli/dist/run-report-HI2JqCSO.mjs
|
|
4
4
|
/**
|
|
5
5
|
* The run report: one deploy's outcome as JSON, for tools that consume a
|
|
6
6
|
* deploy rather than watch one — the Prisma GitHub Action reads it to build a
|
|
7
7
|
* pull-request comment carrying preview links.
|
|
8
8
|
*
|
|
9
|
-
* Deliberately separate from `deployment-summary.ts
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* not accumulate on disk. This one is written where the operator asked for
|
|
13
|
-
* it, survives the run, is written on the failure path too, and carries a
|
|
9
|
+
* Deliberately separate from `deployment-summary.ts`, the summary the
|
|
10
|
+
* operation returns as a value. This one is written where the operator asked
|
|
11
|
+
* for it, survives the run, is written on the failure path too, and carries a
|
|
14
12
|
* version so a consumer can depend on its shape.
|
|
15
13
|
*/
|
|
16
14
|
/** Bump when a change would break a consumer that reads the current shape. */
|
|
@@ -57,4 +55,4 @@ function writeRunReport(filePath, report) {
|
|
|
57
55
|
//#endregion
|
|
58
56
|
export { writeRunReport as a, toRunReport as i, RUN_REPORT_VERSION as n, resolveRunReportPath as r, RUN_REPORT_FILE_ENV as t };
|
|
59
57
|
|
|
60
|
-
//# sourceMappingURL=run-report-
|
|
58
|
+
//# sourceMappingURL=run-report-HI2JqCSO-BWPG--nb.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-report-HI2JqCSO-BWPG--nb.mjs","names":["path"],"sources":["../../../0-framework/3-tooling/cli/dist/run-report-HI2JqCSO.mjs"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\n//#region src/run-report.ts\n/**\n* The run report: one deploy's outcome as JSON, for tools that consume a\n* deploy rather than watch one — the Prisma GitHub Action reads it to build a\n* pull-request comment carrying preview links.\n*\n* Deliberately separate from `deployment-summary.ts`, the summary the\n* operation returns as a value. This one is written where the operator asked\n* for it, survives the run, is written on the failure path too, and carries a\n* version so a consumer can depend on its shape.\n*/\n/** Bump when a change would break a consumer that reads the current shape. */\nconst RUN_REPORT_VERSION = 2;\n/** Names the file to write the run report to, when `--report` is not passed. */\nconst RUN_REPORT_FILE_ENV = \"PRISMA_COMPOSER_REPORT_FILE\";\nfunction toRunReport(input) {\n\treturn {\n\t\tversion: 2,\n\t\toutcome: input.failure === void 0 ? \"succeeded\" : \"failed\",\n\t\tapp: input.summary?.app ?? null,\n\t\tenvironment: input.environment,\n\t\tnodes: input.summary?.nodes ?? [],\n\t\tfailure: input.failure ?? null\n\t};\n}\n/**\n* The path to write to: the `--report` flag first, then the env var. Relative\n* paths resolve against the deploy's cwd. `undefined` means no report was\n* asked for, which is the common case and writes nothing.\n*/\nfunction resolveRunReportPath(flag, env, cwd) {\n\tconst requested = flag !== void 0 && flag.length > 0 ? flag : env;\n\tif (requested === void 0 || requested.length === 0) return void 0;\n\treturn path.resolve(cwd, requested);\n}\n/**\n* Writes the report, creating the parent directory if needed. A write failure\n* warns and returns false rather than failing a deploy that already\n* converged — but it is never silent, because the operator asked for this\n* file and a consumer is waiting on it.\n*/\nfunction writeRunReport(filePath, report) {\n\ttry {\n\t\tfs.mkdirSync(path.dirname(filePath), { recursive: true });\n\t\tfs.writeFileSync(filePath, `${JSON.stringify(report, null, 2)}\\n`);\n\t\treturn true;\n\t} catch (error) {\n\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\tconsole.warn(`\\nCould not write the run report to ${filePath}: ${detail}`);\n\t\treturn false;\n\t}\n}\n//#endregion\nexport { writeRunReport as a, toRunReport as i, RUN_REPORT_VERSION as n, resolveRunReportPath as r, RUN_REPORT_FILE_ENV as t };\n\n//# sourceMappingURL=run-report-HI2JqCSO.mjs.map"],"mappings":";;;;;;;;;;;;;;AAcA,MAAM,qBAAqB;;AAE3B,MAAM,sBAAsB;AAC5B,SAAS,YAAY,OAAO;CAC3B,OAAO;EACN,SAAS;EACT,SAAS,MAAM,YAAY,KAAK,IAAI,cAAc;EAClD,KAAK,MAAM,SAAS,OAAO;EAC3B,aAAa,MAAM;EACnB,OAAO,MAAM,SAAS,SAAS,CAAC;EAChC,SAAS,MAAM,WAAW;CAC3B;AACD;;;;;;AAMA,SAAS,qBAAqB,MAAM,KAAK,KAAK;CAC7C,MAAM,YAAY,SAAS,KAAK,KAAK,KAAK,SAAS,IAAI,OAAO;CAC9D,IAAI,cAAc,KAAK,KAAK,UAAU,WAAW,GAAG,OAAO,KAAK;CAChE,OAAOA,OAAK,QAAQ,KAAK,SAAS;AACnC;;;;;;;AAOA,SAAS,eAAe,UAAU,QAAQ;CACzC,IAAI;EACH,KAAG,UAAUA,OAAK,QAAQ,QAAQ,GAAG,EAAE,WAAW,KAAK,CAAC;EACxD,KAAG,cAAc,UAAU,GAAG,KAAK,UAAU,QAAQ,MAAM,CAAC,EAAE,GAAG;EACjE,OAAO;CACR,SAAS,OAAO;EACf,MAAM,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;EACpE,QAAQ,KAAK,uCAAuC,SAAS,IAAI,QAAQ;EACzE,OAAO;CACR;AACD"}
|
package/dist/service-rpc.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { K as ProvisionNeed, d as Contract, m as DependencyEnd, nt as RunnableServiceNode } from "./graph-types-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { K as ProvisionNeed, d as Contract, m as DependencyEnd, nt as RunnableServiceNode } from "./graph-types-BeNeqIt4-LGyYX_Sm.mjs";
|
|
2
|
+
import "./index-DOJMK47O.mjs";
|
|
3
3
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
4
4
|
//#region ../../0-framework/2-authoring/service-rpc/dist/index.d.mts
|
|
5
5
|
//#region src/rpc.d.ts
|
package/dist/service-rpc.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as blindCast } from "./casts-DpaahrlC-C5XMnP9S.mjs";
|
|
2
|
-
import { S as provisionNeed, l as dependency } from "./graph-
|
|
3
|
-
import { s as string } from "./dist-
|
|
2
|
+
import { S as provisionNeed, l as dependency } from "./graph-BYo1OEqk-D5AtX8q4.mjs";
|
|
3
|
+
import { s as string } from "./dist-Bw5O9TDx.mjs";
|
|
4
4
|
//#region ../../0-framework/2-authoring/service-rpc/dist/index.mjs
|
|
5
5
|
/** Bounded jittered backoff for retrying a dropped call. `maxRetries` is retries after the first attempt. */
|
|
6
6
|
const RETRY = {
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { t as CliStructuredError } from "./errors-DI3TBXE-.mjs";
|
|
2
|
+
import { o as StreamRedactor } from "./validate-environment-BevPErw8-BDbXIt8U.mjs";
|
|
3
|
+
//#region ../../0-framework/3-tooling/cli/dist/steps-Det-FSAL.mjs
|
|
4
|
+
/** Pure projection: keeps app, each node's address/entities and the findings, drops the in-process `node`. */
|
|
5
|
+
function toDeploymentSummary(result) {
|
|
6
|
+
return {
|
|
7
|
+
app: result.app,
|
|
8
|
+
nodes: result.nodes.map((node) => ({
|
|
9
|
+
address: node.address,
|
|
10
|
+
entities: node.entities
|
|
11
|
+
})),
|
|
12
|
+
findings: result.findings
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
/** Fits the platform's 5000-character build `errorMessage`. */
|
|
16
|
+
const ENGINE_FAILURE_CAUSE_LIMIT = 1e3;
|
|
17
|
+
/** 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. */
|
|
18
|
+
const ALCHEMY_ADOPT_ADVICE = [
|
|
19
|
+
[/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."],
|
|
20
|
+
[/Re-run with `--adopt` \(or wrap the effect in `adopt\(true\)`\) to replace it anyway\./g, "Remove that resource, then deploy again."],
|
|
21
|
+
[/\(re-deploy with --adopt to take ownership, then destroy\)/g, "(remove it by hand)"],
|
|
22
|
+
[/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."],
|
|
23
|
+
[/; rerun with adoption enabled if it is the intended [\w ]+\./g, ". Remove that resource, then deploy again."]
|
|
24
|
+
];
|
|
25
|
+
/** Replaces Alchemy CLI advice in engine output with steps that work from Composer. */
|
|
26
|
+
function withComposerAdvice(text) {
|
|
27
|
+
return ALCHEMY_ADOPT_ADVICE.reduce((current, [advice, replacement]) => current.replace(advice, replacement), text);
|
|
28
|
+
}
|
|
29
|
+
/** A failure cause capped to fit the platform build's error message. */
|
|
30
|
+
function capFailureCause(cause) {
|
|
31
|
+
return cause.length <= ENGINE_FAILURE_CAUSE_LIMIT ? cause : `${cause.slice(0, ENGINE_FAILURE_CAUSE_LIMIT - 1)}…`;
|
|
32
|
+
}
|
|
33
|
+
function textIn(value, at) {
|
|
34
|
+
if (typeof value === "string") return [{
|
|
35
|
+
at,
|
|
36
|
+
text: value
|
|
37
|
+
}];
|
|
38
|
+
if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") return [{
|
|
39
|
+
at,
|
|
40
|
+
text: String(value)
|
|
41
|
+
}];
|
|
42
|
+
if (Array.isArray(value)) return value.flatMap((member, index) => textIn(member, [...at, String(index)]));
|
|
43
|
+
if (typeof value === "object" && value !== null) return Object.entries(value).flatMap(([key, member]) => textIn(member, [...at, key]));
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
46
|
+
/** Throws `CONFIG.SECRET_AS_PLAIN_VALUE` when a root input field Load read holds a known secret. */
|
|
47
|
+
function refuseSecretsInRootInput(read, knownSecrets, consequence) {
|
|
48
|
+
const readPlaces = read.rootInput.flatMap((field) => textIn(field.value, field.path).map(({ at, text }) => ({
|
|
49
|
+
where: `Root input field input.${at.join(".")}`,
|
|
50
|
+
text
|
|
51
|
+
})));
|
|
52
|
+
for (const { where, text } of readPlaces) {
|
|
53
|
+
const name = knownSecrets.nameIn(text);
|
|
54
|
+
if (name === void 0) continue;
|
|
55
|
+
throw new CliStructuredError("CONFIG.SECRET_AS_PLAIN_VALUE", `${where} holds the value of the platform secret "${name}". ${consequence}`, { fix: `Pass the value of the platform secret "${name}" to where this value is used, or give this plain value text that does not contain the value of "${name}".` });
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/** Throws `CONFIG.SECRET_AS_PLAIN_VALUE` when a plain platform variable's text holds a known secret. */
|
|
59
|
+
function refuseSecretsInPlainVariables(plainVariableText, knownSecrets, consequence) {
|
|
60
|
+
for (const [variable, text] of Object.entries(plainVariableText)) {
|
|
61
|
+
const name = knownSecrets.nameIn(text);
|
|
62
|
+
if (name === void 0) continue;
|
|
63
|
+
throw new CliStructuredError("CONFIG.SECRET_AS_PLAIN_VALUE", `The platform variable "${variable}", which prisma dev read from the \`config\` adapters, holds the value of the platform secret "${name}". ${consequence}`, { fix: `Keep the value of "${name}" out of the platform variable "${variable}", or give "${variable}" a different value.` });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Times each step for the host's `onEvent`. Steps are matched by `keyOf`, so
|
|
68
|
+
* a step can finish under a newer status than it started with. `emit` sends
|
|
69
|
+
* the operation's other events. A host `onEvent` that throws is the host's
|
|
70
|
+
* bug and cannot fail the operation.
|
|
71
|
+
*/
|
|
72
|
+
function stepTracker(keyOf, onEvent) {
|
|
73
|
+
const open = /* @__PURE__ */ new Map();
|
|
74
|
+
const emit = (event) => {
|
|
75
|
+
try {
|
|
76
|
+
onEvent?.(event);
|
|
77
|
+
} catch {}
|
|
78
|
+
};
|
|
79
|
+
const finish = (step, outcome, data) => {
|
|
80
|
+
const entry = open.get(keyOf(step));
|
|
81
|
+
if (entry === void 0) return;
|
|
82
|
+
open.delete(keyOf(step));
|
|
83
|
+
const durationMs = Math.round(performance.now() - entry.startedAt);
|
|
84
|
+
emit({
|
|
85
|
+
kind: "step-finished",
|
|
86
|
+
step,
|
|
87
|
+
outcome,
|
|
88
|
+
durationMs,
|
|
89
|
+
data
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
return {
|
|
93
|
+
start(step) {
|
|
94
|
+
open.set(keyOf(step), {
|
|
95
|
+
step,
|
|
96
|
+
startedAt: performance.now()
|
|
97
|
+
});
|
|
98
|
+
emit({
|
|
99
|
+
kind: "step-started",
|
|
100
|
+
step
|
|
101
|
+
});
|
|
102
|
+
},
|
|
103
|
+
finish(step, data) {
|
|
104
|
+
finish(step, "ok", data);
|
|
105
|
+
},
|
|
106
|
+
fail(step) {
|
|
107
|
+
finish(step, "failed");
|
|
108
|
+
},
|
|
109
|
+
/** Closes every open step with `outcome`, innermost first. */
|
|
110
|
+
closeOpen(outcome) {
|
|
111
|
+
for (const { step } of [...open.values()].reverse()) finish(step, outcome);
|
|
112
|
+
},
|
|
113
|
+
isOpen(step) {
|
|
114
|
+
return open.has(keyOf(step));
|
|
115
|
+
},
|
|
116
|
+
message(severity, text) {
|
|
117
|
+
emit({
|
|
118
|
+
kind: "message",
|
|
119
|
+
severity,
|
|
120
|
+
text
|
|
121
|
+
});
|
|
122
|
+
},
|
|
123
|
+
emit
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
/** One converge event as step events: each resource is a step, made by `resourceStep`; a log line is a message. */
|
|
127
|
+
function reportConvergeEvent(steps, event, redact, resourceStep) {
|
|
128
|
+
if (event.kind === "log") {
|
|
129
|
+
steps.message(event.severity, redact(withComposerAdvice(event.text)));
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
const step = resourceStep({
|
|
133
|
+
resourceId: event.fqn,
|
|
134
|
+
resourceType: event.resourceType,
|
|
135
|
+
status: event.status
|
|
136
|
+
});
|
|
137
|
+
switch (event.phase) {
|
|
138
|
+
case "running":
|
|
139
|
+
if (!steps.isOpen(step)) steps.start(step);
|
|
140
|
+
return;
|
|
141
|
+
case "done":
|
|
142
|
+
if (!steps.isOpen(step)) steps.start(step);
|
|
143
|
+
steps.finish(step);
|
|
144
|
+
return;
|
|
145
|
+
case "failed":
|
|
146
|
+
if (!steps.isOpen(step)) steps.start(step);
|
|
147
|
+
steps.fail(step);
|
|
148
|
+
if (event.message !== void 0) steps.message("warn", redact(`${event.fqn}: ${withComposerAdvice(event.message)}`));
|
|
149
|
+
return;
|
|
150
|
+
case "pending": return;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Alchemy's terminal text as `info` messages, one per complete line, redacted. A secret split
|
|
155
|
+
* across writes or lines is still found, because the text passes through a `StreamRedactor`
|
|
156
|
+
* before it is cut into lines. `end` sends the last line that has no line break.
|
|
157
|
+
*/
|
|
158
|
+
function interactionMessages(steps, redaction) {
|
|
159
|
+
const stream = new StreamRedactor(redaction.allValues());
|
|
160
|
+
let partial = "";
|
|
161
|
+
const send = (text, last) => {
|
|
162
|
+
const lines = (partial + text).split("\n");
|
|
163
|
+
partial = last ? "" : lines.pop() ?? "";
|
|
164
|
+
for (const line of lines) if (line.trim() !== "") steps.message("info", redaction.redact(line));
|
|
165
|
+
};
|
|
166
|
+
return {
|
|
167
|
+
push: (text) => send(stream.push(text), false),
|
|
168
|
+
end: () => send(stream.end(), true)
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
//#endregion
|
|
172
|
+
export { reportConvergeEvent as a, withComposerAdvice as c, refuseSecretsInRootInput as i, interactionMessages as n, stepTracker as o, refuseSecretsInPlainVariables as r, toDeploymentSummary as s, capFailureCause as t };
|
|
173
|
+
|
|
174
|
+
//# sourceMappingURL=steps-Det-FSAL-DRvo57Lf.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steps-Det-FSAL-DRvo57Lf.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/steps-Det-FSAL.mjs"],"sourcesContent":["import { n as StreamRedactor } from \"./redaction-DHaXoToJ.mjs\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\n//#region src/deployment-summary.ts\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/** Fits the platform's 5000-character build `errorMessage`. */\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}\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\n//#region src/secret-as-plain-value.ts\nfunction textIn(value, at) {\n\tif (typeof value === \"string\") return [{\n\t\tat,\n\t\ttext: value\n\t}];\n\tif (typeof value === \"number\" || typeof value === \"boolean\" || typeof value === \"bigint\") return [{\n\t\tat,\n\t\ttext: String(value)\n\t}];\n\tif (Array.isArray(value)) return value.flatMap((member, index) => textIn(member, [...at, String(index)]));\n\tif (typeof value === \"object\" && value !== null) return Object.entries(value).flatMap(([key, member]) => textIn(member, [...at, key]));\n\treturn [];\n}\n/** Throws `CONFIG.SECRET_AS_PLAIN_VALUE` when a root input field Load read holds a known secret. */\nfunction refuseSecretsInRootInput(read, knownSecrets, consequence) {\n\tconst readPlaces = read.rootInput.flatMap((field) => textIn(field.value, field.path).map(({ at, text }) => ({\n\t\twhere: `Root input field input.${at.join(\".\")}`,\n\t\ttext\n\t})));\n\tfor (const { where, text } of readPlaces) {\n\t\tconst name = knownSecrets.nameIn(text);\n\t\tif (name === void 0) continue;\n\t\tthrow new CliStructuredError(\"CONFIG.SECRET_AS_PLAIN_VALUE\", `${where} holds the value of the platform secret \"${name}\". ${consequence}`, { fix: `Pass the value of the platform secret \"${name}\" to where this value is used, or give this plain value text that does not contain the value of \"${name}\".` });\n\t}\n}\n/** Throws `CONFIG.SECRET_AS_PLAIN_VALUE` when a plain platform variable's text holds a known secret. */\nfunction refuseSecretsInPlainVariables(plainVariableText, knownSecrets, consequence) {\n\tfor (const [variable, text] of Object.entries(plainVariableText)) {\n\t\tconst name = knownSecrets.nameIn(text);\n\t\tif (name === void 0) continue;\n\t\tthrow new CliStructuredError(\"CONFIG.SECRET_AS_PLAIN_VALUE\", `The platform variable \"${variable}\", which prisma dev read from the \\`config\\` adapters, holds the value of the platform secret \"${name}\". ${consequence}`, { fix: `Keep the value of \"${name}\" out of the platform variable \"${variable}\", or give \"${variable}\" a different value.` });\n\t}\n}\n//#endregion\n//#region src/operations/steps.ts\n/**\n* Times each step for the host's `onEvent`. Steps are matched by `keyOf`, so\n* a step can finish under a newer status than it started with. `emit` sends\n* the operation's other events. A host `onEvent` that throws is the host's\n* bug and cannot fail the operation.\n*/\nfunction stepTracker(keyOf, onEvent) {\n\tconst open = /* @__PURE__ */ new Map();\n\tconst emit = (event) => {\n\t\ttry {\n\t\t\tonEvent?.(event);\n\t\t} catch {}\n\t};\n\tconst finish = (step, outcome, data) => {\n\t\tconst entry = open.get(keyOf(step));\n\t\tif (entry === void 0) return;\n\t\topen.delete(keyOf(step));\n\t\tconst durationMs = Math.round(performance.now() - entry.startedAt);\n\t\temit({\n\t\t\tkind: \"step-finished\",\n\t\t\tstep,\n\t\t\toutcome,\n\t\t\tdurationMs,\n\t\t\tdata\n\t\t});\n\t};\n\treturn {\n\t\tstart(step) {\n\t\t\topen.set(keyOf(step), {\n\t\t\t\tstep,\n\t\t\t\tstartedAt: performance.now()\n\t\t\t});\n\t\t\temit({\n\t\t\t\tkind: \"step-started\",\n\t\t\t\tstep\n\t\t\t});\n\t\t},\n\t\tfinish(step, data) {\n\t\t\tfinish(step, \"ok\", data);\n\t\t},\n\t\tfail(step) {\n\t\t\tfinish(step, \"failed\");\n\t\t},\n\t\t/** Closes every open step with `outcome`, innermost first. */\n\t\tcloseOpen(outcome) {\n\t\t\tfor (const { step } of [...open.values()].reverse()) finish(step, outcome);\n\t\t},\n\t\tisOpen(step) {\n\t\t\treturn open.has(keyOf(step));\n\t\t},\n\t\tmessage(severity, text) {\n\t\t\temit({\n\t\t\t\tkind: \"message\",\n\t\t\t\tseverity,\n\t\t\t\ttext\n\t\t\t});\n\t\t},\n\t\temit\n\t};\n}\n/** One converge event as step events: each resource is a step, made by `resourceStep`; a log line is a message. */\nfunction reportConvergeEvent(steps, event, redact, resourceStep) {\n\tif (event.kind === \"log\") {\n\t\tsteps.message(event.severity, redact(withComposerAdvice(event.text)));\n\t\treturn;\n\t}\n\tconst step = resourceStep({\n\t\tresourceId: event.fqn,\n\t\tresourceType: event.resourceType,\n\t\tstatus: event.status\n\t});\n\tswitch (event.phase) {\n\t\tcase \"running\":\n\t\t\tif (!steps.isOpen(step)) steps.start(step);\n\t\t\treturn;\n\t\tcase \"done\":\n\t\t\tif (!steps.isOpen(step)) steps.start(step);\n\t\t\tsteps.finish(step);\n\t\t\treturn;\n\t\tcase \"failed\":\n\t\t\tif (!steps.isOpen(step)) steps.start(step);\n\t\t\tsteps.fail(step);\n\t\t\tif (event.message !== void 0) steps.message(\"warn\", redact(`${event.fqn}: ${withComposerAdvice(event.message)}`));\n\t\t\treturn;\n\t\tcase \"pending\": return;\n\t}\n}\n/**\n* Alchemy's terminal text as `info` messages, one per complete line, redacted. A secret split\n* across writes or lines is still found, because the text passes through a `StreamRedactor`\n* before it is cut into lines. `end` sends the last line that has no line break.\n*/\nfunction interactionMessages(steps, redaction) {\n\tconst stream = new StreamRedactor(redaction.allValues());\n\tlet partial = \"\";\n\tconst send = (text, last) => {\n\t\tconst lines = (partial + text).split(\"\\n\");\n\t\tpartial = last ? \"\" : lines.pop() ?? \"\";\n\t\tfor (const line of lines) if (line.trim() !== \"\") steps.message(\"info\", redaction.redact(line));\n\t};\n\treturn {\n\t\tpush: (text) => send(stream.push(text), false),\n\t\tend: () => send(stream.end(), true)\n\t};\n}\n//#endregion\nexport { refuseSecretsInRootInput as a, withComposerAdvice as c, refuseSecretsInPlainVariables as i, reportConvergeEvent as n, capFailureCause as o, stepTracker as r, toDeploymentSummary as s, interactionMessages as t };\n\n//# sourceMappingURL=steps-Det-FSAL.mjs.map"],"mappings":";;;;AAIA,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;;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;;AAEA,SAAS,gBAAgB,OAAO;CAC/B,OAAO,MAAM,UAAU,6BAA6B,QAAQ,GAAG,MAAM,MAAM,GAAG,6BAA6B,CAAC,EAAE;AAC/G;AAGA,SAAS,OAAO,OAAO,IAAI;CAC1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f,CAAC;CACD,QAAQ,MAAM,OAAd;EACC,KAAK;GACJ,IAAI,CAAC,MAAM,OAAO,IAAI,GAAG,MAAM,MAAM,IAAI;GACzC;EACD,KAAK;GACJ,IAAI,CAAC,MAAM,OAAO,IAAI,GAAG,MAAM,MAAM,IAAI;GACzC,MAAM,OAAO,IAAI;GACjB;EACD,KAAK;GACJ,IAAI,CAAC,MAAM,OAAO,IAAI,GAAG,MAAM,MAAM,IAAI;GACzC,MAAM,KAAK,IAAI;GACf,IAAI,MAAM,YAAY,KAAK,GAAG,MAAM,QAAQ,QAAQ,OAAO,GAAG,MAAM,IAAI,IAAI,mBAAmB,MAAM,OAAO,GAAG,CAAC;GAChH;EACD,KAAK,WAAW;CACjB;AACD;;;;;;AAMA,SAAS,oBAAoB,OAAO,WAAW;CAC9C,MAAM,SAAS,IAAI,eAAe,UAAU,UAAU,CAAC;CACvD,IAAI,UAAU;CACd,MAAM,QAAQ,MAAM,SAAS;EAC5B,MAAM,SAAS,UAAU,KAAA,CAAM,MAAM,IAAI;EACzC,UAAU,OAAO,KAAK,MAAM,IAAI,KAAK;EACrC,KAAK,MAAM,QAAQ,OAAO,IAAI,KAAK,KAAK,MAAM,IAAI,MAAM,QAAQ,QAAQ,UAAU,OAAO,IAAI,CAAC;CAC/F;CACA,OAAO;EACN,OAAO,SAAS,KAAK,OAAO,KAAK,IAAI,GAAG,KAAK;EAC7C,WAAW,KAAK,OAAO,IAAI,GAAG,IAAI;CACnC;AACD"}
|
package/dist/testing.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as HydratedDeps, O as InputValueOf, U as Params, h as Deps, nt as RunnableServiceNode, v as Expose } from "./graph-types-
|
|
1
|
+
import { C as HydratedDeps, O as InputValueOf, U as Params, h as Deps, nt as RunnableServiceNode, v as Expose } from "./graph-types-BeNeqIt4-LGyYX_Sm.mjs";
|
|
2
2
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
3
3
|
//#region ../../0-framework/1-core/core/dist/testing.d.mts
|
|
4
4
|
//#region src/testing.d.ts
|