@storm-software/eslint 0.107.2 → 0.108.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/README.md +1 -1
  2. package/dist/chunk-723HQUNP.js +14 -0
  3. package/dist/{chunk-V7TQDECV.js → chunk-E7T4SNH3.js} +2 -4
  4. package/dist/chunk-ESFBJFNU.cjs +149 -0
  5. package/dist/chunk-FTXILLLE.js +24 -0
  6. package/dist/chunk-JS7W7LMD.cjs +14 -0
  7. package/dist/chunk-KND2ZTLT.cjs +49 -0
  8. package/dist/chunk-LSG5T3ZK.js +313 -0
  9. package/dist/{chunk-CIGM5K4I.cjs → chunk-NFPQICLG.cjs} +2 -4
  10. package/dist/chunk-OGGLIE6C.cjs +24 -0
  11. package/dist/chunk-QDLKHXPX.cjs +11 -0
  12. package/dist/chunk-RTM5LCEB.js +149 -0
  13. package/dist/chunk-SHUYVCID.js +6 -0
  14. package/dist/chunk-TXTXUVRZ.cjs +313 -0
  15. package/dist/chunk-VJ6CKC4P.js +37 -0
  16. package/dist/chunk-Y67QTC5U.js +49 -0
  17. package/dist/chunk-YQQ366F7.cjs +37 -0
  18. package/dist/preset.cjs +169 -20187
  19. package/dist/preset.js +88 -20104
  20. package/dist/rules/import.cjs +292 -0
  21. package/dist/rules/import.d.cts +5 -0
  22. package/dist/rules/import.d.ts +5 -0
  23. package/dist/rules/import.js +292 -0
  24. package/dist/rules/jsx-a11y.cjs +341 -0
  25. package/dist/rules/jsx-a11y.d.cts +5 -0
  26. package/dist/rules/jsx-a11y.d.ts +5 -0
  27. package/dist/rules/jsx-a11y.js +341 -0
  28. package/dist/rules/react-hooks.cjs +15 -0
  29. package/dist/rules/react-hooks.d.cts +5 -0
  30. package/dist/rules/react-hooks.d.ts +5 -0
  31. package/dist/rules/react-hooks.js +15 -0
  32. package/dist/rules/react.cjs +689 -0
  33. package/dist/rules/react.d.cts +5 -0
  34. package/dist/rules/react.d.ts +5 -0
  35. package/dist/rules/react.js +689 -0
  36. package/dist/rules/storm.cjs +3 -3
  37. package/dist/rules/storm.js +2 -2
  38. package/dist/rules/ts-docs.cjs +7 -0
  39. package/dist/rules/ts-docs.d.cts +5 -0
  40. package/dist/rules/ts-docs.d.ts +5 -0
  41. package/dist/rules/ts-docs.js +7 -0
  42. package/dist/utils/banner-plugin.cjs +9 -0
  43. package/dist/utils/banner-plugin.d.cts +6 -0
  44. package/dist/utils/banner-plugin.d.ts +6 -0
  45. package/dist/utils/banner-plugin.js +9 -0
  46. package/dist/utils/constants.cjs +25 -0
  47. package/dist/utils/constants.d.cts +24 -0
  48. package/dist/utils/constants.d.ts +24 -0
  49. package/dist/utils/constants.js +25 -0
  50. package/dist/utils/create-flat-import-plugin.cjs +20 -0
  51. package/dist/utils/create-flat-import-plugin.d.cts +11 -0
  52. package/dist/utils/create-flat-import-plugin.d.ts +11 -0
  53. package/dist/utils/create-flat-import-plugin.js +20 -0
  54. package/dist/utils/format-config.cjs +7 -0
  55. package/dist/utils/format-config.d.cts +5 -0
  56. package/dist/utils/format-config.d.ts +5 -0
  57. package/dist/utils/format-config.js +7 -0
  58. package/dist/utils/get-file-banner.cjs +8 -0
  59. package/dist/utils/get-file-banner.d.cts +9 -0
  60. package/dist/utils/get-file-banner.d.ts +9 -0
  61. package/dist/utils/get-file-banner.js +8 -0
  62. package/dist/utils/ignores.cjs +7 -0
  63. package/dist/utils/ignores.d.cts +3 -0
  64. package/dist/utils/ignores.d.ts +3 -0
  65. package/dist/utils/ignores.js +7 -0
  66. package/dist/utils/index.cjs +33 -0
  67. package/dist/utils/index.d.cts +4 -0
  68. package/dist/utils/index.d.ts +4 -0
  69. package/dist/utils/index.js +33 -0
  70. package/package.json +1 -1
  71. package/dist/acorn-CCDA5Y7C.cjs +0 -3131
  72. package/dist/acorn-PTPZSZS6.js +0 -3131
  73. package/dist/angular-NDZ53HZT.js +0 -3014
  74. package/dist/angular-XXKPBORI.cjs +0 -3014
  75. package/dist/babel-7OKY5N6D.js +0 -7166
  76. package/dist/babel-ZAEH2MD6.cjs +0 -7166
  77. package/dist/chunk-2GN5RLNR.js +0 -55
  78. package/dist/chunk-BHJDUHOW.cjs +0 -84
  79. package/dist/chunk-GSOR5H2M.cjs +0 -4022
  80. package/dist/chunk-HXTIVITI.js +0 -4022
  81. package/dist/chunk-KOFZWJCN.js +0 -84
  82. package/dist/chunk-PWYAFNCE.cjs +0 -59
  83. package/dist/dist-3EJMVSVL.js +0 -15716
  84. package/dist/dist-GB3FBWYD.cjs +0 -15717
  85. package/dist/esm-HMD4VZC2.js +0 -1715
  86. package/dist/esm-KLBQYHBS.cjs +0 -1715
  87. package/dist/estree-4FZVBA3I.js +0 -4859
  88. package/dist/estree-TXEM7J44.cjs +0 -4859
  89. package/dist/execa-6ZJHRRGH.js +0 -2424
  90. package/dist/execa-RWXGY3AF.cjs +0 -2424
  91. package/dist/flow-LEJXBIDN.cjs +0 -28076
  92. package/dist/flow-TYUDSDMT.js +0 -28076
  93. package/dist/glimmer-BFX2N2PO.js +0 -3062
  94. package/dist/glimmer-CI4NLBJN.cjs +0 -3062
  95. package/dist/graphql-ATKH2UJU.js +0 -1355
  96. package/dist/graphql-F26LLKM2.cjs +0 -1355
  97. package/dist/html-DPSCSLFD.cjs +0 -3036
  98. package/dist/html-TQZJETBK.js +0 -3036
  99. package/dist/json5-2N47OU6X.cjs +0 -764
  100. package/dist/json5-DGCDZGKI.js +0 -764
  101. package/dist/jsonc-3RGXS4EK.js +0 -447
  102. package/dist/jsonc-H5JHBJWX.cjs +0 -447
  103. package/dist/markdown-ENFWQVL3.js +0 -3846
  104. package/dist/markdown-KDQOGP3N.cjs +0 -3846
  105. package/dist/meriyah-UO5W2QS6.js +0 -2720
  106. package/dist/meriyah-XW3PRYEN.cjs +0 -2720
  107. package/dist/multipart-parser-POHWNSZ2.cjs +0 -186
  108. package/dist/multipart-parser-ZBOXYK27.js +0 -186
  109. package/dist/postcss-ICZTIVVB.js +0 -5440
  110. package/dist/postcss-OH45GBM4.cjs +0 -5440
  111. package/dist/prettier-U5XWBEA6.js +0 -23559
  112. package/dist/prettier-UYPX4PW2.cjs +0 -23560
  113. package/dist/toml-NUWFIHJI.js +0 -509
  114. package/dist/toml-WFSEGMHQ.cjs +0 -509
  115. package/dist/typescript-6RS3BOJH.js +0 -14956
  116. package/dist/typescript-K6YYG6NX.cjs +0 -14956
  117. package/dist/yaml-DOGTEZV3.js +0 -4584
  118. package/dist/yaml-GNGUKHFM.cjs +0 -4584
  119. package/dist/yaml-UATHGD5B.cjs +0 -1119
  120. package/dist/yaml-XTDKP6DN.js +0 -1119
