hyoo_sync_client 0.0.542 → 0.0.544

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/node.mjs CHANGED
@@ -1413,12 +1413,13 @@ var $;
1413
1413
  break;
1414
1414
  }
1415
1415
  if ($mol_promise_like(result) && !handled.has(result)) {
1416
+ handled.add(result);
1416
1417
  const put = (res) => {
1417
1418
  if (this.cache === result)
1418
1419
  this.put(res);
1419
1420
  return res;
1420
1421
  };
1421
- result = result.then(put, put);
1422
+ result = Object.assign(result.then(put, put), { destructor: result.destructor });
1422
1423
  }
1423
1424
  }
1424
1425
  catch (error) {
@@ -1429,10 +1430,11 @@ var $;
1429
1430
  result = new Error(String(error), { cause: error });
1430
1431
  }
1431
1432
  if ($mol_promise_like(result) && !handled.has(result)) {
1432
- result = result.finally(() => {
1433
+ handled.add(result);
1434
+ result = Object.assign(result.finally(() => {
1433
1435
  if (this.cache === result)
1434
1436
  this.absorb();
1435
- });
1437
+ }), { destructor: result.destructor });
1436
1438
  }
1437
1439
  }
1438
1440
  if ($mol_promise_like(result) && !handled.has(result)) {
package/node.test.js CHANGED
@@ -1404,12 +1404,13 @@ var $;
1404
1404
  break;
1405
1405
  }
1406
1406
  if ($mol_promise_like(result) && !handled.has(result)) {
1407
+ handled.add(result);
1407
1408
  const put = (res) => {
1408
1409
  if (this.cache === result)
1409
1410
  this.put(res);
1410
1411
  return res;
1411
1412
  };
1412
- result = result.then(put, put);
1413
+ result = Object.assign(result.then(put, put), { destructor: result.destructor });
1413
1414
  }
1414
1415
  }
1415
1416
  catch (error) {
@@ -1420,10 +1421,11 @@ var $;
1420
1421
  result = new Error(String(error), { cause: error });
1421
1422
  }
1422
1423
  if ($mol_promise_like(result) && !handled.has(result)) {
1423
- result = result.finally(() => {
1424
+ handled.add(result);
1425
+ result = Object.assign(result.finally(() => {
1424
1426
  if (this.cache === result)
1425
1427
  this.absorb();
1426
- });
1428
+ }), { destructor: result.destructor });
1427
1429
  }
1428
1430
  }
1429
1431
  if ($mol_promise_like(result) && !handled.has(result)) {