zet-lib 5.0.0 → 5.0.1
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/lib/Pool.js +2 -2
- package/lib/Util.js +2 -2
- package/package.json +5 -4
package/lib/Pool.js
CHANGED
|
@@ -55,7 +55,7 @@ function pgToString(value) {
|
|
|
55
55
|
return value.toString();
|
|
56
56
|
}
|
|
57
57
|
pg_1.types.setTypeParser(1082, pgToString); // date
|
|
58
|
-
const
|
|
58
|
+
const crypto_1 = require("crypto");
|
|
59
59
|
const ErrorWithCode_1 = require("./ErrorWithCode");
|
|
60
60
|
class Pool extends events_1.EventEmitter {
|
|
61
61
|
/**
|
|
@@ -154,7 +154,7 @@ class Pool extends events_1.EventEmitter {
|
|
|
154
154
|
this.emit("idleConnectionActivated");
|
|
155
155
|
return idleConnection;
|
|
156
156
|
}
|
|
157
|
-
const id = (0,
|
|
157
|
+
const id = (0, crypto_1.randomUUID)();
|
|
158
158
|
if (this.connections.length < this.options.poolSize) {
|
|
159
159
|
this.connections.push(id);
|
|
160
160
|
try {
|
package/lib/Util.js
CHANGED
|
@@ -2,7 +2,7 @@ const moment = require("moment");
|
|
|
2
2
|
const path = require("path");
|
|
3
3
|
const randomstring = require("randomstring");
|
|
4
4
|
const fs = require("fs-extra");
|
|
5
|
-
const {
|
|
5
|
+
const { randomUUID } = require("crypto");
|
|
6
6
|
const sha256 = require("js-sha256");
|
|
7
7
|
|
|
8
8
|
const Util = {};
|
|
@@ -365,7 +365,7 @@ Util.generate = function (length, charset) {
|
|
|
365
365
|
};
|
|
366
366
|
|
|
367
367
|
Util.uuid = () => {
|
|
368
|
-
return
|
|
368
|
+
return randomUUID();
|
|
369
369
|
};
|
|
370
370
|
/*
|
|
371
371
|
generate random string 8
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zet-lib",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "zet is a library that part of zet generator.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18"
|
|
@@ -48,8 +48,7 @@
|
|
|
48
48
|
"randomstring": "^1.3.1",
|
|
49
49
|
"read-excel-file": "^5.8.0",
|
|
50
50
|
"socket.io": "^4.8.3",
|
|
51
|
-
"uglify-js": "^3.19.3"
|
|
52
|
-
"uuid": "^14.0.0"
|
|
51
|
+
"uglify-js": "^3.19.3"
|
|
53
52
|
},
|
|
54
53
|
"optionalDependencies": {
|
|
55
54
|
"sharp": "^0.34.1"
|
|
@@ -59,7 +58,9 @@
|
|
|
59
58
|
"standard": "^17.1.2"
|
|
60
59
|
},
|
|
61
60
|
"overrides": {
|
|
62
|
-
"
|
|
61
|
+
"istanbul-lib-processinfo": {
|
|
62
|
+
"uuid": "^14.0.0"
|
|
63
|
+
},
|
|
63
64
|
"unzipper": "^0.12.3",
|
|
64
65
|
"rimraf": "^6.1.2",
|
|
65
66
|
"fstream": "^2.0.0",
|