@prisma/composer 0.2.0-dev.12 → 0.2.0-dev.14
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-CVyObaOe-PF94uVBK.d.mts → app-config-B-mHQL-a-CPD39ljh.d.mts} +77 -3
- package/dist/app-config-B-mHQL-a-CPD39ljh.d.mts.map +1 -0
- package/dist/app-config-joXc-BKm-CdcXqNMD.mjs +22 -0
- package/dist/app-config-joXc-BKm-CdcXqNMD.mjs.map +1 -0
- package/dist/bin.mjs +2234 -182
- package/dist/bin.mjs.map +1 -1
- package/dist/config-R3ZhVJVt.d.mts +1 -0
- package/dist/config.d.mts +3 -3
- package/dist/config.mjs +2 -9
- package/dist/deploy-H3PKi0ZR-Chgm12Bn.mjs +313 -0
- package/dist/deploy-H3PKi0ZR-Chgm12Bn.mjs.map +1 -0
- package/dist/deploy-R3ZhVJVt.d.mts +1 -0
- package/dist/deploy.d.mts +2 -2
- package/dist/deploy.mjs +1 -311
- package/dist/local-target.d.mts +29 -0
- package/dist/local-target.d.mts.map +1 -0
- package/dist/local-target.mjs +47 -0
- package/dist/local-target.mjs.map +1 -0
- package/dist/nextjs-control.d.mts +3 -3
- package/dist/node-control.d.mts +3 -3
- package/dist/report.d.mts +2 -2
- package/package.json +11 -10
- package/src/exports/local-target.ts +1 -0
- package/dist/app-config-CVyObaOe-PF94uVBK.d.mts.map +0 -1
- package/dist/config-BP2DrIX_.d.mts +0 -1
- package/dist/config.mjs.map +0 -1
- package/dist/deploy-BP2DrIX_.d.mts +0 -1
- package/dist/deploy.mjs.map +0 -1
|
@@ -5,7 +5,7 @@ import { Input, StackServices } from "alchemy";
|
|
|
5
5
|
import * as Effect from "effect/Effect";
|
|
6
6
|
import * as Layer from "effect/Layer";
|
|
7
7
|
import { State } from "alchemy/State/State";
|
|
8
|
-
//#region ../../0-framework/1-core/core/dist/app-config-
|
|
8
|
+
//#region ../../0-framework/1-core/core/dist/app-config-B-mHQL-a.d.mts
|
|
9
9
|
//#region src/container-transport.d.ts
|
|
10
10
|
/**
|
|
11
11
|
* Carries resolved containers from the CLI process into the alchemy process
|
|
@@ -227,6 +227,8 @@ interface LowerOptions {
|
|
|
227
227
|
readonly stage?: string;
|
|
228
228
|
/** Alchemy state store for the stack. Defaults to the config's own state layer. */
|
|
229
229
|
readonly state?: AlchemyStateLayer;
|
|
230
|
+
/** Explicit provider set for the stack. Defaults to the config's own merged `providers()` (`mergedProviders`) — the same override precedence as `state`. The dev stack module passes `localTargetProviders(...)` here (ADR-0041); `lower()` itself learns nothing about the local target. */
|
|
231
|
+
readonly providers?: Layer.Layer<never>;
|
|
230
232
|
/**
|
|
231
233
|
* Invoked once per deploy, during apply, with the Deploy operation's result
|
|
232
234
|
* — the app and every node it deployed, resolved, in topo order.
|
|
@@ -363,6 +365,19 @@ interface ExtensionDescriptor {
|
|
|
363
365
|
* in container-transport.ts.
|
|
364
366
|
*/
|
|
365
367
|
readonly container?: ContainerDescriptor;
|
|
368
|
+
/**
|
|
369
|
+
* The extension's LOCAL TARGET counterpart (ADR-0041; naming, operator
|
|
370
|
+
* 2026-07-23 — "dev" names the user-facing feature only, the seam takes
|
|
371
|
+
* the concept's real noun) — a LAZY reference: an async thunk, never the
|
|
372
|
+
* descriptor object itself. This keeps the production control entry's
|
|
373
|
+
* static import graph free of local-target implementation code (operator
|
|
374
|
+
* directive) — the thunk is one line, dynamically importing the
|
|
375
|
+
* extension's own local-target entry by bare specifier
|
|
376
|
+
* (e.g. `() => import('@prisma/composer-prisma-cloud/local-target').then((m) => m.localTargetDescriptor())`),
|
|
377
|
+
* so nothing local-target-flavored is bundled into, or loaded by, any
|
|
378
|
+
* deploy path.
|
|
379
|
+
*/
|
|
380
|
+
readonly localTarget?: () => Promise<LocalTargetDescriptor>;
|
|
366
381
|
}
|
|
367
382
|
/**
|
|
368
383
|
* The deploy's one state store. It names its owning extension so core knows
|
|
@@ -390,6 +405,65 @@ interface TeardownInput {
|
|
|
390
405
|
/** The stage name (`--stage`), or `undefined` for the default stage — for diagnostics/scope. */
|
|
391
406
|
readonly stage: string | undefined;
|
|
392
407
|
}
|
|
408
|
+
/** The extension's LOCAL TARGET counterpart (ADR-0041) — the local-target variant OF ExtensionDescriptor, hence the full qualifier. An extension without one is not local-target-capable (cannot back the "dev" feature). */
|
|
409
|
+
interface LocalTargetDescriptor {
|
|
410
|
+
/** Local providers for the SAME resource types this extension's lowering emits. Receives the app identity — unlike deploy's env-arg-free `providers()`, local providers are emulator clients and must know which app they provision for. */
|
|
411
|
+
providers(input: LocalTargetProvidersInput): Layer.Layer<never>;
|
|
412
|
+
/** A stable local identity — resolved without any platform call. */
|
|
413
|
+
readonly container: ContainerDescriptor;
|
|
414
|
+
/** Value sourcing (secrets/env-params) — runs where deploy's preflight runs. */
|
|
415
|
+
preflight?(input: PreflightInput): Promise<void>;
|
|
416
|
+
/** Ensure the emulator daemons this topology's node kinds need are running (idempotent; they persist across sessions). */
|
|
417
|
+
emulators?(input: LocalTargetEmulatorsInput): Promise<void>;
|
|
418
|
+
/** The dev session's view of the running app. Core renders it and never learns an emulator's API. */
|
|
419
|
+
attach(input: LocalTargetAttachInput): Promise<LocalTargetAttachment>;
|
|
420
|
+
/** `--fresh`: remove every local trace of the dev instance — emulator instances, state, data. */
|
|
421
|
+
teardown?(input: TeardownInput): Promise<void>;
|
|
422
|
+
}
|
|
423
|
+
interface LocalTargetProvidersInput {
|
|
424
|
+
/** This extension's resolved local-target container (its `input.appName` is the emulator app namespace). */
|
|
425
|
+
readonly container: ContainerInstance | undefined;
|
|
426
|
+
/** Absolute path of the dev state directory (`<cwd>/.prisma-composer/dev`). */
|
|
427
|
+
readonly devDir: string;
|
|
428
|
+
}
|
|
429
|
+
interface LocalTargetEmulatorsInput {
|
|
430
|
+
/** The loaded application graph — inspected for which node kinds need an emulator. */
|
|
431
|
+
readonly graph: Graph;
|
|
432
|
+
readonly container: ContainerInstance | undefined;
|
|
433
|
+
/** Absolute path of the dev state directory (`<cwd>/.prisma-composer/dev`). */
|
|
434
|
+
readonly devDir: string;
|
|
435
|
+
}
|
|
436
|
+
interface LocalTargetAttachInput {
|
|
437
|
+
readonly container: ContainerInstance | undefined;
|
|
438
|
+
readonly devDir: string;
|
|
439
|
+
}
|
|
440
|
+
interface LocalTargetAttachment {
|
|
441
|
+
/** Start every stopped service from its last deployment (the session-resume signal — a no-op converge cannot start anything). */
|
|
442
|
+
startServices(): Promise<void>;
|
|
443
|
+
/** Every service's local endpoint, for the front door. */
|
|
444
|
+
endpoints(): Promise<readonly {
|
|
445
|
+
readonly address: string;
|
|
446
|
+
readonly url: string;
|
|
447
|
+
}[]>;
|
|
448
|
+
/** Merged, line-oriented log stream across the app's services (including services that appear after later converges). Ends when `signal` aborts. */
|
|
449
|
+
logs(signal: AbortSignal): AsyncIterable<{
|
|
450
|
+
readonly service: string;
|
|
451
|
+
readonly line: string;
|
|
452
|
+
}>;
|
|
453
|
+
/** Stop the app's service instances (emulators and data persist). */
|
|
454
|
+
stopServices(): Promise<void>;
|
|
455
|
+
}
|
|
456
|
+
/** `<cwd>/.prisma-composer/dev` — the dev instance's app-scoped state directory (ADR-0041, ADR-0004's tool-state rule). "dev" names the user-facing feature/dir (naming, operator 2026-07-23) — this constant's name and value are unchanged by the localTarget rename. */
|
|
457
|
+
declare const DEV_DIR = ".prisma-composer/dev";
|
|
458
|
+
/**
|
|
459
|
+
* True when an extension only participates in assembly (every `nodes` entry
|
|
460
|
+
* is `kind: 'build'`, and it declares none of `providers`/`application`/
|
|
461
|
+
* `provisions`/`container`) — it owns no resources or services, so it has
|
|
462
|
+
* nothing to emulate and is exempt from local-target-capability requirements
|
|
463
|
+
* (ADR-0041). Shared by `localTargetProviders` and every local-target hook
|
|
464
|
+
* iteration.
|
|
465
|
+
*/
|
|
466
|
+
declare function isBuildOnlyExtension(extension: ExtensionDescriptor): boolean;
|
|
393
467
|
/**
|
|
394
468
|
* What one registry entry can do. The `kind` discriminant is checked at every
|
|
395
469
|
* lookup site against what the site needs — a resource node looked up against
|
|
@@ -415,5 +489,5 @@ interface PrismaAppConfig {
|
|
|
415
489
|
/** Typed identity — exists so `prisma-composer.config.ts` gets checked against PrismaAppConfig where it is written. */
|
|
416
490
|
declare function defineConfig(config: PrismaAppConfig): PrismaAppConfig;
|
|
417
491
|
//#endregion
|
|
418
|
-
export {
|
|
419
|
-
//# sourceMappingURL=app-config-
|
|
492
|
+
export { ProvisionerDescriptor as A, joinDeployment as B, Lowering as C, PreflightInput as D, PackageInput as E, containerEnv as F, lowering as H, containerEnvVarName as I, defineConfig as L, StateDescriptor as M, TeardownInput as N, PrismaAppConfig as O, buildConfig as P, deserializeContainers as R, LoweredResult as S, Outputs as T, mergedProviders as U, lower as V, resolveStateLayer as W, LocalTargetProvidersInput as _, Bundle as a, LowerError as b, DEV_DIR as c, DeploymentResult as d, ExtensionDescriptor as f, LocalTargetEmulatorsInput as g, LocalTargetDescriptor as h, AssembleInput as i, ServiceLowering as j, ProvisionEdge as k, DeployedEntity as l, LocalTargetAttachment as m, ApplicationDescriptor as n, ContainerDescriptor as o, LocalTargetAttachInput as p, Artifact as r, ContainerInstance as s, AlchemyStateLayer as t, DeployedNode as u, LocateContainerInput as v, NodeDescriptor as w, LowerOptions as x, LowerContext as y, isBuildOnlyExtension as z };
|
|
493
|
+
//# sourceMappingURL=app-config-B-mHQL-a-CPD39ljh.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-config-B-mHQL-a-CPD39ljh.d.mts","names":[],"sources":["../../../0-framework/1-core/core/dist/app-config-B-mHQL-a.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;UAmBU;;WAEC;;WAEA;;;;;;;UAOD;WACC,OAAO;;EAEhB;;;;;;;;;;;;UAYQ,oBAAoB,UAAU,oBAAoB;;EAE1D,OAAO,OAAO,uBAAuB,QAAQ;;EAE7C,OAAO,OAAO,uBAAuB,QAAQ;;EAE7C,OAAO,UAAU,IAAI;;EAErB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;WACM;IACP;WACO;IACP;WACO;EACT,SAAS,OAAO,gBAAgB,QAAQ;;;;;;;UAOhC;WACC,YAAY;WACZ,OAAO;;;iBAGD,aAAa,QAAQ,kBAAkB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region ../../0-framework/1-core/core/dist/app-config-joXc-BKm.mjs
|
|
2
|
+
/** `<cwd>/.prisma-composer/dev` — the dev instance's app-scoped state directory (ADR-0041, ADR-0004's tool-state rule). "dev" names the user-facing feature/dir (naming, operator 2026-07-23) — this constant's name and value are unchanged by the localTarget rename. */
|
|
3
|
+
const DEV_DIR = ".prisma-composer/dev";
|
|
4
|
+
/**
|
|
5
|
+
* True when an extension only participates in assembly (every `nodes` entry
|
|
6
|
+
* is `kind: 'build'`, and it declares none of `providers`/`application`/
|
|
7
|
+
* `provisions`/`container`) — it owns no resources or services, so it has
|
|
8
|
+
* nothing to emulate and is exempt from local-target-capability requirements
|
|
9
|
+
* (ADR-0041). Shared by `localTargetProviders` and every local-target hook
|
|
10
|
+
* iteration.
|
|
11
|
+
*/
|
|
12
|
+
function isBuildOnlyExtension(extension) {
|
|
13
|
+
return Object.values(extension.nodes).every((node) => node.kind === "build") && extension.providers === void 0 && extension.application === void 0 && extension.provisions === void 0 && extension.container === void 0;
|
|
14
|
+
}
|
|
15
|
+
/** Typed identity — exists so `prisma-composer.config.ts` gets checked against PrismaAppConfig where it is written. */
|
|
16
|
+
function defineConfig(config) {
|
|
17
|
+
return config;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { defineConfig as n, isBuildOnlyExtension as r, DEV_DIR as t };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=app-config-joXc-BKm-CdcXqNMD.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-config-joXc-BKm-CdcXqNMD.mjs","names":[],"sources":["../../../0-framework/1-core/core/dist/app-config-joXc-BKm.mjs"],"sourcesContent":["//#region src/control/app-config.ts\n/** `<cwd>/.prisma-composer/dev` — the dev instance's app-scoped state directory (ADR-0041, ADR-0004's tool-state rule). \"dev\" names the user-facing feature/dir (naming, operator 2026-07-23) — this constant's name and value are unchanged by the localTarget rename. */\nconst DEV_DIR = \".prisma-composer/dev\";\n/**\n* True when an extension only participates in assembly (every `nodes` entry\n* is `kind: 'build'`, and it declares none of `providers`/`application`/\n* `provisions`/`container`) — it owns no resources or services, so it has\n* nothing to emulate and is exempt from local-target-capability requirements\n* (ADR-0041). Shared by `localTargetProviders` and every local-target hook\n* iteration.\n*/\nfunction isBuildOnlyExtension(extension) {\n\treturn Object.values(extension.nodes).every((node) => node.kind === \"build\") && extension.providers === void 0 && extension.application === void 0 && extension.provisions === void 0 && extension.container === void 0;\n}\n/** Typed identity — exists so `prisma-composer.config.ts` gets checked against PrismaAppConfig where it is written. */\nfunction defineConfig(config) {\n\treturn config;\n}\n//#endregion\nexport { defineConfig as n, isBuildOnlyExtension as r, DEV_DIR as t };\n\n//# sourceMappingURL=app-config-joXc-BKm.mjs.map"],"mappings":";;AAEA,MAAM,UAAU;;;;;;;;;AAShB,SAAS,qBAAqB,WAAW;CACxC,OAAO,OAAO,OAAO,UAAU,KAAK,CAAC,CAAC,OAAO,SAAS,KAAK,SAAS,OAAO,KAAK,UAAU,cAAc,KAAK,KAAK,UAAU,gBAAgB,KAAK,KAAK,UAAU,eAAe,KAAK,KAAK,UAAU,cAAc,KAAK;AACvN;;AAEA,SAAS,aAAa,QAAQ;CAC7B,OAAO;AACR"}
|