@prisma-next/core-execution-plane 0.1.0-dev.16 → 0.1.0-dev.18

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.
@@ -1,52 +1,49 @@
1
- import { ExtensionPackManifest } from '@prisma-next/contract/pack-manifest-types';
1
+ import { AdapterInstance, AdapterDescriptor, DriverInstance, DriverDescriptor, ExtensionInstance, ExtensionDescriptor, FamilyInstance, FamilyDescriptor, TargetInstance, TargetDescriptor } from '@prisma-next/contract/framework-components';
2
2
 
3
3
  /**
4
- * Base interface for execution/runtime-plane family instances.
5
- * Families extend this with domain-specific methods.
4
+ * Runtime-plane family instance interface.
5
+ * Extends the base FamilyInstance for runtime-plane specific methods.
6
6
  *
7
7
  * @template TFamilyId - The family ID (e.g., 'sql', 'document')
8
8
  */
9
- interface RuntimeFamilyInstance<TFamilyId extends string = string> {
10
- readonly familyId: TFamilyId;
9
+ interface RuntimeFamilyInstance<TFamilyId extends string> extends FamilyInstance<TFamilyId> {
11
10
  }
12
11
  /**
13
- * Base interface for execution/runtime-plane target instances.
12
+ * Runtime-plane target instance interface.
13
+ * Extends the base TargetInstance with runtime-plane specific behavior.
14
14
  *
15
15
  * @template TFamilyId - The family ID (e.g., 'sql', 'document')
16
16
  * @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
17
17
  */
18
- interface RuntimeTargetInstance<TFamilyId extends string = string, TTargetId extends string = string> {
19
- readonly familyId: TFamilyId;
20
- readonly targetId: TTargetId;
18
+ interface RuntimeTargetInstance<TFamilyId extends string, TTargetId extends string> extends TargetInstance<TFamilyId, TTargetId> {
21
19
  }
22
20
  /**
23
- * Base interface for execution/runtime-plane adapter instances.
21
+ * Runtime-plane adapter instance interface.
22
+ * Extends the base AdapterInstance with runtime-plane specific behavior.
24
23
  * Families extend this with family-specific adapter interfaces.
25
24
  *
26
25
  * @template TFamilyId - The family ID (e.g., 'sql', 'document')
27
26
  * @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
28
27
  */
29
- interface RuntimeAdapterInstance<TFamilyId extends string = string, TTargetId extends string = string> {
30
- readonly familyId: TFamilyId;
31
- readonly targetId: TTargetId;
28
+ interface RuntimeAdapterInstance<TFamilyId extends string, TTargetId extends string> extends AdapterInstance<TFamilyId, TTargetId> {
32
29
  }
33
30
  /**
34
- * Base interface for execution/runtime-plane driver instances.
31
+ * Runtime-plane driver instance interface.
32
+ * Extends the base DriverInstance with runtime-plane specific behavior.
35
33
  *
34
+ * @template TFamilyId - The family ID (e.g., 'sql', 'document')
36
35
  * @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
37
36
  */
38
- interface RuntimeDriverInstance<TTargetId extends string = string> {
39
- readonly targetId?: TTargetId;
37
+ interface RuntimeDriverInstance<TFamilyId extends string, TTargetId extends string> extends DriverInstance<TFamilyId, TTargetId> {
40
38
  }
41
39
  /**
42
- * Base interface for execution/runtime-plane extension instances.
40
+ * Runtime-plane extension instance interface.
41
+ * Extends the base ExtensionInstance with runtime-plane specific behavior.
43
42
  *
44
43
  * @template TFamilyId - The family ID (e.g., 'sql', 'document')
45
44
  * @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
46
45
  */
47
- interface RuntimeExtensionInstance<TFamilyId extends string = string, TTargetId extends string = string> {
48
- readonly familyId: TFamilyId;
49
- readonly targetId: TTargetId;
46
+ interface RuntimeExtensionInstance<TFamilyId extends string, TTargetId extends string> extends ExtensionInstance<TFamilyId, TTargetId> {
50
47
  }
51
48
  /**
52
49
  * Descriptor for an execution/runtime-plane family (e.g., SQL).
@@ -55,11 +52,7 @@ interface RuntimeExtensionInstance<TFamilyId extends string = string, TTargetId
55
52
  * @template TFamilyId - The family ID (e.g., 'sql', 'document')
56
53
  * @template TFamilyInstance - The family instance type
57
54
  */
58
- interface RuntimeFamilyDescriptor<TFamilyId extends string, TFamilyInstance extends RuntimeFamilyInstance<TFamilyId> = RuntimeFamilyInstance<TFamilyId>> {
59
- readonly kind: 'family';
60
- readonly id: string;
61
- readonly familyId: TFamilyId;
62
- readonly manifest: ExtensionPackManifest;
55
+ interface RuntimeFamilyDescriptor<TFamilyId extends string, TFamilyInstance extends RuntimeFamilyInstance<TFamilyId> = RuntimeFamilyInstance<TFamilyId>> extends FamilyDescriptor<TFamilyId> {
63
56
  create<TTargetId extends string>(options: {
64
57
  readonly target: RuntimeTargetDescriptor<TFamilyId, TTargetId>;
65
58
  readonly adapter: RuntimeAdapterDescriptor<TFamilyId, TTargetId>;
@@ -68,63 +61,43 @@ interface RuntimeFamilyDescriptor<TFamilyId extends string, TFamilyInstance exte
68
61
  }): TFamilyInstance;
69
62
  }
70
63
  /**
71
- * Descriptor for an execution/runtime-plane target pack (e.g., Postgres target).
64
+ * Descriptor for an execution/runtime-plane target component (e.g., Postgres target).
72
65
  *
73
66
  * @template TFamilyId - The family ID (e.g., 'sql', 'document')
74
67
  * @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
75
68
  * @template TTargetInstance - The target instance type
76
69
  */
77
- interface RuntimeTargetDescriptor<TFamilyId extends string, TTargetId extends string, TTargetInstance extends RuntimeTargetInstance<TFamilyId, TTargetId> = RuntimeTargetInstance<TFamilyId, TTargetId>> {
78
- readonly kind: 'target';
79
- readonly id: string;
80
- readonly familyId: TFamilyId;
81
- readonly targetId: TTargetId;
82
- readonly manifest: ExtensionPackManifest;
70
+ interface RuntimeTargetDescriptor<TFamilyId extends string, TTargetId extends string, TTargetInstance extends RuntimeTargetInstance<TFamilyId, TTargetId> = RuntimeTargetInstance<TFamilyId, TTargetId>> extends TargetDescriptor<TFamilyId, TTargetId> {
83
71
  create(): TTargetInstance;
84
72
  }
85
73
  /**
86
- * Descriptor for an execution/runtime-plane adapter pack (e.g., Postgres adapter).
74
+ * Descriptor for an execution/runtime-plane adapter component (e.g., Postgres adapter).
87
75
  *
88
76
  * @template TFamilyId - The family ID (e.g., 'sql', 'document')
89
77
  * @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
90
78
  * @template TAdapterInstance - The adapter instance type
91
79
  */
92
- interface RuntimeAdapterDescriptor<TFamilyId extends string, TTargetId extends string, TAdapterInstance extends RuntimeAdapterInstance<TFamilyId, TTargetId> = RuntimeAdapterInstance<TFamilyId, TTargetId>> {
93
- readonly kind: 'adapter';
94
- readonly id: string;
95
- readonly familyId: TFamilyId;
96
- readonly targetId: TTargetId;
97
- readonly manifest: ExtensionPackManifest;
80
+ interface RuntimeAdapterDescriptor<TFamilyId extends string, TTargetId extends string, TAdapterInstance extends RuntimeAdapterInstance<TFamilyId, TTargetId> = RuntimeAdapterInstance<TFamilyId, TTargetId>> extends AdapterDescriptor<TFamilyId, TTargetId> {
98
81
  create(): TAdapterInstance;
99
82
  }
100
83
  /**
101
- * Descriptor for an execution/runtime-plane driver pack (e.g., Postgres driver).
84
+ * Descriptor for an execution/runtime-plane driver component (e.g., Postgres driver).
102
85
  *
103
86
  * @template TFamilyId - The family ID (e.g., 'sql', 'document')
104
87
  * @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
105
88
  * @template TDriverInstance - The driver instance type
106
89
  */
107
- interface RuntimeDriverDescriptor<TFamilyId extends string, TTargetId extends string, TDriverInstance extends RuntimeDriverInstance<TTargetId> = RuntimeDriverInstance<TTargetId>> {
108
- readonly kind: 'driver';
109
- readonly id: string;
110
- readonly familyId: TFamilyId;
111
- readonly targetId: TTargetId;
112
- readonly manifest: ExtensionPackManifest;
90
+ interface RuntimeDriverDescriptor<TFamilyId extends string, TTargetId extends string, TDriverInstance extends RuntimeDriverInstance<TFamilyId, TTargetId> = RuntimeDriverInstance<TFamilyId, TTargetId>> extends DriverDescriptor<TFamilyId, TTargetId> {
113
91
  create(options: unknown): TDriverInstance;
114
92
  }
115
93
  /**
116
- * Descriptor for an execution/runtime-plane extension pack (e.g., pgvector).
94
+ * Descriptor for an execution/runtime-plane extension component (e.g., pgvector).
117
95
  *
118
96
  * @template TFamilyId - The family ID (e.g., 'sql', 'document')
119
97
  * @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
120
98
  * @template TExtensionInstance - The extension instance type
121
99
  */
122
- interface RuntimeExtensionDescriptor<TFamilyId extends string, TTargetId extends string, TExtensionInstance extends RuntimeExtensionInstance<TFamilyId, TTargetId> = RuntimeExtensionInstance<TFamilyId, TTargetId>> {
123
- readonly kind: 'extension';
124
- readonly id: string;
125
- readonly familyId: TFamilyId;
126
- readonly targetId: TTargetId;
127
- readonly manifest: ExtensionPackManifest;
100
+ interface RuntimeExtensionDescriptor<TFamilyId extends string, TTargetId extends string, TExtensionInstance extends RuntimeExtensionInstance<TFamilyId, TTargetId> = RuntimeExtensionInstance<TFamilyId, TTargetId>> extends ExtensionDescriptor<TFamilyId, TTargetId> {
128
101
  create(): TExtensionInstance;
129
102
  }
130
103
 
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@prisma-next/core-execution-plane",
3
- "version": "0.1.0-dev.16",
3
+ "version": "0.1.0-dev.18",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "description": "Execution/runtime plane descriptor and instance types for Prisma Next",
7
7
  "dependencies": {
8
- "@prisma-next/contract": "0.1.0-dev.16",
9
- "@prisma-next/core-control-plane": "0.1.0-dev.16"
8
+ "@prisma-next/contract": "0.1.0-dev.18",
9
+ "@prisma-next/core-control-plane": "0.1.0-dev.18"
10
10
  },
11
11
  "devDependencies": {
12
12
  "tsup": "^8.3.0",