@prisma/composer-cli 0.35.0-dev.3 → 0.35.0-dev.4
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-CErnR6NK-6QjHJ7q5.mjs +32 -0
- package/dist/app-config-CErnR6NK-6QjHJ7q5.mjs.map +1 -0
- package/dist/{dev-current-8HfFCN7C-C9CEq_7T.mjs → dev-current-CIeW9MCK-HPHPCqpV.mjs} +42 -8
- package/dist/dev-current-CIeW9MCK-HPHPCqpV.mjs.map +1 -0
- package/dist/dev-environment-name-6eEr5PW8-lIZmJjfr.mjs +71 -0
- package/dist/dev-environment-name-6eEr5PW8-lIZmJjfr.mjs.map +1 -0
- package/dist/{execute-deploy-destroy-DerNHILD-Bz6XZitd.mjs → execute-deploy-destroy-BWbYFJDk-GkGprE5W.mjs} +31 -50
- package/dist/execute-deploy-destroy-BWbYFJDk-GkGprE5W.mjs.map +1 -0
- package/dist/{execute-dev-D_JvTKjS-Bfdv-HU4.mjs → execute-dev-C4fZmsWr-B7PLJvgc.mjs} +30 -18
- package/dist/execute-dev-C4fZmsWr-B7PLJvgc.mjs.map +1 -0
- package/dist/{execute-dev-current-BRJkR4Y1-DV2_N-Do.mjs → execute-dev-current-CMsZZiC7-BRjUW6qn.mjs} +70 -34
- package/dist/execute-dev-current-CMsZZiC7-BRjUW6qn.mjs.map +1 -0
- package/dist/{family-DBTO11ZA-CADtFQ_B.d.mts → family-B2JZ8O7U-DLXWQQ7T.d.mts} +32 -16
- package/dist/{family-DBTO11ZA-CADtFQ_B.d.mts.map → family-B2JZ8O7U-DLXWQQ7T.d.mts.map} +1 -1
- package/dist/family.d.mts +1 -1
- package/dist/family.mjs +74 -30
- package/dist/family.mjs.map +1 -1
- package/dist/{generate-dev-stack-CfneNj97-Yx3Z2-9u.mjs → generate-dev-stack-C-1HoAgz-CqAVoJrq.mjs} +17 -13
- package/dist/generate-dev-stack-C-1HoAgz-CqAVoJrq.mjs.map +1 -0
- package/dist/{list-deployed-D-wPr7fN.mjs → list-deployed-BxPIhTMX.mjs} +3 -4
- package/dist/{list-deployed-D-wPr7fN.mjs.map → list-deployed-BxPIhTMX.mjs.map} +1 -1
- package/dist/testing.d.mts +3 -1
- package/dist/testing.d.mts.map +1 -1
- package/dist/testing.mjs +2 -1
- package/dist/testing.mjs.map +1 -1
- package/dist/{pipeline-BmWt-Nhb-Bos4TFXR.mjs → validate-environment-ymM9O00_-PUgv-1i7.mjs} +13 -3
- package/dist/validate-environment-ymM9O00_-PUgv-1i7.mjs.map +1 -0
- package/package.json +7 -7
- package/src/family/emulator-list.ts +7 -4
- package/dist/dev-current-8HfFCN7C-C9CEq_7T.mjs.map +0 -1
- package/dist/execute-deploy-destroy-DerNHILD-Bz6XZitd.mjs.map +0 -1
- package/dist/execute-dev-D_JvTKjS-Bfdv-HU4.mjs.map +0 -1
- package/dist/execute-dev-current-BRJkR4Y1-DV2_N-Do.mjs.map +0 -1
- package/dist/generate-dev-stack-CfneNj97-Yx3Z2-9u.mjs.map +0 -1
- package/dist/local-target-CK8gvYV4.mjs +0 -48
- package/dist/local-target-CK8gvYV4.mjs.map +0 -1
- package/dist/pipeline-BmWt-Nhb-Bos4TFXR.mjs.map +0 -1
- package/dist/validate-environment-Y3kuF-NC-DvIK2JUY.mjs +0 -16
- package/dist/validate-environment-Y3kuF-NC-DvIK2JUY.mjs.map +0 -1
|
@@ -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-CH5TyIsx.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
|
|
@@ -1113,18 +1113,20 @@ interface LocalTargetDescriptor {
|
|
|
1113
1113
|
/** `--fresh`: remove every local trace of the dev instance — emulator instances, state, data. */
|
|
1114
1114
|
teardown?(input: TeardownInput): Promise<void>;
|
|
1115
1115
|
/**
|
|
1116
|
-
* The
|
|
1117
|
-
* directory alone — no entry, no graph, no container — so a
|
|
1118
|
-
* find or stop a running app without running the pipeline.
|
|
1119
|
-
* this extension recorded nothing there.
|
|
1116
|
+
* The local copy of an app in one environment, read from the environment's
|
|
1117
|
+
* dev state directory alone — no entry, no graph, no container — so a
|
|
1118
|
+
* command can find or stop a running app without running the pipeline.
|
|
1119
|
+
* Undefined when this extension recorded nothing for the app there.
|
|
1120
1120
|
*/
|
|
1121
1121
|
current?(input: LocalTargetCurrentInput): Promise<LocalTargetCurrentApp | undefined>;
|
|
1122
1122
|
}
|
|
1123
1123
|
interface LocalTargetCurrentInput {
|
|
1124
|
-
/** Absolute path of the dev state directory (
|
|
1124
|
+
/** Absolute path of the environment's dev state directory (`devEnvironmentDir`, under the cwd). */
|
|
1125
1125
|
readonly devDir: string;
|
|
1126
|
+
readonly app: string;
|
|
1127
|
+
readonly environment: string;
|
|
1126
1128
|
}
|
|
1127
|
-
/** The
|
|
1129
|
+
/** The local copy of an app in one environment, as one extension recorded it. */
|
|
1128
1130
|
interface LocalTargetCurrentApp {
|
|
1129
1131
|
readonly app: string;
|
|
1130
1132
|
/** Every node address recorded for the app. */
|
|
@@ -1168,18 +1170,19 @@ interface LocalNodeStopped {
|
|
|
1168
1170
|
interface LocalTargetProvidersInput {
|
|
1169
1171
|
/** This extension's resolved local-target container (its `input.appName` is the emulator app namespace). */
|
|
1170
1172
|
readonly container: ContainerInstance | undefined;
|
|
1171
|
-
/** Absolute path of the dev state directory (
|
|
1173
|
+
/** Absolute path of the environment's dev state directory (`devEnvironmentDir`, under the cwd). */
|
|
1172
1174
|
readonly devDir: string;
|
|
1173
1175
|
}
|
|
1174
1176
|
interface LocalTargetEmulatorsInput {
|
|
1175
1177
|
/** The loaded application graph — inspected for which node kinds need an emulator. */
|
|
1176
1178
|
readonly graph: Graph;
|
|
1177
1179
|
readonly container: ContainerInstance | undefined;
|
|
1178
|
-
/** Absolute path of the dev state directory (
|
|
1180
|
+
/** Absolute path of the environment's dev state directory (`devEnvironmentDir`, under the cwd). */
|
|
1179
1181
|
readonly devDir: string;
|
|
1180
1182
|
}
|
|
1181
1183
|
interface LocalTargetAttachInput {
|
|
1182
1184
|
readonly container: ContainerInstance | undefined;
|
|
1185
|
+
/** Absolute path of the environment's dev state directory (`devEnvironmentDir`, under the cwd). */
|
|
1183
1186
|
readonly devDir: string;
|
|
1184
1187
|
}
|
|
1185
1188
|
interface LocalTargetAttachment {
|
|
@@ -1309,7 +1312,7 @@ interface NotOk<F> {
|
|
|
1309
1312
|
*/
|
|
1310
1313
|
type Result$1<T, F> = Ok<T> | NotOk<F>;
|
|
1311
1314
|
//#endregion
|
|
1312
|
-
//#region ../../0-framework/3-tooling/cli/dist/dev-current-
|
|
1315
|
+
//#region ../../0-framework/3-tooling/cli/dist/dev-current-CcIkmpk0.d.mts
|
|
1313
1316
|
//#region src/dev/watch.d.ts
|
|
1314
1317
|
interface WatchTarget {
|
|
1315
1318
|
readonly address: string;
|
|
@@ -1551,6 +1554,9 @@ interface DevInput {
|
|
|
1551
1554
|
/** The entry module, resolved against `cwd`. Overrides the `entry` in `config`; without either the operation fails with `CONFIG.ENTRY_MISSING`. */
|
|
1552
1555
|
readonly entry?: string | undefined;
|
|
1553
1556
|
readonly name?: string | undefined;
|
|
1557
|
+
/** The environment to run as: a complete local copy of the app with its own services, databases and buckets. Defaults to `dev`. */
|
|
1558
|
+
readonly environment?: string | undefined;
|
|
1559
|
+
/** Deletes the environment's local copy of the app, and its data, before starting. Other environments are untouched. */
|
|
1554
1560
|
readonly fresh?: boolean | undefined;
|
|
1555
1561
|
/**
|
|
1556
1562
|
* Return once every service answers and leave the app running, with no
|
|
@@ -1582,8 +1588,10 @@ declare function devWithDeps(input: DevInput, deps: OperationDeps): Promise<Resu
|
|
|
1582
1588
|
interface DevUrlInput {
|
|
1583
1589
|
/** Composer's configuration: the `composer` section of `prisma.config.ts` and that file. It names the extensions whose local targets recorded the app. */
|
|
1584
1590
|
readonly config: ComposerConfigSource;
|
|
1585
|
-
/** A node's dotted address
|
|
1591
|
+
/** A node's full dotted address, starting with the app name, such as `shop.gateway`. The app is read from it. */
|
|
1586
1592
|
readonly address: string;
|
|
1593
|
+
/** The environment whose local copy to read. Defaults to `dev`. */
|
|
1594
|
+
readonly environment?: string | undefined;
|
|
1587
1595
|
/** The directory `prisma dev` ran from. Defaults to the process's working directory. */
|
|
1588
1596
|
readonly cwd?: string | undefined;
|
|
1589
1597
|
}
|
|
@@ -1600,24 +1608,32 @@ interface DevUrl {
|
|
|
1600
1608
|
}
|
|
1601
1609
|
interface DevStopInput {
|
|
1602
1610
|
readonly config: ComposerConfigSource;
|
|
1611
|
+
/** The entry module, resolved against `cwd`. Overrides the `entry` in `config`; the app is its root's name. */
|
|
1612
|
+
readonly entry?: string | undefined;
|
|
1613
|
+
/** The app to stop, in place of the entry root's name. */
|
|
1614
|
+
readonly name?: string | undefined;
|
|
1615
|
+
/** The environment whose local copy to stop. Defaults to `dev`. */
|
|
1616
|
+
readonly environment?: string | undefined;
|
|
1603
1617
|
/** The directory `prisma dev` ran from. Defaults to the process's working directory. */
|
|
1604
1618
|
readonly cwd?: string | undefined;
|
|
1605
1619
|
}
|
|
1606
1620
|
interface DevStopped {
|
|
1607
|
-
/** The app that was stopped
|
|
1621
|
+
/** The app that was stopped. */
|
|
1608
1622
|
readonly app: string;
|
|
1623
|
+
/** The environment whose local copy was stopped. */
|
|
1624
|
+
readonly environment: string;
|
|
1609
1625
|
/** Each node whose process or server was stopped. Data and ports are kept. */
|
|
1610
1626
|
readonly stopped: readonly {
|
|
1611
1627
|
readonly address: string;
|
|
1612
1628
|
readonly kind: string;
|
|
1613
1629
|
}[];
|
|
1614
1630
|
}
|
|
1615
|
-
/** Where the node at `input.address`
|
|
1631
|
+
/** Where the node at `input.address` runs locally in the environment. */
|
|
1616
1632
|
declare function devUrl(input: DevUrlInput): Promise<Result$1<DevUrl, CliStructuredError>>;
|
|
1617
|
-
/** Stops the
|
|
1633
|
+
/** Stops the app's local copy in the environment: its service processes and database servers. Data and ports stay. */
|
|
1618
1634
|
declare function devStop(input: DevStopInput): Promise<Result$1<DevStopped, CliStructuredError>>;
|
|
1619
1635
|
//#endregion
|
|
1620
|
-
//#region ../../0-framework/3-tooling/cli/dist/family-
|
|
1636
|
+
//#region ../../0-framework/3-tooling/cli/dist/family-B2JZ8O7U.d.mts
|
|
1621
1637
|
//#region src/family/family.d.ts
|
|
1622
1638
|
/**
|
|
1623
1639
|
* The control-plane operations the family's handlers call. These are the
|
|
@@ -1644,4 +1660,4 @@ interface CreateComposerFamilyOptions {
|
|
|
1644
1660
|
}
|
|
1645
1661
|
//#endregion
|
|
1646
1662
|
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-
|
|
1663
|
+
//# sourceMappingURL=family-B2JZ8O7U-DLXWQQ7T.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"family-
|
|
1
|
+
{"version":3,"file":"family-B2JZ8O7U-DLXWQQ7T.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-CH5TyIsx.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-CcIkmpk0.d.mts","../../../0-framework/3-tooling/cli/dist/family-B2JZ8O7U.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,iBA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YAAY;;;UAGrF;;WAEC,QAAQ;;WAER;;WAEA;;WAEA;;UAED;WACC;;WAEA;;WAEA;;WAEA;;WAEA;;UAED;WACC,QAAQ;;WAER;;WAEA;;WAEA;;WAEA;;UAED;;WAEC;;WAEA;;WAEA;aACE;aACA;;;;iBAII,OAAO,OAAO,cAAc,QAAQ,SAAO,QAAQ;;iBAEnD,QAAQ,OAAO,eAAe,QAAQ,SAAO,YAAY;;;;;;;;;;;;UCtVhE;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 { _ 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-
|
|
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-B2JZ8O7U-DLXWQQ7T.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";
|
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 devWithDeps, i as devUrl, n as deployWithDeps, o as executionDiagnostics, r as devStop, t as DEFAULT_DEPLOY_ENVIRONMENT } from "./dev-current-
|
|
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-CIeW9MCK-HPHPCqpV.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";
|
|
@@ -517,8 +517,9 @@ Generated stack file: ${event.stackFilePath}\nRun \`${event.reproduceCommand}\`
|
|
|
517
517
|
};
|
|
518
518
|
}
|
|
519
519
|
/** A detached session owns nothing to stop, so a Ctrl-C before it was ready stops the app the way `prisma dev stop` does. */
|
|
520
|
-
async function stopDetachedApp(operations, ctx) {
|
|
520
|
+
async function stopDetachedApp(operations, app, ctx) {
|
|
521
521
|
const stopped = await operations.devStop({
|
|
522
|
+
...app,
|
|
522
523
|
config: ctx.config,
|
|
523
524
|
cwd: ctx.cwd
|
|
524
525
|
});
|
|
@@ -532,10 +533,11 @@ async function stopDetachedApp(operations, ctx) {
|
|
|
532
533
|
const createDevCommand = (operations) => defineSessionCommand({
|
|
533
534
|
help: {
|
|
534
535
|
summary: "Bring up the application whose root node is the entry module's default export, entirely on this machine.",
|
|
535
|
-
description: "Runs credential-free and watches the app for changes, reconverging on every edit. A service whose build adapter declares a dev server (Next.js's `next dev`, or the `dev` command written on node()) runs that instead of its build, and its output is shown here, prefixed with its address. A node is one service, database or bucket in the app. Each node runs on a local emulator: a program on this machine that stands in for Prisma Cloud and runs services, databases or S3-compatible buckets. A node's address is its path from the app name, with dots between names (shop.catalog.database).
|
|
536
|
+
description: "Runs credential-free and watches the app for changes, reconverging on every edit. A service whose build adapter declares a dev server (Next.js's `next dev`, or the `dev` command written on node()) runs that instead of its build, and its output is shown here, prefixed with its address. A node is one service, database or bucket in the app. Each node runs on a local emulator: a program on this machine that stands in for Prisma Cloud and runs services, databases or S3-compatible buckets. A node's address is its path from the app name, with dots between names (shop.catalog.database). Each environment is a complete local copy of the app, with its own services, databases, buckets and ports; the default is dev, and copies of other environments run alongside it. Where each node runs is recorded in this directory: `prisma dev url` works from here while `prisma dev` runs, and `prisma dev stop` also works after `prisma dev` was killed. Ending `prisma dev` stops its services and database servers; data and ports are kept. With --detach it returns once every service answers and leaves the app running without watching for changes, until `prisma dev stop`.",
|
|
536
537
|
examples: [
|
|
537
538
|
"{bin} dev",
|
|
538
539
|
"{bin} dev --fresh",
|
|
540
|
+
"{bin} dev --environment test --fresh",
|
|
539
541
|
"{bin} dev --detach",
|
|
540
542
|
"{bin} dev --entry other-module.ts"
|
|
541
543
|
]
|
|
@@ -549,7 +551,12 @@ const createDevCommand = (operations) => defineSessionCommand({
|
|
|
549
551
|
brief: "Run the app under this name instead of the name its root module declares. A different name gets its own local services, databases and buckets (default: the root module's name).",
|
|
550
552
|
placeholder: "name"
|
|
551
553
|
}),
|
|
552
|
-
|
|
554
|
+
environment: flag.string({
|
|
555
|
+
brief: "The environment to run as. Each environment is a separate local copy of the app, so a second one, such as test, runs alongside dev and leaves its data alone.",
|
|
556
|
+
placeholder: "name",
|
|
557
|
+
default: "dev"
|
|
558
|
+
}),
|
|
559
|
+
fresh: flag.boolean({ brief: "Delete this app's local services, databases and buckets in the environment, and their data, before starting. Other environments are untouched." }),
|
|
553
560
|
detach: flag.boolean({ brief: "Return once every service answers and leave the app running without watching for changes. Use it in scripts, agents and CI. `prisma dev stop` stops the app." })
|
|
554
561
|
} },
|
|
555
562
|
needs: { config: composerSection },
|
|
@@ -560,6 +567,7 @@ const createDevCommand = (operations) => defineSessionCommand({
|
|
|
560
567
|
entry: args.flags.entry,
|
|
561
568
|
config: ctx.config,
|
|
562
569
|
name: args.flags.name,
|
|
570
|
+
environment: args.flags.environment,
|
|
563
571
|
fresh: args.flags.fresh,
|
|
564
572
|
detach: args.flags.detach,
|
|
565
573
|
cwd: ctx.cwd,
|
|
@@ -567,7 +575,11 @@ const createDevCommand = (operations) => defineSessionCommand({
|
|
|
567
575
|
}, { alchemy: coalescedConverge(alchemy) });
|
|
568
576
|
if (!result.ok) return settleConvergeFailure(result.failure, ctx);
|
|
569
577
|
if (args.flags.detach) {
|
|
570
|
-
if (ctx.signal.aborted) await stopDetachedApp(operations,
|
|
578
|
+
if (ctx.signal.aborted) await stopDetachedApp(operations, {
|
|
579
|
+
entry: args.flags.entry,
|
|
580
|
+
name: args.flags.name,
|
|
581
|
+
environment: args.flags.environment
|
|
582
|
+
}, ctx);
|
|
571
583
|
return ok(void 0);
|
|
572
584
|
}
|
|
573
585
|
await stopRequested(ctx.signal);
|
|
@@ -576,34 +588,51 @@ const createDevCommand = (operations) => defineSessionCommand({
|
|
|
576
588
|
}
|
|
577
589
|
});
|
|
578
590
|
/**
|
|
579
|
-
* `dev stop` — stops the app
|
|
580
|
-
*
|
|
581
|
-
*
|
|
591
|
+
* `dev stop` — stops the app's local copy in one environment, as ending
|
|
592
|
+
* `prisma dev` would: its service processes and database servers. For an
|
|
593
|
+
* app whose `prisma dev` was killed without the chance to stop it.
|
|
582
594
|
*/
|
|
583
595
|
const createDevStopCommand = (operations) => defineCommand({
|
|
584
596
|
help: {
|
|
585
|
-
summary: "Stop the app
|
|
586
|
-
description: "Ending `prisma dev` with Ctrl-C does the same. Run this when `prisma dev` was killed without a chance to stop the app, or before deleting the directory. The emulators keep running; other directories may be using them.",
|
|
587
|
-
examples: ["{bin} dev stop"]
|
|
597
|
+
summary: "Stop the app's local copy in an environment: its service processes and local database servers. Data and ports are kept for the next `prisma dev`.",
|
|
598
|
+
description: "The app is the root module of the entry, or --name, as for `prisma dev`, and the environment is dev unless --environment names another. Other apps and environments keep running. Ending `prisma dev` with Ctrl-C does the same. Run this when `prisma dev` was killed without a chance to stop the app, or before deleting the directory. The emulators keep running; other directories may be using them.",
|
|
599
|
+
examples: ["{bin} dev stop", "{bin} dev stop --environment test"]
|
|
588
600
|
},
|
|
589
|
-
args: {
|
|
601
|
+
args: { flags: {
|
|
602
|
+
entry: flag.string({
|
|
603
|
+
brief: "The file whose default export is the application root module. Overrides `entry` in the `composer` section of prisma.config.ts.",
|
|
604
|
+
placeholder: "path"
|
|
605
|
+
}),
|
|
606
|
+
name: flag.string({
|
|
607
|
+
brief: "Stop the app run under this name instead of the root module's name.",
|
|
608
|
+
placeholder: "name"
|
|
609
|
+
}),
|
|
610
|
+
environment: flag.string({
|
|
611
|
+
brief: "The environment whose local copy to stop.",
|
|
612
|
+
placeholder: "name",
|
|
613
|
+
default: "dev"
|
|
614
|
+
})
|
|
615
|
+
} },
|
|
590
616
|
needs: { config: composerSection },
|
|
591
|
-
handler: async (
|
|
617
|
+
handler: async (args, ctx) => {
|
|
592
618
|
const result = await operations.devStop({
|
|
593
619
|
config: ctx.config,
|
|
620
|
+
entry: args.flags.entry,
|
|
621
|
+
name: args.flags.name,
|
|
622
|
+
environment: args.flags.environment,
|
|
594
623
|
cwd: ctx.cwd
|
|
595
624
|
});
|
|
596
625
|
if (!result.ok) return notOk(toEngineError(result.failure));
|
|
597
|
-
const { app, stopped } = result.value;
|
|
626
|
+
const { app, environment, stopped } = result.value;
|
|
598
627
|
return ok(ctx.present({ data: result.value }, {
|
|
599
628
|
human: (ui) => stopped.length === 0 ? [{
|
|
600
629
|
kind: "summary",
|
|
601
630
|
status: "info",
|
|
602
|
-
text: `Nothing of ${ui.emphasize(app)} was running.`
|
|
631
|
+
text: `Nothing of ${ui.emphasize(app)} was running in the environment ${environment}.`
|
|
603
632
|
}] : [{
|
|
604
633
|
kind: "summary",
|
|
605
634
|
status: "ok",
|
|
606
|
-
text: `Stopped ${ui.emphasize(app)}. Its data and ports are kept for the next \`prisma dev\`.`
|
|
635
|
+
text: `Stopped ${ui.emphasize(app)} in the environment ${environment}. Its data and ports are kept for the next \`prisma dev\`.`
|
|
607
636
|
}, {
|
|
608
637
|
kind: "table",
|
|
609
638
|
columns: ["Address", "Kind"],
|
|
@@ -616,25 +645,37 @@ const createDevStopCommand = (operations) => defineCommand({
|
|
|
616
645
|
}
|
|
617
646
|
});
|
|
618
647
|
/**
|
|
619
|
-
* `dev url <address>` — where a node
|
|
620
|
-
* directory answers locally. A data command: the
|
|
621
|
-
* `$(prisma dev url gateway)` is the URL alone.
|
|
648
|
+
* `dev url <address>` — where a node that `prisma dev` runs from this
|
|
649
|
+
* directory answers locally, in the environment named. A data command: the
|
|
650
|
+
* URL is its stdout line, so `$(prisma dev url shop.gateway)` is the URL alone.
|
|
622
651
|
*/
|
|
623
652
|
const createDevUrlCommand = (operations) => defineCommand({
|
|
624
653
|
help: {
|
|
625
654
|
summary: "Print the local URL of a node (a service, database or bucket in your app) that `prisma dev` runs from this directory: a service's HTTP URL, a database's connection string, or a bucket's S3 address.",
|
|
626
|
-
description: "
|
|
627
|
-
examples: [
|
|
655
|
+
description: "The app is the first name of the address, and the environment is dev unless --environment names another. Reads what `prisma dev` recorded for that app and environment in this directory and starts nothing, so run it while `prisma dev` is running; a node that is not running is an error. The URL alone goes to stdout, so a script can use it directly: curl \"$(prisma dev url shop.gateway)\". With --json, stdout carries the full result instead.",
|
|
656
|
+
examples: [
|
|
657
|
+
"{bin} dev url shop.gateway",
|
|
658
|
+
"{bin} dev url shop.gateway --environment test",
|
|
659
|
+
"{bin} dev url shop.catalog.database --json"
|
|
660
|
+
]
|
|
661
|
+
},
|
|
662
|
+
args: {
|
|
663
|
+
positionals: { address: positional.string({
|
|
664
|
+
brief: "The node's address: the app name, then the names down to the node, with dots between them, such as shop.catalog.database.",
|
|
665
|
+
placeholder: "address"
|
|
666
|
+
}) },
|
|
667
|
+
flags: { environment: flag.string({
|
|
668
|
+
brief: "The environment whose local copy to read.",
|
|
669
|
+
placeholder: "name",
|
|
670
|
+
default: "dev"
|
|
671
|
+
}) }
|
|
628
672
|
},
|
|
629
|
-
args: { positionals: { address: positional.string({
|
|
630
|
-
brief: "The node's address: its name in the app, with dots for a nested node, such as catalog.database.",
|
|
631
|
-
placeholder: "address"
|
|
632
|
-
}) } },
|
|
633
673
|
needs: { config: composerSection },
|
|
634
674
|
handler: async (args, ctx) => {
|
|
635
675
|
const result = await operations.devUrl({
|
|
636
676
|
config: ctx.config,
|
|
637
677
|
address: args.positionals.address,
|
|
678
|
+
environment: args.flags.environment,
|
|
638
679
|
cwd: ctx.cwd
|
|
639
680
|
});
|
|
640
681
|
if (!result.ok) return notOk(toEngineError(result.failure));
|
|
@@ -716,7 +757,7 @@ function createComposerFamily$1(options = {}) {
|
|
|
716
757
|
* assembled into the family here, where both domains may be imported.
|
|
717
758
|
*/
|
|
718
759
|
/** Loaded on first use, so nothing of the Management API reads loads with the family. */
|
|
719
|
-
const listDeployed = async (input) => (await import("./list-deployed-
|
|
760
|
+
const listDeployed = async (input) => (await import("./list-deployed-BxPIhTMX.mjs")).listDeployed(input);
|
|
720
761
|
const createDeployListCommand = (list) => defineCommand({
|
|
721
762
|
help: {
|
|
722
763
|
summary: "List every node the app has deployed in an environment, with its platform ID and URL.",
|
|
@@ -801,12 +842,14 @@ const EMULATOR_NAMES = {
|
|
|
801
842
|
database: "Database emulator",
|
|
802
843
|
bucket: "Bucket emulator"
|
|
803
844
|
};
|
|
804
|
-
/** The node and
|
|
845
|
+
/** The node, directory and environment that started an instance, when Composer's labels say. */
|
|
805
846
|
function startedBy(labels) {
|
|
806
847
|
const address = labels["composer.address"];
|
|
807
848
|
const directory = labels["composer.directory"];
|
|
849
|
+
const environment = labels["composer.environment"];
|
|
808
850
|
if (address === void 0) return void 0;
|
|
809
|
-
|
|
851
|
+
const where = directory === void 0 ? address : `${address} in ${directory}`;
|
|
852
|
+
return environment === void 0 ? where : `${where} (${environment})`;
|
|
810
853
|
}
|
|
811
854
|
function labelOf(emulator, dim) {
|
|
812
855
|
const name = EMULATOR_NAMES[emulator.kind];
|
|
@@ -821,7 +864,7 @@ function statusOf(emulator) {
|
|
|
821
864
|
const createEmulatorListCommand = (list) => defineCommand({
|
|
822
865
|
help: {
|
|
823
866
|
summary: "List the local emulators on this machine — the programs `prisma dev` starts to run services, databases and S3-compatible buckets without Prisma Cloud — with every instance each one holds.",
|
|
824
|
-
description: "Needs no project: it shows every directory’s instances. An emulator that is not running is listed with no instances, and one that runs but cannot be listed is shown with the error. Each instance’s labels say which directory, app and
|
|
867
|
+
description: "Needs no project: it shows every directory’s instances. An emulator that is not running is listed with no instances, and one that runs but cannot be listed is shown with the error. Each instance’s labels say which directory, app, node and environment started it. A stopped instance keeps its port and data until it is deleted.",
|
|
825
868
|
examples: ["{bin} emulator list", "{bin} emulator list --json"]
|
|
826
869
|
},
|
|
827
870
|
args: {},
|
|
@@ -852,7 +895,8 @@ const createEmulatorListCommand = (list) => defineCommand({
|
|
|
852
895
|
instance.url,
|
|
853
896
|
instance.state,
|
|
854
897
|
instance.labels["composer.address"],
|
|
855
|
-
instance.labels["composer.directory"]
|
|
898
|
+
instance.labels["composer.directory"],
|
|
899
|
+
instance.labels["composer.environment"]
|
|
856
900
|
]))),
|
|
857
901
|
json: () => result.value,
|
|
858
902
|
next: () => []
|