@pi-r/mysql 0.2.9 → 0.2.11

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 2020-24 Code Geass
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/mysql
2
2
 
3
- PEP 402 - Forever Josee + Nunnally
3
+ PEP 402 - Forever
4
4
 
5
5
  ## LICENSE
6
6
 
package/client/index.js CHANGED
@@ -72,6 +72,7 @@ function setAuthentication(credential) {
72
72
  }
73
73
  exports.setAuthentication = setAuthentication;
74
74
  function setCredential(item) {
75
+ var _a, _b, _c, _d;
75
76
  let credential = this.getCredential(item);
76
77
  if (credential) {
77
78
  setAuthentication.call(this, credential);
@@ -95,7 +96,7 @@ function setCredential(item) {
95
96
  const usePool = item.usePool;
96
97
  if (usePool) {
97
98
  let username, password, pool;
98
- if (typeof usePool === 'string' && (username = credential.user || credential.uri && (0, util_1.parseConnectionString)(credential.uri)?.username)) {
99
+ if (typeof usePool === 'string' && (username = credential.user || credential.uri && ((_a = (0, util_1.parseConnectionString)(credential.uri)) === null || _a === void 0 ? void 0 : _a.username))) {
99
100
  [password, pool] = DbPool.validateKey(POOL_STATE, username, usePool);
100
101
  if (pool) {
101
102
  pool.add(item, password);
@@ -109,13 +110,13 @@ function setCredential(item) {
109
110
  if (config) {
110
111
  const { max, idle, queue_max } = config;
111
112
  if (max > 0) {
112
- credential.connectionLimit ?? (credential.connectionLimit = max);
113
+ (_b = credential.connectionLimit) !== null && _b !== void 0 ? _b : (credential.connectionLimit = max);
113
114
  }
114
115
  if (idle >= 0) {
115
- credential.idleTimeout ?? (credential.idleTimeout = idle);
116
+ (_c = credential.idleTimeout) !== null && _c !== void 0 ? _c : (credential.idleTimeout = idle);
116
117
  }
117
118
  if (queue_max >= 0) {
118
- credential.queueLimit ?? (credential.queueLimit = queue_max);
119
+ (_d = credential.queueLimit) !== null && _d !== void 0 ? _d : (credential.queueLimit = queue_max);
119
120
  }
120
121
  }
121
122
  new MySQLPool(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/mysql",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
4
4
  "description": "MySQL 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.5.5",
25
- "@e-mc/types": "^0.5.5",
24
+ "@e-mc/db": "^0.5.6",
25
+ "@e-mc/types": "^0.5.6",
26
26
  "mysql2": "^3.9.3"
27
27
  }
28
28
  }