mol_plot_all 1.2.967 → 1.2.968

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 CHANGED
@@ -1943,32 +1943,6 @@ 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
-
1972
1946
  ;
1973
1947
  "use strict";
1974
1948
  var $node = new Proxy({ require }, {
@@ -2000,11 +1974,14 @@ var $node = new Proxy({ require }, {
2000
1974
  }
2001
1975
  }
2002
1976
  try {
2003
- return $.$mol_wire_sync(target).require(name);
1977
+ return target.require(name);
2004
1978
  }
2005
1979
  catch (error) {
2006
1980
  if (error.code === 'ERR_REQUIRE_ESM') {
2007
- return importSync(name);
1981
+ const module = cache.get(name);
1982
+ if (module)
1983
+ return module;
1984
+ throw import(name).then(module => cache.set(name, module));
2008
1985
  }
2009
1986
  $.$mol_fail_log(error);
2010
1987
  return null;
@@ -2015,8 +1992,7 @@ var $node = new Proxy({ require }, {
2015
1992
  return true;
2016
1993
  },
2017
1994
  });
2018
- const importAsync = async (uri) => import(uri);
2019
- const importSync = $.$mol_wire_sync(importAsync);
1995
+ const cache = new Map();
2020
1996
  require = (req => Object.assign(function require(name) {
2021
1997
  return $node[name];
2022
1998
  }, req))(require);