@prisma-next/contract 0.1.0-dev.19 → 0.1.0-dev.20
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.
|
@@ -197,6 +197,31 @@ interface ExtensionDescriptor<TFamilyId extends string, TTargetId extends string
|
|
|
197
197
|
/** The target this extension is designed for */
|
|
198
198
|
readonly targetId: TTargetId;
|
|
199
199
|
}
|
|
200
|
+
/**
|
|
201
|
+
* Union type for target-bound component descriptors.
|
|
202
|
+
*
|
|
203
|
+
* Target-bound components are those that must be compatible with a specific
|
|
204
|
+
* family+target combination. This includes targets, adapters, drivers, and
|
|
205
|
+
* extensions. Families are not target-bound.
|
|
206
|
+
*
|
|
207
|
+
* This type is used in migration and verification interfaces to enforce
|
|
208
|
+
* type-level compatibility between components.
|
|
209
|
+
*
|
|
210
|
+
* @template TFamilyId - Literal type for the family identifier
|
|
211
|
+
* @template TTargetId - Literal type for the target identifier
|
|
212
|
+
*
|
|
213
|
+
* @example
|
|
214
|
+
* ```ts
|
|
215
|
+
* // All these components must have matching familyId and targetId
|
|
216
|
+
* const components: TargetBoundComponentDescriptor<'sql', 'postgres'>[] = [
|
|
217
|
+
* postgresTarget,
|
|
218
|
+
* postgresAdapter,
|
|
219
|
+
* postgresDriver,
|
|
220
|
+
* pgvectorExtension,
|
|
221
|
+
* ];
|
|
222
|
+
* ```
|
|
223
|
+
*/
|
|
224
|
+
type TargetBoundComponentDescriptor<TFamilyId extends string, TTargetId extends string> = TargetDescriptor<TFamilyId, TTargetId> | AdapterDescriptor<TFamilyId, TTargetId> | DriverDescriptor<TFamilyId, TTargetId> | ExtensionDescriptor<TFamilyId, TTargetId>;
|
|
200
225
|
/**
|
|
201
226
|
* Base interface for family instances.
|
|
202
227
|
*
|
|
@@ -309,4 +334,4 @@ interface ExtensionInstance<TFamilyId extends string, TTargetId extends string>
|
|
|
309
334
|
readonly targetId: TTargetId;
|
|
310
335
|
}
|
|
311
336
|
|
|
312
|
-
export type { AdapterDescriptor, AdapterInstance, ComponentDescriptor, DriverDescriptor, DriverInstance, ExtensionDescriptor, ExtensionInstance, FamilyDescriptor, FamilyInstance, TargetDescriptor, TargetInstance };
|
|
337
|
+
export type { AdapterDescriptor, AdapterInstance, ComponentDescriptor, DriverDescriptor, DriverInstance, ExtensionDescriptor, ExtensionInstance, FamilyDescriptor, FamilyInstance, TargetBoundComponentDescriptor, TargetDescriptor, TargetInstance };
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma-next/contract",
|
|
3
|
-
"version": "0.1.0-dev.
|
|
3
|
+
"version": "0.1.0-dev.20",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "Data contract type definitions and JSON schema for Prisma Next",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@prisma-next/operations": "0.1.0-dev.
|
|
8
|
+
"@prisma-next/operations": "0.1.0-dev.20"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"@vitest/coverage-v8": "^2.1.1",
|