@edge-base/plugin-core 0.2.1 → 0.2.3
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/index.d.ts +10 -2
- package/dist/index.js +4 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -86,8 +86,16 @@ export interface PluginAdminContext {
|
|
|
86
86
|
};
|
|
87
87
|
/** Admin user management. */
|
|
88
88
|
auth: PluginAdminAuthContext;
|
|
89
|
-
/**
|
|
90
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Execute raw SQL through the fastest provider-aware path available.
|
|
91
|
+
* Uses direct PostgreSQL / Neon, D1, or DO execution when possible,
|
|
92
|
+
* then falls back to the internal worker SQL route when needed.
|
|
93
|
+
*/
|
|
94
|
+
sqlProviderAware(namespace: string, id: string | undefined, query: string, params?: unknown[]): Promise<unknown[]>;
|
|
95
|
+
/**
|
|
96
|
+
* @deprecated Use `sqlProviderAware()` instead.
|
|
97
|
+
*/
|
|
98
|
+
sqlWithDirectD1Access(namespace: string, id: string | undefined, query: string, params?: unknown[]): Promise<unknown[]>;
|
|
91
99
|
/** Server-side broadcast to a realtime channel. */
|
|
92
100
|
broadcast(channel: string, event: string, payload?: Record<string, unknown>): Promise<void>;
|
|
93
101
|
/** Inter-function calls. */
|
package/dist/index.js
CHANGED
|
@@ -254,7 +254,10 @@ export function createMockContext(options) {
|
|
|
254
254
|
return { table: createTableProxy };
|
|
255
255
|
},
|
|
256
256
|
auth: mockAuth,
|
|
257
|
-
async
|
|
257
|
+
async sqlProviderAware() {
|
|
258
|
+
return [];
|
|
259
|
+
},
|
|
260
|
+
async sqlWithDirectD1Access() {
|
|
258
261
|
return [];
|
|
259
262
|
},
|
|
260
263
|
async broadcast() { },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edge-base/plugin-core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "EdgeBase plugin authoring helpers and public plugin contracts",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@edge-base/shared": "0.2.
|
|
36
|
+
"@edge-base/shared": "0.2.3"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"typescript": "^5.7.0"
|