@e-mc/db 0.7.19 → 0.7.21

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.
Files changed (2) hide show
  1. package/index.js +4 -4
  2. package/package.json +4 -4
package/index.js CHANGED
@@ -199,11 +199,11 @@ class Db extends core_1.ClientDb {
199
199
  }
200
200
  readTLSCert(value, cache) {
201
201
  if ((0, types_1.isString)(value)) {
202
- let pathname = value.trim();
203
- if (request_1.default.isCert(pathname)) {
204
- return pathname;
202
+ if (request_1.default.isCert(value)) {
203
+ return value.trim();
205
204
  }
206
- if (Db.isPath(pathname = path.resolve(pathname)) && this.canRead(pathname, { ownPermissionOnly: true })) {
205
+ const pathname = path.resolve(value);
206
+ if (Db.isPath(pathname) && this.canRead(pathname, { ownPermissionOnly: true })) {
207
207
  return request_1.default.readCACert(pathname, cache);
208
208
  }
209
209
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/db",
3
- "version": "0.7.19",
3
+ "version": "0.7.21",
4
4
  "description": "DB modules for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -20,8 +20,8 @@
20
20
  "license": "MIT",
21
21
  "homepage": "https://github.com/anpham6/e-mc#readme",
22
22
  "dependencies": {
23
- "@e-mc/core": "0.7.19",
24
- "@e-mc/request": "0.7.19",
25
- "@e-mc/types": "0.7.19"
23
+ "@e-mc/core": "0.7.21",
24
+ "@e-mc/request": "0.7.21",
25
+ "@e-mc/types": "0.7.21"
26
26
  }
27
27
  }