hypha-rpc 0.20.28 → 0.20.29

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.
@@ -358,7 +358,7 @@ class RPC extends _utils__WEBPACK_IMPORTED_MODULE_0__.MessageEmitter {
358
358
  await manager.registerService(serviceInfo);
359
359
  }
360
360
  } else {
361
- console.debug("Connection established", connectionInfo);
361
+ // console.debug("Connection established", connectionInfo);
362
362
  }
363
363
  if (connectionInfo) {
364
364
  if (connectionInfo.public_base_url) {
@@ -466,7 +466,7 @@ class RPC extends _utils__WEBPACK_IMPORTED_MODULE_0__.MessageEmitter {
466
466
  throw new Error(`Message with key ${key} does not exists.`);
467
467
  }
468
468
  cache[key] = concatArrayBuffers(cache[key]);
469
- console.debug(`Processing message ${key} (bytes=${cache[key].byteLength})`);
469
+ // console.debug(`Processing message ${key} (bytes=${cache[key].byteLength})`);
470
470
  let unpacker = (0,_msgpack_msgpack__WEBPACK_IMPORTED_MODULE_2__.decodeMulti)(cache[key]);
471
471
  const { done, value } = unpacker.next();
472
472
  const main = value;
@@ -483,10 +483,10 @@ class RPC extends _utils__WEBPACK_IMPORTED_MODULE_0__.MessageEmitter {
483
483
  Object.assign(main, extra.value);
484
484
  }
485
485
  this._fire(main["type"], main);
486
- console.debug(
487
- this._client_id,
488
- `Processed message ${key} (bytes=${cache[key].byteLength})`,
489
- );
486
+ // console.debug(
487
+ // this._client_id,
488
+ // `Processed message ${key} (bytes=${cache[key].byteLength})`,
489
+ // );
490
490
  delete cache[key];
491
491
  }
492
492
 
@@ -925,9 +925,9 @@ class RPC extends _utils__WEBPACK_IMPORTED_MODULE_0__.MessageEmitter {
925
925
  data.slice(start_byte, start_byte + CHUNK_SIZE),
926
926
  !!session_id,
927
927
  );
928
- console.debug(
929
- `Sending chunk ${idx + 1}/${chunk_num} (${total_size} bytes)`,
930
- );
928
+ // console.debug(
929
+ // `Sending chunk ${idx + 1}/${chunk_num} (${total_size} bytes)`,
930
+ // );
931
931
  }
932
932
  // console.log(`All chunks sent (${chunk_num})`);
933
933
  await message_cache.process(message_id, !!session_id);
@@ -1087,7 +1087,7 @@ class RPC extends _utils__WEBPACK_IMPORTED_MODULE_0__.MessageEmitter {
1087
1087
  ._send_chunks(message_package, target_id, remote_parent)
1088
1088
  .then(function () {
1089
1089
  if (timer) {
1090
- console.debug(`Start watchdog timer.`);
1090
+ // console.debug(`Start watchdog timer.`);
1091
1091
  // Only start the timer after we send the message successfully
1092
1092
  timer.start();
1093
1093
  }
@@ -1171,7 +1171,7 @@ class RPC extends _utils__WEBPACK_IMPORTED_MODULE_0__.MessageEmitter {
1171
1171
  if (promise.heartbeat && promise.interval) {
1172
1172
  async function heartbeat() {
1173
1173
  try {
1174
- console.debug("Reset heartbeat timer: " + data.method);
1174
+ // console.debug("Reset heartbeat timer: " + data.method);
1175
1175
  await promise.heartbeat();
1176
1176
  } catch (err) {
1177
1177
  console.error(err);
@@ -1186,7 +1186,7 @@ class RPC extends _utils__WEBPACK_IMPORTED_MODULE_0__.MessageEmitter {
1186
1186
  try {
1187
1187
  method = indexObject(this._object_store, data["method"]);
1188
1188
  } catch (e) {
1189
- console.debug("Failed to find method", method_name, this._client_id, e);
1189
+ // console.debug("Failed to find method", method_name, this._client_id, e);
1190
1190
  throw new Error(
1191
1191
  `Method not found: ${method_name} at ${this._client_id}`,
1192
1192
  );
@@ -1276,7 +1276,7 @@ class RPC extends _utils__WEBPACK_IMPORTED_MODULE_0__.MessageEmitter {
1276
1276
  `Runtime Error: Invalid number of arguments for method ${method_name}, expected ${method.length} but got ${args.length}`,
1277
1277
  );
1278
1278
  }
1279
- console.debug("Executing method: " + method_name);
1279
+ // console.debug("Executing method: " + method_name);
1280
1280
  if (data.promise) {
1281
1281
  const result = method.apply(null, args);
1282
1282
  if (result instanceof Promise) {
@@ -1300,7 +1300,7 @@ class RPC extends _utils__WEBPACK_IMPORTED_MODULE_0__.MessageEmitter {
1300
1300
  } catch (err) {
1301
1301
  if (reject) {
1302
1302
  reject(err);
1303
- console.debug("Error during calling method: ", err);
1303
+ // console.debug("Error during calling method: ", err);
1304
1304
  } else {
1305
1305
  console.error("Error during calling method: ", err);
1306
1306
  }
@@ -1372,11 +1372,11 @@ class RPC extends _utils__WEBPACK_IMPORTED_MODULE_0__.MessageEmitter {
1372
1372
  const _server = aObject.__rpc_object__._rserver || this._server_base_url;
1373
1373
  if (_server === this._server_base_url) {
1374
1374
  return aObject.__rpc_object__;
1375
- } else {
1376
- console.debug(
1377
- `Encoding remote function from a different server ${_server}, current server: ${this._server_base_url}`,
1378
- );
1379
- }
1375
+ } // else {
1376
+ // console.debug(
1377
+ // `Encoding remote function from a different server ${_server}, current server: ${this._server_base_url}`,
1378
+ // );
1379
+ // }
1380
1380
  }
1381
1381
 
1382
1382
  let bObject;
@@ -5255,7 +5255,7 @@ class LocalWebSocket {
5255
5255
  (event) => {
5256
5256
  const { type, data, to } = event.data;
5257
5257
  if (to !== this.client_id) {
5258
- console.debug("message not for me", to, this.client_id);
5258
+ // console.debug("message not for me", to, this.client_id);
5259
5259
  return;
5260
5260
  }
5261
5261
  switch (type) {