@imqueue/rpc 1.15.2 → 1.16.0
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/package.json +2 -2
- package/src/helpers/signature.js +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imqueue/rpc",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"description": "RPC-like client-service implementation over messaging queue",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"redis",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@imqueue/core": "^1.13.2",
|
|
42
42
|
"@types/node": "^20.9.0",
|
|
43
43
|
"acorn": "^8.11.2",
|
|
44
|
-
"
|
|
44
|
+
"farmhash": "^4.0.1",
|
|
45
45
|
"node-machine-id": "^1.1.12",
|
|
46
46
|
"reflect-metadata": "^0.1.13",
|
|
47
47
|
"typescript": "^5.2.2"
|
package/src/helpers/signature.js
CHANGED
|
@@ -18,7 +18,7 @@ exports.signature = void 0;
|
|
|
18
18
|
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
19
19
|
* PERFORMANCE OF THIS SOFTWARE.
|
|
20
20
|
*/
|
|
21
|
-
const
|
|
21
|
+
const farmhash_1 = require("farmhash");
|
|
22
22
|
/**
|
|
23
23
|
* Constructs and returns hash string for a given set of className, methodName
|
|
24
24
|
* and arguments.
|
|
@@ -29,9 +29,9 @@ const murmurhash_native_1 = require("murmurhash-native");
|
|
|
29
29
|
* @returns {string}
|
|
30
30
|
*/
|
|
31
31
|
function signature(className, methodName, args) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
const data = JSON.stringify([className, methodName, args]);
|
|
33
|
+
const hashBigInt = (0, farmhash_1.fingerprint64)(data);
|
|
34
|
+
return hashBigInt.toString(16);
|
|
35
35
|
}
|
|
36
36
|
exports.signature = signature;
|
|
37
37
|
//# sourceMappingURL=signature.js.map
|