@formatjs/cli 6.3.14 → 6.4.0

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 +553 -256
  2. package/package.json +2 -2
package/bin/formatjs CHANGED
@@ -3093,16 +3093,16 @@ var init_esm = __esm({
3093
3093
  }
3094
3094
  });
3095
3095
 
3096
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/utils/array.js
3096
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/utils/array.js
3097
3097
  var require_array = __commonJS({
3098
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/utils/array.js"(exports) {
3098
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/utils/array.js"(exports) {
3099
3099
  "use strict";
3100
3100
  Object.defineProperty(exports, "__esModule", { value: true });
3101
3101
  exports.splitWhen = exports.flatten = void 0;
3102
- function flatten(items) {
3102
+ function flatten2(items) {
3103
3103
  return items.reduce((collection, item) => [].concat(collection, item), []);
3104
3104
  }
3105
- exports.flatten = flatten;
3105
+ exports.flatten = flatten2;
3106
3106
  function splitWhen(items, predicate) {
3107
3107
  const result = [[]];
3108
3108
  let groupIndex = 0;
@@ -3120,9 +3120,9 @@ var require_array = __commonJS({
3120
3120
  }
3121
3121
  });
3122
3122
 
3123
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/utils/errno.js
3123
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/utils/errno.js
3124
3124
  var require_errno = __commonJS({
3125
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/utils/errno.js"(exports) {
3125
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/utils/errno.js"(exports) {
3126
3126
  "use strict";
3127
3127
  Object.defineProperty(exports, "__esModule", { value: true });
3128
3128
  exports.isEnoentCodeError = void 0;
@@ -3133,9 +3133,9 @@ var require_errno = __commonJS({
3133
3133
  }
3134
3134
  });
3135
3135
 
3136
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/utils/fs.js
3136
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/utils/fs.js
3137
3137
  var require_fs = __commonJS({
3138
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/utils/fs.js"(exports) {
3138
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/utils/fs.js"(exports) {
3139
3139
  "use strict";
3140
3140
  Object.defineProperty(exports, "__esModule", { value: true });
3141
3141
  exports.createDirentFromStats = void 0;
@@ -3158,9 +3158,9 @@ var require_fs = __commonJS({
3158
3158
  }
3159
3159
  });
3160
3160
 
3161
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/utils/path.js
3161
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/utils/path.js
3162
3162
  var require_path = __commonJS({
3163
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/utils/path.js"(exports) {
3163
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/utils/path.js"(exports) {
3164
3164
  "use strict";
3165
3165
  Object.defineProperty(exports, "__esModule", { value: true });
3166
3166
  exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;
@@ -4228,7 +4228,7 @@ var require_parse = __commonJS({
4228
4228
  CHAR_NO_BREAK_SPACE,
4229
4229
  CHAR_ZERO_WIDTH_NOBREAK_SPACE
4230
4230
  } = require_constants();
4231
- var parse5 = (input, options = {}) => {
4231
+ var parse6 = (input, options = {}) => {
4232
4232
  if (typeof input !== "string") {
4233
4233
  throw new TypeError("Expected a string");
4234
4234
  }
@@ -4432,7 +4432,7 @@ var require_parse = __commonJS({
4432
4432
  push({ type: "eos" });
4433
4433
  return ast;
4434
4434
  };
4435
- module2.exports = parse5;
4435
+ module2.exports = parse6;
4436
4436
  }
4437
4437
  });
4438
4438
 
@@ -4443,7 +4443,7 @@ var require_braces = __commonJS({
4443
4443
  var stringify3 = require_stringify();
4444
4444
  var compile8 = require_compile();
4445
4445
  var expand = require_expand();
4446
- var parse5 = require_parse();
4446
+ var parse6 = require_parse();
4447
4447
  var braces = (input, options = {}) => {
4448
4448
  let output = [];
4449
4449
  if (Array.isArray(input)) {
@@ -4463,7 +4463,7 @@ var require_braces = __commonJS({
4463
4463
  }
4464
4464
  return output;
4465
4465
  };
4466
- braces.parse = (input, options = {}) => parse5(input, options);
4466
+ braces.parse = (input, options = {}) => parse6(input, options);
4467
4467
  braces.stringify = (input, options = {}) => {
4468
4468
  if (typeof input === "string") {
4469
4469
  return stringify3(braces.parse(input, options), options);
@@ -5121,7 +5121,7 @@ var require_parse2 = __commonJS({
5121
5121
  var syntaxError = (type, char) => {
5122
5122
  return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
5123
5123
  };
5124
- var parse5 = (input, options) => {
5124
+ var parse6 = (input, options) => {
5125
5125
  if (typeof input !== "string") {
5126
5126
  throw new TypeError("Expected a string");
5127
5127
  }
@@ -5271,7 +5271,7 @@ var require_parse2 = __commonJS({
5271
5271
  output = token.close = `)$))${extglobStar}`;
5272
5272
  }
5273
5273
  if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
5274
- const expression = parse5(rest, { ...options, fastpaths: false }).output;
5274
+ const expression = parse6(rest, { ...options, fastpaths: false }).output;
5275
5275
  output = token.close = `)${expression})${extglobStar})`;
5276
5276
  }
5277
5277
  if (token.prev.type === "bos") {
@@ -5800,7 +5800,7 @@ var require_parse2 = __commonJS({
5800
5800
  }
5801
5801
  return state;
5802
5802
  };
5803
- parse5.fastpaths = (input, options) => {
5803
+ parse6.fastpaths = (input, options) => {
5804
5804
  const opts = { ...options };
5805
5805
  const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
5806
5806
  const len = input.length;
@@ -5869,7 +5869,7 @@ var require_parse2 = __commonJS({
5869
5869
  }
5870
5870
  return source;
5871
5871
  };
5872
- module2.exports = parse5;
5872
+ module2.exports = parse6;
5873
5873
  }
5874
5874
  });
5875
5875
 
@@ -5879,7 +5879,7 @@ var require_picomatch = __commonJS({
5879
5879
  "use strict";
5880
5880
  var path = require("path");
5881
5881
  var scan = require_scan();
5882
- var parse5 = require_parse2();
5882
+ var parse6 = require_parse2();
5883
5883
  var utils = require_utils2();
5884
5884
  var constants = require_constants2();
5885
5885
  var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
@@ -5969,7 +5969,7 @@ var require_picomatch = __commonJS({
5969
5969
  picomatch.parse = (pattern, options) => {
5970
5970
  if (Array.isArray(pattern))
5971
5971
  return pattern.map((p2) => picomatch.parse(p2, options));
5972
- return parse5(pattern, { ...options, fastpaths: false });
5972
+ return parse6(pattern, { ...options, fastpaths: false });
5973
5973
  };
5974
5974
  picomatch.scan = (input, options) => scan(input, options);
5975
5975
  picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
@@ -5995,10 +5995,10 @@ var require_picomatch = __commonJS({
5995
5995
  }
5996
5996
  let parsed = { negated: false, fastpaths: true };
5997
5997
  if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
5998
- parsed.output = parse5.fastpaths(input, options);
5998
+ parsed.output = parse6.fastpaths(input, options);
5999
5999
  }
6000
6000
  if (!parsed.output) {
6001
- parsed = parse5(input, options);
6001
+ parsed = parse6(input, options);
6002
6002
  }
6003
6003
  return picomatch.compileRe(parsed, options, returnOutput, returnState);
6004
6004
  };
@@ -6192,12 +6192,12 @@ var require_micromatch = __commonJS({
6192
6192
  }
6193
6193
  });
6194
6194
 
6195
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/utils/pattern.js
6195
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/utils/pattern.js
6196
6196
  var require_pattern = __commonJS({
6197
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/utils/pattern.js"(exports) {
6197
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/utils/pattern.js"(exports) {
6198
6198
  "use strict";
6199
6199
  Object.defineProperty(exports, "__esModule", { value: true });
6200
- exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
6200
+ exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
6201
6201
  var path = require("path");
6202
6202
  var globParent = require_glob_parent();
6203
6203
  var micromatch = require_micromatch();
@@ -6293,8 +6293,8 @@ var require_pattern = __commonJS({
6293
6293
  }
6294
6294
  exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
6295
6295
  function isAffectDepthOfReadingPattern(pattern) {
6296
- const basename2 = path.basename(pattern);
6297
- return endsWithSlashGlobStar(pattern) || isStaticPattern(basename2);
6296
+ const basename3 = path.basename(pattern);
6297
+ return endsWithSlashGlobStar(pattern) || isStaticPattern(basename3);
6298
6298
  }
6299
6299
  exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
6300
6300
  function expandPatternsWithBraceExpansion(patterns) {
@@ -6337,6 +6337,23 @@ var require_pattern = __commonJS({
6337
6337
  return pattern.replace(DOUBLE_SLASH_RE, "/");
6338
6338
  }
6339
6339
  exports.removeDuplicateSlashes = removeDuplicateSlashes;
6340
+ function partitionAbsoluteAndRelative(patterns) {
6341
+ const absolute = [];
6342
+ const relative = [];
6343
+ for (const pattern of patterns) {
6344
+ if (isAbsolute(pattern)) {
6345
+ absolute.push(pattern);
6346
+ } else {
6347
+ relative.push(pattern);
6348
+ }
6349
+ }
6350
+ return [absolute, relative];
6351
+ }
6352
+ exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
6353
+ function isAbsolute(pattern) {
6354
+ return path.isAbsolute(pattern);
6355
+ }
6356
+ exports.isAbsolute = isAbsolute;
6340
6357
  }
6341
6358
  });
6342
6359
 
@@ -6459,9 +6476,9 @@ var require_merge2 = __commonJS({
6459
6476
  }
6460
6477
  });
6461
6478
 
6462
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/utils/stream.js
6479
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/utils/stream.js
6463
6480
  var require_stream = __commonJS({
6464
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/utils/stream.js"(exports) {
6481
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/utils/stream.js"(exports) {
6465
6482
  "use strict";
6466
6483
  Object.defineProperty(exports, "__esModule", { value: true });
6467
6484
  exports.merge = void 0;
@@ -6482,9 +6499,9 @@ var require_stream = __commonJS({
6482
6499
  }
6483
6500
  });
6484
6501
 
6485
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/utils/string.js
6502
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/utils/string.js
6486
6503
  var require_string = __commonJS({
6487
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/utils/string.js"(exports) {
6504
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/utils/string.js"(exports) {
6488
6505
  "use strict";
6489
6506
  Object.defineProperty(exports, "__esModule", { value: true });
6490
6507
  exports.isEmpty = exports.isString = void 0;
@@ -6499,9 +6516,9 @@ var require_string = __commonJS({
6499
6516
  }
6500
6517
  });
6501
6518
 
6502
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/utils/index.js
6519
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/utils/index.js
6503
6520
  var require_utils3 = __commonJS({
6504
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/utils/index.js"(exports) {
6521
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/utils/index.js"(exports) {
6505
6522
  "use strict";
6506
6523
  Object.defineProperty(exports, "__esModule", { value: true });
6507
6524
  exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0;
@@ -6522,9 +6539,9 @@ var require_utils3 = __commonJS({
6522
6539
  }
6523
6540
  });
6524
6541
 
6525
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/managers/tasks.js
6542
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/managers/tasks.js
6526
6543
  var require_tasks = __commonJS({
6527
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/managers/tasks.js"(exports) {
6544
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/managers/tasks.js"(exports) {
6528
6545
  "use strict";
6529
6546
  Object.defineProperty(exports, "__esModule", { value: true });
6530
6547
  exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
@@ -7187,9 +7204,9 @@ var require_reusify = __commonJS({
7187
7204
  }
7188
7205
  });
7189
7206
 
7190
- // node_modules/.aspect_rules_js/fastq@1.17.1/node_modules/fastq/queue.js
7207
+ // node_modules/.aspect_rules_js/fastq@1.18.0/node_modules/fastq/queue.js
7191
7208
  var require_queue = __commonJS({
7192
- "node_modules/.aspect_rules_js/fastq@1.17.1/node_modules/fastq/queue.js"(exports, module2) {
7209
+ "node_modules/.aspect_rules_js/fastq@1.18.0/node_modules/fastq/queue.js"(exports, module2) {
7193
7210
  "use strict";
7194
7211
  var reusify = require_reusify();
7195
7212
  function fastqueue(context, worker, _concurrency) {
@@ -7428,17 +7445,20 @@ var require_queue = __commonJS({
7428
7445
  return p2;
7429
7446
  }
7430
7447
  function drained() {
7431
- if (queue.idle()) {
7432
- return new Promise(function(resolve2) {
7433
- resolve2();
7434
- });
7435
- }
7436
- var previousDrain = queue.drain;
7437
7448
  var p2 = new Promise(function(resolve2) {
7438
- queue.drain = function() {
7439
- previousDrain();
7440
- resolve2();
7441
- };
7449
+ process.nextTick(function() {
7450
+ if (queue.idle()) {
7451
+ resolve2();
7452
+ } else {
7453
+ var previousDrain = queue.drain;
7454
+ queue.drain = function() {
7455
+ if (typeof previousDrain === "function")
7456
+ previousDrain();
7457
+ resolve2();
7458
+ queue.drain = previousDrain;
7459
+ };
7460
+ }
7461
+ });
7442
7462
  });
7443
7463
  return p2;
7444
7464
  }
@@ -7835,9 +7855,9 @@ var require_out3 = __commonJS({
7835
7855
  }
7836
7856
  });
7837
7857
 
7838
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/readers/reader.js
7858
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js
7839
7859
  var require_reader2 = __commonJS({
7840
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/readers/reader.js"(exports) {
7860
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js"(exports) {
7841
7861
  "use strict";
7842
7862
  Object.defineProperty(exports, "__esModule", { value: true });
7843
7863
  var path = require("path");
@@ -7874,9 +7894,9 @@ var require_reader2 = __commonJS({
7874
7894
  }
7875
7895
  });
7876
7896
 
7877
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/readers/stream.js
7897
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/readers/stream.js
7878
7898
  var require_stream3 = __commonJS({
7879
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/readers/stream.js"(exports) {
7899
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/readers/stream.js"(exports) {
7880
7900
  "use strict";
7881
7901
  Object.defineProperty(exports, "__esModule", { value: true });
7882
7902
  var stream_1 = require("stream");
@@ -7931,9 +7951,9 @@ var require_stream3 = __commonJS({
7931
7951
  }
7932
7952
  });
7933
7953
 
7934
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/readers/async.js
7954
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/readers/async.js
7935
7955
  var require_async5 = __commonJS({
7936
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/readers/async.js"(exports) {
7956
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/readers/async.js"(exports) {
7937
7957
  "use strict";
7938
7958
  Object.defineProperty(exports, "__esModule", { value: true });
7939
7959
  var fsWalk = require_out3();
@@ -7970,9 +7990,9 @@ var require_async5 = __commonJS({
7970
7990
  }
7971
7991
  });
7972
7992
 
7973
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/providers/matchers/matcher.js
7993
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/matcher.js
7974
7994
  var require_matcher = __commonJS({
7975
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
7995
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
7976
7996
  "use strict";
7977
7997
  Object.defineProperty(exports, "__esModule", { value: true });
7978
7998
  var utils = require_utils3();
@@ -8021,9 +8041,9 @@ var require_matcher = __commonJS({
8021
8041
  }
8022
8042
  });
8023
8043
 
8024
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/providers/matchers/partial.js
8044
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/partial.js
8025
8045
  var require_partial = __commonJS({
8026
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/providers/matchers/partial.js"(exports) {
8046
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/partial.js"(exports) {
8027
8047
  "use strict";
8028
8048
  Object.defineProperty(exports, "__esModule", { value: true });
8029
8049
  var matcher_1 = require_matcher();
@@ -8058,9 +8078,9 @@ var require_partial = __commonJS({
8058
8078
  }
8059
8079
  });
8060
8080
 
8061
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/providers/filters/deep.js
8081
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/deep.js
8062
8082
  var require_deep = __commonJS({
8063
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
8083
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
8064
8084
  "use strict";
8065
8085
  Object.defineProperty(exports, "__esModule", { value: true });
8066
8086
  var utils = require_utils3();
@@ -8123,9 +8143,9 @@ var require_deep = __commonJS({
8123
8143
  }
8124
8144
  });
8125
8145
 
8126
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/providers/filters/entry.js
8146
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/entry.js
8127
8147
  var require_entry = __commonJS({
8128
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
8148
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
8129
8149
  "use strict";
8130
8150
  Object.defineProperty(exports, "__esModule", { value: true });
8131
8151
  var utils = require_utils3();
@@ -8136,11 +8156,19 @@ var require_entry = __commonJS({
8136
8156
  this.index = /* @__PURE__ */ new Map();
8137
8157
  }
8138
8158
  getFilter(positive, negative) {
8139
- const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions);
8140
- const negativeRe = utils.pattern.convertPatternsToRe(negative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true }));
8141
- return (entry) => this._filter(entry, positiveRe, negativeRe);
8159
+ const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative);
8160
+ const patterns = {
8161
+ positive: {
8162
+ all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions)
8163
+ },
8164
+ negative: {
8165
+ absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })),
8166
+ relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true }))
8167
+ }
8168
+ };
8169
+ return (entry) => this._filter(entry, patterns);
8142
8170
  }
8143
- _filter(entry, positiveRe, negativeRe) {
8171
+ _filter(entry, patterns) {
8144
8172
  const filepath = utils.path.removeLeadingDotSegment(entry.path);
8145
8173
  if (this._settings.unique && this._isDuplicateEntry(filepath)) {
8146
8174
  return false;
@@ -8148,11 +8176,7 @@ var require_entry = __commonJS({
8148
8176
  if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
8149
8177
  return false;
8150
8178
  }
8151
- if (this._isSkippedByAbsoluteNegativePatterns(filepath, negativeRe)) {
8152
- return false;
8153
- }
8154
- const isDirectory = entry.dirent.isDirectory();
8155
- const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory) && !this._isMatchToPatterns(filepath, negativeRe, isDirectory);
8179
+ const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory());
8156
8180
  if (this._settings.unique && isMatched) {
8157
8181
  this._createIndexRecord(filepath);
8158
8182
  }
@@ -8170,14 +8194,32 @@ var require_entry = __commonJS({
8170
8194
  _onlyDirectoryFilter(entry) {
8171
8195
  return this._settings.onlyDirectories && !entry.dirent.isDirectory();
8172
8196
  }
8173
- _isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) {
8174
- if (!this._settings.absolute) {
8197
+ _isMatchToPatternsSet(filepath, patterns, isDirectory) {
8198
+ const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory);
8199
+ if (!isMatched) {
8200
+ return false;
8201
+ }
8202
+ const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory);
8203
+ if (isMatchedByRelativeNegative) {
8204
+ return false;
8205
+ }
8206
+ const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory);
8207
+ if (isMatchedByAbsoluteNegative) {
8208
+ return false;
8209
+ }
8210
+ return true;
8211
+ }
8212
+ _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) {
8213
+ if (patternsRe.length === 0) {
8175
8214
  return false;
8176
8215
  }
8177
- const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath);
8178
- return utils.pattern.matchAny(fullpath, patternsRe);
8216
+ const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath);
8217
+ return this._isMatchToPatterns(fullpath, patternsRe, isDirectory);
8179
8218
  }
8180
8219
  _isMatchToPatterns(filepath, patternsRe, isDirectory) {
8220
+ if (patternsRe.length === 0) {
8221
+ return false;
8222
+ }
8181
8223
  const isMatched = utils.pattern.matchAny(filepath, patternsRe);
8182
8224
  if (!isMatched && isDirectory) {
8183
8225
  return utils.pattern.matchAny(filepath + "/", patternsRe);
@@ -8189,9 +8231,9 @@ var require_entry = __commonJS({
8189
8231
  }
8190
8232
  });
8191
8233
 
8192
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/providers/filters/error.js
8234
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/error.js
8193
8235
  var require_error2 = __commonJS({
8194
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/providers/filters/error.js"(exports) {
8236
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/error.js"(exports) {
8195
8237
  "use strict";
8196
8238
  Object.defineProperty(exports, "__esModule", { value: true });
8197
8239
  var utils = require_utils3();
@@ -8210,9 +8252,9 @@ var require_error2 = __commonJS({
8210
8252
  }
8211
8253
  });
8212
8254
 
8213
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/providers/transformers/entry.js
8255
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/providers/transformers/entry.js
8214
8256
  var require_entry2 = __commonJS({
8215
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
8257
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
8216
8258
  "use strict";
8217
8259
  Object.defineProperty(exports, "__esModule", { value: true });
8218
8260
  var utils = require_utils3();
@@ -8242,9 +8284,9 @@ var require_entry2 = __commonJS({
8242
8284
  }
8243
8285
  });
8244
8286
 
8245
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/providers/provider.js
8287
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js
8246
8288
  var require_provider = __commonJS({
8247
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/providers/provider.js"(exports) {
8289
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js"(exports) {
8248
8290
  "use strict";
8249
8291
  Object.defineProperty(exports, "__esModule", { value: true });
8250
8292
  var path = require("path");
@@ -8296,9 +8338,9 @@ var require_provider = __commonJS({
8296
8338
  }
8297
8339
  });
8298
8340
 
8299
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/providers/async.js
8341
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/providers/async.js
8300
8342
  var require_async6 = __commonJS({
8301
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/providers/async.js"(exports) {
8343
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/providers/async.js"(exports) {
8302
8344
  "use strict";
8303
8345
  Object.defineProperty(exports, "__esModule", { value: true });
8304
8346
  var async_1 = require_async5();
@@ -8325,9 +8367,9 @@ var require_async6 = __commonJS({
8325
8367
  }
8326
8368
  });
8327
8369
 
8328
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/providers/stream.js
8370
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/providers/stream.js
8329
8371
  var require_stream4 = __commonJS({
8330
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/providers/stream.js"(exports) {
8372
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/providers/stream.js"(exports) {
8331
8373
  "use strict";
8332
8374
  Object.defineProperty(exports, "__esModule", { value: true });
8333
8375
  var stream_1 = require("stream");
@@ -8359,9 +8401,9 @@ var require_stream4 = __commonJS({
8359
8401
  }
8360
8402
  });
8361
8403
 
8362
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/readers/sync.js
8404
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/readers/sync.js
8363
8405
  var require_sync5 = __commonJS({
8364
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/readers/sync.js"(exports) {
8406
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/readers/sync.js"(exports) {
8365
8407
  "use strict";
8366
8408
  Object.defineProperty(exports, "__esModule", { value: true });
8367
8409
  var fsStat = require_out();
@@ -8407,9 +8449,9 @@ var require_sync5 = __commonJS({
8407
8449
  }
8408
8450
  });
8409
8451
 
8410
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/providers/sync.js
8452
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/providers/sync.js
8411
8453
  var require_sync6 = __commonJS({
8412
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/providers/sync.js"(exports) {
8454
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/providers/sync.js"(exports) {
8413
8455
  "use strict";
8414
8456
  Object.defineProperty(exports, "__esModule", { value: true });
8415
8457
  var sync_1 = require_sync5();
@@ -8436,9 +8478,9 @@ var require_sync6 = __commonJS({
8436
8478
  }
8437
8479
  });
8438
8480
 
8439
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/settings.js
8481
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/settings.js
8440
8482
  var require_settings4 = __commonJS({
8441
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/settings.js"(exports) {
8483
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/settings.js"(exports) {
8442
8484
  "use strict";
8443
8485
  Object.defineProperty(exports, "__esModule", { value: true });
8444
8486
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
@@ -8496,9 +8538,9 @@ var require_settings4 = __commonJS({
8496
8538
  }
8497
8539
  });
8498
8540
 
8499
- // node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/index.js
8541
+ // node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/index.js
8500
8542
  var require_out4 = __commonJS({
8501
- "node_modules/.aspect_rules_js/fast-glob@3.3.2/node_modules/fast-glob/out/index.js"(exports, module2) {
8543
+ "node_modules/.aspect_rules_js/fast-glob@3.3.3/node_modules/fast-glob/out/index.js"(exports, module2) {
8502
8544
  "use strict";
8503
8545
  var taskManager = require_tasks();
8504
8546
  var async_1 = require_async6();
@@ -12368,13 +12410,158 @@ var require_parser = __commonJS({
12368
12410
  }
12369
12411
  });
12370
12412
 
12413
+ // node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/manipulator.js
12414
+ var require_manipulator = __commonJS({
12415
+ "node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/manipulator.js"(exports) {
12416
+ "use strict";
12417
+ Object.defineProperty(exports, "__esModule", { value: true });
12418
+ exports.hoistSelectors = hoistSelectors2;
12419
+ exports.isStructurallySame = isStructurallySame2;
12420
+ var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
12421
+ var types_1 = require_types();
12422
+ function cloneDeep(obj) {
12423
+ if (Array.isArray(obj)) {
12424
+ return tslib_1.__spreadArray([], obj.map(cloneDeep), true);
12425
+ }
12426
+ if (obj !== null && typeof obj === "object") {
12427
+ return Object.keys(obj).reduce(function(cloned, k) {
12428
+ cloned[k] = cloneDeep(obj[k]);
12429
+ return cloned;
12430
+ }, {});
12431
+ }
12432
+ return obj;
12433
+ }
12434
+ function hoistPluralOrSelectElement(ast, el, positionToInject) {
12435
+ var cloned = cloneDeep(el);
12436
+ var options = cloned.options;
12437
+ cloned.options = Object.keys(options).reduce(function(all, k) {
12438
+ var newValue = hoistSelectors2(tslib_1.__spreadArray(tslib_1.__spreadArray(tslib_1.__spreadArray([], ast.slice(0, positionToInject), true), options[k].value, true), ast.slice(positionToInject + 1), true));
12439
+ all[k] = {
12440
+ value: newValue
12441
+ };
12442
+ return all;
12443
+ }, {});
12444
+ return cloned;
12445
+ }
12446
+ function isPluralOrSelectElement(el) {
12447
+ return (0, types_1.isPluralElement)(el) || (0, types_1.isSelectElement)(el);
12448
+ }
12449
+ function findPluralOrSelectElement(ast) {
12450
+ return !!ast.find(function(el) {
12451
+ if (isPluralOrSelectElement(el)) {
12452
+ return true;
12453
+ }
12454
+ if ((0, types_1.isTagElement)(el)) {
12455
+ return findPluralOrSelectElement(el.children);
12456
+ }
12457
+ return false;
12458
+ });
12459
+ }
12460
+ function hoistSelectors2(ast) {
12461
+ for (var i = 0; i < ast.length; i++) {
12462
+ var el = ast[i];
12463
+ if (isPluralOrSelectElement(el)) {
12464
+ return [hoistPluralOrSelectElement(ast, el, i)];
12465
+ }
12466
+ if ((0, types_1.isTagElement)(el) && findPluralOrSelectElement([el])) {
12467
+ throw new Error("Cannot hoist plural/select within a tag element. Please put the tag element inside each plural/select option");
12468
+ }
12469
+ }
12470
+ return ast;
12471
+ }
12472
+ function isStructurallySamePluralOrSelect(el1, el2) {
12473
+ var options1 = el1.options;
12474
+ var options2 = el2.options;
12475
+ if (Object.keys(options1).length !== Object.keys(options2).length) {
12476
+ return false;
12477
+ }
12478
+ for (var key in options1) {
12479
+ if (!options2[key]) {
12480
+ return false;
12481
+ }
12482
+ if (!isStructurallySame2(options1[key].value, options2[key].value)) {
12483
+ return false;
12484
+ }
12485
+ }
12486
+ return true;
12487
+ }
12488
+ function isStructurallySame2(a, b) {
12489
+ var aWithoutLiteral = a.filter(function(el) {
12490
+ return !(0, types_1.isLiteralElement)(el);
12491
+ });
12492
+ var bWithoutLiteral = b.filter(function(el) {
12493
+ return !(0, types_1.isLiteralElement)(el);
12494
+ });
12495
+ if (aWithoutLiteral.length !== bWithoutLiteral.length) {
12496
+ return false;
12497
+ }
12498
+ var elementsMapInA = aWithoutLiteral.reduce(function(all, el) {
12499
+ if ((0, types_1.isPoundElement)(el)) {
12500
+ all["#"] = el;
12501
+ return all;
12502
+ }
12503
+ all[el.value] = el;
12504
+ return all;
12505
+ }, {});
12506
+ var elementsMapInB = bWithoutLiteral.reduce(function(all, el) {
12507
+ if ((0, types_1.isPoundElement)(el)) {
12508
+ all["#"] = el;
12509
+ return all;
12510
+ }
12511
+ all[el.value] = el;
12512
+ return all;
12513
+ }, {});
12514
+ for (var _i = 0, _a = Object.keys(elementsMapInA); _i < _a.length; _i++) {
12515
+ var varName = _a[_i];
12516
+ var elA = elementsMapInA[varName];
12517
+ var elB = elementsMapInB[varName];
12518
+ if (!elB) {
12519
+ return false;
12520
+ }
12521
+ if (elA.type !== elB.type) {
12522
+ return false;
12523
+ }
12524
+ if ((0, types_1.isLiteralElement)(elA) || (0, types_1.isLiteralElement)(elB)) {
12525
+ continue;
12526
+ }
12527
+ if ((0, types_1.isArgumentElement)(elA) && (0, types_1.isArgumentElement)(elB) && elA.value !== elB.value) {
12528
+ return false;
12529
+ }
12530
+ if ((0, types_1.isPoundElement)(elA) || (0, types_1.isPoundElement)(elB)) {
12531
+ continue;
12532
+ }
12533
+ if ((0, types_1.isDateElement)(elA) || (0, types_1.isTimeElement)(elA) || (0, types_1.isNumberElement)(elA) || (0, types_1.isDateElement)(elB) || (0, types_1.isTimeElement)(elB) || (0, types_1.isNumberElement)(elB)) {
12534
+ if (elA.value !== elB.value) {
12535
+ return false;
12536
+ }
12537
+ }
12538
+ if ((0, types_1.isPluralElement)(elA) && (0, types_1.isPluralElement)(elB) && !isStructurallySamePluralOrSelect(elA, elB)) {
12539
+ return false;
12540
+ }
12541
+ if ((0, types_1.isSelectElement)(elA) && (0, types_1.isSelectElement)(elB) && isStructurallySamePluralOrSelect(elA, elB)) {
12542
+ return false;
12543
+ }
12544
+ if ((0, types_1.isTagElement)(elA) && (0, types_1.isTagElement)(elB)) {
12545
+ if (elA.value !== elB.value) {
12546
+ return false;
12547
+ }
12548
+ if (!isStructurallySame2(elA.children, elB.children)) {
12549
+ return false;
12550
+ }
12551
+ }
12552
+ }
12553
+ return true;
12554
+ }
12555
+ }
12556
+ });
12557
+
12371
12558
  // node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/index.js
12372
12559
  var require_icu_messageformat_parser = __commonJS({
12373
12560
  "node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/index.js"(exports) {
12374
12561
  "use strict";
12375
12562
  Object.defineProperty(exports, "__esModule", { value: true });
12376
- exports._Parser = void 0;
12377
- exports.parse = parse5;
12563
+ exports.isStructurallySame = exports._Parser = void 0;
12564
+ exports.parse = parse6;
12378
12565
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
12379
12566
  var error_1 = require_error3();
12380
12567
  var parser_1 = require_parser();
@@ -12396,7 +12583,7 @@ var require_icu_messageformat_parser = __commonJS({
12396
12583
  }
12397
12584
  });
12398
12585
  }
12399
- function parse5(message, opts) {
12586
+ function parse6(message, opts) {
12400
12587
  if (opts === void 0) {
12401
12588
  opts = {};
12402
12589
  }
@@ -12415,6 +12602,10 @@ var require_icu_messageformat_parser = __commonJS({
12415
12602
  }
12416
12603
  tslib_1.__exportStar(require_types(), exports);
12417
12604
  exports._Parser = parser_1.Parser;
12605
+ var manipulator_1 = require_manipulator();
12606
+ Object.defineProperty(exports, "isStructurallySame", { enumerable: true, get: function() {
12607
+ return manipulator_1.isStructurallySame;
12608
+ } });
12418
12609
  }
12419
12610
  });
12420
12611
 
@@ -13256,9 +13447,9 @@ var require_graceful_fs = __commonJS({
13256
13447
  }
13257
13448
  });
13258
13449
 
13259
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/fs/index.js
13450
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js
13260
13451
  var require_fs5 = __commonJS({
13261
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/fs/index.js"(exports) {
13452
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"(exports) {
13262
13453
  "use strict";
13263
13454
  var u = require_universalify().fromCallback;
13264
13455
  var fs = require_graceful_fs();
@@ -13269,6 +13460,7 @@ var require_fs5 = __commonJS({
13269
13460
  "chown",
13270
13461
  "close",
13271
13462
  "copyFile",
13463
+ "cp",
13272
13464
  "fchmod",
13273
13465
  "fchown",
13274
13466
  "fdatasync",
@@ -13276,8 +13468,10 @@ var require_fs5 = __commonJS({
13276
13468
  "fsync",
13277
13469
  "ftruncate",
13278
13470
  "futimes",
13471
+ "glob",
13279
13472
  "lchmod",
13280
13473
  "lchown",
13474
+ "lutimes",
13281
13475
  "link",
13282
13476
  "lstat",
13283
13477
  "mkdir",
@@ -13292,6 +13486,7 @@ var require_fs5 = __commonJS({
13292
13486
  "rm",
13293
13487
  "rmdir",
13294
13488
  "stat",
13489
+ "statfs",
13295
13490
  "symlink",
13296
13491
  "truncate",
13297
13492
  "unlink",
@@ -13372,9 +13567,9 @@ var require_fs5 = __commonJS({
13372
13567
  }
13373
13568
  });
13374
13569
 
13375
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/utils.js
13570
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/utils.js
13376
13571
  var require_utils5 = __commonJS({
13377
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module2) {
13572
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module2) {
13378
13573
  "use strict";
13379
13574
  var path = require("path");
13380
13575
  module2.exports.checkPath = function checkPath(pth) {
@@ -13390,9 +13585,9 @@ var require_utils5 = __commonJS({
13390
13585
  }
13391
13586
  });
13392
13587
 
13393
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/make-dir.js
13588
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/make-dir.js
13394
13589
  var require_make_dir = __commonJS({
13395
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module2) {
13590
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module2) {
13396
13591
  "use strict";
13397
13592
  var fs = require_fs5();
13398
13593
  var { checkPath } = require_utils5();
@@ -13419,9 +13614,9 @@ var require_make_dir = __commonJS({
13419
13614
  }
13420
13615
  });
13421
13616
 
13422
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/index.js
13617
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/index.js
13423
13618
  var require_mkdirs = __commonJS({
13424
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/index.js"(exports, module2) {
13619
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/index.js"(exports, module2) {
13425
13620
  "use strict";
13426
13621
  var u = require_universalify().fromPromise;
13427
13622
  var { makeDir: _makeDir, makeDirSync } = require_make_dir();
@@ -13438,9 +13633,9 @@ var require_mkdirs = __commonJS({
13438
13633
  }
13439
13634
  });
13440
13635
 
13441
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/path-exists/index.js
13636
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/path-exists/index.js
13442
13637
  var require_path_exists = __commonJS({
13443
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/path-exists/index.js"(exports, module2) {
13638
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/path-exists/index.js"(exports, module2) {
13444
13639
  "use strict";
13445
13640
  var u = require_universalify().fromPromise;
13446
13641
  var fs = require_fs5();
@@ -13454,9 +13649,9 @@ var require_path_exists = __commonJS({
13454
13649
  }
13455
13650
  });
13456
13651
 
13457
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/util/utimes.js
13652
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/util/utimes.js
13458
13653
  var require_utimes = __commonJS({
13459
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/util/utimes.js"(exports, module2) {
13654
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/util/utimes.js"(exports, module2) {
13460
13655
  "use strict";
13461
13656
  var fs = require_fs5();
13462
13657
  var u = require_universalify().fromPromise;
@@ -13488,9 +13683,9 @@ var require_utimes = __commonJS({
13488
13683
  }
13489
13684
  });
13490
13685
 
13491
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/util/stat.js
13686
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/util/stat.js
13492
13687
  var require_stat = __commonJS({
13493
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/util/stat.js"(exports, module2) {
13688
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/util/stat.js"(exports, module2) {
13494
13689
  "use strict";
13495
13690
  var fs = require_fs5();
13496
13691
  var path = require("path");
@@ -13626,9 +13821,9 @@ var require_stat = __commonJS({
13626
13821
  }
13627
13822
  });
13628
13823
 
13629
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy.js
13824
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/copy.js
13630
13825
  var require_copy = __commonJS({
13631
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy.js"(exports, module2) {
13826
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/copy.js"(exports, module2) {
13632
13827
  "use strict";
13633
13828
  var fs = require_fs5();
13634
13829
  var path = require("path");
@@ -13713,16 +13908,21 @@ var require_copy = __commonJS({
13713
13908
  if (!destStat) {
13714
13909
  await fs.mkdir(dest);
13715
13910
  }
13716
- const items = await fs.readdir(src);
13717
- await Promise.all(items.map(async (item) => {
13718
- const srcItem = path.join(src, item);
13719
- const destItem = path.join(dest, item);
13720
- const include = await runFilter(srcItem, destItem, opts);
13721
- if (!include)
13722
- return;
13723
- const { destStat: destStat2 } = await stat.checkPaths(srcItem, destItem, "copy", opts);
13724
- return getStatsAndPerformCopy(destStat2, srcItem, destItem, opts);
13725
- }));
13911
+ const promises = [];
13912
+ for await (const item of await fs.opendir(src)) {
13913
+ const srcItem = path.join(src, item.name);
13914
+ const destItem = path.join(dest, item.name);
13915
+ promises.push(
13916
+ runFilter(srcItem, destItem, opts).then((include) => {
13917
+ if (include) {
13918
+ return stat.checkPaths(srcItem, destItem, "copy", opts).then(({ destStat: destStat2 }) => {
13919
+ return getStatsAndPerformCopy(destStat2, srcItem, destItem, opts);
13920
+ });
13921
+ }
13922
+ })
13923
+ );
13924
+ }
13925
+ await Promise.all(promises);
13726
13926
  if (!destStat) {
13727
13927
  await fs.chmod(dest, srcStat.mode);
13728
13928
  }
@@ -13759,9 +13959,9 @@ var require_copy = __commonJS({
13759
13959
  }
13760
13960
  });
13761
13961
 
13762
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy-sync.js
13962
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/copy-sync.js
13763
13963
  var require_copy_sync = __commonJS({
13764
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module2) {
13964
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module2) {
13765
13965
  "use strict";
13766
13966
  var fs = require_graceful_fs();
13767
13967
  var path = require("path");
@@ -13854,7 +14054,15 @@ var require_copy_sync = __commonJS({
13854
14054
  return setDestMode(dest, srcMode);
13855
14055
  }
13856
14056
  function copyDir(src, dest, opts) {
13857
- fs.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
14057
+ const dir = fs.opendirSync(src);
14058
+ try {
14059
+ let dirent;
14060
+ while ((dirent = dir.readSync()) !== null) {
14061
+ copyDirItem(dirent.name, src, dest, opts);
14062
+ }
14063
+ } finally {
14064
+ dir.closeSync();
14065
+ }
13858
14066
  }
13859
14067
  function copyDirItem(item, src, dest, opts) {
13860
14068
  const srcItem = path.join(src, item);
@@ -13900,9 +14108,9 @@ var require_copy_sync = __commonJS({
13900
14108
  }
13901
14109
  });
13902
14110
 
13903
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/index.js
14111
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/index.js
13904
14112
  var require_copy2 = __commonJS({
13905
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/index.js"(exports, module2) {
14113
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/index.js"(exports, module2) {
13906
14114
  "use strict";
13907
14115
  var u = require_universalify().fromPromise;
13908
14116
  module2.exports = {
@@ -13912,9 +14120,9 @@ var require_copy2 = __commonJS({
13912
14120
  }
13913
14121
  });
13914
14122
 
13915
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/remove/index.js
14123
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/remove/index.js
13916
14124
  var require_remove = __commonJS({
13917
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/remove/index.js"(exports, module2) {
14125
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/remove/index.js"(exports, module2) {
13918
14126
  "use strict";
13919
14127
  var fs = require_graceful_fs();
13920
14128
  var u = require_universalify().fromCallback;
@@ -13931,9 +14139,9 @@ var require_remove = __commonJS({
13931
14139
  }
13932
14140
  });
13933
14141
 
13934
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/empty/index.js
14142
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/empty/index.js
13935
14143
  var require_empty = __commonJS({
13936
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/empty/index.js"(exports, module2) {
14144
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/empty/index.js"(exports, module2) {
13937
14145
  "use strict";
13938
14146
  var u = require_universalify().fromPromise;
13939
14147
  var fs = require_fs5();
@@ -13970,9 +14178,9 @@ var require_empty = __commonJS({
13970
14178
  }
13971
14179
  });
13972
14180
 
13973
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/file.js
14181
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/file.js
13974
14182
  var require_file = __commonJS({
13975
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/file.js"(exports, module2) {
14183
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/file.js"(exports, module2) {
13976
14184
  "use strict";
13977
14185
  var u = require_universalify().fromPromise;
13978
14186
  var path = require("path");
@@ -14033,9 +14241,9 @@ var require_file = __commonJS({
14033
14241
  }
14034
14242
  });
14035
14243
 
14036
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/link.js
14244
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/link.js
14037
14245
  var require_link = __commonJS({
14038
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/link.js"(exports, module2) {
14246
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/link.js"(exports, module2) {
14039
14247
  "use strict";
14040
14248
  var u = require_universalify().fromPromise;
14041
14249
  var path = require("path");
@@ -14093,9 +14301,9 @@ var require_link = __commonJS({
14093
14301
  }
14094
14302
  });
14095
14303
 
14096
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-paths.js
14304
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink-paths.js
14097
14305
  var require_symlink_paths = __commonJS({
14098
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module2) {
14306
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module2) {
14099
14307
  "use strict";
14100
14308
  var path = require("path");
14101
14309
  var fs = require_fs5();
@@ -14168,9 +14376,9 @@ var require_symlink_paths = __commonJS({
14168
14376
  }
14169
14377
  });
14170
14378
 
14171
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-type.js
14379
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink-type.js
14172
14380
  var require_symlink_type = __commonJS({
14173
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module2) {
14381
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module2) {
14174
14382
  "use strict";
14175
14383
  var fs = require_fs5();
14176
14384
  var u = require_universalify().fromPromise;
@@ -14203,9 +14411,9 @@ var require_symlink_type = __commonJS({
14203
14411
  }
14204
14412
  });
14205
14413
 
14206
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink.js
14414
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink.js
14207
14415
  var require_symlink = __commonJS({
14208
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module2) {
14416
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module2) {
14209
14417
  "use strict";
14210
14418
  var u = require_universalify().fromPromise;
14211
14419
  var path = require("path");
@@ -14267,9 +14475,9 @@ var require_symlink = __commonJS({
14267
14475
  }
14268
14476
  });
14269
14477
 
14270
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/index.js
14478
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/index.js
14271
14479
  var require_ensure = __commonJS({
14272
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/index.js"(exports, module2) {
14480
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/index.js"(exports, module2) {
14273
14481
  "use strict";
14274
14482
  var { createFile, createFileSync } = require_file();
14275
14483
  var { createLink, createLinkSync } = require_link();
@@ -14384,9 +14592,9 @@ var require_jsonfile = __commonJS({
14384
14592
  }
14385
14593
  });
14386
14594
 
14387
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/json/jsonfile.js
14595
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/json/jsonfile.js
14388
14596
  var require_jsonfile2 = __commonJS({
14389
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/json/jsonfile.js"(exports, module2) {
14597
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/json/jsonfile.js"(exports, module2) {
14390
14598
  "use strict";
14391
14599
  var jsonFile = require_jsonfile();
14392
14600
  module2.exports = {
@@ -14399,9 +14607,9 @@ var require_jsonfile2 = __commonJS({
14399
14607
  }
14400
14608
  });
14401
14609
 
14402
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/output-file/index.js
14610
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/output-file/index.js
14403
14611
  var require_output_file = __commonJS({
14404
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/output-file/index.js"(exports, module2) {
14612
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/output-file/index.js"(exports, module2) {
14405
14613
  "use strict";
14406
14614
  var u = require_universalify().fromPromise;
14407
14615
  var fs = require_fs5();
@@ -14429,9 +14637,9 @@ var require_output_file = __commonJS({
14429
14637
  }
14430
14638
  });
14431
14639
 
14432
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json.js
14640
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/json/output-json.js
14433
14641
  var require_output_json = __commonJS({
14434
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json.js"(exports, module2) {
14642
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/json/output-json.js"(exports, module2) {
14435
14643
  "use strict";
14436
14644
  var { stringify: stringify3 } = require_utils6();
14437
14645
  var { outputFile: outputFile4 } = require_output_file();
@@ -14443,9 +14651,9 @@ var require_output_json = __commonJS({
14443
14651
  }
14444
14652
  });
14445
14653
 
14446
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json-sync.js
14654
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/json/output-json-sync.js
14447
14655
  var require_output_json_sync = __commonJS({
14448
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module2) {
14656
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module2) {
14449
14657
  "use strict";
14450
14658
  var { stringify: stringify3 } = require_utils6();
14451
14659
  var { outputFileSync } = require_output_file();
@@ -14457,9 +14665,9 @@ var require_output_json_sync = __commonJS({
14457
14665
  }
14458
14666
  });
14459
14667
 
14460
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/json/index.js
14668
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/json/index.js
14461
14669
  var require_json = __commonJS({
14462
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/json/index.js"(exports, module2) {
14670
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/json/index.js"(exports, module2) {
14463
14671
  "use strict";
14464
14672
  var u = require_universalify().fromPromise;
14465
14673
  var jsonFile = require_jsonfile2();
@@ -14475,9 +14683,9 @@ var require_json = __commonJS({
14475
14683
  }
14476
14684
  });
14477
14685
 
14478
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move.js
14686
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move.js
14479
14687
  var require_move = __commonJS({
14480
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move.js"(exports, module2) {
14688
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move.js"(exports, module2) {
14481
14689
  "use strict";
14482
14690
  var fs = require_fs5();
14483
14691
  var path = require("path");
@@ -14527,9 +14735,9 @@ var require_move = __commonJS({
14527
14735
  }
14528
14736
  });
14529
14737
 
14530
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move-sync.js
14738
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move-sync.js
14531
14739
  var require_move_sync = __commonJS({
14532
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move-sync.js"(exports, module2) {
14740
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move-sync.js"(exports, module2) {
14533
14741
  "use strict";
14534
14742
  var fs = require_graceful_fs();
14535
14743
  var path = require("path");
@@ -14584,9 +14792,9 @@ var require_move_sync = __commonJS({
14584
14792
  }
14585
14793
  });
14586
14794
 
14587
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/move/index.js
14795
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/move/index.js
14588
14796
  var require_move2 = __commonJS({
14589
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/move/index.js"(exports, module2) {
14797
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/move/index.js"(exports, module2) {
14590
14798
  "use strict";
14591
14799
  var u = require_universalify().fromPromise;
14592
14800
  module2.exports = {
@@ -14596,9 +14804,9 @@ var require_move2 = __commonJS({
14596
14804
  }
14597
14805
  });
14598
14806
 
14599
- // node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/index.js
14807
+ // node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/index.js
14600
14808
  var require_lib = __commonJS({
14601
- "node_modules/.aspect_rules_js/fs-extra@11.2.0/node_modules/fs-extra/lib/index.js"(exports, module2) {
14809
+ "node_modules/.aspect_rules_js/fs-extra@11.3.0/node_modules/fs-extra/lib/index.js"(exports, module2) {
14602
14810
  "use strict";
14603
14811
  module2.exports = {
14604
14812
  // Export promiseified graceful-fs:
@@ -18626,7 +18834,7 @@ var require_typescript = __commonJS({
18626
18834
  flatMap: () => flatMap,
18627
18835
  flatMapIterator: () => flatMapIterator,
18628
18836
  flatMapToMutable: () => flatMapToMutable,
18629
- flatten: () => flatten,
18837
+ flatten: () => flatten2,
18630
18838
  flattenCommaList: () => flattenCommaList,
18631
18839
  flattenDestructuringAssignment: () => flattenDestructuringAssignment,
18632
18840
  flattenDestructuringBinding: () => flattenDestructuringBinding,
@@ -20538,7 +20746,7 @@ var require_typescript = __commonJS({
20538
20746
  }
20539
20747
  return array;
20540
20748
  }
20541
- function flatten(array) {
20749
+ function flatten2(array) {
20542
20750
  const result = [];
20543
20751
  for (let i = 0; i < array.length; i++) {
20544
20752
  const v = array[i];
@@ -41079,7 +41287,7 @@ ${lanes.join("\n")}
41079
41287
  for (const basePath of patterns.basePaths) {
41080
41288
  visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth);
41081
41289
  }
41082
- return flatten(results);
41290
+ return flatten2(results);
41083
41291
  function visitDirectory(path2, absolutePath, depth2) {
41084
41292
  const canonicalPath = toCanonical(realpath(absolutePath));
41085
41293
  if (visited.has(canonicalPath))
@@ -41179,7 +41387,7 @@ ${lanes.join("\n")}
41179
41387
  ".d.mts"
41180
41388
  /* Dmts */
41181
41389
  ]];
41182
- var supportedTSExtensionsFlat = flatten(supportedTSExtensions);
41390
+ var supportedTSExtensionsFlat = flatten2(supportedTSExtensions);
41183
41391
  var supportedTSExtensionsWithJson = [...supportedTSExtensions, [
41184
41392
  ".json"
41185
41393
  /* Json */
@@ -41205,7 +41413,7 @@ ${lanes.join("\n")}
41205
41413
  ".cjs"
41206
41414
  /* Cjs */
41207
41415
  ]];
41208
- var supportedJSExtensionsFlat = flatten(supportedJSExtensions);
41416
+ var supportedJSExtensionsFlat = flatten2(supportedJSExtensions);
41209
41417
  var allSupportedExtensions = [[
41210
41418
  ".ts",
41211
41419
  ".tsx",
@@ -41256,7 +41464,7 @@ ${lanes.join("\n")}
41256
41464
  return needJsExtensions ? allSupportedExtensions : supportedTSExtensions;
41257
41465
  }
41258
41466
  const builtins = needJsExtensions ? allSupportedExtensions : supportedTSExtensions;
41259
- const flatBuiltins = flatten(builtins);
41467
+ const flatBuiltins = flatten2(builtins);
41260
41468
  const extensions = [
41261
41469
  ...builtins,
41262
41470
  ...mapDefined(extraFileExtensions, (x) => x.scriptKind === 7 || needJsExtensions && isJSLike(x.scriptKind) && !flatBuiltins.includes(x.extension) ? [x.extension] : void 0)
@@ -41363,7 +41571,7 @@ ${lanes.join("\n")}
41363
41571
  if (!fileName)
41364
41572
  return false;
41365
41573
  const supportedExtensions = getSupportedExtensions(compilerOptions, extraFileExtensions);
41366
- for (const extension of flatten(getSupportedExtensionsWithJsonIfResolveJsonModule(compilerOptions, supportedExtensions))) {
41574
+ for (const extension of flatten2(getSupportedExtensionsWithJsonIfResolveJsonModule(compilerOptions, supportedExtensions))) {
41367
41575
  if (fileExtensionIs(fileName, extension)) {
41368
41576
  return true;
41369
41577
  }
@@ -64537,7 +64745,7 @@ ${lanes.join("\n")}
64537
64745
  if (validatedIncludeSpecs && validatedIncludeSpecs.length > 0) {
64538
64746
  for (const file of host.readDirectory(
64539
64747
  basePath,
64540
- flatten(supportedExtensionsWithJsonIfResolveJsonModule),
64748
+ flatten2(supportedExtensionsWithJsonIfResolveJsonModule),
64541
64749
  validatedExcludeSpecs,
64542
64750
  validatedIncludeSpecs,
64543
64751
  /*depth*/
@@ -72037,7 +72245,7 @@ ${lanes.join("\n")}
72037
72245
  function tryGetAnyFileFromPath(host, path) {
72038
72246
  if (!host.fileExists)
72039
72247
  return;
72040
- const extensions = flatten(getSupportedExtensions({ allowJs: true }, [{ extension: "node", isMixedContent: false }, {
72248
+ const extensions = flatten2(getSupportedExtensions({ allowJs: true }, [{ extension: "node", isMixedContent: false }, {
72041
72249
  extension: "json",
72042
72250
  isMixedContent: false,
72043
72251
  scriptKind: 6
@@ -103992,7 +104200,7 @@ ${lanes.join("\n")}
103992
104200
  }
103993
104201
  i++;
103994
104202
  }
103995
- const diags = max > 1 ? allDiagnostics[minIndex] : flatten(allDiagnostics);
104203
+ const diags = max > 1 ? allDiagnostics[minIndex] : flatten2(allDiagnostics);
103996
104204
  Debug.assert(diags.length > 0, "No errors reported for 3 or fewer overload signatures");
103997
104205
  let chain = chainDiagnosticMessages(
103998
104206
  map(diags, createDiagnosticMessageChainFromDiagnostic),
@@ -133332,7 +133540,7 @@ ${lanes.join("\n")}
133332
133540
  return target && target >= 5 ? factory2.createObjectLiteralExpression(transformJsxAttributesToProps(attrs, children)) : transformJsxAttributesToExpression(attrs, children);
133333
133541
  }
133334
133542
  function transformJsxAttributesToProps(attrs, children) {
133335
- const props = flatten(spanMap(attrs, isJsxSpreadAttribute, (attrs2, isSpread) => flatten(map(attrs2, (attr) => isSpread ? transformJsxSpreadAttributeToProps(attr) : transformJsxAttributeToObjectLiteralElement(attr)))));
133543
+ const props = flatten2(spanMap(attrs, isJsxSpreadAttribute, (attrs2, isSpread) => flatten2(map(attrs2, (attr) => isSpread ? transformJsxSpreadAttributeToProps(attr) : transformJsxAttributeToObjectLiteralElement(attr)))));
133336
133544
  if (children) {
133337
133545
  props.push(children);
133338
133546
  }
@@ -137299,7 +137507,7 @@ ${lanes.join("\n")}
137299
137507
  }
137300
137508
  function transformAndSpreadElements(elements, isArgumentList, multiLine, hasTrailingComma) {
137301
137509
  const numElements = elements.length;
137302
- const segments = flatten(
137510
+ const segments = flatten2(
137303
137511
  // As we visit each element, we return one of two functions to use as the "key":
137304
137512
  // - `visitSpanOfSpreads` for one or more contiguous `...` spread expressions, i.e. `...a, ...b` in `[1, 2, ...a, ...b]`
137305
137513
  // - `visitSpanOfNonSpreads` for one or more contiguous non-spread elements, i.e. `1, 2`, in `[1, 2, ...a, ...b]`
@@ -145581,7 +145789,7 @@ ${lanes.join("\n")}
145581
145789
  return factory2.updateVariableStatement(input, modifiers, declList);
145582
145790
  }
145583
145791
  function recreateBindingPattern(d) {
145584
- return flatten(mapDefined(d.elements, (e) => recreateBindingElement(e)));
145792
+ return flatten2(mapDefined(d.elements, (e) => recreateBindingElement(e)));
145585
145793
  }
145586
145794
  function recreateBindingElement(e) {
145587
145795
  if (e.kind === 232) {
@@ -153485,10 +153693,10 @@ ${lanes.join("\n")}
153485
153693
  /*ignoreCase*/
153486
153694
  false
153487
153695
  )) {
153488
- const basename2 = getBaseFileName(a.fileName);
153489
- if (basename2 === "lib.d.ts" || basename2 === "lib.es6.d.ts")
153696
+ const basename3 = getBaseFileName(a.fileName);
153697
+ if (basename3 === "lib.d.ts" || basename3 === "lib.es6.d.ts")
153490
153698
  return 0;
153491
- const name = removeSuffix(removePrefix(basename2, "lib."), ".d.ts");
153699
+ const name = removeSuffix(removePrefix(basename3, "lib."), ".d.ts");
153492
153700
  const index = libs.indexOf(name);
153493
153701
  if (index !== -1)
153494
153702
  return index + 1;
@@ -154116,7 +154324,7 @@ ${lanes.join("\n")}
154116
154324
  }
154117
154325
  function getMergedBindAndCheckDiagnostics(sourceFile, includeBindAndCheckDiagnostics, partialCheck, ...allDiagnostics) {
154118
154326
  var _a2;
154119
- const flatDiagnostics = flatten(allDiagnostics);
154327
+ const flatDiagnostics = flatten2(allDiagnostics);
154120
154328
  if (!includeBindAndCheckDiagnostics || !((_a2 = sourceFile.commentDirectives) == null ? void 0 : _a2.length)) {
154121
154329
  return flatDiagnostics;
154122
154330
  }
@@ -154609,12 +154817,12 @@ ${lanes.join("\n")}
154609
154817
  function getSourceFileFromReferenceWorker(fileName, getSourceFile2, fail, reason) {
154610
154818
  if (hasExtension(fileName)) {
154611
154819
  const canonicalFileName = host.getCanonicalFileName(fileName);
154612
- if (!options.allowNonTsExtensions && !forEach(flatten(supportedExtensionsWithJsonIfResolveJsonModule), (extension) => fileExtensionIs(canonicalFileName, extension))) {
154820
+ if (!options.allowNonTsExtensions && !forEach(flatten2(supportedExtensionsWithJsonIfResolveJsonModule), (extension) => fileExtensionIs(canonicalFileName, extension))) {
154613
154821
  if (fail) {
154614
154822
  if (hasJSFileExtension(canonicalFileName)) {
154615
154823
  fail(Diagnostics.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option, fileName);
154616
154824
  } else {
154617
- fail(Diagnostics.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + flatten(supportedExtensions).join("', '") + "'");
154825
+ fail(Diagnostics.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + flatten2(supportedExtensions).join("', '") + "'");
154618
154826
  }
154619
154827
  }
154620
154828
  return void 0;
@@ -154643,7 +154851,7 @@ ${lanes.join("\n")}
154643
154851
  }
154644
154852
  const sourceFileWithAddedExtension = forEach(supportedExtensions[0], (extension) => getSourceFile2(fileName + extension));
154645
154853
  if (fail && !sourceFileWithAddedExtension)
154646
- fail(Diagnostics.Could_not_resolve_the_path_0_with_the_extensions_Colon_1, fileName, "'" + flatten(supportedExtensions).join("', '") + "'");
154854
+ fail(Diagnostics.Could_not_resolve_the_path_0_with_the_extensions_Colon_1, fileName, "'" + flatten2(supportedExtensions).join("', '") + "'");
154647
154855
  return sourceFileWithAddedExtension;
154648
154856
  }
154649
154857
  }
@@ -198255,7 +198463,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
198255
198463
  }
198256
198464
  function getExtensionOptions(compilerOptions, referenceKind, importingSourceFile, typeChecker, preferences, resolutionMode) {
198257
198465
  return {
198258
- extensionsToSearch: flatten(getSupportedExtensionsForModuleResolution(compilerOptions, typeChecker)),
198466
+ extensionsToSearch: flatten2(getSupportedExtensionsForModuleResolution(compilerOptions, typeChecker)),
198259
198467
  referenceKind,
198260
198468
  importingSourceFile,
198261
198469
  endingPreference: preferences == null ? void 0 : preferences.importModuleSpecifierEnding,
@@ -202946,7 +203154,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
202946
203154
  }
202947
203155
  }
202948
203156
  });
202949
- return flatten(intersperse(parts, [lineBreakPart()]));
203157
+ return flatten2(intersperse(parts, [lineBreakPart()]));
202950
203158
  }
202951
203159
  function isIdenticalListOfDisplayParts(parts1, parts2) {
202952
203160
  return arrayIsEqualTo(parts1, parts2, (p1, p2) => p1.kind === p2.kind && p1.text === p2.text);
@@ -203270,8 +203478,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
203270
203478
  return ts_textChanges_exports.ChangeTracker.with(
203271
203479
  { host, formatContext, preferences },
203272
203480
  (changeTracker) => {
203273
- const parsed = contents.map((c) => parse5(sourceFile, c));
203274
- const flattenedLocations = focusLocations && flatten(focusLocations);
203481
+ const parsed = contents.map((c) => parse6(sourceFile, c));
203482
+ const flattenedLocations = focusLocations && flatten2(focusLocations);
203275
203483
  for (const nodes of parsed) {
203276
203484
  placeNodeGroup(
203277
203485
  sourceFile,
@@ -203283,7 +203491,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
203283
203491
  }
203284
203492
  );
203285
203493
  }
203286
- function parse5(sourceFile, content) {
203494
+ function parse6(sourceFile, content) {
203287
203495
  const nodeKinds = [
203288
203496
  {
203289
203497
  parse: () => createSourceFile(
@@ -212315,7 +212523,7 @@ ${options.prefix}` : "\n" : options.prefix
212315
212523
  flatMap: () => flatMap,
212316
212524
  flatMapIterator: () => flatMapIterator,
212317
212525
  flatMapToMutable: () => flatMapToMutable,
212318
- flatten: () => flatten,
212526
+ flatten: () => flatten2,
212319
212527
  flattenCommaList: () => flattenCommaList,
212320
212528
  flattenDestructuringAssignment: () => flattenDestructuringAssignment,
212321
212529
  flattenDestructuringBinding: () => flattenDestructuringBinding,
@@ -216531,8 +216739,8 @@ ${options.prefix}` : "\n" : options.prefix
216531
216739
  }
216532
216740
  };
216533
216741
  for (const file of files) {
216534
- const basename2 = getBaseFileName(file);
216535
- if (basename2 === "package.json" || basename2 === "bower.json") {
216742
+ const basename3 = getBaseFileName(file);
216743
+ if (basename3 === "package.json" || basename3 === "bower.json") {
216536
216744
  createProjectWatcher(
216537
216745
  file,
216538
216746
  "FileWatcher"
@@ -220136,8 +220344,8 @@ All files are: ${JSON.stringify(names)}`,
220136
220344
  const fileOrDirectoryPath = removeIgnoredPath(this.toPath(fileOrDirectory));
220137
220345
  if (!fileOrDirectoryPath)
220138
220346
  return;
220139
- const basename2 = getBaseFileName(fileOrDirectoryPath);
220140
- if (((_a = result.affectedModuleSpecifierCacheProjects) == null ? void 0 : _a.size) && (basename2 === "package.json" || basename2 === "node_modules")) {
220347
+ const basename3 = getBaseFileName(fileOrDirectoryPath);
220348
+ if (((_a = result.affectedModuleSpecifierCacheProjects) == null ? void 0 : _a.size) && (basename3 === "package.json" || basename3 === "node_modules")) {
220141
220349
  result.affectedModuleSpecifierCacheProjects.forEach((project) => {
220142
220350
  var _a2;
220143
220351
  (_a2 = project.getModuleSpecifierCache()) == null ? void 0 : _a2.clear();
@@ -226811,7 +227019,7 @@ var require_interpolate_name = __commonJS({
226811
227019
  const content = options.content;
226812
227020
  const regExp = options.regExp;
226813
227021
  let ext = "bin";
226814
- let basename2 = "file";
227022
+ let basename3 = "file";
226815
227023
  let directory = "";
226816
227024
  let folder = "";
226817
227025
  let query = "";
@@ -226822,7 +227030,7 @@ var require_interpolate_name = __commonJS({
226822
227030
  ext = parsed.ext.slice(1);
226823
227031
  }
226824
227032
  if (parsed.dir) {
226825
- basename2 = parsed.name;
227033
+ basename3 = parsed.name;
226826
227034
  resourcePath = parsed.dir + path.sep;
226827
227035
  }
226828
227036
  if (typeof context !== "undefined") {
@@ -226848,7 +227056,7 @@ var require_interpolate_name = __commonJS({
226848
227056
  if (content) {
226849
227057
  url = url.replace(/\[(?:([^:\]]+):)?(?:hash|contenthash)(?::([a-z]+\d*[a-z]*))?(?::(\d+))?\]/gi, (_, hashType, digestType, maxLength) => getHashDigest(content, hashType, digestType, parseInt(maxLength, 10)));
226850
227058
  }
226851
- url = url.replace(/\[ext\]/gi, () => ext).replace(/\[name\]/gi, () => basename2).replace(/\[path\]/gi, () => directory).replace(/\[folder\]/gi, () => folder).replace(/\[query\]/gi, () => query);
227059
+ url = url.replace(/\[ext\]/gi, () => ext).replace(/\[name\]/gi, () => basename3).replace(/\[path\]/gi, () => directory).replace(/\[folder\]/gi, () => folder).replace(/\[query\]/gi, () => query);
226852
227060
  if (regExp && loaderContext.resourcePath) {
226853
227061
  const match = loaderContext.resourcePath.match(new RegExp(regExp));
226854
227062
  match && match.forEach((matched, i) => {
@@ -227284,67 +227492,6 @@ var require_ts_transformer = __commonJS({
227284
227492
  }
227285
227493
  });
227286
227494
 
227287
- // node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/manipulator.js
227288
- var require_manipulator = __commonJS({
227289
- "node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/manipulator.js"(exports) {
227290
- "use strict";
227291
- Object.defineProperty(exports, "__esModule", { value: true });
227292
- exports.hoistSelectors = hoistSelectors2;
227293
- var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
227294
- var types_1 = require_types();
227295
- function cloneDeep(obj) {
227296
- if (Array.isArray(obj)) {
227297
- return tslib_1.__spreadArray([], obj.map(cloneDeep), true);
227298
- }
227299
- if (obj !== null && typeof obj === "object") {
227300
- return Object.keys(obj).reduce(function(cloned, k) {
227301
- cloned[k] = cloneDeep(obj[k]);
227302
- return cloned;
227303
- }, {});
227304
- }
227305
- return obj;
227306
- }
227307
- function hoistPluralOrSelectElement(ast, el, positionToInject) {
227308
- var cloned = cloneDeep(el);
227309
- var options = cloned.options;
227310
- cloned.options = Object.keys(options).reduce(function(all, k) {
227311
- var newValue = hoistSelectors2(tslib_1.__spreadArray(tslib_1.__spreadArray(tslib_1.__spreadArray([], ast.slice(0, positionToInject), true), options[k].value, true), ast.slice(positionToInject + 1), true));
227312
- all[k] = {
227313
- value: newValue
227314
- };
227315
- return all;
227316
- }, {});
227317
- return cloned;
227318
- }
227319
- function isPluralOrSelectElement(el) {
227320
- return (0, types_1.isPluralElement)(el) || (0, types_1.isSelectElement)(el);
227321
- }
227322
- function findPluralOrSelectElement(ast) {
227323
- return !!ast.find(function(el) {
227324
- if (isPluralOrSelectElement(el)) {
227325
- return true;
227326
- }
227327
- if ((0, types_1.isTagElement)(el)) {
227328
- return findPluralOrSelectElement(el.children);
227329
- }
227330
- return false;
227331
- });
227332
- }
227333
- function hoistSelectors2(ast) {
227334
- for (var i = 0; i < ast.length; i++) {
227335
- var el = ast[i];
227336
- if (isPluralOrSelectElement(el)) {
227337
- return [hoistPluralOrSelectElement(ast, el, i)];
227338
- }
227339
- if ((0, types_1.isTagElement)(el) && findPluralOrSelectElement([el])) {
227340
- throw new Error("Cannot hoist plural/select within a tag element. Please put the tag element inside each plural/select option");
227341
- }
227342
- }
227343
- return ast;
227344
- }
227345
- }
227346
- });
227347
-
227348
227495
  // node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/printer.js
227349
227496
  var require_printer = __commonJS({
227350
227497
  "node_modules/.aspect_rules_js/@formatjs+icu-messageformat-parser@0.0.0/node_modules/@formatjs/icu-messageformat-parser/printer.js"(exports) {
@@ -227734,7 +227881,7 @@ async function processFile(source, fn, { idInterpolationPattern, ...opts }) {
227734
227881
  return { messages, meta };
227735
227882
  }
227736
227883
  async function extract(files, extractOpts) {
227737
- const { throws, readFromStdin, flatten, ...opts } = extractOpts;
227884
+ const { throws, readFromStdin, flatten: flatten2, ...opts } = extractOpts;
227738
227885
  let rawResults = [];
227739
227886
  try {
227740
227887
  if (readFromStdin) {
@@ -227799,7 +227946,7 @@ ${JSON.stringify(message, void 0, 2)}`
227799
227946
  const results = {};
227800
227947
  const messages = Array.from(extractedMessages.values());
227801
227948
  for (const { id, ...msg } of messages) {
227802
- if (flatten && msg.defaultMessage) {
227949
+ if (flatten2 && msg.defaultMessage) {
227803
227950
  msg.defaultMessage = (0, import_printer.printAST)((0, import_manipulator.hoistSelectors)((0, import_icu_messageformat_parser3.parse)(msg.defaultMessage)));
227804
227951
  }
227805
227952
  results[id] = msg;
@@ -227836,6 +227983,130 @@ var init_extract = __esm({
227836
227983
  }
227837
227984
  });
227838
227985
 
227986
+ // packages/cli-lib/src/verify/checkMissingKeys.ts
227987
+ function extractKeys(obj, parentKey = "") {
227988
+ if (!obj || typeof obj !== "object" || Array.isArray(obj)) {
227989
+ return [];
227990
+ }
227991
+ return Object.keys(obj).map((k) => [parentKey ? `${parentKey}.${k}` : k, ...extractKeys(obj[k], k)]).flat();
227992
+ }
227993
+ async function checkMissingKeys(translationFilesContents, sourceLocale) {
227994
+ debug("Checking translation files:");
227995
+ const enUSContent = translationFilesContents[sourceLocale];
227996
+ if (!enUSContent) {
227997
+ throw new Error(`Missing source ${sourceLocale}.json file`);
227998
+ }
227999
+ const enUSKeys = extractKeys(enUSContent);
228000
+ return Object.entries(translationFilesContents).filter(([locale]) => locale !== sourceLocale).reduce((result, [locale, content]) => {
228001
+ const localeKeys = new Set(extractKeys(content));
228002
+ const missingKeys = new Set(enUSKeys.filter((r) => !localeKeys.has(r)));
228003
+ if (!missingKeys.size) {
228004
+ return result;
228005
+ }
228006
+ writeStderr("---------------------------------\n");
228007
+ writeStderr(`Missing translation keys for locale ${locale}:
228008
+ `);
228009
+ missingKeys.forEach((r) => writeStderr(`${r}
228010
+ `));
228011
+ return false;
228012
+ }, true);
228013
+ }
228014
+ var init_checkMissingKeys = __esm({
228015
+ "packages/cli-lib/src/verify/checkMissingKeys.ts"() {
228016
+ init_console_utils();
228017
+ }
228018
+ });
228019
+
228020
+ // packages/cli-lib/src/verify/checkStructuralEquality.ts
228021
+ function flatten(obj, parentKey = "") {
228022
+ if (!obj || typeof obj !== "object" || Array.isArray(obj)) {
228023
+ return {};
228024
+ }
228025
+ return Object.keys(obj).reduce((all, k) => {
228026
+ const value = obj[k];
228027
+ const key = parentKey ? `${parentKey}.${k}` : k;
228028
+ if (typeof value === "object") {
228029
+ Object.assign(all, flatten(value, key));
228030
+ }
228031
+ all[key] = value;
228032
+ return all;
228033
+ }, {});
228034
+ }
228035
+ async function checkStructuralEquality(translationFilesContents, sourceLocale) {
228036
+ debug("Checking translation files:");
228037
+ const enUSContent = translationFilesContents[sourceLocale];
228038
+ if (!enUSContent) {
228039
+ throw new Error(`Missing source ${sourceLocale}.json file`);
228040
+ }
228041
+ const enUSMessages = Object.entries(flatten(enUSContent)).reduce((all, [key, value]) => {
228042
+ all[key] = (0, import_icu_messageformat_parser4.parse)(value);
228043
+ return all;
228044
+ }, {});
228045
+ return Object.entries(translationFilesContents).filter(([locale]) => locale !== sourceLocale).reduce((result, [locale, content]) => {
228046
+ const localeMessages = Object.entries(flatten(content)).reduce((all, [key, value]) => {
228047
+ all[key] = (0, import_icu_messageformat_parser4.parse)(value);
228048
+ return all;
228049
+ }, {});
228050
+ const problematicKeys = Object.keys(enUSMessages).filter((k) => {
228051
+ if (!localeMessages[k]) {
228052
+ return false;
228053
+ }
228054
+ const enUSMessage = enUSMessages[k];
228055
+ const localeMessage = localeMessages[k];
228056
+ return !(0, import_icu_messageformat_parser4.isStructurallySame)(enUSMessage, localeMessage);
228057
+ });
228058
+ if (!problematicKeys.length) {
228059
+ return result;
228060
+ }
228061
+ writeStderr("---------------------------------\n");
228062
+ writeStderr(
228063
+ `These translation keys for locale ${locale} are structurally different from ${sourceLocale}:
228064
+ `
228065
+ );
228066
+ problematicKeys.forEach((r) => writeStderr(`${r}
228067
+ `));
228068
+ return false;
228069
+ }, true);
228070
+ }
228071
+ var import_icu_messageformat_parser4;
228072
+ var init_checkStructuralEquality = __esm({
228073
+ "packages/cli-lib/src/verify/checkStructuralEquality.ts"() {
228074
+ import_icu_messageformat_parser4 = __toESM(require_icu_messageformat_parser());
228075
+ init_console_utils();
228076
+ }
228077
+ });
228078
+
228079
+ // packages/cli-lib/src/verify/index.ts
228080
+ async function verify(files, { sourceLocale, missingKeys, structuralEquality }) {
228081
+ debug("Checking translation files:");
228082
+ files.forEach((fn) => debug(fn));
228083
+ const translationFilesContents = (await Promise.all(
228084
+ files.map(async (fn) => [(0, import_path3.basename)(fn, ".json"), await (0, import_fs_extra4.readJSON)(fn)])
228085
+ )).reduce((all, [locale, content]) => {
228086
+ all[locale] = content;
228087
+ return all;
228088
+ }, {});
228089
+ debug("Verifying files:", files);
228090
+ let exitCode = 0;
228091
+ if (missingKeys && !await checkMissingKeys(translationFilesContents, sourceLocale)) {
228092
+ exitCode = 1;
228093
+ }
228094
+ if (structuralEquality && !await checkStructuralEquality(translationFilesContents, sourceLocale)) {
228095
+ exitCode = 1;
228096
+ }
228097
+ process.exit(exitCode);
228098
+ }
228099
+ var import_path3, import_fs_extra4;
228100
+ var init_verify = __esm({
228101
+ "packages/cli-lib/src/verify/index.ts"() {
228102
+ import_path3 = require("path");
228103
+ init_console_utils();
228104
+ init_checkMissingKeys();
228105
+ import_fs_extra4 = __toESM(require_lib());
228106
+ init_checkStructuralEquality();
228107
+ }
228108
+ });
228109
+
227839
228110
  // packages/cli-lib/src/cli.ts
227840
228111
  var cli_exports = {};
227841
228112
  __export(cli_exports, {
@@ -228010,6 +228281,31 @@ This is especially useful to convert from a TMS-specific format back to react-in
228010
228281
  debug("Files to compile:", files);
228011
228282
  await compileFolder(files, outFolder, opts);
228012
228283
  });
228284
+ program.command("verify [translation_files...]").description(
228285
+ `Run a series of checks on a list of translation files. <translation_files> can be a glob like "foo/**/en.json"`
228286
+ ).option(
228287
+ "--source-locale <sourceLocale>",
228288
+ `The source locale of the translation files.
228289
+ There must be a file named <sourceLocale>.json in the list of translation files.
228290
+ This is used as source to verify other translations against.`
228291
+ ).option(
228292
+ "--missing-keys",
228293
+ `Whether to check for missing keys in target locale compared to source locale.
228294
+ This basically guarantees that no messages are untranslated.`
228295
+ ).option(
228296
+ "--structural-equality",
228297
+ `Whether to check for structural equality of messages between source and target locale.
228298
+ This makes sure translations are formattable and are not missing any tokens.`
228299
+ ).action(async (filePatterns, opts) => {
228300
+ debug("File pattern:", filePatterns);
228301
+ debug("Options:", opts);
228302
+ const files = (0, import_fast_glob.sync)(filePatterns);
228303
+ if (!files.length) {
228304
+ throw new Error(`No input file found with pattern ${filePatterns}`);
228305
+ }
228306
+ debug("Files to verify:", files);
228307
+ await verify(files, opts);
228308
+ });
228013
228309
  if (argv.length < 3) {
228014
228310
  program.help();
228015
228311
  } else {
@@ -228026,6 +228322,7 @@ var init_cli = __esm({
228026
228322
  init_compile_folder();
228027
228323
  init_console_utils();
228028
228324
  init_extract();
228325
+ init_verify();
228029
228326
  KNOWN_COMMANDS = ["extract"];
228030
228327
  cli_default = main;
228031
228328
  }