mam 1.11.814 → 1.11.816
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 +5 -6
- package/node.d.ts.map +1 -1
- package/node.deps.json +1 -1
- package/node.js +29 -28
- package/node.js.map +1 -1
- package/node.mjs +29 -28
- package/node.test.js +29 -28
- package/node.test.js.map +1 -1
- package/package.json +3 -2
package/node.mjs
CHANGED
|
@@ -2435,29 +2435,41 @@ var $;
|
|
|
2435
2435
|
|
|
2436
2436
|
;
|
|
2437
2437
|
"use strict";
|
|
2438
|
-
var
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
return target.require(name);
|
|
2445
|
-
if (name[0] === '.')
|
|
2446
|
-
return target.require(name);
|
|
2438
|
+
var $;
|
|
2439
|
+
(function ($) {
|
|
2440
|
+
const path = require('path');
|
|
2441
|
+
const mod = require('module');
|
|
2442
|
+
const localRequire = mod.createRequire(path.join(process.cwd(), 'package.json'));
|
|
2443
|
+
function $node_autoinstall(name) {
|
|
2447
2444
|
try {
|
|
2448
|
-
|
|
2445
|
+
localRequire.resolve(name);
|
|
2449
2446
|
}
|
|
2450
2447
|
catch {
|
|
2451
|
-
|
|
2448
|
+
this.$mol_run.spawn({ command: ['npm', 'install', '--omit=dev', name], dir: '.' });
|
|
2452
2449
|
try {
|
|
2453
|
-
|
|
2450
|
+
this.$mol_run.spawn({ command: ['npm', 'install', '--omit=dev', '@types/' + name], dir: '.' });
|
|
2454
2451
|
}
|
|
2455
2452
|
catch (e) {
|
|
2456
|
-
if (
|
|
2457
|
-
|
|
2458
|
-
|
|
2453
|
+
if (this.$mol_promise_like(e))
|
|
2454
|
+
this.$mol_fail_hidden(e);
|
|
2455
|
+
this.$mol_fail_log(e);
|
|
2459
2456
|
}
|
|
2460
2457
|
}
|
|
2458
|
+
}
|
|
2459
|
+
$.$node_autoinstall = $node_autoinstall;
|
|
2460
|
+
})($ || ($ = {}));
|
|
2461
|
+
|
|
2462
|
+
;
|
|
2463
|
+
"use strict";
|
|
2464
|
+
var $node = new Proxy({ require }, {
|
|
2465
|
+
get(target, name, wrapper) {
|
|
2466
|
+
if (target[name])
|
|
2467
|
+
return target[name];
|
|
2468
|
+
if ($.$node_internal_check(name))
|
|
2469
|
+
return target.require(name);
|
|
2470
|
+
if (name[0] === '.')
|
|
2471
|
+
return target.require(name);
|
|
2472
|
+
$.$node_autoinstall(name);
|
|
2461
2473
|
return target.require(name);
|
|
2462
2474
|
},
|
|
2463
2475
|
set(target, name, value) {
|
|
@@ -2465,7 +2477,6 @@ var $node = new Proxy({ require: require('node:module').createRequire(process.cw
|
|
|
2465
2477
|
return true;
|
|
2466
2478
|
},
|
|
2467
2479
|
});
|
|
2468
|
-
const cache = new Map();
|
|
2469
2480
|
require = (req => Object.assign(function require(name) {
|
|
2470
2481
|
return $node[name];
|
|
2471
2482
|
}, req))(require);
|
|
@@ -2676,16 +2687,6 @@ var $;
|
|
|
2676
2687
|
$.$mol_run = $mol_run;
|
|
2677
2688
|
})($ || ($ = {}));
|
|
2678
2689
|
|
|
2679
|
-
;
|
|
2680
|
-
"use strict";
|
|
2681
|
-
var $;
|
|
2682
|
-
(function ($) {
|
|
2683
|
-
function $mol_exec(dir, command, ...args) {
|
|
2684
|
-
return this.$mol_run.spawn({ command: [command, ...args], dir });
|
|
2685
|
-
}
|
|
2686
|
-
$.$mol_exec = $mol_exec;
|
|
2687
|
-
})($ || ($ = {}));
|
|
2688
|
-
|
|
2689
2690
|
;
|
|
2690
2691
|
"use strict";
|
|
2691
2692
|
var $;
|
|
@@ -5957,12 +5958,12 @@ var $;
|
|
|
5957
5958
|
if ([node, node_modules].includes(parent)
|
|
5958
5959
|
&& mod.name() !== 'node'
|
|
5959
5960
|
&& !mod.name().startsWith('@')) {
|
|
5960
|
-
|
|
5961
|
+
this.$.$node_autoinstall(mod.name());
|
|
5961
5962
|
return true;
|
|
5962
5963
|
}
|
|
5963
5964
|
if ([node, node_modules].includes(parent.parent())
|
|
5964
5965
|
&& parent.name().startsWith('@')) {
|
|
5965
|
-
|
|
5966
|
+
this.$.$node_autoinstall(`${parent.name()}/${mod.name()}`);
|
|
5966
5967
|
return true;
|
|
5967
5968
|
}
|
|
5968
5969
|
return false;
|
package/node.test.js
CHANGED
|
@@ -2426,29 +2426,41 @@ var $;
|
|
|
2426
2426
|
|
|
2427
2427
|
;
|
|
2428
2428
|
"use strict";
|
|
2429
|
-
var
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
return target.require(name);
|
|
2436
|
-
if (name[0] === '.')
|
|
2437
|
-
return target.require(name);
|
|
2429
|
+
var $;
|
|
2430
|
+
(function ($) {
|
|
2431
|
+
const path = require('path');
|
|
2432
|
+
const mod = require('module');
|
|
2433
|
+
const localRequire = mod.createRequire(path.join(process.cwd(), 'package.json'));
|
|
2434
|
+
function $node_autoinstall(name) {
|
|
2438
2435
|
try {
|
|
2439
|
-
|
|
2436
|
+
localRequire.resolve(name);
|
|
2440
2437
|
}
|
|
2441
2438
|
catch {
|
|
2442
|
-
|
|
2439
|
+
this.$mol_run.spawn({ command: ['npm', 'install', '--omit=dev', name], dir: '.' });
|
|
2443
2440
|
try {
|
|
2444
|
-
|
|
2441
|
+
this.$mol_run.spawn({ command: ['npm', 'install', '--omit=dev', '@types/' + name], dir: '.' });
|
|
2445
2442
|
}
|
|
2446
2443
|
catch (e) {
|
|
2447
|
-
if (
|
|
2448
|
-
|
|
2449
|
-
|
|
2444
|
+
if (this.$mol_promise_like(e))
|
|
2445
|
+
this.$mol_fail_hidden(e);
|
|
2446
|
+
this.$mol_fail_log(e);
|
|
2450
2447
|
}
|
|
2451
2448
|
}
|
|
2449
|
+
}
|
|
2450
|
+
$.$node_autoinstall = $node_autoinstall;
|
|
2451
|
+
})($ || ($ = {}));
|
|
2452
|
+
|
|
2453
|
+
;
|
|
2454
|
+
"use strict";
|
|
2455
|
+
var $node = new Proxy({ require }, {
|
|
2456
|
+
get(target, name, wrapper) {
|
|
2457
|
+
if (target[name])
|
|
2458
|
+
return target[name];
|
|
2459
|
+
if ($.$node_internal_check(name))
|
|
2460
|
+
return target.require(name);
|
|
2461
|
+
if (name[0] === '.')
|
|
2462
|
+
return target.require(name);
|
|
2463
|
+
$.$node_autoinstall(name);
|
|
2452
2464
|
return target.require(name);
|
|
2453
2465
|
},
|
|
2454
2466
|
set(target, name, value) {
|
|
@@ -2456,7 +2468,6 @@ var $node = new Proxy({ require: require('node:module').createRequire(process.cw
|
|
|
2456
2468
|
return true;
|
|
2457
2469
|
},
|
|
2458
2470
|
});
|
|
2459
|
-
const cache = new Map();
|
|
2460
2471
|
require = (req => Object.assign(function require(name) {
|
|
2461
2472
|
return $node[name];
|
|
2462
2473
|
}, req))(require);
|
|
@@ -2667,16 +2678,6 @@ var $;
|
|
|
2667
2678
|
$.$mol_run = $mol_run;
|
|
2668
2679
|
})($ || ($ = {}));
|
|
2669
2680
|
|
|
2670
|
-
;
|
|
2671
|
-
"use strict";
|
|
2672
|
-
var $;
|
|
2673
|
-
(function ($) {
|
|
2674
|
-
function $mol_exec(dir, command, ...args) {
|
|
2675
|
-
return this.$mol_run.spawn({ command: [command, ...args], dir });
|
|
2676
|
-
}
|
|
2677
|
-
$.$mol_exec = $mol_exec;
|
|
2678
|
-
})($ || ($ = {}));
|
|
2679
|
-
|
|
2680
2681
|
;
|
|
2681
2682
|
"use strict";
|
|
2682
2683
|
var $;
|
|
@@ -5948,12 +5949,12 @@ var $;
|
|
|
5948
5949
|
if ([node, node_modules].includes(parent)
|
|
5949
5950
|
&& mod.name() !== 'node'
|
|
5950
5951
|
&& !mod.name().startsWith('@')) {
|
|
5951
|
-
|
|
5952
|
+
this.$.$node_autoinstall(mod.name());
|
|
5952
5953
|
return true;
|
|
5953
5954
|
}
|
|
5954
5955
|
if ([node, node_modules].includes(parent.parent())
|
|
5955
5956
|
&& parent.name().startsWith('@')) {
|
|
5956
|
-
|
|
5957
|
+
this.$.$node_autoinstall(`${parent.name()}/${mod.name()}`);
|
|
5957
5958
|
return true;
|
|
5958
5959
|
}
|
|
5959
5960
|
return false;
|