mol_crypto_lib 0.1.1321 → 0.1.1322

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