@ttoss/appsync-api 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -6,6 +6,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __commonJS = (cb, mod) => function __require() {
10
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
11
+ };
9
12
  var __copyProps = (to, from, except, desc) => {
10
13
  if (from && typeof from === "object" || typeof from === "function") {
11
14
  for (let key of __getOwnPropNames(from))
@@ -19,15 +22,3705 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
19
22
  mod
20
23
  ));
21
24
 
25
+ // ../../node_modules/is-extglob/index.js
26
+ var require_is_extglob = __commonJS({
27
+ "../../node_modules/is-extglob/index.js"(exports, module2) {
28
+ module2.exports = function isExtglob(str) {
29
+ if (typeof str !== "string" || str === "") {
30
+ return false;
31
+ }
32
+ var match;
33
+ while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str)) {
34
+ if (match[2])
35
+ return true;
36
+ str = str.slice(match.index + match[0].length);
37
+ }
38
+ return false;
39
+ };
40
+ }
41
+ });
42
+
43
+ // ../../node_modules/is-glob/index.js
44
+ var require_is_glob = __commonJS({
45
+ "../../node_modules/is-glob/index.js"(exports, module2) {
46
+ var isExtglob = require_is_extglob();
47
+ var chars = { "{": "}", "(": ")", "[": "]" };
48
+ var strictCheck = function(str) {
49
+ if (str[0] === "!") {
50
+ return true;
51
+ }
52
+ var index = 0;
53
+ var pipeIndex = -2;
54
+ var closeSquareIndex = -2;
55
+ var closeCurlyIndex = -2;
56
+ var closeParenIndex = -2;
57
+ var backSlashIndex = -2;
58
+ while (index < str.length) {
59
+ if (str[index] === "*") {
60
+ return true;
61
+ }
62
+ if (str[index + 1] === "?" && /[\].+)]/.test(str[index])) {
63
+ return true;
64
+ }
65
+ if (closeSquareIndex !== -1 && str[index] === "[" && str[index + 1] !== "]") {
66
+ if (closeSquareIndex < index) {
67
+ closeSquareIndex = str.indexOf("]", index);
68
+ }
69
+ if (closeSquareIndex > index) {
70
+ if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
71
+ return true;
72
+ }
73
+ backSlashIndex = str.indexOf("\\", index);
74
+ if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
75
+ return true;
76
+ }
77
+ }
78
+ }
79
+ if (closeCurlyIndex !== -1 && str[index] === "{" && str[index + 1] !== "}") {
80
+ closeCurlyIndex = str.indexOf("}", index);
81
+ if (closeCurlyIndex > index) {
82
+ backSlashIndex = str.indexOf("\\", index);
83
+ if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) {
84
+ return true;
85
+ }
86
+ }
87
+ }
88
+ if (closeParenIndex !== -1 && str[index] === "(" && str[index + 1] === "?" && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ")") {
89
+ closeParenIndex = str.indexOf(")", index);
90
+ if (closeParenIndex > index) {
91
+ backSlashIndex = str.indexOf("\\", index);
92
+ if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
93
+ return true;
94
+ }
95
+ }
96
+ }
97
+ if (pipeIndex !== -1 && str[index] === "(" && str[index + 1] !== "|") {
98
+ if (pipeIndex < index) {
99
+ pipeIndex = str.indexOf("|", index);
100
+ }
101
+ if (pipeIndex !== -1 && str[pipeIndex + 1] !== ")") {
102
+ closeParenIndex = str.indexOf(")", pipeIndex);
103
+ if (closeParenIndex > pipeIndex) {
104
+ backSlashIndex = str.indexOf("\\", pipeIndex);
105
+ if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
106
+ return true;
107
+ }
108
+ }
109
+ }
110
+ }
111
+ if (str[index] === "\\") {
112
+ var open = str[index + 1];
113
+ index += 2;
114
+ var close = chars[open];
115
+ if (close) {
116
+ var n = str.indexOf(close, index);
117
+ if (n !== -1) {
118
+ index = n + 1;
119
+ }
120
+ }
121
+ if (str[index] === "!") {
122
+ return true;
123
+ }
124
+ } else {
125
+ index++;
126
+ }
127
+ }
128
+ return false;
129
+ };
130
+ var relaxedCheck = function(str) {
131
+ if (str[0] === "!") {
132
+ return true;
133
+ }
134
+ var index = 0;
135
+ while (index < str.length) {
136
+ if (/[*?{}()[\]]/.test(str[index])) {
137
+ return true;
138
+ }
139
+ if (str[index] === "\\") {
140
+ var open = str[index + 1];
141
+ index += 2;
142
+ var close = chars[open];
143
+ if (close) {
144
+ var n = str.indexOf(close, index);
145
+ if (n !== -1) {
146
+ index = n + 1;
147
+ }
148
+ }
149
+ if (str[index] === "!") {
150
+ return true;
151
+ }
152
+ } else {
153
+ index++;
154
+ }
155
+ }
156
+ return false;
157
+ };
158
+ module2.exports = function isGlob(str, options) {
159
+ if (typeof str !== "string" || str === "") {
160
+ return false;
161
+ }
162
+ if (isExtglob(str)) {
163
+ return true;
164
+ }
165
+ var check = strictCheck;
166
+ if (options && options.strict === false) {
167
+ check = relaxedCheck;
168
+ }
169
+ return check(str);
170
+ };
171
+ }
172
+ });
173
+
174
+ // ../../node_modules/parse-passwd/index.js
175
+ var require_parse_passwd = __commonJS({
176
+ "../../node_modules/parse-passwd/index.js"(exports, module2) {
177
+ "use strict";
178
+ module2.exports = function(content) {
179
+ if (typeof content !== "string") {
180
+ throw new Error("expected a string");
181
+ }
182
+ return content.split("\n").map(user).filter(Boolean);
183
+ };
184
+ function user(line, i) {
185
+ if (!line || !line.length || line.charAt(0) === "#") {
186
+ return null;
187
+ }
188
+ var fields = line.split(":");
189
+ return {
190
+ username: fields[0],
191
+ password: fields[1],
192
+ uid: fields[2],
193
+ gid: fields[3],
194
+ gecos: fields[4],
195
+ homedir: fields[5],
196
+ shell: fields[6]
197
+ };
198
+ }
199
+ }
200
+ });
201
+
202
+ // ../../node_modules/homedir-polyfill/polyfill.js
203
+ var require_polyfill = __commonJS({
204
+ "../../node_modules/homedir-polyfill/polyfill.js"(exports, module2) {
205
+ "use strict";
206
+ var fs2 = require("fs");
207
+ var parse = require_parse_passwd();
208
+ function homedir() {
209
+ if (process.platform === "win32") {
210
+ if (process.env.USERPROFILE) {
211
+ return process.env.USERPROFILE;
212
+ }
213
+ if (process.env.HOMEDRIVE && process.env.HOMEPATH) {
214
+ return process.env.HOMEDRIVE + process.env.HOMEPATH;
215
+ }
216
+ if (process.env.HOME) {
217
+ return process.env.HOME;
218
+ }
219
+ return null;
220
+ }
221
+ if (process.env.HOME) {
222
+ return process.env.HOME;
223
+ }
224
+ var passwd = tryReadFileSync("/etc/passwd");
225
+ var home = find(parse(passwd), getuid());
226
+ if (home) {
227
+ return home;
228
+ }
229
+ var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME;
230
+ if (!user) {
231
+ return null;
232
+ }
233
+ if (process.platform === "darwin") {
234
+ return "/Users/" + user;
235
+ }
236
+ return "/home/" + user;
237
+ }
238
+ function find(arr, uid) {
239
+ var len = arr.length;
240
+ for (var i = 0; i < len; i++) {
241
+ if (+arr[i].uid === uid) {
242
+ return arr[i].homedir;
243
+ }
244
+ }
245
+ }
246
+ function getuid() {
247
+ if (typeof process.geteuid === "function") {
248
+ return process.geteuid();
249
+ }
250
+ return process.getuid();
251
+ }
252
+ function tryReadFileSync(fp) {
253
+ try {
254
+ return fs2.readFileSync(fp, "utf8");
255
+ } catch (err) {
256
+ return "";
257
+ }
258
+ }
259
+ module2.exports = homedir;
260
+ }
261
+ });
262
+
263
+ // ../../node_modules/homedir-polyfill/index.js
264
+ var require_homedir_polyfill = __commonJS({
265
+ "../../node_modules/homedir-polyfill/index.js"(exports, module2) {
266
+ "use strict";
267
+ var os = require("os");
268
+ if (typeof os.homedir !== "undefined") {
269
+ module2.exports = os.homedir;
270
+ } else {
271
+ module2.exports = require_polyfill();
272
+ }
273
+ }
274
+ });
275
+
276
+ // ../../node_modules/expand-tilde/index.js
277
+ var require_expand_tilde = __commonJS({
278
+ "../../node_modules/expand-tilde/index.js"(exports, module2) {
279
+ var homedir = require_homedir_polyfill();
280
+ var path = require("path");
281
+ module2.exports = function expandTilde(filepath) {
282
+ var home = homedir();
283
+ if (filepath.charCodeAt(0) === 126) {
284
+ if (filepath.charCodeAt(1) === 43) {
285
+ return path.join(process.cwd(), filepath.slice(2));
286
+ }
287
+ return home ? path.join(home, filepath.slice(1)) : filepath;
288
+ }
289
+ return filepath;
290
+ };
291
+ }
292
+ });
293
+
294
+ // ../../node_modules/ini/ini.js
295
+ var require_ini = __commonJS({
296
+ "../../node_modules/ini/ini.js"(exports) {
297
+ exports.parse = exports.decode = decode;
298
+ exports.stringify = exports.encode = encode;
299
+ exports.safe = safe;
300
+ exports.unsafe = unsafe;
301
+ var eol = typeof process !== "undefined" && process.platform === "win32" ? "\r\n" : "\n";
302
+ function encode(obj, opt) {
303
+ var children = [];
304
+ var out = "";
305
+ if (typeof opt === "string") {
306
+ opt = {
307
+ section: opt,
308
+ whitespace: false
309
+ };
310
+ } else {
311
+ opt = opt || {};
312
+ opt.whitespace = opt.whitespace === true;
313
+ }
314
+ var separator = opt.whitespace ? " = " : "=";
315
+ Object.keys(obj).forEach(function(k, _, __) {
316
+ var val = obj[k];
317
+ if (val && Array.isArray(val)) {
318
+ val.forEach(function(item) {
319
+ out += safe(k + "[]") + separator + safe(item) + "\n";
320
+ });
321
+ } else if (val && typeof val === "object")
322
+ children.push(k);
323
+ else
324
+ out += safe(k) + separator + safe(val) + eol;
325
+ });
326
+ if (opt.section && out.length)
327
+ out = "[" + safe(opt.section) + "]" + eol + out;
328
+ children.forEach(function(k, _, __) {
329
+ var nk = dotSplit(k).join("\\.");
330
+ var section = (opt.section ? opt.section + "." : "") + nk;
331
+ var child = encode(obj[k], {
332
+ section,
333
+ whitespace: opt.whitespace
334
+ });
335
+ if (out.length && child.length)
336
+ out += eol;
337
+ out += child;
338
+ });
339
+ return out;
340
+ }
341
+ function dotSplit(str) {
342
+ return str.replace(/\1/g, "LITERAL\\1LITERAL").replace(/\\\./g, "").split(/\./).map(function(part) {
343
+ return part.replace(/\1/g, "\\.").replace(/\2LITERAL\\1LITERAL\2/g, "");
344
+ });
345
+ }
346
+ function decode(str) {
347
+ var out = {};
348
+ var p = out;
349
+ var section = null;
350
+ var re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;
351
+ var lines = str.split(/[\r\n]+/g);
352
+ lines.forEach(function(line, _, __) {
353
+ if (!line || line.match(/^\s*[;#]/))
354
+ return;
355
+ var match = line.match(re);
356
+ if (!match)
357
+ return;
358
+ if (match[1] !== void 0) {
359
+ section = unsafe(match[1]);
360
+ if (section === "__proto__") {
361
+ p = {};
362
+ return;
363
+ }
364
+ p = out[section] = out[section] || {};
365
+ return;
366
+ }
367
+ var key = unsafe(match[2]);
368
+ if (key === "__proto__")
369
+ return;
370
+ var value = match[3] ? unsafe(match[4]) : true;
371
+ switch (value) {
372
+ case "true":
373
+ case "false":
374
+ case "null":
375
+ value = JSON.parse(value);
376
+ }
377
+ if (key.length > 2 && key.slice(-2) === "[]") {
378
+ key = key.substring(0, key.length - 2);
379
+ if (key === "__proto__")
380
+ return;
381
+ if (!p[key])
382
+ p[key] = [];
383
+ else if (!Array.isArray(p[key]))
384
+ p[key] = [p[key]];
385
+ }
386
+ if (Array.isArray(p[key]))
387
+ p[key].push(value);
388
+ else
389
+ p[key] = value;
390
+ });
391
+ Object.keys(out).filter(function(k, _, __) {
392
+ if (!out[k] || typeof out[k] !== "object" || Array.isArray(out[k]))
393
+ return false;
394
+ var parts = dotSplit(k);
395
+ var p2 = out;
396
+ var l = parts.pop();
397
+ var nl = l.replace(/\\\./g, ".");
398
+ parts.forEach(function(part, _2, __2) {
399
+ if (part === "__proto__")
400
+ return;
401
+ if (!p2[part] || typeof p2[part] !== "object")
402
+ p2[part] = {};
403
+ p2 = p2[part];
404
+ });
405
+ if (p2 === out && nl === l)
406
+ return false;
407
+ p2[nl] = out[k];
408
+ return true;
409
+ }).forEach(function(del, _, __) {
410
+ delete out[del];
411
+ });
412
+ return out;
413
+ }
414
+ function isQuoted(val) {
415
+ return val.charAt(0) === '"' && val.slice(-1) === '"' || val.charAt(0) === "'" && val.slice(-1) === "'";
416
+ }
417
+ function safe(val) {
418
+ return typeof val !== "string" || val.match(/[=\r\n]/) || val.match(/^\[/) || val.length > 1 && isQuoted(val) || val !== val.trim() ? JSON.stringify(val) : val.replace(/;/g, "\\;").replace(/#/g, "\\#");
419
+ }
420
+ function unsafe(val, doUnesc) {
421
+ val = (val || "").trim();
422
+ if (isQuoted(val)) {
423
+ if (val.charAt(0) === "'")
424
+ val = val.substr(1, val.length - 2);
425
+ try {
426
+ val = JSON.parse(val);
427
+ } catch (_) {
428
+ }
429
+ } else {
430
+ var esc = false;
431
+ var unesc = "";
432
+ for (var i = 0, l = val.length; i < l; i++) {
433
+ var c = val.charAt(i);
434
+ if (esc) {
435
+ if ("\\;#".indexOf(c) !== -1)
436
+ unesc += c;
437
+ else
438
+ unesc += "\\" + c;
439
+ esc = false;
440
+ } else if (";#".indexOf(c) !== -1)
441
+ break;
442
+ else if (c === "\\")
443
+ esc = true;
444
+ else
445
+ unesc += c;
446
+ }
447
+ if (esc)
448
+ unesc += "\\";
449
+ return unesc.trim();
450
+ }
451
+ return val;
452
+ }
453
+ }
454
+ });
455
+
456
+ // ../../node_modules/is-windows/index.js
457
+ var require_is_windows = __commonJS({
458
+ "../../node_modules/is-windows/index.js"(exports, module2) {
459
+ (function(factory) {
460
+ if (exports && typeof exports === "object" && typeof module2 !== "undefined") {
461
+ module2.exports = factory();
462
+ } else if (typeof define === "function" && define.amd) {
463
+ define([], factory);
464
+ } else if (typeof window !== "undefined") {
465
+ window.isWindows = factory();
466
+ } else if (typeof global !== "undefined") {
467
+ global.isWindows = factory();
468
+ } else if (typeof self !== "undefined") {
469
+ self.isWindows = factory();
470
+ } else {
471
+ this.isWindows = factory();
472
+ }
473
+ })(function() {
474
+ "use strict";
475
+ return function isWindows() {
476
+ return process && (process.platform === "win32" || /^(msys|cygwin)$/.test(process.env.OSTYPE));
477
+ };
478
+ });
479
+ }
480
+ });
481
+
482
+ // ../../node_modules/isexe/windows.js
483
+ var require_windows = __commonJS({
484
+ "../../node_modules/isexe/windows.js"(exports, module2) {
485
+ module2.exports = isexe;
486
+ isexe.sync = sync;
487
+ var fs2 = require("fs");
488
+ function checkPathExt(path, options) {
489
+ var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
490
+ if (!pathext) {
491
+ return true;
492
+ }
493
+ pathext = pathext.split(";");
494
+ if (pathext.indexOf("") !== -1) {
495
+ return true;
496
+ }
497
+ for (var i = 0; i < pathext.length; i++) {
498
+ var p = pathext[i].toLowerCase();
499
+ if (p && path.substr(-p.length).toLowerCase() === p) {
500
+ return true;
501
+ }
502
+ }
503
+ return false;
504
+ }
505
+ function checkStat(stat, path, options) {
506
+ if (!stat.isSymbolicLink() && !stat.isFile()) {
507
+ return false;
508
+ }
509
+ return checkPathExt(path, options);
510
+ }
511
+ function isexe(path, options, cb) {
512
+ fs2.stat(path, function(er, stat) {
513
+ cb(er, er ? false : checkStat(stat, path, options));
514
+ });
515
+ }
516
+ function sync(path, options) {
517
+ return checkStat(fs2.statSync(path), path, options);
518
+ }
519
+ }
520
+ });
521
+
522
+ // ../../node_modules/isexe/mode.js
523
+ var require_mode = __commonJS({
524
+ "../../node_modules/isexe/mode.js"(exports, module2) {
525
+ module2.exports = isexe;
526
+ isexe.sync = sync;
527
+ var fs2 = require("fs");
528
+ function isexe(path, options, cb) {
529
+ fs2.stat(path, function(er, stat) {
530
+ cb(er, er ? false : checkStat(stat, options));
531
+ });
532
+ }
533
+ function sync(path, options) {
534
+ return checkStat(fs2.statSync(path), options);
535
+ }
536
+ function checkStat(stat, options) {
537
+ return stat.isFile() && checkMode(stat, options);
538
+ }
539
+ function checkMode(stat, options) {
540
+ var mod = stat.mode;
541
+ var uid = stat.uid;
542
+ var gid = stat.gid;
543
+ var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
544
+ var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
545
+ var u = parseInt("100", 8);
546
+ var g = parseInt("010", 8);
547
+ var o = parseInt("001", 8);
548
+ var ug = u | g;
549
+ var ret = mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0;
550
+ return ret;
551
+ }
552
+ }
553
+ });
554
+
555
+ // ../../node_modules/isexe/index.js
556
+ var require_isexe = __commonJS({
557
+ "../../node_modules/isexe/index.js"(exports, module2) {
558
+ var fs2 = require("fs");
559
+ var core;
560
+ if (process.platform === "win32" || global.TESTING_WINDOWS) {
561
+ core = require_windows();
562
+ } else {
563
+ core = require_mode();
564
+ }
565
+ module2.exports = isexe;
566
+ isexe.sync = sync;
567
+ function isexe(path, options, cb) {
568
+ if (typeof options === "function") {
569
+ cb = options;
570
+ options = {};
571
+ }
572
+ if (!cb) {
573
+ if (typeof Promise !== "function") {
574
+ throw new TypeError("callback not provided");
575
+ }
576
+ return new Promise(function(resolve, reject) {
577
+ isexe(path, options || {}, function(er, is) {
578
+ if (er) {
579
+ reject(er);
580
+ } else {
581
+ resolve(is);
582
+ }
583
+ });
584
+ });
585
+ }
586
+ core(path, options || {}, function(er, is) {
587
+ if (er) {
588
+ if (er.code === "EACCES" || options && options.ignoreErrors) {
589
+ er = null;
590
+ is = false;
591
+ }
592
+ }
593
+ cb(er, is);
594
+ });
595
+ }
596
+ function sync(path, options) {
597
+ try {
598
+ return core.sync(path, options || {});
599
+ } catch (er) {
600
+ if (options && options.ignoreErrors || er.code === "EACCES") {
601
+ return false;
602
+ } else {
603
+ throw er;
604
+ }
605
+ }
606
+ }
607
+ }
608
+ });
609
+
610
+ // ../../node_modules/which/which.js
611
+ var require_which = __commonJS({
612
+ "../../node_modules/which/which.js"(exports, module2) {
613
+ module2.exports = which;
614
+ which.sync = whichSync;
615
+ var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
616
+ var path = require("path");
617
+ var COLON = isWindows ? ";" : ":";
618
+ var isexe = require_isexe();
619
+ function getNotFoundError(cmd) {
620
+ var er = new Error("not found: " + cmd);
621
+ er.code = "ENOENT";
622
+ return er;
623
+ }
624
+ function getPathInfo(cmd, opt) {
625
+ var colon = opt.colon || COLON;
626
+ var pathEnv = opt.path || process.env.PATH || "";
627
+ var pathExt = [""];
628
+ pathEnv = pathEnv.split(colon);
629
+ var pathExtExe = "";
630
+ if (isWindows) {
631
+ pathEnv.unshift(process.cwd());
632
+ pathExtExe = opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM";
633
+ pathExt = pathExtExe.split(colon);
634
+ if (cmd.indexOf(".") !== -1 && pathExt[0] !== "")
635
+ pathExt.unshift("");
636
+ }
637
+ if (cmd.match(/\//) || isWindows && cmd.match(/\\/))
638
+ pathEnv = [""];
639
+ return {
640
+ env: pathEnv,
641
+ ext: pathExt,
642
+ extExe: pathExtExe
643
+ };
644
+ }
645
+ function which(cmd, opt, cb) {
646
+ if (typeof opt === "function") {
647
+ cb = opt;
648
+ opt = {};
649
+ }
650
+ var info = getPathInfo(cmd, opt);
651
+ var pathEnv = info.env;
652
+ var pathExt = info.ext;
653
+ var pathExtExe = info.extExe;
654
+ var found = [];
655
+ (function F(i, l) {
656
+ if (i === l) {
657
+ if (opt.all && found.length)
658
+ return cb(null, found);
659
+ else
660
+ return cb(getNotFoundError(cmd));
661
+ }
662
+ var pathPart = pathEnv[i];
663
+ if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
664
+ pathPart = pathPart.slice(1, -1);
665
+ var p = path.join(pathPart, cmd);
666
+ if (!pathPart && /^\.[\\\/]/.test(cmd)) {
667
+ p = cmd.slice(0, 2) + p;
668
+ }
669
+ ;
670
+ (function E(ii, ll) {
671
+ if (ii === ll)
672
+ return F(i + 1, l);
673
+ var ext = pathExt[ii];
674
+ isexe(p + ext, { pathExt: pathExtExe }, function(er, is) {
675
+ if (!er && is) {
676
+ if (opt.all)
677
+ found.push(p + ext);
678
+ else
679
+ return cb(null, p + ext);
680
+ }
681
+ return E(ii + 1, ll);
682
+ });
683
+ })(0, pathExt.length);
684
+ })(0, pathEnv.length);
685
+ }
686
+ function whichSync(cmd, opt) {
687
+ opt = opt || {};
688
+ var info = getPathInfo(cmd, opt);
689
+ var pathEnv = info.env;
690
+ var pathExt = info.ext;
691
+ var pathExtExe = info.extExe;
692
+ var found = [];
693
+ for (var i = 0, l = pathEnv.length; i < l; i++) {
694
+ var pathPart = pathEnv[i];
695
+ if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
696
+ pathPart = pathPart.slice(1, -1);
697
+ var p = path.join(pathPart, cmd);
698
+ if (!pathPart && /^\.[\\\/]/.test(cmd)) {
699
+ p = cmd.slice(0, 2) + p;
700
+ }
701
+ for (var j = 0, ll = pathExt.length; j < ll; j++) {
702
+ var cur = p + pathExt[j];
703
+ var is;
704
+ try {
705
+ is = isexe.sync(cur, { pathExt: pathExtExe });
706
+ if (is) {
707
+ if (opt.all)
708
+ found.push(cur);
709
+ else
710
+ return cur;
711
+ }
712
+ } catch (ex) {
713
+ }
714
+ }
715
+ }
716
+ if (opt.all && found.length)
717
+ return found;
718
+ if (opt.nothrow)
719
+ return null;
720
+ throw getNotFoundError(cmd);
721
+ }
722
+ }
723
+ });
724
+
725
+ // ../../node_modules/global-prefix/index.js
726
+ var require_global_prefix = __commonJS({
727
+ "../../node_modules/global-prefix/index.js"(exports, module2) {
728
+ "use strict";
729
+ var fs2 = require("fs");
730
+ var path = require("path");
731
+ var expand = require_expand_tilde();
732
+ var homedir = require_homedir_polyfill();
733
+ var ini = require_ini();
734
+ var prefix;
735
+ function getPrefix() {
736
+ if (process.env.PREFIX) {
737
+ prefix = process.env.PREFIX;
738
+ } else {
739
+ var home = homedir();
740
+ if (home) {
741
+ var userConfig = path.resolve(home, ".npmrc");
742
+ prefix = tryConfigPath(userConfig);
743
+ }
744
+ if (!prefix) {
745
+ var npm = tryNpmPath();
746
+ if (npm) {
747
+ var builtinConfig = path.resolve(npm, "..", "..", "npmrc");
748
+ prefix = tryConfigPath(builtinConfig);
749
+ if (prefix) {
750
+ var globalConfig = path.resolve(prefix, "etc", "npmrc");
751
+ prefix = tryConfigPath(globalConfig) || prefix;
752
+ }
753
+ }
754
+ if (!prefix)
755
+ fallback();
756
+ }
757
+ }
758
+ if (prefix) {
759
+ return expand(prefix);
760
+ }
761
+ }
762
+ function fallback() {
763
+ var isWindows = require_is_windows();
764
+ if (isWindows()) {
765
+ prefix = process.env.APPDATA ? path.join(process.env.APPDATA, "npm") : path.dirname(process.execPath);
766
+ } else {
767
+ prefix = path.dirname(path.dirname(process.execPath));
768
+ if (process.env.DESTDIR) {
769
+ prefix = path.join(process.env.DESTDIR, prefix);
770
+ }
771
+ }
772
+ }
773
+ function tryNpmPath() {
774
+ try {
775
+ return fs2.realpathSync(require_which().sync("npm"));
776
+ } catch (err) {
777
+ }
778
+ return null;
779
+ }
780
+ function tryConfigPath(configPath) {
781
+ try {
782
+ var data = fs2.readFileSync(configPath, "utf-8");
783
+ var config = ini.parse(data);
784
+ if (config.prefix)
785
+ return config.prefix;
786
+ } catch (err) {
787
+ }
788
+ return null;
789
+ }
790
+ Object.defineProperty(module2, "exports", {
791
+ enumerable: true,
792
+ get: function() {
793
+ return prefix || (prefix = getPrefix());
794
+ }
795
+ });
796
+ }
797
+ });
798
+
799
+ // ../../node_modules/global-modules/index.js
800
+ var require_global_modules = __commonJS({
801
+ "../../node_modules/global-modules/index.js"(exports, module2) {
802
+ "use strict";
803
+ var path = require("path");
804
+ var prefix = require_global_prefix();
805
+ var isWindows = require_is_windows();
806
+ var gm;
807
+ function getPath() {
808
+ if (isWindows()) {
809
+ return path.resolve(prefix, "node_modules");
810
+ }
811
+ return path.resolve(prefix, "lib/node_modules");
812
+ }
813
+ Object.defineProperty(module2, "exports", {
814
+ enumerable: true,
815
+ get: function() {
816
+ return gm || (gm = getPath());
817
+ }
818
+ });
819
+ }
820
+ });
821
+
822
+ // ../../node_modules/resolve-dir/index.js
823
+ var require_resolve_dir = __commonJS({
824
+ "../../node_modules/resolve-dir/index.js"(exports, module2) {
825
+ "use strict";
826
+ var path = require("path");
827
+ var expand = require_expand_tilde();
828
+ var gm = require_global_modules();
829
+ module2.exports = function resolveDir(dir) {
830
+ if (dir.charAt(0) === "~") {
831
+ dir = expand(dir);
832
+ }
833
+ if (dir.charAt(0) === "@") {
834
+ dir = path.join(gm, dir.slice(1));
835
+ }
836
+ return dir;
837
+ };
838
+ }
839
+ });
840
+
841
+ // ../../node_modules/detect-file/index.js
842
+ var require_detect_file = __commonJS({
843
+ "../../node_modules/detect-file/index.js"(exports, module2) {
844
+ "use strict";
845
+ var fs2 = require("fs");
846
+ var path = require("path");
847
+ module2.exports = function detect(filepath, options) {
848
+ if (!filepath || typeof filepath !== "string") {
849
+ return null;
850
+ }
851
+ if (fs2.existsSync(filepath)) {
852
+ return path.resolve(filepath);
853
+ }
854
+ options = options || {};
855
+ if (options.nocase === true) {
856
+ return nocase(filepath);
857
+ }
858
+ return null;
859
+ };
860
+ function nocase(filepath) {
861
+ filepath = path.resolve(filepath);
862
+ var res = tryReaddir(filepath);
863
+ if (res === null) {
864
+ return null;
865
+ }
866
+ if (res.path === filepath) {
867
+ return res.path;
868
+ }
869
+ var upper = filepath.toUpperCase();
870
+ var len = res.files.length;
871
+ var idx = -1;
872
+ while (++idx < len) {
873
+ var fp = path.resolve(res.path, res.files[idx]);
874
+ if (filepath === fp || upper === fp) {
875
+ return fp;
876
+ }
877
+ var fpUpper = fp.toUpperCase();
878
+ if (filepath === fpUpper || upper === fpUpper) {
879
+ return fp;
880
+ }
881
+ }
882
+ return null;
883
+ }
884
+ function tryReaddir(filepath) {
885
+ var ctx = { path: filepath, files: [] };
886
+ try {
887
+ ctx.files = fs2.readdirSync(filepath);
888
+ return ctx;
889
+ } catch (err) {
890
+ }
891
+ try {
892
+ ctx.path = path.dirname(filepath);
893
+ ctx.files = fs2.readdirSync(ctx.path);
894
+ return ctx;
895
+ } catch (err) {
896
+ }
897
+ return null;
898
+ }
899
+ }
900
+ });
901
+
902
+ // ../../node_modules/micromatch/node_modules/braces/lib/utils.js
903
+ var require_utils = __commonJS({
904
+ "../../node_modules/micromatch/node_modules/braces/lib/utils.js"(exports) {
905
+ "use strict";
906
+ exports.isInteger = (num) => {
907
+ if (typeof num === "number") {
908
+ return Number.isInteger(num);
909
+ }
910
+ if (typeof num === "string" && num.trim() !== "") {
911
+ return Number.isInteger(Number(num));
912
+ }
913
+ return false;
914
+ };
915
+ exports.find = (node, type) => node.nodes.find((node2) => node2.type === type);
916
+ exports.exceedsLimit = (min, max, step = 1, limit) => {
917
+ if (limit === false)
918
+ return false;
919
+ if (!exports.isInteger(min) || !exports.isInteger(max))
920
+ return false;
921
+ return (Number(max) - Number(min)) / Number(step) >= limit;
922
+ };
923
+ exports.escapeNode = (block, n = 0, type) => {
924
+ let node = block.nodes[n];
925
+ if (!node)
926
+ return;
927
+ if (type && node.type === type || node.type === "open" || node.type === "close") {
928
+ if (node.escaped !== true) {
929
+ node.value = "\\" + node.value;
930
+ node.escaped = true;
931
+ }
932
+ }
933
+ };
934
+ exports.encloseBrace = (node) => {
935
+ if (node.type !== "brace")
936
+ return false;
937
+ if (node.commas >> 0 + node.ranges >> 0 === 0) {
938
+ node.invalid = true;
939
+ return true;
940
+ }
941
+ return false;
942
+ };
943
+ exports.isInvalidBrace = (block) => {
944
+ if (block.type !== "brace")
945
+ return false;
946
+ if (block.invalid === true || block.dollar)
947
+ return true;
948
+ if (block.commas >> 0 + block.ranges >> 0 === 0) {
949
+ block.invalid = true;
950
+ return true;
951
+ }
952
+ if (block.open !== true || block.close !== true) {
953
+ block.invalid = true;
954
+ return true;
955
+ }
956
+ return false;
957
+ };
958
+ exports.isOpenOrClose = (node) => {
959
+ if (node.type === "open" || node.type === "close") {
960
+ return true;
961
+ }
962
+ return node.open === true || node.close === true;
963
+ };
964
+ exports.reduce = (nodes) => nodes.reduce((acc, node) => {
965
+ if (node.type === "text")
966
+ acc.push(node.value);
967
+ if (node.type === "range")
968
+ node.type = "text";
969
+ return acc;
970
+ }, []);
971
+ exports.flatten = (...args) => {
972
+ const result = [];
973
+ const flat = (arr) => {
974
+ for (let i = 0; i < arr.length; i++) {
975
+ let ele = arr[i];
976
+ Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele);
977
+ }
978
+ return result;
979
+ };
980
+ flat(args);
981
+ return result;
982
+ };
983
+ }
984
+ });
985
+
986
+ // ../../node_modules/micromatch/node_modules/braces/lib/stringify.js
987
+ var require_stringify = __commonJS({
988
+ "../../node_modules/micromatch/node_modules/braces/lib/stringify.js"(exports, module2) {
989
+ "use strict";
990
+ var utils = require_utils();
991
+ module2.exports = (ast, options = {}) => {
992
+ let stringify = (node, parent = {}) => {
993
+ let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
994
+ let invalidNode = node.invalid === true && options.escapeInvalid === true;
995
+ let output = "";
996
+ if (node.value) {
997
+ if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
998
+ return "\\" + node.value;
999
+ }
1000
+ return node.value;
1001
+ }
1002
+ if (node.value) {
1003
+ return node.value;
1004
+ }
1005
+ if (node.nodes) {
1006
+ for (let child of node.nodes) {
1007
+ output += stringify(child);
1008
+ }
1009
+ }
1010
+ return output;
1011
+ };
1012
+ return stringify(ast);
1013
+ };
1014
+ }
1015
+ });
1016
+
1017
+ // ../../node_modules/micromatch/node_modules/is-number/index.js
1018
+ var require_is_number = __commonJS({
1019
+ "../../node_modules/micromatch/node_modules/is-number/index.js"(exports, module2) {
1020
+ "use strict";
1021
+ module2.exports = function(num) {
1022
+ if (typeof num === "number") {
1023
+ return num - num === 0;
1024
+ }
1025
+ if (typeof num === "string" && num.trim() !== "") {
1026
+ return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
1027
+ }
1028
+ return false;
1029
+ };
1030
+ }
1031
+ });
1032
+
1033
+ // ../../node_modules/micromatch/node_modules/to-regex-range/index.js
1034
+ var require_to_regex_range = __commonJS({
1035
+ "../../node_modules/micromatch/node_modules/to-regex-range/index.js"(exports, module2) {
1036
+ "use strict";
1037
+ var isNumber = require_is_number();
1038
+ var toRegexRange = (min, max, options) => {
1039
+ if (isNumber(min) === false) {
1040
+ throw new TypeError("toRegexRange: expected the first argument to be a number");
1041
+ }
1042
+ if (max === void 0 || min === max) {
1043
+ return String(min);
1044
+ }
1045
+ if (isNumber(max) === false) {
1046
+ throw new TypeError("toRegexRange: expected the second argument to be a number.");
1047
+ }
1048
+ let opts = { relaxZeros: true, ...options };
1049
+ if (typeof opts.strictZeros === "boolean") {
1050
+ opts.relaxZeros = opts.strictZeros === false;
1051
+ }
1052
+ let relax = String(opts.relaxZeros);
1053
+ let shorthand = String(opts.shorthand);
1054
+ let capture = String(opts.capture);
1055
+ let wrap = String(opts.wrap);
1056
+ let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap;
1057
+ if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
1058
+ return toRegexRange.cache[cacheKey].result;
1059
+ }
1060
+ let a = Math.min(min, max);
1061
+ let b = Math.max(min, max);
1062
+ if (Math.abs(a - b) === 1) {
1063
+ let result = min + "|" + max;
1064
+ if (opts.capture) {
1065
+ return `(${result})`;
1066
+ }
1067
+ if (opts.wrap === false) {
1068
+ return result;
1069
+ }
1070
+ return `(?:${result})`;
1071
+ }
1072
+ let isPadded = hasPadding(min) || hasPadding(max);
1073
+ let state = { min, max, a, b };
1074
+ let positives = [];
1075
+ let negatives = [];
1076
+ if (isPadded) {
1077
+ state.isPadded = isPadded;
1078
+ state.maxLen = String(state.max).length;
1079
+ }
1080
+ if (a < 0) {
1081
+ let newMin = b < 0 ? Math.abs(b) : 1;
1082
+ negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
1083
+ a = state.a = 0;
1084
+ }
1085
+ if (b >= 0) {
1086
+ positives = splitToPatterns(a, b, state, opts);
1087
+ }
1088
+ state.negatives = negatives;
1089
+ state.positives = positives;
1090
+ state.result = collatePatterns(negatives, positives, opts);
1091
+ if (opts.capture === true) {
1092
+ state.result = `(${state.result})`;
1093
+ } else if (opts.wrap !== false && positives.length + negatives.length > 1) {
1094
+ state.result = `(?:${state.result})`;
1095
+ }
1096
+ toRegexRange.cache[cacheKey] = state;
1097
+ return state.result;
1098
+ };
1099
+ function collatePatterns(neg, pos, options) {
1100
+ let onlyNegative = filterPatterns(neg, pos, "-", false, options) || [];
1101
+ let onlyPositive = filterPatterns(pos, neg, "", false, options) || [];
1102
+ let intersected = filterPatterns(neg, pos, "-?", true, options) || [];
1103
+ let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
1104
+ return subpatterns.join("|");
1105
+ }
1106
+ function splitToRanges(min, max) {
1107
+ let nines = 1;
1108
+ let zeros = 1;
1109
+ let stop = countNines(min, nines);
1110
+ let stops = /* @__PURE__ */ new Set([max]);
1111
+ while (min <= stop && stop <= max) {
1112
+ stops.add(stop);
1113
+ nines += 1;
1114
+ stop = countNines(min, nines);
1115
+ }
1116
+ stop = countZeros(max + 1, zeros) - 1;
1117
+ while (min < stop && stop <= max) {
1118
+ stops.add(stop);
1119
+ zeros += 1;
1120
+ stop = countZeros(max + 1, zeros) - 1;
1121
+ }
1122
+ stops = [...stops];
1123
+ stops.sort(compare);
1124
+ return stops;
1125
+ }
1126
+ function rangeToPattern(start, stop, options) {
1127
+ if (start === stop) {
1128
+ return { pattern: start, count: [], digits: 0 };
1129
+ }
1130
+ let zipped = zip(start, stop);
1131
+ let digits = zipped.length;
1132
+ let pattern = "";
1133
+ let count = 0;
1134
+ for (let i = 0; i < digits; i++) {
1135
+ let [startDigit, stopDigit] = zipped[i];
1136
+ if (startDigit === stopDigit) {
1137
+ pattern += startDigit;
1138
+ } else if (startDigit !== "0" || stopDigit !== "9") {
1139
+ pattern += toCharacterClass(startDigit, stopDigit, options);
1140
+ } else {
1141
+ count++;
1142
+ }
1143
+ }
1144
+ if (count) {
1145
+ pattern += options.shorthand === true ? "\\d" : "[0-9]";
1146
+ }
1147
+ return { pattern, count: [count], digits };
1148
+ }
1149
+ function splitToPatterns(min, max, tok, options) {
1150
+ let ranges = splitToRanges(min, max);
1151
+ let tokens = [];
1152
+ let start = min;
1153
+ let prev;
1154
+ for (let i = 0; i < ranges.length; i++) {
1155
+ let max2 = ranges[i];
1156
+ let obj = rangeToPattern(String(start), String(max2), options);
1157
+ let zeros = "";
1158
+ if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
1159
+ if (prev.count.length > 1) {
1160
+ prev.count.pop();
1161
+ }
1162
+ prev.count.push(obj.count[0]);
1163
+ prev.string = prev.pattern + toQuantifier(prev.count);
1164
+ start = max2 + 1;
1165
+ continue;
1166
+ }
1167
+ if (tok.isPadded) {
1168
+ zeros = padZeros(max2, tok, options);
1169
+ }
1170
+ obj.string = zeros + obj.pattern + toQuantifier(obj.count);
1171
+ tokens.push(obj);
1172
+ start = max2 + 1;
1173
+ prev = obj;
1174
+ }
1175
+ return tokens;
1176
+ }
1177
+ function filterPatterns(arr, comparison, prefix, intersection, options) {
1178
+ let result = [];
1179
+ for (let ele of arr) {
1180
+ let { string } = ele;
1181
+ if (!intersection && !contains(comparison, "string", string)) {
1182
+ result.push(prefix + string);
1183
+ }
1184
+ if (intersection && contains(comparison, "string", string)) {
1185
+ result.push(prefix + string);
1186
+ }
1187
+ }
1188
+ return result;
1189
+ }
1190
+ function zip(a, b) {
1191
+ let arr = [];
1192
+ for (let i = 0; i < a.length; i++)
1193
+ arr.push([a[i], b[i]]);
1194
+ return arr;
1195
+ }
1196
+ function compare(a, b) {
1197
+ return a > b ? 1 : b > a ? -1 : 0;
1198
+ }
1199
+ function contains(arr, key, val) {
1200
+ return arr.some((ele) => ele[key] === val);
1201
+ }
1202
+ function countNines(min, len) {
1203
+ return Number(String(min).slice(0, -len) + "9".repeat(len));
1204
+ }
1205
+ function countZeros(integer, zeros) {
1206
+ return integer - integer % Math.pow(10, zeros);
1207
+ }
1208
+ function toQuantifier(digits) {
1209
+ let [start = 0, stop = ""] = digits;
1210
+ if (stop || start > 1) {
1211
+ return `{${start + (stop ? "," + stop : "")}}`;
1212
+ }
1213
+ return "";
1214
+ }
1215
+ function toCharacterClass(a, b, options) {
1216
+ return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
1217
+ }
1218
+ function hasPadding(str) {
1219
+ return /^-?(0+)\d/.test(str);
1220
+ }
1221
+ function padZeros(value, tok, options) {
1222
+ if (!tok.isPadded) {
1223
+ return value;
1224
+ }
1225
+ let diff = Math.abs(tok.maxLen - String(value).length);
1226
+ let relax = options.relaxZeros !== false;
1227
+ switch (diff) {
1228
+ case 0:
1229
+ return "";
1230
+ case 1:
1231
+ return relax ? "0?" : "0";
1232
+ case 2:
1233
+ return relax ? "0{0,2}" : "00";
1234
+ default: {
1235
+ return relax ? `0{0,${diff}}` : `0{${diff}}`;
1236
+ }
1237
+ }
1238
+ }
1239
+ toRegexRange.cache = {};
1240
+ toRegexRange.clearCache = () => toRegexRange.cache = {};
1241
+ module2.exports = toRegexRange;
1242
+ }
1243
+ });
1244
+
1245
+ // ../../node_modules/micromatch/node_modules/fill-range/index.js
1246
+ var require_fill_range = __commonJS({
1247
+ "../../node_modules/micromatch/node_modules/fill-range/index.js"(exports, module2) {
1248
+ "use strict";
1249
+ var util = require("util");
1250
+ var toRegexRange = require_to_regex_range();
1251
+ var isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
1252
+ var transform = (toNumber) => {
1253
+ return (value) => toNumber === true ? Number(value) : String(value);
1254
+ };
1255
+ var isValidValue = (value) => {
1256
+ return typeof value === "number" || typeof value === "string" && value !== "";
1257
+ };
1258
+ var isNumber = (num) => Number.isInteger(+num);
1259
+ var zeros = (input) => {
1260
+ let value = `${input}`;
1261
+ let index = -1;
1262
+ if (value[0] === "-")
1263
+ value = value.slice(1);
1264
+ if (value === "0")
1265
+ return false;
1266
+ while (value[++index] === "0")
1267
+ ;
1268
+ return index > 0;
1269
+ };
1270
+ var stringify = (start, end, options) => {
1271
+ if (typeof start === "string" || typeof end === "string") {
1272
+ return true;
1273
+ }
1274
+ return options.stringify === true;
1275
+ };
1276
+ var pad = (input, maxLength, toNumber) => {
1277
+ if (maxLength > 0) {
1278
+ let dash = input[0] === "-" ? "-" : "";
1279
+ if (dash)
1280
+ input = input.slice(1);
1281
+ input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0");
1282
+ }
1283
+ if (toNumber === false) {
1284
+ return String(input);
1285
+ }
1286
+ return input;
1287
+ };
1288
+ var toMaxLen = (input, maxLength) => {
1289
+ let negative = input[0] === "-" ? "-" : "";
1290
+ if (negative) {
1291
+ input = input.slice(1);
1292
+ maxLength--;
1293
+ }
1294
+ while (input.length < maxLength)
1295
+ input = "0" + input;
1296
+ return negative ? "-" + input : input;
1297
+ };
1298
+ var toSequence = (parts, options) => {
1299
+ parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
1300
+ parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
1301
+ let prefix = options.capture ? "" : "?:";
1302
+ let positives = "";
1303
+ let negatives = "";
1304
+ let result;
1305
+ if (parts.positives.length) {
1306
+ positives = parts.positives.join("|");
1307
+ }
1308
+ if (parts.negatives.length) {
1309
+ negatives = `-(${prefix}${parts.negatives.join("|")})`;
1310
+ }
1311
+ if (positives && negatives) {
1312
+ result = `${positives}|${negatives}`;
1313
+ } else {
1314
+ result = positives || negatives;
1315
+ }
1316
+ if (options.wrap) {
1317
+ return `(${prefix}${result})`;
1318
+ }
1319
+ return result;
1320
+ };
1321
+ var toRange = (a, b, isNumbers, options) => {
1322
+ if (isNumbers) {
1323
+ return toRegexRange(a, b, { wrap: false, ...options });
1324
+ }
1325
+ let start = String.fromCharCode(a);
1326
+ if (a === b)
1327
+ return start;
1328
+ let stop = String.fromCharCode(b);
1329
+ return `[${start}-${stop}]`;
1330
+ };
1331
+ var toRegex = (start, end, options) => {
1332
+ if (Array.isArray(start)) {
1333
+ let wrap = options.wrap === true;
1334
+ let prefix = options.capture ? "" : "?:";
1335
+ return wrap ? `(${prefix}${start.join("|")})` : start.join("|");
1336
+ }
1337
+ return toRegexRange(start, end, options);
1338
+ };
1339
+ var rangeError = (...args) => {
1340
+ return new RangeError("Invalid range arguments: " + util.inspect(...args));
1341
+ };
1342
+ var invalidRange = (start, end, options) => {
1343
+ if (options.strictRanges === true)
1344
+ throw rangeError([start, end]);
1345
+ return [];
1346
+ };
1347
+ var invalidStep = (step, options) => {
1348
+ if (options.strictRanges === true) {
1349
+ throw new TypeError(`Expected step "${step}" to be a number`);
1350
+ }
1351
+ return [];
1352
+ };
1353
+ var fillNumbers = (start, end, step = 1, options = {}) => {
1354
+ let a = Number(start);
1355
+ let b = Number(end);
1356
+ if (!Number.isInteger(a) || !Number.isInteger(b)) {
1357
+ if (options.strictRanges === true)
1358
+ throw rangeError([start, end]);
1359
+ return [];
1360
+ }
1361
+ if (a === 0)
1362
+ a = 0;
1363
+ if (b === 0)
1364
+ b = 0;
1365
+ let descending = a > b;
1366
+ let startString = String(start);
1367
+ let endString = String(end);
1368
+ let stepString = String(step);
1369
+ step = Math.max(Math.abs(step), 1);
1370
+ let padded = zeros(startString) || zeros(endString) || zeros(stepString);
1371
+ let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
1372
+ let toNumber = padded === false && stringify(start, end, options) === false;
1373
+ let format = options.transform || transform(toNumber);
1374
+ if (options.toRegex && step === 1) {
1375
+ return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
1376
+ }
1377
+ let parts = { negatives: [], positives: [] };
1378
+ let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));
1379
+ let range = [];
1380
+ let index = 0;
1381
+ while (descending ? a >= b : a <= b) {
1382
+ if (options.toRegex === true && step > 1) {
1383
+ push(a);
1384
+ } else {
1385
+ range.push(pad(format(a, index), maxLen, toNumber));
1386
+ }
1387
+ a = descending ? a - step : a + step;
1388
+ index++;
1389
+ }
1390
+ if (options.toRegex === true) {
1391
+ return step > 1 ? toSequence(parts, options) : toRegex(range, null, { wrap: false, ...options });
1392
+ }
1393
+ return range;
1394
+ };
1395
+ var fillLetters = (start, end, step = 1, options = {}) => {
1396
+ if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) {
1397
+ return invalidRange(start, end, options);
1398
+ }
1399
+ let format = options.transform || ((val) => String.fromCharCode(val));
1400
+ let a = `${start}`.charCodeAt(0);
1401
+ let b = `${end}`.charCodeAt(0);
1402
+ let descending = a > b;
1403
+ let min = Math.min(a, b);
1404
+ let max = Math.max(a, b);
1405
+ if (options.toRegex && step === 1) {
1406
+ return toRange(min, max, false, options);
1407
+ }
1408
+ let range = [];
1409
+ let index = 0;
1410
+ while (descending ? a >= b : a <= b) {
1411
+ range.push(format(a, index));
1412
+ a = descending ? a - step : a + step;
1413
+ index++;
1414
+ }
1415
+ if (options.toRegex === true) {
1416
+ return toRegex(range, null, { wrap: false, options });
1417
+ }
1418
+ return range;
1419
+ };
1420
+ var fill = (start, end, step, options = {}) => {
1421
+ if (end == null && isValidValue(start)) {
1422
+ return [start];
1423
+ }
1424
+ if (!isValidValue(start) || !isValidValue(end)) {
1425
+ return invalidRange(start, end, options);
1426
+ }
1427
+ if (typeof step === "function") {
1428
+ return fill(start, end, 1, { transform: step });
1429
+ }
1430
+ if (isObject(step)) {
1431
+ return fill(start, end, 0, step);
1432
+ }
1433
+ let opts = { ...options };
1434
+ if (opts.capture === true)
1435
+ opts.wrap = true;
1436
+ step = step || opts.step || 1;
1437
+ if (!isNumber(step)) {
1438
+ if (step != null && !isObject(step))
1439
+ return invalidStep(step, opts);
1440
+ return fill(start, end, 1, step);
1441
+ }
1442
+ if (isNumber(start) && isNumber(end)) {
1443
+ return fillNumbers(start, end, step, opts);
1444
+ }
1445
+ return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
1446
+ };
1447
+ module2.exports = fill;
1448
+ }
1449
+ });
1450
+
1451
+ // ../../node_modules/micromatch/node_modules/braces/lib/compile.js
1452
+ var require_compile = __commonJS({
1453
+ "../../node_modules/micromatch/node_modules/braces/lib/compile.js"(exports, module2) {
1454
+ "use strict";
1455
+ var fill = require_fill_range();
1456
+ var utils = require_utils();
1457
+ var compile = (ast, options = {}) => {
1458
+ let walk = (node, parent = {}) => {
1459
+ let invalidBlock = utils.isInvalidBrace(parent);
1460
+ let invalidNode = node.invalid === true && options.escapeInvalid === true;
1461
+ let invalid = invalidBlock === true || invalidNode === true;
1462
+ let prefix = options.escapeInvalid === true ? "\\" : "";
1463
+ let output = "";
1464
+ if (node.isOpen === true) {
1465
+ return prefix + node.value;
1466
+ }
1467
+ if (node.isClose === true) {
1468
+ return prefix + node.value;
1469
+ }
1470
+ if (node.type === "open") {
1471
+ return invalid ? prefix + node.value : "(";
1472
+ }
1473
+ if (node.type === "close") {
1474
+ return invalid ? prefix + node.value : ")";
1475
+ }
1476
+ if (node.type === "comma") {
1477
+ return node.prev.type === "comma" ? "" : invalid ? node.value : "|";
1478
+ }
1479
+ if (node.value) {
1480
+ return node.value;
1481
+ }
1482
+ if (node.nodes && node.ranges > 0) {
1483
+ let args = utils.reduce(node.nodes);
1484
+ let range = fill(...args, { ...options, wrap: false, toRegex: true });
1485
+ if (range.length !== 0) {
1486
+ return args.length > 1 && range.length > 1 ? `(${range})` : range;
1487
+ }
1488
+ }
1489
+ if (node.nodes) {
1490
+ for (let child of node.nodes) {
1491
+ output += walk(child, node);
1492
+ }
1493
+ }
1494
+ return output;
1495
+ };
1496
+ return walk(ast);
1497
+ };
1498
+ module2.exports = compile;
1499
+ }
1500
+ });
1501
+
1502
+ // ../../node_modules/micromatch/node_modules/braces/lib/expand.js
1503
+ var require_expand = __commonJS({
1504
+ "../../node_modules/micromatch/node_modules/braces/lib/expand.js"(exports, module2) {
1505
+ "use strict";
1506
+ var fill = require_fill_range();
1507
+ var stringify = require_stringify();
1508
+ var utils = require_utils();
1509
+ var append = (queue = "", stash = "", enclose = false) => {
1510
+ let result = [];
1511
+ queue = [].concat(queue);
1512
+ stash = [].concat(stash);
1513
+ if (!stash.length)
1514
+ return queue;
1515
+ if (!queue.length) {
1516
+ return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash;
1517
+ }
1518
+ for (let item of queue) {
1519
+ if (Array.isArray(item)) {
1520
+ for (let value of item) {
1521
+ result.push(append(value, stash, enclose));
1522
+ }
1523
+ } else {
1524
+ for (let ele of stash) {
1525
+ if (enclose === true && typeof ele === "string")
1526
+ ele = `{${ele}}`;
1527
+ result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
1528
+ }
1529
+ }
1530
+ }
1531
+ return utils.flatten(result);
1532
+ };
1533
+ var expand = (ast, options = {}) => {
1534
+ let rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
1535
+ let walk = (node, parent = {}) => {
1536
+ node.queue = [];
1537
+ let p = parent;
1538
+ let q = parent.queue;
1539
+ while (p.type !== "brace" && p.type !== "root" && p.parent) {
1540
+ p = p.parent;
1541
+ q = p.queue;
1542
+ }
1543
+ if (node.invalid || node.dollar) {
1544
+ q.push(append(q.pop(), stringify(node, options)));
1545
+ return;
1546
+ }
1547
+ if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
1548
+ q.push(append(q.pop(), ["{}"]));
1549
+ return;
1550
+ }
1551
+ if (node.nodes && node.ranges > 0) {
1552
+ let args = utils.reduce(node.nodes);
1553
+ if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
1554
+ throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
1555
+ }
1556
+ let range = fill(...args, options);
1557
+ if (range.length === 0) {
1558
+ range = stringify(node, options);
1559
+ }
1560
+ q.push(append(q.pop(), range));
1561
+ node.nodes = [];
1562
+ return;
1563
+ }
1564
+ let enclose = utils.encloseBrace(node);
1565
+ let queue = node.queue;
1566
+ let block = node;
1567
+ while (block.type !== "brace" && block.type !== "root" && block.parent) {
1568
+ block = block.parent;
1569
+ queue = block.queue;
1570
+ }
1571
+ for (let i = 0; i < node.nodes.length; i++) {
1572
+ let child = node.nodes[i];
1573
+ if (child.type === "comma" && node.type === "brace") {
1574
+ if (i === 1)
1575
+ queue.push("");
1576
+ queue.push("");
1577
+ continue;
1578
+ }
1579
+ if (child.type === "close") {
1580
+ q.push(append(q.pop(), queue, enclose));
1581
+ continue;
1582
+ }
1583
+ if (child.value && child.type !== "open") {
1584
+ queue.push(append(queue.pop(), child.value));
1585
+ continue;
1586
+ }
1587
+ if (child.nodes) {
1588
+ walk(child, node);
1589
+ }
1590
+ }
1591
+ return queue;
1592
+ };
1593
+ return utils.flatten(walk(ast));
1594
+ };
1595
+ module2.exports = expand;
1596
+ }
1597
+ });
1598
+
1599
+ // ../../node_modules/micromatch/node_modules/braces/lib/constants.js
1600
+ var require_constants = __commonJS({
1601
+ "../../node_modules/micromatch/node_modules/braces/lib/constants.js"(exports, module2) {
1602
+ "use strict";
1603
+ module2.exports = {
1604
+ MAX_LENGTH: 1024 * 64,
1605
+ CHAR_0: "0",
1606
+ CHAR_9: "9",
1607
+ CHAR_UPPERCASE_A: "A",
1608
+ CHAR_LOWERCASE_A: "a",
1609
+ CHAR_UPPERCASE_Z: "Z",
1610
+ CHAR_LOWERCASE_Z: "z",
1611
+ CHAR_LEFT_PARENTHESES: "(",
1612
+ CHAR_RIGHT_PARENTHESES: ")",
1613
+ CHAR_ASTERISK: "*",
1614
+ CHAR_AMPERSAND: "&",
1615
+ CHAR_AT: "@",
1616
+ CHAR_BACKSLASH: "\\",
1617
+ CHAR_BACKTICK: "`",
1618
+ CHAR_CARRIAGE_RETURN: "\r",
1619
+ CHAR_CIRCUMFLEX_ACCENT: "^",
1620
+ CHAR_COLON: ":",
1621
+ CHAR_COMMA: ",",
1622
+ CHAR_DOLLAR: "$",
1623
+ CHAR_DOT: ".",
1624
+ CHAR_DOUBLE_QUOTE: '"',
1625
+ CHAR_EQUAL: "=",
1626
+ CHAR_EXCLAMATION_MARK: "!",
1627
+ CHAR_FORM_FEED: "\f",
1628
+ CHAR_FORWARD_SLASH: "/",
1629
+ CHAR_HASH: "#",
1630
+ CHAR_HYPHEN_MINUS: "-",
1631
+ CHAR_LEFT_ANGLE_BRACKET: "<",
1632
+ CHAR_LEFT_CURLY_BRACE: "{",
1633
+ CHAR_LEFT_SQUARE_BRACKET: "[",
1634
+ CHAR_LINE_FEED: "\n",
1635
+ CHAR_NO_BREAK_SPACE: "\xA0",
1636
+ CHAR_PERCENT: "%",
1637
+ CHAR_PLUS: "+",
1638
+ CHAR_QUESTION_MARK: "?",
1639
+ CHAR_RIGHT_ANGLE_BRACKET: ">",
1640
+ CHAR_RIGHT_CURLY_BRACE: "}",
1641
+ CHAR_RIGHT_SQUARE_BRACKET: "]",
1642
+ CHAR_SEMICOLON: ";",
1643
+ CHAR_SINGLE_QUOTE: "'",
1644
+ CHAR_SPACE: " ",
1645
+ CHAR_TAB: " ",
1646
+ CHAR_UNDERSCORE: "_",
1647
+ CHAR_VERTICAL_LINE: "|",
1648
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF"
1649
+ };
1650
+ }
1651
+ });
1652
+
1653
+ // ../../node_modules/micromatch/node_modules/braces/lib/parse.js
1654
+ var require_parse = __commonJS({
1655
+ "../../node_modules/micromatch/node_modules/braces/lib/parse.js"(exports, module2) {
1656
+ "use strict";
1657
+ var stringify = require_stringify();
1658
+ var {
1659
+ MAX_LENGTH,
1660
+ CHAR_BACKSLASH,
1661
+ CHAR_BACKTICK,
1662
+ CHAR_COMMA,
1663
+ CHAR_DOT,
1664
+ CHAR_LEFT_PARENTHESES,
1665
+ CHAR_RIGHT_PARENTHESES,
1666
+ CHAR_LEFT_CURLY_BRACE,
1667
+ CHAR_RIGHT_CURLY_BRACE,
1668
+ CHAR_LEFT_SQUARE_BRACKET,
1669
+ CHAR_RIGHT_SQUARE_BRACKET,
1670
+ CHAR_DOUBLE_QUOTE,
1671
+ CHAR_SINGLE_QUOTE,
1672
+ CHAR_NO_BREAK_SPACE,
1673
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE
1674
+ } = require_constants();
1675
+ var parse = (input, options = {}) => {
1676
+ if (typeof input !== "string") {
1677
+ throw new TypeError("Expected a string");
1678
+ }
1679
+ let opts = options || {};
1680
+ let max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
1681
+ if (input.length > max) {
1682
+ throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
1683
+ }
1684
+ let ast = { type: "root", input, nodes: [] };
1685
+ let stack = [ast];
1686
+ let block = ast;
1687
+ let prev = ast;
1688
+ let brackets = 0;
1689
+ let length = input.length;
1690
+ let index = 0;
1691
+ let depth = 0;
1692
+ let value;
1693
+ let memo = {};
1694
+ const advance = () => input[index++];
1695
+ const push = (node) => {
1696
+ if (node.type === "text" && prev.type === "dot") {
1697
+ prev.type = "text";
1698
+ }
1699
+ if (prev && prev.type === "text" && node.type === "text") {
1700
+ prev.value += node.value;
1701
+ return;
1702
+ }
1703
+ block.nodes.push(node);
1704
+ node.parent = block;
1705
+ node.prev = prev;
1706
+ prev = node;
1707
+ return node;
1708
+ };
1709
+ push({ type: "bos" });
1710
+ while (index < length) {
1711
+ block = stack[stack.length - 1];
1712
+ value = advance();
1713
+ if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
1714
+ continue;
1715
+ }
1716
+ if (value === CHAR_BACKSLASH) {
1717
+ push({ type: "text", value: (options.keepEscaping ? value : "") + advance() });
1718
+ continue;
1719
+ }
1720
+ if (value === CHAR_RIGHT_SQUARE_BRACKET) {
1721
+ push({ type: "text", value: "\\" + value });
1722
+ continue;
1723
+ }
1724
+ if (value === CHAR_LEFT_SQUARE_BRACKET) {
1725
+ brackets++;
1726
+ let closed = true;
1727
+ let next;
1728
+ while (index < length && (next = advance())) {
1729
+ value += next;
1730
+ if (next === CHAR_LEFT_SQUARE_BRACKET) {
1731
+ brackets++;
1732
+ continue;
1733
+ }
1734
+ if (next === CHAR_BACKSLASH) {
1735
+ value += advance();
1736
+ continue;
1737
+ }
1738
+ if (next === CHAR_RIGHT_SQUARE_BRACKET) {
1739
+ brackets--;
1740
+ if (brackets === 0) {
1741
+ break;
1742
+ }
1743
+ }
1744
+ }
1745
+ push({ type: "text", value });
1746
+ continue;
1747
+ }
1748
+ if (value === CHAR_LEFT_PARENTHESES) {
1749
+ block = push({ type: "paren", nodes: [] });
1750
+ stack.push(block);
1751
+ push({ type: "text", value });
1752
+ continue;
1753
+ }
1754
+ if (value === CHAR_RIGHT_PARENTHESES) {
1755
+ if (block.type !== "paren") {
1756
+ push({ type: "text", value });
1757
+ continue;
1758
+ }
1759
+ block = stack.pop();
1760
+ push({ type: "text", value });
1761
+ block = stack[stack.length - 1];
1762
+ continue;
1763
+ }
1764
+ if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
1765
+ let open = value;
1766
+ let next;
1767
+ if (options.keepQuotes !== true) {
1768
+ value = "";
1769
+ }
1770
+ while (index < length && (next = advance())) {
1771
+ if (next === CHAR_BACKSLASH) {
1772
+ value += next + advance();
1773
+ continue;
1774
+ }
1775
+ if (next === open) {
1776
+ if (options.keepQuotes === true)
1777
+ value += next;
1778
+ break;
1779
+ }
1780
+ value += next;
1781
+ }
1782
+ push({ type: "text", value });
1783
+ continue;
1784
+ }
1785
+ if (value === CHAR_LEFT_CURLY_BRACE) {
1786
+ depth++;
1787
+ let dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true;
1788
+ let brace = {
1789
+ type: "brace",
1790
+ open: true,
1791
+ close: false,
1792
+ dollar,
1793
+ depth,
1794
+ commas: 0,
1795
+ ranges: 0,
1796
+ nodes: []
1797
+ };
1798
+ block = push(brace);
1799
+ stack.push(block);
1800
+ push({ type: "open", value });
1801
+ continue;
1802
+ }
1803
+ if (value === CHAR_RIGHT_CURLY_BRACE) {
1804
+ if (block.type !== "brace") {
1805
+ push({ type: "text", value });
1806
+ continue;
1807
+ }
1808
+ let type = "close";
1809
+ block = stack.pop();
1810
+ block.close = true;
1811
+ push({ type, value });
1812
+ depth--;
1813
+ block = stack[stack.length - 1];
1814
+ continue;
1815
+ }
1816
+ if (value === CHAR_COMMA && depth > 0) {
1817
+ if (block.ranges > 0) {
1818
+ block.ranges = 0;
1819
+ let open = block.nodes.shift();
1820
+ block.nodes = [open, { type: "text", value: stringify(block) }];
1821
+ }
1822
+ push({ type: "comma", value });
1823
+ block.commas++;
1824
+ continue;
1825
+ }
1826
+ if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
1827
+ let siblings = block.nodes;
1828
+ if (depth === 0 || siblings.length === 0) {
1829
+ push({ type: "text", value });
1830
+ continue;
1831
+ }
1832
+ if (prev.type === "dot") {
1833
+ block.range = [];
1834
+ prev.value += value;
1835
+ prev.type = "range";
1836
+ if (block.nodes.length !== 3 && block.nodes.length !== 5) {
1837
+ block.invalid = true;
1838
+ block.ranges = 0;
1839
+ prev.type = "text";
1840
+ continue;
1841
+ }
1842
+ block.ranges++;
1843
+ block.args = [];
1844
+ continue;
1845
+ }
1846
+ if (prev.type === "range") {
1847
+ siblings.pop();
1848
+ let before = siblings[siblings.length - 1];
1849
+ before.value += prev.value + value;
1850
+ prev = before;
1851
+ block.ranges--;
1852
+ continue;
1853
+ }
1854
+ push({ type: "dot", value });
1855
+ continue;
1856
+ }
1857
+ push({ type: "text", value });
1858
+ }
1859
+ do {
1860
+ block = stack.pop();
1861
+ if (block.type !== "root") {
1862
+ block.nodes.forEach((node) => {
1863
+ if (!node.nodes) {
1864
+ if (node.type === "open")
1865
+ node.isOpen = true;
1866
+ if (node.type === "close")
1867
+ node.isClose = true;
1868
+ if (!node.nodes)
1869
+ node.type = "text";
1870
+ node.invalid = true;
1871
+ }
1872
+ });
1873
+ let parent = stack[stack.length - 1];
1874
+ let index2 = parent.nodes.indexOf(block);
1875
+ parent.nodes.splice(index2, 1, ...block.nodes);
1876
+ }
1877
+ } while (stack.length > 0);
1878
+ push({ type: "eos" });
1879
+ return ast;
1880
+ };
1881
+ module2.exports = parse;
1882
+ }
1883
+ });
1884
+
1885
+ // ../../node_modules/micromatch/node_modules/braces/index.js
1886
+ var require_braces = __commonJS({
1887
+ "../../node_modules/micromatch/node_modules/braces/index.js"(exports, module2) {
1888
+ "use strict";
1889
+ var stringify = require_stringify();
1890
+ var compile = require_compile();
1891
+ var expand = require_expand();
1892
+ var parse = require_parse();
1893
+ var braces = (input, options = {}) => {
1894
+ let output = [];
1895
+ if (Array.isArray(input)) {
1896
+ for (let pattern of input) {
1897
+ let result = braces.create(pattern, options);
1898
+ if (Array.isArray(result)) {
1899
+ output.push(...result);
1900
+ } else {
1901
+ output.push(result);
1902
+ }
1903
+ }
1904
+ } else {
1905
+ output = [].concat(braces.create(input, options));
1906
+ }
1907
+ if (options && options.expand === true && options.nodupes === true) {
1908
+ output = [...new Set(output)];
1909
+ }
1910
+ return output;
1911
+ };
1912
+ braces.parse = (input, options = {}) => parse(input, options);
1913
+ braces.stringify = (input, options = {}) => {
1914
+ if (typeof input === "string") {
1915
+ return stringify(braces.parse(input, options), options);
1916
+ }
1917
+ return stringify(input, options);
1918
+ };
1919
+ braces.compile = (input, options = {}) => {
1920
+ if (typeof input === "string") {
1921
+ input = braces.parse(input, options);
1922
+ }
1923
+ return compile(input, options);
1924
+ };
1925
+ braces.expand = (input, options = {}) => {
1926
+ if (typeof input === "string") {
1927
+ input = braces.parse(input, options);
1928
+ }
1929
+ let result = expand(input, options);
1930
+ if (options.noempty === true) {
1931
+ result = result.filter(Boolean);
1932
+ }
1933
+ if (options.nodupes === true) {
1934
+ result = [...new Set(result)];
1935
+ }
1936
+ return result;
1937
+ };
1938
+ braces.create = (input, options = {}) => {
1939
+ if (input === "" || input.length < 3) {
1940
+ return [input];
1941
+ }
1942
+ return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options);
1943
+ };
1944
+ module2.exports = braces;
1945
+ }
1946
+ });
1947
+
1948
+ // ../../node_modules/picomatch/lib/constants.js
1949
+ var require_constants2 = __commonJS({
1950
+ "../../node_modules/picomatch/lib/constants.js"(exports, module2) {
1951
+ "use strict";
1952
+ var path = require("path");
1953
+ var WIN_SLASH = "\\\\/";
1954
+ var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
1955
+ var DOT_LITERAL = "\\.";
1956
+ var PLUS_LITERAL = "\\+";
1957
+ var QMARK_LITERAL = "\\?";
1958
+ var SLASH_LITERAL = "\\/";
1959
+ var ONE_CHAR = "(?=.)";
1960
+ var QMARK = "[^/]";
1961
+ var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
1962
+ var START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
1963
+ var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
1964
+ var NO_DOT = `(?!${DOT_LITERAL})`;
1965
+ var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
1966
+ var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
1967
+ var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
1968
+ var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
1969
+ var STAR = `${QMARK}*?`;
1970
+ var POSIX_CHARS = {
1971
+ DOT_LITERAL,
1972
+ PLUS_LITERAL,
1973
+ QMARK_LITERAL,
1974
+ SLASH_LITERAL,
1975
+ ONE_CHAR,
1976
+ QMARK,
1977
+ END_ANCHOR,
1978
+ DOTS_SLASH,
1979
+ NO_DOT,
1980
+ NO_DOTS,
1981
+ NO_DOT_SLASH,
1982
+ NO_DOTS_SLASH,
1983
+ QMARK_NO_DOT,
1984
+ STAR,
1985
+ START_ANCHOR
1986
+ };
1987
+ var WINDOWS_CHARS = {
1988
+ ...POSIX_CHARS,
1989
+ SLASH_LITERAL: `[${WIN_SLASH}]`,
1990
+ QMARK: WIN_NO_SLASH,
1991
+ STAR: `${WIN_NO_SLASH}*?`,
1992
+ DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
1993
+ NO_DOT: `(?!${DOT_LITERAL})`,
1994
+ NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
1995
+ NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
1996
+ NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
1997
+ QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
1998
+ START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
1999
+ END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
2000
+ };
2001
+ var POSIX_REGEX_SOURCE = {
2002
+ alnum: "a-zA-Z0-9",
2003
+ alpha: "a-zA-Z",
2004
+ ascii: "\\x00-\\x7F",
2005
+ blank: " \\t",
2006
+ cntrl: "\\x00-\\x1F\\x7F",
2007
+ digit: "0-9",
2008
+ graph: "\\x21-\\x7E",
2009
+ lower: "a-z",
2010
+ print: "\\x20-\\x7E ",
2011
+ punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
2012
+ space: " \\t\\r\\n\\v\\f",
2013
+ upper: "A-Z",
2014
+ word: "A-Za-z0-9_",
2015
+ xdigit: "A-Fa-f0-9"
2016
+ };
2017
+ module2.exports = {
2018
+ MAX_LENGTH: 1024 * 64,
2019
+ POSIX_REGEX_SOURCE,
2020
+ REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
2021
+ REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
2022
+ REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
2023
+ REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
2024
+ REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
2025
+ REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
2026
+ REPLACEMENTS: {
2027
+ "***": "*",
2028
+ "**/**": "**",
2029
+ "**/**/**": "**"
2030
+ },
2031
+ CHAR_0: 48,
2032
+ CHAR_9: 57,
2033
+ CHAR_UPPERCASE_A: 65,
2034
+ CHAR_LOWERCASE_A: 97,
2035
+ CHAR_UPPERCASE_Z: 90,
2036
+ CHAR_LOWERCASE_Z: 122,
2037
+ CHAR_LEFT_PARENTHESES: 40,
2038
+ CHAR_RIGHT_PARENTHESES: 41,
2039
+ CHAR_ASTERISK: 42,
2040
+ CHAR_AMPERSAND: 38,
2041
+ CHAR_AT: 64,
2042
+ CHAR_BACKWARD_SLASH: 92,
2043
+ CHAR_CARRIAGE_RETURN: 13,
2044
+ CHAR_CIRCUMFLEX_ACCENT: 94,
2045
+ CHAR_COLON: 58,
2046
+ CHAR_COMMA: 44,
2047
+ CHAR_DOT: 46,
2048
+ CHAR_DOUBLE_QUOTE: 34,
2049
+ CHAR_EQUAL: 61,
2050
+ CHAR_EXCLAMATION_MARK: 33,
2051
+ CHAR_FORM_FEED: 12,
2052
+ CHAR_FORWARD_SLASH: 47,
2053
+ CHAR_GRAVE_ACCENT: 96,
2054
+ CHAR_HASH: 35,
2055
+ CHAR_HYPHEN_MINUS: 45,
2056
+ CHAR_LEFT_ANGLE_BRACKET: 60,
2057
+ CHAR_LEFT_CURLY_BRACE: 123,
2058
+ CHAR_LEFT_SQUARE_BRACKET: 91,
2059
+ CHAR_LINE_FEED: 10,
2060
+ CHAR_NO_BREAK_SPACE: 160,
2061
+ CHAR_PERCENT: 37,
2062
+ CHAR_PLUS: 43,
2063
+ CHAR_QUESTION_MARK: 63,
2064
+ CHAR_RIGHT_ANGLE_BRACKET: 62,
2065
+ CHAR_RIGHT_CURLY_BRACE: 125,
2066
+ CHAR_RIGHT_SQUARE_BRACKET: 93,
2067
+ CHAR_SEMICOLON: 59,
2068
+ CHAR_SINGLE_QUOTE: 39,
2069
+ CHAR_SPACE: 32,
2070
+ CHAR_TAB: 9,
2071
+ CHAR_UNDERSCORE: 95,
2072
+ CHAR_VERTICAL_LINE: 124,
2073
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
2074
+ SEP: path.sep,
2075
+ extglobChars(chars) {
2076
+ return {
2077
+ "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` },
2078
+ "?": { type: "qmark", open: "(?:", close: ")?" },
2079
+ "+": { type: "plus", open: "(?:", close: ")+" },
2080
+ "*": { type: "star", open: "(?:", close: ")*" },
2081
+ "@": { type: "at", open: "(?:", close: ")" }
2082
+ };
2083
+ },
2084
+ globChars(win32) {
2085
+ return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
2086
+ }
2087
+ };
2088
+ }
2089
+ });
2090
+
2091
+ // ../../node_modules/picomatch/lib/utils.js
2092
+ var require_utils2 = __commonJS({
2093
+ "../../node_modules/picomatch/lib/utils.js"(exports) {
2094
+ "use strict";
2095
+ var path = require("path");
2096
+ var win32 = process.platform === "win32";
2097
+ var {
2098
+ REGEX_BACKSLASH,
2099
+ REGEX_REMOVE_BACKSLASH,
2100
+ REGEX_SPECIAL_CHARS,
2101
+ REGEX_SPECIAL_CHARS_GLOBAL
2102
+ } = require_constants2();
2103
+ exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
2104
+ exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
2105
+ exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str);
2106
+ exports.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
2107
+ exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
2108
+ exports.removeBackslashes = (str) => {
2109
+ return str.replace(REGEX_REMOVE_BACKSLASH, (match) => {
2110
+ return match === "\\" ? "" : match;
2111
+ });
2112
+ };
2113
+ exports.supportsLookbehinds = () => {
2114
+ const segs = process.version.slice(1).split(".").map(Number);
2115
+ if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) {
2116
+ return true;
2117
+ }
2118
+ return false;
2119
+ };
2120
+ exports.isWindows = (options) => {
2121
+ if (options && typeof options.windows === "boolean") {
2122
+ return options.windows;
2123
+ }
2124
+ return win32 === true || path.sep === "\\";
2125
+ };
2126
+ exports.escapeLast = (input, char, lastIdx) => {
2127
+ const idx = input.lastIndexOf(char, lastIdx);
2128
+ if (idx === -1)
2129
+ return input;
2130
+ if (input[idx - 1] === "\\")
2131
+ return exports.escapeLast(input, char, idx - 1);
2132
+ return `${input.slice(0, idx)}\\${input.slice(idx)}`;
2133
+ };
2134
+ exports.removePrefix = (input, state = {}) => {
2135
+ let output = input;
2136
+ if (output.startsWith("./")) {
2137
+ output = output.slice(2);
2138
+ state.prefix = "./";
2139
+ }
2140
+ return output;
2141
+ };
2142
+ exports.wrapOutput = (input, state = {}, options = {}) => {
2143
+ const prepend = options.contains ? "" : "^";
2144
+ const append = options.contains ? "" : "$";
2145
+ let output = `${prepend}(?:${input})${append}`;
2146
+ if (state.negated === true) {
2147
+ output = `(?:^(?!${output}).*$)`;
2148
+ }
2149
+ return output;
2150
+ };
2151
+ }
2152
+ });
2153
+
2154
+ // ../../node_modules/picomatch/lib/scan.js
2155
+ var require_scan = __commonJS({
2156
+ "../../node_modules/picomatch/lib/scan.js"(exports, module2) {
2157
+ "use strict";
2158
+ var utils = require_utils2();
2159
+ var {
2160
+ CHAR_ASTERISK,
2161
+ CHAR_AT,
2162
+ CHAR_BACKWARD_SLASH,
2163
+ CHAR_COMMA,
2164
+ CHAR_DOT,
2165
+ CHAR_EXCLAMATION_MARK,
2166
+ CHAR_FORWARD_SLASH,
2167
+ CHAR_LEFT_CURLY_BRACE,
2168
+ CHAR_LEFT_PARENTHESES,
2169
+ CHAR_LEFT_SQUARE_BRACKET,
2170
+ CHAR_PLUS,
2171
+ CHAR_QUESTION_MARK,
2172
+ CHAR_RIGHT_CURLY_BRACE,
2173
+ CHAR_RIGHT_PARENTHESES,
2174
+ CHAR_RIGHT_SQUARE_BRACKET
2175
+ } = require_constants2();
2176
+ var isPathSeparator = (code) => {
2177
+ return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
2178
+ };
2179
+ var depth = (token) => {
2180
+ if (token.isPrefix !== true) {
2181
+ token.depth = token.isGlobstar ? Infinity : 1;
2182
+ }
2183
+ };
2184
+ var scan = (input, options) => {
2185
+ const opts = options || {};
2186
+ const length = input.length - 1;
2187
+ const scanToEnd = opts.parts === true || opts.scanToEnd === true;
2188
+ const slashes = [];
2189
+ const tokens = [];
2190
+ const parts = [];
2191
+ let str = input;
2192
+ let index = -1;
2193
+ let start = 0;
2194
+ let lastIndex = 0;
2195
+ let isBrace = false;
2196
+ let isBracket = false;
2197
+ let isGlob = false;
2198
+ let isExtglob = false;
2199
+ let isGlobstar = false;
2200
+ let braceEscaped = false;
2201
+ let backslashes = false;
2202
+ let negated = false;
2203
+ let negatedExtglob = false;
2204
+ let finished = false;
2205
+ let braces = 0;
2206
+ let prev;
2207
+ let code;
2208
+ let token = { value: "", depth: 0, isGlob: false };
2209
+ const eos = () => index >= length;
2210
+ const peek = () => str.charCodeAt(index + 1);
2211
+ const advance = () => {
2212
+ prev = code;
2213
+ return str.charCodeAt(++index);
2214
+ };
2215
+ while (index < length) {
2216
+ code = advance();
2217
+ let next;
2218
+ if (code === CHAR_BACKWARD_SLASH) {
2219
+ backslashes = token.backslashes = true;
2220
+ code = advance();
2221
+ if (code === CHAR_LEFT_CURLY_BRACE) {
2222
+ braceEscaped = true;
2223
+ }
2224
+ continue;
2225
+ }
2226
+ if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
2227
+ braces++;
2228
+ while (eos() !== true && (code = advance())) {
2229
+ if (code === CHAR_BACKWARD_SLASH) {
2230
+ backslashes = token.backslashes = true;
2231
+ advance();
2232
+ continue;
2233
+ }
2234
+ if (code === CHAR_LEFT_CURLY_BRACE) {
2235
+ braces++;
2236
+ continue;
2237
+ }
2238
+ if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
2239
+ isBrace = token.isBrace = true;
2240
+ isGlob = token.isGlob = true;
2241
+ finished = true;
2242
+ if (scanToEnd === true) {
2243
+ continue;
2244
+ }
2245
+ break;
2246
+ }
2247
+ if (braceEscaped !== true && code === CHAR_COMMA) {
2248
+ isBrace = token.isBrace = true;
2249
+ isGlob = token.isGlob = true;
2250
+ finished = true;
2251
+ if (scanToEnd === true) {
2252
+ continue;
2253
+ }
2254
+ break;
2255
+ }
2256
+ if (code === CHAR_RIGHT_CURLY_BRACE) {
2257
+ braces--;
2258
+ if (braces === 0) {
2259
+ braceEscaped = false;
2260
+ isBrace = token.isBrace = true;
2261
+ finished = true;
2262
+ break;
2263
+ }
2264
+ }
2265
+ }
2266
+ if (scanToEnd === true) {
2267
+ continue;
2268
+ }
2269
+ break;
2270
+ }
2271
+ if (code === CHAR_FORWARD_SLASH) {
2272
+ slashes.push(index);
2273
+ tokens.push(token);
2274
+ token = { value: "", depth: 0, isGlob: false };
2275
+ if (finished === true)
2276
+ continue;
2277
+ if (prev === CHAR_DOT && index === start + 1) {
2278
+ start += 2;
2279
+ continue;
2280
+ }
2281
+ lastIndex = index + 1;
2282
+ continue;
2283
+ }
2284
+ if (opts.noext !== true) {
2285
+ const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK;
2286
+ if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
2287
+ isGlob = token.isGlob = true;
2288
+ isExtglob = token.isExtglob = true;
2289
+ finished = true;
2290
+ if (code === CHAR_EXCLAMATION_MARK && index === start) {
2291
+ negatedExtglob = true;
2292
+ }
2293
+ if (scanToEnd === true) {
2294
+ while (eos() !== true && (code = advance())) {
2295
+ if (code === CHAR_BACKWARD_SLASH) {
2296
+ backslashes = token.backslashes = true;
2297
+ code = advance();
2298
+ continue;
2299
+ }
2300
+ if (code === CHAR_RIGHT_PARENTHESES) {
2301
+ isGlob = token.isGlob = true;
2302
+ finished = true;
2303
+ break;
2304
+ }
2305
+ }
2306
+ continue;
2307
+ }
2308
+ break;
2309
+ }
2310
+ }
2311
+ if (code === CHAR_ASTERISK) {
2312
+ if (prev === CHAR_ASTERISK)
2313
+ isGlobstar = token.isGlobstar = true;
2314
+ isGlob = token.isGlob = true;
2315
+ finished = true;
2316
+ if (scanToEnd === true) {
2317
+ continue;
2318
+ }
2319
+ break;
2320
+ }
2321
+ if (code === CHAR_QUESTION_MARK) {
2322
+ isGlob = token.isGlob = true;
2323
+ finished = true;
2324
+ if (scanToEnd === true) {
2325
+ continue;
2326
+ }
2327
+ break;
2328
+ }
2329
+ if (code === CHAR_LEFT_SQUARE_BRACKET) {
2330
+ while (eos() !== true && (next = advance())) {
2331
+ if (next === CHAR_BACKWARD_SLASH) {
2332
+ backslashes = token.backslashes = true;
2333
+ advance();
2334
+ continue;
2335
+ }
2336
+ if (next === CHAR_RIGHT_SQUARE_BRACKET) {
2337
+ isBracket = token.isBracket = true;
2338
+ isGlob = token.isGlob = true;
2339
+ finished = true;
2340
+ break;
2341
+ }
2342
+ }
2343
+ if (scanToEnd === true) {
2344
+ continue;
2345
+ }
2346
+ break;
2347
+ }
2348
+ if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
2349
+ negated = token.negated = true;
2350
+ start++;
2351
+ continue;
2352
+ }
2353
+ if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
2354
+ isGlob = token.isGlob = true;
2355
+ if (scanToEnd === true) {
2356
+ while (eos() !== true && (code = advance())) {
2357
+ if (code === CHAR_LEFT_PARENTHESES) {
2358
+ backslashes = token.backslashes = true;
2359
+ code = advance();
2360
+ continue;
2361
+ }
2362
+ if (code === CHAR_RIGHT_PARENTHESES) {
2363
+ finished = true;
2364
+ break;
2365
+ }
2366
+ }
2367
+ continue;
2368
+ }
2369
+ break;
2370
+ }
2371
+ if (isGlob === true) {
2372
+ finished = true;
2373
+ if (scanToEnd === true) {
2374
+ continue;
2375
+ }
2376
+ break;
2377
+ }
2378
+ }
2379
+ if (opts.noext === true) {
2380
+ isExtglob = false;
2381
+ isGlob = false;
2382
+ }
2383
+ let base = str;
2384
+ let prefix = "";
2385
+ let glob = "";
2386
+ if (start > 0) {
2387
+ prefix = str.slice(0, start);
2388
+ str = str.slice(start);
2389
+ lastIndex -= start;
2390
+ }
2391
+ if (base && isGlob === true && lastIndex > 0) {
2392
+ base = str.slice(0, lastIndex);
2393
+ glob = str.slice(lastIndex);
2394
+ } else if (isGlob === true) {
2395
+ base = "";
2396
+ glob = str;
2397
+ } else {
2398
+ base = str;
2399
+ }
2400
+ if (base && base !== "" && base !== "/" && base !== str) {
2401
+ if (isPathSeparator(base.charCodeAt(base.length - 1))) {
2402
+ base = base.slice(0, -1);
2403
+ }
2404
+ }
2405
+ if (opts.unescape === true) {
2406
+ if (glob)
2407
+ glob = utils.removeBackslashes(glob);
2408
+ if (base && backslashes === true) {
2409
+ base = utils.removeBackslashes(base);
2410
+ }
2411
+ }
2412
+ const state = {
2413
+ prefix,
2414
+ input,
2415
+ start,
2416
+ base,
2417
+ glob,
2418
+ isBrace,
2419
+ isBracket,
2420
+ isGlob,
2421
+ isExtglob,
2422
+ isGlobstar,
2423
+ negated,
2424
+ negatedExtglob
2425
+ };
2426
+ if (opts.tokens === true) {
2427
+ state.maxDepth = 0;
2428
+ if (!isPathSeparator(code)) {
2429
+ tokens.push(token);
2430
+ }
2431
+ state.tokens = tokens;
2432
+ }
2433
+ if (opts.parts === true || opts.tokens === true) {
2434
+ let prevIndex;
2435
+ for (let idx = 0; idx < slashes.length; idx++) {
2436
+ const n = prevIndex ? prevIndex + 1 : start;
2437
+ const i = slashes[idx];
2438
+ const value = input.slice(n, i);
2439
+ if (opts.tokens) {
2440
+ if (idx === 0 && start !== 0) {
2441
+ tokens[idx].isPrefix = true;
2442
+ tokens[idx].value = prefix;
2443
+ } else {
2444
+ tokens[idx].value = value;
2445
+ }
2446
+ depth(tokens[idx]);
2447
+ state.maxDepth += tokens[idx].depth;
2448
+ }
2449
+ if (idx !== 0 || value !== "") {
2450
+ parts.push(value);
2451
+ }
2452
+ prevIndex = i;
2453
+ }
2454
+ if (prevIndex && prevIndex + 1 < input.length) {
2455
+ const value = input.slice(prevIndex + 1);
2456
+ parts.push(value);
2457
+ if (opts.tokens) {
2458
+ tokens[tokens.length - 1].value = value;
2459
+ depth(tokens[tokens.length - 1]);
2460
+ state.maxDepth += tokens[tokens.length - 1].depth;
2461
+ }
2462
+ }
2463
+ state.slashes = slashes;
2464
+ state.parts = parts;
2465
+ }
2466
+ return state;
2467
+ };
2468
+ module2.exports = scan;
2469
+ }
2470
+ });
2471
+
2472
+ // ../../node_modules/picomatch/lib/parse.js
2473
+ var require_parse2 = __commonJS({
2474
+ "../../node_modules/picomatch/lib/parse.js"(exports, module2) {
2475
+ "use strict";
2476
+ var constants = require_constants2();
2477
+ var utils = require_utils2();
2478
+ var {
2479
+ MAX_LENGTH,
2480
+ POSIX_REGEX_SOURCE,
2481
+ REGEX_NON_SPECIAL_CHARS,
2482
+ REGEX_SPECIAL_CHARS_BACKREF,
2483
+ REPLACEMENTS
2484
+ } = constants;
2485
+ var expandRange = (args, options) => {
2486
+ if (typeof options.expandRange === "function") {
2487
+ return options.expandRange(...args, options);
2488
+ }
2489
+ args.sort();
2490
+ const value = `[${args.join("-")}]`;
2491
+ try {
2492
+ new RegExp(value);
2493
+ } catch (ex) {
2494
+ return args.map((v) => utils.escapeRegex(v)).join("..");
2495
+ }
2496
+ return value;
2497
+ };
2498
+ var syntaxError = (type, char) => {
2499
+ return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
2500
+ };
2501
+ var parse = (input, options) => {
2502
+ if (typeof input !== "string") {
2503
+ throw new TypeError("Expected a string");
2504
+ }
2505
+ input = REPLACEMENTS[input] || input;
2506
+ const opts = { ...options };
2507
+ const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
2508
+ let len = input.length;
2509
+ if (len > max) {
2510
+ throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
2511
+ }
2512
+ const bos = { type: "bos", value: "", output: opts.prepend || "" };
2513
+ const tokens = [bos];
2514
+ const capture = opts.capture ? "" : "?:";
2515
+ const win32 = utils.isWindows(options);
2516
+ const PLATFORM_CHARS = constants.globChars(win32);
2517
+ const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
2518
+ const {
2519
+ DOT_LITERAL,
2520
+ PLUS_LITERAL,
2521
+ SLASH_LITERAL,
2522
+ ONE_CHAR,
2523
+ DOTS_SLASH,
2524
+ NO_DOT,
2525
+ NO_DOT_SLASH,
2526
+ NO_DOTS_SLASH,
2527
+ QMARK,
2528
+ QMARK_NO_DOT,
2529
+ STAR,
2530
+ START_ANCHOR
2531
+ } = PLATFORM_CHARS;
2532
+ const globstar = (opts2) => {
2533
+ return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
2534
+ };
2535
+ const nodot = opts.dot ? "" : NO_DOT;
2536
+ const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
2537
+ let star = opts.bash === true ? globstar(opts) : STAR;
2538
+ if (opts.capture) {
2539
+ star = `(${star})`;
2540
+ }
2541
+ if (typeof opts.noext === "boolean") {
2542
+ opts.noextglob = opts.noext;
2543
+ }
2544
+ const state = {
2545
+ input,
2546
+ index: -1,
2547
+ start: 0,
2548
+ dot: opts.dot === true,
2549
+ consumed: "",
2550
+ output: "",
2551
+ prefix: "",
2552
+ backtrack: false,
2553
+ negated: false,
2554
+ brackets: 0,
2555
+ braces: 0,
2556
+ parens: 0,
2557
+ quotes: 0,
2558
+ globstar: false,
2559
+ tokens
2560
+ };
2561
+ input = utils.removePrefix(input, state);
2562
+ len = input.length;
2563
+ const extglobs = [];
2564
+ const braces = [];
2565
+ const stack = [];
2566
+ let prev = bos;
2567
+ let value;
2568
+ const eos = () => state.index === len - 1;
2569
+ const peek = state.peek = (n = 1) => input[state.index + n];
2570
+ const advance = state.advance = () => input[++state.index] || "";
2571
+ const remaining = () => input.slice(state.index + 1);
2572
+ const consume = (value2 = "", num = 0) => {
2573
+ state.consumed += value2;
2574
+ state.index += num;
2575
+ };
2576
+ const append = (token) => {
2577
+ state.output += token.output != null ? token.output : token.value;
2578
+ consume(token.value);
2579
+ };
2580
+ const negate = () => {
2581
+ let count = 1;
2582
+ while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
2583
+ advance();
2584
+ state.start++;
2585
+ count++;
2586
+ }
2587
+ if (count % 2 === 0) {
2588
+ return false;
2589
+ }
2590
+ state.negated = true;
2591
+ state.start++;
2592
+ return true;
2593
+ };
2594
+ const increment = (type) => {
2595
+ state[type]++;
2596
+ stack.push(type);
2597
+ };
2598
+ const decrement = (type) => {
2599
+ state[type]--;
2600
+ stack.pop();
2601
+ };
2602
+ const push = (tok) => {
2603
+ if (prev.type === "globstar") {
2604
+ const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
2605
+ const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
2606
+ if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) {
2607
+ state.output = state.output.slice(0, -prev.output.length);
2608
+ prev.type = "star";
2609
+ prev.value = "*";
2610
+ prev.output = star;
2611
+ state.output += prev.output;
2612
+ }
2613
+ }
2614
+ if (extglobs.length && tok.type !== "paren") {
2615
+ extglobs[extglobs.length - 1].inner += tok.value;
2616
+ }
2617
+ if (tok.value || tok.output)
2618
+ append(tok);
2619
+ if (prev && prev.type === "text" && tok.type === "text") {
2620
+ prev.value += tok.value;
2621
+ prev.output = (prev.output || "") + tok.value;
2622
+ return;
2623
+ }
2624
+ tok.prev = prev;
2625
+ tokens.push(tok);
2626
+ prev = tok;
2627
+ };
2628
+ const extglobOpen = (type, value2) => {
2629
+ const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" };
2630
+ token.prev = prev;
2631
+ token.parens = state.parens;
2632
+ token.output = state.output;
2633
+ const output = (opts.capture ? "(" : "") + token.open;
2634
+ increment("parens");
2635
+ push({ type, value: value2, output: state.output ? "" : ONE_CHAR });
2636
+ push({ type: "paren", extglob: true, value: advance(), output });
2637
+ extglobs.push(token);
2638
+ };
2639
+ const extglobClose = (token) => {
2640
+ let output = token.close + (opts.capture ? ")" : "");
2641
+ let rest;
2642
+ if (token.type === "negate") {
2643
+ let extglobStar = star;
2644
+ if (token.inner && token.inner.length > 1 && token.inner.includes("/")) {
2645
+ extglobStar = globstar(opts);
2646
+ }
2647
+ if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
2648
+ output = token.close = `)$))${extglobStar}`;
2649
+ }
2650
+ if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
2651
+ const expression = parse(rest, { ...options, fastpaths: false }).output;
2652
+ output = token.close = `)${expression})${extglobStar})`;
2653
+ }
2654
+ if (token.prev.type === "bos") {
2655
+ state.negatedExtglob = true;
2656
+ }
2657
+ }
2658
+ push({ type: "paren", extglob: true, value, output });
2659
+ decrement("parens");
2660
+ };
2661
+ if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
2662
+ let backslashes = false;
2663
+ let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
2664
+ if (first === "\\") {
2665
+ backslashes = true;
2666
+ return m;
2667
+ }
2668
+ if (first === "?") {
2669
+ if (esc) {
2670
+ return esc + first + (rest ? QMARK.repeat(rest.length) : "");
2671
+ }
2672
+ if (index === 0) {
2673
+ return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
2674
+ }
2675
+ return QMARK.repeat(chars.length);
2676
+ }
2677
+ if (first === ".") {
2678
+ return DOT_LITERAL.repeat(chars.length);
2679
+ }
2680
+ if (first === "*") {
2681
+ if (esc) {
2682
+ return esc + first + (rest ? star : "");
2683
+ }
2684
+ return star;
2685
+ }
2686
+ return esc ? m : `\\${m}`;
2687
+ });
2688
+ if (backslashes === true) {
2689
+ if (opts.unescape === true) {
2690
+ output = output.replace(/\\/g, "");
2691
+ } else {
2692
+ output = output.replace(/\\+/g, (m) => {
2693
+ return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
2694
+ });
2695
+ }
2696
+ }
2697
+ if (output === input && opts.contains === true) {
2698
+ state.output = input;
2699
+ return state;
2700
+ }
2701
+ state.output = utils.wrapOutput(output, state, options);
2702
+ return state;
2703
+ }
2704
+ while (!eos()) {
2705
+ value = advance();
2706
+ if (value === "\0") {
2707
+ continue;
2708
+ }
2709
+ if (value === "\\") {
2710
+ const next = peek();
2711
+ if (next === "/" && opts.bash !== true) {
2712
+ continue;
2713
+ }
2714
+ if (next === "." || next === ";") {
2715
+ continue;
2716
+ }
2717
+ if (!next) {
2718
+ value += "\\";
2719
+ push({ type: "text", value });
2720
+ continue;
2721
+ }
2722
+ const match = /^\\+/.exec(remaining());
2723
+ let slashes = 0;
2724
+ if (match && match[0].length > 2) {
2725
+ slashes = match[0].length;
2726
+ state.index += slashes;
2727
+ if (slashes % 2 !== 0) {
2728
+ value += "\\";
2729
+ }
2730
+ }
2731
+ if (opts.unescape === true) {
2732
+ value = advance();
2733
+ } else {
2734
+ value += advance();
2735
+ }
2736
+ if (state.brackets === 0) {
2737
+ push({ type: "text", value });
2738
+ continue;
2739
+ }
2740
+ }
2741
+ if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
2742
+ if (opts.posix !== false && value === ":") {
2743
+ const inner = prev.value.slice(1);
2744
+ if (inner.includes("[")) {
2745
+ prev.posix = true;
2746
+ if (inner.includes(":")) {
2747
+ const idx = prev.value.lastIndexOf("[");
2748
+ const pre = prev.value.slice(0, idx);
2749
+ const rest2 = prev.value.slice(idx + 2);
2750
+ const posix = POSIX_REGEX_SOURCE[rest2];
2751
+ if (posix) {
2752
+ prev.value = pre + posix;
2753
+ state.backtrack = true;
2754
+ advance();
2755
+ if (!bos.output && tokens.indexOf(prev) === 1) {
2756
+ bos.output = ONE_CHAR;
2757
+ }
2758
+ continue;
2759
+ }
2760
+ }
2761
+ }
2762
+ }
2763
+ if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") {
2764
+ value = `\\${value}`;
2765
+ }
2766
+ if (value === "]" && (prev.value === "[" || prev.value === "[^")) {
2767
+ value = `\\${value}`;
2768
+ }
2769
+ if (opts.posix === true && value === "!" && prev.value === "[") {
2770
+ value = "^";
2771
+ }
2772
+ prev.value += value;
2773
+ append({ value });
2774
+ continue;
2775
+ }
2776
+ if (state.quotes === 1 && value !== '"') {
2777
+ value = utils.escapeRegex(value);
2778
+ prev.value += value;
2779
+ append({ value });
2780
+ continue;
2781
+ }
2782
+ if (value === '"') {
2783
+ state.quotes = state.quotes === 1 ? 0 : 1;
2784
+ if (opts.keepQuotes === true) {
2785
+ push({ type: "text", value });
2786
+ }
2787
+ continue;
2788
+ }
2789
+ if (value === "(") {
2790
+ increment("parens");
2791
+ push({ type: "paren", value });
2792
+ continue;
2793
+ }
2794
+ if (value === ")") {
2795
+ if (state.parens === 0 && opts.strictBrackets === true) {
2796
+ throw new SyntaxError(syntaxError("opening", "("));
2797
+ }
2798
+ const extglob = extglobs[extglobs.length - 1];
2799
+ if (extglob && state.parens === extglob.parens + 1) {
2800
+ extglobClose(extglobs.pop());
2801
+ continue;
2802
+ }
2803
+ push({ type: "paren", value, output: state.parens ? ")" : "\\)" });
2804
+ decrement("parens");
2805
+ continue;
2806
+ }
2807
+ if (value === "[") {
2808
+ if (opts.nobracket === true || !remaining().includes("]")) {
2809
+ if (opts.nobracket !== true && opts.strictBrackets === true) {
2810
+ throw new SyntaxError(syntaxError("closing", "]"));
2811
+ }
2812
+ value = `\\${value}`;
2813
+ } else {
2814
+ increment("brackets");
2815
+ }
2816
+ push({ type: "bracket", value });
2817
+ continue;
2818
+ }
2819
+ if (value === "]") {
2820
+ if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) {
2821
+ push({ type: "text", value, output: `\\${value}` });
2822
+ continue;
2823
+ }
2824
+ if (state.brackets === 0) {
2825
+ if (opts.strictBrackets === true) {
2826
+ throw new SyntaxError(syntaxError("opening", "["));
2827
+ }
2828
+ push({ type: "text", value, output: `\\${value}` });
2829
+ continue;
2830
+ }
2831
+ decrement("brackets");
2832
+ const prevValue = prev.value.slice(1);
2833
+ if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) {
2834
+ value = `/${value}`;
2835
+ }
2836
+ prev.value += value;
2837
+ append({ value });
2838
+ if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
2839
+ continue;
2840
+ }
2841
+ const escaped = utils.escapeRegex(prev.value);
2842
+ state.output = state.output.slice(0, -prev.value.length);
2843
+ if (opts.literalBrackets === true) {
2844
+ state.output += escaped;
2845
+ prev.value = escaped;
2846
+ continue;
2847
+ }
2848
+ prev.value = `(${capture}${escaped}|${prev.value})`;
2849
+ state.output += prev.value;
2850
+ continue;
2851
+ }
2852
+ if (value === "{" && opts.nobrace !== true) {
2853
+ increment("braces");
2854
+ const open = {
2855
+ type: "brace",
2856
+ value,
2857
+ output: "(",
2858
+ outputIndex: state.output.length,
2859
+ tokensIndex: state.tokens.length
2860
+ };
2861
+ braces.push(open);
2862
+ push(open);
2863
+ continue;
2864
+ }
2865
+ if (value === "}") {
2866
+ const brace = braces[braces.length - 1];
2867
+ if (opts.nobrace === true || !brace) {
2868
+ push({ type: "text", value, output: value });
2869
+ continue;
2870
+ }
2871
+ let output = ")";
2872
+ if (brace.dots === true) {
2873
+ const arr = tokens.slice();
2874
+ const range = [];
2875
+ for (let i = arr.length - 1; i >= 0; i--) {
2876
+ tokens.pop();
2877
+ if (arr[i].type === "brace") {
2878
+ break;
2879
+ }
2880
+ if (arr[i].type !== "dots") {
2881
+ range.unshift(arr[i].value);
2882
+ }
2883
+ }
2884
+ output = expandRange(range, opts);
2885
+ state.backtrack = true;
2886
+ }
2887
+ if (brace.comma !== true && brace.dots !== true) {
2888
+ const out = state.output.slice(0, brace.outputIndex);
2889
+ const toks = state.tokens.slice(brace.tokensIndex);
2890
+ brace.value = brace.output = "\\{";
2891
+ value = output = "\\}";
2892
+ state.output = out;
2893
+ for (const t of toks) {
2894
+ state.output += t.output || t.value;
2895
+ }
2896
+ }
2897
+ push({ type: "brace", value, output });
2898
+ decrement("braces");
2899
+ braces.pop();
2900
+ continue;
2901
+ }
2902
+ if (value === "|") {
2903
+ if (extglobs.length > 0) {
2904
+ extglobs[extglobs.length - 1].conditions++;
2905
+ }
2906
+ push({ type: "text", value });
2907
+ continue;
2908
+ }
2909
+ if (value === ",") {
2910
+ let output = value;
2911
+ const brace = braces[braces.length - 1];
2912
+ if (brace && stack[stack.length - 1] === "braces") {
2913
+ brace.comma = true;
2914
+ output = "|";
2915
+ }
2916
+ push({ type: "comma", value, output });
2917
+ continue;
2918
+ }
2919
+ if (value === "/") {
2920
+ if (prev.type === "dot" && state.index === state.start + 1) {
2921
+ state.start = state.index + 1;
2922
+ state.consumed = "";
2923
+ state.output = "";
2924
+ tokens.pop();
2925
+ prev = bos;
2926
+ continue;
2927
+ }
2928
+ push({ type: "slash", value, output: SLASH_LITERAL });
2929
+ continue;
2930
+ }
2931
+ if (value === ".") {
2932
+ if (state.braces > 0 && prev.type === "dot") {
2933
+ if (prev.value === ".")
2934
+ prev.output = DOT_LITERAL;
2935
+ const brace = braces[braces.length - 1];
2936
+ prev.type = "dots";
2937
+ prev.output += value;
2938
+ prev.value += value;
2939
+ brace.dots = true;
2940
+ continue;
2941
+ }
2942
+ if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
2943
+ push({ type: "text", value, output: DOT_LITERAL });
2944
+ continue;
2945
+ }
2946
+ push({ type: "dot", value, output: DOT_LITERAL });
2947
+ continue;
2948
+ }
2949
+ if (value === "?") {
2950
+ const isGroup = prev && prev.value === "(";
2951
+ if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
2952
+ extglobOpen("qmark", value);
2953
+ continue;
2954
+ }
2955
+ if (prev && prev.type === "paren") {
2956
+ const next = peek();
2957
+ let output = value;
2958
+ if (next === "<" && !utils.supportsLookbehinds()) {
2959
+ throw new Error("Node.js v10 or higher is required for regex lookbehinds");
2960
+ }
2961
+ if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) {
2962
+ output = `\\${value}`;
2963
+ }
2964
+ push({ type: "text", value, output });
2965
+ continue;
2966
+ }
2967
+ if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) {
2968
+ push({ type: "qmark", value, output: QMARK_NO_DOT });
2969
+ continue;
2970
+ }
2971
+ push({ type: "qmark", value, output: QMARK });
2972
+ continue;
2973
+ }
2974
+ if (value === "!") {
2975
+ if (opts.noextglob !== true && peek() === "(") {
2976
+ if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) {
2977
+ extglobOpen("negate", value);
2978
+ continue;
2979
+ }
2980
+ }
2981
+ if (opts.nonegate !== true && state.index === 0) {
2982
+ negate();
2983
+ continue;
2984
+ }
2985
+ }
2986
+ if (value === "+") {
2987
+ if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
2988
+ extglobOpen("plus", value);
2989
+ continue;
2990
+ }
2991
+ if (prev && prev.value === "(" || opts.regex === false) {
2992
+ push({ type: "plus", value, output: PLUS_LITERAL });
2993
+ continue;
2994
+ }
2995
+ if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) {
2996
+ push({ type: "plus", value });
2997
+ continue;
2998
+ }
2999
+ push({ type: "plus", value: PLUS_LITERAL });
3000
+ continue;
3001
+ }
3002
+ if (value === "@") {
3003
+ if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
3004
+ push({ type: "at", extglob: true, value, output: "" });
3005
+ continue;
3006
+ }
3007
+ push({ type: "text", value });
3008
+ continue;
3009
+ }
3010
+ if (value !== "*") {
3011
+ if (value === "$" || value === "^") {
3012
+ value = `\\${value}`;
3013
+ }
3014
+ const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
3015
+ if (match) {
3016
+ value += match[0];
3017
+ state.index += match[0].length;
3018
+ }
3019
+ push({ type: "text", value });
3020
+ continue;
3021
+ }
3022
+ if (prev && (prev.type === "globstar" || prev.star === true)) {
3023
+ prev.type = "star";
3024
+ prev.star = true;
3025
+ prev.value += value;
3026
+ prev.output = star;
3027
+ state.backtrack = true;
3028
+ state.globstar = true;
3029
+ consume(value);
3030
+ continue;
3031
+ }
3032
+ let rest = remaining();
3033
+ if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
3034
+ extglobOpen("star", value);
3035
+ continue;
3036
+ }
3037
+ if (prev.type === "star") {
3038
+ if (opts.noglobstar === true) {
3039
+ consume(value);
3040
+ continue;
3041
+ }
3042
+ const prior = prev.prev;
3043
+ const before = prior.prev;
3044
+ const isStart = prior.type === "slash" || prior.type === "bos";
3045
+ const afterStar = before && (before.type === "star" || before.type === "globstar");
3046
+ if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) {
3047
+ push({ type: "star", value, output: "" });
3048
+ continue;
3049
+ }
3050
+ const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace");
3051
+ const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
3052
+ if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
3053
+ push({ type: "star", value, output: "" });
3054
+ continue;
3055
+ }
3056
+ while (rest.slice(0, 3) === "/**") {
3057
+ const after = input[state.index + 4];
3058
+ if (after && after !== "/") {
3059
+ break;
3060
+ }
3061
+ rest = rest.slice(3);
3062
+ consume("/**", 3);
3063
+ }
3064
+ if (prior.type === "bos" && eos()) {
3065
+ prev.type = "globstar";
3066
+ prev.value += value;
3067
+ prev.output = globstar(opts);
3068
+ state.output = prev.output;
3069
+ state.globstar = true;
3070
+ consume(value);
3071
+ continue;
3072
+ }
3073
+ if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) {
3074
+ state.output = state.output.slice(0, -(prior.output + prev.output).length);
3075
+ prior.output = `(?:${prior.output}`;
3076
+ prev.type = "globstar";
3077
+ prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)");
3078
+ prev.value += value;
3079
+ state.globstar = true;
3080
+ state.output += prior.output + prev.output;
3081
+ consume(value);
3082
+ continue;
3083
+ }
3084
+ if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") {
3085
+ const end = rest[1] !== void 0 ? "|$" : "";
3086
+ state.output = state.output.slice(0, -(prior.output + prev.output).length);
3087
+ prior.output = `(?:${prior.output}`;
3088
+ prev.type = "globstar";
3089
+ prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
3090
+ prev.value += value;
3091
+ state.output += prior.output + prev.output;
3092
+ state.globstar = true;
3093
+ consume(value + advance());
3094
+ push({ type: "slash", value: "/", output: "" });
3095
+ continue;
3096
+ }
3097
+ if (prior.type === "bos" && rest[0] === "/") {
3098
+ prev.type = "globstar";
3099
+ prev.value += value;
3100
+ prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
3101
+ state.output = prev.output;
3102
+ state.globstar = true;
3103
+ consume(value + advance());
3104
+ push({ type: "slash", value: "/", output: "" });
3105
+ continue;
3106
+ }
3107
+ state.output = state.output.slice(0, -prev.output.length);
3108
+ prev.type = "globstar";
3109
+ prev.output = globstar(opts);
3110
+ prev.value += value;
3111
+ state.output += prev.output;
3112
+ state.globstar = true;
3113
+ consume(value);
3114
+ continue;
3115
+ }
3116
+ const token = { type: "star", value, output: star };
3117
+ if (opts.bash === true) {
3118
+ token.output = ".*?";
3119
+ if (prev.type === "bos" || prev.type === "slash") {
3120
+ token.output = nodot + token.output;
3121
+ }
3122
+ push(token);
3123
+ continue;
3124
+ }
3125
+ if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) {
3126
+ token.output = value;
3127
+ push(token);
3128
+ continue;
3129
+ }
3130
+ if (state.index === state.start || prev.type === "slash" || prev.type === "dot") {
3131
+ if (prev.type === "dot") {
3132
+ state.output += NO_DOT_SLASH;
3133
+ prev.output += NO_DOT_SLASH;
3134
+ } else if (opts.dot === true) {
3135
+ state.output += NO_DOTS_SLASH;
3136
+ prev.output += NO_DOTS_SLASH;
3137
+ } else {
3138
+ state.output += nodot;
3139
+ prev.output += nodot;
3140
+ }
3141
+ if (peek() !== "*") {
3142
+ state.output += ONE_CHAR;
3143
+ prev.output += ONE_CHAR;
3144
+ }
3145
+ }
3146
+ push(token);
3147
+ }
3148
+ while (state.brackets > 0) {
3149
+ if (opts.strictBrackets === true)
3150
+ throw new SyntaxError(syntaxError("closing", "]"));
3151
+ state.output = utils.escapeLast(state.output, "[");
3152
+ decrement("brackets");
3153
+ }
3154
+ while (state.parens > 0) {
3155
+ if (opts.strictBrackets === true)
3156
+ throw new SyntaxError(syntaxError("closing", ")"));
3157
+ state.output = utils.escapeLast(state.output, "(");
3158
+ decrement("parens");
3159
+ }
3160
+ while (state.braces > 0) {
3161
+ if (opts.strictBrackets === true)
3162
+ throw new SyntaxError(syntaxError("closing", "}"));
3163
+ state.output = utils.escapeLast(state.output, "{");
3164
+ decrement("braces");
3165
+ }
3166
+ if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) {
3167
+ push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` });
3168
+ }
3169
+ if (state.backtrack === true) {
3170
+ state.output = "";
3171
+ for (const token of state.tokens) {
3172
+ state.output += token.output != null ? token.output : token.value;
3173
+ if (token.suffix) {
3174
+ state.output += token.suffix;
3175
+ }
3176
+ }
3177
+ }
3178
+ return state;
3179
+ };
3180
+ parse.fastpaths = (input, options) => {
3181
+ const opts = { ...options };
3182
+ const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
3183
+ const len = input.length;
3184
+ if (len > max) {
3185
+ throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
3186
+ }
3187
+ input = REPLACEMENTS[input] || input;
3188
+ const win32 = utils.isWindows(options);
3189
+ const {
3190
+ DOT_LITERAL,
3191
+ SLASH_LITERAL,
3192
+ ONE_CHAR,
3193
+ DOTS_SLASH,
3194
+ NO_DOT,
3195
+ NO_DOTS,
3196
+ NO_DOTS_SLASH,
3197
+ STAR,
3198
+ START_ANCHOR
3199
+ } = constants.globChars(win32);
3200
+ const nodot = opts.dot ? NO_DOTS : NO_DOT;
3201
+ const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
3202
+ const capture = opts.capture ? "" : "?:";
3203
+ const state = { negated: false, prefix: "" };
3204
+ let star = opts.bash === true ? ".*?" : STAR;
3205
+ if (opts.capture) {
3206
+ star = `(${star})`;
3207
+ }
3208
+ const globstar = (opts2) => {
3209
+ if (opts2.noglobstar === true)
3210
+ return star;
3211
+ return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
3212
+ };
3213
+ const create = (str) => {
3214
+ switch (str) {
3215
+ case "*":
3216
+ return `${nodot}${ONE_CHAR}${star}`;
3217
+ case ".*":
3218
+ return `${DOT_LITERAL}${ONE_CHAR}${star}`;
3219
+ case "*.*":
3220
+ return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
3221
+ case "*/*":
3222
+ return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
3223
+ case "**":
3224
+ return nodot + globstar(opts);
3225
+ case "**/*":
3226
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
3227
+ case "**/*.*":
3228
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
3229
+ case "**/.*":
3230
+ return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
3231
+ default: {
3232
+ const match = /^(.*?)\.(\w+)$/.exec(str);
3233
+ if (!match)
3234
+ return;
3235
+ const source2 = create(match[1]);
3236
+ if (!source2)
3237
+ return;
3238
+ return source2 + DOT_LITERAL + match[2];
3239
+ }
3240
+ }
3241
+ };
3242
+ const output = utils.removePrefix(input, state);
3243
+ let source = create(output);
3244
+ if (source && opts.strictSlashes !== true) {
3245
+ source += `${SLASH_LITERAL}?`;
3246
+ }
3247
+ return source;
3248
+ };
3249
+ module2.exports = parse;
3250
+ }
3251
+ });
3252
+
3253
+ // ../../node_modules/picomatch/lib/picomatch.js
3254
+ var require_picomatch = __commonJS({
3255
+ "../../node_modules/picomatch/lib/picomatch.js"(exports, module2) {
3256
+ "use strict";
3257
+ var path = require("path");
3258
+ var scan = require_scan();
3259
+ var parse = require_parse2();
3260
+ var utils = require_utils2();
3261
+ var constants = require_constants2();
3262
+ var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
3263
+ var picomatch = (glob, options, returnState = false) => {
3264
+ if (Array.isArray(glob)) {
3265
+ const fns = glob.map((input) => picomatch(input, options, returnState));
3266
+ const arrayMatcher = (str) => {
3267
+ for (const isMatch of fns) {
3268
+ const state2 = isMatch(str);
3269
+ if (state2)
3270
+ return state2;
3271
+ }
3272
+ return false;
3273
+ };
3274
+ return arrayMatcher;
3275
+ }
3276
+ const isState = isObject(glob) && glob.tokens && glob.input;
3277
+ if (glob === "" || typeof glob !== "string" && !isState) {
3278
+ throw new TypeError("Expected pattern to be a non-empty string");
3279
+ }
3280
+ const opts = options || {};
3281
+ const posix = utils.isWindows(options);
3282
+ const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
3283
+ const state = regex.state;
3284
+ delete regex.state;
3285
+ let isIgnored = () => false;
3286
+ if (opts.ignore) {
3287
+ const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
3288
+ isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
3289
+ }
3290
+ const matcher = (input, returnObject = false) => {
3291
+ const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
3292
+ const result = { glob, state, regex, posix, input, output, match, isMatch };
3293
+ if (typeof opts.onResult === "function") {
3294
+ opts.onResult(result);
3295
+ }
3296
+ if (isMatch === false) {
3297
+ result.isMatch = false;
3298
+ return returnObject ? result : false;
3299
+ }
3300
+ if (isIgnored(input)) {
3301
+ if (typeof opts.onIgnore === "function") {
3302
+ opts.onIgnore(result);
3303
+ }
3304
+ result.isMatch = false;
3305
+ return returnObject ? result : false;
3306
+ }
3307
+ if (typeof opts.onMatch === "function") {
3308
+ opts.onMatch(result);
3309
+ }
3310
+ return returnObject ? result : true;
3311
+ };
3312
+ if (returnState) {
3313
+ matcher.state = state;
3314
+ }
3315
+ return matcher;
3316
+ };
3317
+ picomatch.test = (input, regex, options, { glob, posix } = {}) => {
3318
+ if (typeof input !== "string") {
3319
+ throw new TypeError("Expected input to be a string");
3320
+ }
3321
+ if (input === "") {
3322
+ return { isMatch: false, output: "" };
3323
+ }
3324
+ const opts = options || {};
3325
+ const format = opts.format || (posix ? utils.toPosixSlashes : null);
3326
+ let match = input === glob;
3327
+ let output = match && format ? format(input) : input;
3328
+ if (match === false) {
3329
+ output = format ? format(input) : input;
3330
+ match = output === glob;
3331
+ }
3332
+ if (match === false || opts.capture === true) {
3333
+ if (opts.matchBase === true || opts.basename === true) {
3334
+ match = picomatch.matchBase(input, regex, options, posix);
3335
+ } else {
3336
+ match = regex.exec(output);
3337
+ }
3338
+ }
3339
+ return { isMatch: Boolean(match), match, output };
3340
+ };
3341
+ picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
3342
+ const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
3343
+ return regex.test(path.basename(input));
3344
+ };
3345
+ picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
3346
+ picomatch.parse = (pattern, options) => {
3347
+ if (Array.isArray(pattern))
3348
+ return pattern.map((p) => picomatch.parse(p, options));
3349
+ return parse(pattern, { ...options, fastpaths: false });
3350
+ };
3351
+ picomatch.scan = (input, options) => scan(input, options);
3352
+ picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
3353
+ if (returnOutput === true) {
3354
+ return state.output;
3355
+ }
3356
+ const opts = options || {};
3357
+ const prepend = opts.contains ? "" : "^";
3358
+ const append = opts.contains ? "" : "$";
3359
+ let source = `${prepend}(?:${state.output})${append}`;
3360
+ if (state && state.negated === true) {
3361
+ source = `^(?!${source}).*$`;
3362
+ }
3363
+ const regex = picomatch.toRegex(source, options);
3364
+ if (returnState === true) {
3365
+ regex.state = state;
3366
+ }
3367
+ return regex;
3368
+ };
3369
+ picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
3370
+ if (!input || typeof input !== "string") {
3371
+ throw new TypeError("Expected a non-empty string");
3372
+ }
3373
+ let parsed = { negated: false, fastpaths: true };
3374
+ if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
3375
+ parsed.output = parse.fastpaths(input, options);
3376
+ }
3377
+ if (!parsed.output) {
3378
+ parsed = parse(input, options);
3379
+ }
3380
+ return picomatch.compileRe(parsed, options, returnOutput, returnState);
3381
+ };
3382
+ picomatch.toRegex = (source, options) => {
3383
+ try {
3384
+ const opts = options || {};
3385
+ return new RegExp(source, opts.flags || (opts.nocase ? "i" : ""));
3386
+ } catch (err) {
3387
+ if (options && options.debug === true)
3388
+ throw err;
3389
+ return /$^/;
3390
+ }
3391
+ };
3392
+ picomatch.constants = constants;
3393
+ module2.exports = picomatch;
3394
+ }
3395
+ });
3396
+
3397
+ // ../../node_modules/picomatch/index.js
3398
+ var require_picomatch2 = __commonJS({
3399
+ "../../node_modules/picomatch/index.js"(exports, module2) {
3400
+ "use strict";
3401
+ module2.exports = require_picomatch();
3402
+ }
3403
+ });
3404
+
3405
+ // ../../node_modules/micromatch/index.js
3406
+ var require_micromatch = __commonJS({
3407
+ "../../node_modules/micromatch/index.js"(exports, module2) {
3408
+ "use strict";
3409
+ var util = require("util");
3410
+ var braces = require_braces();
3411
+ var picomatch = require_picomatch2();
3412
+ var utils = require_utils2();
3413
+ var isEmptyString = (val) => val === "" || val === "./";
3414
+ var micromatch = (list, patterns, options) => {
3415
+ patterns = [].concat(patterns);
3416
+ list = [].concat(list);
3417
+ let omit = /* @__PURE__ */ new Set();
3418
+ let keep = /* @__PURE__ */ new Set();
3419
+ let items = /* @__PURE__ */ new Set();
3420
+ let negatives = 0;
3421
+ let onResult = (state) => {
3422
+ items.add(state.output);
3423
+ if (options && options.onResult) {
3424
+ options.onResult(state);
3425
+ }
3426
+ };
3427
+ for (let i = 0; i < patterns.length; i++) {
3428
+ let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
3429
+ let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
3430
+ if (negated)
3431
+ negatives++;
3432
+ for (let item of list) {
3433
+ let matched = isMatch(item, true);
3434
+ let match = negated ? !matched.isMatch : matched.isMatch;
3435
+ if (!match)
3436
+ continue;
3437
+ if (negated) {
3438
+ omit.add(matched.output);
3439
+ } else {
3440
+ omit.delete(matched.output);
3441
+ keep.add(matched.output);
3442
+ }
3443
+ }
3444
+ }
3445
+ let result = negatives === patterns.length ? [...items] : [...keep];
3446
+ let matches = result.filter((item) => !omit.has(item));
3447
+ if (options && matches.length === 0) {
3448
+ if (options.failglob === true) {
3449
+ throw new Error(`No matches found for "${patterns.join(", ")}"`);
3450
+ }
3451
+ if (options.nonull === true || options.nullglob === true) {
3452
+ return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
3453
+ }
3454
+ }
3455
+ return matches;
3456
+ };
3457
+ micromatch.match = micromatch;
3458
+ micromatch.matcher = (pattern, options) => picomatch(pattern, options);
3459
+ micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
3460
+ micromatch.any = micromatch.isMatch;
3461
+ micromatch.not = (list, patterns, options = {}) => {
3462
+ patterns = [].concat(patterns).map(String);
3463
+ let result = /* @__PURE__ */ new Set();
3464
+ let items = [];
3465
+ let onResult = (state) => {
3466
+ if (options.onResult)
3467
+ options.onResult(state);
3468
+ items.push(state.output);
3469
+ };
3470
+ let matches = new Set(micromatch(list, patterns, { ...options, onResult }));
3471
+ for (let item of items) {
3472
+ if (!matches.has(item)) {
3473
+ result.add(item);
3474
+ }
3475
+ }
3476
+ return [...result];
3477
+ };
3478
+ micromatch.contains = (str, pattern, options) => {
3479
+ if (typeof str !== "string") {
3480
+ throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
3481
+ }
3482
+ if (Array.isArray(pattern)) {
3483
+ return pattern.some((p) => micromatch.contains(str, p, options));
3484
+ }
3485
+ if (typeof pattern === "string") {
3486
+ if (isEmptyString(str) || isEmptyString(pattern)) {
3487
+ return false;
3488
+ }
3489
+ if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) {
3490
+ return true;
3491
+ }
3492
+ }
3493
+ return micromatch.isMatch(str, pattern, { ...options, contains: true });
3494
+ };
3495
+ micromatch.matchKeys = (obj, patterns, options) => {
3496
+ if (!utils.isObject(obj)) {
3497
+ throw new TypeError("Expected the first argument to be an object");
3498
+ }
3499
+ let keys = micromatch(Object.keys(obj), patterns, options);
3500
+ let res = {};
3501
+ for (let key of keys)
3502
+ res[key] = obj[key];
3503
+ return res;
3504
+ };
3505
+ micromatch.some = (list, patterns, options) => {
3506
+ let items = [].concat(list);
3507
+ for (let pattern of [].concat(patterns)) {
3508
+ let isMatch = picomatch(String(pattern), options);
3509
+ if (items.some((item) => isMatch(item))) {
3510
+ return true;
3511
+ }
3512
+ }
3513
+ return false;
3514
+ };
3515
+ micromatch.every = (list, patterns, options) => {
3516
+ let items = [].concat(list);
3517
+ for (let pattern of [].concat(patterns)) {
3518
+ let isMatch = picomatch(String(pattern), options);
3519
+ if (!items.every((item) => isMatch(item))) {
3520
+ return false;
3521
+ }
3522
+ }
3523
+ return true;
3524
+ };
3525
+ micromatch.all = (str, patterns, options) => {
3526
+ if (typeof str !== "string") {
3527
+ throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
3528
+ }
3529
+ return [].concat(patterns).every((p) => picomatch(p, options)(str));
3530
+ };
3531
+ micromatch.capture = (glob, input, options) => {
3532
+ let posix = utils.isWindows(options);
3533
+ let regex = picomatch.makeRe(String(glob), { ...options, capture: true });
3534
+ let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
3535
+ if (match) {
3536
+ return match.slice(1).map((v) => v === void 0 ? "" : v);
3537
+ }
3538
+ };
3539
+ micromatch.makeRe = (...args) => picomatch.makeRe(...args);
3540
+ micromatch.scan = (...args) => picomatch.scan(...args);
3541
+ micromatch.parse = (patterns, options) => {
3542
+ let res = [];
3543
+ for (let pattern of [].concat(patterns || [])) {
3544
+ for (let str of braces(String(pattern), options)) {
3545
+ res.push(picomatch.parse(str, options));
3546
+ }
3547
+ }
3548
+ return res;
3549
+ };
3550
+ micromatch.braces = (pattern, options) => {
3551
+ if (typeof pattern !== "string")
3552
+ throw new TypeError("Expected a string");
3553
+ if (options && options.nobrace === true || !/\{.*\}/.test(pattern)) {
3554
+ return [pattern];
3555
+ }
3556
+ return braces(pattern, options);
3557
+ };
3558
+ micromatch.braceExpand = (pattern, options) => {
3559
+ if (typeof pattern !== "string")
3560
+ throw new TypeError("Expected a string");
3561
+ return micromatch.braces(pattern, { ...options, expand: true });
3562
+ };
3563
+ module2.exports = micromatch;
3564
+ }
3565
+ });
3566
+
3567
+ // ../../node_modules/findup-sync/index.js
3568
+ var require_findup_sync = __commonJS({
3569
+ "../../node_modules/findup-sync/index.js"(exports, module2) {
3570
+ "use strict";
3571
+ var fs2 = require("fs");
3572
+ var path = require("path");
3573
+ var isGlob = require_is_glob();
3574
+ var resolveDir = require_resolve_dir();
3575
+ var detect = require_detect_file();
3576
+ var mm = require_micromatch();
3577
+ module2.exports = function(patterns, options) {
3578
+ options = options || {};
3579
+ var cwd = path.resolve(resolveDir(options.cwd || ""));
3580
+ if (typeof patterns === "string") {
3581
+ return lookup(cwd, [patterns], options);
3582
+ }
3583
+ if (!Array.isArray(patterns)) {
3584
+ throw new TypeError(
3585
+ "findup-sync expects a string or array as the first argument."
3586
+ );
3587
+ }
3588
+ return lookup(cwd, patterns, options);
3589
+ };
3590
+ function lookup(cwd, patterns, options) {
3591
+ var len = patterns.length;
3592
+ var idx = -1;
3593
+ var res;
3594
+ while (++idx < len) {
3595
+ if (isGlob(patterns[idx])) {
3596
+ res = matchFile(cwd, patterns[idx], options);
3597
+ } else {
3598
+ res = findFile(cwd, patterns[idx], options);
3599
+ }
3600
+ if (res) {
3601
+ return res;
3602
+ }
3603
+ }
3604
+ var dir = path.dirname(cwd);
3605
+ if (dir === cwd) {
3606
+ return null;
3607
+ }
3608
+ return lookup(dir, patterns, options);
3609
+ }
3610
+ function matchFile(cwd, pattern, opts) {
3611
+ var isMatch = mm.matcher(pattern, opts);
3612
+ var files = tryReaddirSync(cwd);
3613
+ var len = files.length;
3614
+ var idx = -1;
3615
+ while (++idx < len) {
3616
+ var name = files[idx];
3617
+ var fp = path.join(cwd, name);
3618
+ if (isMatch(name) || isMatch(fp)) {
3619
+ return fp;
3620
+ }
3621
+ }
3622
+ return null;
3623
+ }
3624
+ function findFile(cwd, filename, options) {
3625
+ var fp = path.resolve(cwd, filename);
3626
+ return detect(fp, options);
3627
+ }
3628
+ function tryReaddirSync(fp) {
3629
+ try {
3630
+ return fs2.readdirSync(fp);
3631
+ } catch (err) {
3632
+ }
3633
+ return [];
3634
+ }
3635
+ }
3636
+ });
3637
+
22
3638
  // src/cli.ts
23
3639
  var fs = __toESM(require("fs"));
3640
+
3641
+ // src/createApiTemplate.ts
3642
+ var import_graphql_compose = require("graphql-compose");
3643
+
3644
+ // ../carlin/src/utils/packageJson.ts
3645
+ var import_findup_sync = __toESM(require_findup_sync());
3646
+
3647
+ // src/createApiTemplate.ts
3648
+ var AppSyncGraphQLSchemaLogicalId = "AppSyncGraphQLSchema";
3649
+
3650
+ // src/cli.ts
24
3651
  var import_cloudformation = require("@ttoss/cloudformation");
25
3652
  var import_minimist = __toESM(require("minimist"));
26
3653
  var argv = (0, import_minimist.default)(process.argv.slice(2));
27
- var AppSyncGraphQLSchemaLogicalId = "AppSyncGraphQLSchema";
28
3654
  if (argv._.includes("build-schema")) {
29
3655
  const template = (0, import_cloudformation.findAndReadCloudFormationTemplate)({});
30
3656
  const sdl = template.Resources[AppSyncGraphQLSchemaLogicalId].Properties.Definition;
3657
+ console.log(sdl);
31
3658
  fs.mkdirSync("schema", { recursive: true });
32
3659
  fs.writeFileSync("schema/schema.graphql", sdl);
33
3660
  }
3661
+ /*!
3662
+ * detect-file <https://github.com/doowb/detect-file>
3663
+ *
3664
+ * Copyright (c) 2016-2017, Brian Woodward.
3665
+ * Released under the MIT License.
3666
+ */
3667
+ /*!
3668
+ * expand-tilde <https://github.com/jonschlinkert/expand-tilde>
3669
+ *
3670
+ * Copyright (c) 2015 Jon Schlinkert.
3671
+ * Licensed under the MIT license.
3672
+ */
3673
+ /*!
3674
+ * fill-range <https://github.com/jonschlinkert/fill-range>
3675
+ *
3676
+ * Copyright (c) 2014-present, Jon Schlinkert.
3677
+ * Licensed under the MIT License.
3678
+ */
3679
+ /*!
3680
+ * global-modules <https://github.com/jonschlinkert/global-modules>
3681
+ *
3682
+ * Copyright (c) 2015-2017 Jon Schlinkert.
3683
+ * Licensed under the MIT license.
3684
+ */
3685
+ /*!
3686
+ * global-prefix <https://github.com/jonschlinkert/global-prefix>
3687
+ *
3688
+ * Copyright (c) 2015-2017 Jon Schlinkert.
3689
+ * Licensed under the MIT license.
3690
+ */
3691
+ /*!
3692
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
3693
+ *
3694
+ * Copyright (c) 2014-2016, Jon Schlinkert.
3695
+ * Licensed under the MIT License.
3696
+ */
3697
+ /*!
3698
+ * is-glob <https://github.com/jonschlinkert/is-glob>
3699
+ *
3700
+ * Copyright (c) 2014-2017, Jon Schlinkert.
3701
+ * Released under the MIT License.
3702
+ */
3703
+ /*!
3704
+ * is-number <https://github.com/jonschlinkert/is-number>
3705
+ *
3706
+ * Copyright (c) 2014-present, Jon Schlinkert.
3707
+ * Released under the MIT License.
3708
+ */
3709
+ /*!
3710
+ * is-windows <https://github.com/jonschlinkert/is-windows>
3711
+ *
3712
+ * Copyright © 2015-2018, Jon Schlinkert.
3713
+ * Released under the MIT License.
3714
+ */
3715
+ /*!
3716
+ * resolve-dir <https://github.com/jonschlinkert/resolve-dir>
3717
+ *
3718
+ * Copyright (c) 2015, Jon Schlinkert.
3719
+ * Licensed under the MIT License.
3720
+ */
3721
+ /*!
3722
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
3723
+ *
3724
+ * Copyright (c) 2015-present, Jon Schlinkert.
3725
+ * Released under the MIT License.
3726
+ */