driftsql 1.0.10 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -5,6 +5,11 @@ interface PostgresConfig {
5
5
  interface LibSQLConfig {
6
6
  url: string;
7
7
  authToken?: string;
8
+ options?: {
9
+ experimental?: {
10
+ useTursoServerlessDriver?: boolean;
11
+ };
12
+ };
8
13
  }
9
14
 
10
15
  interface MySQLConfig {
package/dist/index.d.ts CHANGED
@@ -5,6 +5,11 @@ interface PostgresConfig {
5
5
  interface LibSQLConfig {
6
6
  url: string;
7
7
  authToken?: string;
8
+ options?: {
9
+ experimental?: {
10
+ useTursoServerlessDriver?: boolean;
11
+ };
12
+ };
8
13
  }
9
14
 
10
15
  interface MySQLConfig {
package/dist/index.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  import consola from 'consola';
2
2
  import postgres from 'postgres';
3
- import { createClient } from '@libsql/client';
3
+ import { createClient as createClient$1 } from '@libsql/client';
4
+ import { createClient } from '@tursodatabase/serverless/compat';
4
5
  import * as mysql from 'mysql2/promise';
5
6
  import fs from 'node:fs/promises';
6
7
 
@@ -286,7 +287,10 @@ class PostgresDriver {
286
287
  class LibSQLDriver {
287
288
  constructor(options) {
288
289
  this.options = options;
289
- this.client = createClient({
290
+ this.client = this.options?.options?.experimental?.useTursoServerlessDriver ? createClient({
291
+ url: this.options.url,
292
+ ...this.options.authToken ? { authToken: this.options.authToken } : {}
293
+ }) : createClient$1({
290
294
  url: this.options.url,
291
295
  ...this.options.authToken ? { authToken: this.options.authToken } : {}
292
296
  });
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "driftsql",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "author": "lasse vestergaard",
5
- "description": "A lightweight SQL client for TypeScript, supporting multiple databases like PostgreSQL, MySQL, and LibSQL.",
5
+ "description": "A lightweight SQL client for TypeScript",
6
6
  "repository": "lassejlv/driftsql",
7
7
  "license": "MIT",
8
8
  "sideEffects": false,
@@ -42,6 +42,7 @@
42
42
  "dependencies": {
43
43
  "@libsql/client": "^0.15.9",
44
44
  "@neondatabase/serverless": "^1.0.1",
45
+ "@tursodatabase/serverless": "^0.1.2",
45
46
  "@types/pg": "^8.15.4",
46
47
  "consola": "^3.4.2",
47
48
  "driftsql": "^0.0.1",