@@ -1,1715 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }
2
-
3
-
4
- var _chunkPWYAFNCEcjs = require('./chunk-PWYAFNCE.cjs');
5
-
6
- // ../../node_modules/.pnpm/chokidar@4.0.3/node_modules/chokidar/esm/index.js
7
- _chunkPWYAFNCEcjs.init_cjs_shims.call(void 0, );
8
- var _fs = require('fs');
9
- var _promises = require('fs/promises');
10
- var _events = require('events');
11
- var _path2 = require('path'); var sysPath2 = _interopRequireWildcard(_path2); var sysPath = _interopRequireWildcard(_path2);
12
-
13
- // ../../node_modules/.pnpm/readdirp@4.0.2/node_modules/readdirp/esm/index.js
14
- _chunkPWYAFNCEcjs.init_cjs_shims.call(void 0, );
15
-
16
- var _stream = require('stream');
17
-
18
- function defaultOptions() {
19
- return {
20
- root: ".",
21
- fileFilter: /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (_path) => true, "fileFilter"),
22
- directoryFilter: /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (_path) => true, "directoryFilter"),
23
- type: FILE_TYPE,
24
- lstat: false,
25
- depth: 2147483648,
26
- alwaysStat: false,
27
- highWaterMark: 4096
28
- };
29
- }
30
- _chunkPWYAFNCEcjs.__name.call(void 0, defaultOptions, "defaultOptions");
31
- var RECURSIVE_ERROR_CODE = "READDIRP_RECURSIVE_ERROR";
32
- var NORMAL_FLOW_ERRORS = /* @__PURE__ */ new Set([
33
- "ENOENT",
34
- "EPERM",
35
- "EACCES",
36
- "ELOOP",
37
- RECURSIVE_ERROR_CODE
38
- ]);
39
- var FILE_TYPE = "files";
40
- var DIR_TYPE = "directories";
41
- var FILE_DIR_TYPE = "files_directories";
42
- var EVERYTHING_TYPE = "all";
43
- var ALL_TYPES = [
44
- FILE_TYPE,
45
- DIR_TYPE,
46
- FILE_DIR_TYPE,
47
- EVERYTHING_TYPE
48
- ];
49
- var DIR_TYPES = /* @__PURE__ */ new Set([
50
- DIR_TYPE,
51
- FILE_DIR_TYPE,
52
- EVERYTHING_TYPE
53
- ]);
54
- var FILE_TYPES = /* @__PURE__ */ new Set([
55
- FILE_TYPE,
56
- FILE_DIR_TYPE,
57
- EVERYTHING_TYPE
58
- ]);
59
- var isNormalFlowError = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (error) => NORMAL_FLOW_ERRORS.has(error.code), "isNormalFlowError");
60
- var wantBigintFsStats = process.platform === "win32";
61
- var emptyFn = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (_path) => true, "emptyFn");
62
- var normalizeFilter = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (filter) => {
63
- if (filter === void 0) return emptyFn;
64
- if (typeof filter === "function") return filter;
65
- if (typeof filter === "string") {
66
- const fl = filter.trim();
67
- return (entry) => entry.basename === fl;
68
- }
69
- if (Array.isArray(filter)) {
70
- const trItems = filter.map((item) => item.trim());
71
- return (entry) => trItems.some((f) => entry.basename === f);
72
- }
73
- return emptyFn;
74
- }, "normalizeFilter");
75
- var ReaddirpStream = class extends _stream.Readable {
76
- static {
77
- _chunkPWYAFNCEcjs.__name.call(void 0, this, "ReaddirpStream");
78
- }
79
- constructor(options = {}) {
80
- super({
81
- objectMode: true,
82
- autoDestroy: true,
83
- highWaterMark: options.highWaterMark
84
- });
85
- const opts = {
86
- ...defaultOptions(),
87
- ...options
88
- };
89
- const { root, type } = opts;
90
- this._fileFilter = normalizeFilter(opts.fileFilter);
91
- this._directoryFilter = normalizeFilter(opts.directoryFilter);
92
- const statMethod = opts.lstat ? _promises.lstat : _promises.stat;
93
- if (wantBigintFsStats) {
94
- this._stat = (path) => statMethod(path, {
95
- bigint: true
96
- });
97
- } else {
98
- this._stat = statMethod;
99
- }
100
- this._maxDepth = opts.depth;
101
- this._wantsDir = DIR_TYPES.has(type);
102
- this._wantsFile = FILE_TYPES.has(type);
103
- this._wantsEverything = type === EVERYTHING_TYPE;
104
- this._root = _path2.resolve.call(void 0, root);
105
- this._isDirent = !opts.alwaysStat;
106
- this._statsProp = this._isDirent ? "dirent" : "stats";
107
- this._rdOptions = {
108
- encoding: "utf8",
109
- withFileTypes: this._isDirent
110
- };
111
- this.parents = [
112
- this._exploreDir(root, 1)
113
- ];
114
- this.reading = false;
115
- this.parent = void 0;
116
- }
117
- async _read(batch) {
118
- if (this.reading) return;
119
- this.reading = true;
120
- try {
121
- while (!this.destroyed && batch > 0) {
122
- const par = this.parent;
123
- const fil = par && par.files;
124
- if (fil && fil.length > 0) {
125
- const { path, depth } = par;
126
- const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path));
127
- const awaited = await Promise.all(slice);
128
- for (const entry of awaited) {
129
- if (!entry) {
130
- batch--;
131
- return;
132
- }
133
- if (this.destroyed) return;
134
- const entryType = await this._getEntryType(entry);
135
- if (entryType === "directory" && this._directoryFilter(entry)) {
136
- if (depth <= this._maxDepth) {
137
- this.parents.push(this._exploreDir(entry.fullPath, depth + 1));
138
- }
139
- if (this._wantsDir) {
140
- this.push(entry);
141
- batch--;
142
- }
143
- } else if ((entryType === "file" || this._includeAsFile(entry)) && this._fileFilter(entry)) {
144
- if (this._wantsFile) {
145
- this.push(entry);
146
- batch--;
147
- }
148
- }
149
- }
150
- } else {
151
- const parent = this.parents.pop();
152
- if (!parent) {
153
- this.push(null);
154
- break;
155
- }
156
- this.parent = await parent;
157
- if (this.destroyed) return;
158
- }
159
- }
160
- } catch (error) {
161
- this.destroy(error);
162
- } finally {
163
- this.reading = false;
164
- }
165
- }
166
- async _exploreDir(path, depth) {
167
- let files;
168
- try {
169
- files = await _promises.readdir.call(void 0, path, this._rdOptions);
170
- } catch (error) {
171
- this._onError(error);
172
- }
173
- return {
174
- files,
175
- depth,
176
- path
177
- };
178
- }
179
- async _formatEntry(dirent, path) {
180
- let entry;
181
- const basename3 = this._isDirent ? dirent.name : dirent;
182
- try {
183
- const fullPath = _path2.resolve.call(void 0, _path2.join.call(void 0, path, basename3));
184
- entry = {
185
- path: _path2.relative.call(void 0, this._root, fullPath),
186
- fullPath,
187
- basename: basename3
188
- };
189
- entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
190
- } catch (err) {
191
- this._onError(err);
192
- return;
193
- }
194
- return entry;
195
- }
196
- _onError(err) {
197
- if (isNormalFlowError(err) && !this.destroyed) {
198
- this.emit("warn", err);
199
- } else {
200
- this.destroy(err);
201
- }
202
- }
203
- async _getEntryType(entry) {
204
- if (!entry && this._statsProp in entry) {
205
- return "";
206
- }
207
- const stats = entry[this._statsProp];
208
- if (stats.isFile()) return "file";
209
- if (stats.isDirectory()) return "directory";
210
- if (stats && stats.isSymbolicLink()) {
211
- const full = entry.fullPath;
212
- try {
213
- const entryRealPath = await _promises.realpath.call(void 0, full);
214
- const entryRealPathStats = await _promises.lstat.call(void 0, entryRealPath);
215
- if (entryRealPathStats.isFile()) {
216
- return "file";
217
- }
218
- if (entryRealPathStats.isDirectory()) {
219
- const len = entryRealPath.length;
220
- if (full.startsWith(entryRealPath) && full.substr(len, 1) === _path2.sep) {
221
- const recursiveError = new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`);
222
- recursiveError.code = RECURSIVE_ERROR_CODE;
223
- return this._onError(recursiveError);
224
- }
225
- return "directory";
226
- }
227
- } catch (error) {
228
- this._onError(error);
229
- return "";
230
- }
231
- }
232
- }
233
- _includeAsFile(entry) {
234
- const stats = entry && entry[this._statsProp];
235
- return stats && this._wantsEverything && !stats.isDirectory();
236
- }
237
- };
238
- var readdirp = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (root, options = {}) => {
239
- let type = options.entryType || options.type;
240
- if (type === "both") type = FILE_DIR_TYPE;
241
- if (type) options.type = type;
242
- if (!root) {
243
- throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");
244
- } else if (typeof root !== "string") {
245
- throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");
246
- } else if (type && !ALL_TYPES.includes(type)) {
247
- throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(", ")}`);
248
- }
249
- options.root = root;
250
- return new ReaddirpStream(options);
251
- }, "readdirp");
252
-
253
- // ../../node_modules/.pnpm/chokidar@4.0.3/node_modules/chokidar/esm/handler.js
254
- _chunkPWYAFNCEcjs.init_cjs_shims.call(void 0, );
255
-
256
-
257
-
258
- var _os = require('os');
259
- var STR_DATA = "data";
260
- var STR_END = "end";
261
- var STR_CLOSE = "close";
262
- var EMPTY_FN = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, () => {
263
- }, "EMPTY_FN");
264
- var pl = process.platform;
265
- var isWindows = pl === "win32";
266
- var isMacos = pl === "darwin";
267
- var isLinux = pl === "linux";
268
- var isFreeBSD = pl === "freebsd";
269
- var isIBMi = _os.type.call(void 0, ) === "OS400";
270
- var EVENTS = {
271
- ALL: "all",
272
- READY: "ready",
273
- ADD: "add",
274
- CHANGE: "change",
275
- ADD_DIR: "addDir",
276
- UNLINK: "unlink",
277
- UNLINK_DIR: "unlinkDir",
278
- RAW: "raw",
279
- ERROR: "error"
280
- };
281
- var EV = EVENTS;
282
- var THROTTLE_MODE_WATCH = "watch";
283
- var statMethods = {
284
- lstat: _promises.lstat,
285
- stat: _promises.stat
286
- };
287
- var KEY_LISTENERS = "listeners";
288
- var KEY_ERR = "errHandlers";
289
- var KEY_RAW = "rawEmitters";
290
- var HANDLER_KEYS = [
291
- KEY_LISTENERS,
292
- KEY_ERR,
293
- KEY_RAW
294
- ];
295
- var binaryExtensions = /* @__PURE__ */ new Set([
296
- "3dm",
297
- "3ds",
298
- "3g2",
299
- "3gp",
300
- "7z",
301
- "a",
302
- "aac",
303
- "adp",
304
- "afdesign",
305
- "afphoto",
306
- "afpub",
307
- "ai",
308
- "aif",
309
- "aiff",
310
- "alz",
311
- "ape",
312
- "apk",
313
- "appimage",
314
- "ar",
315
- "arj",
316
- "asf",
317
- "au",
318
- "avi",
319
- "bak",
320
- "baml",
321
- "bh",
322
- "bin",
323
- "bk",
324
- "bmp",
325
- "btif",
326
- "bz2",
327
- "bzip2",
328
- "cab",
329
- "caf",
330
- "cgm",
331
- "class",
332
- "cmx",
333
- "cpio",
334
- "cr2",
335
- "cur",
336
- "dat",
337
- "dcm",
338
- "deb",
339
- "dex",
340
- "djvu",
341
- "dll",
342
- "dmg",
343
- "dng",
344
- "doc",
345
- "docm",
346
- "docx",
347
- "dot",
348
- "dotm",
349
- "dra",
350
- "DS_Store",
351
- "dsk",
352
- "dts",
353
- "dtshd",
354
- "dvb",
355
- "dwg",
356
- "dxf",
357
- "ecelp4800",
358
- "ecelp7470",
359
- "ecelp9600",
360
- "egg",
361
- "eol",
362
- "eot",
363
- "epub",
364
- "exe",
365
- "f4v",
366
- "fbs",
367
- "fh",
368
- "fla",
369
- "flac",
370
- "flatpak",
371
- "fli",
372
- "flv",
373
- "fpx",
374
- "fst",
375
- "fvt",
376
- "g3",
377
- "gh",
378
- "gif",
379
- "graffle",
380
- "gz",
381
- "gzip",
382
- "h261",
383
- "h263",
384
- "h264",
385
- "icns",
386
- "ico",
387
- "ief",
388
- "img",
389
- "ipa",
390
- "iso",
391
- "jar",
392
- "jpeg",
393
- "jpg",
394
- "jpgv",
395
- "jpm",
396
- "jxr",
397
- "key",
398
- "ktx",
399
- "lha",
400
- "lib",
401
- "lvp",
402
- "lz",
403
- "lzh",
404
- "lzma",
405
- "lzo",
406
- "m3u",
407
- "m4a",
408
- "m4v",
409
- "mar",
410
- "mdi",
411
- "mht",
412
- "mid",
413
- "midi",
414
- "mj2",
415
- "mka",
416
- "mkv",
417
- "mmr",
418
- "mng",
419
- "mobi",
420
- "mov",
421
- "movie",
422
- "mp3",
423
- "mp4",
424
- "mp4a",
425
- "mpeg",
426
- "mpg",
427
- "mpga",
428
- "mxu",
429
- "nef",
430
- "npx",
431
- "numbers",
432
- "nupkg",
433
- "o",
434
- "odp",
435
- "ods",
436
- "odt",
437
- "oga",
438
- "ogg",
439
- "ogv",
440
- "otf",
441
- "ott",
442
- "pages",
443
- "pbm",
444
- "pcx",
445
- "pdb",
446
- "pdf",
447
- "pea",
448
- "pgm",
449
- "pic",
450
- "png",
451
- "pnm",
452
- "pot",
453
- "potm",
454
- "potx",
455
- "ppa",
456
- "ppam",
457
- "ppm",
458
- "pps",
459
- "ppsm",
460
- "ppsx",
461
- "ppt",
462
- "pptm",
463
- "pptx",
464
- "psd",
465
- "pya",
466
- "pyc",
467
- "pyo",
468
- "pyv",
469
- "qt",
470
- "rar",
471
- "ras",
472
- "raw",
473
- "resources",
474
- "rgb",
475
- "rip",
476
- "rlc",
477
- "rmf",
478
- "rmvb",
479
- "rpm",
480
- "rtf",
481
- "rz",
482
- "s3m",
483
- "s7z",
484
- "scpt",
485
- "sgi",
486
- "shar",
487
- "snap",
488
- "sil",
489
- "sketch",
490
- "slk",
491
- "smv",
492
- "snk",
493
- "so",
494
- "stl",
495
- "suo",
496
- "sub",
497
- "swf",
498
- "tar",
499
- "tbz",
500
- "tbz2",
501
- "tga",
502
- "tgz",
503
- "thmx",
504
- "tif",
505
- "tiff",
506
- "tlz",
507
- "ttc",
508
- "ttf",
509
- "txz",
510
- "udf",
511
- "uvh",
512
- "uvi",
513
- "uvm",
514
- "uvp",
515
- "uvs",
516
- "uvu",
517
- "viv",
518
- "vob",
519
- "war",
520
- "wav",
521
- "wax",
522
- "wbmp",
523
- "wdp",
524
- "weba",
525
- "webm",
526
- "webp",
527
- "whl",
528
- "wim",
529
- "wm",
530
- "wma",
531
- "wmv",
532
- "wmx",
533
- "woff",
534
- "woff2",
535
- "wrm",
536
- "wvx",
537
- "xbm",
538
- "xif",
539
- "xla",
540
- "xlam",
541
- "xls",
542
- "xlsb",
543
- "xlsm",
544
- "xlsx",
545
- "xlt",
546
- "xltm",
547
- "xltx",
548
- "xm",
549
- "xmind",
550
- "xpi",
551
- "xpm",
552
- "xwd",
553
- "xz",
554
- "z",
555
- "zip",
556
- "zipx"
557
- ]);
558
- var isBinaryPath = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (filePath) => binaryExtensions.has(sysPath.extname(filePath).slice(1).toLowerCase()), "isBinaryPath");
559
- var foreach = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (val, fn) => {
560
- if (val instanceof Set) {
561
- val.forEach(fn);
562
- } else {
563
- fn(val);
564
- }
565
- }, "foreach");
566
- var addAndConvert = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (main, prop, item) => {
567
- let container = main[prop];
568
- if (!(container instanceof Set)) {
569
- main[prop] = container = /* @__PURE__ */ new Set([
570
- container
571
- ]);
572
- }
573
- container.add(item);
574
- }, "addAndConvert");
575
- var clearItem = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (cont) => (key) => {
576
- const set = cont[key];
577
- if (set instanceof Set) {
578
- set.clear();
579
- } else {
580
- delete cont[key];
581
- }
582
- }, "clearItem");
583
- var delFromSet = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (main, prop, item) => {
584
- const container = main[prop];
585
- if (container instanceof Set) {
586
- container.delete(item);
587
- } else if (container === item) {
588
- delete main[prop];
589
- }
590
- }, "delFromSet");
591
- var isEmptySet = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (val) => val instanceof Set ? val.size === 0 : !val, "isEmptySet");
592
- var FsWatchInstances = /* @__PURE__ */ new Map();
593
- function createFsWatchInstance(path, options, listener, errHandler, emitRaw) {
594
- const handleEvent = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (rawEvent, evPath) => {
595
- listener(path);
596
- emitRaw(rawEvent, evPath, {
597
- watchedPath: path
598
- });
599
- if (evPath && path !== evPath) {
600
- fsWatchBroadcast(sysPath.resolve(path, evPath), KEY_LISTENERS, sysPath.join(path, evPath));
601
- }
602
- }, "handleEvent");
603
- try {
604
- return _fs.watch.call(void 0, path, {
605
- persistent: options.persistent
606
- }, handleEvent);
607
- } catch (error) {
608
- errHandler(error);
609
- return void 0;
610
- }
611
- }
612
- _chunkPWYAFNCEcjs.__name.call(void 0, createFsWatchInstance, "createFsWatchInstance");
613
- var fsWatchBroadcast = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (fullPath, listenerType, val1, val2, val3) => {
614
- const cont = FsWatchInstances.get(fullPath);
615
- if (!cont) return;
616
- foreach(cont[listenerType], (listener) => {
617
- listener(val1, val2, val3);
618
- });
619
- }, "fsWatchBroadcast");
620
- var setFsWatchListener = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (path, fullPath, options, handlers) => {
621
- const { listener, errHandler, rawEmitter } = handlers;
622
- let cont = FsWatchInstances.get(fullPath);
623
- let watcher;
624
- if (!options.persistent) {
625
- watcher = createFsWatchInstance(path, options, listener, errHandler, rawEmitter);
626
- if (!watcher) return;
627
- return watcher.close.bind(watcher);
628
- }
629
- if (cont) {
630
- addAndConvert(cont, KEY_LISTENERS, listener);
631
- addAndConvert(cont, KEY_ERR, errHandler);
632
- addAndConvert(cont, KEY_RAW, rawEmitter);
633
- } else {
634
- watcher = createFsWatchInstance(path, options, fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS), errHandler, fsWatchBroadcast.bind(null, fullPath, KEY_RAW));
635
- if (!watcher) return;
636
- watcher.on(EV.ERROR, async (error) => {
637
- const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR);
638
- if (cont) cont.watcherUnusable = true;
639
- if (isWindows && error.code === "EPERM") {
640
- try {
641
- const fd = await _promises.open.call(void 0, path, "r");
642
- await fd.close();
643
- broadcastErr(error);
644
- } catch (err) {
645
- }
646
- } else {
647
- broadcastErr(error);
648
- }
649
- });
650
- cont = {
651
- listeners: listener,
652
- errHandlers: errHandler,
653
- rawEmitters: rawEmitter,
654
- watcher
655
- };
656
- FsWatchInstances.set(fullPath, cont);
657
- }
658
- return () => {
659
- delFromSet(cont, KEY_LISTENERS, listener);
660
- delFromSet(cont, KEY_ERR, errHandler);
661
- delFromSet(cont, KEY_RAW, rawEmitter);
662
- if (isEmptySet(cont.listeners)) {
663
- cont.watcher.close();
664
- FsWatchInstances.delete(fullPath);
665
- HANDLER_KEYS.forEach(clearItem(cont));
666
- cont.watcher = void 0;
667
- Object.freeze(cont);
668
- }
669
- };
670
- }, "setFsWatchListener");
671
- var FsWatchFileInstances = /* @__PURE__ */ new Map();
672
- var setFsWatchFileListener = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (path, fullPath, options, handlers) => {
673
- const { listener, rawEmitter } = handlers;
674
- let cont = FsWatchFileInstances.get(fullPath);
675
- const copts = cont && cont.options;
676
- if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) {
677
- _fs.unwatchFile.call(void 0, fullPath);
678
- cont = void 0;
679
- }
680
- if (cont) {
681
- addAndConvert(cont, KEY_LISTENERS, listener);
682
- addAndConvert(cont, KEY_RAW, rawEmitter);
683
- } else {
684
- cont = {
685
- listeners: listener,
686
- rawEmitters: rawEmitter,
687
- options,
688
- watcher: _fs.watchFile.call(void 0, fullPath, options, (curr, prev) => {
689
- foreach(cont.rawEmitters, (rawEmitter2) => {
690
- rawEmitter2(EV.CHANGE, fullPath, {
691
- curr,
692
- prev
693
- });
694
- });
695
- const currmtime = curr.mtimeMs;
696
- if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) {
697
- foreach(cont.listeners, (listener2) => listener2(path, curr));
698
- }
699
- })
700
- };
701
- FsWatchFileInstances.set(fullPath, cont);
702
- }
703
- return () => {
704
- delFromSet(cont, KEY_LISTENERS, listener);
705
- delFromSet(cont, KEY_RAW, rawEmitter);
706
- if (isEmptySet(cont.listeners)) {
707
- FsWatchFileInstances.delete(fullPath);
708
- _fs.unwatchFile.call(void 0, fullPath);
709
- cont.options = cont.watcher = void 0;
710
- Object.freeze(cont);
711
- }
712
- };
713
- }, "setFsWatchFileListener");
714
- var NodeFsHandler = class {
715
- static {
716
- _chunkPWYAFNCEcjs.__name.call(void 0, this, "NodeFsHandler");
717
- }
718
- constructor(fsW) {
719
- this.fsw = fsW;
720
- this._boundHandleError = (error) => fsW._handleError(error);
721
- }
722
- /**
723
- * Watch file for changes with fs_watchFile or fs_watch.
724
- * @param path to file or dir
725
- * @param listener on fs change
726
- * @returns closer for the watcher instance
727
- */
728
- _watchWithNodeFs(path, listener) {
729
- const opts = this.fsw.options;
730
- const directory = sysPath.dirname(path);
731
- const basename3 = sysPath.basename(path);
732
- const parent = this.fsw._getWatchedDir(directory);
733
- parent.add(basename3);
734
- const absolutePath = sysPath.resolve(path);
735
- const options = {
736
- persistent: opts.persistent
737
- };
738
- if (!listener) listener = EMPTY_FN;
739
- let closer;
740
- if (opts.usePolling) {
741
- const enableBin = opts.interval !== opts.binaryInterval;
742
- options.interval = enableBin && isBinaryPath(basename3) ? opts.binaryInterval : opts.interval;
743
- closer = setFsWatchFileListener(path, absolutePath, options, {
744
- listener,
745
- rawEmitter: this.fsw._emitRaw
746
- });
747
- } else {
748
- closer = setFsWatchListener(path, absolutePath, options, {
749
- listener,
750
- errHandler: this._boundHandleError,
751
- rawEmitter: this.fsw._emitRaw
752
- });
753
- }
754
- return closer;
755
- }
756
- /**
757
- * Watch a file and emit add event if warranted.
758
- * @returns closer for the watcher instance
759
- */
760
- _handleFile(file, stats, initialAdd) {
761
- if (this.fsw.closed) {
762
- return;
763
- }
764
- const dirname3 = sysPath.dirname(file);
765
- const basename3 = sysPath.basename(file);
766
- const parent = this.fsw._getWatchedDir(dirname3);
767
- let prevStats = stats;
768
- if (parent.has(basename3)) return;
769
- const listener = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, async (path, newStats) => {
770
- if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return;
771
- if (!newStats || newStats.mtimeMs === 0) {
772
- try {
773
- const newStats2 = await _promises.stat.call(void 0, file);
774
- if (this.fsw.closed) return;
775
- const at = newStats2.atimeMs;
776
- const mt = newStats2.mtimeMs;
777
- if (!at || at <= mt || mt !== prevStats.mtimeMs) {
778
- this.fsw._emit(EV.CHANGE, file, newStats2);
779
- }
780
- if ((isMacos || isLinux || isFreeBSD) && prevStats.ino !== newStats2.ino) {
781
- this.fsw._closeFile(path);
782
- prevStats = newStats2;
783
- const closer2 = this._watchWithNodeFs(file, listener);
784
- if (closer2) this.fsw._addPathCloser(path, closer2);
785
- } else {
786
- prevStats = newStats2;
787
- }
788
- } catch (error) {
789
- this.fsw._remove(dirname3, basename3);
790
- }
791
- } else if (parent.has(basename3)) {
792
- const at = newStats.atimeMs;
793
- const mt = newStats.mtimeMs;
794
- if (!at || at <= mt || mt !== prevStats.mtimeMs) {
795
- this.fsw._emit(EV.CHANGE, file, newStats);
796
- }
797
- prevStats = newStats;
798
- }
799
- }, "listener");
800
- const closer = this._watchWithNodeFs(file, listener);
801
- if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) {
802
- if (!this.fsw._throttle(EV.ADD, file, 0)) return;
803
- this.fsw._emit(EV.ADD, file, stats);
804
- }
805
- return closer;
806
- }
807
- /**
808
- * Handle symlinks encountered while reading a dir.
809
- * @param entry returned by readdirp
810
- * @param directory path of dir being read
811
- * @param path of this item
812
- * @param item basename of this item
813
- * @returns true if no more processing is needed for this entry.
814
- */
815
- async _handleSymlink(entry, directory, path, item) {
816
- if (this.fsw.closed) {
817
- return;
818
- }
819
- const full = entry.fullPath;
820
- const dir = this.fsw._getWatchedDir(directory);
821
- if (!this.fsw.options.followSymlinks) {
822
- this.fsw._incrReadyCount();
823
- let linkPath;
824
- try {
825
- linkPath = await _promises.realpath.call(void 0, path);
826
- } catch (e) {
827
- this.fsw._emitReady();
828
- return true;
829
- }
830
- if (this.fsw.closed) return;
831
- if (dir.has(item)) {
832
- if (this.fsw._symlinkPaths.get(full) !== linkPath) {
833
- this.fsw._symlinkPaths.set(full, linkPath);
834
- this.fsw._emit(EV.CHANGE, path, entry.stats);
835
- }
836
- } else {
837
- dir.add(item);
838
- this.fsw._symlinkPaths.set(full, linkPath);
839
- this.fsw._emit(EV.ADD, path, entry.stats);
840
- }
841
- this.fsw._emitReady();
842
- return true;
843
- }
844
- if (this.fsw._symlinkPaths.has(full)) {
845
- return true;
846
- }
847
- this.fsw._symlinkPaths.set(full, true);
848
- }
849
- _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
850
- directory = sysPath.join(directory, "");
851
- throttler = this.fsw._throttle("readdir", directory, 1e3);
852
- if (!throttler) return;
853
- const previous = this.fsw._getWatchedDir(wh.path);
854
- const current = /* @__PURE__ */ new Set();
855
- let stream = this.fsw._readdirp(directory, {
856
- fileFilter: /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (entry) => wh.filterPath(entry), "fileFilter"),
857
- directoryFilter: /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (entry) => wh.filterDir(entry), "directoryFilter")
858
- });
859
- if (!stream) return;
860
- stream.on(STR_DATA, async (entry) => {
861
- if (this.fsw.closed) {
862
- stream = void 0;
863
- return;
864
- }
865
- const item = entry.path;
866
- let path = sysPath.join(directory, item);
867
- current.add(item);
868
- if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item)) {
869
- return;
870
- }
871
- if (this.fsw.closed) {
872
- stream = void 0;
873
- return;
874
- }
875
- if (item === target || !target && !previous.has(item)) {
876
- this.fsw._incrReadyCount();
877
- path = sysPath.join(dir, sysPath.relative(dir, path));
878
- this._addToNodeFs(path, initialAdd, wh, depth + 1);
879
- }
880
- }).on(EV.ERROR, this._boundHandleError);
881
- return new Promise((resolve3, reject) => {
882
- if (!stream) return reject();
883
- stream.once(STR_END, () => {
884
- if (this.fsw.closed) {
885
- stream = void 0;
886
- return;
887
- }
888
- const wasThrottled = throttler ? throttler.clear() : false;
889
- resolve3(void 0);
890
- previous.getChildren().filter((item) => {
891
- return item !== directory && !current.has(item);
892
- }).forEach((item) => {
893
- this.fsw._remove(directory, item);
894
- });
895
- stream = void 0;
896
- if (wasThrottled) this._handleRead(directory, false, wh, target, dir, depth, throttler);
897
- });
898
- });
899
- }
900
- /**
901
- * Read directory to add / remove files from `@watched` list and re-read it on change.
902
- * @param dir fs path
903
- * @param stats
904
- * @param initialAdd
905
- * @param depth relative to user-supplied path
906
- * @param target child path targeted for watch
907
- * @param wh Common watch helpers for this path
908
- * @param realpath
909
- * @returns closer for the watcher instance.
910
- */
911
- async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath2) {
912
- const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir));
913
- const tracked = parentDir.has(sysPath.basename(dir));
914
- if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) {
915
- this.fsw._emit(EV.ADD_DIR, dir, stats);
916
- }
917
- parentDir.add(sysPath.basename(dir));
918
- this.fsw._getWatchedDir(dir);
919
- let throttler;
920
- let closer;
921
- const oDepth = this.fsw.options.depth;
922
- if ((oDepth == null || depth <= oDepth) && !this.fsw._symlinkPaths.has(realpath2)) {
923
- if (!target) {
924
- await this._handleRead(dir, initialAdd, wh, target, dir, depth, throttler);
925
- if (this.fsw.closed) return;
926
- }
927
- closer = this._watchWithNodeFs(dir, (dirPath, stats2) => {
928
- if (stats2 && stats2.mtimeMs === 0) return;
929
- this._handleRead(dirPath, false, wh, target, dir, depth, throttler);
930
- });
931
- }
932
- return closer;
933
- }
934
- /**
935
- * Handle added file, directory, or glob pattern.
936
- * Delegates call to _handleFile / _handleDir after checks.
937
- * @param path to file or ir
938
- * @param initialAdd was the file added at watch instantiation?
939
- * @param priorWh depth relative to user-supplied path
940
- * @param depth Child path actually targeted for watch
941
- * @param target Child path actually targeted for watch
942
- */
943
- async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
944
- const ready = this.fsw._emitReady;
945
- if (this.fsw._isIgnored(path) || this.fsw.closed) {
946
- ready();
947
- return false;
948
- }
949
- const wh = this.fsw._getWatchHelpers(path);
950
- if (priorWh) {
951
- wh.filterPath = (entry) => priorWh.filterPath(entry);
952
- wh.filterDir = (entry) => priorWh.filterDir(entry);
953
- }
954
- try {
955
- const stats = await statMethods[wh.statMethod](wh.watchPath);
956
- if (this.fsw.closed) return;
957
- if (this.fsw._isIgnored(wh.watchPath, stats)) {
958
- ready();
959
- return false;
960
- }
961
- const follow = this.fsw.options.followSymlinks;
962
- let closer;
963
- if (stats.isDirectory()) {
964
- const absPath = sysPath.resolve(path);
965
- const targetPath = follow ? await _promises.realpath.call(void 0, path) : path;
966
- if (this.fsw.closed) return;
967
- closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
968
- if (this.fsw.closed) return;
969
- if (absPath !== targetPath && targetPath !== void 0) {
970
- this.fsw._symlinkPaths.set(absPath, targetPath);
971
- }
972
- } else if (stats.isSymbolicLink()) {
973
- const targetPath = follow ? await _promises.realpath.call(void 0, path) : path;
974
- if (this.fsw.closed) return;
975
- const parent = sysPath.dirname(wh.watchPath);
976
- this.fsw._getWatchedDir(parent).add(wh.watchPath);
977
- this.fsw._emit(EV.ADD, wh.watchPath, stats);
978
- closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath);
979
- if (this.fsw.closed) return;
980
- if (targetPath !== void 0) {
981
- this.fsw._symlinkPaths.set(sysPath.resolve(path), targetPath);
982
- }
983
- } else {
984
- closer = this._handleFile(wh.watchPath, stats, initialAdd);
985
- }
986
- ready();
987
- if (closer) this.fsw._addPathCloser(path, closer);
988
- return false;
989
- } catch (error) {
990
- if (this.fsw._handleError(error)) {
991
- ready();
992
- return path;
993
- }
994
- }
995
- }
996
- };
997
-
998
- // ../../node_modules/.pnpm/chokidar@4.0.3/node_modules/chokidar/esm/index.js
999
- var SLASH = "/";
1000
- var SLASH_SLASH = "//";
1001
- var ONE_DOT = ".";
1002
- var TWO_DOTS = "..";
1003
- var STRING_TYPE = "string";
1004
- var BACK_SLASH_RE = /\\/g;
1005
- var DOUBLE_SLASH_RE = /\/\//;
1006
- var DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
1007
- var REPLACER_RE = /^\.[/\\]/;
1008
- function arrify(item) {
1009
- return Array.isArray(item) ? item : [
1010
- item
1011
- ];
1012
- }
1013
- _chunkPWYAFNCEcjs.__name.call(void 0, arrify, "arrify");
1014
- var isMatcherObject = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (matcher) => typeof matcher === "object" && matcher !== null && !(matcher instanceof RegExp), "isMatcherObject");
1015
- function createPattern(matcher) {
1016
- if (typeof matcher === "function") return matcher;
1017
- if (typeof matcher === "string") return (string) => matcher === string;
1018
- if (matcher instanceof RegExp) return (string) => matcher.test(string);
1019
- if (typeof matcher === "object" && matcher !== null) {
1020
- return (string) => {
1021
- if (matcher.path === string) return true;
1022
- if (matcher.recursive) {
1023
- const relative3 = sysPath2.relative(matcher.path, string);
1024
- if (!relative3) {
1025
- return false;
1026
- }
1027
- return !relative3.startsWith("..") && !sysPath2.isAbsolute(relative3);
1028
- }
1029
- return false;
1030
- };
1031
- }
1032
- return () => false;
1033
- }
1034
- _chunkPWYAFNCEcjs.__name.call(void 0, createPattern, "createPattern");
1035
- function normalizePath(path) {
1036
- if (typeof path !== "string") throw new Error("string expected");
1037
- path = sysPath2.normalize(path);
1038
- path = path.replace(/\\/g, "/");
1039
- let prepend = false;
1040
- if (path.startsWith("//")) prepend = true;
1041
- const DOUBLE_SLASH_RE2 = /\/\//;
1042
- while (path.match(DOUBLE_SLASH_RE2)) path = path.replace(DOUBLE_SLASH_RE2, "/");
1043
- if (prepend) path = "/" + path;
1044
- return path;
1045
- }
1046
- _chunkPWYAFNCEcjs.__name.call(void 0, normalizePath, "normalizePath");
1047
- function matchPatterns(patterns, testString, stats) {
1048
- const path = normalizePath(testString);
1049
- for (let index = 0; index < patterns.length; index++) {
1050
- const pattern = patterns[index];
1051
- if (pattern(path, stats)) {
1052
- return true;
1053
- }
1054
- }
1055
- return false;
1056
- }
1057
- _chunkPWYAFNCEcjs.__name.call(void 0, matchPatterns, "matchPatterns");
1058
- function anymatch(matchers, testString) {
1059
- if (matchers == null) {
1060
- throw new TypeError("anymatch: specify first argument");
1061
- }
1062
- const matchersArray = arrify(matchers);
1063
- const patterns = matchersArray.map((matcher) => createPattern(matcher));
1064
- if (testString == null) {
1065
- return (testString2, stats) => {
1066
- return matchPatterns(patterns, testString2, stats);
1067
- };
1068
- }
1069
- return matchPatterns(patterns, testString);
1070
- }
1071
- _chunkPWYAFNCEcjs.__name.call(void 0, anymatch, "anymatch");
1072
- var unifyPaths = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (paths_) => {
1073
- const paths = arrify(paths_).flat();
1074
- if (!paths.every((p) => typeof p === STRING_TYPE)) {
1075
- throw new TypeError(`Non-string provided as watch path: ${paths}`);
1076
- }
1077
- return paths.map(normalizePathToUnix);
1078
- }, "unifyPaths");
1079
- var toUnix = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (string) => {
1080
- let str = string.replace(BACK_SLASH_RE, SLASH);
1081
- let prepend = false;
1082
- if (str.startsWith(SLASH_SLASH)) {
1083
- prepend = true;
1084
- }
1085
- while (str.match(DOUBLE_SLASH_RE)) {
1086
- str = str.replace(DOUBLE_SLASH_RE, SLASH);
1087
- }
1088
- if (prepend) {
1089
- str = SLASH + str;
1090
- }
1091
- return str;
1092
- }, "toUnix");
1093
- var normalizePathToUnix = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (path) => toUnix(sysPath2.normalize(toUnix(path))), "normalizePathToUnix");
1094
- var normalizeIgnored = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (cwd = "") => (path) => {
1095
- if (typeof path === "string") {
1096
- return normalizePathToUnix(sysPath2.isAbsolute(path) ? path : sysPath2.join(cwd, path));
1097
- } else {
1098
- return path;
1099
- }
1100
- }, "normalizeIgnored");
1101
- var getAbsolutePath = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (path, cwd) => {
1102
- if (sysPath2.isAbsolute(path)) {
1103
- return path;
1104
- }
1105
- return sysPath2.join(cwd, path);
1106
- }, "getAbsolutePath");
1107
- var EMPTY_SET = Object.freeze(/* @__PURE__ */ new Set());
1108
- var DirEntry = class DirEntry2 {
1109
- static {
1110
- _chunkPWYAFNCEcjs.__name.call(void 0, this, "DirEntry");
1111
- }
1112
- constructor(dir, removeWatcher) {
1113
- this.path = dir;
1114
- this._removeWatcher = removeWatcher;
1115
- this.items = /* @__PURE__ */ new Set();
1116
- }
1117
- add(item) {
1118
- const { items } = this;
1119
- if (!items) return;
1120
- if (item !== ONE_DOT && item !== TWO_DOTS) items.add(item);
1121
- }
1122
- async remove(item) {
1123
- const { items } = this;
1124
- if (!items) return;
1125
- items.delete(item);
1126
- if (items.size > 0) return;
1127
- const dir = this.path;
1128
- try {
1129
- await _promises.readdir.call(void 0, dir);
1130
- } catch (err) {
1131
- if (this._removeWatcher) {
1132
- this._removeWatcher(sysPath2.dirname(dir), sysPath2.basename(dir));
1133
- }
1134
- }
1135
- }
1136
- has(item) {
1137
- const { items } = this;
1138
- if (!items) return;
1139
- return items.has(item);
1140
- }
1141
- getChildren() {
1142
- const { items } = this;
1143
- if (!items) return [];
1144
- return [
1145
- ...items.values()
1146
- ];
1147
- }
1148
- dispose() {
1149
- this.items.clear();
1150
- this.path = "";
1151
- this._removeWatcher = EMPTY_FN;
1152
- this.items = EMPTY_SET;
1153
- Object.freeze(this);
1154
- }
1155
- };
1156
- var STAT_METHOD_F = "stat";
1157
- var STAT_METHOD_L = "lstat";
1158
- var WatchHelper = class {
1159
- static {
1160
- _chunkPWYAFNCEcjs.__name.call(void 0, this, "WatchHelper");
1161
- }
1162
- constructor(path, follow, fsw) {
1163
- this.fsw = fsw;
1164
- const watchPath = path;
1165
- this.path = path = path.replace(REPLACER_RE, "");
1166
- this.watchPath = watchPath;
1167
- this.fullWatchPath = sysPath2.resolve(watchPath);
1168
- this.dirParts = [];
1169
- this.dirParts.forEach((parts) => {
1170
- if (parts.length > 1) parts.pop();
1171
- });
1172
- this.followSymlinks = follow;
1173
- this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L;
1174
- }
1175
- entryPath(entry) {
1176
- return sysPath2.join(this.watchPath, sysPath2.relative(this.watchPath, entry.fullPath));
1177
- }
1178
- filterPath(entry) {
1179
- const { stats } = entry;
1180
- if (stats && stats.isSymbolicLink()) return this.filterDir(entry);
1181
- const resolvedPath = this.entryPath(entry);
1182
- return this.fsw._isntIgnored(resolvedPath, stats) && this.fsw._hasReadPermissions(stats);
1183
- }
1184
- filterDir(entry) {
1185
- return this.fsw._isntIgnored(this.entryPath(entry), entry.stats);
1186
- }
1187
- };
1188
- var FSWatcher = class extends _events.EventEmitter {
1189
- static {
1190
- _chunkPWYAFNCEcjs.__name.call(void 0, this, "FSWatcher");
1191
- }
1192
- // Not indenting methods for history sake; for now.
1193
- constructor(_opts = {}) {
1194
- super();
1195
- this.closed = false;
1196
- this._closers = /* @__PURE__ */ new Map();
1197
- this._ignoredPaths = /* @__PURE__ */ new Set();
1198
- this._throttled = /* @__PURE__ */ new Map();
1199
- this._streams = /* @__PURE__ */ new Set();
1200
- this._symlinkPaths = /* @__PURE__ */ new Map();
1201
- this._watched = /* @__PURE__ */ new Map();
1202
- this._pendingWrites = /* @__PURE__ */ new Map();
1203
- this._pendingUnlinks = /* @__PURE__ */ new Map();
1204
- this._readyCount = 0;
1205
- this._readyEmitted = false;
1206
- const awf = _opts.awaitWriteFinish;
1207
- const DEF_AWF = {
1208
- stabilityThreshold: 2e3,
1209
- pollInterval: 100
1210
- };
1211
- const opts = {
1212
- // Defaults
1213
- persistent: true,
1214
- ignoreInitial: false,
1215
- ignorePermissionErrors: false,
1216
- interval: 100,
1217
- binaryInterval: 300,
1218
- followSymlinks: true,
1219
- usePolling: false,
1220
- // useAsync: false,
1221
- atomic: true,
1222
- ..._opts,
1223
- // Change format
1224
- ignored: _opts.ignored ? arrify(_opts.ignored) : arrify([]),
1225
- awaitWriteFinish: awf === true ? DEF_AWF : typeof awf === "object" ? {
1226
- ...DEF_AWF,
1227
- ...awf
1228
- } : false
1229
- };
1230
- if (isIBMi) opts.usePolling = true;
1231
- if (opts.atomic === void 0) opts.atomic = !opts.usePolling;
1232
- const envPoll = process.env.CHOKIDAR_USEPOLLING;
1233
- if (envPoll !== void 0) {
1234
- const envLower = envPoll.toLowerCase();
1235
- if (envLower === "false" || envLower === "0") opts.usePolling = false;
1236
- else if (envLower === "true" || envLower === "1") opts.usePolling = true;
1237
- else opts.usePolling = !!envLower;
1238
- }
1239
- const envInterval = process.env.CHOKIDAR_INTERVAL;
1240
- if (envInterval) opts.interval = Number.parseInt(envInterval, 10);
1241
- let readyCalls = 0;
1242
- this._emitReady = () => {
1243
- readyCalls++;
1244
- if (readyCalls >= this._readyCount) {
1245
- this._emitReady = EMPTY_FN;
1246
- this._readyEmitted = true;
1247
- process.nextTick(() => this.emit(EVENTS.READY));
1248
- }
1249
- };
1250
- this._emitRaw = (...args) => this.emit(EVENTS.RAW, ...args);
1251
- this._boundRemove = this._remove.bind(this);
1252
- this.options = opts;
1253
- this._nodeFsHandler = new NodeFsHandler(this);
1254
- Object.freeze(opts);
1255
- }
1256
- _addIgnoredPath(matcher) {
1257
- if (isMatcherObject(matcher)) {
1258
- for (const ignored of this._ignoredPaths) {
1259
- if (isMatcherObject(ignored) && ignored.path === matcher.path && ignored.recursive === matcher.recursive) {
1260
- return;
1261
- }
1262
- }
1263
- }
1264
- this._ignoredPaths.add(matcher);
1265
- }
1266
- _removeIgnoredPath(matcher) {
1267
- this._ignoredPaths.delete(matcher);
1268
- if (typeof matcher === "string") {
1269
- for (const ignored of this._ignoredPaths) {
1270
- if (isMatcherObject(ignored) && ignored.path === matcher) {
1271
- this._ignoredPaths.delete(ignored);
1272
- }
1273
- }
1274
- }
1275
- }
1276
- // Public methods
1277
- /**
1278
- * Adds paths to be watched on an existing FSWatcher instance.
1279
- * @param paths_ file or file list. Other arguments are unused
1280
- */
1281
- add(paths_, _origAdd, _internal) {
1282
- const { cwd } = this.options;
1283
- this.closed = false;
1284
- this._closePromise = void 0;
1285
- let paths = unifyPaths(paths_);
1286
- if (cwd) {
1287
- paths = paths.map((path) => {
1288
- const absPath = getAbsolutePath(path, cwd);
1289
- return absPath;
1290
- });
1291
- }
1292
- paths.forEach((path) => {
1293
- this._removeIgnoredPath(path);
1294
- });
1295
- this._userIgnored = void 0;
1296
- if (!this._readyCount) this._readyCount = 0;
1297
- this._readyCount += paths.length;
1298
- Promise.all(paths.map(async (path) => {
1299
- const res = await this._nodeFsHandler._addToNodeFs(path, !_internal, void 0, 0, _origAdd);
1300
- if (res) this._emitReady();
1301
- return res;
1302
- })).then((results) => {
1303
- if (this.closed) return;
1304
- results.forEach((item) => {
1305
- if (item) this.add(sysPath2.dirname(item), sysPath2.basename(_origAdd || item));
1306
- });
1307
- });
1308
- return this;
1309
- }
1310
- /**
1311
- * Close watchers or start ignoring events from specified paths.
1312
- */
1313
- unwatch(paths_) {
1314
- if (this.closed) return this;
1315
- const paths = unifyPaths(paths_);
1316
- const { cwd } = this.options;
1317
- paths.forEach((path) => {
1318
- if (!sysPath2.isAbsolute(path) && !this._closers.has(path)) {
1319
- if (cwd) path = sysPath2.join(cwd, path);
1320
- path = sysPath2.resolve(path);
1321
- }
1322
- this._closePath(path);
1323
- this._addIgnoredPath(path);
1324
- if (this._watched.has(path)) {
1325
- this._addIgnoredPath({
1326
- path,
1327
- recursive: true
1328
- });
1329
- }
1330
- this._userIgnored = void 0;
1331
- });
1332
- return this;
1333
- }
1334
- /**
1335
- * Close watchers and remove all listeners from watched paths.
1336
- */
1337
- close() {
1338
- if (this._closePromise) {
1339
- return this._closePromise;
1340
- }
1341
- this.closed = true;
1342
- this.removeAllListeners();
1343
- const closers = [];
1344
- this._closers.forEach((closerList) => closerList.forEach((closer) => {
1345
- const promise = closer();
1346
- if (promise instanceof Promise) closers.push(promise);
1347
- }));
1348
- this._streams.forEach((stream) => stream.destroy());
1349
- this._userIgnored = void 0;
1350
- this._readyCount = 0;
1351
- this._readyEmitted = false;
1352
- this._watched.forEach((dirent) => dirent.dispose());
1353
- this._closers.clear();
1354
- this._watched.clear();
1355
- this._streams.clear();
1356
- this._symlinkPaths.clear();
1357
- this._throttled.clear();
1358
- this._closePromise = closers.length ? Promise.all(closers).then(() => void 0) : Promise.resolve();
1359
- return this._closePromise;
1360
- }
1361
- /**
1362
- * Expose list of watched paths
1363
- * @returns for chaining
1364
- */
1365
- getWatched() {
1366
- const watchList = {};
1367
- this._watched.forEach((entry, dir) => {
1368
- const key = this.options.cwd ? sysPath2.relative(this.options.cwd, dir) : dir;
1369
- const index = key || ONE_DOT;
1370
- watchList[index] = entry.getChildren().sort();
1371
- });
1372
- return watchList;
1373
- }
1374
- emitWithAll(event, args) {
1375
- this.emit(event, ...args);
1376
- if (event !== EVENTS.ERROR) this.emit(EVENTS.ALL, event, ...args);
1377
- }
1378
- // Common helpers
1379
- // --------------
1380
- /**
1381
- * Normalize and emit events.
1382
- * Calling _emit DOES NOT MEAN emit() would be called!
1383
- * @param event Type of event
1384
- * @param path File or directory path
1385
- * @param stats arguments to be passed with event
1386
- * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag
1387
- */
1388
- async _emit(event, path, stats) {
1389
- if (this.closed) return;
1390
- const opts = this.options;
1391
- if (isWindows) path = sysPath2.normalize(path);
1392
- if (opts.cwd) path = sysPath2.relative(opts.cwd, path);
1393
- const args = [
1394
- path
1395
- ];
1396
- if (stats != null) args.push(stats);
1397
- const awf = opts.awaitWriteFinish;
1398
- let pw;
1399
- if (awf && (pw = this._pendingWrites.get(path))) {
1400
- pw.lastChange = /* @__PURE__ */ new Date();
1401
- return this;
1402
- }
1403
- if (opts.atomic) {
1404
- if (event === EVENTS.UNLINK) {
1405
- this._pendingUnlinks.set(path, [
1406
- event,
1407
- ...args
1408
- ]);
1409
- setTimeout(() => {
1410
- this._pendingUnlinks.forEach((entry, path2) => {
1411
- this.emit(...entry);
1412
- this.emit(EVENTS.ALL, ...entry);
1413
- this._pendingUnlinks.delete(path2);
1414
- });
1415
- }, typeof opts.atomic === "number" ? opts.atomic : 100);
1416
- return this;
1417
- }
1418
- if (event === EVENTS.ADD && this._pendingUnlinks.has(path)) {
1419
- event = EVENTS.CHANGE;
1420
- this._pendingUnlinks.delete(path);
1421
- }
1422
- }
1423
- if (awf && (event === EVENTS.ADD || event === EVENTS.CHANGE) && this._readyEmitted) {
1424
- const awfEmit = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, (err, stats2) => {
1425
- if (err) {
1426
- event = EVENTS.ERROR;
1427
- args[0] = err;
1428
- this.emitWithAll(event, args);
1429
- } else if (stats2) {
1430
- if (args.length > 1) {
1431
- args[1] = stats2;
1432
- } else {
1433
- args.push(stats2);
1434
- }
1435
- this.emitWithAll(event, args);
1436
- }
1437
- }, "awfEmit");
1438
- this._awaitWriteFinish(path, awf.stabilityThreshold, event, awfEmit);
1439
- return this;
1440
- }
1441
- if (event === EVENTS.CHANGE) {
1442
- const isThrottled = !this._throttle(EVENTS.CHANGE, path, 50);
1443
- if (isThrottled) return this;
1444
- }
1445
- if (opts.alwaysStat && stats === void 0 && (event === EVENTS.ADD || event === EVENTS.ADD_DIR || event === EVENTS.CHANGE)) {
1446
- const fullPath = opts.cwd ? sysPath2.join(opts.cwd, path) : path;
1447
- let stats2;
1448
- try {
1449
- stats2 = await _promises.stat.call(void 0, fullPath);
1450
- } catch (err) {
1451
- }
1452
- if (!stats2 || this.closed) return;
1453
- args.push(stats2);
1454
- }
1455
- this.emitWithAll(event, args);
1456
- return this;
1457
- }
1458
- /**
1459
- * Common handler for errors
1460
- * @returns The error if defined, otherwise the value of the FSWatcher instance's `closed` flag
1461
- */
1462
- _handleError(error) {
1463
- const code = error && error.code;
1464
- if (error && code !== "ENOENT" && code !== "ENOTDIR" && (!this.options.ignorePermissionErrors || code !== "EPERM" && code !== "EACCES")) {
1465
- this.emit(EVENTS.ERROR, error);
1466
- }
1467
- return error || this.closed;
1468
- }
1469
- /**
1470
- * Helper utility for throttling
1471
- * @param actionType type being throttled
1472
- * @param path being acted upon
1473
- * @param timeout duration of time to suppress duplicate actions
1474
- * @returns tracking object or false if action should be suppressed
1475
- */
1476
- _throttle(actionType, path, timeout) {
1477
- if (!this._throttled.has(actionType)) {
1478
- this._throttled.set(actionType, /* @__PURE__ */ new Map());
1479
- }
1480
- const action = this._throttled.get(actionType);
1481
- if (!action) throw new Error("invalid throttle");
1482
- const actionPath = action.get(path);
1483
- if (actionPath) {
1484
- actionPath.count++;
1485
- return false;
1486
- }
1487
- let timeoutObject;
1488
- const clear = /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, () => {
1489
- const item = action.get(path);
1490
- const count = item ? item.count : 0;
1491
- action.delete(path);
1492
- clearTimeout(timeoutObject);
1493
- if (item) clearTimeout(item.timeoutObject);
1494
- return count;
1495
- }, "clear");
1496
- timeoutObject = setTimeout(clear, timeout);
1497
- const thr = {
1498
- timeoutObject,
1499
- clear,
1500
- count: 0
1501
- };
1502
- action.set(path, thr);
1503
- return thr;
1504
- }
1505
- _incrReadyCount() {
1506
- return this._readyCount++;
1507
- }
1508
- /**
1509
- * Awaits write operation to finish.
1510
- * Polls a newly created file for size variations. When files size does not change for 'threshold' milliseconds calls callback.
1511
- * @param path being acted upon
1512
- * @param threshold Time in milliseconds a file size must be fixed before acknowledging write OP is finished
1513
- * @param event
1514
- * @param awfEmit Callback to be called when ready for event to be emitted.
1515
- */
1516
- _awaitWriteFinish(path, threshold, event, awfEmit) {
1517
- const awf = this.options.awaitWriteFinish;
1518
- if (typeof awf !== "object") return;
1519
- const pollInterval = awf.pollInterval;
1520
- let timeoutHandler;
1521
- let fullPath = path;
1522
- if (this.options.cwd && !sysPath2.isAbsolute(path)) {
1523
- fullPath = sysPath2.join(this.options.cwd, path);
1524
- }
1525
- const now = /* @__PURE__ */ new Date();
1526
- const writes = this._pendingWrites;
1527
- function awaitWriteFinishFn(prevStat) {
1528
- _fs.stat.call(void 0, fullPath, (err, curStat) => {
1529
- if (err || !writes.has(path)) {
1530
- if (err && err.code !== "ENOENT") awfEmit(err);
1531
- return;
1532
- }
1533
- const now2 = Number(/* @__PURE__ */ new Date());
1534
- if (prevStat && curStat.size !== prevStat.size) {
1535
- writes.get(path).lastChange = now2;
1536
- }
1537
- const pw = writes.get(path);
1538
- const df = now2 - pw.lastChange;
1539
- if (df >= threshold) {
1540
- writes.delete(path);
1541
- awfEmit(void 0, curStat);
1542
- } else {
1543
- timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval, curStat);
1544
- }
1545
- });
1546
- }
1547
- _chunkPWYAFNCEcjs.__name.call(void 0, awaitWriteFinishFn, "awaitWriteFinishFn");
1548
- if (!writes.has(path)) {
1549
- writes.set(path, {
1550
- lastChange: now,
1551
- cancelWait: /* @__PURE__ */ _chunkPWYAFNCEcjs.__name.call(void 0, () => {
1552
- writes.delete(path);
1553
- clearTimeout(timeoutHandler);
1554
- return event;
1555
- }, "cancelWait")
1556
- });
1557
- timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval);
1558
- }
1559
- }
1560
- /**
1561
- * Determines whether user has asked to ignore this path.
1562
- */
1563
- _isIgnored(path, stats) {
1564
- if (this.options.atomic && DOT_RE.test(path)) return true;
1565
- if (!this._userIgnored) {
1566
- const { cwd } = this.options;
1567
- const ign = this.options.ignored;
1568
- const ignored = (ign || []).map(normalizeIgnored(cwd));
1569
- const ignoredPaths = [
1570
- ...this._ignoredPaths
1571
- ];
1572
- const list = [
1573
- ...ignoredPaths.map(normalizeIgnored(cwd)),
1574
- ...ignored
1575
- ];
1576
- this._userIgnored = anymatch(list, void 0);
1577
- }
1578
- return this._userIgnored(path, stats);
1579
- }
1580
- _isntIgnored(path, stat4) {
1581
- return !this._isIgnored(path, stat4);
1582
- }
1583
- /**
1584
- * Provides a set of common helpers and properties relating to symlink handling.
1585
- * @param path file or directory pattern being watched
1586
- */
1587
- _getWatchHelpers(path) {
1588
- return new WatchHelper(path, this.options.followSymlinks, this);
1589
- }
1590
- // Directory helpers
1591
- // -----------------
1592
- /**
1593
- * Provides directory tracking objects
1594
- * @param directory path of the directory
1595
- */
1596
- _getWatchedDir(directory) {
1597
- const dir = sysPath2.resolve(directory);
1598
- if (!this._watched.has(dir)) this._watched.set(dir, new DirEntry(dir, this._boundRemove));
1599
- return this._watched.get(dir);
1600
- }
1601
- // File helpers
1602
- // ------------
1603
- /**
1604
- * Check for read permissions: https://stackoverflow.com/a/11781404/1358405
1605
- */
1606
- _hasReadPermissions(stats) {
1607
- if (this.options.ignorePermissionErrors) return true;
1608
- return Boolean(Number(stats.mode) & 256);
1609
- }
1610
- /**
1611
- * Handles emitting unlink events for
1612
- * files and directories, and via recursion, for
1613
- * files and directories within directories that are unlinked
1614
- * @param directory within which the following item is located
1615
- * @param item base path of item/directory
1616
- */
1617
- _remove(directory, item, isDirectory) {
1618
- const path = sysPath2.join(directory, item);
1619
- const fullPath = sysPath2.resolve(path);
1620
- isDirectory = isDirectory != null ? isDirectory : this._watched.has(path) || this._watched.has(fullPath);
1621
- if (!this._throttle("remove", path, 100)) return;
1622
- if (!isDirectory && this._watched.size === 1) {
1623
- this.add(directory, item, true);
1624
- }
1625
- const wp = this._getWatchedDir(path);
1626
- const nestedDirectoryChildren = wp.getChildren();
1627
- nestedDirectoryChildren.forEach((nested) => this._remove(path, nested));
1628
- const parent = this._getWatchedDir(directory);
1629
- const wasTracked = parent.has(item);
1630
- parent.remove(item);
1631
- if (this._symlinkPaths.has(fullPath)) {
1632
- this._symlinkPaths.delete(fullPath);
1633
- }
1634
- let relPath = path;
1635
- if (this.options.cwd) relPath = sysPath2.relative(this.options.cwd, path);
1636
- if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
1637
- const event = this._pendingWrites.get(relPath).cancelWait();
1638
- if (event === EVENTS.ADD) return;
1639
- }
1640
- this._watched.delete(path);
1641
- this._watched.delete(fullPath);
1642
- const eventName = isDirectory ? EVENTS.UNLINK_DIR : EVENTS.UNLINK;
1643
- if (wasTracked && !this._isIgnored(path)) this._emit(eventName, path);
1644
- this._closePath(path);
1645
- }
1646
- /**
1647
- * Closes all watchers for a path
1648
- */
1649
- _closePath(path) {
1650
- this._closeFile(path);
1651
- const dir = sysPath2.dirname(path);
1652
- this._getWatchedDir(dir).remove(sysPath2.basename(path));
1653
- }
1654
- /**
1655
- * Closes only file-specific watchers
1656
- */
1657
- _closeFile(path) {
1658
- const closers = this._closers.get(path);
1659
- if (!closers) return;
1660
- closers.forEach((closer) => closer());
1661
- this._closers.delete(path);
1662
- }
1663
- _addPathCloser(path, closer) {
1664
- if (!closer) return;
1665
- let list = this._closers.get(path);
1666
- if (!list) {
1667
- list = [];
1668
- this._closers.set(path, list);
1669
- }
1670
- list.push(closer);
1671
- }
1672
- _readdirp(root, opts) {
1673
- if (this.closed) return;
1674
- const options = {
1675
- type: EVENTS.ALL,
1676
- alwaysStat: true,
1677
- lstat: true,
1678
- ...opts,
1679
- depth: 0
1680
- };
1681
- let stream = readdirp(root, options);
1682
- this._streams.add(stream);
1683
- stream.once(STR_CLOSE, () => {
1684
- stream = void 0;
1685
- });
1686
- stream.once(STR_END, () => {
1687
- if (stream) {
1688
- this._streams.delete(stream);
1689
- stream = void 0;
1690
- }
1691
- });
1692
- return stream;
1693
- }
1694
- };
1695
- function watch(paths, options = {}) {
1696
- const watcher = new FSWatcher(options);
1697
- watcher.add(paths);
1698
- return watcher;
1699
- }
1700
- _chunkPWYAFNCEcjs.__name.call(void 0, watch, "watch");
1701
- var esm_default = {
1702
- watch,
1703
- FSWatcher
1704
- };
1705
-
1706
-
1707
-
1708
-
1709
-
1710
- exports.FSWatcher = FSWatcher; exports.WatchHelper = WatchHelper; exports.default = esm_default; exports.watch = watch;
1711
- /*! Bundled license information:
1712
-
1713
- chokidar/esm/index.js:
1714
- (*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) *)
1715
- */