@modern-js/repo-generator 0.0.0-nightly-20231120170640 → 0.0.0-nightly-20231122170633

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.
Files changed (2) hide show
  1. package/dist/index.js +127 -88
  2. package/package.json +11 -11
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.1.13/node_modules/tar/lib/high-level-opt.js
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.1.13/node_modules/tar/lib/high-level-opt.js"(exports, module2) {
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@4.2.5/node_modules/minipass/index.js
10793
+ // ../../../../node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/index.js
10794
10794
  var require_minipass = __commonJS({
10795
- "../../../../node_modules/.pnpm/minipass@4.2.5/node_modules/minipass/index.js"(exports, module2) {
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
- module2.exports = Minipass;
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.1.13/node_modules/tar/lib/normalize-windows-path.js
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.1.13/node_modules/tar/lib/normalize-windows-path.js"(exports, module2) {
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.1.13/node_modules/tar/lib/read-entry.js
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.1.13/node_modules/tar/lib/read-entry.js"(exports, module2) {
12316
+ "../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/read-entry.js"(exports, module2) {
12317
12317
  "use strict";
12318
- var MiniPass = require_minipass();
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 MiniPass {
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.1.13/node_modules/tar/lib/types.js
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.1.13/node_modules/tar/lib/types.js"(exports) {
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.1.13/node_modules/tar/lib/large-numbers.js
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.1.13/node_modules/tar/lib/large-numbers.js"(exports, module2) {
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.1.13/node_modules/tar/lib/header.js
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.1.13/node_modules/tar/lib/header.js"(exports, module2) {
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.1.13/node_modules/tar/lib/pax.js
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.1.13/node_modules/tar/lib/pax.js"(exports, module2) {
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.1.13/node_modules/tar/lib/strip-trailing-slashes.js
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.1.13/node_modules/tar/lib/strip-trailing-slashes.js"(exports, module2) {
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.1.13/node_modules/tar/lib/warn-mixin.js
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.1.13/node_modules/tar/lib/warn-mixin.js"(exports, module2) {
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.1.13/node_modules/tar/lib/winchars.js
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.1.13/node_modules/tar/lib/winchars.js"(exports, module2) {
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.1.13/node_modules/tar/lib/strip-absolute-path.js
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.1.13/node_modules/tar/lib/strip-absolute-path.js"(exports, module2) {
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.1.13/node_modules/tar/lib/mode-fix.js
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.1.13/node_modules/tar/lib/mode-fix.js"(exports, module2) {
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.1.13/node_modules/tar/lib/write-entry.js
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.1.13/node_modules/tar/lib/write-entry.js"(exports, module2) {
12979
+ "../../../../node_modules/.pnpm/tar@6.2.0/node_modules/tar/lib/write-entry.js"(exports, module2) {
12980
12980
  "use strict";
12981
- var MiniPass = require_minipass();
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 MiniPass {
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 MiniPass {
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.1.13/node_modules/tar/lib/pack.js
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.1.13/node_modules/tar/lib/pack.js"(exports, module2) {
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 MiniPass = require_minipass();
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 MiniPass {
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 (typeof opt.gzip !== "object") {
13896
- opt.gzip = {};
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 (this.portable) {
13899
- opt.gzip.portable = true;
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.1.13/node_modules/tar/lib/parse.js
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.1.13/node_modules/tar/lib/parse.js"(exports, module2) {
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
- if (this[UNZIP] === null && chunk) {
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
- if (this[UNZIP] === null) {
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.1.13/node_modules/tar/lib/list.js
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.1.13/node_modules/tar/lib/list.js"(exports, module2) {
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.1.13/node_modules/tar/lib/create.js
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.1.13/node_modules/tar/lib/create.js"(exports, module2) {
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.1.13/node_modules/tar/lib/replace.js
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.1.13/node_modules/tar/lib/replace.js"(exports, module2) {
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.1.13/node_modules/tar/lib/update.js
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.1.13/node_modules/tar/lib/update.js"(exports, module2) {
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.1.13/node_modules/tar/lib/mkdir.js
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.1.13/node_modules/tar/lib/mkdir.js"(exports, module2) {
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.1.13/node_modules/tar/lib/normalize-unicode.js
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.1.13/node_modules/tar/lib/normalize-unicode.js"(exports, module2) {
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("NFKD");
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.1.13/node_modules/tar/lib/path-reservations.js
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.1.13/node_modules/tar/lib/path-reservations.js"(exports, module2) {
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 normalize(stripSlashes(join(p))).toLowerCase();
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.1.13/node_modules/tar/lib/get-write-flag.js
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.1.13/node_modules/tar/lib/get-write-flag.js"(exports, module2) {
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.1.13/node_modules/tar/lib/unpack.js
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.1.13/node_modules/tar/lib/unpack.js"(exports, module2) {
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) => normalize(stripSlash(normPath(path19))).toLowerCase();
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.1.13/node_modules/tar/lib/extract.js
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.1.13/node_modules/tar/lib/extract.js"(exports, module2) {
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.1.13/node_modules/tar/index.js
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.1.13/node_modules/tar/index.js"(exports) {
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();
@@ -72490,7 +72524,8 @@ var ZH_LOCALE2 = {
72490
72524
  polyfill: "启用「基于 UA 的 Polyfill」功能",
72491
72525
  proxy: "启用「全局代理」",
72492
72526
  swc: "启用「SWC 编译」",
72493
- rspack: "启用「Rspack 构建」(实验性)"
72527
+ rspack: "启用「Rspack 构建」(实验性)",
72528
+ module_doc: "启动「模块文档」功能"
72494
72529
  },
72495
72530
  element: {
72496
72531
  self: "创建工程元素",
@@ -72588,7 +72623,8 @@ var EN_LOCALE2 = {
72588
72623
  polyfill: "Enable UA-based Polyfill Feature",
72589
72624
  proxy: "Enable Global Proxy",
72590
72625
  swc: "Enable SWC Compile",
72591
- rspack: "Enable Rspack Build (experimental)"
72626
+ rspack: "Enable Rspack Build (experimental)",
72627
+ module_doc: "Enable Module Doc"
72592
72628
  },
72593
72629
  element: {
72594
72630
  self: "Create Element",
@@ -72981,6 +73017,7 @@ var ActionFunction;
72981
73017
  ActionFunction2["Proxy"] = "proxy";
72982
73018
  ActionFunction2["SWC"] = "swc";
72983
73019
  ActionFunction2["Rspack"] = "rspack";
73020
+ ActionFunction2["ModuleDoc"] = "module_doc";
72984
73021
  })(ActionFunction || (ActionFunction = {}));
72985
73022
  var ActionRefactor;
72986
73023
  (function(ActionRefactor2) {
@@ -73014,7 +73051,8 @@ var ActionFunctionText = {
73014
73051
  ["polyfill"]: () => i18n2.t(localeKeys2.action.function.polyfill),
73015
73052
  ["proxy"]: () => i18n2.t(localeKeys2.action.function.proxy),
73016
73053
  ["swc"]: () => i18n2.t(localeKeys2.action.function.swc),
73017
- ["rspack"]: () => i18n2.t(localeKeys2.action.function.rspack)
73054
+ ["rspack"]: () => i18n2.t(localeKeys2.action.function.rspack),
73055
+ ["module_doc"]: () => i18n2.t(localeKeys2.action.function.module_doc)
73018
73056
  };
73019
73057
  var ActionRefactorText = {
73020
73058
  ["react_router_5"]: () => i18n2.t(localeKeys2.action.refactor.react_router_5)
@@ -73234,9 +73272,9 @@ var ModuleActionTypes = [
73234
73272
  var ModuleActionFunctions = [
73235
73273
  ActionFunction.Test,
73236
73274
  ActionFunction.TailwindCSS,
73237
- ActionFunction.Storybook,
73238
73275
  ActionFunction.StorybookV7,
73239
- ActionFunction.RuntimeApi
73276
+ ActionFunction.RuntimeApi,
73277
+ ActionFunction.ModuleDoc
73240
73278
  ];
73241
73279
  var ModuleActionTypesMap = {
73242
73280
  [ActionType.Function]: ModuleActionFunctions
@@ -73281,11 +73319,11 @@ var getModuleNewActionSchema = (extra = {}) => {
73281
73319
  };
73282
73320
  };
73283
73321
  var ModuleActionFunctionsDevDependencies = {
73284
- [ActionFunction.Storybook]: "@modern-js/plugin-storybook",
73285
73322
  [ActionFunction.StorybookV7]: "@modern-js/storybook",
73286
73323
  [ActionFunction.Test]: "@modern-js/plugin-testing",
73287
73324
  [ActionFunction.RuntimeApi]: "@modern-js/runtime",
73288
- [ActionFunction.TailwindCSS]: "tailwindcss"
73325
+ [ActionFunction.TailwindCSS]: "tailwindcss",
73326
+ [ActionFunction.ModuleDoc]: "@modern-js/plugin-rspress"
73289
73327
  };
73290
73328
  var ModuleActionFunctionsPeerDependencies = {
73291
73329
  [ActionFunction.RuntimeApi]: "@modern-js/runtime",
@@ -73298,15 +73336,15 @@ var ModuleNewActionGenerators = {
73298
73336
  [ActionType.Function]: {
73299
73337
  [ActionFunction.Test]: "@modern-js/module-test-generator",
73300
73338
  [ActionFunction.TailwindCSS]: "@modern-js/tailwindcss-generator",
73301
- [ActionFunction.Storybook]: "@modern-js/storybook-generator",
73302
73339
  [ActionFunction.StorybookV7]: "@modern-js/storybook-next-generator",
73303
- [ActionFunction.RuntimeApi]: "@modern-js/dependence-generator"
73340
+ [ActionFunction.RuntimeApi]: "@modern-js/dependence-generator",
73341
+ [ActionFunction.ModuleDoc]: "@modern-js/module-doc-generator"
73304
73342
  }
73305
73343
  };
73306
73344
  var ModuleNewActionPluginName = {
73307
73345
  [ActionType.Function]: {
73308
73346
  [ActionFunction.TailwindCSS]: "tailwindcssPlugin",
73309
- [ActionFunction.Storybook]: "storybookPlugin",
73347
+ [ActionFunction.ModuleDoc]: "modulePluginDoc",
73310
73348
  [ActionFunction.Test]: "testPlugin"
73311
73349
  }
73312
73350
  };
@@ -73314,7 +73352,7 @@ var ModuleNewActionPluginDependence = {
73314
73352
  [ActionType.Function]: {
73315
73353
  [ActionFunction.Test]: "@modern-js/plugin-testing",
73316
73354
  [ActionFunction.TailwindCSS]: "@modern-js/plugin-tailwindcss",
73317
- [ActionFunction.Storybook]: "@modern-js/plugin-storybook"
73355
+ [ActionFunction.ModuleDoc]: "@modern-js/plugin-rspress"
73318
73356
  }
73319
73357
  };
73320
73358
 
@@ -75065,7 +75103,8 @@ var ModuleNewAction = async (options) => {
75065
75103
  } : {},
75066
75104
  pluginName: ModuleNewActionPluginName[actionType][action2],
75067
75105
  pluginDependence: ModuleNewActionPluginDependence[actionType][action2],
75068
- shouldUsePluginNameExport
75106
+ shouldUsePluginNameExport,
75107
+ isModuleProject: true
75069
75108
  });
75070
75109
  const task = [
75071
75110
  {
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "0.0.0-nightly-20231120170640",
18
+ "version": "0.0.0-nightly-20231122170633",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "main": "./dist/index.js",
21
21
  "files": [
@@ -23,7 +23,7 @@
23
23
  "/dist/index.js"
24
24
  ],
25
25
  "dependencies": {
26
- "@modern-js/utils": "0.0.0-nightly-20231120170640"
26
+ "@modern-js/utils": "0.0.0-nightly-20231122170633"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@modern-js/codesmith": "2.3.0",
@@ -32,15 +32,15 @@
32
32
  "@types/node": "^14",
33
33
  "jest": "^29",
34
34
  "typescript": "^5",
35
- "@modern-js/base-generator": "0.0.0-nightly-20231120170640",
36
- "@modern-js/generator-common": "0.0.0-nightly-20231120170640",
37
- "@modern-js/generator-plugin": "0.0.0-nightly-20231120170640",
38
- "@modern-js/generator-utils": "0.0.0-nightly-20231120170640",
39
- "@modern-js/module-generator": "0.0.0-nightly-20231120170640",
40
- "@modern-js/monorepo-generator": "0.0.0-nightly-20231120170640",
41
- "@scripts/build": "0.0.0-nightly-20231120170640",
42
- "@scripts/jest-config": "0.0.0-nightly-20231120170640",
43
- "@modern-js/mwa-generator": "0.0.0-nightly-20231120170640"
35
+ "@modern-js/generator-common": "0.0.0-nightly-20231122170633",
36
+ "@modern-js/base-generator": "0.0.0-nightly-20231122170633",
37
+ "@modern-js/generator-utils": "0.0.0-nightly-20231122170633",
38
+ "@modern-js/generator-plugin": "0.0.0-nightly-20231122170633",
39
+ "@modern-js/monorepo-generator": "0.0.0-nightly-20231122170633",
40
+ "@modern-js/mwa-generator": "0.0.0-nightly-20231122170633",
41
+ "@scripts/build": "0.0.0-nightly-20231122170633",
42
+ "@modern-js/module-generator": "0.0.0-nightly-20231122170633",
43
+ "@scripts/jest-config": "0.0.0-nightly-20231122170633"
44
44
  },
45
45
  "sideEffects": false,
46
46
  "publishConfig": {