@prisma/composer-cli 0.36.0 → 0.37.0

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.
Files changed (47) hide show
  1. package/dist/{app-config-CErnR6NK-6QjHJ7q5.mjs → app-config-CErnR6NK-DnKH4Kqc.mjs} +2 -2
  2. package/dist/{app-config-CErnR6NK-6QjHJ7q5.mjs.map → app-config-CErnR6NK-DnKH4Kqc.mjs.map} +1 -1
  3. package/dist/app-configuration-file-CeJvBAti-Dk65W3Az.mjs +140 -0
  4. package/dist/app-configuration-file-CeJvBAti-Dk65W3Az.mjs.map +1 -0
  5. package/dist/{dev-current-Brb4qugP-BOI9FJdz.mjs → dev-current-D0Kn6Mf4-DaV3DWR6.mjs} +6 -6
  6. package/dist/{dev-current-Brb4qugP-BOI9FJdz.mjs.map → dev-current-D0Kn6Mf4-DaV3DWR6.mjs.map} +1 -1
  7. package/dist/{dev-environment-name-6eEr5PW8-lIZmJjfr.mjs → dev-environment-name-6eEr5PW8-DpdGjmTb.mjs} +3 -3
  8. package/dist/dev-environment-name-6eEr5PW8-DpdGjmTb.mjs.map +1 -0
  9. package/dist/{dist-B9-nLeho.mjs → dist-DizJD76s.mjs} +3 -6
  10. package/dist/{dist-B9-nLeho.mjs.map → dist-DizJD76s.mjs.map} +1 -1
  11. package/dist/{execute-deploy-destroy-CNt-xpE7-CMQCNQpY.mjs → execute-deploy-destroy-Dh1CQ9X6-XpXuMPxj.mjs} +62 -31
  12. package/dist/execute-deploy-destroy-Dh1CQ9X6-XpXuMPxj.mjs.map +1 -0
  13. package/dist/{execute-dev-BUk-XWBJ-DaB9ma8z.mjs → execute-dev-Bl-5Q-Av-DK5AoRw1.mjs} +93 -45
  14. package/dist/{execute-dev-BUk-XWBJ-DaB9ma8z.mjs.map → execute-dev-Bl-5Q-Av-DK5AoRw1.mjs.map} +1 -1
  15. package/dist/{execute-dev-current-BdEqeKAB-xCBBITAB.mjs → execute-dev-current-D3USgHJ4-frlaz_BC.mjs} +7 -7
  16. package/dist/{execute-dev-current-BdEqeKAB-xCBBITAB.mjs.map → execute-dev-current-D3USgHJ4-frlaz_BC.mjs.map} +1 -1
  17. package/dist/family.d.mts +2 -2
  18. package/dist/family.mjs +22 -5
  19. package/dist/family.mjs.map +1 -1
  20. package/dist/{generate-dev-stack-BkkU2HLE-Dek3CkAQ.mjs → generate-dev-stack-Cag2Bd4s-CQLqIUWA.mjs} +11 -5
  21. package/dist/generate-dev-stack-Cag2Bd4s-CQLqIUWA.mjs.map +1 -0
  22. package/dist/{list-deployed-B-N3imFH.mjs → list-deployed-Cj37uZ6w.mjs} +5 -5
  23. package/dist/{list-deployed-B-N3imFH.mjs.map → list-deployed-Cj37uZ6w.mjs.map} +1 -1
  24. package/dist/{family-B2JZ8O7U-P_rOUr4w.d.mts → redaction-Bf8FvTFH-M5hYsi--.d.mts} +368 -184
  25. package/dist/redaction-Bf8FvTFH-M5hYsi--.d.mts.map +1 -0
  26. package/dist/redaction-HnbkSFrK-BjFRb2aC.mjs +534 -0
  27. package/dist/redaction-HnbkSFrK-BjFRb2aC.mjs.map +1 -0
  28. package/dist/result-sR7PBi61.mjs +229 -0
  29. package/dist/result-sR7PBi61.mjs.map +1 -0
  30. package/dist/run-alchemy-OS_ix5g0-BzkuReFx.mjs +236 -0
  31. package/dist/run-alchemy-OS_ix5g0-BzkuReFx.mjs.map +1 -0
  32. package/dist/testing.d.mts +31 -2
  33. package/dist/testing.d.mts.map +1 -1
  34. package/dist/testing.mjs +8 -4
  35. package/dist/testing.mjs.map +1 -1
  36. package/dist/validate-environment-D_dECxgO-fg8lfCME.mjs +2513 -0
  37. package/dist/validate-environment-D_dECxgO-fg8lfCME.mjs.map +1 -0
  38. package/package.json +9 -9
  39. package/src/exports/testing.ts +3 -2
  40. package/dist/dev-environment-name-6eEr5PW8-lIZmJjfr.mjs.map +0 -1
  41. package/dist/execute-deploy-destroy-CNt-xpE7-CMQCNQpY.mjs.map +0 -1
  42. package/dist/family-B2JZ8O7U-P_rOUr4w.d.mts.map +0 -1
  43. package/dist/generate-dev-stack-BkkU2HLE-Dek3CkAQ.mjs.map +0 -1
  44. package/dist/run-alchemy-Dl_MWw4g-DaWV9tkH.mjs +0 -667
  45. package/dist/run-alchemy-Dl_MWw4g-DaWV9tkH.mjs.map +0 -1
  46. package/dist/validate-environment-CEhUSEg2-ExABehBM.mjs +0 -1343
  47. package/dist/validate-environment-CEhUSEg2-ExABehBM.mjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { CommandFamily, RedirectSpec } from "@prisma/cli-engine";
2
- import * as Layer from "effect/Layer";
3
- import * as Effect from "effect/Effect";
4
2
  import { Input, StackServices } from "alchemy";
3
+ import * as Effect from "effect/Effect";
4
+ import * as Layer from "effect/Layer";
5
5
  import { State } from "alchemy/State/State";
6
6
  //#region ../../0-framework/0-foundation/foundation/dist/errors.d.mts
7
7
  //#region src/structured-error.d.ts
@@ -81,6 +81,36 @@ declare class CliStructuredError extends Error implements StructuredError {
81
81
  static is(error: unknown): error is CliStructuredError;
82
82
  }
83
83
  //#endregion
84
+ //#region ../../0-framework/0-foundation/foundation/dist/secret-CHOw4LBU.d.mts
85
+ //#region src/secret.d.ts
86
+ declare const SECRET_BOX: unique symbol;
87
+ declare class SecretBox<T> {
88
+ #private;
89
+ readonly [SECRET_BOX] = true;
90
+ constructor(value: T);
91
+ /** The sole explicit door to the wrapped value. */
92
+ expose(): T;
93
+ toString(): string;
94
+ toJSON(): string;
95
+ valueOf(): string;
96
+ [Symbol.toPrimitive](): string;
97
+ }
98
+ /** The common case: a secret string. */
99
+ type SecretString = SecretBox<string>;
100
+ //#endregion
101
+ //#region ../../0-framework/0-foundation/foundation/dist/pointer-CyQZZugO.d.mts
102
+ //#region src/pointer.d.ts
103
+ declare const POINTER: unique symbol;
104
+ declare const POINTER_TYPE: unique symbol;
105
+ /** Whether the variable a pointer names holds a secret. */
106
+ type PointerKind = 'secret' | 'plain';
107
+ interface PointerWithKind<T, K extends PointerKind> {
108
+ readonly [POINTER]: K;
109
+ readonly [POINTER_TYPE]?: T;
110
+ }
111
+ /** The real value at deploy of a value known only at boot: it names the platform variable that holds the text of a `T`. Its kind is `'secret'` when `T` is a `SecretString` and `'plain'` otherwise. */
112
+ type Pointer<T> = PointerWithKind<T, unknown extends T ? PointerKind : T extends SecretString ? 'secret' : 'plain'>;
113
+ //#endregion
84
114
  //#region ../../../node_modules/@standard-schema/spec/dist/index.d.ts
