diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 518d7e10..90762c82 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,148 +1,148 @@ name: "CI" on: - push: - branches: ["main"] - pull_request: + push: + branches: ["main"] + pull_request: jobs: - "wasm-test": - name: "Build and test Wasm on Node.js" - runs-on: ubuntu-latest - defaults: - run: - working-directory: ./packages/libsql-client-wasm - env: {"NODE_OPTIONS": "--trace-warnings"} - steps: - - name: "Checkout this repo" - uses: actions/checkout@v3 - - name: "Setup Node.js" - uses: actions/setup-node@v3 - with: - node-version: "18.x" - cache: "npm" - cache-dependency-path: "packages/libsql-client-wasm" - - name: "Build core" - run: "npm ci && npm run build" - working-directory: ./packages/libsql-core - - name: "Install npm dependencies" - run: "npm ci" - - name: "Build" - run: "npm run build" - - name: "Test example" - run: "cd examples/node && npm i && node index.js" - env: {"URL": "file:///tmp/example.db"} + "wasm-test": + name: "Build and test Wasm on Node.js" + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./packages/libsql-client-wasm + env: { "NODE_OPTIONS": "--trace-warnings" } + steps: + - name: "Checkout this repo" + uses: actions/checkout@v3 + - name: "Setup Node.js" + uses: actions/setup-node@v3 + with: + node-version: "18.x" + cache: "npm" + cache-dependency-path: "packages/libsql-client-wasm" + - name: "Build core" + run: "npm ci && npm run build" + working-directory: ./packages/libsql-core + - name: "Install npm dependencies" + run: "npm ci" + - name: "Build" + run: "npm run build" + - name: "Test example" + run: "cd examples/node && npm i && node index.js" + env: { "URL": "file:///tmp/example.db" } - "node-test": - name: "Build and test on Node.js" - runs-on: ubuntu-latest - defaults: - run: - working-directory: ./packages/libsql-client - env: {"NODE_OPTIONS": "--trace-warnings"} - steps: - - name: "Checkout this repo" - uses: actions/checkout@v3 - - name: "Setup Node.js" - uses: actions/setup-node@v3 - with: - node-version: "18.x" - cache: "npm" - cache-dependency-path: "packages/libsql-client" - - name: "Build core" - run: "npm ci && npm run build" - working-directory: ./packages/libsql-core - - name: "Install npm dependencies" - run: "npm ci" - - name: "Checkout hrana-test-server" - uses: actions/checkout@v3 - with: - repository: "libsql/hrana-test-server" - path: "packages/libsql-client/hrana-test-server" - - name: "Setup Python" - uses: actions/setup-python@v4 - with: - python-version: "3.10" - cache: "pip" - - name: "Install pip dependencies" - run: "pip install -r hrana-test-server/requirements.txt" + "node-test": + name: "Build and test on Node.js" + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./packages/libsql-client + env: { "NODE_OPTIONS": "--trace-warnings" } + steps: + - name: "Checkout this repo" + uses: actions/checkout@v3 + - name: "Setup Node.js" + uses: actions/setup-node@v3 + with: + node-version: "18.x" + cache: "npm" + cache-dependency-path: "packages/libsql-client" + - name: "Build core" + run: "npm ci && npm run build" + working-directory: ./packages/libsql-core + - name: "Install npm dependencies" + run: "npm ci" + - name: "Checkout hrana-test-server" + uses: actions/checkout@v3 + with: + repository: "libsql/hrana-test-server" + path: "packages/libsql-client/hrana-test-server" + - name: "Setup Python" + uses: actions/setup-python@v4 + with: + python-version: "3.10" + cache: "pip" + - name: "Install pip dependencies" + run: "pip install -r hrana-test-server/requirements.txt" - - name: "Build" - run: "npm run build" + - name: "Build" + run: "npm run build" - - name: "Test Hrana 1 over WebSocket" - run: "python hrana-test-server/server_v1.py npm test" - env: {"URL": "ws://localhost:8080", "SERVER": "test_v1"} - - name: "Test Hrana 2 over WebSocket" - run: "python hrana-test-server/server_v2.py npm test" - env: {"URL": "ws://localhost:8080", "SERVER": "test_v2"} - - name: "Test Hrana 2 over HTTP" - run: "python hrana-test-server/server_v2.py npm test" - env: {"URL": "http://localhost:8080", "SERVER": "test_v2"} -# - name: "Test Hrana 3 over WebSocket" -# run: "python hrana-test-server/server_v3.py npm test" -# env: {"URL": "ws://localhost:8080", "SERVER": "test_v3"} -# - name: "Test Hrana 3 over HTTP" -# run: "python hrana-test-server/server_v3.py npm test" -# env: {"URL": "http://localhost:8080", "SERVER": "test_v3"} - - name: "Test local file" - run: "npm test" - env: {"URL": "file:///tmp/test.db"} + - name: "Test Hrana 1 over WebSocket" + run: "python hrana-test-server/server_v1.py npm test" + env: { "URL": "ws://localhost:8080", "SERVER": "test_v1" } + - name: "Test Hrana 2 over WebSocket" + run: "python hrana-test-server/server_v2.py npm test" + env: { "URL": "ws://localhost:8080", "SERVER": "test_v2" } + - name: "Test Hrana 2 over HTTP" + run: "python hrana-test-server/server_v2.py npm test" + env: { "URL": "http://localhost:8080", "SERVER": "test_v2" } + # - name: "Test Hrana 3 over WebSocket" + # run: "python hrana-test-server/server_v3.py npm test" + # env: {"URL": "ws://localhost:8080", "SERVER": "test_v3"} + # - name: "Test Hrana 3 over HTTP" + # run: "python hrana-test-server/server_v3.py npm test" + # env: {"URL": "http://localhost:8080", "SERVER": "test_v3"} + - name: "Test local file" + run: "npm test" + env: { "URL": "file:///tmp/test.db" } - - name: "Test example" - run: "cd examples && npm i && node example.js" - env: {"URL": "file:///tmp/example.db"} + - name: "Test example" + run: "cd examples && npm i && node example.js" + env: { "URL": "file:///tmp/example.db" } - "workers-test": - name: "Build and test with Cloudflare Workers" - runs-on: ubuntu-latest - defaults: - run: - working-directory: ./packages/libsql-client - env: - "CLOUDFLARE_API_TOKEN": "${{ secrets.CLOUDFLARE_API_TOKEN }}" - "CLOUDFLARE_ACCOUNT_ID": "${{ secrets.CLOUDFLARE_ACCOUNT_ID }}" - steps: - - name: "Checkout this repo" - uses: actions/checkout@v3 - - name: "Setup Node.js" - uses: actions/setup-node@v3 - with: - node-version: "lts/Hydrogen" - cache: "npm" - cache-dependency-path: "packages/libsql-client" - - name: "Build core" - run: "npm ci && npm run build" - working-directory: ./packages/libsql-core - - name: "Install npm dependencies" - run: "npm ci" + "workers-test": + name: "Build and test with Cloudflare Workers" + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./packages/libsql-client + env: + "CLOUDFLARE_API_TOKEN": "${{ secrets.CLOUDFLARE_API_TOKEN }}" + "CLOUDFLARE_ACCOUNT_ID": "${{ secrets.CLOUDFLARE_ACCOUNT_ID }}" + steps: + - name: "Checkout this repo" + uses: actions/checkout@v3 + - name: "Setup Node.js" + uses: actions/setup-node@v3 + with: + node-version: "lts/Hydrogen" + cache: "npm" + cache-dependency-path: "packages/libsql-client" + - name: "Build core" + run: "npm ci && npm run build" + working-directory: ./packages/libsql-core + - name: "Install npm dependencies" + run: "npm ci" - - name: "Checkout hrana-test-server" - uses: actions/checkout@v3 - with: - repository: "libsql/hrana-test-server" - path: "packages/libsql-client/hrana-test-server" - - name: "Setup Python" - uses: actions/setup-python@v4 - with: - python-version: "3.10" - cache: "pip" - - name: "Install pip dependencies" - run: "pip install -r hrana-test-server/requirements.txt" + - name: "Checkout hrana-test-server" + uses: actions/checkout@v3 + with: + repository: "libsql/hrana-test-server" + path: "packages/libsql-client/hrana-test-server" + - name: "Setup Python" + uses: actions/setup-python@v4 + with: + python-version: "3.10" + cache: "pip" + - name: "Install pip dependencies" + run: "pip install -r hrana-test-server/requirements.txt" - - name: "Build" - run: "npm run build" - - name: "Install npm dependencies of the Workers test" - run: "cd smoke_test/workers && npm link ../.." + - name: "Build" + run: "npm run build" + - name: "Install npm dependencies of the Workers test" + run: "cd smoke_test/workers && npm link ../.." - - name: "Local test with Hrana 1 over WebSocket" - run: "cd smoke_test/workers && python ../../hrana-test-server/server_v1.py node --dns-result-order=ipv4first test.js" - env: {"LOCAL": "1", "URL": "ws://localhost:8080"} - - name: "Local test with Hrana 2 over WebSocket" - run: "cd smoke_test/workers && python ../../hrana-test-server/server_v2.py node --dns-result-order=ipv4first test.js" - env: {"LOCAL": "1", "URL": "ws://localhost:8080"} - - name: "Local test with Hrana 2 over HTTP" - run: "cd smoke_test/workers && python ../../hrana-test-server/server_v2.py node --dns-result-order=ipv4first test.js" - env: {"LOCAL": "1", "URL": "http://localhost:8080"} + - name: "Local test with Hrana 1 over WebSocket" + run: "cd smoke_test/workers && python ../../hrana-test-server/server_v1.py node --dns-result-order=ipv4first test.js" + env: { "LOCAL": "1", "URL": "ws://localhost:8080" } + - name: "Local test with Hrana 2 over WebSocket" + run: "cd smoke_test/workers && python ../../hrana-test-server/server_v2.py node --dns-result-order=ipv4first test.js" + env: { "LOCAL": "1", "URL": "ws://localhost:8080" } + - name: "Local test with Hrana 2 over HTTP" + run: "cd smoke_test/workers && python ../../hrana-test-server/server_v2.py node --dns-result-order=ipv4first test.js" + env: { "LOCAL": "1", "URL": "http://localhost:8080" } # - name: "Local test with Hrana 3 over WebSocket" # run: "cd smoke_test/workers && python ../../hrana-test-server/server_v3.py node --dns-result-order=ipv4first test.js" # env: {"LOCAL": "1", "URL": "ws://localhost:8080"} @@ -150,15 +150,15 @@ jobs: # run: "cd smoke_test/workers && python ../../hrana-test-server/server_v3.py node --dns-result-order=ipv4first test.js" # env: {"LOCAL": "1", "URL": "http://localhost:8080"} - # - name: "Non-local test with Hrana 1 over WebSocket" - # run: "cd smoke_test/workers && python ../../hrana-test-server/server_v1.py node test.js" - # env: {"LOCAL": "0", "URL": "ws://localhost:8080"} - # - name: "Non-local test with Hrana 2 over WebSocket" - # run: "cd smoke_test/workers && python ../../hrana-test-server/server_v2.py node test.js" - # env: {"LOCAL": "0", "URL": "ws://localhost:8080"} - # - name: "Non-local test with Hrana 2 over HTTP" - # run: "cd smoke_test/workers && python ../../hrana-test-server/server_v2.py node test.js" - # env: {"LOCAL": "0", "URL": "http://localhost:8080"} +# - name: "Non-local test with Hrana 1 over WebSocket" +# run: "cd smoke_test/workers && python ../../hrana-test-server/server_v1.py node test.js" +# env: {"LOCAL": "0", "URL": "ws://localhost:8080"} +# - name: "Non-local test with Hrana 2 over WebSocket" +# run: "cd smoke_test/workers && python ../../hrana-test-server/server_v2.py node test.js" +# env: {"LOCAL": "0", "URL": "ws://localhost:8080"} +# - name: "Non-local test with Hrana 2 over HTTP" +# run: "cd smoke_test/workers && python ../../hrana-test-server/server_v2.py node test.js" +# env: {"LOCAL": "0", "URL": "http://localhost:8080"} # - name: "Non-local test with Hrana 3 over WebSocket" # run: "cd smoke_test/workers && python ../../hrana-test-server/server_v3.py node test.js" # env: {"LOCAL": "0", "URL": "ws://localhost:8080"} diff --git a/.github/workflows/pages.yaml b/.github/workflows/pages.yaml index 82a17f38..d02d3aca 100644 --- a/.github/workflows/pages.yaml +++ b/.github/workflows/pages.yaml @@ -1,47 +1,45 @@ name: "GitHub Pages" on: - push: - branches: ["main"] + push: + branches: ["main"] jobs: - "build": - name: "Build the docs" - runs-on: ubuntu-latest - defaults: - run: - working-directory: ./packages/libsql-client - steps: - - name: "Checkout this repo" - uses: actions/checkout@v3 - - name: "Setup Node.js" - uses: actions/setup-node@v3 - with: - node-version: "${{ matrix.node-version }}" - cache: "npm" - - name: "Install npm dependencies" - run: "npm ci" - - name: "Build" - run: "npm run typedoc" - - name: "Upload GitHub Pages artifact" - uses: actions/upload-pages-artifact@v1 - with: - path: "./docs" + "build": + name: "Build the docs" + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./packages/libsql-client + steps: + - name: "Checkout this repo" + uses: actions/checkout@v3 + - name: "Setup Node.js" + uses: actions/setup-node@v3 + with: + node-version: "${{ matrix.node-version }}" + cache: "npm" + - name: "Install npm dependencies" + run: "npm ci" + - name: "Build" + run: "npm run typedoc" + - name: "Upload GitHub Pages artifact" + uses: actions/upload-pages-artifact@v1 + with: + path: "./docs" - "deploy": - name: "Deploy the docs to GitHub Pages" - needs: "build" - permissions: - pages: write - id-token: write - - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - - runs-on: ubuntu-latest - steps: - - name: "Deploy to GitHub Pages" - id: deployment - uses: actions/deploy-pages@v1 + "deploy": + name: "Deploy the docs to GitHub Pages" + needs: "build" + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: "Deploy to GitHub Pages" + id: deployment + uses: actions/deploy-pages@v1 diff --git a/.husky/install.mjs b/.husky/install.mjs index ba8e33dd..941d817e 100644 --- a/.husky/install.mjs +++ b/.husky/install.mjs @@ -1,6 +1,6 @@ // Skip Husky install in production and CI -if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') { - process.exit(0) +if (process.env.NODE_ENV === "production" || process.env.CI === "true") { + process.exit(0); } -const husky = (await import('husky')).default -console.log(husky()) +const husky = (await import("husky")).default; +console.log(husky()); diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..0a02bcef --- /dev/null +++ b/.prettierrc @@ -0,0 +1,3 @@ +{ + "tabWidth": 4 +} diff --git a/CHANGELOG.md b/CHANGELOG.md index bb6d33b6..604cafe7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,101 +2,101 @@ ## 0.6.0 -- 2024-04-28 -* Bump hrana client to 0.6.0, which uses native Node fetch(). Note that - `@libsql/client` now requires Node 18 or later. +- Bump hrana client to 0.6.0, which uses native Node fetch(). Note that + `@libsql/client` now requires Node 18 or later. ## 0.5.6 -- 2024-03-12 -* Bump `libsql` package dependency to 0.3.10 that adds `wasm32` as - supported CPU, which is needed for StackBlitz compatibility. +- Bump `libsql` package dependency to 0.3.10 that adds `wasm32` as + supported CPU, which is needed for StackBlitz compatibility. ## 0.5.5 -- 2024-03-11 -* Bump `@libsql/libsql-wasm-experimental"` dependency to 0.0.2, which - fixes a broken sqlite3_get_autocommit() export. +- Bump `@libsql/libsql-wasm-experimental"` dependency to 0.0.2, which + fixes a broken sqlite3_get_autocommit() export. ## 0.5.4 -- 2024-03-11 -* Bump `libsql` dependency to 0.3.9, which fixes symbol not found errors on Alpine. +- Bump `libsql` dependency to 0.3.9, which fixes symbol not found errors on Alpine. ## 0.5.3 -- 2024-03-06 -* Add `syncInterval` config option to enable periodic sync. -* Bump `libsql` dependency to 0.3.7, which switches default encryption cipher to aes256cbs. +- Add `syncInterval` config option to enable periodic sync. +- Bump `libsql` dependency to 0.3.7, which switches default encryption cipher to aes256cbs. ## 0.5.2 -- 2024-02-24 -* Disable SQL statemen tracing in Wasm. +- Disable SQL statemen tracing in Wasm. ## 0.5.1 -- 2024-02-19 -* Update `libsql` package to 0.3.2, add `encryptionCipher` option, and switch default cipher to SQLCipher. +- Update `libsql` package to 0.3.2, add `encryptionCipher` option, and switch default cipher to SQLCipher. ## 0.5.0 -- 2024-02-15 -* Add a `encryptionKey` config option, which enables encryption at rest for local database files. +- Add a `encryptionKey` config option, which enables encryption at rest for local database files. ## 0.4.0 -- 2024-01-26 -* Update hrana-client package to 0.5.6. -* Add a `@libsql/client-wasm` package. -* Fix Bun on Linux/arm64. +- Update hrana-client package to 0.5.6. +- Add a `@libsql/client-wasm` package. +- Fix Bun on Linux/arm64. ## 0.3.6 -- 2023-10-20 -* Fix import problems on Cloudflare Workers. -* Add `rawCode` property to errors for local databases. -* Update the `libsql` package to version 0.1.28. +- Fix import problems on Cloudflare Workers. +- Add `rawCode` property to errors for local databases. +- Update the `libsql` package to version 0.1.28. ## 0.3.5 -- 2023-09-25 -* Performance improvements for local database access by reusing connection in `Client`. -* Embedded replica support. -* Column introspection support via ResultSet.columnTypes property. +- Performance improvements for local database access by reusing connection in `Client`. +- Embedded replica support. +- Column introspection support via ResultSet.columnTypes property. ## 0.3.4 -- 2023-09-11 -- Switch to Hrana 2 by default to let Hrana 3 cook some more. +- Switch to Hrana 2 by default to let Hrana 3 cook some more. ## 0.3.3 -- 2023-09-11 -- Updated `@libsql/hrana-client` to version 0.5.1, which has Bun support. +- Updated `@libsql/hrana-client` to version 0.5.1, which has Bun support. -- Switched to `libsql` package as a replacement for `better-sqlite3`. +- Switched to `libsql` package as a replacement for `better-sqlite3`. ## 0.3.2 -- 2023-07-29 -- Updated `@libsql/hrana-client` to version 0.5.0, which implements Hrana 3 - - Dropped workarounds for broken WebSocket support in Miniflare 2 -- Added a `@libsql/client/node` import for explicit Node.js-specific module +- Updated `@libsql/hrana-client` to version 0.5.0, which implements Hrana 3 + - Dropped workarounds for broken WebSocket support in Miniflare 2 +- Added a `@libsql/client/node` import for explicit Node.js-specific module ## 0.3.1 -- 2023-07-20 -- Added `ResultSet.toJSON()` to provide better JSON serialization. ([#61](https://github.com/libsql/libsql-client-ts/pull/61)) -- Added conditional exports to `package.json` that redirect the default import of `@libsql/client` to `@libsql/client/web` on a few supported edge platforms. ([#65](https://github.com/libsql/libsql-client-ts/pull/65)) -- Added `Config.fetch` to support overriding the `fetch` implementation from `@libsql/isomorphic-fetch`. ([#66](https://github.com/libsql/libsql-client-ts/pull/66)) +- Added `ResultSet.toJSON()` to provide better JSON serialization. ([#61](https://github.com/libsql/libsql-client-ts/pull/61)) +- Added conditional exports to `package.json` that redirect the default import of `@libsql/client` to `@libsql/client/web` on a few supported edge platforms. ([#65](https://github.com/libsql/libsql-client-ts/pull/65)) +- Added `Config.fetch` to support overriding the `fetch` implementation from `@libsql/isomorphic-fetch`. ([#66](https://github.com/libsql/libsql-client-ts/pull/66)) ## 0.3.0 -- 2023-07-07 -- **Changed the order of parameters to `batch()`**, so that the transaction mode is passed as the second parameter. ([#57](https://github.com/libsql/libsql-client-ts/pull/57)) -- **Changed the default transaction mode to `"deferred"`**. ([#57](https://github.com/libsql/libsql-client-ts/pull/57)) -- Added `Client.protocol` property to find out which protocol the client uses ([#54](https://github.com/libsql/libsql-client-ts/pull/54)). +- **Changed the order of parameters to `batch()`**, so that the transaction mode is passed as the second parameter. ([#57](https://github.com/libsql/libsql-client-ts/pull/57)) +- **Changed the default transaction mode to `"deferred"`**. ([#57](https://github.com/libsql/libsql-client-ts/pull/57)) +- Added `Client.protocol` property to find out which protocol the client uses ([#54](https://github.com/libsql/libsql-client-ts/pull/54)). ## 0.2.2 -- 2023-06-22 -- Added `intMode` field to the `Config`, which chooses whether SQLite integers are represented as numbers, bigints or strings in JavaScript ([#51](https://github.com/libsql/libsql-client-ts/pull/51)). +- Added `intMode` field to the `Config`, which chooses whether SQLite integers are represented as numbers, bigints or strings in JavaScript ([#51](https://github.com/libsql/libsql-client-ts/pull/51)). ## 0.2.1 -- 2023-06-13 -- Added `TransactionMode` argument to `batch()` and `transaction()` ([#46](https://github.com/libsql/libsql-client-ts/pull/46)) -- Added `Client.executeMultiple()` and `Transaction.executeMultiple()` ([#49](https://github.com/libsql/libsql-client-ts/pull/49)) -- Added `Transaction.batch()` ([#49](https://github.com/libsql/libsql-client-ts/pull/49)) -- **Changed the default transaction mode** from `BEGIN DEFERRED` to `BEGIN IMMEDIATE` +- Added `TransactionMode` argument to `batch()` and `transaction()` ([#46](https://github.com/libsql/libsql-client-ts/pull/46)) +- Added `Client.executeMultiple()` and `Transaction.executeMultiple()` ([#49](https://github.com/libsql/libsql-client-ts/pull/49)) +- Added `Transaction.batch()` ([#49](https://github.com/libsql/libsql-client-ts/pull/49)) +- **Changed the default transaction mode** from `BEGIN DEFERRED` to `BEGIN IMMEDIATE` ## 0.2.0 -- 2023-06-07 -- **Added support for interactive transactions over HTTP** by using `@libsql/hrana-client` version 0.4 ([#44](https://github.com/libsql/libsql-client-ts/pull/44)) -- Added `?tls=0` query parameter to turn off TLS for `libsql:` URLs -- Changed the `libsql:` URL to use HTTP instead of WebSockets -- Changed the `Value` type to include `bigint` (so that we can add support for reading integers as bigints in the future, without breaking compatibility) -- Removed the `./hrana` import, added `./ws` to import the WebSocket-only client +- **Added support for interactive transactions over HTTP** by using `@libsql/hrana-client` version 0.4 ([#44](https://github.com/libsql/libsql-client-ts/pull/44)) +- Added `?tls=0` query parameter to turn off TLS for `libsql:` URLs +- Changed the `libsql:` URL to use HTTP instead of WebSockets +- Changed the `Value` type to include `bigint` (so that we can add support for reading integers as bigints in the future, without breaking compatibility) +- Removed the `./hrana` import, added `./ws` to import the WebSocket-only client diff --git a/package-lock.json b/package-lock.json index 91735f44..8c9098fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,4441 +1,4441 @@ { - "name": "libsql-client-ts", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "workspaces": [ - "packages/libsql-core", - "packages/libsql-client", - "packages/libsql-client-wasm" - ], - "dependencies": { - "husky": "^9.0.11", - "lint-staged": "^15.2.2" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.23.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/code-frame/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/code-frame/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/code-frame/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.23.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.23.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.6", - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.23.7", - "@babel/parser": "^7.23.6", - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.7", - "@babel/types": "^7.23.6", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.23.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.23.6", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.23.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.23.5", - "@babel/helper-validator-option": "^7.23.5", - "browserslist": "^4.22.2", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.23.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.22.15", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.15" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.23.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.20" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.23.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.23.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.23.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.7", - "@babel/types": "^7.23.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.23.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.23.6", - "dev": true, - "license": "MIT", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.23.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.23.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/template": { - "version": "7.22.15", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.23.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.6", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.6", - "@babel/types": "^7.23.6", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.23.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "dev": true, - "license": "MIT" - }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/console": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/core": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/reporters": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.7.0", - "jest-config": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-resolve-dependencies": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "jest-watcher": "^29.7.0", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/environment": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "expect": "^29.7.0", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect-utils": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-get-type": "^29.6.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/fake-timers": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@sinonjs/fake-timers": "^10.0.2", - "@types/node": "*", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/globals": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/types": "^29.6.3", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/reporters": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^6.0.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "v8-to-istanbul": "^9.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/schemas": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.27.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/source-map": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-result": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-sequencer": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/transform": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/types": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.21", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@libsql/client": { - "resolved": "packages/libsql-client", - "link": true - }, - "node_modules/@libsql/client-wasm": { - "resolved": "packages/libsql-client-wasm", - "link": true - }, - "node_modules/@libsql/core": { - "resolved": "packages/libsql-core", - "link": true - }, - "node_modules/@libsql/darwin-arm64": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/@libsql/darwin-arm64/-/darwin-arm64-0.3.10.tgz", - "integrity": "sha512-RaexEFfPAFogd6dJlqkpCkTxdr6K14Z0286lodIJ8Ny77mWuWyBkWKxf70OYWXXAMxMJFUW+6al1F3/Osf/pTg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@libsql/darwin-x64": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/@libsql/darwin-x64/-/darwin-x64-0.3.10.tgz", - "integrity": "sha512-SNVN6n4qNUdMW1fJMFmx4qn4n5RnXsxjFbczpkzG/V7m/5VeTFt1chhGcrahTHCr3+K6eRJWJUEQHRGqjBwPkw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@libsql/hrana-client": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@libsql/hrana-client/-/hrana-client-0.6.0.tgz", - "integrity": "sha512-k+fqzdjqg3IvWfKmVJK5StsbjeTcyNAXFelUbXbGNz3yH1gEVT9mZ6kmhsIXP30ZSyVV0AE1Gi25p82mxC9hwg==", - "dependencies": { - "@libsql/isomorphic-fetch": "^0.2.1", - "@libsql/isomorphic-ws": "^0.1.5", - "js-base64": "^3.7.5", - "node-fetch": "^3.3.2" - } - }, - "node_modules/@libsql/isomorphic-fetch": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@libsql/isomorphic-fetch/-/isomorphic-fetch-0.2.1.tgz", - "integrity": "sha512-Sv07QP1Aw8A5OOrmKgRUBKe2fFhF2hpGJhtHe3d1aRnTESZCGkn//0zDycMKTGamVWb3oLYRroOsCV8Ukes9GA==" - }, - "node_modules/@libsql/isomorphic-ws": { - "version": "0.1.5", - "license": "MIT", - "dependencies": { - "@types/ws": "^8.5.4", - "ws": "^8.13.0" - } - }, - "node_modules/@libsql/libsql-wasm-experimental": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@libsql/libsql-wasm-experimental/-/libsql-wasm-experimental-0.0.2.tgz", - "integrity": "sha512-xkiu88QwozGr3KEt9h0zeHLYUIWkeDchXmuOUW4/Wh/mRZkDlNtIIePAR0FiLl1j0o4OyTEOtPnvmaXQ5MNTKQ==", - "bin": { - "sqlite-wasm": "bin/index.js" - } - }, - "node_modules/@libsql/linux-arm64-gnu": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/@libsql/linux-arm64-gnu/-/linux-arm64-gnu-0.3.10.tgz", - "integrity": "sha512-2uXpi9d8qtyIOr7pyG4a88j6YXgemyIHEs2Wbp+PPletlCIPsFS+E7IQHbz8VwTohchOzcokGUm1Bc5QC+A7wg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@libsql/linux-arm64-musl": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/@libsql/linux-arm64-musl/-/linux-arm64-musl-0.3.10.tgz", - "integrity": "sha512-72SN1FUavLvzHddCS861ynSpQndcW5oLGKA3U8CyMfgIZIwJAPc7+48Uj1plW00htXBx4GBpcntFp68KKIx3YQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@libsql/linux-x64-gnu": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/@libsql/linux-x64-gnu/-/linux-x64-gnu-0.3.10.tgz", - "integrity": "sha512-hXyNqVRi7ONuyWZ1SX6setxL0QaQ7InyS3bHLupsi9s7NpOGD5vcpTaYicJOqmIIm+6kt8vJfmo7ZxlarIHy7Q==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@libsql/linux-x64-musl": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/@libsql/linux-x64-musl/-/linux-x64-musl-0.3.10.tgz", - "integrity": "sha512-kNmIRxomVwt9S+cLyYS497F/3gXFF4r8wW12YSBQgxG75JYft07AHVd8J7HINg+oqRkLzT0s+mVX5dM6nk68EQ==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@libsql/win32-x64-msvc": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/@libsql/win32-x64-msvc/-/win32-x64-msvc-0.3.10.tgz", - "integrity": "sha512-c/6rjdtGULKrJkLgfLobFefObfOtxjXGmCfPxv6pr0epPCeUEssfDbDIeEH9fQUgzogIMWEHwT8so52UJ/iT1Q==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@neon-rs/load": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@neon-rs/load/-/load-0.0.4.tgz", - "integrity": "sha512-kTPhdZyTQxB+2wpiRcFWrDcejc4JI6tkPuS7UZCG4l6Zvc5kU/gGQ/ozvHTh1XR5tS+UlfAfGuPajjzQjCiHCw==" - }, - "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "dev": true, - "license": "MIT" - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.0" - } - }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.6.8", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.20.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.20.7" - } - }, - "node_modules/@types/graceful-fs": { - "version": "4.1.9", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/jest": { - "version": "29.5.11", - "dev": true, - "license": "MIT", - "dependencies": { - "expect": "^29.0.0", - "pretty-format": "^29.0.0" - } - }, - "node_modules/@types/node": { - "version": "18.19.8", - "license": "MIT", - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@types/stack-utils": { - "version": "2.0.3", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/ws": { - "version": "8.5.10", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/yargs": { - "version": "17.0.32", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.3", - "dev": true, - "license": "MIT" - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-sequence-parser": { - "version": "1.1.1", - "dev": true, - "license": "MIT" - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/babel-jest": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/transform": "^29.7.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.6.3", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, - "node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-jest-hoist": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/babel-preset-jest": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-plugin-jest-hoist": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.22.2", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001565", - "electron-to-chromium": "^1.4.601", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.13" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/bs-logger": { - "version": "0.2.6", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-json-stable-stringify": "2.x" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/bser": { - "version": "2.1.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "node-int64": "^0.4.0" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/callsites": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001579", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/char-regex": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/ci-info": { - "version": "3.9.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cjs-module-lexer": { - "version": "1.2.3", - "dev": true, - "license": "MIT" - }, - "node_modules/cli-cursor": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", - "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", - "dependencies": { - "restore-cursor": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-truncate": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", - "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", - "dependencies": { - "slice-ansi": "^5.0.0", - "string-width": "^7.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-truncate/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/cli-truncate/node_modules/emoji-regex": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", - "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==" - }, - "node_modules/cli-truncate/node_modules/string-width": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", - "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-truncate/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/cliui": { - "version": "8.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/co": { - "version": "4.6.0", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "node_modules/collect-v8-coverage": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==" - }, - "node_modules/commander": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", - "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", - "engines": { - "node": ">=16" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/create-jest": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "prompts": "^2.0.1" - }, - "bin": { - "create-jest": "bin/create-jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/data-uri-to-buffer": { - "version": "4.0.1", - "license": "MIT", - "engines": { - "node": ">= 12" - } - }, - "node_modules/debug": { - "version": "4.3.4", - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/dedent": { - "version": "1.5.1", - "dev": true, - "license": "MIT", - "peerDependencies": { - "babel-plugin-macros": "^3.1.0" - }, - "peerDependenciesMeta": { - "babel-plugin-macros": { - "optional": true - } - } - }, - "node_modules/deepmerge": { - "version": "4.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/detect-libc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", - "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", - "engines": { - "node": ">=8" - } - }, - "node_modules/detect-newline": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/diff-sequences": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.4.637", - "dev": true, - "license": "ISC" - }, - "node_modules/emittery": { - "version": "0.13.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/error-ex": { - "version": "1.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/escalade": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eventemitter3": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", - "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" - }, - "node_modules/execa": { - "version": "5.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/exit": { - "version": "0.1.2", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expect": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/expect-utils": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "dev": true, - "license": "MIT" - }, - "node_modules/fb-watchman": { - "version": "2.0.2", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "bser": "2.1.1" - } - }, - "node_modules/fetch-blob": { - "version": "3.2.0", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "paypal", - "url": "https://paypal.me/jimmywarting" - } - ], - "license": "MIT", - "dependencies": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - }, - "engines": { - "node": "^12.20 || >= 14.13" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/formdata-polyfill": { - "version": "4.0.10", - "license": "MIT", - "dependencies": { - "fetch-blob": "^3.1.2" - }, - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "node_modules/function-bind": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-east-asian-width": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", - "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-package-type": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/get-stream": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/globals": { - "version": "11.12.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "dev": true, - "license": "ISC" - }, - "node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/hasown": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/html-escaper": { - "version": "2.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/human-signals": { - "version": "2.1.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/husky": { - "version": "9.0.11", - "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", - "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", - "bin": { - "husky": "bin.mjs" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/typicode" - } - }, - "node_modules/import-local": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "dev": true, - "license": "ISC" - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "dev": true, - "license": "MIT" - }, - "node_modules/is-core-module": { - "version": "2.13.1", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-generator-fn": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-stream": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "license": "ISC" - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.2", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "6.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-instrument/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-instrument/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-reports": { - "version": "3.1.6", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/types": "^29.6.3", - "import-local": "^3.0.2", - "jest-cli": "^29.7.0" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-changed-files": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "execa": "^5.0.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^1.0.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.7.0", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0", - "pretty-format": "^29.7.0", - "pure-rand": "^6.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "create-jest": "^29.7.0", - "exit": "^0.1.2", - "import-local": "^3.0.2", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-config": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-jest": "^29.7.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/jest-diff": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-docblock": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "jest-util": "^29.7.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-environment-node": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-haste-map": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/jest-leak-detector": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-matcher-utils": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-message-util": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-mock": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "node_modules/jest-regex-util": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "resolve": "^1.20.0", - "resolve.exports": "^2.0.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve-dependencies": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-regex-util": "^29.6.3", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/environment": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-leak-detector": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-resolve": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-util": "^29.7.0", - "jest-watcher": "^29.7.0", - "jest-worker": "^29.7.0", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/globals": "^29.7.0", - "@jest/source-map": "^29.6.3", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-snapshot/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "node_modules/jest-util": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "leven": "^3.1.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate/node_modules/camelcase": { - "version": "6.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-watcher": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "jest-util": "^29.7.0", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "jest-util": "^29.7.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/js-base64": { - "version": "3.7.5", - "license": "BSD-3-Clause" - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsesc": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "dev": true, - "license": "MIT" - }, - "node_modules/json5": { - "version": "2.2.3", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonc-parser": { - "version": "3.2.0", - "dev": true, - "license": "MIT" - }, - "node_modules/kleur": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/leven": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/libsql": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/libsql/-/libsql-0.3.10.tgz", - "integrity": "sha512-/8YMTbwWFPmrDWY+YFK3kYqVPFkMgQre0DGmBaOmjogMdSe+7GHm1/q9AZ61AWkEub/vHmi+bA4tqIzVhKnqzg==", - "cpu": [ - "x64", - "arm64", - "wasm32" - ], - "os": [ - "darwin", - "linux", - "win32" - ], - "dependencies": { - "@neon-rs/load": "^0.0.4", - "detect-libc": "2.0.2" - }, - "optionalDependencies": { - "@libsql/darwin-arm64": "0.3.10", - "@libsql/darwin-x64": "0.3.10", - "@libsql/linux-arm64-gnu": "0.3.10", - "@libsql/linux-arm64-musl": "0.3.10", - "@libsql/linux-x64-gnu": "0.3.10", - "@libsql/linux-x64-musl": "0.3.10", - "@libsql/win32-x64-msvc": "0.3.10" - } - }, - "node_modules/lilconfig": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz", - "integrity": "sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==", - "engines": { - "node": ">=14" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "dev": true, - "license": "MIT" - }, - "node_modules/lint-staged": { - "version": "15.2.2", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.2.tgz", - "integrity": "sha512-TiTt93OPh1OZOsb5B7k96A/ATl2AjIZo+vnzFZ6oHK5FuTk63ByDtxGQpHm+kFETjEWqgkF95M8FRXKR/LEBcw==", - "dependencies": { - "chalk": "5.3.0", - "commander": "11.1.0", - "debug": "4.3.4", - "execa": "8.0.1", - "lilconfig": "3.0.0", - "listr2": "8.0.1", - "micromatch": "4.0.5", - "pidtree": "0.6.0", - "string-argv": "0.3.2", - "yaml": "2.3.4" - }, - "bin": { - "lint-staged": "bin/lint-staged.js" - }, - "engines": { - "node": ">=18.12.0" - }, - "funding": { - "url": "https://opencollective.com/lint-staged" - } - }, - "node_modules/lint-staged/node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/lint-staged/node_modules/execa": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", - "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^8.0.1", - "human-signals": "^5.0.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^3.0.0" - }, - "engines": { - "node": ">=16.17" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/lint-staged/node_modules/get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/human-signals": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", - "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", - "engines": { - "node": ">=16.17.0" - } - }, - "node_modules/lint-staged/node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/npm-run-path": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", - "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", - "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dependencies": { - "mimic-fn": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/lint-staged/node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/listr2": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.0.1.tgz", - "integrity": "sha512-ovJXBXkKGfq+CwmKTjluEqFi3p4h8xvkxGQQAQan22YCgef4KZ1mKGjzfGh6PL6AW5Csw0QiQPNuQyH+6Xk3hA==", - "dependencies": { - "cli-truncate": "^4.0.0", - "colorette": "^2.0.20", - "eventemitter3": "^5.0.1", - "log-update": "^6.0.0", - "rfdc": "^1.3.0", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/listr2/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/listr2/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/listr2/node_modules/emoji-regex": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", - "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==" - }, - "node_modules/listr2/node_modules/string-width": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", - "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/listr2/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/listr2/node_modules/wrap-ansi": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", - "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", - "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/locate-path": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash.memoize": { - "version": "4.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/log-update": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.0.0.tgz", - "integrity": "sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw==", - "dependencies": { - "ansi-escapes": "^6.2.0", - "cli-cursor": "^4.0.0", - "slice-ansi": "^7.0.0", - "strip-ansi": "^7.1.0", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update/node_modules/ansi-escapes": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.1.tgz", - "integrity": "sha512-4nJ3yixlEthEJ9Rk4vPcdBRkZvQZlYyu8j4/Mqz5sgIkddmEnH2Yj2ZrnP9S3tQOvSNRUIgVNF/1yPpRAGNRig==", - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/log-update/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/log-update/node_modules/emoji-regex": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", - "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==" - }, - "node_modules/log-update/node_modules/is-fullwidth-code-point": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", - "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", - "dependencies": { - "get-east-asian-width": "^1.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update/node_modules/slice-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", - "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", - "dependencies": { - "ansi-styles": "^6.2.1", - "is-fullwidth-code-point": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/log-update/node_modules/string-width": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", - "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/log-update/node_modules/wrap-ansi": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", - "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", - "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/lunr": { - "version": "2.3.9", - "dev": true, - "license": "MIT" - }, - "node_modules/make-dir": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/make-dir/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "node_modules/make-error": { - "version": "1.3.6", - "dev": true, - "license": "ISC" - }, - "node_modules/makeerror": { - "version": "1.0.12", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "tmpl": "1.0.5" - } - }, - "node_modules/marked": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "bin": { - "marked": "bin/marked.js" - }, - "engines": { - "node": ">= 12" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "license": "MIT" - }, - "node_modules/micromatch": { - "version": "4.0.5", - "license": "MIT", - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "license": "MIT" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, - "node_modules/node-domexception": { - "version": "1.0.0", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "github", - "url": "https://paypal.me/jimmywarting" - } - ], - "license": "MIT", - "engines": { - "node": ">=10.5.0" - } - }, - "node_modules/node-fetch": { - "version": "3.3.2", - "license": "MIT", - "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, - "node_modules/node-int64": { - "version": "0.4.0", - "dev": true, - "license": "MIT" - }, - "node_modules/node-releases": { - "version": "2.0.14", - "dev": true, - "license": "MIT" - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "license": "MIT", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-locate/node_modules/p-limit": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-json": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "dev": true, - "license": "MIT" - }, - "node_modules/picocolors": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pidtree": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", - "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", - "bin": { - "pidtree": "bin/pidtree.js" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/pirates": { - "version": "4.0.6", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/prettier": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", - "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", - "dev": true, - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/pretty-format": { - "version": "29.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/prompts": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/pure-rand": { - "version": "6.0.4", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/dubzzz" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" - } - ], - "license": "MIT" - }, - "node_modules/react-is": { - "version": "18.2.0", - "dev": true, - "license": "MIT" - }, - "node_modules/require-directory": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve": { - "version": "1.22.8", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve.exports": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/restore-cursor": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", - "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/rfdc": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz", - "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==" - }, - "node_modules/semver": { - "version": "6.3.1", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/shiki": { - "version": "0.14.7", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-sequence-parser": "^1.1.0", - "jsonc-parser": "^3.2.0", - "vscode-oniguruma": "^1.7.0", - "vscode-textmate": "^8.0.0" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "license": "ISC" - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "dev": true, - "license": "MIT" - }, - "node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/slice-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", - "dependencies": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.13", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/stack-utils": { - "version": "2.0.6", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/string-argv": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", - "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", - "engines": { - "node": ">=0.6.19" - } - }, - "node_modules/string-length": { - "version": "4.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/test-exclude": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tmpl": { - "version": "1.0.5", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/ts-jest": { - "version": "29.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", - "jest-util": "^29.0.0", - "json5": "^2.2.3", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "^7.5.3", - "yargs-parser": "^21.0.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/types": "^29.0.0", - "babel-jest": "^29.0.0", - "jest": "^29.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - } - } - }, - "node_modules/ts-jest/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/ts-jest/node_modules/semver": { - "version": "7.5.4", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/ts-jest/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, - "node_modules/type-detect": { - "version": "4.0.8", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.21.3", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typedoc": { - "version": "0.23.28", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "lunr": "^2.3.9", - "marked": "^4.2.12", - "minimatch": "^7.1.3", - "shiki": "^0.14.1" - }, - "bin": { - "typedoc": "bin/typedoc" - }, - "engines": { - "node": ">= 14.14" - }, - "peerDependencies": { - "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x" - } - }, - "node_modules/typedoc/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/typedoc/node_modules/minimatch": { - "version": "7.4.6", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/typescript": { - "version": "4.9.5", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/undici-types": { - "version": "5.26.5", - "license": "MIT" - }, - "node_modules/update-browserslist-db": { - "version": "1.0.13", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/v8-to-istanbul": { - "version": "9.2.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^2.0.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/vscode-oniguruma": { - "version": "1.7.0", - "dev": true, - "license": "MIT" - }, - "node_modules/vscode-textmate": { - "version": "8.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/walker": { - "version": "1.0.8", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "makeerror": "1.0.12" - } - }, - "node_modules/web-streams-polyfill": { - "version": "3.3.2", - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/which": { - "version": "2.0.2", - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "dev": true, - "license": "ISC" - }, - "node_modules/write-file-atomic": { - "version": "4.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/ws": { - "version": "8.16.0", - "license": "MIT", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true + "name": "libsql-client-ts", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "workspaces": [ + "packages/libsql-core", + "packages/libsql-client", + "packages/libsql-client-wasm" + ], + "dependencies": { + "husky": "^9.0.11", + "lint-staged": "^15.2.2" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.2.1", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.23.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/highlight": "^7.23.4", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "dev": true, + "license": "MIT" + }, + "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.23.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.23.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.6", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helpers": "^7.23.7", + "@babel/parser": "^7.23.6", + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.7", + "@babel/types": "^7.23.6", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.23.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.23.6", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.23.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.23.5", + "@babel/helper-validator-option": "^7.23.5", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.20", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.23.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.22.15", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.23.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.22.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.22.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.23.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.20", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.23.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.23.8", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.7", + "@babel/types": "^7.23.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.23.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "dev": true, + "license": "MIT" + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.23.6", + "dev": true, + "license": "MIT", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.23.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.23.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.22.15", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.23.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.6", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.6", + "@babel/types": "^7.23.6", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.23.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "dev": true, + "license": "MIT" + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/environment": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.21", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@libsql/client": { + "resolved": "packages/libsql-client", + "link": true + }, + "node_modules/@libsql/client-wasm": { + "resolved": "packages/libsql-client-wasm", + "link": true + }, + "node_modules/@libsql/core": { + "resolved": "packages/libsql-core", + "link": true + }, + "node_modules/@libsql/darwin-arm64": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/@libsql/darwin-arm64/-/darwin-arm64-0.3.10.tgz", + "integrity": "sha512-RaexEFfPAFogd6dJlqkpCkTxdr6K14Z0286lodIJ8Ny77mWuWyBkWKxf70OYWXXAMxMJFUW+6al1F3/Osf/pTg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@libsql/darwin-x64": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/@libsql/darwin-x64/-/darwin-x64-0.3.10.tgz", + "integrity": "sha512-SNVN6n4qNUdMW1fJMFmx4qn4n5RnXsxjFbczpkzG/V7m/5VeTFt1chhGcrahTHCr3+K6eRJWJUEQHRGqjBwPkw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@libsql/hrana-client": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@libsql/hrana-client/-/hrana-client-0.6.0.tgz", + "integrity": "sha512-k+fqzdjqg3IvWfKmVJK5StsbjeTcyNAXFelUbXbGNz3yH1gEVT9mZ6kmhsIXP30ZSyVV0AE1Gi25p82mxC9hwg==", + "dependencies": { + "@libsql/isomorphic-fetch": "^0.2.1", + "@libsql/isomorphic-ws": "^0.1.5", + "js-base64": "^3.7.5", + "node-fetch": "^3.3.2" + } + }, + "node_modules/@libsql/isomorphic-fetch": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@libsql/isomorphic-fetch/-/isomorphic-fetch-0.2.1.tgz", + "integrity": "sha512-Sv07QP1Aw8A5OOrmKgRUBKe2fFhF2hpGJhtHe3d1aRnTESZCGkn//0zDycMKTGamVWb3oLYRroOsCV8Ukes9GA==" + }, + "node_modules/@libsql/isomorphic-ws": { + "version": "0.1.5", + "license": "MIT", + "dependencies": { + "@types/ws": "^8.5.4", + "ws": "^8.13.0" + } + }, + "node_modules/@libsql/libsql-wasm-experimental": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@libsql/libsql-wasm-experimental/-/libsql-wasm-experimental-0.0.2.tgz", + "integrity": "sha512-xkiu88QwozGr3KEt9h0zeHLYUIWkeDchXmuOUW4/Wh/mRZkDlNtIIePAR0FiLl1j0o4OyTEOtPnvmaXQ5MNTKQ==", + "bin": { + "sqlite-wasm": "bin/index.js" + } + }, + "node_modules/@libsql/linux-arm64-gnu": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/@libsql/linux-arm64-gnu/-/linux-arm64-gnu-0.3.10.tgz", + "integrity": "sha512-2uXpi9d8qtyIOr7pyG4a88j6YXgemyIHEs2Wbp+PPletlCIPsFS+E7IQHbz8VwTohchOzcokGUm1Bc5QC+A7wg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@libsql/linux-arm64-musl": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/@libsql/linux-arm64-musl/-/linux-arm64-musl-0.3.10.tgz", + "integrity": "sha512-72SN1FUavLvzHddCS861ynSpQndcW5oLGKA3U8CyMfgIZIwJAPc7+48Uj1plW00htXBx4GBpcntFp68KKIx3YQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@libsql/linux-x64-gnu": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/@libsql/linux-x64-gnu/-/linux-x64-gnu-0.3.10.tgz", + "integrity": "sha512-hXyNqVRi7ONuyWZ1SX6setxL0QaQ7InyS3bHLupsi9s7NpOGD5vcpTaYicJOqmIIm+6kt8vJfmo7ZxlarIHy7Q==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@libsql/linux-x64-musl": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/@libsql/linux-x64-musl/-/linux-x64-musl-0.3.10.tgz", + "integrity": "sha512-kNmIRxomVwt9S+cLyYS497F/3gXFF4r8wW12YSBQgxG75JYft07AHVd8J7HINg+oqRkLzT0s+mVX5dM6nk68EQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@libsql/win32-x64-msvc": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/@libsql/win32-x64-msvc/-/win32-x64-msvc-0.3.10.tgz", + "integrity": "sha512-c/6rjdtGULKrJkLgfLobFefObfOtxjXGmCfPxv6pr0epPCeUEssfDbDIeEH9fQUgzogIMWEHwT8so52UJ/iT1Q==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@neon-rs/load": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@neon-rs/load/-/load-0.0.4.tgz", + "integrity": "sha512-kTPhdZyTQxB+2wpiRcFWrDcejc4JI6tkPuS7UZCG4l6Zvc5kU/gGQ/ozvHTh1XR5tS+UlfAfGuPajjzQjCiHCw==" + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "dev": true, + "license": "MIT" + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.8", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.20.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/jest": { + "version": "29.5.11", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "node_modules/@types/node": { + "version": "18.19.8", + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/ws": { + "version": "8.5.10", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/yargs": { + "version": "17.0.32", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "dev": true, + "license": "MIT" + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-sequence-parser": { + "version": "1.1.1", + "dev": true, + "license": "MIT" + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/babel-jest": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "license": "MIT", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.22.2", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "caniuse-lite": "^1.0.30001565", + "electron-to-chromium": "^1.4.601", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bs-logger": { + "version": "0.2.6", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/callsites": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001579", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chalk": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/ci-info": { + "version": "3.9.0", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.2.3", + "dev": true, + "license": "MIT" + }, + "node_modules/cli-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", + "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", + "dependencies": { + "restore-cursor": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", + "dependencies": { + "slice-ansi": "^5.0.0", + "string-width": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/cli-truncate/node_modules/emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==" + }, + "node_modules/cli-truncate/node_modules/string-width": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", + "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/co": { + "version": "4.6.0", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==" + }, + "node_modules/commander": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", + "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", + "engines": { + "node": ">=16" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/create-jest": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/dedent": { + "version": "1.5.1", + "dev": true, + "license": "MIT", + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/detect-libc": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.4.637", + "dev": true, + "license": "ISC" + }, + "node_modules/emittery": { + "version": "0.13.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/error-ex": { + "version": "1.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" + }, + "node_modules/execa": { + "version": "5.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "license": "MIT", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", + "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "dev": true, + "license": "ISC" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/hasown": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "dev": true, + "license": "MIT" + }, + "node_modules/human-signals": { + "version": "2.1.0", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/husky": { + "version": "9.0.11", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", + "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", + "bin": { + "husky": "bin.mjs" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, + "node_modules/import-local": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "dev": true, + "license": "ISC" + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "dev": true, + "license": "MIT" + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "license": "ISC" + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.1", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/lru-cache": { + "version": "6.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "7.5.4", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/yallist": { + "version": "4.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.6", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-cli": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-mock": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/lru-cache": { + "version": "6.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-snapshot/node_modules/semver": { + "version": "7.5.4", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-snapshot/node_modules/yallist": { + "version": "4.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/jest-util": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/js-base64": { + "version": "3.7.5", + "license": "BSD-3-Clause" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "dev": true, + "license": "MIT" + }, + "node_modules/json5": { + "version": "2.2.3", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonc-parser": { + "version": "3.2.0", + "dev": true, + "license": "MIT" + }, + "node_modules/kleur": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/libsql": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/libsql/-/libsql-0.3.10.tgz", + "integrity": "sha512-/8YMTbwWFPmrDWY+YFK3kYqVPFkMgQre0DGmBaOmjogMdSe+7GHm1/q9AZ61AWkEub/vHmi+bA4tqIzVhKnqzg==", + "cpu": [ + "x64", + "arm64", + "wasm32" + ], + "os": [ + "darwin", + "linux", + "win32" + ], + "dependencies": { + "@neon-rs/load": "^0.0.4", + "detect-libc": "2.0.2" + }, + "optionalDependencies": { + "@libsql/darwin-arm64": "0.3.10", + "@libsql/darwin-x64": "0.3.10", + "@libsql/linux-arm64-gnu": "0.3.10", + "@libsql/linux-arm64-musl": "0.3.10", + "@libsql/linux-x64-gnu": "0.3.10", + "@libsql/linux-x64-musl": "0.3.10", + "@libsql/win32-x64-msvc": "0.3.10" + } + }, + "node_modules/lilconfig": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz", + "integrity": "sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==", + "engines": { + "node": ">=14" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "dev": true, + "license": "MIT" + }, + "node_modules/lint-staged": { + "version": "15.2.2", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.2.tgz", + "integrity": "sha512-TiTt93OPh1OZOsb5B7k96A/ATl2AjIZo+vnzFZ6oHK5FuTk63ByDtxGQpHm+kFETjEWqgkF95M8FRXKR/LEBcw==", + "dependencies": { + "chalk": "5.3.0", + "commander": "11.1.0", + "debug": "4.3.4", + "execa": "8.0.1", + "lilconfig": "3.0.0", + "listr2": "8.0.1", + "micromatch": "4.0.5", + "pidtree": "0.6.0", + "string-argv": "0.3.2", + "yaml": "2.3.4" + }, + "bin": { + "lint-staged": "bin/lint-staged.js" + }, + "engines": { + "node": ">=18.12.0" + }, + "funding": { + "url": "https://opencollective.com/lint-staged" + } + }, + "node_modules/lint-staged/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/lint-staged/node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/lint-staged/node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "engines": { + "node": ">=16.17.0" + } + }, + "node_modules/lint-staged/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/lint-staged/node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/listr2": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.0.1.tgz", + "integrity": "sha512-ovJXBXkKGfq+CwmKTjluEqFi3p4h8xvkxGQQAQan22YCgef4KZ1mKGjzfGh6PL6AW5Csw0QiQPNuQyH+6Xk3hA==", + "dependencies": { + "cli-truncate": "^4.0.0", + "colorette": "^2.0.20", + "eventemitter3": "^5.0.1", + "log-update": "^6.0.0", + "rfdc": "^1.3.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/listr2/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/listr2/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/listr2/node_modules/emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==" + }, + "node_modules/listr2/node_modules/string-width": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", + "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/listr2/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/listr2/node_modules/wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/log-update": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.0.0.tgz", + "integrity": "sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw==", + "dependencies": { + "ansi-escapes": "^6.2.0", + "cli-cursor": "^4.0.0", + "slice-ansi": "^7.0.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/ansi-escapes": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.1.tgz", + "integrity": "sha512-4nJ3yixlEthEJ9Rk4vPcdBRkZvQZlYyu8j4/Mqz5sgIkddmEnH2Yj2ZrnP9S3tQOvSNRUIgVNF/1yPpRAGNRig==", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/log-update/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-update/node_modules/emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==" + }, + "node_modules/log-update/node_modules/is-fullwidth-code-point": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", + "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", + "dependencies": { + "get-east-asian-width": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/slice-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", + "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", + "dependencies": { + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/log-update/node_modules/string-width": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", + "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/log-update/node_modules/wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/lunr": { + "version": "2.3.9", + "dev": true, + "license": "MIT" + }, + "node_modules/make-dir": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/lru-cache": { + "version": "6.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "7.5.4", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir/node_modules/yallist": { + "version": "4.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/make-error": { + "version": "1.3.6", + "dev": true, + "license": "ISC" + }, + "node_modules/makeerror": { + "version": "1.0.12", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/marked": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "license": "MIT" + }, + "node_modules/micromatch": { + "version": "4.0.5", + "license": "MIT", + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "dev": true, + "license": "MIT" + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "3.3.2", + "license": "MIT", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "node_modules/node-int64": { + "version": "0.4.0", + "dev": true, + "license": "MIT" + }, + "node_modules/node-releases": { + "version": "2.0.14", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pidtree": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/pirates": { + "version": "4.0.6", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/prettier": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pure-rand": { + "version": "6.0.4", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, + "node_modules/react-is": { + "version": "18.2.0", + "dev": true, + "license": "MIT" + }, + "node_modules/require-directory": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve.exports": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/restore-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", + "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/rfdc": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz", + "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==" + }, + "node_modules/semver": { + "version": "6.3.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/shiki": { + "version": "0.14.7", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-sequence-parser": "^1.1.0", + "jsonc-parser": "^3.2.0", + "vscode-oniguruma": "^1.7.0", + "vscode-textmate": "^8.0.0" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "license": "ISC" + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "dev": true, + "license": "MIT" + }, + "node_modules/slash": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "dependencies": { + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.13", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-argv": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", + "engines": { + "node": ">=0.6.19" + } + }, + "node_modules/string-length": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tmpl": { + "version": "1.0.5", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-jest": { + "version": "29.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "bs-logger": "0.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "4.x", + "make-error": "1.x", + "semver": "^7.5.3", + "yargs-parser": "^21.0.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/lru-cache": { + "version": "6.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ts-jest/node_modules/semver": { + "version": "7.5.4", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ts-jest/node_modules/yallist": { + "version": "4.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/type-detect": { + "version": "4.0.8", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typedoc": { + "version": "0.23.28", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "lunr": "^2.3.9", + "marked": "^4.2.12", + "minimatch": "^7.1.3", + "shiki": "^0.14.1" + }, + "bin": { + "typedoc": "bin/typedoc" + }, + "engines": { + "node": ">= 14.14" + }, + "peerDependencies": { + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x" + } + }, + "node_modules/typedoc/node_modules/brace-expansion": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/typedoc/node_modules/minimatch": { + "version": "7.4.6", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/typescript": { + "version": "4.9.5", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "license": "MIT" + }, + "node_modules/update-browserslist-db": { + "version": "1.0.13", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/v8-to-istanbul": { + "version": "9.2.0", + "dev": true, + "license": "ISC", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/vscode-oniguruma": { + "version": "1.7.0", + "dev": true, + "license": "MIT" + }, + "node_modules/vscode-textmate": { + "version": "8.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/walker": { + "version": "1.0.8", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/web-streams-polyfill": { + "version": "3.3.2", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/which": { + "version": "2.0.2", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "dev": true, + "license": "ISC" + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/ws": { + "version": "8.16.0", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "dev": true, + "license": "ISC" + }, + "node_modules/yaml": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", + "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", + "engines": { + "node": ">= 14" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "packages/libsql-client": { + "name": "@libsql/client", + "version": "0.6.0", + "license": "MIT", + "dependencies": { + "@libsql/core": "^0.6.0", + "@libsql/hrana-client": "^0.6.0", + "js-base64": "^3.7.5", + "libsql": "^0.3.10" + }, + "devDependencies": { + "@types/jest": "^29.2.5", + "@types/node": "^18.15.5", + "husky": "^9.0.11", + "jest": "^29.3.1", + "lint-staged": "^15.2.2", + "prettier": "3.2.5", + "ts-jest": "^29.0.5", + "typedoc": "^0.23.28", + "typescript": "^4.9.4" + } + }, + "packages/libsql-client-wasm": { + "name": "@libsql/client-wasm", + "version": "0.6.0", + "bundleDependencies": [ + "@libsql/libsql-wasm-experimental" + ], + "license": "MIT", + "dependencies": { + "@libsql/core": "0.6.0", + "@libsql/libsql-wasm-experimental": "^0.0.2", + "js-base64": "^3.7.5" + }, + "devDependencies": { + "@types/jest": "^29.2.5", + "jest": "^29.3.1", + "ts-jest": "^29.0.5", + "typedoc": "^0.23.28", + "typescript": "^4.9.4" + } + }, + "packages/libsql-core": { + "name": "@libsql/core", + "version": "0.6.0", + "license": "MIT", + "dependencies": { + "js-base64": "^3.7.5" + }, + "devDependencies": { + "@types/jest": "^29.2.5", + "@types/node": "^18.15.5", + "jest": "^29.3.1", + "ts-jest": "^29.0.5", + "typedoc": "^0.23.28", + "typescript": "^4.9.4" + } } - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "3.1.1", - "dev": true, - "license": "ISC" - }, - "node_modules/yaml": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", - "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", - "engines": { - "node": ">= 14" - } - }, - "node_modules/yargs": { - "version": "17.7.2", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "packages/libsql-client": { - "name": "@libsql/client", - "version": "0.6.0", - "license": "MIT", - "dependencies": { - "@libsql/core": "^0.6.0", - "@libsql/hrana-client": "^0.6.0", - "js-base64": "^3.7.5", - "libsql": "^0.3.10" - }, - "devDependencies": { - "@types/jest": "^29.2.5", - "@types/node": "^18.15.5", - "husky": "^9.0.11", - "jest": "^29.3.1", - "lint-staged": "^15.2.2", - "prettier": "3.2.5", - "ts-jest": "^29.0.5", - "typedoc": "^0.23.28", - "typescript": "^4.9.4" - } - }, - "packages/libsql-client-wasm": { - "name": "@libsql/client-wasm", - "version": "0.6.0", - "bundleDependencies": [ - "@libsql/libsql-wasm-experimental" - ], - "license": "MIT", - "dependencies": { - "@libsql/core": "0.6.0", - "@libsql/libsql-wasm-experimental": "^0.0.2", - "js-base64": "^3.7.5" - }, - "devDependencies": { - "@types/jest": "^29.2.5", - "jest": "^29.3.1", - "ts-jest": "^29.0.5", - "typedoc": "^0.23.28", - "typescript": "^4.9.4" - } - }, - "packages/libsql-core": { - "name": "@libsql/core", - "version": "0.6.0", - "license": "MIT", - "dependencies": { - "js-base64": "^3.7.5" - }, - "devDependencies": { - "@types/jest": "^29.2.5", - "@types/node": "^18.15.5", - "jest": "^29.3.1", - "ts-jest": "^29.0.5", - "typedoc": "^0.23.28", - "typescript": "^4.9.4" - } } - } } diff --git a/package.json b/package.json index 5f688512..32decbbe 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,15 @@ { - "workspaces": [ - "packages/libsql-core", - "packages/libsql-client", - "packages/libsql-client-wasm" - ], - "dependencies": { - "husky": "^9.0.11", - "lint-staged": "^15.2.2" - }, - "scripts": { - "prepare": "node .husky/install.mjs", - "lint-staged": "lint-staged" - } + "workspaces": [ + "packages/libsql-core", + "packages/libsql-client", + "packages/libsql-client-wasm" + ], + "dependencies": { + "husky": "^9.0.11", + "lint-staged": "^15.2.2" + }, + "scripts": { + "prepare": "node .husky/install.mjs", + "lint-staged": "lint-staged" + } } diff --git a/packages/libsql-client-wasm/examples/browser/index.html b/packages/libsql-client-wasm/examples/browser/index.html index aa1cafc1..0494cf2f 100644 --- a/packages/libsql-client-wasm/examples/browser/index.html +++ b/packages/libsql-client-wasm/examples/browser/index.html @@ -1,10 +1,10 @@ - - - libSQL SDK Wasm Demo - - - -

