mol_plot_all 1.2.961 → 1.2.962
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.d.ts +90 -90
- 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.d.ts +90 -90
- package/web.js +11 -11
- package/web.js.map +1 -1
- package/web.mjs +11 -11
package/node.mjs
CHANGED
|
@@ -789,17 +789,13 @@ var $;
|
|
|
789
789
|
result = this.task.call(this.host, ...this.args);
|
|
790
790
|
break;
|
|
791
791
|
}
|
|
792
|
-
if ($mol_promise_like(result)) {
|
|
792
|
+
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
793
793
|
const put = (res) => {
|
|
794
794
|
if (this.cache === result)
|
|
795
795
|
this.put(res);
|
|
796
796
|
return res;
|
|
797
797
|
};
|
|
798
|
-
result =
|
|
799
|
-
destructor: result['destructor'] ?? (() => { })
|
|
800
|
-
});
|
|
801
|
-
Error.captureStackTrace(result);
|
|
802
|
-
handled.add(result);
|
|
798
|
+
result = result.then(put, put);
|
|
803
799
|
}
|
|
804
800
|
}
|
|
805
801
|
catch (error) {
|
|
@@ -810,16 +806,20 @@ var $;
|
|
|
810
806
|
result = new Error(String(error), { cause: error });
|
|
811
807
|
}
|
|
812
808
|
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
813
|
-
result =
|
|
809
|
+
result = result.finally(() => {
|
|
814
810
|
if (this.cache === result)
|
|
815
811
|
this.absorb();
|
|
816
|
-
}), {
|
|
817
|
-
destructor: result['destructor'] ?? (() => { })
|
|
818
812
|
});
|
|
819
|
-
Error.captureStackTrace(result);
|
|
820
|
-
handled.add(result);
|
|
821
813
|
}
|
|
822
814
|
}
|
|
815
|
+
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
816
|
+
result = Object.assign(result, {
|
|
817
|
+
destructor: result['destructor'] ?? (() => { })
|
|
818
|
+
});
|
|
819
|
+
handled.add(result);
|
|
820
|
+
const error = new Error();
|
|
821
|
+
Object.defineProperty(result, 'stack', { get: () => error.stack });
|
|
822
|
+
}
|
|
823
823
|
if (!$mol_promise_like(result)) {
|
|
824
824
|
this.track_cut();
|
|
825
825
|
}
|
package/node.test.js
CHANGED
|
@@ -780,17 +780,13 @@ var $;
|
|
|
780
780
|
result = this.task.call(this.host, ...this.args);
|
|
781
781
|
break;
|
|
782
782
|
}
|
|
783
|
-
if ($mol_promise_like(result)) {
|
|
783
|
+
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
784
784
|
const put = (res) => {
|
|
785
785
|
if (this.cache === result)
|
|
786
786
|
this.put(res);
|
|
787
787
|
return res;
|
|
788
788
|
};
|
|
789
|
-
result =
|
|
790
|
-
destructor: result['destructor'] ?? (() => { })
|
|
791
|
-
});
|
|
792
|
-
Error.captureStackTrace(result);
|
|
793
|
-
handled.add(result);
|
|
789
|
+
result = result.then(put, put);
|
|
794
790
|
}
|
|
795
791
|
}
|
|
796
792
|
catch (error) {
|
|
@@ -801,16 +797,20 @@ var $;
|
|
|
801
797
|
result = new Error(String(error), { cause: error });
|
|
802
798
|
}
|
|
803
799
|
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
804
|
-
result =
|
|
800
|
+
result = result.finally(() => {
|
|
805
801
|
if (this.cache === result)
|
|
806
802
|
this.absorb();
|
|
807
|
-
}), {
|
|
808
|
-
destructor: result['destructor'] ?? (() => { })
|
|
809
803
|
});
|
|
810
|
-
Error.captureStackTrace(result);
|
|
811
|
-
handled.add(result);
|
|
812
804
|
}
|
|
813
805
|
}
|
|
806
|
+
if ($mol_promise_like(result) && !handled.has(result)) {
|
|
807
|
+
result = Object.assign(result, {
|
|
808
|
+
destructor: result['destructor'] ?? (() => { })
|
|
809
|
+
});
|
|
810
|
+
handled.add(result);
|
|
811
|
+
const error = new Error();
|
|
812
|
+
Object.defineProperty(result, 'stack', { get: () => error.stack });
|
|
813
|
+
}
|
|
814
814
|
if (!$mol_promise_like(result)) {
|
|
815
815
|
this.track_cut();
|
|
816
816
|
}
|