85
115
  /** The Standard Typed interface. This is a base type extended by other specs. */
86
116
  interface StandardTypedV1<Input = unknown, Output = Input> {
@@ -158,7 +188,7 @@ declare namespace StandardSchemaV1 {
158
188
  type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
159
189
  }
160
190
  //#endregion
161
- //#region ../../0-framework/1-core/core/dist/graph-types-DfsG9Rkg.d.mts
191
+ //#region ../../0-framework/1-core/core/dist/graph-types-DRe9UUOp.d.mts
162
192
  //#region src/contract.d.ts
163
193
  /**
164
194
  * A Contract is the declared interface of a service-to-service dependency: a
@@ -239,18 +269,44 @@ type ValueOrigin<T> = {
239
269
  readonly kind: 'computed';
240
270
  readonly dependencies: readonly Value<unknown>[];
241
271
  readonly compute: (values: readonly unknown[]) => T;
272
+ } | {
273
+ readonly kind: 'input';
274
+ /** The address of the module whose input this field is. */
275
+ readonly module: string;
276
+ /** The key path inside that module's input; `[]` is the whole input, which Load refuses wherever it is passed on. */
277
+ readonly path: readonly string[];
278
+ } | {
279
+ readonly kind: 'source';
280
+ readonly sourceKind: 'param';
281
+ /** How an error names the source, e.g. `envParam('REGION')`. */
282
+ readonly label: string;
283
+ /** The app configuration key whose text at deploy is the real value, as for `envParam()`. `undefined` for a value known only at boot, whose real value is `source`, a pointer. */
284
+ readonly configurationKey: string | undefined;
285
+ /** The source itself. Not enumerable, so a copy's origin compares equal and the origin holds no cycle. */
286
+ readonly source: ParamSource;
287
+ } | {
288
+ readonly kind: 'source';
289
+ readonly sourceKind: 'secret';
290
+ /** How an error names the source, e.g. `envSecret('STRIPE_KEY')`. */
291
+ readonly label: string;
292
+ /** The app secrets key that holds the secret's value, as for `envSecret()`. `undefined` for a secret source built without one. */
293
+ readonly secretsKey: string | undefined;
294
+ /** The source itself. Not enumerable, so a copy's origin compares equal and the origin holds no cycle. */
295
+ readonly source: SecretSource;
242
296
  };
243
297
  /**
244
- * An opaque stand-in a module body can pass wherever a `T` is accepted; its
245
- * real value is known by the end of Load (ADR-0062). `environment.name` is one;
246
- * `resolve()` returns one computed from others.
298
+ * An opaque stand-in a module body can pass wherever a `T` is accepted
299
+ * (ADR-0062). `environment.name` is one; each field of a module's `input` is
300
+ * one; `resolve()` returns one computed from others; a deploy target's source,
301
+ * such as `envParam()` or `envSecret()`, is one too. A deploy-time value's real
302
+ * value is known by the end of Load; a runtime value's real value at deploy is a pointer.
247
303
  */
248
304
  interface Value<T> {
249
305
  readonly [VALUE]: true;
250
306
  readonly [VALUE_TYPE]?: T;
251
307
  readonly [VALUE_ORIGIN]: ValueOrigin<T>;
252
308
  }
253
- /** Plain data: what a `resolve()` function may return, and the only thing a value may stand for in a binding. */
309
+ /** Plain data: what a `resolve()` function may return. */
254
310
  type PlainData = string | number | boolean | null | readonly PlainData[] | {
255
311
  readonly [key: string]: PlainData;
256
312
  };
@@ -260,25 +316,47 @@ interface EnvironmentFacts {
260
316
  readonly name: Value<string>;
261
317
  }
262
318
  //#endregion
319
+ //#region src/module-input.d.ts
320
+ declare const MODULE_INPUT: unique symbol;
321
+ type PlainObject = {
322
+ readonly [key: string]: unknown;
323
+ };
324
+ /**
325
+ * What a module body holds for an input field whose real value has type `T`:
326
+ * a value, plus one `ModuleInputField` per key when `T` is a plain object.
327
+ */
328
+ type ModuleInputField<T> = Value<T> & FieldsOf<T>;
329
+ type FieldsOf<T> = [NonNullable<T>] extends [never] ? unknown : [NonNullable<T>] extends [readonly unknown[]] ? unknown : [NonNullable<T>] extends [PlainObject] ? Fields<NonNullable<T>, undefined extends T ? undefined : never> : unknown;
330
+ type Fields<O, Absent> = { readonly [K in keyof O & string]-?: ModuleInputField<FieldType<O, K> | Absent>; };
331
+ type FieldType<O, K extends keyof O> = Record<never, never> extends Pick<O, K> ? O[K] | undefined : O[K];
332
+ /**
333
+ * The `input` a module body receives for its input schema `S`: a dictionary
334
+ * with one value per field, typed from the schema's output (ADR-0061). It is
335
+ * not itself a value, and no binding accepts it: pass its fields on by name.
336
+ */
337
+ type ModuleInput<S extends StandardSchemaV1> = {
338
+ readonly [MODULE_INPUT]: true;
339
+ } & FieldsOf<StandardSchemaV1.InferOutput<S>>;
340
+ /** The type error an author sees for a module body's whole input passed where a value is accepted. */
341
+ type ModuleInputIsNotAValue = 'the whole input of a module is not a value; pass its fields on by name';
342
+ /**
343
+ * Required of every object a binding accepts, so a module body's whole `input`
344
+ * fits none. Unlike `NotDeployTime`, a message string, it is an object
345
+ * constraint: its property's type is the message.
346
+ */
347
+ type NotModuleInput = {
348
+ readonly [MODULE_INPUT]?: ModuleInputIsNotAValue;
349
+ };
350
+ //#endregion
263
351
  //#region src/node.d.ts
264
352
  declare const NODE: unique symbol;
265
- declare const SECRET_NEED: unique symbol;
266
353
  declare const SECRET_SOURCE: unique symbol;