Hello libSQL and Wasm!

- + + + libSQL SDK Wasm Demo + + + +

Hello libSQL and Wasm!

+ diff --git a/packages/libsql-client-wasm/examples/browser/index.js b/packages/libsql-client-wasm/examples/browser/index.js index 2a28909f..58798094 100644 --- a/packages/libsql-client-wasm/examples/browser/index.js +++ b/packages/libsql-client-wasm/examples/browser/index.js @@ -1,15 +1,14 @@ import { createClient } from "@libsql/client-wasm"; async function main() { - const config = { - url: "file:local.db", - }; - const db = await createClient(config); - const rs = await db.execute("SELECT * FROM users"); - console.log(rs); + const config = { + url: "file:local.db", + }; + const db = await createClient(config); + const rs = await db.execute("SELECT * FROM users"); + console.log(rs); } -main() - .catch((error) => { +main().catch((error) => { console.log(error); - }); +}); diff --git a/packages/libsql-client-wasm/examples/browser/package-lock.json b/packages/libsql-client-wasm/examples/browser/package-lock.json index 285e2e12..7e65c807 100644 --- a/packages/libsql-client-wasm/examples/browser/package-lock.json +++ b/packages/libsql-client-wasm/examples/browser/package-lock.json @@ -1,653 +1,653 @@ { - "name": "browser", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "browser", - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "@libsql/client-wasm": "*" - }, - "devDependencies": { - "esbuild": "0.19.11" - } - }, - "../..": { - "name": "@libsql/client-wasm", - "version": "0.4.0-pre.10", - "license": "MIT", - "dependencies": { - "@libsql/core": "0.4.0-pre.10", - "@libsql/libsql-wasm-experimental": "^0.0.1", - "js-base64": "^3.7.5" - }, - "devDependencies": { - "@types/jest": "^29.2.5", - "jest": "^29.3.1", - "ts-jest": "^29.0.5", - "typedoc": "^0.23.28", - "typescript": "^4.9.4" - } - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz", - "integrity": "sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.11.tgz", - "integrity": "sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.11.tgz", - "integrity": "sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.11.tgz", - "integrity": "sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz", - "integrity": "sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.11.tgz", - "integrity": "sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.11.tgz", - "integrity": "sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.11.tgz", - "integrity": "sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.11.tgz", - "integrity": "sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.11.tgz", - "integrity": "sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.11.tgz", - "integrity": "sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.11.tgz", - "integrity": "sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.11.tgz", - "integrity": "sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.11.tgz", - "integrity": "sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.11.tgz", - "integrity": "sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.11.tgz", - "integrity": "sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz", - "integrity": "sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.11.tgz", - "integrity": "sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.11.tgz", - "integrity": "sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.11.tgz", - "integrity": "sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.11.tgz", - "integrity": "sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.11.tgz", - "integrity": "sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz", - "integrity": "sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@libsql/client-wasm": { - "resolved": "../..", - "link": true - }, - "node_modules/esbuild": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.11.tgz", - "integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.19.11", - "@esbuild/android-arm": "0.19.11", - "@esbuild/android-arm64": "0.19.11", - "@esbuild/android-x64": "0.19.11", - "@esbuild/darwin-arm64": "0.19.11", - "@esbuild/darwin-x64": "0.19.11", - "@esbuild/freebsd-arm64": "0.19.11", - "@esbuild/freebsd-x64": "0.19.11", - "@esbuild/linux-arm": "0.19.11", - "@esbuild/linux-arm64": "0.19.11", - "@esbuild/linux-ia32": "0.19.11", - "@esbuild/linux-loong64": "0.19.11", - "@esbuild/linux-mips64el": "0.19.11", - "@esbuild/linux-ppc64": "0.19.11", - "@esbuild/linux-riscv64": "0.19.11", - "@esbuild/linux-s390x": "0.19.11", - "@esbuild/linux-x64": "0.19.11", - "@esbuild/netbsd-x64": "0.19.11", - "@esbuild/openbsd-x64": "0.19.11", - "@esbuild/sunos-x64": "0.19.11", - "@esbuild/win32-arm64": "0.19.11", - "@esbuild/win32-ia32": "0.19.11", - "@esbuild/win32-x64": "0.19.11" - } - } - }, - "dependencies": { - "@esbuild/aix-ppc64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz", - "integrity": "sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==", - "dev": true, - "optional": true - }, - "@esbuild/android-arm": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.11.tgz", - "integrity": "sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==", - "dev": true, - "optional": true - }, - "@esbuild/android-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.11.tgz", - "integrity": "sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==", - "dev": true, - "optional": true - }, - "@esbuild/android-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.11.tgz", - "integrity": "sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==", - "dev": true, - "optional": true - }, - "@esbuild/darwin-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz", - "integrity": "sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==", - "dev": true, - "optional": true - }, - "@esbuild/darwin-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.11.tgz", - "integrity": "sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==", - "dev": true, - "optional": true - }, - "@esbuild/freebsd-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.11.tgz", - "integrity": "sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==", - "dev": true, - "optional": true - }, - "@esbuild/freebsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.11.tgz", - "integrity": "sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==", - "dev": true, - "optional": true - }, - "@esbuild/linux-arm": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.11.tgz", - "integrity": "sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==", - "dev": true, - "optional": true - }, - "@esbuild/linux-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.11.tgz", - "integrity": "sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==", - "dev": true, - "optional": true - }, - "@esbuild/linux-ia32": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.11.tgz", - "integrity": "sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==", - "dev": true, - "optional": true - }, - "@esbuild/linux-loong64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.11.tgz", - "integrity": "sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==", - "dev": true, - "optional": true - }, - "@esbuild/linux-mips64el": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.11.tgz", - "integrity": "sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==", - "dev": true, - "optional": true - }, - "@esbuild/linux-ppc64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.11.tgz", - "integrity": "sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==", - "dev": true, - "optional": true - }, - "@esbuild/linux-riscv64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.11.tgz", - "integrity": "sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==", - "dev": true, - "optional": true - }, - "@esbuild/linux-s390x": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.11.tgz", - "integrity": "sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==", - "dev": true, - "optional": true - }, - "@esbuild/linux-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz", - "integrity": "sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==", - "dev": true, - "optional": true - }, - "@esbuild/netbsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.11.tgz", - "integrity": "sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==", - "dev": true, - "optional": true - }, - "@esbuild/openbsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.11.tgz", - "integrity": "sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==", - "dev": true, - "optional": true - }, - "@esbuild/sunos-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.11.tgz", - "integrity": "sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==", - "dev": true, - "optional": true - }, - "@esbuild/win32-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.11.tgz", - "integrity": "sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==", - "dev": true, - "optional": true - }, - "@esbuild/win32-ia32": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.11.tgz", - "integrity": "sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==", - "dev": true, - "optional": true - }, - "@esbuild/win32-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz", - "integrity": "sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==", - "dev": true, - "optional": true - }, - "@libsql/client-wasm": { - "version": "file:../..", - "requires": { - "@libsql/core": "0.4.0-pre.10", - "@libsql/libsql-wasm-experimental": "^0.0.1", - "@types/jest": "^29.2.5", - "jest": "^29.3.1", - "js-base64": "^3.7.5", - "ts-jest": "^29.0.5", - "typedoc": "^0.23.28", - "typescript": "^4.9.4" - } - }, - "esbuild": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.11.tgz", - "integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==", - "dev": true, - "requires": { - "@esbuild/aix-ppc64": "0.19.11", - "@esbuild/android-arm": "0.19.11", - "@esbuild/android-arm64": "0.19.11", - "@esbuild/android-x64": "0.19.11", - "@esbuild/darwin-arm64": "0.19.11", - "@esbuild/darwin-x64": "0.19.11", - "@esbuild/freebsd-arm64": "0.19.11", - "@esbuild/freebsd-x64": "0.19.11", - "@esbuild/linux-arm": "0.19.11", - "@esbuild/linux-arm64": "0.19.11", - "@esbuild/linux-ia32": "0.19.11", - "@esbuild/linux-loong64": "0.19.11", - "@esbuild/linux-mips64el": "0.19.11", - "@esbuild/linux-ppc64": "0.19.11", - "@esbuild/linux-riscv64": "0.19.11", - "@esbuild/linux-s390x": "0.19.11", - "@esbuild/linux-x64": "0.19.11", - "@esbuild/netbsd-x64": "0.19.11", - "@esbuild/openbsd-x64": "0.19.11", - "@esbuild/sunos-x64": "0.19.11", - "@esbuild/win32-arm64": "0.19.11", - "@esbuild/win32-ia32": "0.19.11", - "@esbuild/win32-x64": "0.19.11" - } + "name": "browser", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "browser", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "@libsql/client-wasm": "*" + }, + "devDependencies": { + "esbuild": "0.19.11" + } + }, + "../..": { + "name": "@libsql/client-wasm", + "version": "0.4.0-pre.10", + "license": "MIT", + "dependencies": { + "@libsql/core": "0.4.0-pre.10", + "@libsql/libsql-wasm-experimental": "^0.0.1", + "js-base64": "^3.7.5" + }, + "devDependencies": { + "@types/jest": "^29.2.5", + "jest": "^29.3.1", + "ts-jest": "^29.0.5", + "typedoc": "^0.23.28", + "typescript": "^4.9.4" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz", + "integrity": "sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.11.tgz", + "integrity": "sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.11.tgz", + "integrity": "sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.11.tgz", + "integrity": "sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz", + "integrity": "sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.11.tgz", + "integrity": "sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.11.tgz", + "integrity": "sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.11.tgz", + "integrity": "sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.11.tgz", + "integrity": "sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.11.tgz", + "integrity": "sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.11.tgz", + "integrity": "sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.11.tgz", + "integrity": "sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.11.tgz", + "integrity": "sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.11.tgz", + "integrity": "sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.11.tgz", + "integrity": "sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.11.tgz", + "integrity": "sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz", + "integrity": "sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.11.tgz", + "integrity": "sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.11.tgz", + "integrity": "sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.11.tgz", + "integrity": "sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.11.tgz", + "integrity": "sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.11.tgz", + "integrity": "sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz", + "integrity": "sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@libsql/client-wasm": { + "resolved": "../..", + "link": true + }, + "node_modules/esbuild": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.11.tgz", + "integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.11", + "@esbuild/android-arm": "0.19.11", + "@esbuild/android-arm64": "0.19.11", + "@esbuild/android-x64": "0.19.11", + "@esbuild/darwin-arm64": "0.19.11", + "@esbuild/darwin-x64": "0.19.11", + "@esbuild/freebsd-arm64": "0.19.11", + "@esbuild/freebsd-x64": "0.19.11", + "@esbuild/linux-arm": "0.19.11", + "@esbuild/linux-arm64": "0.19.11", + "@esbuild/linux-ia32": "0.19.11", + "@esbuild/linux-loong64": "0.19.11", + "@esbuild/linux-mips64el": "0.19.11", + "@esbuild/linux-ppc64": "0.19.11", + "@esbuild/linux-riscv64": "0.19.11", + "@esbuild/linux-s390x": "0.19.11", + "@esbuild/linux-x64": "0.19.11", + "@esbuild/netbsd-x64": "0.19.11", + "@esbuild/openbsd-x64": "0.19.11", + "@esbuild/sunos-x64": "0.19.11", + "@esbuild/win32-arm64": "0.19.11", + "@esbuild/win32-ia32": "0.19.11", + "@esbuild/win32-x64": "0.19.11" + } + } + }, + "dependencies": { + "@esbuild/aix-ppc64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz", + "integrity": "sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.11.tgz", + "integrity": "sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.11.tgz", + "integrity": "sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==", + "dev": true, + "optional": true + }, + "@esbuild/android-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.11.tgz", + "integrity": "sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-arm64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz", + "integrity": "sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.11.tgz", + "integrity": "sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-arm64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.11.tgz", + "integrity": "sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.11.tgz", + "integrity": "sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.11.tgz", + "integrity": "sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.11.tgz", + "integrity": "sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ia32": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.11.tgz", + "integrity": "sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.11.tgz", + "integrity": "sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-mips64el": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.11.tgz", + "integrity": "sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ppc64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.11.tgz", + "integrity": "sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-riscv64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.11.tgz", + "integrity": "sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-s390x": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.11.tgz", + "integrity": "sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==", + "dev": true, + "optional": true + }, + "@esbuild/linux-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz", + "integrity": "sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==", + "dev": true, + "optional": true + }, + "@esbuild/netbsd-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.11.tgz", + "integrity": "sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==", + "dev": true, + "optional": true + }, + "@esbuild/openbsd-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.11.tgz", + "integrity": "sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==", + "dev": true, + "optional": true + }, + "@esbuild/sunos-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.11.tgz", + "integrity": "sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==", + "dev": true, + "optional": true + }, + "@esbuild/win32-arm64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.11.tgz", + "integrity": "sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==", + "dev": true, + "optional": true + }, + "@esbuild/win32-ia32": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.11.tgz", + "integrity": "sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==", + "dev": true, + "optional": true + }, + "@esbuild/win32-x64": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz", + "integrity": "sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==", + "dev": true, + "optional": true + }, + "@libsql/client-wasm": { + "version": "file:../..", + "requires": { + "@libsql/core": "0.4.0-pre.10", + "@libsql/libsql-wasm-experimental": "^0.0.1", + "@types/jest": "^29.2.5", + "jest": "^29.3.1", + "js-base64": "^3.7.5", + "ts-jest": "^29.0.5", + "typedoc": "^0.23.28", + "typescript": "^4.9.4" + } + }, + "esbuild": { + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.11.tgz", + "integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==", + "dev": true, + "requires": { + "@esbuild/aix-ppc64": "0.19.11", + "@esbuild/android-arm": "0.19.11", + "@esbuild/android-arm64": "0.19.11", + "@esbuild/android-x64": "0.19.11", + "@esbuild/darwin-arm64": "0.19.11", + "@esbuild/darwin-x64": "0.19.11", + "@esbuild/freebsd-arm64": "0.19.11", + "@esbuild/freebsd-x64": "0.19.11", + "@esbuild/linux-arm": "0.19.11", + "@esbuild/linux-arm64": "0.19.11", + "@esbuild/linux-ia32": "0.19.11", + "@esbuild/linux-loong64": "0.19.11", + "@esbuild/linux-mips64el": "0.19.11", + "@esbuild/linux-ppc64": "0.19.11", + "@esbuild/linux-riscv64": "0.19.11", + "@esbuild/linux-s390x": "0.19.11", + "@esbuild/linux-x64": "0.19.11", + "@esbuild/netbsd-x64": "0.19.11", + "@esbuild/openbsd-x64": "0.19.11", + "@esbuild/sunos-x64": "0.19.11", + "@esbuild/win32-arm64": "0.19.11", + "@esbuild/win32-ia32": "0.19.11", + "@esbuild/win32-x64": "0.19.11" + } + } } - } } diff --git a/packages/libsql-client-wasm/examples/browser/package.json b/packages/libsql-client-wasm/examples/browser/package.json index a544723e..a449aa87 100644 --- a/packages/libsql-client-wasm/examples/browser/package.json +++ b/packages/libsql-client-wasm/examples/browser/package.json @@ -1,18 +1,18 @@ { - "name": "browser", - "version": "1.0.0", - "description": "", - "main": "index.js", - "type": "module", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "MIT", - "dependencies": { - "@libsql/client-wasm": "../.." - }, - "devDependencies": { - "esbuild": "0.19.11" - } + "name": "browser", + "version": "1.0.0", + "description": "", + "main": "index.js", + "type": "module", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "MIT", + "dependencies": { + "@libsql/client-wasm": "../.." + }, + "devDependencies": { + "esbuild": "0.19.11" + } } diff --git a/packages/libsql-client-wasm/examples/node/index.js b/packages/libsql-client-wasm/examples/node/index.js index 2db18c82..634b9a98 100644 --- a/packages/libsql-client-wasm/examples/node/index.js +++ b/packages/libsql-client-wasm/examples/node/index.js @@ -1,17 +1,16 @@ import { createClient } from "@libsql/client-wasm"; async function main() { - const config = { - url: "file:local.db", - }; - const db = await createClient(config); - await db.execute("CREATE TABLE users (id INT PRIMARY KEY, username TEXT)"); - await db.execute("INSERT INTO users VALUES (1, 'penberg')"); - const rs = await db.execute("SELECT * FROM users"); - console.log(rs); + const config = { + url: "file:local.db", + }; + const db = await createClient(config); + await db.execute("CREATE TABLE users (id INT PRIMARY KEY, username TEXT)"); + await db.execute("INSERT INTO users VALUES (1, 'penberg')"); + const rs = await db.execute("SELECT * FROM users"); + console.log(rs); } -main() - .catch((error) => { +main().catch((error) => { console.log(error); - }); +}); diff --git a/packages/libsql-client-wasm/examples/node/package-lock.json b/packages/libsql-client-wasm/examples/node/package-lock.json index e9a84336..6a110b76 100644 --- a/packages/libsql-client-wasm/examples/node/package-lock.json +++ b/packages/libsql-client-wasm/examples/node/package-lock.json @@ -1,37 +1,37 @@ { - "name": "nodejs", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "nodejs", - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "@libsql/client-wasm": "../../" - } - }, - "../..": { - "name": "@libsql/client-wasm", - "version": "0.4.0-pre.7", - "license": "MIT", - "dependencies": { - "@libsql/core": "0.4.0-pre.7", - "@libsql/libsql-wasm-experimental": "^0.0.1", - "js-base64": "^3.7.5" - }, - "devDependencies": { - "@types/jest": "^29.2.5", - "jest": "^29.3.1", - "ts-jest": "^29.0.5", - "typedoc": "^0.23.28", - "typescript": "^4.9.4" - } - }, - "node_modules/@libsql/client-wasm": { - "resolved": "../..", - "link": true + "name": "nodejs", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "nodejs", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "@libsql/client-wasm": "../../" + } + }, + "../..": { + "name": "@libsql/client-wasm", + "version": "0.4.0-pre.7", + "license": "MIT", + "dependencies": { + "@libsql/core": "0.4.0-pre.7", + "@libsql/libsql-wasm-experimental": "^0.0.1", + "js-base64": "^3.7.5" + }, + "devDependencies": { + "@types/jest": "^29.2.5", + "jest": "^29.3.1", + "ts-jest": "^29.0.5", + "typedoc": "^0.23.28", + "typescript": "^4.9.4" + } + }, + "node_modules/@libsql/client-wasm": { + "resolved": "../..", + "link": true + } } - } } diff --git a/packages/libsql-client-wasm/examples/node/package.json b/packages/libsql-client-wasm/examples/node/package.json index b3810808..964d78b6 100644 --- a/packages/libsql-client-wasm/examples/node/package.json +++ b/packages/libsql-client-wasm/examples/node/package.json @@ -1,15 +1,15 @@ { - "name": "nodejs", - "version": "1.0.0", - "description": "", - "main": "index.js", - "type": "module", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "MIT", - "dependencies": { - "@libsql/client-wasm": "../../" - } + "name": "nodejs", + "version": "1.0.0", + "description": "", + "main": "index.js", + "type": "module", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "MIT", + "dependencies": { + "@libsql/client-wasm": "../../" + } } diff --git a/packages/libsql-client-wasm/jest.config.js b/packages/libsql-client-wasm/jest.config.js index 65716e3c..044a5b86 100644 --- a/packages/libsql-client-wasm/jest.config.js +++ b/packages/libsql-client-wasm/jest.config.js @@ -1,7 +1,7 @@ export default { preset: "ts-jest/presets/default-esm", moduleNameMapper: { - '^(\\.{1,2}/.*)\\.js$': '$1', + "^(\\.{1,2}/.*)\\.js$": "$1", }, testMatch: ["**/__tests__/*.test.[jt]s"], -} +}; diff --git a/packages/libsql-client-wasm/src/wasm.ts b/packages/libsql-client-wasm/src/wasm.ts index 5b85407c..694d94af 100644 --- a/packages/libsql-client-wasm/src/wasm.ts +++ b/packages/libsql-client-wasm/src/wasm.ts @@ -1,15 +1,32 @@ -import sqlite3InitModule from '@libsql/libsql-wasm-experimental'; +import sqlite3InitModule from "@libsql/libsql-wasm-experimental"; -import type { Database, InitOptions, SqlValue, Sqlite3Static } from '@libsql/libsql-wasm-experimental'; +import type { + Database, + InitOptions, + SqlValue, + Sqlite3Static, +} from "@libsql/libsql-wasm-experimental"; import type { - Config, IntMode, Client, Transaction, TransactionMode, - ResultSet, Row, Value, InValue, InStatement, + Config, + IntMode, + Client, + Transaction, + TransactionMode, + ResultSet, + Row, + Value, + InValue, + InStatement, } from "@libsql/core/api"; import { LibsqlError } from "@libsql/core/api"; import type { ExpandedConfig } from "@libsql/core/config"; import { expandConfig } from "@libsql/core/config"; -import { supportedUrlLink, transactionModeToBegin, ResultSetImpl } from "@libsql/core/util"; +import { + supportedUrlLink, + transactionModeToBegin, + ResultSetImpl, +} from "@libsql/core/util"; export * from "@libsql/core/api"; @@ -30,7 +47,10 @@ export function _createClient(config: ExpandedConfig): Client { } if (config.encryptionKey !== undefined) { - throw new LibsqlError("Encryption key is not supported by the Wasm client.", "ENCRYPTION_KEY_NOT_SUPPORTED"); + throw new LibsqlError( + "Encryption key is not supported by the Wasm client.", + "ENCRYPTION_KEY_NOT_SUPPORTED", + ); } const authority = config.authority; @@ -50,7 +70,10 @@ export function _createClient(config: ExpandedConfig): Client { throw new LibsqlError("File URL cannot have a port", "URL_INVALID"); } if (authority.userinfo !== undefined) { - throw new LibsqlError("File URL cannot have username and password", "URL_INVALID"); + throw new LibsqlError( + "File URL cannot have username and password", + "URL_INVALID", + ); } } @@ -60,9 +83,13 @@ export function _createClient(config: ExpandedConfig): Client { syncUrl: config.syncUrl, }; - const db: Database = new sqlite3.oo1.DB(path, 'c'); + const db: Database = new sqlite3.oo1.DB(path, "c"); - executeStmt(db, "SELECT 1 AS checkThatTheDatabaseCanBeOpened", config.intMode); + executeStmt( + db, + "SELECT 1 AS checkThatTheDatabaseCanBeOpened", + config.intMode, + ); return new Sqlite3Client(sqlite3, path, /*options,*/ db, config.intMode); } @@ -80,7 +107,12 @@ export class Sqlite3Client implements Client { protocol: "file"; /** @private */ - constructor(sqlite3: Sqlite3Static, path: string, /*options: Database.Options,*/ db: Database, intMode: IntMode) { + constructor( + sqlite3: Sqlite3Static, + path: string, + /*options: Database.Options,*/ db: Database, + intMode: IntMode, + ) { this.#sqlite3 = sqlite3; this.#path = path; //this.#options = options; @@ -95,18 +127,24 @@ export class Sqlite3Client implements Client { return executeStmt(this.#getDb(), stmt, this.#intMode); } - async batch(stmts: Array, mode: TransactionMode = "deferred"): Promise> { + async batch( + stmts: Array, + mode: TransactionMode = "deferred", + ): Promise> { this.#checkNotClosed(); const db = this.#getDb(); try { executeStmt(db, transactionModeToBegin(mode), this.#intMode); const resultSets = stmts.map((stmt) => { if (!inTransaction(db)) { - throw new LibsqlError("The transaction has been rolled back", "TRANSACTION_CLOSED"); + throw new LibsqlError( + "The transaction has been rolled back", + "TRANSACTION_CLOSED", + ); } return executeStmt(db, stmt, this.#intMode); }); - executeStmt(db, "COMMIT", this.#intMode) + executeStmt(db, "COMMIT", this.#intMode); return resultSets; } finally { if (inTransaction(db)) { @@ -134,9 +172,11 @@ export class Sqlite3Client implements Client { } } - async sync(): Promise { - throw new LibsqlError("sync not supported in wasm mode", "SYNC_NOT_SUPPORTED"); + throw new LibsqlError( + "sync not supported in wasm mode", + "SYNC_NOT_SUPPORTED", + ); } close(): void { @@ -155,7 +195,7 @@ export class Sqlite3Client implements Client { // Lazily creates the database connection and returns it #getDb(): Database { if (this.#db === null) { - this.#db = new this.#sqlite3.oo1.DB('/mydb.sqlite3', 'ct'); + this.#db = new this.#sqlite3.oo1.DB("/mydb.sqlite3", "ct"); } return this.#db; } @@ -213,12 +253,19 @@ export class Sqlite3Transaction implements Transaction { #checkNotClosed(): void { if (this.closed) { - throw new LibsqlError("The transaction is closed", "TRANSACTION_CLOSED"); + throw new LibsqlError( + "The transaction is closed", + "TRANSACTION_CLOSED", + ); } } } -function executeStmt(db: Database, stmt: InStatement, intMode: IntMode): ResultSet { +function executeStmt( + db: Database, + stmt: InStatement, + intMode: IntMode, +): ResultSet { let sql: string; let args: Array | Record; if (typeof stmt === "string") { @@ -231,8 +278,10 @@ function executeStmt(db: Database, stmt: InStatement, intMode: IntMode): ResultS } else { args = {}; for (const name in stmt.args) { - const argName = (name[0] === "@" || name[0] === "$" || name[0] === ":") - ? name.substring(1) : name; + const argName = + name[0] === "@" || name[0] === "$" || name[0] === ":" + ? name.substring(1) + : name; args[argName] = valueToSql(stmt.args[name], intMode); } } @@ -270,7 +319,13 @@ function executeStmt(db: Database, stmt: InStatement, intMode: IntMode): ResultS } const rowsAffected = 0; const lastInsertRowid = undefined; - return new ResultSetImpl(columns, columnTypes, rows, rowsAffected, lastInsertRowid); + return new ResultSetImpl( + columns, + columnTypes, + rows, + rowsAffected, + lastInsertRowid, + ); } else { sqlStmt.step(); // TODO: check return value const rowsAffected = db.changes(); @@ -282,7 +337,11 @@ function executeStmt(db: Database, stmt: InStatement, intMode: IntMode): ResultS } } -function rowFromSql(sqlRow: Array, columns: Array, intMode: IntMode): Row { +function rowFromSql( + sqlRow: Array, + columns: Array, + intMode: IntMode, +): Row { const row = {}; // make sure that the "length" property is not enumerable Object.defineProperty(row, "length", { value: sqlRow.length }); @@ -292,7 +351,12 @@ function rowFromSql(sqlRow: Array, columns: Array, intMode: Int const column = columns[i]; if (!Object.hasOwn(row, column)) { - Object.defineProperty(row, column, { value, enumerable: true, configurable: true, writable: true }); + Object.defineProperty(row, column, { + value, + enumerable: true, + configurable: true, + writable: true, + }); } } return row as Row; @@ -303,14 +367,14 @@ function valueFromSql(sqlValue: unknown, intMode: IntMode): Value { if (intMode === "number") { if (sqlValue < minSafeBigint || sqlValue > maxSafeBigint) { throw new RangeError( - "Received integer which cannot be safely represented as a JavaScript number" + "Received integer which cannot be safely represented as a JavaScript number", ); } return Number(sqlValue); } else if (intMode === "bigint") { return sqlValue; } else if (intMode === "string") { - return ""+sqlValue; + return "" + sqlValue; } else { throw new Error("Invalid value for IntMode"); } @@ -324,29 +388,33 @@ const maxSafeBigint = 9007199254740991n; function valueToSql(value: InValue, intMode: IntMode): SqlValue { if (typeof value === "number") { if (!Number.isFinite(value)) { - throw new RangeError("Only finite numbers (not Infinity or NaN) can be passed as arguments"); + throw new RangeError( + "Only finite numbers (not Infinity or NaN) can be passed as arguments", + ); } return value; } else if (typeof value === "bigint") { if (value < minInteger || value > maxInteger) { throw new RangeError( - "bigint is too large to be represented as a 64-bit integer and passed as argument" + "bigint is too large to be represented as a 64-bit integer and passed as argument", ); } return value; } else if (typeof value === "boolean") { - switch(intMode) { - case "bigint": - return value ? 1n : 0n; - case "string": - return value ? "1" : "0"; - default: - return value ? 1 : 0; - } + switch (intMode) { + case "bigint": + return value ? 1n : 0n; + case "string": + return value ? "1" : "0"; + default: + return value ? 1 : 0; + } } else if (value instanceof Date) { return value.valueOf(); } else if (value === undefined) { - throw new TypeError("undefined cannot be passed as argument to the database"); + throw new TypeError( + "undefined cannot be passed as argument to the database", + ); } else { return value; } diff --git a/packages/libsql-client-wasm/tsconfig.build-esm.json b/packages/libsql-client-wasm/tsconfig.build-esm.json index 9a01705b..2ba1706d 100644 --- a/packages/libsql-client-wasm/tsconfig.build-esm.json +++ b/packages/libsql-client-wasm/tsconfig.build-esm.json @@ -6,4 +6,3 @@ "outDir": "./lib-esm/" } } - diff --git a/packages/libsql-client/.prettierrc b/packages/libsql-client/.prettierrc deleted file mode 100644 index 0967ef42..00000000 --- a/packages/libsql-client/.prettierrc +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/packages/libsql-client/README.md b/packages/libsql-client/README.md index eaf21450..0510fa47 100644 --- a/packages/libsql-client/README.md +++ b/packages/libsql-client/README.md @@ -43,9 +43,9 @@ Learn more about what you can do with Turso: -- [Embedded Replicas](https://docs.turso.tech/features/embedded-replicas) -- [Platform API](https://docs.turso.tech/features/platform-api) -- [Data Edge](https://docs.turso.tech/features/data-edge) -- [Branching](https://docs.turso.tech/features/branching) -- [Point-in-Time Recovery](https://docs.turso.tech/features/point-in-time-recovery) -- [Scale to Zero](https://docs.turso.tech/features/scale-to-zero) +- [Embedded Replicas](https://docs.turso.tech/features/embedded-replicas) +- [Platform API](https://docs.turso.tech/features/platform-api) +- [Data Edge](https://docs.turso.tech/features/data-edge) +- [Branching](https://docs.turso.tech/features/branching) +- [Point-in-Time Recovery](https://docs.turso.tech/features/point-in-time-recovery) +- [Scale to Zero](https://docs.turso.tech/features/scale-to-zero) diff --git a/packages/libsql-client/examples/example.js b/packages/libsql-client/examples/example.js index 2d696789..ffb083e3 100644 --- a/packages/libsql-client/examples/example.js +++ b/packages/libsql-client/examples/example.js @@ -1,18 +1,21 @@ import { createClient } from "@libsql/client"; async function example() { - const config = { - url: process.env.URL ?? "file:local.db", - encryptionKey: process.env.ENCRYPTION_KEY, - }; - const db = createClient(config); - await db.batch([ - "CREATE TABLE IF NOT EXISTS users (email TEXT)", - "INSERT INTO users (email) VALUES ('alice@example.com')", - "INSERT INTO users (email) VALUES ('bob@example.com')" - ], "write"); - const rs = await db.execute("SELECT * FROM users"); - console.log(rs); + const config = { + url: process.env.URL ?? "file:local.db", + encryptionKey: process.env.ENCRYPTION_KEY, + }; + const db = createClient(config); + await db.batch( + [ + "CREATE TABLE IF NOT EXISTS users (email TEXT)", + "INSERT INTO users (email) VALUES ('alice@example.com')", + "INSERT INTO users (email) VALUES ('bob@example.com')", + ], + "write", + ); + const rs = await db.execute("SELECT * FROM users"); + console.log(rs); } await example(); diff --git a/packages/libsql-client/examples/package.json b/packages/libsql-client/examples/package.json index 5d58af5f..64f619ee 100644 --- a/packages/libsql-client/examples/package.json +++ b/packages/libsql-client/examples/package.json @@ -1,10 +1,10 @@ { - "name": "libsql-examples", - "type": "module", - "private": true, - "dependencies": { - "@libsql/client": "..", - "@libsql/core": "../../libsql-core", - "readline-sync": "^1.4.10" - } + "name": "libsql-examples", + "type": "module", + "private": true, + "dependencies": { + "@libsql/client": "..", + "@libsql/core": "../../libsql-core", + "readline-sync": "^1.4.10" + } } diff --git a/packages/libsql-client/examples/shell.js b/packages/libsql-client/examples/shell.js index 4351cab3..4d5384bc 100644 --- a/packages/libsql-client/examples/shell.js +++ b/packages/libsql-client/examples/shell.js @@ -9,8 +9,8 @@ async function main() { return; } - const client = libsql.createClient({url}); - const rl = readline.createInterface({input: stdin, output: stdout}); + const client = libsql.createClient({ url }); + const rl = readline.createInterface({ input: stdin, output: stdout }); for (;;) { const sql = await rl.question("> "); diff --git a/packages/libsql-client/examples/sync.js b/packages/libsql-client/examples/sync.js index 21a87356..15aaa4a6 100644 --- a/packages/libsql-client/examples/sync.js +++ b/packages/libsql-client/examples/sync.js @@ -2,26 +2,31 @@ import { createClient } from "@libsql/client"; import reader from "readline-sync"; async function example() { - const config = { - url: process.env.URL ?? "file:local.db", - syncUrl: process.env.SYNC_URL, - authToken: process.env.AUTH_TOKEN, - }; - const db = createClient(config); - await db.sync(); - await db.execute("CREATE TABLE IF NOT EXISTS guest_book_entries (comment TEXT)"); - await db.sync(); + const config = { + url: process.env.URL ?? "file:local.db", + syncUrl: process.env.SYNC_URL, + authToken: process.env.AUTH_TOKEN, + }; + const db = createClient(config); + await db.sync(); + await db.execute( + "CREATE TABLE IF NOT EXISTS guest_book_entries (comment TEXT)", + ); + await db.sync(); - const comment = reader.question("Enter your comment: "); + const comment = reader.question("Enter your comment: "); - await db.execute({ sql: "INSERT INTO guest_book_entries (comment) VALUES (?)", args: [comment]}); - await db.sync(); + await db.execute({ + sql: "INSERT INTO guest_book_entries (comment) VALUES (?)", + args: [comment], + }); + await db.sync(); - console.log("Guest book entries:"); - const rs = await db.execute("SELECT * FROM guest_book_entries"); - for (const row of rs.rows) { - console.log(" - " + row.comment); - } + console.log("Guest book entries:"); + const rs = await db.execute("SELECT * FROM guest_book_entries"); + for (const row of rs.rows) { + console.log(" - " + row.comment); + } } -example() +example(); diff --git a/packages/libsql-client/jest.config.js b/packages/libsql-client/jest.config.js index 65716e3c..044a5b86 100644 --- a/packages/libsql-client/jest.config.js +++ b/packages/libsql-client/jest.config.js @@ -1,7 +1,7 @@ export default { preset: "ts-jest/presets/default-esm", moduleNameMapper: { - '^(\\.{1,2}/.*)\\.js$': '$1', + "^(\\.{1,2}/.*)\\.js$": "$1", }, testMatch: ["**/__tests__/*.test.[jt]s"], -} +}; diff --git a/packages/libsql-client/smoke_test/vercel/app/api/function.ts b/packages/libsql-client/smoke_test/vercel/app/api/function.ts index 22d7a7e8..2ed60507 100644 --- a/packages/libsql-client/smoke_test/vercel/app/api/function.ts +++ b/packages/libsql-client/smoke_test/vercel/app/api/function.ts @@ -8,9 +8,7 @@ export default async function (request: Request) { function respond(status: number, responseBody: string) { return new Response(responseBody, { status, - headers: [ - ["content-type", "text/plain"], - ], + headers: [["content-type", "text/plain"]], }); } @@ -21,7 +19,10 @@ export default async function (request: Request) { const url = new URL(request.url); const testCase = url.searchParams.get("test"); if (testCase === null) { - return respond(400, "Please specify the test case using the 'test' query parameter"); + return respond( + 400, + "Please specify the test case using the 'test' query parameter", + ); } const testCaseFn = testCases[testCase]; @@ -31,7 +32,7 @@ export default async function (request: Request) { let client; try { - client = libsql.createClient({url: process.env.CLIENT_URL!}); + client = libsql.createClient({ url: process.env.CLIENT_URL! }); await testCaseFn(client); return respond(200, "Test passed"); } catch (e) { @@ -41,10 +42,10 @@ export default async function (request: Request) { client.close(); } } -}; +} const testCases: Record Promise> = { - "execute": async (client: libsql.Client): Promise => { + execute: async (client: libsql.Client): Promise => { const rs = await client.execute("SELECT 1+1 AS two"); assert(rs.columns.length === 1); assert(rs.columns[0] === "two"); @@ -53,7 +54,7 @@ const testCases: Record Promise> = { assert(rs.rows[0][0] === 2.0); }, - "batch": async (client: libsql.Client): Promise => { + batch: async (client: libsql.Client): Promise => { const rss = await client.batch([ "DROP TABLE IF EXISTS t", "CREATE TABLE t (a, b)", @@ -82,7 +83,7 @@ const testCases: Record Promise> = { assert(rss[3].rows[2][1] === "three"); }, - "transaction": async (client: libsql.Client): Promise => { + transaction: async (client: libsql.Client): Promise => { await client.batch([ "DROP TABLE IF EXISTS t", "CREATE TABLE t (a, b)", diff --git a/packages/libsql-client/smoke_test/vercel/app/public/index.html b/packages/libsql-client/smoke_test/vercel/app/public/index.html index e3d18d45..bc129de7 100644 --- a/packages/libsql-client/smoke_test/vercel/app/public/index.html +++ b/packages/libsql-client/smoke_test/vercel/app/public/index.html @@ -1,3 +1,5 @@ - -

This is a smoke-test Vercel app for @libsql/client.

+ +

This is a smoke-test Vercel app for @libsql/client.

+ + diff --git a/packages/libsql-client/smoke_test/vercel/test.js b/packages/libsql-client/smoke_test/vercel/test.js index d6c22189..8cd1fbbd 100644 --- a/packages/libsql-client/smoke_test/vercel/test.js +++ b/packages/libsql-client/smoke_test/vercel/test.js @@ -15,8 +15,13 @@ function getEnv(name) { const vercelToken = getEnv("VERCEL_TOKEN"); const projectName = getEnv("VERCEL_PROJECT_NAME"); -async function npm(subcommand, args, hiddenArgs = [], {capture = false} = {}) { - console.info(`$ npm ${subcommand} ${args.join(' ')}`); +async function npm( + subcommand, + args, + hiddenArgs = [], + { capture = false } = {}, +) { + console.info(`$ npm ${subcommand} ${args.join(" ")}`); const proc = spawn("npm", [subcommand, ...args, ...hiddenArgs], { stdio: ["ignore", capture ? "pipe" : "inherit", "inherit"], @@ -25,7 +30,11 @@ async function npm(subcommand, args, hiddenArgs = [], {capture = false} = {}) { const exitPromise = new Promise((resolve, reject) => { proc.on("exit", (code, signal) => { if (signal !== null) { - reject(new Error(`vercel command terminated due to signal: ${signal}`)); + reject( + new Error( + `vercel command terminated due to signal: ${signal}`, + ), + ); } else if (code !== 0) { reject(new Error(`vercel command exited with code: ${code}`)); } else { @@ -54,39 +63,62 @@ async function npm(subcommand, args, hiddenArgs = [], {capture = false} = {}) { async function deployToVercel(clientUrlInsideVercel) { console.info("Building and deploying to Vercel..."); - let tarballName = await npm("pack", ["../.."], [], {capture: true}); + let tarballName = await npm("pack", ["../.."], [], { capture: true }); tarballName = tarballName.trim(); const appPackageJson = { - "dependencies": { + dependencies: { "@libsql/client": `../${tarballName}`, }, }; - fs.writeFileSync("app/package.json", JSON.stringify(appPackageJson, null, 4)); + fs.writeFileSync( + "app/package.json", + JSON.stringify(appPackageJson, null, 4), + ); await npm( "exec", - ["--", "vercel", "link", "--yes", "--project", projectName, "--cwd", "app/"], + [ + "--", + "vercel", + "link", + "--yes", + "--project", + projectName, + "--cwd", + "app/", + ], ["--token", vercelToken], ); await npm( "exec", - ["--", "vercel", "pull", "--yes", "--environment=preview", "--cwd", "app/"], + [ + "--", + "vercel", + "pull", + "--yes", + "--environment=preview", + "--cwd", + "app/", + ], ["--token", vercelToken], ); - await npm( - "exec", - ["--", "vercel", "build", "--cwd", "app/"], - ); + await npm("exec", ["--", "vercel", "build", "--cwd", "app/"]); const deployUrl = await npm( "exec", [ - "--", "vercel", "deploy", "--prebuilt", - "--env", `CLIENT_URL=${clientUrlInsideVercel}`, "--cwd", "app/", + "--", + "vercel", + "deploy", + "--prebuilt", + "--env", + `CLIENT_URL=${clientUrlInsideVercel}`, + "--cwd", + "app/", ], ["--token", vercelToken, "--cwd", "app/"], - {capture: true}, + { capture: true }, ); console.info(`Deployed Vercel project on ${deployUrl}`); @@ -98,7 +130,7 @@ const testCases = ["execute", "batch", "transaction"]; async function runTests(functionUrl) { let ok = true; for (const testCase of testCases) { - if (!await runTest(functionUrl, testCase)) { + if (!(await runTest(functionUrl, testCase))) { ok = false; } } @@ -112,7 +144,9 @@ async function runTest(functionUrl, testCase) { if (ok) { console.info(`TEST ${testCase}: passed`); } else { - console.warn(`\nTEST ${testCase}: failed with status ${resp.status}\n${respText}\n`); + console.warn( + `\nTEST ${testCase}: failed with status ${resp.status}\n${respText}\n`, + ); } return ok; } diff --git a/packages/libsql-client/smoke_test/vercel/tsconfig.json b/packages/libsql-client/smoke_test/vercel/tsconfig.json index 966e86fc..74ac41e2 100644 --- a/packages/libsql-client/smoke_test/vercel/tsconfig.json +++ b/packages/libsql-client/smoke_test/vercel/tsconfig.json @@ -1,14 +1,14 @@ { - "compilerOptions": { - "target": "es5", - "lib": ["dom", "esnext"], - "module": "esnext", - "moduleResolution": "node", - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "noEmit": true, - "esModuleInterop": true, - "isolatedModules": true - } + "compilerOptions": { + "target": "es5", + "lib": ["dom", "esnext"], + "module": "esnext", + "moduleResolution": "node", + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "isolatedModules": true + } } diff --git a/packages/libsql-client/smoke_test/workers/test.js b/packages/libsql-client/smoke_test/workers/test.js index 5d5d567a..8d776ebf 100644 --- a/packages/libsql-client/smoke_test/workers/test.js +++ b/packages/libsql-client/smoke_test/workers/test.js @@ -55,24 +55,24 @@ async function main() { } async function runWorker(local, clientUrlInsideWorker) { - console.info(`Creating a ${local ? 'local' : 'nonlocal'} Worker...`); + console.info(`Creating a ${local ? "local" : "nonlocal"} Worker...`); const worker = await wrangler.unstable_dev("worker.js", { config: "wrangler.toml", logLevel: "info", local, vars: { - "CLIENT_URL": clientUrlInsideWorker.toString(), + CLIENT_URL: clientUrlInsideWorker.toString(), }, experimental: { disableExperimentalWarning: true, - } + }, }); console.info(`Worker created on ${worker.address}:${worker.port}`); try { let ok = true; for (const testCase of testCases) { - if (!await runTest(worker, testCase)) { + if (!(await runTest(worker, testCase))) { ok = false; } } @@ -90,7 +90,9 @@ async function runTest(worker, testCase) { if (ok) { console.info(`TEST ${testCase}: passed`); } else { - console.warn(`\nTEST ${testCase}: failed with status ${resp.status}\n${respText}\n`); + console.warn( + `\nTEST ${testCase}: failed with status ${resp.status}\n${respText}\n`, + ); } return ok; } diff --git a/packages/libsql-client/smoke_test/workers/worker.js b/packages/libsql-client/smoke_test/workers/worker.js index 62a6492b..7af79718 100644 --- a/packages/libsql-client/smoke_test/workers/worker.js +++ b/packages/libsql-client/smoke_test/workers/worker.js @@ -5,9 +5,7 @@ export default { function respond(status, responseBody) { return new Response(responseBody, { status, - headers: [ - ["content-type", "text/plain"], - ], + headers: [["content-type", "text/plain"]], }); } @@ -17,7 +15,10 @@ export default { const url = new URL(request.url); if (url.pathname === "/") { - return respond(200, "This is a smoke-test Worker for @libsql/client"); + return respond( + 200, + "This is a smoke-test Worker for @libsql/client", + ); } const testCaseFn = testCases[url.pathname]; @@ -27,7 +28,7 @@ export default { let client; try { - client = libsql.createClient({url: env.CLIENT_URL}); + client = libsql.createClient({ url: env.CLIENT_URL }); await testCaseFn(client); return respond(200, "Test passed"); } catch (e) { diff --git a/packages/libsql-client/src/__tests__/client.test.ts b/packages/libsql-client/src/__tests__/client.test.ts index 6ae29488..7d230e96 100644 --- a/packages/libsql-client/src/__tests__/client.test.ts +++ b/packages/libsql-client/src/__tests__/client.test.ts @@ -16,8 +16,12 @@ const config = { authToken: process.env.AUTH_TOKEN, }; -const isWs = config.url.startsWith("ws:") || config.url.startsWith("wss:") || config.url.startsWith("libsql:"); -const isHttp = config.url.startsWith("http:") || config.url.startsWith("https:"); +const isWs = + config.url.startsWith("ws:") || + config.url.startsWith("wss:") || + config.url.startsWith("libsql:"); +const isHttp = + config.url.startsWith("http:") || config.url.startsWith("https:"); const isFile = config.url.startsWith("file:"); // This allows us to skip tests based on the Hrana server that we are targeting: @@ -29,14 +33,16 @@ const server = process.env.SERVER ?? "test_v3"; const hasHrana2 = server !== "test_v1"; const hasHrana3 = server !== "test_v1" && server !== "test_v2"; -const hasNetworkErrors = isWs && (server === "test_v1" || server === "test_v2" || server === "test_v3"); +const hasNetworkErrors = + isWs && + (server === "test_v1" || server === "test_v2" || server === "test_v3"); function withClient( f: (c: libsql.Client) => Promise, extraConfig: Partial = {}, ): () => Promise { return async () => { - const c = createClient({...config, ...extraConfig}); + const c = createClient({ ...config, ...extraConfig }); try { await f(c); } finally { @@ -60,13 +66,15 @@ function withInMemoryClient( describe("createClient()", () => { test("URL scheme not supported", () => { - expect(() => createClient({url: "ftp://localhost"})) - .toThrow(expect.toBeLibsqlError("URL_SCHEME_NOT_SUPPORTED", /"ftp:"/)); + expect(() => createClient({ url: "ftp://localhost" })).toThrow( + expect.toBeLibsqlError("URL_SCHEME_NOT_SUPPORTED", /"ftp:"/), + ); }); test("URL param not supported", () => { - expect(() => createClient({url: "ws://localhost?foo=bar"})) - .toThrow(expect.toBeLibsqlError("URL_PARAM_NOT_SUPPORTED", /"foo"/)); + expect(() => createClient({ url: "ws://localhost?foo=bar" })).toThrow( + expect.toBeLibsqlError("URL_PARAM_NOT_SUPPORTED", /"foo"/), + ); }); test("URL scheme incompatible with ?tls", () => { @@ -77,148 +85,207 @@ describe("createClient()", () => { "https://localhost?tls=0", ]; for (const url of urls) { - expect(() => createClient({url})) - .toThrow(expect.toBeLibsqlError("URL_INVALID", /TLS/)); + expect(() => createClient({ url })).toThrow( + expect.toBeLibsqlError("URL_INVALID", /TLS/), + ); } }); test("missing port in libsql URL with tls=0", () => { - expect(() => createClient({url: "libsql://localhost?tls=0"})) - .toThrow(expect.toBeLibsqlError("URL_INVALID", /port/)); + expect(() => createClient({ url: "libsql://localhost?tls=0" })).toThrow( + expect.toBeLibsqlError("URL_INVALID", /port/), + ); }); test("invalid value of tls query param", () => { - expect(() => createClient({url: "libsql://localhost?tls=yes"})) - .toThrow(expect.toBeLibsqlError("URL_INVALID", /"tls".*"yes"/)); + expect(() => + createClient({ url: "libsql://localhost?tls=yes" }), + ).toThrow(expect.toBeLibsqlError("URL_INVALID", /"tls".*"yes"/)); }); test("passing URL instead of config object", () => { // @ts-expect-error - expect(() => createClient("ws://localhost")).toThrow(/as object, got string/); + expect(() => createClient("ws://localhost")).toThrow( + /as object, got string/, + ); }); test("invalid value for `intMode`", () => { // @ts-expect-error - expect(() => createClient({...config, intMode: "foo"})).toThrow(/"foo"/); + expect(() => createClient({ ...config, intMode: "foo" })).toThrow( + /"foo"/, + ); }); test("supports in-memory database", () => { - expect(() => createClient({url: ":memory:"})).not.toThrow(); + expect(() => createClient({ url: ":memory:" })).not.toThrow(); }); }); describe("execute()", () => { - test("query a single value", withClient(async (c) => { - const rs = await c.execute("SELECT 42"); - expect(rs.columns.length).toStrictEqual(1); - expect(rs.columnTypes.length).toStrictEqual(1); - expect(rs.rows.length).toStrictEqual(1); - expect(rs.rows[0].length).toStrictEqual(1); - expect(rs.rows[0][0]).toStrictEqual(42); - })); - - test("query a single row", withClient(async (c) => { - const rs = await c.execute("SELECT 1 AS one, 'two' AS two, 0.5 AS three"); - expect(rs.columns).toStrictEqual(["one", "two", "three"]); - expect(rs.columnTypes).toStrictEqual(["", "", ""]); - expect(rs.rows.length).toStrictEqual(1); - - const r = rs.rows[0]; - expect(r.length).toStrictEqual(3); - expect(Array.from(r)).toStrictEqual([1, "two", 0.5]); - expect(Object.entries(r)).toStrictEqual([["one", 1], ["two", "two"], ["three", 0.5]]); - })); - - test("query multiple rows", withClient(async (c) => { - const rs = await c.execute("VALUES (1, 'one'), (2, 'two'), (3, 'three')"); - expect(rs.columns.length).toStrictEqual(2); - expect(rs.columnTypes.length).toStrictEqual(2); - expect(rs.rows.length).toStrictEqual(3); - - expect(Array.from(rs.rows[0])).toStrictEqual([1, "one"]); - expect(Array.from(rs.rows[1])).toStrictEqual([2, "two"]); - expect(Array.from(rs.rows[2])).toStrictEqual([3, "three"]); - })); - - test("statement that produces error", withClient(async (c) => { - await expect(c.execute("SELECT foobar")).rejects.toBeLibsqlError(); - })); - - test("rowsAffected with INSERT", withClient(async (c) => { - await c.batch([ - "DROP TABLE IF EXISTS t", - "CREATE TABLE t (a)", - ], "write"); - const rs = await c.execute("INSERT INTO t VALUES (1), (2)"); - expect(rs.rowsAffected).toStrictEqual(2); - })); - - test("rowsAffected with DELETE", withClient(async (c) => { - await c.batch([ - "DROP TABLE IF EXISTS t", - "CREATE TABLE t (a)", - "INSERT INTO t VALUES (1), (2), (3), (4), (5)", - ], "write"); - const rs = await c.execute("DELETE FROM t WHERE a >= 3"); - expect(rs.rowsAffected).toStrictEqual(3); - })); - - test("lastInsertRowid with INSERT", withClient(async (c) => { - await c.batch([ - "DROP TABLE IF EXISTS t", - "CREATE TABLE t (a)", - "INSERT INTO t VALUES ('one'), ('two')", - ], "write"); - const insertRs = await c.execute("INSERT INTO t VALUES ('three')"); - expect(insertRs.lastInsertRowid).not.toBeUndefined(); - const selectRs = await c.execute({ - sql: "SELECT a FROM t WHERE ROWID = ?", - args: [insertRs.lastInsertRowid!], - }); - expect(Array.from(selectRs.rows[0])).toStrictEqual(["three"]); - })); - - test("rows from INSERT RETURNING", withClient(async (c) => { - await c.batch([ - "DROP TABLE IF EXISTS t", - "CREATE TABLE t (a)", - ], "write"); - - const rs = await c.execute("INSERT INTO t VALUES (1) RETURNING 42 AS x, 'foo' AS y"); - expect(rs.columns).toStrictEqual(["x", "y"]); - expect(rs.columnTypes).toStrictEqual(["", ""]); - expect(rs.rows.length).toStrictEqual(1); - expect(Array.from(rs.rows[0])).toStrictEqual([42, "foo"]); - })); - - (hasHrana2 ? test : test.skip)("rowsAffected with WITH INSERT", withClient(async (c) => { - await c.batch([ - "DROP TABLE IF EXISTS t", - "CREATE TABLE t (a)", - "INSERT INTO t VALUES (1), (2), (3)", - ], "write"); - - const rs = await c.execute(` + test( + "query a single value", + withClient(async (c) => { + const rs = await c.execute("SELECT 42"); + expect(rs.columns.length).toStrictEqual(1); + expect(rs.columnTypes.length).toStrictEqual(1); + expect(rs.rows.length).toStrictEqual(1); + expect(rs.rows[0].length).toStrictEqual(1); + expect(rs.rows[0][0]).toStrictEqual(42); + }), + ); + + test( + "query a single row", + withClient(async (c) => { + const rs = await c.execute( + "SELECT 1 AS one, 'two' AS two, 0.5 AS three", + ); + expect(rs.columns).toStrictEqual(["one", "two", "three"]); + expect(rs.columnTypes).toStrictEqual(["", "", ""]); + expect(rs.rows.length).toStrictEqual(1); + + const r = rs.rows[0]; + expect(r.length).toStrictEqual(3); + expect(Array.from(r)).toStrictEqual([1, "two", 0.5]); + expect(Object.entries(r)).toStrictEqual([ + ["one", 1], + ["two", "two"], + ["three", 0.5], + ]); + }), + ); + + test( + "query multiple rows", + withClient(async (c) => { + const rs = await c.execute( + "VALUES (1, 'one'), (2, 'two'), (3, 'three')", + ); + expect(rs.columns.length).toStrictEqual(2); + expect(rs.columnTypes.length).toStrictEqual(2); + expect(rs.rows.length).toStrictEqual(3); + + expect(Array.from(rs.rows[0])).toStrictEqual([1, "one"]); + expect(Array.from(rs.rows[1])).toStrictEqual([2, "two"]); + expect(Array.from(rs.rows[2])).toStrictEqual([3, "three"]); + }), + ); + + test( + "statement that produces error", + withClient(async (c) => { + await expect(c.execute("SELECT foobar")).rejects.toBeLibsqlError(); + }), + ); + + test( + "rowsAffected with INSERT", + withClient(async (c) => { + await c.batch( + ["DROP TABLE IF EXISTS t", "CREATE TABLE t (a)"], + "write", + ); + const rs = await c.execute("INSERT INTO t VALUES (1), (2)"); + expect(rs.rowsAffected).toStrictEqual(2); + }), + ); + + test( + "rowsAffected with DELETE", + withClient(async (c) => { + await c.batch( + [ + "DROP TABLE IF EXISTS t", + "CREATE TABLE t (a)", + "INSERT INTO t VALUES (1), (2), (3), (4), (5)", + ], + "write", + ); + const rs = await c.execute("DELETE FROM t WHERE a >= 3"); + expect(rs.rowsAffected).toStrictEqual(3); + }), + ); + + test( + "lastInsertRowid with INSERT", + withClient(async (c) => { + await c.batch( + [ + "DROP TABLE IF EXISTS t", + "CREATE TABLE t (a)", + "INSERT INTO t VALUES ('one'), ('two')", + ], + "write", + ); + const insertRs = await c.execute("INSERT INTO t VALUES ('three')"); + expect(insertRs.lastInsertRowid).not.toBeUndefined(); + const selectRs = await c.execute({ + sql: "SELECT a FROM t WHERE ROWID = ?", + args: [insertRs.lastInsertRowid!], + }); + expect(Array.from(selectRs.rows[0])).toStrictEqual(["three"]); + }), + ); + + test( + "rows from INSERT RETURNING", + withClient(async (c) => { + await c.batch( + ["DROP TABLE IF EXISTS t", "CREATE TABLE t (a)"], + "write", + ); + + const rs = await c.execute( + "INSERT INTO t VALUES (1) RETURNING 42 AS x, 'foo' AS y", + ); + expect(rs.columns).toStrictEqual(["x", "y"]); + expect(rs.columnTypes).toStrictEqual(["", ""]); + expect(rs.rows.length).toStrictEqual(1); + expect(Array.from(rs.rows[0])).toStrictEqual([42, "foo"]); + }), + ); + + (hasHrana2 ? test : test.skip)( + "rowsAffected with WITH INSERT", + withClient(async (c) => { + await c.batch( + [ + "DROP TABLE IF EXISTS t", + "CREATE TABLE t (a)", + "INSERT INTO t VALUES (1), (2), (3)", + ], + "write", + ); + + const rs = await c.execute(` WITH x(a) AS (SELECT 2*a FROM t) INSERT INTO t SELECT a+1 FROM x `); - expect(rs.rowsAffected).toStrictEqual(3); - })); - - test("query a single value using an in memory database", withInMemoryClient(async (c) => { - await c.batch([ - "DROP TABLE IF EXISTS t", - "CREATE TABLE t (a)", - "INSERT INTO t VALUES ('one'), ('two')", - ], "write"); - const insertRs = await c.execute("INSERT INTO t VALUES ('three')"); - expect(insertRs.lastInsertRowid).not.toBeUndefined(); - const selectRs = await c.execute({ - sql: "SELECT a FROM t WHERE ROWID = ?", - args: [insertRs.lastInsertRowid!], - }); - expect(Array.from(selectRs.rows[0])).toStrictEqual(["three"]); - })); + expect(rs.rowsAffected).toStrictEqual(3); + }), + ); + + test( + "query a single value using an in memory database", + withInMemoryClient(async (c) => { + await c.batch( + [ + "DROP TABLE IF EXISTS t", + "CREATE TABLE t (a)", + "INSERT INTO t VALUES ('one'), ('two')", + ], + "write", + ); + const insertRs = await c.execute("INSERT INTO t VALUES ('three')"); + expect(insertRs.lastInsertRowid).not.toBeUndefined(); + const selectRs = await c.execute({ + sql: "SELECT a FROM t WHERE ROWID = ?", + args: [insertRs.lastInsertRowid!], + }); + expect(Array.from(selectRs.rows[0])).toStrictEqual(["three"]); + }), + ); }); describe("values", () => { @@ -228,10 +295,19 @@ describe("values", () => { expected: libsql.Value, intMode?: libsql.IntMode, ): void { - test(name, withClient(async (c) => { - const rs = await c.execute({sql: "SELECT ?", args: [passed]}); - expect(rs.rows[0][0]).toStrictEqual(expected); - }, {intMode})); + test( + name, + withClient( + async (c) => { + const rs = await c.execute({ + sql: "SELECT ?", + args: [passed], + }); + expect(rs.rows[0][0]).toStrictEqual(expected); + }, + { intMode }, + ), + ); } function testRoundtripError( @@ -240,18 +316,29 @@ describe("values", () => { expectedError: unknown, intMode?: libsql.IntMode, ): void { - test(name, withClient(async (c) => { - await expect(c.execute({ - sql: "SELECT ?", - args: [passed], - })).rejects.toBeInstanceOf(expectedError); - }, {intMode})); + test( + name, + withClient( + async (c) => { + await expect( + c.execute({ + sql: "SELECT ?", + args: [passed], + }), + ).rejects.toBeInstanceOf(expectedError); + }, + { intMode }, + ), + ); } testRoundtrip("string", "boomerang", "boomerang"); testRoundtrip("string with weird characters", "a\n\r\t ", "a\n\r\t "); - testRoundtrip("string with unicode", - "žluťoučký kůň úpěl ďábelské ódy", "žluťoučký kůň úpěl ďábelské ódy"); + testRoundtrip( + "string with unicode", + "žluťoučký kůň úpěl ďábelské ódy", + "žluťoučký kůň úpěl ďábelské ódy", + ); describe("number", () => { const intModes: Array = ["number", "bigint", "string"]; @@ -261,9 +348,24 @@ describe("values", () => { testRoundtrip("float", 12.345, 12.345, intMode); testRoundtrip("large positive float", 1e18, 1e18, intMode); testRoundtrip("large negative float", -1e18, -1e18, intMode); - testRoundtrip("MAX_VALUE", Number.MAX_VALUE, Number.MAX_VALUE, intMode); - testRoundtrip("-MAX_VALUE", -Number.MAX_VALUE, -Number.MAX_VALUE, intMode); - testRoundtrip("MIN_VALUE", Number.MIN_VALUE, Number.MIN_VALUE, intMode); + testRoundtrip( + "MAX_VALUE", + Number.MAX_VALUE, + Number.MAX_VALUE, + intMode, + ); + testRoundtrip( + "-MAX_VALUE", + -Number.MAX_VALUE, + -Number.MAX_VALUE, + intMode, + ); + testRoundtrip( + "MIN_VALUE", + Number.MIN_VALUE, + Number.MIN_VALUE, + intMode, + ); } }); @@ -271,27 +373,82 @@ describe("values", () => { describe("'number' int mode", () => { testRoundtrip("zero integer", 0n, 0, "number"); testRoundtrip("small integer", -42n, -42, "number"); - testRoundtrip("largest safe integer", 9007199254740991n, 9007199254740991, "number"); - testRoundtripError("smallest unsafe integer", 9007199254740992n, RangeError, "number"); - testRoundtripError("large unsafe integer", -1152921504594532842n, RangeError, "number"); + testRoundtrip( + "largest safe integer", + 9007199254740991n, + 9007199254740991, + "number", + ); + testRoundtripError( + "smallest unsafe integer", + 9007199254740992n, + RangeError, + "number", + ); + testRoundtripError( + "large unsafe integer", + -1152921504594532842n, + RangeError, + "number", + ); }); describe("'bigint' int mode", () => { testRoundtrip("zero integer", 0n, 0n, "bigint"); testRoundtrip("small integer", -42n, -42n, "bigint"); - testRoundtrip("large positive integer", 1152921504608088318n, 1152921504608088318n, "bigint"); - testRoundtrip("large negative integer", -1152921504594532842n, -1152921504594532842n, "bigint"); - testRoundtrip("largest positive integer", 9223372036854775807n, 9223372036854775807n, "bigint"); - testRoundtrip("largest negative integer", -9223372036854775808n, -9223372036854775808n, "bigint"); + testRoundtrip( + "large positive integer", + 1152921504608088318n, + 1152921504608088318n, + "bigint", + ); + testRoundtrip( + "large negative integer", + -1152921504594532842n, + -1152921504594532842n, + "bigint", + ); + testRoundtrip( + "largest positive integer", + 9223372036854775807n, + 9223372036854775807n, + "bigint", + ); + testRoundtrip( + "largest negative integer", + -9223372036854775808n, + -9223372036854775808n, + "bigint", + ); }); describe("'string' int mode", () => { testRoundtrip("zero integer", 0n, "0", "string"); testRoundtrip("small integer", -42n, "-42", "string"); - testRoundtrip("large positive integer", 1152921504608088318n, "1152921504608088318", "string"); - testRoundtrip("large negative integer", -1152921504594532842n, "-1152921504594532842", "string"); - testRoundtrip("largest positive integer", 9223372036854775807n, "9223372036854775807", "string"); - testRoundtrip("largest negative integer", -9223372036854775808n, "-9223372036854775808", "string"); + testRoundtrip( + "large positive integer", + 1152921504608088318n, + "1152921504608088318", + "string", + ); + testRoundtrip( + "large negative integer", + -1152921504594532842n, + "-1152921504594532842", + "string", + ); + testRoundtrip( + "largest positive integer", + 9223372036854775807n, + "9223372036854775807", + "string", + ); + testRoundtrip( + "largest negative integer", + -9223372036854775808n, + "-9223372036854775808", + "string", + ); }); }); @@ -312,597 +469,810 @@ describe("values", () => { testRoundtrip("false", false, "0", "string"); testRoundtrip("true", true, 1); testRoundtrip("false", false, 0); - - testRoundtrip("Date", new Date("2023-01-02T12:34:56Z"), 1672662896000, "bigint"); + + testRoundtrip( + "Date", + new Date("2023-01-02T12:34:56Z"), + 1672662896000, + "bigint", + ); // @ts-expect-error testRoundtripError("undefined produces error", undefined, TypeError); testRoundtripError("NaN produces error", NaN, RangeError); testRoundtripError("Infinity produces error", Infinity, RangeError); - testRoundtripError("large bigint produces error", -1267650600228229401496703205376n, RangeError); - - test("max 64-bit bigint", withClient(async (c) => { - const rs = await c.execute({sql: "SELECT ?||''", args: [9223372036854775807n]}); - expect(rs.rows[0][0]).toStrictEqual("9223372036854775807"); - })); + testRoundtripError( + "large bigint produces error", + -1267650600228229401496703205376n, + RangeError, + ); + + test( + "max 64-bit bigint", + withClient(async (c) => { + const rs = await c.execute({ + sql: "SELECT ?||''", + args: [9223372036854775807n], + }); + expect(rs.rows[0][0]).toStrictEqual("9223372036854775807"); + }), + ); - test("min 64-bit bigint", withClient(async (c) => { - const rs = await c.execute({sql: "SELECT ?||''", args: [-9223372036854775808n]}); - expect(rs.rows[0][0]).toStrictEqual("-9223372036854775808"); - })); + test( + "min 64-bit bigint", + withClient(async (c) => { + const rs = await c.execute({ + sql: "SELECT ?||''", + args: [-9223372036854775808n], + }); + expect(rs.rows[0][0]).toStrictEqual("-9223372036854775808"); + }), + ); }); describe("ResultSet.toJSON()", () => { - test("simple result set", withClient(async (c) => { - const rs = await c.execute("SELECT 1 AS a"); - const json = rs.toJSON(); - expect(json["lastInsertRowid"] === null || json["lastInsertRowid"] === "0").toBe(true); - expect(json["columns"]).toStrictEqual(["a"]); - expect(json["columnTypes"]).toStrictEqual([""]); - expect(json["rows"]).toStrictEqual([[1]]); - expect(json["rowsAffected"]).toStrictEqual(0); - - const str = JSON.stringify(rs); - expect( - str === '{"columns":["a"],"columnTypes":[""],"rows":[[1]],"rowsAffected":0,"lastInsertRowid":null}' || - str === '{"columns":["a"],"columnTypes":[""],"rows":[[1]],"rowsAffected":0,"lastInsertRowid":"0"}' - ).toBe(true); - })); - - test("lastInsertRowid", withClient(async (c) => { - await c.execute("DROP TABLE IF EXISTS t"); - await c.execute("CREATE TABLE t (id INTEGER PRIMARY KEY NOT NULL)"); - const rs = await c.execute("INSERT INTO t VALUES (12345)"); - expect(rs.toJSON()).toStrictEqual({ - "columns": [], - "columnTypes": [], - "rows": [], - "rowsAffected": 1, - "lastInsertRowid": "12345", - }); - })); - - test("computed values", withClient(async (c) => { - const rs = await c.execute( - "SELECT 42 AS integer, 0.5 AS float, NULL AS \"null\", 'foo' AS text, X'626172' AS blob", - ); - const json = rs.toJSON(); - expect(json["columns"]).toStrictEqual(["integer", "float", "null", "text", "blob"]); - expect(json["columnTypes"]).toStrictEqual(["", "", "", "", ""]); - expect(json["rows"]).toStrictEqual([[42, 0.5, null, "foo", "YmFy"]]); - })); - - (hasHrana2 ? test : test.skip)("row values", withClient(async (c) => { - await c.execute("DROP TABLE IF EXISTS t"); - await c.execute("CREATE TABLE t (i INTEGER, f FLOAT, t TEXT, b BLOB)"); - await c.execute("INSERT INTO t VALUES (42, 0.5, 'foo', X'626172')"); - const rs = await c.execute( - "SELECT i, f, t, b FROM t LIMIT 1", - ); - const json = rs.toJSON(); - expect(json["columns"]).toStrictEqual(["i", "f", "t", "b"]); - expect(json["columnTypes"]).toStrictEqual(["INTEGER", "FLOAT", "TEXT", "BLOB"]); - expect(json["rows"]).toStrictEqual([[42, 0.5, "foo", "YmFy"]]); - })); - - test("bigint row value", withClient(async (c) => { - const rs = await c.execute("SELECT 42"); - const json = rs.toJSON(); - expect(json["rows"]).toStrictEqual([["42"]]); - }, {intMode: "bigint"})); + test( + "simple result set", + withClient(async (c) => { + const rs = await c.execute("SELECT 1 AS a"); + const json = rs.toJSON(); + expect( + json["lastInsertRowid"] === null || + json["lastInsertRowid"] === "0", + ).toBe(true); + expect(json["columns"]).toStrictEqual(["a"]); + expect(json["columnTypes"]).toStrictEqual([""]); + expect(json["rows"]).toStrictEqual([[1]]); + expect(json["rowsAffected"]).toStrictEqual(0); + + const str = JSON.stringify(rs); + expect( + str === + '{"columns":["a"],"columnTypes":[""],"rows":[[1]],"rowsAffected":0,"lastInsertRowid":null}' || + str === + '{"columns":["a"],"columnTypes":[""],"rows":[[1]],"rowsAffected":0,"lastInsertRowid":"0"}', + ).toBe(true); + }), + ); + + test( + "lastInsertRowid", + withClient(async (c) => { + await c.execute("DROP TABLE IF EXISTS t"); + await c.execute("CREATE TABLE t (id INTEGER PRIMARY KEY NOT NULL)"); + const rs = await c.execute("INSERT INTO t VALUES (12345)"); + expect(rs.toJSON()).toStrictEqual({ + columns: [], + columnTypes: [], + rows: [], + rowsAffected: 1, + lastInsertRowid: "12345", + }); + }), + ); + + test( + "computed values", + withClient(async (c) => { + const rs = await c.execute( + "SELECT 42 AS integer, 0.5 AS float, NULL AS \"null\", 'foo' AS text, X'626172' AS blob", + ); + const json = rs.toJSON(); + expect(json["columns"]).toStrictEqual([ + "integer", + "float", + "null", + "text", + "blob", + ]); + expect(json["columnTypes"]).toStrictEqual(["", "", "", "", ""]); + expect(json["rows"]).toStrictEqual([ + [42, 0.5, null, "foo", "YmFy"], + ]); + }), + ); + + (hasHrana2 ? test : test.skip)( + "row values", + withClient(async (c) => { + await c.execute("DROP TABLE IF EXISTS t"); + await c.execute( + "CREATE TABLE t (i INTEGER, f FLOAT, t TEXT, b BLOB)", + ); + await c.execute("INSERT INTO t VALUES (42, 0.5, 'foo', X'626172')"); + const rs = await c.execute("SELECT i, f, t, b FROM t LIMIT 1"); + const json = rs.toJSON(); + expect(json["columns"]).toStrictEqual(["i", "f", "t", "b"]); + expect(json["columnTypes"]).toStrictEqual([ + "INTEGER", + "FLOAT", + "TEXT", + "BLOB", + ]); + expect(json["rows"]).toStrictEqual([[42, 0.5, "foo", "YmFy"]]); + }), + ); + + test( + "bigint row value", + withClient( + async (c) => { + const rs = await c.execute("SELECT 42"); + const json = rs.toJSON(); + expect(json["rows"]).toStrictEqual([["42"]]); + }, + { intMode: "bigint" }, + ), + ); }); describe("arguments", () => { - test("? arguments", withClient(async (c) => { - const rs = await c.execute({ - sql: "SELECT ?, ?", - args: ["one", "two"], - }); - expect(Array.from(rs.rows[0])).toStrictEqual(["one", "two"]); - })); - - (!isFile ? test : test.skip)("?NNN arguments", withClient(async (c) => { - const rs = await c.execute({ - sql: "SELECT ?2, ?3, ?1", - args: ["one", "two", "three"], - }); - expect(Array.from(rs.rows[0])).toStrictEqual(["two", "three", "one"]); - })); - - (!isFile ? test : test.skip)("?NNN arguments with holes", withClient(async (c) => { - const rs = await c.execute({ - sql: "SELECT ?3, ?1", - args: ["one", "two", "three"], - }); - expect(Array.from(rs.rows[0])).toStrictEqual(["three", "one"]); - })); - - (!isFile ? test : test.skip)("?NNN and ? arguments", withClient(async (c) => { - const rs = await c.execute({ - sql: "SELECT ?2, ?, ?3", - args: ["one", "two", "three"], - }); - expect(Array.from(rs.rows[0])).toStrictEqual(["two", "three", "three"]); - })); + test( + "? arguments", + withClient(async (c) => { + const rs = await c.execute({ + sql: "SELECT ?, ?", + args: ["one", "two"], + }); + expect(Array.from(rs.rows[0])).toStrictEqual(["one", "two"]); + }), + ); - for (const sign of [":", "@", "$"]) { - test(`${sign}AAAA arguments`, withClient(async (c) => { + (!isFile ? test : test.skip)( + "?NNN arguments", + withClient(async (c) => { const rs = await c.execute({ - sql: `SELECT ${sign}b, ${sign}a`, - args: {"a": "one", [`${sign}b`]: "two"}, + sql: "SELECT ?2, ?3, ?1", + args: ["one", "two", "three"], }); - expect(Array.from(rs.rows[0])).toStrictEqual(["two", "one"]); - })); + expect(Array.from(rs.rows[0])).toStrictEqual([ + "two", + "three", + "one", + ]); + }), + ); - test(`${sign}AAAA arguments used multiple times`, withClient(async (c) => { + (!isFile ? test : test.skip)( + "?NNN arguments with holes", + withClient(async (c) => { const rs = await c.execute({ - sql: `SELECT ${sign}b, ${sign}a, ${sign}b || ${sign}a`, - args: {"a": "one", [`${sign}b`]: "two"}, + sql: "SELECT ?3, ?1", + args: ["one", "two", "three"], }); - expect(Array.from(rs.rows[0])).toStrictEqual(["two", "one", "twoone"]); - })); + expect(Array.from(rs.rows[0])).toStrictEqual(["three", "one"]); + }), + ); - test(`${sign}AAAA arguments and ?NNN arguments`, withClient(async (c) => { + (!isFile ? test : test.skip)( + "?NNN and ? arguments", + withClient(async (c) => { const rs = await c.execute({ - sql: `SELECT ${sign}b, ${sign}a, ?1`, - args: {"a": "one", [`${sign}b`]: "two"}, + sql: "SELECT ?2, ?, ?3", + args: ["one", "two", "three"], }); - expect(Array.from(rs.rows[0])).toStrictEqual(["two", "one", "two"]); - })); + expect(Array.from(rs.rows[0])).toStrictEqual([ + "two", + "three", + "three", + ]); + }), + ); + + for (const sign of [":", "@", "$"]) { + test( + `${sign}AAAA arguments`, + withClient(async (c) => { + const rs = await c.execute({ + sql: `SELECT ${sign}b, ${sign}a`, + args: { a: "one", [`${sign}b`]: "two" }, + }); + expect(Array.from(rs.rows[0])).toStrictEqual(["two", "one"]); + }), + ); + + test( + `${sign}AAAA arguments used multiple times`, + withClient(async (c) => { + const rs = await c.execute({ + sql: `SELECT ${sign}b, ${sign}a, ${sign}b || ${sign}a`, + args: { a: "one", [`${sign}b`]: "two" }, + }); + expect(Array.from(rs.rows[0])).toStrictEqual([ + "two", + "one", + "twoone", + ]); + }), + ); + + test( + `${sign}AAAA arguments and ?NNN arguments`, + withClient(async (c) => { + const rs = await c.execute({ + sql: `SELECT ${sign}b, ${sign}a, ?1`, + args: { a: "one", [`${sign}b`]: "two" }, + }); + expect(Array.from(rs.rows[0])).toStrictEqual([ + "two", + "one", + "two", + ]); + }), + ); } }); describe("batch()", () => { - test("multiple queries", withClient(async (c) => { - const rss = await c.batch([ - "SELECT 1+1", - "SELECT 1 AS one, 2 AS two", - {sql: "SELECT ?", args: ["boomerang"]}, - {sql: "VALUES (?), (?)", args: ["big", "ben"]}, - ], "read"); - - expect(rss.length).toStrictEqual(4); - const [rs0, rs1, rs2, rs3] = rss; - - expect(rs0.rows.length).toStrictEqual(1); - expect(Array.from(rs0.rows[0])).toStrictEqual([2]); - - expect(rs1.rows.length).toStrictEqual(1); - expect(Array.from(rs1.rows[0])).toStrictEqual([1, 2]); - - expect(rs2.rows.length).toStrictEqual(1); - expect(Array.from(rs2.rows[0])).toStrictEqual(["boomerang"]); - - expect(rs3.rows.length).toStrictEqual(2); - expect(Array.from(rs3.rows[0])).toStrictEqual(["big"]); - expect(Array.from(rs3.rows[1])).toStrictEqual(["ben"]); - })); - - test("statements are executed sequentially", withClient(async (c) => { - const rss = await c.batch([ - /* 0 */ "DROP TABLE IF EXISTS t", - /* 1 */ "CREATE TABLE t (a, b)", - /* 2 */ "INSERT INTO t VALUES (1, 'one')", - /* 3 */ "SELECT * FROM t ORDER BY a", - /* 4 */ "INSERT INTO t VALUES (2, 'two')", - /* 5 */ "SELECT * FROM t ORDER BY a", - /* 6 */ "DROP TABLE t", - ], "write"); - - expect(rss.length).toStrictEqual(7); - expect(rss[3].rows).toEqual([ - {a: 1, b: "one"}, - ]); - expect(rss[5].rows).toEqual([ - {a: 1, b: "one"}, - {a: 2, b: "two"}, - ]); - })); - - test("statements are executed in a transaction", withClient(async (c) => { - await c.batch([ - "DROP TABLE IF EXISTS t1", - "DROP TABLE IF EXISTS t2", - "CREATE TABLE t1 (a)", - "CREATE TABLE t2 (a)", - ], "write"); - - const n = 100; - const promises = []; - for (let i = 0; i < n; ++i) { - const ii = i; - promises.push((async () => { - const rss = await c.batch([ - {sql: "INSERT INTO t1 VALUES (?)", args: [ii]}, - {sql: "INSERT INTO t2 VALUES (?)", args: [ii * 10]}, - "SELECT SUM(a) FROM t1", - "SELECT SUM(a) FROM t2", - ], "write"); - - const sum1 = rss[2].rows[0][0] as number; - const sum2 = rss[3].rows[0][0] as number; - expect(sum2).toStrictEqual(sum1 * 10); - })()); - } - await Promise.all(promises); - - const rs1 = await c.execute("SELECT SUM(a) FROM t1"); - expect(rs1.rows[0][0]).toStrictEqual(n*(n-1)/2); - const rs2 = await c.execute("SELECT SUM(a) FROM t2"); - expect(rs2.rows[0][0]).toStrictEqual(n*(n-1)/2*10); - }), 10000); - - test("error in batch", withClient(async (c) => { - await expect(c.batch([ - "SELECT 1+1", - "SELECT foobar", - ], "read")).rejects.toBeLibsqlError(); - })); - - test("error in batch rolls back transaction", withClient(async (c) => { - await c.execute("DROP TABLE IF EXISTS t"); - await c.execute("CREATE TABLE t (a)"); - await c.execute("INSERT INTO t VALUES ('one')"); - await expect(c.batch([ - "INSERT INTO t VALUES ('two')", - "SELECT foobar", - "INSERT INTO t VALUES ('three')", - ], "write")).rejects.toBeLibsqlError(); - - const rs = await c.execute("SELECT COUNT(*) FROM t"); - expect(rs.rows[0][0]).toStrictEqual(1); - })); - - test("batch with a lot of different statements", withClient(async (c) => { - const stmts = []; - for (let i = 0; i < 1000; ++i) { - stmts.push(`SELECT ${i}`); - } - const rss = await c.batch(stmts, "read"); - for (let i = 0; i < stmts.length; ++i) { - expect(rss[i].rows[0][0]).toStrictEqual(i); - } - })); - - test("batch with a lot of the same statements", withClient(async (c) => { - const n = 20; - const m = 200; - - const stmts = []; - for (let i = 0; i < n; ++i) { - for (let j = 0; j < m; ++j) { - stmts.push({sql: `SELECT ?, ${j}`, args: [i]}); + test( + "multiple queries", + withClient(async (c) => { + const rss = await c.batch( + [ + "SELECT 1+1", + "SELECT 1 AS one, 2 AS two", + { sql: "SELECT ?", args: ["boomerang"] }, + { sql: "VALUES (?), (?)", args: ["big", "ben"] }, + ], + "read", + ); + + expect(rss.length).toStrictEqual(4); + const [rs0, rs1, rs2, rs3] = rss; + + expect(rs0.rows.length).toStrictEqual(1); + expect(Array.from(rs0.rows[0])).toStrictEqual([2]); + + expect(rs1.rows.length).toStrictEqual(1); + expect(Array.from(rs1.rows[0])).toStrictEqual([1, 2]); + + expect(rs2.rows.length).toStrictEqual(1); + expect(Array.from(rs2.rows[0])).toStrictEqual(["boomerang"]); + + expect(rs3.rows.length).toStrictEqual(2); + expect(Array.from(rs3.rows[0])).toStrictEqual(["big"]); + expect(Array.from(rs3.rows[1])).toStrictEqual(["ben"]); + }), + ); + + test( + "statements are executed sequentially", + withClient(async (c) => { + const rss = await c.batch( + [ + /* 0 */ "DROP TABLE IF EXISTS t", + /* 1 */ "CREATE TABLE t (a, b)", + /* 2 */ "INSERT INTO t VALUES (1, 'one')", + /* 3 */ "SELECT * FROM t ORDER BY a", + /* 4 */ "INSERT INTO t VALUES (2, 'two')", + /* 5 */ "SELECT * FROM t ORDER BY a", + /* 6 */ "DROP TABLE t", + ], + "write", + ); + + expect(rss.length).toStrictEqual(7); + expect(rss[3].rows).toEqual([{ a: 1, b: "one" }]); + expect(rss[5].rows).toEqual([ + { a: 1, b: "one" }, + { a: 2, b: "two" }, + ]); + }), + ); + + test( + "statements are executed in a transaction", + withClient(async (c) => { + await c.batch( + [ + "DROP TABLE IF EXISTS t1", + "DROP TABLE IF EXISTS t2", + "CREATE TABLE t1 (a)", + "CREATE TABLE t2 (a)", + ], + "write", + ); + + const n = 100; + const promises = []; + for (let i = 0; i < n; ++i) { + const ii = i; + promises.push( + (async () => { + const rss = await c.batch( + [ + { + sql: "INSERT INTO t1 VALUES (?)", + args: [ii], + }, + { + sql: "INSERT INTO t2 VALUES (?)", + args: [ii * 10], + }, + "SELECT SUM(a) FROM t1", + "SELECT SUM(a) FROM t2", + ], + "write", + ); + + const sum1 = rss[2].rows[0][0] as number; + const sum2 = rss[3].rows[0][0] as number; + expect(sum2).toStrictEqual(sum1 * 10); + })(), + ); + } + await Promise.all(promises); + + const rs1 = await c.execute("SELECT SUM(a) FROM t1"); + expect(rs1.rows[0][0]).toStrictEqual((n * (n - 1)) / 2); + const rs2 = await c.execute("SELECT SUM(a) FROM t2"); + expect(rs2.rows[0][0]).toStrictEqual(((n * (n - 1)) / 2) * 10); + }), + 10000, + ); + + test( + "error in batch", + withClient(async (c) => { + await expect( + c.batch(["SELECT 1+1", "SELECT foobar"], "read"), + ).rejects.toBeLibsqlError(); + }), + ); + + test( + "error in batch rolls back transaction", + withClient(async (c) => { + await c.execute("DROP TABLE IF EXISTS t"); + await c.execute("CREATE TABLE t (a)"); + await c.execute("INSERT INTO t VALUES ('one')"); + await expect( + c.batch( + [ + "INSERT INTO t VALUES ('two')", + "SELECT foobar", + "INSERT INTO t VALUES ('three')", + ], + "write", + ), + ).rejects.toBeLibsqlError(); + + const rs = await c.execute("SELECT COUNT(*) FROM t"); + expect(rs.rows[0][0]).toStrictEqual(1); + }), + ); + + test( + "batch with a lot of different statements", + withClient(async (c) => { + const stmts = []; + for (let i = 0; i < 1000; ++i) { + stmts.push(`SELECT ${i}`); + } + const rss = await c.batch(stmts, "read"); + for (let i = 0; i < stmts.length; ++i) { + expect(rss[i].rows[0][0]).toStrictEqual(i); + } + }), + ); + + test( + "batch with a lot of the same statements", + withClient(async (c) => { + const n = 20; + const m = 200; + + const stmts = []; + for (let i = 0; i < n; ++i) { + for (let j = 0; j < m; ++j) { + stmts.push({ sql: `SELECT ?, ${j}`, args: [i] }); + } } - } - const rss = await c.batch(stmts, "read"); - for (let i = 0; i < n; ++i) { - for (let j = 0; j < m; ++j) { - const rs = rss[i*m + j]; - expect(rs.rows[0][0]).toStrictEqual(i); - expect(rs.rows[0][1]).toStrictEqual(j); + const rss = await c.batch(stmts, "read"); + for (let i = 0; i < n; ++i) { + for (let j = 0; j < m; ++j) { + const rs = rss[i * m + j]; + expect(rs.rows[0][0]).toStrictEqual(i); + expect(rs.rows[0][1]).toStrictEqual(j); + } } - } - })); - - test("deferred batch", withClient(async (c) => { - const rss = await c.batch([ - "SELECT 1+1", - "DROP TABLE IF EXISTS t", - "CREATE TABLE t (a)", - "INSERT INTO t VALUES (21) RETURNING 2*a", - ], "deferred"); - - expect(rss.length).toStrictEqual(4); - const [rs0, _rs1, _rs2, rs3] = rss; - - expect(rs0.rows.length).toStrictEqual(1); - expect(Array.from(rs0.rows[0])).toStrictEqual([2]); - - expect(rs3.rows.length).toStrictEqual(1); - expect(Array.from(rs3.rows[0])).toStrictEqual([42]); - })); - - (hasHrana3 ? test : test.skip)("ROLLBACK statement stops execution of batch", withClient(async (c) => { - await c.execute("DROP TABLE IF EXISTS t"); - await c.execute("CREATE TABLE t (a)"); - - await expect(c.batch([ - "INSERT INTO t VALUES (1), (2), (3)", - "ROLLBACK", - "INSERT INTO t VALUES (4), (5)", - ], "write")).rejects.toBeLibsqlError("TRANSACTION_CLOSED"); - - const rs = await c.execute("SELECT COUNT(*) FROM t"); - expect(rs.rows[0][0]).toStrictEqual(0); - })); + }), + ); + + test( + "deferred batch", + withClient(async (c) => { + const rss = await c.batch( + [ + "SELECT 1+1", + "DROP TABLE IF EXISTS t", + "CREATE TABLE t (a)", + "INSERT INTO t VALUES (21) RETURNING 2*a", + ], + "deferred", + ); + + expect(rss.length).toStrictEqual(4); + const [rs0, _rs1, _rs2, rs3] = rss; + + expect(rs0.rows.length).toStrictEqual(1); + expect(Array.from(rs0.rows[0])).toStrictEqual([2]); + + expect(rs3.rows.length).toStrictEqual(1); + expect(Array.from(rs3.rows[0])).toStrictEqual([42]); + }), + ); + + (hasHrana3 ? test : test.skip)( + "ROLLBACK statement stops execution of batch", + withClient(async (c) => { + await c.execute("DROP TABLE IF EXISTS t"); + await c.execute("CREATE TABLE t (a)"); + + await expect( + c.batch( + [ + "INSERT INTO t VALUES (1), (2), (3)", + "ROLLBACK", + "INSERT INTO t VALUES (4), (5)", + ], + "write", + ), + ).rejects.toBeLibsqlError("TRANSACTION_CLOSED"); + + const rs = await c.execute("SELECT COUNT(*) FROM t"); + expect(rs.rows[0][0]).toStrictEqual(0); + }), + ); }); describe("transaction()", () => { - test("query multiple rows", withClient(async (c) => { - const txn = await c.transaction("read"); - - const rs = await txn.execute("VALUES (1, 'one'), (2, 'two'), (3, 'three')"); - expect(rs.columns.length).toStrictEqual(2); - expect(rs.columnTypes.length).toStrictEqual(2); - expect(rs.rows.length).toStrictEqual(3); - - expect(Array.from(rs.rows[0])).toStrictEqual([1, "one"]); - expect(Array.from(rs.rows[1])).toStrictEqual([2, "two"]); - expect(Array.from(rs.rows[2])).toStrictEqual([3, "three"]); - - txn.close(); - })); - - test("commit()", withClient(async (c) => { - await c.batch([ - "DROP TABLE IF EXISTS t", - "CREATE TABLE t (a)", - ], "write"); - - const txn = await c.transaction("write"); - await txn.execute("INSERT INTO t VALUES ('one')"); - await txn.execute("INSERT INTO t VALUES ('two')"); - expect(txn.closed).toStrictEqual(false); - await txn.commit(); - expect(txn.closed).toStrictEqual(true); - - const rs = await c.execute("SELECT COUNT(*) FROM t"); - expect(rs.rows[0][0]).toStrictEqual(2); - await expect(txn.execute("SELECT 1")).rejects.toBeLibsqlError("TRANSACTION_CLOSED"); - })); - - test("rollback()", withClient(async (c) => { - await c.batch([ - "DROP TABLE IF EXISTS t", - "CREATE TABLE t (a)", - ], "write"); - - const txn = await c.transaction("write"); - await txn.execute("INSERT INTO t VALUES ('one')"); - await txn.execute("INSERT INTO t VALUES ('two')"); - expect(txn.closed).toStrictEqual(false); - await txn.rollback(); - expect(txn.closed).toStrictEqual(true); - - const rs = await c.execute("SELECT COUNT(*) FROM t"); - expect(rs.rows[0][0]).toStrictEqual(0); - await expect(txn.execute("SELECT 1")).rejects.toBeLibsqlError("TRANSACTION_CLOSED"); - })); - - test("close()", withClient(async (c) => { - await c.batch([ - "DROP TABLE IF EXISTS t", - "CREATE TABLE t (a)", - ], "write"); - - const txn = await c.transaction("write"); - await txn.execute("INSERT INTO t VALUES ('one')"); - expect(txn.closed).toStrictEqual(false); - txn.close(); - expect(txn.closed).toStrictEqual(true); - - const rs = await c.execute("SELECT COUNT(*) FROM t"); - expect(rs.rows[0][0]).toStrictEqual(0); - await expect(txn.execute("SELECT 1")).rejects.toBeLibsqlError("TRANSACTION_CLOSED"); - })); - - test("error does not rollback", withClient(async (c) => { - await c.batch([ - "DROP TABLE IF EXISTS t", - "CREATE TABLE t (a)", - ], "write"); - - const txn = await c.transaction("write"); - await expect(txn.execute("SELECT foo")).rejects.toBeLibsqlError(); - await txn.execute("INSERT INTO t VALUES ('one')"); - await expect(txn.execute("SELECT bar")).rejects.toBeLibsqlError(); - await txn.commit(); - - const rs = await c.execute("SELECT COUNT(*) FROM t"); - expect(rs.rows[0][0]).toStrictEqual(1); - })); + test( + "query multiple rows", + withClient(async (c) => { + const txn = await c.transaction("read"); - (hasHrana3 ? test : test.skip)( - "ROLLBACK statement stops execution of transaction", - withClient(async (c) => - { - await c.execute("DROP TABLE IF EXISTS t"); - await c.execute("CREATE TABLE t (a)"); - - const txn = await c.transaction("write"); - const prom1 = txn.execute("INSERT INTO t VALUES (1), (2), (3)"); - const prom2 = txn.execute("ROLLBACK"); - const prom3 = txn.execute("INSERT INTO t VALUES (4), (5)"); - - await prom1; - await prom2; - await expect(prom3).rejects.toBeLibsqlError("TRANSACTION_CLOSED"); - await expect(txn.commit()).rejects.toBeLibsqlError(); - txn.close(); - - const rs = await c.execute("SELECT COUNT(*) FROM t"); - expect(rs.rows[0][0]).toStrictEqual(0); - })); + const rs = await txn.execute( + "VALUES (1, 'one'), (2, 'two'), (3, 'three')", + ); + expect(rs.columns.length).toStrictEqual(2); + expect(rs.columnTypes.length).toStrictEqual(2); + expect(rs.rows.length).toStrictEqual(3); - (hasHrana3 ? test : test.skip)( - "OR ROLLBACK statement stops execution of transaction", - withClient(async (c) => - { - await c.execute("DROP TABLE IF EXISTS t"); - await c.execute("CREATE TABLE t (a UNIQUE)"); - - const txn = await c.transaction("write"); - const prom1 = txn.execute("INSERT INTO t VALUES (1), (2), (3)"); - const prom2 = txn.execute("INSERT OR ROLLBACK INTO t VALUES (1)"); - const prom3 = txn.execute("INSERT INTO t VALUES (4), (5)"); - - await prom1; - await expect(prom2).rejects.toBeLibsqlError(); - await expect(prom3).rejects.toBeLibsqlError("TRANSACTION_CLOSED"); - await expect(txn.commit()).rejects.toBeLibsqlError(); - txn.close(); - - const rs = await c.execute("SELECT COUNT(*) FROM t"); - expect(rs.rows[0][0]).toStrictEqual(0); - })); + expect(Array.from(rs.rows[0])).toStrictEqual([1, "one"]); + expect(Array.from(rs.rows[1])).toStrictEqual([2, "two"]); + expect(Array.from(rs.rows[2])).toStrictEqual([3, "three"]); - (hasHrana3 ? test : test.skip)( - "OR ROLLBACK as the first statement stops execution of transaction", - withClient(async (c) => - { - await c.execute("DROP TABLE IF EXISTS t"); - await c.execute("CREATE TABLE t (a UNIQUE)"); - await c.execute("INSERT INTO t VALUES (1), (2), (3)"); - - const txn = await c.transaction("write"); - const prom1 = txn.execute("INSERT OR ROLLBACK INTO t VALUES (1)"); - const prom2 = txn.execute("INSERT INTO t VALUES (4), (5)"); - - await expect(prom1).rejects.toBeLibsqlError(); - await expect(prom2).rejects.toBeLibsqlError("TRANSACTION_CLOSED"); - await expect(txn.commit()).rejects.toBeLibsqlError(); - txn.close(); - - const rs = await c.execute("SELECT COUNT(*) FROM t"); - expect(rs.rows[0][0]).toStrictEqual(3); - })); - - test("commit empty", withClient(async (c) => { - const txn = await c.transaction("read"); - await txn.commit(); - })); - - test("rollback empty", withClient(async (c) => { - const txn = await c.transaction("read"); - await txn.rollback(); - })); + txn.close(); + }), + ); + + test( + "commit()", + withClient(async (c) => { + await c.batch( + ["DROP TABLE IF EXISTS t", "CREATE TABLE t (a)"], + "write", + ); - describe("batch()", () => { - test("as the first operation on transaction", withClient(async (c) => { const txn = await c.transaction("write"); + await txn.execute("INSERT INTO t VALUES ('one')"); + await txn.execute("INSERT INTO t VALUES ('two')"); + expect(txn.closed).toStrictEqual(false); + await txn.commit(); + expect(txn.closed).toStrictEqual(true); + + const rs = await c.execute("SELECT COUNT(*) FROM t"); + expect(rs.rows[0][0]).toStrictEqual(2); + await expect(txn.execute("SELECT 1")).rejects.toBeLibsqlError( + "TRANSACTION_CLOSED", + ); + }), + ); + + test( + "rollback()", + withClient(async (c) => { + await c.batch( + ["DROP TABLE IF EXISTS t", "CREATE TABLE t (a)"], + "write", + ); - await txn.batch([ - "DROP TABLE IF EXISTS t", - "CREATE TABLE t (a)", - {sql: "INSERT INTO t VALUES (?)", args: [1]}, - {sql: "INSERT INTO t VALUES (?)", args: [2]}, - {sql: "INSERT INTO t VALUES (?)", args: [4]}, - ]); + const txn = await c.transaction("write"); + await txn.execute("INSERT INTO t VALUES ('one')"); + await txn.execute("INSERT INTO t VALUES ('two')"); + expect(txn.closed).toStrictEqual(false); + await txn.rollback(); + expect(txn.closed).toStrictEqual(true); + + const rs = await c.execute("SELECT COUNT(*) FROM t"); + expect(rs.rows[0][0]).toStrictEqual(0); + await expect(txn.execute("SELECT 1")).rejects.toBeLibsqlError( + "TRANSACTION_CLOSED", + ); + }), + ); + + test( + "close()", + withClient(async (c) => { + await c.batch( + ["DROP TABLE IF EXISTS t", "CREATE TABLE t (a)"], + "write", + ); - const rs = await txn.execute("SELECT SUM(a) FROM t"); - expect(rs.rows[0][0]).toStrictEqual(7); + const txn = await c.transaction("write"); + await txn.execute("INSERT INTO t VALUES ('one')"); + expect(txn.closed).toStrictEqual(false); txn.close(); - })); + expect(txn.closed).toStrictEqual(true); + + const rs = await c.execute("SELECT COUNT(*) FROM t"); + expect(rs.rows[0][0]).toStrictEqual(0); + await expect(txn.execute("SELECT 1")).rejects.toBeLibsqlError( + "TRANSACTION_CLOSED", + ); + }), + ); + + test( + "error does not rollback", + withClient(async (c) => { + await c.batch( + ["DROP TABLE IF EXISTS t", "CREATE TABLE t (a)"], + "write", + ); - test("as the second operation on transaction", withClient(async (c) => { const txn = await c.transaction("write"); + await expect(txn.execute("SELECT foo")).rejects.toBeLibsqlError(); + await txn.execute("INSERT INTO t VALUES ('one')"); + await expect(txn.execute("SELECT bar")).rejects.toBeLibsqlError(); + await txn.commit(); - await txn.execute("DROP TABLE IF EXISTS t"); - await txn.batch([ - "CREATE TABLE t (a)", - {sql: "INSERT INTO t VALUES (?)", args: [1]}, - {sql: "INSERT INTO t VALUES (?)", args: [2]}, - {sql: "INSERT INTO t VALUES (?)", args: [4]}, - ]); + const rs = await c.execute("SELECT COUNT(*) FROM t"); + expect(rs.rows[0][0]).toStrictEqual(1); + }), + ); - const rs = await txn.execute("SELECT SUM(a) FROM t"); - expect(rs.rows[0][0]).toStrictEqual(7); + (hasHrana3 ? test : test.skip)( + "ROLLBACK statement stops execution of transaction", + withClient(async (c) => { + await c.execute("DROP TABLE IF EXISTS t"); + await c.execute("CREATE TABLE t (a)"); + + const txn = await c.transaction("write"); + const prom1 = txn.execute("INSERT INTO t VALUES (1), (2), (3)"); + const prom2 = txn.execute("ROLLBACK"); + const prom3 = txn.execute("INSERT INTO t VALUES (4), (5)"); + + await prom1; + await prom2; + await expect(prom3).rejects.toBeLibsqlError("TRANSACTION_CLOSED"); + await expect(txn.commit()).rejects.toBeLibsqlError(); txn.close(); - })); - test("after error, further statements are not executed", withClient(async (c) => { + const rs = await c.execute("SELECT COUNT(*) FROM t"); + expect(rs.rows[0][0]).toStrictEqual(0); + }), + ); + + (hasHrana3 ? test : test.skip)( + "OR ROLLBACK statement stops execution of transaction", + withClient(async (c) => { + await c.execute("DROP TABLE IF EXISTS t"); + await c.execute("CREATE TABLE t (a UNIQUE)"); + const txn = await c.transaction("write"); + const prom1 = txn.execute("INSERT INTO t VALUES (1), (2), (3)"); + const prom2 = txn.execute("INSERT OR ROLLBACK INTO t VALUES (1)"); + const prom3 = txn.execute("INSERT INTO t VALUES (4), (5)"); + + await prom1; + await expect(prom2).rejects.toBeLibsqlError(); + await expect(prom3).rejects.toBeLibsqlError("TRANSACTION_CLOSED"); + await expect(txn.commit()).rejects.toBeLibsqlError(); + txn.close(); - await expect(txn.batch([ - "DROP TABLE IF EXISTS t", - "CREATE TABLE t (a UNIQUE)", - "INSERT INTO t VALUES (1), (2), (4)", - "INSERT INTO t VALUES (1)", - "INSERT INTO t VALUES (8), (16)", - ])).rejects.toBeLibsqlError(); + const rs = await c.execute("SELECT COUNT(*) FROM t"); + expect(rs.rows[0][0]).toStrictEqual(0); + }), + ); - const rs = await txn.execute("SELECT SUM(a) FROM t"); - expect(rs.rows[0][0]).toStrictEqual(7); + (hasHrana3 ? test : test.skip)( + "OR ROLLBACK as the first statement stops execution of transaction", + withClient(async (c) => { + await c.execute("DROP TABLE IF EXISTS t"); + await c.execute("CREATE TABLE t (a UNIQUE)"); + await c.execute("INSERT INTO t VALUES (1), (2), (3)"); + + const txn = await c.transaction("write"); + const prom1 = txn.execute("INSERT OR ROLLBACK INTO t VALUES (1)"); + const prom2 = txn.execute("INSERT INTO t VALUES (4), (5)"); + + await expect(prom1).rejects.toBeLibsqlError(); + await expect(prom2).rejects.toBeLibsqlError("TRANSACTION_CLOSED"); + await expect(txn.commit()).rejects.toBeLibsqlError(); + txn.close(); + + const rs = await c.execute("SELECT COUNT(*) FROM t"); + expect(rs.rows[0][0]).toStrictEqual(3); + }), + ); + test( + "commit empty", + withClient(async (c) => { + const txn = await c.transaction("read"); await txn.commit(); - })); + }), + ); + + test( + "rollback empty", + withClient(async (c) => { + const txn = await c.transaction("read"); + await txn.rollback(); + }), + ); + + describe("batch()", () => { + test( + "as the first operation on transaction", + withClient(async (c) => { + const txn = await c.transaction("write"); + + await txn.batch([ + "DROP TABLE IF EXISTS t", + "CREATE TABLE t (a)", + { sql: "INSERT INTO t VALUES (?)", args: [1] }, + { sql: "INSERT INTO t VALUES (?)", args: [2] }, + { sql: "INSERT INTO t VALUES (?)", args: [4] }, + ]); + + const rs = await txn.execute("SELECT SUM(a) FROM t"); + expect(rs.rows[0][0]).toStrictEqual(7); + txn.close(); + }), + ); + + test( + "as the second operation on transaction", + withClient(async (c) => { + const txn = await c.transaction("write"); + + await txn.execute("DROP TABLE IF EXISTS t"); + await txn.batch([ + "CREATE TABLE t (a)", + { sql: "INSERT INTO t VALUES (?)", args: [1] }, + { sql: "INSERT INTO t VALUES (?)", args: [2] }, + { sql: "INSERT INTO t VALUES (?)", args: [4] }, + ]); + + const rs = await txn.execute("SELECT SUM(a) FROM t"); + expect(rs.rows[0][0]).toStrictEqual(7); + txn.close(); + }), + ); + + test( + "after error, further statements are not executed", + withClient(async (c) => { + const txn = await c.transaction("write"); + + await expect( + txn.batch([ + "DROP TABLE IF EXISTS t", + "CREATE TABLE t (a UNIQUE)", + "INSERT INTO t VALUES (1), (2), (4)", + "INSERT INTO t VALUES (1)", + "INSERT INTO t VALUES (8), (16)", + ]), + ).rejects.toBeLibsqlError(); + + const rs = await txn.execute("SELECT SUM(a) FROM t"); + expect(rs.rows[0][0]).toStrictEqual(7); + + await txn.commit(); + }), + ); }); (hasHrana2 ? describe : describe.skip)("executeMultiple()", () => { - test("as the first operation on transaction", withClient(async (c) => { - const txn = await c.transaction("write"); + test( + "as the first operation on transaction", + withClient(async (c) => { + const txn = await c.transaction("write"); - await txn.executeMultiple(` + await txn.executeMultiple(` DROP TABLE IF EXISTS t; CREATE TABLE t (a); INSERT INTO t VALUES (1), (2), (4), (8); `); - const rs = await txn.execute("SELECT SUM(a) FROM t"); - expect(rs.rows[0][0]).toStrictEqual(15); - txn.close(); - })); + const rs = await txn.execute("SELECT SUM(a) FROM t"); + expect(rs.rows[0][0]).toStrictEqual(15); + txn.close(); + }), + ); - test("as the second operation on transaction", withClient(async (c) => { - const txn = await c.transaction("write"); - await txn.execute("DROP TABLE IF EXISTS t"); - await txn.executeMultiple(` + test( + "as the second operation on transaction", + withClient(async (c) => { + const txn = await c.transaction("write"); + await txn.execute("DROP TABLE IF EXISTS t"); + await txn.executeMultiple(` CREATE TABLE t (a); INSERT INTO t VALUES (1), (2), (4), (8); `); - const rs = await txn.execute("SELECT SUM(a) FROM t"); - expect(rs.rows[0][0]).toStrictEqual(15); - txn.close(); - })); + const rs = await txn.execute("SELECT SUM(a) FROM t"); + expect(rs.rows[0][0]).toStrictEqual(15); + txn.close(); + }), + ); - test("after error, further statements are not executed", withClient(async (c) => { - const txn = await c.transaction("write"); + test( + "after error, further statements are not executed", + withClient(async (c) => { + const txn = await c.transaction("write"); - await expect(txn.executeMultiple(` + await expect( + txn.executeMultiple(` DROP TABLE IF EXISTS t; CREATE TABLE t (a UNIQUE); INSERT INTO t VALUES (1), (2), (4); INSERT INTO t VALUES (1); INSERT INTO t VALUES (8), (16); - `)).rejects.toBeLibsqlError(); + `), + ).rejects.toBeLibsqlError(); - const rs = await txn.execute("SELECT SUM(a) FROM t"); - expect(rs.rows[0][0]).toStrictEqual(7); + const rs = await txn.execute("SELECT SUM(a) FROM t"); + expect(rs.rows[0][0]).toStrictEqual(7); - await txn.commit(); - })); + await txn.commit(); + }), + ); }); }); (hasHrana2 ? describe : describe.skip)("executeMultiple()", () => { - test("multiple statements", withClient(async (c) => { - await c.executeMultiple(` + test( + "multiple statements", + withClient(async (c) => { + await c.executeMultiple(` DROP TABLE IF EXISTS t; CREATE TABLE t (a); INSERT INTO t VALUES (1), (2), (4), (8); `); - const rs = await c.execute("SELECT SUM(a) FROM t"); - expect(rs.rows[0][0]).toStrictEqual(15); - })); - - test("after an error, statements are not executed", withClient(async (c) => { - await expect(c.executeMultiple(` + const rs = await c.execute("SELECT SUM(a) FROM t"); + expect(rs.rows[0][0]).toStrictEqual(15); + }), + ); + + test( + "after an error, statements are not executed", + withClient(async (c) => { + await expect( + c.executeMultiple(` DROP TABLE IF EXISTS t; CREATE TABLE t (a); INSERT INTO t VALUES (1), (2), (4); INSERT INTO t VALUES (foo()); INSERT INTO t VALUES (8), (16); - `)).rejects.toBeLibsqlError(); + `), + ).rejects.toBeLibsqlError(); - const rs = await c.execute("SELECT SUM(a) FROM t"); - expect(rs.rows[0][0]).toStrictEqual(7); - })); + const rs = await c.execute("SELECT SUM(a) FROM t"); + expect(rs.rows[0][0]).toStrictEqual(7); + }), + ); - test("manual transaction control statements", withClient(async (c) => { - await c.executeMultiple(` + test( + "manual transaction control statements", + withClient(async (c) => { + await c.executeMultiple(` DROP TABLE IF EXISTS t; CREATE TABLE t (a); BEGIN; @@ -911,12 +1281,16 @@ describe("transaction()", () => { COMMIT; `); - const rs = await c.execute("SELECT SUM(a) FROM t"); - expect(rs.rows[0][0]).toStrictEqual(31); - })); + const rs = await c.execute("SELECT SUM(a) FROM t"); + expect(rs.rows[0][0]).toStrictEqual(31); + }), + ); - test("error rolls back a manual transaction", withClient(async (c) => { - await expect(c.executeMultiple(` + test( + "error rolls back a manual transaction", + withClient(async (c) => { + await expect( + c.executeMultiple(` DROP TABLE IF EXISTS t; CREATE TABLE t (a); INSERT INTO t VALUES (0); @@ -925,41 +1299,65 @@ describe("transaction()", () => { INSERT INTO t VALUES (foo()); INSERT INTO t VALUES (8), (16); COMMIT; - `)).rejects.toBeLibsqlError(); + `), + ).rejects.toBeLibsqlError(); - const rs = await c.execute("SELECT SUM(a) FROM t"); - expect(rs.rows[0][0]).toStrictEqual(0); - })); + const rs = await c.execute("SELECT SUM(a) FROM t"); + expect(rs.rows[0][0]).toStrictEqual(0); + }), + ); }); (hasNetworkErrors ? describe : describe.skip)("network errors", () => { const testCases = [ - {title: "WebSocket close", sql: ".close_ws"}, - {title: "TCP close", sql: ".close_tcp"}, + { title: "WebSocket close", sql: ".close_ws" }, + { title: "TCP close", sql: ".close_tcp" }, ]; - for (const {title, sql} of testCases) { - test(`${title} in execute()`, withClient(async (c) => { - await expect(c.execute(sql)).rejects.toBeLibsqlError("HRANA_WEBSOCKET_ERROR"); - - expect((await c.execute("SELECT 42")).rows[0][0]).toStrictEqual(42); - })); - - test(`${title} in transaction()`, withClient(async (c) => { - const txn = await c.transaction("read"); - await expect(txn.execute(sql)).rejects.toBeLibsqlError("HRANA_WEBSOCKET_ERROR"); - await expect(txn.commit()).rejects.toBeLibsqlError("TRANSACTION_CLOSED"); - txn.close(); - - expect((await c.execute("SELECT 42")).rows[0][0]).toStrictEqual(42); - })); + for (const { title, sql } of testCases) { + test( + `${title} in execute()`, + withClient(async (c) => { + await expect(c.execute(sql)).rejects.toBeLibsqlError( + "HRANA_WEBSOCKET_ERROR", + ); + + expect((await c.execute("SELECT 42")).rows[0][0]).toStrictEqual( + 42, + ); + }), + ); - test(`${title} in batch()`, withClient(async (c) => { - await expect(c.batch(["SELECT 42", sql, "SELECT 24"], "read")) - .rejects.toBeLibsqlError("HRANA_WEBSOCKET_ERROR"); + test( + `${title} in transaction()`, + withClient(async (c) => { + const txn = await c.transaction("read"); + await expect(txn.execute(sql)).rejects.toBeLibsqlError( + "HRANA_WEBSOCKET_ERROR", + ); + await expect(txn.commit()).rejects.toBeLibsqlError( + "TRANSACTION_CLOSED", + ); + txn.close(); + + expect((await c.execute("SELECT 42")).rows[0][0]).toStrictEqual( + 42, + ); + }), + ); - expect((await c.execute("SELECT 42")).rows[0][0]).toStrictEqual(42); - })); + test( + `${title} in batch()`, + withClient(async (c) => { + await expect( + c.batch(["SELECT 42", sql, "SELECT 24"], "read"), + ).rejects.toBeLibsqlError("HRANA_WEBSOCKET_ERROR"); + + expect((await c.execute("SELECT 42")).rows[0][0]).toStrictEqual( + 42, + ); + }), + ); } }); @@ -970,7 +1368,7 @@ describe("transaction()", () => { return fetch(request); } - const c = createClient({...config, fetch: customFetch}); + const c = createClient({ ...config, fetch: customFetch }); try { const rs = await c.execute("SELECT 42"); expect(rs.rows[0][0]).toStrictEqual(42); @@ -980,13 +1378,13 @@ describe("transaction()", () => { } }); -(isFile ? test : test.skip)('raw error codes', async () => { - const c = createClient(config) +(isFile ? test : test.skip)("raw error codes", async () => { + const c = createClient(config); try { - await expect(c.execute('NOT A VALID SQL')).rejects.toThrow( - expect.toBeLibsqlError({ code: 'SQLITE_ERROR', rawCode: 1}) - ) + await expect(c.execute("NOT A VALID SQL")).rejects.toThrow( + expect.toBeLibsqlError({ code: "SQLITE_ERROR", rawCode: 1 }), + ); } finally { c.close(); } -}) +}); diff --git a/packages/libsql-client/src/__tests__/helpers.ts b/packages/libsql-client/src/__tests__/helpers.ts index 1a0a5185..ad8b5207 100644 --- a/packages/libsql-client/src/__tests__/helpers.ts +++ b/packages/libsql-client/src/__tests__/helpers.ts @@ -4,46 +4,48 @@ import type { MatcherFunction } from "expect"; import { LibsqlError } from "../node.js"; type CodeMatch = { - code: string, - rawCode: number -} - -const toBeLibsqlError: MatcherFunction<[code?: string | CodeMatch, message?: RegExp]> = - function (actual, code?, messageRe?) { - const pass = actual instanceof LibsqlError - && isValidCode(actual, code) - && (messageRe === undefined || actual.message.match(messageRe) !== null); + code: string; + rawCode: number; +}; - const message = (): string => { - const parts = []; - parts.push("expected "); - parts.push(this.utils.printReceived(actual)); - parts.push(pass ? " not to be " : " to be "); - parts.push("an instance of LibsqlError"); - if (code !== undefined) { - parts.push(" with error code "); - parts.push(this.utils.printExpected(code)); - } - if (messageRe !== undefined) { - parts.push(" with error message matching "); - parts.push(this.utils.printExpected(messageRe)); - } - return parts.join(""); - }; +const toBeLibsqlError: MatcherFunction< + [code?: string | CodeMatch, message?: RegExp] +> = function (actual, code?, messageRe?) { + const pass = + actual instanceof LibsqlError && + isValidCode(actual, code) && + (messageRe === undefined || actual.message.match(messageRe) !== null); - return {pass, message}; + const message = (): string => { + const parts = []; + parts.push("expected "); + parts.push(this.utils.printReceived(actual)); + parts.push(pass ? " not to be " : " to be "); + parts.push("an instance of LibsqlError"); + if (code !== undefined) { + parts.push(" with error code "); + parts.push(this.utils.printExpected(code)); + } + if (messageRe !== undefined) { + parts.push(" with error message matching "); + parts.push(this.utils.printExpected(messageRe)); + } + return parts.join(""); }; + return { pass, message }; +}; + const isValidCode = (error: LibsqlError, code?: string | CodeMatch) => { if (code === undefined) { - return true + return true; } - if (typeof code === 'string') { - return error.code === code + if (typeof code === "string") { + return error.code === code; } - return error.code === code.code && error.rawCode === code.rawCode -} -expect.extend({toBeLibsqlError}); + return error.code === code.code && error.rawCode === code.rawCode; +}; +expect.extend({ toBeLibsqlError }); declare module "expect" { interface AsymmetricMatchers { toBeLibsqlError(code?: string | CodeMatch, messageRe?: RegExp): void; diff --git a/packages/libsql-client/src/__tests__/uri.test.ts b/packages/libsql-client/src/__tests__/uri.test.ts index a0bae4ac..a8af85a9 100644 --- a/packages/libsql-client/src/__tests__/uri.test.ts +++ b/packages/libsql-client/src/__tests__/uri.test.ts @@ -8,15 +8,15 @@ import { parseUri, encodeBaseUrl } from "@libsql/core/uri"; describe("parseUri()", () => { test("authority and path", () => { const cases = [ - {text: "file://localhost", path: ""}, - {text: "file://localhost/", path: "/"}, - {text: "file://localhost/absolute/path", path: "/absolute/path"}, - {text: "file://localhost/k%C5%AF%C5%88", path: "/kůň"}, + { text: "file://localhost", path: "" }, + { text: "file://localhost/", path: "/" }, + { text: "file://localhost/absolute/path", path: "/absolute/path" }, + { text: "file://localhost/k%C5%AF%C5%88", path: "/kůň" }, ]; - for (const {text, path} of cases) { + for (const { text, path } of cases) { expect(parseUri(text)).toEqual({ scheme: "file", - authority: {host: "localhost"}, + authority: { host: "localhost" }, path, }); } @@ -24,14 +24,14 @@ describe("parseUri()", () => { test("empty authority and path", () => { const cases = [ - {text: "file:///absolute/path", path: "/absolute/path"}, - {text: "file://", path: ""}, - {text: "file:///k%C5%AF%C5%88", path: "/kůň"}, + { text: "file:///absolute/path", path: "/absolute/path" }, + { text: "file://", path: "" }, + { text: "file:///k%C5%AF%C5%88", path: "/kůň" }, ]; - for (const {text, path} of cases) { + for (const { text, path } of cases) { expect(parseUri(text)).toEqual({ scheme: "file", - authority: {host: ""}, + authority: { host: "" }, path, }); } @@ -39,13 +39,13 @@ describe("parseUri()", () => { test("no authority and path", () => { const cases = [ - {text: "file:/absolute/path", path: "/absolute/path"}, - {text: "file:relative/path", path: "relative/path"}, - {text: "file:", path: ""}, - {text: "file:C:/path/to/file", path: "C:/path/to/file"}, - {text: "file:k%C5%AF%C5%88", path: "kůň"}, + { text: "file:/absolute/path", path: "/absolute/path" }, + { text: "file:relative/path", path: "relative/path" }, + { text: "file:", path: "" }, + { text: "file:C:/path/to/file", path: "C:/path/to/file" }, + { text: "file:k%C5%AF%C5%88", path: "kůň" }, ]; - for (const {text, path} of cases) { + for (const { text, path } of cases) { expect(parseUri(text)).toEqual({ scheme: "file", path, @@ -55,39 +55,48 @@ describe("parseUri()", () => { test("authority", () => { const hosts = [ - {text: "localhost", host: "localhost"}, - {text: "domain.name", host: "domain.name"}, - {text: "some$weird.%20!name", host: "some$weird. !name"}, - {text: "1.20.255.99", host: "1.20.255.99"}, - {text: "[2001:4860:4802:32::a]", host: "2001:4860:4802:32::a"}, - {text: "%61", host: "a"}, - {text: "100%2e100%2e100%2e100", host: "100.100.100.100"}, - {text: "k%C5%AF%C5%88", host: "kůň"}, + { text: "localhost", host: "localhost" }, + { text: "domain.name", host: "domain.name" }, + { text: "some$weird.%20!name", host: "some$weird. !name" }, + { text: "1.20.255.99", host: "1.20.255.99" }, + { text: "[2001:4860:4802:32::a]", host: "2001:4860:4802:32::a" }, + { text: "%61", host: "a" }, + { text: "100%2e100%2e100%2e100", host: "100.100.100.100" }, + { text: "k%C5%AF%C5%88", host: "kůň" }, ]; const ports = [ - {text: "", port: undefined}, - {text: ":", port: undefined}, - {text: ":0", port: 0}, - {text: ":99", port: 99}, - {text: ":65535", port: 65535}, + { text: "", port: undefined }, + { text: ":", port: undefined }, + { text: ":0", port: 0 }, + { text: ":99", port: 99 }, + { text: ":65535", port: 65535 }, ]; const userinfos = [ - {text: "", userinfo: undefined}, - {text: "@", userinfo: {username: ""}}, - {text: "alice@", userinfo: {username: "alice"}}, - {text: "alice:secret@", userinfo: {username: "alice", password: "secret"}}, - {text: "alice:sec:et@", userinfo: {username: "alice", password: "sec:et"}}, - {text: "alice%3Asecret@", userinfo: {username: "alice:secret"}}, - {text: "alice:s%65cret@", userinfo: {username: "alice", password: "secret"}}, + { text: "", userinfo: undefined }, + { text: "@", userinfo: { username: "" } }, + { text: "alice@", userinfo: { username: "alice" } }, + { + text: "alice:secret@", + userinfo: { username: "alice", password: "secret" }, + }, + { + text: "alice:sec:et@", + userinfo: { username: "alice", password: "sec:et" }, + }, + { text: "alice%3Asecret@", userinfo: { username: "alice:secret" } }, + { + text: "alice:s%65cret@", + userinfo: { username: "alice", password: "secret" }, + }, ]; - for (const {text: hostText, host} of hosts) { - for (const {text: portText, port} of ports) { - for (const {text: userText, userinfo} of userinfos) { + for (const { text: hostText, host } of hosts) { + for (const { text: portText, port } of ports) { + for (const { text: userText, userinfo } of userinfos) { const text = `http://${userText}${hostText}${portText}`; expect(parseUri(text)).toEqual({ scheme: "http", - authority: {host, port, userinfo}, + authority: { host, port, userinfo }, path: "", }); } @@ -97,82 +106,51 @@ describe("parseUri()", () => { test("query", () => { const cases = [ - {text: "?", pairs: []}, - {text: "?key=value", pairs: [ - {key: "key", value: "value"}, - ]}, - {text: "?&key=value", pairs: [ - {key: "key", value: "value"}, - ]}, - {text: "?key=value&&", pairs: [ - {key: "key", value: "value"}, - ]}, - {text: "?a", pairs: [ - {key: "a", value: ""}, - ]}, - {text: "?a=", pairs: [ - {key: "a", value: ""}, - ]}, - {text: "?=a", pairs: [ - {key: "", value: "a"}, - ]}, - {text: "?=", pairs: [ - {key: "", value: ""}, - ]}, - {text: "?a=b=c", pairs: [ - {key: "a", value: "b=c"}, - ]}, - {text: "?a=b&c=d", pairs: [ - {key: "a", value: "b"}, - {key: "c", value: "d"}, - ]}, - {text: "?a+b=c", pairs: [ - {key: "a b", value: "c"}, - ]}, - {text: "?a=b+c", pairs: [ - {key: "a", value: "b c"}, - ]}, - {text: "?a?b", pairs: [ - {key: "a?b", value: ""}, - ]}, - {text: "?%61=%62", pairs: [ - {key: "a", value: "b"}, - ]}, - {text: "?a%3db", pairs: [ - {key: "a=b", value: ""}, - ]}, - {text: "?a=%2b", pairs: [ - {key: "a", value: "+"}, - ]}, - {text: "?%2b=b", pairs: [ - {key: "+", value: "b"}, - ]}, - {text: "?a=b%26c", pairs: [ - {key: "a", value: "b&c"}, - ]}, - {text: "?a=k%C5%AF%C5%88", pairs: [ - {key: "a", value: "kůň"}, - ]}, + { text: "?", pairs: [] }, + { text: "?key=value", pairs: [{ key: "key", value: "value" }] }, + { text: "?&key=value", pairs: [{ key: "key", value: "value" }] }, + { text: "?key=value&&", pairs: [{ key: "key", value: "value" }] }, + { text: "?a", pairs: [{ key: "a", value: "" }] }, + { text: "?a=", pairs: [{ key: "a", value: "" }] }, + { text: "?=a", pairs: [{ key: "", value: "a" }] }, + { text: "?=", pairs: [{ key: "", value: "" }] }, + { text: "?a=b=c", pairs: [{ key: "a", value: "b=c" }] }, + { + text: "?a=b&c=d", + pairs: [ + { key: "a", value: "b" }, + { key: "c", value: "d" }, + ], + }, + { text: "?a+b=c", pairs: [{ key: "a b", value: "c" }] }, + { text: "?a=b+c", pairs: [{ key: "a", value: "b c" }] }, + { text: "?a?b", pairs: [{ key: "a?b", value: "" }] }, + { text: "?%61=%62", pairs: [{ key: "a", value: "b" }] }, + { text: "?a%3db", pairs: [{ key: "a=b", value: "" }] }, + { text: "?a=%2b", pairs: [{ key: "a", value: "+" }] }, + { text: "?%2b=b", pairs: [{ key: "+", value: "b" }] }, + { text: "?a=b%26c", pairs: [{ key: "a", value: "b&c" }] }, + { text: "?a=k%C5%AF%C5%88", pairs: [{ key: "a", value: "kůň" }] }, ]; - for (const {text: queryText, pairs} of cases) { + for (const { text: queryText, pairs } of cases) { const text = `file:${queryText}`; expect(parseUri(text)).toEqual({ scheme: "file", path: "", - query: {pairs}, + query: { pairs }, }); } }); test("fragment", () => { const cases = [ - {text: "", fragment: undefined}, - {text: "#a", fragment: "a"}, - {text: "#a?b", fragment: "a?b"}, - {text: "#%61", fragment: "a"}, - {text: "#k%C5%AF%C5%88", fragment: "kůň"}, + { text: "", fragment: undefined }, + { text: "#a", fragment: "a" }, + { text: "#a?b", fragment: "a?b" }, + { text: "#%61", fragment: "a" }, + { text: "#k%C5%AF%C5%88", fragment: "kůň" }, ]; - for (const {text: fragmentText, fragment} of cases) { + for (const { text: fragmentText, fragment } of cases) { const text = `file:${fragmentText}`; expect(parseUri(text)).toEqual({ scheme: "file", @@ -184,17 +162,19 @@ describe("parseUri()", () => { test("parse errors", () => { const cases = [ - {text: "", message: /format/}, - {text: "foo", message: /format/}, - {text: "foo.bar.com", message: /format/}, - {text: "h$$p://localhost", message: /format/}, - {text: "h%74%74p://localhost", message: /format/}, - {text: "http://localhost:%38%38", message: /authority/}, - {text: "file:k%C5%C5%88", message: /percent encoding/}, + { text: "", message: /format/ }, + { text: "foo", message: /format/ }, + { text: "foo.bar.com", message: /format/ }, + { text: "h$$p://localhost", message: /format/ }, + { text: "h%74%74p://localhost", message: /format/ }, + { text: "http://localhost:%38%38", message: /authority/ }, + { text: "file:k%C5%C5%88", message: /percent encoding/ }, ]; - for (const {text, message} of cases) { - expect(() => parseUri(text)).toThrow(expect.toBeLibsqlError("URL_INVALID", message)); + for (const { text, message } of cases) { + expect(() => parseUri(text)).toThrow( + expect.toBeLibsqlError("URL_INVALID", message), + ); } }); }); @@ -253,28 +233,30 @@ test("encodeBaseUrl()", () => { { scheme: "http", host: "localhost", - userinfo: {username: "alice", password: undefined}, + userinfo: { username: "alice", password: undefined }, path: "", url: "http://alice@localhost", }, { scheme: "http", host: "localhost", - userinfo: {username: "alice", password: "secr:t"}, + userinfo: { username: "alice", password: "secr:t" }, path: "", url: "http://alice:secr%3At@localhost", }, { scheme: "https", host: "localhost", - userinfo: {username: "alice", password: "secret"}, + userinfo: { username: "alice", password: "secret" }, port: 8080, path: "/some/path", url: "https://alice:secret@localhost:8080/some/path", }, ]; - for (const {scheme, host, port, userinfo, path, url} of cases) { - expect(encodeBaseUrl(scheme, {host, port, userinfo}, path)).toStrictEqual(new URL(url)); + for (const { scheme, host, port, userinfo, path, url } of cases) { + expect( + encodeBaseUrl(scheme, { host, port, userinfo }, path), + ).toStrictEqual(new URL(url)); } }); diff --git a/packages/libsql-client/src/hrana.ts b/packages/libsql-client/src/hrana.ts index 2796baa7..628bc474 100644 --- a/packages/libsql-client/src/hrana.ts +++ b/packages/libsql-client/src/hrana.ts @@ -1,5 +1,10 @@ import * as hrana from "@libsql/hrana-client"; -import type { InStatement, ResultSet, Transaction, TransactionMode } from "@libsql/core/api"; +import type { + InStatement, + ResultSet, + Transaction, + TransactionMode, +} from "@libsql/core/api"; import { LibsqlError } from "@libsql/core/api"; import type { SqlCache } from "./sql_cache.js"; import { transactionModeToBegin, ResultSetImpl } from "@libsql/core/util"; @@ -50,17 +55,24 @@ export abstract class HranaTransaction implements Transaction { this._getSqlCache().apply(hranaStmts); const batch = stream.batch(this.#version >= 3); const beginStep = batch.step(); - const beginPromise = beginStep.run(transactionModeToBegin(this.#mode)); + const beginPromise = beginStep.run( + transactionModeToBegin(this.#mode), + ); // Execute the `hranaStmts` only if the BEGIN succeeded, to make sure that we don't execute it // outside of a transaction. let lastStep = beginStep; rowsPromises = hranaStmts.map((hranaStmt) => { - const stmtStep = batch.step() + const stmtStep = batch + .step() .condition(hrana.BatchCond.ok(lastStep)); if (this.#version >= 3) { // If the Hrana version supports it, make sure that we are still in a transaction - stmtStep.condition(hrana.BatchCond.not(hrana.BatchCond.isAutocommit(batch))); + stmtStep.condition( + hrana.BatchCond.not( + hrana.BatchCond.isAutocommit(batch), + ), + ); } const rowsPromise = stmtStep.query(hranaStmt); @@ -71,7 +83,8 @@ export abstract class HranaTransaction implements Transaction { // `this.#started` is resolved successfully only if the batch and the BEGIN statement inside // of the batch are both successful. - this.#started = batch.execute() + this.#started = batch + .execute() .then(() => beginPromise) .then(() => undefined); @@ -104,7 +117,11 @@ export abstract class HranaTransaction implements Transaction { stmtStep.condition(hrana.BatchCond.ok(lastStep)); } if (this.#version >= 3) { - stmtStep.condition(hrana.BatchCond.not(hrana.BatchCond.isAutocommit(batch))); + stmtStep.condition( + hrana.BatchCond.not( + hrana.BatchCond.isAutocommit(batch), + ), + ); } const rowsPromise = stmtStep.query(hranaStmt); rowsPromise.catch(() => undefined); // silence Node warning @@ -145,7 +162,8 @@ export abstract class HranaTransaction implements Transaction { try { if (this.#started === undefined) { // If the transaction hasn't started yet, start it now - this.#started = stream.run(transactionModeToBegin(this.#mode)) + this.#started = stream + .run(transactionModeToBegin(this.#mode)) .then(() => undefined); try { await this.#started; @@ -180,8 +198,9 @@ export abstract class HranaTransaction implements Transaction { } // Pipeline the ROLLBACK statement and the stream close. - const promise = stream.run("ROLLBACK") - .catch(e => { throw mapHranaError(e); }); + const promise = stream.run("ROLLBACK").catch((e) => { + throw mapHranaError(e); + }); stream.closeGracefully(); await promise; @@ -214,8 +233,9 @@ export abstract class HranaTransaction implements Transaction { return; } - const promise = stream.run("COMMIT") - .catch(e => { throw mapHranaError(e); }); + const promise = stream.run("COMMIT").catch((e) => { + throw mapHranaError(e); + }); stream.closeGracefully(); await promise; @@ -238,10 +258,11 @@ export async function executeHranaBatch( let lastStep = beginStep; const stmtPromises = hranaStmts.map((hranaStmt) => { - const stmtStep = batch.step() - .condition(hrana.BatchCond.ok(lastStep)); + const stmtStep = batch.step().condition(hrana.BatchCond.ok(lastStep)); if (version >= 3) { - stmtStep.condition(hrana.BatchCond.not(hrana.BatchCond.isAutocommit(batch))); + stmtStep.condition( + hrana.BatchCond.not(hrana.BatchCond.isAutocommit(batch)), + ); } const stmtPromise = stmtStep.query(hranaStmt); @@ -249,16 +270,18 @@ export async function executeHranaBatch( return stmtPromise; }); - const commitStep = batch.step() - .condition(hrana.BatchCond.ok(lastStep)); + const commitStep = batch.step().condition(hrana.BatchCond.ok(lastStep)); if (version >= 3) { - commitStep.condition(hrana.BatchCond.not(hrana.BatchCond.isAutocommit(batch))); + commitStep.condition( + hrana.BatchCond.not(hrana.BatchCond.isAutocommit(batch)), + ); } const commitPromise = commitStep.run("COMMIT"); - const rollbackStep = batch.step() + const rollbackStep = batch + .step() .condition(hrana.BatchCond.not(hrana.BatchCond.ok(commitStep))); - rollbackStep.run("ROLLBACK").catch(_ => undefined); + rollbackStep.run("ROLLBACK").catch((_) => undefined); await batch.execute(); @@ -297,13 +320,21 @@ export function stmtToHrana(stmt: InStatement): hrana.Stmt { } export function resultSetFromHrana(hranaRows: hrana.RowsResult): ResultSet { - const columns = hranaRows.columnNames.map(c => c ?? ""); - const columnTypes = hranaRows.columnDecltypes.map(c => c ?? ""); + const columns = hranaRows.columnNames.map((c) => c ?? ""); + const columnTypes = hranaRows.columnDecltypes.map((c) => c ?? ""); const rows = hranaRows.rows; const rowsAffected = hranaRows.affectedRowCount; - const lastInsertRowid = hranaRows.lastInsertRowid !== undefined - ? hranaRows.lastInsertRowid : undefined; - return new ResultSetImpl(columns, columnTypes, rows, rowsAffected, lastInsertRowid); + const lastInsertRowid = + hranaRows.lastInsertRowid !== undefined + ? hranaRows.lastInsertRowid + : undefined; + return new ResultSetImpl( + columns, + columnTypes, + rows, + rowsAffected, + lastInsertRowid, + ); } export function mapHranaError(e: unknown): unknown { @@ -320,8 +351,9 @@ function mapHranaErrorCode(e: hrana.ClientError): string { } else if (e instanceof hrana.ProtoError) { return "HRANA_PROTO_ERROR"; } else if (e instanceof hrana.ClosedError) { - return e.cause instanceof hrana.ClientError - ? mapHranaErrorCode(e.cause) : "HRANA_CLOSED_ERROR"; + return e.cause instanceof hrana.ClientError + ? mapHranaErrorCode(e.cause) + : "HRANA_CLOSED_ERROR"; } else if (e instanceof hrana.WebSocketError) { return "HRANA_WEBSOCKET_ERROR"; } else if (e instanceof hrana.HttpServerError) { diff --git a/packages/libsql-client/src/http.ts b/packages/libsql-client/src/http.ts index 425812d2..1cf64a57 100644 --- a/packages/libsql-client/src/http.ts +++ b/packages/libsql-client/src/http.ts @@ -1,13 +1,21 @@ import * as hrana from "@libsql/hrana-client"; import type { Config, Client } from "@libsql/core/api"; -import type { InStatement, ResultSet, Transaction, IntMode } from "@libsql/core/api"; +import type { + InStatement, + ResultSet, + Transaction, + IntMode, +} from "@libsql/core/api"; import { TransactionMode, LibsqlError } from "@libsql/core/api"; import type { ExpandedConfig } from "@libsql/core/config"; import { expandConfig } from "@libsql/core/config"; import { - HranaTransaction, executeHranaBatch, - stmtToHrana, resultSetFromHrana, mapHranaError, + HranaTransaction, + executeHranaBatch, + stmtToHrana, + resultSetFromHrana, + mapHranaError, } from "./hrana.js"; import { SqlCache } from "./sql_cache.js"; import { encodeBaseUrl } from "@libsql/core/uri"; @@ -30,13 +38,22 @@ export function _createClient(config: ExpandedConfig): Client { } if (config.encryptionKey !== undefined) { - throw new LibsqlError("Encryption key is not supported by the remote client.", "ENCRYPTION_KEY_NOT_SUPPORTED"); + throw new LibsqlError( + "Encryption key is not supported by the remote client.", + "ENCRYPTION_KEY_NOT_SUPPORTED", + ); } if (config.scheme === "http" && config.tls) { - throw new LibsqlError(`A "http:" URL cannot opt into TLS by using ?tls=1`, "URL_INVALID"); + throw new LibsqlError( + `A "http:" URL cannot opt into TLS by using ?tls=1`, + "URL_INVALID", + ); } else if (config.scheme === "https" && !config.tls) { - throw new LibsqlError(`A "https:" URL cannot opt out of TLS by using ?tls=0`, "URL_INVALID"); + throw new LibsqlError( + `A "https:" URL cannot opt out of TLS by using ?tls=0`, + "URL_INVALID", + ); } const url = encodeBaseUrl(config.scheme, config.authority, config.path); @@ -81,7 +98,10 @@ export class HttpClient implements Client { } } - async batch(stmts: Array, mode: TransactionMode = "deferred"): Promise> { + async batch( + stmts: Array, + mode: TransactionMode = "deferred", + ): Promise> { try { const hranaStmts = stmts.map(stmtToHrana); const version = await this.#client.getVersion(); @@ -101,7 +121,12 @@ export class HttpClient implements Client { // 2. cursor request // 3. pipeline request to close the stream const batch = stream.batch(false); - resultsPromise = executeHranaBatch(mode, version, batch, hranaStmts); + resultsPromise = executeHranaBatch( + mode, + version, + batch, + hranaStmts, + ); } finally { stream.closeGracefully(); } @@ -112,10 +137,16 @@ export class HttpClient implements Client { } } - async transaction(mode: TransactionMode = "write"): Promise { + async transaction( + mode: TransactionMode = "write", + ): Promise { try { const version = await this.#client.getVersion(); - return new HttpTransaction(this.#client.openStream(), mode, version); + return new HttpTransaction( + this.#client.openStream(), + mode, + version, + ); } catch (e) { throw mapHranaError(e); } @@ -140,7 +171,10 @@ export class HttpClient implements Client { } sync(): Promise { - throw new LibsqlError("sync not supported in http mode", "SYNC_NOT_SUPPORTED"); + throw new LibsqlError( + "sync not supported in http mode", + "SYNC_NOT_SUPPORTED", + ); } close(): void { @@ -157,7 +191,11 @@ export class HttpTransaction extends HranaTransaction implements Transaction { #sqlCache: SqlCache; /** @private */ - constructor(stream: hrana.HttpStream, mode: TransactionMode, version: hrana.ProtocolVersion) { + constructor( + stream: hrana.HttpStream, + mode: TransactionMode, + version: hrana.ProtocolVersion, + ) { super(mode, version); this.#stream = stream; this.#sqlCache = new SqlCache(stream, sqlCacheCapacity); diff --git a/packages/libsql-client/src/sqlite3.ts b/packages/libsql-client/src/sqlite3.ts index f5d23936..8a9f35d3 100644 --- a/packages/libsql-client/src/sqlite3.ts +++ b/packages/libsql-client/src/sqlite3.ts @@ -2,13 +2,25 @@ import Database from "libsql"; import { Buffer } from "node:buffer"; import type { - Config, IntMode, Client, Transaction, TransactionMode, - ResultSet, Row, Value, InValue, InStatement, + Config, + IntMode, + Client, + Transaction, + TransactionMode, + ResultSet, + Row, + Value, + InValue, + InStatement, } from "@libsql/core/api"; import { LibsqlError } from "@libsql/core/api"; import type { ExpandedConfig } from "@libsql/core/config"; import { expandConfig } from "@libsql/core/config"; -import { supportedUrlLink, transactionModeToBegin, ResultSetImpl } from "@libsql/core/util"; +import { + supportedUrlLink, + transactionModeToBegin, + ResultSetImpl, +} from "@libsql/core/util"; export * from "@libsql/core/api"; @@ -43,7 +55,10 @@ export function _createClient(config: ExpandedConfig): Client { throw new LibsqlError("File URL cannot have a port", "URL_INVALID"); } if (authority.userinfo !== undefined) { - throw new LibsqlError("File URL cannot have username and password", "URL_INVALID"); + throw new LibsqlError( + "File URL cannot have username and password", + "URL_INVALID", + ); } } @@ -57,7 +72,11 @@ export function _createClient(config: ExpandedConfig): Client { const db = new Database(path, options); - executeStmt(db, "SELECT 1 AS checkThatTheDatabaseCanBeOpened", config.intMode); + executeStmt( + db, + "SELECT 1 AS checkThatTheDatabaseCanBeOpened", + config.intMode, + ); return new Sqlite3Client(path, options, db, config.intMode); } @@ -71,7 +90,12 @@ export class Sqlite3Client implements Client { protocol: "file"; /** @private */ - constructor(path: string, options: Database.Options, db: Database.Database, intMode: IntMode) { + constructor( + path: string, + options: Database.Options, + db: Database.Database, + intMode: IntMode, + ) { this.#path = path; this.#options = options; this.#db = db; @@ -85,18 +109,24 @@ export class Sqlite3Client implements Client { return executeStmt(this.#getDb(), stmt, this.#intMode); } - async batch(stmts: Array, mode: TransactionMode = "deferred"): Promise> { + async batch( + stmts: Array, + mode: TransactionMode = "deferred", + ): Promise> { this.#checkNotClosed(); const db = this.#getDb(); try { executeStmt(db, transactionModeToBegin(mode), this.#intMode); const resultSets = stmts.map((stmt) => { if (!db.inTransaction) { - throw new LibsqlError("The transaction has been rolled back", "TRANSACTION_CLOSED"); + throw new LibsqlError( + "The transaction has been rolled back", + "TRANSACTION_CLOSED", + ); } return executeStmt(db, stmt, this.#intMode); }); - executeStmt(db, "COMMIT", this.#intMode) + executeStmt(db, "COMMIT", this.#intMode); return resultSets; } finally { if (db.inTransaction) { @@ -124,7 +154,6 @@ export class Sqlite3Client implements Client { } } - async sync(): Promise { this.#checkNotClosed(); await this.#getDb().sync(); @@ -204,12 +233,19 @@ export class Sqlite3Transaction implements Transaction { #checkNotClosed(): void { if (this.closed) { - throw new LibsqlError("The transaction is closed", "TRANSACTION_CLOSED"); + throw new LibsqlError( + "The transaction is closed", + "TRANSACTION_CLOSED", + ); } } } -function executeStmt(db: Database.Database, stmt: InStatement, intMode: IntMode): ResultSet { +function executeStmt( + db: Database.Database, + stmt: InStatement, + intMode: IntMode, +): ResultSet { let sql: string; let args: Array | Record; if (typeof stmt === "string") { @@ -222,8 +258,10 @@ function executeStmt(db: Database.Database, stmt: InStatement, intMode: IntMode) } else { args = {}; for (const name in stmt.args) { - const argName = (name[0] === "@" || name[0] === "$" || name[0] === ":") - ? name.substring(1) : name; + const argName = + name[0] === "@" || name[0] === "$" || name[0] === ":" + ? name.substring(1) + : name; args[argName] = valueToSql(stmt.args[name], intMode); } } @@ -242,15 +280,25 @@ function executeStmt(db: Database.Database, stmt: InStatement, intMode: IntMode) } if (returnsData) { - const columns = Array.from(sqlStmt.columns().map(col => col.name)); - const columnTypes = Array.from(sqlStmt.columns().map(col => col.type ?? "")); + const columns = Array.from( + sqlStmt.columns().map((col) => col.name), + ); + const columnTypes = Array.from( + sqlStmt.columns().map((col) => col.type ?? ""), + ); const rows = sqlStmt.all(args).map((sqlRow) => { return rowFromSql(sqlRow as Array, columns, intMode); }); // TODO: can we get this info from better-sqlite3? const rowsAffected = 0; const lastInsertRowid = undefined; - return new ResultSetImpl(columns, columnTypes, rows, rowsAffected, lastInsertRowid); + return new ResultSetImpl( + columns, + columnTypes, + rows, + rowsAffected, + lastInsertRowid, + ); } else { const info = sqlStmt.run(args); const rowsAffected = info.changes; @@ -262,7 +310,11 @@ function executeStmt(db: Database.Database, stmt: InStatement, intMode: IntMode) } } -function rowFromSql(sqlRow: Array, columns: Array, intMode: IntMode): Row { +function rowFromSql( + sqlRow: Array, + columns: Array, + intMode: IntMode, +): Row { const row = {}; // make sure that the "length" property is not enumerable Object.defineProperty(row, "length", { value: sqlRow.length }); @@ -272,7 +324,12 @@ function rowFromSql(sqlRow: Array, columns: Array, intMode: Int const column = columns[i]; if (!Object.hasOwn(row, column)) { - Object.defineProperty(row, column, { value, enumerable: true, configurable: true, writable: true }); + Object.defineProperty(row, column, { + value, + enumerable: true, + configurable: true, + writable: true, + }); } } return row as Row; @@ -283,14 +340,14 @@ function valueFromSql(sqlValue: unknown, intMode: IntMode): Value { if (intMode === "number") { if (sqlValue < minSafeBigint || sqlValue > maxSafeBigint) { throw new RangeError( - "Received integer which cannot be safely represented as a JavaScript number" + "Received integer which cannot be safely represented as a JavaScript number", ); } return Number(sqlValue); } else if (intMode === "bigint") { return sqlValue; } else if (intMode === "string") { - return ""+sqlValue; + return "" + sqlValue; } else { throw new Error("Invalid value for IntMode"); } @@ -306,31 +363,35 @@ const maxSafeBigint = 9007199254740991n; function valueToSql(value: InValue, intMode: IntMode): unknown { if (typeof value === "number") { if (!Number.isFinite(value)) { - throw new RangeError("Only finite numbers (not Infinity or NaN) can be passed as arguments"); + throw new RangeError( + "Only finite numbers (not Infinity or NaN) can be passed as arguments", + ); } return value; } else if (typeof value === "bigint") { if (value < minInteger || value > maxInteger) { throw new RangeError( - "bigint is too large to be represented as a 64-bit integer and passed as argument" + "bigint is too large to be represented as a 64-bit integer and passed as argument", ); } return value; } else if (typeof value === "boolean") { - switch(intMode) { - case "bigint": - return value ? 1n : 0n; - case "string": - return value ? "1" : "0"; - default: - return value ? 1 : 0; - } + switch (intMode) { + case "bigint": + return value ? 1n : 0n; + case "string": + return value ? "1" : "0"; + default: + return value ? 1 : 0; + } } else if (value instanceof ArrayBuffer) { return Buffer.from(value); } else if (value instanceof Date) { return value.valueOf(); } else if (value === undefined) { - throw new TypeError("undefined cannot be passed as argument to the database"); + throw new TypeError( + "undefined cannot be passed as argument to the database", + ); } else { return value; } diff --git a/packages/libsql-client/src/ws.ts b/packages/libsql-client/src/ws.ts index 5b88c4d3..8b5f0c00 100644 --- a/packages/libsql-client/src/ws.ts +++ b/packages/libsql-client/src/ws.ts @@ -1,12 +1,22 @@ import * as hrana from "@libsql/hrana-client"; -import type { Config, IntMode, Client, Transaction, ResultSet, InStatement } from "@libsql/core/api"; +import type { + Config, + IntMode, + Client, + Transaction, + ResultSet, + InStatement, +} from "@libsql/core/api"; import { TransactionMode, LibsqlError } from "@libsql/core/api"; import type { ExpandedConfig } from "@libsql/core/config"; import { expandConfig } from "@libsql/core/config"; import { - HranaTransaction, executeHranaBatch, - stmtToHrana, resultSetFromHrana, mapHranaError, + HranaTransaction, + executeHranaBatch, + stmtToHrana, + resultSetFromHrana, + mapHranaError, } from "./hrana.js"; import { SqlCache } from "./sql_cache.js"; import { encodeBaseUrl } from "@libsql/core/uri"; @@ -29,13 +39,22 @@ export function _createClient(config: ExpandedConfig): WsClient { } if (config.encryptionKey !== undefined) { - throw new LibsqlError("Encryption key is not supported by the remote client.", "ENCRYPTION_KEY_NOT_SUPPORTED"); + throw new LibsqlError( + "Encryption key is not supported by the remote client.", + "ENCRYPTION_KEY_NOT_SUPPORTED", + ); } if (config.scheme === "ws" && config.tls) { - throw new LibsqlError(`A "ws:" URL cannot opt into TLS by using ?tls=1`, "URL_INVALID"); + throw new LibsqlError( + `A "ws:" URL cannot opt into TLS by using ?tls=1`, + "URL_INVALID", + ); } else if (config.scheme === "wss" && !config.tls) { - throw new LibsqlError(`A "wss:" URL cannot opt out of TLS by using ?tls=0`, "URL_INVALID"); + throw new LibsqlError( + `A "wss:" URL cannot opt out of TLS by using ?tls=0`, + "URL_INVALID", + ); } const url = encodeBaseUrl(config.scheme, config.authority, config.path); @@ -46,7 +65,11 @@ export function _createClient(config: ExpandedConfig): WsClient { } catch (e) { if (e instanceof hrana.WebSocketUnsupportedError) { const suggestedScheme = config.scheme === "wss" ? "https" : "http"; - const suggestedUrl = encodeBaseUrl(suggestedScheme, config.authority, config.path); + const suggestedUrl = encodeBaseUrl( + suggestedScheme, + config.authority, + config.path, + ); throw new LibsqlError( "This environment does not support WebSockets, please switch to the HTTP client by using " + `a "${suggestedScheme}:" URL (${JSON.stringify(suggestedUrl)}). ` + @@ -70,7 +93,7 @@ interface ConnState { useSqlCache: boolean | undefined; // The cache of SQL texts stored on the server. Initially has capacity 0, but it is set to // `sqlCacheCapacity` when `useSqlCache` is set to `true`. - sqlCache: SqlCache, + sqlCache: SqlCache; // The time when the connection was opened. openTime: Date; // Set of all `StreamState`-s that were opened from this connection. We can safely close the connection @@ -83,7 +106,7 @@ interface StreamState { stream: hrana.WsStream; } -const maxConnAgeMillis = 60*1000; +const maxConnAgeMillis = 60 * 1000; const sqlCacheCapacity = 100; export class WsClient implements Client { @@ -99,7 +122,12 @@ export class WsClient implements Client { protocol: "ws"; /** @private */ - constructor(client: hrana.WsClient, url: URL, authToken: string | undefined, intMode: IntMode) { + constructor( + client: hrana.WsClient, + url: URL, + authToken: string | undefined, + intMode: IntMode, + ) { this.#url = url; this.#authToken = authToken; this.#intMode = intMode; @@ -128,7 +156,10 @@ export class WsClient implements Client { } } - async batch(stmts: Array, mode: TransactionMode = "deferred"): Promise> { + async batch( + stmts: Array, + mode: TransactionMode = "deferred", + ): Promise> { const streamState = await this.#openStream(); try { const hranaStmts = stmts.map(stmtToHrana); @@ -138,7 +169,12 @@ export class WsClient implements Client { // network roundtrip. streamState.conn.sqlCache.apply(hranaStmts); const batch = streamState.stream.batch(version >= 3); - const resultsPromise = executeHranaBatch(mode, version, batch, hranaStmts); + const resultsPromise = executeHranaBatch( + mode, + version, + batch, + hranaStmts, + ); return await resultsPromise; } catch (e) { @@ -189,7 +225,10 @@ export class WsClient implements Client { const now = new Date(); const ageMillis = now.valueOf() - this.#connState.openTime.valueOf(); - if (ageMillis > maxConnAgeMillis && this.#futureConnState === undefined) { + if ( + ageMillis > maxConnAgeMillis && + this.#futureConnState === undefined + ) { // The existing connection is too old, let's open a new one. const futureConnState = this.#openConn(); this.#futureConnState = futureConnState; @@ -247,7 +286,8 @@ export class WsClient implements Client { // this does not increase latency, because any messages that we would send on the WebSocket before // the handshake would be queued until the handshake is completed anyway. if (connState.useSqlCache === undefined) { - connState.useSqlCache = await connState.client.getVersion() >= 2; + connState.useSqlCache = + (await connState.client.getVersion()) >= 2; if (connState.useSqlCache) { connState.sqlCache.capacity = sqlCacheCapacity; } @@ -255,7 +295,7 @@ export class WsClient implements Client { const stream = connState.client.openStream(); stream.intMode = this.#intMode; - const streamState = {conn: connState, stream}; + const streamState = { conn: connState, stream }; connState.streamStates.add(streamState); return streamState; } catch (e) { @@ -283,7 +323,10 @@ export class WsClient implements Client { const connState = streamState.conn; connState.streamStates.delete(streamState); - if (connState.streamStates.size === 0 && connState !== this.#connState) { + if ( + connState.streamStates.size === 0 && + connState !== this.#connState + ) { // We are not using this connection anymore and this is the last stream that was using it, so we // must close it now. connState.client.close(); @@ -301,7 +344,12 @@ export class WsTransaction extends HranaTransaction implements Transaction { #streamState: StreamState; /** @private */ - constructor(client: WsClient, state: StreamState, mode: TransactionMode, version: hrana.ProtocolVersion) { + constructor( + client: WsClient, + state: StreamState, + mode: TransactionMode, + version: hrana.ProtocolVersion, + ) { super(mode, version); this.#client = client; this.#streamState = state; diff --git a/packages/libsql-client/tsconfig.build-cjs.json b/packages/libsql-client/tsconfig.build-cjs.json index 857027a0..8feb91c5 100644 --- a/packages/libsql-client/tsconfig.build-cjs.json +++ b/packages/libsql-client/tsconfig.build-cjs.json @@ -6,4 +6,3 @@ "outDir": "./lib-cjs/" } } - diff --git a/packages/libsql-client/tsconfig.build-esm.json b/packages/libsql-client/tsconfig.build-esm.json index 9a01705b..2ba1706d 100644 --- a/packages/libsql-client/tsconfig.build-esm.json +++ b/packages/libsql-client/tsconfig.build-esm.json @@ -6,4 +6,3 @@ "outDir": "./lib-esm/" } } - diff --git a/packages/libsql-core/jest.config.js b/packages/libsql-core/jest.config.js index 65716e3c..044a5b86 100644 --- a/packages/libsql-core/jest.config.js +++ b/packages/libsql-core/jest.config.js @@ -1,7 +1,7 @@ export default { preset: "ts-jest/presets/default-esm", moduleNameMapper: { - '^(\\.{1,2}/.*)\\.js$': '$1', + "^(\\.{1,2}/.*)\\.js$": "$1", }, testMatch: ["**/__tests__/*.test.[jt]s"], -} +}; diff --git a/packages/libsql-core/src/api.ts b/packages/libsql-core/src/api.ts index 1424bc7f..6278fc03 100644 --- a/packages/libsql-core/src/api.ts +++ b/packages/libsql-core/src/api.ts @@ -88,7 +88,7 @@ export interface Client { * * The `mode` parameter selects the transaction mode for the batch; please see {@link TransactionMode} for * details. The default transaction mode is `"deferred"`. - * + * * If any of the statements in the batch fails with an error, the batch is aborted, the transaction is * rolled back and the returned promise is rejected. * @@ -114,7 +114,10 @@ export interface Client { * ], "write"); * ``` */ - batch(stmts: Array, mode?: TransactionMode): Promise>; + batch( + stmts: Array, + mode?: TransactionMode, + ): Promise>; /** Start an interactive transaction. * @@ -367,7 +370,7 @@ export interface ResultSet { * returned. */ columnTypes: Array; - + /** Rows produced by the statement. */ rows: Array; @@ -419,20 +422,11 @@ export interface Row { [name: string]: Value; } -export type Value = - | null - | string - | number - | bigint - | ArrayBuffer +export type Value = null | string | number | bigint | ArrayBuffer; -export type InValue = - | Value - | boolean - | Uint8Array - | Date +export type InValue = Value | boolean | Uint8Array | Date; -export type InStatement = { sql: string, args: InArgs } | string; +export type InStatement = { sql: string; args: InArgs } | string; export type InArgs = Array | Record; /** Error thrown by the client. */ @@ -441,14 +435,19 @@ export class LibsqlError extends Error { code: string; /** Raw numeric error code */ rawCode?: number; - - constructor(message: string, code: string, rawCode?: number, cause?: Error) { + + constructor( + message: string, + code: string, + rawCode?: number, + cause?: Error, + ) { if (code !== undefined) { message = `${code}: ${message}`; } super(message, { cause }); this.code = code; - this.rawCode = rawCode + this.rawCode = rawCode; this.name = "LibsqlError"; } } diff --git a/packages/libsql-core/src/config.ts b/packages/libsql-core/src/config.ts index a1d63745..2eb42672 100644 --- a/packages/libsql-core/src/config.ts +++ b/packages/libsql-core/src/config.ts @@ -19,11 +19,16 @@ export interface ExpandedConfig { export type ExpandedScheme = "wss" | "ws" | "https" | "http" | "file"; -export function expandConfig(config: Config, preferHttp: boolean): ExpandedConfig { +export function expandConfig( + config: Config, + preferHttp: boolean, +): ExpandedConfig { if (typeof config !== "object") { // produce a reasonable error message in the common case where users type // `createClient("libsql://...")` instead of `createClient({url: "libsql://..."})` - throw new TypeError(`Expected client configuration as object, got ${typeof config}`); + throw new TypeError( + `Expected client configuration as object, got ${typeof config}`, + ); } let tls: boolean | undefined = config.tls; @@ -31,32 +36,31 @@ export function expandConfig(config: Config, preferHttp: boolean): ExpandedConfi let encryptionKey = config.encryptionKey; let syncUrl = config.syncUrl; let syncInterval = config.syncInterval; - const intMode = ""+(config.intMode ?? "number"); + const intMode = "" + (config.intMode ?? "number"); if (intMode !== "number" && intMode !== "bigint" && intMode !== "string") { throw new TypeError( `Invalid value for intMode, expected "number", "bigint" or "string", \ - got ${JSON.stringify(intMode)}` + got ${JSON.stringify(intMode)}`, ); } - - if(config.url === ':memory:') { - return { - path: ':memory:', - scheme: 'file', - syncUrl, - syncInterval, - intMode, - fetch: config.fetch, - tls: false, - authToken: undefined, - encryptionKey: undefined, - authority: undefined, - }; + if (config.url === ":memory:") { + return { + path: ":memory:", + scheme: "file", + syncUrl, + syncInterval, + intMode, + fetch: config.fetch, + tls: false, + authToken: undefined, + encryptionKey: undefined, + authority: undefined, + }; } const uri = parseUri(config.url); - for (const {key, value} of uri.query?.pairs ?? []) { + for (const { key, value } of uri.query?.pairs ?? []) { if (key === "authToken") { authToken = value ? value : undefined; } else if (key === "tls") { @@ -73,7 +77,7 @@ export function expandConfig(config: Config, preferHttp: boolean): ExpandedConfi } } else { throw new LibsqlError( - `Unknown URL query parameter ${JSON.stringify(key)}`, + `Unknown URL query parameter ${JSON.stringify(key)}`, "URL_PARAM_NOT_SUPPORTED", ); } @@ -96,7 +100,11 @@ export function expandConfig(config: Config, preferHttp: boolean): ExpandedConfi } else if (uriScheme === "http" || uriScheme === "ws") { scheme = uriScheme; tls ??= false; - } else if (uriScheme === "https" || uriScheme === "wss" || uriScheme === "file") { + } else if ( + uriScheme === "https" || + uriScheme === "wss" || + uriScheme === "file" + ) { scheme = uriScheme; } else { throw new LibsqlError( diff --git a/packages/libsql-core/src/uri.ts b/packages/libsql-core/src/uri.ts index 3117f2f4..abe46337 100644 --- a/packages/libsql-core/src/uri.ts +++ b/packages/libsql-core/src/uri.ts @@ -30,7 +30,7 @@ export interface Userinfo { } export interface Query { - pairs: Array, + pairs: Array; } export interface KeyValue { @@ -41,53 +41,70 @@ export interface KeyValue { export function parseUri(text: string): Uri { const match = URI_RE.exec(text); if (match === null) { - throw new LibsqlError("The URL is not in a valid format", "URL_INVALID"); + throw new LibsqlError( + "The URL is not in a valid format", + "URL_INVALID", + ); } const groups = match.groups!; const scheme = groups["scheme"]!; - const authority = groups["authority"] !== undefined - ? parseAuthority(groups["authority"]) : undefined; + const authority = + groups["authority"] !== undefined + ? parseAuthority(groups["authority"]) + : undefined; const path = percentDecode(groups["path"]!); - const query = groups["query"] !== undefined - ? parseQuery(groups["query"]) : undefined; - const fragment = groups["fragment"] !== undefined - ? percentDecode(groups["fragment"]) : undefined; - return {scheme, authority, path, query, fragment}; + const query = + groups["query"] !== undefined ? parseQuery(groups["query"]) : undefined; + const fragment = + groups["fragment"] !== undefined + ? percentDecode(groups["fragment"]) + : undefined; + return { scheme, authority, path, query, fragment }; } const URI_RE = (() => { - const SCHEME = '(?[A-Za-z][A-Za-z.+-]*)'; - const AUTHORITY = '(?[^/?#]*)'; - const PATH = '(?[^?#]*)'; - const QUERY = '(?[^#]*)'; - const FRAGMENT = '(?.*)' - return new RegExp(`^${SCHEME}:(//${AUTHORITY})?${PATH}(\\?${QUERY})?(#${FRAGMENT})?$`, "su"); + const SCHEME = "(?[A-Za-z][A-Za-z.+-]*)"; + const AUTHORITY = "(?[^/?#]*)"; + const PATH = "(?[^?#]*)"; + const QUERY = "(?[^#]*)"; + const FRAGMENT = "(?.*)"; + return new RegExp( + `^${SCHEME}:(//${AUTHORITY})?${PATH}(\\?${QUERY})?(#${FRAGMENT})?$`, + "su", + ); })(); function parseAuthority(text: string): Authority { const match = AUTHORITY_RE.exec(text); if (match === null) { - throw new LibsqlError("The authority part of the URL is not in a valid format", "URL_INVALID"); + throw new LibsqlError( + "The authority part of the URL is not in a valid format", + "URL_INVALID", + ); } const groups = match.groups!; const host = percentDecode(groups["host_br"] ?? groups["host"]); - const port = groups["port"] - ? parseInt(groups["port"], 10) - : undefined; - const userinfo = groups["username"] !== undefined - ? { - username: percentDecode(groups["username"]), - password: groups["password"] !== undefined - ? percentDecode(groups["password"]) : undefined, - } - : undefined; - return {host, port, userinfo}; + const port = groups["port"] ? parseInt(groups["port"], 10) : undefined; + const userinfo = + groups["username"] !== undefined + ? { + username: percentDecode(groups["username"]), + password: + groups["password"] !== undefined + ? percentDecode(groups["password"]) + : undefined, + } + : undefined; + return { host, port, userinfo }; } const AUTHORITY_RE = (() => { - return new RegExp(`^((?[^:]*)(:(?.*))?@)?((?[^:\\[\\]]*)|(\\[(?[^\\[\\]]*)\\]))(:(?[0-9]*))?$`, "su"); + return new RegExp( + `^((?[^:]*)(:(?.*))?@)?((?[^:\\[\\]]*)|(\\[(?[^\\[\\]]*)\\]))(:(?[0-9]*))?$`, + "su", + ); })(); // Query string is parsed as application/x-www-form-urlencoded according to the Web URL standard: @@ -108,7 +125,7 @@ function parseQuery(text: string): Query { value = ""; } else { key = sequence.substring(0, splitIdx); - value = sequence.substring(splitIdx+1); + value = sequence.substring(splitIdx + 1); } pairs.push({ @@ -116,7 +133,7 @@ function parseQuery(text: string): Query { value: percentDecode(value.replaceAll("+", " ")), }); } - return {pairs}; + return { pairs }; } function percentDecode(text: string): string { @@ -124,13 +141,22 @@ function percentDecode(text: string): string { return decodeURIComponent(text); } catch (e) { if (e instanceof URIError) { - throw new LibsqlError(`URL component has invalid percent encoding: ${e}`, "URL_INVALID", undefined, e); + throw new LibsqlError( + `URL component has invalid percent encoding: ${e}`, + "URL_INVALID", + undefined, + e, + ); } throw e; } } -export function encodeBaseUrl(scheme: string, authority: Authority | undefined, path: string): URL { +export function encodeBaseUrl( + scheme: string, + authority: Authority | undefined, + path: string, +): URL { if (authority === undefined) { throw new LibsqlError( `URL with scheme ${JSON.stringify(scheme + ":")} requires authority (the "//" part)`, @@ -167,7 +193,9 @@ function encodeUserinfo(userinfo: Userinfo | undefined): string { } const usernameText = encodeURIComponent(userinfo.username); - const passwordText = userinfo.password !== undefined - ? `:${encodeURIComponent(userinfo.password)}` : ""; + const passwordText = + userinfo.password !== undefined + ? `:${encodeURIComponent(userinfo.password)}` + : ""; return `${usernameText}${passwordText}@`; } diff --git a/packages/libsql-core/src/util.ts b/packages/libsql-core/src/util.ts index 285cc86c..6d5bdbb6 100644 --- a/packages/libsql-core/src/util.ts +++ b/packages/libsql-core/src/util.ts @@ -1,7 +1,15 @@ import { Base64 } from "js-base64"; -import { ResultSet, Row, Value, TransactionMode, InStatement, LibsqlError } from "./api"; +import { + ResultSet, + Row, + Value, + TransactionMode, + InStatement, + LibsqlError, +} from "./api"; -export const supportedUrlLink = "https://github.com/libsql/libsql-client-ts#supported-urls"; +export const supportedUrlLink = + "https://github.com/libsql/libsql-client-ts#supported-urls"; export function transactionModeToBegin(mode: TransactionMode): string { if (mode === "write") { @@ -11,7 +19,9 @@ export function transactionModeToBegin(mode: TransactionMode): string { } else if (mode === "deferred") { return "BEGIN DEFERRED"; } else { - throw RangeError('Unknown transaction mode, supported values are "write", "read" and "deferred"'); + throw RangeError( + 'Unknown transaction mode, supported values are "write", "read" and "deferred"', + ); } } @@ -38,11 +48,14 @@ export class ResultSetImpl implements ResultSet { toJSON(): any { return { - "columns": this.columns, - "columnTypes": this.columnTypes, - "rows": this.rows.map(rowToJson), - "rowsAffected": this.rowsAffected, - "lastInsertRowid": this.lastInsertRowid !== undefined ? ""+this.lastInsertRowid : null, + columns: this.columns, + columnTypes: this.columnTypes, + rows: this.rows.map(rowToJson), + rowsAffected: this.rowsAffected, + lastInsertRowid: + this.lastInsertRowid !== undefined + ? "" + this.lastInsertRowid + : null, }; } } @@ -53,7 +66,7 @@ function rowToJson(row: Row): unknown { function valueToJson(value: Value): unknown { if (typeof value === "bigint") { - return ""+value; + return "" + value; } else if (value instanceof ArrayBuffer) { return Base64.fromUint8Array(new Uint8Array(value)); } else { diff --git a/packages/libsql-core/tsconfig.build-cjs.json b/packages/libsql-core/tsconfig.build-cjs.json index 857027a0..8feb91c5 100644 --- a/packages/libsql-core/tsconfig.build-cjs.json +++ b/packages/libsql-core/tsconfig.build-cjs.json @@ -6,4 +6,3 @@ "outDir": "./lib-cjs/" } } - diff --git a/packages/libsql-core/tsconfig.build-esm.json b/packages/libsql-core/tsconfig.build-esm.json index 9a01705b..2ba1706d 100644 --- a/packages/libsql-core/tsconfig.build-esm.json +++ b/packages/libsql-core/tsconfig.build-esm.json @@ -6,4 +6,3 @@ "outDir": "./lib-esm/" } } -