@prisma-next/core-control-plane 0.1.0-pr.56.1 → 0.1.0-pr.56.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/exports/types.d.ts +16 -19
- package/package.json +4 -4
package/dist/exports/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FamilyDescriptor, TargetDescriptor, AdapterDescriptor, DriverDescriptor, ExtensionDescriptor } from '@prisma-next/contract/framework-components';
|
|
1
|
+
import { FamilyInstance, DriverInstance, FamilyDescriptor, TargetInstance, TargetDescriptor, AdapterInstance, AdapterDescriptor, DriverDescriptor, ExtensionInstance, ExtensionDescriptor } from '@prisma-next/contract/framework-components';
|
|
2
2
|
import { ContractIR } from '@prisma-next/contract/ir';
|
|
3
|
-
import {
|
|
3
|
+
import { TargetFamilyHook } from '@prisma-next/contract/types';
|
|
4
4
|
import { Result } from '@prisma-next/utils/result';
|
|
5
5
|
import { CoreSchemaView } from './schema-view.js';
|
|
6
6
|
|
|
@@ -229,48 +229,45 @@ interface ControlFamilyInstance<TFamilyId extends string = string, TSchemaIR = u
|
|
|
229
229
|
}): Promise<EmitContractResult>;
|
|
230
230
|
}
|
|
231
231
|
/**
|
|
232
|
-
*
|
|
232
|
+
* Control-plane target instance interface.
|
|
233
|
+
* Extends the base TargetInstance with control-plane specific behavior.
|
|
233
234
|
*
|
|
234
235
|
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
235
236
|
* @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
|
|
236
237
|
*/
|
|
237
|
-
interface ControlTargetInstance<TFamilyId extends string = string, TTargetId extends string = string> {
|
|
238
|
-
readonly familyId: TFamilyId;
|
|
239
|
-
readonly targetId: TTargetId;
|
|
238
|
+
interface ControlTargetInstance<TFamilyId extends string = string, TTargetId extends string = string> extends TargetInstance<TFamilyId, TTargetId> {
|
|
240
239
|
}
|
|
241
240
|
/**
|
|
242
|
-
*
|
|
241
|
+
* Control-plane adapter instance interface.
|
|
242
|
+
* Extends the base AdapterInstance with control-plane specific behavior.
|
|
243
243
|
* Families extend this with family-specific adapter interfaces.
|
|
244
244
|
*
|
|
245
245
|
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
246
246
|
* @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
|
|
247
247
|
*/
|
|
248
|
-
interface ControlAdapterInstance<TFamilyId extends string = string, TTargetId extends string = string> {
|
|
249
|
-
readonly familyId: TFamilyId;
|
|
250
|
-
readonly targetId: TTargetId;
|
|
248
|
+
interface ControlAdapterInstance<TFamilyId extends string = string, TTargetId extends string = string> extends AdapterInstance<TFamilyId, TTargetId> {
|
|
251
249
|
}
|
|
252
250
|
/**
|
|
253
|
-
*
|
|
254
|
-
*
|
|
251
|
+
* Control-plane driver instance interface.
|
|
252
|
+
* Extends the base DriverInstance with control-plane specific behavior.
|
|
255
253
|
*
|
|
254
|
+
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
256
255
|
* @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
|
|
257
256
|
*/
|
|
258
|
-
interface ControlDriverInstance<TTargetId extends string = string> {
|
|
259
|
-
readonly targetId?: TTargetId;
|
|
257
|
+
interface ControlDriverInstance<TFamilyId extends string = string, TTargetId extends string = string> extends DriverInstance<TFamilyId, TTargetId> {
|
|
260
258
|
query<Row = Record<string, unknown>>(sql: string, params?: readonly unknown[]): Promise<{
|
|
261
259
|
readonly rows: Row[];
|
|
262
260
|
}>;
|
|
263
261
|
close(): Promise<void>;
|
|
264
262
|
}
|
|
265
263
|
/**
|
|
266
|
-
*
|
|
264
|
+
* Control-plane extension instance interface.
|
|
265
|
+
* Extends the base ExtensionInstance with control-plane specific behavior.
|
|
267
266
|
*
|
|
268
267
|
* @template TFamilyId - The family ID (e.g., 'sql', 'document')
|
|
269
268
|
* @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
|
|
270
269
|
*/
|
|
271
|
-
interface ControlExtensionInstance<TFamilyId extends string = string, TTargetId extends string = string> {
|
|
272
|
-
readonly familyId: TFamilyId;
|
|
273
|
-
readonly targetId: TTargetId;
|
|
270
|
+
interface ControlExtensionInstance<TFamilyId extends string = string, TTargetId extends string = string> extends ExtensionInstance<TFamilyId, TTargetId> {
|
|
274
271
|
}
|
|
275
272
|
/**
|
|
276
273
|
* Operation context for propagating metadata through control-plane operation call chains.
|
|
@@ -356,7 +353,7 @@ interface ControlAdapterDescriptor<TFamilyId extends string, TTargetId extends s
|
|
|
356
353
|
* @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
|
|
357
354
|
* @template TDriverInstance - The driver instance type
|
|
358
355
|
*/
|
|
359
|
-
interface ControlDriverDescriptor<TFamilyId extends string, TTargetId extends string, TDriverInstance extends ControlDriverInstance<TTargetId> = ControlDriverInstance<TTargetId>> extends DriverDescriptor<TFamilyId, TTargetId> {
|
|
356
|
+
interface ControlDriverDescriptor<TFamilyId extends string, TTargetId extends string, TDriverInstance extends ControlDriverInstance<TFamilyId, TTargetId> = ControlDriverInstance<TFamilyId, TTargetId>> extends DriverDescriptor<TFamilyId, TTargetId> {
|
|
360
357
|
create(url: string): Promise<TDriverInstance>;
|
|
361
358
|
}
|
|
362
359
|
/**
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma-next/core-control-plane",
|
|
3
|
-
"version": "0.1.0-pr.56.
|
|
3
|
+
"version": "0.1.0-pr.56.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "Control plane domain actions, config types, validation, and error factories for Prisma Next",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"arktype": "^2.1.26",
|
|
9
9
|
"prettier": "^3.3.3",
|
|
10
|
-
"@prisma-next/contract": "0.1.0-pr.56.
|
|
11
|
-
"@prisma-next/operations": "0.1.0-pr.56.
|
|
12
|
-
"@prisma-next/utils": "0.1.0-pr.56.
|
|
10
|
+
"@prisma-next/contract": "0.1.0-pr.56.2",
|
|
11
|
+
"@prisma-next/operations": "0.1.0-pr.56.2",
|
|
12
|
+
"@prisma-next/utils": "0.1.0-pr.56.2"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"tsup": "^8.3.0",
|