diff --git a/apps/realtime-audio/tsconfig.json b/apps/realtime-audio/tsconfig.json
index f18d0b8c4..448c07133 100644
--- a/apps/realtime-audio/tsconfig.json
+++ b/apps/realtime-audio/tsconfig.json
@@ -10,14 +10,6 @@
],
"module": "ESNext",
"moduleResolution": "bundler",
- "paths": {
- "@proj-airi/duckdb-wasm/*": [
- "../duckdb-wasm/src/*"
- ],
- "@proj-airi/duckdb-wasm": [
- "../duckdb-wasm/src/index.ts"
- ]
- },
"types": [
"vite/client",
"@vitest/browser/providers/playwright",
diff --git a/apps/stage-tamagotchi/package.json b/apps/stage-tamagotchi/package.json
index 0128e63cb..0704b51c5 100644
--- a/apps/stage-tamagotchi/package.json
+++ b/apps/stage-tamagotchi/package.json
@@ -92,7 +92,7 @@
"@iconify-json/vscode-icons": "^1.2.18",
"@iconify/utils": "^2.3.0",
"@intlify/unplugin-vue-i18n": "^6.0.5",
- "@proj-airi/drizzle-duckdb-wasm": "workspace:^",
+ "@proj-airi/drizzle-duckdb-wasm": "catalog:",
"@proj-airi/lobe-icons": "^1.0.5",
"@proj-airi/provider-transformers": "workspace:^",
"@proj-airi/ui-transitions": "workspace:^",
diff --git a/apps/stage-web/package.json b/apps/stage-web/package.json
index 1f4a8796a..cc52b1cfa 100644
--- a/apps/stage-web/package.json
+++ b/apps/stage-web/package.json
@@ -37,7 +37,7 @@
"@pixiv/three-vrm-animation": "^3.3.6",
"@pixiv/three-vrm-core": "^3.3.6",
"@proj-airi/ccc": "workspace:^",
- "@proj-airi/drizzle-duckdb-wasm": "workspace:^",
+ "@proj-airi/drizzle-duckdb-wasm": "catalog:",
"@proj-airi/provider-transformers": "workspace:^",
"@proj-airi/server-sdk": "workspace:^",
"@proj-airi/stage-ui": "workspace:^",
diff --git a/packages/drizzle-duckdb-wasm/README.md b/packages/drizzle-duckdb-wasm/README.md
index 9199b314e..8b3e0a8f8 100644
--- a/packages/drizzle-duckdb-wasm/README.md
+++ b/packages/drizzle-duckdb-wasm/README.md
@@ -1,139 +1,3 @@
-# 🦆 Drizzle ORM driver for `@duckdb/duckdb-wasm`
+# We have moved
-This package provides a Drizzle ORM driver for the DuckDB WASM implementation.
-
-> [Playground](https://drizzle-orm-duckdb-wasm.netlify.app/)
-
-## Installation
-
-Pick the package manager of your choice:
-
-```shell
-ni @proj-airi/drizzle-duckdb-wasm -D # from @antfu/ni, can be installed via `npm i -g @antfu/ni`
-pnpm i @proj-airi/drizzle-duckdb-wasm -D
-yarn i @proj-airi/drizzle-duckdb-wasm -D
-npm i @proj-airi/drizzle-duckdb-wasm -D
-```
-
-## Usage
-
-```typescript
-import { drizzle } from '@proj-airi/drizzle-duckdb-wasm'
-
-const db = drizzle('duckdb-wasm://?bundles=import-url', { schema })
-```
-
-### Browser
-
-#### Vue.js
-
-```typescript
-// ./db/schema.ts
-import { sql } from 'drizzle-orm'
-import { pgTable, uuid } from 'drizzle-orm/pg-core'
-
-export const users = pgTable('users', () => ({
- id: uuid().primaryKey().unique().default(sql`gen_random_uuid()`),
-}))
-```
-
-```shell
-drizzle-kit generate
-```
-
-```html
-
-
-```
-
-### Node.js
-
-You will need to install `web-worker` too.
-
-```shell
-ni web-worker # from @antfu/ni, can be installed via `npm i -g @antfu/ni`
-pnpm i web-worker
-yarn i web-worker
-npm i web-worker
-```
-
-```typescript
-// ./db/schema.ts
-import { sql } from 'drizzle-orm'
-import { pgTable, uuid } from 'drizzle-orm/pg-core'
-
-export const users = pgTable('users', () => ({
- id: uuid().primaryKey().unique().default(sql`gen_random_uuid()`),
-}))
-```
-
-```shell
-drizzle-kit generate
-```
-
-```typescript
-// ./src/index.ts
-import { read } from 'node:fs/promises'
-import { drizzle } from '@proj-airi/drizzle-duckdb-wasm'
-import { getBundles } from '@proj-airi/drizzle-duckdb-wasm/bundles/default-node'
-
-import * as schema from './db/schema'
-import { users } from './db/schema'
-
-async function main() {
- const db = drizzle({ connection: { bundles: getBundles() } }, { schema })
-
- // Run migration scripts
- const migration1 = await read('./drizzle/0000_cute_kulan_gath.sql', 'utf-8')
- await db.execute(migration1)
-
- const res = await db.execute('SELECT count(*)::INTEGER as v FROM generate_series(0, 100) t(v)')
- console.log(res) // Output [{ v: 101 }]
-
- await db.insert(users).values({ id: '00000000-0000-0000-0000-000000000000' })
- const foundUsers = await db.select().from(users)
- console.log(foundUsers) // Output [{ id: '00000000-0000-0000-0000-000000000000' }]
-
- // Remember to close it when you are done
- const client = await db.$client
- await client.close()
-}
-```
-
-## Footnotes
-
-Check out [the package](https://github.com/moeru-ai/airi/tree/main/packages/duckdb-wasm/README.md) we made for easier call to `@duckdb/duckdb-wasm` as well!
+Hello! This package has been moved to [proj-airi/duckdb-wasm](https://github.com/proj-airi/duckdb-wasm). You may keep tracking the updates of this package there.
diff --git a/packages/drizzle-duckdb-wasm/drizzle.config.ts b/packages/drizzle-duckdb-wasm/drizzle.config.ts
deleted file mode 100644
index ff63453eb..000000000
--- a/packages/drizzle-duckdb-wasm/drizzle.config.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { defineConfig } from 'drizzle-kit'
-
-export default defineConfig({
- dialect: 'postgresql',
- schema: './playground/db/schema.ts',
- out: './playground/drizzle',
-})
diff --git a/packages/drizzle-duckdb-wasm/index.html b/packages/drizzle-duckdb-wasm/index.html
deleted file mode 100644
index ce99973e1..000000000
--- a/packages/drizzle-duckdb-wasm/index.html
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
- Project AIRI Memory Driver @duckdb/duckdb-wasm Playground
-
-
-
-
-
-
-
-
- This website requires JavaScript to function properly. Please enable JavaScript to continue.
-
-
diff --git a/packages/drizzle-duckdb-wasm/netlify.toml b/packages/drizzle-duckdb-wasm/netlify.toml
deleted file mode 100755
index 86f71e3c9..000000000
--- a/packages/drizzle-duckdb-wasm/netlify.toml
+++ /dev/null
@@ -1,13 +0,0 @@
-[build]
-base = "/"
-command = "pnpm -F @proj-airi/drizzle-duckdb-wasm... run build"
-publish = "/packages/drizzle-duckdb-wasm/playground/dist"
-
-[build.environment]
-NODE_VERSION = "23"
-
-[[redirects]]
-from = "/*"
-to = "/index.html"
-status = 200
-force = false
diff --git a/packages/drizzle-duckdb-wasm/package.json b/packages/drizzle-duckdb-wasm/package.json
deleted file mode 100644
index 95876ce2c..000000000
--- a/packages/drizzle-duckdb-wasm/package.json
+++ /dev/null
@@ -1,99 +0,0 @@
-{
- "name": "@proj-airi/drizzle-duckdb-wasm",
- "type": "module",
- "version": "0.4.19",
- "description": "🦆 Drizzle ORM driver for @duckdb/duckdb-wasm that works on both browser and Node.js environments",
- "author": {
- "name": "Neko Ayaka",
- "email": "neko@ayaka.moe",
- "url": "https://github.com/nekomeowww"
- },
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "https://github.com/moeru-ai/airi.git",
- "directory": "packages/drizzle-duckdb-wasm"
- },
- "exports": {
- ".": {
- "types": "./dist/index.d.ts",
- "import": "./dist/index.mjs",
- "node": "./dist/index.cjs"
- },
- "./bundles/default-browser": {
- "types": "./dist/bundles/default-browser.d.ts",
- "import": "./dist/bundles/default-browser.mjs"
- },
- "./bundles/default-node": {
- "types": "./dist/bundles/default-node.d.ts",
- "import": "./dist/bundles/default-node.mjs",
- "node": "./dist/bundles/default-node.cjs"
- },
- "./bundles/import-url-browser": {
- "types": "./dist/bundles/import-url-browser.d.ts",
- "import": "./dist/bundles/import-url-browser.mjs"
- },
- "./bundles/import-url-node": {
- "types": "./dist/bundles/import-url-node.d.ts",
- "import": "./dist/bundles/import-url-node.mjs",
- "node": "./dist/bundles/import-url-node.cjs"
- }
- },
- "main": "./dist/index.cjs",
- "module": "./dist/index.mjs",
- "types": "./dist/index.d.ts",
- "files": [
- "README.md",
- "dist",
- "package.json"
- ],
- "scripts": {
- "dev": "pnpm run stub",
- "stub": "unbuild",
- "build": "unbuild && pnpm run play:build",
- "play:dev": "vite",
- "play:build": "vite build",
- "play:preview": "vite preview",
- "typecheck": "vue-tsc --noEmit",
- "db:generate": "drizzle-kit generate",
- "test": "vitest",
- "test:run": "vitest run"
- },
- "peerDependencies": {
- "web-worker": "^1.5.0"
- },
- "peerDependenciesMeta": {
- "web-worker": {
- "optional": true
- }
- },
- "dependencies": {
- "@date-fns/tz": "^1.2.0",
- "@duckdb/duckdb-wasm": "1.29.1-dev68.0",
- "@proj-airi/duckdb-wasm": "workspace:^",
- "apache-arrow": "^19.0.1",
- "date-fns": "^4.1.0",
- "defu": "^6.1.4",
- "drizzle-orm": "^0.41.0",
- "es-toolkit": "^1.34.1"
- },
- "devDependencies": {
- "@iconify-json/solar": "^1.2.2",
- "@types/d3": "^7.4.3",
- "@types/d3-force": "^3.0.10",
- "@unocss/reset": "^66.1.0-beta.9",
- "@vitejs/plugin-vue": "^5.2.3",
- "@vitest/browser": "^3.1.1",
- "@vueuse/core": "^13.0.0",
- "d3": "^7.9.0",
- "d3-force": "^3.0.0",
- "drizzle-kit": "^0.30.6",
- "playwright": "^1.51.1",
- "superjson": "^2.2.2",
- "unplugin-vue-router": "^0.12.0",
- "vite": "^6.2.5",
- "vue": "^3.5.13",
- "vue-router": "^4.5.0",
- "vue-tsc": "^3.0.0-alpha.2"
- }
-}
diff --git a/packages/drizzle-duckdb-wasm/playground/db/schema.ts b/packages/drizzle-duckdb-wasm/playground/db/schema.ts
deleted file mode 100644
index 83b62b667..000000000
--- a/packages/drizzle-duckdb-wasm/playground/db/schema.ts
+++ /dev/null
@@ -1,86 +0,0 @@
-import { sql } from 'drizzle-orm'
-import {
- bigint,
- // bit,
- boolean,
- char,
- date,
- decimal,
- doublePrecision,
- integer,
- interval,
- json,
- numeric,
- pgTable,
- real,
- smallint,
- text,
- time,
- timestamp,
- uuid,
- varchar,
- vector,
-} from 'drizzle-orm/pg-core'
-
-export const users = pgTable('users', () => ({
- id: uuid().primaryKey().unique().default(sql`gen_random_uuid()`),
- int16: smallint().notNull().default(0),
- int32: integer().notNull().default(0),
- int64: bigint({ mode: 'number' }).notNull().default(sql`0`),
- int64BigInt: bigint({ mode: 'bigint' }).notNull().default(sql`0`),
- decimal: decimal().notNull().default(sql`0`),
- numeric: numeric().notNull().default(sql`0`),
- real: real().notNull().default(sql`0`),
- double: doublePrecision().notNull().default(sql`0`),
- vector: vector({ dimensions: 4 }).notNull().default(sql`[0,0,0,0]`),
- // Unimplemented type for cast (INTEGER[] -> BIT) from @duckdb/duckdb-wasm
- // bit: bit({ dimensions: 4 }).notNull().default(sql`[0,0,0,0]`),
- bool: boolean().notNull().default(false),
- char: char().notNull().default(''),
- varchar: varchar().notNull().default(''),
- text: text().notNull().default(''),
- json: json().notNull().default(sql`'{}'`),
- date: date().notNull().default(sql`'2020-01-01'`),
- time: time().notNull().default(sql`'00:00:00'`),
- timestamp: timestamp().notNull().default(sql`'2020-01-01 00:00:00'`),
- interval: interval().notNull().default(sql`'1 day'`),
-}))
-
-export const nodeUsers = pgTable('node_users', () => ({
- id: uuid().primaryKey().unique().default(sql`gen_random_uuid()`),
- name: text().notNull().default(''),
-}))
-
-export const nodePets = pgTable('node_pets', () => ({
- id: uuid().primaryKey().unique().default(sql`gen_random_uuid()`),
- name: text().notNull().default(''),
-}))
-
-export const nodeGroups = pgTable('node_groups', () => ({
- id: uuid().primaryKey().unique().default(sql`gen_random_uuid()`),
- name: text().notNull().default(''),
-}))
-
-export const edgePets = pgTable('edge_pets', () => ({
- id: uuid().primaryKey().unique().default(sql`gen_random_uuid()`),
- source: uuid(),
- target: uuid(),
-}))
-
-export const edgeOwners = pgTable('edge_owners', () => ({
- id: uuid().primaryKey().unique().default(sql`gen_random_uuid()`),
- source: uuid(),
- target: uuid(),
-}))
-
-export const edgeUsers = pgTable('edge_users', () => ({
- id: uuid().primaryKey().unique().default(sql`gen_random_uuid()`),
- source: uuid(),
- target: uuid(),
-}))
-
-export const edgeGroups = pgTable('edge_groups', () => ({
- id: uuid().primaryKey().unique().default(sql`gen_random_uuid()`),
- source: uuid(),
- target: uuid(),
-}))
diff --git a/packages/drizzle-duckdb-wasm/playground/drizzle/0000_cute_kulan_gath.sql b/packages/drizzle-duckdb-wasm/playground/drizzle/0000_cute_kulan_gath.sql
deleted file mode 100644
index 8bb76295d..000000000
--- a/packages/drizzle-duckdb-wasm/playground/drizzle/0000_cute_kulan_gath.sql
+++ /dev/null
@@ -1,22 +0,0 @@
-CREATE TABLE "users" (
- "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
- "int16" smallint DEFAULT 0 NOT NULL,
- "int32" integer DEFAULT 0 NOT NULL,
- "int64" bigint DEFAULT 0 NOT NULL,
- "int64BigInt" bigint DEFAULT 0 NOT NULL,
- "decimal" numeric DEFAULT 0 NOT NULL,
- "numeric" numeric DEFAULT 0 NOT NULL,
- "real" real DEFAULT 0 NOT NULL,
- "double" double precision DEFAULT 0 NOT NULL,
- "vector" FLOAT[4] DEFAULT [0,0,0,0] NOT NULL,
- "bool" boolean DEFAULT false NOT NULL,
- "char" char DEFAULT '' NOT NULL,
- "varchar" varchar DEFAULT '' NOT NULL,
- "text" text DEFAULT '' NOT NULL,
- "json" json DEFAULT '{}' NOT NULL,
- "date" date DEFAULT '2020-01-01' NOT NULL,
- "time" time DEFAULT '00:00:00' NOT NULL,
- "timestamp" timestamp DEFAULT '2020-01-01 00:00:00' NOT NULL,
- "interval" interval DEFAULT '1 day' NOT NULL,
- CONSTRAINT "users_id_unique" UNIQUE("id")
-);
diff --git a/packages/drizzle-duckdb-wasm/playground/drizzle/0001_parched_silver_centurion.sql b/packages/drizzle-duckdb-wasm/playground/drizzle/0001_parched_silver_centurion.sql
deleted file mode 100644
index c51677560..000000000
--- a/packages/drizzle-duckdb-wasm/playground/drizzle/0001_parched_silver_centurion.sql
+++ /dev/null
@@ -1,45 +0,0 @@
-CREATE TABLE "edge_groups" (
- "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
- "source" uuid,
- "target" uuid,
- CONSTRAINT "edge_groups_id_unique" UNIQUE("id")
-);
---> statement-breakpoint
-CREATE TABLE "edge_owners" (
- "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
- "source" uuid,
- "target" uuid,
- CONSTRAINT "edge_owners_id_unique" UNIQUE("id")
-);
---> statement-breakpoint
-CREATE TABLE "edge_pets" (
- "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
- "source" uuid,
- "target" uuid,
- CONSTRAINT "edge_pets_id_unique" UNIQUE("id")
-);
---> statement-breakpoint
-CREATE TABLE "edge_users" (
- "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
- "source" uuid,
- "target" uuid,
- CONSTRAINT "edge_users_id_unique" UNIQUE("id")
-);
---> statement-breakpoint
-CREATE TABLE "node_groups" (
- "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
- "name" text DEFAULT '' NOT NULL,
- CONSTRAINT "node_groups_id_unique" UNIQUE("id")
-);
---> statement-breakpoint
-CREATE TABLE "node_pets" (
- "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
- "name" text DEFAULT '' NOT NULL,
- CONSTRAINT "node_pets_id_unique" UNIQUE("id")
-);
---> statement-breakpoint
-CREATE TABLE "node_users" (
- "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
- "name" text DEFAULT '' NOT NULL,
- CONSTRAINT "node_users_id_unique" UNIQUE("id")
-);
diff --git a/packages/drizzle-duckdb-wasm/playground/drizzle/meta/0000_snapshot.json b/packages/drizzle-duckdb-wasm/playground/drizzle/meta/0000_snapshot.json
deleted file mode 100644
index a7e192b93..000000000
--- a/packages/drizzle-duckdb-wasm/playground/drizzle/meta/0000_snapshot.json
+++ /dev/null
@@ -1,173 +0,0 @@
-{
- "id": "5305094b-45db-4a61-a74f-340b2b7da250",
- "prevId": "00000000-0000-0000-0000-000000000000",
- "version": "7",
- "dialect": "postgresql",
- "tables": {
- "public.users": {
- "name": "users",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "uuid",
- "primaryKey": true,
- "notNull": true,
- "default": "gen_random_uuid()"
- },
- "int16": {
- "name": "int16",
- "type": "smallint",
- "primaryKey": false,
- "notNull": true,
- "default": 0
- },
- "int32": {
- "name": "int32",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 0
- },
- "int64": {
- "name": "int64",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "default": "0"
- },
- "int64BigInt": {
- "name": "int64BigInt",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "default": "0"
- },
- "decimal": {
- "name": "decimal",
- "type": "numeric",
- "primaryKey": false,
- "notNull": true,
- "default": "0"
- },
- "numeric": {
- "name": "numeric",
- "type": "numeric",
- "primaryKey": false,
- "notNull": true,
- "default": "0"
- },
- "real": {
- "name": "real",
- "type": "real",
- "primaryKey": false,
- "notNull": true,
- "default": "0"
- },
- "double": {
- "name": "double",
- "type": "double precision",
- "primaryKey": false,
- "notNull": true,
- "default": "0"
- },
- "vector": {
- "name": "vector",
- "type": "vector(4)",
- "primaryKey": false,
- "notNull": true,
- "default": "[0,0,0,0]"
- },
- "bool": {
- "name": "bool",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "char": {
- "name": "char",
- "type": "char",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "varchar": {
- "name": "varchar",
- "type": "varchar",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "text": {
- "name": "text",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "json": {
- "name": "json",
- "type": "json",
- "primaryKey": false,
- "notNull": true,
- "default": "'{}'"
- },
- "date": {
- "name": "date",
- "type": "date",
- "primaryKey": false,
- "notNull": true,
- "default": "'2020-01-01'"
- },
- "time": {
- "name": "time",
- "type": "time",
- "primaryKey": false,
- "notNull": true,
- "default": "'00:00:00'"
- },
- "timestamp": {
- "name": "timestamp",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true,
- "default": "'2020-01-01 00:00:00'"
- },
- "interval": {
- "name": "interval",
- "type": "interval",
- "primaryKey": false,
- "notNull": true,
- "default": "'0'"
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "users_id_unique": {
- "name": "users_id_unique",
- "nullsNotDistinct": false,
- "columns": [
- "id"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {},
- "schemas": {},
- "sequences": {},
- "roles": {},
- "policies": {},
- "views": {},
- "_meta": {
- "columns": {},
- "schemas": {},
- "tables": {}
- }
-}
\ No newline at end of file
diff --git a/packages/drizzle-duckdb-wasm/playground/drizzle/meta/0001_snapshot.json b/packages/drizzle-duckdb-wasm/playground/drizzle/meta/0001_snapshot.json
deleted file mode 100644
index 2bef25cd8..000000000
--- a/packages/drizzle-duckdb-wasm/playground/drizzle/meta/0001_snapshot.json
+++ /dev/null
@@ -1,438 +0,0 @@
-{
- "id": "f64005fe-f9b9-4673-84cb-a24695abff11",
- "prevId": "5305094b-45db-4a61-a74f-340b2b7da250",
- "version": "7",
- "dialect": "postgresql",
- "tables": {
- "public.edge_groups": {
- "name": "edge_groups",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "uuid",
- "primaryKey": true,
- "notNull": true,
- "default": "gen_random_uuid()"
- },
- "source": {
- "name": "source",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "target": {
- "name": "target",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "edge_groups_id_unique": {
- "name": "edge_groups_id_unique",
- "nullsNotDistinct": false,
- "columns": [
- "id"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.edge_owners": {
- "name": "edge_owners",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "uuid",
- "primaryKey": true,
- "notNull": true,
- "default": "gen_random_uuid()"
- },
- "source": {
- "name": "source",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "target": {
- "name": "target",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "edge_owners_id_unique": {
- "name": "edge_owners_id_unique",
- "nullsNotDistinct": false,
- "columns": [
- "id"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.edge_pets": {
- "name": "edge_pets",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "uuid",
- "primaryKey": true,
- "notNull": true,
- "default": "gen_random_uuid()"
- },
- "source": {
- "name": "source",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "target": {
- "name": "target",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "edge_pets_id_unique": {
- "name": "edge_pets_id_unique",
- "nullsNotDistinct": false,
- "columns": [
- "id"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.edge_users": {
- "name": "edge_users",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "uuid",
- "primaryKey": true,
- "notNull": true,
- "default": "gen_random_uuid()"
- },
- "source": {
- "name": "source",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- },
- "target": {
- "name": "target",
- "type": "uuid",
- "primaryKey": false,
- "notNull": false
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "edge_users_id_unique": {
- "name": "edge_users_id_unique",
- "nullsNotDistinct": false,
- "columns": [
- "id"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.node_groups": {
- "name": "node_groups",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "uuid",
- "primaryKey": true,
- "notNull": true,
- "default": "gen_random_uuid()"
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "node_groups_id_unique": {
- "name": "node_groups_id_unique",
- "nullsNotDistinct": false,
- "columns": [
- "id"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.node_pets": {
- "name": "node_pets",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "uuid",
- "primaryKey": true,
- "notNull": true,
- "default": "gen_random_uuid()"
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "node_pets_id_unique": {
- "name": "node_pets_id_unique",
- "nullsNotDistinct": false,
- "columns": [
- "id"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.node_users": {
- "name": "node_users",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "uuid",
- "primaryKey": true,
- "notNull": true,
- "default": "gen_random_uuid()"
- },
- "name": {
- "name": "name",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "node_users_id_unique": {
- "name": "node_users_id_unique",
- "nullsNotDistinct": false,
- "columns": [
- "id"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- },
- "public.users": {
- "name": "users",
- "schema": "",
- "columns": {
- "id": {
- "name": "id",
- "type": "uuid",
- "primaryKey": true,
- "notNull": true,
- "default": "gen_random_uuid()"
- },
- "int16": {
- "name": "int16",
- "type": "smallint",
- "primaryKey": false,
- "notNull": true,
- "default": 0
- },
- "int32": {
- "name": "int32",
- "type": "integer",
- "primaryKey": false,
- "notNull": true,
- "default": 0
- },
- "int64": {
- "name": "int64",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "default": "0"
- },
- "int64BigInt": {
- "name": "int64BigInt",
- "type": "bigint",
- "primaryKey": false,
- "notNull": true,
- "default": "0"
- },
- "decimal": {
- "name": "decimal",
- "type": "numeric",
- "primaryKey": false,
- "notNull": true,
- "default": "0"
- },
- "numeric": {
- "name": "numeric",
- "type": "numeric",
- "primaryKey": false,
- "notNull": true,
- "default": "0"
- },
- "real": {
- "name": "real",
- "type": "real",
- "primaryKey": false,
- "notNull": true,
- "default": "0"
- },
- "double": {
- "name": "double",
- "type": "double precision",
- "primaryKey": false,
- "notNull": true,
- "default": "0"
- },
- "vector": {
- "name": "vector",
- "type": "vector(4)",
- "primaryKey": false,
- "notNull": true,
- "default": "[0,0,0,0]"
- },
- "bool": {
- "name": "bool",
- "type": "boolean",
- "primaryKey": false,
- "notNull": true,
- "default": false
- },
- "char": {
- "name": "char",
- "type": "char",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "varchar": {
- "name": "varchar",
- "type": "varchar",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "text": {
- "name": "text",
- "type": "text",
- "primaryKey": false,
- "notNull": true,
- "default": "''"
- },
- "json": {
- "name": "json",
- "type": "json",
- "primaryKey": false,
- "notNull": true,
- "default": "'{}'"
- },
- "date": {
- "name": "date",
- "type": "date",
- "primaryKey": false,
- "notNull": true,
- "default": "'2020-01-01'"
- },
- "time": {
- "name": "time",
- "type": "time",
- "primaryKey": false,
- "notNull": true,
- "default": "'00:00:00'"
- },
- "timestamp": {
- "name": "timestamp",
- "type": "timestamp",
- "primaryKey": false,
- "notNull": true,
- "default": "'2020-01-01 00:00:00'"
- },
- "interval": {
- "name": "interval",
- "type": "interval",
- "primaryKey": false,
- "notNull": true,
- "default": "'1 day'"
- }
- },
- "indexes": {},
- "foreignKeys": {},
- "compositePrimaryKeys": {},
- "uniqueConstraints": {
- "users_id_unique": {
- "name": "users_id_unique",
- "nullsNotDistinct": false,
- "columns": [
- "id"
- ]
- }
- },
- "policies": {},
- "checkConstraints": {},
- "isRLSEnabled": false
- }
- },
- "enums": {},
- "schemas": {},
- "sequences": {},
- "roles": {},
- "policies": {},
- "views": {},
- "_meta": {
- "columns": {},
- "schemas": {},
- "tables": {}
- }
-}
\ No newline at end of file
diff --git a/packages/drizzle-duckdb-wasm/playground/drizzle/meta/_journal.json b/packages/drizzle-duckdb-wasm/playground/drizzle/meta/_journal.json
deleted file mode 100644
index 3ea947ba7..000000000
--- a/packages/drizzle-duckdb-wasm/playground/drizzle/meta/_journal.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "version": "7",
- "dialect": "postgresql",
- "entries": [
- {
- "idx": 0,
- "version": "7",
- "when": 1739121102268,
- "tag": "0000_cute_kulan_gath",
- "breakpoints": true
- },
- {
- "idx": 1,
- "version": "7",
- "when": 1740841981623,
- "tag": "0001_parched_silver_centurion",
- "breakpoints": true
- }
- ]
-}
\ No newline at end of file
diff --git a/packages/drizzle-duckdb-wasm/playground/public/favicon-96x96.png b/packages/drizzle-duckdb-wasm/playground/public/favicon-96x96.png
deleted file mode 100644
index a70eda1af..000000000
Binary files a/packages/drizzle-duckdb-wasm/playground/public/favicon-96x96.png and /dev/null differ
diff --git a/packages/drizzle-duckdb-wasm/playground/public/favicon.svg b/packages/drizzle-duckdb-wasm/playground/public/favicon.svg
deleted file mode 100644
index 17940af47..000000000
--- a/packages/drizzle-duckdb-wasm/playground/public/favicon.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/packages/drizzle-duckdb-wasm/playground/src/App.vue b/packages/drizzle-duckdb-wasm/playground/src/App.vue
deleted file mode 100644
index 410a972ac..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/App.vue
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
-
-
-
-
-
-
toggleDark()">
-
-
-
-
-
-
-
-
-
-
- Interactive
-
-
-
- Graph
-
-
-
- Memory Decay
-
-
-
- Memory Simulate
-
-
-
-
-
-
-
diff --git a/packages/drizzle-duckdb-wasm/playground/src/components/Checkbox.vue b/packages/drizzle-duckdb-wasm/playground/src/components/Checkbox.vue
deleted file mode 100644
index 9b7971946..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/components/Checkbox.vue
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/packages/drizzle-duckdb-wasm/playground/src/components/Memory/DecayModelSettings.vue b/packages/drizzle-duckdb-wasm/playground/src/components/Memory/DecayModelSettings.vue
deleted file mode 100644
index ddf5d25f7..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/components/Memory/DecayModelSettings.vue
+++ /dev/null
@@ -1,193 +0,0 @@
-
-
-
-
-
-
-
-
- Long-Term Memory Model
-
-
-
-
-
- Configure how memories transition from short-term to permanent long-term memory with repeated retrievals
-
-
-
-
-
Retrieval Threshold
-
-
- {{ longTermMemoryThreshold }}
-
-
- Retrievals needed to form stable long-term memory
-
-
-
-
-
Stability Factor
-
-
- {{ longTermMemoryStability.toFixed(2) }}
-
-
- How quickly memories stabilize (lower = faster stabilization)
-
-
-
-
-
Memory Model Settings
-
-
-
- Show LTM projection
-
-
-
- Options for memory visualization
-
-
-
-
-
-
-
-
- Retrieval Effect Settings
-
-
-
-
-
Retrieval Boost Factor
-
-
- {{ retrievalBoostPercent }}%
-
-
- How much each retrieval strengthens memory
-
-
-
-
-
Decay Slowdown Factor
-
-
- {{ decaySlowdownPercent }}%
-
-
- How much retrievals slow future decay (lower = more slowdown)
-
-
-
-
-
-
-
-
-
Base Decay Rate
-
-
- {{ decayRate.toFixed(4) }}
-
-
- Controls decay speed (0.0990 = ~10% per day)
-
-
-
-
-
Time Unit
-
-
- Hours
-
-
- Days
-
-
- Weeks
-
-
- Months
-
-
-
- Unit used in calculations (affects decay rate)
-
-
-
-
-
Future Projection (Days)
-
-
- {{ maxDaysToShow }}
-
-
- How many days to project into the future
-
-
-
-
-
diff --git a/packages/drizzle-duckdb-wasm/playground/src/components/Memory/DecayTimeSettings.vue b/packages/drizzle-duckdb-wasm/playground/src/components/Memory/DecayTimeSettings.vue
deleted file mode 100644
index fe507741a..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/components/Memory/DecayTimeSettings.vue
+++ /dev/null
@@ -1,226 +0,0 @@
-
-
-
-
-
-
-
- Time Simulation
-
-
- {{ currentSimulatedTime }}
-
-
-
-
-
-
-
- +1 Hour
-
-
-
- +1 Day
-
-
-
- +1 Week
-
-
-
- +1 Month
-
-
-
-
-
- Speed
-
-
- {{ formattedTimeMultiplier }}
-
-
-
-
-
-
- {{ preset.label }}
-
-
-
-
-
-
- Custom:
-
-
-
-
- seconds/s
-
-
- minutes/s
-
-
- hours/s
-
-
- days/s
-
-
- weeks/s
-
-
- months/s
-
-
-
-
- Apply
-
-
-
-
diff --git a/packages/drizzle-duckdb-wasm/playground/src/components/Memory/EmotionalMemoryChart.vue b/packages/drizzle-duckdb-wasm/playground/src/components/Memory/EmotionalMemoryChart.vue
deleted file mode 100644
index ee07824ec..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/components/Memory/EmotionalMemoryChart.vue
+++ /dev/null
@@ -1,607 +0,0 @@
-
-
-
-
-
- Emotional Memory Projection
-
-
-
-
-
-
-
-
-
diff --git a/packages/drizzle-duckdb-wasm/playground/src/components/Memory/EmotionalMemoryDetail.vue b/packages/drizzle-duckdb-wasm/playground/src/components/Memory/EmotionalMemoryDetail.vue
deleted file mode 100644
index d178c0d02..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/components/Memory/EmotionalMemoryDetail.vue
+++ /dev/null
@@ -1,339 +0,0 @@
-
-
-
-
-
-
- {{ memory.id }}
-
-
- {{ memoryStatus.label }}
-
-
-
-
-
- Base Score:
-
-
- {{ Math.round(memory.score) }}
-
-
-
- Current Score:
-
-
- {{ Math.round(memory.decayed_score) }}
-
-
-
- Emotional Effect:
-
-
- {{ emotionalMultiplier }}%
-
-
-
- Retrieval Count:
-
-
- {{ memory.retrieval_count }}
-
-
-
- Memory Age:
-
-
- {{ ageInDays }} days
-
-
-
- Last Retrieved:
-
-
- {{ daysSinceRetrieved > 0 ? `${daysSinceRetrieved} days ago` : 'Today' }}
-
-
-
- Joy Score:
-
-
- {{ joyPercentage }}%
-
-
-
- Aversion Score:
-
-
- {{ aversionPercentage }}%
-
-
-
-
-
-
- Simulate Retrieval with Emotion:
-
-
-
- Very Joyful
-
-
- Mild Joy
-
-
- Neutral
-
-
- Mild Aversion
-
-
- Strong Aversion
-
-
-
-
-
-
-
-
-
- Current Memory Strength:
-
-
-
- 0%
- {{ Math.round(memory.score / 2) }}
- {{ Math.round(memory.score) }}
-
-
-
-
-
-
- Long-term Memory Progress:
-
-
-
- Working
-
- {{ memory.retrieval_count }}/{{ longTermThreshold }} retrievals
-
-
- LTM Stabled
-
- Long-term
-
-
-
-
-
-
- Muscle Memory Progress:
-
-
-
- Conscious
-
- {{ memory.retrieval_count }}/{{ muscleMemoryThreshold }} retrievals
-
-
- MM formed
-
- Automatic
-
-
-
-
-
-
-
-
- Aversion Factor:
-
-
-
-
-
-
-
diff --git a/packages/drizzle-duckdb-wasm/playground/src/components/Memory/EmotionalRecordDetail.vue b/packages/drizzle-duckdb-wasm/playground/src/components/Memory/EmotionalRecordDetail.vue
deleted file mode 100644
index d825cfeb9..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/components/Memory/EmotionalRecordDetail.vue
+++ /dev/null
@@ -1,269 +0,0 @@
-
-
-
-
-
-
- {{ memory.id }}
-
-
-
- Neutral Retrieval
-
-
-
-
-
-
- Memory Phase:
-
-
- {{ memoryStatus.label }}
-
-
-
- Base Score:
-
-
- {{ Math.round(memory.score) }}
-
-
-
- Current Score:
-
-
- {{ Math.round(memory.decayed_score) }}
-
-
-
- Retrieval Count:
-
-
- {{ memory.retrieval_count }}
-
-
-
- Age:
-
-
- {{ ageInDays }} days
-
-
-
- Joy Score:
-
-
- {{ (joyLevel * 100).toFixed(0) }}%
-
-
-
- Aversion Score:
-
-
- {{ (aversionLevel * 100).toFixed(0) }}%
-
-
-
-
-
-
- Joyful Retrieval (+0.1)
-
-
- Aversive Retrieval (+0.1)
-
-
-
-
-
-
-
-
- Memory Strength:
-
-
-
- 0%
- 50%
- 100%
-
-
-
-
-
-
- Long-term Memory Progress:
-
-
-
- Short-term
-
- {{ memory.retrieval_count }}/{{ longTermMemoryThreshold }} retrievals
-
-
- LTM formed
-
- Long-term
-
-
-
-
-
-
- Muscle Memory Progress:
-
-
-
- Conscious
-
- {{ memory.retrieval_count }}/{{ muscleMemoryThreshold }} retrievals
-
-
- MM formed
-
- Automatic
-
-
-
-
-
-
-
-
- Aversion Factor:
-
-
-
-
-
-
-
diff --git a/packages/drizzle-duckdb-wasm/playground/src/components/Memory/EmotionalSettings.vue b/packages/drizzle-duckdb-wasm/playground/src/components/Memory/EmotionalSettings.vue
deleted file mode 100644
index f90bbe231..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/components/Memory/EmotionalSettings.vue
+++ /dev/null
@@ -1,132 +0,0 @@
-
-
-
-
-
-
- Emotional Memory Parameters
-
-
-
-
-
-
Joy Boost Factor
-
-
- {{ joyBoostFactor.toFixed(1) }}x
-
-
- How much joy increases memory strength
-
-
-
-
-
Joy Decay Steepness
-
-
- {{ joyDecaySteepness.toFixed(1) }}
-
-
- How quickly joy effect fades (higher = faster)
-
-
-
-
-
-
Aversion Spike Factor
-
-
- {{ aversionSpikeFactor.toFixed(1) }}x
-
-
- How strongly aversive memories spike in recall
-
-
-
-
-
Aversion Stability
-
-
- {{ aversionStability.toFixed(2) }}
-
-
- How persistent aversive memories become (PTSD-like)
-
-
-
-
-
-
Random Recall Probability
-
-
- {{ randomRecallPercent }}%
-
-
- Chance of random memory flashbacks
-
-
-
-
-
Flashback Intensity
-
-
- {{ flashbackIntensity.toFixed(1) }}x
-
-
- How strong random memory flashbacks can be
-
-
-
-
-
-
diff --git a/packages/drizzle-duckdb-wasm/playground/src/components/Memory/MemoryRetrievalHeatmap.vue b/packages/drizzle-duckdb-wasm/playground/src/components/Memory/MemoryRetrievalHeatmap.vue
deleted file mode 100644
index 21faf2fad..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/components/Memory/MemoryRetrievalHeatmap.vue
+++ /dev/null
@@ -1,487 +0,0 @@
-
-
-
-
-
-
- Memory Retrieval Analysis
-
-
-
- Patterns
-
-
- Counts
-
-
-
-
-
-
-
- Heatmap shows when memories were retrieved, with color intensity showing emotional impact.
- Red outlines indicate possible random "flashback" retrievals.
-
-
- Bar chart shows total retrieval counts for each memory, sorted by frequency.
- Color intensity and hue indicate emotional impact.
-
-
-
-
-
diff --git a/packages/drizzle-duckdb-wasm/playground/src/components/Memory/RecordDetail.vue b/packages/drizzle-duckdb-wasm/playground/src/components/Memory/RecordDetail.vue
deleted file mode 100644
index d7e71d37d..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/components/Memory/RecordDetail.vue
+++ /dev/null
@@ -1,190 +0,0 @@
-
-
-
-
-
-
- {{ memory.id }}
-
-
- Simulate Retrieval
-
-
-
-
-
-
- Phase:
-
-
- {{ memoryStatus.label }}
-
-
-
- Original Score:
-
-
- {{ Math.round(memory.score) }}
-
-
-
- Current Score:
-
-
- {{ Math.round(memory.decayed_score) }}
-
-
-
- % Remaining:
-
-
- {{ strengthPercentage }}%
-
-
-
- Creation Date:
-
-
- {{ new Date(memory.updated_at).toLocaleDateString() }}
-
-
-
- Last Retrieved:
-
-
- {{ new Date(memory.last_retrieved_at).toLocaleDateString() }}
-
-
-
- Retrieval Count:
-
-
- {{ memory.retrieval_count }}
-
-
-
- Age:
-
-
- {{ ageInDays }} days
-
-
-
-
-
-
-
-
- Memory Strength:
-
-
-
- 0%
- 50%
- 100%
-
-
-
-
-
-
- Long-term Memory Progress:
-
-
-
- Short-term
-
- Working ({{ memory.retrieval_count }}/{{ longTermMemoryThreshold }})
-
-
- {{ Math.round(Number.parseFloat(String(memory.ltm_factor || 0)) * 100) }}% stable
-
- Permanent
-
-
-
-
-
diff --git a/packages/drizzle-duckdb-wasm/playground/src/components/Memory/VisualizeChart.vue b/packages/drizzle-duckdb-wasm/playground/src/components/Memory/VisualizeChart.vue
deleted file mode 100644
index 0c3af650a..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/components/Memory/VisualizeChart.vue
+++ /dev/null
@@ -1,575 +0,0 @@
-
-
-
-
-
- Memory Strength Projection
-
-
-
-
-
-
-
-
-
diff --git a/packages/drizzle-duckdb-wasm/playground/src/components/Memory/VisualizeTable.vue b/packages/drizzle-duckdb-wasm/playground/src/components/Memory/VisualizeTable.vue
deleted file mode 100644
index 4812192bb..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/components/Memory/VisualizeTable.vue
+++ /dev/null
@@ -1,177 +0,0 @@
-
-
-
-
-
-
-
- All Memory Items
-
-
- Items are ranked by current memory strength (click to analyze or simulate retrieval)
-
-
-
-
-
-
-
-
- Rank
-
-
- Memory ID
-
-
- Original Score
-
-
- Age (Days)
-
-
- Retrievals
-
-
- Last Retrieved
-
-
- Memory Status
-
-
- Current Score
-
-
- Actions
-
-
-
-
-
-
- {{ idx + 1 }}
-
-
- {{ item.id }}
-
-
- {{ Math.round(item.score) }}
-
-
- {{ Math.round(item.age_in_seconds / (24 * 60 * 60)) }}
-
-
- {{ item.retrieval_count }}
-
-
- {{ item.retrieval_count > 0 ? new Date(item.last_retrieved_at).toLocaleDateString() : '-' }}
-
-
-
- {{ getMemoryStatus(item).label }}
-
-
-
-
-
- {{ Math.round(item.decayed_score) }}
-
-
-
-
-
-
- Retrieve
-
-
-
-
-
-
-
-
-
-
diff --git a/packages/drizzle-duckdb-wasm/playground/src/components/Range.vue b/packages/drizzle-duckdb-wasm/playground/src/components/Range.vue
deleted file mode 100644
index e44c64365..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/components/Range.vue
+++ /dev/null
@@ -1,328 +0,0 @@
-
-
-
- {
- (e.target as HTMLInputElement).style.setProperty('--value', (e.target as HTMLInputElement).value)
- }"
- >
-
-
-
diff --git a/packages/drizzle-duckdb-wasm/playground/src/composables/memory/memory-decay-db.ts b/packages/drizzle-duckdb-wasm/playground/src/composables/memory/memory-decay-db.ts
deleted file mode 100644
index 007792f56..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/composables/memory/memory-decay-db.ts
+++ /dev/null
@@ -1,262 +0,0 @@
-import { buildDSN } from '../../../../src/dsn'
-import { drizzle } from '../../../../src/index'
-import * as schema from '../../../db/schema'
-
-export async function connectToDatabase() {
- return drizzle(buildDSN({
- scheme: 'duckdb-wasm:',
- bundles: 'import-url',
- logger: false,
- }), { schema })
-}
-
-export async function createSchema(db) {
- await db.execute(`
- CREATE TABLE IF NOT EXISTS memories_decay_test_table (
- id VARCHAR,
- score DOUBLE,
- updated_at TIMESTAMP,
- last_retrieved_at TIMESTAMP,
- retrieval_count INTEGER DEFAULT 0
- )
- `)
-}
-
-export async function loadSampleData(db) {
- const now = new Date()
- const sampleData = []
-
- for (let i = 1; i <= 20; i++) {
- const daysAgo = Math.random() * 60
- const lastUpdate = new Date(now.getTime() - (daysAgo * 24 * 60 * 60 * 1000))
- const retrievalCount = Math.floor(Math.random() * 10)
- let retrievalDaysAgo = retrievalCount > 0 ? Math.random() * daysAgo * (1 - retrievalCount / 15) : daysAgo
- retrievalDaysAgo = Math.max(0, retrievalDaysAgo)
- const lastRetrievedAt = new Date(now.getTime() - (retrievalDaysAgo * 24 * 60 * 60 * 1000))
- const score = Math.floor(Math.random() * 900) + 100
-
- sampleData.push({
- id: `story-${i}`,
- score,
- updated_at: lastUpdate.toISOString(),
- last_retrieved_at: lastRetrievedAt.toISOString(),
- retrieval_count: retrievalCount,
- })
- }
-
- for (const item of sampleData) {
- await db.execute(`
- INSERT INTO memories_decay_test_table (id, score, updated_at, last_retrieved_at, retrieval_count)
- VALUES ('${item.id}', ${item.score}, '${item.updated_at}', '${item.last_retrieved_at}', ${item.retrieval_count})
- `)
- }
-}
-
-export async function generateDecayQuery(db, {
- simulatedTimeOffset,
- decayRate,
- timeUnitInSeconds,
- longTermMemoryEnabled,
- longTermMemoryThreshold,
- longTermMemoryStability,
- retrievalBoost,
- retrievalDecaySlowdown,
-}) {
- const simulatedTimestamp = `(CAST(now() AS TIMESTAMP) + INTERVAL '${simulatedTimeOffset} seconds')`
-
- const ltmFactorClause = longTermMemoryEnabled
- ? `
- CASE
- WHEN retrieval_count >= ${longTermMemoryThreshold}
- THEN 1.0 - ((${longTermMemoryStability}) ^ (retrieval_count / ${longTermMemoryThreshold}))
- ELSE 0
- END AS ltm_factor,
- `
- : ''
-
- const ltmDecayModifier = longTermMemoryEnabled
- ? `* (1 - ltm_factor)`
- : ''
-
- const query = `
- SELECT
- id,
- score,
- updated_at,
- last_retrieved_at,
- retrieval_count,
- CAST(updated_at AS VARCHAR) as updated_at_str,
- CAST(last_retrieved_at AS VARCHAR) as last_retrieved_str,
- (EXTRACT(EPOCH FROM (${simulatedTimestamp} - updated_at))) as age_in_seconds,
- (EXTRACT(EPOCH FROM (${simulatedTimestamp} - last_retrieved_at))) as time_since_retrieval,
- ${ltmFactorClause}
- score *
- exp(-${decayRate} * (EXTRACT(EPOCH FROM (${simulatedTimestamp} - updated_at)))/(${timeUnitInSeconds}) ${ltmDecayModifier}) *
- (1 + (retrieval_count * ${retrievalBoost} *
- exp(-${decayRate * retrievalDecaySlowdown} *
- (EXTRACT(EPOCH FROM (${simulatedTimestamp} - last_retrieved_at)))/(${timeUnitInSeconds}))))
- as decayed_score
- FROM memories_decay_test_table
- ORDER BY decayed_score DESC
- `
-
- return query
-}
-
-export async function simulateRetrieval(db, storyId, simulatedTime) {
- const simulatedTimestamp = simulatedTime.toISOString()
-
- await db.execute(`
- UPDATE memories_decay_test_table
- SET last_retrieved_at = '${simulatedTimestamp}',
- retrieval_count = retrieval_count + 1
- WHERE id = '${storyId}'
- `)
-}
-
-export async function generateEmotionalDecayQuery(db, {
- simulatedTimeOffset,
- decayRate,
- timeUnitInSeconds,
- longTermMemoryEnabled,
- longTermMemoryThreshold,
- longTermMemoryStability,
- retrievalBoost,
- retrievalDecaySlowdown,
- joyBoostFactor,
- joyDecaySteepness,
- aversionSpikeFactor,
- aversionStability,
- randomRecallProbability,
- flashbackIntensity,
-}) {
- const simulatedTimestamp = `(CAST(now() AS TIMESTAMP) + INTERVAL '${simulatedTimeOffset} seconds')`
-
- const ltmFactorClause = longTermMemoryEnabled
- ? `
- CASE
- WHEN retrieval_count >= ${longTermMemoryThreshold}
- THEN 1.0 - ((${longTermMemoryStability}) ^ (retrieval_count / ${longTermMemoryThreshold}))
- ELSE 0
- END AS ltm_factor,
- `
- : ''
-
- const ltmDecayModifier = longTermMemoryEnabled
- ? `* (1 - ltm_factor)`
- : ''
-
- // New emotional memory components
- const emotionalComponents = `
- -- Random recall probability (flashback effect)
- (CASE WHEN RANDOM() < ${randomRecallProbability} THEN ${flashbackIntensity} ELSE 1 END) *
-
- -- Joy/euphoria boost with steep decay
- (1 + (joy_score * ${joyBoostFactor} * EXP(-${joyDecaySteepness} *
- (EXTRACT(EPOCH FROM (${simulatedTimestamp} - last_retrieved_at)))/(${timeUnitInSeconds})))) *
-
- -- Aversion spike for traumatic memories
- (1 + (aversion_score * ${aversionSpikeFactor} *
- POWER(${aversionStability}, CEIL((retrieval_count / 5)))))
- `
-
- const query = `
- SELECT
- id,
- score,
- updated_at,
- last_retrieved_at,
- retrieval_count,
- joy_score,
- aversion_score,
- CAST(updated_at AS VARCHAR) as updated_at_str,
- CAST(last_retrieved_at AS VARCHAR) as last_retrieved_str,
- (EXTRACT(EPOCH FROM (${simulatedTimestamp} - updated_at))) as age_in_seconds,
- (EXTRACT(EPOCH FROM (${simulatedTimestamp} - last_retrieved_at))) as time_since_retrieval,
- ${ltmFactorClause}
- score *
- exp(-${decayRate} * (EXTRACT(EPOCH FROM (${simulatedTimestamp} - updated_at)))/(${timeUnitInSeconds}) ${ltmDecayModifier}) *
- (1 + (retrieval_count * ${retrievalBoost} *
- exp(-${decayRate * retrievalDecaySlowdown} *
- (EXTRACT(EPOCH FROM (${simulatedTimestamp} - last_retrieved_at)))/(${timeUnitInSeconds})))) *
- ${emotionalComponents} as decayed_score
- FROM emotional_memories_test_table
- ORDER BY decayed_score DESC
- `
-
- return query
-}
-
-export async function createEmotionalSchema(db) {
- await db.execute(`
- CREATE TABLE IF NOT EXISTS emotional_memories_test_table (
- id VARCHAR,
- score DOUBLE,
- updated_at TIMESTAMP,
- last_retrieved_at TIMESTAMP,
- retrieval_count INTEGER DEFAULT 0,
- joy_score DOUBLE DEFAULT 0,
- aversion_score DOUBLE DEFAULT 0
- )
- `)
-}
-
-export async function loadEmotionalSampleData(db) {
- const now = new Date()
- const sampleData = []
-
- for (let i = 1; i <= 20; i++) {
- const daysAgo = Math.random() * 60
- const lastUpdate = new Date(now.getTime() - (daysAgo * 24 * 60 * 60 * 1000))
- const retrievalCount = Math.floor(Math.random() * 10)
- let retrievalDaysAgo = retrievalCount > 0 ? Math.random() * daysAgo * (1 - retrievalCount / 15) : daysAgo
- retrievalDaysAgo = Math.max(0, retrievalDaysAgo)
- const lastRetrievedAt = new Date(now.getTime() - (retrievalDaysAgo * 24 * 60 * 60 * 1000))
- const score = Math.floor(Math.random() * 900) + 100
-
- // Generate emotional scores
- const joyScore = Math.random() * (i % 3 === 0 ? 0.8 : 0.3)
- const aversionScore = Math.random() * (i % 4 === 0 ? 0.7 : 0.2)
-
- sampleData.push({
- id: `memory-${i}`,
- score,
- updated_at: lastUpdate.toISOString(),
- last_retrieved_at: lastRetrievedAt.toISOString(),
- retrieval_count: retrievalCount,
- joy_score: joyScore.toFixed(2),
- aversion_score: aversionScore.toFixed(2),
- })
- }
-
- for (const item of sampleData) {
- await db.execute(`
- INSERT INTO emotional_memories_test_table
- (id, score, updated_at, last_retrieved_at, retrieval_count, joy_score, aversion_score)
- VALUES
- ('${item.id}', ${item.score}, '${item.updated_at}', '${item.last_retrieved_at}',
- ${item.retrieval_count}, ${item.joy_score}, ${item.aversion_score})
- `)
- }
-}
-
-export async function simulateEmotionalRetrieval(db, memoryId, simulatedTime, { joyModifier = 0, aversionModifier = 0 }) {
- const simulatedTimestamp = simulatedTime.toISOString()
-
- await db.execute(`
- UPDATE emotional_memories_test_table
- SET last_retrieved_at = '${simulatedTimestamp}',
- retrieval_count = retrieval_count + 1,
- joy_score = CASE
- WHEN joy_score + ${joyModifier} < 0 THEN 0
- WHEN joy_score + ${joyModifier} > 1 THEN 1
- ELSE joy_score + ${joyModifier}
- END,
- aversion_score = CASE
- WHEN aversion_score + ${aversionModifier} < 0 THEN 0
- WHEN aversion_score + ${aversionModifier} > 1 THEN 1
- ELSE aversion_score + ${aversionModifier}
- END
- WHERE id = '${memoryId}'
- `)
-}
diff --git a/packages/drizzle-duckdb-wasm/playground/src/main.ts b/packages/drizzle-duckdb-wasm/playground/src/main.ts
deleted file mode 100644
index 0bc7c48da..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/main.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { createApp } from 'vue'
-import { createRouter, createWebHashHistory } from 'vue-router'
-import { routes } from 'vue-router/auto-routes'
-
-import App from './App.vue'
-import '@unocss/reset/tailwind.css'
-import 'uno.css'
-import './styles/themes.css'
-
-const router = createRouter({ routes, history: createWebHashHistory() })
-
-createApp(App)
- .use(router)
- .mount('#app')
diff --git a/packages/drizzle-duckdb-wasm/playground/src/pages/graph.vue b/packages/drizzle-duckdb-wasm/playground/src/pages/graph.vue
deleted file mode 100644
index 36c2501be..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/pages/graph.vue
+++ /dev/null
@@ -1,859 +0,0 @@
-
-
-
-
-
-
-
- Initializing database...
-
-
-
-
-
-
-
-
-
-
-
-
- Query Controls
-
-
-
- Query Type
-
-
- Recursive (All Paths)
-
-
- Find Path Between Nodes
-
-
- Direct Connections
-
-
-
-
-
- Start Node
-
-
- {{ node.name }} ({{ node.type }})
-
-
-
-
-
- End Node
-
-
- {{ node.name }} ({{ node.type }})
-
-
-
-
-
- Run Query
-
-
-
-
Click a node to select it as start node.
-
Ctrl+Click to select as end node.
-
-
-
-
-
-
- Query Results
-
-
-
-
-
-
- Name
-
-
- Type
-
-
- Depth
-
-
-
-
-
-
- {{ row.name }}
-
-
- {{ row.type }}
-
-
- {{ row.depth }}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/packages/drizzle-duckdb-wasm/playground/src/pages/index.vue b/packages/drizzle-duckdb-wasm/playground/src/pages/index.vue
deleted file mode 100644
index f8fae74fe..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/pages/index.vue
+++ /dev/null
@@ -1,267 +0,0 @@
-
-
-
-
-
-
-
- Logger
-
-
-
- Enable
-
-
-
-
- Read-only
-
-
-
- Read-only (DB file creation will fail)
-
-
-
-
-
- Path
-
-
-
-
-
-
- Leading slash is optional ("/path/to/database.db" is equivalent to "path/to/database.db")
-
- Empty path is INVALID
-
-
-
-
-
-
- DSN (read-only)
-
-
-
-
-
-
-
-
- Reconnect
-
-
- {{ isMigrated ? 'Already migrated 🥳' : 'Migrate' }}
-
-
- Insert
-
-
-
-
- List OPFS (See console)
-
-
- Wipe OPFS
-
-
-
-
-
-
- Executing
-
-
-
-
-
-
- Execute
-
-
-
-
- Results
-
-
- {{ JSON.stringify(serialize(results).json, null, 2) }}
-
-
-
-
-
-
- Executing (ORM, read-only)
-
-
-
-await db
- .insert(users)
- .values({
- id: crypto.randomUUID().replace(/-/g, ''),
- decimal: '1.23456',
- numeric: '1.23456',
- real: 1.23456,
- double: 1.23456,
- interval: '365 day',
- })
-
-await db.select().from(users)
-
-
-
-
- Execute
-
-
-
-
-
- Schema Results
-
-
- {{ JSON.stringify(serialize(schemaResults).json, null, 2) }}
-
-
-
-
-
diff --git a/packages/drizzle-duckdb-wasm/playground/src/pages/memory-decay.vue b/packages/drizzle-duckdb-wasm/playground/src/pages/memory-decay.vue
deleted file mode 100644
index b8169a288..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/pages/memory-decay.vue
+++ /dev/null
@@ -1,345 +0,0 @@
-
-
-
-
-
-
-
-
- Initializing database and sample data...
-
-
-
-
-
-
-
-
-
- About Memory Decay and Long-Term Memory Formation
-
-
- This simulator models both the forgetting curve and how memories become more stable with repeated retrievals:
-
-
- score * exp(-decay_rate * time_elapsed / time_unit * (1 - ltm_factor)) * (1 + retrieval_boost)
-
-
- The simulator models three key memory phenomena:
-
-
-
- Exponential decay : Memories naturally fade over time following Ebbinghaus' forgetting curve
-
-
- Retrieval practice effect : Each retrieval boosts the memory strength temporarily
-
-
- Long-term memory formation : After sufficient retrievals, memories become increasingly stable
- and resistant to decay, eventually becoming "permanent"
-
-
-
- This reflects how the brain forms long-term memories through a process of neural consolidation,
- where repeated activation of neural pathways leads to structural changes that stabilize memories.
- The spaced repetition study method leverages this effect for efficient learning.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/packages/drizzle-duckdb-wasm/playground/src/pages/memory-simulator.vue b/packages/drizzle-duckdb-wasm/playground/src/pages/memory-simulator.vue
deleted file mode 100644
index 301be1d5c..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/pages/memory-simulator.vue
+++ /dev/null
@@ -1,614 +0,0 @@
-
-
-
-
-
-
-
-
-
- Initializing database and sample data...
-
-
-
-
-
-
-
-
-
-
-
- Time Simulation
-
-
- {{ currentSimulatedTime.toLocaleString() }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- +1 Day
-
-
-
- +1 Week
-
-
-
- +1 Month
-
-
-
- +1 Year
-
-
-
- +5 Years
-
-
-
-
- Random Recalls
-
-
-
-
-
-
- Speed
-
-
-
- {{ speed.label }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Heatmap Time Range (days)
-
-
- {{ heatmapTimeRange }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Rank
-
-
- ID
-
-
- Base Score
-
-
- Joy Score
-
-
- Aversion Score
-
-
- Retrievals
-
-
- Age (days)
-
-
- Effective Score
-
-
- Actions
-
-
-
-
-
-
- {{ idx + 1 }}
-
-
- {{ memory.id }}
-
-
- {{ Math.round(memory.score) }}
-
-
-
- {{ Math.round(memory.joy_score * 100) }}%
-
-
-
-
- {{ Math.round(memory.aversion_score * 100) }}%
-
-
-
- {{ memory.retrieval_count }}
-
-
- {{ Math.round(memory.age_in_seconds / (24 * 60 * 60)) }}
-
-
- {{ Math.round(memory.decayed_score) }}
-
-
-
- Retrieve
-
-
-
-
-
-
-
- No memory data available
-
-
-
-
-
-
-
-
-
-
- {{ emotionalDecayQuery }}
-
-
-
-
-
-
-
diff --git a/packages/drizzle-duckdb-wasm/playground/src/styles/themes.css b/packages/drizzle-duckdb-wasm/playground/src/styles/themes.css
deleted file mode 100644
index 8281fe100..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/styles/themes.css
+++ /dev/null
@@ -1,14 +0,0 @@
-:root {
- --theme-colors-hue: 255;
- --theme-colors-chroma: calc(0.18 + (cos(var(--theme-colors-hue) * 3.14159265 / 180) * 0.04));
- --theme-colors-chroma-50: calc(var(--theme-colors-chroma) * 0.3);
- --theme-colors-chroma-100: calc(var(--theme-colors-chroma) * 0.5);
- --theme-colors-chroma-200: calc(var(--theme-colors-chroma) * 0.6);
- --theme-colors-chroma-300: calc(var(--theme-colors-chroma) * 0.75);
- --theme-colors-chroma-400: var(--theme-colors-chroma);
- --theme-colors-chroma-600: calc(var(--theme-colors-chroma) * 1.15);
- --theme-colors-chroma-700: calc(var(--theme-colors-chroma) * 1.1);
- --theme-colors-chroma-800: calc(var(--theme-colors-chroma) * 0.85);
- --theme-colors-chroma-900: calc(var(--theme-colors-chroma) * 0.7);
- --theme-colors-chroma-950: calc(var(--theme-colors-chroma) * 0.5);
-}
diff --git a/packages/drizzle-duckdb-wasm/playground/src/types/memory/emotional-memory.ts b/packages/drizzle-duckdb-wasm/playground/src/types/memory/emotional-memory.ts
deleted file mode 100644
index 9f4080c45..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/types/memory/emotional-memory.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-export interface EmotionalMemoryItem {
- // Basic memory properties
- id: string
- score: number
- decayed_score: number
- updated_at: string
- last_retrieved_at: string
- retrieval_count: number
-
- // Emotional components
- joy_score: number
- aversion_score: number
-
- // Timing information
- updated_at_str?: string
- last_retrieved_str?: string
- age_in_seconds: number
- time_since_retrieval: number
-
- // Memory status factors
- ltm_factor?: number // Long-term memory factor (0-1)
-
- // Optional calculated components for display
- age_in_days?: number
- effective_score?: number
-}
-
-export interface EmotionalRetrievalModifiers {
- joyModifier: number
- aversionModifier: number
-}
diff --git a/packages/drizzle-duckdb-wasm/playground/src/types/memory/memory-decay.ts b/packages/drizzle-duckdb-wasm/playground/src/types/memory/memory-decay.ts
deleted file mode 100644
index 488db9e01..000000000
--- a/packages/drizzle-duckdb-wasm/playground/src/types/memory/memory-decay.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-export interface MemoryItem {
- id: string
- score: number
- updated_at: string // ISO timestamp
- last_retrieved_at: string // ISO timestamp
- retrieval_count: number
- updated_at_str: string
- last_retrieved_str: string
- age_in_seconds: number
- time_since_retrieval: number
- ltm_factor?: number // Optional since it's only present when longTermMemoryEnabled is true
- decayed_score: number
-}
diff --git a/packages/drizzle-duckdb-wasm/src/bundles/default-browser.ts b/packages/drizzle-duckdb-wasm/src/bundles/default-browser.ts
deleted file mode 100644
index 35335f3d9..000000000
--- a/packages/drizzle-duckdb-wasm/src/bundles/default-browser.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { getBundles } from '@proj-airi/duckdb-wasm/bundles/default-browser'
diff --git a/packages/drizzle-duckdb-wasm/src/bundles/default-node.ts b/packages/drizzle-duckdb-wasm/src/bundles/default-node.ts
deleted file mode 100644
index 1696066c8..000000000
--- a/packages/drizzle-duckdb-wasm/src/bundles/default-node.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { getBundles } from '@proj-airi/duckdb-wasm/bundles/default-node'
diff --git a/packages/drizzle-duckdb-wasm/src/bundles/import-url-browser.ts b/packages/drizzle-duckdb-wasm/src/bundles/import-url-browser.ts
deleted file mode 100644
index 154535ad5..000000000
--- a/packages/drizzle-duckdb-wasm/src/bundles/import-url-browser.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { getImportUrlBundles } from '@proj-airi/duckdb-wasm/bundles/import-url-browser'
diff --git a/packages/drizzle-duckdb-wasm/src/bundles/import-url-node.ts b/packages/drizzle-duckdb-wasm/src/bundles/import-url-node.ts
deleted file mode 100644
index 34fe46c4e..000000000
--- a/packages/drizzle-duckdb-wasm/src/bundles/import-url-node.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { getImportUrlBundles } from '@proj-airi/duckdb-wasm/bundles/import-url-node'
diff --git a/packages/drizzle-duckdb-wasm/src/driver.browser.test.ts b/packages/drizzle-duckdb-wasm/src/driver.browser.test.ts
deleted file mode 100644
index fbf1dcbef..000000000
--- a/packages/drizzle-duckdb-wasm/src/driver.browser.test.ts
+++ /dev/null
@@ -1,231 +0,0 @@
-import { DuckDBAccessMode } from '@duckdb/duckdb-wasm'
-import { DBStorageType } from '@proj-airi/duckdb-wasm'
-import { afterAll, beforeAll, describe, expect, it, onTestFinished } from 'vitest'
-
-import { drizzle } from '.'
-import { getImportUrlBundles } from './bundles/import-url-browser'
-
-describe('drizzle with duckdb wasm in browser', { timeout: 10000 }, async () => {
- beforeAll(async () => {
- const opfsRoot = await navigator.storage.getDirectory()
- for await (const name of opfsRoot.keys()) {
- if (name.startsWith('drizzle_test_')) {
- await opfsRoot.removeEntry(name)
- }
- }
- })
-
- afterAll(async () => {
- const opfsRoot = await navigator.storage.getDirectory()
- for await (const name of opfsRoot.keys()) {
- if (name.startsWith('drizzle_test_')) {
- await opfsRoot.removeEntry(name)
- }
- }
- })
-
- it('should have navigator.storage.getDirectory', async () => {
- const getDirectory = navigator.storage?.getDirectory
- expect(typeof getDirectory).toBe('function')
- })
-
- it('should connect to an in-memory DuckDB WASM database', async () => {
- const db = drizzle({ connection: { bundles: getImportUrlBundles() } })
- const res = await db.execute('SELECT count(*)::INTEGER as v FROM generate_series(0, 100) t(v)')
- expect(res).toBeDefined()
- expect(res).toEqual([{ v: 101 }])
- })
-
- // TODO: Enable this test when DuckDB no longer creates files in read-only mode
- it.skip('should fail to open a non-existent OPFS database', async () => {
- const db = drizzle({
- connection: {
- bundles: getImportUrlBundles(),
- storage: {
- type: DBStorageType.ORIGIN_PRIVATE_FS,
- path: 'drizzle_test_non_existent',
- accessMode: DuckDBAccessMode.READ_ONLY,
- },
- },
- })
- // No need to close as the DB will fail to open
-
- await expect(db.$client).rejects.toThrow(/file or directory could not be found/)
-
- const opfsRoot = await navigator.storage.getDirectory()
- const nonExistentFileHandle = opfsRoot.getFileHandle('drizzle_test_non_existent', { create: false })
- await expect(nonExistentFileHandle).rejects.toThrow(/file or directory could not be found/)
- })
-
- it('should create and open an OPFS database', async () => {
- const path = `drizzle_test_${crypto.randomUUID().replace(/-/g, '')}`
-
- const db = drizzle({
- connection: {
- bundles: getImportUrlBundles(),
- storage: {
- type: DBStorageType.ORIGIN_PRIVATE_FS,
- path: `${path}`,
- accessMode: DuckDBAccessMode.READ_WRITE,
- },
- },
- })
- onTestFinished(async () => (await db.$client).close())
-
- await expect(db.$client).resolves.toBeDefined()
- })
-
- it('should not create an OPFS database with an empty path', async () => {
- const db = drizzle({
- connection: {
- bundles: getImportUrlBundles(),
- storage: {
- type: DBStorageType.ORIGIN_PRIVATE_FS,
- path: '',
- accessMode: DuckDBAccessMode.READ_WRITE,
- },
- },
- })
- // No need to close as the DB will fail to open
-
- await expect(db.$client).rejects.toThrow(/Name is not allowed/)
- })
-
- it('should not create an OPFS database with an invalid path', async () => {
- const path = `//drizzle_test_${crypto.randomUUID().replace(/-/g, '')}`
-
- const db = drizzle({
- connection: {
- bundles: getImportUrlBundles(),
- storage: {
- type: DBStorageType.ORIGIN_PRIVATE_FS,
- path: `${path}`,
- accessMode: DuckDBAccessMode.READ_WRITE,
- },
- },
- })
- // No need to close as the DB will fail to open
-
- await expect(db.$client).rejects.toThrow(/Name is not allowed/)
- })
-
- it('should open, update, save, and reload an OPFS database', async () => {
- const path = `drizzle_test_${crypto.randomUUID().replace(/-/g, '')}`
-
- const db1 = drizzle({
- connection: {
- bundles: getImportUrlBundles(),
- storage: {
- type: DBStorageType.ORIGIN_PRIVATE_FS,
- path: `${path}`,
- accessMode: DuckDBAccessMode.READ_WRITE,
- },
- },
- })
- onTestFinished(async () => (await db1.$client).close())
-
- await expect(db1.$client).resolves.toBeDefined()
- expect(await db1.execute('SHOW TABLES')).toEqual([])
-
- await expect(db1.execute('CREATE TABLE test (v INTEGER)')).resolves.toBeDefined()
- await expect(db1.execute('INSERT INTO test VALUES (1), (2), (3)')).resolves.toBeDefined()
-
- expect(await db1.execute('SELECT * FROM test')).toEqual([{ v: 1 }, { v: 2 }, { v: 3 }])
-
- await expect(db1.execute('CHECKPOINT')).resolves.toBeDefined()
-
- await expect((await db1.$client).close()).resolves.toBeUndefined()
-
- const db2 = drizzle({
- connection: {
- bundles: getImportUrlBundles(),
- storage: {
- type: DBStorageType.ORIGIN_PRIVATE_FS,
- path: `${path}`,
- accessMode: DuckDBAccessMode.READ_ONLY,
- },
- },
- })
- onTestFinished(async () => (await db2.$client).close())
-
- expect(await db2.execute('SHOW TABLES')).toEqual([{ name: 'test' }])
- expect(await db2.execute('SELECT * FROM test')).toEqual([{ v: 1 }, { v: 2 }, { v: 3 }])
- })
-
- it('should create open the same OPFS database with or without a leading slash', async () => {
- const path = `drizzle_test_${crypto.randomUUID().replace(/-/g, '')}`
-
- const db1 = drizzle({
- connection: {
- bundles: getImportUrlBundles(),
- storage: {
- type: DBStorageType.ORIGIN_PRIVATE_FS,
- path: `${path}`,
- accessMode: DuckDBAccessMode.READ_WRITE,
- },
- },
- })
- onTestFinished(async () => (await db1.$client).close())
-
- await expect(db1.$client).resolves.toBeDefined()
- expect(await db1.execute('SHOW TABLES')).toEqual([])
-
- await expect(db1.execute('CREATE TABLE test (v INTEGER)')).resolves.toBeDefined()
- await expect(db1.execute('INSERT INTO test VALUES (1), (2), (3)')).resolves.toBeDefined()
-
- expect(await db1.execute('SELECT * FROM test')).toEqual([{ v: 1 }, { v: 2 }, { v: 3 }])
-
- await expect(db1.execute('CHECKPOINT')).resolves.toBeDefined()
-
- await expect((await db1.$client).close()).resolves.toBeUndefined()
-
- const db2 = drizzle({
- connection: {
- bundles: getImportUrlBundles(),
- storage: {
- type: DBStorageType.ORIGIN_PRIVATE_FS,
- path: `/${path}`,
- accessMode: DuckDBAccessMode.READ_ONLY,
- },
- },
- })
- onTestFinished(async () => (await db2.$client).close())
-
- expect(await db2.execute('SHOW TABLES')).toEqual([{ name: 'test' }])
- expect(await db2.execute('SELECT * FROM test')).toEqual([{ v: 1 }, { v: 2 }, { v: 3 }])
- })
-
- it('should create, open, update, save, and reload an OPFS database with DSN', async () => {
- const path = `drizzle_test_${crypto.randomUUID().replace(/-/g, '')}`
- const dsn = `duckdb-wasm:///${path}?bundles=import-url&storage=origin-private-fs&write=true`
-
- const db1 = drizzle(dsn)
- onTestFinished(async () => (await db1.$client).close())
-
- await expect(db1.$client).resolves.toBeDefined()
- expect(await db1.execute('SHOW TABLES')).toEqual([])
-
- await expect(db1.execute('CREATE TABLE test (v INTEGER)')).resolves.toBeDefined()
- await expect(db1.execute('INSERT INTO test VALUES (1), (2), (3)')).resolves.toBeDefined()
-
- expect(await db1.execute('SELECT * FROM test')).toEqual([{ v: 1 }, { v: 2 }, { v: 3 }])
-
- await expect(db1.execute('CHECKPOINT')).resolves.toBeDefined()
-
- await expect((await db1.$client).close()).resolves.toBeUndefined()
-
- const db2 = drizzle(dsn)
- onTestFinished(async () => (await db2.$client).close())
-
- expect(await db2.execute('SHOW TABLES')).toEqual([{ name: 'test' }])
- expect(await db2.execute('SELECT * FROM test')).toEqual([{ v: 1 }, { v: 2 }, { v: 3 }])
- })
-
- it('should create a table with a float array column', async () => {
- const db = drizzle({ connection: { bundles: getImportUrlBundles() } })
- await db.execute('CREATE TABLE test (v FLOAT[26880], v2 text)')
- await db.execute('INSERT INTO test VALUES (1, 2, 3, 4, "test")')
- const res = await db.execute('SELECT * FROM test')
- expect(res).toEqual([{ v: [1, 2, 3, 4], v2: 'test' }])
- })
-})
diff --git a/packages/drizzle-duckdb-wasm/src/driver.test.ts b/packages/drizzle-duckdb-wasm/src/driver.test.ts
deleted file mode 100644
index fc9af60ea..000000000
--- a/packages/drizzle-duckdb-wasm/src/driver.test.ts
+++ /dev/null
@@ -1,115 +0,0 @@
-import type { DBNodeFS } from '@proj-airi/duckdb-wasm'
-
-import { randomUUID } from 'node:crypto'
-import { readdir, unlink } from 'node:fs/promises'
-import { tmpdir } from 'node:os'
-import path from 'node:path'
-import { DuckDBAccessMode } from '@duckdb/duckdb-wasm'
-import { DBStorageType } from '@proj-airi/duckdb-wasm'
-import { getBundles } from '@proj-airi/duckdb-wasm/bundles/default-node'
-import { afterAll, beforeAll, describe, expect, it, onTestFinished } from 'vitest'
-
-import { drizzle } from '.'
-
-describe('drizzle with duckdb wasm in node', { timeout: 10000 }, async () => {
- beforeAll(async () => {
- const tmp = tmpdir()
- await Promise.all(
- (await readdir(tmp)).reduce[]>((tasks, filename) => {
- if (filename.startsWith('drizzle_test_')) {
- tasks.push(unlink(path.join(tmp, filename)))
- }
- return tasks
- }, []),
- )
- })
-
- afterAll(async () => {
- const tmp = tmpdir()
- await Promise.all(
- (await readdir(tmp)).reduce[]>((tasks, filename) => {
- if (filename.startsWith('drizzle_test_')) {
- tasks.push(unlink(path.join(tmp, filename)))
- }
- return tasks
- }, []),
- )
- })
-
- it('should connect to an in-memory DuckDB WASM database', async () => {
- const db = drizzle({ connection: { bundles: getBundles() } })
- const res = await db.execute('SELECT count(*)::INTEGER as v FROM generate_series(0, 100) t(v)')
- expect(res).toBeDefined()
- expect(res).toEqual([{ v: 101 }])
- })
-
- it('should open a DuckDB WASM database in Node FS', async () => {
- const tmp = tmpdir()
- const filename = `drizzle_test_${randomUUID().replace(/-/g, '')}`
-
- const db = drizzle({
- connection: {
- bundles: getBundles(),
- storage: {
- type: DBStorageType.NODE_FS,
- path: path.resolve(tmp, filename),
- accessMode: DuckDBAccessMode.READ_WRITE,
- } as DBNodeFS,
- },
- })
-
- await expect(db.$client).resolves.toBeDefined()
- })
-
- it('should open, update, save, and reload an OPFS database', async () => {
- const tmp = tmpdir()
- const filename = `drizzle_test_${randomUUID().replace(/-/g, '')}`
-
- const db1 = drizzle({
- connection: {
- bundles: getBundles(),
- storage: {
- type: DBStorageType.NODE_FS,
- path: path.resolve(tmp, filename),
- accessMode: DuckDBAccessMode.READ_WRITE,
- },
- },
- })
- onTestFinished(async () => (await db1.$client).close())
-
- await expect(db1.$client).resolves.toBeDefined()
- expect(await db1.execute('SHOW TABLES')).toEqual([])
-
- await expect(db1.execute('CREATE TABLE test (v INTEGER)')).resolves.toBeDefined()
- await expect(db1.execute('INSERT INTO test VALUES (1), (2), (3)')).resolves.toBeDefined()
-
- expect(await db1.execute('SELECT * FROM test')).toEqual([{ v: 1 }, { v: 2 }, { v: 3 }])
-
- await expect(db1.execute('CHECKPOINT')).resolves.toBeDefined()
-
- await expect((await db1.$client).close()).resolves.toBeUndefined()
-
- const db2 = drizzle({
- connection: {
- bundles: getBundles(),
- storage: {
- type: DBStorageType.NODE_FS,
- path: path.resolve(tmp, filename),
- accessMode: DuckDBAccessMode.READ_ONLY,
- },
- },
- })
- onTestFinished(async () => (await db2.$client).close())
-
- expect(await db2.execute('SHOW TABLES')).toEqual([{ name: 'test' }])
- expect(await db2.execute('SELECT * FROM test')).toEqual([{ v: 1 }, { v: 2 }, { v: 3 }])
- })
-
- it('should create a table with a float array column', async () => {
- const db = drizzle({ connection: { bundles: getBundles() } })
- await db.execute('CREATE TABLE vector_test_table (v FLOAT[26880], v2 text)')
- await db.execute(`INSERT INTO vector_test_table VALUES (${JSON.stringify(Array.from({ length: 26880 }).fill(1))}, 'text')`)
- const res = await db.execute('SELECT * FROM vector_test_table')
- expect(res).toEqual([{ v: Array.from({ length: 26880 }).fill(1), v2: 'text' }])
- })
-})
diff --git a/packages/drizzle-duckdb-wasm/src/driver.ts b/packages/drizzle-duckdb-wasm/src/driver.ts
deleted file mode 100644
index 5f6189750..000000000
--- a/packages/drizzle-duckdb-wasm/src/driver.ts
+++ /dev/null
@@ -1,153 +0,0 @@
-import type { DuckDBBundles } from '@duckdb/duckdb-wasm'
-import type { ConnectOptions, DuckDBWasmClient } from '@proj-airi/duckdb-wasm'
-import type { DrizzleConfig, RelationalSchemaConfig, TablesRelationalConfig } from 'drizzle-orm'
-import type { DuckDBWasmQueryResultHKT } from './session'
-
-import { ConsoleLogger } from '@duckdb/duckdb-wasm'
-import { connect, getEnvironment } from '@proj-airi/duckdb-wasm'
-import { createTableRelationsHelpers, DefaultLogger, entityKind, extractTablesRelationalConfig, isConfig } from 'drizzle-orm'
-import { PgDatabase, PgDialect } from 'drizzle-orm/pg-core'
-
-import { parseDSN } from './dsn'
-import { DuckDBWasmSession } from './session'
-
-export class DuckDBWasmDatabase<
- TSchema extends Record = Record,
-> extends PgDatabase {
- static override readonly [entityKind]: string = 'DuckDBWasmDatabase'
-}
-
-function construct<
- TSchema extends Record = Record,
- TClient extends Promise = Promise,
->(
- client: Promise,
- config: DrizzleConfig = {},
-): DuckDBWasmDrizzleDatabase {
- const dialect = new PgDialect({ casing: config.casing })
- let logger
- if (config.logger === true) {
- logger = new DefaultLogger()
- }
- else if (config.logger !== false) {
- logger = config.logger
- }
-
- let schema: RelationalSchemaConfig | undefined
- if (config.schema) {
- const tablesConfig = extractTablesRelationalConfig(
- config.schema,
- createTableRelationsHelpers,
- )
- schema = {
- fullSchema: config.schema,
- schema: tablesConfig.tables,
- tableNamesMap: tablesConfig.tableNamesMap,
- }
- }
-
- const session = new DuckDBWasmSession(client, dialect, schema, { logger })
- const db = new DuckDBWasmDatabase(dialect, session, schema as any) as DuckDBWasmDatabase;
- (db).$client = client
-
- return db as any
-}
-
-export interface DuckDBWasmDrizzleDatabase<
- TSchema extends Record = Record,
- TClient extends Promise = Promise,
-> extends DuckDBWasmDatabase {
- $client: TClient
-}
-
-async function getBundles(importUrl = false): Promise {
- const env = await getEnvironment()
- switch (env) {
- case 'browser':
- return importUrl
- ? (await import('@proj-airi/duckdb-wasm/bundles/import-url-browser')).getImportUrlBundles()
- : (await import('@proj-airi/duckdb-wasm/bundles/default-browser')).getBundles()
- case 'node':
- return importUrl
- ? await (await import('@proj-airi/duckdb-wasm/bundles/import-url-node')).getImportUrlBundles()
- : await (await import('@proj-airi/duckdb-wasm/bundles/default-node')).getBundles()
- default:
- throw new Error(`Unsupported environment: "${env}"`)
- }
-}
-
-function constructByDSN<
- TSchema extends Record = Record,
->(
- dsn: string,
- drizzleConfig?: DrizzleConfig,
-): DuckDBWasmDrizzleDatabase> {
- const structured = parseDSN(dsn)
-
- return construct(connect({
- bundles: getBundles(structured.bundles === 'import-url'),
- logger: structured.logger ? new ConsoleLogger() : undefined,
- storage: structured.storage,
- }), drizzleConfig) as any
-}
-
-export function drizzle<
- TSchema extends Record = Record,
- TClient extends Promise = Promise,
->(
- ...params:
- | [{ connection: string | ConnectOptions }]
- | [{ connection: string | ConnectOptions }, DrizzleConfig]
- | [{ client: TClient }]
- | [{ client: TClient }, DrizzleConfig]
- | [ TClient | string ]
- | [ TClient | string, DrizzleConfig ]
-): DuckDBWasmDrizzleDatabase {
- if (typeof params[0] === 'string') {
- return constructByDSN(params[0] as string, params[1]) as any
- }
-
- if (isConfig(params[0])) {
- const {
- connection,
- client,
- ...drizzleConfig
- } = params[0] as {
- connection?: string | ConnectOptions // a DSN or a ConnectOptions object
- client?: TClient
- } & DrizzleConfig
-
- if (client)
- return construct(client, drizzleConfig) as any
-
- if (typeof connection === 'string')
- return constructByDSN(connection, drizzleConfig) as any
-
- if (typeof connection === 'undefined')
- throw new Error('connection option is required')
-
- return construct(connect({
- bundles: connection.bundles,
- logger: connection.logger,
- storage: connection.storage,
- }), drizzleConfig) as any
- }
-
- return construct(params[0] as TClient, params[1] as DrizzleConfig | undefined) as any
-}
-
-// eslint-disable-next-line ts/no-namespace
-export namespace drizzle {
- export function mock = Record>(
- config?: DrizzleConfig,
- ): DuckDBWasmDatabase & {
- $client: '$client is not available on drizzle.mock()'
- } {
- return construct({
- options: {
- parsers: {},
- serializers: {},
- },
- } as any, config) as any
- }
-}
diff --git a/packages/drizzle-duckdb-wasm/src/dsn.test.ts b/packages/drizzle-duckdb-wasm/src/dsn.test.ts
deleted file mode 100644
index a229da982..000000000
--- a/packages/drizzle-duckdb-wasm/src/dsn.test.ts
+++ /dev/null
@@ -1,142 +0,0 @@
-import type { DBOriginPrivateFS } from '@proj-airi/duckdb-wasm'
-import type { StructuredDSN } from './dsn'
-
-import { DuckDBAccessMode } from '@duckdb/duckdb-wasm'
-import { DBStorageType } from '@proj-airi/duckdb-wasm'
-import { describe, expect, it } from 'vitest'
-
-import { buildDSN, parseDSN } from './dsn'
-import { spyConsoleWarn } from './test-utils'
-
-describe('parseDSN', { timeout: 10000 }, async () => {
- it('should fail with non-duckdb-wasm protocol', async () => {
- const dsn = 'random-db:///database.db'
-
- expect(() => parseDSN(dsn)).toThrow('Expected scheme to be "duckdb-wasm:" but got "random-db:"')
- })
-
- it('should parse OPFS with path', async () => {
- const dsn = 'duckdb-wasm:///path/to/database.db?storage=origin-private-fs'
-
- let structured: StructuredDSN
- expect(() => structured = parseDSN(dsn)).not.toThrow()
- expect(structured).toEqual({
- scheme: 'duckdb-wasm:',
- storage: {
- type: DBStorageType.ORIGIN_PRIVATE_FS,
- path: 'path/to/database.db',
- } as DBOriginPrivateFS,
- })
- })
-
- it('should parse OPFS with missing leading slash', async () => {
- const consoleWarnMock = spyConsoleWarn()
-
- const dsn = 'duckdb-wasm://path/to/database.db?storage=origin-private-fs'
- // ^~~~~ missing leading slash: this will be parsed as host/hostname
-
- let structured: StructuredDSN
- expect(() => structured = parseDSN(dsn)).not.toThrow()
- expect(structured).toEqual({
- scheme: 'duckdb-wasm:',
- storage: {
- type: DBStorageType.ORIGIN_PRIVATE_FS,
- path: 'to/database.db',
- } as DBOriginPrivateFS,
- })
-
- expect(consoleWarnMock).toHaveBeenCalledTimes(1)
- expect(consoleWarnMock).toHaveBeenCalledWith('Host "path" will be ignored while using Origin Private FS')
- })
-
- it('should parse OPFS with path and (write = true)', async () => {
- const dsn = 'duckdb-wasm:///path/to/database.db?storage=origin-private-fs&write=true'
-
- const structured = parseDSN(dsn)
- expect(structured).toEqual({
- scheme: 'duckdb-wasm:',
- storage: {
- type: DBStorageType.ORIGIN_PRIVATE_FS,
- path: 'path/to/database.db',
- accessMode: DuckDBAccessMode.READ_WRITE,
- } as DBOriginPrivateFS,
- })
- })
-
- it('should parse OPFS with path and (write = false)', async () => {
- const dsn = 'duckdb-wasm:///path/to/database.db?storage=origin-private-fs&write=false'
-
- const structured = parseDSN(dsn)
- expect(structured).toEqual({
- scheme: 'duckdb-wasm:',
- storage: {
- type: DBStorageType.ORIGIN_PRIVATE_FS,
- path: 'path/to/database.db',
- } as DBOriginPrivateFS,
- })
- })
-})
-
-describe('buildDSN', { timeout: 10000 }, async () => {
- it('should build DSN with OPFS (ro)', async () => {
- const structured: StructuredDSN = {
- scheme: 'duckdb-wasm:',
- bundles: 'import-url',
- storage: {
- type: DBStorageType.ORIGIN_PRIVATE_FS,
- path: 'path/to/database.db',
- } as DBOriginPrivateFS,
- }
-
- let url: URL
- expect(() => url = new URL(buildDSN(structured))).not.toThrow()
- expect(url.protocol).toBe('duckdb-wasm:')
- expect(url.host).toBe('')
- expect(url.pathname).toBe('/path/to/database.db')
- expect(url.searchParams.get('storage')).toBe(DBStorageType.ORIGIN_PRIVATE_FS)
- expect(url.searchParams.get('write')).toBeNull()
- expect(url.searchParams.get('bundles')).toBe('import-url')
- })
-
- it('should build DSN with OPFS (rw)', async () => {
- const structured: StructuredDSN = {
- scheme: 'duckdb-wasm:',
- bundles: 'import-url',
- storage: {
- type: DBStorageType.ORIGIN_PRIVATE_FS,
- path: 'path/to/database.db',
- accessMode: DuckDBAccessMode.READ_WRITE,
- } as DBOriginPrivateFS,
- }
-
- let url: URL
- expect(() => url = new URL(buildDSN(structured))).not.toThrow()
- expect(url.protocol).toBe('duckdb-wasm:')
- expect(url.host).toBe('')
- expect(url.pathname).toBe('/path/to/database.db')
- expect(url.searchParams.get('storage')).toBe(DBStorageType.ORIGIN_PRIVATE_FS)
- expect(url.searchParams.get('write')).toBe('true')
- expect(url.searchParams.get('bundles')).toBe('import-url')
- })
-
- it('should build the same DSN with OPFS but with a leading slash in the path', async () => {
- const structured: StructuredDSN = {
- scheme: 'duckdb-wasm:',
- bundles: 'import-url',
- storage: {
- type: DBStorageType.ORIGIN_PRIVATE_FS,
- path: '/path/to/database.db',
- accessMode: DuckDBAccessMode.READ_WRITE,
- } as DBOriginPrivateFS,
- }
-
- let url: URL
- expect(() => url = new URL(buildDSN(structured))).not.toThrow()
- expect(url.protocol).toBe('duckdb-wasm:')
- expect(url.host).toBe('')
- expect(url.pathname).toBe('/path/to/database.db')
- expect(url.searchParams.get('storage')).toBe(DBStorageType.ORIGIN_PRIVATE_FS)
- expect(url.searchParams.get('write')).toBe('true')
- expect(url.searchParams.get('bundles')).toBe('import-url')
- })
-})
diff --git a/packages/drizzle-duckdb-wasm/src/dsn.ts b/packages/drizzle-duckdb-wasm/src/dsn.ts
deleted file mode 100644
index c93462655..000000000
--- a/packages/drizzle-duckdb-wasm/src/dsn.ts
+++ /dev/null
@@ -1,118 +0,0 @@
-import type { DBStorage } from '@proj-airi/duckdb-wasm'
-
-import { DuckDBAccessMode } from '@duckdb/duckdb-wasm'
-import { DBStorageType } from '@proj-airi/duckdb-wasm'
-
-export interface StructuredDSN {
- scheme: 'duckdb-wasm:'
- bundles?: 'import-url'
- logger?: boolean
- storage?: DBStorage
-}
-
-export function isLiterallyTrue(value?: string): boolean {
- return typeof value === 'string' && /^true$/i.test(value)
-}
-
-/**
- * Parse a DuckDB WASM DSN string into a structured object
- *
- * Examples:
- * - `duckdb-wasm:///` -> In-memory
- * - `duckdb-wasm:///?bundles=import-url` -> In-memory, use import-URL bundles
- * - `duckdb-wasm:///?logger=true` -> In-memory, enable logger
- * - `duckdb-wasm://database.db?storage=origin-private-fs&write=true` -> Origin Private FS, RW, database.db
- * - `duckdb-wasm:///database.db?storage=origin-private-fs&write=true` -> Origin Private FS, RW, database.db (leading slash is optional)
- *
- * @param dsn The DSN string to parse
- */
-export function parseDSN(dsn: string): StructuredDSN {
- const structured: StructuredDSN = {
- scheme: 'duckdb-wasm:',
- }
-
- const parsed = new URL(dsn)
-
- // The protocol in the URL maps to the scheme in the DSN (URI)
- // See: https://developer.mozilla.org/en-US/docs/Web/API/URL/protocol
- if (!parsed.protocol.startsWith('duckdb-wasm:')) {
- throw new Error(`Expected scheme to be "duckdb-wasm:" but got "${parsed.protocol}"`)
- }
-
- if (parsed.searchParams.get('bundles') === 'import-url') {
- structured.bundles = 'import-url'
- }
-
- const paramLogger = parsed.searchParams.get('logger')
- if (paramLogger && isLiterallyTrue(paramLogger)) {
- structured.logger = true
- }
-
- const paramStorage = parsed.searchParams.get('storage')
- switch (paramStorage) {
- case DBStorageType.ORIGIN_PRIVATE_FS: {
- if (parsed.host.length > 0) {
- console.warn(`Host "${parsed.host}" will be ignored while using Origin Private FS`)
- }
- const paramWrite = parsed.searchParams.get('write')
- structured.storage = {
- type: DBStorageType.ORIGIN_PRIVATE_FS,
- path: parsed.pathname.startsWith('/') ? parsed.pathname.slice(1) : parsed.pathname,
- ...(paramWrite && isLiterallyTrue(paramWrite) && {
- accessMode: DuckDBAccessMode.READ_WRITE,
- }),
- }
- break
- }
- case null:
- break
- default:
- console.warn(`Unknown storage type "${paramStorage}"`)
- break
- }
-
- return structured
-}
-
-/**
- * Build a DuckDB WASM DSN string from a structured DSN object
- *
- * @param structured The structured DSN object
- * @returns The DSN string
- */
-export function buildDSN(structured: StructuredDSN): string {
- const parsed = new URL('duckdb-wasm:///')
-
- if (structured.bundles === 'import-url') {
- parsed.searchParams.set('bundles', 'import-url')
- }
-
- if (structured.logger) {
- parsed.searchParams.set('logger', 'true')
- }
-
- if (structured.storage) {
- parsed.searchParams.set('storage', structured.storage.type)
-
- switch (structured.storage.type) {
- case DBStorageType.ORIGIN_PRIVATE_FS:
- parsed.pathname = structured.storage.path
- if (!parsed.pathname.startsWith('/')) {
- // To make the pathname pathname in the URL
- parsed.pathname = `/${parsed.pathname}`
- }
- if (structured.storage.accessMode === DuckDBAccessMode.READ_WRITE) {
- parsed.searchParams.set('write', 'true')
- }
- break
- case DBStorageType.NODE_FS:
- parsed.pathname = structured.storage.path
- if (structured.storage.accessMode === DuckDBAccessMode.READ_WRITE) {
- parsed.searchParams.set('write', 'true')
- }
- break
- }
- }
-
- return parsed.toString()
-}
diff --git a/packages/drizzle-duckdb-wasm/src/index.ts b/packages/drizzle-duckdb-wasm/src/index.ts
deleted file mode 100644
index a1af22376..000000000
--- a/packages/drizzle-duckdb-wasm/src/index.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export * from './driver'
-export * from './dsn'
-export * from './migrator'
-export * from './session'
-export type { AsyncDuckDBConnection, DuckDBBundles, Logger } from '@duckdb/duckdb-wasm'
-export { AsyncDuckDB, ConsoleLogger, getJsDelivrBundles, selectBundle, VoidLogger } from '@duckdb/duckdb-wasm'
-export type { ConnectOptionalOptions, ConnectOptions, ConnectRequiredOptions, DuckDBWasmClient } from '@proj-airi/duckdb-wasm'
-export { connect, mapColumnData } from '@proj-airi/duckdb-wasm'
diff --git a/packages/drizzle-duckdb-wasm/src/migrator.ts b/packages/drizzle-duckdb-wasm/src/migrator.ts
deleted file mode 100644
index 0a05102b9..000000000
--- a/packages/drizzle-duckdb-wasm/src/migrator.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import type { MigrationConfig } from 'drizzle-orm/migrator'
-import type { PgSession } from 'drizzle-orm/pg-core'
-import type { DuckDBWasmDatabase } from './driver'
-
-import { readMigrationFiles } from 'drizzle-orm/migrator'
-
-export async function migrate>(
- db: DuckDBWasmDatabase,
- config: MigrationConfig,
-) {
- const migrations = readMigrationFiles(config)
- await (db as any).dialect.migrate(migrations, (db as any).session as unknown as PgSession, config)
-}
diff --git a/packages/drizzle-duckdb-wasm/src/session.ts b/packages/drizzle-duckdb-wasm/src/session.ts
deleted file mode 100644
index b768cbc30..000000000
--- a/packages/drizzle-duckdb-wasm/src/session.ts
+++ /dev/null
@@ -1,164 +0,0 @@
-import type { DuckDBWasmClient } from '@proj-airi/duckdb-wasm'
-import type { Assume, Logger, Query, RelationalSchemaConfig, TablesRelationalConfig } from 'drizzle-orm'
-import type { PgDialect, PgQueryResultHKT, PgTransactionConfig, PreparedQueryConfig, SelectedFieldsOrdered } from 'drizzle-orm/pg-core'
-
-import { beginTransaction, withSavepoint } from '@proj-airi/duckdb-wasm'
-import { entityKind, fillPlaceholders, NoopLogger } from 'drizzle-orm'
-import { PgPreparedQuery, PgSession, PgTransaction } from 'drizzle-orm/pg-core'
-
-export type Row = Record
-
-export type RowList = T
-
-export class DuckDBWASMPreparedQuery extends PgPreparedQuery {
- static override readonly [entityKind]: string = 'DuckDBWasmPreparedQuery'
-
- constructor(
- private client: Promise,
- private queryString: string,
- private params: unknown[],
- private logger: Logger,
- private fields: SelectedFieldsOrdered | undefined,
- private customResultMapper?: (rows: unknown[][]) => T['execute'],
- ) {
- super({ sql: queryString, params })
- }
-
- async execute(placeholderValues: Record | undefined = {}): Promise {
- const params = fillPlaceholders(this.params, placeholderValues)
- this.logger.logQuery(this.queryString, params)
-
- const { fields, queryString: query, client, customResultMapper } = this
- const c = await client
-
- if (!fields && !customResultMapper) {
- return c.query(query, params)
- }
-
- return c.query(query, params)
- }
-
- async all(placeholderValues: Record | undefined = {}): Promise {
- const params = fillPlaceholders(this.params, placeholderValues)
- this.logger.logQuery(this.queryString, params)
-
- const c = await this.client
- return c.query(this.queryString, params)
- }
-}
-
-export interface DuckDBWASMSessionOptions {
- logger?: Logger
-}
-
-export class DuckDBWasmSession<
- TSQL extends Promise,
- TFullSchema extends Record,
- TSchema extends TablesRelationalConfig,
-> extends PgSession {
- static override readonly [entityKind]: string = 'DuckDBWasmSession'
-
- logger: Logger
-
- constructor(
- public client: TSQL,
- dialect: PgDialect,
- private schema: RelationalSchemaConfig | undefined,
- readonly options: DuckDBWASMSessionOptions = {},
- ) {
- super(dialect)
- this.logger = options.logger ?? new NoopLogger()
- }
-
- prepareQuery(
- query: Query,
- fields: SelectedFieldsOrdered | undefined,
- _name: string | undefined,
- _isResponseInArrayMode: boolean,
- customResultMapper?: (rows: unknown[][]) => T['execute'],
- ): PgPreparedQuery {
- return new DuckDBWASMPreparedQuery(
- this.client,
- query.sql,
- query.params,
- this.logger,
- fields,
- customResultMapper,
- )
- }
-
- async query(query: string, params: unknown[]): Promise> {
- this.logger.logQuery(query, params)
- const c = await this.client
- return c.query(query, params)
- }
-
- async queryObjects(
- query: string,
- params: unknown[],
- ): Promise> {
- this.logger.logQuery(query, params)
- const c = await this.client
- return c.query(query, params) as Promise>
- }
-
- override transaction(
- transaction: (tx: DuckDBWasmTransaction) => Promise,
- config?: PgTransactionConfig,
- ): Promise {
- return beginTransaction(this.client, async (client) => {
- const session = new DuckDBWasmSession, TFullSchema, TSchema>(
- client,
- this.dialect,
- this.schema,
- this.options,
- )
- const tx = new DuckDBWasmTransaction(this.dialect, session, this.schema)
- if (config) {
- await tx.setTransaction(config)
- }
-
- return transaction(tx)
- }) as Promise
- }
-}
-
-export class DuckDBWasmTransaction<
- TFullSchema extends Record,
- TSchema extends TablesRelationalConfig,
-> extends PgTransaction {
- static override readonly [entityKind]: string = 'DuckDBWasmTransaction'
- dialect: PgDialect
- session: DuckDBWasmSession, TFullSchema, TSchema>
-
- constructor(
- dialect: PgDialect,
- session: DuckDBWasmSession, TFullSchema, TSchema>,
- schema: RelationalSchemaConfig | undefined,
- nestedIndex = 0,
- ) {
- super(dialect, session, schema, nestedIndex)
- this.dialect = dialect
- this.session = session
- }
-
- override async transaction(
- transaction: (tx: DuckDBWasmTransaction) => Promise,
- ): Promise {
- return withSavepoint(this.session.client, '', async (client) => {
- const session = new DuckDBWasmSession, TFullSchema, TSchema>(
- client,
- this.dialect,
- this.schema,
- this.session.options,
- )
-
- const tx = new DuckDBWasmTransaction(this.dialect, session, this.schema)
- return transaction(tx)
- }) as Promise
- }
-}
-
-export interface DuckDBWasmQueryResultHKT extends PgQueryResultHKT {
- type: RowList[]>
-}
diff --git a/packages/drizzle-duckdb-wasm/src/test-utils.ts b/packages/drizzle-duckdb-wasm/src/test-utils.ts
deleted file mode 100644
index 91a315c8d..000000000
--- a/packages/drizzle-duckdb-wasm/src/test-utils.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { afterAll, vi } from 'vitest'
-
-export function spyConsoleWarn() {
- const hookedConsoleWarn = console.warn
- const consoleWarnMock = vi.spyOn(console, 'warn').mockImplementation(hookedConsoleWarn)
-
- afterAll(() => {
- consoleWarnMock.mockReset()
- })
-
- return consoleWarnMock
-}
diff --git a/packages/drizzle-duckdb-wasm/tsconfig.json b/packages/drizzle-duckdb-wasm/tsconfig.json
deleted file mode 100644
index f18d0b8c4..000000000
--- a/packages/drizzle-duckdb-wasm/tsconfig.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "compilerOptions": {
- "target": "ESNext",
- "lib": [
- "ESNext",
- "DOM",
- "DOM.Iterable",
- "DOM.AsyncIterable",
- "WebWorker"
- ],
- "module": "ESNext",
- "moduleResolution": "bundler",
- "paths": {
- "@proj-airi/duckdb-wasm/*": [
- "../duckdb-wasm/src/*"
- ],
- "@proj-airi/duckdb-wasm": [
- "../duckdb-wasm/src/index.ts"
- ]
- },
- "types": [
- "vite/client",
- "@vitest/browser/providers/playwright",
- "unplugin-vue-router/client"
- ],
- "esModuleInterop": true,
- "forceConsistentCasingInFileNames": true,
- "isolatedModules": true,
- "verbatimModuleSyntax": true,
- "skipLibCheck": true
- },
- "include": [
- "src/**/*.ts",
- "src/**/*.d.ts",
- "src/**/*.mts",
- "playground/**/*.ts",
- "playground/**/*.d.ts",
- "playground/**/*.mts",
- "playground/**/*.vue"
- ]
-}
diff --git a/packages/drizzle-duckdb-wasm/uno.config.ts b/packages/drizzle-duckdb-wasm/uno.config.ts
deleted file mode 100644
index a80859ddc..000000000
--- a/packages/drizzle-duckdb-wasm/uno.config.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import {
- defineConfig,
- presetAttributify,
- presetIcons,
- presetTypography,
- presetWebFonts,
- presetWind3,
- transformerDirectives,
- transformerVariantGroup,
-} from 'unocss'
-
-export default defineConfig({
- presets: [
- presetWind3(),
- presetAttributify(),
- presetTypography(),
- presetWebFonts({
- fonts: {
- sans: 'DM Sans',
- serif: 'DM Serif Display',
- mono: 'DM Mono',
- },
- }),
- presetIcons({
- scale: 1.2,
- }),
- ],
- transformers: [
- transformerDirectives(),
- transformerVariantGroup(),
- ],
- safelist: 'prose prose-sm m-auto text-left'.split(' '),
-})
diff --git a/packages/drizzle-duckdb-wasm/vite.config.ts b/packages/drizzle-duckdb-wasm/vite.config.ts
deleted file mode 100644
index c6f5182c7..000000000
--- a/packages/drizzle-duckdb-wasm/vite.config.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { resolve } from 'node:path'
-import Vue from '@vitejs/plugin-vue'
-import Unocss from 'unocss/vite'
-import VueRouter from 'unplugin-vue-router/vite'
-import { defineConfig } from 'vite'
-
-export default defineConfig({
- build: {
- outDir: resolve(import.meta.dirname, 'playground', 'dist'),
- },
- plugins: [
- // https://github.com/posva/unplugin-vue-router
- VueRouter({
- root: 'playground',
- extensions: ['.vue', '.md'],
- dts: resolve(import.meta.dirname, 'playground', 'src', 'typed-router.d.ts'),
- }),
- Vue(),
- // https://github.com/antfu/unocss
- // see uno.config.ts for config
- Unocss(),
- ],
-})
diff --git a/packages/drizzle-duckdb-wasm/vitest.config.ts b/packages/drizzle-duckdb-wasm/vitest.config.ts
deleted file mode 100644
index 1ff94a0af..000000000
--- a/packages/drizzle-duckdb-wasm/vitest.config.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import { defineConfig } from 'vitest/config'
-
-export default defineConfig({
- test: {
- workspace: [
- {
- extends: true,
- test: {
- name: 'node',
- environment: 'node',
- include: ['**/*.{spec,test}.ts'],
- exclude: ['**/*.browser.{spec,test}.ts', '**/node_modules/**'],
- },
- },
- {
- extends: true,
- test: {
- name: 'browser',
- include: ['**/*.browser.{spec,test}.ts'],
- exclude: ['**/node_modules/**'],
- browser: {
- enabled: true,
- provider: 'playwright',
- instances: [
- { browser: 'chromium' },
- ],
- },
- },
- },
- ],
- },
-})
diff --git a/packages/duckdb-wasm/README.md b/packages/duckdb-wasm/README.md
index cdc7e7ac4..8b3e0a8f8 100644
--- a/packages/duckdb-wasm/README.md
+++ b/packages/duckdb-wasm/README.md
@@ -1,68 +1,3 @@
-# Easy to use `@duckdb/duckdb-wasm` wrapper for both browser and Node.js environments
+# We have moved
-> [Playground](https://drizzle-orm-duckdb-wasm.netlify.app/)
-
-## Installation
-
-Pick the package manager of your choice:
-
-```shell
-ni @proj-airi/duckdb-wasm -D # from @antfu/ni, can be installed via `npm i -g @antfu/ni`
-pnpm i @proj-airi/duckdb-wasm -D
-yarn i @proj-airi/duckdb-wasm -D
-npm i @proj-airi/duckdb-wasm -D
-```
-
-## Usage
-
-### Browser
-
-```html
-
-```
-
-### Node.js
-
-You will need to install `web-worker` too.
-
-```shell
-ni web-worker # from @antfu/ni, can be installed via `npm i -g @antfu/ni`
-pnpm i web-worker
-yarn i web-worker
-npm i web-worker
-```
-
-```typescript
-import { connect, getEnvironment } from '@proj-airi/duckdb-wasm'
-import { getImportUrlBundles } from '@proj-airi/duckdb-wasm/bundles/default-node'
-
-async function main() {
- const { conn, close } = await connect({ bundles: getImportUrlBundles })
- const result = await conn.query('SELECT 1 + 1 AS res')
- console.log(result) // Output: [{ res: 2 }]
-
- await close()
-}
-```
-
-## Footnotes
-
-Check out the [Drizzle ORM driver](https://github.com/moeru-ai/airi/blob/main/packages/drizzle-duckdb-wasm/README.md) we made for `@duckdb/duckdb-wasm` as welL!
+Hello! This package has been moved to [proj-airi/duckdb-wasm](https://github.com/proj-airi/duckdb-wasm). You may keep tracking the updates of this package there.
diff --git a/packages/duckdb-wasm/package.json b/packages/duckdb-wasm/package.json
deleted file mode 100644
index 4a5c89513..000000000
--- a/packages/duckdb-wasm/package.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
- "name": "@proj-airi/duckdb-wasm",
- "type": "module",
- "version": "0.4.19",
- "description": "Easy to use @duckdb/duckdb-wasm wrapper for both browser and Node.js environments",
- "author": {
- "name": "Neko Ayaka",
- "email": "neko@ayaka.moe",
- "url": "https://github.com/nekomeowww"
- },
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "https://github.com/moeru-ai/airi.git",
- "directory": "packages/duckdb-wasm"
- },
- "exports": {
- ".": {
- "types": "./dist/index.d.ts",
- "import": "./dist/index.mjs",
- "node": "./dist/index.cjs"
- },
- "./bundles/default-browser": {
- "types": "./dist/bundles/default-browser.d.ts",
- "import": "./dist/bundles/default-browser.mjs"
- },
- "./bundles/default-node": {
- "types": "./dist/bundles/default-node.d.ts",
- "import": "./dist/bundles/default-node.mjs",
- "node": "./dist/bundles/default-node.cjs"
- },
- "./bundles/import-url-browser": {
- "types": "./dist/bundles/import-url-browser.d.ts",
- "import": "./dist/bundles/import-url-browser.mjs"
- },
- "./bundles/import-url-node": {
- "types": "./dist/bundles/import-url-node.d.ts",
- "import": "./dist/bundles/import-url-node.mjs",
- "node": "./dist/bundles/import-url-node.cjs"
- }
- },
- "main": "./dist/index.cjs",
- "module": "./dist/index.mjs",
- "types": "./dist/index.d.ts",
- "files": [
- "README.md",
- "dist",
- "package.json"
- ],
- "scripts": {
- "dev": "pnpm run stub",
- "stub": "unbuild",
- "build": "unbuild",
- "typecheck": "tsc --noEmit"
- },
- "peerDependencies": {
- "web-worker": "^1.5.0"
- },
- "peerDependenciesMeta": {
- "web-worker": {
- "optional": true
- }
- },
- "dependencies": {
- "@date-fns/tz": "^1.2.0",
- "@duckdb/duckdb-wasm": "1.29.1-dev68.0",
- "apache-arrow": "^19.0.1",
- "date-fns": "^4.1.0",
- "defu": "^6.1.4",
- "drizzle-orm": "^0.41.0",
- "es-toolkit": "^1.34.1"
- },
- "devDependencies": {
- "drizzle-kit": "^0.30.6"
- }
-}
diff --git a/packages/duckdb-wasm/src/bundles/default-browser.ts b/packages/duckdb-wasm/src/bundles/default-browser.ts
deleted file mode 100644
index 43113f61a..000000000
--- a/packages/duckdb-wasm/src/bundles/default-browser.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import type { DuckDBBundles } from '@duckdb/duckdb-wasm'
-
-export function getBundles(): DuckDBBundles {
- return {
- mvp: {
- mainModule: './duckdb-mvp.wasm',
- mainWorker: './duckdb-browser-mvp.worker.js',
- },
- eh: {
- mainModule: './duckdb-eh.wasm',
- mainWorker: './duckdb-browser-eh.worker.js',
- },
- coi: {
- mainModule: './duckdb-coi.wasm',
- mainWorker: './duckdb-browser-coi.worker.js',
- pthreadWorker: './duckdb-browser-coi.pthread.worker.js',
- },
- }
-}
diff --git a/packages/duckdb-wasm/src/bundles/default-node.ts b/packages/duckdb-wasm/src/bundles/default-node.ts
deleted file mode 100644
index 4b27c9864..000000000
--- a/packages/duckdb-wasm/src/bundles/default-node.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import type { DuckDBBundles } from '@duckdb/duckdb-wasm'
-
-export async function getBundles(): Promise {
- const { createRequire } = await import('node:module')
- const { dirname, resolve } = await import('node:path')
- const require = createRequire(import.meta.url)
- const DUCKDB_DIST = dirname(require.resolve('@duckdb/duckdb-wasm'))
-
- return {
- mvp: {
- mainModule: resolve(DUCKDB_DIST, './duckdb-mvp.wasm'),
- mainWorker: resolve(DUCKDB_DIST, './duckdb-node-mvp.worker.cjs'),
- },
- eh: {
- mainModule: resolve(DUCKDB_DIST, './duckdb-eh.wasm'),
- mainWorker: resolve(DUCKDB_DIST, './duckdb-node-eh.worker.cjs'),
- },
- }
-}
diff --git a/packages/duckdb-wasm/src/bundles/import-url-browser.ts b/packages/duckdb-wasm/src/bundles/import-url-browser.ts
deleted file mode 100644
index 3cd718f9f..000000000
--- a/packages/duckdb-wasm/src/bundles/import-url-browser.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/* eslint-disable perfectionist/sort-imports */
-import type { DuckDBBundles } from '@duckdb/duckdb-wasm'
-
-import ehMainWorker from '@duckdb/duckdb-wasm/dist/duckdb-browser-eh.worker.js?url'
-import ehMainModule from '@duckdb/duckdb-wasm/dist/duckdb-eh.wasm?url'
-import mvpMainWorker from '@duckdb/duckdb-wasm/dist/duckdb-browser-mvp.worker.js?url'
-import mvpMainModule from '@duckdb/duckdb-wasm/dist/duckdb-mvp.wasm?url'
-import coiMainModule from '@duckdb/duckdb-wasm/dist/duckdb-coi.wasm?url'
-import coiMainWorker from '@duckdb/duckdb-wasm/dist/duckdb-browser-coi.worker.js?url'
-import coiPthreadWorker from '@duckdb/duckdb-wasm/dist/duckdb-browser-coi.pthread.worker.js?url'
-
-export function getImportUrlBundles(): DuckDBBundles {
- return {
- mvp: {
- mainModule: mvpMainModule,
- mainWorker: mvpMainWorker,
- },
- eh: {
- mainModule: ehMainModule,
- mainWorker: ehMainWorker,
- },
- coi: {
- mainModule: coiMainModule,
- mainWorker: coiMainWorker,
- pthreadWorker: coiPthreadWorker,
- },
- }
-}
diff --git a/packages/duckdb-wasm/src/bundles/import-url-node.ts b/packages/duckdb-wasm/src/bundles/import-url-node.ts
deleted file mode 100644
index cd38a765c..000000000
--- a/packages/duckdb-wasm/src/bundles/import-url-node.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/* eslint-disable perfectionist/sort-imports */
-import type { DuckDBBundles } from '@duckdb/duckdb-wasm'
-
-import ehMainWorker from '@duckdb/duckdb-wasm/dist/duckdb-node-eh.worker.cjs?url'
-import ehMainModule from '@duckdb/duckdb-wasm/dist/duckdb-eh.wasm?url'
-import mvpMainWorker from '@duckdb/duckdb-wasm/dist/duckdb-node-mvp.worker.cjs?url'
-import mvpMainModule from '@duckdb/duckdb-wasm/dist/duckdb-mvp.wasm?url'
-
-function transformUrl(url: string) {
- if (url.startsWith('/@fs/')) {
- return url.replace('/@fs/', 'file://')
- }
-
- return url
-}
-
-export async function getImportUrlBundles(): Promise {
- return {
- mvp: {
- mainModule: transformUrl(mvpMainModule),
- mainWorker: transformUrl(mvpMainWorker),
- },
- eh: {
- mainModule: transformUrl(ehMainModule),
- mainWorker: transformUrl(ehMainWorker),
- },
- }
-}
diff --git a/packages/duckdb-wasm/src/common.ts b/packages/duckdb-wasm/src/common.ts
deleted file mode 100644
index 1605ecb8b..000000000
--- a/packages/duckdb-wasm/src/common.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * A type predicate that is true if the given value is either undefined
- * or null.
- */
-export function isNullOrUndefined(
- value: T | null | undefined,
-): value is null | undefined {
- return value === null || value === undefined
-}
-
-/**
- * A type predicate that is true if the given value is neither undefined
- * nor null.
- */
-export function notNullOrUndefined(
- value: T | null | undefined,
-): value is T {
- return value !== null && value !== undefined
-}
-
-export async function getEnvironment() {
- if (typeof window !== 'undefined' && window !== null) {
- return 'browser'
- }
-
- try {
- const process = await import('node:process')
- if (typeof process !== 'undefined'
- && process.versions != null
- && process.versions.node != null) {
- return 'node'
- }
-
- return 'unknown'
- }
- catch {
- return 'unknown'
- }
-}
diff --git a/packages/duckdb-wasm/src/duckdb.ts b/packages/duckdb-wasm/src/duckdb.ts
deleted file mode 100644
index b0c33132a..000000000
--- a/packages/duckdb-wasm/src/duckdb.ts
+++ /dev/null
@@ -1,173 +0,0 @@
-import type { AsyncDuckDBConnection, DuckDBBundle, DuckDBBundles, Logger } from '@duckdb/duckdb-wasm'
-import type { DBStorage } from './storage'
-
-import { AsyncDuckDB, ConsoleLogger, selectBundle, VoidLogger } from '@duckdb/duckdb-wasm'
-import { defu } from 'defu'
-
-import { getEnvironment } from './common'
-import { mapStructRowData } from './format'
-import { DBStorageType } from './storage'
-
-export type ConnectOptions = ConnectRequiredOptions & ConnectOptionalOptions
-
-export interface ConnectOptionalOptions {
- bundles?: DuckDBBundles | Promise
- logger?: boolean | Logger
- storage?: DBStorage
-}
-
-export interface ConnectRequiredOptions {
-
-}
-
-export interface DuckDBWasmClient {
- worker: Worker
- db: AsyncDuckDB
- conn: AsyncDuckDBConnection
- close: () => Promise
- query: (query: string, params?: unknown[]) => Promise[]>
-}
-
-export async function connect(options: ConnectOptions): Promise {
- const opts = defu(options, { logger: false })
-
- let worker: Worker
- let bundle: DuckDBBundle
-
- const env = await getEnvironment()
- if (env === 'browser') {
- if (typeof opts.bundles === 'undefined') {
- const { getBundles } = await import('./bundles/default-browser')
- opts.bundles = await getBundles()
- }
-
- bundle = await selectBundle(await opts.bundles)
- worker = new Worker(bundle.mainWorker!)
- }
- else if (env === 'node') {
- if (typeof opts.bundles === 'undefined') {
- const { getBundles } = await import('./bundles/default-node')
- opts.bundles = await getBundles()
- }
-
- bundle = await selectBundle(await opts.bundles)
-
- let workerUrl = bundle.mainWorker!
- if (workerUrl.startsWith('/@fs/')) {
- workerUrl = workerUrl.replace('/@fs/', 'file://')
- }
-
- const ww = await import('web-worker')
- // eslint-disable-next-line new-cap
- worker = new ww.default(workerUrl, { type: 'module' })
- }
- else {
- throw new Error(`Unsupported environment: ${env}`)
- }
-
- let logger: Logger
- if (opts.logger === true) {
- logger = new ConsoleLogger()
- }
- else if (opts.logger === false) {
- logger = new VoidLogger()
- }
- else {
- logger = opts.logger
- }
-
- const db = new AsyncDuckDB(logger, worker)
- await db.instantiate(bundle.mainModule, bundle.pthreadWorker)
-
- if (opts.storage) {
- switch (opts.storage.type) {
- case DBStorageType.ORIGIN_PRIVATE_FS: {
- try {
- let strippedPath = opts.storage.path
- if (strippedPath.startsWith('/')) {
- // We will strip the only leading slash as it is not needed
- strippedPath = strippedPath.slice(1)
- }
- await db.open({
- path: `opfs://${strippedPath}`,
- accessMode: opts.storage.accessMode,
- // OPFS already uses direct IO
- })
- }
- catch (e) {
- await db.terminate()
- await worker.terminate()
- throw e
- }
- break
- }
- case DBStorageType.NODE_FS: {
- try {
- await db.open({
- path: opts.storage.path,
- accessMode: opts.storage.accessMode,
- useDirectIO: true, // Important! Otherwise the file will be created without DB init
- })
- }
- catch (e) {
- await db.terminate()
- await worker.terminate()
- throw e
- }
- break
- }
- }
- }
-
- const conn = await db.connect()
-
- return {
- worker,
- db,
- conn,
- query: async (query: string, params: unknown[] = []) => {
- if (!params || params.length === 0) {
- const results = await conn.query(query)
- return mapStructRowData(results)
- }
-
- const stmt = await conn.prepare(query)
- const results = await stmt.query(...params)
- const rows = mapStructRowData(results)
-
- stmt.close()
- return rows
- },
- close: async () => {
- await conn.close()
- await db.terminate()
- await worker.terminate()
- },
- }
-}
-
-export async function beginTransaction(client: Promise, txFn: (client: Promise) => Promise): Promise {
- await (await client).conn.send('BEGIN TRANSACTION')
- try {
- const result = await txFn(client)
- await (await client).conn.send('COMMIT')
- return result
- }
- catch (err) {
- await (await client).conn.send('ROLLBACK')
- throw err
- }
-}
-
-export async function withSavepoint(client: Promise, spName: string, txFn: (client: Promise) => Promise): Promise {
- await (await client).conn.send(`SAVEPOINT ${spName}`)
- try {
- const result = await txFn(client)
- await (await client).conn.send(`RELEASE SAVEPOINT ${spName}`)
- return result
- }
- catch (err) {
- await (await client).conn.send(`ROLLBACK TO SAVEPOINT ${spName}`)
- throw err
- }
-}
diff --git a/packages/duckdb-wasm/src/format.ts b/packages/duckdb-wasm/src/format.ts
deleted file mode 100644
index c97794aca..000000000
--- a/packages/duckdb-wasm/src/format.ts
+++ /dev/null
@@ -1,655 +0,0 @@
-import type { TZDate } from '@date-fns/tz'
-import type { Field, Schema, StructRow } from 'apache-arrow'
-import type { DataType } from './types'
-
-import { TZDateMini } from '@date-fns/tz'
-import { DataType as ArrowDataType, Struct, TimeUnit, util } from 'apache-arrow'
-import {
- addDays,
- addHours,
- addMilliseconds,
- addMinutes,
- addMonths,
- addQuarters,
- addSeconds,
- addWeeks,
- addYears,
- format as dateFormat,
- formatDuration as dateFormatDuration,
- fromUnixTime,
- setDay,
- transpose,
-} from 'date-fns'
-import { trimEnd } from 'es-toolkit'
-
-import { isNullOrUndefined, notNullOrUndefined } from './common'
-import {
- isBooleanType,
- isDatetimeType,
- isDateType,
- isDecimalType,
- isDurationType,
- isFloatType,
- isIntegerType,
- isIntervalType,
- isListType,
- isObjectType,
- isPeriodType,
- isTimeType,
-} from './types'
-
-/**
- * The frequency strings defined in pandas.
- * See: https://pandas.pydata.org/docs/user_guide/timeseries.html#period-aliases
- * Not supported: "N" (nanoseconds), "U" & "us" (microseconds), and "B" (business days).
- * Reason is that these types are not supported by moment.js, but also they are not
- * very commonly used in practice.
- */
-type SupportedPandasOffsetType =
- // yearly frequency:
- | 'A' // deprecated alias
- | 'Y'
- // quarterly frequency:
- | 'Q'
- // monthly frequency:
- | 'M'
- // weekly frequency:
- | 'W'
- // calendar day frequency:
- | 'D'
- // hourly frequency:
- | 'H' // deprecated alias
- | 'h'
- // minutely frequency
- | 'T' // deprecated alias
- | 'min'
- // secondly frequency:
- | 'S' // deprecated alias
- | 's'
- // milliseconds frequency:
- | 'L' // deprecated alias
- | 'ms'
-
-type PandasPeriodFrequency =
- | SupportedPandasOffsetType
- | `${SupportedPandasOffsetType}-${string}`
-
-const BASE_DATE = new Date(1970, 0, 1) // 1970-01-01
-
-function formatMs(duration: number): string {
- return dateFormat(addMilliseconds(BASE_DATE, duration), 'yyyy-MM-dd HH:mm:ss.SSS')
-}
-
-function formatSec(duration: number): string {
- return dateFormat(addSeconds(BASE_DATE, duration), 'yyyy-MM-dd HH:mm:ss')
-}
-
-function formatMin(duration: number): string {
- return dateFormat(addMinutes(BASE_DATE, duration), 'yyyy-MM-dd HH:mm')
-}
-
-function formatHours(duration: number): string {
- return dateFormat(addHours(BASE_DATE, duration), 'yyyy-MM-dd HH:mm')
-}
-
-function formatDay(duration: number): string {
- return dateFormat(addDays(BASE_DATE, duration), 'yyyy-MM-dd')
-}
-
-function formatMonth(duration: number): string {
- return dateFormat(addMonths(BASE_DATE, duration), 'yyyy-MM')
-}
-
-function formatYear(duration: number): string {
- return dateFormat(addYears(BASE_DATE, duration), 'yyyy')
-}
-
-function formatWeeks(duration: number, freqParam?: string): string {
- if (!freqParam) {
- throw new Error('Frequency "W" requires parameter')
- }
- const WEEKDAY_SHORT = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
- const dayIndex = WEEKDAY_SHORT.indexOf(freqParam)
- if (dayIndex < 0) {
- throw new Error(
- `Invalid value: ${freqParam}. Supported values: ${JSON.stringify(
- WEEKDAY_SHORT,
- )}`,
- )
- }
-
- const weekDate = addWeeks(BASE_DATE, duration)
- const startDate = dateFormat(setDay(weekDate, dayIndex - 6), 'yyyy-MM-dd')
- const endDate = dateFormat(setDay(weekDate, dayIndex), 'yyyy-MM-dd')
-
- return `${startDate}/${endDate}`
-}
-
-function formatQuarter(duration: number): string {
- const date = addQuarters(BASE_DATE, duration)
- const year = dateFormat(date, 'yyyy')
- const quarter = Math.floor(date.getMonth() / 3) + 1
- return `${year}Q${quarter}`
-}
-
-/**
- * Formatters for the different pandas period frequencies.
- *
- * This is a mapping from the frequency strings to the function that formats the period.
- */
-const PERIOD_TYPE_FORMATTERS: Record<
- SupportedPandasOffsetType,
- (duration: number, freqParam?: string) => string
-> = {
- L: formatMs,
- ms: formatMs,
- S: formatSec,
- s: formatSec,
- T: formatMin,
- min: formatMin,
- H: formatHours,
- h: formatHours,
- D: formatDay,
- M: formatMonth,
- W: formatWeeks,
- Q: formatQuarter,
- Y: formatYear,
- A: formatYear,
-}
-
-/**
- * Adjusts a time value to seconds based on the unit information in the field.
- *
- * The unit numbers are specified here:
- * https://github.com/apache/arrow/blob/3ab246f374c17a216d86edcfff7ff416b3cff803/js/src/enum.ts#L95
- *
- * @param timestamp The timestamp to convert.
- * @param unit The unit of the timestamp. 0 is seconds, 1 is milliseconds, 2 is microseconds, 3 is nanoseconds.
- * @returns The timestamp in seconds.
- */
-function convertTimestampToSeconds(
- timestamp: number | bigint,
- unit: TimeUnit,
-): number {
- let unitAdjustment
-
- if (unit === TimeUnit.MILLISECOND) {
- // Milliseconds
- unitAdjustment = 1000
- }
- else if (unit === TimeUnit.MICROSECOND) {
- // Microseconds
- unitAdjustment = 1000 * 1000
- }
- else if (unit === TimeUnit.NANOSECOND) {
- // Nanoseconds
- unitAdjustment = 1000 * 1000 * 1000
- }
- else {
- // Interpret it as seconds as a fallback
- return Number(timestamp)
- }
-
- // Do the calculation based on bigints, if the value
- // is a bigint and not safe for usage as number.
- // This might lose some precision since it doesn't keep
- // fractional parts.
- if (
- typeof timestamp === 'bigint'
- && !Number.isSafeInteger(Number(timestamp))
- ) {
- return Number(timestamp / BigInt(unitAdjustment))
- }
-
- return Number(timestamp) / unitAdjustment
-}
-
-/**
- * Converts a UTC time value (timestamp) to a date object.
- *
- * @param timestamp The timestamp to convert.
- * @param field The field containing the unit information.
- * @returns The date object in UTC timezone.
- */
-export function convertTimeToDate(
- timestamp: number | bigint,
- field?: Field,
-): Date {
- // Time values from arrow are not converted to a shared unit and
- // just return the raw arrow value. Therefore, we need to adjust
- // the value to seconds based on the unit information in the field.
- // https://github.com/apache/arrow/blob/9e08c57c0986531879aadf7942998d26a94a5d1b/js/src/visitor/get.ts#L193C7-L209
- const timeInSeconds = convertTimestampToSeconds(
- timestamp,
- // The default is SECOND because that is the default unit for time values in pandas.
- // Though we believe that actually always a unit is populated by arrow.
- field?.type?.unit ?? TimeUnit.SECOND,
- )
- return fromUnixTime(timeInSeconds)
-}
-
-/**
- * Formats a duration value based on the unit information in the field.
- *
- * @param duration The duration value to format.
- * @param field The field containing the unit information.
- * @returns The formatted duration value.
- */
-export function formatDuration(duration: number | bigint, field?: Field): string {
- // unit: 0 is seconds, 1 is milliseconds, 2 is microseconds, 3 is nanoseconds.
- return dateFormatDuration({
- seconds: convertTimestampToSeconds(
- duration,
- // The default is NANOSECOND because that is the default unit for duration in pandas.
- // Though we believe that actually always a unit is populated by arrow.
- field?.type?.unit ?? TimeUnit.NANOSECOND,
- ),
- })
-}
-
-/**
- * Formats a time value based on the unit information in the field.
- *
- * @param timestamp The time value to format.
- * @param field The field containing the unit information.
- * @returns The formatted time value.
- */
-export function formatTime(timestamp: number | bigint, field?: Field): string {
- const date = convertTimeToDate(timestamp, field)
- return dateFormat(
- date,
- date.getMilliseconds() === 0 ? 'HH:mm:ss' : 'HH:mm:ss.SSS',
- )
-}
-
-export function formatDate(date: number | Date): string {
- // Date values from arrow are already converted to a date object
- // or a timestamp in milliseconds even if the field unit belonging to the
- // passed date might have indicated a different unit.
- // Thats why we don't need the field information here (aka its not passed to the function)
- // and we don't need to apply any unit conversion.
- // https://github.com/apache/arrow/blob/9e08c57c0986531879aadf7942998d26a94a5d1b/js/src/visitor/get.ts#L167-L171
-
- const formatPattern = 'yyyy-MM-dd'
-
- if (
- !(
- date instanceof Date
- || (typeof date === 'number' && Number.isFinite(date))
- )
- ) {
- console.warn(`Unsupported date value: ${date}`)
- return String(date)
- }
-
- return dateFormat(date, formatPattern)
-}
-
-/**
- * Format datetime value from Arrow to string.
- */
-export function formatDatetime(date: number | Date, field?: Field): Date | null {
- // Datetime values from arrow are already converted to a date object
- // or a timestamp in milliseconds even if the field unit might indicate a
- // different unit.
- // https://github.com/apache/arrow/blob/9e08c57c0986531879aadf7942998d26a94a5d1b/js/src/visitor/get.ts#L174-L190
-
- if (
- !(
- date instanceof Date
- || (typeof date === 'number' && Number.isFinite(date))
- )
- ) {
- console.warn(`Unsupported datetime value: ${date}`)
- return null
- }
-
- let datetime: TZDate
- const timezone = field?.type?.timezone
-
- // Impact by upstream changes, see:
- // - How to replace date-fns-tz · Issue #9 - https://github.com/date-fns/tz/issues/9
- // - Inconsistencies from date-fns-tz · Issue #6 - https://github.com/date-fns/tz/issues/6
- if (typeof date === 'number') {
- if (timezone) {
- datetime = new TZDateMini(date, timezone)
- }
- else {
- datetime = new TZDateMini(date)
- }
- }
- else {
- if (timezone) {
- datetime = new TZDateMini(date, timezone)
- }
- else {
- datetime = new TZDateMini(date)
- }
- }
-
- // Return the timestamp without timezone information
- return transpose(datetime, Date)
-}
-
-/**
- * Formats a decimal value with a given scale to a string.
- *
- * This code is partly based on: https://github.com/apache/arrow/issues/35745
- *
- * TODO: This is only a temporary workaround until ArrowJS can format decimals correctly.
- * This is tracked here:
- * https://github.com/apache/arrow/issues/37920
- * https://github.com/apache/arrow/issues/28804
- * https://github.com/apache/arrow/issues/35745
- */
-export function formatDecimal(value: Uint32Array | Int32Array, field?: Field): string {
- const scale = field?.type?.scale || 0
-
- // Format Uint32Array to a numerical string and pad it with zeros
- // So that it is exactly the length of the scale.
- let numString = util.bigNumToString(new util.BN(value)).padStart(scale, '0')
-
- // ArrowJS 13 correctly adds a minus sign for negative numbers.
- // but it doesn't handle th fractional part yet. So we can just return
- // the value if scale === 0, but we need to do some additional processing
- // for the fractional part if scale > 0.
-
- if (scale === 0) {
- return numString
- }
-
- let sign = ''
- if (numString.startsWith('-')) {
- // Check if number is negative, and if so remember the sign and remove it.
- // We will add it back later.
- sign = '-'
- numString = numString.slice(1)
- }
- // Extract the whole number part. If the number is < 1, it doesn't
- // have a whole number part, so we'll use "0" instead.
- // E.g for 123450 with scale 3, we'll get "123" as the whole part.
- const wholePart = numString.slice(0, -scale) || '0'
- // Extract the fractional part and remove trailing zeros.
- // E.g. for 123450 with scale 3, we'll get "45" as the fractional part.
- const decimalPart = trimEnd(numString.slice(-scale), '0') || ''
- // Combine the parts and add the sign.
- return `${sign}${wholePart}${decimalPart ? `.${decimalPart}` : ''}`
-}
-
-const formatter = new Intl.NumberFormat('en-US', { style: 'decimal', maximumFractionDigits: 4, minimumFractionDigits: 4, useGrouping: true })
-
-/**
- * Formats a float value to a string.
- *
- * @param num The float value to format.
- * @returns The formatted float value.
- */
-export function formatFloat(num: number): string {
- if (!Number.isFinite(num)) {
- return String(num)
- }
-
- return formatter.format(num)
-}
-
-// - INTERVAL '24' MONTHS returns [2, 0] as Int32Array, should resolve to '2 years'
-// - INTERVAL '1' YEAR returns [1, 0] as Int32Array, should resolve to '1 year'
-// - INTERVAL '13' MONTHS returns [1, 1] as Int32Array, should resolve to '1 year 1 month'
-// - INTERVAL '1' MONTH returns [0, 1] as Int32Array, should resolve to '1 month'
-// - INTERVAL '30' MONTHS returns [2, 6] as Int32Array, should resolve to '2 years 6 months'
-function parseInterval(arr: Int32Array) {
- const years = arr[0]
- const months = arr[1]
-
- const result: string[] = []
- if (years !== 0) {
- result.push(`${years} year${years > 1 ? 's' : ''}`)
- }
- if (months !== 0) {
- result.push(`${months} month${months > 1 ? 's' : ''}`)
- }
-
- return result.length ? result.join(' ') : '0 months'
-}
-
-/**
- * Formats an interval value from arrow to string.
- */
-export function formatInterval(x: DataType, field?: Field): string {
- // TODO: still buggy, the return value of interval related fields are always
- // [0, 0] as Int32Array, should follow the issue to resolve this.
- if (ArrowDataType.isInterval(field?.type)) {
- return parseInterval(x as Int32Array)
-
- // However, this doesn't mean that the acceptable value of parseInterval is correct and
- // respect field?.type.unit (IntervalUnit), since now the interval units are all
- // IntervalUnit.YEAR_MONTH, but @duckdb/duckdb-wasm returned 2 (IntervalUnit.MONTH_DAY_NANO),
- // which is not correct.
- //
- // Experimented with:
- // - https://www.quackdb.com/ : Cannot parse
- // - https://sekuel.com/playground/?q=U0VMRUNUIElOVEVSVkFMICcxJyBEQVkgQVMgaXQ7 : Cannot parse
- // - https://csvfiddle.io/#JTdCJTIyaXNUYWJsZU1ldGFkYXRhT3BlbiUyMiUzQWZhbHNlJTJDJTIyaXNOZXdUYWJsZUZvcm1PcGVuJTIyJTNBZmFsc2UlMkMlMjJpc0NvbmZpcm1EZWxldGVRdWVyeU9wZW4lMjIlM0FmYWxzZSUyQyUyMmlzQ29uZmlybURyb3BUYWJsZU9wZW4lMjIlM0FmYWxzZSUyQyUyMmlzU2hhcmVEaWFsb2dPcGVuJTIyJTNBZmFsc2UlMkMlMjJkYlJlYWR5JTIyJTNBZmFsc2UlMkMlMjJ0YWJsZXMlMjIlM0ElNUIlNUQlMkMlMjJxdWVyaWVzJTIyJTNBJTdCJTIyMCUyMiUzQSU3QiUyMmlkJTIyJTNBMCUyQyUyMnRpdGxlJTIyJTNBJTIyVW50aXRsZWQlMjBxdWVyeSUyMiUyQyUyMmJvZHklMjIlM0ElMjJTRUxFQ1QlMjBJTlRFUlZBTCUyMCcxJyUyMERBWSUyMEFTJTIwaXQlM0IlMjIlMkMlMjJyZXN1bHQlMjIlM0ElNUIlNUQlMkMlMjJlcnJvciUyMiUzQW51bGwlN0QlN0QlMkMlMjJhY3RpdmVRdWVyeUlkJTIyJTNBMCUyQyUyMmFjdGl2ZVRhYmxlTWV0YWRhdGFDb2x1bW5zJTIyJTNBJTVCJTVEJTJDJTIybG9jYWxUYWJsZXNUb1dhcm4lMjIlM0ElNUIlNUQlMkMlMjJpc1F1ZXJ5SW5Qcm9ncmVzcyUyMiUzQWZhbHNlJTJDJTIyZGlkQWRkTmV3VGFibGVTdWNjZWVkJTIyJTNBbnVsbCUyQyUyMmFkZE5ld1RhYmxlRXJyb3IlMjIlM0FudWxsJTdE : Can parse but not even open source
- // - https://sidequery.ai/ : Cannot parse
- // - https://codapi.org/duckdb/ : Can parse (because based on Go)
- //
- // const value = formatDecimal(x as Int32Array, field)
- // const unit = field?.type.unit
- // switch (unit) {
- // case IntervalUnit.MONTH_DAY_NANO:
- // // In Python:
- // // pa.scalar((1, 15, -30), type=pa.month_day_nano_interval())
- // //
- // //
- // // see: pyarrow.month_day_nano_interval — Apache Arrow v19.0.0
- // // https://arrow.apache.org/docs/python/generated/pyarrow.month_day_nano_interval.html
- // return `${value} months`
- // case IntervalUnit.DAY_TIME:
- // return `${value} days`
- // case IntervalUnit.YEAR_MONTH:
- // return `${value} years`
- // default:
- // return value
- // }
- }
-
- // Serialization for pandas.Interval is provided by Arrow extensions
- // https://github.com/pandas-dev/pandas/blob/235d9009b571c21b353ab215e1e675b1924ae55c/
- // pandas/core/arrays/arrow/extension_types.py#L17
- const extensionName = field && field.metadata.get('ARROW:extension:name')
- if (extensionName && extensionName === 'pandas.interval') {
- const extensionMetadata = JSON.parse(
- field.metadata.get('ARROW:extension:metadata') as string,
- )
- const { closed } = extensionMetadata
-
- const interval = (x as StructRow).toJSON() as {
- left: number
- right: number
- }
-
- const leftBracket = closed === 'both' || closed === 'left' ? '[' : '('
- const rightBracket = closed === 'both' || closed === 'right' ? ']' : ')'
-
- const leftInterval = mapColumnData(interval.left, (field.type as Struct)?.children?.[0])
- const rightInterval = mapColumnData(interval.right, (field.type as Struct)?.children?.[1])
-
- return `${leftBracket + leftInterval}, ${rightInterval + rightBracket}`
- }
-
- return String(x)
-}
-
-export function formatPeriodFromFreq(
- duration: number | bigint,
- freq: PandasPeriodFrequency,
-): string {
- const [freqName, freqParam] = freq.split('-', 2)
- const momentConverter
- = PERIOD_TYPE_FORMATTERS[freqName as SupportedPandasOffsetType]
- if (!momentConverter) {
- console.warn(`Unsupported period frequency: ${freq}`)
- return String(duration)
- }
- const durationNumber = Number(duration)
- if (!Number.isSafeInteger(durationNumber)) {
- console.warn(
- `Unsupported value: ${duration}. Supported values: [${Number.MIN_SAFE_INTEGER}-${Number.MAX_SAFE_INTEGER}]`,
- )
-
- return String(duration)
- }
- return momentConverter(durationNumber, freqParam)
-}
-
-export function formatPeriod(duration: number | bigint, field?: Field): string {
- // Serialization for pandas.Period is provided by Arrow extensions
- // https://github.com/pandas-dev/pandas/blob/70bb855cbbc75b52adcb127c84e0a35d2cd796a9/pandas/core/arrays/arrow/extension_types.py#L26
- if (isNullOrUndefined(field)) {
- console.warn('Field information is missing')
- return String(duration)
- }
-
- const extensionName = field.metadata.get('ARROW:extension:name')
- const extensionMetadata = field.metadata.get('ARROW:extension:metadata')
-
- if (
- isNullOrUndefined(extensionName)
- || isNullOrUndefined(extensionMetadata)
- ) {
- console.warn('Arrow extension metadata is missing')
- return String(duration)
- }
-
- if (extensionName !== 'pandas.period') {
- console.warn(`Unsupported extension name for period type: ${extensionName}`)
- return String(duration)
- }
-
- const parsedExtensionMetadata = JSON.parse(extensionMetadata as string)
- const { freq } = parsedExtensionMetadata
- return formatPeriodFromFreq(duration, freq)
-}
-
-/**
- * Formats nested arrays and other objects to a JSON string.
- *
- * @param object The value to format.
- * @param field The field metadata from arrow containing metadata about the column.
- * @returns The formatted JSON string.
- */
-export function formatObject(object: any, field?: Field): unknown {
- if (field?.type instanceof Struct) {
- // This type is used by python dictionary values
-
- return JSON.parse(
- JSON.stringify(object, (_key, value) => {
- if (!notNullOrUndefined(value)) {
- // Workaround: Arrow JS adds all properties from all cells
- // as fields. When you convert to string, it will contain lots of fields with
- // null values. To mitigate this, we filter out null values.
- return undefined
- }
- if (typeof value === 'bigint') {
- // JSON.stringify fails to serialize bigint values, therefore we have to
- // handle them manually.
- // TODO(lukasmasuch): Would it be better to serialize it to a string to
- // not lose precision?
- return Number(value)
- }
-
- return value
- }),
- )
- }
-
- // TODO(lukasmasuch): Investigate if we can unify this with the logic above.
- return JSON.parse(
- JSON.stringify(object, (_key, value) =>
- typeof value === 'bigint' ? Number(value) : value),
- )
-}
-
-/**
- * Takes the cell data and type metadata from arrow and nicely formats it into a human-readable string.
- *
- * This is mostly a best-effort logic and should not throw exceptions in case of unknown values
- * or other issues. This makes it easier to use this method by consumers (table, dataframe) since
- * they would have to somehow deal with the exception on a cell level to not crash the full table or app.
- *
- * @param x The cell value.
- * @param field The field metadata from arrow containing metadata about the column.
- * @returns The formatted cell value.
- */
-export function mapColumnData(x: DataType, field?: Field): T {
- if (isNullOrUndefined(x)) {
- return null as null as unknown as T
- }
-
- const isDate = x instanceof Date || Number.isFinite(x)
- if (isDate && isDateType(field)) {
- return formatDate(x as Date | number) as string as T
- }
-
- if (typeof x === 'bigint' && isTimeType(field)) {
- return formatTime(Number(x), field) as string as T
- }
-
- if (isDate && isDatetimeType(field)) {
- return formatDatetime(x as Date | number, field) as Date as T
- }
-
- if (isPeriodType(field)) {
- // Not supported yet by Postgres and DuckDB
- throw new Error('Period type is not supported yet')
- }
-
- if (isIntervalType(field)) {
- return formatInterval(x, field) as string as T
- }
-
- if (isDurationType(field)) {
- // Not supported yet by Postgres and DuckDB
- throw new Error('Duration type is not supported yet')
- }
-
- if (isDecimalType(field)) {
- // 'numeric' in Postgres also applies here
- return formatDecimal(x as Uint32Array, field) as string as T
- }
-
- if (isFloatType(field) && Number.isFinite(x)) {
- return x as number as T
- }
-
- if (isIntegerType(field)) {
- // If int64 or uint64, it should be bigint already,
- // if int32 or uint32, it should be number already,
- // therefore we can just return the value as is.
- return x as number as T
- }
-
- if (isObjectType(field) || isListType(field)) {
- return formatObject(x, field) as T
- }
-
- if (isBooleanType(field)) {
- return Boolean(x) as boolean as T
- }
-
- return String(x) as T
-}
-
-export function mapStructRowData StructRow[], schema: Schema }>(results: T) {
- const rows = (results.toArray() as StructRow[] || []).map(item => item.toJSON()) || []
-
- const jsRepresentedRows = rows.map((row) => {
- results.schema.fields.forEach((field) => {
- return row[field.name] = mapColumnData(row[field.name], field)
- })
-
- return row
- })
-
- return jsRepresentedRows
-}
diff --git a/packages/duckdb-wasm/src/index.ts b/packages/duckdb-wasm/src/index.ts
deleted file mode 100644
index 1ade05fa6..000000000
--- a/packages/duckdb-wasm/src/index.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export * from './common'
-export * from './duckdb'
-export * from './format'
-export * from './storage'
-export * from './types'
diff --git a/packages/duckdb-wasm/src/storage.ts b/packages/duckdb-wasm/src/storage.ts
deleted file mode 100644
index c9ca7b5d1..000000000
--- a/packages/duckdb-wasm/src/storage.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import type { DuckDBAccessMode } from '@duckdb/duckdb-wasm'
-
-export enum DBStorageType {
- ORIGIN_PRIVATE_FS = 'origin-private-fs',
- NODE_FS = 'node-fs',
-}
-
-interface PathBasedFS {
- path: string
-
- /**
- * DuckDB will use {@link DuckDBAccessMode.READ_ONLY} if omitted.
- */
- accessMode?: DuckDBAccessMode
-}
-
-/**
- * Origin Private FS storage.
- *
- * @see https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system
- */
-export interface DBOriginPrivateFS extends PathBasedFS {
- type: DBStorageType.ORIGIN_PRIVATE_FS
-
- /**
- * Path of the file in the Origin Private FS.
- *
- * Leading slash is not necessary and will be omitted if provided.
- */
- path: PathBasedFS['path']
-}
-
-export interface DBNodeFS extends PathBasedFS {
- type: DBStorageType.NODE_FS
-}
-
-export type DBStorage = DBOriginPrivateFS | DBNodeFS
diff --git a/packages/duckdb-wasm/src/types.ts b/packages/duckdb-wasm/src/types.ts
deleted file mode 100644
index 465a450b2..000000000
--- a/packages/duckdb-wasm/src/types.ts
+++ /dev/null
@@ -1,249 +0,0 @@
-import type { Dictionary, Field, Struct, StructRow, Vector } from 'apache-arrow'
-
-import { DataType as ArrowDataType } from 'apache-arrow'
-
-import { isNullOrUndefined } from './common'
-
-/** Data types used by ArrowJS. */
-export type DataType =
- | null
- | boolean
- | number
- | string
- | Date // datetime
- | Int32Array // int
- | Uint8Array // bytes
- | Uint32Array // Decimal
- | Vector // arrays
- | StructRow // interval
- | Dictionary // categorical
- | Struct // dict
- | bigint // period
-
-/** The type of the cell. */
-export enum DataFrameCellType {
- // Index cells
- INDEX = 'index',
- // Data cells
- DATA = 'data',
-}
-
-/**
- * Converts an Arrow vector to a list of strings.
- *
- * @param vector The Arrow vector to convert.
- * @returns The list of strings.
- */
-export function convertVectorToList(vector: Vector): string[] {
- const values: string[] = []
-
- for (let i = 0; i < vector.length; i++) {
- values.push(vector.get(i))
- }
-
- return values
-}
-
-/** Returns the timezone of the arrow type metadata. */
-export function getTimezone(field: Field): string | undefined {
- return field.type?.timezone ?? field.metadata?.get('timezone')
-}
-
-/**
- * True if the arrow type is an integer type.
- * For example: int8, int16, int32, int64, uint8, uint16, uint32, uint64, range
- */
-export function isIntegerType(field?: Field): boolean {
- if (isNullOrUndefined(field)) {
- return false
- }
-
- return (
- // Period types are integers with an extra extension name
- (ArrowDataType.isInt(field.type) && !isPeriodType(field))
- || isUnsignedIntegerType(field)
- )
-}
-
-/** True if the arrow type is an unsigned integer type. */
-export function isUnsignedIntegerType(field?: Field): boolean {
- if (isNullOrUndefined(field)) {
- return false
- }
-
- return (
- (ArrowDataType.isInt(field.type)
- && field.type.isSigned === false)
- )
-}
-
-/**
- * True if the arrow type is a float type.
- * For example: float16, float32, float64, float96, float128
- */
-export function isFloatType(field?: Field): boolean {
- if (isNullOrUndefined(field)) {
- return false
- }
- return (
- (ArrowDataType.isFloat(field.type))
- ?? false
- )
-}
-
-/** True if the arrow type is a decimal type. */
-export function isDecimalType(field?: Field): boolean {
- if (isNullOrUndefined(field)) {
- return false
- }
- return (
- ArrowDataType.isDecimal(field.type)
- )
-}
-
-/** True if the arrow type is a numeric type. */
-export function isNumericType(type?: Field): boolean {
- if (isNullOrUndefined(type)) {
- return false
- }
- return isIntegerType(type) || isFloatType(type) || isDecimalType(type)
-}
-
-/** True if the arrow type is a boolean type. */
-export function isBooleanType(type?: Field): boolean {
- if (isNullOrUndefined(type)) {
- return false
- }
- return (
- ArrowDataType.isBool(type.type)
- )
-}
-
-/** True if the arrow type is a duration type. */
-export function isDurationType(type?: Field): boolean {
- if (isNullOrUndefined(type)) {
- return false
- }
- return (
- ArrowDataType.isDuration(type.type)
- )
-}
-
-/** True if the arrow type is a period type. */
-export function isPeriodType(type?: Field): boolean {
- if (isNullOrUndefined(type)) {
- return false
- }
- return (
- (ArrowDataType.isInt(type.type)
- && type.metadata.get('ARROW:extension:name') === 'period')
- )
-}
-
-/** True if the arrow type is a datetime type. */
-export function isDatetimeType(type?: Field): boolean {
- if (isNullOrUndefined(type)) {
- return false
- }
- return (
- ArrowDataType.isTimestamp(type.type)
- )
-}
-
-/** True if the arrow type is a date type. */
-export function isDateType(type?: Field): boolean {
- if (isNullOrUndefined(type)) {
- return false
- }
- return (
- ArrowDataType.isDate(type.type)
- )
-}
-
-/** True if the arrow type is a time type. */
-export function isTimeType(type?: Field): boolean {
- if (isNullOrUndefined(type)) {
- return false
- }
- return (
- ArrowDataType.isTime(type.type)
- )
-}
-
-/** True if the arrow type is a categorical type. */
-export function isCategoricalType(type?: Field): boolean {
- if (isNullOrUndefined(type)) {
- return false
- }
- return (
- ArrowDataType.isDictionary(type.type)
- )
-}
-
-/** True if the arrow type is a list type. */
-export function isListType(type?: Field): boolean {
- if (isNullOrUndefined(type)) {
- return false
- }
- return (
- ArrowDataType.isList(type.type)
- || ArrowDataType.isFixedSizeList(type.type)
- )
-}
-
-/** True if the arrow type is an object type. */
-export function isObjectType(type?: Field): boolean {
- if (isNullOrUndefined(type)) {
- return false
- }
- return (
- ArrowDataType.isStruct(type.type)
- || ArrowDataType.isMap(type.type)
- )
-}
-
-/** True if the arrow type is a bytes type. */
-export function isBytesType(type?: Field): boolean {
- if (isNullOrUndefined(type)) {
- return false
- }
- return (
- ArrowDataType.isBinary(type.type)
- || ArrowDataType.isLargeBinary(type.type)
- )
-}
-
-/** True if the arrow type is a string type. */
-export function isStringType(type?: Field): boolean {
- if (isNullOrUndefined(type)) {
- return false
- }
- return (
- ArrowDataType.isUtf8(type.type)
- || ArrowDataType.isLargeUtf8(type.type)
- )
-}
-
-/** True if the arrow type is an empty type. */
-export function isEmptyType(type?: Field): boolean {
- if (isNullOrUndefined(type)) {
- return false
- }
- return (
- ArrowDataType.isNull(type.type)
- )
-}
-
-/** True if the arrow type is a interval type. */
-export function isIntervalType(type?: Field): boolean {
- if (isNullOrUndefined(type)) {
- return false
- }
- // ArrowDataType.isInterval checks for a different (unsupported) type and not related
- // to the pandas interval extension type.
- return (
- ((ArrowDataType.isStruct(type.type)
- && type.metadata.get('ARROW:extension:name') === 'interval'))
- || ArrowDataType.isInterval(type.type)
- )
-}
diff --git a/packages/duckdb-wasm/tsconfig.json b/packages/duckdb-wasm/tsconfig.json
deleted file mode 100644
index 4edc8249d..000000000
--- a/packages/duckdb-wasm/tsconfig.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "compilerOptions": {
- "target": "ESNext",
- "lib": [
- "ESNext",
- "DOM",
- "DOM.Iterable",
- "WebWorker"
- ],
- "module": "ESNext",
- "moduleResolution": "bundler",
- "types": [
- "vite/client"
- ],
- "esModuleInterop": true,
- "forceConsistentCasingInFileNames": true,
- "isolatedModules": true,
- "verbatimModuleSyntax": true,
- "skipLibCheck": true
- },
- "include": [
- "src/**/*.ts"
- ]
-}
diff --git a/packages/stage-ui/package.json b/packages/stage-ui/package.json
index e1d40f41b..3342f7c0d 100644
--- a/packages/stage-ui/package.json
+++ b/packages/stage-ui/package.json
@@ -58,6 +58,7 @@
"dependencies": {
"@formkit/auto-animate": "^0.8.2",
"@proj-airi/ccc": "workspace:^",
+ "@proj-airi/drizzle-duckdb-wasm": "catalog:",
"@proj-airi/server-sdk": "workspace:^",
"@vueuse/motion": "^3.0.3",
"radix-vue": "^1.9.17",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index b28689f28..d6a9dc27c 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -6,6 +6,9 @@ settings:
catalogs:
default:
+ '@proj-airi/drizzle-duckdb-wasm':
+ specifier: ^0.4.20
+ version: 0.4.20
'@xsai-ext/providers-cloud':
specifier: ^0.2.0-beta.3
version: 0.2.0-beta.3
@@ -131,7 +134,7 @@ importers:
version: 11.0.0(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(less@4.2.2)(terser@5.17.6)(tsx@4.19.3)(yaml@2.7.0))
vitest:
specifier: ^3.1.1
- version: 3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(@vitest/browser@3.1.1)(jiti@2.4.2)(jsdom@25.0.1(bufferutil@4.0.9)(utf-8-validate@5.0.10))(less@4.2.2)(msw@2.7.3(@types/node@22.14.0)(typescript@5.8.3))(terser@5.17.6)(tsx@4.19.3)(yaml@2.7.0)
+ version: 3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(jsdom@25.0.1(bufferutil@4.0.9)(utf-8-validate@5.0.10))(less@4.2.2)(msw@2.7.3(@types/node@22.14.0)(typescript@5.8.3))(terser@5.17.6)(tsx@4.19.3)(yaml@2.7.0)
apps/realtime-audio:
dependencies:
@@ -417,8 +420,8 @@ importers:
specifier: ^6.0.5
version: 6.0.5(@vue/compiler-dom@3.5.13)(eslint@9.24.0(jiti@2.4.2))(rollup@2.79.1)(typescript@5.8.3)(vue-i18n@11.1.2(vue@3.5.13(typescript@5.8.3)))(vue@3.5.13(typescript@5.8.3))
'@proj-airi/drizzle-duckdb-wasm':
- specifier: workspace:^
- version: link:../../packages/drizzle-duckdb-wasm
+ specifier: 'catalog:'
+ version: 0.4.20(@types/pg@8.11.11)(gel@2.0.0)(pg@8.14.1)(postgres@3.4.5)(web-worker@1.5.0)
'@proj-airi/lobe-icons':
specifier: ^1.0.5
version: 1.0.5
@@ -570,8 +573,8 @@ importers:
specifier: workspace:^
version: link:../../packages/ccc
'@proj-airi/drizzle-duckdb-wasm':
- specifier: workspace:^
- version: link:../../packages/drizzle-duckdb-wasm
+ specifier: 'catalog:'
+ version: 0.4.20(@types/pg@8.11.11)(gel@2.0.0)(pg@8.14.1)(postgres@3.4.5)(web-worker@1.5.0)
'@proj-airi/provider-transformers':
specifier: workspace:^
version: link:../../packages/provider-transformers
@@ -868,119 +871,6 @@ importers:
specifier: ^1.0.6
version: 1.0.6
- packages/drizzle-duckdb-wasm:
- dependencies:
- '@date-fns/tz':
- specifier: ^1.2.0
- version: 1.2.0
- '@duckdb/duckdb-wasm':
- specifier: 1.29.1-dev68.0
- version: 1.29.1-dev68.0
- '@proj-airi/duckdb-wasm':
- specifier: workspace:^
- version: link:../duckdb-wasm
- apache-arrow:
- specifier: ^19.0.1
- version: 19.0.1
- date-fns:
- specifier: ^4.1.0
- version: 4.1.0
- defu:
- specifier: ^6.1.4
- version: 6.1.4
- drizzle-orm:
- specifier: ^0.41.0
- version: 0.41.0(@types/pg@8.11.11)(gel@2.0.0)(pg@8.14.1)(postgres@3.4.5)
- es-toolkit:
- specifier: ^1.34.1
- version: 1.34.1
- web-worker:
- specifier: ^1.5.0
- version: 1.5.0
- devDependencies:
- '@iconify-json/solar':
- specifier: ^1.2.2
- version: 1.2.2
- '@types/d3':
- specifier: ^7.4.3
- version: 7.4.3
- '@types/d3-force':
- specifier: ^3.0.10
- version: 3.0.10
- '@unocss/reset':
- specifier: ^66.1.0-beta.9
- version: 66.1.0-beta.9
- '@vitejs/plugin-vue':
- specifier: ^5.2.3
- version: 5.2.3(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(less@4.2.2)(terser@5.17.6)(tsx@4.19.3)(yaml@2.7.0))(vue@3.5.13(typescript@5.8.3))
- '@vitest/browser':
- specifier: ^3.1.1
- version: 3.1.1(bufferutil@4.0.9)(msw@2.7.3(@types/node@22.14.0)(typescript@5.8.3))(playwright@1.51.1)(utf-8-validate@5.0.10)(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(less@4.2.2)(terser@5.17.6)(tsx@4.19.3)(yaml@2.7.0))(vitest@3.1.1)
- '@vueuse/core':
- specifier: ^13.0.0
- version: 13.0.0(vue@3.5.13(typescript@5.8.3))
- d3:
- specifier: ^7.9.0
- version: 7.9.0
- d3-force:
- specifier: ^3.0.0
- version: 3.0.0
- drizzle-kit:
- specifier: ^0.30.6
- version: 0.30.6
- playwright:
- specifier: ^1.51.1
- version: 1.51.1
- superjson:
- specifier: ^2.2.2
- version: 2.2.2
- unplugin-vue-router:
- specifier: ^0.12.0
- version: 0.12.0(vue-router@4.5.0(vue@3.5.13(typescript@5.8.3)))(vue@3.5.13(typescript@5.8.3))
- vite:
- specifier: ^6.2.5
- version: 6.2.5(@types/node@22.14.0)(jiti@2.4.2)(less@4.2.2)(terser@5.17.6)(tsx@4.19.3)(yaml@2.7.0)
- vue:
- specifier: ^3.5.13
- version: 3.5.13(typescript@5.8.3)
- vue-router:
- specifier: ^4.5.0
- version: 4.5.0(vue@3.5.13(typescript@5.8.3))
- vue-tsc:
- specifier: ^3.0.0-alpha.2
- version: 3.0.0-alpha.2(typescript@5.8.3)
-
- packages/duckdb-wasm:
- dependencies:
- '@date-fns/tz':
- specifier: ^1.2.0
- version: 1.2.0
- '@duckdb/duckdb-wasm':
- specifier: 1.29.1-dev68.0
- version: 1.29.1-dev68.0
- apache-arrow:
- specifier: ^19.0.1
- version: 19.0.1
- date-fns:
- specifier: ^4.1.0
- version: 4.1.0
- defu:
- specifier: ^6.1.4
- version: 6.1.4
- drizzle-orm:
- specifier: ^0.41.0
- version: 0.41.0(@types/pg@8.11.11)(gel@2.0.0)(pg@8.14.1)(postgres@3.4.5)
- es-toolkit:
- specifier: ^1.34.1
- version: 1.34.1
- web-worker:
- specifier: ^1.5.0
- version: 1.5.0
- devDependencies:
- drizzle-kit:
- specifier: ^0.30.6
- version: 0.30.6
-
packages/gpuu:
dependencies:
defu:
@@ -1118,6 +1008,9 @@ importers:
'@proj-airi/ccc':
specifier: workspace:^
version: link:../ccc
+ '@proj-airi/drizzle-duckdb-wasm':
+ specifier: 'catalog:'
+ version: 0.4.20(@types/pg@8.11.11)(gel@2.0.0)(pg@8.14.1)(postgres@3.4.5)(web-worker@1.5.0)
'@proj-airi/server-sdk':
specifier: workspace:^
version: link:../server-sdk
@@ -4251,6 +4144,22 @@ packages:
'@polka/url@1.0.0-next.24':
resolution: {integrity: sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==}
+ '@proj-airi/drizzle-duckdb-wasm@0.4.20':
+ resolution: {integrity: sha512-9WWiH97lirx0CGrp76ac9U6kKs4yMgN/QtPgBuPF7kSFGrwaHefaZ6u48V/j+PwBvISuasgR7/n7Q6CEjwCV8w==}
+ peerDependencies:
+ web-worker: ^1.5.0
+ peerDependenciesMeta:
+ web-worker:
+ optional: true
+
+ '@proj-airi/duckdb-wasm@0.4.20':
+ resolution: {integrity: sha512-s4w4oj7pX2LDV5t+b4Xjk3Y6ivzOE3YU7qklHvky+dYqFF0i7dGmVmb/ZvAc8tDHK2VezowAuYESaevVCHUhOg==}
+ peerDependencies:
+ web-worker: ^1.5.0
+ peerDependenciesMeta:
+ web-worker:
+ optional: true
+
'@proj-airi/lobe-icons@1.0.5':
resolution: {integrity: sha512-c/sqHDTgitgMnpsD5DpmVvQ0KjjVgRhXQ1lBb4RarkspAcXrH1HPhCDiMvrJ/EtXYJmUuIFfp/5pzcvGbcWTRA==}
@@ -4669,16 +4578,6 @@ packages:
'@tauri-apps/plugin-os@2.2.1':
resolution: {integrity: sha512-cNYpNri2CCc6BaNeB6G/mOtLvg8dFyFQyCUdf2y0K8PIAKGEWdEcu8DECkydU2B+oj4OJihDPD2de5K6cbVl9A==}
- '@testing-library/dom@10.4.0':
- resolution: {integrity: sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==}
- engines: {node: '>=18'}
-
- '@testing-library/user-event@14.6.1':
- resolution: {integrity: sha512-vq7fv0rnt+QTXgPxr5Hjc210p6YKq2kmdziLgnsZGgLJ9e6VAShx1pACLuRjd/AS/sr7phAR58OIIpf0LlmQNw==}
- engines: {node: '>=12', npm: '>=6'}
- peerDependencies:
- '@testing-library/dom': '>=7.21.4'
-
'@tokenizer/token@0.3.0':
resolution: {integrity: sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==}
@@ -4708,9 +4607,6 @@ packages:
'@types/acorn@4.0.6':
resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==}
- '@types/aria-query@5.0.4':
- resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==}
-
'@types/babel__core@7.20.5':
resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==}
@@ -4741,99 +4637,6 @@ packages:
'@types/culori@2.1.1':
resolution: {integrity: sha512-NzLYD0vNHLxTdPp8+RlvGbR2NfOZkwxcYGFwxNtm+WH2NuUNV8785zv1h0sulFQ5aFQ9n/jNDUuJeo3Bh7+oFA==}
- '@types/d3-array@3.2.1':
- resolution: {integrity: sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg==}
-
- '@types/d3-axis@3.0.6':
- resolution: {integrity: sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw==}
-
- '@types/d3-brush@3.0.6':
- resolution: {integrity: sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A==}
-
- '@types/d3-chord@3.0.6':
- resolution: {integrity: sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg==}
-
- '@types/d3-color@3.1.3':
- resolution: {integrity: sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==}
-
- '@types/d3-contour@3.0.6':
- resolution: {integrity: sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg==}
-
- '@types/d3-delaunay@6.0.4':
- resolution: {integrity: sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw==}
-
- '@types/d3-dispatch@3.0.6':
- resolution: {integrity: sha512-4fvZhzMeeuBJYZXRXrRIQnvUYfyXwYmLsdiN7XXmVNQKKw1cM8a5WdID0g1hVFZDqT9ZqZEY5pD44p24VS7iZQ==}
-
- '@types/d3-drag@3.0.7':
- resolution: {integrity: sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==}
-
- '@types/d3-dsv@3.0.7':
- resolution: {integrity: sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g==}
-
- '@types/d3-ease@3.0.2':
- resolution: {integrity: sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==}
-
- '@types/d3-fetch@3.0.7':
- resolution: {integrity: sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA==}
-
- '@types/d3-force@3.0.10':
- resolution: {integrity: sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw==}
-
- '@types/d3-format@3.0.4':
- resolution: {integrity: sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g==}
-
- '@types/d3-geo@3.1.0':
- resolution: {integrity: sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ==}
-
- '@types/d3-hierarchy@3.1.7':
- resolution: {integrity: sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg==}
-
- '@types/d3-interpolate@3.0.4':
- resolution: {integrity: sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==}
-
- '@types/d3-path@3.1.1':
- resolution: {integrity: sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==}
-
- '@types/d3-polygon@3.0.2':
- resolution: {integrity: sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA==}
-
- '@types/d3-quadtree@3.0.6':
- resolution: {integrity: sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg==}
-
- '@types/d3-random@3.0.3':
- resolution: {integrity: sha512-Imagg1vJ3y76Y2ea0871wpabqp613+8/r0mCLEBfdtqC7xMSfj9idOnmBYyMoULfHePJyxMAw3nWhJxzc+LFwQ==}
-
- '@types/d3-scale-chromatic@3.1.0':
- resolution: {integrity: sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ==}
-
- '@types/d3-scale@4.0.9':
- resolution: {integrity: sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==}
-
- '@types/d3-selection@3.0.11':
- resolution: {integrity: sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==}
-
- '@types/d3-shape@3.1.7':
- resolution: {integrity: sha512-VLvUQ33C+3J+8p+Daf+nYSOsjB4GXp19/S/aGo60m9h1v6XaxjiT82lKVWJCfzhtuZ3yD7i/TPeC/fuKLLOSmg==}
-
- '@types/d3-time-format@4.0.3':
- resolution: {integrity: sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==}
-
- '@types/d3-time@3.0.4':
- resolution: {integrity: sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==}
-
- '@types/d3-timer@3.0.2':
- resolution: {integrity: sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==}
-
- '@types/d3-transition@3.0.9':
- resolution: {integrity: sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==}
-
- '@types/d3-zoom@3.0.8':
- resolution: {integrity: sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==}
-
- '@types/d3@7.4.3':
- resolution: {integrity: sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==}
-
'@types/debug@4.1.12':
resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==}
@@ -4861,9 +4664,6 @@ packages:
'@types/fs-extra@11.0.4':
resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==}
- '@types/geojson@7946.0.16':
- resolution: {integrity: sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==}
-
'@types/hast@3.0.4':
resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==}
@@ -5307,21 +5107,6 @@ packages:
vite: ^5.0.0 || ^6.0.0
vue: ^3.2.25
- '@vitest/browser@3.1.1':
- resolution: {integrity: sha512-A+A69mMtrj1RPh96LfXGc309KSXhy2MslvyL+cp9+Y5EVdoJD4KfXDx/3SSlRGN70+hIoJ3RRbTidTvj18PZ/A==}
- peerDependencies:
- playwright: '*'
- safaridriver: '*'
- vitest: 3.1.1
- webdriverio: ^7.0.0 || ^8.0.0 || ^9.0.0
- peerDependenciesMeta:
- playwright:
- optional: true
- safaridriver:
- optional: true
- webdriverio:
- optional: true
-
'@vitest/coverage-v8@3.0.5':
resolution: {integrity: sha512-zOOWIsj5fHh3jjGwQg+P+J1FW3s4jBu1Zqga0qW60yutsBtqEqNEJKWYh7cYn1yGD+1bdPsPdC/eL4eVK56xMg==}
peerDependencies:
@@ -5732,9 +5517,6 @@ packages:
'@xsai/generate-speech@0.2.0-beta.3':
resolution: {integrity: sha512-N1TZxy6GaneaN+ABMjBKcViq0TcxclFiVOcqvITaezApXLxDCeW1rvq2FWQGuVTgY/QYdYyS+nmalItJqPgNfg==}
- '@xsai/generate-text@0.2.0-beta.2':
- resolution: {integrity: sha512-VyvTGvAFmve4bxEuIvLMcxRFqZcj29XV7mZTRxASeOzLvKq3nxEg0hrSkqHyjp5Mimq+9sBQ0TXoYg32APMYUA==}
-
'@xsai/generate-text@0.2.0-beta.3':
resolution: {integrity: sha512-dE01PDM3WDsI9FBzCxOyNQ8uqwae5/Y9hU16iO0DX/HAYSE44zgZ51Yaj3nEmf3idfZq66tswBAYh8eOHuA8Zg==}
@@ -5753,9 +5535,6 @@ packages:
'@xsai/shared@0.2.0-beta.3':
resolution: {integrity: sha512-bpp848WfOCmmkuSePe7czB5Vy1lZxNqV1pSX/N0gZVXxfBQC6wVqkjoScl17v13hsThDbqB6dyrN4ca3mwVBog==}
- '@xsai/stream-text@0.2.0-beta.2':
- resolution: {integrity: sha512-SRgglnMqFkkppjJNmwVPh3/KuIoaF9yLgmHiH4du3gUXQam1wACE0jOVCxkIJiSOLK9AcD8CuTcWQ++dweEjUA==}
-
'@xsai/stream-text@0.2.0-beta.3':
resolution: {integrity: sha512-lIG21bcluBOLatUC6yigkSCB18GcW6hb9vFyj4wiTkzXRB/a4OfUY4lqHsOgpra7p6yLpxjJIPDBY1hBZalTBQ==}
@@ -5765,9 +5544,6 @@ packages:
'@xsai/tool@0.2.0-beta.3':
resolution: {integrity: sha512-TDxBgvSrUIxYbj6SHi0ToIXq5u0r8pbp7H1u1HsrQT8fJrI5DWAKuBQAxzyHz8FKuZfQwxXSTCVMQojJuQh4Rw==}
- '@xsai/utils-chat@0.2.0-beta.2':
- resolution: {integrity: sha512-xqCbqDr9FIXasxGKGJgoAaroDhK71mb2EJVBO4ZVAC+1A6AGcp7FgBAWiAgZzeBeHkkZO5mfb67vncHfX8f56A==}
-
'@xsai/utils-chat@0.2.0-beta.3':
resolution: {integrity: sha512-hQFBvItkPyh9WE8tbT5x8hkFlQziOJSPaXXa0RfGNCoHZ2ZXhgEHKwlzZfstpaNZdxjz4yOBLxqnOLoFE325Vw==}
@@ -5846,10 +5622,6 @@ packages:
resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}
engines: {node: '>=8'}
- ansi-styles@5.2.0:
- resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==}
- engines: {node: '>=10'}
-
ansi-styles@6.2.1:
resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==}
engines: {node: '>=12'}
@@ -5901,9 +5673,6 @@ packages:
resolution: {integrity: sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==}
engines: {node: '>=10'}
- aria-query@5.3.0:
- resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==}
-
aria-query@5.3.2:
resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==}
engines: {node: '>= 0.4'}
@@ -6555,133 +6324,6 @@ packages:
resolution: {integrity: sha512-LSnjA6HuIUOlkfKVbzi2OlToZE8OjFi667JWN9qNymXVXzGDmvuP60SSgC+e92sd7B7158f7Fy3Mb6rXS5EDPw==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
- d3-array@3.2.4:
- resolution: {integrity: sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==}
- engines: {node: '>=12'}
-
- d3-axis@3.0.0:
- resolution: {integrity: sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==}
- engines: {node: '>=12'}
-
- d3-brush@3.0.0:
- resolution: {integrity: sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==}
- engines: {node: '>=12'}
-
- d3-chord@3.0.1:
- resolution: {integrity: sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==}
- engines: {node: '>=12'}
-
- d3-color@3.1.0:
- resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==}
- engines: {node: '>=12'}
-
- d3-contour@4.0.2:
- resolution: {integrity: sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==}
- engines: {node: '>=12'}
-
- d3-delaunay@6.0.4:
- resolution: {integrity: sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==}
- engines: {node: '>=12'}
-
- d3-dispatch@3.0.1:
- resolution: {integrity: sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==}
- engines: {node: '>=12'}
-
- d3-drag@3.0.0:
- resolution: {integrity: sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==}
- engines: {node: '>=12'}
-
- d3-dsv@3.0.1:
- resolution: {integrity: sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==}
- engines: {node: '>=12'}
- hasBin: true
-
- d3-ease@3.0.1:
- resolution: {integrity: sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==}
- engines: {node: '>=12'}
-
- d3-fetch@3.0.1:
- resolution: {integrity: sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==}
- engines: {node: '>=12'}
-
- d3-force@3.0.0:
- resolution: {integrity: sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==}
- engines: {node: '>=12'}
-
- d3-format@3.1.0:
- resolution: {integrity: sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==}
- engines: {node: '>=12'}
-
- d3-geo@3.1.1:
- resolution: {integrity: sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==}
- engines: {node: '>=12'}
-
- d3-hierarchy@3.1.2:
- resolution: {integrity: sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==}
- engines: {node: '>=12'}
-
- d3-interpolate@3.0.1:
- resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==}
- engines: {node: '>=12'}
-
- d3-path@3.1.0:
- resolution: {integrity: sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==}
- engines: {node: '>=12'}
-
- d3-polygon@3.0.1:
- resolution: {integrity: sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==}
- engines: {node: '>=12'}
-
- d3-quadtree@3.0.1:
- resolution: {integrity: sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==}
- engines: {node: '>=12'}
-
- d3-random@3.0.1:
- resolution: {integrity: sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==}
- engines: {node: '>=12'}
-
- d3-scale-chromatic@3.1.0:
- resolution: {integrity: sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==}
- engines: {node: '>=12'}
-
- d3-scale@4.0.2:
- resolution: {integrity: sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==}
- engines: {node: '>=12'}
-
- d3-selection@3.0.0:
- resolution: {integrity: sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==}
- engines: {node: '>=12'}
-
- d3-shape@3.2.0:
- resolution: {integrity: sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==}
- engines: {node: '>=12'}
-
- d3-time-format@4.1.0:
- resolution: {integrity: sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==}
- engines: {node: '>=12'}
-
- d3-time@3.1.0:
- resolution: {integrity: sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==}
- engines: {node: '>=12'}
-
- d3-timer@3.0.1:
- resolution: {integrity: sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==}
- engines: {node: '>=12'}
-
- d3-transition@3.0.1:
- resolution: {integrity: sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==}
- engines: {node: '>=12'}
- peerDependencies:
- d3-selection: 2 - 3
-
- d3-zoom@3.0.0:
- resolution: {integrity: sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==}
- engines: {node: '>=12'}
-
- d3@7.9.0:
- resolution: {integrity: sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==}
- engines: {node: '>=12'}
-
d@1.0.2:
resolution: {integrity: sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==}
engines: {node: '>=0.12'}
@@ -6790,9 +6432,6 @@ packages:
defu@6.1.4:
resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==}
- delaunator@5.0.1:
- resolution: {integrity: sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw==}
-
delayed-stream@1.0.0:
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
engines: {node: '>=0.4.0'}
@@ -6865,9 +6504,6 @@ packages:
resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==}
engines: {node: '>=6.0.0'}
- dom-accessibility-api@0.5.16:
- resolution: {integrity: sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==}
-
dom-serializer@1.4.1:
resolution: {integrity: sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==}
@@ -8121,10 +7757,6 @@ packages:
inline-style-parser@0.2.4:
resolution: {integrity: sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==}
- internmap@2.0.3:
- resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==}
- engines: {node: '>=12'}
-
ip-address@9.0.5:
resolution: {integrity: sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==}
engines: {node: '>= 12'}
@@ -8594,10 +8226,6 @@ packages:
lru-cache@5.1.1:
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
- lz-string@1.5.0:
- resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==}
- hasBin: true
-
macaddress@0.5.3:
resolution: {integrity: sha512-vGBKTA+jwM4KgjGZ+S/8/Mkj9rWzePyGY6jManXPGhiWu63RYwW8dKPyk5koP+8qNVhPhHgFa1y/MJ4wrjsNrg==}
@@ -9946,10 +9574,6 @@ packages:
resolution: {integrity: sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ==}
engines: {node: ^14.13.1 || >=16.0.0}
- pretty-format@27.5.1:
- resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==}
- engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
-
pretty-ms@9.2.0:
resolution: {integrity: sha512-4yf0QO/sllf/1zbZWYnvWw3NxCQwLXKzIj0G849LSufP15BXKM0rbD2Z3wVnkMfjdn/CB0Dpp444gYAACdsplg==}
engines: {node: '>=18'}
@@ -10154,9 +9778,6 @@ packages:
rc9@2.1.2:
resolution: {integrity: sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==}
- react-is@17.0.2:
- resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==}
-
react@18.3.1:
resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==}
engines: {node: '>=0.10.0'}
@@ -10388,9 +10009,6 @@ packages:
resolution: {integrity: sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==}
engines: {node: '>=8.0'}
- robust-predicates@3.0.2:
- resolution: {integrity: sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==}
-
rollup-plugin-dts@6.1.1:
resolution: {integrity: sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==}
engines: {node: '>=16'}
@@ -10432,9 +10050,6 @@ packages:
run-parallel@1.2.0:
resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
- rw@1.3.3:
- resolution: {integrity: sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==}
-
rxjs@7.8.1:
resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==}
@@ -15002,6 +14617,91 @@ snapshots:
'@polka/url@1.0.0-next.24': {}
+ '@proj-airi/drizzle-duckdb-wasm@0.4.20(@types/pg@8.11.11)(gel@2.0.0)(pg@8.14.1)(postgres@3.4.5)(web-worker@1.5.0)':
+ dependencies:
+ '@date-fns/tz': 1.2.0
+ '@duckdb/duckdb-wasm': 1.29.1-dev68.0
+ '@proj-airi/duckdb-wasm': 0.4.20(@types/pg@8.11.11)(gel@2.0.0)(pg@8.14.1)(postgres@3.4.5)(web-worker@1.5.0)
+ apache-arrow: 19.0.1
+ date-fns: 4.1.0
+ defu: 6.1.4
+ drizzle-orm: 0.41.0(@types/pg@8.11.11)(gel@2.0.0)(pg@8.14.1)(postgres@3.4.5)
+ es-toolkit: 1.34.1
+ optionalDependencies:
+ web-worker: 1.5.0
+ transitivePeerDependencies:
+ - '@75lb/nature'
+ - '@aws-sdk/client-rds-data'
+ - '@cloudflare/workers-types'
+ - '@electric-sql/pglite'
+ - '@libsql/client'
+ - '@libsql/client-wasm'
+ - '@neondatabase/serverless'
+ - '@op-engineering/op-sqlite'
+ - '@opentelemetry/api'
+ - '@planetscale/database'
+ - '@prisma/client'
+ - '@tidbcloud/serverless'
+ - '@types/better-sqlite3'
+ - '@types/pg'
+ - '@types/sql.js'
+ - '@vercel/postgres'
+ - '@xata.io/client'
+ - better-sqlite3
+ - bun-types
+ - expo-sqlite
+ - gel
+ - knex
+ - kysely
+ - mysql2
+ - pg
+ - postgres
+ - prisma
+ - sql.js
+ - sqlite3
+
+ '@proj-airi/duckdb-wasm@0.4.20(@types/pg@8.11.11)(gel@2.0.0)(pg@8.14.1)(postgres@3.4.5)(web-worker@1.5.0)':
+ dependencies:
+ '@date-fns/tz': 1.2.0
+ '@duckdb/duckdb-wasm': 1.29.1-dev68.0
+ apache-arrow: 19.0.1
+ date-fns: 4.1.0
+ defu: 6.1.4
+ drizzle-orm: 0.41.0(@types/pg@8.11.11)(gel@2.0.0)(pg@8.14.1)(postgres@3.4.5)
+ es-toolkit: 1.34.1
+ optionalDependencies:
+ web-worker: 1.5.0
+ transitivePeerDependencies:
+ - '@75lb/nature'
+ - '@aws-sdk/client-rds-data'
+ - '@cloudflare/workers-types'
+ - '@electric-sql/pglite'
+ - '@libsql/client'
+ - '@libsql/client-wasm'
+ - '@neondatabase/serverless'
+ - '@op-engineering/op-sqlite'
+ - '@opentelemetry/api'
+ - '@planetscale/database'
+ - '@prisma/client'
+ - '@tidbcloud/serverless'
+ - '@types/better-sqlite3'
+ - '@types/pg'
+ - '@types/sql.js'
+ - '@vercel/postgres'
+ - '@xata.io/client'
+ - better-sqlite3
+ - bun-types
+ - expo-sqlite
+ - gel
+ - knex
+ - kysely
+ - mysql2
+ - pg
+ - postgres
+ - prisma
+ - sql.js
+ - sqlite3
+
'@proj-airi/lobe-icons@1.0.5': {}
'@proj-airi/server-sdk@0.4.19':
@@ -15416,21 +15116,6 @@ snapshots:
dependencies:
'@tauri-apps/api': 2.4.1
- '@testing-library/dom@10.4.0':
- dependencies:
- '@babel/code-frame': 7.26.2
- '@babel/runtime': 7.26.7
- '@types/aria-query': 5.0.4
- aria-query: 5.3.0
- chalk: 4.1.2
- dom-accessibility-api: 0.5.16
- lz-string: 1.5.0
- pretty-format: 27.5.1
-
- '@testing-library/user-event@14.6.1(@testing-library/dom@10.4.0)':
- dependencies:
- '@testing-library/dom': 10.4.0
-
'@tokenizer/token@0.3.0': {}
'@tresjs/cientos@4.3.0(@tresjs/core@4.3.3(three@0.175.0)(typescript@5.8.3)(vue@3.5.13(typescript@5.8.3)))(@types/three@0.175.0)(react@18.3.1)(three@0.175.0)(typescript@5.8.3)(vue@3.5.13(typescript@5.8.3))':
@@ -15473,8 +15158,6 @@ snapshots:
dependencies:
'@types/estree': 1.0.7
- '@types/aria-query@5.0.4': {}
-
'@types/babel__core@7.20.5':
dependencies:
'@babel/parser': 7.26.10
@@ -15520,123 +15203,6 @@ snapshots:
'@types/culori@2.1.1': {}
- '@types/d3-array@3.2.1': {}
-
- '@types/d3-axis@3.0.6':
- dependencies:
- '@types/d3-selection': 3.0.11
-
- '@types/d3-brush@3.0.6':
- dependencies:
- '@types/d3-selection': 3.0.11
-
- '@types/d3-chord@3.0.6': {}
-
- '@types/d3-color@3.1.3': {}
-
- '@types/d3-contour@3.0.6':
- dependencies:
- '@types/d3-array': 3.2.1
- '@types/geojson': 7946.0.16
-
- '@types/d3-delaunay@6.0.4': {}
-
- '@types/d3-dispatch@3.0.6': {}
-
- '@types/d3-drag@3.0.7':
- dependencies:
- '@types/d3-selection': 3.0.11
-
- '@types/d3-dsv@3.0.7': {}
-
- '@types/d3-ease@3.0.2': {}
-
- '@types/d3-fetch@3.0.7':
- dependencies:
- '@types/d3-dsv': 3.0.7
-
- '@types/d3-force@3.0.10': {}
-
- '@types/d3-format@3.0.4': {}
-
- '@types/d3-geo@3.1.0':
- dependencies:
- '@types/geojson': 7946.0.16
-
- '@types/d3-hierarchy@3.1.7': {}
-
- '@types/d3-interpolate@3.0.4':
- dependencies:
- '@types/d3-color': 3.1.3
-
- '@types/d3-path@3.1.1': {}
-
- '@types/d3-polygon@3.0.2': {}
-
- '@types/d3-quadtree@3.0.6': {}
-
- '@types/d3-random@3.0.3': {}
-
- '@types/d3-scale-chromatic@3.1.0': {}
-
- '@types/d3-scale@4.0.9':
- dependencies:
- '@types/d3-time': 3.0.4
-
- '@types/d3-selection@3.0.11': {}
-
- '@types/d3-shape@3.1.7':
- dependencies:
- '@types/d3-path': 3.1.1
-
- '@types/d3-time-format@4.0.3': {}
-
- '@types/d3-time@3.0.4': {}
-
- '@types/d3-timer@3.0.2': {}
-
- '@types/d3-transition@3.0.9':
- dependencies:
- '@types/d3-selection': 3.0.11
-
- '@types/d3-zoom@3.0.8':
- dependencies:
- '@types/d3-interpolate': 3.0.4
- '@types/d3-selection': 3.0.11
-
- '@types/d3@7.4.3':
- dependencies:
- '@types/d3-array': 3.2.1
- '@types/d3-axis': 3.0.6
- '@types/d3-brush': 3.0.6
- '@types/d3-chord': 3.0.6
- '@types/d3-color': 3.1.3
- '@types/d3-contour': 3.0.6
- '@types/d3-delaunay': 6.0.4
- '@types/d3-dispatch': 3.0.6
- '@types/d3-drag': 3.0.7
- '@types/d3-dsv': 3.0.7
- '@types/d3-ease': 3.0.2
- '@types/d3-fetch': 3.0.7
- '@types/d3-force': 3.0.10
- '@types/d3-format': 3.0.4
- '@types/d3-geo': 3.1.0
- '@types/d3-hierarchy': 3.1.7
- '@types/d3-interpolate': 3.0.4
- '@types/d3-path': 3.1.1
- '@types/d3-polygon': 3.0.2
- '@types/d3-quadtree': 3.0.6
- '@types/d3-random': 3.0.3
- '@types/d3-scale': 4.0.9
- '@types/d3-scale-chromatic': 3.1.0
- '@types/d3-selection': 3.0.11
- '@types/d3-shape': 3.1.7
- '@types/d3-time': 3.0.4
- '@types/d3-time-format': 4.0.3
- '@types/d3-timer': 3.0.2
- '@types/d3-transition': 3.0.9
- '@types/d3-zoom': 3.0.8
-
'@types/debug@4.1.12':
dependencies:
'@types/ms': 0.7.34
@@ -15665,8 +15231,6 @@ snapshots:
'@types/jsonfile': 6.1.4
'@types/node': 22.14.0
- '@types/geojson@7946.0.16': {}
-
'@types/hast@3.0.4':
dependencies:
'@types/unist': 3.0.0
@@ -16236,25 +15800,6 @@ snapshots:
vite: 6.2.5(@types/node@22.14.0)(jiti@2.4.2)(less@4.2.2)(terser@5.17.6)(tsx@4.19.3)(yaml@2.7.0)
vue: 3.5.13(typescript@5.8.3)
- '@vitest/browser@3.1.1(bufferutil@4.0.9)(msw@2.7.3(@types/node@22.14.0)(typescript@5.8.3))(playwright@1.51.1)(utf-8-validate@5.0.10)(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(less@4.2.2)(terser@5.17.6)(tsx@4.19.3)(yaml@2.7.0))(vitest@3.1.1)':
- dependencies:
- '@testing-library/dom': 10.4.0
- '@testing-library/user-event': 14.6.1(@testing-library/dom@10.4.0)
- '@vitest/mocker': 3.1.1(msw@2.7.3(@types/node@22.14.0)(typescript@5.8.3))(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(less@4.2.2)(terser@5.17.6)(tsx@4.19.3)(yaml@2.7.0))
- '@vitest/utils': 3.1.1
- magic-string: 0.30.17
- sirv: 3.0.1
- tinyrainbow: 2.0.0
- vitest: 3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(@vitest/browser@3.1.1)(jiti@2.4.2)(jsdom@25.0.1(bufferutil@4.0.9)(utf-8-validate@5.0.10))(less@4.2.2)(msw@2.7.3(@types/node@22.14.0)(typescript@5.8.3))(terser@5.17.6)(tsx@4.19.3)(yaml@2.7.0)
- ws: 8.18.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)
- optionalDependencies:
- playwright: 1.51.1
- transitivePeerDependencies:
- - bufferutil
- - msw
- - utf-8-validate
- - vite
-
'@vitest/coverage-v8@3.0.5(vitest@3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(jsdom@25.0.1(bufferutil@4.0.9)(utf-8-validate@5.0.10))(less@4.2.2)(msw@2.7.3(@types/node@22.14.0)(typescript@5.8.3))(terser@5.17.6)(tsx@4.19.3)(yaml@2.7.0))':
dependencies:
'@ampproject/remapping': 2.3.0
@@ -16269,7 +15814,7 @@ snapshots:
std-env: 3.8.1
test-exclude: 7.0.1
tinyrainbow: 2.0.0
- vitest: 3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(@vitest/browser@3.1.1)(jiti@2.4.2)(jsdom@25.0.1(bufferutil@4.0.9)(utf-8-validate@5.0.10))(less@4.2.2)(msw@2.7.3(@types/node@22.14.0)(typescript@5.8.3))(terser@5.17.6)(tsx@4.19.3)(yaml@2.7.0)
+ vitest: 3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(jsdom@25.0.1(bufferutil@4.0.9)(utf-8-validate@5.0.10))(less@4.2.2)(msw@2.7.3(@types/node@22.14.0)(typescript@5.8.3))(terser@5.17.6)(tsx@4.19.3)(yaml@2.7.0)
transitivePeerDependencies:
- supports-color
@@ -16279,7 +15824,7 @@ snapshots:
eslint: 9.24.0(jiti@2.4.2)
optionalDependencies:
typescript: 5.8.3
- vitest: 3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(@vitest/browser@3.1.1)(jiti@2.4.2)(jsdom@25.0.1(bufferutil@4.0.9)(utf-8-validate@5.0.10))(less@4.2.2)(msw@2.7.3(@types/node@22.14.0)(typescript@5.8.3))(terser@5.17.6)(tsx@4.19.3)(yaml@2.7.0)
+ vitest: 3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(jsdom@25.0.1(bufferutil@4.0.9)(utf-8-validate@5.0.10))(less@4.2.2)(msw@2.7.3(@types/node@22.14.0)(typescript@5.8.3))(terser@5.17.6)(tsx@4.19.3)(yaml@2.7.0)
'@vitest/expect@3.1.1':
dependencies:
@@ -16892,11 +16437,6 @@ snapshots:
dependencies:
'@xsai/shared': 0.2.0-beta.3
- '@xsai/generate-text@0.2.0-beta.2':
- dependencies:
- '@xsai/shared': 0.2.0-beta.3
- '@xsai/shared-chat': 0.2.0-beta.3
-
'@xsai/generate-text@0.2.0-beta.3':
dependencies:
'@xsai/shared': 0.2.0-beta.3
@@ -16918,10 +16458,6 @@ snapshots:
'@xsai/shared@0.2.0-beta.3': {}
- '@xsai/stream-text@0.2.0-beta.2':
- dependencies:
- '@xsai/shared-chat': 0.2.0-beta.3
-
'@xsai/stream-text@0.2.0-beta.3':
dependencies:
'@xsai/shared-chat': 0.2.0-beta.3
@@ -16948,10 +16484,6 @@ snapshots:
- effect
- zod-to-json-schema
- '@xsai/utils-chat@0.2.0-beta.2':
- dependencies:
- '@xsai/shared-chat': 0.2.0-beta.3
-
'@xsai/utils-chat@0.2.0-beta.3':
dependencies:
'@xsai/shared-chat': 0.2.0-beta.3
@@ -17037,8 +16569,6 @@ snapshots:
dependencies:
color-convert: 2.0.1
- ansi-styles@5.2.0: {}
-
ansi-styles@6.2.1: {}
ansis@3.17.0: {}
@@ -17101,10 +16631,6 @@ snapshots:
dependencies:
tslib: 2.8.1
- aria-query@5.3.0:
- dependencies:
- dequal: 2.0.3
-
aria-query@5.3.2: {}
array-back@3.1.0: {}
@@ -17931,158 +17457,6 @@ snapshots:
culori@4.0.1: {}
- d3-array@3.2.4:
- dependencies:
- internmap: 2.0.3
-
- d3-axis@3.0.0: {}
-
- d3-brush@3.0.0:
- dependencies:
- d3-dispatch: 3.0.1
- d3-drag: 3.0.0
- d3-interpolate: 3.0.1
- d3-selection: 3.0.0
- d3-transition: 3.0.1(d3-selection@3.0.0)
-
- d3-chord@3.0.1:
- dependencies:
- d3-path: 3.1.0
-
- d3-color@3.1.0: {}
-
- d3-contour@4.0.2:
- dependencies:
- d3-array: 3.2.4
-
- d3-delaunay@6.0.4:
- dependencies:
- delaunator: 5.0.1
-
- d3-dispatch@3.0.1: {}
-
- d3-drag@3.0.0:
- dependencies:
- d3-dispatch: 3.0.1
- d3-selection: 3.0.0
-
- d3-dsv@3.0.1:
- dependencies:
- commander: 7.2.0
- iconv-lite: 0.6.3
- rw: 1.3.3
-
- d3-ease@3.0.1: {}
-
- d3-fetch@3.0.1:
- dependencies:
- d3-dsv: 3.0.1
-
- d3-force@3.0.0:
- dependencies:
- d3-dispatch: 3.0.1
- d3-quadtree: 3.0.1
- d3-timer: 3.0.1
-
- d3-format@3.1.0: {}
-
- d3-geo@3.1.1:
- dependencies:
- d3-array: 3.2.4
-
- d3-hierarchy@3.1.2: {}
-
- d3-interpolate@3.0.1:
- dependencies:
- d3-color: 3.1.0
-
- d3-path@3.1.0: {}
-
- d3-polygon@3.0.1: {}
-
- d3-quadtree@3.0.1: {}
-
- d3-random@3.0.1: {}
-
- d3-scale-chromatic@3.1.0:
- dependencies:
- d3-color: 3.1.0
- d3-interpolate: 3.0.1
-
- d3-scale@4.0.2:
- dependencies:
- d3-array: 3.2.4
- d3-format: 3.1.0
- d3-interpolate: 3.0.1
- d3-time: 3.1.0
- d3-time-format: 4.1.0
-
- d3-selection@3.0.0: {}
-
- d3-shape@3.2.0:
- dependencies:
- d3-path: 3.1.0
-
- d3-time-format@4.1.0:
- dependencies:
- d3-time: 3.1.0
-
- d3-time@3.1.0:
- dependencies:
- d3-array: 3.2.4
-
- d3-timer@3.0.1: {}
-
- d3-transition@3.0.1(d3-selection@3.0.0):
- dependencies:
- d3-color: 3.1.0
- d3-dispatch: 3.0.1
- d3-ease: 3.0.1
- d3-interpolate: 3.0.1
- d3-selection: 3.0.0
- d3-timer: 3.0.1
-
- d3-zoom@3.0.0:
- dependencies:
- d3-dispatch: 3.0.1
- d3-drag: 3.0.0
- d3-interpolate: 3.0.1
- d3-selection: 3.0.0
- d3-transition: 3.0.1(d3-selection@3.0.0)
-
- d3@7.9.0:
- dependencies:
- d3-array: 3.2.4
- d3-axis: 3.0.0
- d3-brush: 3.0.0
- d3-chord: 3.0.1
- d3-color: 3.1.0
- d3-contour: 4.0.2
- d3-delaunay: 6.0.4
- d3-dispatch: 3.0.1
- d3-drag: 3.0.0
- d3-dsv: 3.0.1
- d3-ease: 3.0.1
- d3-fetch: 3.0.1
- d3-force: 3.0.0
- d3-format: 3.1.0
- d3-geo: 3.1.1
- d3-hierarchy: 3.1.2
- d3-interpolate: 3.0.1
- d3-path: 3.1.0
- d3-polygon: 3.0.1
- d3-quadtree: 3.0.1
- d3-random: 3.0.1
- d3-scale: 4.0.2
- d3-scale-chromatic: 3.1.0
- d3-selection: 3.0.0
- d3-shape: 3.2.0
- d3-time: 3.1.0
- d3-time-format: 4.1.0
- d3-timer: 3.0.1
- d3-transition: 3.0.1(d3-selection@3.0.0)
- d3-zoom: 3.0.0
-
d@1.0.2:
dependencies:
es5-ext: 0.10.64
@@ -18156,10 +17530,6 @@ snapshots:
defu@6.1.4: {}
- delaunator@5.0.1:
- dependencies:
- robust-predicates: 3.0.2
-
delayed-stream@1.0.0: {}
delegates@1.0.0:
@@ -18224,8 +17594,6 @@ snapshots:
dependencies:
esutils: 2.0.3
- dom-accessibility-api@0.5.16: {}
-
dom-serializer@1.4.1:
dependencies:
domelementtype: 2.3.0
@@ -19981,8 +19349,6 @@ snapshots:
inline-style-parser@0.2.4: {}
- internmap@2.0.3: {}
-
ip-address@9.0.5:
dependencies:
jsbn: 1.1.0
@@ -20456,8 +19822,6 @@ snapshots:
dependencies:
yallist: 3.1.1
- lz-string@1.5.0: {}
-
macaddress@0.5.3: {}
magic-bytes.js@1.10.0: {}
@@ -21342,12 +20706,12 @@ snapshots:
neuri@0.1.3(zod-to-json-schema@3.24.5(zod@3.24.2)):
dependencies:
'@guiiai/logg': 1.0.7
- '@xsai/generate-text': 0.2.0-beta.2
+ '@xsai/generate-text': 0.2.0-beta.3
'@xsai/shared': 0.2.0-beta.2
'@xsai/shared-chat': 0.2.0-beta.3
- '@xsai/stream-text': 0.2.0-beta.2
+ '@xsai/stream-text': 0.2.0-beta.3
'@xsai/tool': 0.2.0-beta.2(zod-to-json-schema@3.24.5(zod@3.24.2))
- '@xsai/utils-chat': 0.2.0-beta.2
+ '@xsai/utils-chat': 0.2.0-beta.3
defu: 6.1.4
nanoid: 5.1.5
xsschema: 0.2.0-beta.3(@valibot/to-json-schema@1.0.0-rc.0(valibot@1.0.0-beta.9(typescript@5.8.3)))(zod-to-json-schema@3.24.5(zod@3.24.2))
@@ -22208,12 +21572,6 @@ snapshots:
pretty-bytes@6.1.1: {}
- pretty-format@27.5.1:
- dependencies:
- ansi-regex: 5.0.1
- ansi-styles: 5.2.0
- react-is: 17.0.2
-
pretty-ms@9.2.0:
dependencies:
parse-ms: 4.0.0
@@ -22517,8 +21875,6 @@ snapshots:
defu: 6.1.4
destr: 2.0.3
- react-is@17.0.2: {}
-
react@18.3.1:
dependencies:
loose-envify: 1.4.0
@@ -22869,8 +22225,6 @@ snapshots:
sprintf-js: 1.1.3
optional: true
- robust-predicates@3.0.2: {}
-
rollup-plugin-dts@6.1.1(rollup@4.39.0)(typescript@5.8.3):
dependencies:
magic-string: 0.30.17
@@ -22941,8 +22295,6 @@ snapshots:
dependencies:
queue-microtask: 1.2.3
- rw@1.3.3: {}
-
rxjs@7.8.1:
dependencies:
tslib: 2.8.1
@@ -24557,7 +23909,7 @@ snapshots:
optionalDependencies:
vite: 6.2.5(@types/node@22.14.0)(jiti@2.4.2)(less@4.2.2)(terser@5.17.6)(tsx@4.19.3)(yaml@2.7.0)
- vitest@3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(@vitest/browser@3.1.1)(jiti@2.4.2)(jsdom@25.0.1(bufferutil@4.0.9)(utf-8-validate@5.0.10))(less@4.2.2)(msw@2.7.3(@types/node@22.14.0)(typescript@5.8.3))(terser@5.17.6)(tsx@4.19.3)(yaml@2.7.0):
+ vitest@3.1.1(@types/debug@4.1.12)(@types/node@22.14.0)(jiti@2.4.2)(jsdom@25.0.1(bufferutil@4.0.9)(utf-8-validate@5.0.10))(less@4.2.2)(msw@2.7.3(@types/node@22.14.0)(typescript@5.8.3))(terser@5.17.6)(tsx@4.19.3)(yaml@2.7.0):
dependencies:
'@vitest/expect': 3.1.1
'@vitest/mocker': 3.1.1(msw@2.7.3(@types/node@22.14.0)(typescript@5.8.3))(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(less@4.2.2)(terser@5.17.6)(tsx@4.19.3)(yaml@2.7.0))
@@ -24582,7 +23934,6 @@ snapshots:
optionalDependencies:
'@types/debug': 4.1.12
'@types/node': 22.14.0
- '@vitest/browser': 3.1.1(bufferutil@4.0.9)(msw@2.7.3(@types/node@22.14.0)(typescript@5.8.3))(playwright@1.51.1)(utf-8-validate@5.0.10)(vite@6.2.5(@types/node@22.14.0)(jiti@2.4.2)(less@4.2.2)(terser@5.17.6)(tsx@4.19.3)(yaml@2.7.0))(vitest@3.1.1)
jsdom: 25.0.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)
transitivePeerDependencies:
- jiti
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 8e738a546..4279b7d3b 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -7,6 +7,7 @@ packages:
- '!**/dist/**'
catalog:
+ '@proj-airi/drizzle-duckdb-wasm': ^0.4.20
'@xsai/shared': &xsai ^0.2.0-beta.3
'@xsai-ext/providers-cloud': *xsai
'@xsai-ext/providers-local': *xsai