@prisma/composer 0.6.0-dev.7 → 0.6.0-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{app-config-Cbv_lA38-BHJsd1DF.d.mts → app-config-CFsSXEVj-B242oUnm.d.mts} +4 -4
- package/dist/{app-config-Cbv_lA38-BHJsd1DF.d.mts.map → app-config-CFsSXEVj-B242oUnm.d.mts.map} +1 -1
- package/dist/bin.mjs +6 -91
- package/dist/bin.mjs.map +1 -1
- package/dist/cli-B3sWzFlb-CxEIzKsQ.mjs +401 -0
- package/dist/cli-B3sWzFlb-CxEIzKsQ.mjs.map +1 -0
- package/dist/config-ku5b_2YD.d.mts +1 -0
- package/dist/config.d.mts +2 -2
- package/dist/container-transport-DKmKg5JQ-BMRhx5w-.mjs +75 -0
- package/dist/container-transport-DKmKg5JQ-BMRhx5w-.mjs.map +1 -0
- package/dist/control.d.mts +216 -0
- package/dist/control.d.mts.map +1 -0
- package/dist/control.mjs +70 -0
- package/dist/control.mjs.map +1 -0
- package/dist/deploy-ku5b_2YD.d.mts +1 -0
- package/dist/deploy.d.mts +2 -2
- package/dist/deploy.mjs +312 -1
- package/dist/deploy.mjs.map +1 -0
- package/dist/deployment-summary-r47O6kFr-CcMYVOn5.mjs +70 -0
- package/dist/deployment-summary-r47O6kFr-CcMYVOn5.mjs.map +1 -0
- package/dist/{dist-BdvFDCLV.mjs → dist-C5rZnr4n.mjs} +2 -2
- package/dist/{dist-BdvFDCLV.mjs.map → dist-C5rZnr4n.mjs.map} +1 -1
- package/dist/emulator-retry-DGonap4g-S8BNrXFD.mjs +24 -0
- package/dist/emulator-retry-DGonap4g-S8BNrXFD.mjs.map +1 -0
- package/dist/errors-0e8IVwzi.mjs +88 -0
- package/dist/errors-0e8IVwzi.mjs.map +1 -0
- package/dist/execute-deploy-destroy-IT4vGkMc-YM1Cv6cu.mjs +306 -0
- package/dist/execute-deploy-destroy-IT4vGkMc-YM1Cv6cu.mjs.map +1 -0
- package/dist/execute-deploy-destroy-IT4vGkMc-oO8yjHPH.mjs +265 -0
- package/dist/execute-deploy-destroy-IT4vGkMc-oO8yjHPH.mjs.map +1 -0
- package/dist/execute-dev-DLYyduEM-88uyvrbj.mjs +2009 -0
- package/dist/execute-dev-DLYyduEM-88uyvrbj.mjs.map +1 -0
- package/dist/execute-dev-DLYyduEM-BuUGTm0g.mjs +2006 -0
- package/dist/execute-dev-DLYyduEM-BuUGTm0g.mjs.map +1 -0
- package/dist/execute-log-VIOL4DBz-DBPH8By4.mjs +157 -0
- package/dist/execute-log-VIOL4DBz-DBPH8By4.mjs.map +1 -0
- package/dist/execute-log-VIOL4DBz-DKodBrxS.mjs +155 -0
- package/dist/execute-log-VIOL4DBz-DKodBrxS.mjs.map +1 -0
- package/dist/{graph-DgbALPDo-BEHF94BN.mjs → graph-BJgUfGB0-kvgFzT4q.mjs} +13 -7
- package/dist/graph-BJgUfGB0-kvgFzT4q.mjs.map +1 -0
- package/dist/{graph-DDpXh7S8-b-93BcHn.d.mts → graph-DqklX5Sf-BNS2aO1j.d.mts} +3 -3
- package/dist/graph-DqklX5Sf-BNS2aO1j.d.mts.map +1 -0
- package/dist/{graph-types-C3FOaaXm-C6_rGzfn.d.mts → graph-types-N6brq1zY-1VMNwtkJ.d.mts} +88 -5
- package/dist/graph-types-N6brq1zY-1VMNwtkJ.d.mts.map +1 -0
- package/dist/{index-BQVrMGfe.d.mts → index-DryPyF9U.d.mts} +3 -3
- package/dist/{index-BQVrMGfe.d.mts.map → index-DryPyF9U.d.mts.map} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/internal-error-BIc-ehme-Ck_lgxD_.mjs +18 -0
- package/dist/internal-error-BIc-ehme-Ck_lgxD_.mjs.map +1 -0
- package/dist/local-target-DnA2E8IN.mjs +47 -0
- package/dist/local-target-DnA2E8IN.mjs.map +1 -0
- package/dist/local-target-DuSyWeYc.mjs +68 -0
- package/dist/local-target-DuSyWeYc.mjs.map +1 -0
- package/dist/local-target.d.mts +1 -1
- package/dist/local-target.mjs +2 -46
- package/dist/{nextjs-DLyeRR7M-D47aMmfr.d.mts → nextjs-DLyeRR7M-DZODs9tk.d.mts} +3 -3
- package/dist/{nextjs-DLyeRR7M-D47aMmfr.d.mts.map → nextjs-DLyeRR7M-DZODs9tk.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/pipeline-D3QoVzAB-Ci2aJ2mE.mjs +331 -0
- package/dist/pipeline-D3QoVzAB-Ci2aJ2mE.mjs.map +1 -0
- package/dist/pipeline-D3QoVzAB-D_ufjg3N.mjs +857 -0
- package/dist/pipeline-D3QoVzAB-D_ufjg3N.mjs.map +1 -0
- package/dist/render-error-DsPN5qfr-CkVGj9uP.mjs +30 -0
- package/dist/render-error-DsPN5qfr-CkVGj9uP.mjs.map +1 -0
- package/dist/report.d.mts +4 -3
- package/dist/report.d.mts.map +1 -1
- package/dist/report.mjs +4 -1
- package/dist/report.mjs.map +1 -1
- package/dist/result-CFqJKiqg.mjs +106 -0
- package/dist/result-CFqJKiqg.mjs.map +1 -0
- package/dist/result-CzGChwbZ.mjs +231 -0
- package/dist/result-CzGChwbZ.mjs.map +1 -0
- package/dist/run-alchemy-hghRtddF-CQHOzlrW.mjs +48 -0
- package/dist/run-alchemy-hghRtddF-CQHOzlrW.mjs.map +1 -0
- package/dist/service-rpc.d.mts +2 -2
- package/dist/service-rpc.mjs +2 -2
- package/dist/shared-CCaR42wo-BvegvmA_.mjs +265 -0
- package/dist/shared-CCaR42wo-BvegvmA_.mjs.map +1 -0
- package/dist/testing.d.mts +1 -1
- package/package.json +11 -10
- package/src/exports/control.ts +1 -0
- package/dist/cli-IDJ-0ZFU-Dz2KMWtU.mjs +0 -3269
- package/dist/cli-IDJ-0ZFU-Dz2KMWtU.mjs.map +0 -1
- package/dist/cli-error-HxLpXiUX-LVlg5SlD.mjs +0 -16
- package/dist/cli-error-HxLpXiUX-LVlg5SlD.mjs.map +0 -1
- package/dist/config-whuqZ5xT.d.mts +0 -1
- package/dist/deploy-C4DxNkJ9-D73lmBqy.mjs +0 -313
- package/dist/deploy-C4DxNkJ9-D73lmBqy.mjs.map +0 -1
- package/dist/deploy-whuqZ5xT.d.mts +0 -1
- package/dist/graph-DDpXh7S8-b-93BcHn.d.mts.map +0 -1
- package/dist/graph-DgbALPDo-BEHF94BN.mjs.map +0 -1
- package/dist/graph-types-C3FOaaXm-C6_rGzfn.d.mts.map +0 -1
- package/dist/local-target.mjs.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { F as ResourceNode, M as ProvisionNeed, U as ServiceNode, d as Graph, n as Config, t as BuildAdapter, w as NodeId, x as ModuleNode } from "./graph-types-
|
|
2
|
-
import "./graph-
|
|
1
|
+
import { F as ResourceNode, M as ProvisionNeed, U as ServiceNode, d as Graph, n as Config, t as BuildAdapter, w as NodeId, x as ModuleNode } from "./graph-types-N6brq1zY-1VMNwtkJ.mjs";
|
|
2
|
+
import "./graph-DqklX5Sf-BNS2aO1j.mjs";
|
|
3
3
|
import * as Alchemy from "alchemy";
|
|
4
4
|
import { Input, StackServices } from "alchemy";
|
|
5
5
|
import * as Effect from "effect/Effect";
|
|
6
6
|
import * as Layer from "effect/Layer";
|
|
7
7
|
import { State } from "alchemy/State/State";
|
|
8
|
-
//#region ../../0-framework/1-core/core/dist/app-config-
|
|
8
|
+
//#region ../../0-framework/1-core/core/dist/app-config-CFsSXEVj.d.mts
|
|
9
9
|
//#region src/container-transport.d.ts
|
|
10
10
|
/**
|
|
11
11
|
* Carries resolved containers from the CLI process into the alchemy process
|
|
@@ -494,4 +494,4 @@ interface PrismaAppConfig {
|
|
|
494
494
|
declare function defineConfig(config: PrismaAppConfig): PrismaAppConfig;
|
|
495
495
|
//#endregion
|
|
496
496
|
export { ProvisionerDescriptor as A, joinDeployment as B, Lowering as C, PreflightInput as D, PackageInput as E, containerEnv as F, lowering as H, containerEnvVarName as I, defineConfig as L, StateDescriptor as M, TeardownInput as N, PrismaAppConfig as O, buildConfig as P, deserializeContainers as R, LoweredResult as S, Outputs as T, mergedProviders as U, lower as V, resolveStateLayer as W, LocalTargetProvidersInput as _, Bundle as a, LowerError as b, DEV_DIR as c, DeploymentResult as d, ExtensionDescriptor as f, LocalTargetEmulatorsInput as g, LocalTargetDescriptor as h, AssembleInput as i, ServiceLowering as j, ProvisionEdge as k, DeployedEntity as l, LocalTargetAttachment as m, ApplicationDescriptor as n, ContainerDescriptor as o, LocalTargetAttachInput as p, Artifact as r, ContainerInstance as s, AlchemyStateLayer as t, DeployedNode as u, LocateContainerInput as v, NodeDescriptor as w, LowerOptions as x, LowerContext as y, isBuildOnlyExtension as z };
|
|
497
|
-
//# sourceMappingURL=app-config-
|
|
497
|
+
//# sourceMappingURL=app-config-CFsSXEVj-B242oUnm.d.mts.map
|
package/dist/{app-config-Cbv_lA38-BHJsd1DF.d.mts.map → app-config-CFsSXEVj-B242oUnm.d.mts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-config-
|
|
1
|
+
{"version":3,"file":"app-config-CFsSXEVj-B242oUnm.d.mts","names":[],"sources":["../../../0-framework/1-core/core/dist/app-config-CFsSXEVj.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;UAmBU;;WAEC;;WAEA;;;;;;;UAOD;WACC,OAAO;;WAEP;;EAET;;;;;;;;;;;;UAYQ,oBAAoB,UAAU,oBAAoB;;EAE1D,OAAO,OAAO,uBAAuB,QAAQ;;EAE7C,OAAO,OAAO,uBAAuB,QAAQ;;EAE7C,OAAO,UAAU,IAAI;;EAErB,YAAY,qBAAqB;;;iBAGlB,oBAAoB;;iBAEpB,aAAa,WAAW,oBAAoB,qBAAqB;;UAExE;WACC;WACA,YAAY;;;;;;iBAMN,sBAAsB,qBAAqB,+BAA+B,KAAK,SAAS,sC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mjs
CHANGED
|
@@ -1,102 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
4
|
-
import * as fs from "node:fs";
|
|
5
|
-
import * as path from "node:path";
|
|
2
|
+
import { a as CliStructuredError, t as checkEffectResolution } from "./shared-CCaR42wo-BvegvmA_.mjs";
|
|
3
|
+
import { n as renderErrorEnvelope } from "./render-error-DsPN5qfr-CkVGj9uP.mjs";
|
|
6
4
|
//#region ../../0-framework/3-tooling/cli/dist/bin.mjs
|
|
7
|
-
/**
|
|
8
|
-
* Deploy preflight (TML-3158): verify that alchemy resolves the exact `effect`
|
|
9
|
-
* version @prisma/composer pins. Package managers cannot be made to enforce
|
|
10
|
-
* this — alchemy's own peer range accepts newer effect betas, and npm resolves
|
|
11
|
-
* transitive peer conflicts with a warning, not a failure — so a floating
|
|
12
|
-
* `@effect/*` range anywhere in the consumer's tree can hoist a newer effect
|
|
13
|
-
* to the root, where alchemy picks it up and crashes mid-deploy
|
|
14
|
-
* (`TypeError: Schedule.either is not a function`). This check turns that
|
|
15
|
-
* silent break into a start-up error naming the fix.
|
|
16
|
-
*/
|
|
17
|
-
/** Walks up from `startDir` looking for `node_modules/alchemy` (mirrors resolveAlchemyBin). Undefined when absent — the check skips rather than second-guessing later, clearer failures. */
|
|
18
|
-
function findAlchemyPackageDir(startDir) {
|
|
19
|
-
let dir = startDir;
|
|
20
|
-
while (true) {
|
|
21
|
-
const candidate = path.join(dir, "node_modules", "alchemy");
|
|
22
|
-
if (fs.existsSync(path.join(candidate, "package.json"))) return candidate;
|
|
23
|
-
const parent = path.dirname(dir);
|
|
24
|
-
if (parent === dir) return void 0;
|
|
25
|
-
dir = parent;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* The `effect` version Node gives `packageDir`'s code, resolved exactly as
|
|
30
|
-
* Node would: from the package's real path (so pnpm symlink layouts resolve
|
|
31
|
-
* from the package's own store position, like at runtime). Undefined when
|
|
32
|
-
* `effect` is not resolvable from there.
|
|
33
|
-
*/
|
|
34
|
-
function resolveEffectVersionFrom(packageDir) {
|
|
35
|
-
let entry;
|
|
36
|
-
try {
|
|
37
|
-
entry = createRequire(path.join(fs.realpathSync(packageDir), "noop.js")).resolve("effect");
|
|
38
|
-
} catch {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
let dir = path.dirname(entry);
|
|
42
|
-
while (!fs.existsSync(path.join(dir, "package.json"))) {
|
|
43
|
-
const parent = path.dirname(dir);
|
|
44
|
-
if (parent === dir) return void 0;
|
|
45
|
-
dir = parent;
|
|
46
|
-
}
|
|
47
|
-
const version = JSON.parse(fs.readFileSync(path.join(dir, "package.json"), "utf-8")).version;
|
|
48
|
-
return typeof version === "string" ? version : void 0;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* The `effect` version @prisma/composer pins, read from its own installed
|
|
52
|
-
* package.json — the single source of truth; never hardcoded here. Undefined
|
|
53
|
-
* when @prisma/composer is not resolvable from `startDir` (e.g. the CLI is
|
|
54
|
-
* driven some other way), in which case the check skips.
|
|
55
|
-
*
|
|
56
|
-
* Assumes the pin is an exact version — effectMismatchError compares with
|
|
57
|
-
* `===`, which scripts/check-npm-effect-resolution.mjs enforces in CI;
|
|
58
|
-
* relaxing the pin to a range means revisiting that comparison.
|
|
59
|
-
*/
|
|
60
|
-
function requiredEffectVersion(startDir) {
|
|
61
|
-
let manifestPath;
|
|
62
|
-
try {
|
|
63
|
-
manifestPath = createRequire(path.join(startDir, "noop.js")).resolve("@prisma/composer/package.json");
|
|
64
|
-
} catch {
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf-8"));
|
|
68
|
-
if (typeof manifest !== "object" || manifest === null || !("dependencies" in manifest)) return;
|
|
69
|
-
const dependencies = manifest.dependencies;
|
|
70
|
-
if (typeof dependencies !== "object" || dependencies === null || !("effect" in dependencies)) return;
|
|
71
|
-
const version = dependencies.effect;
|
|
72
|
-
return typeof version === "string" ? version : void 0;
|
|
73
|
-
}
|
|
74
|
-
/** Pure comparison + message rendering, separated so tests cover the rule without a filesystem. Returns the error message, or undefined when the tree is healthy or either side is unknown. */
|
|
75
|
-
function effectMismatchError(found, required) {
|
|
76
|
-
if (found === void 0 || required === void 0 || found === required) return void 0;
|
|
77
|
-
return `Dependency conflict: alchemy resolves effect@${found}, but @prisma/composer requires effect@${required}. Your package manager installed a second effect that alchemy picks up; deploying with it would crash inside alchemy.
|
|
78
|
-
|
|
79
|
-
Fix: add this to your app's package.json, then reinstall:
|
|
80
|
-
|
|
81
|
-
"overrides": { "effect": "${required}" }\n\n(npm uses "overrides"; yarn calls it "resolutions", pnpm "pnpm.overrides".)`;
|
|
82
|
-
}
|
|
83
|
-
/** Runs the preflight from the app's directory; throws CliError on a mismatched tree, no-op otherwise. */
|
|
84
|
-
function checkEffectResolution(cwd) {
|
|
85
|
-
const alchemyDir = findAlchemyPackageDir(cwd);
|
|
86
|
-
if (alchemyDir === void 0) return;
|
|
87
|
-
const message = effectMismatchError(resolveEffectVersionFrom(alchemyDir), requiredEffectVersion(cwd));
|
|
88
|
-
if (message !== void 0) throw new CliError(message);
|
|
89
|
-
}
|
|
90
5
|
try {
|
|
91
6
|
checkEffectResolution(process.cwd());
|
|
92
7
|
} catch (error) {
|
|
93
|
-
if (error
|
|
94
|
-
console.error(
|
|
95
|
-
process.exit(
|
|
8
|
+
if (CliStructuredError.is(error)) {
|
|
9
|
+
console.error(renderErrorEnvelope(error.toEnvelope()));
|
|
10
|
+
process.exit(2);
|
|
96
11
|
}
|
|
97
12
|
throw error;
|
|
98
13
|
}
|
|
99
|
-
const { cli } = await import("./cli-
|
|
14
|
+
const { cli } = await import("./cli-B3sWzFlb-CxEIzKsQ.mjs");
|
|
100
15
|
cli();
|
|
101
16
|
//#endregion
|
|
102
17
|
export {};
|
package/dist/bin.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/bin.mjs"],"sourcesContent":["#!/usr/bin/env node\nimport {
|
|
1
|
+
{"version":3,"file":"bin.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/bin.mjs"],"sourcesContent":["#!/usr/bin/env node\nimport { i as checkEffectResolution } from \"./shared-CCaR42wo.mjs\";\nimport { n as renderErrorEnvelope } from \"./render-error-DsPN5qfr.mjs\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\n//#region src/bin.ts\ntry {\n\tcheckEffectResolution(process.cwd());\n} catch (error) {\n\tif (CliStructuredError.is(error)) {\n\t\tconsole.error(renderErrorEnvelope(error.toEnvelope()));\n\t\tprocess.exit(2);\n\t}\n\tthrow error;\n}\nconst { cli } = await import(\"./cli-B3sWzFlb.mjs\");\ncli();\n//#endregion\nexport {};\n\n//# sourceMappingURL=bin.mjs.map"],"mappings":";;;;AAKA,IAAI;CACH,sBAAsB,QAAQ,IAAI,CAAC;AACpC,SAAS,OAAO;CACf,IAAI,mBAAmB,GAAG,KAAK,GAAG;EACjC,QAAQ,MAAM,oBAAoB,MAAM,WAAW,CAAC,CAAC;EACrD,QAAQ,KAAK,CAAC;CACf;CACA,MAAM;AACP;AACA,MAAM,EAAE,QAAQ,MAAM,OAAO;AAC7B,IAAI"}
|
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
import { a as CliStructuredError, r as executorLoadFailure } from "./shared-CCaR42wo-BvegvmA_.mjs";
|
|
2
|
+
import { t as notOk } from "./result-CFqJKiqg.mjs";
|
|
3
|
+
import { n as renderErrorEnvelope, t as renderChildStatusHints } from "./render-error-DsPN5qfr-CkVGj9uP.mjs";
|
|
4
|
+
import { Cli, Command, Option, UsageError } from "clipanion";
|
|
5
|
+
//#region ../../0-framework/3-tooling/cli/dist/destroy-DPAo6kVj.mjs
|
|
6
|
+
/** In-package variant threading the injection seam (the CLI's RunDeps, unit
|
|
7
|
+
* tests). Deliberately NOT re-exported through `./control` — the seam mirrors
|
|
8
|
+
* internal types and is not part of the published surface. */
|
|
9
|
+
async function devWithDeps(input, deps) {
|
|
10
|
+
const cwd = input.cwd ?? process.cwd();
|
|
11
|
+
let executor;
|
|
12
|
+
try {
|
|
13
|
+
executor = await import("./execute-dev-DLYyduEM-BuUGTm0g.mjs");
|
|
14
|
+
} catch (error) {
|
|
15
|
+
return notOk(executorLoadFailure("dev", error, cwd));
|
|
16
|
+
}
|
|
17
|
+
return executor.executeDev(input, deps, cwd);
|
|
18
|
+
}
|
|
19
|
+
/** In-package variant threading the injection seam (the CLI's LogRunDeps,
|
|
20
|
+
* unit tests). Deliberately NOT re-exported through `./control` — the seam
|
|
21
|
+
* mirrors internal types and is not part of the published surface. */
|
|
22
|
+
async function logWithDeps(input, deps) {
|
|
23
|
+
const cwd = input.cwd ?? process.cwd();
|
|
24
|
+
let executor;
|
|
25
|
+
try {
|
|
26
|
+
executor = await import("./execute-log-VIOL4DBz-DKodBrxS.mjs");
|
|
27
|
+
} catch (error) {
|
|
28
|
+
return notOk(executorLoadFailure("log", error, cwd));
|
|
29
|
+
}
|
|
30
|
+
return executor.executeLog(input, deps, cwd);
|
|
31
|
+
}
|
|
32
|
+
/** In-package variant threading the injection seam (the CLI's RunDeps, unit
|
|
33
|
+
* tests). Deliberately NOT re-exported through `./control` — the seam mirrors
|
|
34
|
+
* internal types and is not part of the published surface. */
|
|
35
|
+
async function deployWithDeps(input, deps) {
|
|
36
|
+
const cwd = input.cwd ?? process.cwd();
|
|
37
|
+
let executor;
|
|
38
|
+
try {
|
|
39
|
+
executor = await import("./execute-deploy-destroy-IT4vGkMc-YM1Cv6cu.mjs");
|
|
40
|
+
} catch (error) {
|
|
41
|
+
return notOk(executorLoadFailure("deploy", error, cwd));
|
|
42
|
+
}
|
|
43
|
+
return executor.executeDeploy(input, deps, cwd);
|
|
44
|
+
}
|
|
45
|
+
/** In-package variant threading the injection seam (the CLI's RunDeps, unit
|
|
46
|
+
* tests). Deliberately NOT re-exported through `./control` — the seam mirrors
|
|
47
|
+
* internal types and is not part of the published surface. */
|
|
48
|
+
async function destroyWithDeps(input, deps) {
|
|
49
|
+
const cwd = input.cwd ?? process.cwd();
|
|
50
|
+
let executor;
|
|
51
|
+
try {
|
|
52
|
+
executor = await import("./execute-deploy-destroy-IT4vGkMc-YM1Cv6cu.mjs");
|
|
53
|
+
} catch (error) {
|
|
54
|
+
return notOk(executorLoadFailure("destroy", error, cwd));
|
|
55
|
+
}
|
|
56
|
+
return executor.executeDestroy(input, deps, cwd);
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region ../../0-framework/3-tooling/cli/dist/cli-M2oUU0IV.mjs
|
|
60
|
+
/**
|
|
61
|
+
* Local-dev spec § 6 `run-dev.ts`: `prisma-composer dev <entry>` — the CLI
|
|
62
|
+
* adapter over the programmatic `dev()` operation
|
|
63
|
+
* (../operations/execute-dev.ts): parse-shaped args in, events rendered to the
|
|
64
|
+
* console, signal handling and exit codes owned here. The pipeline itself
|
|
65
|
+
* (capability check, containers, `--fresh` teardown, preflight, emulators,
|
|
66
|
+
* converge, attach, watch loop) lives in the operation.
|
|
67
|
+
*/
|
|
68
|
+
/** `[dev] ready:` then one line per endpoint, ordered by address depth (fewest dots first) then lexicographic. Exported for tests. */
|
|
69
|
+
function renderFrontDoor(endpoints) {
|
|
70
|
+
return ["[dev] ready:", ...[...endpoints].sort((a, b) => {
|
|
71
|
+
const depthA = a.address.split(".").length;
|
|
72
|
+
const depthB = b.address.split(".").length;
|
|
73
|
+
if (depthA !== depthB) return depthA - depthB;
|
|
74
|
+
return a.address < b.address ? -1 : a.address > b.address ? 1 : 0;
|
|
75
|
+
}).map((e) => `[dev] ${e.address} ${e.url}`)];
|
|
76
|
+
}
|
|
77
|
+
function printFrontDoor(endpoints) {
|
|
78
|
+
for (const line of renderFrontDoor(endpoints)) console.log(line);
|
|
79
|
+
}
|
|
80
|
+
/** Runs the full dev pipeline; returns the process exit code. */
|
|
81
|
+
async function runDev(args, deps = {}) {
|
|
82
|
+
let hintPrinted = false;
|
|
83
|
+
const pendingUnwatchable = [];
|
|
84
|
+
const result = await devWithDeps({
|
|
85
|
+
entry: args.entry,
|
|
86
|
+
name: args.name,
|
|
87
|
+
fresh: args.fresh,
|
|
88
|
+
onEvent: (event) => {
|
|
89
|
+
switch (event.kind) {
|
|
90
|
+
case "ready":
|
|
91
|
+
printFrontDoor(event.endpoints);
|
|
92
|
+
break;
|
|
93
|
+
case "unwatchable": {
|
|
94
|
+
const line = `[dev] ${event.address} has no watchable inputs`;
|
|
95
|
+
if (hintPrinted) console.log(line);
|
|
96
|
+
else pendingUnwatchable.push(line);
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
case "converge-failed":
|
|
100
|
+
console.error("[dev] converge failed — the running app is untouched; still watching.");
|
|
101
|
+
console.error(`\nGenerated stack file: ${event.stackFilePath}`);
|
|
102
|
+
console.error(`Run \`${event.reproduceCommand}\` from ${event.cwd} to reproduce this directly.`);
|
|
103
|
+
break;
|
|
104
|
+
case "rebuild-failed":
|
|
105
|
+
console.error(`[dev] rebuild failed: ${event.message}`);
|
|
106
|
+
break;
|
|
107
|
+
case "watch-error":
|
|
108
|
+
console.error(`[dev] watch error: ${event.message}`);
|
|
109
|
+
break;
|
|
110
|
+
case "stop-error":
|
|
111
|
+
console.error(`[dev] a service refused to stop: ${event.message}`);
|
|
112
|
+
break;
|
|
113
|
+
case "stopping":
|
|
114
|
+
console.log("[dev] stopping — the app's services are stopping; emulators and data stay up.");
|
|
115
|
+
break;
|
|
116
|
+
case "stopped":
|
|
117
|
+
console.log("[dev] stopped.");
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}, deps);
|
|
122
|
+
if (!result.ok) {
|
|
123
|
+
const failure = result.failure;
|
|
124
|
+
const status = renderChildStatusHints(failure);
|
|
125
|
+
if (status !== void 0) return status;
|
|
126
|
+
throw failure;
|
|
127
|
+
}
|
|
128
|
+
const session = result.value;
|
|
129
|
+
console.log(`[dev] logs: prisma-composer log ${args.entry}`);
|
|
130
|
+
hintPrinted = true;
|
|
131
|
+
for (const line of pendingUnwatchable.splice(0)) console.log(line);
|
|
132
|
+
const finish = () => {
|
|
133
|
+
session.stop();
|
|
134
|
+
};
|
|
135
|
+
process.removeAllListeners("SIGINT");
|
|
136
|
+
process.removeAllListeners("SIGTERM");
|
|
137
|
+
process.on("SIGINT", finish);
|
|
138
|
+
process.on("SIGTERM", finish);
|
|
139
|
+
await session.closed;
|
|
140
|
+
process.off("SIGINT", finish);
|
|
141
|
+
process.off("SIGTERM", finish);
|
|
142
|
+
return 0;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* `prisma-composer log <entry> [address]` — the CLI adapter over the
|
|
146
|
+
* programmatic `log()` operation (../operations/execute-log.ts): it owns the
|
|
147
|
+
* SIGINT/SIGTERM → abort wiring, the empty-services notice, and the
|
|
148
|
+
* `[service] line` rendering. Resolution, attach, and the merged stream live
|
|
149
|
+
* in the operation. `dev` no longer streams logs inline (that drowned the
|
|
150
|
+
* front door once it supervises more than one service); this is where logs
|
|
151
|
+
* live.
|
|
152
|
+
*/
|
|
153
|
+
/** Runs the log tail until interrupted; returns the process exit code. */
|
|
154
|
+
async function runLog(args, deps = {}) {
|
|
155
|
+
const controller = new AbortController();
|
|
156
|
+
const finish = () => controller.abort();
|
|
157
|
+
process.on("SIGINT", finish);
|
|
158
|
+
process.on("SIGTERM", finish);
|
|
159
|
+
try {
|
|
160
|
+
const result = await logWithDeps({
|
|
161
|
+
entry: args.entry,
|
|
162
|
+
name: args.name,
|
|
163
|
+
address: args.address,
|
|
164
|
+
tail: args.tail,
|
|
165
|
+
signal: controller.signal,
|
|
166
|
+
onEvent: (event) => {
|
|
167
|
+
if (event.kind === "stream-failed") console.error(`[log] stream failed: ${event.message}`);
|
|
168
|
+
else if (event.kind === "lines-dropped") console.error(`[log] falling behind — dropped the ${String(event.count)} oldest lines.`);
|
|
169
|
+
}
|
|
170
|
+
}, {
|
|
171
|
+
config: deps.config,
|
|
172
|
+
identity: deps.identity
|
|
173
|
+
});
|
|
174
|
+
if (!result.ok) throw result.failure;
|
|
175
|
+
const attached = result.value;
|
|
176
|
+
if (attached.services.length === 0) {
|
|
177
|
+
console.error(`[log] no running services for "${attached.appName}" — start it first with \`prisma-composer dev ${args.entry}\`.`);
|
|
178
|
+
return 0;
|
|
179
|
+
}
|
|
180
|
+
for await (const { service, line } of attached.lines) console.log(`[${service}] ${line}`);
|
|
181
|
+
} finally {
|
|
182
|
+
process.off("SIGINT", finish);
|
|
183
|
+
process.off("SIGTERM", finish);
|
|
184
|
+
}
|
|
185
|
+
return 0;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Argument parsing (clipanion — prisma-next's CLI idiom, see
|
|
189
|
+
* prisma-next/packages/1-framework/3-tooling/cli/src/migration-cli.ts) +
|
|
190
|
+
* orchestration of deploy-cli.md § The pipeline.
|
|
191
|
+
*/
|
|
192
|
+
const BINARY_NAME = "prisma-composer";
|
|
193
|
+
/** The <entry>/--name/--stage surface shared by deploy and destroy; execute() is unused — run() drives the pipeline directly so error handling stays under this module's control. */
|
|
194
|
+
var DeployCliCommand = class extends Command {
|
|
195
|
+
entry = Option.String({ name: "entry" });
|
|
196
|
+
name = Option.String("--name", { description: "Override the root node's name — the deploy's application name." });
|
|
197
|
+
stage = Option.String("--stage", { description: "Alchemy stage to target." });
|
|
198
|
+
production = Option.Boolean("--production", false, { description: "destroy: tear down the project-level production environment (required to destroy production)." });
|
|
199
|
+
async execute() {
|
|
200
|
+
return 0;
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
var DeployCommand = class extends DeployCliCommand {
|
|
204
|
+
static paths = [["deploy"]];
|
|
205
|
+
static usage = Command.Usage({
|
|
206
|
+
description: "Deploy the application whose root node is <entry>'s default export.",
|
|
207
|
+
examples: [["Deploy an app", "$0 deploy src/service.ts"]]
|
|
208
|
+
});
|
|
209
|
+
action = "deploy";
|
|
210
|
+
};
|
|
211
|
+
var DestroyCommand = class extends DeployCliCommand {
|
|
212
|
+
static paths = [["destroy"]];
|
|
213
|
+
static usage = Command.Usage({
|
|
214
|
+
description: "Tear down the application whose root node is <entry>'s default export — same derivation as deploy, Alchemy destroy.",
|
|
215
|
+
examples: [["Destroy an app", "$0 destroy src/service.ts"]]
|
|
216
|
+
});
|
|
217
|
+
action = "destroy";
|
|
218
|
+
};
|
|
219
|
+
/** `<entry>`/`--name`/`--fresh` only — no `--stage`/`--production` (local-dev spec § 6: a working directory has exactly one dev instance, no stages). */
|
|
220
|
+
var DevCommand = class extends Command {
|
|
221
|
+
static paths = [["dev"]];
|
|
222
|
+
static usage = Command.Usage({
|
|
223
|
+
description: "Bring up the application whose root node is <entry>'s default export, entirely on this machine, credential-free.",
|
|
224
|
+
examples: [["Run an app locally", "$0 dev src/service.ts"]]
|
|
225
|
+
});
|
|
226
|
+
entry = Option.String({ name: "entry" });
|
|
227
|
+
name = Option.String("--name", { description: "Override the root node's name — the dev instance's application name." });
|
|
228
|
+
fresh = Option.Boolean("--fresh", false, { description: "Destroy the dev stack and wipe the dev state directory before starting." });
|
|
229
|
+
async execute() {
|
|
230
|
+
return 0;
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
var LogCommand = class extends Command {
|
|
234
|
+
static paths = [["log"]];
|
|
235
|
+
static usage = Command.Usage({
|
|
236
|
+
description: "Tail the merged logs of the locally-running application whose root node is <entry>'s default export.",
|
|
237
|
+
examples: [["Tail every service", "$0 log src/service.ts"], ["Tail one service", "$0 log src/service.ts catalog.service"]]
|
|
238
|
+
});
|
|
239
|
+
entry = Option.String({ name: "entry" });
|
|
240
|
+
address = Option.String({
|
|
241
|
+
name: "address",
|
|
242
|
+
required: false
|
|
243
|
+
});
|
|
244
|
+
name = Option.String("--name", { description: "Override the root node's name — the dev instance's application name." });
|
|
245
|
+
tail = Option.String("--tail", { description: `How many trailing history lines to show before live output (default ${String(DEFAULT_LOG_TAIL)}).` });
|
|
246
|
+
async execute() {
|
|
247
|
+
return 0;
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
function buildCli() {
|
|
251
|
+
return Cli.from([
|
|
252
|
+
DeployCommand,
|
|
253
|
+
DestroyCommand,
|
|
254
|
+
DevCommand,
|
|
255
|
+
LogCommand
|
|
256
|
+
], {
|
|
257
|
+
binaryName: BINARY_NAME,
|
|
258
|
+
binaryLabel: "The prisma-composer deploy CLI"
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
/** Thrown internally when the user explicitly asked for `--help`/`-h` — run() prints it to stdout and exits 0; not a usage error. */
|
|
262
|
+
var HelpRequested = class extends Error {};
|
|
263
|
+
/** Duck-typed: clipanion's UnknownSyntaxError isn't re-exported, so match its name + clipanion.type discriminator (mirrors prisma-next's migration-cli.ts). */
|
|
264
|
+
function isUnknownSyntaxError(error) {
|
|
265
|
+
if (!(error instanceof Error) || error.name !== "UnknownSyntaxError") return false;
|
|
266
|
+
const meta = error.clipanion;
|
|
267
|
+
return typeof meta === "object" && meta !== null && meta.type === "none";
|
|
268
|
+
}
|
|
269
|
+
/** `log`'s default backlog: an empty screen reads as broken, so show a little recent history before going live. */
|
|
270
|
+
const DEFAULT_LOG_TAIL = 20;
|
|
271
|
+
/** Exported for direct testing (main.test.ts) — not part of the package's public barrel (see index.ts). */
|
|
272
|
+
function parseArgs(argv) {
|
|
273
|
+
const cli = buildCli();
|
|
274
|
+
let command;
|
|
275
|
+
try {
|
|
276
|
+
command = cli.process([...argv]);
|
|
277
|
+
} catch (error) {
|
|
278
|
+
if (isUnknownSyntaxError(error) || error instanceof UsageError) throw new UsageError(cli.usage(null, { detailed: true }));
|
|
279
|
+
throw error;
|
|
280
|
+
}
|
|
281
|
+
if (command instanceof DeployCommand || command instanceof DestroyCommand) return {
|
|
282
|
+
command: command.action,
|
|
283
|
+
entry: command.entry,
|
|
284
|
+
name: command.name,
|
|
285
|
+
stage: command.stage,
|
|
286
|
+
production: command.production,
|
|
287
|
+
fresh: false
|
|
288
|
+
};
|
|
289
|
+
if (command instanceof DevCommand) return {
|
|
290
|
+
command: "dev",
|
|
291
|
+
entry: command.entry,
|
|
292
|
+
name: command.name,
|
|
293
|
+
stage: void 0,
|
|
294
|
+
production: false,
|
|
295
|
+
fresh: command.fresh
|
|
296
|
+
};
|
|
297
|
+
if (command instanceof LogCommand) {
|
|
298
|
+
const tail = command.tail === void 0 ? DEFAULT_LOG_TAIL : Number.parseInt(command.tail, 10);
|
|
299
|
+
if (Number.isNaN(tail) || tail < 0) throw new UsageError("`--tail` must be a non-negative integer.");
|
|
300
|
+
return {
|
|
301
|
+
command: "log",
|
|
302
|
+
entry: command.entry,
|
|
303
|
+
name: command.name,
|
|
304
|
+
stage: void 0,
|
|
305
|
+
production: false,
|
|
306
|
+
fresh: false,
|
|
307
|
+
address: command.address,
|
|
308
|
+
tail
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
if (argv.includes("--help") || argv.includes("-h")) throw new HelpRequested(cli.usage(null, { detailed: true }));
|
|
312
|
+
throw new UsageError(cli.usage(null, { detailed: true }));
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Renders a deploy/destroy operation failure the way run() always has: an
|
|
316
|
+
* alchemy exit becomes the two console.error hint lines and the child's own
|
|
317
|
+
* status (the documented ADR-0044 child-status exception); everything else
|
|
318
|
+
* rethrows the structured failure so cli.ts renders its envelope.
|
|
319
|
+
*/
|
|
320
|
+
function renderDeployDestroyFailure(failure) {
|
|
321
|
+
const status = renderChildStatusHints(failure);
|
|
322
|
+
if (status !== void 0) return status;
|
|
323
|
+
throw failure;
|
|
324
|
+
}
|
|
325
|
+
/** Runs the full pipeline; returns the process exit code. */
|
|
326
|
+
async function run(argv, deps = {}) {
|
|
327
|
+
let args;
|
|
328
|
+
try {
|
|
329
|
+
args = parseArgs(argv);
|
|
330
|
+
} catch (error) {
|
|
331
|
+
if (error instanceof HelpRequested) {
|
|
332
|
+
console.log(error.message);
|
|
333
|
+
return 0;
|
|
334
|
+
}
|
|
335
|
+
throw error;
|
|
336
|
+
}
|
|
337
|
+
if (args.command === "dev") return runDev(args, deps);
|
|
338
|
+
if (args.command === "log") return runLog({
|
|
339
|
+
entry: args.entry,
|
|
340
|
+
name: args.name,
|
|
341
|
+
address: args.address,
|
|
342
|
+
tail: args.tail ?? DEFAULT_LOG_TAIL
|
|
343
|
+
}, { config: deps.config });
|
|
344
|
+
if (args.command === "deploy") {
|
|
345
|
+
if (args.production) throw new CliStructuredError("DEPLOY.FLAG_INVALID", "--production is only valid with `destroy`.", { fix: "`deploy` targets production by default (omit --stage)." });
|
|
346
|
+
const result = await deployWithDeps({
|
|
347
|
+
entry: args.entry,
|
|
348
|
+
name: args.name,
|
|
349
|
+
stage: args.stage
|
|
350
|
+
}, deps);
|
|
351
|
+
if (result.ok) return 0;
|
|
352
|
+
return renderDeployDestroyFailure(result.failure);
|
|
353
|
+
}
|
|
354
|
+
if (args.stage !== void 0 && args.production) throw new CliStructuredError("DEPLOY.TARGET_CONFLICT", "Pass either --stage <name> or --production to `destroy`, not both.");
|
|
355
|
+
if (args.stage === void 0 && !args.production) throw new CliStructuredError("DEPLOY.TARGET_MISSING", "`destroy` requires an explicit target.", { fix: "Pass --stage <name> to tear down a branch environment, or --production to tear down the production environment." });
|
|
356
|
+
const target = args.stage !== void 0 ? {
|
|
357
|
+
kind: "stage",
|
|
358
|
+
stage: args.stage
|
|
359
|
+
} : { kind: "production" };
|
|
360
|
+
const result = await destroyWithDeps({
|
|
361
|
+
entry: args.entry,
|
|
362
|
+
name: args.name,
|
|
363
|
+
target,
|
|
364
|
+
onEvent: (event) => {
|
|
365
|
+
if (event.kind === "no-local-deploy-state") console.warn(`\nNo prior deploy state under ${event.cwd} — if you deployed from a different directory, run destroy from there; otherwise this is a no-op.`);
|
|
366
|
+
}
|
|
367
|
+
}, deps);
|
|
368
|
+
if (result.ok) return 0;
|
|
369
|
+
return renderDeployDestroyFailure(result.failure);
|
|
370
|
+
}
|
|
371
|
+
/** Printed for a non-structured escape — by the shared base-type rules that is a bug, not a user failure. */
|
|
372
|
+
const REPORT_HINT = "This is a bug in prisma-composer, not in your app — please report it: https://github.com/prisma/composer/issues";
|
|
373
|
+
/**
|
|
374
|
+
* Run the `prisma-composer` CLI end to end: dispatch `argv`, map errors to exit
|
|
375
|
+
* codes — usage errors and structured failures exit 2 (expected failures),
|
|
376
|
+
* anything else is a bug and exits 1 with a report hint. Shared by this
|
|
377
|
+
* package's `bin` and the unscoped `prisma-composer` launcher.
|
|
378
|
+
*/
|
|
379
|
+
async function cli(argv = process.argv.slice(2)) {
|
|
380
|
+
try {
|
|
381
|
+
process.exitCode = await run(argv);
|
|
382
|
+
} catch (error) {
|
|
383
|
+
if (error instanceof UsageError) {
|
|
384
|
+
console.error(error.message);
|
|
385
|
+
process.exitCode = 2;
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
if (CliStructuredError.is(error)) {
|
|
389
|
+
console.error(renderErrorEnvelope(error.toEnvelope()));
|
|
390
|
+
process.exitCode = 2;
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
console.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
|
|
394
|
+
console.error(REPORT_HINT);
|
|
395
|
+
process.exitCode = 1;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
//#endregion
|
|
399
|
+
export { cli };
|
|
400
|
+
|
|
401
|
+
//# sourceMappingURL=cli-B3sWzFlb-CxEIzKsQ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-B3sWzFlb-CxEIzKsQ.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/destroy-DPAo6kVj.mjs","../../../0-framework/3-tooling/cli/dist/cli-M2oUU0IV.mjs"],"sourcesContent":["import { n as executorLoadFailure } from \"./shared-CCaR42wo.mjs\";\nimport { notOk } from \"@internal/foundation/result\";\n//#region src/operations/dev.ts\nasync function dev(input) {\n\treturn devWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's RunDeps, unit\n* tests). Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function devWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-dev-DLYyduEM.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"dev\", error, cwd));\n\t}\n\treturn executor.executeDev(input, deps, cwd);\n}\n//#endregion\n//#region src/operations/log.ts\nasync function log(input) {\n\treturn logWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's LogRunDeps,\n* unit tests). Deliberately NOT re-exported through `./control` — the seam\n* mirrors internal types and is not part of the published surface. */\nasync function logWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-log-VIOL4DBz.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"log\", error, cwd));\n\t}\n\treturn executor.executeLog(input, deps, cwd);\n}\n//#endregion\n//#region src/operations/deploy.ts\nasync function deploy(input) {\n\treturn deployWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's RunDeps, unit\n* tests). Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function deployWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-deploy-destroy-IT4vGkMc.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"deploy\", error, cwd));\n\t}\n\treturn executor.executeDeploy(input, deps, cwd);\n}\n//#endregion\n//#region src/operations/destroy.ts\nasync function destroy(input) {\n\treturn destroyWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's RunDeps, unit\n* tests). Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function destroyWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-deploy-destroy-IT4vGkMc.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"destroy\", error, cwd));\n\t}\n\treturn executor.executeDestroy(input, deps, cwd);\n}\n//#endregion\nexport { log as a, devWithDeps as c, deployWithDeps as i, destroyWithDeps as n, logWithDeps as o, deploy as r, dev as s, destroy as t };\n\n//# sourceMappingURL=destroy-DPAo6kVj.mjs.map","import { c as devWithDeps, i as deployWithDeps, n as destroyWithDeps, o as logWithDeps } from \"./destroy-DPAo6kVj.mjs\";\nimport { n as renderErrorEnvelope, t as renderChildStatusHints } from \"./render-error-DsPN5qfr.mjs\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport { Cli, Command, Option, UsageError } from \"clipanion\";\n//#region src/dev/run-dev.ts\n/**\n* Local-dev spec § 6 `run-dev.ts`: `prisma-composer dev <entry>` — the CLI\n* adapter over the programmatic `dev()` operation\n* (../operations/execute-dev.ts): parse-shaped args in, events rendered to the\n* console, signal handling and exit codes owned here. The pipeline itself\n* (capability check, containers, `--fresh` teardown, preflight, emulators,\n* converge, attach, watch loop) lives in the operation.\n*/\n/** `[dev] ready:` then one line per endpoint, ordered by address depth (fewest dots first) then lexicographic. Exported for tests. */\nfunction renderFrontDoor(endpoints) {\n\treturn [\"[dev] ready:\", ...[...endpoints].sort((a, b) => {\n\t\tconst depthA = a.address.split(\".\").length;\n\t\tconst depthB = b.address.split(\".\").length;\n\t\tif (depthA !== depthB) return depthA - depthB;\n\t\treturn a.address < b.address ? -1 : a.address > b.address ? 1 : 0;\n\t}).map((e) => `[dev] ${e.address} ${e.url}`)];\n}\nfunction printFrontDoor(endpoints) {\n\tfor (const line of renderFrontDoor(endpoints)) console.log(line);\n}\n/** Runs the full dev pipeline; returns the process exit code. */\nasync function runDev(args, deps = {}) {\n\tlet hintPrinted = false;\n\tconst pendingUnwatchable = [];\n\tconst result = await devWithDeps({\n\t\tentry: args.entry,\n\t\tname: args.name,\n\t\tfresh: args.fresh,\n\t\tonEvent: (event) => {\n\t\t\tswitch (event.kind) {\n\t\t\t\tcase \"ready\":\n\t\t\t\t\tprintFrontDoor(event.endpoints);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"unwatchable\": {\n\t\t\t\t\tconst line = `[dev] ${event.address} has no watchable inputs`;\n\t\t\t\t\tif (hintPrinted) console.log(line);\n\t\t\t\t\telse pendingUnwatchable.push(line);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"converge-failed\":\n\t\t\t\t\tconsole.error(\"[dev] converge failed — the running app is untouched; still watching.\");\n\t\t\t\t\tconsole.error(`\\nGenerated stack file: ${event.stackFilePath}`);\n\t\t\t\t\tconsole.error(`Run \\`${event.reproduceCommand}\\` from ${event.cwd} to reproduce this directly.`);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"rebuild-failed\":\n\t\t\t\t\tconsole.error(`[dev] rebuild failed: ${event.message}`);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"watch-error\":\n\t\t\t\t\tconsole.error(`[dev] watch error: ${event.message}`);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"stop-error\":\n\t\t\t\t\tconsole.error(`[dev] a service refused to stop: ${event.message}`);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"stopping\":\n\t\t\t\t\tconsole.log(\"[dev] stopping — the app's services are stopping; emulators and data stay up.\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"stopped\":\n\t\t\t\t\tconsole.log(\"[dev] stopped.\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}, deps);\n\tif (!result.ok) {\n\t\tconst failure = result.failure;\n\t\tconst status = renderChildStatusHints(failure);\n\t\tif (status !== void 0) return status;\n\t\tthrow failure;\n\t}\n\tconst session = result.value;\n\tconsole.log(`[dev] logs: prisma-composer log ${args.entry}`);\n\thintPrinted = true;\n\tfor (const line of pendingUnwatchable.splice(0)) console.log(line);\n\tconst finish = () => {\n\t\tsession.stop();\n\t};\n\tprocess.removeAllListeners(\"SIGINT\");\n\tprocess.removeAllListeners(\"SIGTERM\");\n\tprocess.on(\"SIGINT\", finish);\n\tprocess.on(\"SIGTERM\", finish);\n\tawait session.closed;\n\tprocess.off(\"SIGINT\", finish);\n\tprocess.off(\"SIGTERM\", finish);\n\treturn 0;\n}\n//#endregion\n//#region src/log/run-log.ts\n/**\n* `prisma-composer log <entry> [address]` — the CLI adapter over the\n* programmatic `log()` operation (../operations/execute-log.ts): it owns the\n* SIGINT/SIGTERM → abort wiring, the empty-services notice, and the\n* `[service] line` rendering. Resolution, attach, and the merged stream live\n* in the operation. `dev` no longer streams logs inline (that drowned the\n* front door once it supervises more than one service); this is where logs\n* live.\n*/\n/** Runs the log tail until interrupted; returns the process exit code. */\nasync function runLog(args, deps = {}) {\n\tconst controller = new AbortController();\n\tconst finish = () => controller.abort();\n\tprocess.on(\"SIGINT\", finish);\n\tprocess.on(\"SIGTERM\", finish);\n\ttry {\n\t\tconst result = await logWithDeps({\n\t\t\tentry: args.entry,\n\t\t\tname: args.name,\n\t\t\taddress: args.address,\n\t\t\ttail: args.tail,\n\t\t\tsignal: controller.signal,\n\t\t\tonEvent: (event) => {\n\t\t\t\tif (event.kind === \"stream-failed\") console.error(`[log] stream failed: ${event.message}`);\n\t\t\t\telse if (event.kind === \"lines-dropped\") console.error(`[log] falling behind — dropped the ${String(event.count)} oldest lines.`);\n\t\t\t}\n\t\t}, {\n\t\t\tconfig: deps.config,\n\t\t\tidentity: deps.identity\n\t\t});\n\t\tif (!result.ok) throw result.failure;\n\t\tconst attached = result.value;\n\t\tif (attached.services.length === 0) {\n\t\t\tconsole.error(`[log] no running services for \"${attached.appName}\" — start it first with \\`prisma-composer dev ${args.entry}\\`.`);\n\t\t\treturn 0;\n\t\t}\n\t\tfor await (const { service, line } of attached.lines) console.log(`[${service}] ${line}`);\n\t} finally {\n\t\tprocess.off(\"SIGINT\", finish);\n\t\tprocess.off(\"SIGTERM\", finish);\n\t}\n\treturn 0;\n}\n//#endregion\n//#region src/main.ts\n/**\n* Argument parsing (clipanion — prisma-next's CLI idiom, see\n* prisma-next/packages/1-framework/3-tooling/cli/src/migration-cli.ts) +\n* orchestration of deploy-cli.md § The pipeline.\n*/\nconst BINARY_NAME = \"prisma-composer\";\n/** The <entry>/--name/--stage surface shared by deploy and destroy; execute() is unused — run() drives the pipeline directly so error handling stays under this module's control. */\nvar DeployCliCommand = class extends Command {\n\tentry = Option.String({ name: \"entry\" });\n\tname = Option.String(\"--name\", { description: \"Override the root node's name — the deploy's application name.\" });\n\tstage = Option.String(\"--stage\", { description: \"Alchemy stage to target.\" });\n\tproduction = Option.Boolean(\"--production\", false, { description: \"destroy: tear down the project-level production environment (required to destroy production).\" });\n\tasync execute() {\n\t\treturn 0;\n\t}\n};\nvar DeployCommand = class extends DeployCliCommand {\n\tstatic paths = [[\"deploy\"]];\n\tstatic usage = Command.Usage({\n\t\tdescription: \"Deploy the application whose root node is <entry>'s default export.\",\n\t\texamples: [[\"Deploy an app\", \"$0 deploy src/service.ts\"]]\n\t});\n\taction = \"deploy\";\n};\nvar DestroyCommand = class extends DeployCliCommand {\n\tstatic paths = [[\"destroy\"]];\n\tstatic usage = Command.Usage({\n\t\tdescription: \"Tear down the application whose root node is <entry>'s default export — same derivation as deploy, Alchemy destroy.\",\n\t\texamples: [[\"Destroy an app\", \"$0 destroy src/service.ts\"]]\n\t});\n\taction = \"destroy\";\n};\n/** `<entry>`/`--name`/`--fresh` only — no `--stage`/`--production` (local-dev spec § 6: a working directory has exactly one dev instance, no stages). */\nvar DevCommand = class extends Command {\n\tstatic paths = [[\"dev\"]];\n\tstatic usage = Command.Usage({\n\t\tdescription: \"Bring up the application whose root node is <entry>'s default export, entirely on this machine, credential-free.\",\n\t\texamples: [[\"Run an app locally\", \"$0 dev src/service.ts\"]]\n\t});\n\tentry = Option.String({ name: \"entry\" });\n\tname = Option.String(\"--name\", { description: \"Override the root node's name — the dev instance's application name.\" });\n\tfresh = Option.Boolean(\"--fresh\", false, { description: \"Destroy the dev stack and wipe the dev state directory before starting.\" });\n\tasync execute() {\n\t\treturn 0;\n\t}\n};\nvar LogCommand = class extends Command {\n\tstatic paths = [[\"log\"]];\n\tstatic usage = Command.Usage({\n\t\tdescription: \"Tail the merged logs of the locally-running application whose root node is <entry>'s default export.\",\n\t\texamples: [[\"Tail every service\", \"$0 log src/service.ts\"], [\"Tail one service\", \"$0 log src/service.ts catalog.service\"]]\n\t});\n\tentry = Option.String({ name: \"entry\" });\n\taddress = Option.String({\n\t\tname: \"address\",\n\t\trequired: false\n\t});\n\tname = Option.String(\"--name\", { description: \"Override the root node's name — the dev instance's application name.\" });\n\ttail = Option.String(\"--tail\", { description: `How many trailing history lines to show before live output (default ${String(DEFAULT_LOG_TAIL)}).` });\n\tasync execute() {\n\t\treturn 0;\n\t}\n};\nfunction buildCli() {\n\treturn Cli.from([\n\t\tDeployCommand,\n\t\tDestroyCommand,\n\t\tDevCommand,\n\t\tLogCommand\n\t], {\n\t\tbinaryName: BINARY_NAME,\n\t\tbinaryLabel: \"The prisma-composer deploy CLI\"\n\t});\n}\n/** Thrown internally when the user explicitly asked for `--help`/`-h` — run() prints it to stdout and exits 0; not a usage error. */\nvar HelpRequested = class extends Error {};\n/** Duck-typed: clipanion's UnknownSyntaxError isn't re-exported, so match its name + clipanion.type discriminator (mirrors prisma-next's migration-cli.ts). */\nfunction isUnknownSyntaxError(error) {\n\tif (!(error instanceof Error) || error.name !== \"UnknownSyntaxError\") return false;\n\tconst meta = error.clipanion;\n\treturn typeof meta === \"object\" && meta !== null && meta.type === \"none\";\n}\n/** `log`'s default backlog: an empty screen reads as broken, so show a little recent history before going live. */\nconst DEFAULT_LOG_TAIL = 20;\n/** Exported for direct testing (main.test.ts) — not part of the package's public barrel (see index.ts). */\nfunction parseArgs(argv) {\n\tconst cli = buildCli();\n\tlet command;\n\ttry {\n\t\tcommand = cli.process([...argv]);\n\t} catch (error) {\n\t\tif (isUnknownSyntaxError(error) || error instanceof UsageError) throw new UsageError(cli.usage(null, { detailed: true }));\n\t\tthrow error;\n\t}\n\tif (command instanceof DeployCommand || command instanceof DestroyCommand) return {\n\t\tcommand: command.action,\n\t\tentry: command.entry,\n\t\tname: command.name,\n\t\tstage: command.stage,\n\t\tproduction: command.production,\n\t\tfresh: false\n\t};\n\tif (command instanceof DevCommand) return {\n\t\tcommand: \"dev\",\n\t\tentry: command.entry,\n\t\tname: command.name,\n\t\tstage: void 0,\n\t\tproduction: false,\n\t\tfresh: command.fresh\n\t};\n\tif (command instanceof LogCommand) {\n\t\tconst tail = command.tail === void 0 ? DEFAULT_LOG_TAIL : Number.parseInt(command.tail, 10);\n\t\tif (Number.isNaN(tail) || tail < 0) throw new UsageError(\"`--tail` must be a non-negative integer.\");\n\t\treturn {\n\t\t\tcommand: \"log\",\n\t\t\tentry: command.entry,\n\t\t\tname: command.name,\n\t\t\tstage: void 0,\n\t\t\tproduction: false,\n\t\t\tfresh: false,\n\t\t\taddress: command.address,\n\t\t\ttail\n\t\t};\n\t}\n\tif (argv.includes(\"--help\") || argv.includes(\"-h\")) throw new HelpRequested(cli.usage(null, { detailed: true }));\n\tthrow new UsageError(cli.usage(null, { detailed: true }));\n}\n/**\n* Renders a deploy/destroy operation failure the way run() always has: an\n* alchemy exit becomes the two console.error hint lines and the child's own\n* status (the documented ADR-0044 child-status exception); everything else\n* rethrows the structured failure so cli.ts renders its envelope.\n*/\nfunction renderDeployDestroyFailure(failure) {\n\tconst status = renderChildStatusHints(failure);\n\tif (status !== void 0) return status;\n\tthrow failure;\n}\n/** Runs the full pipeline; returns the process exit code. */\nasync function run(argv, deps = {}) {\n\tlet args;\n\ttry {\n\t\targs = parseArgs(argv);\n\t} catch (error) {\n\t\tif (error instanceof HelpRequested) {\n\t\t\tconsole.log(error.message);\n\t\t\treturn 0;\n\t\t}\n\t\tthrow error;\n\t}\n\tif (args.command === \"dev\") return runDev(args, deps);\n\tif (args.command === \"log\") return runLog({\n\t\tentry: args.entry,\n\t\tname: args.name,\n\t\taddress: args.address,\n\t\ttail: args.tail ?? DEFAULT_LOG_TAIL\n\t}, { config: deps.config });\n\tif (args.command === \"deploy\") {\n\t\tif (args.production) throw new CliStructuredError(\"DEPLOY.FLAG_INVALID\", \"--production is only valid with `destroy`.\", { fix: \"`deploy` targets production by default (omit --stage).\" });\n\t\tconst result = await deployWithDeps({\n\t\t\tentry: args.entry,\n\t\t\tname: args.name,\n\t\t\tstage: args.stage\n\t\t}, deps);\n\t\tif (result.ok) return 0;\n\t\treturn renderDeployDestroyFailure(result.failure);\n\t}\n\tif (args.stage !== void 0 && args.production) throw new CliStructuredError(\"DEPLOY.TARGET_CONFLICT\", \"Pass either --stage <name> or --production to `destroy`, not both.\");\n\tif (args.stage === void 0 && !args.production) throw new CliStructuredError(\"DEPLOY.TARGET_MISSING\", \"`destroy` requires an explicit target.\", { fix: \"Pass --stage <name> to tear down a branch environment, or --production to tear down the production environment.\" });\n\tconst target = args.stage !== void 0 ? {\n\t\tkind: \"stage\",\n\t\tstage: args.stage\n\t} : { kind: \"production\" };\n\tconst result = await destroyWithDeps({\n\t\tentry: args.entry,\n\t\tname: args.name,\n\t\ttarget,\n\t\tonEvent: (event) => {\n\t\t\tif (event.kind === \"no-local-deploy-state\") console.warn(`\\nNo prior deploy state under ${event.cwd} — if you deployed from a different directory, run destroy from there; otherwise this is a no-op.`);\n\t\t}\n\t}, deps);\n\tif (result.ok) return 0;\n\treturn renderDeployDestroyFailure(result.failure);\n}\n//#endregion\n//#region src/cli.ts\n/** Printed for a non-structured escape — by the shared base-type rules that is a bug, not a user failure. */\nconst REPORT_HINT = \"This is a bug in prisma-composer, not in your app — please report it: https://github.com/prisma/composer/issues\";\n/**\n* Run the `prisma-composer` CLI end to end: dispatch `argv`, map errors to exit\n* codes — usage errors and structured failures exit 2 (expected failures),\n* anything else is a bug and exits 1 with a report hint. Shared by this\n* package's `bin` and the unscoped `prisma-composer` launcher.\n*/\nasync function cli(argv = process.argv.slice(2)) {\n\ttry {\n\t\tprocess.exitCode = await run(argv);\n\t} catch (error) {\n\t\tif (error instanceof UsageError) {\n\t\t\tconsole.error(error.message);\n\t\t\tprocess.exitCode = 2;\n\t\t\treturn;\n\t\t}\n\t\tif (CliStructuredError.is(error)) {\n\t\t\tconsole.error(renderErrorEnvelope(error.toEnvelope()));\n\t\t\tprocess.exitCode = 2;\n\t\t\treturn;\n\t\t}\n\t\tconsole.error(`Error: ${error instanceof Error ? error.message : String(error)}`);\n\t\tconsole.error(REPORT_HINT);\n\t\tprocess.exitCode = 1;\n\t}\n}\n//#endregion\nexport { run as n, cli as t };\n\n//# sourceMappingURL=cli-M2oUU0IV.mjs.map"],"mappings":";;;;;;;;AASA,eAAe,YAAY,OAAO,MAAM;CACvC,MAAM,MAAM,MAAM,OAAO,QAAQ,IAAI;CACrC,IAAI;CACJ,IAAI;EACH,WAAW,MAAM,OAAO;CACzB,SAAS,OAAO;EACf,OAAO,MAAM,oBAAoB,OAAO,OAAO,GAAG,CAAC;CACpD;CACA,OAAO,SAAS,WAAW,OAAO,MAAM,GAAG;AAC5C;;;;AASA,eAAe,YAAY,OAAO,MAAM;CACvC,MAAM,MAAM,MAAM,OAAO,QAAQ,IAAI;CACrC,IAAI;CACJ,IAAI;EACH,WAAW,MAAM,OAAO;CACzB,SAAS,OAAO;EACf,OAAO,MAAM,oBAAoB,OAAO,OAAO,GAAG,CAAC;CACpD;CACA,OAAO,SAAS,WAAW,OAAO,MAAM,GAAG;AAC5C;;;;AASA,eAAe,eAAe,OAAO,MAAM;CAC1C,MAAM,MAAM,MAAM,OAAO,QAAQ,IAAI;CACrC,IAAI;CACJ,IAAI;EACH,WAAW,MAAM,OAAO;CACzB,SAAS,OAAO;EACf,OAAO,MAAM,oBAAoB,UAAU,OAAO,GAAG,CAAC;CACvD;CACA,OAAO,SAAS,cAAc,OAAO,MAAM,GAAG;AAC/C;;;;AASA,eAAe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,IAAI;CACP,IAAI,OAAO,IAAI,OAAO;CACtB,OAAO,2BAA2B,OAAO,OAAO;AACjD;;AAIA,MAAM,cAAc;;;;;;;AAOpB,eAAe,IAAI,OAAO,QAAQ,KAAK,MAAM,CAAC,GAAG;CAChD,IAAI;EACH,QAAQ,WAAW,MAAM,IAAI,IAAI;CAClC,SAAS,OAAO;EACf,IAAI,iBAAiB,YAAY;GAChC,QAAQ,MAAM,MAAM,OAAO;GAC3B,QAAQ,WAAW;GACnB;EACD;EACA,IAAI,mBAAmB,GAAG,KAAK,GAAG;GACjC,QAAQ,MAAM,oBAAoB,MAAM,WAAW,CAAC,CAAC;GACrD,QAAQ,WAAW;GACnB;EACD;EACA,QAAQ,MAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,GAAG;EAChF,QAAQ,MAAM,WAAW;EACzB,QAAQ,WAAW;CACpB;AACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./app-config-CFsSXEVj-B242oUnm.mjs";
|
package/dist/config.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { D as PreflightInput, F as containerEnv, I as containerEnvVarName, L as defineConfig, M as StateDescriptor, N as TeardownInput, O as PrismaAppConfig, R as deserializeContainers, _ as LocalTargetProvidersInput, c as DEV_DIR, f as ExtensionDescriptor, g as LocalTargetEmulatorsInput, h as LocalTargetDescriptor, m as LocalTargetAttachment, o as ContainerDescriptor, p as LocalTargetAttachInput, s as ContainerInstance, v as LocateContainerInput, w as NodeDescriptor, z as isBuildOnlyExtension } from "./app-config-
|
|
2
|
-
import "./config-
|
|
1
|
+
import { D as PreflightInput, F as containerEnv, I as containerEnvVarName, L as defineConfig, M as StateDescriptor, N as TeardownInput, O as PrismaAppConfig, R as deserializeContainers, _ as LocalTargetProvidersInput, c as DEV_DIR, f as ExtensionDescriptor, g as LocalTargetEmulatorsInput, h as LocalTargetDescriptor, m as LocalTargetAttachment, o as ContainerDescriptor, p as LocalTargetAttachInput, s as ContainerInstance, v as LocateContainerInput, w as NodeDescriptor, z as isBuildOnlyExtension } from "./app-config-CFsSXEVj-B242oUnm.mjs";
|
|
2
|
+
import "./config-ku5b_2YD.mjs";
|
|
3
3
|
export { type ContainerDescriptor, type ContainerInstance, DEV_DIR, ExtensionDescriptor, LocalTargetAttachInput, LocalTargetAttachment, LocalTargetDescriptor, LocalTargetEmulatorsInput, LocalTargetProvidersInput, type LocateContainerInput, NodeDescriptor, PreflightInput, PrismaAppConfig, StateDescriptor, TeardownInput, containerEnv, containerEnvVarName, defineConfig, deserializeContainers, isBuildOnlyExtension };
|