@lunora/client 1.0.0-alpha.13 → 1.0.0-alpha.14

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.mjs CHANGED
@@ -3,7 +3,7 @@ export { default as createInMemoryBookmarkStorage } from './packem_shared/create
3
3
  export { applyDelta, isMutationDelta } from './packem_shared/applyDelta-4jFGTPA3.mjs';
4
4
  export { CONFLICT_ERROR_CODE, isConflictError } from './packem_shared/CONFLICT_ERROR_CODE-aUdVbEDw.mjs';
5
5
  export { c as createLocalStore } from './packem_shared/local-store-BNgN3Dw3.mjs';
6
- export { LunoraClient } from './packem_shared/LunoraClient-cxtxdYiI.mjs';
6
+ export { LunoraClient } from './packem_shared/LunoraClient-DEEhIPi_.mjs';
7
7
  export { createMutationRunner } from './packem_shared/createMutationRunner-BqsavzvG.mjs';
8
8
  export { createMutatorRunner } from './packem_shared/createMutatorRunner-BETvCd0p.mjs';
9
9
  export { O as OfflineQueue } from './packem_shared/offline-queue-B9vfdSqp.mjs';
@@ -2929,12 +2929,15 @@ class LunoraClient {
2929
2929
  if (token === null) {
2930
2930
  return null;
2931
2931
  }
2932
- let hash = 2166136261;
2932
+ let fnv = 2166136261;
2933
+ let djb2 = 5381;
2933
2934
  for (let index = 0; index < token.length; index += 1) {
2934
- hash ^= token.charCodeAt(index);
2935
- hash = Math.imul(hash, 16777619);
2935
+ const code = token.charCodeAt(index);
2936
+ fnv ^= code;
2937
+ fnv = Math.imul(fnv, 16777619);
2938
+ djb2 = Math.imul(djb2, 33) + code;
2936
2939
  }
2937
- return `${token.length.toString(36)}:${(hash >>> 0).toString(36)}`;
2940
+ return `${token.length.toString(36)}:${(fnv >>> 0).toString(36)}:${(djb2 >>> 0).toString(36)}`;
2938
2941
  }
2939
2942
  /**
2940
2943
  * Drain every in-memory offline write and reject it because the auth
@@ -1,4 +1,4 @@
1
- import { LunoraClient } from './LunoraClient-cxtxdYiI.mjs';
1
+ import { LunoraClient } from './LunoraClient-DEEhIPi_.mjs';
2
2
 
3
3
  const createServerClient = (options) => {
4
4
  const client = new LunoraClient({ fetch: options.fetch, url: options.url });
@@ -1,4 +1,4 @@
1
1
  export { getServerSession } from '../packem_shared/getServerSession-8jXewqxd.mjs';
2
2
  export { deserializePreloaded, serializePreloaded } from '../packem_shared/deserializePreloaded-C0eJTY_W.mjs';
3
- export { createServerClient } from '../packem_shared/createServerClient-DQu_BVen.mjs';
3
+ export { createServerClient } from '../packem_shared/createServerClient-DgJaS1_M.mjs';
4
4
  export { preloadQuery, preloadedQueryResult } from '../packem_shared/preloadQuery-lobFkD2Z.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunora/client",
3
- "version": "1.0.0-alpha.13",
3
+ "version": "1.0.0-alpha.14",
4
4
  "description": "Lunora browser SDK: WebSocket transport, optimistic updates, and an offline mutation queue",
5
5
  "keywords": [
6
6
  "cloudflare",