diff --git a/bindings/javascript/.gitignore b/bindings/javascript/.gitignore
index cb6dd3707..4267a918f 100644
--- a/bindings/javascript/.gitignore
+++ b/bindings/javascript/.gitignore
@@ -199,3 +199,9 @@ Cargo.lock
npm
bundle
+
+*.db
+*.db-wal
+*.db-changes
+*.db-wal-revert
+*.db-info
diff --git a/bindings/javascript/examples/database-node/README.md b/bindings/javascript/examples/database-node/README.md
new file mode 100644
index 000000000..492ae652d
--- /dev/null
+++ b/bindings/javascript/examples/database-node/README.md
@@ -0,0 +1,12 @@
+# database-node
+
+This is a minimal example showing how to use [`@tursodatabase/database`](https://www.npmjs.com/package/@tursodatabase/database) in the node.js
+
+---
+
+## Usage
+
+```bash
+npm install
+node index.mjs
+```
\ No newline at end of file
diff --git a/bindings/javascript/examples/database-node/index.mjs b/bindings/javascript/examples/database-node/index.mjs
new file mode 100644
index 000000000..33e46081d
--- /dev/null
+++ b/bindings/javascript/examples/database-node/index.mjs
@@ -0,0 +1,21 @@
+import { connect } from "@tursodatabase/database";
+
+const db = await connect("local.db", {
+ timeout: 1000, // busy timeout for handling high-concurrency write cases
+});
+
+// execute multiple SQL statements with exec(...)
+await db.exec(`
+ CREATE TABLE IF NOT EXISTS guestbook (comment TEXT, created_at DEFAULT (unixepoch()));
+ CREATE INDEX IF NOT EXISTS guestbook_idx ON guestbook (created_at);
+`);
+
+// use prepared statements and bind args to placeholders later
+const insert = db.prepare(`INSERT INTO guestbook(comment) VALUES (?)`);
+
+// use run(...) method if query only need to be executed till completion
+await insert.run([`hello, turso at ${Math.floor(Date.now() / 1000)}`]);
+
+const select = db.prepare(`SELECT * FROM guestbook ORDER BY created_at DESC LIMIT ?`);
+// use all(...) or get(...) methods to get all or one row from the query
+console.info(await select.all([5]))
diff --git a/bindings/javascript/examples/database-node/package.json b/bindings/javascript/examples/database-node/package.json
new file mode 100644
index 000000000..537dc451e
--- /dev/null
+++ b/bindings/javascript/examples/database-node/package.json
@@ -0,0 +1,16 @@
+{
+ "name": "database-node",
+ "version": "1.0.0",
+ "main": "index.mjs",
+ "author": "",
+ "license": "ISC",
+ "description": "",
+ "scripts": {
+ "tsc-build": "echo 'no tsc-build'",
+ "build": "echo 'no build'",
+ "test": "echo 'no tests'"
+ },
+ "dependencies": {
+ "@tursodatabase/database": "^0.2.0"
+ }
+}
diff --git a/bindings/javascript/examples/database-wasm-vite/.gitignore b/bindings/javascript/examples/database-wasm-vite/.gitignore
new file mode 100644
index 000000000..e985853ed
--- /dev/null
+++ b/bindings/javascript/examples/database-wasm-vite/.gitignore
@@ -0,0 +1 @@
+.vercel
diff --git a/bindings/javascript/examples/database-wasm-vite/README.md b/bindings/javascript/examples/database-wasm-vite/README.md
new file mode 100644
index 000000000..fcbc230c6
--- /dev/null
+++ b/bindings/javascript/examples/database-wasm-vite/README.md
@@ -0,0 +1,63 @@
+# database-wasm-vite
+
+This is a minimal example showing how to use [`@tursodatabase/database-wasm`](https://www.npmjs.com/package/@tursodatabase/database-wasm) in the browser with [Vite](https://vite.dev/).
+
+---
+
+## Usage
+
+```bash
+npm install
+npm run dev
+# or build assets and serve them with simple node.js server
+npm run build
+npm run serve
+```
+
+---
+
+## Important: COOP / COEP Headers
+
+Because `@tursodatabase/database-wasm` relies on **SharedArrayBuffer**, you need Cross-Origin headers in development and production:
+
+### Vite dev server config (`vite.config.js`)
+
+```js
+import { defineConfig } from 'vite'
+
+export default defineConfig({
+ server: {
+ headers: {
+ 'Cross-Origin-Opener-Policy': 'same-origin',
+ 'Cross-Origin-Embedder-Policy': 'require-corp',
+ }
+ }
+})
+```
+
+### Static production server (`server.mjs`)
+
+When serving the `dist/` build, also make sure your server sets these headers:
+
+```js
+res.setHeader("Cross-Origin-Opener-Policy", "same-origin");
+res.setHeader("Cross-Origin-Embedder-Policy", "require-corp");
+```
+
+### Vercel deployment
+
+If you deploy to [**Vercel**](https://vercel.com/), add a `vercel.json` file to ensure COOP / COEP headers are set:
+
+```json
+{
+ "headers": [
+ {
+ "source": "/(.*)",
+ "headers": [
+ { "key": "Cross-Origin-Opener-Policy", "value": "same-origin" },
+ { "key": "Cross-Origin-Embedder-Policy", "value": "require-corp" }
+ ]
+ }
+ ]
+}
+```
\ No newline at end of file
diff --git a/bindings/javascript/examples/database-wasm-vite/index.html b/bindings/javascript/examples/database-wasm-vite/index.html
new file mode 100644
index 000000000..dfa3a4c6b
--- /dev/null
+++ b/bindings/javascript/examples/database-wasm-vite/index.html
@@ -0,0 +1,95 @@
+
+
+
+
+
+ Guestbook
+
+
+
+
+ Guestbook
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/bindings/javascript/examples/wasm/package.json b/bindings/javascript/examples/database-wasm-vite/package.json
similarity index 52%
rename from bindings/javascript/examples/wasm/package.json
rename to bindings/javascript/examples/database-wasm-vite/package.json
index 3cd63f705..e0754bca2 100644
--- a/bindings/javascript/examples/wasm/package.json
+++ b/bindings/javascript/examples/database-wasm-vite/package.json
@@ -1,19 +1,21 @@
{
- "name": "wasm",
+ "name": "database-wasm-vite",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"dev": "vite",
"build": "vite build",
- "preview": "vite preview"
+ "serve": "node server.mjs",
+ "tsc-build": "echo 'no tsc-build'",
+ "test": "echo 'no tests'"
},
"author": "",
"license": "ISC",
"description": "",
"devDependencies": {
- "vite": "^7.1.4"
+ "vite": "^7.1.9"
},
"dependencies": {
- "@tursodatabase/database": "../.."
+ "@tursodatabase/database-wasm": "^0.2.0"
}
}
diff --git a/bindings/javascript/examples/database-wasm-vite/server.mjs b/bindings/javascript/examples/database-wasm-vite/server.mjs
new file mode 100644
index 000000000..9daa24d39
--- /dev/null
+++ b/bindings/javascript/examples/database-wasm-vite/server.mjs
@@ -0,0 +1,34 @@
+import http from "http";
+import { readFile } from "fs/promises";
+import { extname, join } from "path";
+import { fileURLToPath } from "url";
+
+const root = fileURLToPath(new URL("./dist", import.meta.url));
+const port = 8080;
+
+const mimeTypes = { ".html": "text/html", ".js": "application/javascript" };
+
+const server = http.createServer(async (req, res) => {
+ // COOP / COEP headers necessary for shared WASM memory
+ res.setHeader("Cross-Origin-Opener-Policy", "same-origin");
+ res.setHeader("Cross-Origin-Embedder-Policy", "require-corp");
+
+ try {
+ const url = new URL(req.url, `http://${req.headers.host}`);
+ const pathname = url.pathname;
+ const filePath = pathname === "/" ? "index.html" : pathname;
+ const fullPath = join(root, filePath);
+
+ const data = await readFile(fullPath);
+ const ext = extname(fullPath).toLowerCase();
+ const contentType = mimeTypes[ext] || "application/octet-stream";
+
+ res.writeHead(200, { "Content-Type": contentType });
+ res.end(data);
+ } catch (err) {
+ res.writeHead(404, { "Content-Type": "text/plain" });
+ res.end("Not found");
+ }
+});
+
+server.listen(port, "0.0.0.0", () => console.log(`Serving on http://localhost:${port}`));
diff --git a/bindings/javascript/examples/database-wasm-vite/vercel.json b/bindings/javascript/examples/database-wasm-vite/vercel.json
new file mode 100644
index 000000000..3de04dda1
--- /dev/null
+++ b/bindings/javascript/examples/database-wasm-vite/vercel.json
@@ -0,0 +1,11 @@
+{
+ "headers": [
+ {
+ "source": "/(.*)",
+ "headers": [
+ { "key": "Cross-Origin-Opener-Policy", "value": "same-origin" },
+ { "key": "Cross-Origin-Embedder-Policy", "value": "require-corp" }
+ ]
+ }
+ ]
+}
diff --git a/bindings/javascript/examples/database-wasm-vite/vite.config.ts b/bindings/javascript/examples/database-wasm-vite/vite.config.ts
new file mode 100644
index 000000000..48bdbef5f
--- /dev/null
+++ b/bindings/javascript/examples/database-wasm-vite/vite.config.ts
@@ -0,0 +1,10 @@
+import { defineConfig } from 'vite'
+
+export default defineConfig({
+ server: {
+ headers: {
+ 'Cross-Origin-Opener-Policy': 'same-origin',
+ 'Cross-Origin-Embedder-Policy': 'require-corp',
+ }
+ }
+})
diff --git a/bindings/javascript/examples/sync-node/README.md b/bindings/javascript/examples/sync-node/README.md
new file mode 100644
index 000000000..1a5f38037
--- /dev/null
+++ b/bindings/javascript/examples/sync-node/README.md
@@ -0,0 +1,30 @@
+# sync-node
+
+This is a minimal example showing how to use [`@tursodatabase/sync`](https://www.npmjs.com/package/@tursodatabase/database) in the node.js
+
+
+The `@tursodatabase/sync` package extends a regular database with **bidirectional synchronization** between a local file and a remote [Turso Cloud](https://turso.tech/) database.
+
+It allows you to:
+
+* **`pull()`**: fetch and apply remote changes into your local database.
+ This ensures your local state reflects the latest server-side updates.
+
+* **`push()`**: upload local changes back to the remote database.
+ This is useful when you’ve made inserts/updates locally and want to replicate them to the cloud.
+
+Together, these methods make it possible to work **offline-first** (mutating the local database) and later sync your changes to Turso Cloud, while also bringing in any updates from other clients.
+
+---
+
+## Usage
+
+```bash
+npm install
+
+TURSO_AUTH_TOKEN=$(turso db tokens create ) # create auth token for the database in the Turso Cloud
+TURSO_DATABASE_URL=$(turso db show --url) # fetch URL for the database in the Turso Cloud
+node index.mjs
+```
+
+Here’s a version of your README with a short high-level explanation of what the **sync package** does, and what `pull`/`push` mean in practice:
diff --git a/bindings/javascript/examples/sync-node/index.mjs b/bindings/javascript/examples/sync-node/index.mjs
new file mode 100644
index 000000000..1b136f4e7
--- /dev/null
+++ b/bindings/javascript/examples/sync-node/index.mjs
@@ -0,0 +1,40 @@
+import { connect } from "@tursodatabase/sync";
+
+const db = await connect({
+ path: "local.db", // local path to store database
+ authToken: process.env.TURSO_AUTH_TOKEN, // Turso Cloud auth token
+ url: process.env.TURSO_DATABASE_URL, // Turso Cloud database url
+ longPollTimeoutMs: 0, // optional long-polling interval for pull operation; useful in case when pull called in a loop
+});
+
+// execute multiple SQL statements with exec(...)
+await db.exec(`
+ CREATE TABLE IF NOT EXISTS guestbook (comment TEXT, created_at DEFAULT (unixepoch()));
+ CREATE INDEX IF NOT EXISTS guestbook_idx ON guestbook (created_at);
+`);
+
+// use prepared statements and bind args to placeholders later
+const select1 = db.prepare(`SELECT * FROM guestbook ORDER BY created_at DESC LIMIT ?`);
+// use all(...) or get(...) methods to get all or one row from the query
+console.info(await select1.all([5]))
+
+try {
+ // pull new changes from the remote
+ await db.pull();
+} catch (e) {
+ console.error('pull failed', e);
+}
+
+const insert = db.prepare(`INSERT INTO guestbook(comment) VALUES (?)`);
+// use run(...) method if query only need to be executed till completion
+await insert.run([`hello, turso at ${Math.floor(Date.now() / 1000)}`]);
+
+const select2 = db.prepare(`SELECT * FROM guestbook ORDER BY created_at DESC LIMIT ?`);
+console.info(await select2.all([5]))
+
+try {
+ // push local changes to the remote
+ await db.push();
+} catch (e) {
+ console.error('pull failed', e);
+}
diff --git a/bindings/javascript/examples/sync-node/package.json b/bindings/javascript/examples/sync-node/package.json
new file mode 100644
index 000000000..e18052ea3
--- /dev/null
+++ b/bindings/javascript/examples/sync-node/package.json
@@ -0,0 +1,16 @@
+{
+ "name": "sync-node",
+ "version": "1.0.0",
+ "main": "index.mjs",
+ "author": "",
+ "license": "ISC",
+ "description": "",
+ "scripts": {
+ "tsc-build": "echo 'no tsc-build'",
+ "build": "echo 'no build'",
+ "test": "echo 'no tests'"
+ },
+ "dependencies": {
+ "@tursodatabase/sync": "^0.2.0"
+ }
+}
diff --git a/bindings/javascript/examples/sync-wasm-vite/.gitignore b/bindings/javascript/examples/sync-wasm-vite/.gitignore
new file mode 100644
index 000000000..e985853ed
--- /dev/null
+++ b/bindings/javascript/examples/sync-wasm-vite/.gitignore
@@ -0,0 +1 @@
+.vercel
diff --git a/bindings/javascript/examples/sync-wasm-vite/README.md b/bindings/javascript/examples/sync-wasm-vite/README.md
new file mode 100644
index 000000000..c36b5173f
--- /dev/null
+++ b/bindings/javascript/examples/sync-wasm-vite/README.md
@@ -0,0 +1,84 @@
+# sync-wasm-vite
+
+This is a minimal example showing how to use [`@tursodatabase/sync-wasm`](https://www.npmjs.com/package/@tursodatabase/sync-wasm) in the browser with [Vite](https://vite.dev/).
+
+The `@tursodatabase/sync-wasm` package extends a regular database with **bidirectional synchronization** between a local file and a remote [Turso Cloud](https://turso.tech/) database.
+
+It allows you to:
+
+* **`pull()`**: fetch and apply remote changes into your local database.
+ This ensures your local state reflects the latest server-side updates.
+
+* **`push()`**: upload local changes back to the remote database.
+ This is useful when you’ve made inserts/updates locally and want to replicate them to the cloud.
+
+Together, these methods make it possible to work **offline-first** (mutating the local database) and later sync your changes to Turso Cloud, while also bringing in any updates from other clients.
+
+---
+
+## Usage
+
+```bash
+npm install
+
+export VITE_TURSO_AUTH_TOKEN=$(turso db tokens create ) # create auth token for the database in the Turso Cloud
+export VITE_TURSO_DATABASE_URL=$(turso db show --url) # fetch URL for the database in the Turso Cloud
+
+npm run dev
+# or build assets and serve them with simple node.js server
+npm run build
+npm run serve
+```
+
+> **⚠️ Warning:** When using `VITE_TURSO_AUTH_TOKEN` in the browser, **this token will be bundled into your client-side code**.
+That means it is **publicly visible to anyone** who loads your site.
+> - Do **not** treat this token as a secret.
+> - Only use it with databases or roles that are safe to expose (e.g., read-only, demo instances).
+
+---
+
+## Important: COOP / COEP Headers
+
+Because `@tursodatabase/database-wasm` relies on **SharedArrayBuffer**, you need Cross-Origin headers in development and production:
+
+### Vite dev server config (`vite.config.js`)
+
+```js
+import { defineConfig } from 'vite'
+
+export default defineConfig({
+ server: {
+ headers: {
+ 'Cross-Origin-Opener-Policy': 'same-origin',
+ 'Cross-Origin-Embedder-Policy': 'require-corp',
+ }
+ }
+})
+```
+
+### Static production server (`server.mjs`)
+
+When serving the `dist/` build, also make sure your server sets these headers:
+
+```js
+res.setHeader("Cross-Origin-Opener-Policy", "same-origin");
+res.setHeader("Cross-Origin-Embedder-Policy", "require-corp");
+```
+
+### Vercel deployment
+
+If you deploy to [**Vercel**](https://vercel.com/), add a `vercel.json` file to ensure COOP / COEP headers are set:
+
+```json
+{
+ "headers": [
+ {
+ "source": "/(.*)",
+ "headers": [
+ { "key": "Cross-Origin-Opener-Policy", "value": "same-origin" },
+ { "key": "Cross-Origin-Embedder-Policy", "value": "require-corp" }
+ ]
+ }
+ ]
+}
+```
\ No newline at end of file
diff --git a/bindings/javascript/examples/sync-wasm-vite/index.html b/bindings/javascript/examples/sync-wasm-vite/index.html
new file mode 100644
index 000000000..c9b6b4905
--- /dev/null
+++ b/bindings/javascript/examples/sync-wasm-vite/index.html
@@ -0,0 +1,128 @@
+
+
+
+
+
+ Guestbook
+
+
+
+
+ Guestbook
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/bindings/javascript/examples/sync-wasm-vite/package-lock.json b/bindings/javascript/examples/sync-wasm-vite/package-lock.json
new file mode 100644
index 000000000..7d24fec2c
--- /dev/null
+++ b/bindings/javascript/examples/sync-wasm-vite/package-lock.json
@@ -0,0 +1,1152 @@
+{
+ "name": "sync-wasm-vite",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "sync-wasm-vite",
+ "version": "1.0.0",
+ "license": "ISC",
+ "dependencies": {
+ "@tursodatabase/sync-wasm": "^0.2.0"
+ },
+ "devDependencies": {
+ "vite": "^7.1.9"
+ }
+ },
+ "node_modules/@emnapi/core": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.5.0.tgz",
+ "integrity": "sha512-sbP8GzB1WDzacS8fgNPpHlp6C9VZe+SJP3F90W9rLemaQj2PzIuTEl1qDOYQf58YIpyjViI24y9aPWCjEzY2cg==",
+ "license": "MIT",
+ "dependencies": {
+ "@emnapi/wasi-threads": "1.1.0",
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@emnapi/runtime": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.5.0.tgz",
+ "integrity": "sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@emnapi/wasi-threads": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.1.0.tgz",
+ "integrity": "sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@esbuild/aix-ppc64": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.10.tgz",
+ "integrity": "sha512-0NFWnA+7l41irNuaSVlLfgNT12caWJVLzp5eAVhZ0z1qpxbockccEt3s+149rE64VUI3Ml2zt8Nv5JVc4QXTsw==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.10.tgz",
+ "integrity": "sha512-dQAxF1dW1C3zpeCDc5KqIYuZ1tgAdRXNoZP7vkBIRtKZPYe2xVr/d3SkirklCHudW1B45tGiUlz2pUWDfbDD4w==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm64": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.10.tgz",
+ "integrity": "sha512-LSQa7eDahypv/VO6WKohZGPSJDq5OVOo3UoFR1E4t4Gj1W7zEQMUhI+lo81H+DtB+kP+tDgBp+M4oNCwp6kffg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-x64": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.10.tgz",
+ "integrity": "sha512-MiC9CWdPrfhibcXwr39p9ha1x0lZJ9KaVfvzA0Wxwz9ETX4v5CHfF09bx935nHlhi+MxhA63dKRRQLiVgSUtEg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-arm64": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.10.tgz",
+ "integrity": "sha512-JC74bdXcQEpW9KkV326WpZZjLguSZ3DfS8wrrvPMHgQOIEIG/sPXEN/V8IssoJhbefLRcRqw6RQH2NnpdprtMA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-x64": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.10.tgz",
+ "integrity": "sha512-tguWg1olF6DGqzws97pKZ8G2L7Ig1vjDmGTwcTuYHbuU6TTjJe5FXbgs5C1BBzHbJ2bo1m3WkQDbWO2PvamRcg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.10.tgz",
+ "integrity": "sha512-3ZioSQSg1HT2N05YxeJWYR+Libe3bREVSdWhEEgExWaDtyFbbXWb49QgPvFH8u03vUPX10JhJPcz7s9t9+boWg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-x64": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.10.tgz",
+ "integrity": "sha512-LLgJfHJk014Aa4anGDbh8bmI5Lk+QidDmGzuC2D+vP7mv/GeSN+H39zOf7pN5N8p059FcOfs2bVlrRr4SK9WxA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.10.tgz",
+ "integrity": "sha512-oR31GtBTFYCqEBALI9r6WxoU/ZofZl962pouZRTEYECvNF/dtXKku8YXcJkhgK/beU+zedXfIzHijSRapJY3vg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm64": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.10.tgz",
+ "integrity": "sha512-5luJWN6YKBsawd5f9i4+c+geYiVEw20FVW5x0v1kEMWNq8UctFjDiMATBxLvmmHA4bf7F6hTRaJgtghFr9iziQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ia32": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.10.tgz",
+ "integrity": "sha512-NrSCx2Kim3EnnWgS4Txn0QGt0Xipoumb6z6sUtl5bOEZIVKhzfyp/Lyw4C1DIYvzeW/5mWYPBFJU3a/8Yr75DQ==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-loong64": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.10.tgz",
+ "integrity": "sha512-xoSphrd4AZda8+rUDDfD9J6FUMjrkTz8itpTITM4/xgerAZZcFW7Dv+sun7333IfKxGG8gAq+3NbfEMJfiY+Eg==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-mips64el": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.10.tgz",
+ "integrity": "sha512-ab6eiuCwoMmYDyTnyptoKkVS3k8fy/1Uvq7Dj5czXI6DF2GqD2ToInBI0SHOp5/X1BdZ26RKc5+qjQNGRBelRA==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ppc64": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.10.tgz",
+ "integrity": "sha512-NLinzzOgZQsGpsTkEbdJTCanwA5/wozN9dSgEl12haXJBzMTpssebuXR42bthOF3z7zXFWH1AmvWunUCkBE4EA==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-riscv64": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.10.tgz",
+ "integrity": "sha512-FE557XdZDrtX8NMIeA8LBJX3dC2M8VGXwfrQWU7LB5SLOajfJIxmSdyL/gU1m64Zs9CBKvm4UAuBp5aJ8OgnrA==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-s390x": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.10.tgz",
+ "integrity": "sha512-3BBSbgzuB9ajLoVZk0mGu+EHlBwkusRmeNYdqmznmMc9zGASFjSsxgkNsqmXugpPk00gJ0JNKh/97nxmjctdew==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-x64": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.10.tgz",
+ "integrity": "sha512-QSX81KhFoZGwenVyPoberggdW1nrQZSvfVDAIUXr3WqLRZGZqWk/P4T8p2SP+de2Sr5HPcvjhcJzEiulKgnxtA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-arm64": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.10.tgz",
+ "integrity": "sha512-AKQM3gfYfSW8XRk8DdMCzaLUFB15dTrZfnX8WXQoOUpUBQ+NaAFCP1kPS/ykbbGYz7rxn0WS48/81l9hFl3u4A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-x64": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.10.tgz",
+ "integrity": "sha512-7RTytDPGU6fek/hWuN9qQpeGPBZFfB4zZgcz2VK2Z5VpdUxEI8JKYsg3JfO0n/Z1E/6l05n0unDCNc4HnhQGig==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-arm64": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.10.tgz",
+ "integrity": "sha512-5Se0VM9Wtq797YFn+dLimf2Zx6McttsH2olUBsDml+lm0GOCRVebRWUvDtkY4BWYv/3NgzS8b/UM3jQNh5hYyw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-x64": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.10.tgz",
+ "integrity": "sha512-XkA4frq1TLj4bEMB+2HnI0+4RnjbuGZfet2gs/LNs5Hc7D89ZQBHQ0gL2ND6Lzu1+QVkjp3x1gIcPKzRNP8bXw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openharmony-arm64": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.10.tgz",
+ "integrity": "sha512-AVTSBhTX8Y/Fz6OmIVBip9tJzZEUcY8WLh7I59+upa5/GPhh2/aM6bvOMQySspnCCHvFi79kMtdJS1w0DXAeag==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/sunos-x64": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.10.tgz",
+ "integrity": "sha512-fswk3XT0Uf2pGJmOpDB7yknqhVkJQkAQOcW/ccVOtfx05LkbWOaRAtn5SaqXypeKQra1QaEa841PgrSL9ubSPQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-arm64": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.10.tgz",
+ "integrity": "sha512-ah+9b59KDTSfpaCg6VdJoOQvKjI33nTaQr4UluQwW7aEwZQsbMCfTmfEO4VyewOxx4RaDT/xCy9ra2GPWmO7Kw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-ia32": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.10.tgz",
+ "integrity": "sha512-QHPDbKkrGO8/cz9LKVnJU22HOi4pxZnZhhA2HYHez5Pz4JeffhDjf85E57Oyco163GnzNCVkZK0b/n4Y0UHcSw==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-x64": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.10.tgz",
+ "integrity": "sha512-9KpxSVFCu0iK1owoez6aC/s/EdUQLDN3adTxGCqxMVhrPDj6bt5dbrHDXUuq+Bs2vATFBBrQS5vdQ/Ed2P+nbw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@napi-rs/wasm-runtime": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.0.5.tgz",
+ "integrity": "sha512-TBr9Cf9onSAS2LQ2+QHx6XcC6h9+RIzJgbqG3++9TUZSH204AwEy5jg3BTQ0VATsyoGj4ee49tN/y6rvaOOtcg==",
+ "license": "MIT",
+ "dependencies": {
+ "@emnapi/core": "^1.5.0",
+ "@emnapi/runtime": "^1.5.0",
+ "@tybys/wasm-util": "^0.10.1"
+ }
+ },
+ "node_modules/@rollup/rollup-android-arm-eabi": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.4.tgz",
+ "integrity": "sha512-BTm2qKNnWIQ5auf4deoetINJm2JzvihvGb9R6K/ETwKLql/Bb3Eg2H1FBp1gUb4YGbydMA3jcmQTR73q7J+GAA==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-android-arm64": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.4.tgz",
+ "integrity": "sha512-P9LDQiC5vpgGFgz7GSM6dKPCiqR3XYN1WwJKA4/BUVDjHpYsf3iBEmVz62uyq20NGYbiGPR5cNHI7T1HqxNs2w==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-arm64": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.4.tgz",
+ "integrity": "sha512-QRWSW+bVccAvZF6cbNZBJwAehmvG9NwfWHwMy4GbWi/BQIA/laTIktebT2ipVjNncqE6GLPxOok5hsECgAxGZg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-x64": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.4.tgz",
+ "integrity": "sha512-hZgP05pResAkRJxL1b+7yxCnXPGsXU0fG9Yfd6dUaoGk+FhdPKCJ5L1Sumyxn8kvw8Qi5PvQ8ulenUbRjzeCTw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-freebsd-arm64": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.4.tgz",
+ "integrity": "sha512-xmc30VshuBNUd58Xk4TKAEcRZHaXlV+tCxIXELiE9sQuK3kG8ZFgSPi57UBJt8/ogfhAF5Oz4ZSUBN77weM+mQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-freebsd-x64": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.4.tgz",
+ "integrity": "sha512-WdSLpZFjOEqNZGmHflxyifolwAiZmDQzuOzIq9L27ButpCVpD7KzTRtEG1I0wMPFyiyUdOO+4t8GvrnBLQSwpw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.4.tgz",
+ "integrity": "sha512-xRiOu9Of1FZ4SxVbB0iEDXc4ddIcjCv2aj03dmW8UrZIW7aIQ9jVJdLBIhxBI+MaTnGAKyvMwPwQnoOEvP7FgQ==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-musleabihf": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.4.tgz",
+ "integrity": "sha512-FbhM2p9TJAmEIEhIgzR4soUcsW49e9veAQCziwbR+XWB2zqJ12b4i/+hel9yLiD8pLncDH4fKIPIbt5238341Q==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-gnu": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.4.tgz",
+ "integrity": "sha512-4n4gVwhPHR9q/g8lKCyz0yuaD0MvDf7dV4f9tHt0C73Mp8h38UCtSCSE6R9iBlTbXlmA8CjpsZoujhszefqueg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-musl": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.4.tgz",
+ "integrity": "sha512-u0n17nGA0nvi/11gcZKsjkLj1QIpAuPFQbR48Subo7SmZJnGxDpspyw2kbpuoQnyK+9pwf3pAoEXerJs/8Mi9g==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-loong64-gnu": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.4.tgz",
+ "integrity": "sha512-0G2c2lpYtbTuXo8KEJkDkClE/+/2AFPdPAbmaHoE870foRFs4pBrDehilMcrSScrN/fB/1HTaWO4bqw+ewBzMQ==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-ppc64-gnu": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.4.tgz",
+ "integrity": "sha512-teSACug1GyZHmPDv14VNbvZFX779UqWTsd7KtTM9JIZRDI5NUwYSIS30kzI8m06gOPB//jtpqlhmraQ68b5X2g==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-riscv64-gnu": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.4.tgz",
+ "integrity": "sha512-/MOEW3aHjjs1p4Pw1Xk4+3egRevx8Ji9N6HUIA1Ifh8Q+cg9dremvFCUbOX2Zebz80BwJIgCBUemjqhU5XI5Eg==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-riscv64-musl": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.4.tgz",
+ "integrity": "sha512-1HHmsRyh845QDpEWzOFtMCph5Ts+9+yllCrREuBR/vg2RogAQGGBRC8lDPrPOMnrdOJ+mt1WLMOC2Kao/UwcvA==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-s390x-gnu": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.4.tgz",
+ "integrity": "sha512-seoeZp4L/6D1MUyjWkOMRU6/iLmCU2EjbMTyAG4oIOs1/I82Y5lTeaxW0KBfkUdHAWN7j25bpkt0rjnOgAcQcA==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-gnu": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.4.tgz",
+ "integrity": "sha512-Wi6AXf0k0L7E2gteNsNHUs7UMwCIhsCTs6+tqQ5GPwVRWMaflqGec4Sd8n6+FNFDw9vGcReqk2KzBDhCa1DLYg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-musl": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.4.tgz",
+ "integrity": "sha512-dtBZYjDmCQ9hW+WgEkaffvRRCKm767wWhxsFW3Lw86VXz/uJRuD438/XvbZT//B96Vs8oTA8Q4A0AfHbrxP9zw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-openharmony-arm64": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.4.tgz",
+ "integrity": "sha512-1ox+GqgRWqaB1RnyZXL8PD6E5f7YyRUJYnCqKpNzxzP0TkaUh112NDrR9Tt+C8rJ4x5G9Mk8PQR3o7Ku2RKqKA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-arm64-msvc": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.4.tgz",
+ "integrity": "sha512-8GKr640PdFNXwzIE0IrkMWUNUomILLkfeHjXBi/nUvFlpZP+FA8BKGKpacjW6OUUHaNI6sUURxR2U2g78FOHWQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-ia32-msvc": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.4.tgz",
+ "integrity": "sha512-AIy/jdJ7WtJ/F6EcfOb2GjR9UweO0n43jNObQMb6oGxkYTfLcnN7vYYpG+CN3lLxrQkzWnMOoNSHTW54pgbVxw==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-x64-gnu": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.4.tgz",
+ "integrity": "sha512-UF9KfsH9yEam0UjTwAgdK0anlQ7c8/pWPU2yVjyWcF1I1thABt6WXE47cI71pGiZ8wGvxohBoLnxM04L/wj8mQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-x64-msvc": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.4.tgz",
+ "integrity": "sha512-bf9PtUa0u8IXDVxzRToFQKsNCRz9qLYfR/MpECxl4mRoWYjAeFjgxj1XdZr2M/GNVpT05p+LgQOHopYDlUu6/w==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@tursodatabase/database-common": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/@tursodatabase/database-common/-/database-common-0.2.0.tgz",
+ "integrity": "sha512-xXiP3vtdyqDqqnI7+s98wWxRVm2Sj+muGA0ZQM0JX/eGfnMWuyk6tggTM+pLnA5ErKeFoBzf+ul6d9a00bnY3Q==",
+ "license": "MIT"
+ },
+ "node_modules/@tursodatabase/database-wasm-common": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/@tursodatabase/database-wasm-common/-/database-wasm-common-0.2.0.tgz",
+ "integrity": "sha512-1IEItYbe/mP6UTjyt9IHPOtog0aTdOieoJcFfmRW+G82t9i7o8iBBuC7xwYm4SKd3489GJXRq8R40+Gdbh/sUw==",
+ "license": "MIT",
+ "dependencies": {
+ "@napi-rs/wasm-runtime": "^1.0.5"
+ }
+ },
+ "node_modules/@tursodatabase/sync-common": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/@tursodatabase/sync-common/-/sync-common-0.2.0.tgz",
+ "integrity": "sha512-k1ARDjSknLaX60sY8kxAVMQeffM5vYqVSY9yD9zK8vF3d2d1vzwyqKb2VHIcRCCNtzXpEr3wz8dF+FvEi/9olA==",
+ "license": "MIT",
+ "dependencies": {
+ "@tursodatabase/database-common": "^0.2.0"
+ }
+ },
+ "node_modules/@tursodatabase/sync-wasm": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/@tursodatabase/sync-wasm/-/sync-wasm-0.2.0.tgz",
+ "integrity": "sha512-A/RhecoBaUsuJEqfNrdNjWvJYPldDsL0DEiYofJiSRgnaQA4bEQAL0ogJdhE9jbCaJEhQZo5fW8aP+eDDxDUmg==",
+ "license": "MIT",
+ "dependencies": {
+ "@tursodatabase/database-common": "^0.2.0",
+ "@tursodatabase/database-wasm-common": "^0.2.0",
+ "@tursodatabase/sync-common": "^0.2.0"
+ }
+ },
+ "node_modules/@tybys/wasm-util": {
+ "version": "0.10.1",
+ "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz",
+ "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
+ "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/esbuild": {
+ "version": "0.25.10",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.10.tgz",
+ "integrity": "sha512-9RiGKvCwaqxO2owP61uQ4BgNborAQskMR6QusfWzQqv7AZOg5oGehdY2pRJMTKuwxd1IDBP4rSbI5lHzU7SMsQ==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.25.10",
+ "@esbuild/android-arm": "0.25.10",
+ "@esbuild/android-arm64": "0.25.10",
+ "@esbuild/android-x64": "0.25.10",
+ "@esbuild/darwin-arm64": "0.25.10",
+ "@esbuild/darwin-x64": "0.25.10",
+ "@esbuild/freebsd-arm64": "0.25.10",
+ "@esbuild/freebsd-x64": "0.25.10",
+ "@esbuild/linux-arm": "0.25.10",
+ "@esbuild/linux-arm64": "0.25.10",
+ "@esbuild/linux-ia32": "0.25.10",
+ "@esbuild/linux-loong64": "0.25.10",
+ "@esbuild/linux-mips64el": "0.25.10",
+ "@esbuild/linux-ppc64": "0.25.10",
+ "@esbuild/linux-riscv64": "0.25.10",
+ "@esbuild/linux-s390x": "0.25.10",
+ "@esbuild/linux-x64": "0.25.10",
+ "@esbuild/netbsd-arm64": "0.25.10",
+ "@esbuild/netbsd-x64": "0.25.10",
+ "@esbuild/openbsd-arm64": "0.25.10",
+ "@esbuild/openbsd-x64": "0.25.10",
+ "@esbuild/openharmony-arm64": "0.25.10",
+ "@esbuild/sunos-x64": "0.25.10",
+ "@esbuild/win32-arm64": "0.25.10",
+ "@esbuild/win32-ia32": "0.25.10",
+ "@esbuild/win32-x64": "0.25.10"
+ }
+ },
+ "node_modules/fdir": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "picomatch": "^3 || ^4"
+ },
+ "peerDependenciesMeta": {
+ "picomatch": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/nanoid": {
+ "version": "3.3.11",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
+ "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "bin": {
+ "nanoid": "bin/nanoid.cjs"
+ },
+ "engines": {
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+ }
+ },
+ "node_modules/picocolors": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/picomatch": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
+ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/postcss": {
+ "version": "8.5.6",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
+ "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "nanoid": "^3.3.11",
+ "picocolors": "^1.1.1",
+ "source-map-js": "^1.2.1"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ }
+ },
+ "node_modules/rollup": {
+ "version": "4.52.4",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.4.tgz",
+ "integrity": "sha512-CLEVl+MnPAiKh5pl4dEWSyMTpuflgNQiLGhMv8ezD5W/qP8AKvmYpCOKRRNOh7oRKnauBZ4SyeYkMS+1VSyKwQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "1.0.8"
+ },
+ "bin": {
+ "rollup": "dist/bin/rollup"
+ },
+ "engines": {
+ "node": ">=18.0.0",
+ "npm": ">=8.0.0"
+ },
+ "optionalDependencies": {
+ "@rollup/rollup-android-arm-eabi": "4.52.4",
+ "@rollup/rollup-android-arm64": "4.52.4",
+ "@rollup/rollup-darwin-arm64": "4.52.4",
+ "@rollup/rollup-darwin-x64": "4.52.4",
+ "@rollup/rollup-freebsd-arm64": "4.52.4",
+ "@rollup/rollup-freebsd-x64": "4.52.4",
+ "@rollup/rollup-linux-arm-gnueabihf": "4.52.4",
+ "@rollup/rollup-linux-arm-musleabihf": "4.52.4",
+ "@rollup/rollup-linux-arm64-gnu": "4.52.4",
+ "@rollup/rollup-linux-arm64-musl": "4.52.4",
+ "@rollup/rollup-linux-loong64-gnu": "4.52.4",
+ "@rollup/rollup-linux-ppc64-gnu": "4.52.4",
+ "@rollup/rollup-linux-riscv64-gnu": "4.52.4",
+ "@rollup/rollup-linux-riscv64-musl": "4.52.4",
+ "@rollup/rollup-linux-s390x-gnu": "4.52.4",
+ "@rollup/rollup-linux-x64-gnu": "4.52.4",
+ "@rollup/rollup-linux-x64-musl": "4.52.4",
+ "@rollup/rollup-openharmony-arm64": "4.52.4",
+ "@rollup/rollup-win32-arm64-msvc": "4.52.4",
+ "@rollup/rollup-win32-ia32-msvc": "4.52.4",
+ "@rollup/rollup-win32-x64-gnu": "4.52.4",
+ "@rollup/rollup-win32-x64-msvc": "4.52.4",
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/source-map-js": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
+ "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/tinyglobby": {
+ "version": "0.2.15",
+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz",
+ "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fdir": "^6.5.0",
+ "picomatch": "^4.0.3"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/SuperchupuDev"
+ }
+ },
+ "node_modules/tslib": {
+ "version": "2.8.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+ "license": "0BSD"
+ },
+ "node_modules/vite": {
+ "version": "7.1.9",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.9.tgz",
+ "integrity": "sha512-4nVGliEpxmhCL8DslSAUdxlB6+SMrhB0a1v5ijlh1xB1nEPuy1mxaHxysVucLHuWryAxLWg6a5ei+U4TLn/rFg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "esbuild": "^0.25.0",
+ "fdir": "^6.5.0",
+ "picomatch": "^4.0.3",
+ "postcss": "^8.5.6",
+ "rollup": "^4.43.0",
+ "tinyglobby": "^0.2.15"
+ },
+ "bin": {
+ "vite": "bin/vite.js"
+ },
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ },
+ "funding": {
+ "url": "https://github.com/vitejs/vite?sponsor=1"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.3"
+ },
+ "peerDependencies": {
+ "@types/node": "^20.19.0 || >=22.12.0",
+ "jiti": ">=1.21.0",
+ "less": "^4.0.0",
+ "lightningcss": "^1.21.0",
+ "sass": "^1.70.0",
+ "sass-embedded": "^1.70.0",
+ "stylus": ">=0.54.8",
+ "sugarss": "^5.0.0",
+ "terser": "^5.16.0",
+ "tsx": "^4.8.1",
+ "yaml": "^2.4.2"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ },
+ "jiti": {
+ "optional": true
+ },
+ "less": {
+ "optional": true
+ },
+ "lightningcss": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "sass-embedded": {
+ "optional": true
+ },
+ "stylus": {
+ "optional": true
+ },
+ "sugarss": {
+ "optional": true
+ },
+ "terser": {
+ "optional": true
+ },
+ "tsx": {
+ "optional": true
+ },
+ "yaml": {
+ "optional": true
+ }
+ }
+ }
+ }
+}
diff --git a/bindings/javascript/examples/wasm/wasm/package.json b/bindings/javascript/examples/sync-wasm-vite/package.json
similarity index 53%
rename from bindings/javascript/examples/wasm/wasm/package.json
rename to bindings/javascript/examples/sync-wasm-vite/package.json
index 175aabe87..fbcddd2a7 100644
--- a/bindings/javascript/examples/wasm/wasm/package.json
+++ b/bindings/javascript/examples/sync-wasm-vite/package.json
@@ -1,19 +1,21 @@
{
- "name": "wasm",
+ "name": "sync-wasm-vite",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"dev": "vite",
"build": "vite build",
- "preview": "vite preview"
+ "serve": "node server.mjs",
+ "tsc-build": "echo 'no tsc-build'",
+ "test": "echo 'no tests'"
},
"author": "",
"license": "ISC",
"description": "",
"devDependencies": {
- "vite": "^7.1.4"
+ "vite": "^7.1.9"
},
"dependencies": {
- "@tursodatabase/database-wasm": "../../browser"
+ "@tursodatabase/sync-wasm": "^0.2.0"
}
}
diff --git a/bindings/javascript/examples/sync-wasm-vite/server.mjs b/bindings/javascript/examples/sync-wasm-vite/server.mjs
new file mode 100644
index 000000000..9daa24d39
--- /dev/null
+++ b/bindings/javascript/examples/sync-wasm-vite/server.mjs
@@ -0,0 +1,34 @@
+import http from "http";
+import { readFile } from "fs/promises";
+import { extname, join } from "path";
+import { fileURLToPath } from "url";
+
+const root = fileURLToPath(new URL("./dist", import.meta.url));
+const port = 8080;
+
+const mimeTypes = { ".html": "text/html", ".js": "application/javascript" };
+
+const server = http.createServer(async (req, res) => {
+ // COOP / COEP headers necessary for shared WASM memory
+ res.setHeader("Cross-Origin-Opener-Policy", "same-origin");
+ res.setHeader("Cross-Origin-Embedder-Policy", "require-corp");
+
+ try {
+ const url = new URL(req.url, `http://${req.headers.host}`);
+ const pathname = url.pathname;
+ const filePath = pathname === "/" ? "index.html" : pathname;
+ const fullPath = join(root, filePath);
+
+ const data = await readFile(fullPath);
+ const ext = extname(fullPath).toLowerCase();
+ const contentType = mimeTypes[ext] || "application/octet-stream";
+
+ res.writeHead(200, { "Content-Type": contentType });
+ res.end(data);
+ } catch (err) {
+ res.writeHead(404, { "Content-Type": "text/plain" });
+ res.end("Not found");
+ }
+});
+
+server.listen(port, "0.0.0.0", () => console.log(`Serving on http://localhost:${port}`));
diff --git a/bindings/javascript/examples/sync-wasm-vite/vercel.json b/bindings/javascript/examples/sync-wasm-vite/vercel.json
new file mode 100644
index 000000000..3de04dda1
--- /dev/null
+++ b/bindings/javascript/examples/sync-wasm-vite/vercel.json
@@ -0,0 +1,11 @@
+{
+ "headers": [
+ {
+ "source": "/(.*)",
+ "headers": [
+ { "key": "Cross-Origin-Opener-Policy", "value": "same-origin" },
+ { "key": "Cross-Origin-Embedder-Policy", "value": "require-corp" }
+ ]
+ }
+ ]
+}
diff --git a/bindings/javascript/examples/sync-wasm-vite/vite.config.ts b/bindings/javascript/examples/sync-wasm-vite/vite.config.ts
new file mode 100644
index 000000000..48bdbef5f
--- /dev/null
+++ b/bindings/javascript/examples/sync-wasm-vite/vite.config.ts
@@ -0,0 +1,10 @@
+import { defineConfig } from 'vite'
+
+export default defineConfig({
+ server: {
+ headers: {
+ 'Cross-Origin-Opener-Policy': 'same-origin',
+ 'Cross-Origin-Embedder-Policy': 'require-corp',
+ }
+ }
+})
diff --git a/bindings/javascript/examples/wasm/index.html b/bindings/javascript/examples/wasm/index.html
deleted file mode 100644
index efd7b0b7b..000000000
--- a/bindings/javascript/examples/wasm/index.html
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
- Run
-
-
-
diff --git a/bindings/javascript/examples/wasm/vite.config.js b/bindings/javascript/examples/wasm/vite.config.js
deleted file mode 100644
index 7adffc470..000000000
--- a/bindings/javascript/examples/wasm/vite.config.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import { defineConfig, searchForWorkspaceRoot } from 'vite'
-
-export default defineConfig({
- build: {
- minify: false, // Set this to false to disable minification
- },
- resolve: {
- alias: {
- '@tursodatabase/database-wasm32-wasi': '../../turso.wasi-wasm.js'
- },
- },
- server: {
- fs: {
- allow: ['.']
- },
- headers: {
- 'Cross-Origin-Opener-Policy': 'same-origin',
- 'Cross-Origin-Embedder-Policy': 'require-corp',
- }
- },
- optimizeDeps: {
- exclude: [
- "@tursodatabase/database-wasm32-wasi",
- ]
- },
-})
diff --git a/bindings/javascript/examples/wasm/wasm/index.html b/bindings/javascript/examples/wasm/wasm/index.html
deleted file mode 100644
index 5aac23315..000000000
--- a/bindings/javascript/examples/wasm/wasm/index.html
+++ /dev/null
@@ -1,272 +0,0 @@
-
-
-
-
-
-
- Brutal DB Viewer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/bindings/javascript/examples/wasm/wasm/package-lock.json b/bindings/javascript/examples/wasm/wasm/package-lock.json
deleted file mode 100644
index 1736671a3..000000000
--- a/bindings/javascript/examples/wasm/wasm/package-lock.json
+++ /dev/null
@@ -1,335 +0,0 @@
-{
- "name": "wasm",
- "version": "1.0.0",
- "lockfileVersion": 3,
- "requires": true,
- "packages": {
- "": {
- "name": "wasm",
- "version": "1.0.0",
- "license": "ISC",
- "dependencies": {
- "@tursodatabase/database-wasm": "../../packages/browser"
- },
- "devDependencies": {
- "vite": "^7.1.4"
- }
- },
- "../../packages/browser": {
- "name": "@tursodatabase/database-wasm",
- "version": "0.1.5",
- "license": "MIT",
- "dependencies": {
- "@napi-rs/wasm-runtime": "^1.0.3",
- "@tursodatabase/database-wasm-common": "^0.1.5",
- "@tursodatabase/database-common": "^0.1.5"
- },
- "devDependencies": {
- "@napi-rs/cli": "^3.1.5",
- "@vitest/browser": "^3.2.4",
- "playwright": "^1.55.0",
- "typescript": "^5.9.2",
- "vitest": "^3.2.4"
- }
- },
- "node_modules/@esbuild/linux-arm64": {
- "version": "0.25.9",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@rollup/rollup-linux-arm64-gnu": {
- "version": "4.50.0",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@rollup/rollup-linux-arm64-musl": {
- "version": "4.50.0",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@tursodatabase/database-wasm": {
- "resolved": "../../packages/browser",
- "link": true
- },
- "node_modules/@types/estree": {
- "version": "1.0.8",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/esbuild": {
- "version": "0.25.9",
- "dev": true,
- "hasInstallScript": true,
- "license": "MIT",
- "bin": {
- "esbuild": "bin/esbuild"
- },
- "engines": {
- "node": ">=18"
- },
- "optionalDependencies": {
- "@esbuild/aix-ppc64": "0.25.9",
- "@esbuild/android-arm": "0.25.9",
- "@esbuild/android-arm64": "0.25.9",
- "@esbuild/android-x64": "0.25.9",
- "@esbuild/darwin-arm64": "0.25.9",
- "@esbuild/darwin-x64": "0.25.9",
- "@esbuild/freebsd-arm64": "0.25.9",
- "@esbuild/freebsd-x64": "0.25.9",
- "@esbuild/linux-arm": "0.25.9",
- "@esbuild/linux-arm64": "0.25.9",
- "@esbuild/linux-ia32": "0.25.9",
- "@esbuild/linux-loong64": "0.25.9",
- "@esbuild/linux-mips64el": "0.25.9",
- "@esbuild/linux-ppc64": "0.25.9",
- "@esbuild/linux-riscv64": "0.25.9",
- "@esbuild/linux-s390x": "0.25.9",
- "@esbuild/linux-x64": "0.25.9",
- "@esbuild/netbsd-arm64": "0.25.9",
- "@esbuild/netbsd-x64": "0.25.9",
- "@esbuild/openbsd-arm64": "0.25.9",
- "@esbuild/openbsd-x64": "0.25.9",
- "@esbuild/openharmony-arm64": "0.25.9",
- "@esbuild/sunos-x64": "0.25.9",
- "@esbuild/win32-arm64": "0.25.9",
- "@esbuild/win32-ia32": "0.25.9",
- "@esbuild/win32-x64": "0.25.9"
- }
- },
- "node_modules/fdir": {
- "version": "6.5.0",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12.0.0"
- },
- "peerDependencies": {
- "picomatch": "^3 || ^4"
- },
- "peerDependenciesMeta": {
- "picomatch": {
- "optional": true
- }
- }
- },
- "node_modules/nanoid": {
- "version": "3.3.11",
- "dev": true,
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/ai"
- }
- ],
- "license": "MIT",
- "bin": {
- "nanoid": "bin/nanoid.cjs"
- },
- "engines": {
- "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
- }
- },
- "node_modules/picocolors": {
- "version": "1.1.1",
- "dev": true,
- "license": "ISC"
- },
- "node_modules/picomatch": {
- "version": "4.0.3",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/jonschlinkert"
- }
- },
- "node_modules/postcss": {
- "version": "8.5.6",
- "dev": true,
- "funding": [
- {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- },
- {
- "type": "tidelift",
- "url": "https://tidelift.com/funding/github/npm/postcss"
- },
- {
- "type": "github",
- "url": "https://github.com/sponsors/ai"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "nanoid": "^3.3.11",
- "picocolors": "^1.1.1",
- "source-map-js": "^1.2.1"
- },
- "engines": {
- "node": "^10 || ^12 || >=14"
- }
- },
- "node_modules/rollup": {
- "version": "4.50.0",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@types/estree": "1.0.8"
- },
- "bin": {
- "rollup": "dist/bin/rollup"
- },
- "engines": {
- "node": ">=18.0.0",
- "npm": ">=8.0.0"
- },
- "optionalDependencies": {
- "@rollup/rollup-android-arm-eabi": "4.50.0",
- "@rollup/rollup-android-arm64": "4.50.0",
- "@rollup/rollup-darwin-arm64": "4.50.0",
- "@rollup/rollup-darwin-x64": "4.50.0",
- "@rollup/rollup-freebsd-arm64": "4.50.0",
- "@rollup/rollup-freebsd-x64": "4.50.0",
- "@rollup/rollup-linux-arm-gnueabihf": "4.50.0",
- "@rollup/rollup-linux-arm-musleabihf": "4.50.0",
- "@rollup/rollup-linux-arm64-gnu": "4.50.0",
- "@rollup/rollup-linux-arm64-musl": "4.50.0",
- "@rollup/rollup-linux-loongarch64-gnu": "4.50.0",
- "@rollup/rollup-linux-ppc64-gnu": "4.50.0",
- "@rollup/rollup-linux-riscv64-gnu": "4.50.0",
- "@rollup/rollup-linux-riscv64-musl": "4.50.0",
- "@rollup/rollup-linux-s390x-gnu": "4.50.0",
- "@rollup/rollup-linux-x64-gnu": "4.50.0",
- "@rollup/rollup-linux-x64-musl": "4.50.0",
- "@rollup/rollup-openharmony-arm64": "4.50.0",
- "@rollup/rollup-win32-arm64-msvc": "4.50.0",
- "@rollup/rollup-win32-ia32-msvc": "4.50.0",
- "@rollup/rollup-win32-x64-msvc": "4.50.0",
- "fsevents": "~2.3.2"
- }
- },
- "node_modules/source-map-js": {
- "version": "1.2.1",
- "dev": true,
- "license": "BSD-3-Clause",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/tinyglobby": {
- "version": "0.2.14",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "fdir": "^6.4.4",
- "picomatch": "^4.0.2"
- },
- "engines": {
- "node": ">=12.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/SuperchupuDev"
- }
- },
- "node_modules/vite": {
- "version": "7.1.4",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "esbuild": "^0.25.0",
- "fdir": "^6.5.0",
- "picomatch": "^4.0.3",
- "postcss": "^8.5.6",
- "rollup": "^4.43.0",
- "tinyglobby": "^0.2.14"
- },
- "bin": {
- "vite": "bin/vite.js"
- },
- "engines": {
- "node": "^20.19.0 || >=22.12.0"
- },
- "funding": {
- "url": "https://github.com/vitejs/vite?sponsor=1"
- },
- "optionalDependencies": {
- "fsevents": "~2.3.3"
- },
- "peerDependencies": {
- "@types/node": "^20.19.0 || >=22.12.0",
- "jiti": ">=1.21.0",
- "less": "^4.0.0",
- "lightningcss": "^1.21.0",
- "sass": "^1.70.0",
- "sass-embedded": "^1.70.0",
- "stylus": ">=0.54.8",
- "sugarss": "^5.0.0",
- "terser": "^5.16.0",
- "tsx": "^4.8.1",
- "yaml": "^2.4.2"
- },
- "peerDependenciesMeta": {
- "@types/node": {
- "optional": true
- },
- "jiti": {
- "optional": true
- },
- "less": {
- "optional": true
- },
- "lightningcss": {
- "optional": true
- },
- "sass": {
- "optional": true
- },
- "sass-embedded": {
- "optional": true
- },
- "stylus": {
- "optional": true
- },
- "sugarss": {
- "optional": true
- },
- "terser": {
- "optional": true
- },
- "tsx": {
- "optional": true
- },
- "yaml": {
- "optional": true
- }
- }
- }
- }
-}
diff --git a/bindings/javascript/examples/wasm/wasm/vite.config.js b/bindings/javascript/examples/wasm/wasm/vite.config.js
deleted file mode 100644
index 3d37c5172..000000000
--- a/bindings/javascript/examples/wasm/wasm/vite.config.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import { defineConfig, searchForWorkspaceRoot } from 'vite'
-
-export default defineConfig({
- server: {
- fs: {
- allow: ['.', '../../']
- },
- define:
- {
- 'process.env.NODE_DEBUG_NATIVE': 'false', // string replace at build-time
- },
- headers: {
- 'Cross-Origin-Opener-Policy': 'same-origin',
- 'Cross-Origin-Embedder-Policy': 'require-corp',
- }
- },
- optimizeDeps: {
- esbuildOptions: {
- define: { 'process.env.NODE_DEBUG_NATIVE': 'false' },
- },
- },
-})
diff --git a/bindings/javascript/package-lock.json b/bindings/javascript/package-lock.json
index 30522cec1..78ecea6bb 100644
--- a/bindings/javascript/package-lock.json
+++ b/bindings/javascript/package-lock.json
@@ -13,9 +13,47 @@
"packages/wasm",
"sync/packages/common",
"sync/packages/native",
- "sync/packages/wasm"
+ "sync/packages/wasm",
+ "examples/database-node",
+ "examples/database-wasm-vite",
+ "examples/sync-node",
+ "examples/sync-wasm-vite"
]
},
+ "examples/database-node": {
+ "version": "1.0.0",
+ "license": "ISC",
+ "dependencies": {
+ "@tursodatabase/database": "^0.2.0"
+ }
+ },
+ "examples/database-wasm-vite": {
+ "version": "1.0.0",
+ "license": "ISC",
+ "dependencies": {
+ "@tursodatabase/database-wasm": "^0.2.0"
+ },
+ "devDependencies": {
+ "vite": "^7.1.9"
+ }
+ },
+ "examples/sync-node": {
+ "version": "1.0.0",
+ "license": "ISC",
+ "dependencies": {
+ "@tursodatabase/sync": "^0.2.0"
+ }
+ },
+ "examples/sync-wasm-vite": {
+ "version": "1.0.0",
+ "license": "ISC",
+ "dependencies": {
+ "@tursodatabase/sync-wasm": "^0.2.0"
+ },
+ "devDependencies": {
+ "vite": "^7.1.9"
+ }
+ },
"node_modules/@babel/code-frame": {
"version": "7.27.1",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz",
@@ -1656,6 +1694,14 @@
"node": ">= 12"
}
},
+ "node_modules/database-node": {
+ "resolved": "examples/database-node",
+ "link": true
+ },
+ "node_modules/database-wasm-vite": {
+ "resolved": "examples/database-wasm-vite",
+ "link": true
+ },
"node_modules/debug": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
@@ -3048,6 +3094,14 @@
"url": "https://github.com/sponsors/antfu"
}
},
+ "node_modules/sync-node": {
+ "resolved": "examples/sync-node",
+ "link": true
+ },
+ "node_modules/sync-wasm-vite": {
+ "resolved": "examples/sync-wasm-vite",
+ "link": true
+ },
"node_modules/tar-fs": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz",
@@ -3248,9 +3302,9 @@
"license": "MIT"
},
"node_modules/vite": {
- "version": "7.1.5",
- "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.5.tgz",
- "integrity": "sha512-4cKBO9wR75r0BeIWWWId9XK9Lj6La5X846Zw9dFfzMRw38IlTk2iCcUt6hsyiDRcPidc55ZParFYDXi0nXOeLQ==",
+ "version": "7.1.9",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.9.tgz",
+ "integrity": "sha512-4nVGliEpxmhCL8DslSAUdxlB6+SMrhB0a1v5ijlh1xB1nEPuy1mxaHxysVucLHuWryAxLWg6a5ei+U4TLn/rFg==",
"dev": true,
"license": "MIT",
"dependencies": {
diff --git a/bindings/javascript/package.json b/bindings/javascript/package.json
index 7625d4ca2..1f94d4350 100644
--- a/bindings/javascript/package.json
+++ b/bindings/javascript/package.json
@@ -12,7 +12,11 @@
"packages/wasm",
"sync/packages/common",
"sync/packages/native",
- "sync/packages/wasm"
+ "sync/packages/wasm",
+ "examples/database-node",
+ "examples/database-wasm-vite",
+ "examples/sync-node",
+ "examples/sync-wasm-vite"
],
"version": "0.2.0"
}
diff --git a/bindings/javascript/sync/packages/common/run.ts b/bindings/javascript/sync/packages/common/run.ts
index 50b2fafd4..95d47612f 100644
--- a/bindings/javascript/sync/packages/common/run.ts
+++ b/bindings/javascript/sync/packages/common/run.ts
@@ -18,6 +18,10 @@ function timeoutMs(ms: number): Promise {
return new Promise(resolve => setTimeout(resolve, ms))
}
+function normalizeUrl(url: string): string {
+ return url.replace(/^libsql:\/\//, 'https://');
+}
+
async function process(opts: RunOpts, io: ProtocolIo, request: any) {
const requestType = request.request();
const completion = request.completion();
@@ -32,6 +36,7 @@ async function process(opts: RunOpts, io: ProtocolIo, request: any) {
completion.poison(`url is empty - sync is paused`);
return;
}
+ url = normalizeUrl(url);
try {
let headers = typeof opts.headers === "function" ? await opts.headers() : opts.headers;
if (requestType.headers != null && requestType.headers.length > 0) {
diff --git a/bindings/javascript/yarn.lock b/bindings/javascript/yarn.lock
index 0d06fc233..f111364b7 100644
--- a/bindings/javascript/yarn.lock
+++ b/bindings/javascript/yarn.lock
@@ -1593,7 +1593,7 @@ __metadata:
languageName: unknown
linkType: soft
-"@tursodatabase/database-wasm@workspace:packages/wasm":
+"@tursodatabase/database-wasm@npm:^0.2.0, @tursodatabase/database-wasm@workspace:packages/wasm":
version: 0.0.0-use.local
resolution: "@tursodatabase/database-wasm@workspace:packages/wasm"
dependencies:
@@ -1608,7 +1608,7 @@ __metadata:
languageName: unknown
linkType: soft
-"@tursodatabase/database@workspace:packages/native":
+"@tursodatabase/database@npm:^0.2.0, @tursodatabase/database@workspace:packages/native":
version: 0.0.0-use.local
resolution: "@tursodatabase/database@workspace:packages/native"
dependencies:
@@ -1632,7 +1632,7 @@ __metadata:
languageName: unknown
linkType: soft
-"@tursodatabase/sync-wasm@workspace:sync/packages/wasm":
+"@tursodatabase/sync-wasm@npm:^0.2.0, @tursodatabase/sync-wasm@workspace:sync/packages/wasm":
version: 0.0.0-use.local
resolution: "@tursodatabase/sync-wasm@workspace:sync/packages/wasm"
dependencies:
@@ -1648,7 +1648,7 @@ __metadata:
languageName: unknown
linkType: soft
-"@tursodatabase/sync@workspace:sync/packages/native":
+"@tursodatabase/sync@npm:^0.2.0, @tursodatabase/sync@workspace:sync/packages/native":
version: 0.0.0-use.local
resolution: "@tursodatabase/sync@workspace:sync/packages/native"
dependencies:
@@ -2100,6 +2100,23 @@ __metadata:
languageName: node
linkType: hard
+"database-node@workspace:examples/database-node":
+ version: 0.0.0-use.local
+ resolution: "database-node@workspace:examples/database-node"
+ dependencies:
+ "@tursodatabase/database": "npm:^0.2.0"
+ languageName: unknown
+ linkType: soft
+
+"database-wasm-vite@workspace:examples/database-wasm-vite":
+ version: 0.0.0-use.local
+ resolution: "database-wasm-vite@workspace:examples/database-wasm-vite"
+ dependencies:
+ "@tursodatabase/database-wasm": "npm:^0.2.0"
+ vite: "npm:^7.1.9"
+ languageName: unknown
+ linkType: soft
+
"debug@npm:4":
version: 4.4.3
resolution: "debug@npm:4.4.3"
@@ -3655,6 +3672,23 @@ __metadata:
languageName: node
linkType: hard
+"sync-node@workspace:examples/sync-node":
+ version: 0.0.0-use.local
+ resolution: "sync-node@workspace:examples/sync-node"
+ dependencies:
+ "@tursodatabase/sync": "npm:^0.2.0"
+ languageName: unknown
+ linkType: soft
+
+"sync-wasm-vite@workspace:examples/sync-wasm-vite":
+ version: 0.0.0-use.local
+ resolution: "sync-wasm-vite@workspace:examples/sync-wasm-vite"
+ dependencies:
+ "@tursodatabase/sync-wasm": "npm:^0.2.0"
+ vite: "npm:^7.1.9"
+ languageName: unknown
+ linkType: soft
+
"tar-fs@npm:^2.0.0":
version: 2.1.4
resolution: "tar-fs@npm:2.1.4"
@@ -3865,9 +3899,9 @@ __metadata:
languageName: node
linkType: hard
-"vite@npm:^5.0.0 || ^6.0.0 || ^7.0.0-0, vite@npm:^7.1.5":
- version: 7.1.5
- resolution: "vite@npm:7.1.5"
+"vite@npm:^5.0.0 || ^6.0.0 || ^7.0.0-0, vite@npm:^7.1.5, vite@npm:^7.1.9":
+ version: 7.1.9
+ resolution: "vite@npm:7.1.9"
dependencies:
esbuild: "npm:^0.25.0"
fdir: "npm:^6.5.0"
@@ -3916,7 +3950,7 @@ __metadata:
optional: true
bin:
vite: bin/vite.js
- checksum: 10c0/782d2f20c25541b26d1fb39bef5f194149caff39dc25b7836e25f049ca919f2e2ce186bddb21f3f20f6195354b3579ec637a8ca08d65b117f8b6f81e3e730a9c
+ checksum: 10c0/f628f903a137c1410232558bde99c223ea00a090bda6af77752c61f912955f0050aac12d3cfe024d08a0f150ff6fab61b3d0be75d634a59b94d49f525392e1f7
languageName: node
linkType: hard