hyoo_sync_client 0.0.535 → 0.0.536

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
@@ -1468,7 +1468,7 @@ var $;
1468
1468
  }
1469
1469
  return this.cache;
1470
1470
  }
1471
- async async() {
1471
+ async async_raw() {
1472
1472
  while (true) {
1473
1473
  this.fresh();
1474
1474
  if (this.cache instanceof Error) {
@@ -1484,6 +1484,12 @@ var $;
1484
1484
  }
1485
1485
  }
1486
1486
  }
1487
+ async() {
1488
+ const promise = this.async_raw();
1489
+ if (!promise.destructor)
1490
+ promise.destructor = () => this.destructor();
1491
+ return promise;
1492
+ }
1487
1493
  step() {
1488
1494
  return new Promise(done => {
1489
1495
  const sub = new $mol_wire_pub_sub;
package/node.test.js CHANGED
@@ -1459,7 +1459,7 @@ var $;
1459
1459
  }
1460
1460
  return this.cache;
1461
1461
  }
1462
- async async() {
1462
+ async async_raw() {
1463
1463
  while (true) {
1464
1464
  this.fresh();
1465
1465
  if (this.cache instanceof Error) {
@@ -1475,6 +1475,12 @@ var $;
1475
1475
  }
1476
1476
  }
1477
1477
  }
1478
+ async() {
1479
+ const promise = this.async_raw();
1480
+ if (!promise.destructor)
1481
+ promise.destructor = () => this.destructor();
1482
+ return promise;
1483
+ }
1478
1484
  step() {
1479
1485
  return new Promise(done => {
1480
1486
  const sub = new $mol_wire_pub_sub;