@modern-js/repo-generator 3.2.11 → 3.3.1
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 +318 -254
- package/package.json +13 -13
package/dist/index.js
CHANGED
|
@@ -10758,9 +10758,9 @@ var require_axios2 = __commonJS({
|
|
|
10758
10758
|
}
|
|
10759
10759
|
});
|
|
10760
10760
|
|
|
10761
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
10761
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/high-level-opt.js
|
|
10762
10762
|
var require_high_level_opt = __commonJS({
|
|
10763
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
10763
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/high-level-opt.js"(exports, module2) {
|
|
10764
10764
|
"use strict";
|
|
10765
10765
|
var argmap = /* @__PURE__ */ new Map([
|
|
10766
10766
|
["C", "cwd"],
|
|
@@ -10790,9 +10790,9 @@ var require_high_level_opt = __commonJS({
|
|
|
10790
10790
|
}
|
|
10791
10791
|
});
|
|
10792
10792
|
|
|
10793
|
-
// ../../../../node_modules/.pnpm/minipass@
|
|
10793
|
+
// ../../../../node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/index.js
|
|
10794
10794
|
var require_minipass = __commonJS({
|
|
10795
|
-
"../../../../node_modules/.pnpm/minipass@
|
|
10795
|
+
"../../../../node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/index.js"(exports) {
|
|
10796
10796
|
"use strict";
|
|
10797
10797
|
var proc = typeof process === "object" && process ? process : {
|
|
10798
10798
|
stdout: null,
|
|
@@ -11393,7 +11393,7 @@ var require_minipass = __commonJS({
|
|
|
11393
11393
|
typeof s.write === "function" && typeof s.end === "function"));
|
|
11394
11394
|
}
|
|
11395
11395
|
};
|
|
11396
|
-
|
|
11396
|
+
exports.Minipass = Minipass;
|
|
11397
11397
|
}
|
|
11398
11398
|
});
|
|
11399
11399
|
|
|
@@ -12302,23 +12302,23 @@ var require_minizlib = __commonJS({
|
|
|
12302
12302
|
}
|
|
12303
12303
|
});
|
|
12304
12304
|
|
|
12305
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
12305
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/normalize-windows-path.js
|
|
12306
12306
|
var require_normalize_windows_path = __commonJS({
|
|
12307
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
12307
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/normalize-windows-path.js"(exports, module2) {
|
|
12308
12308
|
"use strict";
|
|
12309
12309
|
var platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
12310
12310
|
module2.exports = platform !== "win32" ? (p) => p : (p) => p && p.replace(/\\/g, "/");
|
|
12311
12311
|
}
|
|
12312
12312
|
});
|
|
12313
12313
|
|
|
12314
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
12314
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/read-entry.js
|
|
12315
12315
|
var require_read_entry = __commonJS({
|
|
12316
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
12316
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/read-entry.js"(exports, module2) {
|
|
12317
12317
|
"use strict";
|
|
12318
|
-
var
|
|
12318
|
+
var { Minipass } = require_minipass();
|
|
12319
12319
|
var normPath = require_normalize_windows_path();
|
|
12320
12320
|
var SLURP = Symbol("slurp");
|
|
12321
|
-
module2.exports = class ReadEntry extends
|
|
12321
|
+
module2.exports = class ReadEntry extends Minipass {
|
|
12322
12322
|
constructor(header, ex, gex) {
|
|
12323
12323
|
super();
|
|
12324
12324
|
this.pause();
|
|
@@ -12405,9 +12405,9 @@ var require_read_entry = __commonJS({
|
|
|
12405
12405
|
}
|
|
12406
12406
|
});
|
|
12407
12407
|
|
|
12408
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
12408
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/types.js
|
|
12409
12409
|
var require_types = __commonJS({
|
|
12410
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
12410
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/types.js"(exports) {
|
|
12411
12411
|
"use strict";
|
|
12412
12412
|
exports.name = /* @__PURE__ */ new Map([
|
|
12413
12413
|
["0", "File"],
|
|
@@ -12452,9 +12452,9 @@ var require_types = __commonJS({
|
|
|
12452
12452
|
}
|
|
12453
12453
|
});
|
|
12454
12454
|
|
|
12455
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
12455
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/large-numbers.js
|
|
12456
12456
|
var require_large_numbers = __commonJS({
|
|
12457
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
12457
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/large-numbers.js"(exports, module2) {
|
|
12458
12458
|
"use strict";
|
|
12459
12459
|
var encode = (num, buf) => {
|
|
12460
12460
|
if (!Number.isSafeInteger(num)) {
|
|
@@ -12542,9 +12542,9 @@ var require_large_numbers = __commonJS({
|
|
|
12542
12542
|
}
|
|
12543
12543
|
});
|
|
12544
12544
|
|
|
12545
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
12545
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/header.js
|
|
12546
12546
|
var require_header = __commonJS({
|
|
12547
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
12547
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/header.js"(exports, module2) {
|
|
12548
12548
|
"use strict";
|
|
12549
12549
|
var types = require_types();
|
|
12550
12550
|
var pathModule = require("path").posix;
|
|
@@ -12762,9 +12762,9 @@ var require_header = __commonJS({
|
|
|
12762
12762
|
}
|
|
12763
12763
|
});
|
|
12764
12764
|
|
|
12765
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
12765
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/pax.js
|
|
12766
12766
|
var require_pax = __commonJS({
|
|
12767
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
12767
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/pax.js"(exports, module2) {
|
|
12768
12768
|
"use strict";
|
|
12769
12769
|
var Header = require_header();
|
|
12770
12770
|
var path18 = require("path");
|
|
@@ -12863,9 +12863,9 @@ var require_pax = __commonJS({
|
|
|
12863
12863
|
}
|
|
12864
12864
|
});
|
|
12865
12865
|
|
|
12866
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
12866
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/strip-trailing-slashes.js
|
|
12867
12867
|
var require_strip_trailing_slashes = __commonJS({
|
|
12868
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
12868
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/strip-trailing-slashes.js"(exports, module2) {
|
|
12869
12869
|
"use strict";
|
|
12870
12870
|
module2.exports = (str) => {
|
|
12871
12871
|
let i = str.length - 1;
|
|
@@ -12879,9 +12879,9 @@ var require_strip_trailing_slashes = __commonJS({
|
|
|
12879
12879
|
}
|
|
12880
12880
|
});
|
|
12881
12881
|
|
|
12882
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
12882
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/warn-mixin.js
|
|
12883
12883
|
var require_warn_mixin = __commonJS({
|
|
12884
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
12884
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/warn-mixin.js"(exports, module2) {
|
|
12885
12885
|
"use strict";
|
|
12886
12886
|
module2.exports = (Base) => class extends Base {
|
|
12887
12887
|
warn(code, message, data = {}) {
|
|
@@ -12909,9 +12909,9 @@ var require_warn_mixin = __commonJS({
|
|
|
12909
12909
|
}
|
|
12910
12910
|
});
|
|
12911
12911
|
|
|
12912
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
12912
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/winchars.js
|
|
12913
12913
|
var require_winchars = __commonJS({
|
|
12914
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
12914
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/winchars.js"(exports, module2) {
|
|
12915
12915
|
"use strict";
|
|
12916
12916
|
var raw2 = [
|
|
12917
12917
|
"|",
|
|
@@ -12930,9 +12930,9 @@ var require_winchars = __commonJS({
|
|
|
12930
12930
|
}
|
|
12931
12931
|
});
|
|
12932
12932
|
|
|
12933
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
12933
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/strip-absolute-path.js
|
|
12934
12934
|
var require_strip_absolute_path = __commonJS({
|
|
12935
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
12935
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/strip-absolute-path.js"(exports, module2) {
|
|
12936
12936
|
"use strict";
|
|
12937
12937
|
var { isAbsolute, parse: parse3 } = require("path").win32;
|
|
12938
12938
|
module2.exports = (path18) => {
|
|
@@ -12949,9 +12949,9 @@ var require_strip_absolute_path = __commonJS({
|
|
|
12949
12949
|
}
|
|
12950
12950
|
});
|
|
12951
12951
|
|
|
12952
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
12952
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/mode-fix.js
|
|
12953
12953
|
var require_mode_fix = __commonJS({
|
|
12954
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
12954
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/mode-fix.js"(exports, module2) {
|
|
12955
12955
|
"use strict";
|
|
12956
12956
|
module2.exports = (mode, isDir, portable) => {
|
|
12957
12957
|
mode &= 4095;
|
|
@@ -12974,11 +12974,11 @@ var require_mode_fix = __commonJS({
|
|
|
12974
12974
|
}
|
|
12975
12975
|
});
|
|
12976
12976
|
|
|
12977
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
12977
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/write-entry.js
|
|
12978
12978
|
var require_write_entry = __commonJS({
|
|
12979
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
12979
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/write-entry.js"(exports, module2) {
|
|
12980
12980
|
"use strict";
|
|
12981
|
-
var
|
|
12981
|
+
var { Minipass } = require_minipass();
|
|
12982
12982
|
var Pax = require_pax();
|
|
12983
12983
|
var Header = require_header();
|
|
12984
12984
|
var fs11 = require("fs");
|
|
@@ -13016,7 +13016,7 @@ var require_write_entry = __commonJS({
|
|
|
13016
13016
|
var winchars = require_winchars();
|
|
13017
13017
|
var stripAbsolutePath = require_strip_absolute_path();
|
|
13018
13018
|
var modeFix = require_mode_fix();
|
|
13019
|
-
var WriteEntry = warner(class WriteEntry extends
|
|
13019
|
+
var WriteEntry = warner(class WriteEntry extends Minipass {
|
|
13020
13020
|
constructor(p, opt) {
|
|
13021
13021
|
opt = opt || {};
|
|
13022
13022
|
super(opt);
|
|
@@ -13332,7 +13332,7 @@ var require_write_entry = __commonJS({
|
|
|
13332
13332
|
cb();
|
|
13333
13333
|
}
|
|
13334
13334
|
};
|
|
13335
|
-
var WriteEntryTar = warner(class WriteEntryTar extends
|
|
13335
|
+
var WriteEntryTar = warner(class WriteEntryTar extends Minipass {
|
|
13336
13336
|
constructor(readEntry, opt) {
|
|
13337
13337
|
opt = opt || {};
|
|
13338
13338
|
super(opt);
|
|
@@ -13822,9 +13822,9 @@ var require_yallist = __commonJS({
|
|
|
13822
13822
|
}
|
|
13823
13823
|
});
|
|
13824
13824
|
|
|
13825
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
13825
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/pack.js
|
|
13826
13826
|
var require_pack = __commonJS({
|
|
13827
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
13827
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/pack.js"(exports, module2) {
|
|
13828
13828
|
"use strict";
|
|
13829
13829
|
var PackJob = class {
|
|
13830
13830
|
constructor(path19, absolute) {
|
|
@@ -13838,7 +13838,7 @@ var require_pack = __commonJS({
|
|
|
13838
13838
|
this.piped = false;
|
|
13839
13839
|
}
|
|
13840
13840
|
};
|
|
13841
|
-
var
|
|
13841
|
+
var { Minipass } = require_minipass();
|
|
13842
13842
|
var zlib = require_minizlib();
|
|
13843
13843
|
var ReadEntry = require_read_entry();
|
|
13844
13844
|
var WriteEntry = require_write_entry();
|
|
@@ -13870,7 +13870,7 @@ var require_pack = __commonJS({
|
|
|
13870
13870
|
var path18 = require("path");
|
|
13871
13871
|
var warner = require_warn_mixin();
|
|
13872
13872
|
var normPath = require_normalize_windows_path();
|
|
13873
|
-
var Pack = warner(class Pack extends
|
|
13873
|
+
var Pack = warner(class Pack extends Minipass {
|
|
13874
13874
|
constructor(opt) {
|
|
13875
13875
|
super(opt);
|
|
13876
13876
|
opt = opt || /* @__PURE__ */ Object.create(null);
|
|
@@ -13891,14 +13891,25 @@ var require_pack = __commonJS({
|
|
|
13891
13891
|
}
|
|
13892
13892
|
this.portable = !!opt.portable;
|
|
13893
13893
|
this.zip = null;
|
|
13894
|
-
if (opt.gzip) {
|
|
13895
|
-
if (
|
|
13896
|
-
|
|
13894
|
+
if (opt.gzip || opt.brotli) {
|
|
13895
|
+
if (opt.gzip && opt.brotli) {
|
|
13896
|
+
throw new TypeError("gzip and brotli are mutually exclusive");
|
|
13897
13897
|
}
|
|
13898
|
-
if (
|
|
13899
|
-
opt.gzip
|
|
13898
|
+
if (opt.gzip) {
|
|
13899
|
+
if (typeof opt.gzip !== "object") {
|
|
13900
|
+
opt.gzip = {};
|
|
13901
|
+
}
|
|
13902
|
+
if (this.portable) {
|
|
13903
|
+
opt.gzip.portable = true;
|
|
13904
|
+
}
|
|
13905
|
+
this.zip = new zlib.Gzip(opt.gzip);
|
|
13906
|
+
}
|
|
13907
|
+
if (opt.brotli) {
|
|
13908
|
+
if (typeof opt.brotli !== "object") {
|
|
13909
|
+
opt.brotli = {};
|
|
13910
|
+
}
|
|
13911
|
+
this.zip = new zlib.BrotliCompress(opt.brotli);
|
|
13900
13912
|
}
|
|
13901
|
-
this.zip = new zlib.Gzip(opt.gzip);
|
|
13902
13913
|
this.zip.on("data", (chunk) => super.write(chunk));
|
|
13903
13914
|
this.zip.on("end", (_) => super.end());
|
|
13904
13915
|
this.zip.on("drain", (_) => this[ONDRAIN]());
|
|
@@ -14555,9 +14566,9 @@ var require_fs_minipass = __commonJS({
|
|
|
14555
14566
|
}
|
|
14556
14567
|
});
|
|
14557
14568
|
|
|
14558
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
14569
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/parse.js
|
|
14559
14570
|
var require_parse2 = __commonJS({
|
|
14560
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
14571
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/parse.js"(exports, module2) {
|
|
14561
14572
|
"use strict";
|
|
14562
14573
|
var warner = require_warn_mixin();
|
|
14563
14574
|
var Header = require_header();
|
|
@@ -14623,6 +14634,8 @@ var require_parse2 = __commonJS({
|
|
|
14623
14634
|
this.strict = !!opt.strict;
|
|
14624
14635
|
this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize;
|
|
14625
14636
|
this.filter = typeof opt.filter === "function" ? opt.filter : noop;
|
|
14637
|
+
const isTBR = opt.file && (opt.file.endsWith(".tar.br") || opt.file.endsWith(".tbr"));
|
|
14638
|
+
this.brotli = !opt.gzip && opt.brotli !== void 0 ? opt.brotli : isTBR ? void 0 : false;
|
|
14626
14639
|
this.writable = true;
|
|
14627
14640
|
this.readable = false;
|
|
14628
14641
|
this[QUEUE] = new Yallist();
|
|
@@ -14824,7 +14837,8 @@ var require_parse2 = __commonJS({
|
|
|
14824
14837
|
if (this[ABORTED]) {
|
|
14825
14838
|
return;
|
|
14826
14839
|
}
|
|
14827
|
-
|
|
14840
|
+
const needSniff = this[UNZIP] === null || this.brotli === void 0 && this[UNZIP] === false;
|
|
14841
|
+
if (needSniff && chunk) {
|
|
14828
14842
|
if (this[BUFFER]) {
|
|
14829
14843
|
chunk = Buffer.concat([this[BUFFER], chunk]);
|
|
14830
14844
|
this[BUFFER] = null;
|
|
@@ -14838,10 +14852,28 @@ var require_parse2 = __commonJS({
|
|
|
14838
14852
|
this[UNZIP] = false;
|
|
14839
14853
|
}
|
|
14840
14854
|
}
|
|
14841
|
-
|
|
14855
|
+
const maybeBrotli = this.brotli === void 0;
|
|
14856
|
+
if (this[UNZIP] === false && maybeBrotli) {
|
|
14857
|
+
if (chunk.length < 512) {
|
|
14858
|
+
if (this[ENDED]) {
|
|
14859
|
+
this.brotli = true;
|
|
14860
|
+
} else {
|
|
14861
|
+
this[BUFFER] = chunk;
|
|
14862
|
+
return true;
|
|
14863
|
+
}
|
|
14864
|
+
} else {
|
|
14865
|
+
try {
|
|
14866
|
+
new Header(chunk.slice(0, 512));
|
|
14867
|
+
this.brotli = false;
|
|
14868
|
+
} catch (_) {
|
|
14869
|
+
this.brotli = true;
|
|
14870
|
+
}
|
|
14871
|
+
}
|
|
14872
|
+
}
|
|
14873
|
+
if (this[UNZIP] === null || this[UNZIP] === false && this.brotli) {
|
|
14842
14874
|
const ended = this[ENDED];
|
|
14843
14875
|
this[ENDED] = false;
|
|
14844
|
-
this[UNZIP] = new zlib.Unzip();
|
|
14876
|
+
this[UNZIP] = this[UNZIP] === null ? new zlib.Unzip() : new zlib.BrotliDecompress();
|
|
14845
14877
|
this[UNZIP].on("data", (chunk2) => this[CONSUMECHUNK](chunk2));
|
|
14846
14878
|
this[UNZIP].on("error", (er) => this.abort(er));
|
|
14847
14879
|
this[UNZIP].on("end", (_) => {
|
|
@@ -14948,6 +14980,8 @@ var require_parse2 = __commonJS({
|
|
|
14948
14980
|
this[UNZIP].end(chunk);
|
|
14949
14981
|
} else {
|
|
14950
14982
|
this[ENDED] = true;
|
|
14983
|
+
if (this.brotli === void 0)
|
|
14984
|
+
chunk = chunk || Buffer.alloc(0);
|
|
14951
14985
|
this.write(chunk);
|
|
14952
14986
|
}
|
|
14953
14987
|
}
|
|
@@ -14956,9 +14990,9 @@ var require_parse2 = __commonJS({
|
|
|
14956
14990
|
}
|
|
14957
14991
|
});
|
|
14958
14992
|
|
|
14959
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
14993
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/list.js
|
|
14960
14994
|
var require_list = __commonJS({
|
|
14961
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
14995
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/list.js"(exports, module2) {
|
|
14962
14996
|
"use strict";
|
|
14963
14997
|
var hlo = require_high_level_opt();
|
|
14964
14998
|
var Parser2 = require_parse2();
|
|
@@ -15070,9 +15104,9 @@ var require_list = __commonJS({
|
|
|
15070
15104
|
}
|
|
15071
15105
|
});
|
|
15072
15106
|
|
|
15073
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
15107
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/create.js
|
|
15074
15108
|
var require_create = __commonJS({
|
|
15075
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
15109
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/create.js"(exports, module2) {
|
|
15076
15110
|
"use strict";
|
|
15077
15111
|
var hlo = require_high_level_opt();
|
|
15078
15112
|
var Pack = require_pack();
|
|
@@ -15164,9 +15198,9 @@ var require_create = __commonJS({
|
|
|
15164
15198
|
}
|
|
15165
15199
|
});
|
|
15166
15200
|
|
|
15167
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
15201
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/replace.js
|
|
15168
15202
|
var require_replace = __commonJS({
|
|
15169
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
15203
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/replace.js"(exports, module2) {
|
|
15170
15204
|
"use strict";
|
|
15171
15205
|
var hlo = require_high_level_opt();
|
|
15172
15206
|
var Pack = require_pack();
|
|
@@ -15180,7 +15214,7 @@ var require_replace = __commonJS({
|
|
|
15180
15214
|
if (!opt.file) {
|
|
15181
15215
|
throw new TypeError("file is required");
|
|
15182
15216
|
}
|
|
15183
|
-
if (opt.gzip) {
|
|
15217
|
+
if (opt.gzip || opt.brotli || opt.file.endsWith(".br") || opt.file.endsWith(".tbr")) {
|
|
15184
15218
|
throw new TypeError("cannot append to compressed archives");
|
|
15185
15219
|
}
|
|
15186
15220
|
if (!files || !Array.isArray(files) || !files.length) {
|
|
@@ -15380,9 +15414,9 @@ var require_replace = __commonJS({
|
|
|
15380
15414
|
}
|
|
15381
15415
|
});
|
|
15382
15416
|
|
|
15383
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
15417
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/update.js
|
|
15384
15418
|
var require_update = __commonJS({
|
|
15385
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
15419
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/update.js"(exports, module2) {
|
|
15386
15420
|
"use strict";
|
|
15387
15421
|
var hlo = require_high_level_opt();
|
|
15388
15422
|
var r = require_replace();
|
|
@@ -15391,7 +15425,7 @@ var require_update = __commonJS({
|
|
|
15391
15425
|
if (!opt.file) {
|
|
15392
15426
|
throw new TypeError("file is required");
|
|
15393
15427
|
}
|
|
15394
|
-
if (opt.gzip) {
|
|
15428
|
+
if (opt.gzip || opt.brotli || opt.file.endsWith(".br") || opt.file.endsWith(".tbr")) {
|
|
15395
15429
|
throw new TypeError("cannot append to compressed archives");
|
|
15396
15430
|
}
|
|
15397
15431
|
if (!files || !Array.isArray(files) || !files.length) {
|
|
@@ -15774,9 +15808,9 @@ var require_chownr = __commonJS({
|
|
|
15774
15808
|
}
|
|
15775
15809
|
});
|
|
15776
15810
|
|
|
15777
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
15811
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/mkdir.js
|
|
15778
15812
|
var require_mkdir = __commonJS({
|
|
15779
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
15813
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/mkdir.js"(exports, module2) {
|
|
15780
15814
|
"use strict";
|
|
15781
15815
|
var mkdirp = require_mkdirp();
|
|
15782
15816
|
var fs11 = require("fs");
|
|
@@ -15966,24 +16000,24 @@ var require_mkdir = __commonJS({
|
|
|
15966
16000
|
}
|
|
15967
16001
|
});
|
|
15968
16002
|
|
|
15969
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
16003
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/normalize-unicode.js
|
|
15970
16004
|
var require_normalize_unicode = __commonJS({
|
|
15971
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
16005
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/normalize-unicode.js"(exports, module2) {
|
|
15972
16006
|
"use strict";
|
|
15973
16007
|
var normalizeCache = /* @__PURE__ */ Object.create(null);
|
|
15974
16008
|
var { hasOwnProperty: hasOwnProperty6 } = Object.prototype;
|
|
15975
16009
|
module2.exports = (s) => {
|
|
15976
16010
|
if (!hasOwnProperty6.call(normalizeCache, s)) {
|
|
15977
|
-
normalizeCache[s] = s.normalize("
|
|
16011
|
+
normalizeCache[s] = s.normalize("NFD");
|
|
15978
16012
|
}
|
|
15979
16013
|
return normalizeCache[s];
|
|
15980
16014
|
};
|
|
15981
16015
|
}
|
|
15982
16016
|
});
|
|
15983
16017
|
|
|
15984
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
16018
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/path-reservations.js
|
|
15985
16019
|
var require_path_reservations = __commonJS({
|
|
15986
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
16020
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/path-reservations.js"(exports, module2) {
|
|
15987
16021
|
"use strict";
|
|
15988
16022
|
var assert = require("assert");
|
|
15989
16023
|
var normalize = require_normalize_unicode();
|
|
@@ -16065,7 +16099,7 @@ var require_path_reservations = __commonJS({
|
|
|
16065
16099
|
};
|
|
16066
16100
|
const reserve = (paths, fn) => {
|
|
16067
16101
|
paths = isWindows ? ["win32 parallelization disabled"] : paths.map((p) => {
|
|
16068
|
-
return
|
|
16102
|
+
return stripSlashes(join(normalize(p))).toLowerCase();
|
|
16069
16103
|
});
|
|
16070
16104
|
const dirs = new Set(
|
|
16071
16105
|
paths.map((path18) => getDirs(path18)).reduce((a, b) => a.concat(b))
|
|
@@ -16096,9 +16130,9 @@ var require_path_reservations = __commonJS({
|
|
|
16096
16130
|
}
|
|
16097
16131
|
});
|
|
16098
16132
|
|
|
16099
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
16133
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/get-write-flag.js
|
|
16100
16134
|
var require_get_write_flag = __commonJS({
|
|
16101
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
16135
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/get-write-flag.js"(exports, module2) {
|
|
16102
16136
|
"use strict";
|
|
16103
16137
|
var platform = process.env.__FAKE_PLATFORM__ || process.platform;
|
|
16104
16138
|
var isWindows = platform === "win32";
|
|
@@ -16111,9 +16145,9 @@ var require_get_write_flag = __commonJS({
|
|
|
16111
16145
|
}
|
|
16112
16146
|
});
|
|
16113
16147
|
|
|
16114
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
16148
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/unpack.js
|
|
16115
16149
|
var require_unpack = __commonJS({
|
|
16116
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
16150
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/unpack.js"(exports, module2) {
|
|
16117
16151
|
"use strict";
|
|
16118
16152
|
var assert = require("assert");
|
|
16119
16153
|
var Parser2 = require_parse2();
|
|
@@ -16177,7 +16211,7 @@ var require_unpack = __commonJS({
|
|
|
16177
16211
|
fs11.unlinkSync(name);
|
|
16178
16212
|
};
|
|
16179
16213
|
var uint32 = (a, b, c) => a === a >>> 0 ? a : b === b >>> 0 ? b : c;
|
|
16180
|
-
var cacheKeyNormalize = (path19) =>
|
|
16214
|
+
var cacheKeyNormalize = (path19) => stripSlash(normPath(normalize(path19))).toLowerCase();
|
|
16181
16215
|
var pruneCache = (cache, abs) => {
|
|
16182
16216
|
abs = cacheKeyNormalize(abs);
|
|
16183
16217
|
for (const path19 of cache.keys()) {
|
|
@@ -16793,9 +16827,9 @@ var require_unpack = __commonJS({
|
|
|
16793
16827
|
}
|
|
16794
16828
|
});
|
|
16795
16829
|
|
|
16796
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
16830
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/extract.js
|
|
16797
16831
|
var require_extract = __commonJS({
|
|
16798
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
16832
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/extract.js"(exports, module2) {
|
|
16799
16833
|
"use strict";
|
|
16800
16834
|
var hlo = require_high_level_opt();
|
|
16801
16835
|
var Unpack = require_unpack();
|
|
@@ -16878,9 +16912,9 @@ var require_extract = __commonJS({
|
|
|
16878
16912
|
}
|
|
16879
16913
|
});
|
|
16880
16914
|
|
|
16881
|
-
// ../../../../node_modules/.pnpm/tar@6.
|
|
16915
|
+
// ../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/index.js
|
|
16882
16916
|
var require_tar = __commonJS({
|
|
16883
|
-
"../../../../node_modules/.pnpm/tar@6.
|
|
16917
|
+
"../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/index.js"(exports) {
|
|
16884
16918
|
"use strict";
|
|
16885
16919
|
exports.c = exports.create = require_create();
|
|
16886
16920
|
exports.r = exports.replace = require_replace();
|
|
@@ -23488,9 +23522,9 @@ var require_ejs = __commonJS({
|
|
|
23488
23522
|
}
|
|
23489
23523
|
});
|
|
23490
23524
|
|
|
23491
|
-
// ../../../../node_modules/.pnpm/@modern-js+utils@2.
|
|
23525
|
+
// ../../../../node_modules/.pnpm/@modern-js+utils@2.39.2/node_modules/@modern-js/utils/dist/compiled/chalk/index.js
|
|
23492
23526
|
var require_chalk = __commonJS({
|
|
23493
|
-
"../../../../node_modules/.pnpm/@modern-js+utils@2.
|
|
23527
|
+
"../../../../node_modules/.pnpm/@modern-js+utils@2.39.2/node_modules/@modern-js/utils/dist/compiled/chalk/index.js"(exports, module2) {
|
|
23494
23528
|
"use strict";
|
|
23495
23529
|
(() => {
|
|
23496
23530
|
var e = { 44: (e2, t2, n2) => {
|
|
@@ -60885,12 +60919,12 @@ function _define_property(obj, key, value) {
|
|
|
60885
60919
|
return obj;
|
|
60886
60920
|
}
|
|
60887
60921
|
|
|
60888
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
60922
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
60889
60923
|
var import_utils23 = require("@modern-js/utils");
|
|
60890
60924
|
var import_lodash6 = require("@modern-js/utils/lodash");
|
|
60891
60925
|
var import_comment_json = __toESM(require_src2());
|
|
60892
60926
|
|
|
60893
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
60927
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
|
|
60894
60928
|
var import_utils = require("@modern-js/utils");
|
|
60895
60929
|
async function canUseNvm() {
|
|
60896
60930
|
try {
|
|
@@ -60940,7 +60974,7 @@ async function canUsePnpm() {
|
|
|
60940
60974
|
}
|
|
60941
60975
|
}
|
|
60942
60976
|
|
|
60943
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
60977
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
|
60944
60978
|
var import_utils2 = require("@modern-js/utils");
|
|
60945
60979
|
function execaWithStreamLog(command, args, options) {
|
|
60946
60980
|
const promise = (0, import_utils2.execa)(command, args, {
|
|
@@ -61036,7 +61070,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
|
|
|
61036
61070
|
throw new Error("please install pnpm first");
|
|
61037
61071
|
}
|
|
61038
61072
|
|
|
61039
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
|
61073
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.1/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
|
61040
61074
|
var NpmAPI = class {
|
|
61041
61075
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
|
61042
61076
|
return npmInstall({
|
|
@@ -61065,7 +61099,7 @@ var NpmAPI = class {
|
|
|
61065
61099
|
}
|
|
61066
61100
|
};
|
|
61067
61101
|
|
|
61068
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
|
61102
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.1_@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
|
|
61069
61103
|
var import_utils4 = require("@modern-js/utils");
|
|
61070
61104
|
async function canUseGit() {
|
|
61071
61105
|
try {
|
|
@@ -61140,7 +61174,7 @@ async function gitCommit(cwd, commitMessage) {
|
|
|
61140
61174
|
});
|
|
61141
61175
|
}
|
|
61142
61176
|
|
|
61143
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
|
61177
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.1_@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
|
|
61144
61178
|
var GitAPI = class {
|
|
61145
61179
|
async isInGitRepo(cwd = this.generatorCore.outputPath) {
|
|
61146
61180
|
const canUse = await canUseGit();
|
|
@@ -61192,7 +61226,7 @@ var GitAPI = class {
|
|
|
61192
61226
|
}
|
|
61193
61227
|
};
|
|
61194
61228
|
|
|
61195
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61229
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/logger/constants.js
|
|
61196
61230
|
var LoggerLevel;
|
|
61197
61231
|
(function(LoggerLevel2) {
|
|
61198
61232
|
LoggerLevel2["Error"] = "error";
|
|
@@ -61201,17 +61235,19 @@ var LoggerLevel;
|
|
|
61201
61235
|
LoggerLevel2["Debug"] = "debug";
|
|
61202
61236
|
LoggerLevel2["Verbose"] = "verbose";
|
|
61203
61237
|
LoggerLevel2["Stream"] = "stream";
|
|
61238
|
+
LoggerLevel2["Timing"] = "timing";
|
|
61204
61239
|
})(LoggerLevel || (LoggerLevel = {}));
|
|
61205
61240
|
var LevelPriority = [
|
|
61206
61241
|
LoggerLevel.Error,
|
|
61207
61242
|
LoggerLevel.Warn,
|
|
61208
61243
|
LoggerLevel.Info,
|
|
61244
|
+
LoggerLevel.Timing,
|
|
61209
61245
|
LoggerLevel.Debug,
|
|
61210
61246
|
LoggerLevel.Verbose,
|
|
61211
61247
|
LoggerLevel.Stream
|
|
61212
61248
|
];
|
|
61213
61249
|
|
|
61214
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61250
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/logger/index.js
|
|
61215
61251
|
var import_utils6 = require("@modern-js/utils");
|
|
61216
61252
|
var Logger = class {
|
|
61217
61253
|
get currentLevelIndex() {
|
|
@@ -61244,6 +61280,16 @@ var Logger = class {
|
|
|
61244
61280
|
}
|
|
61245
61281
|
console.log(import_utils6.chalk.blue("[DEBUG]"), ...meta);
|
|
61246
61282
|
}
|
|
61283
|
+
timing(key, end) {
|
|
61284
|
+
if (this.currentLevelIndex < this.getLevalIndex(LoggerLevel.Timing)) {
|
|
61285
|
+
return;
|
|
61286
|
+
}
|
|
61287
|
+
if (end) {
|
|
61288
|
+
console.timeEnd(key);
|
|
61289
|
+
} else {
|
|
61290
|
+
console.time(key);
|
|
61291
|
+
}
|
|
61292
|
+
}
|
|
61247
61293
|
verbose(...meta) {
|
|
61248
61294
|
if (this.currentLevelIndex < this.getLevalIndex(LoggerLevel.Verbose)) {
|
|
61249
61295
|
return;
|
|
@@ -61262,23 +61308,23 @@ var Logger = class {
|
|
|
61262
61308
|
}
|
|
61263
61309
|
};
|
|
61264
61310
|
|
|
61265
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61311
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
|
|
61266
61312
|
var import_path7 = __toESM(require("path"));
|
|
61267
61313
|
|
|
61268
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61314
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
|
|
61269
61315
|
var import_path4 = __toESM(require("path"));
|
|
61270
61316
|
var import_events = require("events");
|
|
61271
61317
|
var import_utils11 = require("@modern-js/utils");
|
|
61272
61318
|
|
|
61273
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61319
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
|
|
61274
61320
|
var import_path2 = __toESM(require("path"));
|
|
61275
61321
|
var import_utils8 = require("@modern-js/utils");
|
|
61276
61322
|
|
|
61277
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61323
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
|
61278
61324
|
var import_path = __toESM(require("path"));
|
|
61279
61325
|
var import_utils7 = require("@modern-js/utils");
|
|
61280
61326
|
|
|
61281
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61327
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/constants.js
|
|
61282
61328
|
var IMAGE_EXT_LIST = [
|
|
61283
61329
|
".jpg",
|
|
61284
61330
|
".jpeg",
|
|
@@ -61292,7 +61338,7 @@ var IMAGE_EXT_LIST = [
|
|
|
61292
61338
|
".wmf"
|
|
61293
61339
|
];
|
|
61294
61340
|
|
|
61295
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61341
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
|
61296
61342
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
|
61297
61343
|
var FsResource = class {
|
|
61298
61344
|
async value() {
|
|
@@ -61318,7 +61364,7 @@ var FsResource = class {
|
|
|
61318
61364
|
}
|
|
61319
61365
|
};
|
|
61320
61366
|
|
|
61321
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61367
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsMaterial.js
|
|
61322
61368
|
var promisifyGlob = function(pattern, options) {
|
|
61323
61369
|
return new Promise((resolve, reject) => {
|
|
61324
61370
|
(0, import_utils8.glob)(pattern, options, (err, files) => err === null ? resolve(files) : reject(err));
|
|
@@ -61346,7 +61392,7 @@ var FsMaterial = class {
|
|
|
61346
61392
|
}
|
|
61347
61393
|
};
|
|
61348
61394
|
|
|
61349
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61395
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/nodeRequire.js
|
|
61350
61396
|
var nodeRequire = (path18) => {
|
|
61351
61397
|
try {
|
|
61352
61398
|
const module2 = __non_webpack_require__(path18);
|
|
@@ -61363,11 +61409,11 @@ var nodeRequire = (path18) => {
|
|
|
61363
61409
|
}
|
|
61364
61410
|
};
|
|
61365
61411
|
|
|
61366
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61412
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
|
|
61367
61413
|
var import_path3 = __toESM(require("path"));
|
|
61368
61414
|
var import_utils10 = require("@modern-js/utils");
|
|
61369
61415
|
|
|
61370
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61416
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
|
61371
61417
|
var import_utils9 = require("@modern-js/utils");
|
|
61372
61418
|
async function fsExists(path18) {
|
|
61373
61419
|
try {
|
|
@@ -61378,7 +61424,7 @@ async function fsExists(path18) {
|
|
|
61378
61424
|
}
|
|
61379
61425
|
}
|
|
61380
61426
|
|
|
61381
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61427
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getGeneratorDir.js
|
|
61382
61428
|
var MaxTimes = 5;
|
|
61383
61429
|
async function getGeneratorDir(generator) {
|
|
61384
61430
|
let result = generator;
|
|
@@ -61397,7 +61443,7 @@ async function getGeneratorDir(generator) {
|
|
|
61397
61443
|
return result;
|
|
61398
61444
|
}
|
|
61399
61445
|
|
|
61400
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61446
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/generator/index.js
|
|
61401
61447
|
var GeneratorCore = class {
|
|
61402
61448
|
get lifeCycleMethod() {
|
|
61403
61449
|
return {
|
|
@@ -61489,6 +61535,7 @@ check path: ${import_utils11.chalk.blue.underline(generator)} exist a package.js
|
|
|
61489
61535
|
return Promise.resolve();
|
|
61490
61536
|
}
|
|
61491
61537
|
async loadGenerator(generator) {
|
|
61538
|
+
this.logger.timing(`loadGenerator ${generator}`);
|
|
61492
61539
|
let generatorPath = generator;
|
|
61493
61540
|
if (generator.startsWith("file:")) {
|
|
61494
61541
|
generatorPath = import_path4.default.join(this.basePath, generator.slice(5));
|
|
@@ -61499,6 +61546,7 @@ check path: ${import_utils11.chalk.blue.underline(generator)} exist a package.js
|
|
|
61499
61546
|
return {};
|
|
61500
61547
|
}
|
|
61501
61548
|
this.logger.debug("[runGenerator] task.generator loaded");
|
|
61549
|
+
this.logger.timing(`loadGenerator ${generator}`, true);
|
|
61502
61550
|
const generatorScript = nodeRequire(generatorPkg.basePath);
|
|
61503
61551
|
if (typeof generatorScript !== "function") {
|
|
61504
61552
|
this.logger.debug(`generator module [${pkgJson.name}] export default is not a function`, generatorScript);
|
|
@@ -61511,6 +61559,7 @@ check path: ${import_utils11.chalk.blue.underline(generator)} exist a package.js
|
|
|
61511
61559
|
};
|
|
61512
61560
|
}
|
|
61513
61561
|
async runGenerator(generator, config = {}) {
|
|
61562
|
+
this.logger.timing(`runGenerator ${generator}`);
|
|
61514
61563
|
const spinner = (0, import_utils11.ora)({
|
|
61515
61564
|
text: "Load Generator...",
|
|
61516
61565
|
spinner: "runner"
|
|
@@ -61528,8 +61577,10 @@ check path: ${import_utils11.chalk.blue.underline(generator)} exist a package.js
|
|
|
61528
61577
|
this.setbasePath(this._context.current.material.basePath);
|
|
61529
61578
|
await generatorScript(this._context, this);
|
|
61530
61579
|
this.setCurrent(null);
|
|
61580
|
+
this.logger.timing(`runGenerator ${generator}`, true);
|
|
61531
61581
|
}
|
|
61532
61582
|
async runSubGenerator(subGenerator, relativePwdPath = "", config) {
|
|
61583
|
+
this.logger.timing(`runSubGenerator ${subGenerator}`);
|
|
61533
61584
|
const spinner = (0, import_utils11.ora)({
|
|
61534
61585
|
text: "Load Generator...",
|
|
61535
61586
|
spinner: "runner"
|
|
@@ -61562,6 +61613,7 @@ check path: ${import_utils11.chalk.blue.underline(generator)} exist a package.js
|
|
|
61562
61613
|
await generatorScript(subContext, this);
|
|
61563
61614
|
this.setOutputPath(preOutputPath);
|
|
61564
61615
|
this.setbasePath(preBasePath);
|
|
61616
|
+
this.logger.timing(`runSubGenerator ${subGenerator}`, true);
|
|
61565
61617
|
}
|
|
61566
61618
|
constructor({ logger: logger2, materialsManager, outputPath }) {
|
|
61567
61619
|
_define_property(this, "logger", void 0);
|
|
@@ -61593,10 +61645,10 @@ check path: ${import_utils11.chalk.blue.underline(generator)} exist a package.js
|
|
|
61593
61645
|
}
|
|
61594
61646
|
};
|
|
61595
61647
|
|
|
61596
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61648
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
|
|
61597
61649
|
var import_path6 = __toESM(require("path"));
|
|
61598
61650
|
|
|
61599
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61651
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/packageManager.js
|
|
61600
61652
|
var import_path5 = __toESM(require("path"));
|
|
61601
61653
|
var import_utils12 = require("@modern-js/utils");
|
|
61602
61654
|
async function canUseYarn2() {
|
|
@@ -61677,7 +61729,7 @@ async function runInstall(targetDir, registryUrl) {
|
|
|
61677
61729
|
}
|
|
61678
61730
|
}
|
|
61679
61731
|
|
|
61680
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61732
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/timeoutPromise.js
|
|
61681
61733
|
async function timeoutPromise(promise, ms, reason = "Operation") {
|
|
61682
61734
|
let timeoutId = null;
|
|
61683
61735
|
const delayPromise = (ms2) => new Promise((resolve) => {
|
|
@@ -61699,20 +61751,20 @@ async function timeoutPromise(promise, ms, reason = "Operation") {
|
|
|
61699
61751
|
}
|
|
61700
61752
|
}
|
|
61701
61753
|
|
|
61702
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61754
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
|
|
61703
61755
|
var import_os = __toESM(require("os"));
|
|
61704
61756
|
var import_utils15 = require("@modern-js/utils");
|
|
61705
61757
|
var import_axios = __toESM(require_axios2());
|
|
61706
61758
|
var import_tar = __toESM(require_tar());
|
|
61707
61759
|
|
|
61708
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61760
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmTarballUrl.js
|
|
61709
61761
|
var import_utils13 = require("@modern-js/utils");
|
|
61710
61762
|
|
|
61711
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61763
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/constants.js
|
|
61712
61764
|
var NPM_API_TIMEOUT = 3e4;
|
|
61713
61765
|
var CATCHE_VALIDITY_PREIOD = 12 * 3600 * 1e3;
|
|
61714
61766
|
|
|
61715
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61767
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmTarballUrl.js
|
|
61716
61768
|
async function getNpmTarballUrl(pkgName, pkgVersion, options) {
|
|
61717
61769
|
const { registryUrl } = options || {};
|
|
61718
61770
|
const params = [
|
|
@@ -61735,7 +61787,7 @@ async function getNpmTarballUrl(pkgName, pkgVersion, options) {
|
|
|
61735
61787
|
}
|
|
61736
61788
|
}
|
|
61737
61789
|
|
|
61738
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61790
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getNpmVersion.js
|
|
61739
61791
|
var import_utils14 = require("@modern-js/utils");
|
|
61740
61792
|
async function getNpmVersion(packageName, options) {
|
|
61741
61793
|
const { version, registryUrl } = options || {};
|
|
@@ -61757,7 +61809,7 @@ async function getNpmVersion(packageName, options) {
|
|
|
61757
61809
|
return stdout;
|
|
61758
61810
|
}
|
|
61759
61811
|
|
|
61760
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61812
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/downloadPackage.js
|
|
61761
61813
|
async function isValidCache(cacheDir) {
|
|
61762
61814
|
if (await fsExists(`${cacheDir}/.codesmith.completed`)) {
|
|
61763
61815
|
const preCacheTimeStr = await import_utils15.fs.readFile(`${cacheDir}/.codesmith.completed`, {
|
|
@@ -61837,7 +61889,7 @@ async function downloadPackage(pkgName, pkgVersion = "latest", options = {}) {
|
|
|
61837
61889
|
return targetDir;
|
|
61838
61890
|
}
|
|
61839
61891
|
|
|
61840
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61892
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/utils/getPackageInfo.js
|
|
61841
61893
|
var import_utils16 = require("@modern-js/utils");
|
|
61842
61894
|
function getPackageInfo(packageName) {
|
|
61843
61895
|
if (!packageName) {
|
|
@@ -61862,7 +61914,7 @@ function getPackageInfo(packageName) {
|
|
|
61862
61914
|
};
|
|
61863
61915
|
}
|
|
61864
61916
|
|
|
61865
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61917
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/materials/index.js
|
|
61866
61918
|
var MaterialsManager = class {
|
|
61867
61919
|
loadLocalGenerator(generator) {
|
|
61868
61920
|
if (!import_path6.default.isAbsolute(generator)) {
|
|
@@ -61893,9 +61945,10 @@ var MaterialsManager = class {
|
|
|
61893
61945
|
}
|
|
61894
61946
|
};
|
|
61895
61947
|
|
|
61896
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
|
61948
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith/dist/esm-node/codesmith/index.js
|
|
61897
61949
|
var CodeSmith = class {
|
|
61898
61950
|
async forge({ tasks, pwd }) {
|
|
61951
|
+
this.logger.timing("CodeSmith all tasks");
|
|
61899
61952
|
this.core = new GeneratorCore({
|
|
61900
61953
|
logger: this.logger,
|
|
61901
61954
|
materialsManager: this.materialsManager,
|
|
@@ -61909,6 +61962,8 @@ var CodeSmith = class {
|
|
|
61909
61962
|
} catch (e) {
|
|
61910
61963
|
this.logger.error("run task error:", e);
|
|
61911
61964
|
throw new Error("run task error");
|
|
61965
|
+
} finally {
|
|
61966
|
+
this.logger.timing("CodeSmith all tasks", true);
|
|
61912
61967
|
}
|
|
61913
61968
|
}
|
|
61914
61969
|
async runTask(task) {
|
|
@@ -61916,7 +61971,9 @@ var CodeSmith = class {
|
|
|
61916
61971
|
throw new Error("no core in 'runTask'");
|
|
61917
61972
|
}
|
|
61918
61973
|
const { generator, config } = task;
|
|
61974
|
+
this.logger.timing(`runTask ${generator}`);
|
|
61919
61975
|
await this.core.runGenerator(generator, config);
|
|
61976
|
+
this.logger.timing(`runTask ${generator}`, true);
|
|
61920
61977
|
}
|
|
61921
61978
|
constructor({ debug, logger: logger2, registryUrl }) {
|
|
61922
61979
|
_define_property(this, "core", void 0);
|
|
@@ -61929,7 +61986,7 @@ var CodeSmith = class {
|
|
|
61929
61986
|
}
|
|
61930
61987
|
};
|
|
61931
61988
|
|
|
61932
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
|
61989
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.1_@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
|
|
61933
61990
|
var import_handlebars = __toESM(require_lib());
|
|
61934
61991
|
function renderString(template, fullData, registers) {
|
|
61935
61992
|
const helpers = {
|
|
@@ -61943,7 +62000,7 @@ function renderString(template, fullData, registers) {
|
|
|
61943
62000
|
return import_handlebars.default.compile(template)(fullData) || "";
|
|
61944
62001
|
}
|
|
61945
62002
|
|
|
61946
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
|
62003
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.1_@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
|
|
61947
62004
|
var HandlebarsAPI = class {
|
|
61948
62005
|
async registerHelp(helpers) {
|
|
61949
62006
|
this.registers.helpers = {
|
|
@@ -61993,13 +62050,13 @@ var HandlebarsAPI = class {
|
|
|
61993
62050
|
}
|
|
61994
62051
|
};
|
|
61995
62052
|
|
|
61996
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
|
62053
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.1_@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
|
|
61997
62054
|
var import_ejs = __toESM(require_ejs());
|
|
61998
62055
|
function renderString2(template, fullData) {
|
|
61999
62056
|
return import_ejs.default.render(template, fullData) || "";
|
|
62000
62057
|
}
|
|
62001
62058
|
|
|
62002
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
|
62059
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.1_@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
|
|
62003
62060
|
var EjsAPI = class {
|
|
62004
62061
|
async renderTemplate(templateResource, target, parameters = {}) {
|
|
62005
62062
|
if (templateResource._type !== FS_RESOURCE) {
|
|
@@ -62032,7 +62089,7 @@ var EjsAPI = class {
|
|
|
62032
62089
|
}
|
|
62033
62090
|
};
|
|
62034
62091
|
|
|
62035
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.
|
|
62092
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.1_@modern-js+codesmith@2.3.1/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
|
|
62036
62093
|
var import_path8 = __toESM(require("path"));
|
|
62037
62094
|
var import_utils20 = require("@modern-js/utils");
|
|
62038
62095
|
var FsAPI = class {
|
|
@@ -62060,7 +62117,7 @@ var FsAPI = class {
|
|
|
62060
62117
|
}
|
|
62061
62118
|
};
|
|
62062
62119
|
|
|
62063
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
62120
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm-node/index.js
|
|
62064
62121
|
var import_lodash2 = require("@modern-js/utils/lodash");
|
|
62065
62122
|
|
|
62066
62123
|
// ../../../../node_modules/.pnpm/@formily+shared@2.2.24/node_modules/@formily/shared/esm/checkers.js
|
|
@@ -71695,10 +71752,10 @@ var Schema = (
|
|
|
71695
71752
|
}()
|
|
71696
71753
|
);
|
|
71697
71754
|
|
|
71698
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
71755
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
|
71699
71756
|
var import_inquirer = __toESM(require_inquirer());
|
|
71700
71757
|
|
|
71701
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
71758
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
|
|
71702
71759
|
var import_lodash = require("@modern-js/utils/lodash");
|
|
71703
71760
|
function validateSchema(schema) {
|
|
71704
71761
|
const { type, properties } = schema;
|
|
@@ -71790,7 +71847,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
|
71790
71847
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
|
71791
71848
|
}
|
|
71792
71849
|
|
|
71793
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
71850
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
|
71794
71851
|
var compileRule = (rule, scope) => {
|
|
71795
71852
|
const state = Schema.compile(rule, {
|
|
71796
71853
|
$self: {},
|
|
@@ -71894,7 +71951,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
|
|
|
71894
71951
|
return answers;
|
|
71895
71952
|
}
|
|
71896
71953
|
|
|
71897
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
71954
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
|
|
71898
71955
|
var CLIReader = class {
|
|
71899
71956
|
getAnswers() {
|
|
71900
71957
|
return this.answers;
|
|
@@ -71925,7 +71982,7 @@ var CLIReader = class {
|
|
|
71925
71982
|
}
|
|
71926
71983
|
};
|
|
71927
71984
|
|
|
71928
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
|
71985
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-formily/dist/esm-node/index.js
|
|
71929
71986
|
var FormilyAPI = class {
|
|
71930
71987
|
mergeAnswers(answers, configValue) {
|
|
71931
71988
|
const inputData = (0, import_lodash2.merge)(answers, configValue);
|
|
@@ -71948,7 +72005,7 @@ var FormilyAPI = class {
|
|
|
71948
72005
|
}
|
|
71949
72006
|
};
|
|
71950
72007
|
|
|
71951
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
72008
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
71952
72009
|
var import_inquirer3 = __toESM(require_inquirer2());
|
|
71953
72010
|
|
|
71954
72011
|
// ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.37.2/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
|
|
@@ -72014,7 +72071,7 @@ var I18n = class {
|
|
|
72014
72071
|
}
|
|
72015
72072
|
};
|
|
72016
72073
|
|
|
72017
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
72074
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
|
|
72018
72075
|
var ZH_LOCALE = {
|
|
72019
72076
|
environment: {
|
|
72020
72077
|
node_version: "请升级 Node 版本至 LIS",
|
|
@@ -72041,7 +72098,7 @@ var ZH_LOCALE = {
|
|
|
72041
72098
|
}
|
|
72042
72099
|
};
|
|
72043
72100
|
|
|
72044
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
72101
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
|
|
72045
72102
|
var EN_LOCALE = {
|
|
72046
72103
|
environment: {
|
|
72047
72104
|
node_version: "please upgrade node to lts version",
|
|
@@ -72068,14 +72125,14 @@ var EN_LOCALE = {
|
|
|
72068
72125
|
}
|
|
72069
72126
|
};
|
|
72070
72127
|
|
|
72071
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
72128
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
|
|
72072
72129
|
var i18n = new I18n();
|
|
72073
72130
|
var localeKeys = i18n.init("zh", {
|
|
72074
72131
|
zh: ZH_LOCALE,
|
|
72075
72132
|
en: EN_LOCALE
|
|
72076
72133
|
});
|
|
72077
72134
|
|
|
72078
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
72135
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
|
|
72079
72136
|
var import_lodash5 = require("@modern-js/utils/lodash");
|
|
72080
72137
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
|
72081
72138
|
for (const question of questions) {
|
|
@@ -72103,7 +72160,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
|
72103
72160
|
return questions;
|
|
72104
72161
|
}
|
|
72105
72162
|
|
|
72106
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
72163
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
|
|
72107
72164
|
var import_path10 = __toESM(require("path"));
|
|
72108
72165
|
var import_utils22 = require("@modern-js/utils");
|
|
72109
72166
|
var NODE_MAJOR_VERSION_MAP = {
|
|
@@ -72151,7 +72208,7 @@ async function checkUseNvm(cwd, logger2) {
|
|
|
72151
72208
|
}
|
|
72152
72209
|
}
|
|
72153
72210
|
|
|
72154
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
|
72211
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.1_@modern-js+codesmith@2.3.1_typescript@5.0.4/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
|
72155
72212
|
var AppAPI = class {
|
|
72156
72213
|
async checkEnvironment(nodeVersion) {
|
|
72157
72214
|
if (import_utils23.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
|
|
@@ -72240,6 +72297,7 @@ var AppAPI = class {
|
|
|
72240
72297
|
}
|
|
72241
72298
|
async forgeTemplate(templatePattern, filter, rename, parameters, type = "handlebars") {
|
|
72242
72299
|
try {
|
|
72300
|
+
this.generatorCore.logger.timing(`forgeTemplate`);
|
|
72243
72301
|
const { material } = this.generatorContext.current;
|
|
72244
72302
|
const resourceMap = await material.find(templatePattern, {
|
|
72245
72303
|
nodir: true,
|
|
@@ -72260,10 +72318,13 @@ var AppAPI = class {
|
|
|
72260
72318
|
this.generatorCore.logger.debug("base forging failed:", e);
|
|
72261
72319
|
this.generatorCore.logger.warn(i18n.t(localeKeys.templated.failed));
|
|
72262
72320
|
throw new Error("base forging failed");
|
|
72321
|
+
} finally {
|
|
72322
|
+
this.generatorCore.logger.timing(`forgeTemplate`, true);
|
|
72263
72323
|
}
|
|
72264
72324
|
}
|
|
72265
72325
|
async renderTemplateByFileType(templatePattern, filter, rename, parameters) {
|
|
72266
72326
|
try {
|
|
72327
|
+
this.generatorCore.logger.timing(`renderTemplateByFileType`);
|
|
72267
72328
|
const { material } = this.generatorContext.current;
|
|
72268
72329
|
const resourceMap = await material.find(templatePattern, {
|
|
72269
72330
|
nodir: true,
|
|
@@ -72294,6 +72355,8 @@ var AppAPI = class {
|
|
|
72294
72355
|
this.generatorCore.logger.debug("base forging failed:", e);
|
|
72295
72356
|
this.generatorCore.logger.warn(i18n.t(localeKeys.templated.failed));
|
|
72296
72357
|
throw new Error("base forging failed");
|
|
72358
|
+
} finally {
|
|
72359
|
+
this.generatorCore.logger.timing(`renderTemplateByFileType`, true);
|
|
72297
72360
|
}
|
|
72298
72361
|
}
|
|
72299
72362
|
async updateWorkspace(folder, workspaceName = "monorepo.code-workspace") {
|
|
@@ -72381,6 +72444,15 @@ var AppAPI = class {
|
|
|
72381
72444
|
}
|
|
72382
72445
|
};
|
|
72383
72446
|
|
|
72447
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_define_property.js
|
|
72448
|
+
function _define_property2(obj, key, value) {
|
|
72449
|
+
if (key in obj) {
|
|
72450
|
+
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
72451
|
+
} else
|
|
72452
|
+
obj[key] = value;
|
|
72453
|
+
return obj;
|
|
72454
|
+
}
|
|
72455
|
+
|
|
72384
72456
|
// ../../../cli/plugin-i18n/dist/esm-node/index.js
|
|
72385
72457
|
var import_lodash8 = require("@modern-js/utils/lodash");
|
|
72386
72458
|
|
|
@@ -72439,8 +72511,8 @@ var I18n2 = class {
|
|
|
72439
72511
|
};
|
|
72440
72512
|
}
|
|
72441
72513
|
constructor() {
|
|
72442
|
-
|
|
72443
|
-
|
|
72514
|
+
_define_property2(this, "language", "en");
|
|
72515
|
+
_define_property2(this, "languageMap", {});
|
|
72444
72516
|
}
|
|
72445
72517
|
};
|
|
72446
72518
|
|
|
@@ -72481,7 +72553,8 @@ var ZH_LOCALE2 = {
|
|
|
72481
72553
|
polyfill: "启用「基于 UA 的 Polyfill」功能",
|
|
72482
72554
|
proxy: "启用「全局代理」",
|
|
72483
72555
|
swc: "启用「SWC 编译」",
|
|
72484
|
-
rspack: "启用「Rspack 构建」(实验性)"
|
|
72556
|
+
rspack: "启用「Rspack 构建」(实验性)",
|
|
72557
|
+
module_doc: "启动「模块文档」功能"
|
|
72485
72558
|
},
|
|
72486
72559
|
element: {
|
|
72487
72560
|
self: "创建工程元素",
|
|
@@ -72579,7 +72652,8 @@ var EN_LOCALE2 = {
|
|
|
72579
72652
|
polyfill: "Enable UA-based Polyfill Feature",
|
|
72580
72653
|
proxy: "Enable Global Proxy",
|
|
72581
72654
|
swc: "Enable SWC Compile",
|
|
72582
|
-
rspack: "Enable Rspack Build (experimental)"
|
|
72655
|
+
rspack: "Enable Rspack Build (experimental)",
|
|
72656
|
+
module_doc: "Enable Module Doc"
|
|
72583
72657
|
},
|
|
72584
72658
|
element: {
|
|
72585
72659
|
self: "Create Element",
|
|
@@ -72652,10 +72726,6 @@ var BooleanConfig;
|
|
|
72652
72726
|
BooleanConfig2["NO"] = "no";
|
|
72653
72727
|
BooleanConfig2["YES"] = "yes";
|
|
72654
72728
|
})(BooleanConfig || (BooleanConfig = {}));
|
|
72655
|
-
var BooleanConfigName = {
|
|
72656
|
-
[BooleanConfig.NO]: () => i18n2.t(localeKeys2.boolean.no),
|
|
72657
|
-
[BooleanConfig.YES]: () => i18n2.t(localeKeys2.boolean.yes)
|
|
72658
|
-
};
|
|
72659
72729
|
|
|
72660
72730
|
// ../../generator-common/dist/esm-node/common/solution.js
|
|
72661
72731
|
var Solution;
|
|
@@ -72670,18 +72740,18 @@ var SubSolution;
|
|
|
72670
72740
|
SubSolution22["Module"] = "module";
|
|
72671
72741
|
})(SubSolution || (SubSolution = {}));
|
|
72672
72742
|
var SolutionText = {
|
|
72673
|
-
[
|
|
72674
|
-
[
|
|
72675
|
-
[
|
|
72743
|
+
["mwa"]: () => i18n2.t(localeKeys2.solution.mwa),
|
|
72744
|
+
["module"]: () => i18n2.t(localeKeys2.solution.module),
|
|
72745
|
+
["monorepo"]: () => i18n2.t(localeKeys2.solution.monorepo)
|
|
72676
72746
|
};
|
|
72677
72747
|
var SubSolutionText = {
|
|
72678
|
-
[
|
|
72679
|
-
[
|
|
72748
|
+
["mwa"]: () => i18n2.t(localeKeys2.sub_solution.mwa),
|
|
72749
|
+
["module"]: () => i18n2.t(localeKeys2.sub_solution.module)
|
|
72680
72750
|
};
|
|
72681
72751
|
var SolutionToolsMap = {
|
|
72682
|
-
[
|
|
72683
|
-
[
|
|
72684
|
-
[
|
|
72752
|
+
["mwa"]: "@modern-js/app-tools",
|
|
72753
|
+
["module"]: "@modern-js/module-tools",
|
|
72754
|
+
["monorepo"]: "@modern-js/monorepo-tools"
|
|
72685
72755
|
};
|
|
72686
72756
|
var getSolutionSchema = (extra = {}) => {
|
|
72687
72757
|
return {
|
|
@@ -72692,7 +72762,7 @@ var getSolutionSchema = (extra = {}) => {
|
|
|
72692
72762
|
title: extra.isMonorepo ? i18n2.t(localeKeys2.sub_solution.self) : i18n2.t(localeKeys2.solution.self),
|
|
72693
72763
|
enum: (() => {
|
|
72694
72764
|
var _extra_customPlugin_custom, _extra_customPlugin;
|
|
72695
|
-
const items = ((extra === null || extra === void 0 ? void 0 : extra.solutions) || Object.values((extra === null || extra === void 0 ? void 0 : extra.isMonorepo) ? SubSolution : Solution)).filter((solution) => !((extra === null || extra === void 0 ? void 0 : extra.isSubProject) && solution ===
|
|
72765
|
+
const items = ((extra === null || extra === void 0 ? void 0 : extra.solutions) || Object.values((extra === null || extra === void 0 ? void 0 : extra.isMonorepo) ? SubSolution : Solution)).filter((solution) => !((extra === null || extra === void 0 ? void 0 : extra.isSubProject) && solution === "monorepo")).map((solution) => ({
|
|
72696
72766
|
value: solution,
|
|
72697
72767
|
label: (extra === null || extra === void 0 ? void 0 : extra.isMonorepo) ? SubSolutionText[solution]() : SolutionText[solution]()
|
|
72698
72768
|
}));
|
|
@@ -72739,13 +72809,13 @@ var getScenesSchema = (extra = {}) => {
|
|
|
72739
72809
|
};
|
|
72740
72810
|
var BaseGenerator = "@modern-js/base-generator";
|
|
72741
72811
|
var SolutionGenerator = {
|
|
72742
|
-
[
|
|
72743
|
-
[
|
|
72744
|
-
[
|
|
72812
|
+
["mwa"]: "@modern-js/mwa-generator",
|
|
72813
|
+
["module"]: "@modern-js/module-generator",
|
|
72814
|
+
["monorepo"]: "@modern-js/monorepo-generator"
|
|
72745
72815
|
};
|
|
72746
72816
|
var SubSolutionGenerator = {
|
|
72747
|
-
[
|
|
72748
|
-
[
|
|
72817
|
+
["mwa"]: "@modern-js/mwa-generator",
|
|
72818
|
+
["module"]: "@modern-js/module-generator"
|
|
72749
72819
|
};
|
|
72750
72820
|
|
|
72751
72821
|
// ../../generator-common/dist/esm-node/common/language.js
|
|
@@ -72755,8 +72825,8 @@ var Language;
|
|
|
72755
72825
|
Language2["JS"] = "js";
|
|
72756
72826
|
})(Language || (Language = {}));
|
|
72757
72827
|
var LanguageName = {
|
|
72758
|
-
[
|
|
72759
|
-
[
|
|
72828
|
+
["ts"]: "TS",
|
|
72829
|
+
["js"]: "ES6+"
|
|
72760
72830
|
};
|
|
72761
72831
|
var getLanguageSchema = (_extra = {}) => {
|
|
72762
72832
|
return {
|
|
@@ -72777,15 +72847,15 @@ var PackageManager;
|
|
|
72777
72847
|
PackageManager2["Npm"] = "npm";
|
|
72778
72848
|
})(PackageManager || (PackageManager = {}));
|
|
72779
72849
|
var PackageManagerName = {
|
|
72780
|
-
[
|
|
72781
|
-
[
|
|
72782
|
-
[
|
|
72850
|
+
["pnpm"]: "pnpm",
|
|
72851
|
+
["yarn"]: "Yarn",
|
|
72852
|
+
["npm"]: "npm"
|
|
72783
72853
|
};
|
|
72784
72854
|
var getPackageManagerSchema = (extra = {}) => {
|
|
72785
72855
|
return {
|
|
72786
72856
|
type: "string",
|
|
72787
72857
|
title: i18n2.t(localeKeys2.packageManager.self),
|
|
72788
|
-
enum: Object.values(PackageManager).filter((packageManager) => (extra === null || extra === void 0 ? void 0 : extra.solution) === "monorepo" ? packageManager !==
|
|
72858
|
+
enum: Object.values(PackageManager).filter((packageManager) => (extra === null || extra === void 0 ? void 0 : extra.solution) === "monorepo" ? packageManager !== "npm" : true).map((packageManager) => ({
|
|
72789
72859
|
value: packageManager,
|
|
72790
72860
|
label: PackageManagerName[packageManager]
|
|
72791
72861
|
})),
|
|
@@ -72924,10 +72994,6 @@ var getBuildToolsSchema = (_extra = {}) => {
|
|
|
72924
72994
|
}))
|
|
72925
72995
|
};
|
|
72926
72996
|
};
|
|
72927
|
-
var FrameworkAppendTypeContent = {
|
|
72928
|
-
[Framework.Express]: `/// <reference types='@modern-js/plugin-express/types' />`,
|
|
72929
|
-
[Framework.Koa]: `/// <reference types='@modern-js/plugin-koa/types' />`
|
|
72930
|
-
};
|
|
72931
72997
|
|
|
72932
72998
|
// ../../generator-common/dist/esm-node/mwa/project.js
|
|
72933
72999
|
var getMWASchemaProperties = (extra) => {
|
|
@@ -72980,48 +73046,45 @@ var ActionFunction;
|
|
|
72980
73046
|
ActionFunction2["Proxy"] = "proxy";
|
|
72981
73047
|
ActionFunction2["SWC"] = "swc";
|
|
72982
73048
|
ActionFunction2["Rspack"] = "rspack";
|
|
73049
|
+
ActionFunction2["ModuleDoc"] = "module_doc";
|
|
72983
73050
|
})(ActionFunction || (ActionFunction = {}));
|
|
72984
73051
|
var ActionRefactor;
|
|
72985
73052
|
(function(ActionRefactor2) {
|
|
72986
73053
|
ActionRefactor2["ReactRouter5"] = "react_router_5";
|
|
72987
73054
|
})(ActionRefactor || (ActionRefactor = {}));
|
|
72988
73055
|
var ActionTypeText = {
|
|
72989
|
-
[
|
|
72990
|
-
[
|
|
72991
|
-
[
|
|
73056
|
+
["function"]: () => i18n2.t(localeKeys2.action.function.self),
|
|
73057
|
+
["element"]: () => i18n2.t(localeKeys2.action.element.self),
|
|
73058
|
+
["refactor"]: () => i18n2.t(localeKeys2.action.refactor.self)
|
|
72992
73059
|
};
|
|
72993
73060
|
var ActionTypeQuestionText = {
|
|
72994
|
-
[
|
|
72995
|
-
[
|
|
72996
|
-
[
|
|
73061
|
+
["function"]: () => i18n2.t(localeKeys2.action.function.question),
|
|
73062
|
+
["element"]: () => i18n2.t(localeKeys2.action.element.question),
|
|
73063
|
+
["refactor"]: () => i18n2.t(localeKeys2.action.refactor.question)
|
|
72997
73064
|
};
|
|
72998
73065
|
var ActionElementText = {
|
|
72999
|
-
[
|
|
73000
|
-
[
|
|
73066
|
+
["entry"]: () => i18n2.t(localeKeys2.action.element.entry),
|
|
73067
|
+
["server"]: () => i18n2.t(localeKeys2.action.element.server)
|
|
73001
73068
|
};
|
|
73002
73069
|
var ActionFunctionText = {
|
|
73003
|
-
[
|
|
73004
|
-
[
|
|
73005
|
-
[
|
|
73006
|
-
[
|
|
73007
|
-
[
|
|
73008
|
-
[
|
|
73009
|
-
[
|
|
73010
|
-
[
|
|
73011
|
-
[
|
|
73012
|
-
[
|
|
73013
|
-
[
|
|
73014
|
-
[
|
|
73015
|
-
[
|
|
73016
|
-
[
|
|
73070
|
+
["tailwindcss"]: () => i18n2.t(localeKeys2.action.function.tailwindcss),
|
|
73071
|
+
["bff"]: () => i18n2.t(localeKeys2.action.function.bff),
|
|
73072
|
+
["micro_frontend"]: () => i18n2.t(localeKeys2.action.function.micro_frontend),
|
|
73073
|
+
["i18n"]: () => i18n2.t(localeKeys2.action.function.i18n),
|
|
73074
|
+
["test"]: () => i18n2.t(localeKeys2.action.function.test),
|
|
73075
|
+
["e2e_test"]: () => i18n2.t(localeKeys2.action.function.e2e_test),
|
|
73076
|
+
["storybook"]: () => i18n2.t(localeKeys2.action.function.storybook),
|
|
73077
|
+
["storybookV7"]: () => i18n2.t(localeKeys2.action.function.storybookV7),
|
|
73078
|
+
["runtimeApi"]: () => i18n2.t(localeKeys2.action.function.runtime_api),
|
|
73079
|
+
["ssg"]: () => i18n2.t(localeKeys2.action.function.ssg),
|
|
73080
|
+
["polyfill"]: () => i18n2.t(localeKeys2.action.function.polyfill),
|
|
73081
|
+
["proxy"]: () => i18n2.t(localeKeys2.action.function.proxy),
|
|
73082
|
+
["swc"]: () => i18n2.t(localeKeys2.action.function.swc),
|
|
73083
|
+
["rspack"]: () => i18n2.t(localeKeys2.action.function.rspack),
|
|
73084
|
+
["module_doc"]: () => i18n2.t(localeKeys2.action.function.module_doc)
|
|
73017
73085
|
};
|
|
73018
73086
|
var ActionRefactorText = {
|
|
73019
|
-
[
|
|
73020
|
-
};
|
|
73021
|
-
var ActionTypeTextMap = {
|
|
73022
|
-
[ActionType.Element]: ActionElementText,
|
|
73023
|
-
[ActionType.Function]: ActionFunctionText,
|
|
73024
|
-
[ActionType.Refactor]: ActionRefactorText
|
|
73087
|
+
["react_router_5"]: () => i18n2.t(localeKeys2.action.refactor.react_router_5)
|
|
73025
73088
|
};
|
|
73026
73089
|
|
|
73027
73090
|
// ../../generator-common/dist/esm-node/newAction/mwa/index.js
|
|
@@ -73238,9 +73301,9 @@ var ModuleActionTypes = [
|
|
|
73238
73301
|
var ModuleActionFunctions = [
|
|
73239
73302
|
ActionFunction.Test,
|
|
73240
73303
|
ActionFunction.TailwindCSS,
|
|
73241
|
-
ActionFunction.Storybook,
|
|
73242
73304
|
ActionFunction.StorybookV7,
|
|
73243
|
-
ActionFunction.RuntimeApi
|
|
73305
|
+
ActionFunction.RuntimeApi,
|
|
73306
|
+
ActionFunction.ModuleDoc
|
|
73244
73307
|
];
|
|
73245
73308
|
var ModuleActionTypesMap = {
|
|
73246
73309
|
[ActionType.Function]: ModuleActionFunctions
|
|
@@ -73285,11 +73348,11 @@ var getModuleNewActionSchema = (extra = {}) => {
|
|
|
73285
73348
|
};
|
|
73286
73349
|
};
|
|
73287
73350
|
var ModuleActionFunctionsDevDependencies = {
|
|
73288
|
-
[ActionFunction.Storybook]: "@modern-js/plugin-storybook",
|
|
73289
73351
|
[ActionFunction.StorybookV7]: "@modern-js/storybook",
|
|
73290
73352
|
[ActionFunction.Test]: "@modern-js/plugin-testing",
|
|
73291
73353
|
[ActionFunction.RuntimeApi]: "@modern-js/runtime",
|
|
73292
|
-
[ActionFunction.TailwindCSS]: "tailwindcss"
|
|
73354
|
+
[ActionFunction.TailwindCSS]: "tailwindcss",
|
|
73355
|
+
[ActionFunction.ModuleDoc]: "@modern-js/plugin-rspress"
|
|
73293
73356
|
};
|
|
73294
73357
|
var ModuleActionFunctionsPeerDependencies = {
|
|
73295
73358
|
[ActionFunction.RuntimeApi]: "@modern-js/runtime",
|
|
@@ -73302,15 +73365,15 @@ var ModuleNewActionGenerators = {
|
|
|
73302
73365
|
[ActionType.Function]: {
|
|
73303
73366
|
[ActionFunction.Test]: "@modern-js/module-test-generator",
|
|
73304
73367
|
[ActionFunction.TailwindCSS]: "@modern-js/tailwindcss-generator",
|
|
73305
|
-
[ActionFunction.Storybook]: "@modern-js/storybook-generator",
|
|
73306
73368
|
[ActionFunction.StorybookV7]: "@modern-js/storybook-next-generator",
|
|
73307
|
-
[ActionFunction.RuntimeApi]: "@modern-js/dependence-generator"
|
|
73369
|
+
[ActionFunction.RuntimeApi]: "@modern-js/dependence-generator",
|
|
73370
|
+
[ActionFunction.ModuleDoc]: "@modern-js/module-doc-generator"
|
|
73308
73371
|
}
|
|
73309
73372
|
};
|
|
73310
73373
|
var ModuleNewActionPluginName = {
|
|
73311
73374
|
[ActionType.Function]: {
|
|
73312
73375
|
[ActionFunction.TailwindCSS]: "tailwindcssPlugin",
|
|
73313
|
-
[ActionFunction.
|
|
73376
|
+
[ActionFunction.ModuleDoc]: "modulePluginDoc",
|
|
73314
73377
|
[ActionFunction.Test]: "testPlugin"
|
|
73315
73378
|
}
|
|
73316
73379
|
};
|
|
@@ -73318,7 +73381,7 @@ var ModuleNewActionPluginDependence = {
|
|
|
73318
73381
|
[ActionType.Function]: {
|
|
73319
73382
|
[ActionFunction.Test]: "@modern-js/plugin-testing",
|
|
73320
73383
|
[ActionFunction.TailwindCSS]: "@modern-js/plugin-tailwindcss",
|
|
73321
|
-
[ActionFunction.
|
|
73384
|
+
[ActionFunction.ModuleDoc]: "@modern-js/plugin-rspress"
|
|
73322
73385
|
}
|
|
73323
73386
|
};
|
|
73324
73387
|
|
|
@@ -73353,7 +73416,7 @@ var SolutionSchemas = {
|
|
|
73353
73416
|
custom: getBaseSchema
|
|
73354
73417
|
};
|
|
73355
73418
|
|
|
73356
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
|
73419
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_async_to_generator.js
|
|
73357
73420
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
73358
73421
|
try {
|
|
73359
73422
|
var info = gen[key](arg);
|
|
@@ -73383,13 +73446,13 @@ function _async_to_generator(fn) {
|
|
|
73383
73446
|
};
|
|
73384
73447
|
}
|
|
73385
73448
|
|
|
73386
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
|
73449
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_class_call_check.js
|
|
73387
73450
|
function _class_call_check(instance, Constructor) {
|
|
73388
73451
|
if (!(instance instanceof Constructor))
|
|
73389
73452
|
throw new TypeError("Cannot call a class as a function");
|
|
73390
73453
|
}
|
|
73391
73454
|
|
|
73392
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
|
73455
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_create_class.js
|
|
73393
73456
|
function _defineProperties(target, props) {
|
|
73394
73457
|
for (var i = 0; i < props.length; i++) {
|
|
73395
73458
|
var descriptor = props[i];
|
|
@@ -73408,7 +73471,7 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
|
73408
73471
|
return Constructor;
|
|
73409
73472
|
}
|
|
73410
73473
|
|
|
73411
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
|
73474
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_spread.js
|
|
73412
73475
|
function _object_spread(target) {
|
|
73413
73476
|
for (var i = 1; i < arguments.length; i++) {
|
|
73414
73477
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -73421,13 +73484,13 @@ function _object_spread(target) {
|
|
|
73421
73484
|
);
|
|
73422
73485
|
}
|
|
73423
73486
|
ownKeys2.forEach(function(key) {
|
|
73424
|
-
|
|
73487
|
+
_define_property2(target, key, source[key]);
|
|
73425
73488
|
});
|
|
73426
73489
|
}
|
|
73427
73490
|
return target;
|
|
73428
73491
|
}
|
|
73429
73492
|
|
|
73430
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
|
73493
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_spread_props.js
|
|
73431
73494
|
function ownKeys(object, enumerableOnly) {
|
|
73432
73495
|
var keys = Object.keys(object);
|
|
73433
73496
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -73453,7 +73516,7 @@ function _object_spread_props(target, source) {
|
|
|
73453
73516
|
return target;
|
|
73454
73517
|
}
|
|
73455
73518
|
|
|
73456
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
|
73519
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_without_properties_loose.js
|
|
73457
73520
|
function _object_without_properties_loose(source, excluded) {
|
|
73458
73521
|
if (source == null)
|
|
73459
73522
|
return {};
|
|
@@ -73469,7 +73532,7 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
73469
73532
|
return target;
|
|
73470
73533
|
}
|
|
73471
73534
|
|
|
73472
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
|
73535
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_object_without_properties.js
|
|
73473
73536
|
function _object_without_properties(source, excluded) {
|
|
73474
73537
|
if (source == null)
|
|
73475
73538
|
return {};
|
|
@@ -73489,7 +73552,7 @@ function _object_without_properties(source, excluded) {
|
|
|
73489
73552
|
return target;
|
|
73490
73553
|
}
|
|
73491
73554
|
|
|
73492
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
|
73555
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_array_like_to_array.js
|
|
73493
73556
|
function _array_like_to_array(arr, len) {
|
|
73494
73557
|
if (len == null || len > arr.length)
|
|
73495
73558
|
len = arr.length;
|
|
@@ -73498,25 +73561,25 @@ function _array_like_to_array(arr, len) {
|
|
|
73498
73561
|
return arr2;
|
|
73499
73562
|
}
|
|
73500
73563
|
|
|
73501
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
|
73564
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_array_without_holes.js
|
|
73502
73565
|
function _array_without_holes(arr) {
|
|
73503
73566
|
if (Array.isArray(arr))
|
|
73504
73567
|
return _array_like_to_array(arr);
|
|
73505
73568
|
}
|
|
73506
73569
|
|
|
73507
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
|
73570
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_iterable_to_array.js
|
|
73508
73571
|
function _iterable_to_array(iter) {
|
|
73509
73572
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
|
|
73510
73573
|
return Array.from(iter);
|
|
73511
73574
|
}
|
|
73512
73575
|
}
|
|
73513
73576
|
|
|
73514
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
|
73577
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_non_iterable_spread.js
|
|
73515
73578
|
function _non_iterable_spread() {
|
|
73516
73579
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
73517
73580
|
}
|
|
73518
73581
|
|
|
73519
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
|
73582
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_unsupported_iterable_to_array.js
|
|
73520
73583
|
function _unsupported_iterable_to_array(o, minLen) {
|
|
73521
73584
|
if (!o)
|
|
73522
73585
|
return;
|
|
@@ -73531,7 +73594,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
73531
73594
|
return _array_like_to_array(o, minLen);
|
|
73532
73595
|
}
|
|
73533
73596
|
|
|
73534
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.
|
|
73597
|
+
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.3/node_modules/@swc/helpers/esm/_to_consumable_array.js
|
|
73535
73598
|
function _to_consumable_array(arr) {
|
|
73536
73599
|
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
73537
73600
|
}
|
|
@@ -73741,11 +73804,11 @@ var import_lodash14 = require("@modern-js/utils/lodash");
|
|
|
73741
73804
|
// ../../generator-plugin/dist/esm/context/file.js
|
|
73742
73805
|
var import_path13 = __toESM(require("path"));
|
|
73743
73806
|
|
|
73744
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
|
73807
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
73745
73808
|
var import_comment_json2 = __toESM(require_src2());
|
|
73746
73809
|
var declarationUpdate = __toESM(require_dist());
|
|
73747
73810
|
|
|
73748
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
|
73811
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/utils/index.js
|
|
73749
73812
|
async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
73750
73813
|
const originJsonValue = await resource.value();
|
|
73751
73814
|
const newJsonString = await getNewJsonValue(originJsonValue.content);
|
|
@@ -73758,7 +73821,7 @@ async function editJson(generatorCore, resource, getNewJsonValue) {
|
|
|
73758
73821
|
return newJsonString;
|
|
73759
73822
|
}
|
|
73760
73823
|
|
|
73761
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.
|
|
73824
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-json@2.3.1/node_modules/@modern-js/codesmith-api-json/dist/esm-node/index.js
|
|
73762
73825
|
var JsonAPI = class {
|
|
73763
73826
|
async get(resource) {
|
|
73764
73827
|
const originJsonValue = await resource.value();
|
|
@@ -73898,7 +73961,7 @@ function _addFile() {
|
|
|
73898
73961
|
case 2:
|
|
73899
73962
|
_state.sent();
|
|
73900
73963
|
absTemplatePath = config.templateFile ? import_path12.default.join(templatePath, config.templateFile) : null;
|
|
73901
|
-
if (!(absTemplatePath != null && (config.type ===
|
|
73964
|
+
if (!(absTemplatePath != null && (config.type === "binary" || Object.keys(config.data || {}).length === 0)))
|
|
73902
73965
|
return [
|
|
73903
73966
|
3,
|
|
73904
73967
|
5
|
|
@@ -74059,8 +74122,8 @@ var PluginHandlebarsAPI = /* @__PURE__ */ function() {
|
|
|
74059
74122
|
"use strict";
|
|
74060
74123
|
function PluginHandlebarsAPI2() {
|
|
74061
74124
|
_class_call_check(this, PluginHandlebarsAPI2);
|
|
74062
|
-
|
|
74063
|
-
|
|
74125
|
+
_define_property2(this, "helpers", {});
|
|
74126
|
+
_define_property2(this, "partials", {});
|
|
74064
74127
|
}
|
|
74065
74128
|
_create_class(PluginHandlebarsAPI2, [
|
|
74066
74129
|
{
|
|
@@ -74132,11 +74195,11 @@ var PluginFileAPI = /* @__PURE__ */ function() {
|
|
|
74132
74195
|
"use strict";
|
|
74133
74196
|
function PluginFileAPI2() {
|
|
74134
74197
|
_class_call_check(this, PluginFileAPI2);
|
|
74135
|
-
|
|
74136
|
-
|
|
74137
|
-
|
|
74138
|
-
|
|
74139
|
-
|
|
74198
|
+
_define_property2(this, "projectPath", "");
|
|
74199
|
+
_define_property2(this, "templatePath", "");
|
|
74200
|
+
_define_property2(this, "handlebarAPI", new PluginHandlebarsAPI());
|
|
74201
|
+
_define_property2(this, "ejsAPI", new PluginEjsAPI());
|
|
74202
|
+
_define_property2(this, "jsonAPI", void 0);
|
|
74140
74203
|
this.renderString = this.renderString.bind(this);
|
|
74141
74204
|
}
|
|
74142
74205
|
_create_class(PluginFileAPI2, [
|
|
@@ -74444,9 +74507,9 @@ var PluginGitAPI = /* @__PURE__ */ function() {
|
|
|
74444
74507
|
"use strict";
|
|
74445
74508
|
function PluginGitAPI2() {
|
|
74446
74509
|
_class_call_check(this, PluginGitAPI2);
|
|
74447
|
-
|
|
74448
|
-
|
|
74449
|
-
|
|
74510
|
+
_define_property2(this, "gitMessage", "");
|
|
74511
|
+
_define_property2(this, "gitApi", void 0);
|
|
74512
|
+
_define_property2(this, "projectPath", void 0);
|
|
74450
74513
|
}
|
|
74451
74514
|
_create_class(PluginGitAPI2, [
|
|
74452
74515
|
{
|
|
@@ -74549,11 +74612,11 @@ var PluginInputContext = /* @__PURE__ */ function() {
|
|
|
74549
74612
|
"use strict";
|
|
74550
74613
|
function PluginInputContext2(solutionSchema) {
|
|
74551
74614
|
_class_call_check(this, PluginInputContext2);
|
|
74552
|
-
|
|
74553
|
-
|
|
74554
|
-
|
|
74555
|
-
|
|
74556
|
-
|
|
74615
|
+
_define_property2(this, "inputValue", {});
|
|
74616
|
+
_define_property2(this, "defaultConfig", {});
|
|
74617
|
+
_define_property2(this, "solutionSchemaFunc", void 0);
|
|
74618
|
+
_define_property2(this, "solutionSchema", {});
|
|
74619
|
+
_define_property2(this, "extendInputMap", {});
|
|
74557
74620
|
this.solutionSchemaFunc = solutionSchema;
|
|
74558
74621
|
}
|
|
74559
74622
|
_create_class(PluginInputContext2, [
|
|
@@ -74611,7 +74674,7 @@ var PluginInputContext = /* @__PURE__ */ function() {
|
|
|
74611
74674
|
this.extendInputMap[key].before[inputKey] = properties[inputKey];
|
|
74612
74675
|
} else {
|
|
74613
74676
|
this.extendInputMap[key] = {
|
|
74614
|
-
before:
|
|
74677
|
+
before: _define_property2({}, inputKey, properties[inputKey]),
|
|
74615
74678
|
after: {}
|
|
74616
74679
|
};
|
|
74617
74680
|
}
|
|
@@ -74647,7 +74710,7 @@ var PluginInputContext = /* @__PURE__ */ function() {
|
|
|
74647
74710
|
} else {
|
|
74648
74711
|
this.extendInputMap[key] = {
|
|
74649
74712
|
before: {},
|
|
74650
|
-
after:
|
|
74713
|
+
after: _define_property2({}, inputKey, properties[inputKey])
|
|
74651
74714
|
};
|
|
74652
74715
|
}
|
|
74653
74716
|
}
|
|
@@ -74754,8 +74817,8 @@ var PluginNpmAPI = /* @__PURE__ */ function() {
|
|
|
74754
74817
|
"use strict";
|
|
74755
74818
|
function PluginNpmAPI2(projectPath, packageManager) {
|
|
74756
74819
|
_class_call_check(this, PluginNpmAPI2);
|
|
74757
|
-
|
|
74758
|
-
|
|
74820
|
+
_define_property2(this, "projectPath", "");
|
|
74821
|
+
_define_property2(this, "packageManager", void 0);
|
|
74759
74822
|
this.projectPath = projectPath;
|
|
74760
74823
|
this.packageManager = packageManager;
|
|
74761
74824
|
}
|
|
@@ -75023,7 +75086,7 @@ var ModuleNewAction = async (options) => {
|
|
|
75023
75086
|
}
|
|
75024
75087
|
});
|
|
75025
75088
|
if (!hasOption) {
|
|
75026
|
-
smith.logger.warn("
|
|
75089
|
+
smith.logger.warn("No option can be enabled, exit 1.", funcMap);
|
|
75027
75090
|
process.exit(1);
|
|
75028
75091
|
}
|
|
75029
75092
|
const ans = await formilyAPI.getInputBySchemaFunc(getModuleNewActionSchema, {
|
|
@@ -75069,7 +75132,8 @@ var ModuleNewAction = async (options) => {
|
|
|
75069
75132
|
} : {},
|
|
75070
75133
|
pluginName: ModuleNewActionPluginName[actionType][action2],
|
|
75071
75134
|
pluginDependence: ModuleNewActionPluginDependence[actionType][action2],
|
|
75072
|
-
shouldUsePluginNameExport
|
|
75135
|
+
shouldUsePluginNameExport,
|
|
75136
|
+
isModuleProject: true
|
|
75073
75137
|
});
|
|
75074
75138
|
const task = [
|
|
75075
75139
|
{
|
|
@@ -75153,9 +75217,9 @@ var PluginNewAPI = /* @__PURE__ */ function() {
|
|
|
75153
75217
|
"use strict";
|
|
75154
75218
|
function PluginNewAPI2(solution, projectPath, inputData) {
|
|
75155
75219
|
_class_call_check(this, PluginNewAPI2);
|
|
75156
|
-
|
|
75157
|
-
|
|
75158
|
-
|
|
75220
|
+
_define_property2(this, "solution", void 0);
|
|
75221
|
+
_define_property2(this, "projectPath", void 0);
|
|
75222
|
+
_define_property2(this, "inputData", void 0);
|
|
75159
75223
|
this.solution = solution;
|
|
75160
75224
|
this.projectPath = projectPath;
|
|
75161
75225
|
this.inputData = inputData;
|
|
@@ -75324,16 +75388,16 @@ var PluginContext = /* @__PURE__ */ function() {
|
|
|
75324
75388
|
"use strict";
|
|
75325
75389
|
function PluginContext2(solutionSchema, locale) {
|
|
75326
75390
|
_class_call_check(this, PluginContext2);
|
|
75327
|
-
|
|
75328
|
-
|
|
75329
|
-
|
|
75330
|
-
|
|
75331
|
-
|
|
75332
|
-
|
|
75333
|
-
|
|
75391
|
+
_define_property2(this, "generator", void 0);
|
|
75392
|
+
_define_property2(this, "inputContext", void 0);
|
|
75393
|
+
_define_property2(this, "gitAPI", void 0);
|
|
75394
|
+
_define_property2(this, "fileAPI", void 0);
|
|
75395
|
+
_define_property2(this, "npmAPI", void 0);
|
|
75396
|
+
_define_property2(this, "newAPI", void 0);
|
|
75397
|
+
_define_property2(this, "locale", void 0);
|
|
75334
75398
|
var _obj;
|
|
75335
|
-
|
|
75336
|
-
}),
|
|
75399
|
+
_define_property2(this, "lifeCycleFuncMap", (_obj = {}, _define_property2(_obj, "onForged", function() {
|
|
75400
|
+
}), _define_property2(_obj, "afterForged", function() {
|
|
75337
75401
|
}), _obj));
|
|
75338
75402
|
this.inputContext = new PluginInputContext(solutionSchema);
|
|
75339
75403
|
this.gitAPI = new PluginGitAPI();
|
|
@@ -75377,13 +75441,13 @@ var PluginContext = /* @__PURE__ */ function() {
|
|
|
75377
75441
|
{
|
|
75378
75442
|
key: "onForged",
|
|
75379
75443
|
value: function onForged(func) {
|
|
75380
|
-
this.lifeCycleFuncMap[
|
|
75444
|
+
this.lifeCycleFuncMap["onForged"] = func;
|
|
75381
75445
|
}
|
|
75382
75446
|
},
|
|
75383
75447
|
{
|
|
75384
75448
|
key: "afterForged",
|
|
75385
75449
|
value: function afterForged(func) {
|
|
75386
|
-
this.lifeCycleFuncMap[
|
|
75450
|
+
this.lifeCycleFuncMap["afterForged"] = func;
|
|
75387
75451
|
}
|
|
75388
75452
|
}
|
|
75389
75453
|
]);
|
|
@@ -75552,11 +75616,11 @@ var GeneratorPlugin = /* @__PURE__ */ function() {
|
|
|
75552
75616
|
function GeneratorPlugin2(logger2, event) {
|
|
75553
75617
|
var locale = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "en";
|
|
75554
75618
|
_class_call_check(this, GeneratorPlugin2);
|
|
75555
|
-
|
|
75556
|
-
|
|
75557
|
-
|
|
75558
|
-
|
|
75559
|
-
|
|
75619
|
+
_define_property2(this, "plugins", []);
|
|
75620
|
+
_define_property2(this, "extendPlugin", {});
|
|
75621
|
+
_define_property2(this, "customPlugin", {});
|
|
75622
|
+
_define_property2(this, "event", void 0);
|
|
75623
|
+
_define_property2(this, "logger", void 0);
|
|
75560
75624
|
this.event = event;
|
|
75561
75625
|
this.logger = logger2;
|
|
75562
75626
|
if (event) {
|