@nxtedition/deepstream.io-client-js 31.2.13 → 31.2.15

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/deepstream.io-client-js",
3
- "version": "31.2.13",
3
+ "version": "31.2.15",
4
4
  "description": "the javascript client for deepstream.io",
5
5
  "homepage": "http://deepstream.io",
6
6
  "type": "module",
@@ -282,7 +282,7 @@ class RecordHandler {
282
282
  // TODO (perf): Slow implementation...
283
283
 
284
284
  const signal = opts?.signal
285
- const timeout = opts?.timeout ?? 60e3
285
+ const timeout = opts?.timeout ?? 10 * 60e3
286
286
 
287
287
  let disposers
288
288
  try {
@@ -1,6 +1,10 @@
1
1
  import xxhash from 'xxhash-wasm'
2
2
 
3
3
  const NODE_ENV = typeof process !== 'undefined' && process.env && process.env.NODE_ENV
4
+ const HASHER = await xxhash()
5
+
6
+ // This is a hack to avoid top-level await
7
+ // const HASHER = await xxhash()
4
8
  export const isNode = typeof process !== 'undefined' && process.toString() === '[object process]'
5
9
  export const isProduction = NODE_ENV === 'production'
6
10
 
@@ -177,23 +181,18 @@ export function removeAbortListener(signal, handler) {
177
181
  }
178
182
  }
179
183
 
180
- // This is a hack to avoid top-level await
181
- // const HASHER = await xxhash()
182
- let HASHER
183
- xxhash().then((hasher) => (HASHER = hasher))
184
-
185
184
  export function h64ToString(str) {
186
185
  return HASHER.h64ToString(str)
187
186
  }
188
187
 
189
- export function findBigIntPaths(obj, path = "") {
188
+ export function findBigIntPaths(obj, path = '') {
190
189
  const paths = []
191
190
 
192
- if (typeof obj === "bigint") {
191
+ if (typeof obj === 'bigint') {
193
192
  return [path]
194
193
  }
195
194
 
196
- if (typeof obj === "object" && obj !== null) {
195
+ if (typeof obj === 'object' && obj !== null) {
197
196
  for (const key of Object.keys(obj)) {
198
197
  paths.push(...findBigIntPaths(obj[key], path ? `${path}.${key}` : key))
199
198
  }