@prisma/composer-cli 0.30.0 → 0.31.0-dev.2
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/container-transport-HcvNOGZL-CIoZc7Rs.mjs +34 -0
- package/dist/container-transport-HcvNOGZL-CIoZc7Rs.mjs.map +1 -0
- package/dist/{dev-CqS1W82b-BF0YJc6a.mjs → dev-current-BLBLXm8k-hpKwhZGR.mjs} +24 -5
- package/dist/dev-current-BLBLXm8k-hpKwhZGR.mjs.map +1 -0
- package/dist/dist-j4X7U5yA.mjs +1788 -0
- package/dist/dist-j4X7U5yA.mjs.map +1 -0
- package/dist/{execute-deploy-destroy-D4UdieU1-C1P6X7uK.mjs → execute-deploy-destroy-CZ41Z-aS-peXt1bHC.mjs} +5 -4
- package/dist/execute-deploy-destroy-CZ41Z-aS-peXt1bHC.mjs.map +1 -0
- package/dist/{execute-dev-BSPnsEv--SNELmzE_.mjs → execute-dev-DqBJhr_c-67-M6VLA.mjs} +50 -65
- package/dist/execute-dev-DqBJhr_c-67-M6VLA.mjs.map +1 -0
- package/dist/execute-dev-current-mKLK92xq-cCet5L57.mjs +126 -0
- package/dist/execute-dev-current-mKLK92xq-cCet5L57.mjs.map +1 -0
- package/dist/{family-Dt7BgpVf-YyjGLli3.d.mts → family-BIyR33Uq-BEqJM2Vx.d.mts} +131 -29
- package/dist/family-BIyR33Uq-BEqJM2Vx.d.mts.map +1 -0
- package/dist/family.d.mts +47 -3
- package/dist/family.d.mts.map +1 -1
- package/dist/family.mjs +217 -12
- package/dist/family.mjs.map +1 -1
- package/dist/local-target-DZ6bu7Aj.mjs +48 -0
- package/dist/local-target-DZ6bu7Aj.mjs.map +1 -0
- package/dist/{container-transport-HcvNOGZL-ClGmzBIO.mjs → pipeline-Dpesfd2j-DKL3f1bj.mjs} +17 -39
- package/dist/pipeline-Dpesfd2j-DKL3f1bj.mjs.map +1 -0
- package/dist/testing.d.mts +7 -1
- package/dist/testing.d.mts.map +1 -1
- package/dist/testing.mjs +23 -2
- package/dist/testing.mjs.map +1 -1
- package/package.json +9 -5
- package/src/exports/family.ts +29 -0
- package/src/family/emulator-list.ts +112 -0
- package/dist/container-transport-HcvNOGZL-ClGmzBIO.mjs.map +0 -1
- package/dist/dev-CqS1W82b-BF0YJc6a.mjs.map +0 -1
- package/dist/execute-deploy-destroy-D4UdieU1-C1P6X7uK.mjs.map +0 -1
- package/dist/execute-dev-BSPnsEv--SNELmzE_.mjs.map +0 -1
- package/dist/family-Dt7BgpVf-YyjGLli3.d.mts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute-dev-current-mKLK92xq-cCet5L57.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/execute-dev-current-mKLK92xq.mjs"],"sourcesContent":["import { l as toStructured } from \"./dev-current-BLBLXm8k.mjs\";\nimport { t as checkConfigSource } from \"./pipeline-Dpesfd2j.mjs\";\nimport { notOk, ok } from \"@internal/foundation/result\";\nimport { CliStructuredError, InternalError } from \"@internal/foundation/errors\";\nimport * as path from \"node:path\";\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 <entry>` 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\treturn {\n\t\taddress: input.address,\n\t\tkind: location.kind,\n\t\turl: location.url,\n\t\tstate: location.state\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-mKLK92xq.mjs.map"],"mappings":";;;;;;;;;;;;AAaA,MAAM,UAAU;AAChB,SAAS,sBAAsB;CAC9B,OAAO,IAAI,mBAAmB,4BAA4B,4CAA4C;AACvG;;AAEA,eAAe,WAAW,MAAM;CAC/B,IAAI;EACH,OAAO,MAAM,KAAK;CACnB,SAAS,OAAO;EACf,MAAM,aAAa,uBAAuB,KAAK;CAChD;AACD;;AAEA,eAAe,YAAY,OAAO,KAAK;CACtC,MAAM,EAAE,UAAU,kBAAkB,MAAM,QAAQ,GAAG;CACrD,MAAM,SAAS,KAAK,KAAK,KAAK,OAAO;CACrC,MAAM,OAAO,CAAC;CACd,KAAK,MAAM,WAAW,MAAM,oBAAoB,KAAK,EAAA,CAAG,OAAO,GAAG;EACjE,MAAM,UAAU,MAAM,WAAW,YAAY,OAAO,UAAU,EAAE,OAAO,CAAC,CAAC;EACzE,IAAI,YAAY,KAAK,GAAG,KAAK,KAAK,OAAO;CAC1C;CACA,IAAI,KAAK,WAAW,GAAG,MAAM,IAAI,mBAAmB,wBAAwB,iCAAiC,IAAI,IAAI;EACpH,KAAK,uEAAuE,OAAO;EACnF,KAAK;EACL,MAAM,EAAE,IAAI;CACb,CAAC;CACD,OAAO;AACR;AACA,eAAe,OAAO,OAAO,KAAK;CACjC,MAAM,OAAO,MAAM,YAAY,OAAO,GAAG;CACzC,MAAM,MAAM,KAAK,MAAM,cAAc,UAAU,UAAU,SAAS,MAAM,OAAO,CAAC;CAChF,IAAI,QAAQ,KAAK,GAAG;EACnB,MAAM,QAAQ,KAAK,SAAS,cAAc,UAAU,SAAS,CAAC,CAAC,KAAK;EACpE,MAAM,IAAI,mBAAmB,uBAAuB,IAAI,KAAK,KAAK,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,QAAQ,EAAE,oBAAoB,MAA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I,QAAQ,gBAAgB;EACxF,KAAK;EACL,KAAK;EACL;CACD,CAAC;AACF;AACA,eAAe,cAAc,OAAO,KAAK;CACxC,IAAI,QAAQ,aAAa,SAAS,OAAO,MAAM,oBAAoB,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"}
|
|
@@ -158,7 +158,27 @@ declare namespace StandardSchemaV1 {
|
|
|
158
158
|
type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
|
|
159
159
|
}
|
|
160
160
|
//#endregion
|
|
161
|
-
//#region ../../0-framework/1-core/core/dist/graph-types-
|
|
161
|
+
//#region ../../0-framework/1-core/core/dist/graph-types-Cegbwb_X.d.mts
|
|
162
|
+
//#region src/contract.d.ts
|
|
163
|
+
/**
|
|
164
|
+
* A Contract is the declared interface of a service-to-service dependency: a
|
|
165
|
+
* protocol brand (`kind`) plus an opaque comparison type (`Cmp`) the core
|
|
166
|
+
* never inspects. Wiring compatibility is plain TypeScript assignability on
|
|
167
|
+
* `Cmp`, checked at `ModuleBuilder.provision`'s call site (node.ts); `satisfies`
|
|
168
|
+
* is its runtime mirror, called at Load (graph.ts). Correctness comes from
|
|
169
|
+
* the kind's builder shaping `Cmp` so assignability means the right thing —
|
|
170
|
+
* see @prisma/composer/service-rpc's `contract()`/`rpc()`.
|
|
171
|
+
*/
|
|
172
|
+
interface Contract<Kind extends string, Cmp> {
|
|
173
|
+
readonly kind: Kind;
|
|
174
|
+
readonly __cmp: Cmp;
|
|
175
|
+
/** How calls over this contract communicate, if it declares a style. Core only carries it onto the graph's ports. */
|
|
176
|
+
readonly style?: ContractStyle;
|
|
177
|
+
satisfies(required: Contract<Kind, unknown>): boolean;
|
|
178
|
+
}
|
|
179
|
+
/** How calls over a contract communicate. A style, not a kind. */
|
|
180
|
+
type ContractStyle = 'request-response' | 'stream';
|
|
181
|
+
//#endregion
|
|
162
182
|
//#region src/config.d.ts
|
|
163
183
|
/**
|
|
164
184
|
* A declared config param — pure data: a caller-owned Standard Schema
|
|
@@ -206,22 +226,6 @@ interface Config {
|
|
|
206
226
|
readonly inputs: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
|
207
227
|
}
|
|
208
228
|
//#endregion
|
|
209
|
-
//#region src/contract.d.ts
|
|
210
|
-
/**
|
|
211
|
-
* A Contract is the declared interface of a service-to-service dependency: a
|
|
212
|
-
* protocol brand (`kind`) plus an opaque comparison type (`Cmp`) the core
|
|
213
|
-
* never inspects. Wiring compatibility is plain TypeScript assignability on
|
|
214
|
-
* `Cmp`, checked at `ModuleBuilder.provision`'s call site (node.ts); `satisfies`
|
|
215
|
-
* is its runtime mirror, called at Load (graph.ts). Correctness comes from
|
|
216
|
-
* the kind's builder shaping `Cmp` so assignability means the right thing —
|
|
217
|
-
* see @prisma/composer/service-rpc's `contract()`/`rpc()`.
|
|
218
|
-
*/
|
|
219
|
-
interface Contract<Kind extends string, Cmp> {
|
|
220
|
-
readonly kind: Kind;
|
|
221
|
-
readonly __cmp: Cmp;
|
|
222
|
-
satisfies(required: Contract<Kind, unknown>): boolean;
|
|
223
|
-
}
|
|
224
|
-
//#endregion
|
|
225
229
|
//#region src/node.d.ts
|
|
226
230
|
declare const NODE: unique symbol;
|
|
227
231
|
declare const SECRET_NEED: unique symbol;
|
|
@@ -335,7 +339,7 @@ interface ServiceNode<D extends Deps = Deps, P extends Params = Params, E extend
|
|
|
335
339
|
/**
|
|
336
340
|
* A service's dependency slot. At Load the enclosing module wires a
|
|
337
341
|
* producer's ref into it; at run it hydrates a client via Connection. `Req`
|
|
338
|
-
* is the required contract (`unknown` for an untyped end
|
|
342
|
+
* is the required contract (`unknown` for an untyped end).
|
|
339
343
|
*/
|
|
340
344
|
interface DependencyEnd<C = unknown, Req = unknown> {
|
|
341
345
|
readonly [NODE]: true;
|
|
@@ -344,7 +348,7 @@ interface DependencyEnd<C = unknown, Req = unknown> {
|
|
|
344
348
|
readonly name: string;
|
|
345
349
|
readonly type: string;
|
|
346
350
|
readonly connection: Connection<Params, C>;
|
|
347
|
-
/** The required contract, or `undefined` for an untyped end
|
|
351
|
+
/** The required contract, or `undefined` for an untyped end. */
|
|
348
352
|
readonly required: Req | undefined;
|
|
349
353
|
}
|
|
350
354
|
/** A Module: the same Deps/Expose boundary a service has, around transparent wiring instead of a black-box body — its `body` runs at Load, not at authoring. */
|
|
@@ -516,9 +520,11 @@ interface PortEndpoint {
|
|
|
516
520
|
* input/expose entry, or a resource's one anonymous output (`$out`).
|
|
517
521
|
* `contractKind` is the protocol brand riding the port — a DependencyEnd's
|
|
518
522
|
* `type` on an `in` port, the exposed Contract's `kind` on an `out` port.
|
|
523
|
+
* `style` is the exposed Contract's declared style; `in` ports carry none.
|
|
519
524
|
*/
|
|
520
525
|
interface BoundaryPort extends PortEndpoint {
|
|
521
526
|
readonly contractKind: string | undefined;
|
|
527
|
+
readonly style: ContractStyle | undefined;
|
|
522
528
|
}
|
|
523
529
|
/**
|
|
524
530
|
* A pre-dereference edge, exactly as authored: module boundaries are
|
|
@@ -589,7 +595,7 @@ interface Graph {
|
|
|
589
595
|
readonly params: readonly ParamBinding[];
|
|
590
596
|
}
|
|
591
597
|
//#endregion
|
|
592
|
-
//#region ../../0-framework/1-core/core/dist/app-config-
|
|
598
|
+
//#region ../../0-framework/1-core/core/dist/app-config-BBPLNnZX.d.mts
|
|
593
599
|
//#region src/container-transport.d.ts
|
|
594
600
|
/**
|
|
595
601
|
* Carries resolved containers from the CLI process into the alchemy process
|
|
@@ -1074,6 +1080,56 @@ interface LocalTargetDescriptor {
|
|
|
1074
1080
|
attach(input: LocalTargetAttachInput): Promise<LocalTargetAttachment>;
|
|
1075
1081
|
/** `--fresh`: remove every local trace of the dev instance — emulator instances, state, data. */
|
|
1076
1082
|
teardown?(input: TeardownInput): Promise<void>;
|
|
1083
|
+
/**
|
|
1084
|
+
* The app `prisma dev` last ran from a directory, read from its dev state
|
|
1085
|
+
* directory alone — no entry, no graph, no container — so a command can
|
|
1086
|
+
* find or stop a running app without running the pipeline. Undefined when
|
|
1087
|
+
* this extension recorded nothing there.
|
|
1088
|
+
*/
|
|
1089
|
+
current?(input: LocalTargetCurrentInput): Promise<LocalTargetCurrentApp | undefined>;
|
|
1090
|
+
}
|
|
1091
|
+
interface LocalTargetCurrentInput {
|
|
1092
|
+
/** Absolute path of the dev state directory (`<cwd>/.prisma-composer/dev`). */
|
|
1093
|
+
readonly devDir: string;
|
|
1094
|
+
}
|
|
1095
|
+
/** The app `prisma dev` last ran from a directory, as one extension recorded it. */
|
|
1096
|
+
interface LocalTargetCurrentApp {
|
|
1097
|
+
readonly app: string;
|
|
1098
|
+
/** Every node address recorded for the app. */
|
|
1099
|
+
readonly addresses: readonly string[];
|
|
1100
|
+
/** Where the node at `address` runs locally; undefined for an address not recorded. */
|
|
1101
|
+
locate(address: string): Promise<LocalNodeLocation | undefined>;
|
|
1102
|
+
/** Stops everything the target runs for the app (emulators and data persist); returns the nodes it stopped. */
|
|
1103
|
+
stop(): Promise<readonly LocalNodeStopped[]>;
|
|
1104
|
+
}
|
|
1105
|
+
/** A node's local whereabouts. `kind` is the target's word for the node (for Prisma Cloud: `service`, `database` or `bucket`). */
|
|
1106
|
+
type LocalNodeLocation = {
|
|
1107
|
+
readonly address: string;
|
|
1108
|
+
readonly kind: string;
|
|
1109
|
+
readonly emulator: 'running';
|
|
1110
|
+
/** Absent when the emulator no longer has the node's instance. */
|
|
1111
|
+
readonly url?: string;
|
|
1112
|
+
/** The target's word for the node's state, shown to the user. */
|
|
1113
|
+
readonly state: string;
|
|
1114
|
+
readonly condition: LocalNodeCondition;
|
|
1115
|
+
/** Where the node's own output is written, when the target keeps it in a file. */
|
|
1116
|
+
readonly logPath?: string;
|
|
1117
|
+
} | {
|
|
1118
|
+
readonly address: string;
|
|
1119
|
+
readonly kind: string;
|
|
1120
|
+
/** The emulator that runs the node is not running, so it has no URL or state to report. */
|
|
1121
|
+
readonly emulator: 'not-running';
|
|
1122
|
+
};
|
|
1123
|
+
/**
|
|
1124
|
+
* What a node's state means for reaching it: `running` answers at its URL;
|
|
1125
|
+
* `stopped` was stopped and starts with the next `prisma dev`; `crashing`
|
|
1126
|
+
* exited and is being restarted or was held after repeated crashes;
|
|
1127
|
+
* `missing` is recorded but its emulator no longer has it.
|
|
1128
|
+
*/
|
|
1129
|
+
type LocalNodeCondition = 'running' | 'stopped' | 'crashing' | 'missing';
|
|
1130
|
+
interface LocalNodeStopped {
|
|
1131
|
+
readonly address: string;
|
|
1132
|
+
readonly kind: string;
|
|
1077
1133
|
}
|
|
1078
1134
|
interface LocalTargetProvidersInput {
|
|
1079
1135
|
/** This extension's resolved local-target container (its `input.appName` is the emulator app namespace). */
|
|
@@ -1107,8 +1163,8 @@ interface LocalTargetAttachment {
|
|
|
1107
1163
|
readonly service: string;
|
|
1108
1164
|
readonly line: string;
|
|
1109
1165
|
}>;
|
|
1110
|
-
/** Stop the app
|
|
1111
|
-
|
|
1166
|
+
/** Stop everything the target runs for the app, so nothing of it keeps running after the session (emulators and data persist). */
|
|
1167
|
+
stopApp(): Promise<void>;
|
|
1112
1168
|
}
|
|
1113
1169
|
/**
|
|
1114
1170
|
* What one registry entry can do. The `kind` discriminant is checked at every
|
|
@@ -1186,7 +1242,7 @@ type AssembleReport = (data: Readonly<Record<string, string | number>>) => void;
|
|
|
1186
1242
|
/** Assembles one service node — the seam tests substitute to avoid a real build. */
|
|
1187
1243
|
type RunAssembler = (node: ServiceNode, address: string, cwd: string, report?: AssembleReport) => Promise<Bundle>;
|
|
1188
1244
|
//#endregion
|
|
1189
|
-
//#region ../../0-framework/3-tooling/cli/dist/dev-
|
|
1245
|
+
//#region ../../0-framework/3-tooling/cli/dist/dev-current-ChYXqIRT.d.mts
|
|
1190
1246
|
//#region src/composer-config.d.ts
|
|
1191
1247
|
/** Composer's configuration and the `prisma.config.ts` that declares it. */
|
|
1192
1248
|
interface ComposerConfigSource {
|
|
@@ -1414,6 +1470,12 @@ interface DevInput {
|
|
|
1414
1470
|
readonly entry: string;
|
|
1415
1471
|
readonly name?: string | undefined;
|
|
1416
1472
|
readonly fresh?: boolean | undefined;
|
|
1473
|
+
/**
|
|
1474
|
+
* Return once every service answers and leave the app running, with no
|
|
1475
|
+
* watch loop: the session is already closed and stopping it stops nothing.
|
|
1476
|
+
* `devStop` stops the app later.
|
|
1477
|
+
*/
|
|
1478
|
+
readonly detach?: boolean | undefined;
|
|
1417
1479
|
readonly cwd?: string | undefined;
|
|
1418
1480
|
readonly onEvent?: ((event: DevEvent) => void) | undefined;
|
|
1419
1481
|
}
|
|
@@ -1424,9 +1486,9 @@ interface DevSession {
|
|
|
1424
1486
|
/** The initial front door, already merged across attachments. */
|
|
1425
1487
|
readonly endpoints: readonly ServiceEndpoint[];
|
|
1426
1488
|
/** Stop the watch loop and the app's services (emulators and data stay up).
|
|
1427
|
-
* Idempotent; emits 'stopping'/'stopped'; resolves `closed`. */
|
|
1489
|
+
* Idempotent; emits 'stopping'/'stopped'; resolves `closed`. A no-op for a detached session. */
|
|
1428
1490
|
stop(): Promise<void>;
|
|
1429
|
-
/** Settles when the session has fully stopped (via stop()). */
|
|
1491
|
+
/** Settles when the session has fully stopped (via stop()); already settled for a detached session. */
|
|
1430
1492
|
readonly closed: Promise<void>;
|
|
1431
1493
|
}
|
|
1432
1494
|
/** In-package variant threading the injection seam, which the family's
|
|
@@ -1434,7 +1496,44 @@ interface DevSession {
|
|
|
1434
1496
|
* internal types and is not part of the published surface. */
|
|
1435
1497
|
declare function devWithDeps(input: DevInput, deps: OperationDeps): Promise<Result$1<DevSession, CliStructuredError>>;
|
|
1436
1498
|
//#endregion
|
|
1437
|
-
//#region
|
|
1499
|
+
//#region src/operations/dev-current.d.ts
|
|
1500
|
+
interface DevUrlInput {
|
|
1501
|
+
/** Composer's configuration: the `composer` section of `prisma.config.ts` and that file. It names the extensions whose local targets recorded the app. */
|
|
1502
|
+
readonly config: ComposerConfigSource;
|
|
1503
|
+
/** A node's dotted address in the app, such as `gateway` or `catalog.database`. */
|
|
1504
|
+
readonly address: string;
|
|
1505
|
+
/** The directory `prisma dev` ran from. Defaults to the process's working directory. */
|
|
1506
|
+
readonly cwd?: string | undefined;
|
|
1507
|
+
}
|
|
1508
|
+
interface DevUrl {
|
|
1509
|
+
readonly address: string;
|
|
1510
|
+
/** What the node is, in its target's words; Prisma Cloud's are `service`, `database` and `bucket`. */
|
|
1511
|
+
readonly kind: string;
|
|
1512
|
+
/** A service's URL, a database's connection string, or a bucket's S3 endpoint plus `/<bucket>`. */
|
|
1513
|
+
readonly url: string;
|
|
1514
|
+
/** Always `running`: a node that is not running is a failure. */
|
|
1515
|
+
readonly state: string;
|
|
1516
|
+
}
|
|
1517
|
+
interface DevStopInput {
|
|
1518
|
+
readonly config: ComposerConfigSource;
|
|
1519
|
+
/** The directory `prisma dev` ran from. Defaults to the process's working directory. */
|
|
1520
|
+
readonly cwd?: string | undefined;
|
|
1521
|
+
}
|
|
1522
|
+
interface DevStopped {
|
|
1523
|
+
/** The app that was stopped: the one `prisma dev` last ran from the directory. */
|
|
1524
|
+
readonly app: string;
|
|
1525
|
+
/** Each node whose process or server was stopped. Data and ports are kept. */
|
|
1526
|
+
readonly stopped: readonly {
|
|
1527
|
+
readonly address: string;
|
|
1528
|
+
readonly kind: string;
|
|
1529
|
+
}[];
|
|
1530
|
+
}
|
|
1531
|
+
/** Where the node at `input.address` of the directory's current app runs locally. */
|
|
1532
|
+
declare function devUrl(input: DevUrlInput): Promise<Result$1<DevUrl, CliStructuredError>>;
|
|
1533
|
+
/** Stops the directory's current app: its service processes and database servers. Data and ports stay. */
|
|
1534
|
+
declare function devStop(input: DevStopInput): Promise<Result$1<DevStopped, CliStructuredError>>;
|
|
1535
|
+
//#endregion
|
|
1536
|
+
//#region ../../0-framework/3-tooling/cli/dist/family-BIyR33Uq.d.mts
|
|
1438
1537
|
//#region src/family/family.d.ts
|
|
1439
1538
|
/**
|
|
1440
1539
|
* The control-plane operations the family's handlers call. These are the
|
|
@@ -1447,13 +1546,16 @@ declare function devWithDeps(input: DevInput, deps: OperationDeps): Promise<Resu
|
|
|
1447
1546
|
interface ComposerOperations {
|
|
1448
1547
|
readonly deploy: typeof deployWithDeps;
|
|
1449
1548
|
readonly dev: typeof devWithDeps;
|
|
1549
|
+
readonly devUrl: typeof devUrl;
|
|
1550
|
+
readonly devStop: typeof devStop;
|
|
1450
1551
|
}
|
|
1451
1552
|
declare const realOperations: ComposerOperations;
|
|
1452
1553
|
interface CreateComposerFamilyOptions {
|
|
1453
1554
|
/** Defaults to the real control operations. */
|
|
1454
1555
|
readonly operations?: ComposerOperations | undefined;
|
|
1556
|
+
/** More commands to ship in the family, keyed by the path they are meant to mount at. */
|
|
1557
|
+
readonly commands?: CommandFamily['commands'] | undefined;
|
|
1455
1558
|
}
|
|
1456
|
-
declare function createComposerFamily(options?: CreateComposerFamilyOptions): CommandFamily;
|
|
1457
1559
|
//#endregion
|
|
1458
|
-
export {
|
|
1459
|
-
//# sourceMappingURL=family-
|
|
1560
|
+
export { Result$1 as _, DeployEvent as a, DevInput as c, DevStopped as d, DevUrl as f, AssembledServices as g, ServiceEndpoint as h, ComposerConfigSource as i, DevSession as l, OperationDeps as m, CreateComposerFamilyOptions as n, DeployInput as o, DevUrlInput as p, realOperations as r, DeploySuccess as s, ComposerOperations as t, DevStopInput as u, CliStructuredError as v };
|
|
1561
|
+
//# sourceMappingURL=family-BIyR33Uq-BEqJM2Vx.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"family-BIyR33Uq-BEqJM2Vx.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-BBPLNnZX.d.mts","../../../0-framework/3-tooling/cli/dist/deployment-summary-CU-eVvJM.d.mts","../../../0-framework/0-foundation/foundation/dist/result.d.mts","../../../0-framework/3-tooling/assemble/dist/index.d.mts","../../../0-framework/3-tooling/cli/dist/dev-current-ChYXqIRT.d.mts","../../../0-framework/3-tooling/cli/dist/family-BIyR33Uq.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,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AEC,oBAAoB;;;EAG7B,QAAQ;;WAEC,QAAQ;;;;;iBAMF,YAAY,OAAO,UAAU,MAAM,gBAAgB,QAAQ,SAAO,YAAY;;;UAGrF;;WAEC,QAAQ;;WAER;;WAEA;;UAED;WACC;;WAEA;;WAEA;;WAEA;;UAED;WACC,QAAQ;;WAER;;UAED;;WAEC;;WAEA;aACE;aACA;;;;iBAII,OAAO,OAAO,cAAc,QAAQ,SAAO,QAAQ;;iBAEnD,QAAQ,OAAO,eAAe,QAAQ,SAAO,YAAY;;;;;;;;;;;;UCtThE;WACC,eAAe;WACf,YAAY;WACZ,eAAe;WACf,gBAAgB;;cAEb,gBAAgB;UACpB;;WAEC,aAAa;;WAEb,WAAW"}
|
package/dist/family.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ConfigSection } from "@prisma/cli-engine";
|
|
1
|
+
import { _ as Result, i as ComposerConfigSource, n as CreateComposerFamilyOptions$1, r as realOperations, t as ComposerOperations, v as CliStructuredError$1 } from "./family-BIyR33Uq-BEqJM2Vx.mjs";
|
|
2
|
+
import { CommandFamily, ConfigSection } from "@prisma/cli-engine";
|
|
3
3
|
import { CliStructuredError } from "@prisma/cli-engine/protocol";
|
|
4
4
|
//#region ../../0-framework/3-tooling/cli/dist/family.d.mts
|
|
5
5
|
//#region src/family/section.d.ts
|
|
@@ -15,5 +15,49 @@ type ComposerError = CliStructuredError$1;
|
|
|
15
15
|
/** Translates a composer failure into the engine's error type. Composer-side detail — `meta`, `where`, `docsUrl` — rides along untouched. */
|
|
16
16
|
declare function toEngineError(error: ComposerError): CliStructuredError;
|
|
17
17
|
//#endregion
|
|
18
|
-
|
|
18
|
+
//#region ../../1-prisma-cloud/0-lowering/dev-emulators/dist/index.d.mts
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/emulator-list.d.ts
|
|
21
|
+
/** What an emulator's instances are. */
|
|
22
|
+
type EmulatorKind = 'service' | 'database' | 'bucket';
|
|
23
|
+
interface EmulatorInstance {
|
|
24
|
+
readonly id: string;
|
|
25
|
+
readonly kind: EmulatorKind;
|
|
26
|
+
/** A service's URL, a database's connection string, or a bucket's S3 endpoint plus `/<id>`. */
|
|
27
|
+
readonly url: string;
|
|
28
|
+
/** A service's status, a database's `running` or `stopped`, or `running` for a bucket. */
|
|
29
|
+
readonly state: string;
|
|
30
|
+
readonly labels: Readonly<Record<string, string>>;
|
|
31
|
+
}
|
|
32
|
+
/** Why a running emulator could not be listed: it did not answer, or it answered with an error. */
|
|
33
|
+
interface EmulatorListingError {
|
|
34
|
+
readonly code: string;
|
|
35
|
+
readonly message: string;
|
|
36
|
+
}
|
|
37
|
+
interface EmulatorListing {
|
|
38
|
+
readonly kind: EmulatorKind;
|
|
39
|
+
readonly running: boolean;
|
|
40
|
+
/** The emulator's admin URL; null when it is not running. */
|
|
41
|
+
readonly url: string | null;
|
|
42
|
+
/** Empty when the emulator is not running or could not be listed. */
|
|
43
|
+
readonly instances: readonly EmulatorInstance[];
|
|
44
|
+
/** Null unless the emulator runs but could not be listed. */
|
|
45
|
+
readonly error: EmulatorListingError | null;
|
|
46
|
+
}
|
|
47
|
+
interface EmulatorList {
|
|
48
|
+
readonly emulators: readonly EmulatorListing[];
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/family/emulator-list.d.ts
|
|
52
|
+
type ListEmulators = () => Promise<Result<EmulatorList, CliStructuredError$1>>;
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region src/exports/family.d.ts
|
|
55
|
+
interface CreateComposerFamilyOptions extends CreateComposerFamilyOptions$1 {
|
|
56
|
+
/** Defaults to the real listing of this machine's emulators. */
|
|
57
|
+
readonly listEmulators?: ListEmulators | undefined;
|
|
58
|
+
}
|
|
59
|
+
/** Composer's command family: `deploy`, `dev`, `dev url`, `dev stop` and `emulator list`, keyed by the path each is meant to mount at. */
|
|
60
|
+
declare function createComposerFamily(options?: CreateComposerFamilyOptions): CommandFamily;
|
|
61
|
+
//#endregion
|
|
62
|
+
export { type ComposerOperations, CreateComposerFamilyOptions, type ListEmulators, composerSection, createComposerFamily, realOperations, toEngineError };
|
|
19
63
|
//# 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"],"mappings":";;;;;cAKc,iBAAiB,cAAc;;;;;;;;KAQxC,gBAAA;;iBAEY,cAAc,OAAO,gBAAgB"}
|
|
1
|
+
{"version":3,"file":"family.d.mts","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/family.d.mts","../../../1-prisma-cloud/0-lowering/dev-emulators/dist/index.d.mts","../src/family/emulator-list.ts","../src/exports/family.ts"],"mappings":";;;;;cAKc,iBAAiB,cAAc;;;;;;;;KAQxC,gBAAA;;iBAEY,cAAc,OAAO,gBAAgB;;;;;;KC4JjD;UAEK;WACC;WACA,MAAM;;WAEN;;WAEA;WACA,QAAQ,SAAS;;;UAGlB;WACC;WACA;;UAED;WACC,MAAM;WACN;;WAEA;;WAEA,oBAAoB;;WAEpB,OAAO;;UAER;WACC,oBAAoB;;;;KCxLnB,sBAAsB,QAAQ,OAAO,cAAc;;;UCc9C,oCAAoC;;WAE1C,gBAAgB;;;iBAIX,qBAAqB,UAAS,8BAAmC"}
|