mol_compare_deep 0.0.1469 → 0.0.1470
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.test.js +27 -26
- package/node.test.js.map +1 -1
- package/package.json +1 -1
package/node.test.js
CHANGED
|
@@ -683,29 +683,41 @@ var $;
|
|
|
683
683
|
|
|
684
684
|
;
|
|
685
685
|
"use strict";
|
|
686
|
-
var
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
return target.require(name);
|
|
693
|
-
if (name[0] === '.')
|
|
694
|
-
return target.require(name);
|
|
686
|
+
var $;
|
|
687
|
+
(function ($) {
|
|
688
|
+
const path = require('path');
|
|
689
|
+
const mod = require('module');
|
|
690
|
+
const localRequire = mod.createRequire(path.join(process.cwd(), 'package.json'));
|
|
691
|
+
function $node_autoinstall(name) {
|
|
695
692
|
try {
|
|
696
|
-
|
|
693
|
+
localRequire.resolve(name);
|
|
697
694
|
}
|
|
698
695
|
catch {
|
|
699
|
-
|
|
696
|
+
this.$mol_run.spawn({ command: ['npm', 'install', '--omit=dev', name], dir: '.' });
|
|
700
697
|
try {
|
|
701
|
-
|
|
698
|
+
this.$mol_run.spawn({ command: ['npm', 'install', '--omit=dev', '@types/' + name], dir: '.' });
|
|
702
699
|
}
|
|
703
700
|
catch (e) {
|
|
704
|
-
if (
|
|
705
|
-
|
|
706
|
-
|
|
701
|
+
if (this.$mol_promise_like(e))
|
|
702
|
+
this.$mol_fail_hidden(e);
|
|
703
|
+
this.$mol_fail_log(e);
|
|
707
704
|
}
|
|
708
705
|
}
|
|
706
|
+
}
|
|
707
|
+
$.$node_autoinstall = $node_autoinstall;
|
|
708
|
+
})($ || ($ = {}));
|
|
709
|
+
|
|
710
|
+
;
|
|
711
|
+
"use strict";
|
|
712
|
+
var $node = new Proxy({ require }, {
|
|
713
|
+
get(target, name, wrapper) {
|
|
714
|
+
if (target[name])
|
|
715
|
+
return target[name];
|
|
716
|
+
if ($.$node_internal_check(name))
|
|
717
|
+
return target.require(name);
|
|
718
|
+
if (name[0] === '.')
|
|
719
|
+
return target.require(name);
|
|
720
|
+
$.$node_autoinstall(name);
|
|
709
721
|
return target.require(name);
|
|
710
722
|
},
|
|
711
723
|
set(target, name, value) {
|
|
@@ -713,7 +725,6 @@ var $node = new Proxy({ require }, {
|
|
|
713
725
|
return true;
|
|
714
726
|
},
|
|
715
727
|
});
|
|
716
|
-
const cache = new Map();
|
|
717
728
|
require = (req => Object.assign(function require(name) {
|
|
718
729
|
return $node[name];
|
|
719
730
|
}, req))(require);
|
|
@@ -3276,16 +3287,6 @@ var $;
|
|
|
3276
3287
|
});
|
|
3277
3288
|
})($ || ($ = {}));
|
|
3278
3289
|
|
|
3279
|
-
;
|
|
3280
|
-
"use strict";
|
|
3281
|
-
var $;
|
|
3282
|
-
(function ($) {
|
|
3283
|
-
function $mol_exec(dir, command, ...args) {
|
|
3284
|
-
return this.$mol_run.spawn({ command: [command, ...args], dir });
|
|
3285
|
-
}
|
|
3286
|
-
$.$mol_exec = $mol_exec;
|
|
3287
|
-
})($ || ($ = {}));
|
|
3288
|
-
|
|
3289
3290
|
;
|
|
3290
3291
|
"use strict";
|
|
3291
3292
|
var $;
|