@html-validate/eslint-config 5.5.15 → 5.5.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -93,6 +97,53 @@ var require_textwrap = __commonJS({
93
97
  "use strict";
94
98
  var wordsep_simple_re = /([\t\n\x0b\x0c\r ]+)/;
95
99
  var TextWrapper = class {
100
+ /*
101
+ * Object for wrapping/filling text. The public interface consists of
102
+ * the wrap() and fill() methods; the other methods are just there for
103
+ * subclasses to override in order to tweak the default behaviour.
104
+ * If you want to completely replace the main wrapping algorithm,
105
+ * you'll probably have to override _wrap_chunks().
106
+ *
107
+ * Several instance attributes control various aspects of wrapping:
108
+ * width (default: 70)
109
+ * the maximum width of wrapped lines (unless break_long_words
110
+ * is false)
111
+ * initial_indent (default: "")
112
+ * string that will be prepended to the first line of wrapped
113
+ * output. Counts towards the line's width.
114
+ * subsequent_indent (default: "")
115
+ * string that will be prepended to all lines save the first
116
+ * of wrapped output; also counts towards each line's width.
117
+ * expand_tabs (default: true)
118
+ * Expand tabs in input text to spaces before further processing.
119
+ * Each tab will become 0 .. 'tabsize' spaces, depending on its position
120
+ * in its line. If false, each tab is treated as a single character.
121
+ * tabsize (default: 8)
122
+ * Expand tabs in input text to 0 .. 'tabsize' spaces, unless
123
+ * 'expand_tabs' is false.
124
+ * replace_whitespace (default: true)
125
+ * Replace all whitespace characters in the input text by spaces
126
+ * after tab expansion. Note that if expand_tabs is false and
127
+ * replace_whitespace is true, every tab will be converted to a
128
+ * single space!
129
+ * fix_sentence_endings (default: false)
130
+ * Ensure that sentence-ending punctuation is always followed
131
+ * by two spaces. Off by default because the algorithm is
132
+ * (unavoidably) imperfect.
133
+ * break_long_words (default: true)
134
+ * Break words longer than 'width'. If false, those words will not
135
+ * be broken, and some lines might be longer than 'width'.
136
+ * break_on_hyphens (default: true)
137
+ * Allow breaking hyphenated words. If true, wrapping will occur
138
+ * preferably on whitespaces and right after hyphens part of
139
+ * compound words.
140
+ * drop_whitespace (default: true)
141
+ * Drop leading and trailing whitespace from lines.
142
+ * max_lines (default: None)
143
+ * Truncate wrapped lines.
144
+ * placeholder (default: ' [...]')
145
+ * Append to the last line of truncated text.
146
+ */
96
147
  constructor(options = {}) {
97
148
  let {
98
149
  width = 70,
@@ -121,6 +172,8 @@ var require_textwrap = __commonJS({
121
172
  this.max_lines = max_lines;
122
173
  this.placeholder = placeholder;
123
174
  }
175
+ // -- Private methods -----------------------------------------------
176
+ // (possibly useful for subclasses to override)
124
177
  _munge_whitespace(text) {
125
178
  if (this.expand_tabs) {
126
179
  text = text.replace(/\t/g, " ".repeat(this.tabsize));
@@ -231,6 +284,7 @@ var require_textwrap = __commonJS({
231
284
  text = this._munge_whitespace(text);
232
285
  return this._split(text);
233
286
  }
287
+ // -- Public interface ----------------------------------------------
234
288
  wrap(text) {
235
289
  let chunks = this._split_chunks(text);
236
290
  return this._wrap_chunks(chunks);
@@ -398,6 +452,7 @@ var require_argparse = __commonJS({
398
452
  }
399
453
  function _callable(cls) {
400
454
  let result = {
455
+ // object is needed for inferred class name
401
456
  [cls.name]: function(...args2) {
402
457
  let this_class = new.target === result || !new.target;
403
458
  return Reflect.construct(cls, args2, this_class ? cls : new.target);
@@ -607,6 +662,12 @@ var require_argparse = __commonJS({
607
662
  return items.slice(0);
608
663
  }
609
664
  var HelpFormatter = _camelcase_alias(_callable(class HelpFormatter {
665
+ /*
666
+ * Formatter for generating usage messages and argument help strings.
667
+ *
668
+ * Only the name of this class is considered a public API. All the methods
669
+ * provided by the class are considered an implementation detail.
670
+ */
610
671
  constructor() {
611
672
  let [
612
673
  prog,
@@ -638,6 +699,9 @@ var require_argparse = __commonJS({
638
699
  this._whitespace_matcher = /[ \t\n\r\f\v]+/g;
639
700
  this._long_break_matcher = /\n\n\n+/g;
640
701
  }
702
+ // ===============================
703
+ // Section and indentation methods
704
+ // ===============================
641
705
  _indent() {
642
706
  this._current_indent += this._indent_increment;
643
707
  this._level += 1;
@@ -650,6 +714,9 @@ var require_argparse = __commonJS({
650
714
  _add_item(func, args2) {
651
715
  this._current_section.items.push([func, args2]);
652
716
  }
717
+ // ========================
718
+ // Message building methods
719
+ // ========================
653
720
  start_section(heading) {
654
721
  this._indent();
655
722
  let section = this._Section(this, this._current_section, heading);
@@ -691,6 +758,9 @@ var require_argparse = __commonJS({
691
758
  this.add_argument(action);
692
759
  }
693
760
  }
761
+ // =======================
762
+ // Help-formatting methods
763
+ // =======================
694
764
  format_help() {
695
765
  let help = this._root_section.format_help();
696
766
  if (help) {
@@ -1072,16 +1142,34 @@ var require_argparse = __commonJS({
1072
1142
  }
1073
1143
  });
1074
1144
  var RawDescriptionHelpFormatter = _camelcase_alias(_callable(class RawDescriptionHelpFormatter extends HelpFormatter {
1145
+ /*
1146
+ * Help message formatter which retains any formatting in descriptions.
1147
+ *
1148
+ * Only the name of this class is considered a public API. All the methods
1149
+ * provided by the class are considered an implementation detail.
1150
+ */
1075
1151
  _fill_text(text, width, indent) {
1076
1152
  return splitlines(text, true).map((line) => indent + line).join("");
1077
1153
  }
1078
1154
  }));
1079
1155
  var RawTextHelpFormatter = _camelcase_alias(_callable(class RawTextHelpFormatter extends RawDescriptionHelpFormatter {
1156
+ /*
1157
+ * Help message formatter which retains formatting of all help text.
1158
+ *
1159
+ * Only the name of this class is considered a public API. All the methods
1160
+ * provided by the class are considered an implementation detail.
1161
+ */
1080
1162
  _split_lines(text) {
1081
1163
  return splitlines(text);
1082
1164
  }
1083
1165
  }));
1084
1166
  var ArgumentDefaultsHelpFormatter = _camelcase_alias(_callable(class ArgumentDefaultsHelpFormatter extends HelpFormatter {
1167
+ /*
1168
+ * Help message formatter which adds default values to argument help.
1169
+ *
1170
+ * Only the name of this class is considered a public API. All the methods
1171
+ * provided by the class are considered an implementation detail.
1172
+ */
1085
1173
  _get_help_string(action) {
1086
1174
  let help = action.help;
1087
1175
  if (!action.help.includes("%(default)") && !action.help.includes("%(defaultValue)")) {
@@ -1096,6 +1184,13 @@ var require_argparse = __commonJS({
1096
1184
  }
1097
1185
  }));
1098
1186
  var MetavarTypeHelpFormatter = _camelcase_alias(_callable(class MetavarTypeHelpFormatter extends HelpFormatter {
1187
+ /*
1188
+ * Help message formatter which uses the argument 'type' as the default
1189
+ * metavar value (instead of the argument 'dest')
1190
+ *
1191
+ * Only the name of this class is considered a public API. All the methods
1192
+ * provided by the class are considered an implementation detail.
1193
+ */
1099
1194
  _get_default_metavar_for_optional(action) {
1100
1195
  return typeof action.type === "function" ? action.type.name : action.type;
1101
1196
  }
@@ -1117,6 +1212,12 @@ var require_argparse = __commonJS({
1117
1212
  }
1118
1213
  }
1119
1214
  var ArgumentError = _callable(class ArgumentError extends Error {
1215
+ /*
1216
+ * An error from creating or using an argument (optional or positional).
1217
+ *
1218
+ * The string value of this exception is the message, augmented with
1219
+ * information about the argument that caused it.
1220
+ */
1120
1221
  constructor(argument, message) {
1121
1222
  super();
1122
1223
  this.name = "ArgumentError";
@@ -1138,12 +1239,65 @@ var require_argparse = __commonJS({
1138
1239
  }
1139
1240
  });
1140
1241
  var ArgumentTypeError = _callable(class ArgumentTypeError extends Error {
1242
+ /*
1243
+ * An error from trying to convert a command line string to a type.
1244
+ */
1141
1245
  constructor(message) {
1142
1246
  super(message);
1143
1247
  this.name = "ArgumentTypeError";
1144
1248
  }
1145
1249
  });
1146
1250
  var Action = _camelcase_alias(_callable(class Action extends _AttributeHolder(Function) {
1251
+ /*
1252
+ * Information about how to convert command line strings to Python objects.
1253
+ *
1254
+ * Action objects are used by an ArgumentParser to represent the information
1255
+ * needed to parse a single argument from one or more strings from the
1256
+ * command line. The keyword arguments to the Action constructor are also
1257
+ * all attributes of Action instances.
1258
+ *
1259
+ * Keyword Arguments:
1260
+ *
1261
+ * - option_strings -- A list of command-line option strings which
1262
+ * should be associated with this action.
1263
+ *
1264
+ * - dest -- The name of the attribute to hold the created object(s)
1265
+ *
1266
+ * - nargs -- The number of command-line arguments that should be
1267
+ * consumed. By default, one argument will be consumed and a single
1268
+ * value will be produced. Other values include:
1269
+ * - N (an integer) consumes N arguments (and produces a list)
1270
+ * - '?' consumes zero or one arguments
1271
+ * - '*' consumes zero or more arguments (and produces a list)
1272
+ * - '+' consumes one or more arguments (and produces a list)
1273
+ * Note that the difference between the default and nargs=1 is that
1274
+ * with the default, a single value will be produced, while with
1275
+ * nargs=1, a list containing a single value will be produced.
1276
+ *
1277
+ * - const -- The value to be produced if the option is specified and the
1278
+ * option uses an action that takes no values.
1279
+ *
1280
+ * - default -- The value to be produced if the option is not specified.
1281
+ *
1282
+ * - type -- A callable that accepts a single string argument, and
1283
+ * returns the converted value. The standard Python types str, int,
1284
+ * float, and complex are useful examples of such callables. If None,
1285
+ * str is used.
1286
+ *
1287
+ * - choices -- A container of values that should be allowed. If not None,
1288
+ * after a command-line argument has been converted to the appropriate
1289
+ * type, an exception will be raised if it is not a member of this
1290
+ * collection.
1291
+ *
1292
+ * - required -- True if the action must always be specified at the
1293
+ * command line. This is only meaningful for optional command-line
1294
+ * arguments.
1295
+ *
1296
+ * - help -- The help string describing the argument.
1297
+ *
1298
+ * - metavar -- The name to be used for the option's argument with the
1299
+ * help string. If None, the 'dest' value will be used as the name.
1300
+ */
1147
1301
  constructor() {
1148
1302
  let [
1149
1303
  option_strings,
@@ -1311,6 +1465,7 @@ var require_argparse = __commonJS({
1311
1465
  default_value,
1312
1466
  required,
1313
1467
  help
1468
+ //, metavar
1314
1469
  ] = _parse_opts(arguments, {
1315
1470
  option_strings: no_default,
1316
1471
  dest: no_default,
@@ -1673,6 +1828,22 @@ var require_argparse = __commonJS({
1673
1828
  }
1674
1829
  });
1675
1830
  var FileType = _callable(class FileType extends Function {
1831
+ /*
1832
+ * Factory for creating file object types
1833
+ *
1834
+ * Instances of FileType are typically passed as type= arguments to the
1835
+ * ArgumentParser add_argument() method.
1836
+ *
1837
+ * Keyword Arguments:
1838
+ * - mode -- A string indicating how the file is to be opened. Accepts the
1839
+ * same values as the builtin open() function.
1840
+ * - bufsize -- The file's desired buffer size. Accepts the same values as
1841
+ * the builtin open() function.
1842
+ * - encoding -- The file's encoding. Accepts the same values as the
1843
+ * builtin open() function.
1844
+ * - errors -- A string indicating how encoding and decoding errors are to
1845
+ * be handled. Accepts the same value as the builtin open() function.
1846
+ */
1676
1847
  constructor() {
1677
1848
  let [
1678
1849
  flags,
@@ -1688,11 +1859,17 @@ var require_argparse = __commonJS({
1688
1859
  flags: "r",
1689
1860
  encoding: void 0,
1690
1861
  mode: void 0,
1862
+ // 0o666
1691
1863
  autoClose: void 0,
1864
+ // true
1692
1865
  emitClose: void 0,
1866
+ // false
1693
1867
  start: void 0,
1868
+ // 0
1694
1869
  end: void 0,
1870
+ // Infinity
1695
1871
  highWaterMark: void 0,
1872
+ // 64 * 1024
1696
1873
  fs: void 0
1697
1874
  });
1698
1875
  super("return arguments.callee.call.apply(arguments.callee, arguments)");
@@ -1766,6 +1943,12 @@ var require_argparse = __commonJS({
1766
1943
  }
1767
1944
  });
1768
1945
  var Namespace = _callable(class Namespace extends _AttributeHolder() {
1946
+ /*
1947
+ * Simple object for storing attributes.
1948
+ *
1949
+ * Implements equality by attribute names and values, and provides a simple
1950
+ * string representation.
1951
+ */
1769
1952
  constructor(options = {}) {
1770
1953
  super();
1771
1954
  Object.assign(this, options);
@@ -1818,6 +2001,9 @@ var require_argparse = __commonJS({
1818
2001
  this._negative_number_matcher = /^-\d+$|^-\d*\.\d+$/;
1819
2002
  this._has_negative_number_optionals = [];
1820
2003
  }
2004
+ // ====================
2005
+ // Registration methods
2006
+ // ====================
1821
2007
  register(registry_name, value, object) {
1822
2008
  let registry = setdefault(this._registries, registry_name, {});
1823
2009
  registry[value] = object;
@@ -1825,6 +2011,9 @@ var require_argparse = __commonJS({
1825
2011
  _registry_get(registry_name, value, default_value = void 0) {
1826
2012
  return getattr(this._registries[registry_name], value, default_value);
1827
2013
  }
2014
+ // ==================================
2015
+ // Namespace default accessor methods
2016
+ // ==================================
1828
2017
  set_defaults(kwargs) {
1829
2018
  Object.assign(this._defaults, kwargs);
1830
2019
  for (let action of this._actions) {
@@ -1841,6 +2030,9 @@ var require_argparse = __commonJS({
1841
2030
  }
1842
2031
  return this._defaults[dest];
1843
2032
  }
2033
+ // =======================
2034
+ // Adding argument actions
2035
+ // =======================
1844
2036
  add_argument() {
1845
2037
  let [
1846
2038
  args2,
@@ -2055,7 +2247,10 @@ var require_argparse = __commonJS({
2055
2247
  }
2056
2248
  _handle_conflict_error(action, conflicting_actions) {
2057
2249
  let message = conflicting_actions.length === 1 ? "conflicting option string: %s" : "conflicting option strings: %s";
2058
- let conflict_string = conflicting_actions.map(([option_string]) => option_string).join(", ");
2250
+ let conflict_string = conflicting_actions.map(([
2251
+ option_string
2252
+ /*, action*/
2253
+ ]) => option_string).join(", ");
2059
2254
  throw new ArgumentError(action, sub(message, conflict_string));
2060
2255
  }
2061
2256
  _handle_conflict_resolve(action, conflicting_actions) {
@@ -2132,6 +2327,26 @@ var require_argparse = __commonJS({
2132
2327
  }
2133
2328
  });
2134
2329
  var ArgumentParser2 = _camelcase_alias(_callable(class ArgumentParser extends _AttributeHolder(_ActionsContainer) {
2330
+ /*
2331
+ * Object for parsing command line strings into Python objects.
2332
+ *
2333
+ * Keyword Arguments:
2334
+ * - prog -- The name of the program (default: sys.argv[0])
2335
+ * - usage -- A usage message (default: auto-generated from arguments)
2336
+ * - description -- A description of what the program does
2337
+ * - epilog -- Text following the argument descriptions
2338
+ * - parents -- Parsers whose arguments should be copied into this one
2339
+ * - formatter_class -- HelpFormatter class for printing help messages
2340
+ * - prefix_chars -- Characters that prefix optional arguments
2341
+ * - fromfile_prefix_chars -- Characters that prefix files containing
2342
+ * additional arguments
2343
+ * - argument_default -- The default value for all arguments
2344
+ * - conflict_handler -- String indicating how to handle conflicts
2345
+ * - add_help -- Add a -h/-help option
2346
+ * - allow_abbrev -- Allow long options to be abbreviated unambiguously
2347
+ * - exit_on_error -- Determines whether or not ArgumentParser exits with
2348
+ * error info when an error occurs
2349
+ */
2135
2350
  constructor() {
2136
2351
  let [
2137
2352
  prog,
@@ -2148,7 +2363,9 @@ var require_argparse = __commonJS({
2148
2363
  allow_abbrev,
2149
2364
  exit_on_error,
2150
2365
  debug,
2366
+ // LEGACY (v1 compatibility), debug mode
2151
2367
  version
2368
+ // LEGACY (v1 compatibility), version
2152
2369
  ] = _parse_opts(arguments, {
2153
2370
  prog: void 0,
2154
2371
  usage: void 0,
@@ -2164,7 +2381,9 @@ var require_argparse = __commonJS({
2164
2381
  allow_abbrev: true,
2165
2382
  exit_on_error: true,
2166
2383
  debug: void 0,
2384
+ // LEGACY (v1 compatibility), debug mode
2167
2385
  version: void 0
2386
+ // LEGACY (v1 compatibility), version
2168
2387
  });
2169
2388
  if (debug !== void 0) {
2170
2389
  deprecate(
@@ -2254,6 +2473,9 @@ var require_argparse = __commonJS({
2254
2473
  Object.assign(this._defaults, parent._defaults);
2255
2474
  }
2256
2475
  }
2476
+ // =======================
2477
+ // Pretty __repr__ methods
2478
+ // =======================
2257
2479
  _get_kwargs() {
2258
2480
  let names = [
2259
2481
  "prog",
@@ -2265,6 +2487,9 @@ var require_argparse = __commonJS({
2265
2487
  ];
2266
2488
  return names.map((name) => [name, getattr(this, name)]);
2267
2489
  }
2490
+ // ==================================
2491
+ // Optional/Positional adding methods
2492
+ // ==================================
2268
2493
  add_subparsers() {
2269
2494
  let [
2270
2495
  kwargs
@@ -2310,6 +2535,9 @@ var require_argparse = __commonJS({
2310
2535
  _get_positional_actions() {
2311
2536
  return this._actions.filter((action) => !action.option_strings.length);
2312
2537
  }
2538
+ // =====================================
2539
+ // Command line argument parsing methods
2540
+ // =====================================
2313
2541
  parse_args(args2 = void 0, namespace = void 0) {
2314
2542
  let argv;
2315
2543
  [args2, argv] = this.parse_known_args(args2, namespace);
@@ -2624,7 +2852,11 @@ var require_argparse = __commonJS({
2624
2852
  }
2625
2853
  let option_tuples = this._get_option_tuples(arg_string);
2626
2854
  if (option_tuples.length > 1) {
2627
- let options = option_tuples.map(([, option_string]) => option_string).join(", ");
2855
+ let options = option_tuples.map(([
2856
+ ,
2857
+ option_string
2858
+ /*, explicit_arg*/
2859
+ ]) => option_string).join(", ");
2628
2860
  let args2 = { option: arg_string, matches: options };
2629
2861
  let msg = "ambiguous option: %(option)s could match %(matches)s";
2630
2862
  this.error(sub(msg, args2));
@@ -2709,6 +2941,9 @@ var require_argparse = __commonJS({
2709
2941
  }
2710
2942
  return nargs_pattern;
2711
2943
  }
2944
+ // ========================
2945
+ // Alt command line argument parsing, allowing free intermix
2946
+ // ========================
2712
2947
  parse_intermixed_args(args2 = void 0, namespace = void 0) {
2713
2948
  let argv;
2714
2949
  [args2, argv] = this.parse_known_intermixed_args(args2, namespace);
@@ -2790,6 +3025,9 @@ var require_argparse = __commonJS({
2790
3025
  }
2791
3026
  return [namespace, extras];
2792
3027
  }
3028
+ // ========================
3029
+ // Value conversion methods
3030
+ // ========================
2793
3031
  _get_values(action, arg_strings) {
2794
3032
  if (![PARSER, REMAINDER].includes(action.nargs)) {
2795
3033
  try {
@@ -2876,6 +3114,9 @@ var require_argparse = __commonJS({
2876
3114
  throw new ArgumentError(action, sub(msg, args2));
2877
3115
  }
2878
3116
  }
3117
+ // =======================
3118
+ // Help-formatting methods
3119
+ // =======================
2879
3120
  format_usage() {
2880
3121
  let formatter = this._get_formatter();
2881
3122
  formatter.add_usage(
@@ -2905,6 +3146,9 @@ var require_argparse = __commonJS({
2905
3146
  _get_formatter() {
2906
3147
  return new this.formatter_class({ prog: this.prog });
2907
3148
  }
3149
+ // =====================
3150
+ // Help-printing methods
3151
+ // =====================
2908
3152
  print_usage(file = void 0) {
2909
3153
  if (file === void 0)
2910
3154
  file = process.stdout;
@@ -2922,6 +3166,9 @@ var require_argparse = __commonJS({
2922
3166
  file.write(message);
2923
3167
  }
2924
3168
  }
3169
+ // ===============
3170
+ // Exiting methods
3171
+ // ===============
2925
3172
  exit(status = 0, message = void 0) {
2926
3173
  if (message) {
2927
3174
  this._print_message(message, process.stderr);
@@ -2986,12 +3233,18 @@ var require_argparse = __commonJS({
2986
3233
  var require_yocto_queue = __commonJS({
2987
3234
  "../../node_modules/yocto-queue/index.js"(exports, module2) {
2988
3235
  var Node = class {
3236
+ /// value;
3237
+ /// next;
2989
3238
  constructor(value) {
2990
3239
  this.value = value;
2991
3240
  this.next = void 0;
2992
3241
  }
2993
3242
  };
2994
3243
  var Queue = class {
3244
+ // TODO: Use private class fields when targeting Node.js 12.
3245
+ // #_head;
3246
+ // #_tail;
3247
+ // #_size;
2995
3248
  constructor() {
2996
3249
  this.clear();
2997
3250
  }
@@ -7693,61 +7946,112 @@ var require_constants = __commonJS({
7693
7946
  module2.exports = {
7694
7947
  MAX_LENGTH: 1024 * 64,
7695
7948
  POSIX_REGEX_SOURCE,
7949
+ // regular expressions
7696
7950
  REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
7697
7951
  REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
7698
7952
  REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
7699
7953
  REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
7700
7954
  REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
7701
7955
  REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
7956
+ // Replace globs with equivalent patterns to reduce parsing time.
7702
7957
  REPLACEMENTS: {
7703
7958
  "***": "*",
7704
7959
  "**/**": "**",
7705
7960
  "**/**/**": "**"
7706
7961
  },
7962
+ // Digits
7707
7963
  CHAR_0: 48,
7964
+ /* 0 */
7708
7965
  CHAR_9: 57,
7966
+ /* 9 */
7967
+ // Alphabet chars.
7709
7968
  CHAR_UPPERCASE_A: 65,
7969
+ /* A */
7710
7970
  CHAR_LOWERCASE_A: 97,
7971
+ /* a */
7711
7972
  CHAR_UPPERCASE_Z: 90,
7973
+ /* Z */
7712
7974
  CHAR_LOWERCASE_Z: 122,
7975
+ /* z */
7713
7976
  CHAR_LEFT_PARENTHESES: 40,
7977
+ /* ( */
7714
7978
  CHAR_RIGHT_PARENTHESES: 41,
7979
+ /* ) */
7715
7980
  CHAR_ASTERISK: 42,
7981
+ /* * */
7982
+ // Non-alphabetic chars.
7716
7983
  CHAR_AMPERSAND: 38,
7984
+ /* & */
7717
7985
  CHAR_AT: 64,
7986
+ /* @ */
7718
7987
  CHAR_BACKWARD_SLASH: 92,
7988
+ /* \ */
7719
7989
  CHAR_CARRIAGE_RETURN: 13,
7990
+ /* \r */
7720
7991
  CHAR_CIRCUMFLEX_ACCENT: 94,
7992
+ /* ^ */
7721
7993
  CHAR_COLON: 58,
7994
+ /* : */
7722
7995
  CHAR_COMMA: 44,
7996
+ /* , */
7723
7997
  CHAR_DOT: 46,
7998
+ /* . */
7724
7999
  CHAR_DOUBLE_QUOTE: 34,
8000
+ /* " */
7725
8001
  CHAR_EQUAL: 61,
8002
+ /* = */
7726
8003
  CHAR_EXCLAMATION_MARK: 33,
8004
+ /* ! */
7727
8005
  CHAR_FORM_FEED: 12,
8006
+ /* \f */
7728
8007
  CHAR_FORWARD_SLASH: 47,
8008
+ /* / */
7729
8009
  CHAR_GRAVE_ACCENT: 96,
8010
+ /* ` */
7730
8011
  CHAR_HASH: 35,
8012
+ /* # */
7731
8013
  CHAR_HYPHEN_MINUS: 45,
8014
+ /* - */
7732
8015
  CHAR_LEFT_ANGLE_BRACKET: 60,
8016
+ /* < */
7733
8017
  CHAR_LEFT_CURLY_BRACE: 123,
8018
+ /* { */
7734
8019
  CHAR_LEFT_SQUARE_BRACKET: 91,
8020
+ /* [ */
7735
8021
  CHAR_LINE_FEED: 10,
8022
+ /* \n */
7736
8023
  CHAR_NO_BREAK_SPACE: 160,
8024
+ /* \u00A0 */
7737
8025
  CHAR_PERCENT: 37,
8026
+ /* % */
7738
8027
  CHAR_PLUS: 43,
8028
+ /* + */
7739
8029
  CHAR_QUESTION_MARK: 63,
8030
+ /* ? */
7740
8031
  CHAR_RIGHT_ANGLE_BRACKET: 62,
8032
+ /* > */
7741
8033
  CHAR_RIGHT_CURLY_BRACE: 125,
8034
+ /* } */
7742
8035
  CHAR_RIGHT_SQUARE_BRACKET: 93,
8036
+ /* ] */
7743
8037
  CHAR_SEMICOLON: 59,
8038
+ /* ; */
7744
8039
  CHAR_SINGLE_QUOTE: 39,
8040
+ /* ' */
7745
8041
  CHAR_SPACE: 32,
8042
+ /* */
7746
8043
  CHAR_TAB: 9,
8044
+ /* \t */
7747
8045
  CHAR_UNDERSCORE: 95,
8046
+ /* _ */
7748
8047
  CHAR_VERTICAL_LINE: 124,
8048
+ /* | */
7749
8049
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
8050
+ /* \uFEFF */
7750
8051
  SEP: path3.sep,
8052
+ /**
8053
+ * Create EXTGLOB_CHARS
8054
+ */
7751
8055
  extglobChars(chars) {
7752
8056
  return {
7753
8057
  "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` },
@@ -7757,6 +8061,9 @@ var require_constants = __commonJS({
7757
8061
  "@": { type: "at", open: "(?:", close: ")" }
7758
8062
  };
7759
8063
  },
8064
+ /**
8065
+ * Create GLOB_CHARS
8066
+ */
7760
8067
  globChars(win32) {
7761
8068
  return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
7762
8069
  }
@@ -7834,20 +8141,35 @@ var require_scan = __commonJS({
7834
8141
  var utils = require_utils();
7835
8142
  var {
7836
8143
  CHAR_ASTERISK,
8144
+ /* * */
7837
8145
  CHAR_AT,
8146
+ /* @ */
7838
8147
  CHAR_BACKWARD_SLASH,
8148
+ /* \ */
7839
8149
  CHAR_COMMA,
8150
+ /* , */
7840
8151
  CHAR_DOT,
8152
+ /* . */
7841
8153
  CHAR_EXCLAMATION_MARK,
8154
+ /* ! */
7842
8155
  CHAR_FORWARD_SLASH,
8156
+ /* / */
7843
8157
  CHAR_LEFT_CURLY_BRACE,
8158
+ /* { */
7844
8159
  CHAR_LEFT_PARENTHESES,
8160
+ /* ( */
7845
8161
  CHAR_LEFT_SQUARE_BRACKET,
8162
+ /* [ */
7846
8163
  CHAR_PLUS,
8164
+ /* + */
7847
8165
  CHAR_QUESTION_MARK,
8166
+ /* ? */
7848
8167
  CHAR_RIGHT_CURLY_BRACE,
8168
+ /* } */
7849
8169
  CHAR_RIGHT_PARENTHESES,
8170
+ /* ) */
7850
8171
  CHAR_RIGHT_SQUARE_BRACKET
8172
+ /* ] */
7851
8173
  } = require_constants();
7852
8174
  var isPathSeparator = (code) => {
7853
8175
  return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
@@ -9135,8 +9457,10 @@ var require_readdirp = __commonJS({
9135
9457
  static get defaultOptions() {
9136
9458
  return {
9137
9459
  root: ".",
9460
+ /* eslint-disable no-unused-vars */
9138
9461
  fileFilter: (path3) => true,
9139
9462
  directoryFilter: (path3) => true,
9463
+ /* eslint-enable no-unused-vars */
9140
9464
  type: FILE_TYPE,
9141
9465
  lstat: false,
9142
9466
  depth: 2147483648,
@@ -10290,50 +10614,97 @@ var require_constants2 = __commonJS({
10290
10614
  "use strict";
10291
10615
  module2.exports = {
10292
10616
  MAX_LENGTH: 1024 * 64,
10617
+ // Digits
10293
10618
  CHAR_0: "0",
10619
+ /* 0 */
10294
10620
  CHAR_9: "9",
10621
+ /* 9 */
10622
+ // Alphabet chars.
10295
10623
  CHAR_UPPERCASE_A: "A",
10624
+ /* A */
10296
10625
  CHAR_LOWERCASE_A: "a",
10626
+ /* a */
10297
10627
  CHAR_UPPERCASE_Z: "Z",
10628
+ /* Z */
10298
10629
  CHAR_LOWERCASE_Z: "z",
10630
+ /* z */
10299
10631
  CHAR_LEFT_PARENTHESES: "(",
10632
+ /* ( */
10300
10633
  CHAR_RIGHT_PARENTHESES: ")",
10634
+ /* ) */
10301
10635
  CHAR_ASTERISK: "*",
10636
+ /* * */
10637
+ // Non-alphabetic chars.
10302
10638
  CHAR_AMPERSAND: "&",
10639
+ /* & */
10303
10640
  CHAR_AT: "@",
10641
+ /* @ */
10304
10642
  CHAR_BACKSLASH: "\\",
10643
+ /* \ */
10305
10644
  CHAR_BACKTICK: "`",
10645
+ /* ` */
10306
10646
  CHAR_CARRIAGE_RETURN: "\r",
10647
+ /* \r */
10307
10648
  CHAR_CIRCUMFLEX_ACCENT: "^",
10649
+ /* ^ */
10308
10650
  CHAR_COLON: ":",
10651
+ /* : */
10309
10652
  CHAR_COMMA: ",",
10653
+ /* , */
10310
10654
  CHAR_DOLLAR: "$",
10655
+ /* . */
10311
10656
  CHAR_DOT: ".",
10657
+ /* . */
10312
10658
  CHAR_DOUBLE_QUOTE: '"',
10659
+ /* " */
10313
10660
  CHAR_EQUAL: "=",
10661
+ /* = */
10314
10662
  CHAR_EXCLAMATION_MARK: "!",
10663
+ /* ! */
10315
10664
  CHAR_FORM_FEED: "\f",
10665
+ /* \f */
10316
10666
  CHAR_FORWARD_SLASH: "/",
10667
+ /* / */
10317
10668
  CHAR_HASH: "#",
10669
+ /* # */
10318
10670
  CHAR_HYPHEN_MINUS: "-",
10671
+ /* - */
10319
10672
  CHAR_LEFT_ANGLE_BRACKET: "<",
10673
+ /* < */
10320
10674
  CHAR_LEFT_CURLY_BRACE: "{",
10675
+ /* { */
10321
10676
  CHAR_LEFT_SQUARE_BRACKET: "[",
10677
+ /* [ */
10322
10678
  CHAR_LINE_FEED: "\n",
10679
+ /* \n */
10323
10680
  CHAR_NO_BREAK_SPACE: "\xA0",
10681
+ /* \u00A0 */
10324
10682
  CHAR_PERCENT: "%",
10683
+ /* % */
10325
10684
  CHAR_PLUS: "+",
10685
+ /* + */
10326
10686
  CHAR_QUESTION_MARK: "?",
10687
+ /* ? */
10327
10688
  CHAR_RIGHT_ANGLE_BRACKET: ">",
10689
+ /* > */
10328
10690
  CHAR_RIGHT_CURLY_BRACE: "}",
10691
+ /* } */
10329
10692
  CHAR_RIGHT_SQUARE_BRACKET: "]",
10693
+ /* ] */
10330
10694
  CHAR_SEMICOLON: ";",
10695
+ /* ; */
10331
10696
  CHAR_SINGLE_QUOTE: "'",
10697
+ /* ' */
10332
10698
  CHAR_SPACE: " ",
10699
+ /* */
10333
10700
  CHAR_TAB: " ",
10701
+ /* \t */
10334
10702
  CHAR_UNDERSCORE: "_",
10703
+ /* _ */
10335
10704
  CHAR_VERTICAL_LINE: "|",
10705
+ /* | */
10336
10706
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF"
10707
+ /* \uFEFF */
10337
10708
  };
10338
10709
  }
10339
10710
  });
@@ -10346,17 +10717,29 @@ var require_parse2 = __commonJS({
10346
10717
  var {
10347
10718
  MAX_LENGTH,
10348
10719
  CHAR_BACKSLASH,
10720
+ /* \ */
10349
10721
  CHAR_BACKTICK,
10722
+ /* ` */
10350
10723
  CHAR_COMMA,
10724
+ /* , */
10351
10725
  CHAR_DOT,
10726
+ /* . */
10352
10727
  CHAR_LEFT_PARENTHESES,
10728
+ /* ( */
10353
10729
  CHAR_RIGHT_PARENTHESES,
10730
+ /* ) */
10354
10731
  CHAR_LEFT_CURLY_BRACE,
10732
+ /* { */
10355
10733
  CHAR_RIGHT_CURLY_BRACE,
10734
+ /* } */
10356
10735
  CHAR_LEFT_SQUARE_BRACKET,
10736
+ /* [ */
10357
10737
  CHAR_RIGHT_SQUARE_BRACKET,
10738
+ /* ] */
10358
10739
  CHAR_DOUBLE_QUOTE,
10740
+ /* " */
10359
10741
  CHAR_SINGLE_QUOTE,
10742
+ /* ' */
10360
10743
  CHAR_NO_BREAK_SPACE,
10361
10744
  CHAR_ZERO_WIDTH_NOBREAK_SPACE
10362
10745
  } = require_constants2();
@@ -11095,6 +11478,7 @@ var require_nodefs_handler = __commonJS({
11095
11478
  options,
11096
11479
  fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS),
11097
11480
  errHandler,
11481
+ // no need to use broadcast here
11098
11482
  fsWatchBroadcast.bind(null, fullPath, KEY_RAW)
11099
11483
  );
11100
11484
  if (!watcher)
@@ -11179,10 +11563,19 @@ var require_nodefs_handler = __commonJS({
11179
11563
  };
11180
11564
  };
11181
11565
  var NodeFsHandler = class {
11566
+ /**
11567
+ * @param {import("../index").FSWatcher} fsW
11568
+ */
11182
11569
  constructor(fsW) {
11183
11570
  this.fsw = fsW;
11184
11571
  this._boundHandleError = (error) => fsW._handleError(error);
11185
11572
  }
11573
+ /**
11574
+ * Watch file for changes with fs_watchFile or fs_watch.
11575
+ * @param {String} path to file or dir
11576
+ * @param {Function} listener on fs change
11577
+ * @returns {Function} closer for the watcher instance
11578
+ */
11186
11579
  _watchWithNodeFs(path3, listener) {
11187
11580
  const opts = this.fsw.options;
11188
11581
  const directory = sysPath.dirname(path3);
@@ -11209,6 +11602,13 @@ var require_nodefs_handler = __commonJS({
11209
11602
  }
11210
11603
  return closer;
11211
11604
  }
11605
+ /**
11606
+ * Watch a file and emit add event if warranted.
11607
+ * @param {Path} file Path
11608
+ * @param {fs.Stats} stats result of fs_stat
11609
+ * @param {Boolean} initialAdd was the file added at watch instantiation?
11610
+ * @returns {Function} closer for the watcher instance
11611
+ */
11212
11612
  _handleFile(file, stats, initialAdd) {
11213
11613
  if (this.fsw.closed) {
11214
11614
  return;
@@ -11259,6 +11659,14 @@ var require_nodefs_handler = __commonJS({
11259
11659
  }
11260
11660
  return closer;
11261
11661
  }
11662
+ /**
11663
+ * Handle symlinks encountered while reading a dir.
11664
+ * @param {Object} entry returned by readdirp
11665
+ * @param {String} directory path of dir being read
11666
+ * @param {String} path of this item
11667
+ * @param {String} item basename of this item
11668
+ * @returns {Promise<Boolean>} true if no more processing is needed for this entry.
11669
+ */
11262
11670
  async _handleSymlink(entry, directory, path3, item) {
11263
11671
  if (this.fsw.closed) {
11264
11672
  return;
@@ -11337,7 +11745,10 @@ var require_nodefs_handler = __commonJS({
11337
11745
  const wasThrottled = throttler ? throttler.clear() : false;
11338
11746
  resolve();
11339
11747
  previous.getChildren().filter((item) => {
11340
- return item !== directory && !current.has(item) && (!wh.hasGlob || wh.filterPath({
11748
+ return item !== directory && !current.has(item) && // in case of intersecting globs;
11749
+ // a path may have been filtered out of this readdir, but
11750
+ // shouldn't be removed because it matches a different glob
11751
+ (!wh.hasGlob || wh.filterPath({
11341
11752
  fullPath: sysPath.resolve(directory, item)
11342
11753
  }));
11343
11754
  }).forEach((item) => {
@@ -11349,6 +11760,17 @@ var require_nodefs_handler = __commonJS({
11349
11760
  })
11350
11761
  );
11351
11762
  }
11763
+ /**
11764
+ * Read directory to add / remove files from `@watched` list and re-read it on change.
11765
+ * @param {String} dir fs path
11766
+ * @param {fs.Stats} stats
11767
+ * @param {Boolean} initialAdd
11768
+ * @param {Number} depth relative to user-supplied path
11769
+ * @param {String} target child path targeted for watch
11770
+ * @param {Object} wh Common watch helpers for this path
11771
+ * @param {String} realpath
11772
+ * @returns {Promise<Function>} closer for the watcher instance.
11773
+ */
11352
11774
  async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) {
11353
11775
  const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir));
11354
11776
  const tracked = parentDir.has(sysPath.basename(dir));
@@ -11375,6 +11797,16 @@ var require_nodefs_handler = __commonJS({
11375
11797
  }
11376
11798
  return closer;
11377
11799
  }
11800
+ /**
11801
+ * Handle added file, directory, or glob pattern.
11802
+ * Delegates call to _handleFile / _handleDir after checks.
11803
+ * @param {String} path to file or ir
11804
+ * @param {Boolean} initialAdd was the file added at watch instantiation?
11805
+ * @param {Object} priorWh depth relative to user-supplied path
11806
+ * @param {Number} depth Child path actually targeted for watch
11807
+ * @param {String=} target Child path actually targeted for watch
11808
+ * @returns {Promise}
11809
+ */
11378
11810
  async _addToNodeFs(path3, initialAdd, priorWh, depth, target) {
11379
11811
  const ready = this.fsw._emitReady;
11380
11812
  if (this.fsw._isIgnored(path3) || this.fsw.closed) {
@@ -11476,6 +11908,7 @@ var require_fsevents_handler = __commonJS({
11476
11908
  FSEVENT_MODIFIED,
11477
11909
  FSEVENT_DELETED,
11478
11910
  FSEVENT_MOVED,
11911
+ // FSEVENT_CLONED,
11479
11912
  FSEVENT_UNKNOWN,
11480
11913
  FSEVENT_TYPE_FILE,
11481
11914
  FSEVENT_TYPE_DIRECTORY,
@@ -11584,6 +12017,9 @@ var require_fsevents_handler = __commonJS({
11584
12017
  };
11585
12018
  var sameTypes = (info, stats) => info.type === FSEVENT_TYPE_DIRECTORY && stats.isDirectory() || info.type === FSEVENT_TYPE_SYMLINK && stats.isSymbolicLink() || info.type === FSEVENT_TYPE_FILE && stats.isFile();
11586
12019
  var FsEventsHandler = class {
12020
+ /**
12021
+ * @param {import('../index').FSWatcher} fsw
12022
+ */
11587
12023
  constructor(fsw) {
11588
12024
  this.fsw = fsw;
11589
12025
  }
@@ -11645,6 +12081,14 @@ var require_fsevents_handler = __commonJS({
11645
12081
  this._addToFsEvents(path3, false, true);
11646
12082
  }
11647
12083
  }
12084
+ /**
12085
+ * Handle symlinks encountered during directory scan
12086
+ * @param {String} watchPath - file/dir path to be watched with fsevents
12087
+ * @param {String} realPath - real path (in case of symlinks)
12088
+ * @param {Function} transform - path transformer
12089
+ * @param {Function} globFilter - path filter in case a glob pattern was provided
12090
+ * @returns {Function} closer for the watcher instance
12091
+ */
11648
12092
  _watchWithFsEvents(watchPath, realPath, transform, globFilter) {
11649
12093
  if (this.fsw.closed || this.fsw._isIgnored(watchPath))
11650
12094
  return;
@@ -11704,6 +12148,14 @@ var require_fsevents_handler = __commonJS({
11704
12148
  this.fsw._emitReady();
11705
12149
  return closer;
11706
12150
  }
12151
+ /**
12152
+ * Handle symlinks encountered during directory scan
12153
+ * @param {String} linkPath path to symlink
12154
+ * @param {String} fullPath absolute path to the symlink
12155
+ * @param {Function} transform pre-existing path transformer
12156
+ * @param {Number} curDepth level of subdirectories traversed to where symlink is
12157
+ * @returns {Promise<void>}
12158
+ */
11707
12159
  async _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) {
11708
12160
  if (this.fsw.closed || this.fsw._symlinkPaths.has(fullPath))
11709
12161
  return;
@@ -11732,6 +12184,11 @@ var require_fsevents_handler = __commonJS({
11732
12184
  }
11733
12185
  }
11734
12186
  }
12187
+ /**
12188
+ *
12189
+ * @param {Path} newPath
12190
+ * @param {fs.Stats} stats
12191
+ */
11735
12192
  emitAdd(newPath, stats, processPath, opts, forceAdd) {
11736
12193
  const pp = processPath(newPath);
11737
12194
  const isDir = stats.isDirectory();
@@ -11757,6 +12214,14 @@ var require_fsevents_handler = __commonJS({
11757
12214
  );
11758
12215
  this.fsw._addPathCloser(path3, closer);
11759
12216
  }
12217
+ /**
12218
+ * Handle added path with fsevents
12219
+ * @param {String} path file/dir path or glob pattern
12220
+ * @param {Function|Boolean=} transform converts working path to what the user expects
12221
+ * @param {Boolean=} forceAdd ensure add is emitted
12222
+ * @param {Number=} priorDepth Level of subdirectories already traversed.
12223
+ * @returns {Promise<void>}
12224
+ */
11760
12225
  async _addToFsEvents(path3, transform, forceAdd, priorDepth) {
11761
12226
  if (this.fsw.closed) {
11762
12227
  return;
@@ -11927,6 +12392,10 @@ var require_chokidar = __commonJS({
11927
12392
  };
11928
12393
  var undef = (opts, key) => opts[key] === void 0;
11929
12394
  var DirEntry = class {
12395
+ /**
12396
+ * @param {Path} dir
12397
+ * @param {Function} removeWatcher
12398
+ */
11930
12399
  constructor(dir, removeWatcher) {
11931
12400
  this.path = dir;
11932
12401
  this._removeWatcher = removeWatcher;
@@ -11961,6 +12430,9 @@ var require_chokidar = __commonJS({
11961
12430
  return;
11962
12431
  return items.has(item);
11963
12432
  }
12433
+ /**
12434
+ * @returns {Array<String>}
12435
+ */
11964
12436
  getChildren() {
11965
12437
  const { items } = this;
11966
12438
  if (!items)
@@ -12045,6 +12517,7 @@ var require_chokidar = __commonJS({
12045
12517
  }
12046
12518
  };
12047
12519
  var FSWatcher = class extends EventEmitter {
12520
+ // Not indenting methods for history sake; for now.
12048
12521
  constructor(_opts) {
12049
12522
  super();
12050
12523
  const opts = {};
@@ -12135,6 +12608,14 @@ var require_chokidar = __commonJS({
12135
12608
  }
12136
12609
  Object.freeze(opts);
12137
12610
  }
12611
+ // Public methods
12612
+ /**
12613
+ * Adds paths to be watched on an existing FSWatcher instance
12614
+ * @param {Path|Array<Path>} paths_
12615
+ * @param {String=} _origAdd private; for handling non-existent paths to be watched
12616
+ * @param {Boolean=} _internal private; indicates a non-user add
12617
+ * @returns {FSWatcher} for chaining
12618
+ */
12138
12619
  add(paths_, _origAdd, _internal) {
12139
12620
  const { cwd, disableGlobbing } = this.options;
12140
12621
  this.closed = false;
@@ -12185,6 +12666,11 @@ var require_chokidar = __commonJS({
12185
12666
  }
12186
12667
  return this;
12187
12668
  }
12669
+ /**
12670
+ * Close watchers or start ignoring events from specified paths.
12671
+ * @param {Path|Array<Path>} paths_ - string or array of strings, file/directory paths and/or globs
12672
+ * @returns {FSWatcher} for chaining
12673
+ */
12188
12674
  unwatch(paths_) {
12189
12675
  if (this.closed)
12190
12676
  return this;
@@ -12205,6 +12691,10 @@ var require_chokidar = __commonJS({
12205
12691
  });
12206
12692
  return this;
12207
12693
  }
12694
+ /**
12695
+ * Close watchers and remove all listeners from watched paths.
12696
+ * @returns {Promise<void>}.
12697
+ */
12208
12698
  close() {
12209
12699
  if (this.closed)
12210
12700
  return this._closePromise;
@@ -12227,6 +12717,10 @@ var require_chokidar = __commonJS({
12227
12717
  this._closePromise = closers.length ? Promise.all(closers).then(() => void 0) : Promise.resolve();
12228
12718
  return this._closePromise;
12229
12719
  }
12720
+ /**
12721
+ * Expose list of watched paths
12722
+ * @returns {Object} for chaining
12723
+ */
12230
12724
  getWatched() {
12231
12725
  const watchList = {};
12232
12726
  this._watched.forEach((entry, dir) => {
@@ -12240,6 +12734,18 @@ var require_chokidar = __commonJS({
12240
12734
  if (event !== EV_ERROR)
12241
12735
  this.emit(EV_ALL, ...args2);
12242
12736
  }
12737
+ // Common helpers
12738
+ // --------------
12739
+ /**
12740
+ * Normalize and emit events.
12741
+ * Calling _emit DOES NOT MEAN emit() would be called!
12742
+ * @param {EventName} event Type of event
12743
+ * @param {Path} path File or directory path
12744
+ * @param {*=} val1 arguments to be passed with event
12745
+ * @param {*=} val2
12746
+ * @param {*=} val3
12747
+ * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag
12748
+ */
12243
12749
  async _emit(event, path3, val1, val2, val3) {
12244
12750
  if (this.closed)
12245
12751
  return;
@@ -12315,6 +12821,11 @@ var require_chokidar = __commonJS({
12315
12821
  this.emitWithAll(event, args2);
12316
12822
  return this;
12317
12823
  }
12824
+ /**
12825
+ * Common handler for errors
12826
+ * @param {Error} error
12827
+ * @returns {Error|Boolean} The error if defined, otherwise the value of the FSWatcher instance's `closed` flag
12828
+ */
12318
12829
  _handleError(error) {
12319
12830
  const code = error && error.code;
12320
12831
  if (error && code !== "ENOENT" && code !== "ENOTDIR" && (!this.options.ignorePermissionErrors || code !== "EPERM" && code !== "EACCES")) {
@@ -12322,6 +12833,13 @@ var require_chokidar = __commonJS({
12322
12833
  }
12323
12834
  return error || this.closed;
12324
12835
  }
12836
+ /**
12837
+ * Helper utility for throttling
12838
+ * @param {ThrottleType} actionType type being throttled
12839
+ * @param {Path} path being acted upon
12840
+ * @param {Number} timeout duration of time to suppress duplicate actions
12841
+ * @returns {Object|false} tracking object or false if action should be suppressed
12842
+ */
12325
12843
  _throttle(actionType, path3, timeout) {
12326
12844
  if (!this._throttled.has(actionType)) {
12327
12845
  this._throttled.set(actionType, /* @__PURE__ */ new Map());
@@ -12350,6 +12868,14 @@ var require_chokidar = __commonJS({
12350
12868
  _incrReadyCount() {
12351
12869
  return this._readyCount++;
12352
12870
  }
12871
+ /**
12872
+ * Awaits write operation to finish.
12873
+ * Polls a newly created file for size variations. When files size does not change for 'threshold' milliseconds calls callback.
12874
+ * @param {Path} path being acted upon
12875
+ * @param {Number} threshold Time in milliseconds a file size must be fixed before acknowledging write OP is finished
12876
+ * @param {EventName} event
12877
+ * @param {Function} awfEmit Callback to be called when ready for event to be emitted.
12878
+ */
12353
12879
  _awaitWriteFinish(path3, threshold, event, awfEmit) {
12354
12880
  let timeoutHandler;
12355
12881
  let fullPath = path3;
@@ -12400,6 +12926,12 @@ var require_chokidar = __commonJS({
12400
12926
  _getGlobIgnored() {
12401
12927
  return [...this._ignoredPaths.values()];
12402
12928
  }
12929
+ /**
12930
+ * Determines whether user has asked to ignore this path.
12931
+ * @param {Path} path filepath or dir
12932
+ * @param {fs.Stats=} stats result of fs.stat
12933
+ * @returns {Boolean}
12934
+ */
12403
12935
  _isIgnored(path3, stats) {
12404
12936
  if (this.options.atomic && DOT_RE.test(path3))
12405
12937
  return true;
@@ -12416,11 +12948,24 @@ var require_chokidar = __commonJS({
12416
12948
  _isntIgnored(path3, stat2) {
12417
12949
  return !this._isIgnored(path3, stat2);
12418
12950
  }
12951
+ /**
12952
+ * Provides a set of common helpers and properties relating to symlink and glob handling.
12953
+ * @param {Path} path file, directory, or glob pattern being watched
12954
+ * @param {Number=} depth at any depth > 0, this isn't a glob
12955
+ * @returns {WatchHelper} object containing helpers for this path
12956
+ */
12419
12957
  _getWatchHelpers(path3, depth) {
12420
12958
  const watchPath = depth || this.options.disableGlobbing || !isGlob(path3) ? path3 : globParent(path3);
12421
12959
  const follow = this.options.followSymlinks;
12422
12960
  return new WatchHelper(path3, watchPath, follow, this);
12423
12961
  }
12962
+ // Directory helpers
12963
+ // -----------------
12964
+ /**
12965
+ * Provides directory tracking objects
12966
+ * @param {String} directory path of the directory
12967
+ * @returns {DirEntry} the directory's tracking object
12968
+ */
12424
12969
  _getWatchedDir(directory) {
12425
12970
  if (!this._boundRemove)
12426
12971
  this._boundRemove = this._remove.bind(this);
@@ -12429,6 +12974,14 @@ var require_chokidar = __commonJS({
12429
12974
  this._watched.set(dir, new DirEntry(dir, this._boundRemove));
12430
12975
  return this._watched.get(dir);
12431
12976
  }
12977
+ // File helpers
12978
+ // ------------
12979
+ /**
12980
+ * Check for read permissions.
12981
+ * Based on this answer on SO: https://stackoverflow.com/a/11781404/1358405
12982
+ * @param {fs.Stats} stats - object, result of fs_stat
12983
+ * @returns {Boolean} indicates whether the file can be read
12984
+ */
12432
12985
  _hasReadPermissions(stats) {
12433
12986
  if (this.options.ignorePermissionErrors)
12434
12987
  return true;
@@ -12437,6 +12990,14 @@ var require_chokidar = __commonJS({
12437
12990
  const it = Number.parseInt(st.toString(8)[0], 10);
12438
12991
  return Boolean(4 & it);
12439
12992
  }
12993
+ /**
12994
+ * Handles emitting unlink events for
12995
+ * files and directories, and via recursion, for
12996
+ * files and directories within directories that are unlinked
12997
+ * @param {String} directory within which the following item is located
12998
+ * @param {String} item base path of item/directory
12999
+ * @returns {void}
13000
+ */
12440
13001
  _remove(directory, item, isDirectory) {
12441
13002
  const path3 = sysPath.join(directory, item);
12442
13003
  const fullPath = sysPath.resolve(path3);
@@ -12472,11 +13033,19 @@ var require_chokidar = __commonJS({
12472
13033
  this._closePath(path3);
12473
13034
  }
12474
13035
  }
13036
+ /**
13037
+ * Closes all watchers for a path
13038
+ * @param {Path} path
13039
+ */
12475
13040
  _closePath(path3) {
12476
13041
  this._closeFile(path3);
12477
13042
  const dir = sysPath.dirname(path3);
12478
13043
  this._getWatchedDir(dir).remove(sysPath.basename(path3));
12479
13044
  }
13045
+ /**
13046
+ * Closes only file-specific watchers
13047
+ * @param {Path} path
13048
+ */
12480
13049
  _closeFile(path3) {
12481
13050
  const closers = this._closers.get(path3);
12482
13051
  if (!closers)
@@ -12484,6 +13053,11 @@ var require_chokidar = __commonJS({
12484
13053
  closers.forEach((closer) => closer());
12485
13054
  this._closers.delete(path3);
12486
13055
  }
13056
+ /**
13057
+ *
13058
+ * @param {Path} path
13059
+ * @param {Function} closer
13060
+ */
12487
13061
  _addPathCloser(path3, closer) {
12488
13062
  if (!closer)
12489
13063
  return;
@@ -13871,7 +14445,7 @@ var require_package = __commonJS({
13871
14445
  "package.json"(exports, module2) {
13872
14446
  module2.exports = {
13873
14447
  name: "@html-validate/eslint-config",
13874
- version: "5.5.14",
14448
+ version: "5.5.18",
13875
14449
  description: "Eslint sharable config used by the various HTML-validate packages",
13876
14450
  keywords: [
13877
14451
  "eslint"
@@ -13905,16 +14479,16 @@ var require_package = __commonJS({
13905
14479
  },
13906
14480
  dependencies: {
13907
14481
  "@rushstack/eslint-patch": "1.2.0",
13908
- eslint: "8.30.0",
13909
- "eslint-config-prettier": "8.5.0",
14482
+ eslint: "8.31.0",
14483
+ "eslint-config-prettier": "8.6.0",
13910
14484
  "eslint-config-sidvind": "1.3.2",
13911
14485
  "eslint-formatter-gitlab": "4.0.0",
13912
- "eslint-plugin-array-func": "3.1.7",
13913
- "eslint-plugin-import": "2.26.0",
14486
+ "eslint-plugin-array-func": "3.1.8",
14487
+ "eslint-plugin-import": "2.27.4",
13914
14488
  "eslint-plugin-node": "11.1.0",
13915
14489
  "eslint-plugin-prettier": "4.2.1",
13916
- "eslint-plugin-security": "1.5.0",
13917
- "eslint-plugin-sonarjs": "0.17.0"
14490
+ "eslint-plugin-security": "1.6.0",
14491
+ "eslint-plugin-sonarjs": "0.18.0"
13918
14492
  },
13919
14493
  devDependencies: {
13920
14494
  argparse: "2.0.1",
@@ -14167,6 +14741,8 @@ var parser = new import_argparse.ArgumentParser({
14167
14741
  });
14168
14742
  parser.add_argument("-v", "--version", {
14169
14743
  action: "version",
14744
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- @types/argparse is missing version
14745
+ // @ts-ignore
14170
14746
  version: pkg.version
14171
14747
  });
14172
14748
  parser.add_argument("-w", "--write", {
@@ -14272,4 +14848,54 @@ if (!args.mode) {
14272
14848
  process.exit(1);
14273
14849
  }
14274
14850
  run(args);
14851
+ /*! Bundled license information:
14852
+
14853
+ normalize-path/index.js:
14854
+ (*!
14855
+ * normalize-path <https://github.com/jonschlinkert/normalize-path>
14856
+ *
14857
+ * Copyright (c) 2014-2018, Jon Schlinkert.
14858
+ * Released under the MIT License.
14859
+ *)
14860
+
14861
+ is-extglob/index.js:
14862
+ (*!
14863
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
14864
+ *
14865
+ * Copyright (c) 2014-2016, Jon Schlinkert.
14866
+ * Licensed under the MIT License.
14867
+ *)
14868
+
14869
+ is-glob/index.js:
14870
+ (*!
14871
+ * is-glob <https://github.com/jonschlinkert/is-glob>
14872
+ *
14873
+ * Copyright (c) 2014-2017, Jon Schlinkert.
14874
+ * Released under the MIT License.
14875
+ *)
14876
+
14877
+ is-number/index.js:
14878
+ (*!
14879
+ * is-number <https://github.com/jonschlinkert/is-number>
14880
+ *
14881
+ * Copyright (c) 2014-present, Jon Schlinkert.
14882
+ * Released under the MIT License.
14883
+ *)
14884
+
14885
+ to-regex-range/index.js:
14886
+ (*!
14887
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
14888
+ *
14889
+ * Copyright (c) 2015-present, Jon Schlinkert.
14890
+ * Released under the MIT License.
14891
+ *)
14892
+
14893
+ fill-range/index.js:
14894
+ (*!
14895
+ * fill-range <https://github.com/jonschlinkert/fill-range>
14896
+ *
14897
+ * Copyright (c) 2014-present, Jon Schlinkert.
14898
+ * Licensed under the MIT License.
14899
+ *)
14900
+ */
14275
14901
  //# sourceMappingURL=cli.js.map