mol_jsx_lib 0.0.833 → 0.0.835
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.js +11 -9
- package/node.js.map +1 -1
- package/node.mjs +11 -9
- package/node.test.js +11 -9
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.js +11 -9
- package/web.js.map +1 -1
- package/web.mjs +11 -9
package/node.mjs
CHANGED
|
@@ -1624,16 +1624,13 @@ var $;
|
|
|
1624
1624
|
result = this.task.call(this.host, ...this.args);
|
|
1625
1625
|
break;
|
|
1626
1626
|
}
|
|
1627
|
-
if ($mol_promise_like(result)) {
|
|
1627
|
+
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
1628
1628
|
const put = (res) => {
|
|
1629
1629
|
if (this.cache === result)
|
|
1630
1630
|
this.put(res);
|
|
1631
1631
|
return res;
|
|
1632
1632
|
};
|
|
1633
|
-
result =
|
|
1634
|
-
destructor: result['destructor'] ?? (() => { })
|
|
1635
|
-
});
|
|
1636
|
-
handled.add(result);
|
|
1633
|
+
result = result.then(put, put);
|
|
1637
1634
|
}
|
|
1638
1635
|
}
|
|
1639
1636
|
catch (error) {
|
|
@@ -1644,15 +1641,20 @@ var $;
|
|
|
1644
1641
|
result = new Error(String(error), { cause: error });
|
|
1645
1642
|
}
|
|
1646
1643
|
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
1647
|
-
result =
|
|
1644
|
+
result = result.finally(() => {
|
|
1648
1645
|
if (this.cache === result)
|
|
1649
1646
|
this.absorb();
|
|
1650
|
-
}), {
|
|
1651
|
-
destructor: result['destructor'] ?? (() => { })
|
|
1652
1647
|
});
|
|
1653
|
-
handled.add(result);
|
|
1654
1648
|
}
|
|
1655
1649
|
}
|
|
1650
|
+
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
1651
|
+
result = Object.assign(result, {
|
|
1652
|
+
destructor: result['destructor'] ?? (() => { })
|
|
1653
|
+
});
|
|
1654
|
+
handled.add(result);
|
|
1655
|
+
const error = new Error();
|
|
1656
|
+
Object.defineProperty(result, 'stack', { get: () => error.stack });
|
|
1657
|
+
}
|
|
1656
1658
|
if (!$mol_promise_like(result)) {
|
|
1657
1659
|
this.track_cut();
|
|
1658
1660
|
}
|
package/node.test.js
CHANGED
|
@@ -1615,16 +1615,13 @@ var $;
|
|
|
1615
1615
|
result = this.task.call(this.host, ...this.args);
|
|
1616
1616
|
break;
|
|
1617
1617
|
}
|
|
1618
|
-
if ($mol_promise_like(result)) {
|
|
1618
|
+
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
1619
1619
|
const put = (res) => {
|
|
1620
1620
|
if (this.cache === result)
|
|
1621
1621
|
this.put(res);
|
|
1622
1622
|
return res;
|
|
1623
1623
|
};
|
|
1624
|
-
result =
|
|
1625
|
-
destructor: result['destructor'] ?? (() => { })
|
|
1626
|
-
});
|
|
1627
|
-
handled.add(result);
|
|
1624
|
+
result = result.then(put, put);
|
|
1628
1625
|
}
|
|
1629
1626
|
}
|
|
1630
1627
|
catch (error) {
|
|
@@ -1635,15 +1632,20 @@ var $;
|
|
|
1635
1632
|
result = new Error(String(error), { cause: error });
|
|
1636
1633
|
}
|
|
1637
1634
|
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
1638
|
-
result =
|
|
1635
|
+
result = result.finally(() => {
|
|
1639
1636
|
if (this.cache === result)
|
|
1640
1637
|
this.absorb();
|
|
1641
|
-
}), {
|
|
1642
|
-
destructor: result['destructor'] ?? (() => { })
|
|
1643
1638
|
});
|
|
1644
|
-
handled.add(result);
|
|
1645
1639
|
}
|
|
1646
1640
|
}
|
|
1641
|
+
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
1642
|
+
result = Object.assign(result, {
|
|
1643
|
+
destructor: result['destructor'] ?? (() => { })
|
|
1644
|
+
});
|
|
1645
|
+
handled.add(result);
|
|
1646
|
+
const error = new Error();
|
|
1647
|
+
Object.defineProperty(result, 'stack', { get: () => error.stack });
|
|
1648
|
+
}
|
|
1647
1649
|
if (!$mol_promise_like(result)) {
|
|
1648
1650
|
this.track_cut();
|
|
1649
1651
|
}
|