267
- /** A declared secret input slot — nameless; the root binds it and the topology forwards it in. */
268
- interface SecretNeed {
269
- readonly [SECRET_NEED]: true;
270
- readonly kind: 'secret';
271
- }
272
- /** A module's secret-forwarding slots: name → the need it declares. */
273
- type Secrets = Record<string, SecretNeed>;
274
- /** The wiring value bound to a secret slot: a target-defined payload core forwards but never inspects. A target (e.g. @prisma/composer-prisma-cloud's `envSecret`) builds one via `secretSource()`. */
275
- interface SecretSource<T = unknown> {
354
+ /** A secret's source: a target-defined payload core forwards but never inspects. It is a value too, known only at boot; its real value at deploy is the source itself, a secret pointer. A target (e.g. @prisma/composer-prisma-cloud's `envSecret`) builds one with `secretSource()`. */
355
+ interface SecretSource<T = unknown> extends Value<unknown> {
276
356
  readonly [SECRET_SOURCE]: true;
277
357
  /** Target-defined. Core never reads this; the target that authored the source reads it back. */
278
358
  readonly payload: T;
279
359
  }
280
- /** What `provision(moduleChild, { secrets })` supplies: one source per declared secret slot. */
281
- type SecretBindings<S extends Secrets> = { [K in keyof S]: SecretSource; };
282
360
  declare const PROVISION_NEED: unique symbol;
283
361
  /** A param value the framework mints. Opaque to core: it forwards the payload to the resolved provisioner and never reads it (ADR-0031). */
284
362
  interface ProvisionNeed<T = unknown> {
@@ -289,35 +367,26 @@ interface ProvisionNeed<T = unknown> {
289
367
  readonly payload: T;
290
368
  }
291
369
  declare const PARAM_SOURCE: unique symbol;
292
- declare const PARAM_NEED: unique symbol;
293
- /** The wiring value bound to a param at provision time: a target-defined payload core forwards but never inspects. A target (e.g. @prisma/composer-prisma-cloud's `envParam`) builds one via `paramSource()`. */
294
- interface ParamSource<T = unknown> {
370
+ /** A param's source: a target-defined payload core forwards but never inspects. It is a value too: known at deploy when it names an app configuration key (`envParam`), otherwise known only at boot, with the source itself as its real value: a secret pointer when it is redacted, a plain pointer otherwise. A target builds one with `paramSource()`. */
371
+ interface ParamSource<T = unknown> extends Value<unknown> {
295
372
  readonly [PARAM_SOURCE]: true;
296
373
  /** Target-defined. Core never reads this; the target that authored the source reads it back. */
297
374
  readonly payload: T;
298
375
  }
299
- /** A module's declared param-forwarding slot — nameless, schema-less; the root (or an ancestor module) binds a `ParamSource` and the topology forwards it into a child's real, schema-bearing param. */
300
- interface ParamNeed {
301
- readonly [PARAM_NEED]: true;
302
- readonly kind: 'param';
303
- }
304
- /** A module's param-forwarding slots: name → the need it declares. */
305
- type ParamNeeds = Record<string, ParamNeed>;
306
376
  /** What `provision(service, { params })` accepts per declared param: a literal (schema-validated when config is built) or an opaque `ParamSource`, taking precedence over `param.default`. Every entry is optional — an unbound param falls back to its `default`. */
307
377
  type ParamBindings<P extends Params> = { readonly [K in keyof P]?: StandardSchemaV1.InferOutput<P[K]['schema']> | ParamSource | (StandardSchemaV1.InferOutput<P[K]['schema']> extends PlainData ? Value<StandardSchemaV1.InferOutput<P[K]['schema']>> : never); };
308
- /** What `provision(moduleChild, { params })` accepts per declared `ParamNeed`: a `ParamSource` only — a need carries no schema to validate a literal against. */
309
- type ParamNeedBindings<PN extends ParamNeeds> = { readonly [K in keyof PN]?: ParamSource; };
310
378
  /**
311
- * What `provision(service, { input })` accepts (ADR-0042): a plain object
312
- * mirroring the service's input schema, whose leaves are literals,
313
- * `envParam(...)` sources, or `envSecret(...)` sources. Deliberately a
314
- * best-effort structural type: the framework never introspects a Standard
315
- * Schema, so the binding's exact shape cannot be derived from it — deploy-time
316
- * validation of the resolved binding is the real check.
379
+ * What `provision(node, { input })` accepts, for a module or a service, where
380
+ * the node's input schema expects `T` (its Standard Schema input type): the
381
+ * data, a value standing for it, or, for a `SecretString` field, a secret
382
+ * source. A `SecretString` or a `Pointer` is never written as a literal. An
383
+ * optional key also takes a value that may stand for `undefined`.
317
384
  */
318
- type InputBinding = string | number | boolean | null | ParamSource | SecretSource | Value<PlainData> | readonly InputBinding[] | {
319
- readonly [key: string]: InputBinding;
320
- };
385
+ type InputBinding<T> = Value<T> | (T extends Pointer<unknown> ? never : T extends SecretString ? SecretSource : T extends readonly (infer E)[] ? readonly InputBinding<E>[] : T extends {
386
+ readonly [key: string]: unknown;
387
+ } ? { readonly [K in keyof T]: InputBinding<T[K]> | (Record<never, never> extends Pick<T, K> ? Value<T[K] | undefined> : never); } & NotModuleInput : T);
388
+ /** What `provision()` accepts as the `input` of a node whose input schema is `I`. */
389
+ type InputBindingOf<I extends StandardSchemaV1 | undefined> = InputBinding<StandardSchemaV1.InferInput<NonNullable<I>>>;
321
390
  /** Opaque `Contract<any, any>` bound shared by every node/port type that doesn't care which contract. */
322
391
  type AnyContract = Contract<any, any>;
323
392
  /** How a service's app becomes a runnable artifact — the build descriptor's routing key (`extension`/`type`) plus paths resolved relative to the authoring module. */
@@ -357,10 +426,10 @@ interface ResourceNode<C extends AnyContract | undefined = AnyContract, D extend
357
426
  /** A resource's configuration: plain data and values, nested in objects and arrays. */
358
427
  type ResourceProps = {
359
428
  readonly [key: string]: ResourcePropsMember;
360
- };
361
- type ResourcePropsMember = string | number | boolean | null | Value<PlainData> | readonly ResourcePropsMember[] | {
429
+ } & NotModuleInput;
430
+ type ResourcePropsMember = string | number | boolean | null | Value<PlainData> | readonly ResourcePropsMember[] | ({
362
431
  readonly [key: string]: ResourcePropsMember;
363
- };
432
+ } & NotModuleInput);
364
433
  /**
365
434
  * A Service: inputs + its own declared params + how it is built. Inspectable,
366
435
  * inert until run, and carries NO runtime behavior — an extension's factory
@@ -400,30 +469,26 @@ interface DependencyEnd<C = unknown, Req = unknown> {
400
469
  readonly required: Req | undefined;
401
470
  }
402
471
  /** 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. */
403
- interface ModuleNode<D extends Deps = Deps, E extends Expose = Expose, S extends Secrets = Secrets, PN extends ParamNeeds = ParamNeeds> {
472
+ interface ModuleNode<D extends Deps = Deps, E extends Expose = Expose, I extends StandardSchemaV1 | undefined = StandardSchemaV1 | undefined> {
404
473
  readonly [NODE]: true;
405
474
  readonly kind: 'module';
406
475
  /** Human-readable, given at authoring — logs/diagnostics only. */
407
476
  readonly name: string;
408
477
  readonly deps: D;
409
- /** Declared secret input slots (authored as `secrets`) — forwarded to internals via `ctx.secrets` (ADR-0029). */
410
- readonly secretSlots: S;
411
- /** Declared param-forwarding slots (authored as `params`) — forwarded to internals via `ctx.params`, the same rail secrets ride on. */
412
- readonly paramSlots: PN;
478
+ /** The module's whole incoming configuration as one Standard Schema (authored as `input`, ADR-0061), or `undefined` when it takes none. Load only calls its `~standard.validate`. */
479
+ readonly inputSchema: I;
413
480
  readonly expose: E;
414
- body(ctx: ModuleContext<D, S, PN>): ModuleOutputs<E> | void;
481
+ body(ctx: ModuleContext<D, I>): ModuleOutputs<E> | void;
415
482
  }
416
483
  /**
417
484
  * What a module's body receives: its declared dependencies as forwardable wiring
418
485
  * values, plus `provision` to register the owned services/modules it wires them into.
419
486
  */
420
- interface ModuleContext<D extends Deps, S extends Secrets = Secrets, PN extends ParamNeeds = ParamNeeds> {
487
+ interface ModuleContext<D extends Deps, I extends StandardSchemaV1 | undefined = StandardSchemaV1 | undefined> {
421
488
  /** The module's declared dependencies as wiring values — pass them into provision(). */
422
489
  readonly deps: { [K in keyof D]: InputRef<D[K]>; };
423
- /** The module's declared secret slots as forwardable sources — pass them into a child's `secrets` (ADR-0029). */
424
- readonly secrets: { readonly [K in keyof S]: SecretSource; };
425
- /** The module's declared param-forwarding slots as forwardable sources — pass them into a child's `params`. */
426
- readonly params: { readonly [K in keyof PN]: ParamSource; };
490
+ /** The module's input: a dictionary with one value per field, typed from its input schema's output (ADR-0061); `undefined` when it declares none. It is not itself a value: pass its fields on by name, into a provision() binding or, for a plain field, as a resolve() dependency. A root's input is the app configuration, validated by its schema. */
491
+ readonly input: I extends StandardSchemaV1 ? ModuleInput<I> : undefined;
427
492
  /** The deploy-time facts of the environment, each a value (ADR-0062). List `environment.name` as a `resolve()` dependency. Never environment variables: user code never reads those. */
428
493
  readonly environment: EnvironmentFacts;
429
494
  /** Registers an owned child (service or module) under a stable id. */
@@ -475,7 +540,7 @@ type ServiceProvisionArgs<D extends Deps, I extends StandardSchemaV1 | undefined
475
540
  params?: PB;
476
541
  }] : [opts: {
477
542
  id?: string;
478
- input: InputBinding;
543
+ input: InputBindingOf<I>;
479
544
  params?: PB;
480
545
  }] : I extends undefined ? [opts: {
481
546
  id?: string;
@@ -484,31 +549,26 @@ type ServiceProvisionArgs<D extends Deps, I extends StandardSchemaV1 | undefined
484
549
  }] : [opts: {
485
550
  id?: string;
486
551
  deps: DepBindings<D>;
487
- input: InputBinding;
552
+ input: InputBindingOf<I>;
488
553
  params?: PB;
489
554
  }];
490
555
  /**
491
- * A child-MODULE provision's trailing options: `deps`/`secrets` required
492
- * exactly when the module declares the slots; a declared param-forwarding
493
- * slot may be bound to a `ParamSource`.
556
+ * A child-MODULE provision's trailing options: `deps` and `input` each
557
+ * required exactly when the module declares them.
494
558
  */
495
- type ModuleProvisionArgs<D extends Deps, S extends Secrets, PB> = [keyof D] extends [never] ? [keyof S] extends [never] ? [opts?: {
496
- id?: string;
497
- params?: PB;
498
- }] : [opts: {
499
- id?: string;
500
- secrets: SecretBindings<S>;
501
- params?: PB;
502
- }] : [keyof S] extends [never] ? [opts: {
559
+ type ModuleProvisionOptions<D extends Deps, I extends StandardSchemaV1 | undefined> = {
503
560
  id?: string;
561
+ } & ([keyof D] extends [never] ? unknown : {
504
562
  deps: DepBindings<D>;
505
- params?: PB;
506
- }] : [opts: {
507
- id?: string;
508
- deps: DepBindings<D>;
509
- secrets: SecretBindings<S>;
510
- params?: PB;
511
- }];
563
+ }) & (I extends StandardSchemaV1 ? {
564
+ input: InputBindingOf<I>;
565
+ } : unknown);
566
+ /** The options are optional exactly when nothing is required. */
567
+ type ModuleProvisionArgs<D extends Deps, I extends StandardSchemaV1 | undefined> = I extends StandardSchemaV1 ? [opts: ModuleProvisionOptions<D, I>] : [keyof D] extends [never] ? [opts?: ModuleProvisionOptions<D, I>] : [opts: ModuleProvisionOptions<D, I>];
568
+ /** The options `provision()` takes after a service or module node `N`. */
569
+ type ProvisionArgs<N> = N extends ServiceNode<infer D, infer P, Expose, infer I> ? ServiceProvisionArgs<D, I, ParamBindings<P>> : N extends ModuleNode<infer D, Expose, infer I> ? ModuleProvisionArgs<D, I> : never;
570
+ /** The contracts a service or module node `N` exposes. */
571
+ type ExposeOf<N> = N extends ServiceNode<Deps, Params, infer E, StandardSchemaV1 | undefined> ? E : N extends ModuleNode<Deps, infer E, StandardSchemaV1 | undefined> ? E : never;
512
572
  interface ModuleBuilder {
513
573
  /** Provisions an owned resource; its id defaults to the node's `name`. */
514
574
  provision<C extends AnyContract | undefined>(resource: ResourceNode<C>, opts?: {
@@ -518,27 +578,44 @@ interface ModuleBuilder {
518
578
  } & (C extends AnyContract ? RefPort<C> : Record<never, never>);
519
579
  /** Registers an owned service; its id defaults to the node's `name`; `deps`/`input` are required iff it declares them; a reserved param may be bound (literal or `ParamSource`), overriding its default. */
520
580
  provision<D extends Deps, P extends Params, E extends Expose, I extends StandardSchemaV1 | undefined>(service: ServiceNode<D, P, E, I>, ...args: ServiceProvisionArgs<D, I, ParamBindings<P>>): ProvisionedRef<E>;
581
+ /** Registers an owned child module; its id defaults to the node's `name`; `deps` and `input` are required iff it declares them. */
582
+ provision<D extends Deps, E extends Expose, I extends StandardSchemaV1 | undefined>(child: ModuleNode<D, E, I>, ...args: ModuleProvisionArgs<D, I>): ProvisionedRef<E>;
521
583
  /**
522
- * The service call with `deps`/`input` spelled out. `ServiceProvisionArgs`
523
- * above cannot resolve while `D`/`I` are still unbound type parameters — a
584
+ * The service call with `deps` written out. `ServiceProvisionArgs` above
585
+ * cannot resolve while `D` or `I` is still an unbound type parameter — a
524
586
  * generic wrapper like `cron()` provisioning a caller-supplied service — so
525
- * that call site resolves to this concrete overload instead.
587
+ * that call site resolves to this overload, or to the next one for a
588
+ * service without an input schema.
526
589
  */
527
590
  provision<D extends Deps, P extends Params, E extends Expose, I extends StandardSchemaV1 | undefined>(service: ServiceNode<D, P, E, I>, opts: {
528
591
  id?: string;
529
592
  deps: DepBindings<D>;
530
- input?: InputBinding;
593
+ input: InputBindingOf<I>;
531
594
  params?: ParamBindings<P>;
532
595
  }): ProvisionedRef<E>;
533
- /** Registers an owned child module; its id defaults to the node's `name`; `deps`/`secrets` are required iff it declares them; a declared param-forwarding slot may be bound to a `ParamSource`. */
534
- provision<D extends Deps, E extends Expose, S extends Secrets, PN extends ParamNeeds>(child: ModuleNode<D, E, S, PN>, ...args: ModuleProvisionArgs<D, S, ParamNeedBindings<PN>>): ProvisionedRef<E>;
535
- /** The child-module call with `deps`/`secrets` spelled out — the same generic-wrapper escape as the service overload above. */
536
- provision<D extends Deps, E extends Expose, S extends Secrets, PN extends ParamNeeds>(child: ModuleNode<D, E, S, PN>, opts: {
596
+ provision<D extends Deps, P extends Params, E extends Expose>(service: ServiceNode<D, P, E, undefined>, opts: {
537
597
  id?: string;
538
598
  deps: DepBindings<D>;
539
- secrets?: SecretBindings<S>;
540
- params?: ParamNeedBindings<PN>;
599
+ input?: never;
600
+ params?: ParamBindings<P>;
541
601
  }): ProvisionedRef<E>;
602
+ /** The child-module call with `deps` written out — the same generic-wrapper escape as the two service overloads above. */
603
+ provision<D extends Deps, E extends Expose, I extends StandardSchemaV1 | undefined>(child: ModuleNode<D, E, I>, opts: {
604
+ id?: string;
605
+ deps: DepBindings<D>;
606
+ input: InputBindingOf<I>;
607
+ }): ProvisionedRef<E>;
608
+ provision<D extends Deps, E extends Expose>(child: ModuleNode<D, E, undefined>, opts: {
609
+ id?: string;
610
+ deps: DepBindings<D>;
611
+ input?: never;
612
+ }): ProvisionedRef<E>;
613
+ /**
614
+ * Any service or child module. Declared last, so a call no overload accepts
615
+ * reports this overload's error, which names the binding key that does not
616
+ * fit, or says a module's whole input is not a value.
617
+ */
618
+ provision<N extends ServiceNode | ModuleNode>(node: N, ...args: ProvisionArgs<N>): ProvisionedRef<ExposeOf<N>>;
542
619
  }
543
620
  /** Dependency map: name → the slot the service declares. Only declarations are admitted, never a concrete ResourceNode. */
544
621
  type Deps = Record<string, DependencyEnd<any, any>>;
@@ -548,6 +625,24 @@ type Expose = Readonly<Record<string, AnyContract>>;
548
625
  //#region src/graph-types.d.ts
549
626
  /** Path-derived: root-scope children are bare ids ("auth", "db"); a nested module's own children dot-join under its address ("auth.db"). */
550
627
  type NodeId = string;
628
+ /** One field of the root's input that its body names, with the real value the root's schema produced there. */
629
+ interface RootInputField {
630
+ /** The key path inside the root's input, such as `['smtp', 'host']`. */
631
+ readonly path: readonly string[];
632
+ /** The real value; absent when it is `undefined`. */
633
+ readonly value?: unknown;
634
+ }
635
+ /**
636
+ * What a Load read from the app configuration (ADR-0062). The deploy's and `prisma dev`'s
637
+ * first process writes it to the app configuration file, and their second process Loads with
638
+ * it in place of the app configuration.
639
+ */
640
+ interface AppConfigurationRead {
641
+ /** Each field of the root's input that its body names, as the root's schema produced it. Empty when the root declares no input. */
642
+ readonly rootInput: readonly RootInputField[];
643
+ /** The text the app configuration holds for each configuration key a source reads, such as `envParam('NAME')`'s `NAME`. A key the app configuration does not hold, or holds as `''`, is absent. */
644
+ readonly configurationKeyText: Readonly<Record<string, string>>;
645
+ }
551
646
  interface GraphNode {
552
647
  readonly id: NodeId;
553
648
  /**
@@ -603,16 +698,14 @@ interface Edge {
603
698
  readonly kind: 'input' | 'dependency';
604
699
  }
605
700
  /**
606
- * A service's provision-time input binding (ADR-0042): the plain object a
607
- * `provision(service, { input })` call supplied, recorded at that service's
608
- * address. Core never walks it beyond usage tracking; the deploy target's
609
- * recursive descent classifies its leaves (literals, `envParam`, `envSecret`).
701
+ * The binding a `provision()` call supplied as a service's input (ADR-0042),
702
+ * recorded at the service's address. The deploy target resolves its leaves.
610
703
  */
611
- interface ServiceInputBinding {
704
+ interface InputBindingUse {
612
705
  /** The graph address of the service that declares the input schema. */
613
706
  readonly serviceAddress: NodeId;
614
707
  /** The binding object supplied at provision. */
615
- readonly binding: InputBinding;
708
+ readonly binding: unknown;
616
709
  }
617
710
  /**
618
711
  * A resolved param binding: a `provision()` call bound a service's param
@@ -630,6 +723,15 @@ interface ParamBinding {
630
723
  /** A literal value (schema-validated by `buildConfig`) or an opaque `ParamSource` (the deploy target reads its own payload back) — check with `isParamSource`. Core never inspects a `ParamSource`'s payload. */
631
724
  readonly binding: unknown;
632
725
  }
726
+ /** A secret source a binding in the graph names, wherever it sits (ADR-0029). Deploy preflight checks every one, including one in a module's input that no service receives. */
727
+ interface SecretSourceUse {
728
+ /** The source, as its target built it. Core never reads its payload. */
729
+ readonly source: SecretSource;
730
+ /** A service whose final binding holds it, if one does. Otherwise the module whose input holds it. */
731
+ readonly address: NodeId;
732
+ /** That node's kind. */
733
+ readonly nodeKind: 'service' | 'module' | 'resource';
734
+ }
633
735
  interface Graph {
634
736
  readonly root: GraphNode;
635
737
  /** Root + one per input, topo-ordered (deps first). */
@@ -640,12 +742,16 @@ interface Graph {
640
742
  /** The authored (pre-dereference) edges between boundary ports, in declaration order. */
641
743
  readonly authoredEdges: readonly AuthoredEdge[];
642
744
  /** Every service input binding a `provision()` call supplied (ADR-0042). */
643
- readonly inputBindings: readonly ServiceInputBinding[];
745
+ readonly inputBindings: readonly InputBindingUse[];
644
746
  /** Every service param bound at provision — literal or source; unbound params are absent here and fall back to their `default` (see `buildConfig`). */
645
747
  readonly params: readonly ParamBinding[];
748
+ /** Every secret source a binding names, once each, in the order Load met them (ADR-0029). */
749
+ readonly secretSources: readonly SecretSourceUse[];
750
+ /** What this Load read from the app configuration (ADR-0062). Empty when Load was given none. */
751
+ readonly appConfigurationRead: AppConfigurationRead;
646
752
  }
647
753
  //#endregion
648
- //#region ../../0-framework/1-core/core/dist/app-config-DNnd7Zu-.d.mts
754
+ //#region ../../0-framework/1-core/core/dist/app-config-Bf_y5R7o.d.mts
649
755
  //#region src/container-transport.d.ts
650
756
  /**
651
757
  * Carries resolved containers from the CLI process into the alchemy process
@@ -889,6 +995,10 @@ interface LowerOptions {
889
995
  readonly name: string;
890
996
  /** The environment being deployed, as `--environment` gave it. Required by any value over `environment.name`; the generated stack files always pass it. */
891
997
  readonly environment?: string;
998
+ /** What the first process's Load read from the app configuration (ADR-0062), from the app configuration file. Load takes the root's input and every configuration key's text from it, and the Prisma Cloud serializer reads a service's `envParam()` leaves from its `configurationKeyText`. The generated stack files pass it. */
999
+ readonly appConfigurationRead?: AppConfigurationRead;
1000
+ /** The node addresses of the graph the first process built. When given, lowering refuses a graph whose addresses differ. The generated stack files pass them. */
1001
+ readonly firstProcessNodeAddresses?: readonly string[];
892
1002
  readonly bundles: Record<string, Bundle>;
893
1003
  /** Alchemy state store for the stack. Defaults to the config's own state layer. */
894
1004
  readonly state?: AlchemyStateLayer;
@@ -1048,10 +1158,16 @@ interface PreflightInput<C = unknown> {
1048
1158
  readonly container: ContainerInstance | undefined;
1049
1159
  /** The environment name. */
1050
1160
  readonly environment: string;
1161
+ /** The app configuration the command read for this environment. Preflight fills a missing `envParam()` param's platform variable from it. */
1162
+ readonly configuration: AppConfiguration;
1163
+ /** The app secrets the command read for this environment. Preflight fills a missing `envSecret()` platform variable from it. */
1164
+ readonly secrets: AppSecrets;
1051
1165
  /** What the caller has already authenticated, for the platform calls preflight makes. Absent means the extension falls back to its own credential protocol. */
1052
1166
  readonly credentials?: ContainerCredentials<C> | undefined;
1053
1167
  /** 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. */
1054
1168
  readonly report?: ((counts: Readonly<Record<string, number>>) => void) | undefined;
1169
+ /** Shows the user a warning that does not stop the run. Only `prisma dev` passes it and shows the warnings; deploy passes none. */
1170
+ readonly warn?: ((message: string) => void) | undefined;
1055
1171
  }
1056
1172
  /** The resolved destroy context handed to an extension's `teardown` hook. */
1057
1173
  interface TeardownInput {
@@ -1223,6 +1339,10 @@ interface LocalTargetProvidersInput {
1223
1339
  readonly container: ContainerInstance | undefined;
1224
1340
  /** Absolute path of the environment's dev state directory (`devEnvironmentDir`, under the cwd). */
1225
1341
  readonly devDir: string;
1342
+ /** The text of each configuration key the graph reads, from the app configuration file. A local deployment takes the text its param rows point at from it. */
1343
+ readonly configurationKeyText: Readonly<Record<string, string>>;
1344
+ /** The app secrets the graph's `envSecret()`s name, which the first process handed the second. A local deployment takes the text its `$secret` pointers name from it. */
1345
+ readonly namedSecrets: NamedSecrets;
1226
1346
  }
1227
1347
  interface LocalTargetEmulatorsInput {
1228
1348
  /** The loaded application graph — inspected for which node kinds need an emulator. */
@@ -1262,6 +1382,10 @@ interface LocalTargetAttachment {
1262
1382
  readonly address: string;
1263
1383
  readonly node: ServiceNode;
1264
1384
  readonly server: DevServer;
1385
+ /** The app configuration the command read for this environment. */
1386
+ readonly configuration: AppConfiguration;
1387
+ /** The app secrets the command read for this environment. */
1388
+ readonly secrets: AppSecrets;
1265
1389
  }): Promise<{
1266
1390
  readonly restarted: boolean;
1267
1391
  }>;
@@ -1286,39 +1410,38 @@ type NodeDescriptor = ({
1286
1410
  */
1287
1411
  serve?(input: ServeInput): Promise<DevServer | undefined>;
1288
1412
  };
1413
+ /** What a config adapter receives (ADR-0062). */
1414
+ interface ConfigAdapterInput {
1415
+ /** The environment's name, as `--environment` gave it. */
1416
+ readonly environment: string;
1417
+ /** The absolute directory of the prisma.config.ts that declares the `composer` section. A file adapter reads its files relative to it (ADR-0004). */
1418
+ readonly configDirectory: string;
1419
+ }
1420
+ /** The values one adapter returns, by name. */
1421
+ type ConfigValues = Readonly<Record<string, unknown>>;
1422
+ /** A function in the `config` or `secrets` list of the `composer` section (ADR-0062): it receives the environment and returns that environment's values. Only the command's first process calls it; the second process reads what the first read from the app configuration file. */
1423
+ type ConfigAdapter = (input: ConfigAdapterInput) => ConfigValues | Promise<ConfigValues>;
1424
+ /** The app configuration (ADR-0062): what the `config` adapters return, merged by top-level key, a later adapter winning. It is the root's input, and what `envParam()` reads. */
1425
+ type AppConfiguration = Readonly<Record<string, unknown>>;
1426
+ /** The app secrets (ADR-0062): what the `secrets` adapters return, merged the same way. Every value is text. Preflight fills a missing `envSecret()` platform variable from it, and `prisma dev` hands its second process the values the graph's `envSecret()`s name. Composer redacts the values the graph's `envSecret()`s name wherever it prints. */
1427
+ type AppSecrets = Readonly<Record<string, string>>;
1428
+ /** The app secrets an `envSecret()` in the graph names, each with text. `prisma dev`'s first process hands them to its second process in `PRISMA_COMPOSER_NAMED_SECRETS`. */
1429
+ type NamedSecrets = Readonly<Record<string, string>>;
1289
1430
  /**
1290
1431
  * The config file's default export. `extensions` lists every extension the
1291
1432
  * app deploys through; `state` is the ONE state store per deploy — explicit,
1292
- * platform-agnostic, never defaulted by an extension.
1433
+ * platform-agnostic, never defaulted by an extension. `config` and `secrets`
1434
+ * list the adapters the app configuration and the app secrets come from.
1293
1435
  */
1294
1436
  interface PrismaAppConfig {
1295
1437
  /** The module whose default export is the app root, relative to `prisma.config.ts`. `--entry` overrides it. */
1296
1438
  readonly entry?: string;
1297
1439
  readonly extensions: ExtensionDescriptor[];
1298
1440
  readonly state: StateDescriptor;
1299
- }
1300
- //#endregion
1301
- //#region ../../0-framework/3-tooling/cli/dist/composer-config-BJrPWlDx.d.mts
1302
- //#region src/composer-config.d.ts
1303
- /** Composer's configuration and the `prisma.config.ts` that declares it. */
1304
- interface ComposerConfigSource {
1305
- /** The `composer` section: the `composer` property of that file's default export. */
1306
- readonly value: PrismaAppConfig;
1307
- /** The declaring `prisma.config.ts`. The deploy's generated stack file imports it. A relative path resolves against the operation's `cwd`. */
1308
- readonly file: string;
1309
- }
1310
- //#endregion
1311
- //#region ../../0-framework/3-tooling/cli/dist/deployment-summary-p88NV5m5.d.mts
1312
- //#region src/deployment-summary.d.ts
1313
- /** The serializable projection of DeploymentResult — what CAN cross the process
1314
- * boundary. Writer (report hook) and reader (deploy operation) share this shape. */
1315
- interface DeployedNodeSummary {
1316
- readonly address: string;
1317
- readonly entities: readonly DeployedEntity[];
1318
- }
1319
- interface DeploymentSummary {
1320
- readonly app: string;
1321
- readonly nodes: readonly DeployedNodeSummary[];
1441
+ /** Where the app configuration comes from. Defaults to `[environmentVariables()]`; a list given here replaces the default. */
1442
+ readonly config?: readonly ConfigAdapter[];
1443
+ /** Where the app secrets come from. Defaults to `[environmentVariables()]`; a list given here replaces the default. */
1444
+ readonly secrets?: readonly ConfigAdapter[];
1322
1445
  }
1323
1446
  //#endregion
1324
1447
  //#region ../../0-framework/3-tooling/assemble/dist/index.d.mts
@@ -1363,7 +1486,16 @@ interface NotOk<F> {
1363
1486
  */
1364
1487
  type Result$1<T, F> = Ok<T> | NotOk<F>;
1365
1488
  //#endregion
1366
- //#region ../../0-framework/3-tooling/cli/dist/dev-current-CcIkmpk0.d.mts
1489
+ //#region ../../0-framework/3-tooling/cli/dist/dev-Df-kx6UV.d.mts
1490
+ //#region src/composer-config.d.ts
1491
+ /** Composer's configuration and the `prisma.config.ts` that declares it. */
1492
+ interface ComposerConfigSource {
1493
+ /** The `composer` section: the `composer` property of that file's default export. */
1494
+ readonly value: PrismaAppConfig;
1495
+ /** The declaring `prisma.config.ts`. The deploy's generated stack file imports it. A relative path resolves against the operation's `cwd`. */
1496
+ readonly file: string;
1497
+ }
1498
+ //#endregion
1367
1499
  //#region src/dev/watch.d.ts
1368
1500
  interface WatchTarget {
1369
1501
  readonly address: string;
@@ -1409,6 +1541,8 @@ interface AlchemyInvocation {
1409
1541
  readonly cwd: string;
1410
1542
  readonly stage: string;
1411
1543
  readonly env: Readonly<Record<string, string | undefined>>;
1544
+ /** The known secrets and the credential-looking values, for `spawnAlchemy`'s stream redactor; the CLI's runner ignores them. Never in `env` or on the command line, which the engine may log. */
1545
+ readonly redactedValues: readonly string[];
1412
1546
  }
1413
1547
  /** The command line an invocation becomes, once a binary has been resolved. */
1414
1548
  interface AlchemyCommandLine {
@@ -1431,7 +1565,9 @@ interface AlchemyOutcome {
1431
1565
  readonly commandLine?: AlchemyCommandLine;
1432
1566
  }
1433
1567
  /** Starts the converge and resolves when it ends. The CLI supplies one backed
1434
- * by `ctx.spawn`; hosts get `spawnAlchemy`. */
1568
+ * by `ctx.spawn`, which gives the child the terminal and does not redact its
1569
+ * output; hosts get `spawnAlchemy`, which pipes the output through the stream
1570
+ * redactor (ADR-0062). */
1435
1571
  type RunAlchemy = (invocation: AlchemyInvocation) => Promise<AlchemyOutcome>;
1436
1572
  //#endregion
1437
1573
  //#region src/operations/shared.d.ts
@@ -1476,69 +1612,6 @@ interface OperationDeps {
1476
1612
  readonly credentials?: ContainerCredentials | undefined;
1477
1613
  }
1478
1614
  //#endregion
1479
- //#region src/operations/deploy.d.ts
1480
- /** A deploy step. `assemble-service` steps run inside `assemble`, one per service. */
1481
- type DeployStep = {
1482
- readonly name: 'prepare' | 'assemble' | 'connect' | 'preflight' | 'apply' | 'record';
1483
- } | {
1484
- readonly name: 'assemble-service';
1485
- readonly address: string;
1486
- };
1487
- type DeployEvent = {
1488
- readonly kind: 'step-started';
1489
- readonly step: DeployStep;
1490
- } | {
1491
- readonly kind: 'step-finished';
1492
- readonly step: DeployStep;
1493
- readonly outcome: 'ok' | 'failed';
1494
- readonly durationMs: number;
1495
- /** What the step measured, as its build adapter or deploy target reported it. The fields vary by adapter and target. */
1496
- readonly data?: Readonly<Record<string, string | number>> | undefined;
1497
- };
1498
- /** The environment `deploy` targets when none is named. */
1499
- declare const DEFAULT_DEPLOY_ENVIRONMENT = "production";
1500
- interface DeployInput {
1501
- /**
1502
- * 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.
1503
- */
1504
- readonly config: ComposerConfigSource;
1505
- /** The entry module, resolved against `cwd`. Overrides the `entry` in `config`; without either the operation fails with `CONFIG.ENTRY_MISSING`. */
1506
- readonly entry?: string | undefined;
1507
- /** Override the root node's name (the `--name` flag's slot). */
1508
- readonly name?: string | undefined;
1509
- /** The environment to deploy to. Defaults to `production`. */
1510
- readonly environment?: string | undefined;
1511
- /** Defaults to process.cwd(); the directory `.prisma-composer/` and `.alchemy` state live under. */
1512
- readonly cwd?: string | undefined;
1513
- /**
1514
- * Where to write the run report — the deploy's outcome as JSON, for a tool
1515
- * that consumes a deploy rather than watches one. Relative paths resolve
1516
- * against `cwd`. Absent falls back to `PRISMA_COMPOSER_REPORT_FILE`, and
1517
- * absent from both writes no report.
1518
- */
1519
- readonly reportPath?: string | undefined;
1520
- /**
1521
- * An existing report record this deploy belongs to — the `--build-id` flag's
1522
- * slot. A CI job that opens the record before invoking Composer passes the
1523
- * id here, and the target's reporter joins that record instead of creating
1524
- * one. Absent falls back to whatever the target reads from environment variables.
1525
- */
1526
- readonly reportId?: string | undefined;
1527
- /** Each step as it starts and finishes, in real time. Rendering is the host's. */
1528
- readonly onEvent?: ((event: DeployEvent) => void) | undefined;
1529
- }
1530
- interface DeploySuccess {
1531
- /** Parsed from the alchemy child's result file. Undefined when the child
1532
- * did not write one (injected fake alchemy, or a report-less apply). */
1533
- readonly summary: DeploymentSummary | undefined;
1534
- /** How long the whole deploy took, from the call to its result. */
1535
- readonly durationMs: number;
1536
- }
1537
- /** In-package variant threading the injection seam, which the family's
1538
- * commands and the unit tests use. Deliberately NOT re-exported through `./control` — the seam mirrors
1539
- * internal types and is not part of the published surface. */
1540
- declare function deployWithDeps(input: DeployInput, deps: OperationDeps): Promise<Result$1<DeploySuccess, CliStructuredError>>;
1541
- //#endregion
1542
1615
  //#region src/operations/dev.d.ts
1543
1616
  type DevEvent =
1544
1617
  /** Initial front door + after each successful re-converge. */
@@ -1548,6 +1621,11 @@ type DevEvent =
1548
1621
  } | {
1549
1622
  readonly kind: 'unwatchable';
1550
1623
  readonly address: string;
1624
+ } |
1625
+ /** A target's preflight warned about the graph; the session still starts. */
1626
+ {
1627
+ readonly kind: 'target-warning';
1628
+ readonly message: string;
1551
1629
  } | {
1552
1630
  readonly kind: 'rebuild-failed';
1553
1631
  readonly message: string;
@@ -1562,6 +1640,10 @@ type DevEvent =
1562
1640
  readonly kind: 'config-changed';
1563
1641
  readonly file: string;
1564
1642
  } |
1643
+ /** What the `config` or `secrets` adapters return changed since the session started. The session keeps the values it started with and stops rebuilding until it is restarted. */
1644
+ {
1645
+ readonly kind: 'values-changed';
1646
+ } |
1565
1647
  /** The app keeps running, still watching. */
1566
1648
  {
1567
1649
  readonly kind: 'converge-failed';
@@ -1635,6 +1717,83 @@ interface DevSession {
1635
1717
  * internal types and is not part of the published surface. */
1636
1718
  declare function devWithDeps(input: DevInput, deps: OperationDeps): Promise<Result$1<DevSession, CliStructuredError>>;
1637
1719
  //#endregion
1720
+ //#region ../../0-framework/3-tooling/cli/dist/deployment-summary-p88NV5m5.d.mts
1721
+ //#region src/deployment-summary.d.ts
1722
+ /** The serializable projection of DeploymentResult — what CAN cross the process
1723
+ * boundary. Writer (report hook) and reader (deploy operation) share this shape. */
1724
+ interface DeployedNodeSummary {
1725
+ readonly address: string;
1726
+ readonly entities: readonly DeployedEntity[];
1727
+ }
1728
+ interface DeploymentSummary {
1729
+ readonly app: string;
1730
+ readonly nodes: readonly DeployedNodeSummary[];
1731
+ }
1732
+ //#endregion
1733
+ //#region ../../0-framework/3-tooling/cli/dist/dev-current-BPnQtqnQ.d.mts
1734
+ //#region src/operations/deploy.d.ts
1735
+ /** A deploy step. `assemble-service` steps run inside `assemble`, one per service. */
1736
+ type DeployStep = {
1737
+ readonly name: 'prepare' | 'assemble' | 'connect' | 'preflight' | 'apply' | 'record';
1738
+ } | {
1739
+ readonly name: 'assemble-service';
1740
+ readonly address: string;
1741
+ };
1742
+ type DeployEvent = {
1743
+ readonly kind: 'step-started';
1744
+ readonly step: DeployStep;
1745
+ } | {
1746
+ readonly kind: 'step-finished';
1747
+ readonly step: DeployStep;
1748
+ readonly outcome: 'ok' | 'failed';
1749
+ readonly durationMs: number;
1750
+ /** What the step measured, as its build adapter or deploy target reported it. The fields vary by adapter and target. */
1751
+ readonly data?: Readonly<Record<string, string | number>> | undefined;
1752
+ };
1753
+ /** The environment `deploy` targets when none is named. */
1754
+ declare const DEFAULT_DEPLOY_ENVIRONMENT = "production";
1755
+ interface DeployInput {
1756
+ /**
1757
+ * 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.
1758
+ */
1759
+ readonly config: ComposerConfigSource;
1760
+ /** The entry module, resolved against `cwd`. Overrides the `entry` in `config`; without either the operation fails with `CONFIG.ENTRY_MISSING`. */
1761
+ readonly entry?: string | undefined;
1762
+ /** Override the root node's name (the `--name` flag's slot). */
1763
+ readonly name?: string | undefined;
1764
+ /** The environment to deploy to. Defaults to `production`. */
1765
+ readonly environment?: string | undefined;
1766
+ /** Defaults to process.cwd(); the directory `.prisma-composer/` and `.alchemy` state live under. */
1767
+ readonly cwd?: string | undefined;
1768
+ /**
1769
+ * Where to write the run report — the deploy's outcome as JSON, for a tool
1770
+ * that consumes a deploy rather than watches one. Relative paths resolve
1771
+ * against `cwd`. Absent falls back to `PRISMA_COMPOSER_REPORT_FILE`, and
1772
+ * absent from both writes no report.
1773
+ */
1774
+ readonly reportPath?: string | undefined;
1775
+ /**
1776
+ * An existing report record this deploy belongs to — the `--build-id` flag's
1777
+ * slot. A CI job that opens the record before invoking Composer passes the
1778
+ * id here, and the target's reporter joins that record instead of creating
1779
+ * one. Absent falls back to whatever the target reads from environment variables.
1780
+ */
1781
+ readonly reportId?: string | undefined;
1782
+ /** Each step as it starts and finishes, in real time. Rendering is the host's. */
1783
+ readonly onEvent?: ((event: DeployEvent) => void) | undefined;
1784
+ }
1785
+ interface DeploySuccess {
1786
+ /** Parsed from the alchemy child's result file. Undefined when the child
1787
+ * did not write one (injected fake alchemy, or a report-less apply). */
1788
+ readonly summary: DeploymentSummary | undefined;
1789
+ /** How long the whole deploy took, from the call to its result. */
1790
+ readonly durationMs: number;
1791
+ }
1792
+ /** In-package variant threading the injection seam, which the family's
1793
+ * commands and the unit tests use. Deliberately NOT re-exported through `./control` — the seam mirrors
1794
+ * internal types and is not part of the published surface. */
1795
+ declare function deployWithDeps(input: DeployInput, deps: OperationDeps): Promise<Result$1<DeploySuccess, CliStructuredError>>;
1796
+ //#endregion
1638
1797
  //#region src/operations/dev-current.d.ts
1639
1798
  interface DevUrlInput {
1640
1799
  /** Composer's configuration: the `composer` section of `prisma.config.ts` and that file. It names the extensions whose local targets recorded the app. */
@@ -1684,7 +1843,7 @@ declare function devUrl(input: DevUrlInput): Promise<Result$1<DevUrl, CliStructu
1684
1843
  /** Stops the app's local copy in the environment: its service processes and database servers. Data and ports stay. */
1685
1844
  declare function devStop(input: DevStopInput): Promise<Result$1<DevStopped, CliStructuredError>>;
1686
1845
  //#endregion
1687
- //#region ../../0-framework/3-tooling/cli/dist/family-B2JZ8O7U.d.mts
1846
+ //#region ../../0-framework/3-tooling/cli/dist/family-qagovuqK.d.mts
1688
1847
  //#region src/family/family.d.ts
1689
1848
  /**
1690
1849
  * The control-plane operations the family's handlers call. These are the
@@ -1710,5 +1869,30 @@ interface CreateComposerFamilyOptions {
1710
1869
  readonly redirects?: readonly RedirectSpec[] | undefined;
1711
1870
  }
1712
1871
  //#endregion
1713
- 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 };
1714
- //# sourceMappingURL=family-B2JZ8O7U-P_rOUr4w.d.mts.map
1872
+ //#region ../../0-framework/3-tooling/cli/dist/redaction-Bf8FvTFH.d.mts
1873
+ //#region src/redaction.d.ts
1874
+ /** A value under a secrets key, with that key. */
1875
+ interface KnownSecret {
1876
+ readonly name: string;
1877
+ readonly value: string;
1878
+ }
1879
+ /**
1880
+ * The known secrets of one command: the values under the secrets keys the graph names, in the app
1881
+ * secrets and the app configuration (ADR-0062). The app configuration file must not hold any of them.
1882
+ */
1883
+ declare class KnownSecrets {
1884
+ #private;
1885
+ constructor(secrets?: Iterable<KnownSecret>);
1886
+ /** Adds each secret whose value is not empty. A value already known keeps its first name. */
1887
+ add(secrets: Iterable<KnownSecret>): void;
1888
+ values(): ReadonlySet<string>;
1889
+ /**
1890
+ * The name of a known secret `text` holds, or undefined. A secret of
1891
+ * `MIN_SECRET_LENGTH_INSIDE_A_VALUE` characters or more is found anywhere in `text`; a shorter
1892
+ * one only when it is all of `text`.
1893
+ */
1894
+ nameIn(text: string): string | undefined;
1895
+ }
1896
+ //#endregion
1897
+ export { CliStructuredError as C, AppConfigurationRead as S, OperationDeps as _, DEFAULT_DEPLOY_ENVIRONMENT as a, AssembledServices as b, DeploySuccess as c, DevUrl as d, DevUrlInput as f, DevSession as g, DevInput as h, realOperations as i, DevStopInput as l, DevEvent as m, ComposerOperations as n, DeployEvent as o, ComposerConfigSource as p, CreateComposerFamilyOptions as r, DeployInput as s, KnownSecrets as t, DevStopped as u, ServiceEndpoint as v, AppSecrets as x, Result$1 as y };
1898
+ //# sourceMappingURL=redaction-Bf8FvTFH-M5hYsi--.d.mts.map