@prisma/composer 0.2.0 → 0.3.0-dev.1
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-DJdU4ubR-BwioNK8j.d.mts → app-config-Dw3r7sUa-D3dr8rg2.d.mts} +89 -5
- package/dist/app-config-Dw3r7sUa-D3dr8rg2.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/assertions.d.mts.map +1 -0
- package/dist/bin.mjs +2396 -182
- package/dist/bin.mjs.map +1 -1
- package/dist/casts.d.mts.map +1 -0
- package/dist/config-121C4hAb.d.mts +1 -0
- package/dist/config.d.mts +3 -3
- package/dist/config.mjs +2 -9
- package/dist/deploy-121C4hAb.d.mts +1 -0
- package/dist/deploy-H3PKi0ZR-Chgm12Bn.mjs +313 -0
- package/dist/deploy-H3PKi0ZR-Chgm12Bn.mjs.map +1 -0
- package/dist/deploy.d.mts +2 -2
- package/dist/deploy.mjs +1 -311
- package/dist/{dist-B0axxnBf.mjs → dist-BkSJOwTm.mjs} +2 -2
- package/dist/{dist-B0axxnBf.mjs.map → dist-BkSJOwTm.mjs.map} +1 -1
- package/dist/{graph-BmrUEdo9-6Oq1hSmS.mjs → graph-CP16cJyH-D5IW87Y-.mjs} +18 -14
- package/dist/graph-CP16cJyH-D5IW87Y-.mjs.map +1 -0
- package/dist/{graph-B7NcPiOr-aSUOCGTH.d.mts → graph-DUSgjmzA-DhtkTqoz.d.mts} +3 -3
- package/dist/graph-DUSgjmzA-DhtkTqoz.d.mts.map +1 -0
- package/dist/{graph-types-BgT9UEdm-Bz-_OcJH.d.mts → graph-types-BcbVhojU-C3fhxjPK.d.mts} +3 -3
- package/dist/graph-types-BcbVhojU-C3fhxjPK.d.mts.map +1 -0
- package/dist/{index-B2DJ5CN4.d.mts → index-BFBNz7Aw.d.mts} +3 -3
- package/dist/index-BFBNz7Aw.d.mts.map +1 -0
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +2 -2
- 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-DLyeRR7M-B9ukbB2L.d.mts → nextjs-DLyeRR7M-DwnBjryZ.d.mts} +3 -3
- package/dist/nextjs-DLyeRR7M-DwnBjryZ.d.mts.map +1 -0
- package/dist/nextjs-control.d.mts +4 -4
- package/dist/nextjs-control.d.mts.map +1 -0
- package/dist/nextjs-control.mjs +2 -1
- package/dist/nextjs-control.mjs.map +1 -1
- package/dist/nextjs.d.mts +1 -1
- package/dist/node-control.d.mts +3 -3
- package/dist/node-control.d.mts.map +1 -0
- package/dist/node-control.mjs +44 -25
- package/dist/node-control.mjs.map +1 -1
- package/dist/node.d.mts +2 -2
- package/dist/node.d.mts.map +1 -0
- package/dist/report.d.mts +2 -2
- package/dist/report.d.mts.map +1 -0
- package/dist/service-rpc.d.mts +2 -2
- package/dist/service-rpc.d.mts.map +1 -0
- package/dist/service-rpc.mjs +2 -2
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.mts.map +1 -0
- package/package.json +13 -11
- package/src/exports/assertions.ts +1 -0
- package/src/exports/casts.ts +1 -0
- package/src/exports/config.ts +1 -0
- package/src/exports/deploy.ts +1 -0
- package/src/exports/index.ts +1 -0
- package/src/exports/local-target.ts +1 -0
- package/src/exports/nextjs-control.ts +1 -0
- package/src/exports/nextjs.ts +2 -0
- package/src/exports/node-control.ts +1 -0
- package/src/exports/node.ts +2 -0
- package/src/exports/report.ts +1 -0
- package/src/exports/service-rpc.ts +1 -0
- package/src/exports/testing.ts +1 -0
- package/dist/config-ByZICgry.d.mts +0 -1
- package/dist/config.mjs.map +0 -1
- package/dist/deploy-ByZICgry.d.mts +0 -1
- package/dist/deploy.mjs.map +0 -1
- package/dist/graph-BmrUEdo9-6Oq1hSmS.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-types-BcbVhojU-C3fhxjPK.d.mts","names":[],"sources":["../../../0-framework/0-foundation/foundation/dist/secret.d.mts","../../../0-framework/1-core/core/dist/graph-types-BcbVhojU.d.mts"],"mappings":";;;;;;;;;;;;;cAWc,UAAU;;EAEtB,YAAY,OAAO;;EAEnB,UAAU;EACV;EACA;EACA;GACC,OAAO;;;KAGL,eAAe;;;;;;;;;;;;UCXV,YAAY,UAAU,mBAAmB;WACxC,QAAQ;WACR;WACA,UAAU,iBAAiB,YAAY;;;;;;;WAOvC,YAAY;;KAElB,SAAS,eAAe;;KAExB,OAAO,UAAU,sBAAsB,WAAW,IAAI,EAAE,gDAAgD,EAAE,gBAAgB,iBAAiB,YAAY,EAAE,4BAA4B,iBAAiB,YAAY,EAAE,gBAAgB,iBAAiB,YAAY,EAAE;;;;;;;UAO9P,WAAW,UAAU,SAAS,QAAQ;WACrC,QAAQ;EACjB,QAAQ,QAAQ,OAAO,KAAK,IAAI,QAAQ;;;;;;;;;;UAUhC;WACC;aACE;;WAEF;WACA,QAAQ,SAAS;WACjB;WACA;;;;;;;;;;UAUD;WACC,SAAS,SAAS;WAClB,QAAQ,SAAS,eAAe,SAAS;;;;;;;;;;;iBAWnC,SAAS,MAAM,uBAAuB;;;;;;;;iBAQtC,kBAAkB,OAAO,iBAAiB;;;;;;;;;iBAS1C,cAAc,OAAO,iBAAiB;UAC7C,aAAa;WACZ;WACA,UAAU;WACV,YAAY;;;iBAGN,OAAO,OAAO,uBAAuB,YAAY;;iBAEjD,OAAO,OAAO,uBAAuB,YAAY;;iBAEjD,MAAM,UAAU,kBAAkB,QAAQ,GAAG,OAAO,aAAa,iBAAiB,YAAY,MAAM,YAAY;;;;;;;;;;;;UAYvH,SAAS,qBAAqB;WAC7B,MAAM;WACN,OAAO;EAChB,UAAU,UAAU,SAAS;;;;cAIjB;cACA;cACA;;UAEJ;YACE;WACD;;;KAGN,UAAU,eAAe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U,SAAS,sBAAsB,UAAU,UAAU,sBAAsB,WAAW,aAAa,sBAAsB,cAAc;EAC5M,OAAO;EACP,UAAU;EACV,SAAS;EACT,SAAS;GACR,OAAO,KAAK,cAAc,GAAG,GAAG,QAAQ,cAAc,YAAY,WAAW,GAAG,GAAG,GAAG;;;;;;iBAMxE,OAAO,iBAAiB,SAAS,cAAc,eAAe,gBAAgB;;;;KAI1F;UACK;WACC,IAAI;WACJ,MAAM,cAAc,eAAe,gBAAgB;;;;;;;;;UASpD;WACC,MAAM;WACN,IAAI;WACJ;WACA;;;;;;;;;UASD;;WAEC,gBAAgB;;WAEhB;;WAEA,QAAQ;;;;;;;;;;UAUT;;WAEC,gBAAgB;;WAEhB;;WAEA;;UAED;WACC,MAAM;;WAEN,gBAAgB;WAChB,gBAAgB;;WAEhB,kBAAkB;;WAElB,iBAAiB;;;cAGd,kBAAkB;EAC9B,YAAY"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import "./graph-
|
|
1
|
+
import { B as SecretValues, H as ServiceNode, V as Secrets, c as Deps, m as HydratedDeps, n as Config } from "./graph-types-BcbVhojU-C3fhxjPK.mjs";
|
|
2
|
+
import "./graph-DUSgjmzA-DhtkTqoz.mjs";
|
|
3
3
|
//#region ../../0-framework/1-core/core/dist/index.d.mts
|
|
4
4
|
//#region src/hydrate.d.ts
|
|
5
5
|
/**
|
|
@@ -29,4 +29,4 @@ declare function hydrateSync(root: ServiceNode, config: Config): HydratedDeps<De
|
|
|
29
29
|
declare function hydrateSecrets(root: ServiceNode, values: Record<string, string>): SecretValues<Secrets>;
|
|
30
30
|
//#endregion
|
|
31
31
|
export { hydrateSecrets as n, hydrateSync as r, hydrate as t };
|
|
32
|
-
//# sourceMappingURL=index-
|
|
32
|
+
//# sourceMappingURL=index-BFBNz7Aw.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BFBNz7Aw.d.mts","names":[],"sources":["../../../0-framework/1-core/core/dist/index.d.mts"],"mappings":";;;;;;;;;;;iBAWiB,QAAQ,MAAM,aAAa,QAAQ,SAAS,QAAQ,aAAa;;;;;;;iBAOjE,YAAY,MAAM,aAAa,QAAQ,SAAS,aAAa;;;;;;;;;;iBAU7D,eAAe,MAAM,aAAa,QAAQ,yBAAyB,aAAa"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { t as Load } from "./graph-
|
|
3
|
-
import { n as hydrateSecrets, r as hydrateSync, t as hydrate } from "./index-
|
|
4
|
-
export { type BuildAdapter, type Config, type ConfigDeclaration, type ConfigParam, type Connection, type Contract, type DependencyEnd, type Deps, type Edge, type Expose, type Graph, type GraphNode, type Hydrated, type HydratedDeps, type InputRef, Load, LoadError, type ModuleBuilder, type ModuleContext, type ModuleNode, type ModuleOutputs, type NodeId, type ParamBinding, type ParamBindings, type ParamNeed, type ParamNeedBindings, type ParamNeeds, type ParamSource, type Params, type ProvisionNeed, type ProvisionedRef, type RefPort, type ResourceNode, ResourceNodeBase, type RunnableServiceNode, type SecretBinding, type SecretBindings, SecretBox, type SecretNeed, type SecretSource, type SecretString, type SecretValues, type Secrets, type ServiceNode, type Values, configOf, dependency, freezeNode, hydrate, hydrateSecrets, hydrateSync, isNode, isParamSource, isProvisionNeed, isSecretSource, module, number, param, paramManifest, paramNeed, paramSource, provisionManifest, provisionNeed, resource, secret, secretSource, service, string };
|
|
1
|
+
import { $ as param, A as ProvisionNeed, B as SecretValues, C as ParamBinding, D as ParamNeeds, E as ParamNeedBindings, F as RunnableServiceNode, G as dependency, H as ServiceNode, I as SecretBinding, J as isParamSource, K as freezeNode, L as SecretBindings, M as RefPort, N as ResourceNode, O as ParamSource, P as ResourceNodeBase, Q as number, R as SecretNeed, S as NodeId, T as ParamNeed, U as Values, V as Secrets, W as configOf, X as isSecretSource, Y as isProvisionNeed, Z as module, _ as ModuleBuilder, a as Connection, at as resource, b as ModuleOutputs, c as Deps, ct as service, d as Graph, dt as SecretString, et as paramManifest, f as GraphNode, g as LoadError, h as InputRef, i as ConfigParam, it as provisionNeed, j as ProvisionedRef, k as Params, l as Edge, lt as string, m as HydratedDeps, n as Config, nt as paramSource, o as Contract, ot as secret, p as Hydrated, q as isNode, r as ConfigDeclaration, rt as provisionManifest, s as DependencyEnd, st as secretSource, t as BuildAdapter, tt as paramNeed, u as Expose, ut as SecretBox, v as ModuleContext, w as ParamBindings, x as NODE, y as ModuleNode, z as SecretSource } from "./graph-types-BcbVhojU-C3fhxjPK.mjs";
|
|
2
|
+
import { t as Load } from "./graph-DUSgjmzA-DhtkTqoz.mjs";
|
|
3
|
+
import { n as hydrateSecrets, r as hydrateSync, t as hydrate } from "./index-BFBNz7Aw.mjs";
|
|
4
|
+
export { type BuildAdapter, type Config, type ConfigDeclaration, type ConfigParam, type Connection, type Contract, type DependencyEnd, type Deps, type Edge, type Expose, type Graph, type GraphNode, type Hydrated, type HydratedDeps, type InputRef, Load, LoadError, type ModuleBuilder, type ModuleContext, type ModuleNode, type ModuleOutputs, type NODE, type NodeId, type ParamBinding, type ParamBindings, type ParamNeed, type ParamNeedBindings, type ParamNeeds, type ParamSource, type Params, type ProvisionNeed, type ProvisionedRef, type RefPort, type ResourceNode, ResourceNodeBase, type RunnableServiceNode, type SecretBinding, type SecretBindings, SecretBox, type SecretNeed, type SecretSource, type SecretString, type SecretValues, type Secrets, type ServiceNode, type Values, configOf, dependency, freezeNode, hydrate, hydrateSecrets, hydrateSync, isNode, isParamSource, isProvisionNeed, isSecretSource, module, number, param, paramManifest, paramNeed, paramSource, provisionManifest, provisionNeed, resource, secret, secretSource, service, string };
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { _ as service, a as freezeNode, c as isProvisionNeed, d as paramNeed, f as paramSource, g as secretSource, h as secret, i as dependency, l as isSecretSource, m as resource, n as LoadError, o as isNode, p as provisionNeed, r as ResourceNodeBase, s as isParamSource, t as Load, u as module } from "./graph-
|
|
2
|
-
import { a as number, c as provisionManifest, i as hydrateSync, l as string, n as hydrate, o as param, r as hydrateSecrets, s as paramManifest, t as configOf, u as SecretBox } from "./dist-
|
|
1
|
+
import { _ as service, a as freezeNode, c as isProvisionNeed, d as paramNeed, f as paramSource, g as secretSource, h as secret, i as dependency, l as isSecretSource, m as resource, n as LoadError, o as isNode, p as provisionNeed, r as ResourceNodeBase, s as isParamSource, t as Load, u as module } from "./graph-CP16cJyH-D5IW87Y-.mjs";
|
|
2
|
+
import { a as number, c as provisionManifest, i as hydrateSync, l as string, n as hydrate, o as param, r as hydrateSecrets, s as paramManifest, t as configOf, u as SecretBox } from "./dist-BkSJOwTm.mjs";
|
|
3
3
|
export { Load, LoadError, ResourceNodeBase, SecretBox, configOf, dependency, freezeNode, hydrate, hydrateSecrets, hydrateSync, isNode, isParamSource, isProvisionNeed, isSecretSource, module, number, param, paramManifest, paramNeed, paramSource, provisionManifest, provisionNeed, resource, secret, secretSource, service, string };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { O as PrismaAppConfig, _ as LocalTargetProvidersInput, c as DEV_DIR, g as LocalTargetEmulatorsInput, h as LocalTargetDescriptor, m as LocalTargetAttachment, p as LocalTargetAttachInput, s as ContainerInstance } from "./app-config-Dw3r7sUa-D3dr8rg2.mjs";
|
|
2
|
+
import * as Layer from "effect/Layer";
|
|
3
|
+
//#region ../../0-framework/1-core/core/dist/local-target.d.mts
|
|
4
|
+
//#region src/control/local-target.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Resolves every non-build-only configured extension's lazy `localTarget`
|
|
7
|
+
* thunk, once (ADR-0041's lazy local-target reference — operator directive:
|
|
8
|
+
* the production control entry carries only the thunk, never the
|
|
9
|
+
* descriptor, so resolving it is this module's job, not something a deploy
|
|
10
|
+
* path ever does). A build-only extension (`isBuildOnlyExtension`) owns no
|
|
11
|
+
* resources or services and is skipped entirely — never even checked for a
|
|
12
|
+
* `localTarget` thunk. Every other configured extension must be
|
|
13
|
+
* local-target-capable, or the dev command cannot bring the app up at all,
|
|
14
|
+
* so a missing thunk throws naming the extension. The generated dev stack
|
|
15
|
+
* module calls this once and threads the resolved map through every
|
|
16
|
+
* subsequent hook, including `localTargetProviders`.
|
|
17
|
+
*/
|
|
18
|
+
declare function resolveLocalTargets(config: PrismaAppConfig): Promise<ReadonlyMap<string, LocalTargetDescriptor>>;
|
|
19
|
+
/**
|
|
20
|
+
* All configured extensions' local-target providers merged, config array
|
|
21
|
+
* order (ADR-0041), from the ALREADY-RESOLVED descriptor map
|
|
22
|
+
* (`resolveLocalTargets`'s product — this function itself never touches a
|
|
23
|
+
* `localTarget` thunk). The generated dev stack module is this
|
|
24
|
+
* aggregator's one caller, passing the result as `LowerOptions.providers`.
|
|
25
|
+
*/
|
|
26
|
+
declare function localTargetProviders(resolved: ReadonlyMap<string, LocalTargetDescriptor>, containers: ReadonlyMap<string, ContainerInstance>, devDir: string): Layer.Layer<never>;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { DEV_DIR, type LocalTargetAttachInput, type LocalTargetAttachment, type LocalTargetDescriptor, type LocalTargetEmulatorsInput, type LocalTargetProvidersInput, localTargetProviders, resolveLocalTargets };
|
|
29
|
+
//# sourceMappingURL=local-target.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-target.d.mts","names":[],"sources":["../../../0-framework/1-core/core/dist/local-target.d.mts"],"mappings":";;;;;;;;;;;;;;;;;iBAgBiB,oBAAoB,QAAQ,kBAAkB,QAAQ,oBAAoB;;;;;;;;iBAQ1E,qBAAqB,UAAU,oBAAoB,wBAAwB,YAAY,oBAAoB,oBAAoB,iBAAiB,MAAM"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { r as isBuildOnlyExtension, t as DEV_DIR } from "./app-config-joXc-BKm-CdcXqNMD.mjs";
|
|
2
|
+
import { t as LowerError } from "./deploy-H3PKi0ZR-Chgm12Bn.mjs";
|
|
3
|
+
import * as Layer from "effect/Layer";
|
|
4
|
+
//#region ../../0-framework/1-core/core/dist/local-target.mjs
|
|
5
|
+
/** The local-target stack's own provider aggregation (ADR-0041; naming, operator 2026-07-23 — the seam is `localTarget`, "dev" names the user-facing feature only) — the local-target counterpart of `deploy.ts`'s `mergedProviders`, kept in its own module so `lower()` learns nothing about it (deploy.ts's REVISED — operator review of #162). */
|
|
6
|
+
function noLocalTargetSupportError(id) {
|
|
7
|
+
return new LowerError(`extension "${id}" has no dev support — it declares no \`localTarget\` descriptor (ADR-0041).`);
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Resolves every non-build-only configured extension's lazy `localTarget`
|
|
11
|
+
* thunk, once (ADR-0041's lazy local-target reference — operator directive:
|
|
12
|
+
* the production control entry carries only the thunk, never the
|
|
13
|
+
* descriptor, so resolving it is this module's job, not something a deploy
|
|
14
|
+
* path ever does). A build-only extension (`isBuildOnlyExtension`) owns no
|
|
15
|
+
* resources or services and is skipped entirely — never even checked for a
|
|
16
|
+
* `localTarget` thunk. Every other configured extension must be
|
|
17
|
+
* local-target-capable, or the dev command cannot bring the app up at all,
|
|
18
|
+
* so a missing thunk throws naming the extension. The generated dev stack
|
|
19
|
+
* module calls this once and threads the resolved map through every
|
|
20
|
+
* subsequent hook, including `localTargetProviders`.
|
|
21
|
+
*/
|
|
22
|
+
async function resolveLocalTargets(config) {
|
|
23
|
+
const entries = await Promise.all(config.extensions.flatMap((extension) => {
|
|
24
|
+
if (isBuildOnlyExtension(extension)) return [];
|
|
25
|
+
if (extension.localTarget === void 0) throw noLocalTargetSupportError(extension.id);
|
|
26
|
+
return [extension.localTarget().then((descriptor) => [extension.id, descriptor])];
|
|
27
|
+
}));
|
|
28
|
+
return new Map(entries);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* All configured extensions' local-target providers merged, config array
|
|
32
|
+
* order (ADR-0041), from the ALREADY-RESOLVED descriptor map
|
|
33
|
+
* (`resolveLocalTargets`'s product — this function itself never touches a
|
|
34
|
+
* `localTarget` thunk). The generated dev stack module is this
|
|
35
|
+
* aggregator's one caller, passing the result as `LowerOptions.providers`.
|
|
36
|
+
*/
|
|
37
|
+
function localTargetProviders(resolved, containers, devDir) {
|
|
38
|
+
const [first, ...rest] = [...resolved.entries()].map(([id, descriptor]) => descriptor.providers({
|
|
39
|
+
container: containers.get(id),
|
|
40
|
+
devDir
|
|
41
|
+
}));
|
|
42
|
+
return first === void 0 ? Layer.empty : Layer.mergeAll(first, ...rest);
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { DEV_DIR, localTargetProviders, resolveLocalTargets };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=local-target.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-target.mjs","names":[],"sources":["../../../0-framework/1-core/core/dist/local-target.mjs"],"sourcesContent":["import { t as LowerError } from \"./deploy-H3PKi0ZR.mjs\";\nimport { r as isBuildOnlyExtension, t as DEV_DIR } from \"./app-config-joXc-BKm.mjs\";\nimport * as Layer from \"effect/Layer\";\n//#region src/control/local-target.ts\n/** The local-target stack's own provider aggregation (ADR-0041; naming, operator 2026-07-23 — the seam is `localTarget`, \"dev\" names the user-facing feature only) — the local-target counterpart of `deploy.ts`'s `mergedProviders`, kept in its own module so `lower()` learns nothing about it (deploy.ts's REVISED — operator review of #162). */\nfunction noLocalTargetSupportError(id) {\n\treturn new LowerError(`extension \"${id}\" has no dev support — it declares no \\`localTarget\\` descriptor (ADR-0041).`);\n}\n/**\n* Resolves every non-build-only configured extension's lazy `localTarget`\n* thunk, once (ADR-0041's lazy local-target reference — operator directive:\n* the production control entry carries only the thunk, never the\n* descriptor, so resolving it is this module's job, not something a deploy\n* path ever does). A build-only extension (`isBuildOnlyExtension`) owns no\n* resources or services and is skipped entirely — never even checked for a\n* `localTarget` thunk. Every other configured extension must be\n* local-target-capable, or the dev command cannot bring the app up at all,\n* so a missing thunk throws naming the extension. The generated dev stack\n* module calls this once and threads the resolved map through every\n* subsequent hook, including `localTargetProviders`.\n*/\nasync function resolveLocalTargets(config) {\n\tconst entries = await Promise.all(config.extensions.flatMap((extension) => {\n\t\tif (isBuildOnlyExtension(extension)) return [];\n\t\tif (extension.localTarget === void 0) throw noLocalTargetSupportError(extension.id);\n\t\treturn [extension.localTarget().then((descriptor) => [extension.id, descriptor])];\n\t}));\n\treturn new Map(entries);\n}\n/**\n* All configured extensions' local-target providers merged, config array\n* order (ADR-0041), from the ALREADY-RESOLVED descriptor map\n* (`resolveLocalTargets`'s product — this function itself never touches a\n* `localTarget` thunk). The generated dev stack module is this\n* aggregator's one caller, passing the result as `LowerOptions.providers`.\n*/\nfunction localTargetProviders(resolved, containers, devDir) {\n\tconst [first, ...rest] = [...resolved.entries()].map(([id, descriptor]) => descriptor.providers({\n\t\tcontainer: containers.get(id),\n\t\tdevDir\n\t}));\n\treturn first === void 0 ? Layer.empty : Layer.mergeAll(first, ...rest);\n}\n//#endregion\nexport { DEV_DIR, localTargetProviders, resolveLocalTargets };\n\n//# sourceMappingURL=local-target.mjs.map"],"mappings":";;;;;AAKA,SAAS,0BAA0B,IAAI;CACtC,OAAO,IAAI,WAAW,cAAc,GAAG,6EAA6E;AACrH;;;;;;;;;;;;;;AAcA,eAAe,oBAAoB,QAAQ;CAC1C,MAAM,UAAU,MAAM,QAAQ,IAAI,OAAO,WAAW,SAAS,cAAc;EAC1E,IAAI,qBAAqB,SAAS,GAAG,OAAO,CAAC;EAC7C,IAAI,UAAU,gBAAgB,KAAK,GAAG,MAAM,0BAA0B,UAAU,EAAE;EAClF,OAAO,CAAC,UAAU,YAAY,CAAC,CAAC,MAAM,eAAe,CAAC,UAAU,IAAI,UAAU,CAAC,CAAC;CACjF,CAAC,CAAC;CACF,OAAO,IAAI,IAAI,OAAO;AACvB;;;;;;;;AAQA,SAAS,qBAAqB,UAAU,YAAY,QAAQ;CAC3D,MAAM,CAAC,OAAO,GAAG,QAAQ,CAAC,GAAG,SAAS,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,gBAAgB,WAAW,UAAU;EAC/F,WAAW,WAAW,IAAI,EAAE;EAC5B;CACD,CAAC,CAAC;CACF,OAAO,UAAU,KAAK,IAAI,MAAM,QAAQ,MAAM,SAAS,OAAO,GAAG,IAAI;AACtE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as BuildAdapter } from "./graph-types-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { t as BuildAdapter } from "./graph-types-BcbVhojU-C3fhxjPK.mjs";
|
|
2
|
+
import "./index-BFBNz7Aw.mjs";
|
|
3
3
|
//#region ../../0-framework/2-authoring/nextjs/dist/nextjs-DLyeRR7M.d.mts
|
|
4
4
|
//#region src/nextjs.d.ts
|
|
5
5
|
/** The nextjs build adapter's descriptor — `appDir` is this kind's own extra path input (the Next app root), beyond the shared `{ extension, type, module, entry }`. `entry` is a placeholder; the assembler locates `server.js` in the standalone tree. */
|
|
@@ -13,4 +13,4 @@ declare const nextjsBuild: (opts: {
|
|
|
13
13
|
}) => NextjsBuildAdapter;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { nextjsBuild as n, NextjsBuildAdapter as t };
|
|
16
|
-
//# sourceMappingURL=nextjs-DLyeRR7M-
|
|
16
|
+
//# sourceMappingURL=nextjs-DLyeRR7M-DwnBjryZ.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nextjs-DLyeRR7M-DwnBjryZ.d.mts","names":[],"sources":["../../../0-framework/2-authoring/nextjs/dist/nextjs-DLyeRR7M.d.mts"],"mappings":";;;;;UAGU,2BAA2B;WAC1B;WACA;;cAEG,cAAc;EAC1B;EACA;MACI"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as Bundle,
|
|
2
|
-
import "./config-
|
|
3
|
-
import "./deploy-
|
|
4
|
-
import { t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-
|
|
1
|
+
import { a as Bundle, f as ExtensionDescriptor, i as AssembleInput } from "./app-config-Dw3r7sUa-D3dr8rg2.mjs";
|
|
2
|
+
import "./config-121C4hAb.mjs";
|
|
3
|
+
import "./deploy-121C4hAb.mjs";
|
|
4
|
+
import { t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-DwnBjryZ.mjs";
|
|
5
5
|
//#region ../../0-framework/2-authoring/nextjs/dist/control.d.mts
|
|
6
6
|
//#region src/control/build.d.ts
|
|
7
7
|
/** The built standalone server.js for a nextjs build — `appDir`'s standalone root plus the app subpath Next recorded. Single-sourced so `assemble()` (deploy) and the integration-test seam can't drift. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nextjs-control.d.mts","names":[],"sources":["../../../0-framework/2-authoring/nextjs/dist/control.d.mts"],"mappings":";;;;;;;iBAKiB,qBAAqB,OAAO;iBAC5B,SAAS,OAAO,gBAAkB,QAAQ;;cAE7C,mBAAmB"}
|
package/dist/nextjs-control.mjs
CHANGED
|
@@ -88,7 +88,8 @@ async function assemble(input) {
|
|
|
88
88
|
if (!fs.existsSync(path.join(workDir, "main.mjs"))) throw new Error(`esbuild produced no main.mjs in ${workDir}`);
|
|
89
89
|
return {
|
|
90
90
|
dir: workDir,
|
|
91
|
-
entry: path.posix.join("bundle", appRel.split(path.sep).join("/"), "server.js")
|
|
91
|
+
entry: path.posix.join("bundle", appRel.split(path.sep).join("/"), "server.js"),
|
|
92
|
+
watch: [standaloneRoot]
|
|
92
93
|
};
|
|
93
94
|
}
|
|
94
95
|
/** The nextjs build extension descriptor — `prisma-composer.config.ts` lists it under `extensions`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nextjs-control.mjs","names":[],"sources":["../../../0-framework/2-authoring/nextjs/dist/control.mjs"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { build } from \"esbuild\";\n//#region src/control/build.ts\n/**\n* The extension's control entry (ADR-0017): `nextjsBuild()` returns the build\n* descriptor `prisma-composer.config.ts` lists. Deploy-only (ADR-0005): the user\n* runs `next build` (`output: \"standalone\"`); `assemble` then performs the\n* *documented* Next standalone deploy — it ships the standalone tree and copies\n* in the client assets Next deliberately omits (`.next/static`, `public/`) — and\n* adds the framework's boot wrapper. This is the canonical `cp` step from the\n* Next docs, run at deploy so no app needs a build-script for it.\n*\n* It does not guess: the app's location inside the standalone tree (deep, when\n* `outputFileTracingRoot` is the monorepo root) is *read from Next's own build\n* manifest* (`.next/required-server-files.json`'s `relativeAppDir`), never walked\n* for or computed from a hardcoded depth. It does not launder: node_modules is\n* shipped exactly as `next build` produced it, so a symlinked (non-hoisted)\n* node_modules is the packager's hard error — the same misconfiguration crashes\n* the standalone server at boot, so it must be a flat install (npm, or pnpm/bun\n* with a hoisted node-linker).\n*\n* Artifact layout: `<workDir>/main.mjs` (our wrapper) + `<workDir>/bundle/`\n* (the standalone tree, with static/public copied in). The packager adds\n* `bootstrap.js` + the manifest at the root; bootstrap imports main.mjs, whose\n* run() dynamically imports `./bundle/<relativeAppDir>/server.js`.\n*\n* Paths are file-relative (ADR-0004): `appDir` resolves against\n* `dirname(build.module)`.\n*/\n/** Narrows the shared BuildAdapter to this extension's own descriptor — the value-level mirror of the registry routing on (extension, type). */\nfunction isNextjsBuild(descriptor) {\n\treturn descriptor.type === \"nextjs\" && \"appDir\" in descriptor && typeof descriptor.appDir === \"string\";\n}\n/**\n* The app's own subpath within `.next/standalone`, as an OS-relative path. Next\n* mirrors the app's location under `outputFileTracingRoot` (deep, when that's the\n* monorepo root); rather than walk the tree for `server.js`, we read where Next\n* put it from `.next/required-server-files.json` — `relativeAppDir` is exactly\n* that subpath. Older Next lacks the field; fall back to computing it from the\n* same manifest's `config.outputFileTracingRoot`.\n*/\nfunction nextAppRel(appDir) {\n\tconst manifestPath = path.join(appDir, \".next\", \"required-server-files.json\");\n\tif (!fs.existsSync(manifestPath)) throw new Error(`no ${path.join(\".next\", \"required-server-files.json\")} under ${appDir} — run \\`next build\\` with output: \"standalone\" first.`);\n\tconst manifest = JSON.parse(fs.readFileSync(manifestPath, \"utf8\"));\n\tconst relativeAppDir = manifest?.relativeAppDir;\n\tconst tracingRoot = manifest?.config?.outputFileTracingRoot;\n\tconst posixRel = typeof relativeAppDir === \"string\" ? relativeAppDir : typeof tracingRoot === \"string\" ? path.relative(tracingRoot, appDir).split(path.sep).join(\"/\") : void 0;\n\tif (posixRel === void 0) throw new Error(`${manifestPath} records neither relativeAppDir nor config.outputFileTracingRoot — cannot locate the standalone server`);\n\treturn posixRel.split(\"/\").join(path.sep);\n}\n/** The built standalone server.js for a nextjs build — `appDir`'s standalone root plus the app subpath Next recorded. Single-sourced so `assemble()` (deploy) and the integration-test seam can't drift. */\nfunction standaloneServerPath(build) {\n\tconst appDir = path.resolve(path.dirname(fileURLToPath(build.module)), build.appDir);\n\treturn path.join(appDir, \".next\", \"standalone\", nextAppRel(appDir), \"server.js\");\n}\nasync function assemble(input) {\n\tif (!isNextjsBuild(input.build)) throw new Error(`@prisma/composer/nextjs/control: expected a \"nextjs\" build adapter (with appDir), got \"${input.build.type}\".`);\n\tconst buildDescriptor = input.build;\n\tconst appDir = path.resolve(path.dirname(fileURLToPath(buildDescriptor.module)), buildDescriptor.appDir);\n\tconst standaloneRoot = path.join(appDir, \".next\", \"standalone\");\n\tif (!fs.existsSync(standaloneRoot)) throw new Error(`no ${path.join(\".next\", \"standalone\")} under ${appDir} — run \\`next build\\` with output: \"standalone\" first.`);\n\tconst appRel = nextAppRel(appDir);\n\tconst workDir = path.join(input.cwd, \".prisma-composer\", \"artifacts\", input.address);\n\tawait fs.promises.rm(workDir, {\n\t\trecursive: true,\n\t\tforce: true\n\t});\n\tawait fs.promises.mkdir(workDir, { recursive: true });\n\tconst bundleDir = path.join(workDir, \"bundle\");\n\tawait fs.promises.cp(standaloneRoot, bundleDir, { recursive: true });\n\tconst appOut = path.join(bundleDir, appRel);\n\tconst staticSrc = path.join(appDir, \".next\", \"static\");\n\tif (fs.existsSync(staticSrc)) await fs.promises.cp(staticSrc, path.join(appOut, \".next\", \"static\"), { recursive: true });\n\tconst publicSrc = path.join(appDir, \"public\");\n\tif (fs.existsSync(publicSrc)) await fs.promises.cp(publicSrc, path.join(appOut, \"public\"), { recursive: true });\n\tawait build({\n\t\tentryPoints: { main: fileURLToPath(buildDescriptor.module) },\n\t\toutdir: workDir,\n\t\tbundle: true,\n\t\tformat: \"esm\",\n\t\tplatform: \"node\",\n\t\texternal: [\"bun\", \"bun:*\"],\n\t\toutExtension: { \".js\": \".mjs\" }\n\t});\n\tif (!fs.existsSync(path.join(workDir, \"main.mjs\"))) throw new Error(`esbuild produced no main.mjs in ${workDir}`);\n\treturn {\n\t\tdir: workDir,\n\t\tentry: path.posix.join(\"bundle\", appRel.split(path.sep).join(\"/\"), \"server.js\")\n\t};\n}\n/** The nextjs build extension descriptor — `prisma-composer.config.ts` lists it under `extensions`. */\nconst nextjsBuild = () => ({\n\tid: \"@prisma/composer/nextjs\",\n\tnodes: { nextjs: {\n\t\tkind: \"build\",\n\t\tassemble\n\t} }\n});\n//#endregion\nexport { assemble, nextjsBuild, standaloneServerPath };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,SAAS,cAAc,YAAY;CAClC,OAAO,WAAW,SAAS,YAAY,YAAY,cAAc,OAAO,WAAW,WAAW;AAC/F;;;;;;;;;AASA,SAAS,WAAW,QAAQ;CAC3B,MAAM,eAAe,KAAK,KAAK,QAAQ,SAAS,4BAA4B;CAC5E,IAAI,CAAC,GAAG,WAAW,YAAY,GAAG,MAAM,IAAI,MAAM,MAAM,KAAK,KAAK,SAAS,4BAA4B,EAAE,SAAS,OAAO,uDAAuD;CAChL,MAAM,WAAW,KAAK,MAAM,GAAG,aAAa,cAAc,MAAM,CAAC;CACjE,MAAM,iBAAiB,UAAU;CACjC,MAAM,cAAc,UAAU,QAAQ;CACtC,MAAM,WAA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KAAK,KAAK,WAAW,MAAM;CAC1C,MAAM,YAAY,KAAK,KAAK,QAAQ,SAAS,QAAQ;CACrD,IAAI,GAAG,WAAW,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,KAAK,KAAK,QAAQ,SAAS,QAAQ,GAAG,EAAE,WAAW,KAAK,CAAC;CACvH,MAAM,YAAY,KAAK,KAAK,QAAQ,QAAQ;CAC5C,IAAI,GAAG,WAAW,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,KAAK,KAAK,QAAQ,QAAQ,GAAG,EAAE,WAAW,KAAK,CAAC;CAC9G,MAAM,MAAM;EACX,aAAa,EAAE,MAAM,cAAc,gBAAgB,MAAM,EAAE;EAC3D,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,UAAU;EACV,UAAU,CAAC,OAAO,OAAO;EACzB,cAAc,EAAE,OAAO,OAAO;CAC/B,CAAC;CACD,IAAI,CAAC,GAAG,WAAW,KAAK,KAAK,SAAS,UAAU,CAAC,GAAG,MAAM,IAAI,MAAM,mCAAmC,SAAS;CAChH,OAAO;EACN,KAAK;EACL,OAAO,KAAK,MAAM,KAAK,UAAU,OAAO,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,GAAG,GAAG,WAAW;
|
|
1
|
+
{"version":3,"file":"nextjs-control.mjs","names":[],"sources":["../../../0-framework/2-authoring/nextjs/dist/control.mjs"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { build } from \"esbuild\";\n//#region src/control/build.ts\n/**\n* The extension's control entry (ADR-0017): `nextjsBuild()` returns the build\n* descriptor `prisma-composer.config.ts` lists. Deploy-only (ADR-0005): the user\n* runs `next build` (`output: \"standalone\"`); `assemble` then performs the\n* *documented* Next standalone deploy — it ships the standalone tree and copies\n* in the client assets Next deliberately omits (`.next/static`, `public/`) — and\n* adds the framework's boot wrapper. This is the canonical `cp` step from the\n* Next docs, run at deploy so no app needs a build-script for it.\n*\n* It does not guess: the app's location inside the standalone tree (deep, when\n* `outputFileTracingRoot` is the monorepo root) is *read from Next's own build\n* manifest* (`.next/required-server-files.json`'s `relativeAppDir`), never walked\n* for or computed from a hardcoded depth. It does not launder: node_modules is\n* shipped exactly as `next build` produced it, so a symlinked (non-hoisted)\n* node_modules is the packager's hard error — the same misconfiguration crashes\n* the standalone server at boot, so it must be a flat install (npm, or pnpm/bun\n* with a hoisted node-linker).\n*\n* Artifact layout: `<workDir>/main.mjs` (our wrapper) + `<workDir>/bundle/`\n* (the standalone tree, with static/public copied in). The packager adds\n* `bootstrap.js` + the manifest at the root; bootstrap imports main.mjs, whose\n* run() dynamically imports `./bundle/<relativeAppDir>/server.js`.\n*\n* Paths are file-relative (ADR-0004): `appDir` resolves against\n* `dirname(build.module)`.\n*/\n/** Narrows the shared BuildAdapter to this extension's own descriptor — the value-level mirror of the registry routing on (extension, type). */\nfunction isNextjsBuild(descriptor) {\n\treturn descriptor.type === \"nextjs\" && \"appDir\" in descriptor && typeof descriptor.appDir === \"string\";\n}\n/**\n* The app's own subpath within `.next/standalone`, as an OS-relative path. Next\n* mirrors the app's location under `outputFileTracingRoot` (deep, when that's the\n* monorepo root); rather than walk the tree for `server.js`, we read where Next\n* put it from `.next/required-server-files.json` — `relativeAppDir` is exactly\n* that subpath. Older Next lacks the field; fall back to computing it from the\n* same manifest's `config.outputFileTracingRoot`.\n*/\nfunction nextAppRel(appDir) {\n\tconst manifestPath = path.join(appDir, \".next\", \"required-server-files.json\");\n\tif (!fs.existsSync(manifestPath)) throw new Error(`no ${path.join(\".next\", \"required-server-files.json\")} under ${appDir} — run \\`next build\\` with output: \"standalone\" first.`);\n\tconst manifest = JSON.parse(fs.readFileSync(manifestPath, \"utf8\"));\n\tconst relativeAppDir = manifest?.relativeAppDir;\n\tconst tracingRoot = manifest?.config?.outputFileTracingRoot;\n\tconst posixRel = typeof relativeAppDir === \"string\" ? relativeAppDir : typeof tracingRoot === \"string\" ? path.relative(tracingRoot, appDir).split(path.sep).join(\"/\") : void 0;\n\tif (posixRel === void 0) throw new Error(`${manifestPath} records neither relativeAppDir nor config.outputFileTracingRoot — cannot locate the standalone server`);\n\treturn posixRel.split(\"/\").join(path.sep);\n}\n/** The built standalone server.js for a nextjs build — `appDir`'s standalone root plus the app subpath Next recorded. Single-sourced so `assemble()` (deploy) and the integration-test seam can't drift. */\nfunction standaloneServerPath(build) {\n\tconst appDir = path.resolve(path.dirname(fileURLToPath(build.module)), build.appDir);\n\treturn path.join(appDir, \".next\", \"standalone\", nextAppRel(appDir), \"server.js\");\n}\nasync function assemble(input) {\n\tif (!isNextjsBuild(input.build)) throw new Error(`@prisma/composer/nextjs/control: expected a \"nextjs\" build adapter (with appDir), got \"${input.build.type}\".`);\n\tconst buildDescriptor = input.build;\n\tconst appDir = path.resolve(path.dirname(fileURLToPath(buildDescriptor.module)), buildDescriptor.appDir);\n\tconst standaloneRoot = path.join(appDir, \".next\", \"standalone\");\n\tif (!fs.existsSync(standaloneRoot)) throw new Error(`no ${path.join(\".next\", \"standalone\")} under ${appDir} — run \\`next build\\` with output: \"standalone\" first.`);\n\tconst appRel = nextAppRel(appDir);\n\tconst workDir = path.join(input.cwd, \".prisma-composer\", \"artifacts\", input.address);\n\tawait fs.promises.rm(workDir, {\n\t\trecursive: true,\n\t\tforce: true\n\t});\n\tawait fs.promises.mkdir(workDir, { recursive: true });\n\tconst bundleDir = path.join(workDir, \"bundle\");\n\tawait fs.promises.cp(standaloneRoot, bundleDir, { recursive: true });\n\tconst appOut = path.join(bundleDir, appRel);\n\tconst staticSrc = path.join(appDir, \".next\", \"static\");\n\tif (fs.existsSync(staticSrc)) await fs.promises.cp(staticSrc, path.join(appOut, \".next\", \"static\"), { recursive: true });\n\tconst publicSrc = path.join(appDir, \"public\");\n\tif (fs.existsSync(publicSrc)) await fs.promises.cp(publicSrc, path.join(appOut, \"public\"), { recursive: true });\n\tawait build({\n\t\tentryPoints: { main: fileURLToPath(buildDescriptor.module) },\n\t\toutdir: workDir,\n\t\tbundle: true,\n\t\tformat: \"esm\",\n\t\tplatform: \"node\",\n\t\texternal: [\"bun\", \"bun:*\"],\n\t\toutExtension: { \".js\": \".mjs\" }\n\t});\n\tif (!fs.existsSync(path.join(workDir, \"main.mjs\"))) throw new Error(`esbuild produced no main.mjs in ${workDir}`);\n\treturn {\n\t\tdir: workDir,\n\t\tentry: path.posix.join(\"bundle\", appRel.split(path.sep).join(\"/\"), \"server.js\"),\n\t\twatch: [standaloneRoot]\n\t};\n}\n/** The nextjs build extension descriptor — `prisma-composer.config.ts` lists it under `extensions`. */\nconst nextjsBuild = () => ({\n\tid: \"@prisma/composer/nextjs\",\n\tnodes: { nextjs: {\n\t\tkind: \"build\",\n\t\tassemble\n\t} }\n});\n//#endregion\nexport { assemble, nextjsBuild, standaloneServerPath };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,SAAS,cAAc,YAAY;CAClC,OAAO,WAAW,SAAS,YAAY,YAAY,cAAc,OAAO,WAAW,WAAW;AAC/F;;;;;;;;;AASA,SAAS,WAAW,QAAQ;CAC3B,MAAM,eAAe,KAAK,KAAK,QAAQ,SAAS,4BAA4B;CAC5E,IAAI,CAAC,GAAG,WAAW,YAAY,GAAG,MAAM,IAAI,MAAM,MAAM,KAAK,KAAK,SAAS,4BAA4B,EAAE,SAAS,OAAO,uDAAuD;CAChL,MAAM,WAAW,KAAK,MAAM,GAAG,aAAa,cAAc,MAAM,CAAC;CACjE,MAAM,iBAAiB,UAAU;CACjC,MAAM,cAAc,UAAU,QAAQ;CACtC,MAAM,WAAW,OAAO,mBAAmB,WAAW,iBAAiB,OAAO,gBAAgB,WAAW,KAAK,SAAS,aAAa,MAAM,CAAC,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,GAAG,IAAI,KAAK;CAC7K,IAAI,aAAa,KAAK,GAAG,MAAM,IAAI,MAAM,GAAG,aAAa,uGAAuG;CAChK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YAAY,KAAK,KAAK,QAAQ,QAAQ;CAC5C,IAAI,GAAG,WAAW,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,KAAK,KAAK,QAAQ,QAAQ,GAAG,EAAE,WAAW,KAAK,CAAC;CAC9G,MAAM,MAAM;EACX,aAAa,EAAE,MAAM,cAAc,gBAAgB,MAAM,EAAE;EAC3D,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,UAAU;EACV,UAAU,CAAC,OAAO,OAAO;EACzB,cAAc,EAAE,OAAO,OAAO;CAC/B,CAAC;CACD,IAAI,CAAC,GAAG,WAAW,KAAK,KAAK,SAAS,UAAU,CAAC,GAAG,MAAM,IAAI,MAAM,mCAAmC,SAAS;CAChH,OAAO;EACN,KAAK;EACL,OAAO,KAAK,MAAM,KAAK,UAAU,OAAO,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,GAAG,GAAG,WAAW;EAC9E,OAAO,CAAC,cAAc;CACvB;AACD;;AAEA,MAAM,qBAAqB;CAC1B,IAAI;CACJ,OAAO,EAAE,QAAQ;EAChB,MAAM;EACN;CACD,EAAE;AACH"}
|
package/dist/nextjs.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as nextjsBuild, t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-
|
|
1
|
+
import { n as nextjsBuild, t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-DwnBjryZ.mjs";
|
|
2
2
|
export { type NextjsBuildAdapter, nextjsBuild as default };
|
package/dist/node-control.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as Bundle,
|
|
2
|
-
import "./config-
|
|
3
|
-
import "./deploy-
|
|
1
|
+
import { a as Bundle, f as ExtensionDescriptor, i as AssembleInput } from "./app-config-Dw3r7sUa-D3dr8rg2.mjs";
|
|
2
|
+
import "./config-121C4hAb.mjs";
|
|
3
|
+
import "./deploy-121C4hAb.mjs";
|
|
4
4
|
//#region ../../0-framework/2-authoring/node/dist/control.d.mts
|
|
5
5
|
//#region src/control/build.d.ts
|
|
6
6
|
declare function assemble(input: AssembleInput): Promise<Bundle>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-control.d.mts","names":[],"sources":["../../../0-framework/2-authoring/node/dist/control.d.mts"],"mappings":";;;;;iBAGiB,SAAS,OAAO,gBAAkB,QAAQ;;cAE7C,iBAAiB"}
|
package/dist/node-control.mjs
CHANGED
|
@@ -46,26 +46,10 @@ function resolveFile(entrySpec, moduleDir) {
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
/**
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
* followed — only `dir` is ever copied.
|
|
54
|
-
*/
|
|
55
|
-
async function resolveDir(dirSpec, entrySpec, moduleDir) {
|
|
56
|
-
const dirPath = path.resolve(moduleDir, dirSpec);
|
|
57
|
-
if (!fs.existsSync(dirPath)) throw new Error(`no built directory at ${dirPath} — run your build first (the build adapter's dir, "${dirSpec}", resolves against dirname(module)).`);
|
|
58
|
-
if (!fs.statSync(dirPath).isDirectory()) throw new Error(`the build adapter's dir ("${dirPath}") is not a directory — drop dir to deploy a single built file, naming it as entry.`);
|
|
59
|
-
const entryPath = path.resolve(dirPath, entrySpec);
|
|
60
|
-
if (!entryPath.startsWith(dirPath + path.sep)) throw new Error(`the build adapter's entry ("${entrySpec}") resolves to ${entryPath}, which is not inside dir ("${dirPath}") — in the directory form entry names a file inside dir, and only dir is copied.`);
|
|
61
|
-
if (!fs.existsSync(entryPath) || !fs.statSync(entryPath).isFile()) throw new Error(`no built entry at ${entryPath} — run your build first (the build adapter's entry, "${entrySpec}", resolves inside dir, "${dirPath}").`);
|
|
62
|
-
await assertNoSymlinks(dirPath);
|
|
63
|
-
return {
|
|
64
|
-
source: dirPath,
|
|
65
|
-
sourceField: "dir",
|
|
66
|
-
entry: path.relative(dirPath, entryPath).split(path.sep).join("/"),
|
|
67
|
-
copyInto: (bundleDir) => fs.promises.cp(dirPath, bundleDir, { recursive: true })
|
|
68
|
-
};
|
|
49
|
+
/** The shared "dir contains symlinks" error, reused by both the root-is-a-symlink case and the nested-symlink walk below — one message shape, never two to drift apart. */
|
|
50
|
+
function symlinksFoundError(dirPath, found) {
|
|
51
|
+
const listed = found.slice(0, 5).join(", ");
|
|
52
|
+
return /* @__PURE__ */ new Error(`the build adapter's dir ("${dirPath}") contains symlinks, which the platform's packager rejects: ${listed}${found.length > 5 ? `, and ${found.length - 5} more` : ""}. The tree is copied verbatim, so make your build emit real files in dir (for example, a hoisted node_modules, or dereference the links into dir with cp -RL).`);
|
|
69
53
|
}
|
|
70
54
|
/**
|
|
71
55
|
* Compute's packager rejects symlinks, so a tree containing one cannot deploy.
|
|
@@ -73,7 +57,10 @@ async function resolveDir(dirSpec, entrySpec, moduleDir) {
|
|
|
73
57
|
* the artifact must be what the author's build produced (ADR-0005), and
|
|
74
58
|
* following a link that points outside `dir` would pull in files the author
|
|
75
59
|
* never named. The walk reads dirents (lstat semantics), so a symlinked
|
|
76
|
-
* directory is reported and never descended into.
|
|
60
|
+
* directory is reported and never descended into. Checks only `dirPath`'s
|
|
61
|
+
* children — the caller (`resolveDir`) checks `dirPath` itself before this
|
|
62
|
+
* runs, since that check also decides "not a directory" vs "is a symlink"
|
|
63
|
+
* and must happen before any dereferencing stat.
|
|
77
64
|
*/
|
|
78
65
|
async function assertNoSymlinks(dirPath) {
|
|
79
66
|
const found = [];
|
|
@@ -85,9 +72,40 @@ async function assertNoSymlinks(dirPath) {
|
|
|
85
72
|
}
|
|
86
73
|
};
|
|
87
74
|
await walk(dirPath);
|
|
88
|
-
if (found.length
|
|
89
|
-
|
|
90
|
-
|
|
75
|
+
if (found.length > 0) throw symlinksFoundError(dirPath, found);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* The directory form: `dir` is the built tree, resolved against dirname(module)
|
|
79
|
+
* (ADR-0004) and copied whole; `entry` resolves inside `dir` and names the file
|
|
80
|
+
* that boots. An `entry` that resolves outside `dir` is rejected rather than
|
|
81
|
+
* followed — only `dir` is ever copied.
|
|
82
|
+
*
|
|
83
|
+
* `dir` itself can be a symlink — not just something inside it. `lstat` it
|
|
84
|
+
* before anything else so that case hard-errors identically whether the link
|
|
85
|
+
* points at a real directory (which a dereferencing `stat` would otherwise
|
|
86
|
+
* accept as "is a directory") or at a file: neither is ever silently
|
|
87
|
+
* dereferenced and copied (ADR-0005).
|
|
88
|
+
*/
|
|
89
|
+
async function resolveDir(dirSpec, entrySpec, moduleDir) {
|
|
90
|
+
const dirPath = path.resolve(moduleDir, dirSpec);
|
|
91
|
+
let dirLstat;
|
|
92
|
+
try {
|
|
93
|
+
dirLstat = await fs.promises.lstat(dirPath);
|
|
94
|
+
} catch {
|
|
95
|
+
throw new Error(`no built directory at ${dirPath} — run your build first (the build adapter's dir, "${dirSpec}", resolves against dirname(module)).`);
|
|
96
|
+
}
|
|
97
|
+
if (dirLstat.isSymbolicLink()) throw symlinksFoundError(dirPath, [dirPath]);
|
|
98
|
+
if (!dirLstat.isDirectory()) throw new Error(`the build adapter's dir ("${dirPath}") is not a directory — drop dir to deploy a single built file, naming it as entry.`);
|
|
99
|
+
const entryPath = path.resolve(dirPath, entrySpec);
|
|
100
|
+
if (!entryPath.startsWith(dirPath + path.sep)) throw new Error(`the build adapter's entry ("${entrySpec}") resolves to ${entryPath}, which is not inside dir ("${dirPath}") — in the directory form entry names a file inside dir, and only dir is copied.`);
|
|
101
|
+
if (!fs.existsSync(entryPath) || !fs.statSync(entryPath).isFile()) throw new Error(`no built entry at ${entryPath} — run your build first (the build adapter's entry, "${entrySpec}", resolves inside dir, "${dirPath}").`);
|
|
102
|
+
await assertNoSymlinks(dirPath);
|
|
103
|
+
return {
|
|
104
|
+
source: dirPath,
|
|
105
|
+
sourceField: "dir",
|
|
106
|
+
entry: path.relative(dirPath, entryPath).split(path.sep).join("/"),
|
|
107
|
+
copyInto: (bundleDir) => fs.promises.cp(dirPath, bundleDir, { recursive: true })
|
|
108
|
+
};
|
|
91
109
|
}
|
|
92
110
|
/**
|
|
93
111
|
* The working dir is cleared on every assemble, so it must not overlap the copy
|
|
@@ -125,7 +143,8 @@ async function assemble(input) {
|
|
|
125
143
|
await runnable.copyInto(path.join(workDir, "bundle"));
|
|
126
144
|
return {
|
|
127
145
|
dir: workDir,
|
|
128
|
-
entry: path.posix.join("bundle", runnable.entry)
|
|
146
|
+
entry: path.posix.join("bundle", runnable.entry),
|
|
147
|
+
watch: [runnable.source]
|
|
129
148
|
};
|
|
130
149
|
}
|
|
131
150
|
/** The node build extension descriptor — `prisma-composer.config.ts` lists it under `extensions`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-control.mjs","names":[],"sources":["../../../0-framework/2-authoring/node/dist/control.mjs"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { build } from \"esbuild\";\n//#region src/control/build.ts\n/**\n* The extension's control entry (ADR-0017): `nodeBuild()` returns the build\n* descriptor `prisma-composer.config.ts` lists. Deploy-only (ADR-0005): the user\n* builds their own runnable; `assemble` copies what they built under `bundle/`\n* and adds the framework's boot wrapper — it never bundles or transforms the\n* app's code.\n*\n* Two forms, chosen by the descriptor: without `dir`, `entry` is a single\n* self-contained file and only that file is copied. With `dir`, the whole\n* directory is copied verbatim and `entry` names the file inside it that boots.\n* Neither form discovers anything — no tree-walking for an entry, no filename\n* heuristics; the author states the paths and we copy exactly those.\n*\n* The wrapper is a SEPARATE esbuild build of the service module (declarations\n* only, whose node carries run()/load()), emitted as `main.mjs` at the\n* working-dir root — a dictated name (object entry `{ main }`), not a\n* discovered one. run() and the app entry must be independent module instances\n* that hand off through process.env, so the wrapper is its own self-contained\n* build; `@prisma/*` is inlined, `bun` is a Compute built-in.\n*\n* Artifact layout: `<cwd>/.prisma-composer/artifacts/<address>/` (deploy-owned,\n* ADR-0005) holds `main.mjs` at the root and the app's built runnable under\n* `bundle/`.\n*/\n/** Narrows the shared BuildAdapter to this extension's own descriptor — the value-level mirror of the registry routing on (extension, type). `dir` is optional: absent is the single-file form. */\nfunction isNodeBuild(descriptor) {\n\treturn descriptor.type === \"node\" && (!(\"dir\" in descriptor) || typeof descriptor.dir === \"string\");\n}\n/** The single-file form: `entry` is the whole built runnable, resolved against dirname(module) (ADR-0004). */\nfunction resolveFile(entrySpec, moduleDir) {\n\tconst entryPath = path.resolve(moduleDir, entrySpec);\n\tif (!fs.existsSync(entryPath)) throw new Error(`no built entry at ${entryPath} — run your build first (the build adapter's entry, \"${entrySpec}\", resolves against dirname(module)).`);\n\tconst entryFile = path.basename(entryPath);\n\treturn {\n\t\tsource: entryPath,\n\t\tsourceField: \"entry\",\n\t\tentry: entryFile,\n\t\tcopyInto: async (bundleDir) => {\n\t\t\tawait fs.promises.mkdir(bundleDir, { recursive: true });\n\t\t\tawait fs.promises.copyFile(entryPath, path.join(bundleDir, entryFile));\n\t\t}\n\t};\n}\n/**\n* The directory form: `dir` is the built tree, resolved against dirname(module)\n* (ADR-0004) and copied whole; `entry` resolves inside `dir` and names the file\n* that boots. An `entry` that resolves outside `dir` is rejected rather than\n* followed — only `dir` is ever copied.\n*/\nasync function resolveDir(dirSpec, entrySpec, moduleDir) {\n\tconst dirPath = path.resolve(moduleDir, dirSpec);\n\tif (!fs.existsSync(dirPath)) throw new Error(`no built directory at ${dirPath} — run your build first (the build adapter's dir, \"${dirSpec}\", resolves against dirname(module)).`);\n\tif (!fs.statSync(dirPath).isDirectory()) throw new Error(`the build adapter's dir (\"${dirPath}\") is not a directory — drop dir to deploy a single built file, naming it as entry.`);\n\tconst entryPath = path.resolve(dirPath, entrySpec);\n\tif (!entryPath.startsWith(dirPath + path.sep)) throw new Error(`the build adapter's entry (\"${entrySpec}\") resolves to ${entryPath}, which is not inside dir (\"${dirPath}\") — in the directory form entry names a file inside dir, and only dir is copied.`);\n\tif (!fs.existsSync(entryPath) || !fs.statSync(entryPath).isFile()) throw new Error(`no built entry at ${entryPath} — run your build first (the build adapter's entry, \"${entrySpec}\", resolves inside dir, \"${dirPath}\").`);\n\tawait assertNoSymlinks(dirPath);\n\treturn {\n\t\tsource: dirPath,\n\t\tsourceField: \"dir\",\n\t\tentry: path.relative(dirPath, entryPath).split(path.sep).join(\"/\"),\n\t\tcopyInto: (bundleDir) => fs.promises.cp(dirPath, bundleDir, { recursive: true })\n\t};\n}\n/**\n* Compute's packager rejects symlinks, so a tree containing one cannot deploy.\n* We fail here, naming the links, rather than dereferencing them on the copy:\n* the artifact must be what the author's build produced (ADR-0005), and\n* following a link that points outside `dir` would pull in files the author\n* never named. The walk reads dirents (lstat semantics), so a symlinked\n* directory is reported and never descended into.\n*/\nasync function assertNoSymlinks(dirPath) {\n\tconst found = [];\n\tconst walk = async (current) => {\n\t\tfor (const entry of await fs.promises.readdir(current, { withFileTypes: true })) {\n\t\t\tconst full = path.join(current, entry.name);\n\t\t\tif (entry.isSymbolicLink()) found.push(full);\n\t\t\telse if (entry.isDirectory()) await walk(full);\n\t\t}\n\t};\n\tawait walk(dirPath);\n\tif (found.length === 0) return;\n\tconst listed = found.slice(0, 5).join(\", \");\n\tthrow new Error(`the build adapter's dir (\"${dirPath}\") contains symlinks, which the platform's packager rejects: ${listed}${found.length > 5 ? `, and ${found.length - 5} more` : \"\"}. The tree is copied verbatim, so make your build emit real files in dir (for example, a hoisted node_modules, or dereference the links into dir with cp -RL).`);\n}\n/**\n* The working dir is cleared on every assemble, so it must not overlap the copy\n* source: inside it, the rm would delete the source before the copy; the other\n* way round, the copy would recurse into its own output.\n*/\nfunction assertOutsideWorkDir(runnable, workDir) {\n\tconst { source, sourceField } = runnable;\n\tif (source === workDir || source.startsWith(workDir + path.sep)) throw new Error(`the build adapter's ${sourceField} (\"${source}\") resolves inside the deploy working dir (\"${workDir}\"), which is cleared on every assemble — point ${sourceField} at your build output elsewhere.`);\n\tif (workDir.startsWith(source + path.sep)) throw new Error(`the deploy working dir (\"${workDir}\") sits inside the build adapter's ${sourceField} (\"${source}\"), so assembling would copy the artifact into itself — point ${sourceField} at your build output elsewhere.`);\n}\nasync function assemble(input) {\n\tif (!isNodeBuild(input.build)) throw new Error(`@prisma/composer/node/control: expected a \"node\" build adapter, got \"${input.build.type}\".`);\n\tconst buildDescriptor = input.build;\n\tconst serviceModule = fileURLToPath(buildDescriptor.module);\n\tconst moduleDir = path.dirname(serviceModule);\n\tconst runnable = buildDescriptor.dir === void 0 ? resolveFile(buildDescriptor.entry, moduleDir) : await resolveDir(buildDescriptor.dir, buildDescriptor.entry, moduleDir);\n\tconst workDir = path.join(input.cwd, \".prisma-composer\", \"artifacts\", input.address);\n\tassertOutsideWorkDir(runnable, workDir);\n\tawait fs.promises.rm(workDir, {\n\t\trecursive: true,\n\t\tforce: true\n\t});\n\tawait fs.promises.mkdir(workDir, { recursive: true });\n\tawait build({\n\t\tentryPoints: { main: serviceModule },\n\t\toutdir: workDir,\n\t\tbundle: true,\n\t\tformat: \"esm\",\n\t\tplatform: \"node\",\n\t\texternal: [\"bun\", \"bun:*\"],\n\t\toutExtension: { \".js\": \".mjs\" }\n\t});\n\tif (!fs.existsSync(path.join(workDir, \"main.mjs\"))) throw new Error(`esbuild produced no main.mjs in ${workDir}`);\n\tawait runnable.copyInto(path.join(workDir, \"bundle\"));\n\treturn {\n\t\tdir: workDir,\n\t\tentry: path.posix.join(\"bundle\", runnable.entry)\n\t};\n}\n/** The node build extension descriptor — `prisma-composer.config.ts` lists it under `extensions`. */\nconst nodeBuild = () => ({\n\tid: \"@prisma/composer/node\",\n\tnodes: { node: {\n\t\tkind: \"build\",\n\t\tassemble\n\t} }\n});\n//#endregion\nexport { assemble, nodeBuild };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,SAAS,YAAY,YAAY;CAChC,OAAO,WAAW,SAAS,WAAW,EAAE,SAAS,eAAe,OAAO,WAAW,QAAQ;AAC3F;;AAEA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AK,IAAI,YAAY,gBAAgB,OAAO,SAAS,IAAI,MAAM,WAAW,gBAAgB,KAAK,gBAAgB,OAAO,SAAS;CACxK,MAAM,UAAU,KAAK,KAAK,MAAM,KAAK,oBAAoB,aAAa,MAAM,OAAO;CACnF,qBAAqB,UAAU,OAAO;CACtC,MAAM,GAAG,SAAS,GAAG,SAAS;EAC7B,WAAW;EACX,OAAO;CACR,CAAC;CACD,MAAM,GAAG,SAAS,MAAM,SAAS,EAAE,WAAW,KAAK,CAAC;CACpD,MAAM,MAAM;EACX,aAAa,EAAE,MAAM,cAAc;EACnC,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,UAAU;EACV,UAAU,CAAC,OAAO,OAAO;EACzB,cAAc,EAAE,OAAO,OAAO;CAC/B,CAAC;CACD,IAAI,CAAC,GAAG,WAAW,KAAK,KAAK,SAAS,UAAU,CAAC,GAAG,MAAM,IAAI,MAAM,mCAAmC,SAAS;CAChH,MAAM,SAAS,SAAS,KAAK,KAAK,SAAS,QAAQ,CAAC;CACpD,OAAO;EACN,KAAK;EACL,OAAO,KAAK,MAAM,KAAK,UAAU,SAAS,KAAK;CAChD;AACD;;AAEA,MAAM,mBAAmB;CACxB,IAAI;CACJ,OAAO,EAAE,MAAM;EACd,MAAM;EACN;CACD,EAAE;AACH"}
|
|
1
|
+
{"version":3,"file":"node-control.mjs","names":[],"sources":["../../../0-framework/2-authoring/node/dist/control.mjs"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { build } from \"esbuild\";\n//#region src/control/build.ts\n/**\n* The extension's control entry (ADR-0017): `nodeBuild()` returns the build\n* descriptor `prisma-composer.config.ts` lists. Deploy-only (ADR-0005): the user\n* builds their own runnable; `assemble` copies what they built under `bundle/`\n* and adds the framework's boot wrapper — it never bundles or transforms the\n* app's code.\n*\n* Two forms, chosen by the descriptor: without `dir`, `entry` is a single\n* self-contained file and only that file is copied. With `dir`, the whole\n* directory is copied verbatim and `entry` names the file inside it that boots.\n* Neither form discovers anything — no tree-walking for an entry, no filename\n* heuristics; the author states the paths and we copy exactly those.\n*\n* The wrapper is a SEPARATE esbuild build of the service module (declarations\n* only, whose node carries run()/load()), emitted as `main.mjs` at the\n* working-dir root — a dictated name (object entry `{ main }`), not a\n* discovered one. run() and the app entry must be independent module instances\n* that hand off through process.env, so the wrapper is its own self-contained\n* build; `@prisma/*` is inlined, `bun` is a Compute built-in.\n*\n* Artifact layout: `<cwd>/.prisma-composer/artifacts/<address>/` (deploy-owned,\n* ADR-0005) holds `main.mjs` at the root and the app's built runnable under\n* `bundle/`.\n*/\n/** Narrows the shared BuildAdapter to this extension's own descriptor — the value-level mirror of the registry routing on (extension, type). `dir` is optional: absent is the single-file form. */\nfunction isNodeBuild(descriptor) {\n\treturn descriptor.type === \"node\" && (!(\"dir\" in descriptor) || typeof descriptor.dir === \"string\");\n}\n/** The single-file form: `entry` is the whole built runnable, resolved against dirname(module) (ADR-0004). */\nfunction resolveFile(entrySpec, moduleDir) {\n\tconst entryPath = path.resolve(moduleDir, entrySpec);\n\tif (!fs.existsSync(entryPath)) throw new Error(`no built entry at ${entryPath} — run your build first (the build adapter's entry, \"${entrySpec}\", resolves against dirname(module)).`);\n\tconst entryFile = path.basename(entryPath);\n\treturn {\n\t\tsource: entryPath,\n\t\tsourceField: \"entry\",\n\t\tentry: entryFile,\n\t\tcopyInto: async (bundleDir) => {\n\t\t\tawait fs.promises.mkdir(bundleDir, { recursive: true });\n\t\t\tawait fs.promises.copyFile(entryPath, path.join(bundleDir, entryFile));\n\t\t}\n\t};\n}\n/** The shared \"dir contains symlinks\" error, reused by both the root-is-a-symlink case and the nested-symlink walk below — one message shape, never two to drift apart. */\nfunction symlinksFoundError(dirPath, found) {\n\tconst listed = found.slice(0, 5).join(\", \");\n\treturn /* @__PURE__ */ new Error(`the build adapter's dir (\"${dirPath}\") contains symlinks, which the platform's packager rejects: ${listed}${found.length > 5 ? `, and ${found.length - 5} more` : \"\"}. The tree is copied verbatim, so make your build emit real files in dir (for example, a hoisted node_modules, or dereference the links into dir with cp -RL).`);\n}\n/**\n* Compute's packager rejects symlinks, so a tree containing one cannot deploy.\n* We fail here, naming the links, rather than dereferencing them on the copy:\n* the artifact must be what the author's build produced (ADR-0005), and\n* following a link that points outside `dir` would pull in files the author\n* never named. The walk reads dirents (lstat semantics), so a symlinked\n* directory is reported and never descended into. Checks only `dirPath`'s\n* children — the caller (`resolveDir`) checks `dirPath` itself before this\n* runs, since that check also decides \"not a directory\" vs \"is a symlink\"\n* and must happen before any dereferencing stat.\n*/\nasync function assertNoSymlinks(dirPath) {\n\tconst found = [];\n\tconst walk = async (current) => {\n\t\tfor (const entry of await fs.promises.readdir(current, { withFileTypes: true })) {\n\t\t\tconst full = path.join(current, entry.name);\n\t\t\tif (entry.isSymbolicLink()) found.push(full);\n\t\t\telse if (entry.isDirectory()) await walk(full);\n\t\t}\n\t};\n\tawait walk(dirPath);\n\tif (found.length > 0) throw symlinksFoundError(dirPath, found);\n}\n/**\n* The directory form: `dir` is the built tree, resolved against dirname(module)\n* (ADR-0004) and copied whole; `entry` resolves inside `dir` and names the file\n* that boots. An `entry` that resolves outside `dir` is rejected rather than\n* followed — only `dir` is ever copied.\n*\n* `dir` itself can be a symlink — not just something inside it. `lstat` it\n* before anything else so that case hard-errors identically whether the link\n* points at a real directory (which a dereferencing `stat` would otherwise\n* accept as \"is a directory\") or at a file: neither is ever silently\n* dereferenced and copied (ADR-0005).\n*/\nasync function resolveDir(dirSpec, entrySpec, moduleDir) {\n\tconst dirPath = path.resolve(moduleDir, dirSpec);\n\tlet dirLstat;\n\ttry {\n\t\tdirLstat = await fs.promises.lstat(dirPath);\n\t} catch {\n\t\tthrow new Error(`no built directory at ${dirPath} — run your build first (the build adapter's dir, \"${dirSpec}\", resolves against dirname(module)).`);\n\t}\n\tif (dirLstat.isSymbolicLink()) throw symlinksFoundError(dirPath, [dirPath]);\n\tif (!dirLstat.isDirectory()) throw new Error(`the build adapter's dir (\"${dirPath}\") is not a directory — drop dir to deploy a single built file, naming it as entry.`);\n\tconst entryPath = path.resolve(dirPath, entrySpec);\n\tif (!entryPath.startsWith(dirPath + path.sep)) throw new Error(`the build adapter's entry (\"${entrySpec}\") resolves to ${entryPath}, which is not inside dir (\"${dirPath}\") — in the directory form entry names a file inside dir, and only dir is copied.`);\n\tif (!fs.existsSync(entryPath) || !fs.statSync(entryPath).isFile()) throw new Error(`no built entry at ${entryPath} — run your build first (the build adapter's entry, \"${entrySpec}\", resolves inside dir, \"${dirPath}\").`);\n\tawait assertNoSymlinks(dirPath);\n\treturn {\n\t\tsource: dirPath,\n\t\tsourceField: \"dir\",\n\t\tentry: path.relative(dirPath, entryPath).split(path.sep).join(\"/\"),\n\t\tcopyInto: (bundleDir) => fs.promises.cp(dirPath, bundleDir, { recursive: true })\n\t};\n}\n/**\n* The working dir is cleared on every assemble, so it must not overlap the copy\n* source: inside it, the rm would delete the source before the copy; the other\n* way round, the copy would recurse into its own output.\n*/\nfunction assertOutsideWorkDir(runnable, workDir) {\n\tconst { source, sourceField } = runnable;\n\tif (source === workDir || source.startsWith(workDir + path.sep)) throw new Error(`the build adapter's ${sourceField} (\"${source}\") resolves inside the deploy working dir (\"${workDir}\"), which is cleared on every assemble — point ${sourceField} at your build output elsewhere.`);\n\tif (workDir.startsWith(source + path.sep)) throw new Error(`the deploy working dir (\"${workDir}\") sits inside the build adapter's ${sourceField} (\"${source}\"), so assembling would copy the artifact into itself — point ${sourceField} at your build output elsewhere.`);\n}\nasync function assemble(input) {\n\tif (!isNodeBuild(input.build)) throw new Error(`@prisma/composer/node/control: expected a \"node\" build adapter, got \"${input.build.type}\".`);\n\tconst buildDescriptor = input.build;\n\tconst serviceModule = fileURLToPath(buildDescriptor.module);\n\tconst moduleDir = path.dirname(serviceModule);\n\tconst runnable = buildDescriptor.dir === void 0 ? resolveFile(buildDescriptor.entry, moduleDir) : await resolveDir(buildDescriptor.dir, buildDescriptor.entry, moduleDir);\n\tconst workDir = path.join(input.cwd, \".prisma-composer\", \"artifacts\", input.address);\n\tassertOutsideWorkDir(runnable, workDir);\n\tawait fs.promises.rm(workDir, {\n\t\trecursive: true,\n\t\tforce: true\n\t});\n\tawait fs.promises.mkdir(workDir, { recursive: true });\n\tawait build({\n\t\tentryPoints: { main: serviceModule },\n\t\toutdir: workDir,\n\t\tbundle: true,\n\t\tformat: \"esm\",\n\t\tplatform: \"node\",\n\t\texternal: [\"bun\", \"bun:*\"],\n\t\toutExtension: { \".js\": \".mjs\" }\n\t});\n\tif (!fs.existsSync(path.join(workDir, \"main.mjs\"))) throw new Error(`esbuild produced no main.mjs in ${workDir}`);\n\tawait runnable.copyInto(path.join(workDir, \"bundle\"));\n\treturn {\n\t\tdir: workDir,\n\t\tentry: path.posix.join(\"bundle\", runnable.entry),\n\t\twatch: [runnable.source]\n\t};\n}\n/** The node build extension descriptor — `prisma-composer.config.ts` lists it under `extensions`. */\nconst nodeBuild = () => ({\n\tid: \"@prisma/composer/node\",\n\tnodes: { node: {\n\t\tkind: \"build\",\n\t\tassemble\n\t} }\n});\n//#endregion\nexport { assemble, nodeBuild };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,SAAS,YAAY,YAAY;CAChC,OAAO,WAAW,SAAS,WAAW,EAAE,SAAS,eAAe,OAAO,WAAW,QAAQ;AAC3F;;AAEA,SAAS,YAAY,WAAW,WAAW;CAC1C,MAAM,YAAY,KAAK,QAAQ,WAAW,SAAS;CACnD,IAAI,CAAC,GAAG,WAAW,SAAS,GAAG,MAAM,IAAI,MAAM,qBAAqB,UAAU,uDAAuD,UAAU,sCAAsC;CACrL,MAAM,YAAY,KAAK,SAAS,SAAS;CACzC,OAAO;EACN,QAAQ;EACR,aAAa;EACb,OAAO;EACP,UAAU,OAAO,cAAc;GAC9B,MAAM,GAAG,SAAS,MAAM,WAAW,EAAE,WAAW,KAAK,CAAC;GACtD,MAAM,GAAG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AAU,OAAO;CACtC,MAAM,GAAG,SAAS,GAAG,SAAS;EAC7B,WAAW;EACX,OAAO;CACR,CAAC;CACD,MAAM,GAAG,SAAS,MAAM,SAAS,EAAE,WAAW,KAAK,CAAC;CACpD,MAAM,MAAM;EACX,aAAa,EAAE,MAAM,cAAc;EACnC,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,UAAU;EACV,UAAU,CAAC,OAAO,OAAO;EACzB,cAAc,EAAE,OAAO,OAAO;CAC/B,CAAC;CACD,IAAI,CAAC,GAAG,WAAW,KAAK,KAAK,SAAS,UAAU,CAAC,GAAG,MAAM,IAAI,MAAM,mCAAmC,SAAS;CAChH,MAAM,SAAS,SAAS,KAAK,KAAK,SAAS,QAAQ,CAAC;CACpD,OAAO;EACN,KAAK;EACL,OAAO,KAAK,MAAM,KAAK,UAAU,SAAS,KAAK;EAC/C,OAAO,CAAC,SAAS,MAAM;CACxB;AACD;;AAEA,MAAM,mBAAmB;CACxB,IAAI;CACJ,OAAO,EAAE,MAAM;EACd,MAAM;EACN;CACD,EAAE;AACH"}
|
package/dist/node.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as BuildAdapter } from "./graph-types-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { t as BuildAdapter } from "./graph-types-BcbVhojU-C3fhxjPK.mjs";
|
|
2
|
+
import "./index-BFBNz7Aw.mjs";
|
|
3
3
|
//#region ../../0-framework/2-authoring/node/dist/index.d.mts
|
|
4
4
|
//#region src/node.d.ts
|
|
5
5
|
/** The node build adapter's descriptor. `dir` is the directory form's own extra path input (the built tree to copy verbatim), beyond the shared `{ extension, type, module, entry }`; absent, `entry` is the whole built runnable. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.d.mts","names":[],"sources":["../../../0-framework/2-authoring/node/dist/index.d.mts"],"mappings":";;;;;UAGU,yBAAyB;WACxB;WACA;;;KAGN;EACH;EACA;EACA;;EAEA;EACA;EACA;;cAEY,YAAY,MAAM,qBAAqB"}
|
package/dist/report.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./deploy-
|
|
1
|
+
import { d as DeploymentResult } from "./app-config-Dw3r7sUa-D3dr8rg2.mjs";
|
|
2
|
+
import "./deploy-121C4hAb.mjs";
|
|
3
3
|
//#region ../../0-framework/3-tooling/cli/dist/report.d.mts
|
|
4
4
|
//#region src/render-deployment.d.ts
|
|
5
5
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report.d.mts","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/report.d.mts"],"mappings":";;;;;;;;iBAMiB,iBAAiB,QAAQ;;;;;iBAKzB,iBAAiB,QAAQ"}
|
package/dist/service-rpc.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
1
|
+
import { A as ProvisionNeed, F as RunnableServiceNode, o as Contract, s as DependencyEnd } from "./graph-types-BcbVhojU-C3fhxjPK.mjs";
|
|
2
|
+
import "./index-BFBNz7Aw.mjs";
|
|
3
3
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
4
4
|
//#region ../../0-framework/2-authoring/service-rpc/dist/index.d.mts
|
|
5
5
|
//#region src/rpc.d.ts
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-rpc.d.mts","names":[],"sources":["../../../0-framework/2-authoring/service-rpc/dist/index.d.mts"],"mappings":";;;;;;cAIc;;cAEA,uBAAuB;;KAEhC,SAAS,gBAAgB,eAAe;iBAC5B,IAAI,UAAU,kBAAkB,UAAU,kBAAkB;EAC3E,OAAO;EACP,QAAQ;KACL,OAAO,iBAAiB,WAAW,OAAO,QAAQ,iBAAiB,YAAY;iBACnE,IAAI,UAAU,gBAAgB,SAAS,UAAU,IAAI,cAAc,OAAO,IAAI;;KAE1F,OAAO,KAAK,UAAU,uBAAuB,OAAO;;;;;;;;KAQpD,aAAa,KAAK,YAAY,QAAQ;iBAC1B,WAAW,UAAU,gBAAgB,SAAS,UAAU,GAAG,aAAa;EACvF,QAAQ;EACR;IACE,OAAO;;;iBAGM,SAAS,YAAY,gBAAgB,eAAe,eAAe,KAAK,MAAM,gBAAgB;;;;cAIjG;KACT,cAAc;KACd,MAAM,KAAK,UAAU,uBAAuB,OAAO;;UAE9C;;WAEC;;KAEN,WAAW,IAAI,cAAc,aAAa,aAAa,MAAM,cAAc,OAAO,OAAO,GAAG,MAAM,YAAY,KAAK,sBAAsB,QAAQ;;KAEjJ,SAAS,UAAU,kBAAkB,cAAc,YAAY,kBAAkB,WAAW,MAAM,YAAY,aAAa,SAAS,WAAW,MAAM,YAAY,aAAa,OAAO,IAAI,WAAW;;;;;;;;;;;iBAWxL,MAAM,UAAU,aAAa,UAAU,SAAS,IAAI,SAAS,GAAG,UAAU,KAAK,KAAK,YAAY,QAAQ"}
|
package/dist/service-rpc.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as blindCast } from "./casts-Ci5rYYaR.mjs";
|
|
2
|
-
import { i as dependency, p as provisionNeed } from "./graph-
|
|
3
|
-
import { l as string } from "./dist-
|
|
2
|
+
import { i as dependency, p as provisionNeed } from "./graph-CP16cJyH-D5IW87Y-.mjs";
|
|
3
|
+
import { l as string } from "./dist-BkSJOwTm.mjs";
|
|
4
4
|
//#region ../../0-framework/2-authoring/service-rpc/dist/index.mjs
|
|
5
5
|
/** Bounded jittered backoff for retrying a dropped call. `maxRetries` is retries after the first attempt. */
|
|
6
6
|
const RETRY = {
|
package/dist/testing.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as RunnableServiceNode, U as Values, V as Secrets, c as Deps, k as Params, m as HydratedDeps, u as Expose } from "./graph-types-BcbVhojU-C3fhxjPK.mjs";
|
|
2
2
|
//#region ../../0-framework/1-core/core/dist/testing.d.mts
|
|
3
3
|
//#region src/testing.d.ts
|
|
4
4
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.d.mts","names":[],"sources":["../../../0-framework/1-core/core/dist/testing.d.mts"],"mappings":";;;;;;;;;;KASK,cAAc,UAAU,MAAM,UAAU,UAAU,aAAa,KAAK,QAAQ,OAAO;;;;;;;;;iBASvE,YAAY,UAAU,MAAM,UAAU,QAAQ,UAAU,QAAQ,UAAU,SAAS,SAAS,oBAAoB,GAAG,GAAG,GAAG,IAAI,WAAW,cAAc,GAAG,KAAK,oBAAoB,GAAG,GAAG,GAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/composer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-dev.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Prisma Composer — build a Prisma App by composing Modules. Core authoring, deploy pipeline, the prisma-composer CLI, and the service-rpc/node/nextjs authoring surfaces.",
|
|
6
6
|
"bin": {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
".": "./dist/index.mjs",
|
|
11
11
|
"./config": "./dist/config.mjs",
|
|
12
12
|
"./deploy": "./dist/deploy.mjs",
|
|
13
|
+
"./local-target": "./dist/local-target.mjs",
|
|
13
14
|
"./report": "./dist/report.mjs",
|
|
14
15
|
"./testing": "./dist/testing.mjs",
|
|
15
16
|
"./casts": "./dist/casts.mjs",
|
|
@@ -22,7 +23,8 @@
|
|
|
22
23
|
"./package.json": "./package.json"
|
|
23
24
|
},
|
|
24
25
|
"files": [
|
|
25
|
-
"dist"
|
|
26
|
+
"dist",
|
|
27
|
+
"src"
|
|
26
28
|
],
|
|
27
29
|
"dependencies": {
|
|
28
30
|
"@standard-schema/spec": "^1.1.0",
|
|
@@ -36,15 +38,15 @@
|
|
|
36
38
|
"@prisma/management-api-sdk": "^1.50.0"
|
|
37
39
|
},
|
|
38
40
|
"devDependencies": {
|
|
39
|
-
"@internal/assemble": "0.
|
|
40
|
-
"@internal/cli": "0.
|
|
41
|
-
"@internal/core": "0.
|
|
42
|
-
"@internal/foundation": "0.
|
|
43
|
-
"@internal/lowering": "0.
|
|
44
|
-
"@internal/nextjs": "0.
|
|
45
|
-
"@internal/node": "0.
|
|
46
|
-
"@internal/service-rpc": "0.
|
|
47
|
-
"@internal/tsdown-config": "0.
|
|
41
|
+
"@internal/assemble": "0.3.0-dev.1",
|
|
42
|
+
"@internal/cli": "0.3.0-dev.1",
|
|
43
|
+
"@internal/core": "0.3.0-dev.1",
|
|
44
|
+
"@internal/foundation": "0.3.0-dev.1",
|
|
45
|
+
"@internal/lowering": "0.3.0-dev.1",
|
|
46
|
+
"@internal/nextjs": "0.3.0-dev.1",
|
|
47
|
+
"@internal/node": "0.3.0-dev.1",
|
|
48
|
+
"@internal/service-rpc": "0.3.0-dev.1",
|
|
49
|
+
"@internal/tsdown-config": "0.3.0-dev.1",
|
|
48
50
|
"@types/node": "^25.9.3",
|
|
49
51
|
"tsdown": "^0.22.7",
|
|
50
52
|
"typescript": "^6.0.3"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@internal/foundation/assertions';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@internal/foundation/casts';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@internal/core/config';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@internal/core/deploy';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@internal/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@internal/core/local-target';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@internal/nextjs/control';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@internal/node/control';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@internal/cli/report';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@internal/service-rpc';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@internal/core/testing';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./app-config-DJdU4ubR-BwioNK8j.mjs";
|
package/dist/config.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.mjs","names":[],"sources":["../../../0-framework/1-core/core/dist/config.mjs"],"sourcesContent":["import { n as containerEnvVarName, r as deserializeContainers, t as containerEnv } from \"./container-transport-DKmKg5JQ.mjs\";\n//#region src/control/app-config.ts\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 { containerEnv, containerEnvVarName, defineConfig, deserializeContainers };\n\n//# sourceMappingURL=config.mjs.map"],"mappings":";;;AAGA,SAAS,aAAa,QAAQ;CAC7B,OAAO;AACR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./app-config-DJdU4ubR-BwioNK8j.mjs";
|