mol_jsx_lib 0.0.832 → 0.0.834
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 -11
- package/node.js.map +1 -1
- package/node.mjs +11 -11
- package/node.test.js +11 -11
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.js +11 -11
- package/web.js.map +1 -1
- package/web.mjs +11 -11
package/node.mjs
CHANGED
|
@@ -1624,17 +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
|
-
Error.captureStackTrace(result);
|
|
1637
|
-
handled.add(result);
|
|
1633
|
+
result = result.then(put, put);
|
|
1638
1634
|
}
|
|
1639
1635
|
}
|
|
1640
1636
|
catch (error) {
|
|
@@ -1645,16 +1641,20 @@ var $;
|
|
|
1645
1641
|
result = new Error(String(error), { cause: error });
|
|
1646
1642
|
}
|
|
1647
1643
|
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
1648
|
-
result =
|
|
1644
|
+
result = result.finally(() => {
|
|
1649
1645
|
if (this.cache === result)
|
|
1650
1646
|
this.absorb();
|
|
1651
|
-
}), {
|
|
1652
|
-
destructor: result['destructor'] ?? (() => { })
|
|
1653
1647
|
});
|
|
1654
|
-
Error.captureStackTrace(result);
|
|
1655
|
-
handled.add(result);
|
|
1656
1648
|
}
|
|
1657
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
|
+
}
|
|
1658
1658
|
if (!$mol_promise_like(result)) {
|
|
1659
1659
|
this.track_cut();
|
|
1660
1660
|
}
|
package/node.test.js
CHANGED
|
@@ -1615,17 +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
|
-
Error.captureStackTrace(result);
|
|
1628
|
-
handled.add(result);
|
|
1624
|
+
result = result.then(put, put);
|
|
1629
1625
|
}
|
|
1630
1626
|
}
|
|
1631
1627
|
catch (error) {
|
|
@@ -1636,16 +1632,20 @@ var $;
|
|
|
1636
1632
|
result = new Error(String(error), { cause: error });
|
|
1637
1633
|
}
|
|
1638
1634
|
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
1639
|
-
result =
|
|
1635
|
+
result = result.finally(() => {
|
|
1640
1636
|
if (this.cache === result)
|
|
1641
1637
|
this.absorb();
|
|
1642
|
-
}), {
|
|
1643
|
-
destructor: result['destructor'] ?? (() => { })
|
|
1644
1638
|
});
|
|
1645
|
-
Error.captureStackTrace(result);
|
|
1646
|
-
handled.add(result);
|
|
1647
1639
|
}
|
|
1648
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
|
+
}
|
|
1649
1649
|
if (!$mol_promise_like(result)) {
|
|
1650
1650
|
this.track_cut();
|
|
1651
1651
|
}
|