mol_plot_all 1.2.964 → 1.2.966
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 +102 -90
- package/node.d.ts.map +1 -1
- package/node.deps.json +1 -1
- package/node.js +33 -2
- package/node.js.map +1 -1
- package/node.mjs +33 -2
- package/node.test.js +88 -83
- package/node.test.js.map +1 -1
- package/package.json +2 -1
- package/web.d.ts +90 -90
- package/web.js +1 -1
- package/web.js.map +1 -1
- package/web.mjs +1 -1
package/node.js
CHANGED
|
@@ -817,7 +817,7 @@ var $;
|
|
|
817
817
|
destructor: result['destructor'] ?? (() => { })
|
|
818
818
|
});
|
|
819
819
|
handled.add(result);
|
|
820
|
-
const error = new Error();
|
|
820
|
+
const error = new Error(`Promise in ${this}`);
|
|
821
821
|
Object.defineProperty(result, 'stack', { get: () => error.stack });
|
|
822
822
|
}
|
|
823
823
|
if (!$mol_promise_like(result)) {
|
|
@@ -1943,6 +1943,32 @@ var $;
|
|
|
1943
1943
|
;
|
|
1944
1944
|
"use strict";
|
|
1945
1945
|
|
|
1946
|
+
;
|
|
1947
|
+
"use strict";
|
|
1948
|
+
var $;
|
|
1949
|
+
(function ($) {
|
|
1950
|
+
function $mol_wire_sync(obj) {
|
|
1951
|
+
return new Proxy(obj, {
|
|
1952
|
+
get(obj, field) {
|
|
1953
|
+
const val = obj[field];
|
|
1954
|
+
if (typeof val !== 'function')
|
|
1955
|
+
return val;
|
|
1956
|
+
const temp = $mol_wire_task.getter(val);
|
|
1957
|
+
return function $mol_wire_sync(...args) {
|
|
1958
|
+
const fiber = temp(obj, args);
|
|
1959
|
+
return fiber.sync();
|
|
1960
|
+
};
|
|
1961
|
+
},
|
|
1962
|
+
apply(obj, self, args) {
|
|
1963
|
+
const temp = $mol_wire_task.getter(obj);
|
|
1964
|
+
const fiber = temp(self, args);
|
|
1965
|
+
return fiber.sync();
|
|
1966
|
+
},
|
|
1967
|
+
});
|
|
1968
|
+
}
|
|
1969
|
+
$.$mol_wire_sync = $mol_wire_sync;
|
|
1970
|
+
})($ || ($ = {}));
|
|
1971
|
+
|
|
1946
1972
|
;
|
|
1947
1973
|
"use strict";
|
|
1948
1974
|
var $node = new Proxy({ require }, {
|
|
@@ -1974,9 +2000,12 @@ var $node = new Proxy({ require }, {
|
|
|
1974
2000
|
}
|
|
1975
2001
|
}
|
|
1976
2002
|
try {
|
|
1977
|
-
return target.require(name);
|
|
2003
|
+
return $.$mol_wire_sync(target).require(name);
|
|
1978
2004
|
}
|
|
1979
2005
|
catch (error) {
|
|
2006
|
+
if (error.code === 'ERR_REQUIRE_ESM') {
|
|
2007
|
+
return importSync(name);
|
|
2008
|
+
}
|
|
1980
2009
|
$.$mol_fail_log(error);
|
|
1981
2010
|
return null;
|
|
1982
2011
|
}
|
|
@@ -1986,6 +2015,8 @@ var $node = new Proxy({ require }, {
|
|
|
1986
2015
|
return true;
|
|
1987
2016
|
},
|
|
1988
2017
|
});
|
|
2018
|
+
const importAsync = async (uri) => import(uri);
|
|
2019
|
+
const importSync = $.$mol_wire_sync(importAsync);
|
|
1989
2020
|
require = (req => Object.assign(function require(name) {
|
|
1990
2021
|
return $node[name];
|
|
1991
2022
|
}, req))(require);
|