@prisma/adapter-libsql
Advanced tools
@@ -6,11 +6,11 @@ import { Client } from '@libsql/client'; | ||
| export declare class PrismaLibSQL extends PrismaLibSQLAdapterFactoryBase { | ||
| export declare class PrismaLibSql extends PrismaLibSqlAdapterFactoryBase { | ||
| createClient(config: Config): Client; | ||
| } | ||
| declare abstract class PrismaLibSQLAdapterFactoryBase implements SqlMigrationAwareDriverAdapterFactory { | ||
| declare abstract class PrismaLibSqlAdapterFactoryBase implements SqlMigrationAwareDriverAdapterFactory { | ||
| #private; | ||
| readonly provider = "sqlite"; | ||
| readonly adapterName: string; | ||
| constructor(config: Config, options?: PrismaLibSQLOptions); | ||
| constructor(config: Config, options?: PrismaLibSqlOptions); | ||
| connect(): Promise<SqlDriverAdapter>; | ||
@@ -21,3 +21,3 @@ connectToShadowDb(): Promise<SqlDriverAdapter>; | ||
| declare type PrismaLibSQLOptions = { | ||
| declare type PrismaLibSqlOptions = { | ||
| timestampFormat?: 'iso8601' | 'unixepoch-ms'; | ||
@@ -24,0 +24,0 @@ }; |
@@ -6,11 +6,11 @@ import { Client } from '@libsql/client'; | ||
| export declare class PrismaLibSQL extends PrismaLibSQLAdapterFactoryBase { | ||
| export declare class PrismaLibSql extends PrismaLibSqlAdapterFactoryBase { | ||
| createClient(config: Config): Client; | ||
| } | ||
| declare abstract class PrismaLibSQLAdapterFactoryBase implements SqlMigrationAwareDriverAdapterFactory { | ||
| declare abstract class PrismaLibSqlAdapterFactoryBase implements SqlMigrationAwareDriverAdapterFactory { | ||
| #private; | ||
| readonly provider = "sqlite"; | ||
| readonly adapterName: string; | ||
| constructor(config: Config, options?: PrismaLibSQLOptions); | ||
| constructor(config: Config, options?: PrismaLibSqlOptions); | ||
| connect(): Promise<SqlDriverAdapter>; | ||
@@ -21,3 +21,3 @@ connectToShadowDb(): Promise<SqlDriverAdapter>; | ||
| declare type PrismaLibSQLOptions = { | ||
| declare type PrismaLibSqlOptions = { | ||
| timestampFormat?: 'iso8601' | 'unixepoch-ms'; | ||
@@ -24,0 +24,0 @@ }; |
+8
-11
@@ -23,3 +23,3 @@ "use strict"; | ||
| __export(index_node_exports, { | ||
| PrismaLibSQL: () => PrismaLibSQLAdapterFactory | ||
| PrismaLibSql: () => PrismaLibSqlAdapterFactory | ||
| }); | ||
@@ -156,3 +156,3 @@ module.exports = __toCommonJS(index_node_exports); | ||
| if (value instanceof ArrayBuffer) { | ||
| result[i] = Array.from(new Uint8Array(value)); | ||
| result[i] = new Uint8Array(value); | ||
| continue; | ||
@@ -203,5 +203,2 @@ } | ||
| } | ||
| if (Array.isArray(arg) && argType.scalarType === "bytes") { | ||
| return new Uint8Array(arg); | ||
| } | ||
| return arg; | ||
@@ -364,3 +361,3 @@ } | ||
| }; | ||
| var PrismaLibSQLAdapter = class extends LibSqlQueryable { | ||
| var PrismaLibSqlAdapter = class extends LibSqlQueryable { | ||
| constructor(client, adapterOptions) { | ||
@@ -405,3 +402,3 @@ super(client, adapterOptions); | ||
| }; | ||
| var PrismaLibSQLAdapterFactoryBase = class { | ||
| var PrismaLibSqlAdapterFactoryBase = class { | ||
| provider = "sqlite"; | ||
@@ -416,7 +413,7 @@ adapterName = name; | ||
| connect() { | ||
| return Promise.resolve(new PrismaLibSQLAdapter(this.createClient(this.#config), this.#options)); | ||
| return Promise.resolve(new PrismaLibSqlAdapter(this.createClient(this.#config), this.#options)); | ||
| } | ||
| connectToShadowDb() { | ||
| return Promise.resolve( | ||
| new PrismaLibSQLAdapter(this.createClient({ ...this.#config, url: ":memory:" }), this.#options) | ||
| new PrismaLibSqlAdapter(this.createClient({ ...this.#config, url: ":memory:" }), this.#options) | ||
| ); | ||
@@ -427,3 +424,3 @@ } | ||
| // src/libsql-node.ts | ||
| var PrismaLibSQLAdapterFactory = class extends PrismaLibSQLAdapterFactoryBase { | ||
| var PrismaLibSqlAdapterFactory = class extends PrismaLibSqlAdapterFactoryBase { | ||
| createClient(config) { | ||
@@ -435,3 +432,3 @@ return (0, import_client.createClient)(config); | ||
| 0 && (module.exports = { | ||
| PrismaLibSQL | ||
| PrismaLibSql | ||
| }); |
+7
-10
@@ -129,3 +129,3 @@ // src/libsql-node.ts | ||
| if (value instanceof ArrayBuffer) { | ||
| result[i] = Array.from(new Uint8Array(value)); | ||
| result[i] = new Uint8Array(value); | ||
| continue; | ||
@@ -176,5 +176,2 @@ } | ||
| } | ||
| if (Array.isArray(arg) && argType.scalarType === "bytes") { | ||
| return new Uint8Array(arg); | ||
| } | ||
| return arg; | ||
@@ -337,3 +334,3 @@ } | ||
| }; | ||
| var PrismaLibSQLAdapter = class extends LibSqlQueryable { | ||
| var PrismaLibSqlAdapter = class extends LibSqlQueryable { | ||
| constructor(client, adapterOptions) { | ||
@@ -378,3 +375,3 @@ super(client, adapterOptions); | ||
| }; | ||
| var PrismaLibSQLAdapterFactoryBase = class { | ||
| var PrismaLibSqlAdapterFactoryBase = class { | ||
| provider = "sqlite"; | ||
@@ -389,7 +386,7 @@ adapterName = name; | ||
| connect() { | ||
| return Promise.resolve(new PrismaLibSQLAdapter(this.createClient(this.#config), this.#options)); | ||
| return Promise.resolve(new PrismaLibSqlAdapter(this.createClient(this.#config), this.#options)); | ||
| } | ||
| connectToShadowDb() { | ||
| return Promise.resolve( | ||
| new PrismaLibSQLAdapter(this.createClient({ ...this.#config, url: ":memory:" }), this.#options) | ||
| new PrismaLibSqlAdapter(this.createClient({ ...this.#config, url: ":memory:" }), this.#options) | ||
| ); | ||
@@ -400,3 +397,3 @@ } | ||
| // src/libsql-node.ts | ||
| var PrismaLibSQLAdapterFactory = class extends PrismaLibSQLAdapterFactoryBase { | ||
| var PrismaLibSqlAdapterFactory = class extends PrismaLibSqlAdapterFactoryBase { | ||
| createClient(config) { | ||
@@ -407,3 +404,3 @@ return createClient(config); | ||
| export { | ||
| PrismaLibSQLAdapterFactory as PrismaLibSQL | ||
| PrismaLibSqlAdapterFactory as PrismaLibSql | ||
| }; |
@@ -8,11 +8,11 @@ import type { Client } from '@libsql/client'; | ||
| export declare class PrismaLibSQL extends PrismaLibSQLAdapterFactoryBase { | ||
| export declare class PrismaLibSql extends PrismaLibSqlAdapterFactoryBase { | ||
| createClient(config: Config_2): Client_2; | ||
| } | ||
| declare abstract class PrismaLibSQLAdapterFactoryBase implements SqlMigrationAwareDriverAdapterFactory { | ||
| declare abstract class PrismaLibSqlAdapterFactoryBase implements SqlMigrationAwareDriverAdapterFactory { | ||
| #private; | ||
| readonly provider = "sqlite"; | ||
| readonly adapterName: string; | ||
| constructor(config: Config, options?: PrismaLibSQLOptions); | ||
| constructor(config: Config, options?: PrismaLibSqlOptions); | ||
| connect(): Promise<SqlDriverAdapter>; | ||
@@ -23,3 +23,3 @@ connectToShadowDb(): Promise<SqlDriverAdapter>; | ||
| declare type PrismaLibSQLOptions = { | ||
| declare type PrismaLibSqlOptions = { | ||
| timestampFormat?: 'iso8601' | 'unixepoch-ms'; | ||
@@ -26,0 +26,0 @@ }; |
@@ -8,11 +8,11 @@ import type { Client } from '@libsql/client'; | ||
| export declare class PrismaLibSQL extends PrismaLibSQLAdapterFactoryBase { | ||
| export declare class PrismaLibSql extends PrismaLibSqlAdapterFactoryBase { | ||
| createClient(config: Config_2): Client_2; | ||
| } | ||
| declare abstract class PrismaLibSQLAdapterFactoryBase implements SqlMigrationAwareDriverAdapterFactory { | ||
| declare abstract class PrismaLibSqlAdapterFactoryBase implements SqlMigrationAwareDriverAdapterFactory { | ||
| #private; | ||
| readonly provider = "sqlite"; | ||
| readonly adapterName: string; | ||
| constructor(config: Config, options?: PrismaLibSQLOptions); | ||
| constructor(config: Config, options?: PrismaLibSqlOptions); | ||
| connect(): Promise<SqlDriverAdapter>; | ||
@@ -23,3 +23,3 @@ connectToShadowDb(): Promise<SqlDriverAdapter>; | ||
| declare type PrismaLibSQLOptions = { | ||
| declare type PrismaLibSqlOptions = { | ||
| timestampFormat?: 'iso8601' | 'unixepoch-ms'; | ||
@@ -26,0 +26,0 @@ }; |
+8
-11
@@ -23,3 +23,3 @@ "use strict"; | ||
| __export(index_web_exports, { | ||
| PrismaLibSQL: () => PrismaLibSQLWebAdapterFactory | ||
| PrismaLibSql: () => PrismaLibSqlWebAdapterFactory | ||
| }); | ||
@@ -156,3 +156,3 @@ module.exports = __toCommonJS(index_web_exports); | ||
| if (value instanceof ArrayBuffer) { | ||
| result[i] = Array.from(new Uint8Array(value)); | ||
| result[i] = new Uint8Array(value); | ||
| continue; | ||
@@ -203,5 +203,2 @@ } | ||
| } | ||
| if (Array.isArray(arg) && argType.scalarType === "bytes") { | ||
| return new Uint8Array(arg); | ||
| } | ||
| return arg; | ||
@@ -364,3 +361,3 @@ } | ||
| }; | ||
| var PrismaLibSQLAdapter = class extends LibSqlQueryable { | ||
| var PrismaLibSqlAdapter = class extends LibSqlQueryable { | ||
| constructor(client, adapterOptions) { | ||
@@ -405,3 +402,3 @@ super(client, adapterOptions); | ||
| }; | ||
| var PrismaLibSQLAdapterFactoryBase = class { | ||
| var PrismaLibSqlAdapterFactoryBase = class { | ||
| provider = "sqlite"; | ||
@@ -416,7 +413,7 @@ adapterName = name; | ||
| connect() { | ||
| return Promise.resolve(new PrismaLibSQLAdapter(this.createClient(this.#config), this.#options)); | ||
| return Promise.resolve(new PrismaLibSqlAdapter(this.createClient(this.#config), this.#options)); | ||
| } | ||
| connectToShadowDb() { | ||
| return Promise.resolve( | ||
| new PrismaLibSQLAdapter(this.createClient({ ...this.#config, url: ":memory:" }), this.#options) | ||
| new PrismaLibSqlAdapter(this.createClient({ ...this.#config, url: ":memory:" }), this.#options) | ||
| ); | ||
@@ -427,3 +424,3 @@ } | ||
| // src/libsql-web.ts | ||
| var PrismaLibSQLWebAdapterFactory = class extends PrismaLibSQLAdapterFactoryBase { | ||
| var PrismaLibSqlWebAdapterFactory = class extends PrismaLibSqlAdapterFactoryBase { | ||
| createClient(config) { | ||
@@ -435,3 +432,3 @@ return (0, import_web.createClient)(config); | ||
| 0 && (module.exports = { | ||
| PrismaLibSQL | ||
| PrismaLibSql | ||
| }); |
+7
-10
@@ -129,3 +129,3 @@ // src/libsql-web.ts | ||
| if (value instanceof ArrayBuffer) { | ||
| result[i] = Array.from(new Uint8Array(value)); | ||
| result[i] = new Uint8Array(value); | ||
| continue; | ||
@@ -176,5 +176,2 @@ } | ||
| } | ||
| if (Array.isArray(arg) && argType.scalarType === "bytes") { | ||
| return new Uint8Array(arg); | ||
| } | ||
| return arg; | ||
@@ -337,3 +334,3 @@ } | ||
| }; | ||
| var PrismaLibSQLAdapter = class extends LibSqlQueryable { | ||
| var PrismaLibSqlAdapter = class extends LibSqlQueryable { | ||
| constructor(client, adapterOptions) { | ||
@@ -378,3 +375,3 @@ super(client, adapterOptions); | ||
| }; | ||
| var PrismaLibSQLAdapterFactoryBase = class { | ||
| var PrismaLibSqlAdapterFactoryBase = class { | ||
| provider = "sqlite"; | ||
@@ -389,7 +386,7 @@ adapterName = name; | ||
| connect() { | ||
| return Promise.resolve(new PrismaLibSQLAdapter(this.createClient(this.#config), this.#options)); | ||
| return Promise.resolve(new PrismaLibSqlAdapter(this.createClient(this.#config), this.#options)); | ||
| } | ||
| connectToShadowDb() { | ||
| return Promise.resolve( | ||
| new PrismaLibSQLAdapter(this.createClient({ ...this.#config, url: ":memory:" }), this.#options) | ||
| new PrismaLibSqlAdapter(this.createClient({ ...this.#config, url: ":memory:" }), this.#options) | ||
| ); | ||
@@ -400,3 +397,3 @@ } | ||
| // src/libsql-web.ts | ||
| var PrismaLibSQLWebAdapterFactory = class extends PrismaLibSQLAdapterFactoryBase { | ||
| var PrismaLibSqlWebAdapterFactory = class extends PrismaLibSqlAdapterFactoryBase { | ||
| createClient(config) { | ||
@@ -407,3 +404,3 @@ return createClient(config); | ||
| export { | ||
| PrismaLibSQLWebAdapterFactory as PrismaLibSQL | ||
| PrismaLibSqlWebAdapterFactory as PrismaLibSql | ||
| }; |
+3
-3
| { | ||
| "name": "@prisma/adapter-libsql", | ||
| "version": "7.3.0-integration-prisma6-fix-cloudflare-engine.3", | ||
| "version": "7.3.0", | ||
| "description": "Prisma's driver adapter for libSQL and Turso", | ||
@@ -44,5 +44,5 @@ "main": "dist/index-node.js", | ||
| "dependencies": { | ||
| "@libsql/client": "^0.3.5 || ^0.4.0 || ^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0", | ||
| "@libsql/client": "^0.8.1", | ||
| "async-mutex": "0.5.0", | ||
| "@prisma/driver-adapter-utils": "7.3.0-integration-prisma6-fix-cloudflare-engine.3" | ||
| "@prisma/driver-adapter-utils": "7.3.0" | ||
| }, | ||
@@ -49,0 +49,0 @@ "scripts": { |
+3
-3
@@ -21,6 +21,6 @@ # Prisma driver adapter for libSQL | ||
| import { PrismaClient } from '@prisma/client' | ||
| import { PrismaLibSQL } from '@prisma/adapter-libsql' | ||
| import { PrismaLibSql } from '@prisma/adapter-libsql' | ||
| // You can alternatively use the web version of the client if you're running in | ||
| // a constrained environment where the standard libsql client doesn't work: | ||
| // import { PrismaLibSQL } from '@prisma/adapter-libsql/web' | ||
| // import { PrismaLibSql } from '@prisma/adapter-libsql/web' | ||
@@ -32,3 +32,3 @@ // Setup | ||
| // Init prisma client | ||
| const adapter = new PrismaLibSQL({ | ||
| const adapter = new PrismaLibSql({ | ||
| url: connectionString, | ||
@@ -35,0 +35,0 @@ authToken, |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
-50%67596
-0.85%1666
-0.72%+ Added
+ Added
- Removed
- Removed
Updated