@prisma/adapter-mariadb 7.3.0-dev.12 → 7.3.0-dev.14

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.js CHANGED
@@ -435,7 +435,17 @@ var PrismaMariaDbAdapterFactory = class {
435
435
  this.#options = options;
436
436
  }
437
437
  async connect() {
438
- const pool = mariadb.createPool(this.#config);
438
+ let pool;
439
+ try {
440
+ pool = mariadb.createPool(this.#config);
441
+ } catch (error) {
442
+ if (error instanceof Error && error.message.startsWith("error parsing connection string")) {
443
+ throw new Error(
444
+ "error parsing connection string, format must be 'mariadb://[<user>[:<password>]@]<host>[:<port>]/[<db>[?<opt1>=<value1>[&<opt2>=<value2>]]]'"
445
+ );
446
+ }
447
+ throw error;
448
+ }
439
449
  if (this.#capabilities === void 0) {
440
450
  this.#capabilities = await getCapabilities(pool);
441
451
  }
package/dist/index.mjs CHANGED
@@ -399,7 +399,17 @@ var PrismaMariaDbAdapterFactory = class {
399
399
  this.#options = options;
400
400
  }
401
401
  async connect() {
402
- const pool = mariadb.createPool(this.#config);
402
+ let pool;
403
+ try {
404
+ pool = mariadb.createPool(this.#config);
405
+ } catch (error) {
406
+ if (error instanceof Error && error.message.startsWith("error parsing connection string")) {
407
+ throw new Error(
408
+ "error parsing connection string, format must be 'mariadb://[<user>[:<password>]@]<host>[:<port>]/[<db>[?<opt1>=<value1>[&<opt2>=<value2>]]]'"
409
+ );
410
+ }
411
+ throw error;
412
+ }
403
413
  if (this.#capabilities === void 0) {
404
414
  this.#capabilities = await getCapabilities(pool);
405
415
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/adapter-mariadb",
3
- "version": "7.3.0-dev.12",
3
+ "version": "7.3.0-dev.14",
4
4
  "description": "Prisma's driver adapter for \"mariadb\"",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -32,7 +32,7 @@
32
32
  "sideEffects": false,
33
33
  "dependencies": {
34
34
  "mariadb": "3.4.5",
35
- "@prisma/driver-adapter-utils": "7.3.0-dev.12"
35
+ "@prisma/driver-adapter-utils": "7.3.0-dev.14"
36
36
  },
37
37
  "scripts": {
38
38
  "dev": "DEV=true tsx helpers/build.ts",