@formatjs/cli 6.8.1 → 6.8.4

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/bin/formatjs +213 -171
  2. package/package.json +2 -2
package/bin/formatjs CHANGED
@@ -9007,14 +9007,14 @@ var require_signal_exit = __commonJS({
9007
9007
  if (opts && opts.alwaysLast) {
9008
9008
  ev = "afterexit";
9009
9009
  }
9010
- var remove = function() {
9010
+ var remove2 = function() {
9011
9011
  emitter.removeListener(ev, cb);
9012
9012
  if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
9013
9013
  unload();
9014
9014
  }
9015
9015
  };
9016
9016
  emitter.on(ev, cb);
9017
- return remove;
9017
+ return remove2;
9018
9018
  };
9019
9019
  unload = function unload2() {
9020
9020
  if (!loaded || !processOk(global.process)) {
@@ -12686,13 +12686,13 @@ var require_clone = __commonJS({
12686
12686
  if (obj === null || typeof obj !== "object")
12687
12687
  return obj;
12688
12688
  if (obj instanceof Object)
12689
- var copy = { __proto__: getPrototypeOf(obj) };
12689
+ var copy2 = { __proto__: getPrototypeOf(obj) };
12690
12690
  else
12691
- var copy = /* @__PURE__ */ Object.create(null);
12691
+ var copy2 = /* @__PURE__ */ Object.create(null);
12692
12692
  Object.getOwnPropertyNames(obj).forEach(function(key) {
12693
- Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
12693
+ Object.defineProperty(copy2, key, Object.getOwnPropertyDescriptor(obj, key));
12694
12694
  });
12695
- return copy;
12695
+ return copy2;
12696
12696
  }
12697
12697
  }
12698
12698
  });
@@ -13259,11 +13259,11 @@ var require_path_exists = __commonJS({
13259
13259
  "use strict";
13260
13260
  var u = require_universalify().fromPromise;
13261
13261
  var fs = require_fs5();
13262
- function pathExists(path2) {
13262
+ function pathExists2(path2) {
13263
13263
  return fs.access(path2).then(() => true).catch(() => false);
13264
13264
  }
13265
13265
  module2.exports = {
13266
- pathExists: u(pathExists),
13266
+ pathExists: u(pathExists2),
13267
13267
  pathExistsSync: fs.existsSync
13268
13268
  };
13269
13269
  }
@@ -13476,12 +13476,12 @@ var require_copy = __commonJS({
13476
13476
  "use strict";
13477
13477
  var fs = require_fs5();
13478
13478
  var path2 = require("path");
13479
- var { mkdirs } = require_mkdirs();
13480
- var { pathExists } = require_path_exists();
13479
+ var { mkdirs: mkdirs2 } = require_mkdirs();
13480
+ var { pathExists: pathExists2 } = require_path_exists();
13481
13481
  var { utimesMillis } = require_utimes();
13482
13482
  var stat = require_stat();
13483
13483
  var { asyncIteratorConcurrentProcess } = require_async7();
13484
- async function copy(src, dest, opts = {}) {
13484
+ async function copy2(src, dest, opts = {}) {
13485
13485
  if (typeof opts === "function") {
13486
13486
  opts = { filter: opts };
13487
13487
  }
@@ -13500,9 +13500,9 @@ var require_copy = __commonJS({
13500
13500
  if (!include)
13501
13501
  return;
13502
13502
  const destParent = path2.dirname(dest);
13503
- const dirExists = await pathExists(destParent);
13503
+ const dirExists = await pathExists2(destParent);
13504
13504
  if (!dirExists) {
13505
- await mkdirs(destParent);
13505
+ await mkdirs2(destParent);
13506
13506
  }
13507
13507
  await getStatsAndPerformCopy(destStat, src, dest, opts);
13508
13508
  }
@@ -13599,7 +13599,7 @@ var require_copy = __commonJS({
13599
13599
  await fs.unlink(dest);
13600
13600
  return fs.symlink(resolvedSrc, dest);
13601
13601
  }
13602
- module2.exports = copy;
13602
+ module2.exports = copy2;
13603
13603
  }
13604
13604
  });
13605
13605
 
@@ -13609,10 +13609,10 @@ var require_copy_sync = __commonJS({
13609
13609
  "use strict";
13610
13610
  var fs = require_graceful_fs();
13611
13611
  var path2 = require("path");
13612
- var mkdirsSync = require_mkdirs().mkdirsSync;
13612
+ var mkdirsSync2 = require_mkdirs().mkdirsSync;
13613
13613
  var utimesMillisSync = require_utimes().utimesMillisSync;
13614
13614
  var stat = require_stat();
13615
- function copySync(src, dest, opts) {
13615
+ function copySync2(src, dest, opts) {
13616
13616
  if (typeof opts === "function") {
13617
13617
  opts = { filter: opts };
13618
13618
  }
@@ -13632,7 +13632,7 @@ var require_copy_sync = __commonJS({
13632
13632
  return;
13633
13633
  const destParent = path2.dirname(dest);
13634
13634
  if (!fs.existsSync(destParent))
13635
- mkdirsSync(destParent);
13635
+ mkdirsSync2(destParent);
13636
13636
  return getStats(destStat, src, dest, opts);
13637
13637
  }
13638
13638
  function getStats(destStat, src, dest, opts) {
@@ -13748,7 +13748,7 @@ var require_copy_sync = __commonJS({
13748
13748
  fs.unlinkSync(dest);
13749
13749
  return fs.symlinkSync(resolvedSrc, dest);
13750
13750
  }
13751
- module2.exports = copySync;
13751
+ module2.exports = copySync2;
13752
13752
  }
13753
13753
  });
13754
13754
 
@@ -13770,15 +13770,15 @@ var require_remove = __commonJS({
13770
13770
  "use strict";
13771
13771
  var fs = require_graceful_fs();
13772
13772
  var u = require_universalify().fromCallback;
13773
- function remove(path2, callback) {
13773
+ function remove2(path2, callback) {
13774
13774
  fs.rm(path2, { recursive: true, force: true }, callback);
13775
13775
  }
13776
- function removeSync(path2) {
13776
+ function removeSync2(path2) {
13777
13777
  fs.rmSync(path2, { recursive: true, force: true });
13778
13778
  }
13779
13779
  module2.exports = {
13780
- remove: u(remove),
13781
- removeSync
13780
+ remove: u(remove2),
13781
+ removeSync: removeSync2
13782
13782
  };
13783
13783
  }
13784
13784
  });
@@ -13791,17 +13791,17 @@ var require_empty = __commonJS({
13791
13791
  var fs = require_fs5();
13792
13792
  var path2 = require("path");
13793
13793
  var mkdir = require_mkdirs();
13794
- var remove = require_remove();
13795
- var emptyDir = u(async function emptyDir2(dir) {
13794
+ var remove2 = require_remove();
13795
+ var emptyDir2 = u(async function emptyDir3(dir) {
13796
13796
  let items;
13797
13797
  try {
13798
13798
  items = await fs.readdir(dir);
13799
13799
  } catch {
13800
13800
  return mkdir.mkdirs(dir);
13801
13801
  }
13802
- return Promise.all(items.map((item) => remove.remove(path2.join(dir, item))));
13802
+ return Promise.all(items.map((item) => remove2.remove(path2.join(dir, item))));
13803
13803
  });
13804
- function emptyDirSync(dir) {
13804
+ function emptyDirSync2(dir) {
13805
13805
  let items;
13806
13806
  try {
13807
13807
  items = fs.readdirSync(dir);
@@ -13810,14 +13810,14 @@ var require_empty = __commonJS({
13810
13810
  }
13811
13811
  items.forEach((item) => {
13812
13812
  item = path2.join(dir, item);
13813
- remove.removeSync(item);
13813
+ remove2.removeSync(item);
13814
13814
  });
13815
13815
  }
13816
13816
  module2.exports = {
13817
- emptyDirSync,
13818
- emptydirSync: emptyDirSync,
13819
- emptyDir,
13820
- emptydir: emptyDir
13817
+ emptyDirSync: emptyDirSync2,
13818
+ emptydirSync: emptyDirSync2,
13819
+ emptyDir: emptyDir2,
13820
+ emptydir: emptyDir2
13821
13821
  };
13822
13822
  }
13823
13823
  });
@@ -13830,7 +13830,7 @@ var require_file = __commonJS({
13830
13830
  var path2 = require("path");
13831
13831
  var fs = require_fs5();
13832
13832
  var mkdir = require_mkdirs();
13833
- async function createFile(file) {
13833
+ async function createFile2(file) {
13834
13834
  let stats;
13835
13835
  try {
13836
13836
  stats = await fs.stat(file);
@@ -13857,7 +13857,7 @@ var require_file = __commonJS({
13857
13857
  await fs.readdir(dir);
13858
13858
  }
13859
13859
  }
13860
- function createFileSync(file) {
13860
+ function createFileSync2(file) {
13861
13861
  let stats;
13862
13862
  try {
13863
13863
  stats = fs.statSync(file);
@@ -13879,8 +13879,8 @@ var require_file = __commonJS({
13879
13879
  fs.writeFileSync(file, "");
13880
13880
  }
13881
13881
  module2.exports = {
13882
- createFile: u(createFile),
13883
- createFileSync
13882
+ createFile: u(createFile2),
13883
+ createFileSync: createFileSync2
13884
13884
  };
13885
13885
  }
13886
13886
  });
@@ -13893,9 +13893,9 @@ var require_link = __commonJS({
13893
13893
  var path2 = require("path");
13894
13894
  var fs = require_fs5();
13895
13895
  var mkdir = require_mkdirs();
13896
- var { pathExists } = require_path_exists();
13896
+ var { pathExists: pathExists2 } = require_path_exists();
13897
13897
  var { areIdentical } = require_stat();
13898
- async function createLink(srcpath, dstpath) {
13898
+ async function createLink2(srcpath, dstpath) {
13899
13899
  let dstStat;
13900
13900
  try {
13901
13901
  dstStat = await fs.lstat(dstpath);
@@ -13911,13 +13911,13 @@ var require_link = __commonJS({
13911
13911
  if (dstStat && areIdentical(srcStat, dstStat))
13912
13912
  return;
13913
13913
  const dir = path2.dirname(dstpath);
13914
- const dirExists = await pathExists(dir);
13914
+ const dirExists = await pathExists2(dir);
13915
13915
  if (!dirExists) {
13916
13916
  await mkdir.mkdirs(dir);
13917
13917
  }
13918
13918
  await fs.link(srcpath, dstpath);
13919
13919
  }
13920
- function createLinkSync(srcpath, dstpath) {
13920
+ function createLinkSync2(srcpath, dstpath) {
13921
13921
  let dstStat;
13922
13922
  try {
13923
13923
  dstStat = fs.lstatSync(dstpath);
@@ -13939,8 +13939,8 @@ var require_link = __commonJS({
13939
13939
  return fs.linkSync(srcpath, dstpath);
13940
13940
  }
13941
13941
  module2.exports = {
13942
- createLink: u(createLink),
13943
- createLinkSync
13942
+ createLink: u(createLink2),
13943
+ createLinkSync: createLinkSync2
13944
13944
  };
13945
13945
  }
13946
13946
  });
@@ -13951,7 +13951,7 @@ var require_symlink_paths = __commonJS({
13951
13951
  "use strict";
13952
13952
  var path2 = require("path");
13953
13953
  var fs = require_fs5();
13954
- var { pathExists } = require_path_exists();
13954
+ var { pathExists: pathExists2 } = require_path_exists();
13955
13955
  var u = require_universalify().fromPromise;
13956
13956
  async function symlinkPaths(srcpath, dstpath) {
13957
13957
  if (path2.isAbsolute(srcpath)) {
@@ -13968,7 +13968,7 @@ var require_symlink_paths = __commonJS({
13968
13968
  }
13969
13969
  const dstdir = path2.dirname(dstpath);
13970
13970
  const relativeToDst = path2.join(dstdir, srcpath);
13971
- const exists = await pathExists(relativeToDst);
13971
+ const exists = await pathExists2(relativeToDst);
13972
13972
  if (exists) {
13973
13973
  return {
13974
13974
  toCwd: relativeToDst,
@@ -14062,12 +14062,12 @@ var require_symlink = __commonJS({
14062
14062
  var u = require_universalify().fromPromise;
14063
14063
  var path2 = require("path");
14064
14064
  var fs = require_fs5();
14065
- var { mkdirs, mkdirsSync } = require_mkdirs();
14065
+ var { mkdirs: mkdirs2, mkdirsSync: mkdirsSync2 } = require_mkdirs();
14066
14066
  var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
14067
14067
  var { symlinkType, symlinkTypeSync } = require_symlink_type();
14068
- var { pathExists } = require_path_exists();
14068
+ var { pathExists: pathExists2 } = require_path_exists();
14069
14069
  var { areIdentical } = require_stat();
14070
- async function createSymlink(srcpath, dstpath, type) {
14070
+ async function createSymlink2(srcpath, dstpath, type) {
14071
14071
  let stats;
14072
14072
  try {
14073
14073
  stats = await fs.lstat(dstpath);
@@ -14085,12 +14085,12 @@ var require_symlink = __commonJS({
14085
14085
  srcpath = relative2.toDst;
14086
14086
  const toType = await symlinkType(relative2.toCwd, type);
14087
14087
  const dir = path2.dirname(dstpath);
14088
- if (!await pathExists(dir)) {
14089
- await mkdirs(dir);
14088
+ if (!await pathExists2(dir)) {
14089
+ await mkdirs2(dir);
14090
14090
  }
14091
14091
  return fs.symlink(srcpath, dstpath, toType);
14092
14092
  }
14093
- function createSymlinkSync(srcpath, dstpath, type) {
14093
+ function createSymlinkSync2(srcpath, dstpath, type) {
14094
14094
  let stats;
14095
14095
  try {
14096
14096
  stats = fs.lstatSync(dstpath);
@@ -14109,12 +14109,12 @@ var require_symlink = __commonJS({
14109
14109
  const exists = fs.existsSync(dir);
14110
14110
  if (exists)
14111
14111
  return fs.symlinkSync(srcpath, dstpath, type);
14112
- mkdirsSync(dir);
14112
+ mkdirsSync2(dir);
14113
14113
  return fs.symlinkSync(srcpath, dstpath, type);
14114
14114
  }
14115
14115
  module2.exports = {
14116
- createSymlink: u(createSymlink),
14117
- createSymlinkSync
14116
+ createSymlink: u(createSymlink2),
14117
+ createSymlinkSync: createSymlinkSync2
14118
14118
  };
14119
14119
  }
14120
14120
  });
@@ -14123,25 +14123,25 @@ var require_symlink = __commonJS({
14123
14123
  var require_ensure = __commonJS({
14124
14124
  "node_modules/.aspect_rules_js/fs-extra@11.3.2/node_modules/fs-extra/lib/ensure/index.js"(exports, module2) {
14125
14125
  "use strict";
14126
- var { createFile, createFileSync } = require_file();
14127
- var { createLink, createLinkSync } = require_link();
14128
- var { createSymlink, createSymlinkSync } = require_symlink();
14126
+ var { createFile: createFile2, createFileSync: createFileSync2 } = require_file();
14127
+ var { createLink: createLink2, createLinkSync: createLinkSync2 } = require_link();
14128
+ var { createSymlink: createSymlink2, createSymlinkSync: createSymlinkSync2 } = require_symlink();
14129
14129
  module2.exports = {
14130
14130
  // file
14131
- createFile,
14132
- createFileSync,
14133
- ensureFile: createFile,
14134
- ensureFileSync: createFileSync,
14131
+ createFile: createFile2,
14132
+ createFileSync: createFileSync2,
14133
+ ensureFile: createFile2,
14134
+ ensureFileSync: createFileSync2,
14135
14135
  // link
14136
- createLink,
14137
- createLinkSync,
14138
- ensureLink: createLink,
14139
- ensureLinkSync: createLinkSync,
14136
+ createLink: createLink2,
14137
+ createLinkSync: createLinkSync2,
14138
+ ensureLink: createLink2,
14139
+ ensureLinkSync: createLinkSync2,
14140
14140
  // symlink
14141
- createSymlink,
14142
- createSymlinkSync,
14143
- ensureSymlink: createSymlink,
14144
- ensureSymlinkSync: createSymlinkSync
14141
+ createSymlink: createSymlink2,
14142
+ createSymlinkSync: createSymlinkSync2,
14143
+ ensureSymlink: createSymlink2,
14144
+ ensureSymlinkSync: createSymlinkSync2
14145
14145
  };
14146
14146
  }
14147
14147
  });
@@ -14258,15 +14258,15 @@ var require_output_file = __commonJS({
14258
14258
  var fs = require_fs5();
14259
14259
  var path2 = require("path");
14260
14260
  var mkdir = require_mkdirs();
14261
- var pathExists = require_path_exists().pathExists;
14262
- async function outputFile4(file, data, encoding = "utf-8") {
14261
+ var pathExists2 = require_path_exists().pathExists;
14262
+ async function outputFile2(file, data, encoding = "utf-8") {
14263
14263
  const dir = path2.dirname(file);
14264
- if (!await pathExists(dir)) {
14264
+ if (!await pathExists2(dir)) {
14265
14265
  await mkdir.mkdirs(dir);
14266
14266
  }
14267
14267
  return fs.writeFile(file, data, encoding);
14268
14268
  }
14269
- function outputFileSync(file, ...args) {
14269
+ function outputFileSync2(file, ...args) {
14270
14270
  const dir = path2.dirname(file);
14271
14271
  if (!fs.existsSync(dir)) {
14272
14272
  mkdir.mkdirsSync(dir);
@@ -14274,8 +14274,8 @@ var require_output_file = __commonJS({
14274
14274
  fs.writeFileSync(file, ...args);
14275
14275
  }
14276
14276
  module2.exports = {
14277
- outputFile: u(outputFile4),
14278
- outputFileSync
14277
+ outputFile: u(outputFile2),
14278
+ outputFileSync: outputFileSync2
14279
14279
  };
14280
14280
  }
14281
14281
  });
@@ -14285,12 +14285,12 @@ var require_output_json = __commonJS({
14285
14285
  "node_modules/.aspect_rules_js/fs-extra@11.3.2/node_modules/fs-extra/lib/json/output-json.js"(exports, module2) {
14286
14286
  "use strict";
14287
14287
  var { stringify: stringify4 } = require_utils6();
14288
- var { outputFile: outputFile4 } = require_output_file();
14289
- async function outputJson(file, data, options = {}) {
14288
+ var { outputFile: outputFile2 } = require_output_file();
14289
+ async function outputJson2(file, data, options = {}) {
14290
14290
  const str = stringify4(data, options);
14291
- await outputFile4(file, str, options);
14291
+ await outputFile2(file, str, options);
14292
14292
  }
14293
- module2.exports = outputJson;
14293
+ module2.exports = outputJson2;
14294
14294
  }
14295
14295
  });
14296
14296
 
@@ -14299,12 +14299,12 @@ var require_output_json_sync = __commonJS({
14299
14299
  "node_modules/.aspect_rules_js/fs-extra@11.3.2/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module2) {
14300
14300
  "use strict";
14301
14301
  var { stringify: stringify4 } = require_utils6();
14302
- var { outputFileSync } = require_output_file();
14303
- function outputJsonSync(file, data, options) {
14302
+ var { outputFileSync: outputFileSync2 } = require_output_file();
14303
+ function outputJsonSync2(file, data, options) {
14304
14304
  const str = stringify4(data, options);
14305
- outputFileSync(file, str, options);
14305
+ outputFileSync2(file, str, options);
14306
14306
  }
14307
- module2.exports = outputJsonSync;
14307
+ module2.exports = outputJsonSync2;
14308
14308
  }
14309
14309
  });
14310
14310
 
@@ -14332,27 +14332,27 @@ var require_move = __commonJS({
14332
14332
  "use strict";
14333
14333
  var fs = require_fs5();
14334
14334
  var path2 = require("path");
14335
- var { copy } = require_copy2();
14336
- var { remove } = require_remove();
14337
- var { mkdirp } = require_mkdirs();
14338
- var { pathExists } = require_path_exists();
14335
+ var { copy: copy2 } = require_copy2();
14336
+ var { remove: remove2 } = require_remove();
14337
+ var { mkdirp: mkdirp2 } = require_mkdirs();
14338
+ var { pathExists: pathExists2 } = require_path_exists();
14339
14339
  var stat = require_stat();
14340
- async function move(src, dest, opts = {}) {
14340
+ async function move2(src, dest, opts = {}) {
14341
14341
  const overwrite = opts.overwrite || opts.clobber || false;
14342
14342
  const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
14343
14343
  await stat.checkParentPaths(src, srcStat, dest, "move");
14344
14344
  const destParent = path2.dirname(dest);
14345
14345
  const parsedParentPath = path2.parse(destParent);
14346
14346
  if (parsedParentPath.root !== destParent) {
14347
- await mkdirp(destParent);
14347
+ await mkdirp2(destParent);
14348
14348
  }
14349
14349
  return doRename(src, dest, overwrite, isChangingCase);
14350
14350
  }
14351
14351
  async function doRename(src, dest, overwrite, isChangingCase) {
14352
14352
  if (!isChangingCase) {
14353
14353
  if (overwrite) {
14354
- await remove(dest);
14355
- } else if (await pathExists(dest)) {
14354
+ await remove2(dest);
14355
+ } else if (await pathExists2(dest)) {
14356
14356
  throw new Error("dest already exists.");
14357
14357
  }
14358
14358
  }
@@ -14371,10 +14371,10 @@ var require_move = __commonJS({
14371
14371
  errorOnExist: true,
14372
14372
  preserveTimestamps: true
14373
14373
  };
14374
- await copy(src, dest, opts);
14375
- return remove(src);
14374
+ await copy2(src, dest, opts);
14375
+ return remove2(src);
14376
14376
  }
14377
- module2.exports = move;
14377
+ module2.exports = move2;
14378
14378
  }
14379
14379
  });
14380
14380
 
@@ -14384,17 +14384,17 @@ var require_move_sync = __commonJS({
14384
14384
  "use strict";
14385
14385
  var fs = require_graceful_fs();
14386
14386
  var path2 = require("path");
14387
- var copySync = require_copy2().copySync;
14388
- var removeSync = require_remove().removeSync;
14389
- var mkdirpSync = require_mkdirs().mkdirpSync;
14387
+ var copySync2 = require_copy2().copySync;
14388
+ var removeSync2 = require_remove().removeSync;
14389
+ var mkdirpSync2 = require_mkdirs().mkdirpSync;
14390
14390
  var stat = require_stat();
14391
- function moveSync(src, dest, opts) {
14391
+ function moveSync2(src, dest, opts) {
14392
14392
  opts = opts || {};
14393
14393
  const overwrite = opts.overwrite || opts.clobber || false;
14394
14394
  const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
14395
14395
  stat.checkParentPathsSync(src, srcStat, dest, "move");
14396
14396
  if (!isParentRoot(dest))
14397
- mkdirpSync(path2.dirname(dest));
14397
+ mkdirpSync2(path2.dirname(dest));
14398
14398
  return doRename(src, dest, overwrite, isChangingCase);
14399
14399
  }
14400
14400
  function isParentRoot(dest) {
@@ -14406,7 +14406,7 @@ var require_move_sync = __commonJS({
14406
14406
  if (isChangingCase)
14407
14407
  return rename(src, dest, overwrite);
14408
14408
  if (overwrite) {
14409
- removeSync(dest);
14409
+ removeSync2(dest);
14410
14410
  return rename(src, dest, overwrite);
14411
14411
  }
14412
14412
  if (fs.existsSync(dest))
@@ -14428,10 +14428,10 @@ var require_move_sync = __commonJS({
14428
14428
  errorOnExist: true,
14429
14429
  preserveTimestamps: true
14430
14430
  };
14431
- copySync(src, dest, opts);
14432
- return removeSync(src);
14431
+ copySync2(src, dest, opts);
14432
+ return removeSync2(src);
14433
14433
  }
14434
- module2.exports = moveSync;
14434
+ module2.exports = moveSync2;
14435
14435
  }
14436
14436
  });
14437
14437
 
@@ -14447,27 +14447,6 @@ var require_move2 = __commonJS({
14447
14447
  }
14448
14448
  });
14449
14449
 
14450
- // node_modules/.aspect_rules_js/fs-extra@11.3.2/node_modules/fs-extra/lib/index.js
14451
- var require_lib = __commonJS({
14452
- "node_modules/.aspect_rules_js/fs-extra@11.3.2/node_modules/fs-extra/lib/index.js"(exports, module2) {
14453
- "use strict";
14454
- module2.exports = {
14455
- // Export promiseified graceful-fs:
14456
- ...require_fs5(),
14457
- // Export extra methods:
14458
- ...require_copy2(),
14459
- ...require_empty(),
14460
- ...require_ensure(),
14461
- ...require_json(),
14462
- ...require_mkdirs(),
14463
- ...require_move2(),
14464
- ...require_output_file(),
14465
- ...require_path_exists(),
14466
- ...require_remove()
14467
- };
14468
- }
14469
- });
14470
-
14471
14450
  // node_modules/.aspect_rules_js/jsonify@0.0.1/node_modules/jsonify/lib/parse.js
14472
14451
  var require_parse3 = __commonJS({
14473
14452
  "node_modules/.aspect_rules_js/jsonify@0.0.1/node_modules/jsonify/lib/parse.js"(exports, module2) {
@@ -19715,7 +19694,7 @@ var require_typescript = __commonJS({
19715
19694
  rangeStartPositionsAreOnSameLine: () => rangeStartPositionsAreOnSameLine,
19716
19695
  readBuilderProgram: () => readBuilderProgram,
19717
19696
  readConfigFile: () => readConfigFile,
19718
- readJson: () => readJson,
19697
+ readJson: () => readJson2,
19719
19698
  readJsonConfigFile: () => readJsonConfigFile,
19720
19699
  readJsonOrUndefined: () => readJsonOrUndefined,
19721
19700
  reduceEachLeadingCommentRange: () => reduceEachLeadingCommentRange,
@@ -39505,7 +39484,7 @@ ${lanes.join("\n")}
39505
39484
  const result = parseConfigFileTextToJson(path2, jsonText);
39506
39485
  return !result.error ? result.config : void 0;
39507
39486
  }
39508
- function readJson(path2, host) {
39487
+ function readJson2(path2, host) {
39509
39488
  return readJsonOrUndefined(path2, host) || {};
39510
39489
  }
39511
39490
  function tryParseJson(text) {
@@ -65445,7 +65424,7 @@ ${lanes.join("\n")}
65445
65424
  for (const typeDirectivePath of host.getDirectories(root)) {
65446
65425
  const normalized = normalizePath(typeDirectivePath);
65447
65426
  const packageJsonPath = combinePaths(root, normalized, "package.json");
65448
- const isNotNeededPackage = host.fileExists(packageJsonPath) && readJson(packageJsonPath, host).typings === null;
65427
+ const isNotNeededPackage = host.fileExists(packageJsonPath) && readJson2(packageJsonPath, host).typings === null;
65449
65428
  if (!isNotNeededPackage) {
65450
65429
  const baseFileName = getBaseFileName(normalized);
65451
65430
  if (baseFileName.charCodeAt(0) !== 46) {
@@ -66729,7 +66708,7 @@ ${lanes.join("\n")}
66729
66708
  }
66730
66709
  const directoryExists = directoryProbablyExists(packageDirectory, host);
66731
66710
  if (directoryExists && host.fileExists(packageJsonPath)) {
66732
- const packageJsonContent = readJson(packageJsonPath, host);
66711
+ const packageJsonContent = readJson2(packageJsonPath, host);
66733
66712
  if (traceEnabled) {
66734
66713
  trace(host, Diagnostics.Found_package_json_at_0, packageJsonPath);
66735
66714
  }
@@ -71846,7 +71825,7 @@ ${lanes.join("\n")}
71846
71825
  if (typeof exports2 === "string") {
71847
71826
  const ignoreCase = !hostUsesCaseSensitiveFileNames(host);
71848
71827
  const getCommonSourceDirectory2 = () => host.getCommonSourceDirectory();
71849
- const outputFile4 = isImports && getOutputJSFileNameWorker(targetFilePath, options, ignoreCase, getCommonSourceDirectory2);
71828
+ const outputFile2 = isImports && getOutputJSFileNameWorker(targetFilePath, options, ignoreCase, getCommonSourceDirectory2);
71850
71829
  const declarationFile = isImports && getOutputDeclarationFileNameWorker(targetFilePath, options, ignoreCase, getCommonSourceDirectory2);
71851
71830
  const pathOrPattern = getNormalizedAbsolutePath(
71852
71831
  combinePaths(packageDirectory, exports2),
@@ -71857,7 +71836,7 @@ ${lanes.join("\n")}
71857
71836
  const canTryTsExtension = preferTsExtension && hasImplementationTSFileExtension(targetFilePath);
71858
71837
  switch (mode) {
71859
71838
  case 0:
71860
- if (extensionSwappedTarget && comparePaths(extensionSwappedTarget, pathOrPattern, ignoreCase) === 0 || comparePaths(targetFilePath, pathOrPattern, ignoreCase) === 0 || outputFile4 && comparePaths(outputFile4, pathOrPattern, ignoreCase) === 0 || declarationFile && comparePaths(declarationFile, pathOrPattern, ignoreCase) === 0) {
71839
+ if (extensionSwappedTarget && comparePaths(extensionSwappedTarget, pathOrPattern, ignoreCase) === 0 || comparePaths(targetFilePath, pathOrPattern, ignoreCase) === 0 || outputFile2 && comparePaths(outputFile2, pathOrPattern, ignoreCase) === 0 || declarationFile && comparePaths(declarationFile, pathOrPattern, ignoreCase) === 0) {
71861
71840
  return { moduleFileToTry: packageName };
71862
71841
  }
71863
71842
  break;
@@ -71901,10 +71880,10 @@ ${lanes.join("\n")}
71901
71880
  void 0
71902
71881
  ) };
71903
71882
  }
71904
- if (outputFile4 && containsPath(pathOrPattern, outputFile4, ignoreCase)) {
71883
+ if (outputFile2 && containsPath(pathOrPattern, outputFile2, ignoreCase)) {
71905
71884
  const fragment = getRelativePathFromDirectory(
71906
71885
  pathOrPattern,
71907
- outputFile4,
71886
+ outputFile2,
71908
71887
  /*ignoreCase*/
71909
71888
  false
71910
71889
  );
@@ -71936,8 +71915,8 @@ ${lanes.join("\n")}
71936
71915
  const starReplacement = targetFilePath.slice(leadingSlice.length, targetFilePath.length - trailingSlice.length);
71937
71916
  return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) };
71938
71917
  }
71939
- if (outputFile4 && startsWith4(outputFile4, leadingSlice, ignoreCase) && endsWith(outputFile4, trailingSlice, ignoreCase)) {
71940
- const starReplacement = outputFile4.slice(leadingSlice.length, outputFile4.length - trailingSlice.length);
71918
+ if (outputFile2 && startsWith4(outputFile2, leadingSlice, ignoreCase) && endsWith(outputFile2, trailingSlice, ignoreCase)) {
71919
+ const starReplacement = outputFile2.slice(leadingSlice.length, outputFile2.length - trailingSlice.length);
71941
71920
  return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) };
71942
71921
  }
71943
71922
  if (declarationFile && startsWith4(declarationFile, leadingSlice, ignoreCase) && endsWith(declarationFile, trailingSlice, ignoreCase)) {
@@ -87927,8 +87906,8 @@ ${lanes.join("\n")}
87927
87906
  i--;
87928
87907
  const t = types[i];
87929
87908
  const flags = t.flags;
87930
- const remove = flags & (128 | 134217728 | 268435456) && includes & 4 || flags & 256 && includes & 8 || flags & 2048 && includes & 64 || flags & 8192 && includes & 4096 || reduceVoidUndefined && flags & 32768 && includes & 16384 || isFreshLiteralType(t) && containsType(types, t.regularType);
87931
- if (remove) {
87909
+ const remove2 = flags & (128 | 134217728 | 268435456) && includes & 4 || flags & 256 && includes & 8 || flags & 2048 && includes & 64 || flags & 8192 && includes & 4096 || reduceVoidUndefined && flags & 32768 && includes & 16384 || isFreshLiteralType(t) && containsType(types, t.regularType);
87910
+ if (remove2) {
87932
87911
  orderedRemoveItemAt(types, i);
87933
87912
  }
87934
87913
  }
@@ -88196,8 +88175,8 @@ ${lanes.join("\n")}
88196
88175
  while (i > 0) {
88197
88176
  i--;
88198
88177
  const t = types[i];
88199
- const remove = t.flags & 4 && includes & (128 | 134217728 | 268435456) || t.flags & 8 && includes & 256 || t.flags & 64 && includes & 2048 || t.flags & 4096 && includes & 8192 || t.flags & 16384 && includes & 32768 || isEmptyAnonymousObjectType(t) && includes & 470302716;
88200
- if (remove) {
88178
+ const remove2 = t.flags & 4 && includes & (128 | 134217728 | 268435456) || t.flags & 8 && includes & 256 || t.flags & 64 && includes & 2048 || t.flags & 4096 && includes & 8192 || t.flags & 16384 && includes & 32768 || isEmptyAnonymousObjectType(t) && includes & 470302716;
88179
+ if (remove2) {
88201
88180
  orderedRemoveItemAt(types, i);
88202
88181
  }
88203
88182
  }
@@ -115703,15 +115682,15 @@ ${lanes.join("\n")}
115703
115682
  if (symbolLinks2.filteredIndexSymbolCache.has(nodeListId)) {
115704
115683
  return symbolLinks2.filteredIndexSymbolCache.get(nodeListId);
115705
115684
  } else {
115706
- const copy = createSymbol(
115685
+ const copy2 = createSymbol(
115707
115686
  131072,
115708
115687
  "__index"
115709
115688
  /* Index */
115710
115689
  );
115711
- copy.declarations = mapDefined(infos, (i) => i.declaration);
115712
- copy.parent = type.aliasSymbol ? type.aliasSymbol : type.symbol ? type.symbol : getSymbolAtLocation(copy.declarations[0].parent);
115713
- symbolLinks2.filteredIndexSymbolCache.set(nodeListId, copy);
115714
- return copy;
115690
+ copy2.declarations = mapDefined(infos, (i) => i.declaration);
115691
+ copy2.parent = type.aliasSymbol ? type.aliasSymbol : type.symbol ? type.symbol : getSymbolAtLocation(copy2.declarations[0].parent);
115692
+ symbolLinks2.filteredIndexSymbolCache.set(nodeListId, copy2);
115693
+ return copy2;
115715
115694
  }
115716
115695
  }
115717
115696
  }
@@ -155741,8 +155720,8 @@ ${lanes.join("\n")}
155741
155720
  createDiagnosticForOptionName(Diagnostics.Composite_projects_may_not_disable_incremental_compilation, "declaration");
155742
155721
  }
155743
155722
  }
155744
- const outputFile4 = options.outFile;
155745
- if (!options.tsBuildInfoFile && options.incremental && !outputFile4 && !options.configFilePath) {
155723
+ const outputFile2 = options.outFile;
155724
+ if (!options.tsBuildInfoFile && options.incremental && !outputFile2 && !options.configFilePath) {
155746
155725
  programDiagnostics.addConfigDiagnostic(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));
155747
155726
  }
155748
155727
  verifyDeprecatedCompilerOptions();
@@ -155825,7 +155804,7 @@ ${lanes.join("\n")}
155825
155804
  if (!getEmitDeclarations(options)) {
155826
155805
  createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "declarationDir", "declaration", "composite");
155827
155806
  }
155828
- if (outputFile4) {
155807
+ if (outputFile2) {
155829
155808
  createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "declarationDir", "outFile");
155830
155809
  }
155831
155810
  }
@@ -155848,7 +155827,7 @@ ${lanes.join("\n")}
155848
155827
  const span = getErrorSpanForNode(firstNonAmbientExternalModuleSourceFile, typeof firstNonAmbientExternalModuleSourceFile.externalModuleIndicator === "boolean" ? firstNonAmbientExternalModuleSourceFile : firstNonAmbientExternalModuleSourceFile.externalModuleIndicator);
155849
155828
  programDiagnostics.addConfigDiagnostic(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none));
155850
155829
  }
155851
- if (outputFile4 && !options.emitDeclarationOnly) {
155830
+ if (outputFile2 && !options.emitDeclarationOnly) {
155852
155831
  if (options.module && !(options.module === 2 || options.module === 4)) {
155853
155832
  createDiagnosticForOptionName(Diagnostics.Only_amd_and_system_modules_are_supported_alongside_0, "outFile", "module");
155854
155833
  } else if (options.module === void 0 && firstNonAmbientExternalModuleSourceFile) {
@@ -200127,7 +200106,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
200127
200106
  if (!moduleSpecifierIsRelative) {
200128
200107
  const packageJsonPath = findPackageJson(baseDirectory, host);
200129
200108
  if (packageJsonPath) {
200130
- const packageJson = readJson(packageJsonPath, host);
200109
+ const packageJson = readJson2(packageJsonPath, host);
200131
200110
  const typesVersions = packageJson.typesVersions;
200132
200111
  if (typeof typesVersions === "object") {
200133
200112
  const versionPaths = (_a2 = getPackageJsonTypesVersionsPaths(typesVersions)) == null ? void 0 : _a2.paths;
@@ -200335,7 +200314,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
200335
200314
  if (resolvePackageJsonImports && !seenPackageScope) {
200336
200315
  const packageFile = combinePaths(directory, "package.json");
200337
200316
  if (seenPackageScope = tryFileExists(host, packageFile)) {
200338
- const packageJson = readJson(packageFile, host);
200317
+ const packageJson = readJson2(packageFile, host);
200339
200318
  exportsOrImportsLookup(
200340
200319
  packageJson.imports,
200341
200320
  fragment,
@@ -200389,7 +200368,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
200389
200368
  const packageDirectory = combinePaths(ancestor, "node_modules", packagePath);
200390
200369
  const packageFile = combinePaths(packageDirectory, "package.json");
200391
200370
  if (tryFileExists(host, packageFile)) {
200392
- const packageJson = readJson(packageFile, host);
200371
+ const packageJson = readJson2(packageFile, host);
200393
200372
  const fragmentSubpath = components.join("/") + (components.length && hasTrailingDirectorySeparator(fragment) ? "/" : "");
200394
200373
  exportsOrImportsLookup(
200395
200374
  packageJson.exports,
@@ -200659,7 +200638,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
200659
200638
  return emptyArray;
200660
200639
  const result = [];
200661
200640
  for (const packageJson of findPackageJsons(scriptPath, host)) {
200662
- const contents = readJson(packageJson, host);
200641
+ const contents = readJson2(packageJson, host);
200663
200642
  for (const key of nodeModulesDependencyKeys) {
200664
200643
  const dependencies = contents[key];
200665
200644
  if (!dependencies)
@@ -213610,13 +213589,13 @@ ${options.prefix}` : "\n" : options.prefix
213610
213589
  importAdder = ts_codefix_exports.createImportAdder(updatedFile, updatedProgram, preferences, host);
213611
213590
  if (copiedFrom == null ? void 0 : copiedFrom.range) {
213612
213591
  Debug.assert(copiedFrom.range.length === pastedText.length);
213613
- copiedFrom.range.forEach((copy) => {
213592
+ copiedFrom.range.forEach((copy2) => {
213614
213593
  const statementsInSourceFile = copiedFrom.file.statements;
213615
- const startNodeIndex = findIndex(statementsInSourceFile, (s) => s.end > copy.pos);
213594
+ const startNodeIndex = findIndex(statementsInSourceFile, (s) => s.end > copy2.pos);
213616
213595
  if (startNodeIndex === -1)
213617
213596
  return void 0;
213618
- let endNodeIndex = findIndex(statementsInSourceFile, (s) => s.end >= copy.end, startNodeIndex);
213619
- if (endNodeIndex !== -1 && copy.end <= statementsInSourceFile[endNodeIndex].getStart()) {
213597
+ let endNodeIndex = findIndex(statementsInSourceFile, (s) => s.end >= copy2.end, startNodeIndex);
213598
+ if (endNodeIndex !== -1 && copy2.end <= statementsInSourceFile[endNodeIndex].getStart()) {
213620
213599
  endNodeIndex--;
213621
213600
  }
213622
213601
  statements.push(...statementsInSourceFile.slice(startNodeIndex, endNodeIndex === -1 ? statementsInSourceFile.length : endNodeIndex + 1));
@@ -215652,7 +215631,7 @@ ${options.prefix}` : "\n" : options.prefix
215652
215631
  rangeStartPositionsAreOnSameLine: () => rangeStartPositionsAreOnSameLine,
215653
215632
  readBuilderProgram: () => readBuilderProgram,
215654
215633
  readConfigFile: () => readConfigFile,
215655
- readJson: () => readJson,
215634
+ readJson: () => readJson2,
215656
215635
  readJsonConfigFile: () => readJsonConfigFile,
215657
215636
  readJsonOrUndefined: () => readJsonOrUndefined,
215658
215637
  reduceEachLeadingCommentRange: () => reduceEachLeadingCommentRange,
@@ -218000,9 +217979,9 @@ ${options.prefix}` : "\n" : options.prefix
218000
217979
  }
218001
217980
  const { emitSkipped, diagnostics, outputFiles } = this.getLanguageService().getEmitOutput(scriptInfo.fileName);
218002
217981
  if (!emitSkipped) {
218003
- for (const outputFile4 of outputFiles) {
218004
- const outputFileAbsoluteFileName = getNormalizedAbsolutePath(outputFile4.name, this.currentDirectory);
218005
- writeFile2(outputFileAbsoluteFileName, outputFile4.text, outputFile4.writeByteOrderMark);
217982
+ for (const outputFile2 of outputFiles) {
217983
+ const outputFileAbsoluteFileName = getNormalizedAbsolutePath(outputFile2.name, this.currentDirectory);
217984
+ writeFile2(outputFileAbsoluteFileName, outputFile2.text, outputFile2.writeByteOrderMark);
218006
217985
  }
218007
217986
  if (this.builderState && getEmitDeclarations(this.compilerOptions)) {
218008
217987
  const dtsFiles = outputFiles.filter((f) => isDeclarationFileName(f.name));
@@ -229881,7 +229860,74 @@ var import_loud_rejection = __toESM(require_loud_rejection());
229881
229860
 
229882
229861
  // packages/cli-lib/src/compile.ts
229883
229862
  init_icu_messageformat_parser();
229884
- var import_fs_extra = __toESM(require_lib());
229863
+
229864
+ // node_modules/.aspect_rules_js/fs-extra@11.3.2/node_modules/fs-extra/lib/esm.mjs
229865
+ var import_copy = __toESM(require_copy2(), 1);
229866
+ var import_empty = __toESM(require_empty(), 1);
229867
+ var import_ensure = __toESM(require_ensure(), 1);
229868
+ var import_json = __toESM(require_json(), 1);
229869
+ var import_mkdirs = __toESM(require_mkdirs(), 1);
229870
+ var import_move = __toESM(require_move2(), 1);
229871
+ var import_output_file = __toESM(require_output_file(), 1);
229872
+ var import_path_exists = __toESM(require_path_exists(), 1);
229873
+ var import_remove = __toESM(require_remove(), 1);
229874
+ var copy = import_copy.default.copy;
229875
+ var copySync = import_copy.default.copySync;
229876
+ var emptyDirSync = import_empty.default.emptyDirSync;
229877
+ var emptydirSync = import_empty.default.emptydirSync;
229878
+ var emptyDir = import_empty.default.emptyDir;
229879
+ var emptydir = import_empty.default.emptydir;
229880
+ var createFile = import_ensure.default.createFile;
229881
+ var createFileSync = import_ensure.default.createFileSync;
229882
+ var ensureFile = import_ensure.default.ensureFile;
229883
+ var ensureFileSync = import_ensure.default.ensureFileSync;
229884
+ var createLink = import_ensure.default.createLink;
229885
+ var createLinkSync = import_ensure.default.createLinkSync;
229886
+ var ensureLink = import_ensure.default.ensureLink;
229887
+ var ensureLinkSync = import_ensure.default.ensureLinkSync;
229888
+ var createSymlink = import_ensure.default.createSymlink;
229889
+ var createSymlinkSync = import_ensure.default.createSymlinkSync;
229890
+ var ensureSymlink = import_ensure.default.ensureSymlink;
229891
+ var ensureSymlinkSync = import_ensure.default.ensureSymlinkSync;
229892
+ var readJson = import_json.default.readJson;
229893
+ var readJSON = import_json.default.readJSON;
229894
+ var readJsonSync = import_json.default.readJsonSync;
229895
+ var readJSONSync = import_json.default.readJSONSync;
229896
+ var writeJson = import_json.default.writeJson;
229897
+ var writeJSON = import_json.default.writeJSON;
229898
+ var writeJsonSync = import_json.default.writeJsonSync;
229899
+ var writeJSONSync = import_json.default.writeJSONSync;
229900
+ var outputJson = import_json.default.outputJson;
229901
+ var outputJSON = import_json.default.outputJSON;
229902
+ var outputJsonSync = import_json.default.outputJsonSync;
229903
+ var outputJSONSync = import_json.default.outputJSONSync;
229904
+ var mkdirs = import_mkdirs.default.mkdirs;
229905
+ var mkdirsSync = import_mkdirs.default.mkdirsSync;
229906
+ var mkdirp = import_mkdirs.default.mkdirp;
229907
+ var mkdirpSync = import_mkdirs.default.mkdirpSync;
229908
+ var ensureDir = import_mkdirs.default.ensureDir;
229909
+ var ensureDirSync = import_mkdirs.default.ensureDirSync;
229910
+ var move = import_move.default.move;
229911
+ var moveSync = import_move.default.moveSync;
229912
+ var outputFile = import_output_file.default.outputFile;
229913
+ var outputFileSync = import_output_file.default.outputFileSync;
229914
+ var pathExists = import_path_exists.default.pathExists;
229915
+ var pathExistsSync = import_path_exists.default.pathExistsSync;
229916
+ var remove = import_remove.default.remove;
229917
+ var removeSync = import_remove.default.removeSync;
229918
+ var esm_default = {
229919
+ ...import_copy.default,
229920
+ ...import_empty.default,
229921
+ ...import_ensure.default,
229922
+ ...import_json.default,
229923
+ ...import_mkdirs.default,
229924
+ ...import_move.default,
229925
+ ...import_output_file.default,
229926
+ ...import_path_exists.default,
229927
+ ...import_remove.default
229928
+ };
229929
+
229930
+ // packages/cli-lib/src/compile.ts
229885
229931
  var stringifyNs = __toESM(require_json_stable_stringify());
229886
229932
  init_console_utils();
229887
229933
 
@@ -230175,7 +230221,7 @@ async function compile7(inputFiles, opts = {}) {
230175
230221
  const messageAsts = {};
230176
230222
  const idsWithFileName = {};
230177
230223
  const compiledFiles = await Promise.all(
230178
- inputFiles.map((f) => (0, import_fs_extra.readJSON)(f).then(formatter.compile))
230224
+ inputFiles.map((f) => readJSON(f).then(formatter.compile))
230179
230225
  );
230180
230226
  debug("Compiled files:", compiledFiles);
230181
230227
  for (let i = 0; i < inputFiles.length; i++) {
@@ -230237,19 +230283,18 @@ async function compileAndWrite(inputFiles, compileOpts = {}) {
230237
230283
  const serializedResult = await compile7(inputFiles, opts) + "\n";
230238
230284
  if (outFile) {
230239
230285
  debug("Writing output file:", outFile);
230240
- return (0, import_fs_extra.outputFile)(outFile, serializedResult);
230286
+ return outputFile(outFile, serializedResult);
230241
230287
  }
230242
230288
  await writeStdout(serializedResult);
230243
230289
  }
230244
230290
 
230245
230291
  // packages/cli-lib/src/compile_folder.ts
230246
- var import_fs_extra2 = __toESM(require_lib());
230247
230292
  var import_path2 = require("path");
230248
230293
  async function compileFolder(files, outFolder, opts = {}) {
230249
230294
  const results = await Promise.all(files.map((f) => compile7([f], opts)));
230250
230295
  const outFiles = files.map((f) => (0, import_path2.join)(outFolder, (0, import_path2.basename)(f)));
230251
230296
  return Promise.all(
230252
- outFiles.map((outFile, i) => (0, import_fs_extra2.outputFile)(outFile, results[i]))
230297
+ outFiles.map((outFile, i) => outputFile(outFile, results[i]))
230253
230298
  );
230254
230299
  }
230255
230300
 
@@ -230258,7 +230303,6 @@ init_console_utils();
230258
230303
 
230259
230304
  // packages/cli-lib/src/extract.ts
230260
230305
  init_ts_transformer();
230261
- var import_fs_extra3 = __toESM(require_lib());
230262
230306
  init_console_utils();
230263
230307
  var stringifyNs3 = __toESM(require_json_stable_stringify());
230264
230308
  init_icu_messageformat_parser();
@@ -230365,6 +230409,7 @@ function printPluralElement(el) {
230365
230409
 
230366
230410
  // packages/cli-lib/src/extract.ts
230367
230411
  init_parse_script();
230412
+ var import_promises = require("fs/promises");
230368
230413
  var stringify3 = stringifyNs3.default || stringifyNs3;
230369
230414
  function calculateLineColFromOffset(text, start) {
230370
230415
  if (!start) {
@@ -230459,7 +230504,7 @@ async function extract(files, extractOpts) {
230459
230504
  rawResults = await Promise.all(
230460
230505
  files.map(async (fn) => {
230461
230506
  debug("Extracting file:", fn);
230462
- const source = await (0, import_fs_extra3.readFile)(fn, "utf8");
230507
+ const source = await (0, import_promises.readFile)(fn, "utf8");
230463
230508
  return processFile(source, fn, opts);
230464
230509
  })
230465
230510
  );
@@ -230528,7 +230573,7 @@ async function extractAndWrite(files, extractOpts) {
230528
230573
  const serializedResult = await extract(files, opts) + "\n";
230529
230574
  if (outFile) {
230530
230575
  debug("Writing output file:", outFile);
230531
- return (0, import_fs_extra3.outputFile)(outFile, serializedResult);
230576
+ return outputFile(outFile, serializedResult);
230532
230577
  }
230533
230578
  await writeStdout(serializedResult);
230534
230579
  }
@@ -230599,9 +230644,6 @@ async function checkExtraKeys(translationFilesContents, sourceLocale) {
230599
230644
  }, true);
230600
230645
  }
230601
230646
 
230602
- // packages/cli-lib/src/verify/index.ts
230603
- var import_fs_extra4 = __toESM(require_lib());
230604
-
230605
230647
  // packages/cli-lib/src/verify/checkStructuralEquality.ts
230606
230648
  init_icu_messageformat_parser();
230607
230649
  init_console_utils();
@@ -230677,7 +230719,7 @@ async function verify(files, { sourceLocale, missingKeys, extraKeys, structuralE
230677
230719
  debug("Checking translation files:");
230678
230720
  files.forEach((fn) => debug(fn));
230679
230721
  const translationFilesContents = (await Promise.all(
230680
- files.map(async (fn) => [(0, import_path3.basename)(fn, ".json"), await (0, import_fs_extra4.readJSON)(fn)])
230722
+ files.map(async (fn) => [(0, import_path3.basename)(fn, ".json"), await readJSON(fn)])
230681
230723
  )).reduce((all, [locale, content]) => {
230682
230724
  all[locale] = content;
230683
230725
  return all;
@@ -230697,8 +230739,8 @@ async function verify(files, { sourceLocale, missingKeys, extraKeys, structuralE
230697
230739
  }
230698
230740
 
230699
230741
  // packages/cli-lib/src/cli.ts
230700
- var import_fs_extra5 = __toESM(require_lib());
230701
230742
  var import_path4 = require("path");
230743
+ var import_fs = require("fs");
230702
230744
  var KNOWN_COMMANDS = ["extract"];
230703
230745
  async function main(argv) {
230704
230746
  (0, import_loud_rejection.default)();
@@ -230795,7 +230837,7 @@ sentences are not translator-friendly.`
230795
230837
  }
230796
230838
  if (cmdObj.inFile) {
230797
230839
  debug("Reading inFile:", cmdObj.inFile);
230798
- const inFile = (0, import_fs_extra5.readFileSync)(cmdObj.inFile, "utf8");
230840
+ const inFile = (0, import_fs.readFileSync)(cmdObj.inFile, "utf8");
230799
230841
  files.push(
230800
230842
  ...inFile.split(/\n|\s+/).filter(Boolean).map((f) => (0, import_path4.resolve)(f))
230801
230843
  );
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@formatjs/cli",
3
3
  "description": "A CLI for formatjs.",
4
- "version": "6.8.1",
4
+ "version": "6.8.4",
5
5
  "license": "MIT",
6
6
  "author": "Linjie Ding <linjie@airtable.com>",
7
7
  "engines": {
8
8
  "node": ">= 16"
9
9
  },
10
10
  "devDependencies": {
11
- "@formatjs/cli-lib": "8.0.1"
11
+ "@formatjs/cli-lib": "8.0.4"
12
12
  },
13
13
  "peerDependencies": {
14
14
  "@glimmer/syntax": "^0.95.0",