@forsakringskassan/docs-generator 1.25.0 → 1.25.2

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/generator.js CHANGED
@@ -30,6 +30,2205 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
30
  ));
31
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
32
 
33
+ // node_modules/universalify/index.js
34
+ var require_universalify = __commonJS({
35
+ "node_modules/universalify/index.js"(exports2) {
36
+ "use strict";
37
+ exports2.fromCallback = function(fn) {
38
+ return Object.defineProperty(function(...args) {
39
+ if (typeof args[args.length - 1] === "function")
40
+ fn.apply(this, args);
41
+ else {
42
+ return new Promise((resolve, reject) => {
43
+ args.push((err, res) => err != null ? reject(err) : resolve(res));
44
+ fn.apply(this, args);
45
+ });
46
+ }
47
+ }, "name", { value: fn.name });
48
+ };
49
+ exports2.fromPromise = function(fn) {
50
+ return Object.defineProperty(function(...args) {
51
+ const cb = args[args.length - 1];
52
+ if (typeof cb !== "function")
53
+ return fn.apply(this, args);
54
+ else {
55
+ args.pop();
56
+ fn.apply(this, args).then((r) => cb(null, r), cb);
57
+ }
58
+ }, "name", { value: fn.name });
59
+ };
60
+ }
61
+ });
62
+
63
+ // node_modules/graceful-fs/polyfills.js
64
+ var require_polyfills = __commonJS({
65
+ "node_modules/graceful-fs/polyfills.js"(exports2, module2) {
66
+ var constants3 = require("constants");
67
+ var origCwd = process.cwd;
68
+ var cwd = null;
69
+ var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
70
+ process.cwd = function() {
71
+ if (!cwd)
72
+ cwd = origCwd.call(process);
73
+ return cwd;
74
+ };
75
+ try {
76
+ process.cwd();
77
+ } catch (er) {
78
+ }
79
+ if (typeof process.chdir === "function") {
80
+ chdir = process.chdir;
81
+ process.chdir = function(d) {
82
+ cwd = null;
83
+ chdir.call(process, d);
84
+ };
85
+ if (Object.setPrototypeOf)
86
+ Object.setPrototypeOf(process.chdir, chdir);
87
+ }
88
+ var chdir;
89
+ module2.exports = patch;
90
+ function patch(fs13) {
91
+ if (constants3.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
92
+ patchLchmod(fs13);
93
+ }
94
+ if (!fs13.lutimes) {
95
+ patchLutimes(fs13);
96
+ }
97
+ fs13.chown = chownFix(fs13.chown);
98
+ fs13.fchown = chownFix(fs13.fchown);
99
+ fs13.lchown = chownFix(fs13.lchown);
100
+ fs13.chmod = chmodFix(fs13.chmod);
101
+ fs13.fchmod = chmodFix(fs13.fchmod);
102
+ fs13.lchmod = chmodFix(fs13.lchmod);
103
+ fs13.chownSync = chownFixSync(fs13.chownSync);
104
+ fs13.fchownSync = chownFixSync(fs13.fchownSync);
105
+ fs13.lchownSync = chownFixSync(fs13.lchownSync);
106
+ fs13.chmodSync = chmodFixSync(fs13.chmodSync);
107
+ fs13.fchmodSync = chmodFixSync(fs13.fchmodSync);
108
+ fs13.lchmodSync = chmodFixSync(fs13.lchmodSync);
109
+ fs13.stat = statFix(fs13.stat);
110
+ fs13.fstat = statFix(fs13.fstat);
111
+ fs13.lstat = statFix(fs13.lstat);
112
+ fs13.statSync = statFixSync(fs13.statSync);
113
+ fs13.fstatSync = statFixSync(fs13.fstatSync);
114
+ fs13.lstatSync = statFixSync(fs13.lstatSync);
115
+ if (fs13.chmod && !fs13.lchmod) {
116
+ fs13.lchmod = function(path24, mode, cb) {
117
+ if (cb)
118
+ process.nextTick(cb);
119
+ };
120
+ fs13.lchmodSync = function() {
121
+ };
122
+ }
123
+ if (fs13.chown && !fs13.lchown) {
124
+ fs13.lchown = function(path24, uid, gid, cb) {
125
+ if (cb)
126
+ process.nextTick(cb);
127
+ };
128
+ fs13.lchownSync = function() {
129
+ };
130
+ }
131
+ if (platform === "win32") {
132
+ fs13.rename = typeof fs13.rename !== "function" ? fs13.rename : function(fs$rename) {
133
+ function rename(from, to, cb) {
134
+ var start = Date.now();
135
+ var backoff = 0;
136
+ fs$rename(from, to, function CB(er) {
137
+ if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
138
+ setTimeout(function() {
139
+ fs13.stat(to, function(stater, st) {
140
+ if (stater && stater.code === "ENOENT")
141
+ fs$rename(from, to, CB);
142
+ else
143
+ cb(er);
144
+ });
145
+ }, backoff);
146
+ if (backoff < 100)
147
+ backoff += 10;
148
+ return;
149
+ }
150
+ if (cb)
151
+ cb(er);
152
+ });
153
+ }
154
+ if (Object.setPrototypeOf)
155
+ Object.setPrototypeOf(rename, fs$rename);
156
+ return rename;
157
+ }(fs13.rename);
158
+ }
159
+ fs13.read = typeof fs13.read !== "function" ? fs13.read : function(fs$read) {
160
+ function read(fd, buffer, offset, length, position, callback_) {
161
+ var callback;
162
+ if (callback_ && typeof callback_ === "function") {
163
+ var eagCounter = 0;
164
+ callback = function(er, _, __) {
165
+ if (er && er.code === "EAGAIN" && eagCounter < 10) {
166
+ eagCounter++;
167
+ return fs$read.call(fs13, fd, buffer, offset, length, position, callback);
168
+ }
169
+ callback_.apply(this, arguments);
170
+ };
171
+ }
172
+ return fs$read.call(fs13, fd, buffer, offset, length, position, callback);
173
+ }
174
+ if (Object.setPrototypeOf)
175
+ Object.setPrototypeOf(read, fs$read);
176
+ return read;
177
+ }(fs13.read);
178
+ fs13.readSync = typeof fs13.readSync !== "function" ? fs13.readSync : /* @__PURE__ */ function(fs$readSync) {
179
+ return function(fd, buffer, offset, length, position) {
180
+ var eagCounter = 0;
181
+ while (true) {
182
+ try {
183
+ return fs$readSync.call(fs13, fd, buffer, offset, length, position);
184
+ } catch (er) {
185
+ if (er.code === "EAGAIN" && eagCounter < 10) {
186
+ eagCounter++;
187
+ continue;
188
+ }
189
+ throw er;
190
+ }
191
+ }
192
+ };
193
+ }(fs13.readSync);
194
+ function patchLchmod(fs14) {
195
+ fs14.lchmod = function(path24, mode, callback) {
196
+ fs14.open(
197
+ path24,
198
+ constants3.O_WRONLY | constants3.O_SYMLINK,
199
+ mode,
200
+ function(err, fd) {
201
+ if (err) {
202
+ if (callback)
203
+ callback(err);
204
+ return;
205
+ }
206
+ fs14.fchmod(fd, mode, function(err2) {
207
+ fs14.close(fd, function(err22) {
208
+ if (callback)
209
+ callback(err2 || err22);
210
+ });
211
+ });
212
+ }
213
+ );
214
+ };
215
+ fs14.lchmodSync = function(path24, mode) {
216
+ var fd = fs14.openSync(path24, constants3.O_WRONLY | constants3.O_SYMLINK, mode);
217
+ var threw = true;
218
+ var ret;
219
+ try {
220
+ ret = fs14.fchmodSync(fd, mode);
221
+ threw = false;
222
+ } finally {
223
+ if (threw) {
224
+ try {
225
+ fs14.closeSync(fd);
226
+ } catch (er) {
227
+ }
228
+ } else {
229
+ fs14.closeSync(fd);
230
+ }
231
+ }
232
+ return ret;
233
+ };
234
+ }
235
+ function patchLutimes(fs14) {
236
+ if (constants3.hasOwnProperty("O_SYMLINK") && fs14.futimes) {
237
+ fs14.lutimes = function(path24, at, mt, cb) {
238
+ fs14.open(path24, constants3.O_SYMLINK, function(er, fd) {
239
+ if (er) {
240
+ if (cb)
241
+ cb(er);
242
+ return;
243
+ }
244
+ fs14.futimes(fd, at, mt, function(er2) {
245
+ fs14.close(fd, function(er22) {
246
+ if (cb)
247
+ cb(er2 || er22);
248
+ });
249
+ });
250
+ });
251
+ };
252
+ fs14.lutimesSync = function(path24, at, mt) {
253
+ var fd = fs14.openSync(path24, constants3.O_SYMLINK);
254
+ var ret;
255
+ var threw = true;
256
+ try {
257
+ ret = fs14.futimesSync(fd, at, mt);
258
+ threw = false;
259
+ } finally {
260
+ if (threw) {
261
+ try {
262
+ fs14.closeSync(fd);
263
+ } catch (er) {
264
+ }
265
+ } else {
266
+ fs14.closeSync(fd);
267
+ }
268
+ }
269
+ return ret;
270
+ };
271
+ } else if (fs14.futimes) {
272
+ fs14.lutimes = function(_a3, _b, _c, cb) {
273
+ if (cb)
274
+ process.nextTick(cb);
275
+ };
276
+ fs14.lutimesSync = function() {
277
+ };
278
+ }
279
+ }
280
+ function chmodFix(orig) {
281
+ if (!orig)
282
+ return orig;
283
+ return function(target, mode, cb) {
284
+ return orig.call(fs13, target, mode, function(er) {
285
+ if (chownErOk(er))
286
+ er = null;
287
+ if (cb)
288
+ cb.apply(this, arguments);
289
+ });
290
+ };
291
+ }
292
+ function chmodFixSync(orig) {
293
+ if (!orig)
294
+ return orig;
295
+ return function(target, mode) {
296
+ try {
297
+ return orig.call(fs13, target, mode);
298
+ } catch (er) {
299
+ if (!chownErOk(er))
300
+ throw er;
301
+ }
302
+ };
303
+ }
304
+ function chownFix(orig) {
305
+ if (!orig)
306
+ return orig;
307
+ return function(target, uid, gid, cb) {
308
+ return orig.call(fs13, target, uid, gid, function(er) {
309
+ if (chownErOk(er))
310
+ er = null;
311
+ if (cb)
312
+ cb.apply(this, arguments);
313
+ });
314
+ };
315
+ }
316
+ function chownFixSync(orig) {
317
+ if (!orig)
318
+ return orig;
319
+ return function(target, uid, gid) {
320
+ try {
321
+ return orig.call(fs13, target, uid, gid);
322
+ } catch (er) {
323
+ if (!chownErOk(er))
324
+ throw er;
325
+ }
326
+ };
327
+ }
328
+ function statFix(orig) {
329
+ if (!orig)
330
+ return orig;
331
+ return function(target, options, cb) {
332
+ if (typeof options === "function") {
333
+ cb = options;
334
+ options = null;
335
+ }
336
+ function callback(er, stats) {
337
+ if (stats) {
338
+ if (stats.uid < 0)
339
+ stats.uid += 4294967296;
340
+ if (stats.gid < 0)
341
+ stats.gid += 4294967296;
342
+ }
343
+ if (cb)
344
+ cb.apply(this, arguments);
345
+ }
346
+ return options ? orig.call(fs13, target, options, callback) : orig.call(fs13, target, callback);
347
+ };
348
+ }
349
+ function statFixSync(orig) {
350
+ if (!orig)
351
+ return orig;
352
+ return function(target, options) {
353
+ var stats = options ? orig.call(fs13, target, options) : orig.call(fs13, target);
354
+ if (stats) {
355
+ if (stats.uid < 0)
356
+ stats.uid += 4294967296;
357
+ if (stats.gid < 0)
358
+ stats.gid += 4294967296;
359
+ }
360
+ return stats;
361
+ };
362
+ }
363
+ function chownErOk(er) {
364
+ if (!er)
365
+ return true;
366
+ if (er.code === "ENOSYS")
367
+ return true;
368
+ var nonroot = !process.getuid || process.getuid() !== 0;
369
+ if (nonroot) {
370
+ if (er.code === "EINVAL" || er.code === "EPERM")
371
+ return true;
372
+ }
373
+ return false;
374
+ }
375
+ }
376
+ }
377
+ });
378
+
379
+ // node_modules/graceful-fs/legacy-streams.js
380
+ var require_legacy_streams = __commonJS({
381
+ "node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
382
+ var Stream2 = require("stream").Stream;
383
+ module2.exports = legacy;
384
+ function legacy(fs13) {
385
+ return {
386
+ ReadStream,
387
+ WriteStream
388
+ };
389
+ function ReadStream(path24, options) {
390
+ if (!(this instanceof ReadStream))
391
+ return new ReadStream(path24, options);
392
+ Stream2.call(this);
393
+ var self2 = this;
394
+ this.path = path24;
395
+ this.fd = null;
396
+ this.readable = true;
397
+ this.paused = false;
398
+ this.flags = "r";
399
+ this.mode = 438;
400
+ this.bufferSize = 64 * 1024;
401
+ options = options || {};
402
+ var keys = Object.keys(options);
403
+ for (var index = 0, length = keys.length; index < length; index++) {
404
+ var key = keys[index];
405
+ this[key] = options[key];
406
+ }
407
+ if (this.encoding)
408
+ this.setEncoding(this.encoding);
409
+ if (this.start !== void 0) {
410
+ if ("number" !== typeof this.start) {
411
+ throw TypeError("start must be a Number");
412
+ }
413
+ if (this.end === void 0) {
414
+ this.end = Infinity;
415
+ } else if ("number" !== typeof this.end) {
416
+ throw TypeError("end must be a Number");
417
+ }
418
+ if (this.start > this.end) {
419
+ throw new Error("start must be <= end");
420
+ }
421
+ this.pos = this.start;
422
+ }
423
+ if (this.fd !== null) {
424
+ process.nextTick(function() {
425
+ self2._read();
426
+ });
427
+ return;
428
+ }
429
+ fs13.open(this.path, this.flags, this.mode, function(err, fd) {
430
+ if (err) {
431
+ self2.emit("error", err);
432
+ self2.readable = false;
433
+ return;
434
+ }
435
+ self2.fd = fd;
436
+ self2.emit("open", fd);
437
+ self2._read();
438
+ });
439
+ }
440
+ function WriteStream(path24, options) {
441
+ if (!(this instanceof WriteStream))
442
+ return new WriteStream(path24, options);
443
+ Stream2.call(this);
444
+ this.path = path24;
445
+ this.fd = null;
446
+ this.writable = true;
447
+ this.flags = "w";
448
+ this.encoding = "binary";
449
+ this.mode = 438;
450
+ this.bytesWritten = 0;
451
+ options = options || {};
452
+ var keys = Object.keys(options);
453
+ for (var index = 0, length = keys.length; index < length; index++) {
454
+ var key = keys[index];
455
+ this[key] = options[key];
456
+ }
457
+ if (this.start !== void 0) {
458
+ if ("number" !== typeof this.start) {
459
+ throw TypeError("start must be a Number");
460
+ }
461
+ if (this.start < 0) {
462
+ throw new Error("start must be >= zero");
463
+ }
464
+ this.pos = this.start;
465
+ }
466
+ this.busy = false;
467
+ this._queue = [];
468
+ if (this.fd === null) {
469
+ this._open = fs13.open;
470
+ this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
471
+ this.flush();
472
+ }
473
+ }
474
+ }
475
+ }
476
+ });
477
+
478
+ // node_modules/graceful-fs/clone.js
479
+ var require_clone = __commonJS({
480
+ "node_modules/graceful-fs/clone.js"(exports2, module2) {
481
+ "use strict";
482
+ module2.exports = clone;
483
+ var getPrototypeOf = Object.getPrototypeOf || function(obj) {
484
+ return obj.__proto__;
485
+ };
486
+ function clone(obj) {
487
+ if (obj === null || typeof obj !== "object")
488
+ return obj;
489
+ if (obj instanceof Object)
490
+ var copy = { __proto__: getPrototypeOf(obj) };
491
+ else
492
+ var copy = /* @__PURE__ */ Object.create(null);
493
+ Object.getOwnPropertyNames(obj).forEach(function(key) {
494
+ Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
495
+ });
496
+ return copy;
497
+ }
498
+ }
499
+ });
500
+
501
+ // node_modules/graceful-fs/graceful-fs.js
502
+ var require_graceful_fs = __commonJS({
503
+ "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
504
+ var fs13 = require("fs");
505
+ var polyfills = require_polyfills();
506
+ var legacy = require_legacy_streams();
507
+ var clone = require_clone();
508
+ var util = require("util");
509
+ var gracefulQueue;
510
+ var previousSymbol;
511
+ if (typeof Symbol === "function" && typeof Symbol.for === "function") {
512
+ gracefulQueue = Symbol.for("graceful-fs.queue");
513
+ previousSymbol = Symbol.for("graceful-fs.previous");
514
+ } else {
515
+ gracefulQueue = "___graceful-fs.queue";
516
+ previousSymbol = "___graceful-fs.previous";
517
+ }
518
+ function noop2() {
519
+ }
520
+ function publishQueue(context, queue2) {
521
+ Object.defineProperty(context, gracefulQueue, {
522
+ get: function() {
523
+ return queue2;
524
+ }
525
+ });
526
+ }
527
+ var debug = noop2;
528
+ if (util.debuglog)
529
+ debug = util.debuglog("gfs4");
530
+ else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
531
+ debug = function() {
532
+ var m = util.format.apply(util, arguments);
533
+ m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
534
+ console.error(m);
535
+ };
536
+ if (!fs13[gracefulQueue]) {
537
+ queue = global[gracefulQueue] || [];
538
+ publishQueue(fs13, queue);
539
+ fs13.close = function(fs$close) {
540
+ function close(fd, cb) {
541
+ return fs$close.call(fs13, fd, function(err) {
542
+ if (!err) {
543
+ resetQueue();
544
+ }
545
+ if (typeof cb === "function")
546
+ cb.apply(this, arguments);
547
+ });
548
+ }
549
+ Object.defineProperty(close, previousSymbol, {
550
+ value: fs$close
551
+ });
552
+ return close;
553
+ }(fs13.close);
554
+ fs13.closeSync = function(fs$closeSync) {
555
+ function closeSync(fd) {
556
+ fs$closeSync.apply(fs13, arguments);
557
+ resetQueue();
558
+ }
559
+ Object.defineProperty(closeSync, previousSymbol, {
560
+ value: fs$closeSync
561
+ });
562
+ return closeSync;
563
+ }(fs13.closeSync);
564
+ if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
565
+ process.on("exit", function() {
566
+ debug(fs13[gracefulQueue]);
567
+ require("assert").equal(fs13[gracefulQueue].length, 0);
568
+ });
569
+ }
570
+ }
571
+ var queue;
572
+ if (!global[gracefulQueue]) {
573
+ publishQueue(global, fs13[gracefulQueue]);
574
+ }
575
+ module2.exports = patch(clone(fs13));
576
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs13.__patched) {
577
+ module2.exports = patch(fs13);
578
+ fs13.__patched = true;
579
+ }
580
+ function patch(fs14) {
581
+ polyfills(fs14);
582
+ fs14.gracefulify = patch;
583
+ fs14.createReadStream = createReadStream2;
584
+ fs14.createWriteStream = createWriteStream2;
585
+ var fs$readFile = fs14.readFile;
586
+ fs14.readFile = readFile;
587
+ function readFile(path24, options, cb) {
588
+ if (typeof options === "function")
589
+ cb = options, options = null;
590
+ return go$readFile(path24, options, cb);
591
+ function go$readFile(path25, options2, cb2, startTime) {
592
+ return fs$readFile(path25, options2, function(err) {
593
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
594
+ enqueue([go$readFile, [path25, options2, cb2], err, startTime || Date.now(), Date.now()]);
595
+ else {
596
+ if (typeof cb2 === "function")
597
+ cb2.apply(this, arguments);
598
+ }
599
+ });
600
+ }
601
+ }
602
+ var fs$writeFile = fs14.writeFile;
603
+ fs14.writeFile = writeFile;
604
+ function writeFile(path24, data, options, cb) {
605
+ if (typeof options === "function")
606
+ cb = options, options = null;
607
+ return go$writeFile(path24, data, options, cb);
608
+ function go$writeFile(path25, data2, options2, cb2, startTime) {
609
+ return fs$writeFile(path25, data2, options2, function(err) {
610
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
611
+ enqueue([go$writeFile, [path25, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
612
+ else {
613
+ if (typeof cb2 === "function")
614
+ cb2.apply(this, arguments);
615
+ }
616
+ });
617
+ }
618
+ }
619
+ var fs$appendFile = fs14.appendFile;
620
+ if (fs$appendFile)
621
+ fs14.appendFile = appendFile;
622
+ function appendFile(path24, data, options, cb) {
623
+ if (typeof options === "function")
624
+ cb = options, options = null;
625
+ return go$appendFile(path24, data, options, cb);
626
+ function go$appendFile(path25, data2, options2, cb2, startTime) {
627
+ return fs$appendFile(path25, data2, options2, function(err) {
628
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
629
+ enqueue([go$appendFile, [path25, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
630
+ else {
631
+ if (typeof cb2 === "function")
632
+ cb2.apply(this, arguments);
633
+ }
634
+ });
635
+ }
636
+ }
637
+ var fs$copyFile = fs14.copyFile;
638
+ if (fs$copyFile)
639
+ fs14.copyFile = copyFile;
640
+ function copyFile(src, dest, flags, cb) {
641
+ if (typeof flags === "function") {
642
+ cb = flags;
643
+ flags = 0;
644
+ }
645
+ return go$copyFile(src, dest, flags, cb);
646
+ function go$copyFile(src2, dest2, flags2, cb2, startTime) {
647
+ return fs$copyFile(src2, dest2, flags2, function(err) {
648
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
649
+ enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
650
+ else {
651
+ if (typeof cb2 === "function")
652
+ cb2.apply(this, arguments);
653
+ }
654
+ });
655
+ }
656
+ }
657
+ var fs$readdir = fs14.readdir;
658
+ fs14.readdir = readdir2;
659
+ var noReaddirOptionVersions = /^v[0-5]\./;
660
+ function readdir2(path24, options, cb) {
661
+ if (typeof options === "function")
662
+ cb = options, options = null;
663
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path25, options2, cb2, startTime) {
664
+ return fs$readdir(path25, fs$readdirCallback(
665
+ path25,
666
+ options2,
667
+ cb2,
668
+ startTime
669
+ ));
670
+ } : function go$readdir2(path25, options2, cb2, startTime) {
671
+ return fs$readdir(path25, options2, fs$readdirCallback(
672
+ path25,
673
+ options2,
674
+ cb2,
675
+ startTime
676
+ ));
677
+ };
678
+ return go$readdir(path24, options, cb);
679
+ function fs$readdirCallback(path25, options2, cb2, startTime) {
680
+ return function(err, files) {
681
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
682
+ enqueue([
683
+ go$readdir,
684
+ [path25, options2, cb2],
685
+ err,
686
+ startTime || Date.now(),
687
+ Date.now()
688
+ ]);
689
+ else {
690
+ if (files && files.sort)
691
+ files.sort();
692
+ if (typeof cb2 === "function")
693
+ cb2.call(this, err, files);
694
+ }
695
+ };
696
+ }
697
+ }
698
+ if (process.version.substr(0, 4) === "v0.8") {
699
+ var legStreams = legacy(fs14);
700
+ ReadStream = legStreams.ReadStream;
701
+ WriteStream = legStreams.WriteStream;
702
+ }
703
+ var fs$ReadStream = fs14.ReadStream;
704
+ if (fs$ReadStream) {
705
+ ReadStream.prototype = Object.create(fs$ReadStream.prototype);
706
+ ReadStream.prototype.open = ReadStream$open;
707
+ }
708
+ var fs$WriteStream = fs14.WriteStream;
709
+ if (fs$WriteStream) {
710
+ WriteStream.prototype = Object.create(fs$WriteStream.prototype);
711
+ WriteStream.prototype.open = WriteStream$open;
712
+ }
713
+ Object.defineProperty(fs14, "ReadStream", {
714
+ get: function() {
715
+ return ReadStream;
716
+ },
717
+ set: function(val) {
718
+ ReadStream = val;
719
+ },
720
+ enumerable: true,
721
+ configurable: true
722
+ });
723
+ Object.defineProperty(fs14, "WriteStream", {
724
+ get: function() {
725
+ return WriteStream;
726
+ },
727
+ set: function(val) {
728
+ WriteStream = val;
729
+ },
730
+ enumerable: true,
731
+ configurable: true
732
+ });
733
+ var FileReadStream = ReadStream;
734
+ Object.defineProperty(fs14, "FileReadStream", {
735
+ get: function() {
736
+ return FileReadStream;
737
+ },
738
+ set: function(val) {
739
+ FileReadStream = val;
740
+ },
741
+ enumerable: true,
742
+ configurable: true
743
+ });
744
+ var FileWriteStream = WriteStream;
745
+ Object.defineProperty(fs14, "FileWriteStream", {
746
+ get: function() {
747
+ return FileWriteStream;
748
+ },
749
+ set: function(val) {
750
+ FileWriteStream = val;
751
+ },
752
+ enumerable: true,
753
+ configurable: true
754
+ });
755
+ function ReadStream(path24, options) {
756
+ if (this instanceof ReadStream)
757
+ return fs$ReadStream.apply(this, arguments), this;
758
+ else
759
+ return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
760
+ }
761
+ function ReadStream$open() {
762
+ var that = this;
763
+ open(that.path, that.flags, that.mode, function(err, fd) {
764
+ if (err) {
765
+ if (that.autoClose)
766
+ that.destroy();
767
+ that.emit("error", err);
768
+ } else {
769
+ that.fd = fd;
770
+ that.emit("open", fd);
771
+ that.read();
772
+ }
773
+ });
774
+ }
775
+ function WriteStream(path24, options) {
776
+ if (this instanceof WriteStream)
777
+ return fs$WriteStream.apply(this, arguments), this;
778
+ else
779
+ return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
780
+ }
781
+ function WriteStream$open() {
782
+ var that = this;
783
+ open(that.path, that.flags, that.mode, function(err, fd) {
784
+ if (err) {
785
+ that.destroy();
786
+ that.emit("error", err);
787
+ } else {
788
+ that.fd = fd;
789
+ that.emit("open", fd);
790
+ }
791
+ });
792
+ }
793
+ function createReadStream2(path24, options) {
794
+ return new fs14.ReadStream(path24, options);
795
+ }
796
+ function createWriteStream2(path24, options) {
797
+ return new fs14.WriteStream(path24, options);
798
+ }
799
+ var fs$open = fs14.open;
800
+ fs14.open = open;
801
+ function open(path24, flags, mode, cb) {
802
+ if (typeof mode === "function")
803
+ cb = mode, mode = null;
804
+ return go$open(path24, flags, mode, cb);
805
+ function go$open(path25, flags2, mode2, cb2, startTime) {
806
+ return fs$open(path25, flags2, mode2, function(err, fd) {
807
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
808
+ enqueue([go$open, [path25, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
809
+ else {
810
+ if (typeof cb2 === "function")
811
+ cb2.apply(this, arguments);
812
+ }
813
+ });
814
+ }
815
+ }
816
+ return fs14;
817
+ }
818
+ function enqueue(elem) {
819
+ debug("ENQUEUE", elem[0].name, elem[1]);
820
+ fs13[gracefulQueue].push(elem);
821
+ retry();
822
+ }
823
+ var retryTimer;
824
+ function resetQueue() {
825
+ var now = Date.now();
826
+ for (var i = 0; i < fs13[gracefulQueue].length; ++i) {
827
+ if (fs13[gracefulQueue][i].length > 2) {
828
+ fs13[gracefulQueue][i][3] = now;
829
+ fs13[gracefulQueue][i][4] = now;
830
+ }
831
+ }
832
+ retry();
833
+ }
834
+ function retry() {
835
+ clearTimeout(retryTimer);
836
+ retryTimer = void 0;
837
+ if (fs13[gracefulQueue].length === 0)
838
+ return;
839
+ var elem = fs13[gracefulQueue].shift();
840
+ var fn = elem[0];
841
+ var args = elem[1];
842
+ var err = elem[2];
843
+ var startTime = elem[3];
844
+ var lastTime = elem[4];
845
+ if (startTime === void 0) {
846
+ debug("RETRY", fn.name, args);
847
+ fn.apply(null, args);
848
+ } else if (Date.now() - startTime >= 6e4) {
849
+ debug("TIMEOUT", fn.name, args);
850
+ var cb = args.pop();
851
+ if (typeof cb === "function")
852
+ cb.call(null, err);
853
+ } else {
854
+ var sinceAttempt = Date.now() - lastTime;
855
+ var sinceStart = Math.max(lastTime - startTime, 1);
856
+ var desiredDelay = Math.min(sinceStart * 1.2, 100);
857
+ if (sinceAttempt >= desiredDelay) {
858
+ debug("RETRY", fn.name, args);
859
+ fn.apply(null, args.concat([startTime]));
860
+ } else {
861
+ fs13[gracefulQueue].push(elem);
862
+ }
863
+ }
864
+ if (retryTimer === void 0) {
865
+ retryTimer = setTimeout(retry, 0);
866
+ }
867
+ }
868
+ }
869
+ });
870
+
871
+ // node_modules/fs-extra/lib/fs/index.js
872
+ var require_fs = __commonJS({
873
+ "node_modules/fs-extra/lib/fs/index.js"(exports2) {
874
+ "use strict";
875
+ var u = require_universalify().fromCallback;
876
+ var fs13 = require_graceful_fs();
877
+ var api = [
878
+ "access",
879
+ "appendFile",
880
+ "chmod",
881
+ "chown",
882
+ "close",
883
+ "copyFile",
884
+ "fchmod",
885
+ "fchown",
886
+ "fdatasync",
887
+ "fstat",
888
+ "fsync",
889
+ "ftruncate",
890
+ "futimes",
891
+ "lchmod",
892
+ "lchown",
893
+ "link",
894
+ "lstat",
895
+ "mkdir",
896
+ "mkdtemp",
897
+ "open",
898
+ "opendir",
899
+ "readdir",
900
+ "readFile",
901
+ "readlink",
902
+ "realpath",
903
+ "rename",
904
+ "rm",
905
+ "rmdir",
906
+ "stat",
907
+ "symlink",
908
+ "truncate",
909
+ "unlink",
910
+ "utimes",
911
+ "writeFile"
912
+ ].filter((key) => {
913
+ return typeof fs13[key] === "function";
914
+ });
915
+ Object.assign(exports2, fs13);
916
+ api.forEach((method) => {
917
+ exports2[method] = u(fs13[method]);
918
+ });
919
+ exports2.exists = function(filename, callback) {
920
+ if (typeof callback === "function") {
921
+ return fs13.exists(filename, callback);
922
+ }
923
+ return new Promise((resolve) => {
924
+ return fs13.exists(filename, resolve);
925
+ });
926
+ };
927
+ exports2.read = function(fd, buffer, offset, length, position, callback) {
928
+ if (typeof callback === "function") {
929
+ return fs13.read(fd, buffer, offset, length, position, callback);
930
+ }
931
+ return new Promise((resolve, reject) => {
932
+ fs13.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
933
+ if (err)
934
+ return reject(err);
935
+ resolve({ bytesRead, buffer: buffer2 });
936
+ });
937
+ });
938
+ };
939
+ exports2.write = function(fd, buffer, ...args) {
940
+ if (typeof args[args.length - 1] === "function") {
941
+ return fs13.write(fd, buffer, ...args);
942
+ }
943
+ return new Promise((resolve, reject) => {
944
+ fs13.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
945
+ if (err)
946
+ return reject(err);
947
+ resolve({ bytesWritten, buffer: buffer2 });
948
+ });
949
+ });
950
+ };
951
+ exports2.readv = function(fd, buffers, ...args) {
952
+ if (typeof args[args.length - 1] === "function") {
953
+ return fs13.readv(fd, buffers, ...args);
954
+ }
955
+ return new Promise((resolve, reject) => {
956
+ fs13.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
957
+ if (err)
958
+ return reject(err);
959
+ resolve({ bytesRead, buffers: buffers2 });
960
+ });
961
+ });
962
+ };
963
+ exports2.writev = function(fd, buffers, ...args) {
964
+ if (typeof args[args.length - 1] === "function") {
965
+ return fs13.writev(fd, buffers, ...args);
966
+ }
967
+ return new Promise((resolve, reject) => {
968
+ fs13.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
969
+ if (err)
970
+ return reject(err);
971
+ resolve({ bytesWritten, buffers: buffers2 });
972
+ });
973
+ });
974
+ };
975
+ if (typeof fs13.realpath.native === "function") {
976
+ exports2.realpath.native = u(fs13.realpath.native);
977
+ } else {
978
+ process.emitWarning(
979
+ "fs.realpath.native is not a function. Is fs being monkey-patched?",
980
+ "Warning",
981
+ "fs-extra-WARN0003"
982
+ );
983
+ }
984
+ }
985
+ });
986
+
987
+ // node_modules/fs-extra/lib/mkdirs/utils.js
988
+ var require_utils = __commonJS({
989
+ "node_modules/fs-extra/lib/mkdirs/utils.js"(exports2, module2) {
990
+ "use strict";
991
+ var path24 = require("path");
992
+ module2.exports.checkPath = function checkPath(pth) {
993
+ if (process.platform === "win32") {
994
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path24.parse(pth).root, ""));
995
+ if (pathHasInvalidWinCharacters) {
996
+ const error = new Error(`Path contains invalid characters: ${pth}`);
997
+ error.code = "EINVAL";
998
+ throw error;
999
+ }
1000
+ }
1001
+ };
1002
+ }
1003
+ });
1004
+
1005
+ // node_modules/fs-extra/lib/mkdirs/make-dir.js
1006
+ var require_make_dir = __commonJS({
1007
+ "node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) {
1008
+ "use strict";
1009
+ var fs13 = require_fs();
1010
+ var { checkPath } = require_utils();
1011
+ var getMode = (options) => {
1012
+ const defaults2 = { mode: 511 };
1013
+ if (typeof options === "number")
1014
+ return options;
1015
+ return { ...defaults2, ...options }.mode;
1016
+ };
1017
+ module2.exports.makeDir = async (dir, options) => {
1018
+ checkPath(dir);
1019
+ return fs13.mkdir(dir, {
1020
+ mode: getMode(options),
1021
+ recursive: true
1022
+ });
1023
+ };
1024
+ module2.exports.makeDirSync = (dir, options) => {
1025
+ checkPath(dir);
1026
+ return fs13.mkdirSync(dir, {
1027
+ mode: getMode(options),
1028
+ recursive: true
1029
+ });
1030
+ };
1031
+ }
1032
+ });
1033
+
1034
+ // node_modules/fs-extra/lib/mkdirs/index.js
1035
+ var require_mkdirs = __commonJS({
1036
+ "node_modules/fs-extra/lib/mkdirs/index.js"(exports2, module2) {
1037
+ "use strict";
1038
+ var u = require_universalify().fromPromise;
1039
+ var { makeDir: _makeDir, makeDirSync } = require_make_dir();
1040
+ var makeDir = u(_makeDir);
1041
+ module2.exports = {
1042
+ mkdirs: makeDir,
1043
+ mkdirsSync: makeDirSync,
1044
+ // alias
1045
+ mkdirp: makeDir,
1046
+ mkdirpSync: makeDirSync,
1047
+ ensureDir: makeDir,
1048
+ ensureDirSync: makeDirSync
1049
+ };
1050
+ }
1051
+ });
1052
+
1053
+ // node_modules/fs-extra/lib/path-exists/index.js
1054
+ var require_path_exists = __commonJS({
1055
+ "node_modules/fs-extra/lib/path-exists/index.js"(exports2, module2) {
1056
+ "use strict";
1057
+ var u = require_universalify().fromPromise;
1058
+ var fs13 = require_fs();
1059
+ function pathExists(path24) {
1060
+ return fs13.access(path24).then(() => true).catch(() => false);
1061
+ }
1062
+ module2.exports = {
1063
+ pathExists: u(pathExists),
1064
+ pathExistsSync: fs13.existsSync
1065
+ };
1066
+ }
1067
+ });
1068
+
1069
+ // node_modules/fs-extra/lib/util/utimes.js
1070
+ var require_utimes = __commonJS({
1071
+ "node_modules/fs-extra/lib/util/utimes.js"(exports2, module2) {
1072
+ "use strict";
1073
+ var fs13 = require_fs();
1074
+ var u = require_universalify().fromPromise;
1075
+ async function utimesMillis(path24, atime, mtime) {
1076
+ const fd = await fs13.open(path24, "r+");
1077
+ let closeErr = null;
1078
+ try {
1079
+ await fs13.futimes(fd, atime, mtime);
1080
+ } finally {
1081
+ try {
1082
+ await fs13.close(fd);
1083
+ } catch (e) {
1084
+ closeErr = e;
1085
+ }
1086
+ }
1087
+ if (closeErr) {
1088
+ throw closeErr;
1089
+ }
1090
+ }
1091
+ function utimesMillisSync(path24, atime, mtime) {
1092
+ const fd = fs13.openSync(path24, "r+");
1093
+ fs13.futimesSync(fd, atime, mtime);
1094
+ return fs13.closeSync(fd);
1095
+ }
1096
+ module2.exports = {
1097
+ utimesMillis: u(utimesMillis),
1098
+ utimesMillisSync
1099
+ };
1100
+ }
1101
+ });
1102
+
1103
+ // node_modules/fs-extra/lib/util/stat.js
1104
+ var require_stat = __commonJS({
1105
+ "node_modules/fs-extra/lib/util/stat.js"(exports2, module2) {
1106
+ "use strict";
1107
+ var fs13 = require_fs();
1108
+ var path24 = require("path");
1109
+ var u = require_universalify().fromPromise;
1110
+ function getStats(src, dest, opts) {
1111
+ const statFunc = opts.dereference ? (file) => fs13.stat(file, { bigint: true }) : (file) => fs13.lstat(file, { bigint: true });
1112
+ return Promise.all([
1113
+ statFunc(src),
1114
+ statFunc(dest).catch((err) => {
1115
+ if (err.code === "ENOENT")
1116
+ return null;
1117
+ throw err;
1118
+ })
1119
+ ]).then(([srcStat, destStat]) => ({ srcStat, destStat }));
1120
+ }
1121
+ function getStatsSync(src, dest, opts) {
1122
+ let destStat;
1123
+ const statFunc = opts.dereference ? (file) => fs13.statSync(file, { bigint: true }) : (file) => fs13.lstatSync(file, { bigint: true });
1124
+ const srcStat = statFunc(src);
1125
+ try {
1126
+ destStat = statFunc(dest);
1127
+ } catch (err) {
1128
+ if (err.code === "ENOENT")
1129
+ return { srcStat, destStat: null };
1130
+ throw err;
1131
+ }
1132
+ return { srcStat, destStat };
1133
+ }
1134
+ async function checkPaths(src, dest, funcName, opts) {
1135
+ const { srcStat, destStat } = await getStats(src, dest, opts);
1136
+ if (destStat) {
1137
+ if (areIdentical(srcStat, destStat)) {
1138
+ const srcBaseName = path24.basename(src);
1139
+ const destBaseName = path24.basename(dest);
1140
+ if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
1141
+ return { srcStat, destStat, isChangingCase: true };
1142
+ }
1143
+ throw new Error("Source and destination must not be the same.");
1144
+ }
1145
+ if (srcStat.isDirectory() && !destStat.isDirectory()) {
1146
+ throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`);
1147
+ }
1148
+ if (!srcStat.isDirectory() && destStat.isDirectory()) {
1149
+ throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`);
1150
+ }
1151
+ }
1152
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
1153
+ throw new Error(errMsg(src, dest, funcName));
1154
+ }
1155
+ return { srcStat, destStat };
1156
+ }
1157
+ function checkPathsSync(src, dest, funcName, opts) {
1158
+ const { srcStat, destStat } = getStatsSync(src, dest, opts);
1159
+ if (destStat) {
1160
+ if (areIdentical(srcStat, destStat)) {
1161
+ const srcBaseName = path24.basename(src);
1162
+ const destBaseName = path24.basename(dest);
1163
+ if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
1164
+ return { srcStat, destStat, isChangingCase: true };
1165
+ }
1166
+ throw new Error("Source and destination must not be the same.");
1167
+ }
1168
+ if (srcStat.isDirectory() && !destStat.isDirectory()) {
1169
+ throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`);
1170
+ }
1171
+ if (!srcStat.isDirectory() && destStat.isDirectory()) {
1172
+ throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`);
1173
+ }
1174
+ }
1175
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
1176
+ throw new Error(errMsg(src, dest, funcName));
1177
+ }
1178
+ return { srcStat, destStat };
1179
+ }
1180
+ async function checkParentPaths(src, srcStat, dest, funcName) {
1181
+ const srcParent = path24.resolve(path24.dirname(src));
1182
+ const destParent = path24.resolve(path24.dirname(dest));
1183
+ if (destParent === srcParent || destParent === path24.parse(destParent).root)
1184
+ return;
1185
+ let destStat;
1186
+ try {
1187
+ destStat = await fs13.stat(destParent, { bigint: true });
1188
+ } catch (err) {
1189
+ if (err.code === "ENOENT")
1190
+ return;
1191
+ throw err;
1192
+ }
1193
+ if (areIdentical(srcStat, destStat)) {
1194
+ throw new Error(errMsg(src, dest, funcName));
1195
+ }
1196
+ return checkParentPaths(src, srcStat, destParent, funcName);
1197
+ }
1198
+ function checkParentPathsSync(src, srcStat, dest, funcName) {
1199
+ const srcParent = path24.resolve(path24.dirname(src));
1200
+ const destParent = path24.resolve(path24.dirname(dest));
1201
+ if (destParent === srcParent || destParent === path24.parse(destParent).root)
1202
+ return;
1203
+ let destStat;
1204
+ try {
1205
+ destStat = fs13.statSync(destParent, { bigint: true });
1206
+ } catch (err) {
1207
+ if (err.code === "ENOENT")
1208
+ return;
1209
+ throw err;
1210
+ }
1211
+ if (areIdentical(srcStat, destStat)) {
1212
+ throw new Error(errMsg(src, dest, funcName));
1213
+ }
1214
+ return checkParentPathsSync(src, srcStat, destParent, funcName);
1215
+ }
1216
+ function areIdentical(srcStat, destStat) {
1217
+ return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
1218
+ }
1219
+ function isSrcSubdir(src, dest) {
1220
+ const srcArr = path24.resolve(src).split(path24.sep).filter((i) => i);
1221
+ const destArr = path24.resolve(dest).split(path24.sep).filter((i) => i);
1222
+ return srcArr.every((cur, i) => destArr[i] === cur);
1223
+ }
1224
+ function errMsg(src, dest, funcName) {
1225
+ return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`;
1226
+ }
1227
+ module2.exports = {
1228
+ // checkPaths
1229
+ checkPaths: u(checkPaths),
1230
+ checkPathsSync,
1231
+ // checkParent
1232
+ checkParentPaths: u(checkParentPaths),
1233
+ checkParentPathsSync,
1234
+ // Misc
1235
+ isSrcSubdir,
1236
+ areIdentical
1237
+ };
1238
+ }
1239
+ });
1240
+
1241
+ // node_modules/fs-extra/lib/copy/copy.js
1242
+ var require_copy = __commonJS({
1243
+ "node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) {
1244
+ "use strict";
1245
+ var fs13 = require_fs();
1246
+ var path24 = require("path");
1247
+ var { mkdirs } = require_mkdirs();
1248
+ var { pathExists } = require_path_exists();
1249
+ var { utimesMillis } = require_utimes();
1250
+ var stat = require_stat();
1251
+ async function copy(src, dest, opts = {}) {
1252
+ if (typeof opts === "function") {
1253
+ opts = { filter: opts };
1254
+ }
1255
+ opts.clobber = "clobber" in opts ? !!opts.clobber : true;
1256
+ opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
1257
+ if (opts.preserveTimestamps && process.arch === "ia32") {
1258
+ process.emitWarning(
1259
+ "Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269",
1260
+ "Warning",
1261
+ "fs-extra-WARN0001"
1262
+ );
1263
+ }
1264
+ const { srcStat, destStat } = await stat.checkPaths(src, dest, "copy", opts);
1265
+ await stat.checkParentPaths(src, srcStat, dest, "copy");
1266
+ const include2 = await runFilter(src, dest, opts);
1267
+ if (!include2)
1268
+ return;
1269
+ const destParent = path24.dirname(dest);
1270
+ const dirExists = await pathExists(destParent);
1271
+ if (!dirExists) {
1272
+ await mkdirs(destParent);
1273
+ }
1274
+ await getStatsAndPerformCopy(destStat, src, dest, opts);
1275
+ }
1276
+ async function runFilter(src, dest, opts) {
1277
+ if (!opts.filter)
1278
+ return true;
1279
+ return opts.filter(src, dest);
1280
+ }
1281
+ async function getStatsAndPerformCopy(destStat, src, dest, opts) {
1282
+ const statFn = opts.dereference ? fs13.stat : fs13.lstat;
1283
+ const srcStat = await statFn(src);
1284
+ if (srcStat.isDirectory())
1285
+ return onDir(srcStat, destStat, src, dest, opts);
1286
+ if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice())
1287
+ return onFile(srcStat, destStat, src, dest, opts);
1288
+ if (srcStat.isSymbolicLink())
1289
+ return onLink(destStat, src, dest, opts);
1290
+ if (srcStat.isSocket())
1291
+ throw new Error(`Cannot copy a socket file: ${src}`);
1292
+ if (srcStat.isFIFO())
1293
+ throw new Error(`Cannot copy a FIFO pipe: ${src}`);
1294
+ throw new Error(`Unknown file: ${src}`);
1295
+ }
1296
+ async function onFile(srcStat, destStat, src, dest, opts) {
1297
+ if (!destStat)
1298
+ return copyFile(srcStat, src, dest, opts);
1299
+ if (opts.overwrite) {
1300
+ await fs13.unlink(dest);
1301
+ return copyFile(srcStat, src, dest, opts);
1302
+ }
1303
+ if (opts.errorOnExist) {
1304
+ throw new Error(`'${dest}' already exists`);
1305
+ }
1306
+ }
1307
+ async function copyFile(srcStat, src, dest, opts) {
1308
+ await fs13.copyFile(src, dest);
1309
+ if (opts.preserveTimestamps) {
1310
+ if (fileIsNotWritable(srcStat.mode)) {
1311
+ await makeFileWritable(dest, srcStat.mode);
1312
+ }
1313
+ const updatedSrcStat = await fs13.stat(src);
1314
+ await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
1315
+ }
1316
+ return fs13.chmod(dest, srcStat.mode);
1317
+ }
1318
+ function fileIsNotWritable(srcMode) {
1319
+ return (srcMode & 128) === 0;
1320
+ }
1321
+ function makeFileWritable(dest, srcMode) {
1322
+ return fs13.chmod(dest, srcMode | 128);
1323
+ }
1324
+ async function onDir(srcStat, destStat, src, dest, opts) {
1325
+ if (!destStat) {
1326
+ await fs13.mkdir(dest);
1327
+ }
1328
+ const items = await fs13.readdir(src);
1329
+ await Promise.all(items.map(async (item) => {
1330
+ const srcItem = path24.join(src, item);
1331
+ const destItem = path24.join(dest, item);
1332
+ const include2 = await runFilter(srcItem, destItem, opts);
1333
+ if (!include2)
1334
+ return;
1335
+ const { destStat: destStat2 } = await stat.checkPaths(srcItem, destItem, "copy", opts);
1336
+ return getStatsAndPerformCopy(destStat2, srcItem, destItem, opts);
1337
+ }));
1338
+ if (!destStat) {
1339
+ await fs13.chmod(dest, srcStat.mode);
1340
+ }
1341
+ }
1342
+ async function onLink(destStat, src, dest, opts) {
1343
+ let resolvedSrc = await fs13.readlink(src);
1344
+ if (opts.dereference) {
1345
+ resolvedSrc = path24.resolve(process.cwd(), resolvedSrc);
1346
+ }
1347
+ if (!destStat) {
1348
+ return fs13.symlink(resolvedSrc, dest);
1349
+ }
1350
+ let resolvedDest = null;
1351
+ try {
1352
+ resolvedDest = await fs13.readlink(dest);
1353
+ } catch (e) {
1354
+ if (e.code === "EINVAL" || e.code === "UNKNOWN")
1355
+ return fs13.symlink(resolvedSrc, dest);
1356
+ throw e;
1357
+ }
1358
+ if (opts.dereference) {
1359
+ resolvedDest = path24.resolve(process.cwd(), resolvedDest);
1360
+ }
1361
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
1362
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
1363
+ }
1364
+ if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
1365
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
1366
+ }
1367
+ await fs13.unlink(dest);
1368
+ return fs13.symlink(resolvedSrc, dest);
1369
+ }
1370
+ module2.exports = copy;
1371
+ }
1372
+ });
1373
+
1374
+ // node_modules/fs-extra/lib/copy/copy-sync.js
1375
+ var require_copy_sync = __commonJS({
1376
+ "node_modules/fs-extra/lib/copy/copy-sync.js"(exports2, module2) {
1377
+ "use strict";
1378
+ var fs13 = require_graceful_fs();
1379
+ var path24 = require("path");
1380
+ var mkdirsSync = require_mkdirs().mkdirsSync;
1381
+ var utimesMillisSync = require_utimes().utimesMillisSync;
1382
+ var stat = require_stat();
1383
+ function copySync(src, dest, opts) {
1384
+ if (typeof opts === "function") {
1385
+ opts = { filter: opts };
1386
+ }
1387
+ opts = opts || {};
1388
+ opts.clobber = "clobber" in opts ? !!opts.clobber : true;
1389
+ opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
1390
+ if (opts.preserveTimestamps && process.arch === "ia32") {
1391
+ process.emitWarning(
1392
+ "Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269",
1393
+ "Warning",
1394
+ "fs-extra-WARN0002"
1395
+ );
1396
+ }
1397
+ const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
1398
+ stat.checkParentPathsSync(src, srcStat, dest, "copy");
1399
+ if (opts.filter && !opts.filter(src, dest))
1400
+ return;
1401
+ const destParent = path24.dirname(dest);
1402
+ if (!fs13.existsSync(destParent))
1403
+ mkdirsSync(destParent);
1404
+ return getStats(destStat, src, dest, opts);
1405
+ }
1406
+ function getStats(destStat, src, dest, opts) {
1407
+ const statSync = opts.dereference ? fs13.statSync : fs13.lstatSync;
1408
+ const srcStat = statSync(src);
1409
+ if (srcStat.isDirectory())
1410
+ return onDir(srcStat, destStat, src, dest, opts);
1411
+ else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice())
1412
+ return onFile(srcStat, destStat, src, dest, opts);
1413
+ else if (srcStat.isSymbolicLink())
1414
+ return onLink(destStat, src, dest, opts);
1415
+ else if (srcStat.isSocket())
1416
+ throw new Error(`Cannot copy a socket file: ${src}`);
1417
+ else if (srcStat.isFIFO())
1418
+ throw new Error(`Cannot copy a FIFO pipe: ${src}`);
1419
+ throw new Error(`Unknown file: ${src}`);
1420
+ }
1421
+ function onFile(srcStat, destStat, src, dest, opts) {
1422
+ if (!destStat)
1423
+ return copyFile(srcStat, src, dest, opts);
1424
+ return mayCopyFile(srcStat, src, dest, opts);
1425
+ }
1426
+ function mayCopyFile(srcStat, src, dest, opts) {
1427
+ if (opts.overwrite) {
1428
+ fs13.unlinkSync(dest);
1429
+ return copyFile(srcStat, src, dest, opts);
1430
+ } else if (opts.errorOnExist) {
1431
+ throw new Error(`'${dest}' already exists`);
1432
+ }
1433
+ }
1434
+ function copyFile(srcStat, src, dest, opts) {
1435
+ fs13.copyFileSync(src, dest);
1436
+ if (opts.preserveTimestamps)
1437
+ handleTimestamps(srcStat.mode, src, dest);
1438
+ return setDestMode(dest, srcStat.mode);
1439
+ }
1440
+ function handleTimestamps(srcMode, src, dest) {
1441
+ if (fileIsNotWritable(srcMode))
1442
+ makeFileWritable(dest, srcMode);
1443
+ return setDestTimestamps(src, dest);
1444
+ }
1445
+ function fileIsNotWritable(srcMode) {
1446
+ return (srcMode & 128) === 0;
1447
+ }
1448
+ function makeFileWritable(dest, srcMode) {
1449
+ return setDestMode(dest, srcMode | 128);
1450
+ }
1451
+ function setDestMode(dest, srcMode) {
1452
+ return fs13.chmodSync(dest, srcMode);
1453
+ }
1454
+ function setDestTimestamps(src, dest) {
1455
+ const updatedSrcStat = fs13.statSync(src);
1456
+ return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
1457
+ }
1458
+ function onDir(srcStat, destStat, src, dest, opts) {
1459
+ if (!destStat)
1460
+ return mkDirAndCopy(srcStat.mode, src, dest, opts);
1461
+ return copyDir(src, dest, opts);
1462
+ }
1463
+ function mkDirAndCopy(srcMode, src, dest, opts) {
1464
+ fs13.mkdirSync(dest);
1465
+ copyDir(src, dest, opts);
1466
+ return setDestMode(dest, srcMode);
1467
+ }
1468
+ function copyDir(src, dest, opts) {
1469
+ fs13.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
1470
+ }
1471
+ function copyDirItem(item, src, dest, opts) {
1472
+ const srcItem = path24.join(src, item);
1473
+ const destItem = path24.join(dest, item);
1474
+ if (opts.filter && !opts.filter(srcItem, destItem))
1475
+ return;
1476
+ const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
1477
+ return getStats(destStat, srcItem, destItem, opts);
1478
+ }
1479
+ function onLink(destStat, src, dest, opts) {
1480
+ let resolvedSrc = fs13.readlinkSync(src);
1481
+ if (opts.dereference) {
1482
+ resolvedSrc = path24.resolve(process.cwd(), resolvedSrc);
1483
+ }
1484
+ if (!destStat) {
1485
+ return fs13.symlinkSync(resolvedSrc, dest);
1486
+ } else {
1487
+ let resolvedDest;
1488
+ try {
1489
+ resolvedDest = fs13.readlinkSync(dest);
1490
+ } catch (err) {
1491
+ if (err.code === "EINVAL" || err.code === "UNKNOWN")
1492
+ return fs13.symlinkSync(resolvedSrc, dest);
1493
+ throw err;
1494
+ }
1495
+ if (opts.dereference) {
1496
+ resolvedDest = path24.resolve(process.cwd(), resolvedDest);
1497
+ }
1498
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
1499
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
1500
+ }
1501
+ if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
1502
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
1503
+ }
1504
+ return copyLink(resolvedSrc, dest);
1505
+ }
1506
+ }
1507
+ function copyLink(resolvedSrc, dest) {
1508
+ fs13.unlinkSync(dest);
1509
+ return fs13.symlinkSync(resolvedSrc, dest);
1510
+ }
1511
+ module2.exports = copySync;
1512
+ }
1513
+ });
1514
+
1515
+ // node_modules/fs-extra/lib/copy/index.js
1516
+ var require_copy2 = __commonJS({
1517
+ "node_modules/fs-extra/lib/copy/index.js"(exports2, module2) {
1518
+ "use strict";
1519
+ var u = require_universalify().fromPromise;
1520
+ module2.exports = {
1521
+ copy: u(require_copy()),
1522
+ copySync: require_copy_sync()
1523
+ };
1524
+ }
1525
+ });
1526
+
1527
+ // node_modules/fs-extra/lib/remove/index.js
1528
+ var require_remove = __commonJS({
1529
+ "node_modules/fs-extra/lib/remove/index.js"(exports2, module2) {
1530
+ "use strict";
1531
+ var fs13 = require_graceful_fs();
1532
+ var u = require_universalify().fromCallback;
1533
+ function remove(path24, callback) {
1534
+ fs13.rm(path24, { recursive: true, force: true }, callback);
1535
+ }
1536
+ function removeSync(path24) {
1537
+ fs13.rmSync(path24, { recursive: true, force: true });
1538
+ }
1539
+ module2.exports = {
1540
+ remove: u(remove),
1541
+ removeSync
1542
+ };
1543
+ }
1544
+ });
1545
+
1546
+ // node_modules/fs-extra/lib/empty/index.js
1547
+ var require_empty = __commonJS({
1548
+ "node_modules/fs-extra/lib/empty/index.js"(exports2, module2) {
1549
+ "use strict";
1550
+ var u = require_universalify().fromPromise;
1551
+ var fs13 = require_fs();
1552
+ var path24 = require("path");
1553
+ var mkdir = require_mkdirs();
1554
+ var remove = require_remove();
1555
+ var emptyDir = u(async function emptyDir2(dir) {
1556
+ let items;
1557
+ try {
1558
+ items = await fs13.readdir(dir);
1559
+ } catch {
1560
+ return mkdir.mkdirs(dir);
1561
+ }
1562
+ return Promise.all(items.map((item) => remove.remove(path24.join(dir, item))));
1563
+ });
1564
+ function emptyDirSync(dir) {
1565
+ let items;
1566
+ try {
1567
+ items = fs13.readdirSync(dir);
1568
+ } catch {
1569
+ return mkdir.mkdirsSync(dir);
1570
+ }
1571
+ items.forEach((item) => {
1572
+ item = path24.join(dir, item);
1573
+ remove.removeSync(item);
1574
+ });
1575
+ }
1576
+ module2.exports = {
1577
+ emptyDirSync,
1578
+ emptydirSync: emptyDirSync,
1579
+ emptyDir,
1580
+ emptydir: emptyDir
1581
+ };
1582
+ }
1583
+ });
1584
+
1585
+ // node_modules/fs-extra/lib/ensure/file.js
1586
+ var require_file = __commonJS({
1587
+ "node_modules/fs-extra/lib/ensure/file.js"(exports2, module2) {
1588
+ "use strict";
1589
+ var u = require_universalify().fromPromise;
1590
+ var path24 = require("path");
1591
+ var fs13 = require_fs();
1592
+ var mkdir = require_mkdirs();
1593
+ async function createFile(file) {
1594
+ let stats;
1595
+ try {
1596
+ stats = await fs13.stat(file);
1597
+ } catch {
1598
+ }
1599
+ if (stats && stats.isFile())
1600
+ return;
1601
+ const dir = path24.dirname(file);
1602
+ let dirStats = null;
1603
+ try {
1604
+ dirStats = await fs13.stat(dir);
1605
+ } catch (err) {
1606
+ if (err.code === "ENOENT") {
1607
+ await mkdir.mkdirs(dir);
1608
+ await fs13.writeFile(file, "");
1609
+ return;
1610
+ } else {
1611
+ throw err;
1612
+ }
1613
+ }
1614
+ if (dirStats.isDirectory()) {
1615
+ await fs13.writeFile(file, "");
1616
+ } else {
1617
+ await fs13.readdir(dir);
1618
+ }
1619
+ }
1620
+ function createFileSync(file) {
1621
+ let stats;
1622
+ try {
1623
+ stats = fs13.statSync(file);
1624
+ } catch {
1625
+ }
1626
+ if (stats && stats.isFile())
1627
+ return;
1628
+ const dir = path24.dirname(file);
1629
+ try {
1630
+ if (!fs13.statSync(dir).isDirectory()) {
1631
+ fs13.readdirSync(dir);
1632
+ }
1633
+ } catch (err) {
1634
+ if (err && err.code === "ENOENT")
1635
+ mkdir.mkdirsSync(dir);
1636
+ else
1637
+ throw err;
1638
+ }
1639
+ fs13.writeFileSync(file, "");
1640
+ }
1641
+ module2.exports = {
1642
+ createFile: u(createFile),
1643
+ createFileSync
1644
+ };
1645
+ }
1646
+ });
1647
+
1648
+ // node_modules/fs-extra/lib/ensure/link.js
1649
+ var require_link = __commonJS({
1650
+ "node_modules/fs-extra/lib/ensure/link.js"(exports2, module2) {
1651
+ "use strict";
1652
+ var u = require_universalify().fromPromise;
1653
+ var path24 = require("path");
1654
+ var fs13 = require_fs();
1655
+ var mkdir = require_mkdirs();
1656
+ var { pathExists } = require_path_exists();
1657
+ var { areIdentical } = require_stat();
1658
+ async function createLink(srcpath, dstpath) {
1659
+ let dstStat;
1660
+ try {
1661
+ dstStat = await fs13.lstat(dstpath);
1662
+ } catch {
1663
+ }
1664
+ let srcStat;
1665
+ try {
1666
+ srcStat = await fs13.lstat(srcpath);
1667
+ } catch (err) {
1668
+ err.message = err.message.replace("lstat", "ensureLink");
1669
+ throw err;
1670
+ }
1671
+ if (dstStat && areIdentical(srcStat, dstStat))
1672
+ return;
1673
+ const dir = path24.dirname(dstpath);
1674
+ const dirExists = await pathExists(dir);
1675
+ if (!dirExists) {
1676
+ await mkdir.mkdirs(dir);
1677
+ }
1678
+ await fs13.link(srcpath, dstpath);
1679
+ }
1680
+ function createLinkSync(srcpath, dstpath) {
1681
+ let dstStat;
1682
+ try {
1683
+ dstStat = fs13.lstatSync(dstpath);
1684
+ } catch {
1685
+ }
1686
+ try {
1687
+ const srcStat = fs13.lstatSync(srcpath);
1688
+ if (dstStat && areIdentical(srcStat, dstStat))
1689
+ return;
1690
+ } catch (err) {
1691
+ err.message = err.message.replace("lstat", "ensureLink");
1692
+ throw err;
1693
+ }
1694
+ const dir = path24.dirname(dstpath);
1695
+ const dirExists = fs13.existsSync(dir);
1696
+ if (dirExists)
1697
+ return fs13.linkSync(srcpath, dstpath);
1698
+ mkdir.mkdirsSync(dir);
1699
+ return fs13.linkSync(srcpath, dstpath);
1700
+ }
1701
+ module2.exports = {
1702
+ createLink: u(createLink),
1703
+ createLinkSync
1704
+ };
1705
+ }
1706
+ });
1707
+
1708
+ // node_modules/fs-extra/lib/ensure/symlink-paths.js
1709
+ var require_symlink_paths = __commonJS({
1710
+ "node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) {
1711
+ "use strict";
1712
+ var path24 = require("path");
1713
+ var fs13 = require_fs();
1714
+ var { pathExists } = require_path_exists();
1715
+ var u = require_universalify().fromPromise;
1716
+ async function symlinkPaths(srcpath, dstpath) {
1717
+ if (path24.isAbsolute(srcpath)) {
1718
+ try {
1719
+ await fs13.lstat(srcpath);
1720
+ } catch (err) {
1721
+ err.message = err.message.replace("lstat", "ensureSymlink");
1722
+ throw err;
1723
+ }
1724
+ return {
1725
+ toCwd: srcpath,
1726
+ toDst: srcpath
1727
+ };
1728
+ }
1729
+ const dstdir = path24.dirname(dstpath);
1730
+ const relativeToDst = path24.join(dstdir, srcpath);
1731
+ const exists = await pathExists(relativeToDst);
1732
+ if (exists) {
1733
+ return {
1734
+ toCwd: relativeToDst,
1735
+ toDst: srcpath
1736
+ };
1737
+ }
1738
+ try {
1739
+ await fs13.lstat(srcpath);
1740
+ } catch (err) {
1741
+ err.message = err.message.replace("lstat", "ensureSymlink");
1742
+ throw err;
1743
+ }
1744
+ return {
1745
+ toCwd: srcpath,
1746
+ toDst: path24.relative(dstdir, srcpath)
1747
+ };
1748
+ }
1749
+ function symlinkPathsSync(srcpath, dstpath) {
1750
+ if (path24.isAbsolute(srcpath)) {
1751
+ const exists2 = fs13.existsSync(srcpath);
1752
+ if (!exists2)
1753
+ throw new Error("absolute srcpath does not exist");
1754
+ return {
1755
+ toCwd: srcpath,
1756
+ toDst: srcpath
1757
+ };
1758
+ }
1759
+ const dstdir = path24.dirname(dstpath);
1760
+ const relativeToDst = path24.join(dstdir, srcpath);
1761
+ const exists = fs13.existsSync(relativeToDst);
1762
+ if (exists) {
1763
+ return {
1764
+ toCwd: relativeToDst,
1765
+ toDst: srcpath
1766
+ };
1767
+ }
1768
+ const srcExists = fs13.existsSync(srcpath);
1769
+ if (!srcExists)
1770
+ throw new Error("relative srcpath does not exist");
1771
+ return {
1772
+ toCwd: srcpath,
1773
+ toDst: path24.relative(dstdir, srcpath)
1774
+ };
1775
+ }
1776
+ module2.exports = {
1777
+ symlinkPaths: u(symlinkPaths),
1778
+ symlinkPathsSync
1779
+ };
1780
+ }
1781
+ });
1782
+
1783
+ // node_modules/fs-extra/lib/ensure/symlink-type.js
1784
+ var require_symlink_type = __commonJS({
1785
+ "node_modules/fs-extra/lib/ensure/symlink-type.js"(exports2, module2) {
1786
+ "use strict";
1787
+ var fs13 = require_fs();
1788
+ var u = require_universalify().fromPromise;
1789
+ async function symlinkType(srcpath, type) {
1790
+ if (type)
1791
+ return type;
1792
+ let stats;
1793
+ try {
1794
+ stats = await fs13.lstat(srcpath);
1795
+ } catch {
1796
+ return "file";
1797
+ }
1798
+ return stats && stats.isDirectory() ? "dir" : "file";
1799
+ }
1800
+ function symlinkTypeSync(srcpath, type) {
1801
+ if (type)
1802
+ return type;
1803
+ let stats;
1804
+ try {
1805
+ stats = fs13.lstatSync(srcpath);
1806
+ } catch {
1807
+ return "file";
1808
+ }
1809
+ return stats && stats.isDirectory() ? "dir" : "file";
1810
+ }
1811
+ module2.exports = {
1812
+ symlinkType: u(symlinkType),
1813
+ symlinkTypeSync
1814
+ };
1815
+ }
1816
+ });
1817
+
1818
+ // node_modules/fs-extra/lib/ensure/symlink.js
1819
+ var require_symlink = __commonJS({
1820
+ "node_modules/fs-extra/lib/ensure/symlink.js"(exports2, module2) {
1821
+ "use strict";
1822
+ var u = require_universalify().fromPromise;
1823
+ var path24 = require("path");
1824
+ var fs13 = require_fs();
1825
+ var { mkdirs, mkdirsSync } = require_mkdirs();
1826
+ var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
1827
+ var { symlinkType, symlinkTypeSync } = require_symlink_type();
1828
+ var { pathExists } = require_path_exists();
1829
+ var { areIdentical } = require_stat();
1830
+ async function createSymlink(srcpath, dstpath, type) {
1831
+ let stats;
1832
+ try {
1833
+ stats = await fs13.lstat(dstpath);
1834
+ } catch {
1835
+ }
1836
+ if (stats && stats.isSymbolicLink()) {
1837
+ const [srcStat, dstStat] = await Promise.all([
1838
+ fs13.stat(srcpath),
1839
+ fs13.stat(dstpath)
1840
+ ]);
1841
+ if (areIdentical(srcStat, dstStat))
1842
+ return;
1843
+ }
1844
+ const relative = await symlinkPaths(srcpath, dstpath);
1845
+ srcpath = relative.toDst;
1846
+ const toType = await symlinkType(relative.toCwd, type);
1847
+ const dir = path24.dirname(dstpath);
1848
+ if (!await pathExists(dir)) {
1849
+ await mkdirs(dir);
1850
+ }
1851
+ return fs13.symlink(srcpath, dstpath, toType);
1852
+ }
1853
+ function createSymlinkSync(srcpath, dstpath, type) {
1854
+ let stats;
1855
+ try {
1856
+ stats = fs13.lstatSync(dstpath);
1857
+ } catch {
1858
+ }
1859
+ if (stats && stats.isSymbolicLink()) {
1860
+ const srcStat = fs13.statSync(srcpath);
1861
+ const dstStat = fs13.statSync(dstpath);
1862
+ if (areIdentical(srcStat, dstStat))
1863
+ return;
1864
+ }
1865
+ const relative = symlinkPathsSync(srcpath, dstpath);
1866
+ srcpath = relative.toDst;
1867
+ type = symlinkTypeSync(relative.toCwd, type);
1868
+ const dir = path24.dirname(dstpath);
1869
+ const exists = fs13.existsSync(dir);
1870
+ if (exists)
1871
+ return fs13.symlinkSync(srcpath, dstpath, type);
1872
+ mkdirsSync(dir);
1873
+ return fs13.symlinkSync(srcpath, dstpath, type);
1874
+ }
1875
+ module2.exports = {
1876
+ createSymlink: u(createSymlink),
1877
+ createSymlinkSync
1878
+ };
1879
+ }
1880
+ });
1881
+
1882
+ // node_modules/fs-extra/lib/ensure/index.js
1883
+ var require_ensure = __commonJS({
1884
+ "node_modules/fs-extra/lib/ensure/index.js"(exports2, module2) {
1885
+ "use strict";
1886
+ var { createFile, createFileSync } = require_file();
1887
+ var { createLink, createLinkSync } = require_link();
1888
+ var { createSymlink, createSymlinkSync } = require_symlink();
1889
+ module2.exports = {
1890
+ // file
1891
+ createFile,
1892
+ createFileSync,
1893
+ ensureFile: createFile,
1894
+ ensureFileSync: createFileSync,
1895
+ // link
1896
+ createLink,
1897
+ createLinkSync,
1898
+ ensureLink: createLink,
1899
+ ensureLinkSync: createLinkSync,
1900
+ // symlink
1901
+ createSymlink,
1902
+ createSymlinkSync,
1903
+ ensureSymlink: createSymlink,
1904
+ ensureSymlinkSync: createSymlinkSync
1905
+ };
1906
+ }
1907
+ });
1908
+
1909
+ // node_modules/jsonfile/utils.js
1910
+ var require_utils2 = __commonJS({
1911
+ "node_modules/jsonfile/utils.js"(exports2, module2) {
1912
+ function stringify(obj, { EOL = "\n", finalEOL = true, replacer = null, spaces } = {}) {
1913
+ const EOF2 = finalEOL ? EOL : "";
1914
+ const str = JSON.stringify(obj, replacer, spaces);
1915
+ return str.replace(/\n/g, EOL) + EOF2;
1916
+ }
1917
+ function stripBom(content) {
1918
+ if (Buffer.isBuffer(content))
1919
+ content = content.toString("utf8");
1920
+ return content.replace(/^\uFEFF/, "");
1921
+ }
1922
+ module2.exports = { stringify, stripBom };
1923
+ }
1924
+ });
1925
+
1926
+ // node_modules/jsonfile/index.js
1927
+ var require_jsonfile = __commonJS({
1928
+ "node_modules/jsonfile/index.js"(exports2, module2) {
1929
+ var _fs;
1930
+ try {
1931
+ _fs = require_graceful_fs();
1932
+ } catch (_) {
1933
+ _fs = require("fs");
1934
+ }
1935
+ var universalify = require_universalify();
1936
+ var { stringify, stripBom } = require_utils2();
1937
+ async function _readFile(file, options = {}) {
1938
+ if (typeof options === "string") {
1939
+ options = { encoding: options };
1940
+ }
1941
+ const fs13 = options.fs || _fs;
1942
+ const shouldThrow = "throws" in options ? options.throws : true;
1943
+ let data = await universalify.fromCallback(fs13.readFile)(file, options);
1944
+ data = stripBom(data);
1945
+ let obj;
1946
+ try {
1947
+ obj = JSON.parse(data, options ? options.reviver : null);
1948
+ } catch (err) {
1949
+ if (shouldThrow) {
1950
+ err.message = `${file}: ${err.message}`;
1951
+ throw err;
1952
+ } else {
1953
+ return null;
1954
+ }
1955
+ }
1956
+ return obj;
1957
+ }
1958
+ var readFile = universalify.fromPromise(_readFile);
1959
+ function readFileSync2(file, options = {}) {
1960
+ if (typeof options === "string") {
1961
+ options = { encoding: options };
1962
+ }
1963
+ const fs13 = options.fs || _fs;
1964
+ const shouldThrow = "throws" in options ? options.throws : true;
1965
+ try {
1966
+ let content = fs13.readFileSync(file, options);
1967
+ content = stripBom(content);
1968
+ return JSON.parse(content, options.reviver);
1969
+ } catch (err) {
1970
+ if (shouldThrow) {
1971
+ err.message = `${file}: ${err.message}`;
1972
+ throw err;
1973
+ } else {
1974
+ return null;
1975
+ }
1976
+ }
1977
+ }
1978
+ async function _writeFile(file, obj, options = {}) {
1979
+ const fs13 = options.fs || _fs;
1980
+ const str = stringify(obj, options);
1981
+ await universalify.fromCallback(fs13.writeFile)(file, str, options);
1982
+ }
1983
+ var writeFile = universalify.fromPromise(_writeFile);
1984
+ function writeFileSync(file, obj, options = {}) {
1985
+ const fs13 = options.fs || _fs;
1986
+ const str = stringify(obj, options);
1987
+ return fs13.writeFileSync(file, str, options);
1988
+ }
1989
+ var jsonfile = {
1990
+ readFile,
1991
+ readFileSync: readFileSync2,
1992
+ writeFile,
1993
+ writeFileSync
1994
+ };
1995
+ module2.exports = jsonfile;
1996
+ }
1997
+ });
1998
+
1999
+ // node_modules/fs-extra/lib/json/jsonfile.js
2000
+ var require_jsonfile2 = __commonJS({
2001
+ "node_modules/fs-extra/lib/json/jsonfile.js"(exports2, module2) {
2002
+ "use strict";
2003
+ var jsonFile = require_jsonfile();
2004
+ module2.exports = {
2005
+ // jsonfile exports
2006
+ readJson: jsonFile.readFile,
2007
+ readJsonSync: jsonFile.readFileSync,
2008
+ writeJson: jsonFile.writeFile,
2009
+ writeJsonSync: jsonFile.writeFileSync
2010
+ };
2011
+ }
2012
+ });
2013
+
2014
+ // node_modules/fs-extra/lib/output-file/index.js
2015
+ var require_output_file = __commonJS({
2016
+ "node_modules/fs-extra/lib/output-file/index.js"(exports2, module2) {
2017
+ "use strict";
2018
+ var u = require_universalify().fromPromise;
2019
+ var fs13 = require_fs();
2020
+ var path24 = require("path");
2021
+ var mkdir = require_mkdirs();
2022
+ var pathExists = require_path_exists().pathExists;
2023
+ async function outputFile(file, data, encoding = "utf-8") {
2024
+ const dir = path24.dirname(file);
2025
+ if (!await pathExists(dir)) {
2026
+ await mkdir.mkdirs(dir);
2027
+ }
2028
+ return fs13.writeFile(file, data, encoding);
2029
+ }
2030
+ function outputFileSync(file, ...args) {
2031
+ const dir = path24.dirname(file);
2032
+ if (!fs13.existsSync(dir)) {
2033
+ mkdir.mkdirsSync(dir);
2034
+ }
2035
+ fs13.writeFileSync(file, ...args);
2036
+ }
2037
+ module2.exports = {
2038
+ outputFile: u(outputFile),
2039
+ outputFileSync
2040
+ };
2041
+ }
2042
+ });
2043
+
2044
+ // node_modules/fs-extra/lib/json/output-json.js
2045
+ var require_output_json = __commonJS({
2046
+ "node_modules/fs-extra/lib/json/output-json.js"(exports2, module2) {
2047
+ "use strict";
2048
+ var { stringify } = require_utils2();
2049
+ var { outputFile } = require_output_file();
2050
+ async function outputJson(file, data, options = {}) {
2051
+ const str = stringify(data, options);
2052
+ await outputFile(file, str, options);
2053
+ }
2054
+ module2.exports = outputJson;
2055
+ }
2056
+ });
2057
+
2058
+ // node_modules/fs-extra/lib/json/output-json-sync.js
2059
+ var require_output_json_sync = __commonJS({
2060
+ "node_modules/fs-extra/lib/json/output-json-sync.js"(exports2, module2) {
2061
+ "use strict";
2062
+ var { stringify } = require_utils2();
2063
+ var { outputFileSync } = require_output_file();
2064
+ function outputJsonSync(file, data, options) {
2065
+ const str = stringify(data, options);
2066
+ outputFileSync(file, str, options);
2067
+ }
2068
+ module2.exports = outputJsonSync;
2069
+ }
2070
+ });
2071
+
2072
+ // node_modules/fs-extra/lib/json/index.js
2073
+ var require_json = __commonJS({
2074
+ "node_modules/fs-extra/lib/json/index.js"(exports2, module2) {
2075
+ "use strict";
2076
+ var u = require_universalify().fromPromise;
2077
+ var jsonFile = require_jsonfile2();
2078
+ jsonFile.outputJson = u(require_output_json());
2079
+ jsonFile.outputJsonSync = require_output_json_sync();
2080
+ jsonFile.outputJSON = jsonFile.outputJson;
2081
+ jsonFile.outputJSONSync = jsonFile.outputJsonSync;
2082
+ jsonFile.writeJSON = jsonFile.writeJson;
2083
+ jsonFile.writeJSONSync = jsonFile.writeJsonSync;
2084
+ jsonFile.readJSON = jsonFile.readJson;
2085
+ jsonFile.readJSONSync = jsonFile.readJsonSync;
2086
+ module2.exports = jsonFile;
2087
+ }
2088
+ });
2089
+
2090
+ // node_modules/fs-extra/lib/move/move.js
2091
+ var require_move = __commonJS({
2092
+ "node_modules/fs-extra/lib/move/move.js"(exports2, module2) {
2093
+ "use strict";
2094
+ var fs13 = require_fs();
2095
+ var path24 = require("path");
2096
+ var { copy } = require_copy2();
2097
+ var { remove } = require_remove();
2098
+ var { mkdirp } = require_mkdirs();
2099
+ var { pathExists } = require_path_exists();
2100
+ var stat = require_stat();
2101
+ async function move(src, dest, opts = {}) {
2102
+ const overwrite = opts.overwrite || opts.clobber || false;
2103
+ const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
2104
+ await stat.checkParentPaths(src, srcStat, dest, "move");
2105
+ const destParent = path24.dirname(dest);
2106
+ const parsedParentPath = path24.parse(destParent);
2107
+ if (parsedParentPath.root !== destParent) {
2108
+ await mkdirp(destParent);
2109
+ }
2110
+ return doRename(src, dest, overwrite, isChangingCase);
2111
+ }
2112
+ async function doRename(src, dest, overwrite, isChangingCase) {
2113
+ if (!isChangingCase) {
2114
+ if (overwrite) {
2115
+ await remove(dest);
2116
+ } else if (await pathExists(dest)) {
2117
+ throw new Error("dest already exists.");
2118
+ }
2119
+ }
2120
+ try {
2121
+ await fs13.rename(src, dest);
2122
+ } catch (err) {
2123
+ if (err.code !== "EXDEV") {
2124
+ throw err;
2125
+ }
2126
+ await moveAcrossDevice(src, dest, overwrite);
2127
+ }
2128
+ }
2129
+ async function moveAcrossDevice(src, dest, overwrite) {
2130
+ const opts = {
2131
+ overwrite,
2132
+ errorOnExist: true,
2133
+ preserveTimestamps: true
2134
+ };
2135
+ await copy(src, dest, opts);
2136
+ return remove(src);
2137
+ }
2138
+ module2.exports = move;
2139
+ }
2140
+ });
2141
+
2142
+ // node_modules/fs-extra/lib/move/move-sync.js
2143
+ var require_move_sync = __commonJS({
2144
+ "node_modules/fs-extra/lib/move/move-sync.js"(exports2, module2) {
2145
+ "use strict";
2146
+ var fs13 = require_graceful_fs();
2147
+ var path24 = require("path");
2148
+ var copySync = require_copy2().copySync;
2149
+ var removeSync = require_remove().removeSync;
2150
+ var mkdirpSync = require_mkdirs().mkdirpSync;
2151
+ var stat = require_stat();
2152
+ function moveSync(src, dest, opts) {
2153
+ opts = opts || {};
2154
+ const overwrite = opts.overwrite || opts.clobber || false;
2155
+ const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
2156
+ stat.checkParentPathsSync(src, srcStat, dest, "move");
2157
+ if (!isParentRoot(dest))
2158
+ mkdirpSync(path24.dirname(dest));
2159
+ return doRename(src, dest, overwrite, isChangingCase);
2160
+ }
2161
+ function isParentRoot(dest) {
2162
+ const parent = path24.dirname(dest);
2163
+ const parsedPath = path24.parse(parent);
2164
+ return parsedPath.root === parent;
2165
+ }
2166
+ function doRename(src, dest, overwrite, isChangingCase) {
2167
+ if (isChangingCase)
2168
+ return rename(src, dest, overwrite);
2169
+ if (overwrite) {
2170
+ removeSync(dest);
2171
+ return rename(src, dest, overwrite);
2172
+ }
2173
+ if (fs13.existsSync(dest))
2174
+ throw new Error("dest already exists.");
2175
+ return rename(src, dest, overwrite);
2176
+ }
2177
+ function rename(src, dest, overwrite) {
2178
+ try {
2179
+ fs13.renameSync(src, dest);
2180
+ } catch (err) {
2181
+ if (err.code !== "EXDEV")
2182
+ throw err;
2183
+ return moveAcrossDevice(src, dest, overwrite);
2184
+ }
2185
+ }
2186
+ function moveAcrossDevice(src, dest, overwrite) {
2187
+ const opts = {
2188
+ overwrite,
2189
+ errorOnExist: true,
2190
+ preserveTimestamps: true
2191
+ };
2192
+ copySync(src, dest, opts);
2193
+ return removeSync(src);
2194
+ }
2195
+ module2.exports = moveSync;
2196
+ }
2197
+ });
2198
+
2199
+ // node_modules/fs-extra/lib/move/index.js
2200
+ var require_move2 = __commonJS({
2201
+ "node_modules/fs-extra/lib/move/index.js"(exports2, module2) {
2202
+ "use strict";
2203
+ var u = require_universalify().fromPromise;
2204
+ module2.exports = {
2205
+ move: u(require_move()),
2206
+ moveSync: require_move_sync()
2207
+ };
2208
+ }
2209
+ });
2210
+
2211
+ // node_modules/fs-extra/lib/index.js
2212
+ var require_lib = __commonJS({
2213
+ "node_modules/fs-extra/lib/index.js"(exports2, module2) {
2214
+ "use strict";
2215
+ module2.exports = {
2216
+ // Export promiseified graceful-fs:
2217
+ ...require_fs(),
2218
+ // Export extra methods:
2219
+ ...require_copy2(),
2220
+ ...require_empty(),
2221
+ ...require_ensure(),
2222
+ ...require_json(),
2223
+ ...require_mkdirs(),
2224
+ ...require_move2(),
2225
+ ...require_output_file(),
2226
+ ...require_path_exists(),
2227
+ ...require_remove()
2228
+ };
2229
+ }
2230
+ });
2231
+
33
2232
  // node_modules/js-yaml/lib/js-yaml/common.js
34
2233
  var require_common = __commonJS({
35
2234
  "node_modules/js-yaml/lib/js-yaml/common.js"(exports2, module2) {
@@ -697,7 +2896,7 @@ var require_float = __commonJS({
697
2896
  });
698
2897
 
699
2898
  // node_modules/js-yaml/lib/js-yaml/schema/json.js
700
- var require_json = __commonJS({
2899
+ var require_json2 = __commonJS({
701
2900
  "node_modules/js-yaml/lib/js-yaml/schema/json.js"(exports2, module2) {
702
2901
  "use strict";
703
2902
  var Schema = require_schema();
@@ -722,7 +2921,7 @@ var require_core = __commonJS({
722
2921
  var Schema = require_schema();
723
2922
  module2.exports = new Schema({
724
2923
  include: [
725
- require_json()
2924
+ require_json2()
726
2925
  ]
727
2926
  });
728
2927
  }
@@ -2884,7 +5083,7 @@ var require_js_yaml = __commonJS({
2884
5083
  module2.exports.Type = require_type();
2885
5084
  module2.exports.Schema = require_schema();
2886
5085
  module2.exports.FAILSAFE_SCHEMA = require_failsafe();
2887
- module2.exports.JSON_SCHEMA = require_json();
5086
+ module2.exports.JSON_SCHEMA = require_json2();
2888
5087
  module2.exports.CORE_SCHEMA = require_core();
2889
5088
  module2.exports.DEFAULT_SAFE_SCHEMA = require_default_safe();
2890
5089
  module2.exports.DEFAULT_FULL_SCHEMA = require_default_full();
@@ -10985,7 +13184,7 @@ var require_javascript = __commonJS({
10985
13184
  });
10986
13185
 
10987
13186
  // node_modules/highlight.js/lib/languages/json.js
10988
- var require_json2 = __commonJS({
13187
+ var require_json3 = __commonJS({
10989
13188
  "node_modules/highlight.js/lib/languages/json.js"(exports2, module2) {
10990
13189
  function json(hljs) {
10991
13190
  const ATTRIBUTE = {
@@ -18063,7 +20262,7 @@ var require_common2 = __commonJS({
18063
20262
  hljs.registerLanguage("ini", require_ini());
18064
20263
  hljs.registerLanguage("java", require_java());
18065
20264
  hljs.registerLanguage("javascript", require_javascript());
18066
- hljs.registerLanguage("json", require_json2());
20265
+ hljs.registerLanguage("json", require_json3());
18067
20266
  hljs.registerLanguage("kotlin", require_kotlin());
18068
20267
  hljs.registerLanguage("less", require_less());
18069
20268
  hljs.registerLanguage("lua", require_lua());
@@ -18289,7 +20488,7 @@ var require_constants2 = __commonJS({
18289
20488
  });
18290
20489
 
18291
20490
  // node_modules/picomatch/lib/utils.js
18292
- var require_utils3 = __commonJS({
20491
+ var require_utils4 = __commonJS({
18293
20492
  "node_modules/picomatch/lib/utils.js"(exports2) {
18294
20493
  "use strict";
18295
20494
  var path24 = require("path");
@@ -18355,7 +20554,7 @@ var require_utils3 = __commonJS({
18355
20554
  var require_scan = __commonJS({
18356
20555
  "node_modules/picomatch/lib/scan.js"(exports2, module2) {
18357
20556
  "use strict";
18358
- var utils = require_utils3();
20557
+ var utils = require_utils4();
18359
20558
  var {
18360
20559
  CHAR_ASTERISK,
18361
20560
  /* * */
@@ -18689,7 +20888,7 @@ var require_parse3 = __commonJS({
18689
20888
  "node_modules/picomatch/lib/parse.js"(exports2, module2) {
18690
20889
  "use strict";
18691
20890
  var constants3 = require_constants2();
18692
- var utils = require_utils3();
20891
+ var utils = require_utils4();
18693
20892
  var {
18694
20893
  MAX_LENGTH,
18695
20894
  POSIX_REGEX_SOURCE,
@@ -19472,7 +21671,7 @@ var require_picomatch = __commonJS({
19472
21671
  var path24 = require("path");
19473
21672
  var scan = require_scan();
19474
21673
  var parse4 = require_parse3();
19475
- var utils = require_utils3();
21674
+ var utils = require_utils4();
19476
21675
  var constants3 = require_constants2();
19477
21676
  var isObject2 = (val) => val && typeof val === "object" && !Array.isArray(val);
19478
21677
  var picomatch = (glob2, options, returnState = false) => {
@@ -20129,7 +22328,7 @@ var require_glob_parent = __commonJS({
20129
22328
  });
20130
22329
 
20131
22330
  // node_modules/braces/lib/utils.js
20132
- var require_utils4 = __commonJS({
22331
+ var require_utils5 = __commonJS({
20133
22332
  "node_modules/braces/lib/utils.js"(exports2) {
20134
22333
  "use strict";
20135
22334
  exports2.isInteger = (num) => {
@@ -20216,7 +22415,7 @@ var require_utils4 = __commonJS({
20216
22415
  var require_stringify = __commonJS({
20217
22416
  "node_modules/braces/lib/stringify.js"(exports2, module2) {
20218
22417
  "use strict";
20219
- var utils = require_utils4();
22418
+ var utils = require_utils5();
20220
22419
  module2.exports = (ast, options = {}) => {
20221
22420
  let stringify = (node, parent = {}) => {
20222
22421
  let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
@@ -20682,7 +22881,7 @@ var require_compile = __commonJS({
20682
22881
  "node_modules/braces/lib/compile.js"(exports2, module2) {
20683
22882
  "use strict";
20684
22883
  var fill = require_fill_range();
20685
- var utils = require_utils4();
22884
+ var utils = require_utils5();
20686
22885
  var compile2 = (ast, options = {}) => {
20687
22886
  let walk = (node, parent = {}) => {
20688
22887
  let invalidBlock = utils.isInvalidBrace(parent);
@@ -20734,7 +22933,7 @@ var require_expand = __commonJS({
20734
22933
  "use strict";
20735
22934
  var fill = require_fill_range();
20736
22935
  var stringify = require_stringify();
20737
- var utils = require_utils4();
22936
+ var utils = require_utils5();
20738
22937
  var append = (queue = "", stash = "", enclose = false) => {
20739
22938
  let result = [];
20740
22939
  queue = [].concat(queue);
@@ -28070,7 +30269,7 @@ var require_extend_node = __commonJS({
28070
30269
  });
28071
30270
 
28072
30271
  // node_modules/raw-body/node_modules/iconv-lite/lib/index.js
28073
- var require_lib2 = __commonJS({
30272
+ var require_lib3 = __commonJS({
28074
30273
  "node_modules/raw-body/node_modules/iconv-lite/lib/index.js"(exports2, module2) {
28075
30274
  "use strict";
28076
30275
  var Buffer4 = require_safer().Buffer;
@@ -28217,7 +30416,7 @@ var require_raw_body = __commonJS({
28217
30416
  var asyncHooks = tryRequireAsyncHooks();
28218
30417
  var bytes = require_bytes();
28219
30418
  var createError = require_http_errors();
28220
- var iconv = require_lib2();
30419
+ var iconv = require_lib3();
28221
30420
  var unpipe = require_unpipe();
28222
30421
  module2.exports = getRawBody;
28223
30422
  var ICONV_ENCODING_MESSAGE_REGEXP = /^Encoding not recognized: /;
@@ -31681,7 +33880,7 @@ var require_extend_node2 = __commonJS({
31681
33880
  });
31682
33881
 
31683
33882
  // node_modules/body-parser/node_modules/iconv-lite/lib/index.js
31684
- var require_lib3 = __commonJS({
33883
+ var require_lib4 = __commonJS({
31685
33884
  "node_modules/body-parser/node_modules/iconv-lite/lib/index.js"(exports2, module2) {
31686
33885
  "use strict";
31687
33886
  var Buffer4 = require_safer().Buffer;
@@ -31955,7 +34154,7 @@ var require_read = __commonJS({
31955
34154
  var createError = require_http_errors();
31956
34155
  var destroy = require_destroy();
31957
34156
  var getBody = require_raw_body();
31958
- var iconv = require_lib3();
34157
+ var iconv = require_lib4();
31959
34158
  var onFinished = require_on_finished();
31960
34159
  var unpipe = require_unpipe();
31961
34160
  var zlib = require("zlib");
@@ -40928,7 +43127,7 @@ var require_type_is = __commonJS({
40928
43127
  });
40929
43128
 
40930
43129
  // node_modules/body-parser/lib/types/json.js
40931
- var require_json3 = __commonJS({
43130
+ var require_json4 = __commonJS({
40932
43131
  "node_modules/body-parser/lib/types/json.js"(exports2, module2) {
40933
43132
  "use strict";
40934
43133
  var bytes = require_bytes();
@@ -42389,7 +44588,7 @@ var require_formats = __commonJS({
42389
44588
  });
42390
44589
 
42391
44590
  // node_modules/qs/lib/utils.js
42392
- var require_utils5 = __commonJS({
44591
+ var require_utils6 = __commonJS({
42393
44592
  "node_modules/qs/lib/utils.js"(exports2, module2) {
42394
44593
  "use strict";
42395
44594
  var formats = require_formats();
@@ -42592,7 +44791,7 @@ var require_stringify2 = __commonJS({
42592
44791
  "node_modules/qs/lib/stringify.js"(exports2, module2) {
42593
44792
  "use strict";
42594
44793
  var getSideChannel = require_side_channel();
42595
- var utils = require_utils5();
44794
+ var utils = require_utils6();
42596
44795
  var formats = require_formats();
42597
44796
  var has2 = Object.prototype.hasOwnProperty;
42598
44797
  var arrayPrefixGenerators = {
@@ -42854,7 +45053,7 @@ var require_stringify2 = __commonJS({
42854
45053
  var require_parse5 = __commonJS({
42855
45054
  "node_modules/qs/lib/parse.js"(exports2, module2) {
42856
45055
  "use strict";
42857
- var utils = require_utils5();
45056
+ var utils = require_utils6();
42858
45057
  var has2 = Object.prototype.hasOwnProperty;
42859
45058
  var isArray = Array.isArray;
42860
45059
  var defaults2 = {
@@ -43053,7 +45252,7 @@ var require_parse5 = __commonJS({
43053
45252
  });
43054
45253
 
43055
45254
  // node_modules/qs/lib/index.js
43056
- var require_lib4 = __commonJS({
45255
+ var require_lib5 = __commonJS({
43057
45256
  "node_modules/qs/lib/index.js"(exports2, module2) {
43058
45257
  "use strict";
43059
45258
  var stringify = require_stringify2();
@@ -43187,7 +45386,7 @@ var require_urlencoded = __commonJS({
43187
45386
  }
43188
45387
  switch (name) {
43189
45388
  case "qs":
43190
- mod = require_lib4();
45389
+ mod = require_lib5();
43191
45390
  break;
43192
45391
  case "querystring":
43193
45392
  mod = require("querystring");
@@ -43286,7 +45485,7 @@ var require_body_parser = __commonJS({
43286
45485
  }
43287
45486
  switch (parserName) {
43288
45487
  case "json":
43289
- parser2 = require_json3();
45488
+ parser2 = require_json4();
43290
45489
  break;
43291
45490
  case "raw":
43292
45491
  parser2 = require_raw();
@@ -45071,7 +47270,7 @@ var require_query2 = __commonJS({
45071
47270
  "use strict";
45072
47271
  var merge = require_utils_merge();
45073
47272
  var parseUrl = require_parseurl();
45074
- var qs = require_lib4();
47273
+ var qs = require_lib5();
45075
47274
  module2.exports = function query(options) {
45076
47275
  var opts = merge({}, options);
45077
47276
  var queryparse = qs.parse;
@@ -47587,7 +49786,7 @@ var require_proxy_addr = __commonJS({
47587
49786
  });
47588
49787
 
47589
49788
  // node_modules/express/lib/utils.js
47590
- var require_utils6 = __commonJS({
49789
+ var require_utils7 = __commonJS({
47591
49790
  "node_modules/express/lib/utils.js"(exports2) {
47592
49791
  "use strict";
47593
49792
  var Buffer4 = require_safe_buffer().Buffer;
@@ -47598,7 +49797,7 @@ var require_utils6 = __commonJS({
47598
49797
  var mime = require_send().mime;
47599
49798
  var etag = require_etag();
47600
49799
  var proxyaddr = require_proxy_addr();
47601
- var qs = require_lib4();
49800
+ var qs = require_lib5();
47602
49801
  var querystring = require("querystring");
47603
49802
  exports2.etag = createETagGenerator({ weak: false });
47604
49803
  exports2.wetag = createETagGenerator({ weak: true });
@@ -47739,9 +49938,9 @@ var require_application = __commonJS({
47739
49938
  var debug = require_src5()("express:application");
47740
49939
  var View = require_view();
47741
49940
  var http = require("http");
47742
- var compileETag = require_utils6().compileETag;
47743
- var compileQueryParser = require_utils6().compileQueryParser;
47744
- var compileTrust = require_utils6().compileTrust;
49941
+ var compileETag = require_utils7().compileETag;
49942
+ var compileQueryParser = require_utils7().compileQueryParser;
49943
+ var compileTrust = require_utils7().compileTrust;
47745
49944
  var deprecate = require_depd()("express");
47746
49945
  var flatten = require_array_flatten();
47747
49946
  var merge = require_utils_merge();
@@ -49014,15 +51213,15 @@ var require_response = __commonJS({
49014
51213
  var encodeUrl = require_encodeurl();
49015
51214
  var escapeHtml3 = require_escape_html();
49016
51215
  var http = require("http");
49017
- var isAbsolute = require_utils6().isAbsolute;
51216
+ var isAbsolute = require_utils7().isAbsolute;
49018
51217
  var onFinished = require_on_finished();
49019
51218
  var path24 = require("path");
49020
51219
  var statuses = require_statuses();
49021
51220
  var merge = require_utils_merge();
49022
51221
  var sign = require_cookie_signature().sign;
49023
- var normalizeType = require_utils6().normalizeType;
49024
- var normalizeTypes = require_utils6().normalizeTypes;
49025
- var setCharset = require_utils6().setCharset;
51222
+ var normalizeType = require_utils7().normalizeType;
51223
+ var normalizeTypes = require_utils7().normalizeTypes;
51224
+ var setCharset = require_utils7().setCharset;
49026
51225
  var cookie = require_cookie();
49027
51226
  var send = require_send();
49028
51227
  var extname = path24.extname;
@@ -53978,7 +56177,7 @@ var require_body = __commonJS({
53978
56177
  });
53979
56178
 
53980
56179
  // node_modules/body/json.js
53981
- var require_json4 = __commonJS({
56180
+ var require_json5 = __commonJS({
53982
56181
  "node_modules/body/json.js"(exports2, module2) {
53983
56182
  var jsonParse = require_safe_json_parse();
53984
56183
  var body = require_body();
@@ -54040,7 +56239,7 @@ var require_any = __commonJS({
54040
56239
  "node_modules/body/any.js"(exports2, module2) {
54041
56240
  var TypedError = require_typed();
54042
56241
  var parseArguments = require_parse_arguments();
54043
- var jsonBody = require_json4();
56242
+ var jsonBody = require_json5();
54044
56243
  var formBody = require_form();
54045
56244
  var jsonType = "application/json";
54046
56245
  var formType = "application/x-www-form-urlencoded";
@@ -54113,7 +56312,7 @@ var require_server2 = __commonJS({
54113
56312
  var _package2 = _interopRequireDefault(_package);
54114
56313
  var _any = require_any();
54115
56314
  var _any2 = _interopRequireDefault(_any);
54116
- var _qs = require_lib4();
56315
+ var _qs = require_lib5();
54117
56316
  var _qs2 = _interopRequireDefault(_qs);
54118
56317
  function _interopRequireDefault(obj) {
54119
56318
  return obj && obj.__esModule ? obj : { default: obj };
@@ -54496,8 +56695,10 @@ __export(generator_exports, {
54496
56695
  vueFileReader: () => vueFileReader
54497
56696
  });
54498
56697
  module.exports = __toCommonJS(generator_exports);
54499
- var import_node_fs6 = __toESM(require("node:fs"));
56698
+ var import_node_fs6 = require("node:fs");
56699
+ var import_promises12 = __toESM(require("node:fs/promises"));
54500
56700
  var import_node_path15 = __toESM(require("node:path"));
56701
+ var import_fs_extra = __toESM(require_lib());
54501
56702
 
54502
56703
  // src/utils/find-document.ts
54503
56704
  function findDocument(haystack, needle) {
@@ -68846,7 +71047,7 @@ var __toESM3 = (mod, isNodeMode, target) => (target = mod != null ? __create3(__
68846
71047
  isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target,
68847
71048
  mod
68848
71049
  ));
68849
- var require_utils = __commonJS3({
71050
+ var require_utils3 = __commonJS3({
68850
71051
  "../../node_modules/esbuild-plugin-vue3/dist/utils.js"(exports2) {
68851
71052
  "use strict";
68852
71053
  var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
@@ -69217,7 +71418,7 @@ var require_paths = __commonJS3({
69217
71418
  };
69218
71419
  Object.defineProperty(exports2, "__esModule", { value: true });
69219
71420
  exports2.replaceRules = exports2.loadRules = void 0;
69220
- var utils_1 = require_utils();
71421
+ var utils_1 = require_utils3();
69221
71422
  var fs13 = __importStar(__require2("fs"));
69222
71423
  var typescript_1 = __require2("typescript");
69223
71424
  var rules = [];
@@ -72463,7 +74664,7 @@ var require_can_override = __commonJS3({
72463
74664
  };
72464
74665
  }
72465
74666
  });
72466
- var require_clone = __commonJS3({
74667
+ var require_clone2 = __commonJS3({
72467
74668
  "../../node_modules/clean-css/lib/optimizer/level-2/clone.js"(exports2, module2) {
72468
74669
  var wrapSingle = require_wrap_for_optimizing().single;
72469
74670
  var Token2 = require_token();
@@ -72496,7 +74697,7 @@ var require_clone = __commonJS3({
72496
74697
  });
72497
74698
  var require_restore = __commonJS3({
72498
74699
  "../../node_modules/clean-css/lib/optimizer/level-2/restore.js"(exports2, module2) {
72499
- var shallowClone = require_clone().shallow;
74700
+ var shallowClone = require_clone2().shallow;
72500
74701
  var Token2 = require_token();
72501
74702
  var Marker = require_marker();
72502
74703
  function isInheritOnly(values) {
@@ -73805,7 +76006,7 @@ var require_merge_into_shorthands = __commonJS3({
73805
76006
  var hasInherit = require_has_inherit();
73806
76007
  var populateComponents = require_populate_components();
73807
76008
  var compactable = require_compactable();
73808
- var deepClone = require_clone().deep;
76009
+ var deepClone = require_clone2().deep;
73809
76010
  var restoreWithComponents = require_restore_with_components();
73810
76011
  var restoreFromOptimizing = require_restore_from_optimizing();
73811
76012
  var wrapSingle = require_wrap_for_optimizing().single;
@@ -74233,9 +76434,9 @@ var require_override_properties = __commonJS3({
74233
76434
  var overridesNonComponentShorthand = require_overrides_non_component_shorthand();
74234
76435
  var sameVendorPrefixesIn = require_vendor_prefixes().same;
74235
76436
  var compactable = require_compactable();
74236
- var deepClone = require_clone().deep;
76437
+ var deepClone = require_clone2().deep;
74237
76438
  var restoreWithComponents = require_restore_with_components();
74238
- var shallowClone = require_clone().shallow;
76439
+ var shallowClone = require_clone2().shallow;
74239
76440
  var restoreFromOptimizing = require_restore_from_optimizing();
74240
76441
  var Token2 = require_token();
74241
76442
  var Marker = require_marker();
@@ -78529,7 +80730,7 @@ var require_clean_css = __commonJS3({
78529
80730
  module2.exports = require_clean();
78530
80731
  }
78531
80732
  });
78532
- var require_utils2 = __commonJS3({
80733
+ var require_utils22 = __commonJS3({
78533
80734
  "../../node_modules/html-minifier/src/utils.js"(exports2) {
78534
80735
  "use strict";
78535
80736
  function createMap(values, ignoreCase) {
@@ -78552,7 +80753,7 @@ var require_utils2 = __commonJS3({
78552
80753
  var require_htmlparser = __commonJS3({
78553
80754
  "../../node_modules/html-minifier/src/htmlparser.js"(exports2) {
78554
80755
  "use strict";
78555
- var createMapFromString = require_utils2().createMapFromString;
80756
+ var createMapFromString = require_utils22().createMapFromString;
78556
80757
  function makeMap(values) {
78557
80758
  return createMapFromString(values, true);
78558
80759
  }
@@ -79609,7 +81810,7 @@ var require_relate = __commonJS3({
79609
81810
  module2.exports = relateUrl;
79610
81811
  }
79611
81812
  });
79612
- var require_lib = __commonJS3({
81813
+ var require_lib2 = __commonJS3({
79613
81814
  "../../node_modules/relateurl/lib/index.js"(exports2, module2) {
79614
81815
  "use strict";
79615
81816
  var constants3 = require_constants();
@@ -79745,10 +81946,10 @@ var require_htmlminifier = __commonJS3({
79745
81946
  var CleanCSS = require_clean_css();
79746
81947
  var decode2 = __require2("he").decode;
79747
81948
  var HTMLParser = require_htmlparser().HTMLParser;
79748
- var RelateUrl = require_lib();
81949
+ var RelateUrl = require_lib2();
79749
81950
  var TokenChain = require_tokenchain();
79750
81951
  var UglifyJS = __require2("uglify-js");
79751
- var utils = require_utils2();
81952
+ var utils = require_utils22();
79752
81953
  function trimWhitespace(str) {
79753
81954
  return str && str.replace(/^[ \n\r\t\f]+/, "").replace(/[ \n\r\t\f]+$/, "");
79754
81955
  }
@@ -80965,7 +83166,7 @@ var require_html = __commonJS3({
80965
83166
  exports2.generateIndexHTML = void 0;
80966
83167
  var fs13 = __importStar(__require2("fs"));
80967
83168
  var path24 = __importStar(__require2("path"));
80968
- var utils_1 = require_utils();
83169
+ var utils_1 = require_utils3();
80969
83170
  function generateIndexHTML(result, opts, min, inlineStyles) {
80970
83171
  return __awaiter(this, void 0, void 0, function() {
80971
83172
  var cheerio, $2, _a3, _b, _i, _c, item, link2, name_1, ext2, script, link2, _d, inlineStyles_1, style, el, html, minify;
@@ -81255,7 +83456,7 @@ var require_dist = __commonJS3({
81255
83456
  var sfc = __importStar(__require2("@vue/compiler-sfc"));
81256
83457
  var core = __importStar(__require2("@vue/compiler-core"));
81257
83458
  var paths_1 = require_paths();
81258
- var utils_1 = require_utils();
83459
+ var utils_1 = require_utils3();
81259
83460
  var html_1 = require_html();
81260
83461
  var random_1 = __importDefault(require_random());
81261
83462
  var vuePlugin = function(opts) {
@@ -83625,7 +85826,7 @@ var Generator = class {
83625
85826
  templateFolders,
83626
85827
  setupPath
83627
85828
  } = this;
83628
- this._prepareFolders();
85829
+ await this._prepareFolders();
83629
85830
  const processors = [
83630
85831
  fileReaderProcessor(sourceFiles),
83631
85832
  vendorProcessor(assetFolder, this.vendor),
@@ -83669,16 +85870,17 @@ var Generator = class {
83669
85870
  }
83670
85871
  });
83671
85872
  }
83672
- _prepareFolders() {
85873
+ async _prepareFolders() {
83673
85874
  const { outputFolder, cacheFolder, assetFolder } = this;
83674
- import_node_fs6.default.rmSync(cacheFolder, { force: true, recursive: true });
83675
- if (import_node_fs6.default.existsSync(outputFolder)) {
83676
- import_node_fs6.default.mkdirSync(import_node_path15.default.dirname(cacheFolder), { recursive: true });
83677
- import_node_fs6.default.renameSync(outputFolder, cacheFolder);
83678
- }
83679
- import_node_fs6.default.mkdirSync(outputFolder, { recursive: true });
83680
- import_node_fs6.default.mkdirSync(assetFolder, { recursive: true });
83681
- import_node_fs6.default.mkdirSync("temp", { recursive: true });
85875
+ await import_promises12.default.rm(cacheFolder, { force: true, recursive: true });
85876
+ if ((0, import_node_fs6.existsSync)(outputFolder)) {
85877
+ await import_promises12.default.mkdir(import_node_path15.default.dirname(cacheFolder), { recursive: true });
85878
+ await import_fs_extra.default.copy(outputFolder, cacheFolder);
85879
+ await import_promises12.default.rm(outputFolder, { recursive: true });
85880
+ }
85881
+ await import_promises12.default.mkdir(outputFolder, { recursive: true });
85882
+ await import_promises12.default.mkdir(assetFolder, { recursive: true });
85883
+ await import_promises12.default.mkdir("temp", { recursive: true });
83682
85884
  }
83683
85885
  };
83684
85886
  // Annotate the CommonJS export names for ESM import in node: