@prisma/adapter-libsql 7.3.0-integration-prisma6-fix-cloudflare-engine.2 → 7.3.0-integration-engines-7-3-0-10-fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521.1

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/README.md CHANGED
@@ -18,17 +18,17 @@ Update your Prisma Client instance to use the libSQL database Client:
18
18
  ```ts
19
19
  // Import needed packages
20
20
  import { PrismaClient } from '@prisma/client'
21
- import { PrismaLibSQL } from '@prisma/adapter-libsql'
21
+ import { PrismaLibSql } from '@prisma/adapter-libsql'
22
22
  // You can alternatively use the web version of the client if you're running in
23
23
  // a constrained environment where the standard libsql client doesn't work:
24
- // import { PrismaLibSQL } from '@prisma/adapter-libsql/web'
24
+ // import { PrismaLibSql } from '@prisma/adapter-libsql/web'
25
25
 
26
26
  // Setup
27
27
  const connectionString = `${process.env.TURSO_DATABASE_URL}`
28
28
  const authToken = `${process.env.TURSO_AUTH_TOKEN}`
29
29
 
30
30
  // Init prisma client
31
- const adapter = new PrismaLibSQL({
31
+ const adapter = new PrismaLibSql({
32
32
  url: connectionString,
33
33
  authToken,
34
34
  })
@@ -3,21 +3,21 @@ import { Config } from '@libsql/client';
3
3
  import type { SqlDriverAdapter } from '@prisma/driver-adapter-utils';
4
4
  import type { SqlMigrationAwareDriverAdapterFactory } from '@prisma/driver-adapter-utils';
5
5
 
6
- export declare class PrismaLibSQL extends PrismaLibSQLAdapterFactoryBase {
6
+ export declare class PrismaLibSql extends PrismaLibSqlAdapterFactoryBase {
7
7
  createClient(config: Config): Client;
8
8
  }
9
9
 
10
- declare abstract class PrismaLibSQLAdapterFactoryBase implements SqlMigrationAwareDriverAdapterFactory {
10
+ declare abstract class PrismaLibSqlAdapterFactoryBase implements SqlMigrationAwareDriverAdapterFactory {
11
11
  #private;
12
12
  readonly provider = "sqlite";
13
13
  readonly adapterName: string;
14
- constructor(config: Config, options?: PrismaLibSQLOptions);
14
+ constructor(config: Config, options?: PrismaLibSqlOptions);
15
15
  connect(): Promise<SqlDriverAdapter>;
16
16
  connectToShadowDb(): Promise<SqlDriverAdapter>;
17
17
  abstract createClient(config: Config): StdClient;
18
18
  }
19
19
 
20
- declare type PrismaLibSQLOptions = {
20
+ declare type PrismaLibSqlOptions = {
21
21
  timestampFormat?: 'iso8601' | 'unixepoch-ms';
22
22
  };
23
23
 
@@ -3,21 +3,21 @@ import { Config } from '@libsql/client';
3
3
  import type { SqlDriverAdapter } from '@prisma/driver-adapter-utils';
4
4
  import type { SqlMigrationAwareDriverAdapterFactory } from '@prisma/driver-adapter-utils';
5
5
 
6
- export declare class PrismaLibSQL extends PrismaLibSQLAdapterFactoryBase {
6
+ export declare class PrismaLibSql extends PrismaLibSqlAdapterFactoryBase {
7
7
  createClient(config: Config): Client;
8
8
  }
9
9
 
10
- declare abstract class PrismaLibSQLAdapterFactoryBase implements SqlMigrationAwareDriverAdapterFactory {
10
+ declare abstract class PrismaLibSqlAdapterFactoryBase implements SqlMigrationAwareDriverAdapterFactory {
11
11
  #private;
12
12
  readonly provider = "sqlite";
13
13
  readonly adapterName: string;
14
- constructor(config: Config, options?: PrismaLibSQLOptions);
14
+ constructor(config: Config, options?: PrismaLibSqlOptions);
15
15
  connect(): Promise<SqlDriverAdapter>;
16
16
  connectToShadowDb(): Promise<SqlDriverAdapter>;
17
17
  abstract createClient(config: Config): StdClient;
18
18
  }
19
19
 
20
- declare type PrismaLibSQLOptions = {
20
+ declare type PrismaLibSqlOptions = {
21
21
  timestampFormat?: 'iso8601' | 'unixepoch-ms';
22
22
  };
23
23
 
@@ -20,7 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index-node.ts
21
21
  var index_node_exports = {};
22
22
  __export(index_node_exports, {
23
- PrismaLibSQL: () => PrismaLibSQLAdapterFactory
23
+ PrismaLibSql: () => PrismaLibSqlAdapterFactory
24
24
  });
25
25
  module.exports = __toCommonJS(index_node_exports);
26
26
 
@@ -152,7 +152,7 @@ function mapRow(row, columnTypes) {
152
152
  for (let i = 0; i < row.length; i++) {
153
153
  const value = row[i];
154
154
  if (value instanceof ArrayBuffer) {
155
- result[i] = Array.from(new Uint8Array(value));
155
+ result[i] = new Uint8Array(value);
156
156
  continue;
157
157
  }
158
158
  if (typeof value === "number" && (columnTypes[i] === import_driver_adapter_utils.ColumnTypeEnum.Int32 || columnTypes[i] === import_driver_adapter_utils.ColumnTypeEnum.Int64) && !Number.isInteger(value)) {
@@ -198,9 +198,6 @@ function mapArg(arg, argType, options) {
198
198
  if (typeof arg === "string" && argType.scalarType === "bytes") {
199
199
  return Buffer.from(arg, "base64");
200
200
  }
201
- if (Array.isArray(arg) && argType.scalarType === "bytes") {
202
- return new Uint8Array(arg);
203
- }
204
201
  return arg;
205
202
  }
206
203
 
@@ -358,7 +355,7 @@ var LibSqlTransaction = class extends LibSqlQueryable {
358
355
  }
359
356
  }
360
357
  };
361
- var PrismaLibSQLAdapter = class extends LibSqlQueryable {
358
+ var PrismaLibSqlAdapter = class extends LibSqlQueryable {
362
359
  constructor(client, adapterOptions) {
363
360
  super(client, adapterOptions);
364
361
  }
@@ -398,7 +395,7 @@ var PrismaLibSQLAdapter = class extends LibSqlQueryable {
398
395
  return Promise.resolve();
399
396
  }
400
397
  };
401
- var PrismaLibSQLAdapterFactoryBase = class {
398
+ var PrismaLibSqlAdapterFactoryBase = class {
402
399
  provider = "sqlite";
403
400
  adapterName = name;
404
401
  #config;
@@ -408,22 +405,22 @@ var PrismaLibSQLAdapterFactoryBase = class {
408
405
  this.#options = options;
409
406
  }
410
407
  connect() {
411
- return Promise.resolve(new PrismaLibSQLAdapter(this.createClient(this.#config), this.#options));
408
+ return Promise.resolve(new PrismaLibSqlAdapter(this.createClient(this.#config), this.#options));
412
409
  }
413
410
  connectToShadowDb() {
414
411
  return Promise.resolve(
415
- new PrismaLibSQLAdapter(this.createClient({ ...this.#config, url: ":memory:" }), this.#options)
412
+ new PrismaLibSqlAdapter(this.createClient({ ...this.#config, url: ":memory:" }), this.#options)
416
413
  );
417
414
  }
418
415
  };
419
416
 
420
417
  // src/libsql-node.ts
421
- var PrismaLibSQLAdapterFactory = class extends PrismaLibSQLAdapterFactoryBase {
418
+ var PrismaLibSqlAdapterFactory = class extends PrismaLibSqlAdapterFactoryBase {
422
419
  createClient(config) {
423
420
  return (0, import_client.createClient)(config);
424
421
  }
425
422
  };
426
423
  // Annotate the CommonJS export names for ESM import in node:
427
424
  0 && (module.exports = {
428
- PrismaLibSQL
425
+ PrismaLibSql
429
426
  });
@@ -126,7 +126,7 @@ function mapRow(row, columnTypes) {
126
126
  for (let i = 0; i < row.length; i++) {
127
127
  const value = row[i];
128
128
  if (value instanceof ArrayBuffer) {
129
- result[i] = Array.from(new Uint8Array(value));
129
+ result[i] = new Uint8Array(value);
130
130
  continue;
131
131
  }
132
132
  if (typeof value === "number" && (columnTypes[i] === ColumnTypeEnum.Int32 || columnTypes[i] === ColumnTypeEnum.Int64) && !Number.isInteger(value)) {
@@ -172,9 +172,6 @@ function mapArg(arg, argType, options) {
172
172
  if (typeof arg === "string" && argType.scalarType === "bytes") {
173
173
  return Buffer.from(arg, "base64");
174
174
  }
175
- if (Array.isArray(arg) && argType.scalarType === "bytes") {
176
- return new Uint8Array(arg);
177
- }
178
175
  return arg;
179
176
  }
180
177
 
@@ -332,7 +329,7 @@ var LibSqlTransaction = class extends LibSqlQueryable {
332
329
  }
333
330
  }
334
331
  };
335
- var PrismaLibSQLAdapter = class extends LibSqlQueryable {
332
+ var PrismaLibSqlAdapter = class extends LibSqlQueryable {
336
333
  constructor(client, adapterOptions) {
337
334
  super(client, adapterOptions);
338
335
  }
@@ -372,7 +369,7 @@ var PrismaLibSQLAdapter = class extends LibSqlQueryable {
372
369
  return Promise.resolve();
373
370
  }
374
371
  };
375
- var PrismaLibSQLAdapterFactoryBase = class {
372
+ var PrismaLibSqlAdapterFactoryBase = class {
376
373
  provider = "sqlite";
377
374
  adapterName = name;
378
375
  #config;
@@ -382,21 +379,21 @@ var PrismaLibSQLAdapterFactoryBase = class {
382
379
  this.#options = options;
383
380
  }
384
381
  connect() {
385
- return Promise.resolve(new PrismaLibSQLAdapter(this.createClient(this.#config), this.#options));
382
+ return Promise.resolve(new PrismaLibSqlAdapter(this.createClient(this.#config), this.#options));
386
383
  }
387
384
  connectToShadowDb() {
388
385
  return Promise.resolve(
389
- new PrismaLibSQLAdapter(this.createClient({ ...this.#config, url: ":memory:" }), this.#options)
386
+ new PrismaLibSqlAdapter(this.createClient({ ...this.#config, url: ":memory:" }), this.#options)
390
387
  );
391
388
  }
392
389
  };
393
390
 
394
391
  // src/libsql-node.ts
395
- var PrismaLibSQLAdapterFactory = class extends PrismaLibSQLAdapterFactoryBase {
392
+ var PrismaLibSqlAdapterFactory = class extends PrismaLibSqlAdapterFactoryBase {
396
393
  createClient(config) {
397
394
  return createClient(config);
398
395
  }
399
396
  };
400
397
  export {
401
- PrismaLibSQLAdapterFactory as PrismaLibSQL
398
+ PrismaLibSqlAdapterFactory as PrismaLibSql
402
399
  };
@@ -5,21 +5,21 @@ import { Config as Config_2 } from '@libsql/client/web';
5
5
  import type { SqlDriverAdapter } from '@prisma/driver-adapter-utils';
6
6
  import type { SqlMigrationAwareDriverAdapterFactory } from '@prisma/driver-adapter-utils';
7
7
 
8
- export declare class PrismaLibSQL extends PrismaLibSQLAdapterFactoryBase {
8
+ export declare class PrismaLibSql extends PrismaLibSqlAdapterFactoryBase {
9
9
  createClient(config: Config_2): Client_2;
10
10
  }
11
11
 
12
- declare abstract class PrismaLibSQLAdapterFactoryBase implements SqlMigrationAwareDriverAdapterFactory {
12
+ declare abstract class PrismaLibSqlAdapterFactoryBase implements SqlMigrationAwareDriverAdapterFactory {
13
13
  #private;
14
14
  readonly provider = "sqlite";
15
15
  readonly adapterName: string;
16
- constructor(config: Config, options?: PrismaLibSQLOptions);
16
+ constructor(config: Config, options?: PrismaLibSqlOptions);
17
17
  connect(): Promise<SqlDriverAdapter>;
18
18
  connectToShadowDb(): Promise<SqlDriverAdapter>;
19
19
  abstract createClient(config: Config): StdClient;
20
20
  }
21
21
 
22
- declare type PrismaLibSQLOptions = {
22
+ declare type PrismaLibSqlOptions = {
23
23
  timestampFormat?: 'iso8601' | 'unixepoch-ms';
24
24
  };
25
25
 
@@ -5,21 +5,21 @@ import { Config as Config_2 } from '@libsql/client/web';
5
5
  import type { SqlDriverAdapter } from '@prisma/driver-adapter-utils';
6
6
  import type { SqlMigrationAwareDriverAdapterFactory } from '@prisma/driver-adapter-utils';
7
7
 
8
- export declare class PrismaLibSQL extends PrismaLibSQLAdapterFactoryBase {
8
+ export declare class PrismaLibSql extends PrismaLibSqlAdapterFactoryBase {
9
9
  createClient(config: Config_2): Client_2;
10
10
  }
11
11
 
12
- declare abstract class PrismaLibSQLAdapterFactoryBase implements SqlMigrationAwareDriverAdapterFactory {
12
+ declare abstract class PrismaLibSqlAdapterFactoryBase implements SqlMigrationAwareDriverAdapterFactory {
13
13
  #private;
14
14
  readonly provider = "sqlite";
15
15
  readonly adapterName: string;
16
- constructor(config: Config, options?: PrismaLibSQLOptions);
16
+ constructor(config: Config, options?: PrismaLibSqlOptions);
17
17
  connect(): Promise<SqlDriverAdapter>;
18
18
  connectToShadowDb(): Promise<SqlDriverAdapter>;
19
19
  abstract createClient(config: Config): StdClient;
20
20
  }
21
21
 
22
- declare type PrismaLibSQLOptions = {
22
+ declare type PrismaLibSqlOptions = {
23
23
  timestampFormat?: 'iso8601' | 'unixepoch-ms';
24
24
  };
25
25
 
package/dist/index-web.js CHANGED
@@ -20,7 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index-web.ts
21
21
  var index_web_exports = {};
22
22
  __export(index_web_exports, {
23
- PrismaLibSQL: () => PrismaLibSQLWebAdapterFactory
23
+ PrismaLibSql: () => PrismaLibSqlWebAdapterFactory
24
24
  });
25
25
  module.exports = __toCommonJS(index_web_exports);
26
26
 
@@ -152,7 +152,7 @@ function mapRow(row, columnTypes) {
152
152
  for (let i = 0; i < row.length; i++) {
153
153
  const value = row[i];
154
154
  if (value instanceof ArrayBuffer) {
155
- result[i] = Array.from(new Uint8Array(value));
155
+ result[i] = new Uint8Array(value);
156
156
  continue;
157
157
  }
158
158
  if (typeof value === "number" && (columnTypes[i] === import_driver_adapter_utils.ColumnTypeEnum.Int32 || columnTypes[i] === import_driver_adapter_utils.ColumnTypeEnum.Int64) && !Number.isInteger(value)) {
@@ -198,9 +198,6 @@ function mapArg(arg, argType, options) {
198
198
  if (typeof arg === "string" && argType.scalarType === "bytes") {
199
199
  return Buffer.from(arg, "base64");
200
200
  }
201
- if (Array.isArray(arg) && argType.scalarType === "bytes") {
202
- return new Uint8Array(arg);
203
- }
204
201
  return arg;
205
202
  }
206
203
 
@@ -358,7 +355,7 @@ var LibSqlTransaction = class extends LibSqlQueryable {
358
355
  }
359
356
  }
360
357
  };
361
- var PrismaLibSQLAdapter = class extends LibSqlQueryable {
358
+ var PrismaLibSqlAdapter = class extends LibSqlQueryable {
362
359
  constructor(client, adapterOptions) {
363
360
  super(client, adapterOptions);
364
361
  }
@@ -398,7 +395,7 @@ var PrismaLibSQLAdapter = class extends LibSqlQueryable {
398
395
  return Promise.resolve();
399
396
  }
400
397
  };
401
- var PrismaLibSQLAdapterFactoryBase = class {
398
+ var PrismaLibSqlAdapterFactoryBase = class {
402
399
  provider = "sqlite";
403
400
  adapterName = name;
404
401
  #config;
@@ -408,22 +405,22 @@ var PrismaLibSQLAdapterFactoryBase = class {
408
405
  this.#options = options;
409
406
  }
410
407
  connect() {
411
- return Promise.resolve(new PrismaLibSQLAdapter(this.createClient(this.#config), this.#options));
408
+ return Promise.resolve(new PrismaLibSqlAdapter(this.createClient(this.#config), this.#options));
412
409
  }
413
410
  connectToShadowDb() {
414
411
  return Promise.resolve(
415
- new PrismaLibSQLAdapter(this.createClient({ ...this.#config, url: ":memory:" }), this.#options)
412
+ new PrismaLibSqlAdapter(this.createClient({ ...this.#config, url: ":memory:" }), this.#options)
416
413
  );
417
414
  }
418
415
  };
419
416
 
420
417
  // src/libsql-web.ts
421
- var PrismaLibSQLWebAdapterFactory = class extends PrismaLibSQLAdapterFactoryBase {
418
+ var PrismaLibSqlWebAdapterFactory = class extends PrismaLibSqlAdapterFactoryBase {
422
419
  createClient(config) {
423
420
  return (0, import_web.createClient)(config);
424
421
  }
425
422
  };
426
423
  // Annotate the CommonJS export names for ESM import in node:
427
424
  0 && (module.exports = {
428
- PrismaLibSQL
425
+ PrismaLibSql
429
426
  });
@@ -126,7 +126,7 @@ function mapRow(row, columnTypes) {
126
126
  for (let i = 0; i < row.length; i++) {
127
127
  const value = row[i];
128
128
  if (value instanceof ArrayBuffer) {
129
- result[i] = Array.from(new Uint8Array(value));
129
+ result[i] = new Uint8Array(value);
130
130
  continue;
131
131
  }
132
132
  if (typeof value === "number" && (columnTypes[i] === ColumnTypeEnum.Int32 || columnTypes[i] === ColumnTypeEnum.Int64) && !Number.isInteger(value)) {
@@ -172,9 +172,6 @@ function mapArg(arg, argType, options) {
172
172
  if (typeof arg === "string" && argType.scalarType === "bytes") {
173
173
  return Buffer.from(arg, "base64");
174
174
  }
175
- if (Array.isArray(arg) && argType.scalarType === "bytes") {
176
- return new Uint8Array(arg);
177
- }
178
175
  return arg;
179
176
  }
180
177
 
@@ -332,7 +329,7 @@ var LibSqlTransaction = class extends LibSqlQueryable {
332
329
  }
333
330
  }
334
331
  };
335
- var PrismaLibSQLAdapter = class extends LibSqlQueryable {
332
+ var PrismaLibSqlAdapter = class extends LibSqlQueryable {
336
333
  constructor(client, adapterOptions) {
337
334
  super(client, adapterOptions);
338
335
  }
@@ -372,7 +369,7 @@ var PrismaLibSQLAdapter = class extends LibSqlQueryable {
372
369
  return Promise.resolve();
373
370
  }
374
371
  };
375
- var PrismaLibSQLAdapterFactoryBase = class {
372
+ var PrismaLibSqlAdapterFactoryBase = class {
376
373
  provider = "sqlite";
377
374
  adapterName = name;
378
375
  #config;
@@ -382,21 +379,21 @@ var PrismaLibSQLAdapterFactoryBase = class {
382
379
  this.#options = options;
383
380
  }
384
381
  connect() {
385
- return Promise.resolve(new PrismaLibSQLAdapter(this.createClient(this.#config), this.#options));
382
+ return Promise.resolve(new PrismaLibSqlAdapter(this.createClient(this.#config), this.#options));
386
383
  }
387
384
  connectToShadowDb() {
388
385
  return Promise.resolve(
389
- new PrismaLibSQLAdapter(this.createClient({ ...this.#config, url: ":memory:" }), this.#options)
386
+ new PrismaLibSqlAdapter(this.createClient({ ...this.#config, url: ":memory:" }), this.#options)
390
387
  );
391
388
  }
392
389
  };
393
390
 
394
391
  // src/libsql-web.ts
395
- var PrismaLibSQLWebAdapterFactory = class extends PrismaLibSQLAdapterFactoryBase {
392
+ var PrismaLibSqlWebAdapterFactory = class extends PrismaLibSqlAdapterFactoryBase {
396
393
  createClient(config) {
397
394
  return createClient(config);
398
395
  }
399
396
  };
400
397
  export {
401
- PrismaLibSQLWebAdapterFactory as PrismaLibSQL
398
+ PrismaLibSqlWebAdapterFactory as PrismaLibSql
402
399
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/adapter-libsql",
3
- "version": "7.3.0-integration-prisma6-fix-cloudflare-engine.2",
3
+ "version": "7.3.0-integration-engines-7-3-0-10-fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521.1",
4
4
  "description": "Prisma's driver adapter for libSQL and Turso",
5
5
  "main": "dist/index-node.js",
6
6
  "module": "dist/index-node.mjs",
@@ -41,9 +41,9 @@
41
41
  "license": "Apache-2.0",
42
42
  "sideEffects": false,
43
43
  "dependencies": {
44
- "@libsql/client": "^0.3.5 || ^0.4.0 || ^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0",
44
+ "@libsql/client": "^0.8.1",
45
45
  "async-mutex": "0.5.0",
46
- "@prisma/driver-adapter-utils": "7.3.0-integration-prisma6-fix-cloudflare-engine.2"
46
+ "@prisma/driver-adapter-utils": "7.3.0-integration-engines-7-3-0-10-fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521.1"
47
47
  },
48
48
  "scripts": {
49
49
  "dev": "DEV=true tsx helpers/build.ts",