@faasjs/knex 0.0.2-beta.385 → 0.0.2-beta.388

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
@@ -56,7 +56,7 @@ var Knex = class {
56
56
  throw Error("[Knex] client required.");
57
57
  data.dependencies["@faasjs/knex"] = "*";
58
58
  if (client === "sqlite3")
59
- data.dependencies["@vscode/sqlite3"] = "*";
59
+ data.dependencies["better-sqlite3"] = "*";
60
60
  else
61
61
  data.dependencies[client] = "*";
62
62
  this.logger.debug("add dependencies: " + client);
@@ -87,6 +87,8 @@ var Knex = class {
87
87
  }
88
88
  if (data.config.plugins && ((_a = data.config.plugins[this.name]) == null ? void 0 : _a.config))
89
89
  this.config = (0, import_deep_merge.deepMerge)(data.config.plugins[this.name].config, this.config);
90
+ if (this.config.client === "sqlite3")
91
+ this.config.client = "better-sqlite3";
90
92
  this.adapter = (0, import_knex.default)(this.config);
91
93
  if (this.config.client === "pg") {
92
94
  const pg = require("pg");
package/dist/index.mjs CHANGED
@@ -36,7 +36,7 @@ var Knex = class {
36
36
  throw Error("[Knex] client required.");
37
37
  data.dependencies["@faasjs/knex"] = "*";
38
38
  if (client === "sqlite3")
39
- data.dependencies["@vscode/sqlite3"] = "*";
39
+ data.dependencies["better-sqlite3"] = "*";
40
40
  else
41
41
  data.dependencies[client] = "*";
42
42
  this.logger.debug("add dependencies: " + client);
@@ -67,6 +67,8 @@ var Knex = class {
67
67
  }
68
68
  if (data.config.plugins && ((_a = data.config.plugins[this.name]) == null ? void 0 : _a.config))
69
69
  this.config = deepMerge(data.config.plugins[this.name].config, this.config);
70
+ if (this.config.client === "sqlite3")
71
+ this.config.client = "better-sqlite3";
70
72
  this.adapter = knex(this.config);
71
73
  if (this.config.client === "pg") {
72
74
  const pg = __require("pg");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/knex",
3
- "version": "0.0.2-beta.385",
3
+ "version": "0.0.2-beta.388",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -22,9 +22,9 @@
22
22
  "dist"
23
23
  ],
24
24
  "peerDependencies": {
25
- "@faasjs/deep_merge": "^0.0.2-beta.385",
26
- "@faasjs/func": "^0.0.2-beta.385",
27
- "@faasjs/logger": "^0.0.2-beta.385",
25
+ "@faasjs/deep_merge": "^0.0.2-beta.388",
26
+ "@faasjs/func": "^0.0.2-beta.388",
27
+ "@faasjs/logger": "^0.0.2-beta.388",
28
28
  "knex": "*"
29
29
  },
30
30
  "devDependencies": {
@@ -33,7 +33,7 @@
33
33
  "@types/pg": "*",
34
34
  "mysql": "*",
35
35
  "pg": "*",
36
- "@vscode/sqlite3": "*",
36
+ "better-sqlite3": "*",
37
37
  "tsup": "*",
38
38
  "typescript": "*"
39
39
  },