@pi-r/mariadb 0.5.2 → 0.5.4

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/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2023 Wit Studio
1
+ Copyright 2024 An Pham
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
4
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @pi-r/mariadb
2
2
 
3
- PEP 402 - Forever Vivy
3
+ PEP 402 - Forever
4
4
 
5
5
  ## LICENSE
6
6
 
package/client/index.js CHANGED
@@ -66,6 +66,7 @@ function setAuthentication(credential) {
66
66
  }
67
67
  exports.setAuthentication = setAuthentication;
68
68
  function setCredential(item) {
69
+ var _a, _b, _c, _d, _e;
69
70
  let credential = this.getCredential(item);
70
71
  if (credential) {
71
72
  setAuthentication.call(this, credential);
@@ -114,19 +115,19 @@ function setCredential(item) {
114
115
  if (config) {
115
116
  const { min, max, idle, timeout, socket_timeout } = config;
116
117
  if (min >= 0) {
117
- credential.minimumIdle ?? (credential.minimumIdle = min);
118
+ (_a = credential.minimumIdle) !== null && _a !== void 0 ? _a : (credential.minimumIdle = min);
118
119
  }
119
120
  if (max > 0) {
120
- credential.connectionLimit ?? (credential.connectionLimit = max);
121
+ (_b = credential.connectionLimit) !== null && _b !== void 0 ? _b : (credential.connectionLimit = max);
121
122
  }
122
123
  if (idle >= 0) {
123
- credential.idleTimeout ?? (credential.idleTimeout = idle);
124
+ (_c = credential.idleTimeout) !== null && _c !== void 0 ? _c : (credential.idleTimeout = idle);
124
125
  }
125
126
  if (timeout > 0) {
126
- credential.connectTimeout ?? (credential.connectTimeout = timeout);
127
+ (_d = credential.connectTimeout) !== null && _d !== void 0 ? _d : (credential.connectTimeout = timeout);
127
128
  }
128
129
  if (socket_timeout > 0) {
129
- credential.socketTimeout ?? (credential.socketTimeout = socket_timeout);
130
+ (_e = credential.socketTimeout) !== null && _e !== void 0 ? _e : (credential.socketTimeout = socket_timeout);
130
131
  }
131
132
  }
132
133
  new MariaDBPool(mariadb.createPool(removeUUIDKey(credential)), poolKey, username && password ? { username, password } : undefined).add(item).parent = POOL_STATE;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-r/mariadb",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "description": "MariaDB client driver for E-mc.",
5
5
  "main": "client/index.js",
6
6
  "types": "client/index.d.ts",
@@ -21,8 +21,8 @@
21
21
  "license": "MIT",
22
22
  "homepage": "https://github.com/anpham6/pi-r#readme",
23
23
  "dependencies": {
24
- "@e-mc/db": "^0.7.2",
25
- "@e-mc/types": "^0.7.2",
26
- "mariadb": "^3.2.3"
24
+ "@e-mc/db": "^0.7.5",
25
+ "@e-mc/types": "^0.7.5",
26
+ "mariadb": "^3.3.0"
27
27
  }
28
28
  }