@rolder/kit 3.0.0-alpha.114 → 3.0.0-alpha.115

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,8 +1,12 @@
1
- import { Surreal } from "surrealdb";
1
+ import { Surreal, applyDiagnostics, createRemoteEngines } from "surrealdb";
2
2
  let db = null;
3
3
  const getDBInstance = async (params = {})=>{
4
4
  if (db?.isConnected) return db;
5
- const instance = new Surreal();
5
+ const instance = new Surreal(params.debug ? {
6
+ engines: applyDiagnostics(createRemoteEngines(), (event)=>{
7
+ console.log('Surreal debug:', event);
8
+ })
9
+ } : void 0);
6
10
  try {
7
11
  const url = params.url || process.env.SURREALDB_URL;
8
12
  if (!url) throw new Error('Missing required SurrealDB URL');
@@ -6,4 +6,5 @@ export interface SurrealDBProps {
6
6
  username?: string;
7
7
  password?: string;
8
8
  codecOptions?: CodecOptions;
9
+ debug?: boolean;
9
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolder/kit",
3
- "version": "3.0.0-alpha.114",
3
+ "version": "3.0.0-alpha.115",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./ai": {