@prisma/composer-cli 0.35.0-dev.1 → 0.35.0-dev.3
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/{dev-current-BB02pfSh-vMKS1rYi.mjs → dev-current-8HfFCN7C-C9CEq_7T.mjs} +8 -6
- package/dist/dev-current-8HfFCN7C-C9CEq_7T.mjs.map +1 -0
- package/dist/{execute-deploy-destroy-DwcoZIks-CiW-dlB1.mjs → execute-deploy-destroy-DerNHILD-Bz6XZitd.mjs} +46 -26
- package/dist/execute-deploy-destroy-DerNHILD-Bz6XZitd.mjs.map +1 -0
- package/dist/{execute-dev-BHRWoEnd-DrGMSTD3.mjs → execute-dev-D_JvTKjS-Bfdv-HU4.mjs} +6 -6
- package/dist/{execute-dev-BHRWoEnd-DrGMSTD3.mjs.map → execute-dev-D_JvTKjS-Bfdv-HU4.mjs.map} +1 -1
- package/dist/{execute-dev-current-D4RkOtPA-BFoZ0cXm.mjs → execute-dev-current-BRJkR4Y1-DV2_N-Do.mjs} +3 -3
- package/dist/{execute-dev-current-D4RkOtPA-BFoZ0cXm.mjs.map → execute-dev-current-BRJkR4Y1-DV2_N-Do.mjs.map} +1 -1
- package/dist/{family-xJ6y4fXc-CFBu6q4b.d.mts → family-DBTO11ZA-CADtFQ_B.d.mts} +27 -23
- package/dist/{family-xJ6y4fXc-CFBu6q4b.d.mts.map → family-DBTO11ZA-CADtFQ_B.d.mts.map} +1 -1
- package/dist/family.d.mts +3 -3
- package/dist/family.d.mts.map +1 -1
- package/dist/family.mjs +31 -19
- package/dist/family.mjs.map +1 -1
- package/dist/{list-deployed-7tjEhYgA.mjs → list-deployed-D-wPr7fN.mjs} +70 -43
- package/dist/list-deployed-D-wPr7fN.mjs.map +1 -0
- package/dist/testing.d.mts +1 -1
- package/dist/validate-environment-Y3kuF-NC-DvIK2JUY.mjs +16 -0
- package/dist/validate-environment-Y3kuF-NC-DvIK2JUY.mjs.map +1 -0
- package/package.json +7 -7
- package/src/family/deploy-list.ts +17 -10
- package/src/family/deployed-nodes.ts +10 -10
- package/src/family/list-deployed.ts +12 -12
- package/dist/dev-current-BB02pfSh-vMKS1rYi.mjs.map +0 -1
- package/dist/execute-deploy-destroy-DwcoZIks-CiW-dlB1.mjs.map +0 -1
- package/dist/list-deployed-7tjEhYgA.mjs.map +0 -1
- package/dist/validate-stage-DxRW3MwT-DOWCXHa_.mjs +0 -13
- package/dist/validate-stage-DxRW3MwT-DOWCXHa_.mjs.map +0 -1
package/dist/{execute-dev-current-D4RkOtPA-BFoZ0cXm.mjs → execute-dev-current-BRJkR4Y1-DV2_N-Do.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as notOk, c as CliStructuredError, l as InternalError, o as ok } from "./run-alchemy-Dl_MWw4g-DaWV9tkH.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { s as toStructured } from "./dev-current-8HfFCN7C-C9CEq_7T.mjs";
|
|
3
3
|
import { t as checkConfigSource } from "./pipeline-BmWt-Nhb-Bos4TFXR.mjs";
|
|
4
4
|
import { n as DEV_DIR, t as resolveLocalTargets } from "./local-target-CK8gvYV4.mjs";
|
|
5
5
|
import * as path from "node:path";
|
|
6
|
-
//#region ../../0-framework/3-tooling/cli/dist/execute-dev-current-
|
|
6
|
+
//#region ../../0-framework/3-tooling/cli/dist/execute-dev-current-BRJkR4Y1.mjs
|
|
7
7
|
/**
|
|
8
8
|
* The `devUrl` and `devStop` executor: config → each extension's local
|
|
9
9
|
* target → the app it recorded in the directory's dev state. Reached only by
|
|
@@ -125,4 +125,4 @@ async function executeDevStop(input, cwd) {
|
|
|
125
125
|
//#endregion
|
|
126
126
|
export { executeDevStop, executeDevUrl };
|
|
127
127
|
|
|
128
|
-
//# sourceMappingURL=execute-dev-current-
|
|
128
|
+
//# sourceMappingURL=execute-dev-current-BRJkR4Y1-DV2_N-Do.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute-dev-current-
|
|
1
|
+
{"version":3,"file":"execute-dev-current-BRJkR4Y1-DV2_N-Do.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/execute-dev-current-BRJkR4Y1.mjs"],"sourcesContent":["import { t as checkConfigSource } from \"./pipeline-BmWt-Nhb.mjs\";\nimport { u as toStructured } from \"./dev-current-8HfFCN7C.mjs\";\nimport * as path from \"node:path\";\nimport { CliStructuredError, InternalError } from \"@internal/foundation/errors\";\nimport { notOk, ok } from \"@internal/foundation/result\";\nimport { DEV_DIR, resolveLocalTargets } from \"@internal/core/local-target\";\n//#region src/operations/execute-dev-current.ts\n/**\n* The `devUrl` and `devStop` executor: config → each extension's local\n* target → the app it recorded in the directory's dev state. Reached only by\n* lazy import from dev-current.ts — resolving the local targets loads their\n* descriptors, whose graphs reach alchemy's provider tree.\n*/\nconst RUN_DEV = \"Run `prisma dev` in this directory.\";\nfunction platformUnsupported() {\n\treturn new CliStructuredError(\"DEV.PLATFORM_UNSUPPORTED\", \"local dev is not supported on Windows yet.\");\n}\n/** A call into an extension's local target; its failures that carry no code are the emulator's. */\nasync function fromTarget(call) {\n\ttry {\n\t\treturn await call();\n\t} catch (error) {\n\t\tthrow toStructured(\"DEV.EMULATOR_FAILED\", error);\n\t}\n}\n/** Every extension's record of the app `prisma dev` last ran from `cwd`; fails when none recorded one. */\nasync function currentApps(input, cwd) {\n\tconst { value } = checkConfigSource(input.config, cwd);\n\tconst devDir = path.join(cwd, DEV_DIR);\n\tconst apps = [];\n\tfor (const target of (await resolveLocalTargets(value)).values()) {\n\t\tconst current = await fromTarget(async () => target.current?.({ devDir }));\n\t\tif (current !== void 0) apps.push(current);\n\t}\n\tif (apps.length === 0) throw new CliStructuredError(\"DEV.NOT_STARTED_HERE\", `\\`prisma dev\\` has not run in ${cwd}.`, {\n\t\twhy: `The local services, databases and buckets of an app are recorded in ${devDir} when \\`prisma dev\\` runs there, and there is no such record.`,\n\t\tfix: RUN_DEV,\n\t\tmeta: { cwd }\n\t});\n\treturn apps;\n}\nasync function locate(input, cwd) {\n\tconst apps = await currentApps(input, cwd);\n\tconst app = apps.find((candidate) => candidate.addresses.includes(input.address));\n\tif (app === void 0) {\n\t\tconst known = apps.flatMap((candidate) => candidate.addresses).sort();\n\t\tthrow new CliStructuredError(\"DEV.ADDRESS_UNKNOWN\", `\"${apps.map((a) => a.app).join(\"\\\", \\\"\")}\" has no node at \"${input.address}\".`, {\n\t\t\twhy: `The addresses recorded for the app \\`prisma dev\\` last ran here are: ${known.join(\", \")}.`,\n\t\t\tfix: \"Pass one of those addresses. A nested node has a dotted address, such as `catalog.database`.\",\n\t\t\tmeta: {\n\t\t\t\taddress: input.address,\n\t\t\t\tknown\n\t\t\t}\n\t\t});\n\t}\n\tconst location = await fromTarget(() => app.locate(input.address));\n\tif (location === void 0) throw new InternalError(`the local target recorded \"${input.address}\" but cannot locate it`);\n\tif (location.emulator === \"not-running\") throw new CliStructuredError(\"DEV.EMULATOR_UNREACHABLE\", `The local ${location.kind} emulator that runs \"${input.address}\" is not running.`, {\n\t\twhy: \"The local emulators run your services, databases and buckets on this machine; `prisma dev` starts the ones an app needs.\",\n\t\tfix: RUN_DEV,\n\t\tmeta: {\n\t\t\taddress: input.address,\n\t\t\tkind: location.kind\n\t\t}\n\t});\n\tif (location.condition !== \"running\") throw notRunning(input.address, location);\n\tif (location.url === void 0) throw new InternalError(`the local target reports \"${input.address}\" running with no URL`);\n\tconst runs = location.command !== void 0 ? \"dev-server\" : location.kind === \"service\" ? \"artifact\" : void 0;\n\treturn {\n\t\taddress: input.address,\n\t\tkind: location.kind,\n\t\turl: location.url,\n\t\tstate: location.state,\n\t\t...runs !== void 0 ? { runs } : {}\n\t};\n}\nfunction notRunning(address, location) {\n\tconst { kind, state, condition, logPath } = location;\n\tconst meta = {\n\t\taddress,\n\t\tkind,\n\t\tstate,\n\t\t...logPath === void 0 ? {} : { logPath }\n\t};\n\tconst message = `The ${kind} \"${address}\" is not running (${state}).`;\n\tif (condition === \"crashing\") return new CliStructuredError(\"DEV.NOT_RUNNING\", message, {\n\t\twhy: \"It exited after it started, and it is being restarted or was held after repeated crashes.\",\n\t\tfix: logPath === void 0 ? \"Read its output in the `prisma dev` terminal, fix the cause, and rebuild.\" : `Read its log at ${logPath}, fix the cause, and rebuild.`,\n\t\tmeta\n\t});\n\tif (condition === \"missing\") return new CliStructuredError(\"DEV.NOT_RUNNING\", message, {\n\t\twhy: \"The local emulator no longer has it, for example because a Composer upgrade discarded the emulator’s state.\",\n\t\tfix: `${RUN_DEV} It creates the ${kind} again, empty.`,\n\t\tmeta\n\t});\n\treturn new CliStructuredError(\"DEV.NOT_RUNNING\", `The ${kind} \"${address}\" is stopped.`, {\n\t\twhy: \"`prisma dev stop`, `prisma dev` ending, and running another app in this directory all stop an app's services and database servers, and a stopped node has no URL that answers.\",\n\t\tfix: RUN_DEV,\n\t\tmeta\n\t});\n}\nasync function executeDevUrl(input, cwd) {\n\tif (process.platform === \"win32\") return notOk(platformUnsupported());\n\ttry {\n\t\treturn ok(await locate(input, cwd));\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\tthrow error;\n\t}\n}\nasync function executeDevStop(input, cwd) {\n\tif (process.platform === \"win32\") return notOk(platformUnsupported());\n\ttry {\n\t\tconst apps = await currentApps(input, cwd);\n\t\tconst stopped = [];\n\t\tfor (const app of apps) stopped.push(...await fromTarget(() => app.stop()));\n\t\treturn ok({\n\t\t\tapp: apps.map((a) => a.app).join(\", \"),\n\t\t\tstopped\n\t\t});\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\tthrow error;\n\t}\n}\n//#endregion\nexport { executeDevStop, executeDevUrl };\n\n//# sourceMappingURL=execute-dev-current-BRJkR4Y1.mjs.map"],"mappings":";;;;;;;;;;;;AAaA,MAAM,UAAU;AAChB,SAAS,sBAAsB;CAC9B,OAAO,IAAI,mBAAmB,4BAA4B,4CAA4C;AACvG;;AAEA,eAAe,WAAW,MAAM;C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AoB,CAAC;CACpE,IAAI;EACH,OAAO,GAAG,MAAM,OAAO,OAAO,GAAG,CAAC;CACnC,SAAS,OAAO;EACf,IAAI,mBAAmB,GAAG,KAAK,GAAG,OAAO,MAAM,KAAK;EACpD,MAAM;CACP;AACD;AACA,eAAe,eAAe,OAAO,KAAK;CACzC,IAAI,QAAQ,aAAa,SAAS,OAAO,MAAM,oBAAoB,CAAC;CACpE,IAAI;EACH,MAAM,OAAO,MAAM,YAAY,OAAO,GAAG;EACzC,MAAM,UAAU,CAAC;EACjB,KAAK,MAAM,OAAO,MAAM,QAAQ,KAAK,GAAG,MAAM,iBAAiB,IAAI,KAAK,CAAC,CAAC;EAC1E,OAAO,GAAG;GACT,KAAK,KAAK,KAAK,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,IAAI;GACrC;EACD,CAAC;CACF,SAAS,OAAO;EACf,IAAI,mBAAmB,GAAG,KAAK,GAAG,OAAO,MAAM,KAAK;EACpD,MAAM;CACP;AACD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandFamily } from "@prisma/cli-engine";
|
|
1
|
+
import { CommandFamily, RedirectSpec } from "@prisma/cli-engine";
|
|
2
2
|
import * as Layer from "effect/Layer";
|
|
3
3
|
import * as Effect from "effect/Effect";
|
|
4
4
|
import { Input, StackServices } from "alchemy";
|
|
@@ -595,7 +595,7 @@ interface Graph {
|
|
|
595
595
|
readonly params: readonly ParamBinding[];
|
|
596
596
|
}
|
|
597
597
|
//#endregion
|
|
598
|
-
//#region ../../0-framework/1-core/core/dist/app-config-
|
|
598
|
+
//#region ../../0-framework/1-core/core/dist/app-config-DR7ku-WW.d.mts
|
|
599
599
|
//#region src/container-transport.d.ts
|
|
600
600
|
/**
|
|
601
601
|
* Carries resolved containers from the CLI process into the alchemy process
|
|
@@ -607,12 +607,12 @@ interface Graph {
|
|
|
607
607
|
* `deserializeContainers` reads each var back through the same extension's
|
|
608
608
|
* descriptor. The framework owns the vars; it never reads their contents.
|
|
609
609
|
*/
|
|
610
|
-
/** The key an extension resolves a container from: which app, which
|
|
610
|
+
/** The key an extension resolves a container from: which app, which environment. */
|
|
611
611
|
interface LocateContainerInput {
|
|
612
612
|
/** The application name (root node's name, or `--name`). */
|
|
613
613
|
readonly appName: string;
|
|
614
|
-
/** The
|
|
615
|
-
readonly
|
|
614
|
+
/** The environment name, git-ref validated. Core never interprets it; the extension maps it onto its platform. */
|
|
615
|
+
readonly environment: string;
|
|
616
616
|
}
|
|
617
617
|
/**
|
|
618
618
|
* One resolved container. The framework sees only this interface; the
|
|
@@ -621,7 +621,7 @@ interface LocateContainerInput {
|
|
|
621
621
|
*/
|
|
622
622
|
interface ContainerInstance {
|
|
623
623
|
readonly input: LocateContainerInput;
|
|
624
|
-
/** The exact string the CLI hands `alchemy` as its stage — the deploy-state scope. Distinct from `input.
|
|
624
|
+
/** The exact string the CLI hands `alchemy` as its stage — the deploy-state scope. Distinct from `input.environment`: for Prisma Cloud this is the resolved Branch id (stable across renames, machine-independent). Framework-visible like `input` — NOT part of the `serialize()` payload, which stays extension-owned. */
|
|
625
625
|
readonly alchemyStage?: string | undefined;
|
|
626
626
|
/** Serialize to a non-empty string for the process transport above. The format is the extension's own; only its `deserialize` reads it. */
|
|
627
627
|
serialize(): string;
|
|
@@ -656,9 +656,9 @@ interface ContainerCredentials<C = unknown> {
|
|
|
656
656
|
* fails (same rule as ServiceLowering<P, S> — ADR-0033).
|
|
657
657
|
*/
|
|
658
658
|
interface ContainerDescriptor<I extends ContainerInstance = ContainerInstance, C = unknown> {
|
|
659
|
-
/** Resolve the container for (appName,
|
|
659
|
+
/** Resolve the container for (appName, environment), creating anything absent. Called by `deploy`. */
|
|
660
660
|
ensure(input: LocateContainerInput, credentials?: ContainerCredentials<C>): Promise<I>;
|
|
661
|
-
/** Find the container for (appName,
|
|
661
|
+
/** Find the container for (appName, environment); `undefined` when nothing exists. Called by `destroy` — never creates. */
|
|
662
662
|
locate(input: LocateContainerInput, credentials?: ContainerCredentials<C>): Promise<I | undefined>;
|
|
663
663
|
/** Remove the container after a successful destroy, after every extension's `teardown` has run. Failure policy is the extension's. */
|
|
664
664
|
remove(instance: I, credentials?: ContainerCredentials<C>): Promise<void>;
|
|
@@ -926,7 +926,7 @@ interface ExtensionDescriptor {
|
|
|
926
926
|
* Deploy-time prerequisite check — the CLI runs it once, after the app's
|
|
927
927
|
* Project/Branch are resolved and BEFORE any stack file is written or Alchemy
|
|
928
928
|
* runs. A target uses it to verify platform prerequisites (e.g. that every
|
|
929
|
-
* secret env var in the provision manifest exists for the resolved
|
|
929
|
+
* secret env var in the provision manifest exists for the resolved environment) and
|
|
930
930
|
* throws to abort the deploy. Async: it talks to the platform (ADR-0029).
|
|
931
931
|
*
|
|
932
932
|
* What it returns is carried to the alchemy process for this same extension
|
|
@@ -944,7 +944,7 @@ interface ExtensionDescriptor {
|
|
|
944
944
|
preflight?(input: PreflightInput): Promise<PreflightPayload>;
|
|
945
945
|
/**
|
|
946
946
|
* Destroy-time cleanup — the CLI runs it once, after `alchemy destroy`
|
|
947
|
-
* succeeds and BEFORE the
|
|
947
|
+
* succeeds and BEFORE the environment's containers are removed. A target uses
|
|
948
948
|
* it to remove infrastructure it owns outside the stack (e.g. the deploy
|
|
949
949
|
* state store, which the destroy above was still reading). Throwing aborts
|
|
950
950
|
* the destroy before the containers go; a target that would rather warn than
|
|
@@ -995,8 +995,8 @@ interface PreflightInput<C = unknown> {
|
|
|
995
995
|
readonly graph: Graph;
|
|
996
996
|
/** The calling extension's own resolved container; `undefined` when it declares no container descriptor. Narrow with the extension's guard. */
|
|
997
997
|
readonly container: ContainerInstance | undefined;
|
|
998
|
-
/** The
|
|
999
|
-
readonly
|
|
998
|
+
/** The environment name. */
|
|
999
|
+
readonly environment: string;
|
|
1000
1000
|
/** What the caller has already authenticated, for the platform calls preflight makes. Absent means the extension falls back to its own credential protocol. */
|
|
1001
1001
|
readonly credentials?: ContainerCredentials<C> | undefined;
|
|
1002
1002
|
/** Hands the deploy's progress output what the check covered, as counts (e.g. `{ checked: 53, filled: 0, missing: 0 }`). Counts only: never a name or a value. */
|
|
@@ -1006,8 +1006,8 @@ interface PreflightInput<C = unknown> {
|
|
|
1006
1006
|
interface TeardownInput {
|
|
1007
1007
|
/** The calling extension's own resolved container; `undefined` when it declares no container descriptor. Narrow with the extension's guard. */
|
|
1008
1008
|
readonly container: ContainerInstance | undefined;
|
|
1009
|
-
/** The
|
|
1010
|
-
readonly
|
|
1009
|
+
/** The environment name. */
|
|
1010
|
+
readonly environment: string;
|
|
1011
1011
|
}
|
|
1012
1012
|
/** The deploy context handed to `ReporterDescriptor.begin`. `C` erases to `unknown` at the framework boundary, exactly as on `PreflightInput`. */
|
|
1013
1013
|
interface ReportBeginInput<C = unknown> {
|
|
@@ -1021,8 +1021,8 @@ interface ReportBeginInput<C = unknown> {
|
|
|
1021
1021
|
* loaded (a breaking addition to this published type).
|
|
1022
1022
|
*/
|
|
1023
1023
|
readonly graph: Graph;
|
|
1024
|
-
/** The
|
|
1025
|
-
readonly
|
|
1024
|
+
/** The environment name. */
|
|
1025
|
+
readonly environment: string;
|
|
1026
1026
|
/** The directory the deploy command was run from — where a reporter reads repository metadata. */
|
|
1027
1027
|
readonly cwd: string;
|
|
1028
1028
|
/**
|
|
@@ -1309,7 +1309,7 @@ interface NotOk<F> {
|
|
|
1309
1309
|
*/
|
|
1310
1310
|
type Result$1<T, F> = Ok<T> | NotOk<F>;
|
|
1311
1311
|
//#endregion
|
|
1312
|
-
//#region ../../0-framework/3-tooling/cli/dist/dev-current-
|
|
1312
|
+
//#region ../../0-framework/3-tooling/cli/dist/dev-current-BApQuViv.d.mts
|
|
1313
1313
|
//#region src/dev/watch.d.ts
|
|
1314
1314
|
interface WatchTarget {
|
|
1315
1315
|
readonly address: string;
|
|
@@ -1441,6 +1441,8 @@ type DeployEvent = {
|
|
|
1441
1441
|
/** What the step measured, as its build adapter or deploy target reported it. The fields vary by adapter and target. */
|
|
1442
1442
|
readonly data?: Readonly<Record<string, string | number>> | undefined;
|
|
1443
1443
|
};
|
|
1444
|
+
/** The environment `deploy` targets when none is named. */
|
|
1445
|
+
declare const DEFAULT_DEPLOY_ENVIRONMENT = "production";
|
|
1444
1446
|
interface DeployInput {
|
|
1445
1447
|
/**
|
|
1446
1448
|
* Composer's configuration: the `composer` section of `prisma.config.ts` and that file. The operation does not look for a config file; it refuses a section the CLI would refuse, before any work starts.
|
|
@@ -1450,8 +1452,8 @@ interface DeployInput {
|
|
|
1450
1452
|
readonly entry?: string | undefined;
|
|
1451
1453
|
/** Override the root node's name (the `--name` flag's slot). */
|
|
1452
1454
|
readonly name?: string | undefined;
|
|
1453
|
-
/**
|
|
1454
|
-
readonly
|
|
1455
|
+
/** The environment to deploy to. Defaults to `production`. */
|
|
1456
|
+
readonly environment?: string | undefined;
|
|
1455
1457
|
/** Defaults to process.cwd(); the directory `.prisma-composer/` and `.alchemy` state live under. */
|
|
1456
1458
|
readonly cwd?: string | undefined;
|
|
1457
1459
|
/**
|
|
@@ -1465,7 +1467,7 @@ interface DeployInput {
|
|
|
1465
1467
|
* An existing report record this deploy belongs to — the `--build-id` flag's
|
|
1466
1468
|
* slot. A CI job that opens the record before invoking Composer passes the
|
|
1467
1469
|
* id here, and the target's reporter joins that record instead of creating
|
|
1468
|
-
* one. Absent falls back to whatever the target reads from
|
|
1470
|
+
* one. Absent falls back to whatever the target reads from environment variables.
|
|
1469
1471
|
*/
|
|
1470
1472
|
readonly reportId?: string | undefined;
|
|
1471
1473
|
/** Each step as it starts and finishes, in real time. Rendering is the host's. */
|
|
@@ -1615,7 +1617,7 @@ declare function devUrl(input: DevUrlInput): Promise<Result$1<DevUrl, CliStructu
|
|
|
1615
1617
|
/** Stops the directory's current app: its service processes and database servers. Data and ports stay. */
|
|
1616
1618
|
declare function devStop(input: DevStopInput): Promise<Result$1<DevStopped, CliStructuredError>>;
|
|
1617
1619
|
//#endregion
|
|
1618
|
-
//#region ../../0-framework/3-tooling/cli/dist/family-
|
|
1620
|
+
//#region ../../0-framework/3-tooling/cli/dist/family-DBTO11ZA.d.mts
|
|
1619
1621
|
//#region src/family/family.d.ts
|
|
1620
1622
|
/**
|
|
1621
1623
|
* The control-plane operations the family's handlers call. These are the
|
|
@@ -1637,7 +1639,9 @@ interface CreateComposerFamilyOptions {
|
|
|
1637
1639
|
readonly operations?: ComposerOperations | undefined;
|
|
1638
1640
|
/** More commands to ship in the family, keyed by the path they are meant to mount at. */
|
|
1639
1641
|
readonly commands?: CommandFamily['commands'] | undefined;
|
|
1642
|
+
/** More retired invocations to redirect, for the commands in `commands`. */
|
|
1643
|
+
readonly redirects?: readonly RedirectSpec[] | undefined;
|
|
1640
1644
|
}
|
|
1641
1645
|
//#endregion
|
|
1642
|
-
export {
|
|
1643
|
-
//# sourceMappingURL=family-
|
|
1646
|
+
export { Result$1 as _, DeployEvent as a, CliStructuredError as b, DevEvent as c, DevStopInput as d, DevStopped as f, ServiceEndpoint as g, OperationDeps as h, DEFAULT_DEPLOY_ENVIRONMENT as i, DevInput as l, DevUrlInput as m, CreateComposerFamilyOptions as n, DeployInput as o, DevUrl as p, realOperations as r, DeploySuccess as s, ComposerOperations as t, DevSession as u, AssembledServices as v, ComposerConfigSource as y };
|
|
1647
|
+
//# sourceMappingURL=family-DBTO11ZA-CADtFQ_B.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"family-
|
|
1
|
+
{"version":3,"file":"family-DBTO11ZA-CADtFQ_B.d.mts","names":[],"sources":["../../../0-framework/0-foundation/foundation/dist/errors.d.mts","../../../../node_modules/@standard-schema/spec/dist/index.d.ts","../../../0-framework/1-core/core/dist/graph-types-Cegbwb_X.d.mts","../../../0-framework/1-core/core/dist/app-config-DR7ku-WW.d.mts","../../../0-framework/3-tooling/cli/dist/composer-config-BJrPWlDx.d.mts","../../../0-framework/3-tooling/cli/dist/deployment-summary-p88NV5m5.d.mts","../../../0-framework/3-tooling/assemble/dist/index.d.mts","../../../0-framework/0-foundation/foundation/dist/result.d.mts","../../../0-framework/3-tooling/cli/dist/dev-current-BApQuViv.d.mts","../../../0-framework/3-tooling/cli/dist/family-DBTO11ZA.d.mts"],"x_google_ignoreList":[1],"mappings":";;;;;;;UACU,wBAAwB;WACvB;WACA;WACA;WACA;aACE;aACA;;WAEF;WACA,OAAO;WACP;;;;;;;;UAwBD;WACC;WACA;WACA;WACA;WACA;WACA;WACA;aACE;aACA;;WAEF,OAAO;WACP;;;;;;;;;;;;cAoBG,2BAA2B,iBAAiB;WAC/C;WACA;WACA;WACA;WACA;aACE;aACA;;WAEF,OAAO;WACP;EACT,YAAY,6BAA6B,iBAAiB;aAC/C;aACA;aACA;aACA;eACE;eACA;;aAEF,OAAO;aACP;aACA;;;;;EAKX,cAAc;;;;;SAKP,GAAG,iBAAiB,SAAS;;;;;UCjG5B,gBAAgB,iBAAiB,SAAS;;WAEvC,aAAa,gBAAgB,MAAM,OAAO;;kBAErC;;YAEJ,MAAM,iBAAiB,SAAS;;aAE7B;;aAEA;;aAEA,QAAQ,MAAM,OAAO;;;YAGxB,MAAM,iBAAiB,SAAS;;aAE7B,OAAO;;aAEP,QAAQ;;;OAGhB,WAAW,eAAe,mBAAmB,YAAY;;OAEzD,YAAY,eAAe,mBAAmB,YAAY;;;UAGzD,iBAAiB,iBAAiB,SAAS;;WAExC,aAAa,iBAAiB,MAAM,OAAO;;kBAEtC;;YAEJ,MAAM,iBAAiB,SAAS,eAAe,gBAAgB,MAAM,OAAO;;aAEzE,WAAW,gBAAgB,UAAU,iBAAiB,wBAAwB,OAAO,UAAU,QAAQ,OAAO;;;OAGtH,OAAO,UAAU,cAAc,UAAU;;YAEpC,cAAc;;aAEX,OAAO;;aAEP;;YAEH;;aAEG,iBAAiB;;;YAGpB;;aAEG,QAAQ,cAAc;;;YAGzB;;aAEG;;aAEA,OAAO,cAAc,cAAc;;;YAGtC;;aAEG,KAAK;;;YAGR,MAAM,iBAAiB,SAAS,eAAe,gBAAgB,MAAM,OAAO;;OAGjF,WAAW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EA;;WAEA;;UAED;WACC,QAAQ;;WAER;;UAED;;WAEC;;WAEA;aACE;aACA;;;;iBAII,OAAO,OAAO,cAAc,QAAQ,SAAO,QAAQ;;iBAEnD,QAAQ,OAAO,eAAe,QAAQ,SAAO,YAAY;;;;;;;;;;;;UCzUhE;WACC,eAAe;WACf,YAAY;WACZ,eAAe;WACf,gBAAgB;;cAEb,gBAAgB;UACpB;;WAEC,aAAa;;WAEb,WAAW;;WAEX,qBAAqB"}
|
package/dist/family.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as Result, b as CliStructuredError$1, i as DEFAULT_DEPLOY_ENVIRONMENT, n as CreateComposerFamilyOptions$1, r as realOperations, t as ComposerOperations, y as ComposerConfigSource } from "./family-DBTO11ZA-CADtFQ_B.mjs";
|
|
2
2
|
import { CommandFamily, ConfigSection, ManagementApiClient } from "@prisma/cli-engine";
|
|
3
3
|
import { CliStructuredError } from "@prisma/cli-engine/protocol";
|
|
4
4
|
import "effect/Layer";
|
|
@@ -44,7 +44,7 @@ interface ListDeployedInput {
|
|
|
44
44
|
readonly config: ComposerConfigSource;
|
|
45
45
|
readonly entry: string | undefined;
|
|
46
46
|
readonly name: string | undefined;
|
|
47
|
-
readonly
|
|
47
|
+
readonly environment: string;
|
|
48
48
|
readonly cwd: string;
|
|
49
49
|
readonly workspaceId: string | undefined;
|
|
50
50
|
readonly client: ManagementApiClient;
|
|
@@ -99,5 +99,5 @@ interface CreateComposerFamilyOptions extends CreateComposerFamilyOptions$1 {
|
|
|
99
99
|
/** Composer's command family: `deploy`, `deploy list`, `dev`, `dev url`, `dev stop` and `emulator list`, keyed by the path each is meant to mount at. */
|
|
100
100
|
declare function createComposerFamily(options?: CreateComposerFamilyOptions): CommandFamily;
|
|
101
101
|
//#endregion
|
|
102
|
-
export { type ComposerOperations, CreateComposerFamilyOptions, type DeployedNode, type ListDeployed, type ListDeployedInput, type ListEmulators, composerSection, createComposerFamily, dataLine, realOperations, toEngineError };
|
|
102
|
+
export { type ComposerOperations, CreateComposerFamilyOptions, DEFAULT_DEPLOY_ENVIRONMENT, type DeployedNode, type ListDeployed, type ListDeployedInput, type ListEmulators, composerSection, createComposerFamily, dataLine, realOperations, toEngineError };
|
|
103
103
|
//# sourceMappingURL=family.d.mts.map
|
package/dist/family.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"family.d.mts","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/family.d.mts","../src/family/deployed-nodes.ts","../src/family/list-deployed.ts","../src/family/deploy-list.ts","../../../1-prisma-cloud/0-lowering/dev-emulators/dist/index.d.mts","../src/family/emulator-list.ts","../src/exports/family.ts"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"family.d.mts","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/family.d.mts","../src/family/deployed-nodes.ts","../src/family/list-deployed.ts","../src/family/deploy-list.ts","../../../1-prisma-cloud/0-lowering/dev-emulators/dist/index.d.mts","../src/family/emulator-list.ts","../src/exports/family.ts"],"mappings":";;;;;;;;;;;KAMK;;;;;;iBAMY,SAAS,iBAAiB;;;cAG7B,iBAAiB,cAAc;;;;;;;;KAQxC,gBAAA;;iBAEY,cAAc,OAAO,gBAAgB;;;;UCtBrC;WACN;WACA;WACA;WACA;;;;UCCM;WACN,QAAQ;WACR;WACA;WACA;WACA;WACA;WACA,QAAQ;;;;KCKP,gBACV,OAAO,sBACJ,QAAQ,gBAAgB,gBAAgB;;;;;;KCuKxC;UAEK;WACC;WACA,MAAM;;WAEN;;WAEA;WACA,QAAQ,SAAS;;;UAGlB;WACC;WACA;;UAED;WACC,MAAM;WACN;;WAEA;;WAEA,oBAAoB;;WAEpB,OAAO;;UAER;WACC,oBAAoB;;;;KC1MnB,sBAAsB,QAAQ,OAAO,cAAc;;;UCkB9C,oCAAoC;;WAE1C,gBAAgB;;WAEhB,eAAe;;;iBAIV,qBAAqB,UAAS,8BAAmC"}
|
package/dist/family.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as checkComposerConfig, h as sectionMissing, t as alchemyCommandLine } from "./run-alchemy-Dl_MWw4g-DaWV9tkH.mjs";
|
|
2
|
-
import { a as
|
|
2
|
+
import { a as devWithDeps, i as devUrl, n as deployWithDeps, o as executionDiagnostics, r as devStop, t as DEFAULT_DEPLOY_ENVIRONMENT } from "./dev-current-8HfFCN7C-C9CEq_7T.mjs";
|
|
3
3
|
import * as path from "node:path";
|
|
4
4
|
import { defineCommand, defineCommandFamily, defineConfigSection, defineSessionCommand, exitWithChildStatus, flag, positional } from "@prisma/cli-engine";
|
|
5
5
|
import { CliStructuredError, notOk, ok } from "@prisma/cli-engine/protocol";
|
|
@@ -252,7 +252,7 @@ const createDeployCommand = (operations) => defineCommand({
|
|
|
252
252
|
summary: "Deploy the application whose root node is the entry module's default export.",
|
|
253
253
|
examples: [
|
|
254
254
|
"{bin} deploy",
|
|
255
|
-
"{bin} deploy --
|
|
255
|
+
"{bin} deploy --environment staging",
|
|
256
256
|
"{bin} deploy --entry other-module.ts"
|
|
257
257
|
]
|
|
258
258
|
},
|
|
@@ -265,9 +265,10 @@ const createDeployCommand = (operations) => defineCommand({
|
|
|
265
265
|
brief: "Deploy the app under this name instead of the name its root module declares. A different name is a separate app on Prisma Cloud, with its own services, databases and buckets (default: the root module's name).",
|
|
266
266
|
placeholder: "name"
|
|
267
267
|
}),
|
|
268
|
-
|
|
269
|
-
brief: "
|
|
270
|
-
placeholder: "
|
|
268
|
+
environment: flag.string({
|
|
269
|
+
brief: "The environment to deploy to. Any name other than production is a complete, isolated copy of the app, such as staging or one per pull request.",
|
|
270
|
+
placeholder: "name",
|
|
271
|
+
default: DEFAULT_DEPLOY_ENVIRONMENT
|
|
271
272
|
}),
|
|
272
273
|
report: flag.string({
|
|
273
274
|
brief: "Write the deploy's outcome as JSON to this path — resources, preview URLs, and the failure cause. Also settable as PRISMA_COMPOSER_REPORT_FILE.",
|
|
@@ -289,7 +290,7 @@ const createDeployCommand = (operations) => defineCommand({
|
|
|
289
290
|
entry: args.flags.entry,
|
|
290
291
|
config: ctx.config,
|
|
291
292
|
name: args.flags.name,
|
|
292
|
-
|
|
293
|
+
environment: args.flags.environment,
|
|
293
294
|
cwd: ctx.cwd,
|
|
294
295
|
reportPath: args.flags.report,
|
|
295
296
|
reportId: args.flags.buildId,
|
|
@@ -299,7 +300,7 @@ const createDeployCommand = (operations) => defineCommand({
|
|
|
299
300
|
workspaceId: await workspaceIdOf(ctx),
|
|
300
301
|
client: ctx.api
|
|
301
302
|
})), ctx, ({ summary, durationMs }) => {
|
|
302
|
-
const target = `to ${args.flags.
|
|
303
|
+
const target = `to ${args.flags.environment ?? "production"} in ${formatDuration(durationMs)}`;
|
|
303
304
|
for (const node of summary?.nodes ?? []) for (const entity of node.entities) if (entity.url !== void 0) ctx.report({
|
|
304
305
|
kind: "endpoint",
|
|
305
306
|
name: node.address,
|
|
@@ -682,6 +683,15 @@ const realOperations = {
|
|
|
682
683
|
};
|
|
683
684
|
/** The `prisma` CLI's error reference; the engine appends `/<CODE>` to it for every error envelope. */
|
|
684
685
|
const CLI_DOCS_BASE = "https://www.prisma.io/docs/cli/error-reference/";
|
|
686
|
+
/** Retires `--stage` on `command` in favour of `--environment`, so typing it fails with `CLI.COMMAND_MOVED`. */
|
|
687
|
+
function retiredStageFlagRedirect(command) {
|
|
688
|
+
return {
|
|
689
|
+
from: command,
|
|
690
|
+
flag: "stage",
|
|
691
|
+
replacement: `${command} --environment <name>`,
|
|
692
|
+
reason: "A place the app runs is now called an environment."
|
|
693
|
+
};
|
|
694
|
+
}
|
|
685
695
|
function createComposerFamily$1(options = {}) {
|
|
686
696
|
const operations = options.operations ?? realOperations;
|
|
687
697
|
return defineCommandFamily({
|
|
@@ -693,26 +703,27 @@ function createComposerFamily$1(options = {}) {
|
|
|
693
703
|
"dev stop": createDevStopCommand(operations),
|
|
694
704
|
...options.commands
|
|
695
705
|
},
|
|
696
|
-
docsBaseUrl: CLI_DOCS_BASE
|
|
706
|
+
docsBaseUrl: CLI_DOCS_BASE,
|
|
707
|
+
redirects: [retiredStageFlagRedirect("deploy"), ...options.redirects ?? []]
|
|
697
708
|
});
|
|
698
709
|
}
|
|
699
710
|
//#endregion
|
|
700
711
|
//#region src/family/deploy-list.ts
|
|
701
712
|
/**
|
|
702
|
-
* `deploy list` — every node an app has deployed
|
|
703
|
-
* platform row each one deployed to. It reads the
|
|
713
|
+
* `deploy list` — every node an app has deployed in an environment, with the
|
|
714
|
+
* platform row each one deployed to. It reads the environment's application
|
|
704
715
|
* topology and the Branch's rows on Prisma Cloud, so the command is
|
|
705
716
|
* assembled into the family here, where both domains may be imported.
|
|
706
717
|
*/
|
|
707
718
|
/** Loaded on first use, so nothing of the Management API reads loads with the family. */
|
|
708
|
-
const listDeployed = async (input) => (await import("./list-deployed-
|
|
719
|
+
const listDeployed = async (input) => (await import("./list-deployed-D-wPr7fN.mjs")).listDeployed(input);
|
|
709
720
|
const createDeployListCommand = (list) => defineCommand({
|
|
710
721
|
help: {
|
|
711
|
-
summary: "List every node the app has deployed
|
|
712
|
-
description: "Reads the application topology the last deploy recorded for the
|
|
722
|
+
summary: "List every node the app has deployed in an environment, with its platform ID and URL.",
|
|
723
|
+
description: "Reads the application topology the last deploy recorded for the environment, and finds each node’s service, database or bucket on Prisma Cloud. The root node is the Project. A node with nothing on the platform, such as a module, has no platform ID.",
|
|
713
724
|
examples: [
|
|
714
725
|
"{bin} deploy list",
|
|
715
|
-
"{bin} deploy list --
|
|
726
|
+
"{bin} deploy list --environment staging",
|
|
716
727
|
"{bin} deploy list --json"
|
|
717
728
|
]
|
|
718
729
|
},
|
|
@@ -725,9 +736,10 @@ const createDeployListCommand = (list) => defineCommand({
|
|
|
725
736
|
brief: "List the app deployed under this name instead of the name its root module declares (default: the root module's name).",
|
|
726
737
|
placeholder: "name"
|
|
727
738
|
}),
|
|
728
|
-
|
|
729
|
-
brief: "
|
|
730
|
-
placeholder: "
|
|
739
|
+
environment: flag.string({
|
|
740
|
+
brief: "The environment to list.",
|
|
741
|
+
placeholder: "name",
|
|
742
|
+
default: DEFAULT_DEPLOY_ENVIRONMENT
|
|
731
743
|
})
|
|
732
744
|
} },
|
|
733
745
|
needs: {
|
|
@@ -740,7 +752,7 @@ const createDeployListCommand = (list) => defineCommand({
|
|
|
740
752
|
config: ctx.config,
|
|
741
753
|
entry: args.flags.entry,
|
|
742
754
|
name: args.flags.name,
|
|
743
|
-
|
|
755
|
+
environment: args.flags.environment ?? "production",
|
|
744
756
|
cwd: ctx.cwd,
|
|
745
757
|
workspaceId: credential?.workspaceId,
|
|
746
758
|
client: ctx.api
|
|
@@ -874,6 +886,6 @@ function createComposerFamily(options = {}) {
|
|
|
874
886
|
});
|
|
875
887
|
}
|
|
876
888
|
//#endregion
|
|
877
|
-
export { composerSection, createComposerFamily, dataLine, realOperations, toEngineError };
|
|
889
|
+
export { DEFAULT_DEPLOY_ENVIRONMENT, composerSection, createComposerFamily, dataLine, realOperations, toEngineError };
|
|
878
890
|
|
|
879
891
|
//# sourceMappingURL=family.mjs.map
|