@prisma/composer 0.1.0 → 0.2.0-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-config-BPb3LCdH-CH7b8Khi.d.mts +411 -0
- package/dist/app-config-BPb3LCdH-CH7b8Khi.d.mts.map +1 -0
- package/dist/assertions.d.mts +1 -1
- package/dist/assertions.d.mts.map +1 -0
- package/dist/bin.mjs +166 -256
- package/dist/bin.mjs.map +1 -1
- package/dist/casts.d.mts +1 -1
- package/dist/casts.d.mts.map +1 -0
- package/dist/config-Cqu_-Hna.d.mts +1 -0
- package/dist/config.d.mts +3 -2
- package/dist/config.mjs +2 -1
- package/dist/config.mjs.map +1 -1
- package/dist/container-transport-DKmKg5JQ-DKWs0ubK.mjs +45 -0
- package/dist/container-transport-DKmKg5JQ-DKWs0ubK.mjs.map +1 -0
- package/dist/deploy-Cqu_-Hna.d.mts +1 -0
- package/dist/deploy.d.mts +3 -2
- package/dist/deploy.mjs +181 -23
- package/dist/deploy.mjs.map +1 -1
- package/dist/{dist-zBU8ASQW.mjs → dist-B0axxnBf.mjs} +16 -4
- package/dist/dist-B0axxnBf.mjs.map +1 -0
- package/dist/{graph-BYdCQKya-BI0njTow.mjs → graph-BmrUEdo9-6Oq1hSmS.mjs} +102 -9
- package/dist/graph-BmrUEdo9-6Oq1hSmS.mjs.map +1 -0
- package/dist/graph-DUSgjmzA-DhtkTqoz.d.mts +18 -0
- package/dist/graph-DUSgjmzA-DhtkTqoz.d.mts.map +1 -0
- package/dist/{config-ob5OhCSP-sP3GW3uu.d.mts → graph-types-BcbVhojU-C3fhxjPK.d.mts} +205 -114
- package/dist/graph-types-BcbVhojU-C3fhxjPK.d.mts.map +1 -0
- package/dist/{index-CZSc9drz.d.mts → index-BFBNz7Aw.d.mts} +5 -20
- package/dist/index-BFBNz7Aw.d.mts.map +1 -0
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +3 -3
- package/dist/{index-Dh4Zro0y.d.mts → nextjs-DLyeRR7M-DwnBjryZ.d.mts} +6 -5
- package/dist/nextjs-DLyeRR7M-DwnBjryZ.d.mts.map +1 -0
- package/dist/nextjs-control.d.mts +6 -5
- package/dist/nextjs-control.d.mts.map +1 -0
- package/dist/nextjs-control.mjs +7 -10
- package/dist/nextjs-control.mjs.map +1 -1
- package/dist/nextjs.d.mts +2 -2
- package/dist/nextjs.mjs.map +1 -1
- package/dist/node-control.d.mts +5 -3
- package/dist/node-control.d.mts.map +1 -0
- package/dist/node-control.mjs +96 -24
- package/dist/node-control.mjs.map +1 -1
- package/dist/node.d.mts +18 -5
- package/dist/node.d.mts.map +1 -0
- package/dist/node.mjs +2 -1
- package/dist/node.mjs.map +1 -1
- package/dist/report.d.mts +17 -0
- package/dist/report.d.mts.map +1 -0
- package/dist/report.mjs +79 -0
- package/dist/report.mjs.map +1 -0
- package/dist/service-rpc.d.mts +61 -0
- package/dist/service-rpc.d.mts.map +1 -0
- package/dist/service-rpc.mjs +353 -0
- package/dist/service-rpc.mjs.map +1 -0
- package/dist/testing.d.mts +2 -3
- package/dist/testing.d.mts.map +1 -0
- package/package.json +20 -18
- 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/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/app-config-BUqyK6N6-CVq3uvHF.d.mts +0 -188
- package/dist/config-BVVgDSdq.d.mts +0 -1
- package/dist/deploy-BVVgDSdq.d.mts +0 -1
- package/dist/dist-zBU8ASQW.mjs.map +0 -1
- package/dist/graph-BYdCQKya-BI0njTow.mjs.map +0 -1
- package/dist/rpc.d.mts +0 -43
- package/dist/rpc.mjs +0 -132
- package/dist/rpc.mjs.map +0 -1
- package/dist/tsdown.d.mts +0 -9
- package/dist/tsdown.mjs +0 -35
- package/dist/tsdown.mjs.map +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
2
|
-
|
|
3
2
|
//#region ../../0-framework/0-foundation/foundation/dist/secret.d.mts
|
|
4
3
|
//#region src/secret.d.ts
|
|
5
4
|
/**
|
|
@@ -23,9 +22,111 @@ declare class SecretBox<T> {
|
|
|
23
22
|
[Symbol.toPrimitive](): string;
|
|
24
23
|
}
|
|
25
24
|
/** The common case: a secret string. */
|
|
26
|
-
type SecretString = SecretBox<string>;
|
|
25
|
+
type SecretString = SecretBox<string>;
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region ../../0-framework/1-core/core/dist/graph-types-BcbVhojU.d.mts
|
|
28
|
+
//#region src/config.d.ts
|
|
29
|
+
/**
|
|
30
|
+
* A declared config param — pure data: a caller-owned Standard Schema
|
|
31
|
+
* (ADR-0018) plus a few framework facets. The framework carries the schema,
|
|
32
|
+
* infers the value type from it, and validates with it, without ever
|
|
33
|
+
* enumerating permitted shapes. Turning a value into stored config and back is
|
|
34
|
+
* the deploy target's job, not the param's (ADR-0019) — the same split RPC
|
|
35
|
+
* uses: schema on the declaration, wire owned by the mover.
|
|
36
|
+
*/
|
|
37
|
+
interface ConfigParam<S extends StandardSchemaV1 = StandardSchemaV1> {
|
|
38
|
+
readonly schema: S;
|
|
39
|
+
readonly optional?: boolean;
|
|
40
|
+
readonly default?: StandardSchemaV1.InferOutput<S>;
|
|
41
|
+
/**
|
|
42
|
+
* A framework-minted value (ADR-0031): core resolves `provision.brand`
|
|
43
|
+
* against the consumer extension's `provisions` registry and mints this
|
|
44
|
+
* param's value per dependency edge. Opaque — core forwards the need and
|
|
45
|
+
* never reads its payload.
|
|
46
|
+
*/
|
|
47
|
+
readonly provision?: ProvisionNeed;
|
|
48
|
+
}
|
|
49
|
+
type Params = Record<string, ConfigParam>;
|
|
50
|
+
/** What implementations receive — undefined only for optional params with no default. */
|
|
51
|
+
type Values<P extends Params> = { readonly [K in keyof P]: P[K]['optional'] extends true ? undefined extends P[K]['default'] ? StandardSchemaV1.InferOutput<P[K]['schema']> | undefined : StandardSchemaV1.InferOutput<P[K]['schema']> : StandardSchemaV1.InferOutput<P[K]['schema']>; };
|
|
52
|
+
/**
|
|
53
|
+
* The connection face of a dependency: declared params (data) and how
|
|
54
|
+
* validated values become a client (the hydrate behavior slot). Both P and C
|
|
55
|
+
* are INFERRED — the declaration types hydrate's input; the factory types the
|
|
56
|
+
* loaded dep.
|
|
57
|
+
*/
|
|
58
|
+
interface Connection<P extends Params = Params, C = unknown> {
|
|
59
|
+
readonly params: P;
|
|
60
|
+
hydrate(values: Values<P>): C | Promise<C>;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The enumerable config surface of a service — derivable from the graph
|
|
64
|
+
* alone, nothing booted, no platform keys. The introspection artifact (values
|
|
65
|
+
* absent). `schema` is a data-only projection of the param's Standard Schema
|
|
66
|
+
* (JSON Schema when the vendor supports the optional conversion, a `{ vendor }`
|
|
67
|
+
* tag otherwise) — never the param's functions. Physical locations are the
|
|
68
|
+
* target pack's business. Secrets are not here — they live on their own slot.
|
|
69
|
+
*/
|
|
70
|
+
interface ConfigDeclaration {
|
|
71
|
+
readonly owner: 'service' | {
|
|
72
|
+
readonly input: string;
|
|
73
|
+
};
|
|
74
|
+
readonly name: string;
|
|
75
|
+
readonly schema: Readonly<Record<string, unknown>>;
|
|
76
|
+
readonly optional: boolean;
|
|
77
|
+
readonly default: unknown;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The resolved, typed configuration of one service — what crosses the
|
|
81
|
+
* core→pack boundary. Core builds it at deploy (leaf values are provisioning
|
|
82
|
+
* refs, so the env writes depend on the resources/producer — the ordering
|
|
83
|
+
* edges); the pack serializes it, and at boot reconstructs the identical
|
|
84
|
+
* structure with concrete values. Both forms conform to the shape from
|
|
85
|
+
* configOf. Core never stringifies.
|
|
86
|
+
*/
|
|
87
|
+
interface Config {
|
|
88
|
+
readonly service: Readonly<Record<string, unknown>>;
|
|
89
|
+
readonly inputs: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Enumerates every config param the service declares: each input's connection
|
|
93
|
+
* params, then the service's own params. Pure — reads `root.inputs`/`params`
|
|
94
|
+
* directly, executes nothing but the (also pure) schema projection. Deliberately
|
|
95
|
+
* does not go through `Load`: a service's connection-end inputs are legitimately
|
|
96
|
+
* unwired from its own point of view (wiring is an enclosing module's concern),
|
|
97
|
+
* and this introspects one service's declared shape regardless of how — or
|
|
98
|
+
* whether — it composes into a larger graph.
|
|
99
|
+
*/
|
|
100
|
+
declare function configOf(root: ServiceNode): readonly ConfigDeclaration[];
|
|
101
|
+
/**
|
|
102
|
+
* The app's provision manifest: every secret binding the root resolved across
|
|
103
|
+
* the graph (ADR-0029) — an opaque, target-defined source per service secret
|
|
104
|
+
* slot; a deploy target's preflight reads its own payload. Pure graph
|
|
105
|
+
* introspection, TARGET-AGNOSTIC — the target consumes it to verify each secret
|
|
106
|
+
* exists on the platform before deploy. The values are provisioned out-of-band.
|
|
107
|
+
*/
|
|
108
|
+
declare function provisionManifest(graph: Graph): readonly SecretBinding[];
|
|
109
|
+
/**
|
|
110
|
+
* The app's param-binding manifest: every param a `provision()` call bound —
|
|
111
|
+
* literal or an opaque, target-defined `ParamSource` — at the address that
|
|
112
|
+
* declared it. The param sibling of `provisionManifest`, for a deploy
|
|
113
|
+
* target's own preflight to consume (D2). Pure graph introspection,
|
|
114
|
+
* TARGET-AGNOSTIC; a param this manifest omits simply falls back to its own
|
|
115
|
+
* `default` at `buildConfig`.
|
|
116
|
+
*/
|
|
117
|
+
declare function paramManifest(graph: Graph): readonly ParamBinding[];
|
|
118
|
+
interface ParamOptions<T> {
|
|
119
|
+
readonly optional?: boolean;
|
|
120
|
+
readonly default?: T;
|
|
121
|
+
readonly provision?: ProvisionNeed;
|
|
122
|
+
}
|
|
123
|
+
/** A string-valued param. */
|
|
124
|
+
declare function string(opts?: ParamOptions<string>): ConfigParam<StandardSchemaV1<string, string>>;
|
|
125
|
+
/** A number-valued param. */
|
|
126
|
+
declare function number(opts?: ParamOptions<number>): ConfigParam<StandardSchemaV1<number, number>>;
|
|
127
|
+
/** A param over any caller-supplied Standard Schema — a structured `jobs`, say. */
|
|
128
|
+
declare function param<S extends StandardSchemaV1>(schema: S, opts?: ParamOptions<StandardSchemaV1.InferOutput<S>>): ConfigParam<S>;
|
|
27
129
|
//#endregion
|
|
28
|
-
//#region ../../0-framework/1-core/core/dist/config-ob5OhCSP.d.mts
|
|
29
130
|
//#region src/contract.d.ts
|
|
30
131
|
/**
|
|
31
132
|
* A Contract is the declared interface of a service-to-service dependency: a
|
|
@@ -34,13 +135,14 @@ type SecretString = SecretBox<string>; //#endregion
|
|
|
34
135
|
* `Cmp`, checked at `ModuleBuilder.provision`'s call site (node.ts); `satisfies`
|
|
35
136
|
* is its runtime mirror, called at Load (graph.ts). Correctness comes from
|
|
36
137
|
* the kind's builder shaping `Cmp` so assignability means the right thing —
|
|
37
|
-
* see @prisma/composer/rpc's `contract()`/`rpc()`.
|
|
138
|
+
* see @prisma/composer/service-rpc's `contract()`/`rpc()`.
|
|
38
139
|
*/
|
|
39
140
|
interface Contract<Kind extends string, Cmp> {
|
|
40
141
|
readonly kind: Kind;
|
|
41
142
|
readonly __cmp: Cmp;
|
|
42
143
|
satisfies(required: Contract<Kind, unknown>): boolean;
|
|
43
|
-
}
|
|
144
|
+
}
|
|
145
|
+
//#endregion
|
|
44
146
|
//#region src/node.d.ts
|
|
45
147
|
declare const NODE: unique symbol;
|
|
46
148
|
declare const SECRET_NEED: unique symbol;
|
|
@@ -59,15 +161,53 @@ interface SecretSource<T = unknown> {
|
|
|
59
161
|
readonly payload: T;
|
|
60
162
|
}
|
|
61
163
|
/** What `provision(node, { secrets })` supplies: one source per declared secret slot. */
|
|
62
|
-
type SecretBindings<S extends Secrets> = { [K in keyof S]: SecretSource };
|
|
164
|
+
type SecretBindings<S extends Secrets> = { [K in keyof S]: SecretSource; };
|
|
63
165
|
/** What `secrets()` returns: one redacting SecretBox per declared slot. */
|
|
64
|
-
type SecretValues<S extends Secrets> = { readonly [K in keyof S]: SecretString };
|
|
166
|
+
type SecretValues<S extends Secrets> = { readonly [K in keyof S]: SecretString; };
|
|
65
167
|
/** Declares a secret NEED. Nameless — the platform name is bound at the root via `envSecret`. */
|
|
66
168
|
declare function secret(): SecretNeed;
|
|
67
169
|
/** Builds an opaque secret source from a target-defined payload — the SPI a deploy target's own source constructor (e.g. `envSecret`) calls. Core forwards the source and never inspects the payload. */
|
|
68
170
|
declare function secretSource<T>(payload: T): SecretSource<T>;
|
|
69
171
|
/** True if `value` is a secret source (an `envSecret` result or a forwarded ctx.secrets ref). */
|
|
70
172
|
declare function isSecretSource(value: unknown): value is SecretSource;
|
|
173
|
+
declare const PROVISION_NEED: unique symbol;
|
|
174
|
+
/** A param value the framework mints. Opaque to core: it forwards the payload to the resolved provisioner and never reads it (ADR-0031). */
|
|
175
|
+
interface ProvisionNeed<T = unknown> {
|
|
176
|
+
readonly [PROVISION_NEED]: true;
|
|
177
|
+
/** Selects the provisioner in an extension's `provisions` registry. */
|
|
178
|
+
readonly brand: symbol;
|
|
179
|
+
/** Provisioner-defined; core never reads it. */
|
|
180
|
+
readonly payload: T;
|
|
181
|
+
}
|
|
182
|
+
/** Builds an opaque provisioning need — the declaring package's own brand plus whatever payload its provisioner reads back. */
|
|
183
|
+
declare function provisionNeed<T = undefined>(brand: symbol, payload?: T): ProvisionNeed<T>;
|
|
184
|
+
/** True if `value` is a provisioning need (a `provisionNeed()` result). */
|
|
185
|
+
declare function isProvisionNeed(value: unknown): value is ProvisionNeed;
|
|
186
|
+
declare const PARAM_SOURCE: unique symbol;
|
|
187
|
+
declare const PARAM_NEED: unique symbol;
|
|
188
|
+
/** The wiring value bound to a param at provision time: a target-defined payload core forwards but never inspects. A target (e.g. @prisma/composer-prisma-cloud's `envParam`) builds one via `paramSource()`. */
|
|
189
|
+
interface ParamSource<T = unknown> {
|
|
190
|
+
readonly [PARAM_SOURCE]: true;
|
|
191
|
+
/** Target-defined. Core never reads this; the target that authored the source reads it back. */
|
|
192
|
+
readonly payload: T;
|
|
193
|
+
}
|
|
194
|
+
/** Builds an opaque param source from a target-defined payload — the SPI a deploy target's own source constructor (e.g. `envParam`) calls. Core forwards the source and never inspects the payload. */
|
|
195
|
+
declare function paramSource<T>(payload: T): ParamSource<T>;
|
|
196
|
+
/** True if `value` is a param source (an `envParam` result or a forwarded ctx.params ref). */
|
|
197
|
+
declare function isParamSource(value: unknown): value is ParamSource;
|
|
198
|
+
/** A module's declared param-forwarding slot — nameless, schema-less; the root (or an ancestor module) binds a `ParamSource` and the topology forwards it into a child's real, schema-bearing param. */
|
|
199
|
+
interface ParamNeed {
|
|
200
|
+
readonly [PARAM_NEED]: true;
|
|
201
|
+
readonly kind: 'param';
|
|
202
|
+
}
|
|
203
|
+
/** A module's param-forwarding slots: name → the need it declares. */
|
|
204
|
+
type ParamNeeds = Record<string, ParamNeed>;
|
|
205
|
+
/** Declares a module param-forwarding NEED. Nameless — bound to a `ParamSource` by an enclosing scope and forwarded into a child's real param. */
|
|
206
|
+
declare function paramNeed(): ParamNeed;
|
|
207
|
+
/** 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`. */
|
|
208
|
+
type ParamBindings<P extends Params> = { readonly [K in keyof P]?: StandardSchemaV1.InferOutput<P[K]['schema']> | ParamSource; };
|
|
209
|
+
/** What `provision(moduleChild, { params })` accepts per declared `ParamNeed`: a `ParamSource` only — a need carries no schema to validate a literal against. */
|
|
210
|
+
type ParamNeedBindings<PN extends ParamNeeds> = { readonly [K in keyof PN]?: ParamSource; };
|
|
71
211
|
/** Opaque `Contract<any, any>` bound shared by every node/port type that doesn't care which contract. */
|
|
72
212
|
type AnyContract = Contract<any, any>;
|
|
73
213
|
/** 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. */
|
|
@@ -148,7 +288,7 @@ interface DependencyEnd<C = unknown, Req = unknown> {
|
|
|
148
288
|
readonly required: Req | undefined;
|
|
149
289
|
}
|
|
150
290
|
/** A Module: the same Deps/Expose boundary a service has, around transparent wiring instead of a black-box body — its `body` runs at Load, not at authoring. */
|
|
151
|
-
interface ModuleNode<D extends Deps = Deps, E extends Expose = Expose, S extends Secrets = Secrets> {
|
|
291
|
+
interface ModuleNode<D extends Deps = Deps, E extends Expose = Expose, S extends Secrets = Secrets, PN extends ParamNeeds = ParamNeeds> {
|
|
152
292
|
readonly [NODE]: true;
|
|
153
293
|
readonly kind: 'module';
|
|
154
294
|
/** Human-readable, given at authoring — logs/diagnostics only. */
|
|
@@ -156,18 +296,22 @@ interface ModuleNode<D extends Deps = Deps, E extends Expose = Expose, S extends
|
|
|
156
296
|
readonly deps: D;
|
|
157
297
|
/** Declared secret input slots (authored as `secrets`) — forwarded to internals via `ctx.secrets` (ADR-0029). */
|
|
158
298
|
readonly secretSlots: S;
|
|
299
|
+
/** Declared param-forwarding slots (authored as `params`) — forwarded to internals via `ctx.params`, the same rail secrets ride on. */
|
|
300
|
+
readonly paramSlots: PN;
|
|
159
301
|
readonly expose: E;
|
|
160
|
-
body(ctx: ModuleContext<D, S>): ModuleOutputs<E> | void;
|
|
302
|
+
body(ctx: ModuleContext<D, S, PN>): ModuleOutputs<E> | void;
|
|
161
303
|
}
|
|
162
304
|
/**
|
|
163
305
|
* What a module's body receives: its declared inputs as forwardable wiring
|
|
164
306
|
* values, plus `provision` to register the owned services/modules it wires them into.
|
|
165
307
|
*/
|
|
166
|
-
interface ModuleContext<D extends Deps, S extends Secrets = Secrets> {
|
|
308
|
+
interface ModuleContext<D extends Deps, S extends Secrets = Secrets, PN extends ParamNeeds = ParamNeeds> {
|
|
167
309
|
/** The module's declared inputs as wiring values — pass them into provision(). */
|
|
168
|
-
readonly inputs: { [K in keyof D]: InputRef<D[K]
|
|
310
|
+
readonly inputs: { [K in keyof D]: InputRef<D[K]>; };
|
|
169
311
|
/** The module's declared secret slots as forwardable sources — pass them into a child's `secrets` (ADR-0029). */
|
|
170
|
-
readonly secrets: { readonly [K in keyof S]: SecretSource };
|
|
312
|
+
readonly secrets: { readonly [K in keyof S]: SecretSource; };
|
|
313
|
+
/** The module's declared param-forwarding slots as forwardable sources — pass them into a child's `params`. */
|
|
314
|
+
readonly params: { readonly [K in keyof PN]: ParamSource; };
|
|
171
315
|
/** Registers an owned child (service or module) under a stable id. */
|
|
172
316
|
readonly provision: ModuleBuilder['provision'];
|
|
173
317
|
}
|
|
@@ -178,7 +322,7 @@ interface ModuleContext<D extends Deps, S extends Secrets = Secrets> {
|
|
|
178
322
|
*/
|
|
179
323
|
type InputRef<DE> = DE extends DependencyEnd<any, infer Req extends AnyContract> ? RefPort<Req> : never;
|
|
180
324
|
/** One ref-port per declared expose key, contract-checked against `E` (mirrors `Wiring`'s `NoInfer` use). */
|
|
181
|
-
type ModuleOutputs<E extends Expose> = { [P in keyof E]: RefPort<NoInfer<E[P]
|
|
325
|
+
type ModuleOutputs<E extends Expose> = { [P in keyof E]: RefPort<NoInfer<E[P]>>; };
|
|
182
326
|
/**
|
|
183
327
|
* A provisioned producer's port as a wiring-time value: its contract, tagged
|
|
184
328
|
* with which provider produced it (`__providerId`, read by Load to resolve the edge).
|
|
@@ -193,7 +337,7 @@ type RefPort<C extends AnyContract> = C & {
|
|
|
193
337
|
*/
|
|
194
338
|
type ProvisionedRef<E extends Expose = Record<never, never>> = {
|
|
195
339
|
readonly id: string;
|
|
196
|
-
} & { readonly [P in keyof E]: RefPort<E[P]
|
|
340
|
+
} & { readonly [P in keyof E]: RefPort<E[P]>; };
|
|
197
341
|
/** A DependencyEnd's required contract (unknown for an untyped end). */
|
|
198
342
|
type ReqOf<DE> = DE extends DependencyEnd<any, infer Req> ? Req : never;
|
|
199
343
|
/**
|
|
@@ -203,27 +347,36 @@ type ReqOf<DE> = DE extends DependencyEnd<any, infer Req> ? Req : never;
|
|
|
203
347
|
* into a nested `provision()` call — the same value shape a producer's own
|
|
204
348
|
* exposed port carries.
|
|
205
349
|
*/
|
|
206
|
-
type DepBindings<D extends Deps> = { [K in keyof D]: NoInfer<ReqOf<D[K]>> | InputRef<D[K]
|
|
350
|
+
type DepBindings<D extends Deps> = { [K in keyof D]: NoInfer<ReqOf<D[K]>> | InputRef<D[K]>; };
|
|
207
351
|
/**
|
|
208
352
|
* `provision`'s trailing options: an explicit `id` (default: the node's own
|
|
209
353
|
* `name`) plus, for a node that declares dependency slots, the `deps` that
|
|
210
354
|
* satisfy them. `deps` is required exactly when the node has slots —
|
|
211
355
|
* `[keyof D] extends [never]` is the "no slots" test — so a dependency can
|
|
212
356
|
* never be left unwired at compile time. The whole object is therefore
|
|
213
|
-
* optional for a slot-less node and required for one with slots.
|
|
357
|
+
* optional for a slot-less node and required for one with slots. `params` is
|
|
358
|
+
* always optional — a bound value overrides `param.default`, but a param may
|
|
359
|
+
* fall back to its default (or be `optional`) instead, unlike `deps`/`secrets`.
|
|
360
|
+
* `PB` is the params-binding map appropriate to the target: `ParamBindings<P>`
|
|
361
|
+
* for a service's real, schema-bearing params; `ParamNeedBindings<PN>` for a
|
|
362
|
+
* child module's nameless forwarding slots.
|
|
214
363
|
*/
|
|
215
|
-
type ProvisionArgs<D extends Deps, S extends Secrets> = [keyof D] extends [never] ? [keyof S] extends [never] ? [opts?: {
|
|
364
|
+
type ProvisionArgs<D extends Deps, S extends Secrets, PB> = [keyof D] extends [never] ? [keyof S] extends [never] ? [opts?: {
|
|
216
365
|
id?: string;
|
|
366
|
+
params?: PB;
|
|
217
367
|
}] : [opts: {
|
|
218
368
|
id?: string;
|
|
219
369
|
secrets: SecretBindings<S>;
|
|
370
|
+
params?: PB;
|
|
220
371
|
}] : [keyof S] extends [never] ? [opts: {
|
|
221
372
|
id?: string;
|
|
222
373
|
deps: DepBindings<D>;
|
|
374
|
+
params?: PB;
|
|
223
375
|
}] : [opts: {
|
|
224
376
|
id?: string;
|
|
225
377
|
deps: DepBindings<D>;
|
|
226
378
|
secrets: SecretBindings<S>;
|
|
379
|
+
params?: PB;
|
|
227
380
|
}];
|
|
228
381
|
interface ModuleBuilder {
|
|
229
382
|
/** Provisions an owned resource; its id defaults to the node's `name`. */
|
|
@@ -232,26 +385,28 @@ interface ModuleBuilder {
|
|
|
232
385
|
}): {
|
|
233
386
|
readonly id: string;
|
|
234
387
|
} & RefPort<C>;
|
|
235
|
-
/** Registers an owned service; its id defaults to the node's `name`; `deps`/`secrets` are required iff it declares them. */
|
|
236
|
-
provision<D extends Deps, E extends Expose, S extends Secrets>(service: ServiceNode<D,
|
|
388
|
+
/** Registers an owned service; its id defaults to the node's `name`; `deps`/`secrets` are required iff it declares them; a declared param may be bound (literal or `ParamSource`), overriding its default. */
|
|
389
|
+
provision<D extends Deps, P extends Params, E extends Expose, S extends Secrets>(service: ServiceNode<D, P, E, S>, ...args: ProvisionArgs<D, S, ParamBindings<P>>): ProvisionedRef<E>;
|
|
237
390
|
/**
|
|
238
391
|
* The service call with `deps`/`secrets` spelled out. `ProvisionArgs` above
|
|
239
392
|
* cannot resolve while `D`/`S` are still unbound type parameters — a generic
|
|
240
393
|
* wrapper like `cron()` provisioning a caller-supplied service — so that call
|
|
241
394
|
* site resolves to this concrete overload instead.
|
|
242
395
|
*/
|
|
243
|
-
provision<D extends Deps, E extends Expose, S extends Secrets>(service: ServiceNode<D,
|
|
396
|
+
provision<D extends Deps, P extends Params, E extends Expose, S extends Secrets>(service: ServiceNode<D, P, E, S>, opts: {
|
|
244
397
|
id?: string;
|
|
245
398
|
deps: DepBindings<D>;
|
|
246
399
|
secrets?: SecretBindings<S>;
|
|
400
|
+
params?: ParamBindings<P>;
|
|
247
401
|
}): ProvisionedRef<E>;
|
|
248
|
-
/** Registers an owned child module; its id defaults to the node's `name`; `deps`/`secrets` are required iff it declares them
|
|
249
|
-
provision<D extends Deps, E extends Expose, S extends Secrets>(child: ModuleNode<D, E, S>, ...args: ProvisionArgs<D, S
|
|
402
|
+
/** Registers an owned child module; its id defaults to the node's `name`; `deps`/`secrets` are required iff it declares them; a declared param-forwarding slot may be bound to a `ParamSource`. */
|
|
403
|
+
provision<D extends Deps, E extends Expose, S extends Secrets, PN extends ParamNeeds>(child: ModuleNode<D, E, S, PN>, ...args: ProvisionArgs<D, S, ParamNeedBindings<PN>>): ProvisionedRef<E>;
|
|
250
404
|
/** The child-module call with `deps`/`secrets` spelled out — the same generic-wrapper escape as the service overload above. */
|
|
251
|
-
provision<D extends Deps, E extends Expose, S extends Secrets>(child: ModuleNode<D, E, S>, opts: {
|
|
405
|
+
provision<D extends Deps, E extends Expose, S extends Secrets, PN extends ParamNeeds>(child: ModuleNode<D, E, S, PN>, opts: {
|
|
252
406
|
id?: string;
|
|
253
407
|
deps: DepBindings<D>;
|
|
254
408
|
secrets?: SecretBindings<S>;
|
|
409
|
+
params?: ParamNeedBindings<PN>;
|
|
255
410
|
}): ProvisionedRef<E>;
|
|
256
411
|
}
|
|
257
412
|
/** Dependency map: name → the slot the service declares. Only declarations are admitted, never a concrete ResourceNode. */
|
|
@@ -259,7 +414,7 @@ type Deps = Record<string, DependencyEnd<any, any>>;
|
|
|
259
414
|
/** Output-port map: name → the Contract a service exposes for others to depend on. */
|
|
260
415
|
type Expose = Readonly<Record<string, AnyContract>>;
|
|
261
416
|
type Hydrated<N> = N extends DependencyEnd<infer C, any> ? C : never;
|
|
262
|
-
type HydratedDeps<D extends Deps> = { readonly [K in keyof D]: Hydrated<D[K]
|
|
417
|
+
type HydratedDeps<D extends Deps> = { readonly [K in keyof D]: Hydrated<D[K]>; };
|
|
263
418
|
/**
|
|
264
419
|
* Seals a node instance after its constructor has assigned all fields — the
|
|
265
420
|
* last statement of a concrete node class's constructor. A free function, not
|
|
@@ -325,22 +480,24 @@ declare function dependency<P extends Params, C, Req = unknown>(def: {
|
|
|
325
480
|
* closed-root shape — `module(name, body)` instead of `module(name, {}, () =>
|
|
326
481
|
* ({}))`.
|
|
327
482
|
*/
|
|
328
|
-
declare function module(name: string, body: (ctx: ModuleContext<Record<never, never>, Record<never, never>>) => void): ModuleNode<Record<never, never>, Record<never, never>, Record<never, never>>;
|
|
483
|
+
declare function module(name: string, body: (ctx: ModuleContext<Record<never, never>, Record<never, never>, Record<never, never>>) => void): ModuleNode<Record<never, never>, Record<never, never>, Record<never, never>, Record<never, never>>;
|
|
329
484
|
/**
|
|
330
485
|
* A module with a boundary: `deps` and/or `expose` declare what wires in and
|
|
331
486
|
* out, the same way a service does. The body returns one port per `expose` key.
|
|
332
487
|
*/
|
|
333
|
-
declare function module<D extends Deps = Record<never, never>, E extends Expose = Record<never, never>, S extends Secrets = Record<never, never>>(name: string, boundary: {
|
|
488
|
+
declare function module<D extends Deps = Record<never, never>, E extends Expose = Record<never, never>, S extends Secrets = Record<never, never>, PN extends ParamNeeds = Record<never, never>>(name: string, boundary: {
|
|
334
489
|
deps?: D;
|
|
335
490
|
secrets?: S;
|
|
491
|
+
params?: PN;
|
|
336
492
|
expose?: E;
|
|
337
|
-
}, body: (ctx: ModuleContext<D, S>) => ModuleOutputs<E> | void): ModuleNode<D, E, S>;
|
|
493
|
+
}, body: (ctx: ModuleContext<D, S, PN>) => ModuleOutputs<E> | void): ModuleNode<D, E, S, PN>;
|
|
338
494
|
/**
|
|
339
495
|
* True if `value` was constructed by this module's factories. Checks the
|
|
340
496
|
* brand only, never a prototype — a graph may mix nodes from a different
|
|
341
497
|
* installed copy of core (dual-package hazard).
|
|
342
498
|
*/
|
|
343
|
-
declare function isNode(value: unknown): value is ServiceNode | ResourceNode | DependencyEnd | ModuleNode;
|
|
499
|
+
declare function isNode(value: unknown): value is ServiceNode | ResourceNode | DependencyEnd | ModuleNode;
|
|
500
|
+
//#endregion
|
|
344
501
|
//#region src/graph-types.d.ts
|
|
345
502
|
/** Path-derived: root-scope children are bare ids ("auth", "db"); a nested module's own children dot-join under its address ("auth.db"). */
|
|
346
503
|
type NodeId = string;
|
|
@@ -376,6 +533,22 @@ interface SecretBinding {
|
|
|
376
533
|
/** The opaque source the root bound the slot to. Core never inspects it; the deploy target reads back its own payload. */
|
|
377
534
|
readonly source: SecretSource;
|
|
378
535
|
}
|
|
536
|
+
/**
|
|
537
|
+
* A resolved param binding: a `provision()` call bound a service's param
|
|
538
|
+
* slot to either a literal value or an opaque `ParamSource` — the non-secret
|
|
539
|
+
* sibling of `SecretBinding`. Unlike a secret, a param binding is not
|
|
540
|
+
* required for every declared param (a param may fall back to its own
|
|
541
|
+
* `default`), so this list only carries the ones a `provision()` call
|
|
542
|
+
* actually bound.
|
|
543
|
+
*/
|
|
544
|
+
interface ParamBinding {
|
|
545
|
+
/** The graph address of the service that declares the param. */
|
|
546
|
+
readonly serviceAddress: NodeId;
|
|
547
|
+
/** The param name on that service. */
|
|
548
|
+
readonly slot: string;
|
|
549
|
+
/** A literal value (schema-validated by `buildConfig`) or an opaque `ParamSource` (the deploy target reads its own payload back) — check with `isParamSource`. Core never inspects a `ParamSource`'s payload. */
|
|
550
|
+
readonly binding: unknown;
|
|
551
|
+
}
|
|
379
552
|
interface Graph {
|
|
380
553
|
readonly root: GraphNode;
|
|
381
554
|
/** Root + one per input, topo-ordered (deps first). */
|
|
@@ -383,95 +556,13 @@ interface Graph {
|
|
|
383
556
|
readonly edges: readonly Edge[];
|
|
384
557
|
/** Every service secret slot resolved to its root-bound opaque source. */
|
|
385
558
|
readonly secrets: readonly SecretBinding[];
|
|
559
|
+
/** Every service param bound at provision — literal or source; unbound params are absent here and fall back to their `default` (see `buildConfig`). */
|
|
560
|
+
readonly params: readonly ParamBinding[];
|
|
386
561
|
}
|
|
387
562
|
/** Thrown by Load when the graph is malformed. */
|
|
388
563
|
declare class LoadError extends Error {
|
|
389
564
|
constructor(message: string);
|
|
390
|
-
} //#endregion
|
|
391
|
-
//#region src/config.d.ts
|
|
392
|
-
/**
|
|
393
|
-
* A declared config param — pure data: a caller-owned Standard Schema
|
|
394
|
-
* (ADR-0018) plus a few framework facets. The framework carries the schema,
|
|
395
|
-
* infers the value type from it, and validates with it, without ever
|
|
396
|
-
* enumerating permitted shapes. Turning a value into stored config and back is
|
|
397
|
-
* the deploy target's job, not the param's (ADR-0019) — the same split RPC
|
|
398
|
-
* uses: schema on the declaration, wire owned by the mover.
|
|
399
|
-
*/
|
|
400
|
-
interface ConfigParam<S extends StandardSchemaV1 = StandardSchemaV1> {
|
|
401
|
-
readonly schema: S;
|
|
402
|
-
readonly optional?: boolean;
|
|
403
|
-
readonly default?: StandardSchemaV1.InferOutput<S>;
|
|
404
565
|
}
|
|
405
|
-
type Params = Record<string, ConfigParam>;
|
|
406
|
-
/** What implementations receive — undefined only for optional params with no default. */
|
|
407
|
-
type Values<P extends Params> = { readonly [K in keyof P]: P[K]['optional'] extends true ? undefined extends P[K]['default'] ? StandardSchemaV1.InferOutput<P[K]['schema']> | undefined : StandardSchemaV1.InferOutput<P[K]['schema']> : StandardSchemaV1.InferOutput<P[K]['schema']> };
|
|
408
|
-
/**
|
|
409
|
-
* The connection face of a dependency: declared params (data) and how
|
|
410
|
-
* validated values become a client (the hydrate behavior slot). Both P and C
|
|
411
|
-
* are INFERRED — the declaration types hydrate's input; the factory types the
|
|
412
|
-
* loaded dep.
|
|
413
|
-
*/
|
|
414
|
-
interface Connection<P extends Params = Params, C = unknown> {
|
|
415
|
-
readonly params: P;
|
|
416
|
-
hydrate(values: Values<P>): C | Promise<C>;
|
|
417
|
-
}
|
|
418
|
-
/**
|
|
419
|
-
* The enumerable config surface of a service — derivable from the graph
|
|
420
|
-
* alone, nothing booted, no platform keys. The introspection artifact (values
|
|
421
|
-
* absent). `schema` is a data-only projection of the param's Standard Schema
|
|
422
|
-
* (JSON Schema when the vendor supports the optional conversion, a `{ vendor }`
|
|
423
|
-
* tag otherwise) — never the param's functions. Physical locations are the
|
|
424
|
-
* target pack's business. Secrets are not here — they live on their own slot.
|
|
425
|
-
*/
|
|
426
|
-
interface ConfigDeclaration {
|
|
427
|
-
readonly owner: 'service' | {
|
|
428
|
-
readonly input: string;
|
|
429
|
-
};
|
|
430
|
-
readonly name: string;
|
|
431
|
-
readonly schema: Readonly<Record<string, unknown>>;
|
|
432
|
-
readonly optional: boolean;
|
|
433
|
-
readonly default: unknown;
|
|
434
|
-
}
|
|
435
|
-
/**
|
|
436
|
-
* The resolved, typed configuration of one service — what crosses the
|
|
437
|
-
* core→pack boundary. Core builds it at deploy (leaf values are provisioning
|
|
438
|
-
* refs, so the env writes depend on the resources/producer — the ordering
|
|
439
|
-
* edges); the pack serializes it, and at boot reconstructs the identical
|
|
440
|
-
* structure with concrete values. Both forms conform to the shape from
|
|
441
|
-
* configOf. Core never stringifies.
|
|
442
|
-
*/
|
|
443
|
-
interface Config {
|
|
444
|
-
readonly service: Readonly<Record<string, unknown>>;
|
|
445
|
-
readonly inputs: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
|
446
|
-
}
|
|
447
|
-
/**
|
|
448
|
-
* Enumerates every config param the service declares: each input's connection
|
|
449
|
-
* params, then the service's own params. Pure — reads `root.inputs`/`params`
|
|
450
|
-
* directly, executes nothing but the (also pure) schema projection. Deliberately
|
|
451
|
-
* does not go through `Load`: a service's connection-end inputs are legitimately
|
|
452
|
-
* unwired from its own point of view (wiring is an enclosing module's concern),
|
|
453
|
-
* and this introspects one service's declared shape regardless of how — or
|
|
454
|
-
* whether — it composes into a larger graph.
|
|
455
|
-
*/
|
|
456
|
-
declare function configOf(root: ServiceNode): readonly ConfigDeclaration[];
|
|
457
|
-
/**
|
|
458
|
-
* The app's provision manifest: every secret binding the root resolved across
|
|
459
|
-
* the graph (ADR-0029) — an opaque, target-defined source per service secret
|
|
460
|
-
* slot; a deploy target's preflight reads its own payload. Pure graph
|
|
461
|
-
* introspection, TARGET-AGNOSTIC — the target consumes it to verify each secret
|
|
462
|
-
* exists on the platform before deploy. The values are provisioned out-of-band.
|
|
463
|
-
*/
|
|
464
|
-
declare function provisionManifest(graph: Graph): readonly SecretBinding[];
|
|
465
|
-
interface ParamOptions<T> {
|
|
466
|
-
readonly optional?: boolean;
|
|
467
|
-
readonly default?: T;
|
|
468
|
-
}
|
|
469
|
-
/** A string-valued param. */
|
|
470
|
-
declare function string(opts?: ParamOptions<string>): ConfigParam<StandardSchemaV1<string, string>>;
|
|
471
|
-
/** A number-valued param. */
|
|
472
|
-
declare function number(opts?: ParamOptions<number>): ConfigParam<StandardSchemaV1<number, number>>;
|
|
473
|
-
/** A param over any caller-supplied Standard Schema — a structured `jobs`, say. */
|
|
474
|
-
declare function param<S extends StandardSchemaV1>(schema: S, opts?: ParamOptions<StandardSchemaV1.InferOutput<S>>): ConfigParam<S>; //#endregion
|
|
475
566
|
//#endregion
|
|
476
|
-
export {
|
|
477
|
-
//# sourceMappingURL=
|
|
567
|
+
export { param as $, ProvisionNeed as A, SecretValues as B, ParamBinding as C, ParamNeeds as D, ParamNeedBindings as E, RunnableServiceNode as F, dependency as G, ServiceNode as H, SecretBinding as I, isParamSource as J, freezeNode as K, SecretBindings as L, RefPort as M, ResourceNode as N, ParamSource as O, ResourceNodeBase as P, number as Q, SecretNeed as R, NodeId as S, ParamNeed as T, Values as U, Secrets as V, configOf as W, isSecretSource as X, isProvisionNeed as Y, module as Z, ModuleBuilder as _, Connection as a, resource as at, ModuleOutputs as b, Deps as c, service as ct, Graph as d, SecretString as dt, paramManifest as et, GraphNode as f, LoadError as g, InputRef as h, ConfigParam as i, provisionNeed as it, ProvisionedRef as j, Params as k, Edge as l, string as lt, HydratedDeps as m, Config as n, paramSource as nt, Contract as o, secret as ot, Hydrated as p, isNode as q, ConfigDeclaration as r, provisionManifest as rt, DependencyEnd as s, secretSource as st, BuildAdapter as t, paramNeed as tt, Expose as u, SecretBox as ut, ModuleContext as v, ParamBindings as w, NODE as x, ModuleNode as y, SecretSource as z };
|
|
568
|
+
//# sourceMappingURL=graph-types-BcbVhojU-C3fhxjPK.d.mts.map
|
|
@@ -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;;;;cA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sBAAsB;;;;;iBAKzM,OAAO,UAAU,OAAO,sBAAsB,UAAU,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,20 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region ../../0-framework/1-core/core/dist/graph-BCsfgIWh.d.mts
|
|
4
|
-
//#region src/graph.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Builds the in-memory graph from a root node. A service root walks its own
|
|
7
|
-
* `inputs`; a module root executes its body (wiring, not user code — the
|
|
8
|
-
* designed exception to imports-run-nothing) and recursively flattens every
|
|
9
|
-
* module it provisions into one graph of hierarchical addresses. A malformed
|
|
10
|
-
* graph is a `LoadError` that names its fix; the individual validation rules
|
|
11
|
-
* live with `loadService` / `loadModule` and are covered by name in the Load
|
|
12
|
-
* tests. Executes nothing of the user's own code beyond module bodies.
|
|
13
|
-
*/
|
|
14
|
-
declare function Load(root: ServiceNode | ModuleNode, opts?: {
|
|
15
|
-
id?: NodeId;
|
|
16
|
-
}): Graph; //#endregion
|
|
17
|
-
//#endregion
|
|
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";
|
|
18
3
|
//#region ../../0-framework/1-core/core/dist/index.d.mts
|
|
19
4
|
//#region src/hydrate.d.ts
|
|
20
5
|
/**
|
|
@@ -41,7 +26,7 @@ declare function hydrateSync(root: ServiceNode, config: Config): HydratedDeps<De
|
|
|
41
26
|
* so a secret is redacted by TYPE from here on. A declared slot missing from
|
|
42
27
|
* `values` is a target contract violation, named loudly.
|
|
43
28
|
*/
|
|
44
|
-
declare function hydrateSecrets(root: ServiceNode, values: Record<string, string>): SecretValues<Secrets>;
|
|
29
|
+
declare function hydrateSecrets(root: ServiceNode, values: Record<string, string>): SecretValues<Secrets>;
|
|
45
30
|
//#endregion
|
|
46
|
-
export {
|
|
47
|
-
//# sourceMappingURL=index-
|
|
31
|
+
export { hydrateSecrets as n, hydrateSync as r, hydrate as t };
|
|
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,3 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import {
|
|
3
|
-
|
|
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 { a as freezeNode, c as
|
|
2
|
-
import { a as number, c as
|
|
3
|
-
export { Load, LoadError, ResourceNodeBase, SecretBox, configOf, dependency, freezeNode, hydrate, hydrateSecrets, hydrateSync, isNode, isSecretSource, module, number, param, provisionManifest, resource, secret, secretSource, service, string };
|
|
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-BmrUEdo9-6Oq1hSmS.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-B0axxnBf.mjs";
|
|
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 };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { t as BuildAdapter } from "./
|
|
2
|
-
|
|
3
|
-
//#region
|
|
1
|
+
import { t as BuildAdapter } from "./graph-types-BcbVhojU-C3fhxjPK.mjs";
|
|
2
|
+
import "./index-BFBNz7Aw.mjs";
|
|
3
|
+
//#region ../../0-framework/2-authoring/nextjs/dist/nextjs-DLyeRR7M.d.mts
|
|
4
|
+
//#region src/nextjs.d.ts
|
|
4
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. */
|
|
5
6
|
interface NextjsBuildAdapter extends BuildAdapter {
|
|
6
7
|
readonly type: 'nextjs';
|
|
@@ -9,7 +10,7 @@ interface NextjsBuildAdapter extends BuildAdapter {
|
|
|
9
10
|
declare const nextjsBuild: (opts: {
|
|
10
11
|
module: string;
|
|
11
12
|
appDir: string;
|
|
12
|
-
}) => NextjsBuildAdapter;
|
|
13
|
+
}) => NextjsBuildAdapter;
|
|
13
14
|
//#endregion
|
|
14
15
|
export { nextjsBuild as n, NextjsBuildAdapter as t };
|
|
15
|
-
//# sourceMappingURL=
|
|
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,13 +1,14 @@
|
|
|
1
|
-
import { a as Bundle,
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { a as Bundle, d as ExtensionDescriptor, i as AssembleInput } from "./app-config-BPb3LCdH-CH7b8Khi.mjs";
|
|
2
|
+
import "./config-Cqu_-Hna.mjs";
|
|
3
|
+
import "./deploy-Cqu_-Hna.mjs";
|
|
4
|
+
import { t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-DwnBjryZ.mjs";
|
|
4
5
|
//#region ../../0-framework/2-authoring/nextjs/dist/control.d.mts
|
|
5
|
-
//#region src/control.d.ts
|
|
6
|
+
//#region src/control/build.d.ts
|
|
6
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. */
|
|
7
8
|
declare function standaloneServerPath(build: NextjsBuildAdapter): string;
|
|
8
9
|
declare function assemble(input: AssembleInput): Promise<Bundle>;
|
|
9
10
|
/** The nextjs build extension descriptor — `prisma-composer.config.ts` lists it under `extensions`. */
|
|
10
|
-
declare const nextjsBuild: () => ExtensionDescriptor;
|
|
11
|
+
declare const nextjsBuild: () => ExtensionDescriptor;
|
|
11
12
|
//#endregion
|
|
12
13
|
export { type AssembleInput, type Bundle, assemble, nextjsBuild, standaloneServerPath };
|
|
13
14
|
//# sourceMappingURL=nextjs-control.d.mts.map
|
|
@@ -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"}
|