@prisma/composer-cli 0.36.0-dev.5 → 0.36.0-dev.7
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 → app-config-CErnR6NK-DnKH4Kqc.mjs} +2 -2
- package/dist/{app-config-CErnR6NK-6QjHJ7q5.mjs.map → app-config-CErnR6NK-DnKH4Kqc.mjs.map} +1 -1
- package/dist/app-configuration-file-CeJvBAti-Dk65W3Az.mjs +140 -0
- package/dist/app-configuration-file-CeJvBAti-Dk65W3Az.mjs.map +1 -0
- package/dist/{dev-current-BurA9uhA-BWYAftn9.mjs → dev-current-D0Kn6Mf4-DaV3DWR6.mjs} +5 -5
- package/dist/{dev-current-BurA9uhA-BWYAftn9.mjs.map → dev-current-D0Kn6Mf4-DaV3DWR6.mjs.map} +1 -1
- package/dist/{dev-environment-name-6eEr5PW8-YyPDRApO.mjs → dev-environment-name-6eEr5PW8-DpdGjmTb.mjs} +2 -2
- package/dist/dev-environment-name-6eEr5PW8-DpdGjmTb.mjs.map +1 -0
- package/dist/{dist-BsONwZNR.mjs → dist-DizJD76s.mjs} +2 -2
- package/dist/{dist-BsONwZNR.mjs.map → dist-DizJD76s.mjs.map} +1 -1
- package/dist/{execute-deploy-destroy-Cww6zOSC-CmOmzLiB.mjs → execute-deploy-destroy-Dh1CQ9X6-XpXuMPxj.mjs} +58 -66
- package/dist/execute-deploy-destroy-Dh1CQ9X6-XpXuMPxj.mjs.map +1 -0
- package/dist/{execute-dev-4KYkqSMh-uh7gnPyS.mjs → execute-dev-Bl-5Q-Av-DK5AoRw1.mjs} +69 -41
- package/dist/{execute-dev-4KYkqSMh-uh7gnPyS.mjs.map → execute-dev-Bl-5Q-Av-DK5AoRw1.mjs.map} +1 -1
- package/dist/{execute-dev-current-Cd4YEUZk-b2L-LwbT.mjs → execute-dev-current-D3USgHJ4-frlaz_BC.mjs} +6 -6
- package/dist/{execute-dev-current-Cd4YEUZk-b2L-LwbT.mjs.map → execute-dev-current-D3USgHJ4-frlaz_BC.mjs.map} +1 -1
- package/dist/family.d.mts +2 -2
- package/dist/family.mjs +8 -6
- package/dist/family.mjs.map +1 -1
- package/dist/{generate-dev-stack-DS6U_JHX-wDTViqdg.mjs → generate-dev-stack-Cag2Bd4s-CQLqIUWA.mjs} +11 -10
- package/dist/generate-dev-stack-Cag2Bd4s-CQLqIUWA.mjs.map +1 -0
- package/dist/{list-deployed-D5TBZvbj.mjs → list-deployed-DV6_IShe.mjs} +4 -4
- package/dist/{list-deployed-D5TBZvbj.mjs.map → list-deployed-DV6_IShe.mjs.map} +1 -1
- package/dist/{family-DACJfaA5-CBuEC2B3.d.mts → redaction-Bf8FvTFH-M5hYsi--.d.mts} +257 -175
- package/dist/redaction-Bf8FvTFH-M5hYsi--.d.mts.map +1 -0
- package/dist/redaction-HnbkSFrK-BjFRb2aC.mjs +534 -0
- package/dist/redaction-HnbkSFrK-BjFRb2aC.mjs.map +1 -0
- package/dist/{run-alchemy-B-Z6i3cD-f0MXFCG8.mjs → run-alchemy-OS_ix5g0-BzkuReFx.mjs} +29 -12
- package/dist/run-alchemy-OS_ix5g0-BzkuReFx.mjs.map +1 -0
- package/dist/testing.d.mts +31 -2
- package/dist/testing.d.mts.map +1 -1
- package/dist/testing.mjs +7 -4
- package/dist/testing.mjs.map +1 -1
- package/dist/{validate-environment-BNZC6W46-DY_7cPQJ.mjs → validate-environment-D_dECxgO-fg8lfCME.mjs} +902 -92
- package/dist/validate-environment-D_dECxgO-fg8lfCME.mjs.map +1 -0
- package/package.json +7 -7
- package/src/exports/testing.ts +3 -2
- package/dist/config-adapters-BA_IeiX0-CiRnz7z8.mjs +0 -590
- package/dist/config-adapters-BA_IeiX0-CiRnz7z8.mjs.map +0 -1
- package/dist/dev-environment-name-6eEr5PW8-YyPDRApO.mjs.map +0 -1
- package/dist/execute-deploy-destroy-Cww6zOSC-CmOmzLiB.mjs.map +0 -1
- package/dist/family-DACJfaA5-CBuEC2B3.d.mts.map +0 -1
- package/dist/generate-dev-stack-DS6U_JHX-wDTViqdg.mjs.map +0 -1
- package/dist/run-alchemy-B-Z6i3cD-f0MXFCG8.mjs.map +0 -1
- package/dist/validate-environment-BNZC6W46-DY_7cPQJ.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
|
|
@@ -188,7 +188,7 @@ declare namespace StandardSchemaV1 {
|
|
|
188
188
|
type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
|
|
189
189
|
}
|
|
190
190
|
//#endregion
|
|
191
|
-
//#region ../../0-framework/1-core/core/dist/graph-types-
|
|
191
|
+
//#region ../../0-framework/1-core/core/dist/graph-types-DRe9UUOp.d.mts
|
|
192
192
|
//#region src/contract.d.ts
|
|
193
193
|
/**
|
|
194
194
|
* A Contract is the declared interface of a service-to-service dependency: a
|
|
@@ -273,16 +273,26 @@ type ValueOrigin<T> = {
|
|
|
273
273
|
readonly kind: 'input';
|
|
274
274
|
/** The address of the module whose input this field is. */
|
|
275
275
|
readonly module: string;
|
|
276
|
-
/** The key path inside that module's input; `[]` is the whole input. */
|
|
276
|
+
/** The key path inside that module's input; `[]` is the whole input, which Load refuses wherever it is passed on. */
|
|
277
277
|
readonly path: readonly string[];
|
|
278
278
|
} | {
|
|
279
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';
|
|
280
290
|
/** How an error names the source, e.g. `envSecret('STRIPE_KEY')`. */
|
|
281
291
|
readonly label: string;
|
|
282
|
-
/** The
|
|
283
|
-
readonly
|
|
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;
|
|
284
294
|
/** The source itself. Not enumerable, so a copy's origin compares equal and the origin holds no cycle. */
|
|
285
|
-
readonly source:
|
|
295
|
+
readonly source: SecretSource;
|
|
286
296
|
};
|
|
287
297
|
/**
|
|
288
298
|
* An opaque stand-in a module body can pass wherever a `T` is accepted
|
|
@@ -307,6 +317,7 @@ interface EnvironmentFacts {
|
|
|
307
317
|
}
|
|
308
318
|
//#endregion
|
|
309
319
|
//#region src/module-input.d.ts
|
|
320
|
+
declare const MODULE_INPUT: unique symbol;
|
|
310
321
|
type PlainObject = {
|
|
311
322
|
readonly [key: string]: unknown;
|
|
312
323
|
};
|
|
@@ -318,8 +329,24 @@ type ModuleInputField<T> = Value<T> & FieldsOf<T>;
|
|
|
318
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;
|
|
319
330
|
type Fields<O, Absent> = { readonly [K in keyof O & string]-?: ModuleInputField<FieldType<O, K> | Absent>; };
|
|
320
331
|
type FieldType<O, K extends keyof O> = Record<never, never> extends Pick<O, K> ? O[K] | undefined : O[K];
|
|
321
|
-
/**
|
|
322
|
-
|
|
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
|
+
};
|
|
323
350
|
//#endregion
|
|
324
351
|
//#region src/node.d.ts
|
|
325
352
|
declare const NODE: unique symbol;
|
|
@@ -340,7 +367,7 @@ interface ProvisionNeed<T = unknown> {
|
|
|
340
367
|
readonly payload: T;
|
|
341
368
|
}
|
|
342
369
|
declare const PARAM_SOURCE: unique symbol;
|
|
343
|
-
/** A param's source: a target-defined payload core forwards but never inspects. It is a value too: known at deploy when it names
|
|
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()`. */
|
|
344
371
|
interface ParamSource<T = unknown> extends Value<unknown> {
|
|
345
372
|
readonly [PARAM_SOURCE]: true;
|
|
346
373
|
/** Target-defined. Core never reads this; the target that authored the source reads it back. */
|
|
@@ -348,32 +375,18 @@ interface ParamSource<T = unknown> extends Value<unknown> {
|
|
|
348
375
|
}
|
|
349
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`. */
|
|
350
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); };
|
|
351
|
-
/** What a value in a service's input binding may stand for: plain data, a `SecretString` at any depth (a forwarded secret field), a pointer (a forwarded wrapped field), and `undefined` (an optional field the binding left out). */
|
|
352
|
-
type InputBindingData = string | number | boolean | null | undefined | SecretString | Pointer<unknown> | readonly InputBindingData[] | {
|
|
353
|
-
readonly [key: string]: InputBindingData;
|
|
354
|
-
};
|
|
355
|
-
/**
|
|
356
|
-
* What `provision(service, { input })` accepts (ADR-0042): a plain object
|
|
357
|
-
* mirroring the service's input schema, whose leaves are literals,
|
|
358
|
-
* `envParam(...)` sources, or `envSecret(...)` sources. Deliberately a
|
|
359
|
-
* best-effort structural type: the framework never introspects a Standard
|
|
360
|
-
* Schema, so the binding's exact shape cannot be derived from it — deploy-time
|
|
361
|
-
* validation of the resolved binding is the real check.
|
|
362
|
-
*/
|
|
363
|
-
type InputBinding = string | number | boolean | null | ParamSource | SecretSource | Value<InputBindingData> | readonly InputBinding[] | {
|
|
364
|
-
readonly [key: string]: InputBinding;
|
|
365
|
-
};
|
|
366
378
|
/**
|
|
367
|
-
* What `provision(
|
|
368
|
-
* expects `T` (its Standard Schema input type): the
|
|
369
|
-
* it, or, for a `SecretString` field, a secret
|
|
370
|
-
*
|
|
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`.
|
|
371
384
|
*/
|
|
372
|
-
type
|
|
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 {
|
|
373
386
|
readonly [key: string]: unknown;
|
|
374
|
-
} ? { readonly [K in keyof T]:
|
|
375
|
-
/**
|
|
376
|
-
type
|
|
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>>>;
|
|
377
390
|
/** Opaque `Contract<any, any>` bound shared by every node/port type that doesn't care which contract. */
|
|
378
391
|
type AnyContract = Contract<any, any>;
|
|
379
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. */
|
|
@@ -413,10 +426,10 @@ interface ResourceNode<C extends AnyContract | undefined = AnyContract, D extend
|
|
|
413
426
|
/** A resource's configuration: plain data and values, nested in objects and arrays. */
|
|
414
427
|
type ResourceProps = {
|
|
415
428
|
readonly [key: string]: ResourcePropsMember;
|
|
416
|
-
};
|
|
417
|
-
type ResourcePropsMember = string | number | boolean | null | Value<PlainData> | readonly ResourcePropsMember[] | {
|
|
429
|
+
} & NotModuleInput;
|
|
430
|
+
type ResourcePropsMember = string | number | boolean | null | Value<PlainData> | readonly ResourcePropsMember[] | ({
|
|
418
431
|
readonly [key: string]: ResourcePropsMember;
|
|
419
|
-
};
|
|
432
|
+
} & NotModuleInput);
|
|
420
433
|
/**
|
|
421
434
|
* A Service: inputs + its own declared params + how it is built. Inspectable,
|
|
422
435
|
* inert until run, and carries NO runtime behavior — an extension's factory
|
|
@@ -474,7 +487,7 @@ interface ModuleNode<D extends Deps = Deps, E extends Expose = Expose, I extends
|
|
|
474
487
|
interface ModuleContext<D extends Deps, I extends StandardSchemaV1 | undefined = StandardSchemaV1 | undefined> {
|
|
475
488
|
/** The module's declared dependencies as wiring values — pass them into provision(). */
|
|
476
489
|
readonly deps: { [K in keyof D]: InputRef<D[K]>; };
|
|
477
|
-
/** The module's input: one value per field, typed from its input schema's output (ADR-0061); `undefined` when it declares none.
|
|
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. */
|
|
478
491
|
readonly input: I extends StandardSchemaV1 ? ModuleInput<I> : undefined;
|
|
479
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. */
|
|
480
493
|
readonly environment: EnvironmentFacts;
|
|
@@ -527,7 +540,7 @@ type ServiceProvisionArgs<D extends Deps, I extends StandardSchemaV1 | undefined
|
|
|
527
540
|
params?: PB;
|
|
528
541
|
}] : [opts: {
|
|
529
542
|
id?: string;
|
|
530
|
-
input:
|
|
543
|
+
input: InputBindingOf<I>;
|
|
531
544
|
params?: PB;
|
|
532
545
|
}] : I extends undefined ? [opts: {
|
|
533
546
|
id?: string;
|
|
@@ -536,7 +549,7 @@ type ServiceProvisionArgs<D extends Deps, I extends StandardSchemaV1 | undefined
|
|
|
536
549
|
}] : [opts: {
|
|
537
550
|
id?: string;
|
|
538
551
|
deps: DepBindings<D>;
|
|
539
|
-
input:
|
|
552
|
+
input: InputBindingOf<I>;
|
|
540
553
|
params?: PB;
|
|
541
554
|
}];
|
|
542
555
|
/**
|
|
@@ -547,11 +560,15 @@ type ModuleProvisionOptions<D extends Deps, I extends StandardSchemaV1 | undefin
|
|
|
547
560
|
id?: string;
|
|
548
561
|
} & ([keyof D] extends [never] ? unknown : {
|
|
549
562
|
deps: DepBindings<D>;
|
|
550
|
-
}) & (
|
|
551
|
-
input:
|
|
563
|
+
}) & (I extends StandardSchemaV1 ? {
|
|
564
|
+
input: InputBindingOf<I>;
|
|
552
565
|
} : unknown);
|
|
553
566
|
/** The options are optional exactly when nothing is required. */
|
|
554
|
-
type ModuleProvisionArgs<D extends Deps, I extends StandardSchemaV1 | undefined> =
|
|
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;
|
|
555
572
|
interface ModuleBuilder {
|
|
556
573
|
/** Provisions an owned resource; its id defaults to the node's `name`. */
|
|
557
574
|
provision<C extends AnyContract | undefined>(resource: ResourceNode<C>, opts?: {
|
|
@@ -561,26 +578,44 @@ interface ModuleBuilder {
|
|
|
561
578
|
} & (C extends AnyContract ? RefPort<C> : Record<never, never>);
|
|
562
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. */
|
|
563
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>;
|
|
564
583
|
/**
|
|
565
|
-
* The service call with `deps
|
|
566
|
-
*
|
|
584
|
+
* The service call with `deps` written out. `ServiceProvisionArgs` above
|
|
585
|
+
* cannot resolve while `D` or `I` is still an unbound type parameter — a
|
|
567
586
|
* generic wrapper like `cron()` provisioning a caller-supplied service — so
|
|
568
|
-
* that call site resolves to this
|
|
587
|
+
* that call site resolves to this overload, or to the next one for a
|
|
588
|
+
* service without an input schema.
|
|
569
589
|
*/
|
|
570
590
|
provision<D extends Deps, P extends Params, E extends Expose, I extends StandardSchemaV1 | undefined>(service: ServiceNode<D, P, E, I>, opts: {
|
|
571
591
|
id?: string;
|
|
572
592
|
deps: DepBindings<D>;
|
|
573
|
-
input
|
|
593
|
+
input: InputBindingOf<I>;
|
|
574
594
|
params?: ParamBindings<P>;
|
|
575
595
|
}): ProvisionedRef<E>;
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
596
|
+
provision<D extends Deps, P extends Params, E extends Expose>(service: ServiceNode<D, P, E, undefined>, opts: {
|
|
597
|
+
id?: string;
|
|
598
|
+
deps: DepBindings<D>;
|
|
599
|
+
input?: never;
|
|
600
|
+
params?: ParamBindings<P>;
|
|
601
|
+
}): ProvisionedRef<E>;
|
|
602
|
+
/** The child-module call with `deps` written out — the same generic-wrapper escape as the two service overloads above. */
|
|
579
603
|
provision<D extends Deps, E extends Expose, I extends StandardSchemaV1 | undefined>(child: ModuleNode<D, E, I>, opts: {
|
|
580
604
|
id?: string;
|
|
581
605
|
deps: DepBindings<D>;
|
|
582
|
-
input
|
|
606
|
+
input: InputBindingOf<I>;
|
|
583
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>>;
|
|
584
619
|
}
|
|
585
620
|
/** Dependency map: name → the slot the service declares. Only declarations are admitted, never a concrete ResourceNode. */
|
|
586
621
|
type Deps = Record<string, DependencyEnd<any, any>>;
|
|
@@ -590,6 +625,24 @@ type Expose = Readonly<Record<string, AnyContract>>;
|
|
|
590
625
|
//#region src/graph-types.d.ts
|
|
591
626
|
/** Path-derived: root-scope children are bare ids ("auth", "db"); a nested module's own children dot-join under its address ("auth.db"). */
|
|
592
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
|
+
}
|
|
593
646
|
interface GraphNode {
|
|
594
647
|
readonly id: NodeId;
|
|
595
648
|
/**
|
|
@@ -645,16 +698,14 @@ interface Edge {
|
|
|
645
698
|
readonly kind: 'input' | 'dependency';
|
|
646
699
|
}
|
|
647
700
|
/**
|
|
648
|
-
*
|
|
649
|
-
*
|
|
650
|
-
* address. Core never walks it beyond usage tracking; the deploy target's
|
|
651
|
-
* 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.
|
|
652
703
|
*/
|
|
653
|
-
interface
|
|
704
|
+
interface InputBindingUse {
|
|
654
705
|
/** The graph address of the service that declares the input schema. */
|
|
655
706
|
readonly serviceAddress: NodeId;
|
|
656
707
|
/** The binding object supplied at provision. */
|
|
657
|
-
readonly binding:
|
|
708
|
+
readonly binding: unknown;
|
|
658
709
|
}
|
|
659
710
|
/**
|
|
660
711
|
* A resolved param binding: a `provision()` call bound a service's param
|
|
@@ -691,14 +742,16 @@ interface Graph {
|
|
|
691
742
|
/** The authored (pre-dereference) edges between boundary ports, in declaration order. */
|
|
692
743
|
readonly authoredEdges: readonly AuthoredEdge[];
|
|
693
744
|
/** Every service input binding a `provision()` call supplied (ADR-0042). */
|
|
694
|
-
readonly inputBindings: readonly
|
|
745
|
+
readonly inputBindings: readonly InputBindingUse[];
|
|
695
746
|
/** Every service param bound at provision — literal or source; unbound params are absent here and fall back to their `default` (see `buildConfig`). */
|
|
696
747
|
readonly params: readonly ParamBinding[];
|
|
697
748
|
/** Every secret source a binding names, once each, in the order Load met them (ADR-0029). */
|
|
698
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;
|
|
699
752
|
}
|
|
700
753
|
//#endregion
|
|
701
|
-
//#region ../../0-framework/1-core/core/dist/app-config-
|
|
754
|
+
//#region ../../0-framework/1-core/core/dist/app-config-Bf_y5R7o.d.mts
|
|
702
755
|
//#region src/container-transport.d.ts
|
|
703
756
|
/**
|
|
704
757
|
* Carries resolved containers from the CLI process into the alchemy process
|
|
@@ -942,8 +995,10 @@ interface LowerOptions {
|
|
|
942
995
|
readonly name: string;
|
|
943
996
|
/** The environment being deployed, as `--environment` gave it. Required by any value over `environment.name`; the generated stack files always pass it. */
|
|
944
997
|
readonly environment?: string;
|
|
945
|
-
/**
|
|
946
|
-
readonly
|
|
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[];
|
|
947
1002
|
readonly bundles: Record<string, Bundle>;
|
|
948
1003
|
/** Alchemy state store for the stack. Defaults to the config's own state layer. */
|
|
949
1004
|
readonly state?: AlchemyStateLayer;
|
|
@@ -1103,8 +1158,10 @@ interface PreflightInput<C = unknown> {
|
|
|
1103
1158
|
readonly container: ContainerInstance | undefined;
|
|
1104
1159
|
/** The environment name. */
|
|
1105
1160
|
readonly environment: string;
|
|
1106
|
-
/** The
|
|
1107
|
-
readonly
|
|
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;
|
|
1108
1165
|
/** What the caller has already authenticated, for the platform calls preflight makes. Absent means the extension falls back to its own credential protocol. */
|
|
1109
1166
|
readonly credentials?: ContainerCredentials<C> | undefined;
|
|
1110
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. */
|
|
@@ -1282,8 +1339,10 @@ interface LocalTargetProvidersInput {
|
|
|
1282
1339
|
readonly container: ContainerInstance | undefined;
|
|
1283
1340
|
/** Absolute path of the environment's dev state directory (`devEnvironmentDir`, under the cwd). */
|
|
1284
1341
|
readonly devDir: string;
|
|
1285
|
-
/** The
|
|
1286
|
-
readonly
|
|
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;
|
|
1287
1346
|
}
|
|
1288
1347
|
interface LocalTargetEmulatorsInput {
|
|
1289
1348
|
/** The loaded application graph — inspected for which node kinds need an emulator. */
|
|
@@ -1323,8 +1382,10 @@ interface LocalTargetAttachment {
|
|
|
1323
1382
|
readonly address: string;
|
|
1324
1383
|
readonly node: ServiceNode;
|
|
1325
1384
|
readonly server: DevServer;
|
|
1326
|
-
/** The
|
|
1327
|
-
readonly
|
|
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;
|
|
1328
1389
|
}): Promise<{
|
|
1329
1390
|
readonly restarted: boolean;
|
|
1330
1391
|
}>;
|
|
@@ -1358,62 +1419,31 @@ interface ConfigAdapterInput {
|
|
|
1358
1419
|
}
|
|
1359
1420
|
/** The values one adapter returns, by name. */
|
|
1360
1421
|
type ConfigValues = Readonly<Record<string, unknown>>;
|
|
1361
|
-
/**
|
|
1362
|
-
* A function in the `config` or `secrets` list of the `composer` section (ADR-0062):
|
|
1363
|
-
* it receives the environment and returns that environment's values. Composer calls it
|
|
1364
|
-
* in the CLI and again in the deploy engine's process, so it must return the same
|
|
1365
|
-
* values for the same environment both times.
|
|
1366
|
-
*/
|
|
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. */
|
|
1367
1423
|
type ConfigAdapter = (input: ConfigAdapterInput) => ConfigValues | Promise<ConfigValues>;
|
|
1368
|
-
/**
|
|
1369
|
-
type
|
|
1370
|
-
/**
|
|
1371
|
-
type
|
|
1372
|
-
/** The
|
|
1373
|
-
|
|
1374
|
-
readonly config: ConfigPool;
|
|
1375
|
-
readonly secrets: SecretsPool;
|
|
1376
|
-
}
|
|
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>>;
|
|
1377
1430
|
/**
|
|
1378
1431
|
* The config file's default export. `extensions` lists every extension the
|
|
1379
1432
|
* app deploys through; `state` is the ONE state store per deploy — explicit,
|
|
1380
1433
|
* platform-agnostic, never defaulted by an extension. `config` and `secrets`
|
|
1381
|
-
* list the adapters the
|
|
1434
|
+
* list the adapters the app configuration and the app secrets come from.
|
|
1382
1435
|
*/
|
|
1383
1436
|
interface PrismaAppConfig {
|
|
1384
1437
|
/** The module whose default export is the app root, relative to `prisma.config.ts`. `--entry` overrides it. */
|
|
1385
1438
|
readonly entry?: string;
|
|
1386
1439
|
readonly extensions: ExtensionDescriptor[];
|
|
1387
1440
|
readonly state: StateDescriptor;
|
|
1388
|
-
/** Where the
|
|
1441
|
+
/** Where the app configuration comes from. Defaults to `[environmentVariables()]`; a list given here replaces the default. */
|
|
1389
1442
|
readonly config?: readonly ConfigAdapter[];
|
|
1390
|
-
/** Where the secrets
|
|
1443
|
+
/** Where the app secrets come from. Defaults to `[environmentVariables()]`; a list given here replaces the default. */
|
|
1391
1444
|
readonly secrets?: readonly ConfigAdapter[];
|
|
1392
1445
|
}
|
|
1393
1446
|
//#endregion
|
|
1394
|
-
//#region ../../0-framework/3-tooling/cli/dist/composer-config-BJrPWlDx.d.mts
|
|
1395
|
-
//#region src/composer-config.d.ts
|
|
1396
|
-
/** Composer's configuration and the `prisma.config.ts` that declares it. */
|
|
1397
|
-
interface ComposerConfigSource {
|
|
1398
|
-
/** The `composer` section: the `composer` property of that file's default export. */
|
|
1399
|
-
readonly value: PrismaAppConfig;
|
|
1400
|
-
/** The declaring `prisma.config.ts`. The deploy's generated stack file imports it. A relative path resolves against the operation's `cwd`. */
|
|
1401
|
-
readonly file: string;
|
|
1402
|
-
}
|
|
1403
|
-
//#endregion
|
|
1404
|
-
//#region ../../0-framework/3-tooling/cli/dist/deployment-summary-Cm4lN6w9.d.mts
|
|
1405
|
-
//#region src/deployment-summary.d.ts
|
|
1406
|
-
/** The serializable projection of DeploymentResult — what CAN cross the process
|
|
1407
|
-
* boundary. Writer (report hook) and reader (deploy operation) share this shape. */
|
|
1408
|
-
interface DeployedNodeSummary {
|
|
1409
|
-
readonly address: string;
|
|
1410
|
-
readonly entities: readonly DeployedEntity[];
|
|
1411
|
-
}
|
|
1412
|
-
interface DeploymentSummary {
|
|
1413
|
-
readonly app: string;
|
|
1414
|
-
readonly nodes: readonly DeployedNodeSummary[];
|
|
1415
|
-
}
|
|
1416
|
-
//#endregion
|
|
1417
1447
|
//#region ../../0-framework/3-tooling/assemble/dist/index.d.mts
|
|
1418
1448
|
//#endregion
|
|
1419
1449
|
//#region src/assemble-services.d.ts
|
|
@@ -1456,7 +1486,16 @@ interface NotOk<F> {
|
|
|
1456
1486
|
*/
|
|
1457
1487
|
type Result$1<T, F> = Ok<T> | NotOk<F>;
|
|
1458
1488
|
//#endregion
|
|
1459
|
-
//#region ../../0-framework/3-tooling/cli/dist/dev-
|
|
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
|
|
1460
1499
|
//#region src/dev/watch.d.ts
|
|
1461
1500
|
interface WatchTarget {
|
|
1462
1501
|
readonly address: string;
|
|
@@ -1502,6 +1541,8 @@ interface AlchemyInvocation {
|
|
|
1502
1541
|
readonly cwd: string;
|
|
1503
1542
|
readonly stage: string;
|
|
1504
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[];
|
|
1505
1546
|
}
|
|
1506
1547
|
/** The command line an invocation becomes, once a binary has been resolved. */
|
|
1507
1548
|
interface AlchemyCommandLine {
|
|
@@ -1524,7 +1565,9 @@ interface AlchemyOutcome {
|
|
|
1524
1565
|
readonly commandLine?: AlchemyCommandLine;
|
|
1525
1566
|
}
|
|
1526
1567
|
/** Starts the converge and resolves when it ends. The CLI supplies one backed
|
|
1527
|
-
* by `ctx.spawn
|
|
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). */
|
|
1528
1571
|
type RunAlchemy = (invocation: AlchemyInvocation) => Promise<AlchemyOutcome>;
|
|
1529
1572
|
//#endregion
|
|
1530
1573
|
//#region src/operations/shared.d.ts
|
|
@@ -1569,69 +1612,6 @@ interface OperationDeps {
|
|
|
1569
1612
|
readonly credentials?: ContainerCredentials | undefined;
|
|
1570
1613
|
}
|
|
1571
1614
|
//#endregion
|
|
1572
|
-
//#region src/operations/deploy.d.ts
|
|
1573
|
-
/** A deploy step. `assemble-service` steps run inside `assemble`, one per service. */
|
|
1574
|
-
type DeployStep = {
|
|
1575
|
-
readonly name: 'prepare' | 'assemble' | 'connect' | 'preflight' | 'apply' | 'record';
|
|
1576
|
-
} | {
|
|
1577
|
-
readonly name: 'assemble-service';
|
|
1578
|
-
readonly address: string;
|
|
1579
|
-
};
|
|
1580
|
-
type DeployEvent = {
|
|
1581
|
-
readonly kind: 'step-started';
|
|
1582
|
-
readonly step: DeployStep;
|
|
1583
|
-
} | {
|
|
1584
|
-
readonly kind: 'step-finished';
|
|
1585
|
-
readonly step: DeployStep;
|
|
1586
|
-
readonly outcome: 'ok' | 'failed';
|
|
1587
|
-
readonly durationMs: number;
|
|
1588
|
-
/** What the step measured, as its build adapter or deploy target reported it. The fields vary by adapter and target. */
|
|
1589
|
-
readonly data?: Readonly<Record<string, string | number>> | undefined;
|
|
1590
|
-
};
|
|
1591
|
-
/** The environment `deploy` targets when none is named. */
|
|
1592
|
-
declare const DEFAULT_DEPLOY_ENVIRONMENT = "production";
|
|
1593
|
-
interface DeployInput {
|
|
1594
|
-
/**
|
|
1595
|
-
* 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.
|
|
1596
|
-
*/
|
|
1597
|
-
readonly config: ComposerConfigSource;
|
|
1598
|
-
/** The entry module, resolved against `cwd`. Overrides the `entry` in `config`; without either the operation fails with `CONFIG.ENTRY_MISSING`. */
|
|
1599
|
-
readonly entry?: string | undefined;
|
|
1600
|
-
/** Override the root node's name (the `--name` flag's slot). */
|
|
1601
|
-
readonly name?: string | undefined;
|
|
1602
|
-
/** The environment to deploy to. Defaults to `production`. */
|
|
1603
|
-
readonly environment?: string | undefined;
|
|
1604
|
-
/** Defaults to process.cwd(); the directory `.prisma-composer/` and `.alchemy` state live under. */
|
|
1605
|
-
readonly cwd?: string | undefined;
|
|
1606
|
-
/**
|
|
1607
|
-
* Where to write the run report — the deploy's outcome as JSON, for a tool
|
|
1608
|
-
* that consumes a deploy rather than watches one. Relative paths resolve
|
|
1609
|
-
* against `cwd`. Absent falls back to `PRISMA_COMPOSER_REPORT_FILE`, and
|
|
1610
|
-
* absent from both writes no report.
|
|
1611
|
-
*/
|
|
1612
|
-
readonly reportPath?: string | undefined;
|
|
1613
|
-
/**
|
|
1614
|
-
* An existing report record this deploy belongs to — the `--build-id` flag's
|
|
1615
|
-
* slot. A CI job that opens the record before invoking Composer passes the
|
|
1616
|
-
* id here, and the target's reporter joins that record instead of creating
|
|
1617
|
-
* one. Absent falls back to whatever the target reads from environment variables.
|
|
1618
|
-
*/
|
|
1619
|
-
readonly reportId?: string | undefined;
|
|
1620
|
-
/** Each step as it starts and finishes, in real time. Rendering is the host's. */
|
|
1621
|
-
readonly onEvent?: ((event: DeployEvent) => void) | undefined;
|
|
1622
|
-
}
|
|
1623
|
-
interface DeploySuccess {
|
|
1624
|
-
/** Parsed from the alchemy child's result file. Undefined when the child
|
|
1625
|
-
* did not write one (injected fake alchemy, or a report-less apply). */
|
|
1626
|
-
readonly summary: DeploymentSummary | undefined;
|
|
1627
|
-
/** How long the whole deploy took, from the call to its result. */
|
|
1628
|
-
readonly durationMs: number;
|
|
1629
|
-
}
|
|
1630
|
-
/** In-package variant threading the injection seam, which the family's
|
|
1631
|
-
* commands and the unit tests use. Deliberately NOT re-exported through `./control` — the seam mirrors
|
|
1632
|
-
* internal types and is not part of the published surface. */
|
|
1633
|
-
declare function deployWithDeps(input: DeployInput, deps: OperationDeps): Promise<Result$1<DeploySuccess, CliStructuredError>>;
|
|
1634
|
-
//#endregion
|
|
1635
1615
|
//#region src/operations/dev.d.ts
|
|
1636
1616
|
type DevEvent =
|
|
1637
1617
|
/** Initial front door + after each successful re-converge. */
|
|
@@ -1737,6 +1717,83 @@ interface DevSession {
|
|
|
1737
1717
|
* internal types and is not part of the published surface. */
|
|
1738
1718
|
declare function devWithDeps(input: DevInput, deps: OperationDeps): Promise<Result$1<DevSession, CliStructuredError>>;
|
|
1739
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
|
|
1740
1797
|
//#region src/operations/dev-current.d.ts
|
|
1741
1798
|
interface DevUrlInput {
|
|
1742
1799
|
/** Composer's configuration: the `composer` section of `prisma.config.ts` and that file. It names the extensions whose local targets recorded the app. */
|
|
@@ -1786,7 +1843,7 @@ declare function devUrl(input: DevUrlInput): Promise<Result$1<DevUrl, CliStructu
|
|
|
1786
1843
|
/** Stops the app's local copy in the environment: its service processes and database servers. Data and ports stay. */
|
|
1787
1844
|
declare function devStop(input: DevStopInput): Promise<Result$1<DevStopped, CliStructuredError>>;
|
|
1788
1845
|
//#endregion
|
|
1789
|
-
//#region ../../0-framework/3-tooling/cli/dist/family-
|
|
1846
|
+
//#region ../../0-framework/3-tooling/cli/dist/family-qagovuqK.d.mts
|
|
1790
1847
|
//#region src/family/family.d.ts
|
|
1791
1848
|
/**
|
|
1792
1849
|
* The control-plane operations the family's handlers call. These are the
|
|
@@ -1812,5 +1869,30 @@ interface CreateComposerFamilyOptions {
|
|
|
1812
1869
|
readonly redirects?: readonly RedirectSpec[] | undefined;
|
|
1813
1870
|
}
|
|
1814
1871
|
//#endregion
|
|
1815
|
-
|
|
1816
|
-
//#
|
|
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
|