@modern-js/repo-generator 0.0.0-next-20221206083411 → 0.0.0-next-20221206090411
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/dist/index.js +90 -78
- package/package.json +14 -11
package/dist/index.js
CHANGED
|
@@ -28,6 +28,7 @@ var import_path2 = __toESM(require("path"));
|
|
|
28
28
|
var import_path3 = __toESM(require("path"));
|
|
29
29
|
var import_path4 = __toESM(require("path"));
|
|
30
30
|
var import_path5 = __toESM(require("path"));
|
|
31
|
+
var import_vm2 = require("vm2");
|
|
31
32
|
var __create2 = Object.create;
|
|
32
33
|
var __defProp2 = Object.defineProperty;
|
|
33
34
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -616,8 +617,8 @@ var require_lodash = __commonJSMin((exports, module2) => {
|
|
|
616
617
|
return object[key];
|
|
617
618
|
});
|
|
618
619
|
}
|
|
619
|
-
function cacheHas(
|
|
620
|
-
return
|
|
620
|
+
function cacheHas(cache2, key) {
|
|
621
|
+
return cache2.has(key);
|
|
621
622
|
}
|
|
622
623
|
function charsStartIndex(strSymbols, chrSymbols) {
|
|
623
624
|
var index = -1, length = strSymbols.length;
|
|
@@ -1390,8 +1391,8 @@ var require_lodash = __commonJSMin((exports, module2) => {
|
|
|
1390
1391
|
if (!(seen ? cacheHas(seen, computed2) : includes2(result2, computed2, comparator))) {
|
|
1391
1392
|
othIndex = othLength;
|
|
1392
1393
|
while (--othIndex) {
|
|
1393
|
-
var
|
|
1394
|
-
if (!(
|
|
1394
|
+
var cache2 = caches[othIndex];
|
|
1395
|
+
if (!(cache2 ? cacheHas(cache2, computed2) : includes2(arrays[othIndex], computed2, comparator))) {
|
|
1395
1396
|
continue outer;
|
|
1396
1397
|
}
|
|
1397
1398
|
}
|
|
@@ -2943,12 +2944,12 @@ var require_lodash = __commonJSMin((exports, module2) => {
|
|
|
2943
2944
|
}
|
|
2944
2945
|
function memoizeCapped(func) {
|
|
2945
2946
|
var result2 = memoize(func, function(key) {
|
|
2946
|
-
if (
|
|
2947
|
-
|
|
2947
|
+
if (cache2.size === MAX_MEMOIZE_SIZE) {
|
|
2948
|
+
cache2.clear();
|
|
2948
2949
|
}
|
|
2949
2950
|
return key;
|
|
2950
2951
|
});
|
|
2951
|
-
var
|
|
2952
|
+
var cache2 = result2.cache;
|
|
2952
2953
|
return result2;
|
|
2953
2954
|
}
|
|
2954
2955
|
function mergeData(data, source) {
|
|
@@ -3902,12 +3903,12 @@ var require_lodash = __commonJSMin((exports, module2) => {
|
|
|
3902
3903
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
3903
3904
|
}
|
|
3904
3905
|
var memoized = function() {
|
|
3905
|
-
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0],
|
|
3906
|
-
if (
|
|
3907
|
-
return
|
|
3906
|
+
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache2 = memoized.cache;
|
|
3907
|
+
if (cache2.has(key)) {
|
|
3908
|
+
return cache2.get(key);
|
|
3908
3909
|
}
|
|
3909
3910
|
var result2 = func.apply(this, args);
|
|
3910
|
-
memoized.cache =
|
|
3911
|
+
memoized.cache = cache2.set(key, result2) || cache2;
|
|
3911
3912
|
return result2;
|
|
3912
3913
|
};
|
|
3913
3914
|
memoized.cache = new (memoize.Cache || MapCache)();
|
|
@@ -35572,15 +35573,15 @@ var require_runtimeExports = __commonJSMin((exports) => {
|
|
|
35572
35573
|
var compiled_1 = require_compiled();
|
|
35573
35574
|
var path_2 = require_path();
|
|
35574
35575
|
var memo = (fn) => {
|
|
35575
|
-
const
|
|
35576
|
+
const cache2 = /* @__PURE__ */ new Map();
|
|
35576
35577
|
return (...params) => {
|
|
35577
35578
|
const stringifiedParams = JSON.stringify(params);
|
|
35578
|
-
const cachedResult =
|
|
35579
|
+
const cachedResult = cache2.get(stringifiedParams);
|
|
35579
35580
|
if (cachedResult) {
|
|
35580
35581
|
return cachedResult;
|
|
35581
35582
|
}
|
|
35582
35583
|
const res = fn(...params);
|
|
35583
|
-
|
|
35584
|
+
cache2.set(stringifiedParams, res);
|
|
35584
35585
|
return res;
|
|
35585
35586
|
};
|
|
35586
35587
|
};
|
|
@@ -43727,7 +43728,7 @@ var require_parse = __commonJSMin((exports, module2) => {
|
|
|
43727
43728
|
var require_repeat_string = __commonJSMin((exports, module2) => {
|
|
43728
43729
|
"use strict";
|
|
43729
43730
|
var res = "";
|
|
43730
|
-
var
|
|
43731
|
+
var cache2;
|
|
43731
43732
|
module2.exports = repeat;
|
|
43732
43733
|
function repeat(str, num) {
|
|
43733
43734
|
if (typeof str !== "string") {
|
|
@@ -43738,8 +43739,8 @@ var require_repeat_string = __commonJSMin((exports, module2) => {
|
|
|
43738
43739
|
if (num === 2)
|
|
43739
43740
|
return str + str;
|
|
43740
43741
|
var max = str.length * num;
|
|
43741
|
-
if (
|
|
43742
|
-
|
|
43742
|
+
if (cache2 !== str || typeof cache2 === "undefined") {
|
|
43743
|
+
cache2 = str;
|
|
43743
43744
|
res = "";
|
|
43744
43745
|
} else if (res.length >= max) {
|
|
43745
43746
|
return res.substr(0, max);
|
|
@@ -51302,8 +51303,8 @@ var require_mkdir = __commonJSMin((exports, module2) => {
|
|
|
51302
51303
|
return "CwdError";
|
|
51303
51304
|
}
|
|
51304
51305
|
};
|
|
51305
|
-
var cGet = (
|
|
51306
|
-
var cSet = (
|
|
51306
|
+
var cGet = (cache2, key) => cache2.get(normPath(key));
|
|
51307
|
+
var cSet = (cache2, key, val) => cache2.set(normPath(key), val);
|
|
51307
51308
|
var checkCwd = (dir, cb) => {
|
|
51308
51309
|
fs4.stat(dir, (er, st) => {
|
|
51309
51310
|
if (er || !st.isDirectory())
|
|
@@ -51321,13 +51322,13 @@ var require_mkdir = __commonJSMin((exports, module2) => {
|
|
|
51321
51322
|
const doChown = typeof uid2 === "number" && typeof gid === "number" && (uid2 !== opt.processUid || gid !== opt.processGid);
|
|
51322
51323
|
const preserve = opt.preserve;
|
|
51323
51324
|
const unlink = opt.unlink;
|
|
51324
|
-
const
|
|
51325
|
+
const cache2 = opt.cache;
|
|
51325
51326
|
const cwd = normPath(opt.cwd);
|
|
51326
51327
|
const done = (er, created) => {
|
|
51327
51328
|
if (er)
|
|
51328
51329
|
cb(er);
|
|
51329
51330
|
else {
|
|
51330
|
-
cSet(
|
|
51331
|
+
cSet(cache2, dir, true);
|
|
51331
51332
|
if (created && doChown)
|
|
51332
51333
|
chownr(created, uid2, gid, (er2) => done(er2));
|
|
51333
51334
|
else if (needChmod)
|
|
@@ -51336,7 +51337,7 @@ var require_mkdir = __commonJSMin((exports, module2) => {
|
|
|
51336
51337
|
cb();
|
|
51337
51338
|
}
|
|
51338
51339
|
};
|
|
51339
|
-
if (
|
|
51340
|
+
if (cache2 && cGet(cache2, dir) === true)
|
|
51340
51341
|
return done();
|
|
51341
51342
|
if (dir === cwd)
|
|
51342
51343
|
return checkCwd(dir, done);
|
|
@@ -51344,30 +51345,30 @@ var require_mkdir = __commonJSMin((exports, module2) => {
|
|
|
51344
51345
|
return mkdirp(dir, { mode }).then((made) => done(null, made), done);
|
|
51345
51346
|
const sub = normPath(path6.relative(cwd, dir));
|
|
51346
51347
|
const parts = sub.split("/");
|
|
51347
|
-
mkdir_(cwd, parts, mode,
|
|
51348
|
+
mkdir_(cwd, parts, mode, cache2, unlink, cwd, null, done);
|
|
51348
51349
|
};
|
|
51349
|
-
var mkdir_ = (base, parts, mode,
|
|
51350
|
+
var mkdir_ = (base, parts, mode, cache2, unlink, cwd, created, cb) => {
|
|
51350
51351
|
if (!parts.length)
|
|
51351
51352
|
return cb(null, created);
|
|
51352
51353
|
const p = parts.shift();
|
|
51353
51354
|
const part = normPath(path6.resolve(base + "/" + p));
|
|
51354
|
-
if (cGet(
|
|
51355
|
-
return mkdir_(part, parts, mode,
|
|
51356
|
-
fs4.mkdir(part, mode, onmkdir(part, parts, mode,
|
|
51355
|
+
if (cGet(cache2, part))
|
|
51356
|
+
return mkdir_(part, parts, mode, cache2, unlink, cwd, created, cb);
|
|
51357
|
+
fs4.mkdir(part, mode, onmkdir(part, parts, mode, cache2, unlink, cwd, created, cb));
|
|
51357
51358
|
};
|
|
51358
|
-
var onmkdir = (part, parts, mode,
|
|
51359
|
+
var onmkdir = (part, parts, mode, cache2, unlink, cwd, created, cb) => (er) => {
|
|
51359
51360
|
if (er) {
|
|
51360
51361
|
fs4.lstat(part, (statEr, st) => {
|
|
51361
51362
|
if (statEr) {
|
|
51362
51363
|
statEr.path = statEr.path && normPath(statEr.path);
|
|
51363
51364
|
cb(statEr);
|
|
51364
51365
|
} else if (st.isDirectory())
|
|
51365
|
-
mkdir_(part, parts, mode,
|
|
51366
|
+
mkdir_(part, parts, mode, cache2, unlink, cwd, created, cb);
|
|
51366
51367
|
else if (unlink) {
|
|
51367
51368
|
fs4.unlink(part, (er2) => {
|
|
51368
51369
|
if (er2)
|
|
51369
51370
|
return cb(er2);
|
|
51370
|
-
fs4.mkdir(part, mode, onmkdir(part, parts, mode,
|
|
51371
|
+
fs4.mkdir(part, mode, onmkdir(part, parts, mode, cache2, unlink, cwd, created, cb));
|
|
51371
51372
|
});
|
|
51372
51373
|
} else if (st.isSymbolicLink())
|
|
51373
51374
|
return cb(new SymlinkError(part, part + "/" + parts.join("/")));
|
|
@@ -51376,7 +51377,7 @@ var require_mkdir = __commonJSMin((exports, module2) => {
|
|
|
51376
51377
|
});
|
|
51377
51378
|
} else {
|
|
51378
51379
|
created = created || part;
|
|
51379
|
-
mkdir_(part, parts, mode,
|
|
51380
|
+
mkdir_(part, parts, mode, cache2, unlink, cwd, created, cb);
|
|
51380
51381
|
}
|
|
51381
51382
|
};
|
|
51382
51383
|
var checkCwdSync = (dir) => {
|
|
@@ -51401,16 +51402,16 @@ var require_mkdir = __commonJSMin((exports, module2) => {
|
|
|
51401
51402
|
const doChown = typeof uid2 === "number" && typeof gid === "number" && (uid2 !== opt.processUid || gid !== opt.processGid);
|
|
51402
51403
|
const preserve = opt.preserve;
|
|
51403
51404
|
const unlink = opt.unlink;
|
|
51404
|
-
const
|
|
51405
|
+
const cache2 = opt.cache;
|
|
51405
51406
|
const cwd = normPath(opt.cwd);
|
|
51406
51407
|
const done = (created2) => {
|
|
51407
|
-
cSet(
|
|
51408
|
+
cSet(cache2, dir, true);
|
|
51408
51409
|
if (created2 && doChown)
|
|
51409
51410
|
chownr.sync(created2, uid2, gid);
|
|
51410
51411
|
if (needChmod)
|
|
51411
51412
|
fs4.chmodSync(dir, mode);
|
|
51412
51413
|
};
|
|
51413
|
-
if (
|
|
51414
|
+
if (cache2 && cGet(cache2, dir) === true)
|
|
51414
51415
|
return done();
|
|
51415
51416
|
if (dir === cwd) {
|
|
51416
51417
|
checkCwdSync(cwd);
|
|
@@ -51423,22 +51424,22 @@ var require_mkdir = __commonJSMin((exports, module2) => {
|
|
|
51423
51424
|
let created = null;
|
|
51424
51425
|
for (let p = parts.shift(), part = cwd; p && (part += "/" + p); p = parts.shift()) {
|
|
51425
51426
|
part = normPath(path6.resolve(part));
|
|
51426
|
-
if (cGet(
|
|
51427
|
+
if (cGet(cache2, part))
|
|
51427
51428
|
continue;
|
|
51428
51429
|
try {
|
|
51429
51430
|
fs4.mkdirSync(part, mode);
|
|
51430
51431
|
created = created || part;
|
|
51431
|
-
cSet(
|
|
51432
|
+
cSet(cache2, part, true);
|
|
51432
51433
|
} catch (er) {
|
|
51433
51434
|
const st = fs4.lstatSync(part);
|
|
51434
51435
|
if (st.isDirectory()) {
|
|
51435
|
-
cSet(
|
|
51436
|
+
cSet(cache2, part, true);
|
|
51436
51437
|
continue;
|
|
51437
51438
|
} else if (unlink) {
|
|
51438
51439
|
fs4.unlinkSync(part);
|
|
51439
51440
|
fs4.mkdirSync(part, mode);
|
|
51440
51441
|
created = created || part;
|
|
51441
|
-
cSet(
|
|
51442
|
+
cSet(cache2, part, true);
|
|
51442
51443
|
continue;
|
|
51443
51444
|
} else if (st.isSymbolicLink())
|
|
51444
51445
|
return new SymlinkError(part, part + "/" + parts.join("/"));
|
|
@@ -51628,17 +51629,17 @@ var require_unpack = __commonJSMin((exports, module2) => {
|
|
|
51628
51629
|
};
|
|
51629
51630
|
var uint32 = (a, b, c) => a === a >>> 0 ? a : b === b >>> 0 ? b : c;
|
|
51630
51631
|
var cacheKeyNormalize = (path7) => normalize(stripSlash(normPath(path7))).toLowerCase();
|
|
51631
|
-
var pruneCache = (
|
|
51632
|
+
var pruneCache = (cache2, abs) => {
|
|
51632
51633
|
abs = cacheKeyNormalize(abs);
|
|
51633
|
-
for (const path7 of
|
|
51634
|
+
for (const path7 of cache2.keys()) {
|
|
51634
51635
|
const pnorm = cacheKeyNormalize(path7);
|
|
51635
51636
|
if (pnorm === abs || pnorm.indexOf(abs + "/") === 0)
|
|
51636
|
-
|
|
51637
|
+
cache2.delete(path7);
|
|
51637
51638
|
}
|
|
51638
51639
|
};
|
|
51639
|
-
var dropCache = (
|
|
51640
|
-
for (const key of
|
|
51641
|
-
|
|
51640
|
+
var dropCache = (cache2) => {
|
|
51641
|
+
for (const key of cache2.keys())
|
|
51642
|
+
cache2.delete(key);
|
|
51642
51643
|
};
|
|
51643
51644
|
var Unpack = class extends Parser2 {
|
|
51644
51645
|
constructor(opt) {
|
|
@@ -61671,9 +61672,9 @@ var init_esm = __esmMin(() => {
|
|
|
61671
61672
|
};
|
|
61672
61673
|
this.includes = function(pattern) {
|
|
61673
61674
|
var _a3 = Path2.parse(pattern), entire2 = _a3.entire, segments2 = _a3.segments, isMatchPattern2 = _a3.isMatchPattern;
|
|
61674
|
-
var
|
|
61675
|
-
if (
|
|
61676
|
-
return
|
|
61675
|
+
var cache2 = _this.includesCache.get(entire2);
|
|
61676
|
+
if (cache2 !== void 0)
|
|
61677
|
+
return cache2;
|
|
61677
61678
|
var cacheWith = function(value) {
|
|
61678
61679
|
_this.includesCache.set(entire2, value);
|
|
61679
61680
|
return value;
|
|
@@ -61711,12 +61712,12 @@ var init_esm = __esmMin(() => {
|
|
|
61711
61712
|
this.match = function(pattern) {
|
|
61712
61713
|
var _a3, _b;
|
|
61713
61714
|
var path6 = Path2.parse(pattern);
|
|
61714
|
-
var
|
|
61715
|
-
if (
|
|
61716
|
-
if (
|
|
61717
|
-
_this.matchScore =
|
|
61715
|
+
var cache2 = _this.matchCache.get(path6.entire);
|
|
61716
|
+
if (cache2 !== void 0) {
|
|
61717
|
+
if (cache2.record && cache2.record.score !== void 0) {
|
|
61718
|
+
_this.matchScore = cache2.record.score;
|
|
61718
61719
|
}
|
|
61719
|
-
return
|
|
61720
|
+
return cache2.matched;
|
|
61720
61721
|
}
|
|
61721
61722
|
var cacheWith = function(value) {
|
|
61722
61723
|
_this.matchCache.set(path6.entire, value);
|
|
@@ -63304,13 +63305,13 @@ function getPropertyDescriptorCache(obj, key) {
|
|
|
63304
63305
|
var constructor = obj.constructor;
|
|
63305
63306
|
if (constructor === Object || constructor === Array)
|
|
63306
63307
|
return getPropertyDescriptor(obj, key);
|
|
63307
|
-
var
|
|
63308
|
-
var descriptor =
|
|
63308
|
+
var cache2 = constructor[ClassDescriptorSymbol] || {};
|
|
63309
|
+
var descriptor = cache2[key];
|
|
63309
63310
|
if (descriptor)
|
|
63310
63311
|
return descriptor;
|
|
63311
63312
|
var newDesc = getPropertyDescriptor(obj, key);
|
|
63312
|
-
constructor[ClassDescriptorSymbol] =
|
|
63313
|
-
|
|
63313
|
+
constructor[ClassDescriptorSymbol] = cache2;
|
|
63314
|
+
cache2[key] = newDesc;
|
|
63314
63315
|
return newDesc;
|
|
63315
63316
|
}
|
|
63316
63317
|
function getPrototypeDescriptor(target, key, value) {
|
|
@@ -70487,12 +70488,12 @@ var require_memoize = __commonJSMin((exports, module2) => {
|
|
|
70487
70488
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
70488
70489
|
}
|
|
70489
70490
|
var memoized = function() {
|
|
70490
|
-
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0],
|
|
70491
|
-
if (
|
|
70492
|
-
return
|
|
70491
|
+
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache2 = memoized.cache;
|
|
70492
|
+
if (cache2.has(key)) {
|
|
70493
|
+
return cache2.get(key);
|
|
70493
70494
|
}
|
|
70494
70495
|
var result = func.apply(this, args);
|
|
70495
|
-
memoized.cache =
|
|
70496
|
+
memoized.cache = cache2.set(key, result) || cache2;
|
|
70496
70497
|
return result;
|
|
70497
70498
|
};
|
|
70498
70499
|
memoized.cache = new (memoize.Cache || MapCache)();
|
|
@@ -70506,12 +70507,12 @@ var require_memoizeCapped = __commonJSMin((exports, module2) => {
|
|
|
70506
70507
|
var MAX_MEMOIZE_SIZE = 500;
|
|
70507
70508
|
function memoizeCapped(func) {
|
|
70508
70509
|
var result = memoize(func, function(key) {
|
|
70509
|
-
if (
|
|
70510
|
-
|
|
70510
|
+
if (cache2.size === MAX_MEMOIZE_SIZE) {
|
|
70511
|
+
cache2.clear();
|
|
70511
70512
|
}
|
|
70512
70513
|
return key;
|
|
70513
70514
|
});
|
|
70514
|
-
var
|
|
70515
|
+
var cache2 = result.cache;
|
|
70515
70516
|
return result;
|
|
70516
70517
|
}
|
|
70517
70518
|
module2.exports = memoizeCapped;
|
|
@@ -81479,8 +81480,8 @@ var require_arraySome = __commonJSMin((exports, module2) => {
|
|
|
81479
81480
|
module2.exports = arraySome;
|
|
81480
81481
|
});
|
|
81481
81482
|
var require_cacheHas = __commonJSMin((exports, module2) => {
|
|
81482
|
-
function cacheHas(
|
|
81483
|
-
return
|
|
81483
|
+
function cacheHas(cache2, key) {
|
|
81484
|
+
return cache2.has(key);
|
|
81484
81485
|
}
|
|
81485
81486
|
module2.exports = cacheHas;
|
|
81486
81487
|
});
|
|
@@ -139498,15 +139499,15 @@ var require_runtimeExports2 = __commonJSMin((exports) => {
|
|
|
139498
139499
|
var compiled_1 = require_compiled2();
|
|
139499
139500
|
var path_2 = require_path2();
|
|
139500
139501
|
var memo = (fn) => {
|
|
139501
|
-
const
|
|
139502
|
+
const cache2 = /* @__PURE__ */ new Map();
|
|
139502
139503
|
return (...params) => {
|
|
139503
139504
|
const stringifiedParams = JSON.stringify(params);
|
|
139504
|
-
const cachedResult =
|
|
139505
|
+
const cachedResult = cache2.get(stringifiedParams);
|
|
139505
139506
|
if (cachedResult) {
|
|
139506
139507
|
return cachedResult;
|
|
139507
139508
|
}
|
|
139508
139509
|
const res = fn(...params);
|
|
139509
|
-
|
|
139510
|
+
cache2.set(stringifiedParams, res);
|
|
139510
139511
|
return res;
|
|
139511
139512
|
};
|
|
139512
139513
|
};
|
|
@@ -141635,9 +141636,9 @@ var require_node8 = __commonJSMin((exports) => {
|
|
|
141635
141636
|
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
141636
141637
|
return { default: obj };
|
|
141637
141638
|
}
|
|
141638
|
-
var
|
|
141639
|
-
if (
|
|
141640
|
-
return
|
|
141639
|
+
var cache2 = _getRequireWildcardCache(nodeInterop);
|
|
141640
|
+
if (cache2 && cache2.has(obj)) {
|
|
141641
|
+
return cache2.get(obj);
|
|
141641
141642
|
}
|
|
141642
141643
|
var newObj = {};
|
|
141643
141644
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
@@ -141652,8 +141653,8 @@ var require_node8 = __commonJSMin((exports) => {
|
|
|
141652
141653
|
}
|
|
141653
141654
|
}
|
|
141654
141655
|
newObj.default = obj;
|
|
141655
|
-
if (
|
|
141656
|
-
|
|
141656
|
+
if (cache2) {
|
|
141657
|
+
cache2.set(obj, newObj);
|
|
141657
141658
|
}
|
|
141658
141659
|
return newObj;
|
|
141659
141660
|
}
|
|
@@ -143320,9 +143321,20 @@ init_regeneratorRuntime();
|
|
|
143320
143321
|
init_asyncToGenerator();
|
|
143321
143322
|
var import_codesmith3 = __toESM2(require_node3());
|
|
143322
143323
|
var import_lodash8 = __toESM2(require_lodash2());
|
|
143323
|
-
|
|
143324
|
-
|
|
143325
|
-
|
|
143324
|
+
var cache = {};
|
|
143325
|
+
var vm = new import_vm2.NodeVM({
|
|
143326
|
+
console: "inherit",
|
|
143327
|
+
sandbox: {
|
|
143328
|
+
__cache: cache
|
|
143329
|
+
},
|
|
143330
|
+
require: {
|
|
143331
|
+
external: true,
|
|
143332
|
+
builtin: []
|
|
143333
|
+
}
|
|
143334
|
+
});
|
|
143335
|
+
function requireModuleWithVm(module2) {
|
|
143336
|
+
vm.run("__cache.module=require('".concat(module2, "')"));
|
|
143337
|
+
return (0, import_lodash8.get)(cache, ["module", "default"]) || cache.module;
|
|
143326
143338
|
}
|
|
143327
143339
|
init_regeneratorRuntime();
|
|
143328
143340
|
init_asyncToGenerator();
|
|
@@ -143399,7 +143411,7 @@ function _installPlugins() {
|
|
|
143399
143411
|
}
|
|
143400
143412
|
return _context.abrupt("return", {
|
|
143401
143413
|
templatePath: plugin,
|
|
143402
|
-
module:
|
|
143414
|
+
module: requireModuleWithVm(plugin)
|
|
143403
143415
|
});
|
|
143404
143416
|
case 4:
|
|
143405
143417
|
_getPackageInfo = (0, import_codesmith3.getPackageInfo)(plugin), name5 = _getPackageInfo.name, version5 = _getPackageInfo.version;
|
|
@@ -143412,7 +143424,7 @@ function _installPlugins() {
|
|
|
143412
143424
|
pluginPath = _context.sent;
|
|
143413
143425
|
return _context.abrupt("return", {
|
|
143414
143426
|
templatePath: pluginPath,
|
|
143415
|
-
module:
|
|
143427
|
+
module: requireModuleWithVm(pluginPath)
|
|
143416
143428
|
});
|
|
143417
143429
|
case 9:
|
|
143418
143430
|
case "end":
|
package/package.json
CHANGED
|
@@ -11,13 +11,16 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "0.0.0-next-
|
|
14
|
+
"version": "0.0.0-next-20221206090411",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"main": "./dist/index.js",
|
|
17
17
|
"files": [
|
|
18
18
|
"/templates",
|
|
19
19
|
"/dist/index.js"
|
|
20
20
|
],
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"vm2": "^3.9.2"
|
|
23
|
+
},
|
|
21
24
|
"devDependencies": {
|
|
22
25
|
"@babel/runtime": "^7.18.0",
|
|
23
26
|
"@modern-js/codesmith": "2.0.1",
|
|
@@ -26,16 +29,16 @@
|
|
|
26
29
|
"@types/node": "^14",
|
|
27
30
|
"jest": "^27",
|
|
28
31
|
"typescript": "^4",
|
|
29
|
-
"@modern-js/base-generator": "0.0.0-next-
|
|
30
|
-
"@modern-js/generator-
|
|
31
|
-
"@modern-js/generator-
|
|
32
|
-
"@modern-js/generator-utils": "0.0.0-next-
|
|
33
|
-
"@modern-js/module-generator": "0.0.0-next-
|
|
34
|
-
"@modern-js/monorepo-generator": "0.0.0-next-
|
|
35
|
-
"@modern-js/mwa-generator": "0.0.0-next-
|
|
36
|
-
"@modern-js/utils": "0.0.0-next-
|
|
37
|
-
"@scripts/build": "0.0.0-next-
|
|
38
|
-
"@scripts/jest-config": "0.0.0-next-
|
|
32
|
+
"@modern-js/base-generator": "0.0.0-next-20221206090411",
|
|
33
|
+
"@modern-js/generator-plugin": "0.0.0-next-20221206090411",
|
|
34
|
+
"@modern-js/generator-common": "0.0.0-next-20221206090411",
|
|
35
|
+
"@modern-js/generator-utils": "0.0.0-next-20221206090411",
|
|
36
|
+
"@modern-js/module-generator": "0.0.0-next-20221206090411",
|
|
37
|
+
"@modern-js/monorepo-generator": "0.0.0-next-20221206090411",
|
|
38
|
+
"@modern-js/mwa-generator": "0.0.0-next-20221206090411",
|
|
39
|
+
"@modern-js/utils": "0.0.0-next-20221206090411",
|
|
40
|
+
"@scripts/build": "0.0.0-next-20221206090411",
|
|
41
|
+
"@scripts/jest-config": "0.0.0-next-20221206090411"
|
|
39
42
|
},
|
|
40
43
|
"sideEffects": false,
|
|
41
44
|
"modernConfig": {
|