@prisma-next/framework-components 0.5.0-dev.30 → 0.5.0-dev.32
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/README.md +17 -0
- package/dist/codec-types-CB0jWeHU.d.mts +207 -0
- package/dist/codec-types-CB0jWeHU.d.mts.map +1 -0
- package/dist/codec.d.mts +2 -2
- package/dist/codec.mjs +37 -1
- package/dist/codec.mjs.map +1 -1
- package/dist/components.d.mts +1 -1
- package/dist/control.d.mts +3 -3
- package/dist/control.d.mts.map +1 -1
- package/dist/{emission-types-D234HxUz.d.mts → emission-types-D6t3_a0x.d.mts} +16 -1
- package/dist/{emission-types-D234HxUz.d.mts.map → emission-types-D6t3_a0x.d.mts.map} +1 -1
- package/dist/emission.d.mts +1 -1
- package/dist/execution.d.mts +1 -1
- package/dist/{framework-components-Buvf7mnC.d.mts → framework-components-AHI6V96G.d.mts} +2 -2
- package/dist/{framework-components-Buvf7mnC.d.mts.map → framework-components-AHI6V96G.d.mts.map} +1 -1
- package/dist/runtime.d.mts +1 -1
- package/package.json +7 -6
- package/src/control/emission-types.ts +21 -0
- package/src/exports/codec.ts +14 -2
- package/src/shared/codec-types.ts +171 -1
- package/dist/codec-types-DXv-ROhF.d.mts +0 -84
- package/dist/codec-types-DXv-ROhF.d.mts.map +0 -1
package/README.md
CHANGED
|
@@ -67,6 +67,23 @@ Aborts surface to the caller as `RUNTIME.ABORTED` with `details.phase ∈ { 'enc
|
|
|
67
67
|
|
|
68
68
|
See [ADR 207 — Codec call context: per-query `AbortSignal` and column metadata](../../../../docs/architecture%20docs/adrs/ADR%20207%20-%20Codec%20call%20context%20per-query%20AbortSignal%20and%20column%20metadata.md) for the full design.
|
|
69
69
|
|
|
70
|
+
## Higher-order codecs (`CodecDescriptor`, `CodecInstanceContext`, `synthesizeNonParameterizedDescriptor`)
|
|
71
|
+
|
|
72
|
+
Codec metadata, parameterized-codec registration, and runtime materialization live on a unified `CodecDescriptor<P>`:
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
import type { CodecDescriptor, CodecInstanceContext } from '@prisma-next/framework-components/codec';
|
|
76
|
+
import { synthesizeNonParameterizedDescriptor, voidParamsSchema } from '@prisma-next/framework-components/codec';
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
- `CodecDescriptor<P = void>` carries `codecId`, `traits`, `targetTypes`, `meta`, `paramsSchema: StandardSchemaV1<P>`, optional `renderOutputType`, and a curried `factory: (P) => (CodecInstanceContext) => Codec`. Non-parameterized codecs use `P = void` and a constant factory; parameterized codecs use a non-empty `P` (e.g. `{ length: number }` for pgvector).
|
|
80
|
+
- `CodecInstanceContext` (family-agnostic, `{ name }` only) is supplied by the runtime when materializing a per-instance codec. Pack authors close over it inside the factory; they never construct it. This is the **per-materialization** context, sibling to the **per-call** `CodecCallContext` documented above. Family-specific extensions augment it — the SQL family ships `SqlCodecInstanceContext extends CodecInstanceContext` in `@prisma-next/sql-relational-core/ast`, adding `usedAt: ReadonlyArray<{ table; column }>` for SQL-domain codecs that need column-set metadata.
|
|
81
|
+
- `synthesizeNonParameterizedDescriptor(codec)` wraps an existing `Codec` (with its async `encode`/`decode` per ADR 204) into a `CodecDescriptor<void>` whose constant factory returns the same shared codec instance for every column. The synthesis bridge keeps non-parameterized codec contributors on the legacy `codecs:` slot while the unified descriptor map remains the single read source for codec-id-keyed metadata.
|
|
82
|
+
|
|
83
|
+
`paramsSchema` is typed as Standard Schema (`StandardSchemaV1<P>`), not arktype-specific. arktype `Type`s satisfy the shape via their `~standard` getter, so existing arktype-typed descriptors satisfy the new shape transparently while `framework-components` itself takes no dependency on arktype.
|
|
84
|
+
|
|
85
|
+
See [ADR 208 — Higher-order codecs for parameterized types](../../../../../docs/architecture%20docs/adrs/ADR%20208%20-%20Higher-order%20codecs%20for%20parameterized%20types.md) for the full design.
|
|
86
|
+
|
|
70
87
|
## Why SPI types live here (dependency inversion)
|
|
71
88
|
|
|
72
89
|
This package sits in the **core** layer — below the tooling layer where family-specific emitters and control implementations live. SPI interfaces like `EmissionSpi` define the contract between framework orchestration code (control-plane emission, CLI) and family-specific implementations (SQL emitter, Mongo emitter).
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { JsonValue } from "@prisma-next/contract/types";
|
|
2
|
+
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
3
|
+
|
|
4
|
+
//#region src/shared/codec-types.d.ts
|
|
5
|
+
type CodecTrait = 'equality' | 'order' | 'boolean' | 'numeric' | 'textual'
|
|
6
|
+
/**
|
|
7
|
+
* The codec carries a per-instance `validate(value: unknown) =>
|
|
8
|
+
* JsonSchemaValidationResult` function on the resolved codec object that
|
|
9
|
+
* the framework's `JsonSchemaValidatorRegistry` consults at runtime. The
|
|
10
|
+
* trait gates the `extractValidator` cast from structurally-typed
|
|
11
|
+
* `unknown` to a typed validator view.
|
|
12
|
+
*
|
|
13
|
+
* Retirement target. The unified `CodecDescriptor` model moves
|
|
14
|
+
* validation into the resolved codec's `decode` body; the parallel
|
|
15
|
+
* `JsonSchemaValidatorRegistry` (and this trait alongside it) retires
|
|
16
|
+
* under TML-2357 (T3.5.12). Per-library JSON extensions like
|
|
17
|
+
* `@prisma-next/extension-arktype-json` already follow the new pattern.
|
|
18
|
+
*/ | 'json-validator';
|
|
19
|
+
/**
|
|
20
|
+
* Per-call context the runtime threads to every `codec.encode` /
|
|
21
|
+
* `codec.decode` invocation for a single `runtime.execute()` call.
|
|
22
|
+
*
|
|
23
|
+
* The framework-level shape is family-agnostic and carries one field:
|
|
24
|
+
*
|
|
25
|
+
* - `signal?: AbortSignal` — per-query cancellation. The runtime returns
|
|
26
|
+
* a `RUNTIME.ABORTED` envelope when the signal aborts; codec authors
|
|
27
|
+
* who forward `signal` to their underlying SDK get true cancellation
|
|
28
|
+
* of in-flight network calls.
|
|
29
|
+
*
|
|
30
|
+
* Family layers extend this base with their own shape-of-call metadata:
|
|
31
|
+
* the SQL family adds `column?: SqlColumnRef` via `SqlCodecCallContext`
|
|
32
|
+
* (see `@prisma-next/sql-relational-core`). Mongo currently uses this
|
|
33
|
+
* framework type unchanged. Column metadata is intentionally **not** on
|
|
34
|
+
* the framework type — it is a SQL-family concept rooted in SQL's
|
|
35
|
+
* `(table, column)` addressing model and would not generalise to other
|
|
36
|
+
* families.
|
|
37
|
+
*
|
|
38
|
+
* The interface is named explicitly (not inlined) so future framework
|
|
39
|
+
* fields and family extensions can land additively without breaking
|
|
40
|
+
* codec author signatures.
|
|
41
|
+
*/
|
|
42
|
+
interface CodecCallContext {
|
|
43
|
+
readonly signal?: AbortSignal;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* A codec is the contract between an application value and its on-wire and
|
|
47
|
+
* on-contract-disk representations.
|
|
48
|
+
*
|
|
49
|
+
* The author's mental model is two JS-side types — `TInput` (the
|
|
50
|
+
* application JS type) and `TWire` (the database driver wire format) —
|
|
51
|
+
* plus `JsonValue` for build-time contract artifacts. The codec translates
|
|
52
|
+
* `TInput` to `TWire` on writes and back on reads, and to/from `JsonValue`
|
|
53
|
+
* during contract emission and loading.
|
|
54
|
+
*
|
|
55
|
+
* Three representations participate:
|
|
56
|
+
* - **Input** (`TInput`): the JS type at the application boundary.
|
|
57
|
+
* - **Wire** (`TWire`): the format exchanged with the database driver.
|
|
58
|
+
* - **JSON** (`JsonValue`): a JSON-safe form used in contract artifacts.
|
|
59
|
+
*
|
|
60
|
+
* Codec methods split into two groups:
|
|
61
|
+
*
|
|
62
|
+
* - **Query-time** methods (`encode`, `decode`) run per row/parameter at the
|
|
63
|
+
* IO boundary; they are required and Promise-returning. The per-family
|
|
64
|
+
* codec factory accepts sync or async author functions and lifts sync
|
|
65
|
+
* ones to Promise-shaped methods automatically.
|
|
66
|
+
* - **Build-time** methods (`encodeJson`, `decodeJson`, `renderOutputType`)
|
|
67
|
+
* run when the contract is serialized, loaded, or when client types are
|
|
68
|
+
* emitted. They stay synchronous so contract validation and client
|
|
69
|
+
* construction are synchronous.
|
|
70
|
+
*
|
|
71
|
+
* Target-family codec interfaces extend this base with target-shaped
|
|
72
|
+
* metadata.
|
|
73
|
+
*/
|
|
74
|
+
interface Codec<Id extends string = string, TTraits extends readonly CodecTrait[] = readonly CodecTrait[], TWire = unknown, TInput = unknown> {
|
|
75
|
+
/** Unique codec identifier in `namespace/name@version` format (e.g. `pg/timestamptz@1`). */
|
|
76
|
+
readonly id: Id;
|
|
77
|
+
/** Database-native type names this codec handles (e.g. `['timestamptz']`). */
|
|
78
|
+
readonly targetTypes: readonly string[];
|
|
79
|
+
/** Semantic traits for operator gating (e.g. equality, order, numeric). */
|
|
80
|
+
readonly traits?: TTraits;
|
|
81
|
+
/** Converts a JS value to the wire format expected by the database driver. Always Promise-returning at the boundary. The {@link CodecCallContext} is supplied by the runtime on every call (allocated once per `runtime.execute()`); family layers may narrow the ctx to extend it (e.g. SQL adds `column`). Author-side single-arg `(value) => …` functions remain legal via TypeScript's bivariance for trailing parameters. */
|
|
82
|
+
encode(value: TInput, ctx: CodecCallContext): Promise<TWire>;
|
|
83
|
+
/** Converts a wire value from the database driver into the JS application type. Always Promise-returning at the boundary. The {@link CodecCallContext} is supplied by the runtime on every call (allocated once per `runtime.execute()`); family layers may narrow the ctx to extend it (e.g. SQL adds `column`). Author-side single-arg `(wire) => …` functions remain legal via TypeScript's bivariance for trailing parameters. */
|
|
84
|
+
decode(wire: TWire, ctx: CodecCallContext): Promise<TInput>;
|
|
85
|
+
/** Converts a JS value to a JSON-safe representation for contract serialization. Synchronous; called during contract emission. */
|
|
86
|
+
encodeJson(value: TInput): JsonValue;
|
|
87
|
+
/** Converts a JSON representation back to the JS input type. Synchronous; called during contract loading via `validateContract`. */
|
|
88
|
+
decodeJson(json: JsonValue): TInput;
|
|
89
|
+
/** Produces the TypeScript output type expression for a field given its `typeParams`. Synchronous; used during contract.d.ts emission. */
|
|
90
|
+
renderOutputType?(typeParams: Record<string, unknown>): string | undefined;
|
|
91
|
+
}
|
|
92
|
+
interface CodecLookup {
|
|
93
|
+
get(id: string): Codec | undefined;
|
|
94
|
+
}
|
|
95
|
+
declare const emptyCodecLookup: CodecLookup;
|
|
96
|
+
/**
|
|
97
|
+
* Family-agnostic per-instance context supplied by the framework when
|
|
98
|
+
* applying a higher-order codec factory. Allows stateful codecs (e.g.
|
|
99
|
+
* column-scoped encryption) to derive per-instance state from the
|
|
100
|
+
* materialization site.
|
|
101
|
+
*
|
|
102
|
+
* - `name` — the family-agnostic instance identity. For SQL, the runtime
|
|
103
|
+
* populates this as the `storage.types` instance name (e.g.
|
|
104
|
+
* `Embedding1536`) for typeRef-shaped columns, the synthesized
|
|
105
|
+
* anonymous instance name (`<anon:Document.embedding>`) for inline-
|
|
106
|
+
* `typeParams` columns, or a shared sentinel (`<shared:pg/text@1>`)
|
|
107
|
+
* for non-parameterized codec ids. Other families pick the analogous
|
|
108
|
+
* identity for their materialization sites.
|
|
109
|
+
*
|
|
110
|
+
* Family-specific extensions (e.g. {@link import('@prisma-next/sql-relational-core/ast').SqlCodecInstanceContext}
|
|
111
|
+
* in the SQL layer) augment this base with domain-shaped column-set
|
|
112
|
+
* metadata. Codec authors target the base when they don't read family-
|
|
113
|
+
* specific metadata; they target the family extension when they do.
|
|
114
|
+
*/
|
|
115
|
+
interface CodecInstanceContext {
|
|
116
|
+
readonly name: string;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Family-agnostic codec metadata. Family-specific extensions augment the
|
|
120
|
+
* base `db.<family>.<target>` block with native-type information; the base
|
|
121
|
+
* shape is an empty object so non-relational codecs can carry no metadata.
|
|
122
|
+
*/
|
|
123
|
+
interface CodecMeta {
|
|
124
|
+
readonly db?: Record<string, unknown>;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Unified codec descriptor. Every codec in the framework registers through
|
|
128
|
+
* this shape — non-parameterized codecs use `P = void` and a constant
|
|
129
|
+
* factory that returns the same shared codec instance for every column;
|
|
130
|
+
* parameterized codecs use a non-empty `P` and a curried higher-order
|
|
131
|
+
* factory that returns a per-instance codec.
|
|
132
|
+
*
|
|
133
|
+
* The descriptor is the codec-id-keyed source of truth for static metadata
|
|
134
|
+
* (`traits`, `targetTypes`, `meta`) and registration concerns
|
|
135
|
+
* (`paramsSchema` for JSON-boundary validation; optional `renderOutputType`
|
|
136
|
+
* for the `contract.d.ts` emit path). The runtime `Codec` instance returned
|
|
137
|
+
* by `factory(params)(ctx)` carries only the conversion behavior.
|
|
138
|
+
*
|
|
139
|
+
* Whether a codec id "is parameterized" stops being a registration-time
|
|
140
|
+
* distinction — it's a property of `P` on the descriptor. The descriptor
|
|
141
|
+
* map indexes every descriptor by `codecId`; both `descriptorFor(codecId)`
|
|
142
|
+
* and `forColumn(table, column)` resolve through the same map without
|
|
143
|
+
* branching on parameterization.
|
|
144
|
+
*
|
|
145
|
+
* @template P - The shape of the params accepted by the factory (`void` for
|
|
146
|
+
* non-parameterized codecs; a record like `{ length: number }` for
|
|
147
|
+
* parameterized codecs).
|
|
148
|
+
*
|
|
149
|
+
* Codec-registry-unification project § Decision.
|
|
150
|
+
*/
|
|
151
|
+
interface CodecDescriptor<P = void> {
|
|
152
|
+
/** The codec ID this descriptor applies to (e.g. `pg/vector@1`, `pg/text@1`). */
|
|
153
|
+
readonly codecId: string;
|
|
154
|
+
/** Semantic traits for operator gating (e.g. equality, order, numeric). */
|
|
155
|
+
readonly traits: readonly CodecTrait[];
|
|
156
|
+
/** Database-native type names this codec handles (e.g. `['timestamptz']`). */
|
|
157
|
+
readonly targetTypes: readonly string[];
|
|
158
|
+
/** Optional family-specific metadata (e.g. SQL-side `db.sql.postgres.nativeType`). */
|
|
159
|
+
readonly meta?: CodecMeta;
|
|
160
|
+
/**
|
|
161
|
+
* Standard Schema validator for the factory's params. Validates JSON-
|
|
162
|
+
* sourced params at the contract boundary (PSL → IR; `contract.json` →
|
|
163
|
+
* runtime). For non-parameterized codecs (`P = void`), the schema
|
|
164
|
+
* validates `void`/`undefined` — the framework supplies no params at the
|
|
165
|
+
* call boundary.
|
|
166
|
+
*/
|
|
167
|
+
readonly paramsSchema: StandardSchemaV1<P>;
|
|
168
|
+
/**
|
|
169
|
+
* Emit-path string renderer for `contract.d.ts`. Returns the TypeScript
|
|
170
|
+
* output type expression for given params (e.g. `Vector<1536>`).
|
|
171
|
+
* Optional; absent renderers cause the emitter to fall back to the
|
|
172
|
+
* codec's base output type. Non-parameterized codecs typically omit it.
|
|
173
|
+
*/
|
|
174
|
+
readonly renderOutputType?: (params: P) => string | undefined;
|
|
175
|
+
/**
|
|
176
|
+
* The curried higher-order codec. For non-parameterized codecs, the
|
|
177
|
+
* factory is constant — every call returns the same shared codec
|
|
178
|
+
* instance. For parameterized codecs, the factory is called once per
|
|
179
|
+
* `storage.types` instance (or once per inline-`typeParams` column),
|
|
180
|
+
* with `ctx` carrying the column set the resulting codec serves.
|
|
181
|
+
*/
|
|
182
|
+
readonly factory: (params: P) => (ctx: CodecInstanceContext) => Codec;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Standard Schema validator for `void` params. Accepts only `undefined`
|
|
186
|
+
* (or absent input); rejects any other value so a contract that tries to
|
|
187
|
+
* thread `typeParams` through a non-parameterized codec id fails fast at
|
|
188
|
+
* the JSON boundary instead of silently coercing the value away. Used by
|
|
189
|
+
* the framework-supplied non-parameterized descriptor synthesizer.
|
|
190
|
+
*/
|
|
191
|
+
declare const voidParamsSchema: StandardSchemaV1<void>;
|
|
192
|
+
/**
|
|
193
|
+
* Synthesize a `CodecDescriptor<void>` for a non-parameterized codec
|
|
194
|
+
* runtime instance. The factory is constant — every call returns the same
|
|
195
|
+
* shared codec instance — so columns sharing this codec id share one
|
|
196
|
+
* resolved codec.
|
|
197
|
+
*
|
|
198
|
+
* Codec-registry-unification spec § Decision (Case T — non-parameterized
|
|
199
|
+
* text codec). This is the bridge while non-parameterized codec
|
|
200
|
+
* contributors still register through the legacy `codecs:` slot; once they
|
|
201
|
+
* migrate to ship descriptors directly (TML-2357 T3.5.3), this synthesis
|
|
202
|
+
* steps aside.
|
|
203
|
+
*/
|
|
204
|
+
declare function synthesizeNonParameterizedDescriptor(codec: Codec): CodecDescriptor<void>;
|
|
205
|
+
//#endregion
|
|
206
|
+
export { CodecLookup as a, emptyCodecLookup as c, CodecInstanceContext as i, synthesizeNonParameterizedDescriptor as l, CodecCallContext as n, CodecMeta as o, CodecDescriptor as r, CodecTrait as s, Codec as t, voidParamsSchema as u };
|
|
207
|
+
//# sourceMappingURL=codec-types-CB0jWeHU.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codec-types-CB0jWeHU.d.mts","names":[],"sources":["../src/shared/codec-types.ts"],"sourcesContent":[],"mappings":";;;;KAGY,UAAA;;AAAZ;AA4CA;AAiCA;;;;;;;;;MAe2B,gBAAA;;;;;;;;;AAS3B;AAIA;AAuBA;AASA;AA6BA;;;;;;;;;;AAyCA;AA6BgB,UAhMC,gBAAA,CAgMD;oBA/LI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAgCH,2DAEU,wBAAwB;;eAKpC;;;;oBAIK;;gBAEJ,aAAa,mBAAmB,QAAQ;;eAEzC,YAAY,mBAAmB,QAAQ;;oBAElC,SAAS;;mBAEV,YAAY;;gCAEC;;UAGf,WAAA;mBACE;;cAGN,kBAAkB;;;;;;;;;;;;;;;;;;;;UAuBd,oBAAA;;;;;;;;UASA,SAAA;gBACD;;;;;;;;;;;;;;;;;;;;;;;;;;;UA4BC;;;;4BAIW;;;;kBAIV;;;;;;;;yBAQO,iBAAiB;;;;;;;uCAOH;;;;;;;;6BAQV,YAAY,yBAAyB;;;;;;;;;cAUrD,kBAAkB;;;;;;;;;;;;;iBA6Bf,oCAAA,QAA4C,QAAQ"}
|
package/dist/codec.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as emptyCodecLookup, i as
|
|
2
|
-
export { type Codec, type CodecCallContext, type CodecLookup, type CodecTrait, emptyCodecLookup };
|
|
1
|
+
import { a as CodecLookup, c as emptyCodecLookup, i as CodecInstanceContext, l as synthesizeNonParameterizedDescriptor, n as CodecCallContext, o as CodecMeta, r as CodecDescriptor, s as CodecTrait, t as Codec, u as voidParamsSchema } from "./codec-types-CB0jWeHU.mjs";
|
|
2
|
+
export { type Codec, type CodecCallContext, type CodecDescriptor, type CodecInstanceContext, type CodecLookup, type CodecMeta, type CodecTrait, emptyCodecLookup, synthesizeNonParameterizedDescriptor, voidParamsSchema };
|
package/dist/codec.mjs
CHANGED
|
@@ -1,6 +1,42 @@
|
|
|
1
1
|
//#region src/shared/codec-types.ts
|
|
2
2
|
const emptyCodecLookup = { get: () => void 0 };
|
|
3
|
+
/**
|
|
4
|
+
* Standard Schema validator for `void` params. Accepts only `undefined`
|
|
5
|
+
* (or absent input); rejects any other value so a contract that tries to
|
|
6
|
+
* thread `typeParams` through a non-parameterized codec id fails fast at
|
|
7
|
+
* the JSON boundary instead of silently coercing the value away. Used by
|
|
8
|
+
* the framework-supplied non-parameterized descriptor synthesizer.
|
|
9
|
+
*/
|
|
10
|
+
const voidParamsSchema = { "~standard": {
|
|
11
|
+
version: 1,
|
|
12
|
+
vendor: "prisma-next",
|
|
13
|
+
validate: (input) => input === void 0 ? { value: void 0 } : { issues: [{ message: "unexpected typeParams for non-parameterized codec (void params expected)" }] }
|
|
14
|
+
} };
|
|
15
|
+
/**
|
|
16
|
+
* Synthesize a `CodecDescriptor<void>` for a non-parameterized codec
|
|
17
|
+
* runtime instance. The factory is constant — every call returns the same
|
|
18
|
+
* shared codec instance — so columns sharing this codec id share one
|
|
19
|
+
* resolved codec.
|
|
20
|
+
*
|
|
21
|
+
* Codec-registry-unification spec § Decision (Case T — non-parameterized
|
|
22
|
+
* text codec). This is the bridge while non-parameterized codec
|
|
23
|
+
* contributors still register through the legacy `codecs:` slot; once they
|
|
24
|
+
* migrate to ship descriptors directly (TML-2357 T3.5.3), this synthesis
|
|
25
|
+
* steps aside.
|
|
26
|
+
*/
|
|
27
|
+
function synthesizeNonParameterizedDescriptor(codec) {
|
|
28
|
+
const sharedFactory = () => () => codec;
|
|
29
|
+
const codecMeta = codec.meta;
|
|
30
|
+
return {
|
|
31
|
+
codecId: codec.id,
|
|
32
|
+
traits: codec.traits ?? [],
|
|
33
|
+
targetTypes: codec.targetTypes,
|
|
34
|
+
paramsSchema: voidParamsSchema,
|
|
35
|
+
factory: sharedFactory,
|
|
36
|
+
...codecMeta !== void 0 ? { meta: codecMeta } : {}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
3
39
|
|
|
4
40
|
//#endregion
|
|
5
|
-
export { emptyCodecLookup };
|
|
41
|
+
export { emptyCodecLookup, synthesizeNonParameterizedDescriptor, voidParamsSchema };
|
|
6
42
|
//# sourceMappingURL=codec.mjs.map
|
package/dist/codec.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec.mjs","names":["emptyCodecLookup: CodecLookup"],"sources":["../src/shared/codec-types.ts"],"sourcesContent":["import type { JsonValue } from '@prisma-next/contract/types';\n\nexport type CodecTrait = 'equality' | 'order' | 'boolean' | 'numeric' | 'textual';\n\n/**\n * Per-call context the runtime threads to every `codec.encode` /\n * `codec.decode` invocation for a single `runtime.execute()` call.\n *\n * The framework-level shape is family-agnostic and carries one field:\n *\n * - `signal?: AbortSignal` — per-query cancellation. The runtime returns\n * a `RUNTIME.ABORTED` envelope when the signal aborts; codec authors\n * who forward `signal` to their underlying SDK get true cancellation\n * of in-flight network calls.\n *\n * Family layers extend this base with their own shape-of-call metadata:\n * the SQL family adds `column?: SqlColumnRef` via `SqlCodecCallContext`\n * (see `@prisma-next/sql-relational-core`). Mongo currently uses this\n * framework type unchanged. Column metadata is intentionally **not** on\n * the framework type — it is a SQL-family concept rooted in SQL's\n * `(table, column)` addressing model and would not generalise to other\n * families.\n *\n * The interface is named explicitly (not inlined) so future framework\n * fields and family extensions can land additively without breaking\n * codec author signatures.\n */\nexport interface CodecCallContext {\n readonly signal?: AbortSignal;\n}\n\n/**\n * A codec is the contract between an application value and its on-wire and\n * on-contract-disk representations.\n *\n * The author's mental model is two JS-side types — `TInput` (the\n * application JS type) and `TWire` (the database driver wire format) —\n * plus `JsonValue` for build-time contract artifacts. The codec translates\n * `TInput` to `TWire` on writes and back on reads, and to/from `JsonValue`\n * during contract emission and loading.\n *\n * Three representations participate:\n * - **Input** (`TInput`): the JS type at the application boundary.\n * - **Wire** (`TWire`): the format exchanged with the database driver.\n * - **JSON** (`JsonValue`): a JSON-safe form used in contract artifacts.\n *\n * Codec methods split into two groups:\n *\n * - **Query-time** methods (`encode`, `decode`) run per row/parameter at the\n * IO boundary; they are required and Promise-returning. The per-family\n * codec factory accepts sync or async author functions and lifts sync\n * ones to Promise-shaped methods automatically.\n * - **Build-time** methods (`encodeJson`, `decodeJson`, `renderOutputType`)\n * run when the contract is serialized, loaded, or when client types are\n * emitted. They stay synchronous so contract validation and client\n * construction are synchronous.\n *\n * Target-family codec interfaces extend this base with target-shaped\n * metadata.\n */\nexport interface Codec<\n Id extends string = string,\n TTraits extends readonly CodecTrait[] = readonly CodecTrait[],\n TWire = unknown,\n TInput = unknown,\n> {\n /** Unique codec identifier in `namespace/name@version` format (e.g. `pg/timestamptz@1`). */\n readonly id: Id;\n /** Database-native type names this codec handles (e.g. `['timestamptz']`). */\n readonly targetTypes: readonly string[];\n /** Semantic traits for operator gating (e.g. equality, order, numeric). */\n readonly traits?: TTraits;\n /** Converts a JS value to the wire format expected by the database driver. Always Promise-returning at the boundary. The {@link CodecCallContext} is supplied by the runtime on every call (allocated once per `runtime.execute()`); family layers may narrow the ctx to extend it (e.g. SQL adds `column`). Author-side single-arg `(value) => …` functions remain legal via TypeScript's bivariance for trailing parameters. */\n encode(value: TInput, ctx: CodecCallContext): Promise<TWire>;\n /** Converts a wire value from the database driver into the JS application type. Always Promise-returning at the boundary. The {@link CodecCallContext} is supplied by the runtime on every call (allocated once per `runtime.execute()`); family layers may narrow the ctx to extend it (e.g. SQL adds `column`). Author-side single-arg `(wire) => …` functions remain legal via TypeScript's bivariance for trailing parameters. */\n decode(wire: TWire, ctx: CodecCallContext): Promise<TInput>;\n /** Converts a JS value to a JSON-safe representation for contract serialization. Synchronous; called during contract emission. */\n encodeJson(value: TInput): JsonValue;\n /** Converts a JSON representation back to the JS input type. Synchronous; called during contract loading via `validateContract`. */\n decodeJson(json: JsonValue): TInput;\n /** Produces the TypeScript output type expression for a field given its `typeParams`. Synchronous; used during contract.d.ts emission. */\n renderOutputType?(typeParams: Record<string, unknown>): string | undefined;\n}\n\nexport interface CodecLookup {\n get(id: string): Codec | undefined;\n}\n\nexport const emptyCodecLookup: CodecLookup = {\n get: () => undefined,\n};\n"],"mappings":";AAwFA,MAAaA,mBAAgC,EAC3C,WAAW,QACZ"}
|
|
1
|
+
{"version":3,"file":"codec.mjs","names":["emptyCodecLookup: CodecLookup","voidParamsSchema: StandardSchemaV1<void>"],"sources":["../src/shared/codec-types.ts"],"sourcesContent":["import type { JsonValue } from '@prisma-next/contract/types';\nimport type { StandardSchemaV1 } from '@standard-schema/spec';\n\nexport type CodecTrait =\n | 'equality'\n | 'order'\n | 'boolean'\n | 'numeric'\n | 'textual'\n /**\n * The codec carries a per-instance `validate(value: unknown) =>\n * JsonSchemaValidationResult` function on the resolved codec object that\n * the framework's `JsonSchemaValidatorRegistry` consults at runtime. The\n * trait gates the `extractValidator` cast from structurally-typed\n * `unknown` to a typed validator view.\n *\n * Retirement target. The unified `CodecDescriptor` model moves\n * validation into the resolved codec's `decode` body; the parallel\n * `JsonSchemaValidatorRegistry` (and this trait alongside it) retires\n * under TML-2357 (T3.5.12). Per-library JSON extensions like\n * `@prisma-next/extension-arktype-json` already follow the new pattern.\n */\n | 'json-validator';\n\n/**\n * Per-call context the runtime threads to every `codec.encode` /\n * `codec.decode` invocation for a single `runtime.execute()` call.\n *\n * The framework-level shape is family-agnostic and carries one field:\n *\n * - `signal?: AbortSignal` — per-query cancellation. The runtime returns\n * a `RUNTIME.ABORTED` envelope when the signal aborts; codec authors\n * who forward `signal` to their underlying SDK get true cancellation\n * of in-flight network calls.\n *\n * Family layers extend this base with their own shape-of-call metadata:\n * the SQL family adds `column?: SqlColumnRef` via `SqlCodecCallContext`\n * (see `@prisma-next/sql-relational-core`). Mongo currently uses this\n * framework type unchanged. Column metadata is intentionally **not** on\n * the framework type — it is a SQL-family concept rooted in SQL's\n * `(table, column)` addressing model and would not generalise to other\n * families.\n *\n * The interface is named explicitly (not inlined) so future framework\n * fields and family extensions can land additively without breaking\n * codec author signatures.\n */\nexport interface CodecCallContext {\n readonly signal?: AbortSignal;\n}\n\n/**\n * A codec is the contract between an application value and its on-wire and\n * on-contract-disk representations.\n *\n * The author's mental model is two JS-side types — `TInput` (the\n * application JS type) and `TWire` (the database driver wire format) —\n * plus `JsonValue` for build-time contract artifacts. The codec translates\n * `TInput` to `TWire` on writes and back on reads, and to/from `JsonValue`\n * during contract emission and loading.\n *\n * Three representations participate:\n * - **Input** (`TInput`): the JS type at the application boundary.\n * - **Wire** (`TWire`): the format exchanged with the database driver.\n * - **JSON** (`JsonValue`): a JSON-safe form used in contract artifacts.\n *\n * Codec methods split into two groups:\n *\n * - **Query-time** methods (`encode`, `decode`) run per row/parameter at the\n * IO boundary; they are required and Promise-returning. The per-family\n * codec factory accepts sync or async author functions and lifts sync\n * ones to Promise-shaped methods automatically.\n * - **Build-time** methods (`encodeJson`, `decodeJson`, `renderOutputType`)\n * run when the contract is serialized, loaded, or when client types are\n * emitted. They stay synchronous so contract validation and client\n * construction are synchronous.\n *\n * Target-family codec interfaces extend this base with target-shaped\n * metadata.\n */\nexport interface Codec<\n Id extends string = string,\n TTraits extends readonly CodecTrait[] = readonly CodecTrait[],\n TWire = unknown,\n TInput = unknown,\n> {\n /** Unique codec identifier in `namespace/name@version` format (e.g. `pg/timestamptz@1`). */\n readonly id: Id;\n /** Database-native type names this codec handles (e.g. `['timestamptz']`). */\n readonly targetTypes: readonly string[];\n /** Semantic traits for operator gating (e.g. equality, order, numeric). */\n readonly traits?: TTraits;\n /** Converts a JS value to the wire format expected by the database driver. Always Promise-returning at the boundary. The {@link CodecCallContext} is supplied by the runtime on every call (allocated once per `runtime.execute()`); family layers may narrow the ctx to extend it (e.g. SQL adds `column`). Author-side single-arg `(value) => …` functions remain legal via TypeScript's bivariance for trailing parameters. */\n encode(value: TInput, ctx: CodecCallContext): Promise<TWire>;\n /** Converts a wire value from the database driver into the JS application type. Always Promise-returning at the boundary. The {@link CodecCallContext} is supplied by the runtime on every call (allocated once per `runtime.execute()`); family layers may narrow the ctx to extend it (e.g. SQL adds `column`). Author-side single-arg `(wire) => …` functions remain legal via TypeScript's bivariance for trailing parameters. */\n decode(wire: TWire, ctx: CodecCallContext): Promise<TInput>;\n /** Converts a JS value to a JSON-safe representation for contract serialization. Synchronous; called during contract emission. */\n encodeJson(value: TInput): JsonValue;\n /** Converts a JSON representation back to the JS input type. Synchronous; called during contract loading via `validateContract`. */\n decodeJson(json: JsonValue): TInput;\n /** Produces the TypeScript output type expression for a field given its `typeParams`. Synchronous; used during contract.d.ts emission. */\n renderOutputType?(typeParams: Record<string, unknown>): string | undefined;\n}\n\nexport interface CodecLookup {\n get(id: string): Codec | undefined;\n}\n\nexport const emptyCodecLookup: CodecLookup = {\n get: () => undefined,\n};\n\n/**\n * Family-agnostic per-instance context supplied by the framework when\n * applying a higher-order codec factory. Allows stateful codecs (e.g.\n * column-scoped encryption) to derive per-instance state from the\n * materialization site.\n *\n * - `name` — the family-agnostic instance identity. For SQL, the runtime\n * populates this as the `storage.types` instance name (e.g.\n * `Embedding1536`) for typeRef-shaped columns, the synthesized\n * anonymous instance name (`<anon:Document.embedding>`) for inline-\n * `typeParams` columns, or a shared sentinel (`<shared:pg/text@1>`)\n * for non-parameterized codec ids. Other families pick the analogous\n * identity for their materialization sites.\n *\n * Family-specific extensions (e.g. {@link import('@prisma-next/sql-relational-core/ast').SqlCodecInstanceContext}\n * in the SQL layer) augment this base with domain-shaped column-set\n * metadata. Codec authors target the base when they don't read family-\n * specific metadata; they target the family extension when they do.\n */\nexport interface CodecInstanceContext {\n readonly name: string;\n}\n\n/**\n * Family-agnostic codec metadata. Family-specific extensions augment the\n * base `db.<family>.<target>` block with native-type information; the base\n * shape is an empty object so non-relational codecs can carry no metadata.\n */\nexport interface CodecMeta {\n readonly db?: Record<string, unknown>;\n}\n\n/**\n * Unified codec descriptor. Every codec in the framework registers through\n * this shape — non-parameterized codecs use `P = void` and a constant\n * factory that returns the same shared codec instance for every column;\n * parameterized codecs use a non-empty `P` and a curried higher-order\n * factory that returns a per-instance codec.\n *\n * The descriptor is the codec-id-keyed source of truth for static metadata\n * (`traits`, `targetTypes`, `meta`) and registration concerns\n * (`paramsSchema` for JSON-boundary validation; optional `renderOutputType`\n * for the `contract.d.ts` emit path). The runtime `Codec` instance returned\n * by `factory(params)(ctx)` carries only the conversion behavior.\n *\n * Whether a codec id \"is parameterized\" stops being a registration-time\n * distinction — it's a property of `P` on the descriptor. The descriptor\n * map indexes every descriptor by `codecId`; both `descriptorFor(codecId)`\n * and `forColumn(table, column)` resolve through the same map without\n * branching on parameterization.\n *\n * @template P - The shape of the params accepted by the factory (`void` for\n * non-parameterized codecs; a record like `{ length: number }` for\n * parameterized codecs).\n *\n * Codec-registry-unification project § Decision.\n */\nexport interface CodecDescriptor<P = void> {\n /** The codec ID this descriptor applies to (e.g. `pg/vector@1`, `pg/text@1`). */\n readonly codecId: string;\n /** Semantic traits for operator gating (e.g. equality, order, numeric). */\n readonly traits: readonly CodecTrait[];\n /** Database-native type names this codec handles (e.g. `['timestamptz']`). */\n readonly targetTypes: readonly string[];\n /** Optional family-specific metadata (e.g. SQL-side `db.sql.postgres.nativeType`). */\n readonly meta?: CodecMeta;\n /**\n * Standard Schema validator for the factory's params. Validates JSON-\n * sourced params at the contract boundary (PSL → IR; `contract.json` →\n * runtime). For non-parameterized codecs (`P = void`), the schema\n * validates `void`/`undefined` — the framework supplies no params at the\n * call boundary.\n */\n readonly paramsSchema: StandardSchemaV1<P>;\n /**\n * Emit-path string renderer for `contract.d.ts`. Returns the TypeScript\n * output type expression for given params (e.g. `Vector<1536>`).\n * Optional; absent renderers cause the emitter to fall back to the\n * codec's base output type. Non-parameterized codecs typically omit it.\n */\n readonly renderOutputType?: (params: P) => string | undefined;\n /**\n * The curried higher-order codec. For non-parameterized codecs, the\n * factory is constant — every call returns the same shared codec\n * instance. For parameterized codecs, the factory is called once per\n * `storage.types` instance (or once per inline-`typeParams` column),\n * with `ctx` carrying the column set the resulting codec serves.\n */\n readonly factory: (params: P) => (ctx: CodecInstanceContext) => Codec;\n}\n\n/**\n * Standard Schema validator for `void` params. Accepts only `undefined`\n * (or absent input); rejects any other value so a contract that tries to\n * thread `typeParams` through a non-parameterized codec id fails fast at\n * the JSON boundary instead of silently coercing the value away. Used by\n * the framework-supplied non-parameterized descriptor synthesizer.\n */\nexport const voidParamsSchema: StandardSchemaV1<void> = {\n '~standard': {\n version: 1,\n vendor: 'prisma-next',\n validate: (input) =>\n input === undefined\n ? { value: undefined }\n : {\n issues: [\n {\n message: 'unexpected typeParams for non-parameterized codec (void params expected)',\n },\n ],\n },\n },\n};\n\n/**\n * Synthesize a `CodecDescriptor<void>` for a non-parameterized codec\n * runtime instance. The factory is constant — every call returns the same\n * shared codec instance — so columns sharing this codec id share one\n * resolved codec.\n *\n * Codec-registry-unification spec § Decision (Case T — non-parameterized\n * text codec). This is the bridge while non-parameterized codec\n * contributors still register through the legacy `codecs:` slot; once they\n * migrate to ship descriptors directly (TML-2357 T3.5.3), this synthesis\n * steps aside.\n */\nexport function synthesizeNonParameterizedDescriptor(codec: Codec): CodecDescriptor<void> {\n // The descriptor's `factory: (params: void) => (ctx: CodecInstanceContext)\n // => Codec` is a constant for non-parameterized codecs — `params` is\n // never read and the returned ctx-applier always yields the same shared\n // codec. We rely on the descriptor's typed `factory` slot to infer the\n // signatures rather than naming `void` locally (biome's\n // `noConfusingVoidType` flags `void` outside return positions).\n const sharedFactory = () => () => codec;\n // Family-extended codecs (SQL `Codec`) carry an optional `meta` field\n // that the base interface doesn't declare. Read it through a structural\n // narrow so the synthesizer forwards it to the descriptor without losing\n // type safety on the base shape.\n const codecMeta = (codec as { readonly meta?: CodecMeta }).meta;\n return {\n codecId: codec.id,\n traits: codec.traits ?? [],\n targetTypes: codec.targetTypes,\n paramsSchema: voidParamsSchema,\n factory: sharedFactory,\n ...(codecMeta !== undefined ? { meta: codecMeta } : {}),\n };\n}\n"],"mappings":";AA4GA,MAAaA,mBAAgC,EAC3C,WAAW,QACZ;;;;;;;;AAoGD,MAAaC,mBAA2C,EACtD,aAAa;CACX,SAAS;CACT,QAAQ;CACR,WAAW,UACT,UAAU,SACN,EAAE,OAAO,QAAW,GACpB,EACE,QAAQ,CACN,EACE,SAAS,4EACV,CACF,EACF;CACR,EACF;;;;;;;;;;;;;AAcD,SAAgB,qCAAqC,OAAqC;CAOxF,MAAM,4BAA4B;CAKlC,MAAM,YAAa,MAAwC;AAC3D,QAAO;EACL,SAAS,MAAM;EACf,QAAQ,MAAM,UAAU,EAAE;EAC1B,aAAa,MAAM;EACnB,cAAc;EACd,SAAS;EACT,GAAI,cAAc,SAAY,EAAE,MAAM,WAAW,GAAG,EAAE;EACvD"}
|
package/dist/components.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as checkContractComponentRequirements, _ as PackRefBase, a as ComponentMetadata, b as TargetInstance, c as DriverDescriptor, d as ExtensionDescriptor, f as ExtensionInstance, g as FamilyPackRef, h as FamilyInstance, i as ComponentDescriptor, l as DriverInstance, m as FamilyDescriptor, n as AdapterInstance, o as ContractComponentRequirementsCheckInput, p as ExtensionPackRef, r as AdapterPackRef, s as ContractComponentRequirementsCheckResult, t as AdapterDescriptor, u as DriverPackRef, v as TargetBoundComponentDescriptor, x as TargetPackRef, y as TargetDescriptor } from "./framework-components-
|
|
1
|
+
import { S as checkContractComponentRequirements, _ as PackRefBase, a as ComponentMetadata, b as TargetInstance, c as DriverDescriptor, d as ExtensionDescriptor, f as ExtensionInstance, g as FamilyPackRef, h as FamilyInstance, i as ComponentDescriptor, l as DriverInstance, m as FamilyDescriptor, n as AdapterInstance, o as ContractComponentRequirementsCheckInput, p as ExtensionPackRef, r as AdapterPackRef, s as ContractComponentRequirementsCheckResult, t as AdapterDescriptor, u as DriverPackRef, v as TargetBoundComponentDescriptor, x as TargetPackRef, y as TargetDescriptor } from "./framework-components-AHI6V96G.mjs";
|
|
2
2
|
export { type AdapterDescriptor, type AdapterInstance, type AdapterPackRef, type ComponentDescriptor, type ComponentMetadata, type ContractComponentRequirementsCheckInput, type ContractComponentRequirementsCheckResult, type DriverDescriptor, type DriverInstance, type DriverPackRef, type ExtensionDescriptor, type ExtensionInstance, type ExtensionPackRef, type FamilyDescriptor, type FamilyInstance, type FamilyPackRef, type PackRefBase, type TargetBoundComponentDescriptor, type TargetDescriptor, type TargetInstance, type TargetPackRef, checkContractComponentRequirements };
|
package/dist/control.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as AuthoringFieldNamespace, d as AuthoringTypeNamespace, i as AuthoringContributions } from "./framework-authoring-BdrFDx4x.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { A as LoweredDefaultResult, C as ControlMutationDefaultEntry, D as DefaultFunctionLoweringHandler, E as DefaultFunctionLoweringContext, F as SourceSpan, M as MutationDefaultGeneratorDescriptor, N as ParsedDefaultFunctionCall, O as DefaultFunctionRegistry, P as SourceDiagnostic, T as ControlMutationDefaults, a as ComponentMetadata, b as TargetInstance, c as DriverDescriptor, d as ExtensionDescriptor, f as ExtensionInstance, h as FamilyInstance, j as LoweredDefaultValue, k as DefaultFunctionRegistryEntry, l as DriverInstance, m as FamilyDescriptor, n as AdapterInstance, t as AdapterDescriptor, v as TargetBoundComponentDescriptor, w as ControlMutationDefaultRegistry, y as TargetDescriptor } from "./framework-components-
|
|
2
|
+
import { a as CodecLookup } from "./codec-types-CB0jWeHU.mjs";
|
|
3
|
+
import { A as LoweredDefaultResult, C as ControlMutationDefaultEntry, D as DefaultFunctionLoweringHandler, E as DefaultFunctionLoweringContext, F as SourceSpan, M as MutationDefaultGeneratorDescriptor, N as ParsedDefaultFunctionCall, O as DefaultFunctionRegistry, P as SourceDiagnostic, T as ControlMutationDefaults, a as ComponentMetadata, b as TargetInstance, c as DriverDescriptor, d as ExtensionDescriptor, f as ExtensionInstance, h as FamilyInstance, j as LoweredDefaultValue, k as DefaultFunctionRegistryEntry, l as DriverInstance, m as FamilyDescriptor, n as AdapterInstance, t as AdapterDescriptor, v as TargetBoundComponentDescriptor, w as ControlMutationDefaultRegistry, y as TargetDescriptor } from "./framework-components-AHI6V96G.mjs";
|
|
4
4
|
import { t as TypesImportSpec } from "./types-import-spec-D-O6GotH.mjs";
|
|
5
|
-
import { t as EmissionSpi } from "./emission-types-
|
|
5
|
+
import { t as EmissionSpi } from "./emission-types-D6t3_a0x.mjs";
|
|
6
6
|
import { m as PslDocumentAst } from "./psl-ast-9X5rwo98.mjs";
|
|
7
7
|
import { Contract, ContractMarkerRecord } from "@prisma-next/contract/types";
|
|
8
8
|
import { Result } from "@prisma-next/utils/result";
|
package/dist/control.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control.d.mts","names":[],"sources":["../src/control/control-result-types.ts","../src/control/control-instances.ts","../src/control/control-stack.ts","../src/control/control-descriptors.ts","../src/control/control-migration-types.ts","../src/control/control-operation-preview.ts","../src/control/control-schema-view.ts","../src/control/control-capabilities.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;cAAa,0BAAA;cACA,yBAAA;cACA,2BAAA;cACA,0BAAA;UAEI,gBAAA;;;kBAGC,SAAS;;UAGV,oBAAA;EAXJ,SAAA,EAAA,EAAA,OAAA;EACA,SAAA,IAAA,CAAA,EAAA,MAAA;EACA,SAAA,OAAA,EAAA,MAAA;EACA,SAAA,QAAA,EAAA;IAEI,SAAA,WAAgB,EAAA,MAGN;IAGV,SAAA,WAAoB,CAAA,EAAA,MAAA;EA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A,CAAA,CAAA,QAAA,EO/EvB,qBP+EuB,CO/ED,SP+EC,EO/EU,SP+EV,CAAA,CAAA,EAAA,QAAA,IO9EpB,qBP8EoB,CO9EE,SP8EF,EO9Ea,SP8Eb,CAAA,GO9E0B,uBP8E1B,CO9EkD,SP8ElD,CAAA;AAQnC;AAiBA;;;;ACvIiB,UM4CA,uBAAA,CN5CqB;EACb,kBAAA,CAAA,UAAA,EAAA,SM4CiB,sBN5CjB,EAAA,CAAA,EM4C4C,gBN5C5C;;AAIkB,iBM2C3B,mBN3C2B,CAAA,kBAAA,MAAA,EAAA,SAAA,CAAA,CAAA,QAAA,EM4C/B,qBN5C+B,CM4CT,SN5CS,EM4CE,SN5CF,CAAA,CAAA,EAAA,QAAA,IM6C5B,qBN7C4B,CM6CN,SN7CM,EM6CK,SN7CL,CAAA,GM6CkB,uBN7ClB"}
|
|
1
|
+
{"version":3,"file":"control.d.mts","names":[],"sources":["../src/control/control-result-types.ts","../src/control/control-instances.ts","../src/control/control-stack.ts","../src/control/control-descriptors.ts","../src/control/control-migration-types.ts","../src/control/control-operation-preview.ts","../src/control/control-schema-view.ts","../src/control/control-capabilities.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;cAAa,0BAAA;cACA,yBAAA;cACA,2BAAA;cACA,0BAAA;UAEI,gBAAA;;;kBAGC,SAAS;;UAGV,oBAAA;EAXJ,SAAA,EAAA,EAAA,OAAA;EACA,SAAA,IAAA,CAAA,EAAA,MAAA;EACA,SAAA,OAAA,EAAA,MAAA;EACA,SAAA,QAAA,EAAA;IAEI,SAAA,WAAgB,EAAA,MAGN;IAGV,SAAA,WAAoB,CAAA,EAAA,MAAA;EA2BpB,CAAA;EAiCA,SAAA,MAAA,CAAA,EAAA;IAQL,SAAA,WAAW,CAAA,EAAG,MAAA;IAET,SAAA,WAAA,CAAsB,EAAA,MAAA;EAYtB,CAAA;EAgCA,SAAA,MAAA,EAAA;IAQA,SAAA,QAAA,EAAA,MAAsB;IAiBtB,SAAA,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;;;;ACvIiB,UM4CA,uBAAA,CN5CqB;EACb,kBAAA,CAAA,UAAA,EAAA,SM4CiB,sBN5CjB,EAAA,CAAA,EM4C4C,gBN5C5C;;AAIkB,iBM2C3B,mBN3C2B,CAAA,kBAAA,MAAA,EAAA,SAAA,CAAA,CAAA,QAAA,EM4C/B,qBN5C+B,CM4CT,SN5CS,EM4CE,SN5CF,CAAA,CAAA,EAAA,QAAA,IM6C5B,qBN7C4B,CM6CN,SN7CM,EM6CK,SN7CL,CAAA,GM6CkB,uBN7ClB"}
|
|
@@ -18,7 +18,22 @@ interface EmissionSpi {
|
|
|
18
18
|
getFamilyTypeAliases(options?: GenerateContractTypesOptions): string;
|
|
19
19
|
getTypeMapsExpression(): string;
|
|
20
20
|
getContractWrapper(contractBaseName: string, typeMapsName: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Per-family resolver for typeParams that don't live inline on the
|
|
23
|
+
* framework-domain `ContractField`. Some families (notably SQL) let columns
|
|
24
|
+
* reference a named entry in `storage.types` via `typeRef`; the typeParams
|
|
25
|
+
* live on that named entry rather than on the domain field. The framework
|
|
26
|
+
* emit path consults this hook so the codec's `renderOutputType` can run
|
|
27
|
+
* for typeRef-shaped columns.
|
|
28
|
+
*
|
|
29
|
+
* Inline `field.type.typeParams` always takes precedence; the hook is only
|
|
30
|
+
* consulted when the domain field has no typeParams. Families without
|
|
31
|
+
* named storage types (e.g. mongo) don't implement this hook.
|
|
32
|
+
*
|
|
33
|
+
* Returns `undefined` when the field has no resolvable typeParams.
|
|
34
|
+
*/
|
|
35
|
+
resolveFieldTypeParams?(modelName: string, fieldName: string, model: ContractModel, contract: Contract): Record<string, unknown> | undefined;
|
|
21
36
|
}
|
|
22
37
|
//#endregion
|
|
23
38
|
export { GenerateContractTypesOptions as n, ValidationContext as r, EmissionSpi as t };
|
|
24
|
-
//# sourceMappingURL=emission-types-
|
|
39
|
+
//# sourceMappingURL=emission-types-D6t3_a0x.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emission-types-
|
|
1
|
+
{"version":3,"file":"emission-types-D6t3_a0x.d.mts","names":[],"sources":["../src/control/emission-types.ts"],"sourcesContent":[],"mappings":";;;;UAGiB,4BAAA;uCACsB,cAAc;AADrD;AAIiB,UAAA,iBAAA,CAAiB;EACU,SAAA,gBAAA,CAAA,EAAd,aAAc,CAAA,eAAA,CAAA;EAAd,SAAA,oBAAA,CAAA,EACI,aADJ,CACkB,eADlB,CAAA;EACkB,SAAA,YAAA,CAAA,EACtB,aADsB,CAAA,MAAA,CAAA;;AACtB,UAGT,WAAA,CAHS;EAAa,SAAA,EAAA,EAAA,MAAA;EAGtB,mBAAW,CAAA,QAAA,EAGI,QAHJ,EAAA,mBAAA,EAAA,MAAA,CAAA,EAAA,MAAA;EAGI,wBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,EAEqB,aAFrB,CAAA,EAAA,MAAA;EAEqB,gBAAA,EAAA,EAAA,MAAA,EAAA;EAIpB,oBAAA,CAAA,OAAA,CAAA,EAAA,4BAAA,CAAA,EAAA,MAAA;EAuBtB,qBAAA,EAAA,EAAA,MAAA;EACG,kBAAA,CAAA,gBAAA,EAAA,MAAA,EAAA,YAAA,EAAA,MAAA,CAAA,EAAA,MAAA;EACT;;;;;;;;;;;;;;uEAFM,yBACG,WACT"}
|
package/dist/emission.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as TypesImportSpec } from "./types-import-spec-D-O6GotH.mjs";
|
|
2
|
-
import { n as GenerateContractTypesOptions, r as ValidationContext, t as EmissionSpi } from "./emission-types-
|
|
2
|
+
import { n as GenerateContractTypesOptions, r as ValidationContext, t as EmissionSpi } from "./emission-types-D6t3_a0x.mjs";
|
|
3
3
|
export { type EmissionSpi, type GenerateContractTypesOptions, type TypesImportSpec, type ValidationContext };
|
package/dist/execution.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as TargetInstance, c as DriverDescriptor, d as ExtensionDescriptor, f as ExtensionInstance, h as FamilyInstance, l as DriverInstance, m as FamilyDescriptor, n as AdapterInstance, t as AdapterDescriptor, y as TargetDescriptor } from "./framework-components-
|
|
1
|
+
import { b as TargetInstance, c as DriverDescriptor, d as ExtensionDescriptor, f as ExtensionInstance, h as FamilyInstance, l as DriverInstance, m as FamilyDescriptor, n as AdapterInstance, t as AdapterDescriptor, y as TargetDescriptor } from "./framework-components-AHI6V96G.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/execution/execution-instances.d.ts
|
|
4
4
|
interface RuntimeFamilyInstance<TFamilyId extends string> extends FamilyInstance<TFamilyId> {}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as AuthoringContributions } from "./framework-authoring-BdrFDx4x.mjs";
|
|
2
|
-
import { t as Codec } from "./codec-types-
|
|
2
|
+
import { t as Codec } from "./codec-types-CB0jWeHU.mjs";
|
|
3
3
|
import { t as TypesImportSpec } from "./types-import-spec-D-O6GotH.mjs";
|
|
4
4
|
import { ColumnDefault, ExecutionMutationDefaultValue } from "@prisma-next/contract/types";
|
|
5
5
|
|
|
@@ -421,4 +421,4 @@ interface ExtensionInstance<TFamilyId extends string, TTargetId extends string>
|
|
|
421
421
|
}
|
|
422
422
|
//#endregion
|
|
423
423
|
export { LoweredDefaultResult as A, ControlMutationDefaultEntry as C, DefaultFunctionLoweringHandler as D, DefaultFunctionLoweringContext as E, SourceSpan as F, MutationDefaultGeneratorDescriptor as M, ParsedDefaultFunctionCall as N, DefaultFunctionRegistry as O, SourceDiagnostic as P, checkContractComponentRequirements as S, ControlMutationDefaults as T, PackRefBase as _, ComponentMetadata as a, TargetInstance as b, DriverDescriptor as c, ExtensionDescriptor as d, ExtensionInstance as f, FamilyPackRef as g, FamilyInstance as h, ComponentDescriptor as i, LoweredDefaultValue as j, DefaultFunctionRegistryEntry as k, DriverInstance as l, FamilyDescriptor as m, AdapterInstance as n, ContractComponentRequirementsCheckInput as o, ExtensionPackRef as p, AdapterPackRef as r, ContractComponentRequirementsCheckResult as s, AdapterDescriptor as t, DriverPackRef as u, TargetBoundComponentDescriptor as v, ControlMutationDefaultRegistry as w, TargetPackRef as x, TargetDescriptor as y };
|
|
424
|
-
//# sourceMappingURL=framework-components-
|
|
424
|
+
//# sourceMappingURL=framework-components-AHI6V96G.d.mts.map
|
package/dist/{framework-components-Buvf7mnC.d.mts.map → framework-components-AHI6V96G.d.mts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework-components-
|
|
1
|
+
{"version":3,"file":"framework-components-AHI6V96G.d.mts","names":[],"sources":["../src/shared/mutation-default-types.ts","../src/shared/framework-components.ts"],"sourcesContent":[],"mappings":";;;;;;UAEU,cAAA;;;;;AAAA,UAMO,UAAA,CANO;EAMP,SAAA,KAAU,EACT,cAAA;EAID,SAAA,GAAA,EAHD,cAGiB;;AAKN,UALV,gBAAA,CAKU;EAAT,SAAA,IAAA,EAAA,MAAA;EAAQ,SAAA,OAAA,EAAA,MAAA;EAGhB,SAAA,QAAA,CAAA,EAAA,MAAuB;EAKhB,SAAA,IAAA,CAAA,EATC,UASD;EAOA,SAAA,IAAA,CAAA,EAfC,QAeD,CAfU,MAeV,CAAA,MAA8B,EAAA,OAAA,CAAA,CAAA;AAO/C;AAIA,UAvBU,uBAAA,CAuBsB;EAIpB,SAAA,GAAA,EAAA,MAAA;EACK,SAAA,IAAA,EA1BA,UA0BA;;AAEX,UAzBW,yBAAA,CAyBX;EAAoB,SAAA,IAAA,EAAA,MAAA;EAET,SAAA,GAAA,EAAA,MAAA;EAKL,SAAA,IAAA,EAAA,SA7Bc,uBA6BgC,EAAA;EAEzC,SAAA,IAAA,EA9BA,UA8BA;AAejB;AAEmB,UA5CF,8BAAA,CA4CE;EACG,SAAA,QAAA,EAAA,MAAA;EACd,SAAA,SAAA,EAAA,MAAA;EAAoB,SAAA,SAAA,EAAA,MAAA;EAIhB,SAAA,aAAA,CAAA,EAAA,MAAA;AAEZ;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ACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA+BJ,8EACP;;qBAEW;;qBAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAiCJ,6EACP;;qBAEW;;qBAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA8BJ,gFACP;;qBAEW;;qBAGA;;;KAIT,qFACR,iBAAiB,WAAW,aAC5B,kBAAkB,WAAW,aAC7B,iBAAiB,WAAW,aAC5B,oBAAoB,WAAW;UAElB;qBACI;;UAGJ;qBACI;qBACA;;UAGJ;qBACI;qBACA;;UAGJ;qBACI;qBACA;;UAGJ;qBACI;qBACA"}
|
package/dist/runtime.d.mts
CHANGED
package/package.json
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma-next/framework-components",
|
|
3
|
-
"version": "0.5.0-dev.
|
|
3
|
+
"version": "0.5.0-dev.32",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "Framework component types, assembly logic, and stack creation for Prisma Next",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@
|
|
9
|
-
"@prisma-next/
|
|
10
|
-
"@prisma-next/utils": "0.5.0-dev.
|
|
8
|
+
"@standard-schema/spec": "^1.1.0",
|
|
9
|
+
"@prisma-next/contract": "0.5.0-dev.32",
|
|
10
|
+
"@prisma-next/utils": "0.5.0-dev.32",
|
|
11
|
+
"@prisma-next/operations": "0.5.0-dev.32"
|
|
11
12
|
},
|
|
12
13
|
"devDependencies": {
|
|
13
14
|
"tsdown": "0.18.4",
|
|
14
15
|
"typescript": "5.9.3",
|
|
15
16
|
"vitest": "4.0.17",
|
|
16
|
-
"@prisma-next/
|
|
17
|
-
"@prisma-next/
|
|
17
|
+
"@prisma-next/tsdown": "0.0.0",
|
|
18
|
+
"@prisma-next/tsconfig": "0.0.0"
|
|
18
19
|
},
|
|
19
20
|
"files": [
|
|
20
21
|
"dist",
|
|
@@ -25,4 +25,25 @@ export interface EmissionSpi {
|
|
|
25
25
|
getTypeMapsExpression(): string;
|
|
26
26
|
|
|
27
27
|
getContractWrapper(contractBaseName: string, typeMapsName: string): string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Per-family resolver for typeParams that don't live inline on the
|
|
31
|
+
* framework-domain `ContractField`. Some families (notably SQL) let columns
|
|
32
|
+
* reference a named entry in `storage.types` via `typeRef`; the typeParams
|
|
33
|
+
* live on that named entry rather than on the domain field. The framework
|
|
34
|
+
* emit path consults this hook so the codec's `renderOutputType` can run
|
|
35
|
+
* for typeRef-shaped columns.
|
|
36
|
+
*
|
|
37
|
+
* Inline `field.type.typeParams` always takes precedence; the hook is only
|
|
38
|
+
* consulted when the domain field has no typeParams. Families without
|
|
39
|
+
* named storage types (e.g. mongo) don't implement this hook.
|
|
40
|
+
*
|
|
41
|
+
* Returns `undefined` when the field has no resolvable typeParams.
|
|
42
|
+
*/
|
|
43
|
+
resolveFieldTypeParams?(
|
|
44
|
+
modelName: string,
|
|
45
|
+
fieldName: string,
|
|
46
|
+
model: ContractModel,
|
|
47
|
+
contract: Contract,
|
|
48
|
+
): Record<string, unknown> | undefined;
|
|
28
49
|
}
|
package/src/exports/codec.ts
CHANGED
|
@@ -1,2 +1,14 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
|
|
1
|
+
export type {
|
|
2
|
+
Codec,
|
|
3
|
+
CodecCallContext,
|
|
4
|
+
CodecDescriptor,
|
|
5
|
+
CodecInstanceContext,
|
|
6
|
+
CodecLookup,
|
|
7
|
+
CodecMeta,
|
|
8
|
+
CodecTrait,
|
|
9
|
+
} from '../shared/codec-types';
|
|
10
|
+
export {
|
|
11
|
+
emptyCodecLookup,
|
|
12
|
+
synthesizeNonParameterizedDescriptor,
|
|
13
|
+
voidParamsSchema,
|
|
14
|
+
} from '../shared/codec-types';
|
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
import type { JsonValue } from '@prisma-next/contract/types';
|
|
2
|
+
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
2
3
|
|
|
3
|
-
export type CodecTrait =
|
|
4
|
+
export type CodecTrait =
|
|
5
|
+
| 'equality'
|
|
6
|
+
| 'order'
|
|
7
|
+
| 'boolean'
|
|
8
|
+
| 'numeric'
|
|
9
|
+
| 'textual'
|
|
10
|
+
/**
|
|
11
|
+
* The codec carries a per-instance `validate(value: unknown) =>
|
|
12
|
+
* JsonSchemaValidationResult` function on the resolved codec object that
|
|
13
|
+
* the framework's `JsonSchemaValidatorRegistry` consults at runtime. The
|
|
14
|
+
* trait gates the `extractValidator` cast from structurally-typed
|
|
15
|
+
* `unknown` to a typed validator view.
|
|
16
|
+
*
|
|
17
|
+
* Retirement target. The unified `CodecDescriptor` model moves
|
|
18
|
+
* validation into the resolved codec's `decode` body; the parallel
|
|
19
|
+
* `JsonSchemaValidatorRegistry` (and this trait alongside it) retires
|
|
20
|
+
* under TML-2357 (T3.5.12). Per-library JSON extensions like
|
|
21
|
+
* `@prisma-next/extension-arktype-json` already follow the new pattern.
|
|
22
|
+
*/
|
|
23
|
+
| 'json-validator';
|
|
4
24
|
|
|
5
25
|
/**
|
|
6
26
|
* Per-call context the runtime threads to every `codec.encode` /
|
|
@@ -89,3 +109,153 @@ export interface CodecLookup {
|
|
|
89
109
|
export const emptyCodecLookup: CodecLookup = {
|
|
90
110
|
get: () => undefined,
|
|
91
111
|
};
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Family-agnostic per-instance context supplied by the framework when
|
|
115
|
+
* applying a higher-order codec factory. Allows stateful codecs (e.g.
|
|
116
|
+
* column-scoped encryption) to derive per-instance state from the
|
|
117
|
+
* materialization site.
|
|
118
|
+
*
|
|
119
|
+
* - `name` — the family-agnostic instance identity. For SQL, the runtime
|
|
120
|
+
* populates this as the `storage.types` instance name (e.g.
|
|
121
|
+
* `Embedding1536`) for typeRef-shaped columns, the synthesized
|
|
122
|
+
* anonymous instance name (`<anon:Document.embedding>`) for inline-
|
|
123
|
+
* `typeParams` columns, or a shared sentinel (`<shared:pg/text@1>`)
|
|
124
|
+
* for non-parameterized codec ids. Other families pick the analogous
|
|
125
|
+
* identity for their materialization sites.
|
|
126
|
+
*
|
|
127
|
+
* Family-specific extensions (e.g. {@link import('@prisma-next/sql-relational-core/ast').SqlCodecInstanceContext}
|
|
128
|
+
* in the SQL layer) augment this base with domain-shaped column-set
|
|
129
|
+
* metadata. Codec authors target the base when they don't read family-
|
|
130
|
+
* specific metadata; they target the family extension when they do.
|
|
131
|
+
*/
|
|
132
|
+
export interface CodecInstanceContext {
|
|
133
|
+
readonly name: string;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Family-agnostic codec metadata. Family-specific extensions augment the
|
|
138
|
+
* base `db.<family>.<target>` block with native-type information; the base
|
|
139
|
+
* shape is an empty object so non-relational codecs can carry no metadata.
|
|
140
|
+
*/
|
|
141
|
+
export interface CodecMeta {
|
|
142
|
+
readonly db?: Record<string, unknown>;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Unified codec descriptor. Every codec in the framework registers through
|
|
147
|
+
* this shape — non-parameterized codecs use `P = void` and a constant
|
|
148
|
+
* factory that returns the same shared codec instance for every column;
|
|
149
|
+
* parameterized codecs use a non-empty `P` and a curried higher-order
|
|
150
|
+
* factory that returns a per-instance codec.
|
|
151
|
+
*
|
|
152
|
+
* The descriptor is the codec-id-keyed source of truth for static metadata
|
|
153
|
+
* (`traits`, `targetTypes`, `meta`) and registration concerns
|
|
154
|
+
* (`paramsSchema` for JSON-boundary validation; optional `renderOutputType`
|
|
155
|
+
* for the `contract.d.ts` emit path). The runtime `Codec` instance returned
|
|
156
|
+
* by `factory(params)(ctx)` carries only the conversion behavior.
|
|
157
|
+
*
|
|
158
|
+
* Whether a codec id "is parameterized" stops being a registration-time
|
|
159
|
+
* distinction — it's a property of `P` on the descriptor. The descriptor
|
|
160
|
+
* map indexes every descriptor by `codecId`; both `descriptorFor(codecId)`
|
|
161
|
+
* and `forColumn(table, column)` resolve through the same map without
|
|
162
|
+
* branching on parameterization.
|
|
163
|
+
*
|
|
164
|
+
* @template P - The shape of the params accepted by the factory (`void` for
|
|
165
|
+
* non-parameterized codecs; a record like `{ length: number }` for
|
|
166
|
+
* parameterized codecs).
|
|
167
|
+
*
|
|
168
|
+
* Codec-registry-unification project § Decision.
|
|
169
|
+
*/
|
|
170
|
+
export interface CodecDescriptor<P = void> {
|
|
171
|
+
/** The codec ID this descriptor applies to (e.g. `pg/vector@1`, `pg/text@1`). */
|
|
172
|
+
readonly codecId: string;
|
|
173
|
+
/** Semantic traits for operator gating (e.g. equality, order, numeric). */
|
|
174
|
+
readonly traits: readonly CodecTrait[];
|
|
175
|
+
/** Database-native type names this codec handles (e.g. `['timestamptz']`). */
|
|
176
|
+
readonly targetTypes: readonly string[];
|
|
177
|
+
/** Optional family-specific metadata (e.g. SQL-side `db.sql.postgres.nativeType`). */
|
|
178
|
+
readonly meta?: CodecMeta;
|
|
179
|
+
/**
|
|
180
|
+
* Standard Schema validator for the factory's params. Validates JSON-
|
|
181
|
+
* sourced params at the contract boundary (PSL → IR; `contract.json` →
|
|
182
|
+
* runtime). For non-parameterized codecs (`P = void`), the schema
|
|
183
|
+
* validates `void`/`undefined` — the framework supplies no params at the
|
|
184
|
+
* call boundary.
|
|
185
|
+
*/
|
|
186
|
+
readonly paramsSchema: StandardSchemaV1<P>;
|
|
187
|
+
/**
|
|
188
|
+
* Emit-path string renderer for `contract.d.ts`. Returns the TypeScript
|
|
189
|
+
* output type expression for given params (e.g. `Vector<1536>`).
|
|
190
|
+
* Optional; absent renderers cause the emitter to fall back to the
|
|
191
|
+
* codec's base output type. Non-parameterized codecs typically omit it.
|
|
192
|
+
*/
|
|
193
|
+
readonly renderOutputType?: (params: P) => string | undefined;
|
|
194
|
+
/**
|
|
195
|
+
* The curried higher-order codec. For non-parameterized codecs, the
|
|
196
|
+
* factory is constant — every call returns the same shared codec
|
|
197
|
+
* instance. For parameterized codecs, the factory is called once per
|
|
198
|
+
* `storage.types` instance (or once per inline-`typeParams` column),
|
|
199
|
+
* with `ctx` carrying the column set the resulting codec serves.
|
|
200
|
+
*/
|
|
201
|
+
readonly factory: (params: P) => (ctx: CodecInstanceContext) => Codec;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Standard Schema validator for `void` params. Accepts only `undefined`
|
|
206
|
+
* (or absent input); rejects any other value so a contract that tries to
|
|
207
|
+
* thread `typeParams` through a non-parameterized codec id fails fast at
|
|
208
|
+
* the JSON boundary instead of silently coercing the value away. Used by
|
|
209
|
+
* the framework-supplied non-parameterized descriptor synthesizer.
|
|
210
|
+
*/
|
|
211
|
+
export const voidParamsSchema: StandardSchemaV1<void> = {
|
|
212
|
+
'~standard': {
|
|
213
|
+
version: 1,
|
|
214
|
+
vendor: 'prisma-next',
|
|
215
|
+
validate: (input) =>
|
|
216
|
+
input === undefined
|
|
217
|
+
? { value: undefined }
|
|
218
|
+
: {
|
|
219
|
+
issues: [
|
|
220
|
+
{
|
|
221
|
+
message: 'unexpected typeParams for non-parameterized codec (void params expected)',
|
|
222
|
+
},
|
|
223
|
+
],
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Synthesize a `CodecDescriptor<void>` for a non-parameterized codec
|
|
230
|
+
* runtime instance. The factory is constant — every call returns the same
|
|
231
|
+
* shared codec instance — so columns sharing this codec id share one
|
|
232
|
+
* resolved codec.
|
|
233
|
+
*
|
|
234
|
+
* Codec-registry-unification spec § Decision (Case T — non-parameterized
|
|
235
|
+
* text codec). This is the bridge while non-parameterized codec
|
|
236
|
+
* contributors still register through the legacy `codecs:` slot; once they
|
|
237
|
+
* migrate to ship descriptors directly (TML-2357 T3.5.3), this synthesis
|
|
238
|
+
* steps aside.
|
|
239
|
+
*/
|
|
240
|
+
export function synthesizeNonParameterizedDescriptor(codec: Codec): CodecDescriptor<void> {
|
|
241
|
+
// The descriptor's `factory: (params: void) => (ctx: CodecInstanceContext)
|
|
242
|
+
// => Codec` is a constant for non-parameterized codecs — `params` is
|
|
243
|
+
// never read and the returned ctx-applier always yields the same shared
|
|
244
|
+
// codec. We rely on the descriptor's typed `factory` slot to infer the
|
|
245
|
+
// signatures rather than naming `void` locally (biome's
|
|
246
|
+
// `noConfusingVoidType` flags `void` outside return positions).
|
|
247
|
+
const sharedFactory = () => () => codec;
|
|
248
|
+
// Family-extended codecs (SQL `Codec`) carry an optional `meta` field
|
|
249
|
+
// that the base interface doesn't declare. Read it through a structural
|
|
250
|
+
// narrow so the synthesizer forwards it to the descriptor without losing
|
|
251
|
+
// type safety on the base shape.
|
|
252
|
+
const codecMeta = (codec as { readonly meta?: CodecMeta }).meta;
|
|
253
|
+
return {
|
|
254
|
+
codecId: codec.id,
|
|
255
|
+
traits: codec.traits ?? [],
|
|
256
|
+
targetTypes: codec.targetTypes,
|
|
257
|
+
paramsSchema: voidParamsSchema,
|
|
258
|
+
factory: sharedFactory,
|
|
259
|
+
...(codecMeta !== undefined ? { meta: codecMeta } : {}),
|
|
260
|
+
};
|
|
261
|
+
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { JsonValue } from "@prisma-next/contract/types";
|
|
2
|
-
|
|
3
|
-
//#region src/shared/codec-types.d.ts
|
|
4
|
-
type CodecTrait = 'equality' | 'order' | 'boolean' | 'numeric' | 'textual';
|
|
5
|
-
/**
|
|
6
|
-
* Per-call context the runtime threads to every `codec.encode` /
|
|
7
|
-
* `codec.decode` invocation for a single `runtime.execute()` call.
|
|
8
|
-
*
|
|
9
|
-
* The framework-level shape is family-agnostic and carries one field:
|
|
10
|
-
*
|
|
11
|
-
* - `signal?: AbortSignal` — per-query cancellation. The runtime returns
|
|
12
|
-
* a `RUNTIME.ABORTED` envelope when the signal aborts; codec authors
|
|
13
|
-
* who forward `signal` to their underlying SDK get true cancellation
|
|
14
|
-
* of in-flight network calls.
|
|
15
|
-
*
|
|
16
|
-
* Family layers extend this base with their own shape-of-call metadata:
|
|
17
|
-
* the SQL family adds `column?: SqlColumnRef` via `SqlCodecCallContext`
|
|
18
|
-
* (see `@prisma-next/sql-relational-core`). Mongo currently uses this
|
|
19
|
-
* framework type unchanged. Column metadata is intentionally **not** on
|
|
20
|
-
* the framework type — it is a SQL-family concept rooted in SQL's
|
|
21
|
-
* `(table, column)` addressing model and would not generalise to other
|
|
22
|
-
* families.
|
|
23
|
-
*
|
|
24
|
-
* The interface is named explicitly (not inlined) so future framework
|
|
25
|
-
* fields and family extensions can land additively without breaking
|
|
26
|
-
* codec author signatures.
|
|
27
|
-
*/
|
|
28
|
-
interface CodecCallContext {
|
|
29
|
-
readonly signal?: AbortSignal;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* A codec is the contract between an application value and its on-wire and
|
|
33
|
-
* on-contract-disk representations.
|
|
34
|
-
*
|
|
35
|
-
* The author's mental model is two JS-side types — `TInput` (the
|
|
36
|
-
* application JS type) and `TWire` (the database driver wire format) —
|
|
37
|
-
* plus `JsonValue` for build-time contract artifacts. The codec translates
|
|
38
|
-
* `TInput` to `TWire` on writes and back on reads, and to/from `JsonValue`
|
|
39
|
-
* during contract emission and loading.
|
|
40
|
-
*
|
|
41
|
-
* Three representations participate:
|
|
42
|
-
* - **Input** (`TInput`): the JS type at the application boundary.
|
|
43
|
-
* - **Wire** (`TWire`): the format exchanged with the database driver.
|
|
44
|
-
* - **JSON** (`JsonValue`): a JSON-safe form used in contract artifacts.
|
|
45
|
-
*
|
|
46
|
-
* Codec methods split into two groups:
|
|
47
|
-
*
|
|
48
|
-
* - **Query-time** methods (`encode`, `decode`) run per row/parameter at the
|
|
49
|
-
* IO boundary; they are required and Promise-returning. The per-family
|
|
50
|
-
* codec factory accepts sync or async author functions and lifts sync
|
|
51
|
-
* ones to Promise-shaped methods automatically.
|
|
52
|
-
* - **Build-time** methods (`encodeJson`, `decodeJson`, `renderOutputType`)
|
|
53
|
-
* run when the contract is serialized, loaded, or when client types are
|
|
54
|
-
* emitted. They stay synchronous so contract validation and client
|
|
55
|
-
* construction are synchronous.
|
|
56
|
-
*
|
|
57
|
-
* Target-family codec interfaces extend this base with target-shaped
|
|
58
|
-
* metadata.
|
|
59
|
-
*/
|
|
60
|
-
interface Codec<Id extends string = string, TTraits extends readonly CodecTrait[] = readonly CodecTrait[], TWire = unknown, TInput = unknown> {
|
|
61
|
-
/** Unique codec identifier in `namespace/name@version` format (e.g. `pg/timestamptz@1`). */
|
|
62
|
-
readonly id: Id;
|
|
63
|
-
/** Database-native type names this codec handles (e.g. `['timestamptz']`). */
|
|
64
|
-
readonly targetTypes: readonly string[];
|
|
65
|
-
/** Semantic traits for operator gating (e.g. equality, order, numeric). */
|
|
66
|
-
readonly traits?: TTraits;
|
|
67
|
-
/** Converts a JS value to the wire format expected by the database driver. Always Promise-returning at the boundary. The {@link CodecCallContext} is supplied by the runtime on every call (allocated once per `runtime.execute()`); family layers may narrow the ctx to extend it (e.g. SQL adds `column`). Author-side single-arg `(value) => …` functions remain legal via TypeScript's bivariance for trailing parameters. */
|
|
68
|
-
encode(value: TInput, ctx: CodecCallContext): Promise<TWire>;
|
|
69
|
-
/** Converts a wire value from the database driver into the JS application type. Always Promise-returning at the boundary. The {@link CodecCallContext} is supplied by the runtime on every call (allocated once per `runtime.execute()`); family layers may narrow the ctx to extend it (e.g. SQL adds `column`). Author-side single-arg `(wire) => …` functions remain legal via TypeScript's bivariance for trailing parameters. */
|
|
70
|
-
decode(wire: TWire, ctx: CodecCallContext): Promise<TInput>;
|
|
71
|
-
/** Converts a JS value to a JSON-safe representation for contract serialization. Synchronous; called during contract emission. */
|
|
72
|
-
encodeJson(value: TInput): JsonValue;
|
|
73
|
-
/** Converts a JSON representation back to the JS input type. Synchronous; called during contract loading via `validateContract`. */
|
|
74
|
-
decodeJson(json: JsonValue): TInput;
|
|
75
|
-
/** Produces the TypeScript output type expression for a field given its `typeParams`. Synchronous; used during contract.d.ts emission. */
|
|
76
|
-
renderOutputType?(typeParams: Record<string, unknown>): string | undefined;
|
|
77
|
-
}
|
|
78
|
-
interface CodecLookup {
|
|
79
|
-
get(id: string): Codec | undefined;
|
|
80
|
-
}
|
|
81
|
-
declare const emptyCodecLookup: CodecLookup;
|
|
82
|
-
//#endregion
|
|
83
|
-
export { emptyCodecLookup as a, CodecTrait as i, CodecCallContext as n, CodecLookup as r, Codec as t };
|
|
84
|
-
//# sourceMappingURL=codec-types-DXv-ROhF.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codec-types-DXv-ROhF.d.mts","names":[],"sources":["../src/shared/codec-types.ts"],"sourcesContent":[],"mappings":";;;KAEY,UAAA;;AAAZ;AAyBA;AAiCA;;;;;;;;;;;;;;;;;;;AAwBA;AAIa,UA7DI,gBAAA,CA+DhB;oBA9DmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAgCH,2DAEU,wBAAwB;;eAKpC;;;;oBAIK;;gBAEJ,aAAa,mBAAmB,QAAQ;;eAEzC,YAAY,mBAAmB,QAAQ;;oBAElC,SAAS;;mBAEV,YAAY;;gCAEC;;UAGf,WAAA;mBACE;;cAGN,kBAAkB"}
|