@html-validate/eslint-config 5.5.14 → 5.5.18

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;
@@ -11349,6 +11757,17 @@ var require_nodefs_handler = __commonJS({
11349
11757
  })
11350
11758
  );
11351
11759
  }
11760
+ /**
11761
+ * Read directory to add / remove files from `@watched` list and re-read it on change.
11762
+ * @param {String} dir fs path
11763
+ * @param {fs.Stats} stats
11764
+ * @param {Boolean} initialAdd
11765
+ * @param {Number} depth relative to user-supplied path
11766
+ * @param {String} target child path targeted for watch
11767
+ * @param {Object} wh Common watch helpers for this path
11768
+ * @param {String} realpath
11769
+ * @returns {Promise<Function>} closer for the watcher instance.
11770
+ */
11352
11771
  async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) {
11353
11772
  const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir));
11354
11773
  const tracked = parentDir.has(sysPath.basename(dir));
@@ -11375,6 +11794,16 @@ var require_nodefs_handler = __commonJS({
11375
11794
  }
11376
11795
  return closer;
11377
11796
  }
11797
+ /**
11798
+ * Handle added file, directory, or glob pattern.
11799
+ * Delegates call to _handleFile / _handleDir after checks.
11800
+ * @param {String} path to file or ir
11801
+ * @param {Boolean} initialAdd was the file added at watch instantiation?
11802
+ * @param {Object} priorWh depth relative to user-supplied path
11803
+ * @param {Number} depth Child path actually targeted for watch
11804
+ * @param {String=} target Child path actually targeted for watch
11805
+ * @returns {Promise}
11806
+ */
11378
11807
  async _addToNodeFs(path3, initialAdd, priorWh, depth, target) {
11379
11808
  const ready = this.fsw._emitReady;
11380
11809
  if (this.fsw._isIgnored(path3) || this.fsw.closed) {
@@ -11476,6 +11905,7 @@ var require_fsevents_handler = __commonJS({
11476
11905
  FSEVENT_MODIFIED,
11477
11906
  FSEVENT_DELETED,
11478
11907
  FSEVENT_MOVED,
11908
+ // FSEVENT_CLONED,
11479
11909
  FSEVENT_UNKNOWN,
11480
11910
  FSEVENT_TYPE_FILE,
11481
11911
  FSEVENT_TYPE_DIRECTORY,
@@ -11584,6 +12014,9 @@ var require_fsevents_handler = __commonJS({
11584
12014
  };
11585
12015
  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
12016
  var FsEventsHandler = class {
12017
+ /**
12018
+ * @param {import('../index').FSWatcher} fsw
12019
+ */
11587
12020
  constructor(fsw) {
11588
12021
  this.fsw = fsw;
11589
12022
  }
@@ -11645,6 +12078,14 @@ var require_fsevents_handler = __commonJS({
11645
12078
  this._addToFsEvents(path3, false, true);
11646
12079
  }
11647
12080
  }
12081
+ /**
12082
+ * Handle symlinks encountered during directory scan
12083
+ * @param {String} watchPath - file/dir path to be watched with fsevents
12084
+ * @param {String} realPath - real path (in case of symlinks)
12085
+ * @param {Function} transform - path transformer
12086
+ * @param {Function} globFilter - path filter in case a glob pattern was provided
12087
+ * @returns {Function} closer for the watcher instance
12088
+ */
11648
12089
  _watchWithFsEvents(watchPath, realPath, transform, globFilter) {
11649
12090
  if (this.fsw.closed || this.fsw._isIgnored(watchPath))
11650
12091
  return;
@@ -11704,6 +12145,14 @@ var require_fsevents_handler = __commonJS({
11704
12145
  this.fsw._emitReady();
11705
12146
  return closer;
11706
12147
  }
12148
+ /**
12149
+ * Handle symlinks encountered during directory scan
12150
+ * @param {String} linkPath path to symlink
12151
+ * @param {String} fullPath absolute path to the symlink
12152
+ * @param {Function} transform pre-existing path transformer
12153
+ * @param {Number} curDepth level of subdirectories traversed to where symlink is
12154
+ * @returns {Promise<void>}
12155
+ */
11707
12156
  async _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) {
11708
12157
  if (this.fsw.closed || this.fsw._symlinkPaths.has(fullPath))
11709
12158
  return;
@@ -11732,6 +12181,11 @@ var require_fsevents_handler = __commonJS({
11732
12181
  }
11733
12182
  }
11734
12183
  }
12184
+ /**
12185
+ *
12186
+ * @param {Path} newPath
12187
+ * @param {fs.Stats} stats
12188
+ */
11735
12189
  emitAdd(newPath, stats, processPath, opts, forceAdd) {
11736
12190
  const pp = processPath(newPath);
11737
12191
  const isDir = stats.isDirectory();
@@ -11757,6 +12211,14 @@ var require_fsevents_handler = __commonJS({
11757
12211
  );
11758
12212
  this.fsw._addPathCloser(path3, closer);
11759
12213
  }
12214
+ /**
12215
+ * Handle added path with fsevents
12216
+ * @param {String} path file/dir path or glob pattern
12217
+ * @param {Function|Boolean=} transform converts working path to what the user expects
12218
+ * @param {Boolean=} forceAdd ensure add is emitted
12219
+ * @param {Number=} priorDepth Level of subdirectories already traversed.
12220
+ * @returns {Promise<void>}
12221
+ */
11760
12222
  async _addToFsEvents(path3, transform, forceAdd, priorDepth) {
11761
12223
  if (this.fsw.closed) {
11762
12224
  return;
@@ -11927,6 +12389,10 @@ var require_chokidar = __commonJS({
11927
12389
  };
11928
12390
  var undef = (opts, key) => opts[key] === void 0;
11929
12391
  var DirEntry = class {
12392
+ /**
12393
+ * @param {Path} dir
12394
+ * @param {Function} removeWatcher
12395
+ */
11930
12396
  constructor(dir, removeWatcher) {
11931
12397
  this.path = dir;
11932
12398
  this._removeWatcher = removeWatcher;
@@ -11961,6 +12427,9 @@ var require_chokidar = __commonJS({
11961
12427
  return;
11962
12428
  return items.has(item);
11963
12429
  }
12430
+ /**
12431
+ * @returns {Array<String>}
12432
+ */
11964
12433
  getChildren() {
11965
12434
  const { items } = this;
11966
12435
  if (!items)
@@ -12045,6 +12514,7 @@ var require_chokidar = __commonJS({
12045
12514
  }
12046
12515
  };
12047
12516
  var FSWatcher = class extends EventEmitter {
12517
+ // Not indenting methods for history sake; for now.
12048
12518
  constructor(_opts) {
12049
12519
  super();
12050
12520
  const opts = {};
@@ -12135,6 +12605,14 @@ var require_chokidar = __commonJS({
12135
12605
  }
12136
12606
  Object.freeze(opts);
12137
12607
  }
12608
+ // Public methods
12609
+ /**
12610
+ * Adds paths to be watched on an existing FSWatcher instance
12611
+ * @param {Path|Array<Path>} paths_
12612
+ * @param {String=} _origAdd private; for handling non-existent paths to be watched
12613
+ * @param {Boolean=} _internal private; indicates a non-user add
12614
+ * @returns {FSWatcher} for chaining
12615
+ */
12138
12616
  add(paths_, _origAdd, _internal) {
12139
12617
  const { cwd, disableGlobbing } = this.options;
12140
12618
  this.closed = false;
@@ -12185,6 +12663,11 @@ var require_chokidar = __commonJS({
12185
12663
  }
12186
12664
  return this;
12187
12665
  }
12666
+ /**
12667
+ * Close watchers or start ignoring events from specified paths.
12668
+ * @param {Path|Array<Path>} paths_ - string or array of strings, file/directory paths and/or globs
12669
+ * @returns {FSWatcher} for chaining
12670
+ */
12188
12671
  unwatch(paths_) {
12189
12672
  if (this.closed)
12190
12673
  return this;
@@ -12205,6 +12688,10 @@ var require_chokidar = __commonJS({
12205
12688
  });
12206
12689
  return this;
12207
12690
  }
12691
+ /**
12692
+ * Close watchers and remove all listeners from watched paths.
12693
+ * @returns {Promise<void>}.
12694
+ */
12208
12695
  close() {
12209
12696
  if (this.closed)
12210
12697
  return this._closePromise;
@@ -12227,6 +12714,10 @@ var require_chokidar = __commonJS({
12227
12714
  this._closePromise = closers.length ? Promise.all(closers).then(() => void 0) : Promise.resolve();
12228
12715
  return this._closePromise;
12229
12716
  }
12717
+ /**
12718
+ * Expose list of watched paths
12719
+ * @returns {Object} for chaining
12720
+ */
12230
12721
  getWatched() {
12231
12722
  const watchList = {};
12232
12723
  this._watched.forEach((entry, dir) => {
@@ -12240,6 +12731,18 @@ var require_chokidar = __commonJS({
12240
12731
  if (event !== EV_ERROR)
12241
12732
  this.emit(EV_ALL, ...args2);
12242
12733
  }
12734
+ // Common helpers
12735
+ // --------------
12736
+ /**
12737
+ * Normalize and emit events.
12738
+ * Calling _emit DOES NOT MEAN emit() would be called!
12739
+ * @param {EventName} event Type of event
12740
+ * @param {Path} path File or directory path
12741
+ * @param {*=} val1 arguments to be passed with event
12742
+ * @param {*=} val2
12743
+ * @param {*=} val3
12744
+ * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag
12745
+ */
12243
12746
  async _emit(event, path3, val1, val2, val3) {
12244
12747
  if (this.closed)
12245
12748
  return;
@@ -12315,6 +12818,11 @@ var require_chokidar = __commonJS({
12315
12818
  this.emitWithAll(event, args2);
12316
12819
  return this;
12317
12820
  }
12821
+ /**
12822
+ * Common handler for errors
12823
+ * @param {Error} error
12824
+ * @returns {Error|Boolean} The error if defined, otherwise the value of the FSWatcher instance's `closed` flag
12825
+ */
12318
12826
  _handleError(error) {
12319
12827
  const code = error && error.code;
12320
12828
  if (error && code !== "ENOENT" && code !== "ENOTDIR" && (!this.options.ignorePermissionErrors || code !== "EPERM" && code !== "EACCES")) {
@@ -12322,6 +12830,13 @@ var require_chokidar = __commonJS({
12322
12830
  }
12323
12831
  return error || this.closed;
12324
12832
  }
12833
+ /**
12834
+ * Helper utility for throttling
12835
+ * @param {ThrottleType} actionType type being throttled
12836
+ * @param {Path} path being acted upon
12837
+ * @param {Number} timeout duration of time to suppress duplicate actions
12838
+ * @returns {Object|false} tracking object or false if action should be suppressed
12839
+ */
12325
12840
  _throttle(actionType, path3, timeout) {
12326
12841
  if (!this._throttled.has(actionType)) {
12327
12842
  this._throttled.set(actionType, /* @__PURE__ */ new Map());
@@ -12350,6 +12865,14 @@ var require_chokidar = __commonJS({
12350
12865
  _incrReadyCount() {
12351
12866
  return this._readyCount++;
12352
12867
  }
12868
+ /**
12869
+ * Awaits write operation to finish.
12870
+ * Polls a newly created file for size variations. When files size does not change for 'threshold' milliseconds calls callback.
12871
+ * @param {Path} path being acted upon
12872
+ * @param {Number} threshold Time in milliseconds a file size must be fixed before acknowledging write OP is finished
12873
+ * @param {EventName} event
12874
+ * @param {Function} awfEmit Callback to be called when ready for event to be emitted.
12875
+ */
12353
12876
  _awaitWriteFinish(path3, threshold, event, awfEmit) {
12354
12877
  let timeoutHandler;
12355
12878
  let fullPath = path3;
@@ -12400,6 +12923,12 @@ var require_chokidar = __commonJS({
12400
12923
  _getGlobIgnored() {
12401
12924
  return [...this._ignoredPaths.values()];
12402
12925
  }
12926
+ /**
12927
+ * Determines whether user has asked to ignore this path.
12928
+ * @param {Path} path filepath or dir
12929
+ * @param {fs.Stats=} stats result of fs.stat
12930
+ * @returns {Boolean}
12931
+ */
12403
12932
  _isIgnored(path3, stats) {
12404
12933
  if (this.options.atomic && DOT_RE.test(path3))
12405
12934
  return true;
@@ -12416,11 +12945,24 @@ var require_chokidar = __commonJS({
12416
12945
  _isntIgnored(path3, stat2) {
12417
12946
  return !this._isIgnored(path3, stat2);
12418
12947
  }
12948
+ /**
12949
+ * Provides a set of common helpers and properties relating to symlink and glob handling.
12950
+ * @param {Path} path file, directory, or glob pattern being watched
12951
+ * @param {Number=} depth at any depth > 0, this isn't a glob
12952
+ * @returns {WatchHelper} object containing helpers for this path
12953
+ */
12419
12954
  _getWatchHelpers(path3, depth) {
12420
12955
  const watchPath = depth || this.options.disableGlobbing || !isGlob(path3) ? path3 : globParent(path3);
12421
12956
  const follow = this.options.followSymlinks;
12422
12957
  return new WatchHelper(path3, watchPath, follow, this);
12423
12958
  }
12959
+ // Directory helpers
12960
+ // -----------------
12961
+ /**
12962
+ * Provides directory tracking objects
12963
+ * @param {String} directory path of the directory
12964
+ * @returns {DirEntry} the directory's tracking object
12965
+ */
12424
12966
  _getWatchedDir(directory) {
12425
12967
  if (!this._boundRemove)
12426
12968
  this._boundRemove = this._remove.bind(this);
@@ -12429,6 +12971,14 @@ var require_chokidar = __commonJS({
12429
12971
  this._watched.set(dir, new DirEntry(dir, this._boundRemove));
12430
12972
  return this._watched.get(dir);
12431
12973
  }
12974
+ // File helpers
12975
+ // ------------
12976
+ /**
12977
+ * Check for read permissions.
12978
+ * Based on this answer on SO: https://stackoverflow.com/a/11781404/1358405
12979
+ * @param {fs.Stats} stats - object, result of fs_stat
12980
+ * @returns {Boolean} indicates whether the file can be read
12981
+ */
12432
12982
  _hasReadPermissions(stats) {
12433
12983
  if (this.options.ignorePermissionErrors)
12434
12984
  return true;
@@ -12437,6 +12987,14 @@ var require_chokidar = __commonJS({
12437
12987
  const it = Number.parseInt(st.toString(8)[0], 10);
12438
12988
  return Boolean(4 & it);
12439
12989
  }
12990
+ /**
12991
+ * Handles emitting unlink events for
12992
+ * files and directories, and via recursion, for
12993
+ * files and directories within directories that are unlinked
12994
+ * @param {String} directory within which the following item is located
12995
+ * @param {String} item base path of item/directory
12996
+ * @returns {void}
12997
+ */
12440
12998
  _remove(directory, item, isDirectory) {
12441
12999
  const path3 = sysPath.join(directory, item);
12442
13000
  const fullPath = sysPath.resolve(path3);
@@ -12472,11 +13030,19 @@ var require_chokidar = __commonJS({
12472
13030
  this._closePath(path3);
12473
13031
  }
12474
13032
  }
13033
+ /**
13034
+ * Closes all watchers for a path
13035
+ * @param {Path} path
13036
+ */
12475
13037
  _closePath(path3) {
12476
13038
  this._closeFile(path3);
12477
13039
  const dir = sysPath.dirname(path3);
12478
13040
  this._getWatchedDir(dir).remove(sysPath.basename(path3));
12479
13041
  }
13042
+ /**
13043
+ * Closes only file-specific watchers
13044
+ * @param {Path} path
13045
+ */
12480
13046
  _closeFile(path3) {
12481
13047
  const closers = this._closers.get(path3);
12482
13048
  if (!closers)
@@ -12484,6 +13050,11 @@ var require_chokidar = __commonJS({
12484
13050
  closers.forEach((closer) => closer());
12485
13051
  this._closers.delete(path3);
12486
13052
  }
13053
+ /**
13054
+ *
13055
+ * @param {Path} path
13056
+ * @param {Function} closer
13057
+ */
12487
13058
  _addPathCloser(path3, closer) {
12488
13059
  if (!closer)
12489
13060
  return;
@@ -13871,7 +14442,7 @@ var require_package = __commonJS({
13871
14442
  "package.json"(exports, module2) {
13872
14443
  module2.exports = {
13873
14444
  name: "@html-validate/eslint-config",
13874
- version: "5.5.13",
14445
+ version: "5.5.15",
13875
14446
  description: "Eslint sharable config used by the various HTML-validate packages",
13876
14447
  keywords: [
13877
14448
  "eslint"
@@ -13905,11 +14476,11 @@ var require_package = __commonJS({
13905
14476
  },
13906
14477
  dependencies: {
13907
14478
  "@rushstack/eslint-patch": "1.2.0",
13908
- eslint: "8.29.0",
13909
- "eslint-config-prettier": "8.5.0",
14479
+ eslint: "8.31.0",
14480
+ "eslint-config-prettier": "8.6.0",
13910
14481
  "eslint-config-sidvind": "1.3.2",
13911
14482
  "eslint-formatter-gitlab": "4.0.0",
13912
- "eslint-plugin-array-func": "3.1.7",
14483
+ "eslint-plugin-array-func": "3.1.8",
13913
14484
  "eslint-plugin-import": "2.26.0",
13914
14485
  "eslint-plugin-node": "11.1.0",
13915
14486
  "eslint-plugin-prettier": "4.2.1",
@@ -14167,6 +14738,8 @@ var parser = new import_argparse.ArgumentParser({
14167
14738
  });
14168
14739
  parser.add_argument("-v", "--version", {
14169
14740
  action: "version",
14741
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- @types/argparse is missing version
14742
+ // @ts-ignore
14170
14743
  version: pkg.version
14171
14744
  });
14172
14745
  parser.add_argument("-w", "--write", {
@@ -14272,4 +14845,54 @@ if (!args.mode) {
14272
14845
  process.exit(1);
14273
14846
  }
14274
14847
  run(args);
14848
+ /*! Bundled license information:
14849
+
14850
+ normalize-path/index.js:
14851
+ (*!
14852
+ * normalize-path <https://github.com/jonschlinkert/normalize-path>
14853
+ *
14854
+ * Copyright (c) 2014-2018, Jon Schlinkert.
14855
+ * Released under the MIT License.
14856
+ *)
14857
+
14858
+ is-extglob/index.js:
14859
+ (*!
14860
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
14861
+ *
14862
+ * Copyright (c) 2014-2016, Jon Schlinkert.
14863
+ * Licensed under the MIT License.
14864
+ *)
14865
+
14866
+ is-glob/index.js:
14867
+ (*!
14868
+ * is-glob <https://github.com/jonschlinkert/is-glob>
14869
+ *
14870
+ * Copyright (c) 2014-2017, Jon Schlinkert.
14871
+ * Released under the MIT License.
14872
+ *)
14873
+
14874
+ is-number/index.js:
14875
+ (*!
14876
+ * is-number <https://github.com/jonschlinkert/is-number>
14877
+ *
14878
+ * Copyright (c) 2014-present, Jon Schlinkert.
14879
+ * Released under the MIT License.
14880
+ *)
14881
+
14882
+ to-regex-range/index.js:
14883
+ (*!
14884
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
14885
+ *
14886
+ * Copyright (c) 2015-present, Jon Schlinkert.
14887
+ * Released under the MIT License.
14888
+ *)
14889
+
14890
+ fill-range/index.js:
14891
+ (*!
14892
+ * fill-range <https://github.com/jonschlinkert/fill-range>
14893
+ *
14894
+ * Copyright (c) 2014-present, Jon Schlinkert.
14895
+ * Licensed under the MIT License.
14896
+ *)
14897
+ */
14275
14898
  //# sourceMappingURL=cli.js.map