Skip to content

Commit 3bdef30

Browse files
committed
add prepare call
1 parent 020b5a9 commit 3bdef30

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

lib/surreal.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
ConnectionStatus,
99
ConnectionUnavailable,
1010
AbstractEngine,
11+
EngineAuth,
1112
UnexpectedConnectionError,
1213
type EngineEvents,
1314
type RpcRequest,
@@ -67,6 +68,7 @@ export function surrealdbWasmEngines(opts?: ConnectionOptions): Engines {
6768
);
6869

6970
this.db = db;
71+
await this.context.prepare?.(new EngineAuth(this))
7072
this.setStatus(ConnectionStatus.Connected);
7173

7274
this.reader = (async () => {
@@ -221,4 +223,4 @@ export function surrealdbWasmEngines(opts?: ConnectionOptions): Engines {
221223
mem: WasmEmbeddedEngine,
222224
indxdb: WasmEmbeddedEngine,
223225
};
224-
}
226+
}

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@surrealdb/wasm",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"description": "WebAssembly driver for SurrealDB",
55
"repository": {
66
"type": "git",
@@ -36,6 +36,6 @@
3636
"typescript": "^5.4.5"
3737
},
3838
"peerDependencies": {
39-
"surrealdb": "^1.2.0"
39+
"surrealdb": "^1.3.1"
4040
}
4141
}

pnpm-lock.yaml

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)