@sentio/runtime 2.57.12-rc.h → 2.57.12-rc.j

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.
@@ -23,6 +23,2124 @@ import {
23
23
  require_writer
24
24
  } from "./chunk-XR3EZ6FB.js";
25
25
 
26
+ // ../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js
27
+ var require_universalify = __commonJS({
28
+ "../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"(exports) {
29
+ "use strict";
30
+ exports.fromCallback = function(fn) {
31
+ return Object.defineProperty(function(...args) {
32
+ if (typeof args[args.length - 1] === "function") fn.apply(this, args);
33
+ else {
34
+ return new Promise((resolve, reject) => {
35
+ args.push((err, res) => err != null ? reject(err) : resolve(res));
36
+ fn.apply(this, args);
37
+ });
38
+ }
39
+ }, "name", { value: fn.name });
40
+ };
41
+ exports.fromPromise = function(fn) {
42
+ return Object.defineProperty(function(...args) {
43
+ const cb = args[args.length - 1];
44
+ if (typeof cb !== "function") return fn.apply(this, args);
45
+ else {
46
+ args.pop();
47
+ fn.apply(this, args).then((r) => cb(null, r), cb);
48
+ }
49
+ }, "name", { value: fn.name });
50
+ };
51
+ }
52
+ });
53
+
54
+ // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js
55
+ var require_polyfills = __commonJS({
56
+ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports, module) {
57
+ "use strict";
58
+ var constants = __require("constants");
59
+ var origCwd = process.cwd;
60
+ var cwd = null;
61
+ var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
62
+ process.cwd = function() {
63
+ if (!cwd)
64
+ cwd = origCwd.call(process);
65
+ return cwd;
66
+ };
67
+ try {
68
+ process.cwd();
69
+ } catch (er) {
70
+ }
71
+ if (typeof process.chdir === "function") {
72
+ chdir = process.chdir;
73
+ process.chdir = function(d) {
74
+ cwd = null;
75
+ chdir.call(process, d);
76
+ };
77
+ if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
78
+ }
79
+ var chdir;
80
+ module.exports = patch;
81
+ function patch(fs2) {
82
+ if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
83
+ patchLchmod(fs2);
84
+ }
85
+ if (!fs2.lutimes) {
86
+ patchLutimes(fs2);
87
+ }
88
+ fs2.chown = chownFix(fs2.chown);
89
+ fs2.fchown = chownFix(fs2.fchown);
90
+ fs2.lchown = chownFix(fs2.lchown);
91
+ fs2.chmod = chmodFix(fs2.chmod);
92
+ fs2.fchmod = chmodFix(fs2.fchmod);
93
+ fs2.lchmod = chmodFix(fs2.lchmod);
94
+ fs2.chownSync = chownFixSync(fs2.chownSync);
95
+ fs2.fchownSync = chownFixSync(fs2.fchownSync);
96
+ fs2.lchownSync = chownFixSync(fs2.lchownSync);
97
+ fs2.chmodSync = chmodFixSync(fs2.chmodSync);
98
+ fs2.fchmodSync = chmodFixSync(fs2.fchmodSync);
99
+ fs2.lchmodSync = chmodFixSync(fs2.lchmodSync);
100
+ fs2.stat = statFix(fs2.stat);
101
+ fs2.fstat = statFix(fs2.fstat);
102
+ fs2.lstat = statFix(fs2.lstat);
103
+ fs2.statSync = statFixSync(fs2.statSync);
104
+ fs2.fstatSync = statFixSync(fs2.fstatSync);
105
+ fs2.lstatSync = statFixSync(fs2.lstatSync);
106
+ if (fs2.chmod && !fs2.lchmod) {
107
+ fs2.lchmod = function(path2, mode, cb) {
108
+ if (cb) process.nextTick(cb);
109
+ };
110
+ fs2.lchmodSync = function() {
111
+ };
112
+ }
113
+ if (fs2.chown && !fs2.lchown) {
114
+ fs2.lchown = function(path2, uid, gid, cb) {
115
+ if (cb) process.nextTick(cb);
116
+ };
117
+ fs2.lchownSync = function() {
118
+ };
119
+ }
120
+ if (platform === "win32") {
121
+ fs2.rename = typeof fs2.rename !== "function" ? fs2.rename : function(fs$rename) {
122
+ function rename(from2, to, cb) {
123
+ var start = Date.now();
124
+ var backoff = 0;
125
+ fs$rename(from2, to, function CB(er) {
126
+ if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
127
+ setTimeout(function() {
128
+ fs2.stat(to, function(stater, st) {
129
+ if (stater && stater.code === "ENOENT")
130
+ fs$rename(from2, to, CB);
131
+ else
132
+ cb(er);
133
+ });
134
+ }, backoff);
135
+ if (backoff < 100)
136
+ backoff += 10;
137
+ return;
138
+ }
139
+ if (cb) cb(er);
140
+ });
141
+ }
142
+ if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
143
+ return rename;
144
+ }(fs2.rename);
145
+ }
146
+ fs2.read = typeof fs2.read !== "function" ? fs2.read : function(fs$read) {
147
+ function read(fd, buffer, offset, length, position, callback_) {
148
+ var callback;
149
+ if (callback_ && typeof callback_ === "function") {
150
+ var eagCounter = 0;
151
+ callback = function(er, _, __) {
152
+ if (er && er.code === "EAGAIN" && eagCounter < 10) {
153
+ eagCounter++;
154
+ return fs$read.call(fs2, fd, buffer, offset, length, position, callback);
155
+ }
156
+ callback_.apply(this, arguments);
157
+ };
158
+ }
159
+ return fs$read.call(fs2, fd, buffer, offset, length, position, callback);
160
+ }
161
+ if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
162
+ return read;
163
+ }(fs2.read);
164
+ fs2.readSync = typeof fs2.readSync !== "function" ? fs2.readSync : /* @__PURE__ */ function(fs$readSync) {
165
+ return function(fd, buffer, offset, length, position) {
166
+ var eagCounter = 0;
167
+ while (true) {
168
+ try {
169
+ return fs$readSync.call(fs2, fd, buffer, offset, length, position);
170
+ } catch (er) {
171
+ if (er.code === "EAGAIN" && eagCounter < 10) {
172
+ eagCounter++;
173
+ continue;
174
+ }
175
+ throw er;
176
+ }
177
+ }
178
+ };
179
+ }(fs2.readSync);
180
+ function patchLchmod(fs3) {
181
+ fs3.lchmod = function(path2, mode, callback) {
182
+ fs3.open(
183
+ path2,
184
+ constants.O_WRONLY | constants.O_SYMLINK,
185
+ mode,
186
+ function(err, fd) {
187
+ if (err) {
188
+ if (callback) callback(err);
189
+ return;
190
+ }
191
+ fs3.fchmod(fd, mode, function(err2) {
192
+ fs3.close(fd, function(err22) {
193
+ if (callback) callback(err2 || err22);
194
+ });
195
+ });
196
+ }
197
+ );
198
+ };
199
+ fs3.lchmodSync = function(path2, mode) {
200
+ var fd = fs3.openSync(path2, constants.O_WRONLY | constants.O_SYMLINK, mode);
201
+ var threw = true;
202
+ var ret;
203
+ try {
204
+ ret = fs3.fchmodSync(fd, mode);
205
+ threw = false;
206
+ } finally {
207
+ if (threw) {
208
+ try {
209
+ fs3.closeSync(fd);
210
+ } catch (er) {
211
+ }
212
+ } else {
213
+ fs3.closeSync(fd);
214
+ }
215
+ }
216
+ return ret;
217
+ };
218
+ }
219
+ function patchLutimes(fs3) {
220
+ if (constants.hasOwnProperty("O_SYMLINK") && fs3.futimes) {
221
+ fs3.lutimes = function(path2, at, mt, cb) {
222
+ fs3.open(path2, constants.O_SYMLINK, function(er, fd) {
223
+ if (er) {
224
+ if (cb) cb(er);
225
+ return;
226
+ }
227
+ fs3.futimes(fd, at, mt, function(er2) {
228
+ fs3.close(fd, function(er22) {
229
+ if (cb) cb(er2 || er22);
230
+ });
231
+ });
232
+ });
233
+ };
234
+ fs3.lutimesSync = function(path2, at, mt) {
235
+ var fd = fs3.openSync(path2, constants.O_SYMLINK);
236
+ var ret;
237
+ var threw = true;
238
+ try {
239
+ ret = fs3.futimesSync(fd, at, mt);
240
+ threw = false;
241
+ } finally {
242
+ if (threw) {
243
+ try {
244
+ fs3.closeSync(fd);
245
+ } catch (er) {
246
+ }
247
+ } else {
248
+ fs3.closeSync(fd);
249
+ }
250
+ }
251
+ return ret;
252
+ };
253
+ } else if (fs3.futimes) {
254
+ fs3.lutimes = function(_a, _b, _c, cb) {
255
+ if (cb) process.nextTick(cb);
256
+ };
257
+ fs3.lutimesSync = function() {
258
+ };
259
+ }
260
+ }
261
+ function chmodFix(orig) {
262
+ if (!orig) return orig;
263
+ return function(target, mode, cb) {
264
+ return orig.call(fs2, target, mode, function(er) {
265
+ if (chownErOk(er)) er = null;
266
+ if (cb) cb.apply(this, arguments);
267
+ });
268
+ };
269
+ }
270
+ function chmodFixSync(orig) {
271
+ if (!orig) return orig;
272
+ return function(target, mode) {
273
+ try {
274
+ return orig.call(fs2, target, mode);
275
+ } catch (er) {
276
+ if (!chownErOk(er)) throw er;
277
+ }
278
+ };
279
+ }
280
+ function chownFix(orig) {
281
+ if (!orig) return orig;
282
+ return function(target, uid, gid, cb) {
283
+ return orig.call(fs2, target, uid, gid, function(er) {
284
+ if (chownErOk(er)) er = null;
285
+ if (cb) cb.apply(this, arguments);
286
+ });
287
+ };
288
+ }
289
+ function chownFixSync(orig) {
290
+ if (!orig) return orig;
291
+ return function(target, uid, gid) {
292
+ try {
293
+ return orig.call(fs2, target, uid, gid);
294
+ } catch (er) {
295
+ if (!chownErOk(er)) throw er;
296
+ }
297
+ };
298
+ }
299
+ function statFix(orig) {
300
+ if (!orig) return orig;
301
+ return function(target, options, cb) {
302
+ if (typeof options === "function") {
303
+ cb = options;
304
+ options = null;
305
+ }
306
+ function callback(er, stats) {
307
+ if (stats) {
308
+ if (stats.uid < 0) stats.uid += 4294967296;
309
+ if (stats.gid < 0) stats.gid += 4294967296;
310
+ }
311
+ if (cb) cb.apply(this, arguments);
312
+ }
313
+ return options ? orig.call(fs2, target, options, callback) : orig.call(fs2, target, callback);
314
+ };
315
+ }
316
+ function statFixSync(orig) {
317
+ if (!orig) return orig;
318
+ return function(target, options) {
319
+ var stats = options ? orig.call(fs2, target, options) : orig.call(fs2, target);
320
+ if (stats) {
321
+ if (stats.uid < 0) stats.uid += 4294967296;
322
+ if (stats.gid < 0) stats.gid += 4294967296;
323
+ }
324
+ return stats;
325
+ };
326
+ }
327
+ function chownErOk(er) {
328
+ if (!er)
329
+ return true;
330
+ if (er.code === "ENOSYS")
331
+ return true;
332
+ var nonroot = !process.getuid || process.getuid() !== 0;
333
+ if (nonroot) {
334
+ if (er.code === "EINVAL" || er.code === "EPERM")
335
+ return true;
336
+ }
337
+ return false;
338
+ }
339
+ }
340
+ }
341
+ });
342
+
343
+ // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js
344
+ var require_legacy_streams = __commonJS({
345
+ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports, module) {
346
+ "use strict";
347
+ var Stream = __require("stream").Stream;
348
+ module.exports = legacy;
349
+ function legacy(fs2) {
350
+ return {
351
+ ReadStream,
352
+ WriteStream
353
+ };
354
+ function ReadStream(path2, options) {
355
+ if (!(this instanceof ReadStream)) return new ReadStream(path2, options);
356
+ Stream.call(this);
357
+ var self2 = this;
358
+ this.path = path2;
359
+ this.fd = null;
360
+ this.readable = true;
361
+ this.paused = false;
362
+ this.flags = "r";
363
+ this.mode = 438;
364
+ this.bufferSize = 64 * 1024;
365
+ options = options || {};
366
+ var keys = Object.keys(options);
367
+ for (var index = 0, length = keys.length; index < length; index++) {
368
+ var key = keys[index];
369
+ this[key] = options[key];
370
+ }
371
+ if (this.encoding) this.setEncoding(this.encoding);
372
+ if (this.start !== void 0) {
373
+ if ("number" !== typeof this.start) {
374
+ throw TypeError("start must be a Number");
375
+ }
376
+ if (this.end === void 0) {
377
+ this.end = Infinity;
378
+ } else if ("number" !== typeof this.end) {
379
+ throw TypeError("end must be a Number");
380
+ }
381
+ if (this.start > this.end) {
382
+ throw new Error("start must be <= end");
383
+ }
384
+ this.pos = this.start;
385
+ }
386
+ if (this.fd !== null) {
387
+ process.nextTick(function() {
388
+ self2._read();
389
+ });
390
+ return;
391
+ }
392
+ fs2.open(this.path, this.flags, this.mode, function(err, fd) {
393
+ if (err) {
394
+ self2.emit("error", err);
395
+ self2.readable = false;
396
+ return;
397
+ }
398
+ self2.fd = fd;
399
+ self2.emit("open", fd);
400
+ self2._read();
401
+ });
402
+ }
403
+ function WriteStream(path2, options) {
404
+ if (!(this instanceof WriteStream)) return new WriteStream(path2, options);
405
+ Stream.call(this);
406
+ this.path = path2;
407
+ this.fd = null;
408
+ this.writable = true;
409
+ this.flags = "w";
410
+ this.encoding = "binary";
411
+ this.mode = 438;
412
+ this.bytesWritten = 0;
413
+ options = options || {};
414
+ var keys = Object.keys(options);
415
+ for (var index = 0, length = keys.length; index < length; index++) {
416
+ var key = keys[index];
417
+ this[key] = options[key];
418
+ }
419
+ if (this.start !== void 0) {
420
+ if ("number" !== typeof this.start) {
421
+ throw TypeError("start must be a Number");
422
+ }
423
+ if (this.start < 0) {
424
+ throw new Error("start must be >= zero");
425
+ }
426
+ this.pos = this.start;
427
+ }
428
+ this.busy = false;
429
+ this._queue = [];
430
+ if (this.fd === null) {
431
+ this._open = fs2.open;
432
+ this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
433
+ this.flush();
434
+ }
435
+ }
436
+ }
437
+ }
438
+ });
439
+
440
+ // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js
441
+ var require_clone = __commonJS({
442
+ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports, module) {
443
+ "use strict";
444
+ module.exports = clone;
445
+ var getPrototypeOf = Object.getPrototypeOf || function(obj) {
446
+ return obj.__proto__;
447
+ };
448
+ function clone(obj) {
449
+ if (obj === null || typeof obj !== "object")
450
+ return obj;
451
+ if (obj instanceof Object)
452
+ var copy4 = { __proto__: getPrototypeOf(obj) };
453
+ else
454
+ var copy4 = /* @__PURE__ */ Object.create(null);
455
+ Object.getOwnPropertyNames(obj).forEach(function(key) {
456
+ Object.defineProperty(copy4, key, Object.getOwnPropertyDescriptor(obj, key));
457
+ });
458
+ return copy4;
459
+ }
460
+ }
461
+ });
462
+
463
+ // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
464
+ var require_graceful_fs = __commonJS({
465
+ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports, module) {
466
+ "use strict";
467
+ var fs2 = __require("fs");
468
+ var polyfills = require_polyfills();
469
+ var legacy = require_legacy_streams();
470
+ var clone = require_clone();
471
+ var util = __require("util");
472
+ var gracefulQueue;
473
+ var previousSymbol;
474
+ if (typeof Symbol === "function" && typeof Symbol.for === "function") {
475
+ gracefulQueue = Symbol.for("graceful-fs.queue");
476
+ previousSymbol = Symbol.for("graceful-fs.previous");
477
+ } else {
478
+ gracefulQueue = "___graceful-fs.queue";
479
+ previousSymbol = "___graceful-fs.previous";
480
+ }
481
+ function noop() {
482
+ }
483
+ function publishQueue(context2, queue2) {
484
+ Object.defineProperty(context2, gracefulQueue, {
485
+ get: function() {
486
+ return queue2;
487
+ }
488
+ });
489
+ }
490
+ var debug = noop;
491
+ if (util.debuglog)
492
+ debug = util.debuglog("gfs4");
493
+ else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
494
+ debug = function() {
495
+ var m = util.format.apply(util, arguments);
496
+ m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
497
+ console.error(m);
498
+ };
499
+ if (!fs2[gracefulQueue]) {
500
+ queue = global[gracefulQueue] || [];
501
+ publishQueue(fs2, queue);
502
+ fs2.close = function(fs$close) {
503
+ function close(fd, cb) {
504
+ return fs$close.call(fs2, fd, function(err) {
505
+ if (!err) {
506
+ resetQueue();
507
+ }
508
+ if (typeof cb === "function")
509
+ cb.apply(this, arguments);
510
+ });
511
+ }
512
+ Object.defineProperty(close, previousSymbol, {
513
+ value: fs$close
514
+ });
515
+ return close;
516
+ }(fs2.close);
517
+ fs2.closeSync = function(fs$closeSync) {
518
+ function closeSync(fd) {
519
+ fs$closeSync.apply(fs2, arguments);
520
+ resetQueue();
521
+ }
522
+ Object.defineProperty(closeSync, previousSymbol, {
523
+ value: fs$closeSync
524
+ });
525
+ return closeSync;
526
+ }(fs2.closeSync);
527
+ if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
528
+ process.on("exit", function() {
529
+ debug(fs2[gracefulQueue]);
530
+ __require("assert").equal(fs2[gracefulQueue].length, 0);
531
+ });
532
+ }
533
+ }
534
+ var queue;
535
+ if (!global[gracefulQueue]) {
536
+ publishQueue(global, fs2[gracefulQueue]);
537
+ }
538
+ module.exports = patch(clone(fs2));
539
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs2.__patched) {
540
+ module.exports = patch(fs2);
541
+ fs2.__patched = true;
542
+ }
543
+ function patch(fs3) {
544
+ polyfills(fs3);
545
+ fs3.gracefulify = patch;
546
+ fs3.createReadStream = createReadStream;
547
+ fs3.createWriteStream = createWriteStream;
548
+ var fs$readFile = fs3.readFile;
549
+ fs3.readFile = readFile;
550
+ function readFile(path2, options, cb) {
551
+ if (typeof options === "function")
552
+ cb = options, options = null;
553
+ return go$readFile(path2, options, cb);
554
+ function go$readFile(path3, options2, cb2, startTime) {
555
+ return fs$readFile(path3, options2, function(err) {
556
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
557
+ enqueue([go$readFile, [path3, options2, cb2], err, startTime || Date.now(), Date.now()]);
558
+ else {
559
+ if (typeof cb2 === "function")
560
+ cb2.apply(this, arguments);
561
+ }
562
+ });
563
+ }
564
+ }
565
+ var fs$writeFile = fs3.writeFile;
566
+ fs3.writeFile = writeFile;
567
+ function writeFile(path2, data, options, cb) {
568
+ if (typeof options === "function")
569
+ cb = options, options = null;
570
+ return go$writeFile(path2, data, options, cb);
571
+ function go$writeFile(path3, data2, options2, cb2, startTime) {
572
+ return fs$writeFile(path3, data2, options2, function(err) {
573
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
574
+ enqueue([go$writeFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
575
+ else {
576
+ if (typeof cb2 === "function")
577
+ cb2.apply(this, arguments);
578
+ }
579
+ });
580
+ }
581
+ }
582
+ var fs$appendFile = fs3.appendFile;
583
+ if (fs$appendFile)
584
+ fs3.appendFile = appendFile;
585
+ function appendFile(path2, data, options, cb) {
586
+ if (typeof options === "function")
587
+ cb = options, options = null;
588
+ return go$appendFile(path2, data, options, cb);
589
+ function go$appendFile(path3, data2, options2, cb2, startTime) {
590
+ return fs$appendFile(path3, data2, options2, function(err) {
591
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
592
+ enqueue([go$appendFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
593
+ else {
594
+ if (typeof cb2 === "function")
595
+ cb2.apply(this, arguments);
596
+ }
597
+ });
598
+ }
599
+ }
600
+ var fs$copyFile = fs3.copyFile;
601
+ if (fs$copyFile)
602
+ fs3.copyFile = copyFile;
603
+ function copyFile(src, dest, flags, cb) {
604
+ if (typeof flags === "function") {
605
+ cb = flags;
606
+ flags = 0;
607
+ }
608
+ return go$copyFile(src, dest, flags, cb);
609
+ function go$copyFile(src2, dest2, flags2, cb2, startTime) {
610
+ return fs$copyFile(src2, dest2, flags2, function(err) {
611
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
612
+ enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
613
+ else {
614
+ if (typeof cb2 === "function")
615
+ cb2.apply(this, arguments);
616
+ }
617
+ });
618
+ }
619
+ }
620
+ var fs$readdir = fs3.readdir;
621
+ fs3.readdir = readdir;
622
+ var noReaddirOptionVersions = /^v[0-5]\./;
623
+ function readdir(path2, options, cb) {
624
+ if (typeof options === "function")
625
+ cb = options, options = null;
626
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path3, options2, cb2, startTime) {
627
+ return fs$readdir(path3, fs$readdirCallback(
628
+ path3,
629
+ options2,
630
+ cb2,
631
+ startTime
632
+ ));
633
+ } : function go$readdir2(path3, options2, cb2, startTime) {
634
+ return fs$readdir(path3, options2, fs$readdirCallback(
635
+ path3,
636
+ options2,
637
+ cb2,
638
+ startTime
639
+ ));
640
+ };
641
+ return go$readdir(path2, options, cb);
642
+ function fs$readdirCallback(path3, options2, cb2, startTime) {
643
+ return function(err, files) {
644
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
645
+ enqueue([
646
+ go$readdir,
647
+ [path3, options2, cb2],
648
+ err,
649
+ startTime || Date.now(),
650
+ Date.now()
651
+ ]);
652
+ else {
653
+ if (files && files.sort)
654
+ files.sort();
655
+ if (typeof cb2 === "function")
656
+ cb2.call(this, err, files);
657
+ }
658
+ };
659
+ }
660
+ }
661
+ if (process.version.substr(0, 4) === "v0.8") {
662
+ var legStreams = legacy(fs3);
663
+ ReadStream = legStreams.ReadStream;
664
+ WriteStream = legStreams.WriteStream;
665
+ }
666
+ var fs$ReadStream = fs3.ReadStream;
667
+ if (fs$ReadStream) {
668
+ ReadStream.prototype = Object.create(fs$ReadStream.prototype);
669
+ ReadStream.prototype.open = ReadStream$open;
670
+ }
671
+ var fs$WriteStream = fs3.WriteStream;
672
+ if (fs$WriteStream) {
673
+ WriteStream.prototype = Object.create(fs$WriteStream.prototype);
674
+ WriteStream.prototype.open = WriteStream$open;
675
+ }
676
+ Object.defineProperty(fs3, "ReadStream", {
677
+ get: function() {
678
+ return ReadStream;
679
+ },
680
+ set: function(val) {
681
+ ReadStream = val;
682
+ },
683
+ enumerable: true,
684
+ configurable: true
685
+ });
686
+ Object.defineProperty(fs3, "WriteStream", {
687
+ get: function() {
688
+ return WriteStream;
689
+ },
690
+ set: function(val) {
691
+ WriteStream = val;
692
+ },
693
+ enumerable: true,
694
+ configurable: true
695
+ });
696
+ var FileReadStream = ReadStream;
697
+ Object.defineProperty(fs3, "FileReadStream", {
698
+ get: function() {
699
+ return FileReadStream;
700
+ },
701
+ set: function(val) {
702
+ FileReadStream = val;
703
+ },
704
+ enumerable: true,
705
+ configurable: true
706
+ });
707
+ var FileWriteStream = WriteStream;
708
+ Object.defineProperty(fs3, "FileWriteStream", {
709
+ get: function() {
710
+ return FileWriteStream;
711
+ },
712
+ set: function(val) {
713
+ FileWriteStream = val;
714
+ },
715
+ enumerable: true,
716
+ configurable: true
717
+ });
718
+ function ReadStream(path2, options) {
719
+ if (this instanceof ReadStream)
720
+ return fs$ReadStream.apply(this, arguments), this;
721
+ else
722
+ return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
723
+ }
724
+ function ReadStream$open() {
725
+ var that = this;
726
+ open(that.path, that.flags, that.mode, function(err, fd) {
727
+ if (err) {
728
+ if (that.autoClose)
729
+ that.destroy();
730
+ that.emit("error", err);
731
+ } else {
732
+ that.fd = fd;
733
+ that.emit("open", fd);
734
+ that.read();
735
+ }
736
+ });
737
+ }
738
+ function WriteStream(path2, options) {
739
+ if (this instanceof WriteStream)
740
+ return fs$WriteStream.apply(this, arguments), this;
741
+ else
742
+ return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
743
+ }
744
+ function WriteStream$open() {
745
+ var that = this;
746
+ open(that.path, that.flags, that.mode, function(err, fd) {
747
+ if (err) {
748
+ that.destroy();
749
+ that.emit("error", err);
750
+ } else {
751
+ that.fd = fd;
752
+ that.emit("open", fd);
753
+ }
754
+ });
755
+ }
756
+ function createReadStream(path2, options) {
757
+ return new fs3.ReadStream(path2, options);
758
+ }
759
+ function createWriteStream(path2, options) {
760
+ return new fs3.WriteStream(path2, options);
761
+ }
762
+ var fs$open = fs3.open;
763
+ fs3.open = open;
764
+ function open(path2, flags, mode, cb) {
765
+ if (typeof mode === "function")
766
+ cb = mode, mode = null;
767
+ return go$open(path2, flags, mode, cb);
768
+ function go$open(path3, flags2, mode2, cb2, startTime) {
769
+ return fs$open(path3, flags2, mode2, function(err, fd) {
770
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
771
+ enqueue([go$open, [path3, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
772
+ else {
773
+ if (typeof cb2 === "function")
774
+ cb2.apply(this, arguments);
775
+ }
776
+ });
777
+ }
778
+ }
779
+ return fs3;
780
+ }
781
+ function enqueue(elem) {
782
+ debug("ENQUEUE", elem[0].name, elem[1]);
783
+ fs2[gracefulQueue].push(elem);
784
+ retry2();
785
+ }
786
+ var retryTimer;
787
+ function resetQueue() {
788
+ var now = Date.now();
789
+ for (var i = 0; i < fs2[gracefulQueue].length; ++i) {
790
+ if (fs2[gracefulQueue][i].length > 2) {
791
+ fs2[gracefulQueue][i][3] = now;
792
+ fs2[gracefulQueue][i][4] = now;
793
+ }
794
+ }
795
+ retry2();
796
+ }
797
+ function retry2() {
798
+ clearTimeout(retryTimer);
799
+ retryTimer = void 0;
800
+ if (fs2[gracefulQueue].length === 0)
801
+ return;
802
+ var elem = fs2[gracefulQueue].shift();
803
+ var fn = elem[0];
804
+ var args = elem[1];
805
+ var err = elem[2];
806
+ var startTime = elem[3];
807
+ var lastTime = elem[4];
808
+ if (startTime === void 0) {
809
+ debug("RETRY", fn.name, args);
810
+ fn.apply(null, args);
811
+ } else if (Date.now() - startTime >= 6e4) {
812
+ debug("TIMEOUT", fn.name, args);
813
+ var cb = args.pop();
814
+ if (typeof cb === "function")
815
+ cb.call(null, err);
816
+ } else {
817
+ var sinceAttempt = Date.now() - lastTime;
818
+ var sinceStart = Math.max(lastTime - startTime, 1);
819
+ var desiredDelay = Math.min(sinceStart * 1.2, 100);
820
+ if (sinceAttempt >= desiredDelay) {
821
+ debug("RETRY", fn.name, args);
822
+ fn.apply(null, args.concat([startTime]));
823
+ } else {
824
+ fs2[gracefulQueue].push(elem);
825
+ }
826
+ }
827
+ if (retryTimer === void 0) {
828
+ retryTimer = setTimeout(retry2, 0);
829
+ }
830
+ }
831
+ }
832
+ });
833
+
834
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/fs/index.js
835
+ var require_fs = __commonJS({
836
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/fs/index.js"(exports) {
837
+ "use strict";
838
+ var u = require_universalify().fromCallback;
839
+ var fs2 = require_graceful_fs();
840
+ var api = [
841
+ "access",
842
+ "appendFile",
843
+ "chmod",
844
+ "chown",
845
+ "close",
846
+ "copyFile",
847
+ "fchmod",
848
+ "fchown",
849
+ "fdatasync",
850
+ "fstat",
851
+ "fsync",
852
+ "ftruncate",
853
+ "futimes",
854
+ "lchmod",
855
+ "lchown",
856
+ "link",
857
+ "lstat",
858
+ "mkdir",
859
+ "mkdtemp",
860
+ "open",
861
+ "opendir",
862
+ "readdir",
863
+ "readFile",
864
+ "readlink",
865
+ "realpath",
866
+ "rename",
867
+ "rm",
868
+ "rmdir",
869
+ "stat",
870
+ "symlink",
871
+ "truncate",
872
+ "unlink",
873
+ "utimes",
874
+ "writeFile"
875
+ ].filter((key) => {
876
+ return typeof fs2[key] === "function";
877
+ });
878
+ Object.assign(exports, fs2);
879
+ api.forEach((method) => {
880
+ exports[method] = u(fs2[method]);
881
+ });
882
+ exports.exists = function(filename, callback) {
883
+ if (typeof callback === "function") {
884
+ return fs2.exists(filename, callback);
885
+ }
886
+ return new Promise((resolve) => {
887
+ return fs2.exists(filename, resolve);
888
+ });
889
+ };
890
+ exports.read = function(fd, buffer, offset, length, position, callback) {
891
+ if (typeof callback === "function") {
892
+ return fs2.read(fd, buffer, offset, length, position, callback);
893
+ }
894
+ return new Promise((resolve, reject) => {
895
+ fs2.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
896
+ if (err) return reject(err);
897
+ resolve({ bytesRead, buffer: buffer2 });
898
+ });
899
+ });
900
+ };
901
+ exports.write = function(fd, buffer, ...args) {
902
+ if (typeof args[args.length - 1] === "function") {
903
+ return fs2.write(fd, buffer, ...args);
904
+ }
905
+ return new Promise((resolve, reject) => {
906
+ fs2.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
907
+ if (err) return reject(err);
908
+ resolve({ bytesWritten, buffer: buffer2 });
909
+ });
910
+ });
911
+ };
912
+ exports.readv = function(fd, buffers, ...args) {
913
+ if (typeof args[args.length - 1] === "function") {
914
+ return fs2.readv(fd, buffers, ...args);
915
+ }
916
+ return new Promise((resolve, reject) => {
917
+ fs2.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
918
+ if (err) return reject(err);
919
+ resolve({ bytesRead, buffers: buffers2 });
920
+ });
921
+ });
922
+ };
923
+ exports.writev = function(fd, buffers, ...args) {
924
+ if (typeof args[args.length - 1] === "function") {
925
+ return fs2.writev(fd, buffers, ...args);
926
+ }
927
+ return new Promise((resolve, reject) => {
928
+ fs2.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
929
+ if (err) return reject(err);
930
+ resolve({ bytesWritten, buffers: buffers2 });
931
+ });
932
+ });
933
+ };
934
+ if (typeof fs2.realpath.native === "function") {
935
+ exports.realpath.native = u(fs2.realpath.native);
936
+ } else {
937
+ process.emitWarning(
938
+ "fs.realpath.native is not a function. Is fs being monkey-patched?",
939
+ "Warning",
940
+ "fs-extra-WARN0003"
941
+ );
942
+ }
943
+ }
944
+ });
945
+
946
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/utils.js
947
+ var require_utils = __commonJS({
948
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module) {
949
+ "use strict";
950
+ var path2 = __require("path");
951
+ module.exports.checkPath = function checkPath(pth) {
952
+ if (process.platform === "win32") {
953
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path2.parse(pth).root, ""));
954
+ if (pathHasInvalidWinCharacters) {
955
+ const error = new Error(`Path contains invalid characters: ${pth}`);
956
+ error.code = "EINVAL";
957
+ throw error;
958
+ }
959
+ }
960
+ };
961
+ }
962
+ });
963
+
964
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/make-dir.js
965
+ var require_make_dir = __commonJS({
966
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module) {
967
+ "use strict";
968
+ var fs2 = require_fs();
969
+ var { checkPath } = require_utils();
970
+ var getMode = (options) => {
971
+ const defaults = { mode: 511 };
972
+ if (typeof options === "number") return options;
973
+ return { ...defaults, ...options }.mode;
974
+ };
975
+ module.exports.makeDir = async (dir, options) => {
976
+ checkPath(dir);
977
+ return fs2.mkdir(dir, {
978
+ mode: getMode(options),
979
+ recursive: true
980
+ });
981
+ };
982
+ module.exports.makeDirSync = (dir, options) => {
983
+ checkPath(dir);
984
+ return fs2.mkdirSync(dir, {
985
+ mode: getMode(options),
986
+ recursive: true
987
+ });
988
+ };
989
+ }
990
+ });
991
+
992
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/index.js
993
+ var require_mkdirs = __commonJS({
994
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/index.js"(exports, module) {
995
+ "use strict";
996
+ var u = require_universalify().fromPromise;
997
+ var { makeDir: _makeDir, makeDirSync } = require_make_dir();
998
+ var makeDir = u(_makeDir);
999
+ module.exports = {
1000
+ mkdirs: makeDir,
1001
+ mkdirsSync: makeDirSync,
1002
+ // alias
1003
+ mkdirp: makeDir,
1004
+ mkdirpSync: makeDirSync,
1005
+ ensureDir: makeDir,
1006
+ ensureDirSync: makeDirSync
1007
+ };
1008
+ }
1009
+ });
1010
+
1011
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/path-exists/index.js
1012
+ var require_path_exists = __commonJS({
1013
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/path-exists/index.js"(exports, module) {
1014
+ "use strict";
1015
+ var u = require_universalify().fromPromise;
1016
+ var fs2 = require_fs();
1017
+ function pathExists(path2) {
1018
+ return fs2.access(path2).then(() => true).catch(() => false);
1019
+ }
1020
+ module.exports = {
1021
+ pathExists: u(pathExists),
1022
+ pathExistsSync: fs2.existsSync
1023
+ };
1024
+ }
1025
+ });
1026
+
1027
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/utimes.js
1028
+ var require_utimes = __commonJS({
1029
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/utimes.js"(exports, module) {
1030
+ "use strict";
1031
+ var fs2 = require_fs();
1032
+ var u = require_universalify().fromPromise;
1033
+ async function utimesMillis(path2, atime, mtime) {
1034
+ const fd = await fs2.open(path2, "r+");
1035
+ let closeErr = null;
1036
+ try {
1037
+ await fs2.futimes(fd, atime, mtime);
1038
+ } finally {
1039
+ try {
1040
+ await fs2.close(fd);
1041
+ } catch (e) {
1042
+ closeErr = e;
1043
+ }
1044
+ }
1045
+ if (closeErr) {
1046
+ throw closeErr;
1047
+ }
1048
+ }
1049
+ function utimesMillisSync(path2, atime, mtime) {
1050
+ const fd = fs2.openSync(path2, "r+");
1051
+ fs2.futimesSync(fd, atime, mtime);
1052
+ return fs2.closeSync(fd);
1053
+ }
1054
+ module.exports = {
1055
+ utimesMillis: u(utimesMillis),
1056
+ utimesMillisSync
1057
+ };
1058
+ }
1059
+ });
1060
+
1061
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/stat.js
1062
+ var require_stat = __commonJS({
1063
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/stat.js"(exports, module) {
1064
+ "use strict";
1065
+ var fs2 = require_fs();
1066
+ var path2 = __require("path");
1067
+ var u = require_universalify().fromPromise;
1068
+ function getStats(src, dest, opts) {
1069
+ const statFunc = opts.dereference ? (file) => fs2.stat(file, { bigint: true }) : (file) => fs2.lstat(file, { bigint: true });
1070
+ return Promise.all([
1071
+ statFunc(src),
1072
+ statFunc(dest).catch((err) => {
1073
+ if (err.code === "ENOENT") return null;
1074
+ throw err;
1075
+ })
1076
+ ]).then(([srcStat, destStat]) => ({ srcStat, destStat }));
1077
+ }
1078
+ function getStatsSync(src, dest, opts) {
1079
+ let destStat;
1080
+ const statFunc = opts.dereference ? (file) => fs2.statSync(file, { bigint: true }) : (file) => fs2.lstatSync(file, { bigint: true });
1081
+ const srcStat = statFunc(src);
1082
+ try {
1083
+ destStat = statFunc(dest);
1084
+ } catch (err) {
1085
+ if (err.code === "ENOENT") return { srcStat, destStat: null };
1086
+ throw err;
1087
+ }
1088
+ return { srcStat, destStat };
1089
+ }
1090
+ async function checkPaths(src, dest, funcName, opts) {
1091
+ const { srcStat, destStat } = await getStats(src, dest, opts);
1092
+ if (destStat) {
1093
+ if (areIdentical(srcStat, destStat)) {
1094
+ const srcBaseName = path2.basename(src);
1095
+ const destBaseName = path2.basename(dest);
1096
+ if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
1097
+ return { srcStat, destStat, isChangingCase: true };
1098
+ }
1099
+ throw new Error("Source and destination must not be the same.");
1100
+ }
1101
+ if (srcStat.isDirectory() && !destStat.isDirectory()) {
1102
+ throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`);
1103
+ }
1104
+ if (!srcStat.isDirectory() && destStat.isDirectory()) {
1105
+ throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`);
1106
+ }
1107
+ }
1108
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
1109
+ throw new Error(errMsg(src, dest, funcName));
1110
+ }
1111
+ return { srcStat, destStat };
1112
+ }
1113
+ function checkPathsSync(src, dest, funcName, opts) {
1114
+ const { srcStat, destStat } = getStatsSync(src, dest, opts);
1115
+ if (destStat) {
1116
+ if (areIdentical(srcStat, destStat)) {
1117
+ const srcBaseName = path2.basename(src);
1118
+ const destBaseName = path2.basename(dest);
1119
+ if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
1120
+ return { srcStat, destStat, isChangingCase: true };
1121
+ }
1122
+ throw new Error("Source and destination must not be the same.");
1123
+ }
1124
+ if (srcStat.isDirectory() && !destStat.isDirectory()) {
1125
+ throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`);
1126
+ }
1127
+ if (!srcStat.isDirectory() && destStat.isDirectory()) {
1128
+ throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`);
1129
+ }
1130
+ }
1131
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
1132
+ throw new Error(errMsg(src, dest, funcName));
1133
+ }
1134
+ return { srcStat, destStat };
1135
+ }
1136
+ async function checkParentPaths(src, srcStat, dest, funcName) {
1137
+ const srcParent = path2.resolve(path2.dirname(src));
1138
+ const destParent = path2.resolve(path2.dirname(dest));
1139
+ if (destParent === srcParent || destParent === path2.parse(destParent).root) return;
1140
+ let destStat;
1141
+ try {
1142
+ destStat = await fs2.stat(destParent, { bigint: true });
1143
+ } catch (err) {
1144
+ if (err.code === "ENOENT") return;
1145
+ throw err;
1146
+ }
1147
+ if (areIdentical(srcStat, destStat)) {
1148
+ throw new Error(errMsg(src, dest, funcName));
1149
+ }
1150
+ return checkParentPaths(src, srcStat, destParent, funcName);
1151
+ }
1152
+ function checkParentPathsSync(src, srcStat, dest, funcName) {
1153
+ const srcParent = path2.resolve(path2.dirname(src));
1154
+ const destParent = path2.resolve(path2.dirname(dest));
1155
+ if (destParent === srcParent || destParent === path2.parse(destParent).root) return;
1156
+ let destStat;
1157
+ try {
1158
+ destStat = fs2.statSync(destParent, { bigint: true });
1159
+ } catch (err) {
1160
+ if (err.code === "ENOENT") return;
1161
+ throw err;
1162
+ }
1163
+ if (areIdentical(srcStat, destStat)) {
1164
+ throw new Error(errMsg(src, dest, funcName));
1165
+ }
1166
+ return checkParentPathsSync(src, srcStat, destParent, funcName);
1167
+ }
1168
+ function areIdentical(srcStat, destStat) {
1169
+ return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
1170
+ }
1171
+ function isSrcSubdir(src, dest) {
1172
+ const srcArr = path2.resolve(src).split(path2.sep).filter((i) => i);
1173
+ const destArr = path2.resolve(dest).split(path2.sep).filter((i) => i);
1174
+ return srcArr.every((cur, i) => destArr[i] === cur);
1175
+ }
1176
+ function errMsg(src, dest, funcName) {
1177
+ return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`;
1178
+ }
1179
+ module.exports = {
1180
+ // checkPaths
1181
+ checkPaths: u(checkPaths),
1182
+ checkPathsSync,
1183
+ // checkParent
1184
+ checkParentPaths: u(checkParentPaths),
1185
+ checkParentPathsSync,
1186
+ // Misc
1187
+ isSrcSubdir,
1188
+ areIdentical
1189
+ };
1190
+ }
1191
+ });
1192
+
1193
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy.js
1194
+ var require_copy = __commonJS({
1195
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy.js"(exports, module) {
1196
+ "use strict";
1197
+ var fs2 = require_fs();
1198
+ var path2 = __require("path");
1199
+ var { mkdirs } = require_mkdirs();
1200
+ var { pathExists } = require_path_exists();
1201
+ var { utimesMillis } = require_utimes();
1202
+ var stat = require_stat();
1203
+ async function copy4(src, dest, opts = {}) {
1204
+ if (typeof opts === "function") {
1205
+ opts = { filter: opts };
1206
+ }
1207
+ opts.clobber = "clobber" in opts ? !!opts.clobber : true;
1208
+ opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
1209
+ if (opts.preserveTimestamps && process.arch === "ia32") {
1210
+ process.emitWarning(
1211
+ "Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269",
1212
+ "Warning",
1213
+ "fs-extra-WARN0001"
1214
+ );
1215
+ }
1216
+ const { srcStat, destStat } = await stat.checkPaths(src, dest, "copy", opts);
1217
+ await stat.checkParentPaths(src, srcStat, dest, "copy");
1218
+ const include = await runFilter(src, dest, opts);
1219
+ if (!include) return;
1220
+ const destParent = path2.dirname(dest);
1221
+ const dirExists = await pathExists(destParent);
1222
+ if (!dirExists) {
1223
+ await mkdirs(destParent);
1224
+ }
1225
+ await getStatsAndPerformCopy(destStat, src, dest, opts);
1226
+ }
1227
+ async function runFilter(src, dest, opts) {
1228
+ if (!opts.filter) return true;
1229
+ return opts.filter(src, dest);
1230
+ }
1231
+ async function getStatsAndPerformCopy(destStat, src, dest, opts) {
1232
+ const statFn = opts.dereference ? fs2.stat : fs2.lstat;
1233
+ const srcStat = await statFn(src);
1234
+ if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
1235
+ if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
1236
+ if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts);
1237
+ if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`);
1238
+ if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`);
1239
+ throw new Error(`Unknown file: ${src}`);
1240
+ }
1241
+ async function onFile(srcStat, destStat, src, dest, opts) {
1242
+ if (!destStat) return copyFile(srcStat, src, dest, opts);
1243
+ if (opts.overwrite) {
1244
+ await fs2.unlink(dest);
1245
+ return copyFile(srcStat, src, dest, opts);
1246
+ }
1247
+ if (opts.errorOnExist) {
1248
+ throw new Error(`'${dest}' already exists`);
1249
+ }
1250
+ }
1251
+ async function copyFile(srcStat, src, dest, opts) {
1252
+ await fs2.copyFile(src, dest);
1253
+ if (opts.preserveTimestamps) {
1254
+ if (fileIsNotWritable(srcStat.mode)) {
1255
+ await makeFileWritable(dest, srcStat.mode);
1256
+ }
1257
+ const updatedSrcStat = await fs2.stat(src);
1258
+ await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
1259
+ }
1260
+ return fs2.chmod(dest, srcStat.mode);
1261
+ }
1262
+ function fileIsNotWritable(srcMode) {
1263
+ return (srcMode & 128) === 0;
1264
+ }
1265
+ function makeFileWritable(dest, srcMode) {
1266
+ return fs2.chmod(dest, srcMode | 128);
1267
+ }
1268
+ async function onDir(srcStat, destStat, src, dest, opts) {
1269
+ if (!destStat) {
1270
+ await fs2.mkdir(dest);
1271
+ }
1272
+ const items = await fs2.readdir(src);
1273
+ await Promise.all(items.map(async (item) => {
1274
+ const srcItem = path2.join(src, item);
1275
+ const destItem = path2.join(dest, item);
1276
+ const include = await runFilter(srcItem, destItem, opts);
1277
+ if (!include) return;
1278
+ const { destStat: destStat2 } = await stat.checkPaths(srcItem, destItem, "copy", opts);
1279
+ return getStatsAndPerformCopy(destStat2, srcItem, destItem, opts);
1280
+ }));
1281
+ if (!destStat) {
1282
+ await fs2.chmod(dest, srcStat.mode);
1283
+ }
1284
+ }
1285
+ async function onLink(destStat, src, dest, opts) {
1286
+ let resolvedSrc = await fs2.readlink(src);
1287
+ if (opts.dereference) {
1288
+ resolvedSrc = path2.resolve(process.cwd(), resolvedSrc);
1289
+ }
1290
+ if (!destStat) {
1291
+ return fs2.symlink(resolvedSrc, dest);
1292
+ }
1293
+ let resolvedDest = null;
1294
+ try {
1295
+ resolvedDest = await fs2.readlink(dest);
1296
+ } catch (e) {
1297
+ if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs2.symlink(resolvedSrc, dest);
1298
+ throw e;
1299
+ }
1300
+ if (opts.dereference) {
1301
+ resolvedDest = path2.resolve(process.cwd(), resolvedDest);
1302
+ }
1303
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
1304
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
1305
+ }
1306
+ if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
1307
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
1308
+ }
1309
+ await fs2.unlink(dest);
1310
+ return fs2.symlink(resolvedSrc, dest);
1311
+ }
1312
+ module.exports = copy4;
1313
+ }
1314
+ });
1315
+
1316
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy-sync.js
1317
+ var require_copy_sync = __commonJS({
1318
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module) {
1319
+ "use strict";
1320
+ var fs2 = require_graceful_fs();
1321
+ var path2 = __require("path");
1322
+ var mkdirsSync = require_mkdirs().mkdirsSync;
1323
+ var utimesMillisSync = require_utimes().utimesMillisSync;
1324
+ var stat = require_stat();
1325
+ function copySync(src, dest, opts) {
1326
+ if (typeof opts === "function") {
1327
+ opts = { filter: opts };
1328
+ }
1329
+ opts = opts || {};
1330
+ opts.clobber = "clobber" in opts ? !!opts.clobber : true;
1331
+ opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
1332
+ if (opts.preserveTimestamps && process.arch === "ia32") {
1333
+ process.emitWarning(
1334
+ "Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269",
1335
+ "Warning",
1336
+ "fs-extra-WARN0002"
1337
+ );
1338
+ }
1339
+ const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
1340
+ stat.checkParentPathsSync(src, srcStat, dest, "copy");
1341
+ if (opts.filter && !opts.filter(src, dest)) return;
1342
+ const destParent = path2.dirname(dest);
1343
+ if (!fs2.existsSync(destParent)) mkdirsSync(destParent);
1344
+ return getStats(destStat, src, dest, opts);
1345
+ }
1346
+ function getStats(destStat, src, dest, opts) {
1347
+ const statSync = opts.dereference ? fs2.statSync : fs2.lstatSync;
1348
+ const srcStat = statSync(src);
1349
+ if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
1350
+ else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
1351
+ else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts);
1352
+ else if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`);
1353
+ else if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`);
1354
+ throw new Error(`Unknown file: ${src}`);
1355
+ }
1356
+ function onFile(srcStat, destStat, src, dest, opts) {
1357
+ if (!destStat) return copyFile(srcStat, src, dest, opts);
1358
+ return mayCopyFile(srcStat, src, dest, opts);
1359
+ }
1360
+ function mayCopyFile(srcStat, src, dest, opts) {
1361
+ if (opts.overwrite) {
1362
+ fs2.unlinkSync(dest);
1363
+ return copyFile(srcStat, src, dest, opts);
1364
+ } else if (opts.errorOnExist) {
1365
+ throw new Error(`'${dest}' already exists`);
1366
+ }
1367
+ }
1368
+ function copyFile(srcStat, src, dest, opts) {
1369
+ fs2.copyFileSync(src, dest);
1370
+ if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest);
1371
+ return setDestMode(dest, srcStat.mode);
1372
+ }
1373
+ function handleTimestamps(srcMode, src, dest) {
1374
+ if (fileIsNotWritable(srcMode)) makeFileWritable(dest, srcMode);
1375
+ return setDestTimestamps(src, dest);
1376
+ }
1377
+ function fileIsNotWritable(srcMode) {
1378
+ return (srcMode & 128) === 0;
1379
+ }
1380
+ function makeFileWritable(dest, srcMode) {
1381
+ return setDestMode(dest, srcMode | 128);
1382
+ }
1383
+ function setDestMode(dest, srcMode) {
1384
+ return fs2.chmodSync(dest, srcMode);
1385
+ }
1386
+ function setDestTimestamps(src, dest) {
1387
+ const updatedSrcStat = fs2.statSync(src);
1388
+ return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
1389
+ }
1390
+ function onDir(srcStat, destStat, src, dest, opts) {
1391
+ if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts);
1392
+ return copyDir(src, dest, opts);
1393
+ }
1394
+ function mkDirAndCopy(srcMode, src, dest, opts) {
1395
+ fs2.mkdirSync(dest);
1396
+ copyDir(src, dest, opts);
1397
+ return setDestMode(dest, srcMode);
1398
+ }
1399
+ function copyDir(src, dest, opts) {
1400
+ fs2.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
1401
+ }
1402
+ function copyDirItem(item, src, dest, opts) {
1403
+ const srcItem = path2.join(src, item);
1404
+ const destItem = path2.join(dest, item);
1405
+ if (opts.filter && !opts.filter(srcItem, destItem)) return;
1406
+ const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
1407
+ return getStats(destStat, srcItem, destItem, opts);
1408
+ }
1409
+ function onLink(destStat, src, dest, opts) {
1410
+ let resolvedSrc = fs2.readlinkSync(src);
1411
+ if (opts.dereference) {
1412
+ resolvedSrc = path2.resolve(process.cwd(), resolvedSrc);
1413
+ }
1414
+ if (!destStat) {
1415
+ return fs2.symlinkSync(resolvedSrc, dest);
1416
+ } else {
1417
+ let resolvedDest;
1418
+ try {
1419
+ resolvedDest = fs2.readlinkSync(dest);
1420
+ } catch (err) {
1421
+ if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs2.symlinkSync(resolvedSrc, dest);
1422
+ throw err;
1423
+ }
1424
+ if (opts.dereference) {
1425
+ resolvedDest = path2.resolve(process.cwd(), resolvedDest);
1426
+ }
1427
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
1428
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
1429
+ }
1430
+ if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
1431
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
1432
+ }
1433
+ return copyLink(resolvedSrc, dest);
1434
+ }
1435
+ }
1436
+ function copyLink(resolvedSrc, dest) {
1437
+ fs2.unlinkSync(dest);
1438
+ return fs2.symlinkSync(resolvedSrc, dest);
1439
+ }
1440
+ module.exports = copySync;
1441
+ }
1442
+ });
1443
+
1444
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/index.js
1445
+ var require_copy2 = __commonJS({
1446
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/index.js"(exports, module) {
1447
+ "use strict";
1448
+ var u = require_universalify().fromPromise;
1449
+ module.exports = {
1450
+ copy: u(require_copy()),
1451
+ copySync: require_copy_sync()
1452
+ };
1453
+ }
1454
+ });
1455
+
1456
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/remove/index.js
1457
+ var require_remove = __commonJS({
1458
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/remove/index.js"(exports, module) {
1459
+ "use strict";
1460
+ var fs2 = require_graceful_fs();
1461
+ var u = require_universalify().fromCallback;
1462
+ function remove(path2, callback) {
1463
+ fs2.rm(path2, { recursive: true, force: true }, callback);
1464
+ }
1465
+ function removeSync(path2) {
1466
+ fs2.rmSync(path2, { recursive: true, force: true });
1467
+ }
1468
+ module.exports = {
1469
+ remove: u(remove),
1470
+ removeSync
1471
+ };
1472
+ }
1473
+ });
1474
+
1475
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/empty/index.js
1476
+ var require_empty = __commonJS({
1477
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/empty/index.js"(exports, module) {
1478
+ "use strict";
1479
+ var u = require_universalify().fromPromise;
1480
+ var fs2 = require_fs();
1481
+ var path2 = __require("path");
1482
+ var mkdir = require_mkdirs();
1483
+ var remove = require_remove();
1484
+ var emptyDir = u(async function emptyDir2(dir) {
1485
+ let items;
1486
+ try {
1487
+ items = await fs2.readdir(dir);
1488
+ } catch {
1489
+ return mkdir.mkdirs(dir);
1490
+ }
1491
+ return Promise.all(items.map((item) => remove.remove(path2.join(dir, item))));
1492
+ });
1493
+ function emptyDirSync(dir) {
1494
+ let items;
1495
+ try {
1496
+ items = fs2.readdirSync(dir);
1497
+ } catch {
1498
+ return mkdir.mkdirsSync(dir);
1499
+ }
1500
+ items.forEach((item) => {
1501
+ item = path2.join(dir, item);
1502
+ remove.removeSync(item);
1503
+ });
1504
+ }
1505
+ module.exports = {
1506
+ emptyDirSync,
1507
+ emptydirSync: emptyDirSync,
1508
+ emptyDir,
1509
+ emptydir: emptyDir
1510
+ };
1511
+ }
1512
+ });
1513
+
1514
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/file.js
1515
+ var require_file = __commonJS({
1516
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/file.js"(exports, module) {
1517
+ "use strict";
1518
+ var u = require_universalify().fromPromise;
1519
+ var path2 = __require("path");
1520
+ var fs2 = require_fs();
1521
+ var mkdir = require_mkdirs();
1522
+ async function createFile(file) {
1523
+ let stats;
1524
+ try {
1525
+ stats = await fs2.stat(file);
1526
+ } catch {
1527
+ }
1528
+ if (stats && stats.isFile()) return;
1529
+ const dir = path2.dirname(file);
1530
+ let dirStats = null;
1531
+ try {
1532
+ dirStats = await fs2.stat(dir);
1533
+ } catch (err) {
1534
+ if (err.code === "ENOENT") {
1535
+ await mkdir.mkdirs(dir);
1536
+ await fs2.writeFile(file, "");
1537
+ return;
1538
+ } else {
1539
+ throw err;
1540
+ }
1541
+ }
1542
+ if (dirStats.isDirectory()) {
1543
+ await fs2.writeFile(file, "");
1544
+ } else {
1545
+ await fs2.readdir(dir);
1546
+ }
1547
+ }
1548
+ function createFileSync(file) {
1549
+ let stats;
1550
+ try {
1551
+ stats = fs2.statSync(file);
1552
+ } catch {
1553
+ }
1554
+ if (stats && stats.isFile()) return;
1555
+ const dir = path2.dirname(file);
1556
+ try {
1557
+ if (!fs2.statSync(dir).isDirectory()) {
1558
+ fs2.readdirSync(dir);
1559
+ }
1560
+ } catch (err) {
1561
+ if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir);
1562
+ else throw err;
1563
+ }
1564
+ fs2.writeFileSync(file, "");
1565
+ }
1566
+ module.exports = {
1567
+ createFile: u(createFile),
1568
+ createFileSync
1569
+ };
1570
+ }
1571
+ });
1572
+
1573
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/link.js
1574
+ var require_link = __commonJS({
1575
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/link.js"(exports, module) {
1576
+ "use strict";
1577
+ var u = require_universalify().fromPromise;
1578
+ var path2 = __require("path");
1579
+ var fs2 = require_fs();
1580
+ var mkdir = require_mkdirs();
1581
+ var { pathExists } = require_path_exists();
1582
+ var { areIdentical } = require_stat();
1583
+ async function createLink(srcpath, dstpath) {
1584
+ let dstStat;
1585
+ try {
1586
+ dstStat = await fs2.lstat(dstpath);
1587
+ } catch {
1588
+ }
1589
+ let srcStat;
1590
+ try {
1591
+ srcStat = await fs2.lstat(srcpath);
1592
+ } catch (err) {
1593
+ err.message = err.message.replace("lstat", "ensureLink");
1594
+ throw err;
1595
+ }
1596
+ if (dstStat && areIdentical(srcStat, dstStat)) return;
1597
+ const dir = path2.dirname(dstpath);
1598
+ const dirExists = await pathExists(dir);
1599
+ if (!dirExists) {
1600
+ await mkdir.mkdirs(dir);
1601
+ }
1602
+ await fs2.link(srcpath, dstpath);
1603
+ }
1604
+ function createLinkSync(srcpath, dstpath) {
1605
+ let dstStat;
1606
+ try {
1607
+ dstStat = fs2.lstatSync(dstpath);
1608
+ } catch {
1609
+ }
1610
+ try {
1611
+ const srcStat = fs2.lstatSync(srcpath);
1612
+ if (dstStat && areIdentical(srcStat, dstStat)) return;
1613
+ } catch (err) {
1614
+ err.message = err.message.replace("lstat", "ensureLink");
1615
+ throw err;
1616
+ }
1617
+ const dir = path2.dirname(dstpath);
1618
+ const dirExists = fs2.existsSync(dir);
1619
+ if (dirExists) return fs2.linkSync(srcpath, dstpath);
1620
+ mkdir.mkdirsSync(dir);
1621
+ return fs2.linkSync(srcpath, dstpath);
1622
+ }
1623
+ module.exports = {
1624
+ createLink: u(createLink),
1625
+ createLinkSync
1626
+ };
1627
+ }
1628
+ });
1629
+
1630
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-paths.js
1631
+ var require_symlink_paths = __commonJS({
1632
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module) {
1633
+ "use strict";
1634
+ var path2 = __require("path");
1635
+ var fs2 = require_fs();
1636
+ var { pathExists } = require_path_exists();
1637
+ var u = require_universalify().fromPromise;
1638
+ async function symlinkPaths(srcpath, dstpath) {
1639
+ if (path2.isAbsolute(srcpath)) {
1640
+ try {
1641
+ await fs2.lstat(srcpath);
1642
+ } catch (err) {
1643
+ err.message = err.message.replace("lstat", "ensureSymlink");
1644
+ throw err;
1645
+ }
1646
+ return {
1647
+ toCwd: srcpath,
1648
+ toDst: srcpath
1649
+ };
1650
+ }
1651
+ const dstdir = path2.dirname(dstpath);
1652
+ const relativeToDst = path2.join(dstdir, srcpath);
1653
+ const exists2 = await pathExists(relativeToDst);
1654
+ if (exists2) {
1655
+ return {
1656
+ toCwd: relativeToDst,
1657
+ toDst: srcpath
1658
+ };
1659
+ }
1660
+ try {
1661
+ await fs2.lstat(srcpath);
1662
+ } catch (err) {
1663
+ err.message = err.message.replace("lstat", "ensureSymlink");
1664
+ throw err;
1665
+ }
1666
+ return {
1667
+ toCwd: srcpath,
1668
+ toDst: path2.relative(dstdir, srcpath)
1669
+ };
1670
+ }
1671
+ function symlinkPathsSync(srcpath, dstpath) {
1672
+ if (path2.isAbsolute(srcpath)) {
1673
+ const exists3 = fs2.existsSync(srcpath);
1674
+ if (!exists3) throw new Error("absolute srcpath does not exist");
1675
+ return {
1676
+ toCwd: srcpath,
1677
+ toDst: srcpath
1678
+ };
1679
+ }
1680
+ const dstdir = path2.dirname(dstpath);
1681
+ const relativeToDst = path2.join(dstdir, srcpath);
1682
+ const exists2 = fs2.existsSync(relativeToDst);
1683
+ if (exists2) {
1684
+ return {
1685
+ toCwd: relativeToDst,
1686
+ toDst: srcpath
1687
+ };
1688
+ }
1689
+ const srcExists = fs2.existsSync(srcpath);
1690
+ if (!srcExists) throw new Error("relative srcpath does not exist");
1691
+ return {
1692
+ toCwd: srcpath,
1693
+ toDst: path2.relative(dstdir, srcpath)
1694
+ };
1695
+ }
1696
+ module.exports = {
1697
+ symlinkPaths: u(symlinkPaths),
1698
+ symlinkPathsSync
1699
+ };
1700
+ }
1701
+ });
1702
+
1703
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-type.js
1704
+ var require_symlink_type = __commonJS({
1705
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module) {
1706
+ "use strict";
1707
+ var fs2 = require_fs();
1708
+ var u = require_universalify().fromPromise;
1709
+ async function symlinkType(srcpath, type) {
1710
+ if (type) return type;
1711
+ let stats;
1712
+ try {
1713
+ stats = await fs2.lstat(srcpath);
1714
+ } catch {
1715
+ return "file";
1716
+ }
1717
+ return stats && stats.isDirectory() ? "dir" : "file";
1718
+ }
1719
+ function symlinkTypeSync(srcpath, type) {
1720
+ if (type) return type;
1721
+ let stats;
1722
+ try {
1723
+ stats = fs2.lstatSync(srcpath);
1724
+ } catch {
1725
+ return "file";
1726
+ }
1727
+ return stats && stats.isDirectory() ? "dir" : "file";
1728
+ }
1729
+ module.exports = {
1730
+ symlinkType: u(symlinkType),
1731
+ symlinkTypeSync
1732
+ };
1733
+ }
1734
+ });
1735
+
1736
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink.js
1737
+ var require_symlink = __commonJS({
1738
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module) {
1739
+ "use strict";
1740
+ var u = require_universalify().fromPromise;
1741
+ var path2 = __require("path");
1742
+ var fs2 = require_fs();
1743
+ var { mkdirs, mkdirsSync } = require_mkdirs();
1744
+ var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
1745
+ var { symlinkType, symlinkTypeSync } = require_symlink_type();
1746
+ var { pathExists } = require_path_exists();
1747
+ var { areIdentical } = require_stat();
1748
+ async function createSymlink(srcpath, dstpath, type) {
1749
+ let stats;
1750
+ try {
1751
+ stats = await fs2.lstat(dstpath);
1752
+ } catch {
1753
+ }
1754
+ if (stats && stats.isSymbolicLink()) {
1755
+ const [srcStat, dstStat] = await Promise.all([
1756
+ fs2.stat(srcpath),
1757
+ fs2.stat(dstpath)
1758
+ ]);
1759
+ if (areIdentical(srcStat, dstStat)) return;
1760
+ }
1761
+ const relative = await symlinkPaths(srcpath, dstpath);
1762
+ srcpath = relative.toDst;
1763
+ const toType = await symlinkType(relative.toCwd, type);
1764
+ const dir = path2.dirname(dstpath);
1765
+ if (!await pathExists(dir)) {
1766
+ await mkdirs(dir);
1767
+ }
1768
+ return fs2.symlink(srcpath, dstpath, toType);
1769
+ }
1770
+ function createSymlinkSync(srcpath, dstpath, type) {
1771
+ let stats;
1772
+ try {
1773
+ stats = fs2.lstatSync(dstpath);
1774
+ } catch {
1775
+ }
1776
+ if (stats && stats.isSymbolicLink()) {
1777
+ const srcStat = fs2.statSync(srcpath);
1778
+ const dstStat = fs2.statSync(dstpath);
1779
+ if (areIdentical(srcStat, dstStat)) return;
1780
+ }
1781
+ const relative = symlinkPathsSync(srcpath, dstpath);
1782
+ srcpath = relative.toDst;
1783
+ type = symlinkTypeSync(relative.toCwd, type);
1784
+ const dir = path2.dirname(dstpath);
1785
+ const exists2 = fs2.existsSync(dir);
1786
+ if (exists2) return fs2.symlinkSync(srcpath, dstpath, type);
1787
+ mkdirsSync(dir);
1788
+ return fs2.symlinkSync(srcpath, dstpath, type);
1789
+ }
1790
+ module.exports = {
1791
+ createSymlink: u(createSymlink),
1792
+ createSymlinkSync
1793
+ };
1794
+ }
1795
+ });
1796
+
1797
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/index.js
1798
+ var require_ensure = __commonJS({
1799
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/index.js"(exports, module) {
1800
+ "use strict";
1801
+ var { createFile, createFileSync } = require_file();
1802
+ var { createLink, createLinkSync } = require_link();
1803
+ var { createSymlink, createSymlinkSync } = require_symlink();
1804
+ module.exports = {
1805
+ // file
1806
+ createFile,
1807
+ createFileSync,
1808
+ ensureFile: createFile,
1809
+ ensureFileSync: createFileSync,
1810
+ // link
1811
+ createLink,
1812
+ createLinkSync,
1813
+ ensureLink: createLink,
1814
+ ensureLinkSync: createLinkSync,
1815
+ // symlink
1816
+ createSymlink,
1817
+ createSymlinkSync,
1818
+ ensureSymlink: createSymlink,
1819
+ ensureSymlinkSync: createSymlinkSync
1820
+ };
1821
+ }
1822
+ });
1823
+
1824
+ // ../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js
1825
+ var require_utils2 = __commonJS({
1826
+ "../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(exports, module) {
1827
+ "use strict";
1828
+ function stringify2(obj, { EOL = "\n", finalEOL = true, replacer = null, spaces } = {}) {
1829
+ const EOF = finalEOL ? EOL : "";
1830
+ const str = JSON.stringify(obj, replacer, spaces);
1831
+ return str.replace(/\n/g, EOL) + EOF;
1832
+ }
1833
+ function stripBom(content) {
1834
+ if (Buffer.isBuffer(content)) content = content.toString("utf8");
1835
+ return content.replace(/^\uFEFF/, "");
1836
+ }
1837
+ module.exports = { stringify: stringify2, stripBom };
1838
+ }
1839
+ });
1840
+
1841
+ // ../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/index.js
1842
+ var require_jsonfile = __commonJS({
1843
+ "../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/index.js"(exports, module) {
1844
+ "use strict";
1845
+ var _fs;
1846
+ try {
1847
+ _fs = require_graceful_fs();
1848
+ } catch (_) {
1849
+ _fs = __require("fs");
1850
+ }
1851
+ var universalify = require_universalify();
1852
+ var { stringify: stringify2, stripBom } = require_utils2();
1853
+ async function _readFile(file, options = {}) {
1854
+ if (typeof options === "string") {
1855
+ options = { encoding: options };
1856
+ }
1857
+ const fs2 = options.fs || _fs;
1858
+ const shouldThrow = "throws" in options ? options.throws : true;
1859
+ let data = await universalify.fromCallback(fs2.readFile)(file, options);
1860
+ data = stripBom(data);
1861
+ let obj;
1862
+ try {
1863
+ obj = JSON.parse(data, options ? options.reviver : null);
1864
+ } catch (err) {
1865
+ if (shouldThrow) {
1866
+ err.message = `${file}: ${err.message}`;
1867
+ throw err;
1868
+ } else {
1869
+ return null;
1870
+ }
1871
+ }
1872
+ return obj;
1873
+ }
1874
+ var readFile = universalify.fromPromise(_readFile);
1875
+ function readFileSync(file, options = {}) {
1876
+ if (typeof options === "string") {
1877
+ options = { encoding: options };
1878
+ }
1879
+ const fs2 = options.fs || _fs;
1880
+ const shouldThrow = "throws" in options ? options.throws : true;
1881
+ try {
1882
+ let content = fs2.readFileSync(file, options);
1883
+ content = stripBom(content);
1884
+ return JSON.parse(content, options.reviver);
1885
+ } catch (err) {
1886
+ if (shouldThrow) {
1887
+ err.message = `${file}: ${err.message}`;
1888
+ throw err;
1889
+ } else {
1890
+ return null;
1891
+ }
1892
+ }
1893
+ }
1894
+ async function _writeFile(file, obj, options = {}) {
1895
+ const fs2 = options.fs || _fs;
1896
+ const str = stringify2(obj, options);
1897
+ await universalify.fromCallback(fs2.writeFile)(file, str, options);
1898
+ }
1899
+ var writeFile = universalify.fromPromise(_writeFile);
1900
+ function writeFileSync(file, obj, options = {}) {
1901
+ const fs2 = options.fs || _fs;
1902
+ const str = stringify2(obj, options);
1903
+ return fs2.writeFileSync(file, str, options);
1904
+ }
1905
+ var jsonfile = {
1906
+ readFile,
1907
+ readFileSync,
1908
+ writeFile,
1909
+ writeFileSync
1910
+ };
1911
+ module.exports = jsonfile;
1912
+ }
1913
+ });
1914
+
1915
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/jsonfile.js
1916
+ var require_jsonfile2 = __commonJS({
1917
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/jsonfile.js"(exports, module) {
1918
+ "use strict";
1919
+ var jsonFile = require_jsonfile();
1920
+ module.exports = {
1921
+ // jsonfile exports
1922
+ readJson: jsonFile.readFile,
1923
+ readJsonSync: jsonFile.readFileSync,
1924
+ writeJson: jsonFile.writeFile,
1925
+ writeJsonSync: jsonFile.writeFileSync
1926
+ };
1927
+ }
1928
+ });
1929
+
1930
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/output-file/index.js
1931
+ var require_output_file = __commonJS({
1932
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/output-file/index.js"(exports, module) {
1933
+ "use strict";
1934
+ var u = require_universalify().fromPromise;
1935
+ var fs2 = require_fs();
1936
+ var path2 = __require("path");
1937
+ var mkdir = require_mkdirs();
1938
+ var pathExists = require_path_exists().pathExists;
1939
+ async function outputFile(file, data, encoding = "utf-8") {
1940
+ const dir = path2.dirname(file);
1941
+ if (!await pathExists(dir)) {
1942
+ await mkdir.mkdirs(dir);
1943
+ }
1944
+ return fs2.writeFile(file, data, encoding);
1945
+ }
1946
+ function outputFileSync(file, ...args) {
1947
+ const dir = path2.dirname(file);
1948
+ if (!fs2.existsSync(dir)) {
1949
+ mkdir.mkdirsSync(dir);
1950
+ }
1951
+ fs2.writeFileSync(file, ...args);
1952
+ }
1953
+ module.exports = {
1954
+ outputFile: u(outputFile),
1955
+ outputFileSync
1956
+ };
1957
+ }
1958
+ });
1959
+
1960
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json.js
1961
+ var require_output_json = __commonJS({
1962
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json.js"(exports, module) {
1963
+ "use strict";
1964
+ var { stringify: stringify2 } = require_utils2();
1965
+ var { outputFile } = require_output_file();
1966
+ async function outputJson(file, data, options = {}) {
1967
+ const str = stringify2(data, options);
1968
+ await outputFile(file, str, options);
1969
+ }
1970
+ module.exports = outputJson;
1971
+ }
1972
+ });
1973
+
1974
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json-sync.js
1975
+ var require_output_json_sync = __commonJS({
1976
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module) {
1977
+ "use strict";
1978
+ var { stringify: stringify2 } = require_utils2();
1979
+ var { outputFileSync } = require_output_file();
1980
+ function outputJsonSync(file, data, options) {
1981
+ const str = stringify2(data, options);
1982
+ outputFileSync(file, str, options);
1983
+ }
1984
+ module.exports = outputJsonSync;
1985
+ }
1986
+ });
1987
+
1988
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/index.js
1989
+ var require_json = __commonJS({
1990
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/index.js"(exports, module) {
1991
+ "use strict";
1992
+ var u = require_universalify().fromPromise;
1993
+ var jsonFile = require_jsonfile2();
1994
+ jsonFile.outputJson = u(require_output_json());
1995
+ jsonFile.outputJsonSync = require_output_json_sync();
1996
+ jsonFile.outputJSON = jsonFile.outputJson;
1997
+ jsonFile.outputJSONSync = jsonFile.outputJsonSync;
1998
+ jsonFile.writeJSON = jsonFile.writeJson;
1999
+ jsonFile.writeJSONSync = jsonFile.writeJsonSync;
2000
+ jsonFile.readJSON = jsonFile.readJson;
2001
+ jsonFile.readJSONSync = jsonFile.readJsonSync;
2002
+ module.exports = jsonFile;
2003
+ }
2004
+ });
2005
+
2006
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move.js
2007
+ var require_move = __commonJS({
2008
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move.js"(exports, module) {
2009
+ "use strict";
2010
+ var fs2 = require_fs();
2011
+ var path2 = __require("path");
2012
+ var { copy: copy4 } = require_copy2();
2013
+ var { remove } = require_remove();
2014
+ var { mkdirp } = require_mkdirs();
2015
+ var { pathExists } = require_path_exists();
2016
+ var stat = require_stat();
2017
+ async function move(src, dest, opts = {}) {
2018
+ const overwrite = opts.overwrite || opts.clobber || false;
2019
+ const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
2020
+ await stat.checkParentPaths(src, srcStat, dest, "move");
2021
+ const destParent = path2.dirname(dest);
2022
+ const parsedParentPath = path2.parse(destParent);
2023
+ if (parsedParentPath.root !== destParent) {
2024
+ await mkdirp(destParent);
2025
+ }
2026
+ return doRename(src, dest, overwrite, isChangingCase);
2027
+ }
2028
+ async function doRename(src, dest, overwrite, isChangingCase) {
2029
+ if (!isChangingCase) {
2030
+ if (overwrite) {
2031
+ await remove(dest);
2032
+ } else if (await pathExists(dest)) {
2033
+ throw new Error("dest already exists.");
2034
+ }
2035
+ }
2036
+ try {
2037
+ await fs2.rename(src, dest);
2038
+ } catch (err) {
2039
+ if (err.code !== "EXDEV") {
2040
+ throw err;
2041
+ }
2042
+ await moveAcrossDevice(src, dest, overwrite);
2043
+ }
2044
+ }
2045
+ async function moveAcrossDevice(src, dest, overwrite) {
2046
+ const opts = {
2047
+ overwrite,
2048
+ errorOnExist: true,
2049
+ preserveTimestamps: true
2050
+ };
2051
+ await copy4(src, dest, opts);
2052
+ return remove(src);
2053
+ }
2054
+ module.exports = move;
2055
+ }
2056
+ });
2057
+
2058
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move-sync.js
2059
+ var require_move_sync = __commonJS({
2060
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move-sync.js"(exports, module) {
2061
+ "use strict";
2062
+ var fs2 = require_graceful_fs();
2063
+ var path2 = __require("path");
2064
+ var copySync = require_copy2().copySync;
2065
+ var removeSync = require_remove().removeSync;
2066
+ var mkdirpSync = require_mkdirs().mkdirpSync;
2067
+ var stat = require_stat();
2068
+ function moveSync(src, dest, opts) {
2069
+ opts = opts || {};
2070
+ const overwrite = opts.overwrite || opts.clobber || false;
2071
+ const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
2072
+ stat.checkParentPathsSync(src, srcStat, dest, "move");
2073
+ if (!isParentRoot(dest)) mkdirpSync(path2.dirname(dest));
2074
+ return doRename(src, dest, overwrite, isChangingCase);
2075
+ }
2076
+ function isParentRoot(dest) {
2077
+ const parent = path2.dirname(dest);
2078
+ const parsedPath = path2.parse(parent);
2079
+ return parsedPath.root === parent;
2080
+ }
2081
+ function doRename(src, dest, overwrite, isChangingCase) {
2082
+ if (isChangingCase) return rename(src, dest, overwrite);
2083
+ if (overwrite) {
2084
+ removeSync(dest);
2085
+ return rename(src, dest, overwrite);
2086
+ }
2087
+ if (fs2.existsSync(dest)) throw new Error("dest already exists.");
2088
+ return rename(src, dest, overwrite);
2089
+ }
2090
+ function rename(src, dest, overwrite) {
2091
+ try {
2092
+ fs2.renameSync(src, dest);
2093
+ } catch (err) {
2094
+ if (err.code !== "EXDEV") throw err;
2095
+ return moveAcrossDevice(src, dest, overwrite);
2096
+ }
2097
+ }
2098
+ function moveAcrossDevice(src, dest, overwrite) {
2099
+ const opts = {
2100
+ overwrite,
2101
+ errorOnExist: true,
2102
+ preserveTimestamps: true
2103
+ };
2104
+ copySync(src, dest, opts);
2105
+ return removeSync(src);
2106
+ }
2107
+ module.exports = moveSync;
2108
+ }
2109
+ });
2110
+
2111
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/index.js
2112
+ var require_move2 = __commonJS({
2113
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/index.js"(exports, module) {
2114
+ "use strict";
2115
+ var u = require_universalify().fromPromise;
2116
+ module.exports = {
2117
+ move: u(require_move()),
2118
+ moveSync: require_move_sync()
2119
+ };
2120
+ }
2121
+ });
2122
+
2123
+ // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/index.js
2124
+ var require_lib = __commonJS({
2125
+ "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/index.js"(exports, module) {
2126
+ "use strict";
2127
+ module.exports = {
2128
+ // Export promiseified graceful-fs:
2129
+ ...require_fs(),
2130
+ // Export extra methods:
2131
+ ...require_copy2(),
2132
+ ...require_empty(),
2133
+ ...require_ensure(),
2134
+ ...require_json(),
2135
+ ...require_mkdirs(),
2136
+ ...require_move2(),
2137
+ ...require_output_file(),
2138
+ ...require_path_exists(),
2139
+ ...require_remove()
2140
+ };
2141
+ }
2142
+ });
2143
+
26
2144
  // ../../node_modules/.pnpm/@grpc+grpc-js@1.12.2/node_modules/@grpc/grpc-js/build/src/constants.js
27
2145
  var require_constants = __commonJS({
28
2146
  "../../node_modules/.pnpm/@grpc+grpc-js@1.12.2/node_modules/@grpc/grpc-js/build/src/constants.js"(exports) {
@@ -648,14 +2766,14 @@ var require_tls_helpers = __commonJS({
648
2766
  "use strict";
649
2767
  Object.defineProperty(exports, "__esModule", { value: true });
650
2768
  exports.getDefaultRootsData = exports.CIPHER_SUITES = void 0;
651
- var fs = __require("fs");
2769
+ var fs2 = __require("fs");
652
2770
  exports.CIPHER_SUITES = process.env.GRPC_SSL_CIPHER_SUITES;
653
2771
  var DEFAULT_ROOTS_FILE_PATH = process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH;
654
2772
  var defaultRootsData = null;
655
2773
  function getDefaultRootsData() {
656
2774
  if (DEFAULT_ROOTS_FILE_PATH) {
657
2775
  if (defaultRootsData === null) {
658
- defaultRootsData = fs.readFileSync(DEFAULT_ROOTS_FILE_PATH);
2776
+ defaultRootsData = fs2.readFileSync(DEFAULT_ROOTS_FILE_PATH);
659
2777
  }
660
2778
  return defaultRootsData;
661
2779
  }
@@ -1379,19 +3497,19 @@ var require_uri_parser = __commonJS({
1379
3497
  }
1380
3498
  exports.parseUri = parseUri;
1381
3499
  var NUMBER_REGEX = /^\d+$/;
1382
- function splitHostPort(path) {
1383
- if (path.startsWith("[")) {
1384
- const hostEnd = path.indexOf("]");
3500
+ function splitHostPort(path2) {
3501
+ if (path2.startsWith("[")) {
3502
+ const hostEnd = path2.indexOf("]");
1385
3503
  if (hostEnd === -1) {
1386
3504
  return null;
1387
3505
  }
1388
- const host = path.substring(1, hostEnd);
3506
+ const host = path2.substring(1, hostEnd);
1389
3507
  if (host.indexOf(":") === -1) {
1390
3508
  return null;
1391
3509
  }
1392
- if (path.length > hostEnd + 1) {
1393
- if (path[hostEnd + 1] === ":") {
1394
- const portString = path.substring(hostEnd + 2);
3510
+ if (path2.length > hostEnd + 1) {
3511
+ if (path2[hostEnd + 1] === ":") {
3512
+ const portString = path2.substring(hostEnd + 2);
1395
3513
  if (NUMBER_REGEX.test(portString)) {
1396
3514
  return {
1397
3515
  host,
@@ -1409,7 +3527,7 @@ var require_uri_parser = __commonJS({
1409
3527
  };
1410
3528
  }
1411
3529
  } else {
1412
- const splitPath = path.split(":");
3530
+ const splitPath = path2.split(":");
1413
3531
  if (splitPath.length === 2) {
1414
3532
  if (NUMBER_REGEX.test(splitPath[1])) {
1415
3533
  return {
@@ -1421,7 +3539,7 @@ var require_uri_parser = __commonJS({
1421
3539
  }
1422
3540
  } else {
1423
3541
  return {
1424
- host: path
3542
+ host: path2
1425
3543
  };
1426
3544
  }
1427
3545
  }
@@ -3687,14 +5805,14 @@ var require_client_interceptors = __commonJS({
3687
5805
  }
3688
5806
  };
3689
5807
  exports.InterceptingCall = InterceptingCall;
3690
- function getCall(channel, path, options) {
5808
+ function getCall(channel, path2, options) {
3691
5809
  var _a, _b;
3692
5810
  const deadline = (_a = options.deadline) !== null && _a !== void 0 ? _a : Infinity;
3693
5811
  const host = options.host;
3694
5812
  const parent = (_b = options.parent) !== null && _b !== void 0 ? _b : null;
3695
5813
  const propagateFlags = options.propagate_flags;
3696
5814
  const credentials = options.credentials;
3697
- const call = channel.createCall(path, deadline, host, parent, propagateFlags);
5815
+ const call = channel.createCall(path2, deadline, host, parent, propagateFlags);
3698
5816
  if (credentials) {
3699
5817
  call.setCredentials(credentials);
3700
5818
  }
@@ -4262,9 +6380,9 @@ var require_make_client = __commonJS({
4262
6380
  return ServiceClientImpl;
4263
6381
  }
4264
6382
  exports.makeClientConstructor = makeClientConstructor;
4265
- function partial(fn, path, serialize, deserialize) {
6383
+ function partial(fn, path2, serialize, deserialize) {
4266
6384
  return function(...args) {
4267
- return fn.call(this, path, serialize, deserialize, ...args);
6385
+ return fn.call(this, path2, serialize, deserialize, ...args);
4268
6386
  };
4269
6387
  }
4270
6388
  function isProtobufTypeDefinition(obj) {
@@ -4745,7 +6863,7 @@ var require_fetch = __commonJS({
4745
6863
  module.exports = fetch;
4746
6864
  var asPromise = require_aspromise();
4747
6865
  var inquire = require_inquire();
4748
- var fs = inquire("fs");
6866
+ var fs2 = inquire("fs");
4749
6867
  function fetch(filename, options, callback) {
4750
6868
  if (typeof options === "function") {
4751
6869
  callback = options;
@@ -4754,8 +6872,8 @@ var require_fetch = __commonJS({
4754
6872
  options = {};
4755
6873
  if (!callback)
4756
6874
  return asPromise(fetch, this, filename, options);
4757
- if (!options.xhr && fs && fs.readFile)
4758
- return fs.readFile(filename, function fetchReadFileCallback(err, contents) {
6875
+ if (!options.xhr && fs2 && fs2.readFile)
6876
+ return fs2.readFile(filename, function fetchReadFileCallback(err, contents) {
4759
6877
  return err && typeof XMLHttpRequest !== "undefined" ? fetch.xhr(filename, options, callback) : err ? callback(err) : callback(null, options.binary ? contents : contents.toString("utf8"));
4760
6878
  });
4761
6879
  return fetch.xhr(filename, options, callback);
@@ -4793,15 +6911,15 @@ var require_fetch = __commonJS({
4793
6911
  var require_path = __commonJS({
4794
6912
  "../../node_modules/.pnpm/@protobufjs+path@1.1.2/node_modules/@protobufjs/path/index.js"(exports) {
4795
6913
  "use strict";
4796
- var path = exports;
6914
+ var path2 = exports;
4797
6915
  var isAbsolute = (
4798
6916
  /**
4799
6917
  * Tests if the specified path is absolute.
4800
6918
  * @param {string} path Path to test
4801
6919
  * @returns {boolean} `true` if path is absolute
4802
6920
  */
4803
- path.isAbsolute = function isAbsolute2(path2) {
4804
- return /^(?:\/|\w+:)/.test(path2);
6921
+ path2.isAbsolute = function isAbsolute2(path3) {
6922
+ return /^(?:\/|\w+:)/.test(path3);
4805
6923
  }
4806
6924
  );
4807
6925
  var normalize = (
@@ -4810,9 +6928,9 @@ var require_path = __commonJS({
4810
6928
  * @param {string} path Path to normalize
4811
6929
  * @returns {string} Normalized path
4812
6930
  */
4813
- path.normalize = function normalize2(path2) {
4814
- path2 = path2.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
4815
- var parts = path2.split("/"), absolute = isAbsolute(path2), prefix = "";
6931
+ path2.normalize = function normalize2(path3) {
6932
+ path3 = path3.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
6933
+ var parts = path3.split("/"), absolute = isAbsolute(path3), prefix = "";
4816
6934
  if (absolute)
4817
6935
  prefix = parts.shift() + "/";
4818
6936
  for (var i = 0; i < parts.length; ) {
@@ -4831,7 +6949,7 @@ var require_path = __commonJS({
4831
6949
  return prefix + parts.join("/");
4832
6950
  }
4833
6951
  );
4834
- path.resolve = function resolve(originPath, includePath, alreadyNormalized) {
6952
+ path2.resolve = function resolve(originPath, includePath, alreadyNormalized) {
4835
6953
  if (!alreadyNormalized)
4836
6954
  includePath = normalize(includePath);
4837
6955
  if (isAbsolute(includePath))
@@ -5389,16 +7507,16 @@ var require_namespace = __commonJS({
5389
7507
  object2.onRemove(this);
5390
7508
  return clearCache(this);
5391
7509
  };
5392
- Namespace.prototype.define = function define2(path, json) {
5393
- if (util.isString(path))
5394
- path = path.split(".");
5395
- else if (!Array.isArray(path))
7510
+ Namespace.prototype.define = function define2(path2, json) {
7511
+ if (util.isString(path2))
7512
+ path2 = path2.split(".");
7513
+ else if (!Array.isArray(path2))
5396
7514
  throw TypeError("illegal path");
5397
- if (path && path.length && path[0] === "")
7515
+ if (path2 && path2.length && path2[0] === "")
5398
7516
  throw Error("path must be relative");
5399
7517
  var ptr = this;
5400
- while (path.length > 0) {
5401
- var part = path.shift();
7518
+ while (path2.length > 0) {
7519
+ var part = path2.shift();
5402
7520
  if (ptr.nested && ptr.nested[part]) {
5403
7521
  ptr = ptr.nested[part];
5404
7522
  if (!(ptr instanceof Namespace))
@@ -5419,57 +7537,57 @@ var require_namespace = __commonJS({
5419
7537
  nested[i++].resolve();
5420
7538
  return this.resolve();
5421
7539
  };
5422
- Namespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChecked) {
7540
+ Namespace.prototype.lookup = function lookup(path2, filterTypes, parentAlreadyChecked) {
5423
7541
  if (typeof filterTypes === "boolean") {
5424
7542
  parentAlreadyChecked = filterTypes;
5425
7543
  filterTypes = void 0;
5426
7544
  } else if (filterTypes && !Array.isArray(filterTypes))
5427
7545
  filterTypes = [filterTypes];
5428
- if (util.isString(path) && path.length) {
5429
- if (path === ".")
7546
+ if (util.isString(path2) && path2.length) {
7547
+ if (path2 === ".")
5430
7548
  return this.root;
5431
- path = path.split(".");
5432
- } else if (!path.length)
7549
+ path2 = path2.split(".");
7550
+ } else if (!path2.length)
5433
7551
  return this;
5434
- if (path[0] === "")
5435
- return this.root.lookup(path.slice(1), filterTypes);
5436
- var found = this.get(path[0]);
7552
+ if (path2[0] === "")
7553
+ return this.root.lookup(path2.slice(1), filterTypes);
7554
+ var found = this.get(path2[0]);
5437
7555
  if (found) {
5438
- if (path.length === 1) {
7556
+ if (path2.length === 1) {
5439
7557
  if (!filterTypes || filterTypes.indexOf(found.constructor) > -1)
5440
7558
  return found;
5441
- } else if (found instanceof Namespace && (found = found.lookup(path.slice(1), filterTypes, true)))
7559
+ } else if (found instanceof Namespace && (found = found.lookup(path2.slice(1), filterTypes, true)))
5442
7560
  return found;
5443
7561
  } else
5444
7562
  for (var i = 0; i < this.nestedArray.length; ++i)
5445
- if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i].lookup(path, filterTypes, true)))
7563
+ if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i].lookup(path2, filterTypes, true)))
5446
7564
  return found;
5447
7565
  if (this.parent === null || parentAlreadyChecked)
5448
7566
  return null;
5449
- return this.parent.lookup(path, filterTypes);
7567
+ return this.parent.lookup(path2, filterTypes);
5450
7568
  };
5451
- Namespace.prototype.lookupType = function lookupType(path) {
5452
- var found = this.lookup(path, [Type]);
7569
+ Namespace.prototype.lookupType = function lookupType(path2) {
7570
+ var found = this.lookup(path2, [Type]);
5453
7571
  if (!found)
5454
- throw Error("no such type: " + path);
7572
+ throw Error("no such type: " + path2);
5455
7573
  return found;
5456
7574
  };
5457
- Namespace.prototype.lookupEnum = function lookupEnum(path) {
5458
- var found = this.lookup(path, [Enum]);
7575
+ Namespace.prototype.lookupEnum = function lookupEnum(path2) {
7576
+ var found = this.lookup(path2, [Enum]);
5459
7577
  if (!found)
5460
- throw Error("no such Enum '" + path + "' in " + this);
7578
+ throw Error("no such Enum '" + path2 + "' in " + this);
5461
7579
  return found;
5462
7580
  };
5463
- Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path) {
5464
- var found = this.lookup(path, [Type, Enum]);
7581
+ Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path2) {
7582
+ var found = this.lookup(path2, [Type, Enum]);
5465
7583
  if (!found)
5466
- throw Error("no such Type or Enum '" + path + "' in " + this);
7584
+ throw Error("no such Type or Enum '" + path2 + "' in " + this);
5467
7585
  return found;
5468
7586
  };
5469
- Namespace.prototype.lookupService = function lookupService(path) {
5470
- var found = this.lookup(path, [Service]);
7587
+ Namespace.prototype.lookupService = function lookupService(path2) {
7588
+ var found = this.lookup(path2, [Service]);
5471
7589
  if (!found)
5472
- throw Error("no such Service '" + path + "' in " + this);
7590
+ throw Error("no such Service '" + path2 + "' in " + this);
5473
7591
  return found;
5474
7592
  };
5475
7593
  Namespace._configure = function(Type_, Service_, Enum_) {
@@ -6779,14 +8897,14 @@ var require_util = __commonJS({
6779
8897
  Object.defineProperty(object2, "$type", { value: enm, enumerable: false });
6780
8898
  return enm;
6781
8899
  };
6782
- util.setProperty = function setProperty(dst, path, value) {
6783
- function setProp(dst2, path2, value2) {
6784
- var part = path2.shift();
8900
+ util.setProperty = function setProperty(dst, path2, value) {
8901
+ function setProp(dst2, path3, value2) {
8902
+ var part = path3.shift();
6785
8903
  if (part === "__proto__" || part === "prototype") {
6786
8904
  return dst2;
6787
8905
  }
6788
- if (path2.length > 0) {
6789
- dst2[part] = setProp(dst2[part] || {}, path2, value2);
8906
+ if (path3.length > 0) {
8907
+ dst2[part] = setProp(dst2[part] || {}, path3, value2);
6790
8908
  } else {
6791
8909
  var prevValue = dst2[part];
6792
8910
  if (prevValue)
@@ -6797,10 +8915,10 @@ var require_util = __commonJS({
6797
8915
  }
6798
8916
  if (typeof dst !== "object")
6799
8917
  throw TypeError("dst must be an object");
6800
- if (!path)
8918
+ if (!path2)
6801
8919
  throw TypeError("path must be specified");
6802
- path = path.split(".");
6803
- return setProp(dst, path, value);
8920
+ path2 = path2.split(".");
8921
+ return setProp(dst, path2, value);
6804
8922
  };
6805
8923
  Object.defineProperty(util, "decorateRoot", {
6806
8924
  get: function() {
@@ -6854,12 +8972,12 @@ var require_object = __commonJS({
6854
8972
  */
6855
8973
  fullName: {
6856
8974
  get: function() {
6857
- var path = [this.name], ptr = this.parent;
8975
+ var path2 = [this.name], ptr = this.parent;
6858
8976
  while (ptr) {
6859
- path.unshift(ptr.name);
8977
+ path2.unshift(ptr.name);
6860
8978
  ptr = ptr.parent;
6861
8979
  }
6862
- return path.join(".");
8980
+ return path2.join(".");
6863
8981
  }
6864
8982
  }
6865
8983
  });
@@ -10004,19 +12122,19 @@ var require_util2 = __commonJS({
10004
12122
  "use strict";
10005
12123
  Object.defineProperty(exports, "__esModule", { value: true });
10006
12124
  exports.addCommonProtos = exports.loadProtosWithOptionsSync = exports.loadProtosWithOptions = void 0;
10007
- var fs = __require("fs");
10008
- var path = __require("path");
12125
+ var fs2 = __require("fs");
12126
+ var path2 = __require("path");
10009
12127
  var Protobuf = require_protobufjs();
10010
12128
  function addIncludePathResolver(root, includePaths) {
10011
12129
  const originalResolvePath = root.resolvePath;
10012
12130
  root.resolvePath = (origin, target) => {
10013
- if (path.isAbsolute(target)) {
12131
+ if (path2.isAbsolute(target)) {
10014
12132
  return target;
10015
12133
  }
10016
12134
  for (const directory of includePaths) {
10017
- const fullPath = path.join(directory, target);
12135
+ const fullPath = path2.join(directory, target);
10018
12136
  try {
10019
- fs.accessSync(fullPath, fs.constants.R_OK);
12137
+ fs2.accessSync(fullPath, fs2.constants.R_OK);
10020
12138
  return fullPath;
10021
12139
  } catch (err) {
10022
12140
  continue;
@@ -15450,9 +17568,9 @@ var require_server_call = __commonJS({
15450
17568
  }
15451
17569
  exports.serverErrorToStatus = serverErrorToStatus;
15452
17570
  var ServerUnaryCallImpl = class extends events_1.EventEmitter {
15453
- constructor(path, call, metadata, request) {
17571
+ constructor(path2, call, metadata, request) {
15454
17572
  super();
15455
- this.path = path;
17573
+ this.path = path2;
15456
17574
  this.call = call;
15457
17575
  this.metadata = metadata;
15458
17576
  this.request = request;
@@ -15476,9 +17594,9 @@ var require_server_call = __commonJS({
15476
17594
  };
15477
17595
  exports.ServerUnaryCallImpl = ServerUnaryCallImpl;
15478
17596
  var ServerReadableStreamImpl = class extends stream_1.Readable {
15479
- constructor(path, call, metadata) {
17597
+ constructor(path2, call, metadata) {
15480
17598
  super({ objectMode: true });
15481
- this.path = path;
17599
+ this.path = path2;
15482
17600
  this.call = call;
15483
17601
  this.metadata = metadata;
15484
17602
  this.cancelled = false;
@@ -15504,9 +17622,9 @@ var require_server_call = __commonJS({
15504
17622
  };
15505
17623
  exports.ServerReadableStreamImpl = ServerReadableStreamImpl;
15506
17624
  var ServerWritableStreamImpl = class extends stream_1.Writable {
15507
- constructor(path, call, metadata, request) {
17625
+ constructor(path2, call, metadata, request) {
15508
17626
  super({ objectMode: true });
15509
- this.path = path;
17627
+ this.path = path2;
15510
17628
  this.call = call;
15511
17629
  this.metadata = metadata;
15512
17630
  this.request = request;
@@ -15554,9 +17672,9 @@ var require_server_call = __commonJS({
15554
17672
  };
15555
17673
  exports.ServerWritableStreamImpl = ServerWritableStreamImpl;
15556
17674
  var ServerDuplexStreamImpl = class extends stream_1.Duplex {
15557
- constructor(path, call, metadata) {
17675
+ constructor(path2, call, metadata) {
15558
17676
  super({ objectMode: true });
15559
- this.path = path;
17677
+ this.path = path2;
15560
17678
  this.call = call;
15561
17679
  this.metadata = metadata;
15562
17680
  this.pendingStatus = {
@@ -17377,11 +19495,11 @@ var require_server = __commonJS({
17377
19495
  }
17378
19496
  return true;
17379
19497
  }
17380
- _retrieveHandler(path) {
17381
- this.trace("Received call to method " + path + " at address " + this.serverAddressString);
17382
- const handler = this.handlers.get(path);
19498
+ _retrieveHandler(path2) {
19499
+ this.trace("Received call to method " + path2 + " at address " + this.serverAddressString);
19500
+ const handler = this.handlers.get(path2);
17383
19501
  if (handler === void 0) {
17384
- this.trace("No handler registered for method " + path + ". Sending UNIMPLEMENTED status.");
19502
+ this.trace("No handler registered for method " + path2 + ". Sending UNIMPLEMENTED status.");
17385
19503
  return null;
17386
19504
  }
17387
19505
  return handler;
@@ -17403,10 +19521,10 @@ var require_server = __commonJS({
17403
19521
  channelzSessionInfo === null || channelzSessionInfo === void 0 ? void 0 : channelzSessionInfo.streamTracker.addCallFailed();
17404
19522
  return;
17405
19523
  }
17406
- const path = headers[HTTP2_HEADER_PATH];
17407
- const handler = this._retrieveHandler(path);
19524
+ const path2 = headers[HTTP2_HEADER_PATH];
19525
+ const handler = this._retrieveHandler(path2);
17408
19526
  if (!handler) {
17409
- this._respondWithError(getUnimplementedStatusResponse(path), stream, channelzSessionInfo);
19527
+ this._respondWithError(getUnimplementedStatusResponse(path2), stream, channelzSessionInfo);
17410
19528
  return;
17411
19529
  }
17412
19530
  const callEventTracker = {
@@ -17454,10 +19572,10 @@ var require_server = __commonJS({
17454
19572
  if (this._verifyContentType(stream, headers) !== true) {
17455
19573
  return;
17456
19574
  }
17457
- const path = headers[HTTP2_HEADER_PATH];
17458
- const handler = this._retrieveHandler(path);
19575
+ const path2 = headers[HTTP2_HEADER_PATH];
19576
+ const handler = this._retrieveHandler(path2);
17459
19577
  if (!handler) {
17460
- this._respondWithError(getUnimplementedStatusResponse(path), stream, null);
19578
+ this._respondWithError(getUnimplementedStatusResponse(path2), stream, null);
17461
19579
  return;
17462
19580
  }
17463
19581
  const call = (0, server_interceptors_1.getServerInterceptingCall)([...extraInterceptors, ...this.interceptors], stream, headers, null, handler, this.options);
@@ -18484,7 +20602,7 @@ var require_certificate_provider = __commonJS({
18484
20602
  "use strict";
18485
20603
  Object.defineProperty(exports, "__esModule", { value: true });
18486
20604
  exports.FileWatcherCertificateProvider = void 0;
18487
- var fs = __require("fs");
20605
+ var fs2 = __require("fs");
18488
20606
  var logging = require_logging();
18489
20607
  var constants_1 = require_constants();
18490
20608
  var util_1 = __require("util");
@@ -18492,7 +20610,7 @@ var require_certificate_provider = __commonJS({
18492
20610
  function trace2(text) {
18493
20611
  logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text);
18494
20612
  }
18495
- var readFilePromise = (0, util_1.promisify)(fs.readFile);
20613
+ var readFilePromise = (0, util_1.promisify)(fs2.readFile);
18496
20614
  var FileWatcherCertificateProvider = class {
18497
20615
  constructor(config) {
18498
20616
  this.config = config;
@@ -18726,13 +20844,13 @@ var require_resolver_uds = __commonJS({
18726
20844
  this.listener = listener;
18727
20845
  this.hasReturnedResult = false;
18728
20846
  this.endpoints = [];
18729
- let path;
20847
+ let path2;
18730
20848
  if (target.authority === "") {
18731
- path = "/" + target.path;
20849
+ path2 = "/" + target.path;
18732
20850
  } else {
18733
- path = target.path;
20851
+ path2 = target.path;
18734
20852
  }
18735
- this.endpoints = [{ addresses: [{ path }] }];
20853
+ this.endpoints = [{ addresses: [{ path: path2 }] }];
18736
20854
  }
18737
20855
  updateResolution() {
18738
20856
  if (!this.hasReturnedResult) {
@@ -18791,12 +20909,12 @@ var require_resolver_ip = __commonJS({
18791
20909
  return;
18792
20910
  }
18793
20911
  const pathList = target.path.split(",");
18794
- for (const path of pathList) {
18795
- const hostPort = (0, uri_parser_1.splitHostPort)(path);
20912
+ for (const path2 of pathList) {
20913
+ const hostPort = (0, uri_parser_1.splitHostPort)(path2);
18796
20914
  if (hostPort === null) {
18797
20915
  this.error = {
18798
20916
  code: constants_1.Status.UNAVAILABLE,
18799
- details: `Failed to parse ${target.scheme} address ${path}`,
20917
+ details: `Failed to parse ${target.scheme} address ${path2}`,
18800
20918
  metadata: new metadata_1.Metadata()
18801
20919
  };
18802
20920
  return;
@@ -18804,7 +20922,7 @@ var require_resolver_ip = __commonJS({
18804
20922
  if (target.scheme === IPV4_SCHEME && !(0, net_1.isIPv4)(hostPort.host) || target.scheme === IPV6_SCHEME && !(0, net_1.isIPv6)(hostPort.host)) {
18805
20923
  this.error = {
18806
20924
  code: constants_1.Status.UNAVAILABLE,
18807
- details: `Failed to parse ${target.scheme} address ${path}`,
20925
+ details: `Failed to parse ${target.scheme} address ${path2}`,
18808
20926
  metadata: new metadata_1.Metadata()
18809
20927
  };
18810
20928
  return;
@@ -19886,9 +22004,9 @@ var require_ClientError = __commonJS({
19886
22004
  var ts_error_1 = (init_es(), __toCommonJS(es_exports));
19887
22005
  var Status_1 = require_Status();
19888
22006
  var ClientError = class _ClientError extends ts_error_1.ExtendableError {
19889
- constructor(path, code, details) {
19890
- super(`${path} ${Status_1.Status[code]}: ${details}`);
19891
- this.path = path;
22007
+ constructor(path2, code, details) {
22008
+ super(`${path2} ${Status_1.Status[code]}: ${details}`);
22009
+ this.path = path2;
19892
22010
  this.code = code;
19893
22011
  this.details = details;
19894
22012
  this.name = "ClientError";
@@ -19976,7 +22094,7 @@ var require_ServerError = __commonJS({
19976
22094
  });
19977
22095
 
19978
22096
  // ../../node_modules/.pnpm/nice-grpc-common@2.0.2/node_modules/nice-grpc-common/lib/index.js
19979
- var require_lib = __commonJS({
22097
+ var require_lib2 = __commonJS({
19980
22098
  "../../node_modules/.pnpm/nice-grpc-common@2.0.2/node_modules/nice-grpc-common/lib/index.js"(exports) {
19981
22099
  "use strict";
19982
22100
  var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
@@ -20694,7 +22812,7 @@ var require_convertMetadata = __commonJS({
20694
22812
  exports.convertMetadataToGrpcJs = convertMetadataToGrpcJs;
20695
22813
  exports.convertMetadataFromGrpcJs = convertMetadataFromGrpcJs;
20696
22814
  var grpc = __importStar(require_src3());
20697
- var nice_grpc_common_1 = require_lib();
22815
+ var nice_grpc_common_1 = require_lib2();
20698
22816
  function convertMetadataToGrpcJs(metadata) {
20699
22817
  const grpcMetadata = new grpc.Metadata();
20700
22818
  for (const [key, values] of metadata) {
@@ -20797,7 +22915,7 @@ var require_createCallContext = __commonJS({
20797
22915
  "use strict";
20798
22916
  Object.defineProperty(exports, "__esModule", { value: true });
20799
22917
  exports.createCallContext = createCallContext;
20800
- var nice_grpc_common_1 = require_lib();
22918
+ var nice_grpc_common_1 = require_lib2();
20801
22919
  var convertMetadata_1 = require_convertMetadata();
20802
22920
  function createCallContext(call) {
20803
22921
  const ac = new AbortController();
@@ -20852,8 +22970,8 @@ var require_createErrorStatusObject = __commonJS({
20852
22970
  exports.createErrorStatusObject = createErrorStatusObject;
20853
22971
  var grpc_js_1 = require_src3();
20854
22972
  var abort_controller_x_1 = (init_es2(), __toCommonJS(es_exports2));
20855
- var nice_grpc_common_1 = require_lib();
20856
- function createErrorStatusObject(path, error, trailer) {
22973
+ var nice_grpc_common_1 = require_lib2();
22974
+ function createErrorStatusObject(path2, error, trailer) {
20857
22975
  if (error instanceof nice_grpc_common_1.ServerError) {
20858
22976
  return {
20859
22977
  code: error.code,
@@ -20867,7 +22985,7 @@ var require_createErrorStatusObject = __commonJS({
20867
22985
  metadata: trailer
20868
22986
  };
20869
22987
  } else {
20870
- process.emitWarning(`${path}: Uncaught error in server implementation method. Server methods should only throw ServerError or AbortError. ${error instanceof Error ? error.stack : error}`);
22988
+ process.emitWarning(`${path2}: Uncaught error in server implementation method. Server methods should only throw ServerError or AbortError. ${error instanceof Error ? error.stack : error}`);
20871
22989
  return {
20872
22990
  code: grpc_js_1.status.UNKNOWN,
20873
22991
  details: "Unknown server error occurred",
@@ -21157,7 +23275,7 @@ var require_Server = __commonJS({
21157
23275
  Object.defineProperty(exports, "__esModule", { value: true });
21158
23276
  exports.createServer = createServer;
21159
23277
  var grpc_js_1 = require_src3();
21160
- var nice_grpc_common_1 = require_lib();
23278
+ var nice_grpc_common_1 = require_lib2();
21161
23279
  var service_definitions_1 = require_service_definitions();
21162
23280
  var handleBidiStreamingCall_1 = require_handleBidiStreamingCall();
21163
23281
  var handleClientStreamingCall_1 = require_handleClientStreamingCall();
@@ -21316,11 +23434,11 @@ var require_wrapClientError = __commonJS({
21316
23434
  "use strict";
21317
23435
  Object.defineProperty(exports, "__esModule", { value: true });
21318
23436
  exports.wrapClientError = wrapClientError;
21319
- var nice_grpc_common_1 = require_lib();
23437
+ var nice_grpc_common_1 = require_lib2();
21320
23438
  var grpc_js_1 = require_src3();
21321
- function wrapClientError(error, path) {
23439
+ function wrapClientError(error, path2) {
21322
23440
  if (isStatusObject(error)) {
21323
- return new nice_grpc_common_1.ClientError(path, error.code, error.details);
23441
+ return new nice_grpc_common_1.ClientError(path2, error.code, error.details);
21324
23442
  }
21325
23443
  return error;
21326
23444
  }
@@ -21337,7 +23455,7 @@ var require_createBidiStreamingMethod = __commonJS({
21337
23455
  Object.defineProperty(exports, "__esModule", { value: true });
21338
23456
  exports.createBidiStreamingMethod = createBidiStreamingMethod;
21339
23457
  var abort_controller_x_1 = (init_es2(), __toCommonJS(es_exports2));
21340
- var nice_grpc_common_1 = require_lib();
23458
+ var nice_grpc_common_1 = require_lib2();
21341
23459
  var service_definitions_1 = require_service_definitions();
21342
23460
  var convertMetadata_1 = require_convertMetadata();
21343
23461
  var isAsyncIterable_1 = require_isAsyncIterable();
@@ -21446,7 +23564,7 @@ var require_createClientStreamingMethod = __commonJS({
21446
23564
  Object.defineProperty(exports, "__esModule", { value: true });
21447
23565
  exports.createClientStreamingMethod = createClientStreamingMethod;
21448
23566
  var abort_controller_x_1 = (init_es2(), __toCommonJS(es_exports2));
21449
- var nice_grpc_common_1 = require_lib();
23567
+ var nice_grpc_common_1 = require_lib2();
21450
23568
  var service_definitions_1 = require_service_definitions();
21451
23569
  var convertMetadata_1 = require_convertMetadata();
21452
23570
  var isAsyncIterable_1 = require_isAsyncIterable();
@@ -21540,7 +23658,7 @@ var require_createServerStreamingMethod = __commonJS({
21540
23658
  Object.defineProperty(exports, "__esModule", { value: true });
21541
23659
  exports.createServerStreamingMethod = createServerStreamingMethod;
21542
23660
  var abort_controller_x_1 = (init_es2(), __toCommonJS(es_exports2));
21543
- var nice_grpc_common_1 = require_lib();
23661
+ var nice_grpc_common_1 = require_lib2();
21544
23662
  var service_definitions_1 = require_service_definitions();
21545
23663
  var convertMetadata_1 = require_convertMetadata();
21546
23664
  var isAsyncIterable_1 = require_isAsyncIterable();
@@ -21625,7 +23743,7 @@ var require_createUnaryMethod = __commonJS({
21625
23743
  Object.defineProperty(exports, "__esModule", { value: true });
21626
23744
  exports.createUnaryMethod = createUnaryMethod;
21627
23745
  var abort_controller_x_1 = (init_es2(), __toCommonJS(es_exports2));
21628
- var nice_grpc_common_1 = require_lib();
23746
+ var nice_grpc_common_1 = require_lib2();
21629
23747
  var service_definitions_1 = require_service_definitions();
21630
23748
  var convertMetadata_1 = require_convertMetadata();
21631
23749
  var isAsyncIterable_1 = require_isAsyncIterable();
@@ -21700,7 +23818,7 @@ var require_ClientFactory = __commonJS({
21700
23818
  exports.createClientFactory = createClientFactory;
21701
23819
  exports.createClient = createClient;
21702
23820
  var grpc_js_1 = require_src3();
21703
- var nice_grpc_common_1 = require_lib();
23821
+ var nice_grpc_common_1 = require_lib2();
21704
23822
  var service_definitions_1 = require_service_definitions();
21705
23823
  var createBidiStreamingMethod_1 = require_createBidiStreamingMethod();
21706
23824
  var createClientStreamingMethod_1 = require_createClientStreamingMethod();
@@ -21759,7 +23877,7 @@ var require_Client = __commonJS({
21759
23877
  });
21760
23878
 
21761
23879
  // ../../node_modules/.pnpm/nice-grpc@2.1.10/node_modules/nice-grpc/lib/index.js
21762
- var require_lib2 = __commonJS({
23880
+ var require_lib3 = __commonJS({
21763
23881
  "../../node_modules/.pnpm/nice-grpc@2.1.10/node_modules/nice-grpc/lib/index.js"(exports) {
21764
23882
  "use strict";
21765
23883
  var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
@@ -21780,7 +23898,7 @@ var require_lib2 = __commonJS({
21780
23898
  };
21781
23899
  Object.defineProperty(exports, "__esModule", { value: true });
21782
23900
  exports.ChannelCredentials = exports.Channel = exports.waitForChannelReady = exports.createChannel = void 0;
21783
- __exportStar(require_lib(), exports);
23901
+ __exportStar(require_lib2(), exports);
21784
23902
  __exportStar(require_Server(), exports);
21785
23903
  __exportStar(require_ServiceImplementation(), exports);
21786
23904
  var channel_1 = require_channel2();
@@ -22764,7 +24882,7 @@ var require_RichServerError = __commonJS({
22764
24882
  "use strict";
22765
24883
  Object.defineProperty(exports, "__esModule", { value: true });
22766
24884
  exports.RichServerError = void 0;
22767
- var nice_grpc_common_1 = require_lib();
24885
+ var nice_grpc_common_1 = require_lib2();
22768
24886
  var RichServerError2 = class extends nice_grpc_common_1.ServerError {
22769
24887
  constructor(code, details, extra = []) {
22770
24888
  super(code, details);
@@ -22938,10 +25056,10 @@ var require_RichClientError = __commonJS({
22938
25056
  "use strict";
22939
25057
  Object.defineProperty(exports, "__esModule", { value: true });
22940
25058
  exports.RichClientError = void 0;
22941
- var nice_grpc_common_1 = require_lib();
25059
+ var nice_grpc_common_1 = require_lib2();
22942
25060
  var RichClientError = class extends nice_grpc_common_1.ClientError {
22943
- constructor(path, code, details, extra) {
22944
- super(path, code, details);
25061
+ constructor(path2, code, details, extra) {
25062
+ super(path2, code, details);
22945
25063
  this.name = "RichClientError";
22946
25064
  this.extra = extra;
22947
25065
  }
@@ -22956,7 +25074,7 @@ var require_errorDetailsClientMiddleware = __commonJS({
22956
25074
  "use strict";
22957
25075
  Object.defineProperty(exports, "__esModule", { value: true });
22958
25076
  exports.errorDetailsClientMiddleware = void 0;
22959
- var nice_grpc_common_1 = require_lib();
25077
+ var nice_grpc_common_1 = require_lib2();
22960
25078
  var ErrorDetails_1 = require_ErrorDetails();
22961
25079
  var status_1 = require_status();
22962
25080
  var RichClientError_1 = require_RichClientError();
@@ -22986,7 +25104,7 @@ var require_errorDetailsClientMiddleware = __commonJS({
22986
25104
  });
22987
25105
 
22988
25106
  // ../../node_modules/.pnpm/nice-grpc-error-details@0.2.6/node_modules/nice-grpc-error-details/lib/index.js
22989
- var require_lib3 = __commonJS({
25107
+ var require_lib4 = __commonJS({
22990
25108
  "../../node_modules/.pnpm/nice-grpc-error-details@0.2.6/node_modules/nice-grpc-error-details/lib/index.js"(exports) {
22991
25109
  "use strict";
22992
25110
  var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
@@ -28830,7 +30948,7 @@ var require_VirtualTimeScheduler = __commonJS({
28830
30948
  });
28831
30949
 
28832
30950
  // ../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/cjs/internal/observable/empty.js
28833
- var require_empty = __commonJS({
30951
+ var require_empty2 = __commonJS({
28834
30952
  "../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/cjs/internal/observable/empty.js"(exports) {
28835
30953
  "use strict";
28836
30954
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -29781,7 +31899,7 @@ var require_Notification = __commonJS({
29781
31899
  "use strict";
29782
31900
  Object.defineProperty(exports, "__esModule", { value: true });
29783
31901
  exports.observeNotification = exports.Notification = exports.NotificationKind = void 0;
29784
- var empty_1 = require_empty();
31902
+ var empty_1 = require_empty2();
29785
31903
  var of_1 = require_of();
29786
31904
  var throwError_1 = require_throwError();
29787
31905
  var isFunction_1 = require_isFunction();
@@ -31010,7 +33128,7 @@ var require_merge = __commonJS({
31010
33128
  exports.merge = void 0;
31011
33129
  var mergeAll_1 = require_mergeAll();
31012
33130
  var innerFrom_1 = require_innerFrom();
31013
- var empty_1 = require_empty();
33131
+ var empty_1 = require_empty2();
31014
33132
  var args_1 = require_args();
31015
33133
  var from_1 = require_from();
31016
33134
  function merge() {
@@ -31213,7 +33331,7 @@ var require_range = __commonJS({
31213
33331
  Object.defineProperty(exports, "__esModule", { value: true });
31214
33332
  exports.range = void 0;
31215
33333
  var Observable_1 = require_Observable();
31216
- var empty_1 = require_empty();
33334
+ var empty_1 = require_empty2();
31217
33335
  function range(start, count, scheduler) {
31218
33336
  if (count == null) {
31219
33337
  count = start;
@@ -31253,7 +33371,7 @@ var require_using = __commonJS({
31253
33371
  exports.using = void 0;
31254
33372
  var Observable_1 = require_Observable();
31255
33373
  var innerFrom_1 = require_innerFrom();
31256
- var empty_1 = require_empty();
33374
+ var empty_1 = require_empty2();
31257
33375
  function using(resourceFactory, observableFactory) {
31258
33376
  return new Observable_1.Observable(function(subscriber) {
31259
33377
  var resource = resourceFactory();
@@ -31302,7 +33420,7 @@ var require_zip = __commonJS({
31302
33420
  var Observable_1 = require_Observable();
31303
33421
  var innerFrom_1 = require_innerFrom();
31304
33422
  var argsOrArgArray_1 = require_argsOrArgArray();
31305
- var empty_1 = require_empty();
33423
+ var empty_1 = require_empty2();
31306
33424
  var OperatorSubscriber_1 = require_OperatorSubscriber();
31307
33425
  var args_1 = require_args();
31308
33426
  function zip() {
@@ -32301,7 +34419,7 @@ var require_take = __commonJS({
32301
34419
  "use strict";
32302
34420
  Object.defineProperty(exports, "__esModule", { value: true });
32303
34421
  exports.take = void 0;
32304
- var empty_1 = require_empty();
34422
+ var empty_1 = require_empty2();
32305
34423
  var lift_1 = require_lift();
32306
34424
  var OperatorSubscriber_1 = require_OperatorSubscriber();
32307
34425
  function take(count) {
@@ -32935,7 +35053,7 @@ var require_takeLast = __commonJS({
32935
35053
  };
32936
35054
  Object.defineProperty(exports, "__esModule", { value: true });
32937
35055
  exports.takeLast = void 0;
32938
- var empty_1 = require_empty();
35056
+ var empty_1 = require_empty2();
32939
35057
  var lift_1 = require_lift();
32940
35058
  var OperatorSubscriber_1 = require_OperatorSubscriber();
32941
35059
  function takeLast(count) {
@@ -33477,7 +35595,7 @@ var require_repeat = __commonJS({
33477
35595
  "use strict";
33478
35596
  Object.defineProperty(exports, "__esModule", { value: true });
33479
35597
  exports.repeat = void 0;
33480
- var empty_1 = require_empty();
35598
+ var empty_1 = require_empty2();
33481
35599
  var lift_1 = require_lift();
33482
35600
  var OperatorSubscriber_1 = require_OperatorSubscriber();
33483
35601
  var innerFrom_1 = require_innerFrom();
@@ -35179,7 +37297,7 @@ var require_cjs = __commonJS({
35179
37297
  Object.defineProperty(exports, "defer", { enumerable: true, get: function() {
35180
37298
  return defer_1.defer;
35181
37299
  } });
35182
- var empty_1 = require_empty();
37300
+ var empty_1 = require_empty2();
35183
37301
  Object.defineProperty(exports, "empty", { enumerable: true, get: function() {
35184
37302
  return empty_1.empty;
35185
37303
  } });
@@ -35263,7 +37381,7 @@ var require_cjs = __commonJS({
35263
37381
  Object.defineProperty(exports, "scheduled", { enumerable: true, get: function() {
35264
37382
  return scheduled_1.scheduled;
35265
37383
  } });
35266
- var empty_2 = require_empty();
37384
+ var empty_2 = require_empty2();
35267
37385
  Object.defineProperty(exports, "EMPTY", { enumerable: true, get: function() {
35268
37386
  return empty_2.EMPTY;
35269
37387
  } });
@@ -35777,6 +37895,8 @@ function compareSemver(a, b2) {
35777
37895
  import("node:process").then((p) => p.stdout.write(""));
35778
37896
 
35779
37897
  // src/endpoints.ts
37898
+ var import_fs_extra = __toESM(require_lib(), 1);
37899
+ import path from "path";
35780
37900
  var Endpoints = class _Endpoints {
35781
37901
  static INSTANCE = new _Endpoints();
35782
37902
  concurrency = 8;
@@ -35785,6 +37905,29 @@ var Endpoints = class _Endpoints {
35785
37905
  chainServer = /* @__PURE__ */ new Map();
35786
37906
  batchCount = 1;
35787
37907
  };
37908
+ function configureEndpoints(options) {
37909
+ const fullPath = path.resolve(options["chains-config"]);
37910
+ const chainsConfig = import_fs_extra.default.readJsonSync(fullPath);
37911
+ const concurrencyOverride = process.env["OVERRIDE_CONCURRENCY"] ? parseInt(process.env["OVERRIDE_CONCURRENCY"]) : void 0;
37912
+ const batchCountOverride = process.env["OVERRIDE_BATCH_COUNT"] ? parseInt(process.env["OVERRIDE_BATCH_COUNT"]) : void 0;
37913
+ Endpoints.INSTANCE.concurrency = concurrencyOverride ?? options.concurrency;
37914
+ Endpoints.INSTANCE.batchCount = batchCountOverride ?? options["batch-count"];
37915
+ Endpoints.INSTANCE.chainQueryAPI = options["chainquery-server"];
37916
+ Endpoints.INSTANCE.priceFeedAPI = options["pricefeed-server"];
37917
+ for (const [id2, config] of Object.entries(chainsConfig)) {
37918
+ const chainConfig = config;
37919
+ if (chainConfig.ChainServer) {
37920
+ Endpoints.INSTANCE.chainServer.set(id2, chainConfig.ChainServer);
37921
+ } else {
37922
+ const http2 = chainConfig.Https?.[0];
37923
+ if (http2) {
37924
+ Endpoints.INSTANCE.chainServer.set(id2, http2);
37925
+ } else {
37926
+ console.error("not valid config for chain", id2);
37927
+ }
37928
+ }
37929
+ }
37930
+ }
35788
37931
  import("node:process").then((p) => p.stdout.write(""));
35789
37932
 
35790
37933
  // src/global-config.ts
@@ -54946,8 +57089,8 @@ var QueuedStaticJsonRpcProvider = class extends JsonRpcProvider {
54946
57089
  import("node:process").then((p) => p.stdout.write(""));
54947
57090
 
54948
57091
  // src/service.ts
54949
- var import_nice_grpc = __toESM(require_lib2(), 1);
54950
- var import_nice_grpc_error_details = __toESM(require_lib3(), 1);
57092
+ var import_nice_grpc = __toESM(require_lib3(), 1);
57093
+ var import_nice_grpc_error_details = __toESM(require_lib4(), 1);
54951
57094
 
54952
57095
  // ../../node_modules/.pnpm/tslib@2.6.3/node_modules/tslib/tslib.es6.mjs
54953
57096
  function __awaiter(thisArg, _arguments, P, generator) {
@@ -57444,14 +59587,16 @@ export {
57444
59587
  makeEthCallKey,
57445
59588
  parseSemver,
57446
59589
  compareSemver,
57447
- Endpoints,
57448
59590
  require_lib,
59591
+ Endpoints,
59592
+ configureEndpoints,
59593
+ require_lib2,
57449
59594
  require_lodash,
57450
59595
  require_src3 as require_src,
57451
59596
  es_exports2 as es_exports,
57452
59597
  init_es2 as init_es,
57453
- require_lib2,
57454
59598
  require_lib3,
59599
+ require_lib4,
57455
59600
  from,
57456
59601
  withAbort,
57457
59602
  GLOBAL_CONFIG,
@@ -57574,4 +59719,4 @@ long/umd/index.js:
57574
59719
  @noble/curves/esm/secp256k1.js:
57575
59720
  (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
57576
59721
  */
57577
- //# sourceMappingURL=chunk-IAGVEBAE.js.map
59722
+ //# sourceMappingURL=chunk-PDTC7P7O.js.map