@supernova-studio/client 0.47.40 → 0.47.41

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/dist/index.js CHANGED
@@ -5681,9 +5681,23 @@ var DTOUserWorkspaceMembershipsResponse = _zod.z.object({
5681
5681
  });
5682
5682
 
5683
5683
  // src/utils/hash.ts
5684
- var _crypto = require('crypto');
5685
- function hash(s) {
5686
- return _crypto.createHash.call(void 0, "sha256").update(s).digest("hex");
5684
+ function hash(input) {
5685
+ return farmhash(input).toString(16);
5686
+ }
5687
+ function farmhash(input) {
5688
+ const seed = 2654435769;
5689
+ let hash2 = seed;
5690
+ for (let i = 0; i < input.length; i++) {
5691
+ const charCode = input.charCodeAt(i);
5692
+ hash2 ^= charCode;
5693
+ hash2 = Math.imul(hash2, 1540483477);
5694
+ hash2 ^= hash2 >>> 15;
5695
+ }
5696
+ hash2 = Math.imul(hash2, 1540483477);
5697
+ hash2 ^= hash2 >>> 13;
5698
+ hash2 = Math.imul(hash2, 1540483477);
5699
+ hash2 ^= hash2 >>> 15;
5700
+ return hash2 >>> 0;
5687
5701
  }
5688
5702
  function prepareObject(obj) {
5689
5703
  if (obj === null || typeof obj !== "object") {