@sentio/runtime 3.1.0-rc.3 → 3.1.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{chunk-Z33FXCEF.js → chunk-TYDHN4Z6.js} +487 -473
- package/lib/{chunk-Z33FXCEF.js.map → chunk-TYDHN4Z6.js.map} +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +3 -1
- package/lib/index.js.map +1 -1
- package/lib/processor-runner.js +136 -138
- package/lib/processor-runner.js.map +1 -1
- package/package.json +2 -2
- package/src/full-service.ts +1 -25
- package/src/processor-runner.ts +64 -46
- package/src/utils.ts +16 -0
|
@@ -84,54 +84,54 @@ var require_polyfills = __commonJS({
|
|
|
84
84
|
}
|
|
85
85
|
var chdir;
|
|
86
86
|
module.exports = patch;
|
|
87
|
-
function patch(
|
|
87
|
+
function patch(fs3) {
|
|
88
88
|
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
89
|
-
patchLchmod(
|
|
90
|
-
}
|
|
91
|
-
if (!
|
|
92
|
-
patchLutimes(
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
if (
|
|
113
|
-
|
|
89
|
+
patchLchmod(fs3);
|
|
90
|
+
}
|
|
91
|
+
if (!fs3.lutimes) {
|
|
92
|
+
patchLutimes(fs3);
|
|
93
|
+
}
|
|
94
|
+
fs3.chown = chownFix(fs3.chown);
|
|
95
|
+
fs3.fchown = chownFix(fs3.fchown);
|
|
96
|
+
fs3.lchown = chownFix(fs3.lchown);
|
|
97
|
+
fs3.chmod = chmodFix(fs3.chmod);
|
|
98
|
+
fs3.fchmod = chmodFix(fs3.fchmod);
|
|
99
|
+
fs3.lchmod = chmodFix(fs3.lchmod);
|
|
100
|
+
fs3.chownSync = chownFixSync(fs3.chownSync);
|
|
101
|
+
fs3.fchownSync = chownFixSync(fs3.fchownSync);
|
|
102
|
+
fs3.lchownSync = chownFixSync(fs3.lchownSync);
|
|
103
|
+
fs3.chmodSync = chmodFixSync(fs3.chmodSync);
|
|
104
|
+
fs3.fchmodSync = chmodFixSync(fs3.fchmodSync);
|
|
105
|
+
fs3.lchmodSync = chmodFixSync(fs3.lchmodSync);
|
|
106
|
+
fs3.stat = statFix(fs3.stat);
|
|
107
|
+
fs3.fstat = statFix(fs3.fstat);
|
|
108
|
+
fs3.lstat = statFix(fs3.lstat);
|
|
109
|
+
fs3.statSync = statFixSync(fs3.statSync);
|
|
110
|
+
fs3.fstatSync = statFixSync(fs3.fstatSync);
|
|
111
|
+
fs3.lstatSync = statFixSync(fs3.lstatSync);
|
|
112
|
+
if (fs3.chmod && !fs3.lchmod) {
|
|
113
|
+
fs3.lchmod = function(path3, mode, cb) {
|
|
114
114
|
if (cb) process.nextTick(cb);
|
|
115
115
|
};
|
|
116
|
-
|
|
116
|
+
fs3.lchmodSync = function() {
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
if (
|
|
120
|
-
|
|
119
|
+
if (fs3.chown && !fs3.lchown) {
|
|
120
|
+
fs3.lchown = function(path3, uid, gid, cb) {
|
|
121
121
|
if (cb) process.nextTick(cb);
|
|
122
122
|
};
|
|
123
|
-
|
|
123
|
+
fs3.lchownSync = function() {
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
if (platform === "win32") {
|
|
127
|
-
|
|
127
|
+
fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : function(fs$rename) {
|
|
128
128
|
function rename(from2, to, cb) {
|
|
129
129
|
var start = Date.now();
|
|
130
130
|
var backoff = 0;
|
|
131
131
|
fs$rename(from2, to, function CB(er) {
|
|
132
132
|
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
|
|
133
133
|
setTimeout(function() {
|
|
134
|
-
|
|
134
|
+
fs3.stat(to, function(stater, st) {
|
|
135
135
|
if (stater && stater.code === "ENOENT")
|
|
136
136
|
fs$rename(from2, to, CB);
|
|
137
137
|
else
|
|
@@ -147,9 +147,9 @@ var require_polyfills = __commonJS({
|
|
|
147
147
|
}
|
|
148
148
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
|
149
149
|
return rename;
|
|
150
|
-
}(
|
|
150
|
+
}(fs3.rename);
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
fs3.read = typeof fs3.read !== "function" ? fs3.read : function(fs$read) {
|
|
153
153
|
function read(fd, buffer, offset, length, position, callback_) {
|
|
154
154
|
var callback;
|
|
155
155
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -157,22 +157,22 @@ var require_polyfills = __commonJS({
|
|
|
157
157
|
callback = function(er, _, __) {
|
|
158
158
|
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
159
159
|
eagCounter++;
|
|
160
|
-
return fs$read.call(
|
|
160
|
+
return fs$read.call(fs3, fd, buffer, offset, length, position, callback);
|
|
161
161
|
}
|
|
162
162
|
callback_.apply(this, arguments);
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
return fs$read.call(
|
|
165
|
+
return fs$read.call(fs3, fd, buffer, offset, length, position, callback);
|
|
166
166
|
}
|
|
167
167
|
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
|
168
168
|
return read;
|
|
169
|
-
}(
|
|
170
|
-
|
|
169
|
+
}(fs3.read);
|
|
170
|
+
fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ function(fs$readSync) {
|
|
171
171
|
return function(fd, buffer, offset, length, position) {
|
|
172
172
|
var eagCounter = 0;
|
|
173
173
|
while (true) {
|
|
174
174
|
try {
|
|
175
|
-
return fs$readSync.call(
|
|
175
|
+
return fs$readSync.call(fs3, fd, buffer, offset, length, position);
|
|
176
176
|
} catch (er) {
|
|
177
177
|
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
178
178
|
eagCounter++;
|
|
@@ -182,11 +182,11 @@ var require_polyfills = __commonJS({
|
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
};
|
|
185
|
-
}(
|
|
186
|
-
function patchLchmod(
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
185
|
+
}(fs3.readSync);
|
|
186
|
+
function patchLchmod(fs4) {
|
|
187
|
+
fs4.lchmod = function(path3, mode, callback) {
|
|
188
|
+
fs4.open(
|
|
189
|
+
path3,
|
|
190
190
|
constants.O_WRONLY | constants.O_SYMLINK,
|
|
191
191
|
mode,
|
|
192
192
|
function(err, fd) {
|
|
@@ -194,80 +194,80 @@ var require_polyfills = __commonJS({
|
|
|
194
194
|
if (callback) callback(err);
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
|
-
|
|
198
|
-
|
|
197
|
+
fs4.fchmod(fd, mode, function(err2) {
|
|
198
|
+
fs4.close(fd, function(err22) {
|
|
199
199
|
if (callback) callback(err2 || err22);
|
|
200
200
|
});
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
203
|
);
|
|
204
204
|
};
|
|
205
|
-
|
|
206
|
-
var fd =
|
|
205
|
+
fs4.lchmodSync = function(path3, mode) {
|
|
206
|
+
var fd = fs4.openSync(path3, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
207
207
|
var threw = true;
|
|
208
208
|
var ret;
|
|
209
209
|
try {
|
|
210
|
-
ret =
|
|
210
|
+
ret = fs4.fchmodSync(fd, mode);
|
|
211
211
|
threw = false;
|
|
212
212
|
} finally {
|
|
213
213
|
if (threw) {
|
|
214
214
|
try {
|
|
215
|
-
|
|
215
|
+
fs4.closeSync(fd);
|
|
216
216
|
} catch (er) {
|
|
217
217
|
}
|
|
218
218
|
} else {
|
|
219
|
-
|
|
219
|
+
fs4.closeSync(fd);
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
return ret;
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
|
-
function patchLutimes(
|
|
226
|
-
if (constants.hasOwnProperty("O_SYMLINK") &&
|
|
227
|
-
|
|
228
|
-
|
|
225
|
+
function patchLutimes(fs4) {
|
|
226
|
+
if (constants.hasOwnProperty("O_SYMLINK") && fs4.futimes) {
|
|
227
|
+
fs4.lutimes = function(path3, at, mt, cb) {
|
|
228
|
+
fs4.open(path3, constants.O_SYMLINK, function(er, fd) {
|
|
229
229
|
if (er) {
|
|
230
230
|
if (cb) cb(er);
|
|
231
231
|
return;
|
|
232
232
|
}
|
|
233
|
-
|
|
234
|
-
|
|
233
|
+
fs4.futimes(fd, at, mt, function(er2) {
|
|
234
|
+
fs4.close(fd, function(er22) {
|
|
235
235
|
if (cb) cb(er2 || er22);
|
|
236
236
|
});
|
|
237
237
|
});
|
|
238
238
|
});
|
|
239
239
|
};
|
|
240
|
-
|
|
241
|
-
var fd =
|
|
240
|
+
fs4.lutimesSync = function(path3, at, mt) {
|
|
241
|
+
var fd = fs4.openSync(path3, constants.O_SYMLINK);
|
|
242
242
|
var ret;
|
|
243
243
|
var threw = true;
|
|
244
244
|
try {
|
|
245
|
-
ret =
|
|
245
|
+
ret = fs4.futimesSync(fd, at, mt);
|
|
246
246
|
threw = false;
|
|
247
247
|
} finally {
|
|
248
248
|
if (threw) {
|
|
249
249
|
try {
|
|
250
|
-
|
|
250
|
+
fs4.closeSync(fd);
|
|
251
251
|
} catch (er) {
|
|
252
252
|
}
|
|
253
253
|
} else {
|
|
254
|
-
|
|
254
|
+
fs4.closeSync(fd);
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
return ret;
|
|
258
258
|
};
|
|
259
|
-
} else if (
|
|
260
|
-
|
|
259
|
+
} else if (fs4.futimes) {
|
|
260
|
+
fs4.lutimes = function(_a, _b, _c, cb) {
|
|
261
261
|
if (cb) process.nextTick(cb);
|
|
262
262
|
};
|
|
263
|
-
|
|
263
|
+
fs4.lutimesSync = function() {
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
function chmodFix(orig) {
|
|
268
268
|
if (!orig) return orig;
|
|
269
269
|
return function(target, mode, cb) {
|
|
270
|
-
return orig.call(
|
|
270
|
+
return orig.call(fs3, target, mode, function(er) {
|
|
271
271
|
if (chownErOk(er)) er = null;
|
|
272
272
|
if (cb) cb.apply(this, arguments);
|
|
273
273
|
});
|
|
@@ -277,7 +277,7 @@ var require_polyfills = __commonJS({
|
|
|
277
277
|
if (!orig) return orig;
|
|
278
278
|
return function(target, mode) {
|
|
279
279
|
try {
|
|
280
|
-
return orig.call(
|
|
280
|
+
return orig.call(fs3, target, mode);
|
|
281
281
|
} catch (er) {
|
|
282
282
|
if (!chownErOk(er)) throw er;
|
|
283
283
|
}
|
|
@@ -286,7 +286,7 @@ var require_polyfills = __commonJS({
|
|
|
286
286
|
function chownFix(orig) {
|
|
287
287
|
if (!orig) return orig;
|
|
288
288
|
return function(target, uid, gid, cb) {
|
|
289
|
-
return orig.call(
|
|
289
|
+
return orig.call(fs3, target, uid, gid, function(er) {
|
|
290
290
|
if (chownErOk(er)) er = null;
|
|
291
291
|
if (cb) cb.apply(this, arguments);
|
|
292
292
|
});
|
|
@@ -296,7 +296,7 @@ var require_polyfills = __commonJS({
|
|
|
296
296
|
if (!orig) return orig;
|
|
297
297
|
return function(target, uid, gid) {
|
|
298
298
|
try {
|
|
299
|
-
return orig.call(
|
|
299
|
+
return orig.call(fs3, target, uid, gid);
|
|
300
300
|
} catch (er) {
|
|
301
301
|
if (!chownErOk(er)) throw er;
|
|
302
302
|
}
|
|
@@ -316,13 +316,13 @@ var require_polyfills = __commonJS({
|
|
|
316
316
|
}
|
|
317
317
|
if (cb) cb.apply(this, arguments);
|
|
318
318
|
}
|
|
319
|
-
return options ? orig.call(
|
|
319
|
+
return options ? orig.call(fs3, target, options, callback) : orig.call(fs3, target, callback);
|
|
320
320
|
};
|
|
321
321
|
}
|
|
322
322
|
function statFixSync(orig) {
|
|
323
323
|
if (!orig) return orig;
|
|
324
324
|
return function(target, options) {
|
|
325
|
-
var stats = options ? orig.call(
|
|
325
|
+
var stats = options ? orig.call(fs3, target, options) : orig.call(fs3, target);
|
|
326
326
|
if (stats) {
|
|
327
327
|
if (stats.uid < 0) stats.uid += 4294967296;
|
|
328
328
|
if (stats.gid < 0) stats.gid += 4294967296;
|
|
@@ -352,16 +352,16 @@ var require_legacy_streams = __commonJS({
|
|
|
352
352
|
"use strict";
|
|
353
353
|
var Stream = __require("stream").Stream;
|
|
354
354
|
module.exports = legacy;
|
|
355
|
-
function legacy(
|
|
355
|
+
function legacy(fs3) {
|
|
356
356
|
return {
|
|
357
357
|
ReadStream,
|
|
358
358
|
WriteStream
|
|
359
359
|
};
|
|
360
|
-
function ReadStream(
|
|
361
|
-
if (!(this instanceof ReadStream)) return new ReadStream(
|
|
360
|
+
function ReadStream(path3, options) {
|
|
361
|
+
if (!(this instanceof ReadStream)) return new ReadStream(path3, options);
|
|
362
362
|
Stream.call(this);
|
|
363
363
|
var self2 = this;
|
|
364
|
-
this.path =
|
|
364
|
+
this.path = path3;
|
|
365
365
|
this.fd = null;
|
|
366
366
|
this.readable = true;
|
|
367
367
|
this.paused = false;
|
|
@@ -395,7 +395,7 @@ var require_legacy_streams = __commonJS({
|
|
|
395
395
|
});
|
|
396
396
|
return;
|
|
397
397
|
}
|
|
398
|
-
|
|
398
|
+
fs3.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
399
399
|
if (err) {
|
|
400
400
|
self2.emit("error", err);
|
|
401
401
|
self2.readable = false;
|
|
@@ -406,10 +406,10 @@ var require_legacy_streams = __commonJS({
|
|
|
406
406
|
self2._read();
|
|
407
407
|
});
|
|
408
408
|
}
|
|
409
|
-
function WriteStream(
|
|
410
|
-
if (!(this instanceof WriteStream)) return new WriteStream(
|
|
409
|
+
function WriteStream(path3, options) {
|
|
410
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path3, options);
|
|
411
411
|
Stream.call(this);
|
|
412
|
-
this.path =
|
|
412
|
+
this.path = path3;
|
|
413
413
|
this.fd = null;
|
|
414
414
|
this.writable = true;
|
|
415
415
|
this.flags = "w";
|
|
@@ -434,7 +434,7 @@ var require_legacy_streams = __commonJS({
|
|
|
434
434
|
this.busy = false;
|
|
435
435
|
this._queue = [];
|
|
436
436
|
if (this.fd === null) {
|
|
437
|
-
this._open =
|
|
437
|
+
this._open = fs3.open;
|
|
438
438
|
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
|
439
439
|
this.flush();
|
|
440
440
|
}
|
|
@@ -470,7 +470,7 @@ var require_clone = __commonJS({
|
|
|
470
470
|
var require_graceful_fs = __commonJS({
|
|
471
471
|
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports, module) {
|
|
472
472
|
"use strict";
|
|
473
|
-
var
|
|
473
|
+
var fs3 = __require("fs");
|
|
474
474
|
var polyfills = require_polyfills();
|
|
475
475
|
var legacy = require_legacy_streams();
|
|
476
476
|
var clone = require_clone();
|
|
@@ -502,12 +502,12 @@ var require_graceful_fs = __commonJS({
|
|
|
502
502
|
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
503
503
|
console.error(m);
|
|
504
504
|
};
|
|
505
|
-
if (!
|
|
505
|
+
if (!fs3[gracefulQueue]) {
|
|
506
506
|
queue = global[gracefulQueue] || [];
|
|
507
|
-
publishQueue(
|
|
508
|
-
|
|
507
|
+
publishQueue(fs3, queue);
|
|
508
|
+
fs3.close = function(fs$close) {
|
|
509
509
|
function close(fd, cb) {
|
|
510
|
-
return fs$close.call(
|
|
510
|
+
return fs$close.call(fs3, fd, function(err) {
|
|
511
511
|
if (!err) {
|
|
512
512
|
resetQueue();
|
|
513
513
|
}
|
|
@@ -519,48 +519,48 @@ var require_graceful_fs = __commonJS({
|
|
|
519
519
|
value: fs$close
|
|
520
520
|
});
|
|
521
521
|
return close;
|
|
522
|
-
}(
|
|
523
|
-
|
|
522
|
+
}(fs3.close);
|
|
523
|
+
fs3.closeSync = function(fs$closeSync) {
|
|
524
524
|
function closeSync(fd) {
|
|
525
|
-
fs$closeSync.apply(
|
|
525
|
+
fs$closeSync.apply(fs3, arguments);
|
|
526
526
|
resetQueue();
|
|
527
527
|
}
|
|
528
528
|
Object.defineProperty(closeSync, previousSymbol, {
|
|
529
529
|
value: fs$closeSync
|
|
530
530
|
});
|
|
531
531
|
return closeSync;
|
|
532
|
-
}(
|
|
532
|
+
}(fs3.closeSync);
|
|
533
533
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
534
534
|
process.on("exit", function() {
|
|
535
|
-
debug(
|
|
536
|
-
__require("assert").equal(
|
|
535
|
+
debug(fs3[gracefulQueue]);
|
|
536
|
+
__require("assert").equal(fs3[gracefulQueue].length, 0);
|
|
537
537
|
});
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
540
|
var queue;
|
|
541
541
|
if (!global[gracefulQueue]) {
|
|
542
|
-
publishQueue(global,
|
|
543
|
-
}
|
|
544
|
-
module.exports = patch(clone(
|
|
545
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !
|
|
546
|
-
module.exports = patch(
|
|
547
|
-
|
|
548
|
-
}
|
|
549
|
-
function patch(
|
|
550
|
-
polyfills(
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
var fs$readFile =
|
|
555
|
-
|
|
556
|
-
function readFile(
|
|
542
|
+
publishQueue(global, fs3[gracefulQueue]);
|
|
543
|
+
}
|
|
544
|
+
module.exports = patch(clone(fs3));
|
|
545
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs3.__patched) {
|
|
546
|
+
module.exports = patch(fs3);
|
|
547
|
+
fs3.__patched = true;
|
|
548
|
+
}
|
|
549
|
+
function patch(fs4) {
|
|
550
|
+
polyfills(fs4);
|
|
551
|
+
fs4.gracefulify = patch;
|
|
552
|
+
fs4.createReadStream = createReadStream;
|
|
553
|
+
fs4.createWriteStream = createWriteStream;
|
|
554
|
+
var fs$readFile = fs4.readFile;
|
|
555
|
+
fs4.readFile = readFile;
|
|
556
|
+
function readFile(path3, options, cb) {
|
|
557
557
|
if (typeof options === "function")
|
|
558
558
|
cb = options, options = null;
|
|
559
|
-
return go$readFile(
|
|
560
|
-
function go$readFile(
|
|
561
|
-
return fs$readFile(
|
|
559
|
+
return go$readFile(path3, options, cb);
|
|
560
|
+
function go$readFile(path4, options2, cb2, startTime) {
|
|
561
|
+
return fs$readFile(path4, options2, function(err) {
|
|
562
562
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
563
|
-
enqueue([go$readFile, [
|
|
563
|
+
enqueue([go$readFile, [path4, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
564
564
|
else {
|
|
565
565
|
if (typeof cb2 === "function")
|
|
566
566
|
cb2.apply(this, arguments);
|
|
@@ -568,16 +568,16 @@ var require_graceful_fs = __commonJS({
|
|
|
568
568
|
});
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
|
-
var fs$writeFile =
|
|
572
|
-
|
|
573
|
-
function writeFile(
|
|
571
|
+
var fs$writeFile = fs4.writeFile;
|
|
572
|
+
fs4.writeFile = writeFile;
|
|
573
|
+
function writeFile(path3, data, options, cb) {
|
|
574
574
|
if (typeof options === "function")
|
|
575
575
|
cb = options, options = null;
|
|
576
|
-
return go$writeFile(
|
|
577
|
-
function go$writeFile(
|
|
578
|
-
return fs$writeFile(
|
|
576
|
+
return go$writeFile(path3, data, options, cb);
|
|
577
|
+
function go$writeFile(path4, data2, options2, cb2, startTime) {
|
|
578
|
+
return fs$writeFile(path4, data2, options2, function(err) {
|
|
579
579
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
580
|
-
enqueue([go$writeFile, [
|
|
580
|
+
enqueue([go$writeFile, [path4, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
581
581
|
else {
|
|
582
582
|
if (typeof cb2 === "function")
|
|
583
583
|
cb2.apply(this, arguments);
|
|
@@ -585,17 +585,17 @@ var require_graceful_fs = __commonJS({
|
|
|
585
585
|
});
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
|
-
var fs$appendFile =
|
|
588
|
+
var fs$appendFile = fs4.appendFile;
|
|
589
589
|
if (fs$appendFile)
|
|
590
|
-
|
|
591
|
-
function appendFile(
|
|
590
|
+
fs4.appendFile = appendFile;
|
|
591
|
+
function appendFile(path3, data, options, cb) {
|
|
592
592
|
if (typeof options === "function")
|
|
593
593
|
cb = options, options = null;
|
|
594
|
-
return go$appendFile(
|
|
595
|
-
function go$appendFile(
|
|
596
|
-
return fs$appendFile(
|
|
594
|
+
return go$appendFile(path3, data, options, cb);
|
|
595
|
+
function go$appendFile(path4, data2, options2, cb2, startTime) {
|
|
596
|
+
return fs$appendFile(path4, data2, options2, function(err) {
|
|
597
597
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
598
|
-
enqueue([go$appendFile, [
|
|
598
|
+
enqueue([go$appendFile, [path4, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
599
599
|
else {
|
|
600
600
|
if (typeof cb2 === "function")
|
|
601
601
|
cb2.apply(this, arguments);
|
|
@@ -603,9 +603,9 @@ var require_graceful_fs = __commonJS({
|
|
|
603
603
|
});
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
|
-
var fs$copyFile =
|
|
606
|
+
var fs$copyFile = fs4.copyFile;
|
|
607
607
|
if (fs$copyFile)
|
|
608
|
-
|
|
608
|
+
fs4.copyFile = copyFile;
|
|
609
609
|
function copyFile(src, dest, flags, cb) {
|
|
610
610
|
if (typeof flags === "function") {
|
|
611
611
|
cb = flags;
|
|
@@ -623,34 +623,34 @@ var require_graceful_fs = __commonJS({
|
|
|
623
623
|
});
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
|
-
var fs$readdir =
|
|
627
|
-
|
|
626
|
+
var fs$readdir = fs4.readdir;
|
|
627
|
+
fs4.readdir = readdir;
|
|
628
628
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
629
|
-
function readdir(
|
|
629
|
+
function readdir(path3, options, cb) {
|
|
630
630
|
if (typeof options === "function")
|
|
631
631
|
cb = options, options = null;
|
|
632
|
-
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(
|
|
633
|
-
return fs$readdir(
|
|
634
|
-
|
|
632
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path4, options2, cb2, startTime) {
|
|
633
|
+
return fs$readdir(path4, fs$readdirCallback(
|
|
634
|
+
path4,
|
|
635
635
|
options2,
|
|
636
636
|
cb2,
|
|
637
637
|
startTime
|
|
638
638
|
));
|
|
639
|
-
} : function go$readdir2(
|
|
640
|
-
return fs$readdir(
|
|
641
|
-
|
|
639
|
+
} : function go$readdir2(path4, options2, cb2, startTime) {
|
|
640
|
+
return fs$readdir(path4, options2, fs$readdirCallback(
|
|
641
|
+
path4,
|
|
642
642
|
options2,
|
|
643
643
|
cb2,
|
|
644
644
|
startTime
|
|
645
645
|
));
|
|
646
646
|
};
|
|
647
|
-
return go$readdir(
|
|
648
|
-
function fs$readdirCallback(
|
|
647
|
+
return go$readdir(path3, options, cb);
|
|
648
|
+
function fs$readdirCallback(path4, options2, cb2, startTime) {
|
|
649
649
|
return function(err, files) {
|
|
650
650
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
651
651
|
enqueue([
|
|
652
652
|
go$readdir,
|
|
653
|
-
[
|
|
653
|
+
[path4, options2, cb2],
|
|
654
654
|
err,
|
|
655
655
|
startTime || Date.now(),
|
|
656
656
|
Date.now()
|
|
@@ -665,21 +665,21 @@ var require_graceful_fs = __commonJS({
|
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
667
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
668
|
-
var legStreams = legacy(
|
|
668
|
+
var legStreams = legacy(fs4);
|
|
669
669
|
ReadStream = legStreams.ReadStream;
|
|
670
670
|
WriteStream = legStreams.WriteStream;
|
|
671
671
|
}
|
|
672
|
-
var fs$ReadStream =
|
|
672
|
+
var fs$ReadStream = fs4.ReadStream;
|
|
673
673
|
if (fs$ReadStream) {
|
|
674
674
|
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
|
675
675
|
ReadStream.prototype.open = ReadStream$open;
|
|
676
676
|
}
|
|
677
|
-
var fs$WriteStream =
|
|
677
|
+
var fs$WriteStream = fs4.WriteStream;
|
|
678
678
|
if (fs$WriteStream) {
|
|
679
679
|
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
680
680
|
WriteStream.prototype.open = WriteStream$open;
|
|
681
681
|
}
|
|
682
|
-
Object.defineProperty(
|
|
682
|
+
Object.defineProperty(fs4, "ReadStream", {
|
|
683
683
|
get: function() {
|
|
684
684
|
return ReadStream;
|
|
685
685
|
},
|
|
@@ -689,7 +689,7 @@ var require_graceful_fs = __commonJS({
|
|
|
689
689
|
enumerable: true,
|
|
690
690
|
configurable: true
|
|
691
691
|
});
|
|
692
|
-
Object.defineProperty(
|
|
692
|
+
Object.defineProperty(fs4, "WriteStream", {
|
|
693
693
|
get: function() {
|
|
694
694
|
return WriteStream;
|
|
695
695
|
},
|
|
@@ -700,7 +700,7 @@ var require_graceful_fs = __commonJS({
|
|
|
700
700
|
configurable: true
|
|
701
701
|
});
|
|
702
702
|
var FileReadStream = ReadStream;
|
|
703
|
-
Object.defineProperty(
|
|
703
|
+
Object.defineProperty(fs4, "FileReadStream", {
|
|
704
704
|
get: function() {
|
|
705
705
|
return FileReadStream;
|
|
706
706
|
},
|
|
@@ -711,7 +711,7 @@ var require_graceful_fs = __commonJS({
|
|
|
711
711
|
configurable: true
|
|
712
712
|
});
|
|
713
713
|
var FileWriteStream = WriteStream;
|
|
714
|
-
Object.defineProperty(
|
|
714
|
+
Object.defineProperty(fs4, "FileWriteStream", {
|
|
715
715
|
get: function() {
|
|
716
716
|
return FileWriteStream;
|
|
717
717
|
},
|
|
@@ -721,7 +721,7 @@ var require_graceful_fs = __commonJS({
|
|
|
721
721
|
enumerable: true,
|
|
722
722
|
configurable: true
|
|
723
723
|
});
|
|
724
|
-
function ReadStream(
|
|
724
|
+
function ReadStream(path3, options) {
|
|
725
725
|
if (this instanceof ReadStream)
|
|
726
726
|
return fs$ReadStream.apply(this, arguments), this;
|
|
727
727
|
else
|
|
@@ -741,7 +741,7 @@ var require_graceful_fs = __commonJS({
|
|
|
741
741
|
}
|
|
742
742
|
});
|
|
743
743
|
}
|
|
744
|
-
function WriteStream(
|
|
744
|
+
function WriteStream(path3, options) {
|
|
745
745
|
if (this instanceof WriteStream)
|
|
746
746
|
return fs$WriteStream.apply(this, arguments), this;
|
|
747
747
|
else
|
|
@@ -759,22 +759,22 @@ var require_graceful_fs = __commonJS({
|
|
|
759
759
|
}
|
|
760
760
|
});
|
|
761
761
|
}
|
|
762
|
-
function createReadStream(
|
|
763
|
-
return new
|
|
762
|
+
function createReadStream(path3, options) {
|
|
763
|
+
return new fs4.ReadStream(path3, options);
|
|
764
764
|
}
|
|
765
|
-
function createWriteStream(
|
|
766
|
-
return new
|
|
765
|
+
function createWriteStream(path3, options) {
|
|
766
|
+
return new fs4.WriteStream(path3, options);
|
|
767
767
|
}
|
|
768
|
-
var fs$open =
|
|
769
|
-
|
|
770
|
-
function open(
|
|
768
|
+
var fs$open = fs4.open;
|
|
769
|
+
fs4.open = open;
|
|
770
|
+
function open(path3, flags, mode, cb) {
|
|
771
771
|
if (typeof mode === "function")
|
|
772
772
|
cb = mode, mode = null;
|
|
773
|
-
return go$open(
|
|
774
|
-
function go$open(
|
|
775
|
-
return fs$open(
|
|
773
|
+
return go$open(path3, flags, mode, cb);
|
|
774
|
+
function go$open(path4, flags2, mode2, cb2, startTime) {
|
|
775
|
+
return fs$open(path4, flags2, mode2, function(err, fd) {
|
|
776
776
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
777
|
-
enqueue([go$open, [
|
|
777
|
+
enqueue([go$open, [path4, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
778
778
|
else {
|
|
779
779
|
if (typeof cb2 === "function")
|
|
780
780
|
cb2.apply(this, arguments);
|
|
@@ -782,20 +782,20 @@ var require_graceful_fs = __commonJS({
|
|
|
782
782
|
});
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
|
-
return
|
|
785
|
+
return fs4;
|
|
786
786
|
}
|
|
787
787
|
function enqueue(elem) {
|
|
788
788
|
debug("ENQUEUE", elem[0].name, elem[1]);
|
|
789
|
-
|
|
789
|
+
fs3[gracefulQueue].push(elem);
|
|
790
790
|
retry2();
|
|
791
791
|
}
|
|
792
792
|
var retryTimer;
|
|
793
793
|
function resetQueue() {
|
|
794
794
|
var now = Date.now();
|
|
795
|
-
for (var i = 0; i <
|
|
796
|
-
if (
|
|
797
|
-
|
|
798
|
-
|
|
795
|
+
for (var i = 0; i < fs3[gracefulQueue].length; ++i) {
|
|
796
|
+
if (fs3[gracefulQueue][i].length > 2) {
|
|
797
|
+
fs3[gracefulQueue][i][3] = now;
|
|
798
|
+
fs3[gracefulQueue][i][4] = now;
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
801
|
retry2();
|
|
@@ -803,9 +803,9 @@ var require_graceful_fs = __commonJS({
|
|
|
803
803
|
function retry2() {
|
|
804
804
|
clearTimeout(retryTimer);
|
|
805
805
|
retryTimer = void 0;
|
|
806
|
-
if (
|
|
806
|
+
if (fs3[gracefulQueue].length === 0)
|
|
807
807
|
return;
|
|
808
|
-
var elem =
|
|
808
|
+
var elem = fs3[gracefulQueue].shift();
|
|
809
809
|
var fn = elem[0];
|
|
810
810
|
var args = elem[1];
|
|
811
811
|
var err = elem[2];
|
|
@@ -827,7 +827,7 @@ var require_graceful_fs = __commonJS({
|
|
|
827
827
|
debug("RETRY", fn.name, args);
|
|
828
828
|
fn.apply(null, args.concat([startTime]));
|
|
829
829
|
} else {
|
|
830
|
-
|
|
830
|
+
fs3[gracefulQueue].push(elem);
|
|
831
831
|
}
|
|
832
832
|
}
|
|
833
833
|
if (retryTimer === void 0) {
|
|
@@ -842,7 +842,7 @@ var require_fs = __commonJS({
|
|
|
842
842
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"(exports) {
|
|
843
843
|
"use strict";
|
|
844
844
|
var u = require_universalify().fromCallback;
|
|
845
|
-
var
|
|
845
|
+
var fs3 = require_graceful_fs();
|
|
846
846
|
var api = [
|
|
847
847
|
"access",
|
|
848
848
|
"appendFile",
|
|
@@ -883,26 +883,26 @@ var require_fs = __commonJS({
|
|
|
883
883
|
"utimes",
|
|
884
884
|
"writeFile"
|
|
885
885
|
].filter((key) => {
|
|
886
|
-
return typeof
|
|
886
|
+
return typeof fs3[key] === "function";
|
|
887
887
|
});
|
|
888
|
-
Object.assign(exports,
|
|
888
|
+
Object.assign(exports, fs3);
|
|
889
889
|
api.forEach((method) => {
|
|
890
|
-
exports[method] = u(
|
|
890
|
+
exports[method] = u(fs3[method]);
|
|
891
891
|
});
|
|
892
892
|
exports.exists = function(filename, callback) {
|
|
893
893
|
if (typeof callback === "function") {
|
|
894
|
-
return
|
|
894
|
+
return fs3.exists(filename, callback);
|
|
895
895
|
}
|
|
896
896
|
return new Promise((resolve) => {
|
|
897
|
-
return
|
|
897
|
+
return fs3.exists(filename, resolve);
|
|
898
898
|
});
|
|
899
899
|
};
|
|
900
900
|
exports.read = function(fd, buffer, offset, length, position, callback) {
|
|
901
901
|
if (typeof callback === "function") {
|
|
902
|
-
return
|
|
902
|
+
return fs3.read(fd, buffer, offset, length, position, callback);
|
|
903
903
|
}
|
|
904
904
|
return new Promise((resolve, reject) => {
|
|
905
|
-
|
|
905
|
+
fs3.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
|
|
906
906
|
if (err) return reject(err);
|
|
907
907
|
resolve({ bytesRead, buffer: buffer2 });
|
|
908
908
|
});
|
|
@@ -910,10 +910,10 @@ var require_fs = __commonJS({
|
|
|
910
910
|
};
|
|
911
911
|
exports.write = function(fd, buffer, ...args) {
|
|
912
912
|
if (typeof args[args.length - 1] === "function") {
|
|
913
|
-
return
|
|
913
|
+
return fs3.write(fd, buffer, ...args);
|
|
914
914
|
}
|
|
915
915
|
return new Promise((resolve, reject) => {
|
|
916
|
-
|
|
916
|
+
fs3.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
|
|
917
917
|
if (err) return reject(err);
|
|
918
918
|
resolve({ bytesWritten, buffer: buffer2 });
|
|
919
919
|
});
|
|
@@ -921,10 +921,10 @@ var require_fs = __commonJS({
|
|
|
921
921
|
};
|
|
922
922
|
exports.readv = function(fd, buffers, ...args) {
|
|
923
923
|
if (typeof args[args.length - 1] === "function") {
|
|
924
|
-
return
|
|
924
|
+
return fs3.readv(fd, buffers, ...args);
|
|
925
925
|
}
|
|
926
926
|
return new Promise((resolve, reject) => {
|
|
927
|
-
|
|
927
|
+
fs3.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
|
|
928
928
|
if (err) return reject(err);
|
|
929
929
|
resolve({ bytesRead, buffers: buffers2 });
|
|
930
930
|
});
|
|
@@ -932,17 +932,17 @@ var require_fs = __commonJS({
|
|
|
932
932
|
};
|
|
933
933
|
exports.writev = function(fd, buffers, ...args) {
|
|
934
934
|
if (typeof args[args.length - 1] === "function") {
|
|
935
|
-
return
|
|
935
|
+
return fs3.writev(fd, buffers, ...args);
|
|
936
936
|
}
|
|
937
937
|
return new Promise((resolve, reject) => {
|
|
938
|
-
|
|
938
|
+
fs3.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
|
|
939
939
|
if (err) return reject(err);
|
|
940
940
|
resolve({ bytesWritten, buffers: buffers2 });
|
|
941
941
|
});
|
|
942
942
|
});
|
|
943
943
|
};
|
|
944
|
-
if (typeof
|
|
945
|
-
exports.realpath.native = u(
|
|
944
|
+
if (typeof fs3.realpath.native === "function") {
|
|
945
|
+
exports.realpath.native = u(fs3.realpath.native);
|
|
946
946
|
} else {
|
|
947
947
|
process.emitWarning(
|
|
948
948
|
"fs.realpath.native is not a function. Is fs being monkey-patched?",
|
|
@@ -957,10 +957,10 @@ var require_fs = __commonJS({
|
|
|
957
957
|
var require_utils = __commonJS({
|
|
958
958
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module) {
|
|
959
959
|
"use strict";
|
|
960
|
-
var
|
|
960
|
+
var path3 = __require("path");
|
|
961
961
|
module.exports.checkPath = function checkPath(pth) {
|
|
962
962
|
if (process.platform === "win32") {
|
|
963
|
-
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(
|
|
963
|
+
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path3.parse(pth).root, ""));
|
|
964
964
|
if (pathHasInvalidWinCharacters) {
|
|
965
965
|
const error = new Error(`Path contains invalid characters: ${pth}`);
|
|
966
966
|
error.code = "EINVAL";
|
|
@@ -975,7 +975,7 @@ var require_utils = __commonJS({
|
|
|
975
975
|
var require_make_dir = __commonJS({
|
|
976
976
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module) {
|
|
977
977
|
"use strict";
|
|
978
|
-
var
|
|
978
|
+
var fs3 = require_fs();
|
|
979
979
|
var { checkPath } = require_utils();
|
|
980
980
|
var getMode = (options) => {
|
|
981
981
|
const defaults = { mode: 511 };
|
|
@@ -984,14 +984,14 @@ var require_make_dir = __commonJS({
|
|
|
984
984
|
};
|
|
985
985
|
module.exports.makeDir = async (dir, options) => {
|
|
986
986
|
checkPath(dir);
|
|
987
|
-
return
|
|
987
|
+
return fs3.mkdir(dir, {
|
|
988
988
|
mode: getMode(options),
|
|
989
989
|
recursive: true
|
|
990
990
|
});
|
|
991
991
|
};
|
|
992
992
|
module.exports.makeDirSync = (dir, options) => {
|
|
993
993
|
checkPath(dir);
|
|
994
|
-
return
|
|
994
|
+
return fs3.mkdirSync(dir, {
|
|
995
995
|
mode: getMode(options),
|
|
996
996
|
recursive: true
|
|
997
997
|
});
|
|
@@ -1023,13 +1023,13 @@ var require_path_exists = __commonJS({
|
|
|
1023
1023
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/path-exists/index.js"(exports, module) {
|
|
1024
1024
|
"use strict";
|
|
1025
1025
|
var u = require_universalify().fromPromise;
|
|
1026
|
-
var
|
|
1027
|
-
function pathExists(
|
|
1028
|
-
return
|
|
1026
|
+
var fs3 = require_fs();
|
|
1027
|
+
function pathExists(path3) {
|
|
1028
|
+
return fs3.access(path3).then(() => true).catch(() => false);
|
|
1029
1029
|
}
|
|
1030
1030
|
module.exports = {
|
|
1031
1031
|
pathExists: u(pathExists),
|
|
1032
|
-
pathExistsSync:
|
|
1032
|
+
pathExistsSync: fs3.existsSync
|
|
1033
1033
|
};
|
|
1034
1034
|
}
|
|
1035
1035
|
});
|
|
@@ -1038,16 +1038,16 @@ var require_path_exists = __commonJS({
|
|
|
1038
1038
|
var require_utimes = __commonJS({
|
|
1039
1039
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/utimes.js"(exports, module) {
|
|
1040
1040
|
"use strict";
|
|
1041
|
-
var
|
|
1041
|
+
var fs3 = require_fs();
|
|
1042
1042
|
var u = require_universalify().fromPromise;
|
|
1043
|
-
async function utimesMillis(
|
|
1044
|
-
const fd = await
|
|
1043
|
+
async function utimesMillis(path3, atime, mtime) {
|
|
1044
|
+
const fd = await fs3.open(path3, "r+");
|
|
1045
1045
|
let closeErr = null;
|
|
1046
1046
|
try {
|
|
1047
|
-
await
|
|
1047
|
+
await fs3.futimes(fd, atime, mtime);
|
|
1048
1048
|
} finally {
|
|
1049
1049
|
try {
|
|
1050
|
-
await
|
|
1050
|
+
await fs3.close(fd);
|
|
1051
1051
|
} catch (e) {
|
|
1052
1052
|
closeErr = e;
|
|
1053
1053
|
}
|
|
@@ -1056,10 +1056,10 @@ var require_utimes = __commonJS({
|
|
|
1056
1056
|
throw closeErr;
|
|
1057
1057
|
}
|
|
1058
1058
|
}
|
|
1059
|
-
function utimesMillisSync(
|
|
1060
|
-
const fd =
|
|
1061
|
-
|
|
1062
|
-
return
|
|
1059
|
+
function utimesMillisSync(path3, atime, mtime) {
|
|
1060
|
+
const fd = fs3.openSync(path3, "r+");
|
|
1061
|
+
fs3.futimesSync(fd, atime, mtime);
|
|
1062
|
+
return fs3.closeSync(fd);
|
|
1063
1063
|
}
|
|
1064
1064
|
module.exports = {
|
|
1065
1065
|
utimesMillis: u(utimesMillis),
|
|
@@ -1072,11 +1072,11 @@ var require_utimes = __commonJS({
|
|
|
1072
1072
|
var require_stat = __commonJS({
|
|
1073
1073
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/stat.js"(exports, module) {
|
|
1074
1074
|
"use strict";
|
|
1075
|
-
var
|
|
1076
|
-
var
|
|
1075
|
+
var fs3 = require_fs();
|
|
1076
|
+
var path3 = __require("path");
|
|
1077
1077
|
var u = require_universalify().fromPromise;
|
|
1078
1078
|
function getStats(src, dest, opts) {
|
|
1079
|
-
const statFunc = opts.dereference ? (file) =>
|
|
1079
|
+
const statFunc = opts.dereference ? (file) => fs3.stat(file, { bigint: true }) : (file) => fs3.lstat(file, { bigint: true });
|
|
1080
1080
|
return Promise.all([
|
|
1081
1081
|
statFunc(src),
|
|
1082
1082
|
statFunc(dest).catch((err) => {
|
|
@@ -1087,7 +1087,7 @@ var require_stat = __commonJS({
|
|
|
1087
1087
|
}
|
|
1088
1088
|
function getStatsSync(src, dest, opts) {
|
|
1089
1089
|
let destStat;
|
|
1090
|
-
const statFunc = opts.dereference ? (file) =>
|
|
1090
|
+
const statFunc = opts.dereference ? (file) => fs3.statSync(file, { bigint: true }) : (file) => fs3.lstatSync(file, { bigint: true });
|
|
1091
1091
|
const srcStat = statFunc(src);
|
|
1092
1092
|
try {
|
|
1093
1093
|
destStat = statFunc(dest);
|
|
@@ -1101,8 +1101,8 @@ var require_stat = __commonJS({
|
|
|
1101
1101
|
const { srcStat, destStat } = await getStats(src, dest, opts);
|
|
1102
1102
|
if (destStat) {
|
|
1103
1103
|
if (areIdentical(srcStat, destStat)) {
|
|
1104
|
-
const srcBaseName =
|
|
1105
|
-
const destBaseName =
|
|
1104
|
+
const srcBaseName = path3.basename(src);
|
|
1105
|
+
const destBaseName = path3.basename(dest);
|
|
1106
1106
|
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
1107
1107
|
return { srcStat, destStat, isChangingCase: true };
|
|
1108
1108
|
}
|
|
@@ -1124,8 +1124,8 @@ var require_stat = __commonJS({
|
|
|
1124
1124
|
const { srcStat, destStat } = getStatsSync(src, dest, opts);
|
|
1125
1125
|
if (destStat) {
|
|
1126
1126
|
if (areIdentical(srcStat, destStat)) {
|
|
1127
|
-
const srcBaseName =
|
|
1128
|
-
const destBaseName =
|
|
1127
|
+
const srcBaseName = path3.basename(src);
|
|
1128
|
+
const destBaseName = path3.basename(dest);
|
|
1129
1129
|
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
1130
1130
|
return { srcStat, destStat, isChangingCase: true };
|
|
1131
1131
|
}
|
|
@@ -1144,12 +1144,12 @@ var require_stat = __commonJS({
|
|
|
1144
1144
|
return { srcStat, destStat };
|
|
1145
1145
|
}
|
|
1146
1146
|
async function checkParentPaths(src, srcStat, dest, funcName) {
|
|
1147
|
-
const srcParent =
|
|
1148
|
-
const destParent =
|
|
1149
|
-
if (destParent === srcParent || destParent ===
|
|
1147
|
+
const srcParent = path3.resolve(path3.dirname(src));
|
|
1148
|
+
const destParent = path3.resolve(path3.dirname(dest));
|
|
1149
|
+
if (destParent === srcParent || destParent === path3.parse(destParent).root) return;
|
|
1150
1150
|
let destStat;
|
|
1151
1151
|
try {
|
|
1152
|
-
destStat = await
|
|
1152
|
+
destStat = await fs3.stat(destParent, { bigint: true });
|
|
1153
1153
|
} catch (err) {
|
|
1154
1154
|
if (err.code === "ENOENT") return;
|
|
1155
1155
|
throw err;
|
|
@@ -1160,12 +1160,12 @@ var require_stat = __commonJS({
|
|
|
1160
1160
|
return checkParentPaths(src, srcStat, destParent, funcName);
|
|
1161
1161
|
}
|
|
1162
1162
|
function checkParentPathsSync(src, srcStat, dest, funcName) {
|
|
1163
|
-
const srcParent =
|
|
1164
|
-
const destParent =
|
|
1165
|
-
if (destParent === srcParent || destParent ===
|
|
1163
|
+
const srcParent = path3.resolve(path3.dirname(src));
|
|
1164
|
+
const destParent = path3.resolve(path3.dirname(dest));
|
|
1165
|
+
if (destParent === srcParent || destParent === path3.parse(destParent).root) return;
|
|
1166
1166
|
let destStat;
|
|
1167
1167
|
try {
|
|
1168
|
-
destStat =
|
|
1168
|
+
destStat = fs3.statSync(destParent, { bigint: true });
|
|
1169
1169
|
} catch (err) {
|
|
1170
1170
|
if (err.code === "ENOENT") return;
|
|
1171
1171
|
throw err;
|
|
@@ -1179,8 +1179,8 @@ var require_stat = __commonJS({
|
|
|
1179
1179
|
return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
|
|
1180
1180
|
}
|
|
1181
1181
|
function isSrcSubdir(src, dest) {
|
|
1182
|
-
const srcArr =
|
|
1183
|
-
const destArr =
|
|
1182
|
+
const srcArr = path3.resolve(src).split(path3.sep).filter((i) => i);
|
|
1183
|
+
const destArr = path3.resolve(dest).split(path3.sep).filter((i) => i);
|
|
1184
1184
|
return srcArr.every((cur, i) => destArr[i] === cur);
|
|
1185
1185
|
}
|
|
1186
1186
|
function errMsg(src, dest, funcName) {
|
|
@@ -1204,8 +1204,8 @@ var require_stat = __commonJS({
|
|
|
1204
1204
|
var require_copy = __commonJS({
|
|
1205
1205
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/copy.js"(exports, module) {
|
|
1206
1206
|
"use strict";
|
|
1207
|
-
var
|
|
1208
|
-
var
|
|
1207
|
+
var fs3 = require_fs();
|
|
1208
|
+
var path3 = __require("path");
|
|
1209
1209
|
var { mkdirs } = require_mkdirs();
|
|
1210
1210
|
var { pathExists } = require_path_exists();
|
|
1211
1211
|
var { utimesMillis } = require_utimes();
|
|
@@ -1227,7 +1227,7 @@ var require_copy = __commonJS({
|
|
|
1227
1227
|
await stat.checkParentPaths(src, srcStat, dest, "copy");
|
|
1228
1228
|
const include = await runFilter(src, dest, opts);
|
|
1229
1229
|
if (!include) return;
|
|
1230
|
-
const destParent =
|
|
1230
|
+
const destParent = path3.dirname(dest);
|
|
1231
1231
|
const dirExists = await pathExists(destParent);
|
|
1232
1232
|
if (!dirExists) {
|
|
1233
1233
|
await mkdirs(destParent);
|
|
@@ -1239,7 +1239,7 @@ var require_copy = __commonJS({
|
|
|
1239
1239
|
return opts.filter(src, dest);
|
|
1240
1240
|
}
|
|
1241
1241
|
async function getStatsAndPerformCopy(destStat, src, dest, opts) {
|
|
1242
|
-
const statFn = opts.dereference ?
|
|
1242
|
+
const statFn = opts.dereference ? fs3.stat : fs3.lstat;
|
|
1243
1243
|
const srcStat = await statFn(src);
|
|
1244
1244
|
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
|
|
1245
1245
|
if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
|
|
@@ -1251,7 +1251,7 @@ var require_copy = __commonJS({
|
|
|
1251
1251
|
async function onFile(srcStat, destStat, src, dest, opts) {
|
|
1252
1252
|
if (!destStat) return copyFile(srcStat, src, dest, opts);
|
|
1253
1253
|
if (opts.overwrite) {
|
|
1254
|
-
await
|
|
1254
|
+
await fs3.unlink(dest);
|
|
1255
1255
|
return copyFile(srcStat, src, dest, opts);
|
|
1256
1256
|
}
|
|
1257
1257
|
if (opts.errorOnExist) {
|
|
@@ -1259,30 +1259,30 @@ var require_copy = __commonJS({
|
|
|
1259
1259
|
}
|
|
1260
1260
|
}
|
|
1261
1261
|
async function copyFile(srcStat, src, dest, opts) {
|
|
1262
|
-
await
|
|
1262
|
+
await fs3.copyFile(src, dest);
|
|
1263
1263
|
if (opts.preserveTimestamps) {
|
|
1264
1264
|
if (fileIsNotWritable(srcStat.mode)) {
|
|
1265
1265
|
await makeFileWritable(dest, srcStat.mode);
|
|
1266
1266
|
}
|
|
1267
|
-
const updatedSrcStat = await
|
|
1267
|
+
const updatedSrcStat = await fs3.stat(src);
|
|
1268
1268
|
await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
1269
1269
|
}
|
|
1270
|
-
return
|
|
1270
|
+
return fs3.chmod(dest, srcStat.mode);
|
|
1271
1271
|
}
|
|
1272
1272
|
function fileIsNotWritable(srcMode) {
|
|
1273
1273
|
return (srcMode & 128) === 0;
|
|
1274
1274
|
}
|
|
1275
1275
|
function makeFileWritable(dest, srcMode) {
|
|
1276
|
-
return
|
|
1276
|
+
return fs3.chmod(dest, srcMode | 128);
|
|
1277
1277
|
}
|
|
1278
1278
|
async function onDir(srcStat, destStat, src, dest, opts) {
|
|
1279
1279
|
if (!destStat) {
|
|
1280
|
-
await
|
|
1280
|
+
await fs3.mkdir(dest);
|
|
1281
1281
|
}
|
|
1282
1282
|
const promises = [];
|
|
1283
|
-
for await (const item of await
|
|
1284
|
-
const srcItem =
|
|
1285
|
-
const destItem =
|
|
1283
|
+
for await (const item of await fs3.opendir(src)) {
|
|
1284
|
+
const srcItem = path3.join(src, item.name);
|
|
1285
|
+
const destItem = path3.join(dest, item.name);
|
|
1286
1286
|
promises.push(
|
|
1287
1287
|
runFilter(srcItem, destItem, opts).then((include) => {
|
|
1288
1288
|
if (include) {
|
|
@@ -1295,26 +1295,26 @@ var require_copy = __commonJS({
|
|
|
1295
1295
|
}
|
|
1296
1296
|
await Promise.all(promises);
|
|
1297
1297
|
if (!destStat) {
|
|
1298
|
-
await
|
|
1298
|
+
await fs3.chmod(dest, srcStat.mode);
|
|
1299
1299
|
}
|
|
1300
1300
|
}
|
|
1301
1301
|
async function onLink(destStat, src, dest, opts) {
|
|
1302
|
-
let resolvedSrc = await
|
|
1302
|
+
let resolvedSrc = await fs3.readlink(src);
|
|
1303
1303
|
if (opts.dereference) {
|
|
1304
|
-
resolvedSrc =
|
|
1304
|
+
resolvedSrc = path3.resolve(process.cwd(), resolvedSrc);
|
|
1305
1305
|
}
|
|
1306
1306
|
if (!destStat) {
|
|
1307
|
-
return
|
|
1307
|
+
return fs3.symlink(resolvedSrc, dest);
|
|
1308
1308
|
}
|
|
1309
1309
|
let resolvedDest = null;
|
|
1310
1310
|
try {
|
|
1311
|
-
resolvedDest = await
|
|
1311
|
+
resolvedDest = await fs3.readlink(dest);
|
|
1312
1312
|
} catch (e) {
|
|
1313
|
-
if (e.code === "EINVAL" || e.code === "UNKNOWN") return
|
|
1313
|
+
if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs3.symlink(resolvedSrc, dest);
|
|
1314
1314
|
throw e;
|
|
1315
1315
|
}
|
|
1316
1316
|
if (opts.dereference) {
|
|
1317
|
-
resolvedDest =
|
|
1317
|
+
resolvedDest = path3.resolve(process.cwd(), resolvedDest);
|
|
1318
1318
|
}
|
|
1319
1319
|
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
1320
1320
|
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
|
@@ -1322,8 +1322,8 @@ var require_copy = __commonJS({
|
|
|
1322
1322
|
if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
|
|
1323
1323
|
throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
|
|
1324
1324
|
}
|
|
1325
|
-
await
|
|
1326
|
-
return
|
|
1325
|
+
await fs3.unlink(dest);
|
|
1326
|
+
return fs3.symlink(resolvedSrc, dest);
|
|
1327
1327
|
}
|
|
1328
1328
|
module.exports = copy4;
|
|
1329
1329
|
}
|
|
@@ -1333,8 +1333,8 @@ var require_copy = __commonJS({
|
|
|
1333
1333
|
var require_copy_sync = __commonJS({
|
|
1334
1334
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module) {
|
|
1335
1335
|
"use strict";
|
|
1336
|
-
var
|
|
1337
|
-
var
|
|
1336
|
+
var fs3 = require_graceful_fs();
|
|
1337
|
+
var path3 = __require("path");
|
|
1338
1338
|
var mkdirsSync = require_mkdirs().mkdirsSync;
|
|
1339
1339
|
var utimesMillisSync = require_utimes().utimesMillisSync;
|
|
1340
1340
|
var stat = require_stat();
|
|
@@ -1355,12 +1355,12 @@ var require_copy_sync = __commonJS({
|
|
|
1355
1355
|
const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
|
|
1356
1356
|
stat.checkParentPathsSync(src, srcStat, dest, "copy");
|
|
1357
1357
|
if (opts.filter && !opts.filter(src, dest)) return;
|
|
1358
|
-
const destParent =
|
|
1359
|
-
if (!
|
|
1358
|
+
const destParent = path3.dirname(dest);
|
|
1359
|
+
if (!fs3.existsSync(destParent)) mkdirsSync(destParent);
|
|
1360
1360
|
return getStats(destStat, src, dest, opts);
|
|
1361
1361
|
}
|
|
1362
1362
|
function getStats(destStat, src, dest, opts) {
|
|
1363
|
-
const statSync = opts.dereference ?
|
|
1363
|
+
const statSync = opts.dereference ? fs3.statSync : fs3.lstatSync;
|
|
1364
1364
|
const srcStat = statSync(src);
|
|
1365
1365
|
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
|
|
1366
1366
|
else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
|
|
@@ -1375,14 +1375,14 @@ var require_copy_sync = __commonJS({
|
|
|
1375
1375
|
}
|
|
1376
1376
|
function mayCopyFile(srcStat, src, dest, opts) {
|
|
1377
1377
|
if (opts.overwrite) {
|
|
1378
|
-
|
|
1378
|
+
fs3.unlinkSync(dest);
|
|
1379
1379
|
return copyFile(srcStat, src, dest, opts);
|
|
1380
1380
|
} else if (opts.errorOnExist) {
|
|
1381
1381
|
throw new Error(`'${dest}' already exists`);
|
|
1382
1382
|
}
|
|
1383
1383
|
}
|
|
1384
1384
|
function copyFile(srcStat, src, dest, opts) {
|
|
1385
|
-
|
|
1385
|
+
fs3.copyFileSync(src, dest);
|
|
1386
1386
|
if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest);
|
|
1387
1387
|
return setDestMode(dest, srcStat.mode);
|
|
1388
1388
|
}
|
|
@@ -1397,10 +1397,10 @@ var require_copy_sync = __commonJS({
|
|
|
1397
1397
|
return setDestMode(dest, srcMode | 128);
|
|
1398
1398
|
}
|
|
1399
1399
|
function setDestMode(dest, srcMode) {
|
|
1400
|
-
return
|
|
1400
|
+
return fs3.chmodSync(dest, srcMode);
|
|
1401
1401
|
}
|
|
1402
1402
|
function setDestTimestamps(src, dest) {
|
|
1403
|
-
const updatedSrcStat =
|
|
1403
|
+
const updatedSrcStat = fs3.statSync(src);
|
|
1404
1404
|
return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
1405
1405
|
}
|
|
1406
1406
|
function onDir(srcStat, destStat, src, dest, opts) {
|
|
@@ -1408,12 +1408,12 @@ var require_copy_sync = __commonJS({
|
|
|
1408
1408
|
return copyDir(src, dest, opts);
|
|
1409
1409
|
}
|
|
1410
1410
|
function mkDirAndCopy(srcMode, src, dest, opts) {
|
|
1411
|
-
|
|
1411
|
+
fs3.mkdirSync(dest);
|
|
1412
1412
|
copyDir(src, dest, opts);
|
|
1413
1413
|
return setDestMode(dest, srcMode);
|
|
1414
1414
|
}
|
|
1415
1415
|
function copyDir(src, dest, opts) {
|
|
1416
|
-
const dir =
|
|
1416
|
+
const dir = fs3.opendirSync(src);
|
|
1417
1417
|
try {
|
|
1418
1418
|
let dirent;
|
|
1419
1419
|
while ((dirent = dir.readSync()) !== null) {
|
|
@@ -1424,29 +1424,29 @@ var require_copy_sync = __commonJS({
|
|
|
1424
1424
|
}
|
|
1425
1425
|
}
|
|
1426
1426
|
function copyDirItem(item, src, dest, opts) {
|
|
1427
|
-
const srcItem =
|
|
1428
|
-
const destItem =
|
|
1427
|
+
const srcItem = path3.join(src, item);
|
|
1428
|
+
const destItem = path3.join(dest, item);
|
|
1429
1429
|
if (opts.filter && !opts.filter(srcItem, destItem)) return;
|
|
1430
1430
|
const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
|
|
1431
1431
|
return getStats(destStat, srcItem, destItem, opts);
|
|
1432
1432
|
}
|
|
1433
1433
|
function onLink(destStat, src, dest, opts) {
|
|
1434
|
-
let resolvedSrc =
|
|
1434
|
+
let resolvedSrc = fs3.readlinkSync(src);
|
|
1435
1435
|
if (opts.dereference) {
|
|
1436
|
-
resolvedSrc =
|
|
1436
|
+
resolvedSrc = path3.resolve(process.cwd(), resolvedSrc);
|
|
1437
1437
|
}
|
|
1438
1438
|
if (!destStat) {
|
|
1439
|
-
return
|
|
1439
|
+
return fs3.symlinkSync(resolvedSrc, dest);
|
|
1440
1440
|
} else {
|
|
1441
1441
|
let resolvedDest;
|
|
1442
1442
|
try {
|
|
1443
|
-
resolvedDest =
|
|
1443
|
+
resolvedDest = fs3.readlinkSync(dest);
|
|
1444
1444
|
} catch (err) {
|
|
1445
|
-
if (err.code === "EINVAL" || err.code === "UNKNOWN") return
|
|
1445
|
+
if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs3.symlinkSync(resolvedSrc, dest);
|
|
1446
1446
|
throw err;
|
|
1447
1447
|
}
|
|
1448
1448
|
if (opts.dereference) {
|
|
1449
|
-
resolvedDest =
|
|
1449
|
+
resolvedDest = path3.resolve(process.cwd(), resolvedDest);
|
|
1450
1450
|
}
|
|
1451
1451
|
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
1452
1452
|
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
|
@@ -1458,8 +1458,8 @@ var require_copy_sync = __commonJS({
|
|
|
1458
1458
|
}
|
|
1459
1459
|
}
|
|
1460
1460
|
function copyLink(resolvedSrc, dest) {
|
|
1461
|
-
|
|
1462
|
-
return
|
|
1461
|
+
fs3.unlinkSync(dest);
|
|
1462
|
+
return fs3.symlinkSync(resolvedSrc, dest);
|
|
1463
1463
|
}
|
|
1464
1464
|
module.exports = copySync;
|
|
1465
1465
|
}
|
|
@@ -1481,13 +1481,13 @@ var require_copy2 = __commonJS({
|
|
|
1481
1481
|
var require_remove = __commonJS({
|
|
1482
1482
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/remove/index.js"(exports, module) {
|
|
1483
1483
|
"use strict";
|
|
1484
|
-
var
|
|
1484
|
+
var fs3 = require_graceful_fs();
|
|
1485
1485
|
var u = require_universalify().fromCallback;
|
|
1486
|
-
function remove(
|
|
1487
|
-
|
|
1486
|
+
function remove(path3, callback) {
|
|
1487
|
+
fs3.rm(path3, { recursive: true, force: true }, callback);
|
|
1488
1488
|
}
|
|
1489
|
-
function removeSync(
|
|
1490
|
-
|
|
1489
|
+
function removeSync(path3) {
|
|
1490
|
+
fs3.rmSync(path3, { recursive: true, force: true });
|
|
1491
1491
|
}
|
|
1492
1492
|
module.exports = {
|
|
1493
1493
|
remove: u(remove),
|
|
@@ -1501,28 +1501,28 @@ var require_empty = __commonJS({
|
|
|
1501
1501
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/empty/index.js"(exports, module) {
|
|
1502
1502
|
"use strict";
|
|
1503
1503
|
var u = require_universalify().fromPromise;
|
|
1504
|
-
var
|
|
1505
|
-
var
|
|
1504
|
+
var fs3 = require_fs();
|
|
1505
|
+
var path3 = __require("path");
|
|
1506
1506
|
var mkdir = require_mkdirs();
|
|
1507
1507
|
var remove = require_remove();
|
|
1508
1508
|
var emptyDir = u(async function emptyDir2(dir) {
|
|
1509
1509
|
let items;
|
|
1510
1510
|
try {
|
|
1511
|
-
items = await
|
|
1511
|
+
items = await fs3.readdir(dir);
|
|
1512
1512
|
} catch {
|
|
1513
1513
|
return mkdir.mkdirs(dir);
|
|
1514
1514
|
}
|
|
1515
|
-
return Promise.all(items.map((item) => remove.remove(
|
|
1515
|
+
return Promise.all(items.map((item) => remove.remove(path3.join(dir, item))));
|
|
1516
1516
|
});
|
|
1517
1517
|
function emptyDirSync(dir) {
|
|
1518
1518
|
let items;
|
|
1519
1519
|
try {
|
|
1520
|
-
items =
|
|
1520
|
+
items = fs3.readdirSync(dir);
|
|
1521
1521
|
} catch {
|
|
1522
1522
|
return mkdir.mkdirsSync(dir);
|
|
1523
1523
|
}
|
|
1524
1524
|
items.forEach((item) => {
|
|
1525
|
-
item =
|
|
1525
|
+
item = path3.join(dir, item);
|
|
1526
1526
|
remove.removeSync(item);
|
|
1527
1527
|
});
|
|
1528
1528
|
}
|
|
@@ -1540,52 +1540,52 @@ var require_file = __commonJS({
|
|
|
1540
1540
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/file.js"(exports, module) {
|
|
1541
1541
|
"use strict";
|
|
1542
1542
|
var u = require_universalify().fromPromise;
|
|
1543
|
-
var
|
|
1544
|
-
var
|
|
1543
|
+
var path3 = __require("path");
|
|
1544
|
+
var fs3 = require_fs();
|
|
1545
1545
|
var mkdir = require_mkdirs();
|
|
1546
1546
|
async function createFile(file) {
|
|
1547
1547
|
let stats;
|
|
1548
1548
|
try {
|
|
1549
|
-
stats = await
|
|
1549
|
+
stats = await fs3.stat(file);
|
|
1550
1550
|
} catch {
|
|
1551
1551
|
}
|
|
1552
1552
|
if (stats && stats.isFile()) return;
|
|
1553
|
-
const dir =
|
|
1553
|
+
const dir = path3.dirname(file);
|
|
1554
1554
|
let dirStats = null;
|
|
1555
1555
|
try {
|
|
1556
|
-
dirStats = await
|
|
1556
|
+
dirStats = await fs3.stat(dir);
|
|
1557
1557
|
} catch (err) {
|
|
1558
1558
|
if (err.code === "ENOENT") {
|
|
1559
1559
|
await mkdir.mkdirs(dir);
|
|
1560
|
-
await
|
|
1560
|
+
await fs3.writeFile(file, "");
|
|
1561
1561
|
return;
|
|
1562
1562
|
} else {
|
|
1563
1563
|
throw err;
|
|
1564
1564
|
}
|
|
1565
1565
|
}
|
|
1566
1566
|
if (dirStats.isDirectory()) {
|
|
1567
|
-
await
|
|
1567
|
+
await fs3.writeFile(file, "");
|
|
1568
1568
|
} else {
|
|
1569
|
-
await
|
|
1569
|
+
await fs3.readdir(dir);
|
|
1570
1570
|
}
|
|
1571
1571
|
}
|
|
1572
1572
|
function createFileSync(file) {
|
|
1573
1573
|
let stats;
|
|
1574
1574
|
try {
|
|
1575
|
-
stats =
|
|
1575
|
+
stats = fs3.statSync(file);
|
|
1576
1576
|
} catch {
|
|
1577
1577
|
}
|
|
1578
1578
|
if (stats && stats.isFile()) return;
|
|
1579
|
-
const dir =
|
|
1579
|
+
const dir = path3.dirname(file);
|
|
1580
1580
|
try {
|
|
1581
|
-
if (!
|
|
1582
|
-
|
|
1581
|
+
if (!fs3.statSync(dir).isDirectory()) {
|
|
1582
|
+
fs3.readdirSync(dir);
|
|
1583
1583
|
}
|
|
1584
1584
|
} catch (err) {
|
|
1585
1585
|
if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir);
|
|
1586
1586
|
else throw err;
|
|
1587
1587
|
}
|
|
1588
|
-
|
|
1588
|
+
fs3.writeFileSync(file, "");
|
|
1589
1589
|
}
|
|
1590
1590
|
module.exports = {
|
|
1591
1591
|
createFile: u(createFile),
|
|
@@ -1599,50 +1599,50 @@ var require_link = __commonJS({
|
|
|
1599
1599
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/link.js"(exports, module) {
|
|
1600
1600
|
"use strict";
|
|
1601
1601
|
var u = require_universalify().fromPromise;
|
|
1602
|
-
var
|
|
1603
|
-
var
|
|
1602
|
+
var path3 = __require("path");
|
|
1603
|
+
var fs3 = require_fs();
|
|
1604
1604
|
var mkdir = require_mkdirs();
|
|
1605
1605
|
var { pathExists } = require_path_exists();
|
|
1606
1606
|
var { areIdentical } = require_stat();
|
|
1607
1607
|
async function createLink(srcpath, dstpath) {
|
|
1608
1608
|
let dstStat;
|
|
1609
1609
|
try {
|
|
1610
|
-
dstStat = await
|
|
1610
|
+
dstStat = await fs3.lstat(dstpath);
|
|
1611
1611
|
} catch {
|
|
1612
1612
|
}
|
|
1613
1613
|
let srcStat;
|
|
1614
1614
|
try {
|
|
1615
|
-
srcStat = await
|
|
1615
|
+
srcStat = await fs3.lstat(srcpath);
|
|
1616
1616
|
} catch (err) {
|
|
1617
1617
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
1618
1618
|
throw err;
|
|
1619
1619
|
}
|
|
1620
1620
|
if (dstStat && areIdentical(srcStat, dstStat)) return;
|
|
1621
|
-
const dir =
|
|
1621
|
+
const dir = path3.dirname(dstpath);
|
|
1622
1622
|
const dirExists = await pathExists(dir);
|
|
1623
1623
|
if (!dirExists) {
|
|
1624
1624
|
await mkdir.mkdirs(dir);
|
|
1625
1625
|
}
|
|
1626
|
-
await
|
|
1626
|
+
await fs3.link(srcpath, dstpath);
|
|
1627
1627
|
}
|
|
1628
1628
|
function createLinkSync(srcpath, dstpath) {
|
|
1629
1629
|
let dstStat;
|
|
1630
1630
|
try {
|
|
1631
|
-
dstStat =
|
|
1631
|
+
dstStat = fs3.lstatSync(dstpath);
|
|
1632
1632
|
} catch {
|
|
1633
1633
|
}
|
|
1634
1634
|
try {
|
|
1635
|
-
const srcStat =
|
|
1635
|
+
const srcStat = fs3.lstatSync(srcpath);
|
|
1636
1636
|
if (dstStat && areIdentical(srcStat, dstStat)) return;
|
|
1637
1637
|
} catch (err) {
|
|
1638
1638
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
1639
1639
|
throw err;
|
|
1640
1640
|
}
|
|
1641
|
-
const dir =
|
|
1642
|
-
const dirExists =
|
|
1643
|
-
if (dirExists) return
|
|
1641
|
+
const dir = path3.dirname(dstpath);
|
|
1642
|
+
const dirExists = fs3.existsSync(dir);
|
|
1643
|
+
if (dirExists) return fs3.linkSync(srcpath, dstpath);
|
|
1644
1644
|
mkdir.mkdirsSync(dir);
|
|
1645
|
-
return
|
|
1645
|
+
return fs3.linkSync(srcpath, dstpath);
|
|
1646
1646
|
}
|
|
1647
1647
|
module.exports = {
|
|
1648
1648
|
createLink: u(createLink),
|
|
@@ -1655,14 +1655,14 @@ var require_link = __commonJS({
|
|
|
1655
1655
|
var require_symlink_paths = __commonJS({
|
|
1656
1656
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module) {
|
|
1657
1657
|
"use strict";
|
|
1658
|
-
var
|
|
1659
|
-
var
|
|
1658
|
+
var path3 = __require("path");
|
|
1659
|
+
var fs3 = require_fs();
|
|
1660
1660
|
var { pathExists } = require_path_exists();
|
|
1661
1661
|
var u = require_universalify().fromPromise;
|
|
1662
1662
|
async function symlinkPaths(srcpath, dstpath) {
|
|
1663
|
-
if (
|
|
1663
|
+
if (path3.isAbsolute(srcpath)) {
|
|
1664
1664
|
try {
|
|
1665
|
-
await
|
|
1665
|
+
await fs3.lstat(srcpath);
|
|
1666
1666
|
} catch (err) {
|
|
1667
1667
|
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
1668
1668
|
throw err;
|
|
@@ -1672,8 +1672,8 @@ var require_symlink_paths = __commonJS({
|
|
|
1672
1672
|
toDst: srcpath
|
|
1673
1673
|
};
|
|
1674
1674
|
}
|
|
1675
|
-
const dstdir =
|
|
1676
|
-
const relativeToDst =
|
|
1675
|
+
const dstdir = path3.dirname(dstpath);
|
|
1676
|
+
const relativeToDst = path3.join(dstdir, srcpath);
|
|
1677
1677
|
const exists2 = await pathExists(relativeToDst);
|
|
1678
1678
|
if (exists2) {
|
|
1679
1679
|
return {
|
|
@@ -1682,39 +1682,39 @@ var require_symlink_paths = __commonJS({
|
|
|
1682
1682
|
};
|
|
1683
1683
|
}
|
|
1684
1684
|
try {
|
|
1685
|
-
await
|
|
1685
|
+
await fs3.lstat(srcpath);
|
|
1686
1686
|
} catch (err) {
|
|
1687
1687
|
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
1688
1688
|
throw err;
|
|
1689
1689
|
}
|
|
1690
1690
|
return {
|
|
1691
1691
|
toCwd: srcpath,
|
|
1692
|
-
toDst:
|
|
1692
|
+
toDst: path3.relative(dstdir, srcpath)
|
|
1693
1693
|
};
|
|
1694
1694
|
}
|
|
1695
1695
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
1696
|
-
if (
|
|
1697
|
-
const exists3 =
|
|
1696
|
+
if (path3.isAbsolute(srcpath)) {
|
|
1697
|
+
const exists3 = fs3.existsSync(srcpath);
|
|
1698
1698
|
if (!exists3) throw new Error("absolute srcpath does not exist");
|
|
1699
1699
|
return {
|
|
1700
1700
|
toCwd: srcpath,
|
|
1701
1701
|
toDst: srcpath
|
|
1702
1702
|
};
|
|
1703
1703
|
}
|
|
1704
|
-
const dstdir =
|
|
1705
|
-
const relativeToDst =
|
|
1706
|
-
const exists2 =
|
|
1704
|
+
const dstdir = path3.dirname(dstpath);
|
|
1705
|
+
const relativeToDst = path3.join(dstdir, srcpath);
|
|
1706
|
+
const exists2 = fs3.existsSync(relativeToDst);
|
|
1707
1707
|
if (exists2) {
|
|
1708
1708
|
return {
|
|
1709
1709
|
toCwd: relativeToDst,
|
|
1710
1710
|
toDst: srcpath
|
|
1711
1711
|
};
|
|
1712
1712
|
}
|
|
1713
|
-
const srcExists =
|
|
1713
|
+
const srcExists = fs3.existsSync(srcpath);
|
|
1714
1714
|
if (!srcExists) throw new Error("relative srcpath does not exist");
|
|
1715
1715
|
return {
|
|
1716
1716
|
toCwd: srcpath,
|
|
1717
|
-
toDst:
|
|
1717
|
+
toDst: path3.relative(dstdir, srcpath)
|
|
1718
1718
|
};
|
|
1719
1719
|
}
|
|
1720
1720
|
module.exports = {
|
|
@@ -1728,13 +1728,13 @@ var require_symlink_paths = __commonJS({
|
|
|
1728
1728
|
var require_symlink_type = __commonJS({
|
|
1729
1729
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module) {
|
|
1730
1730
|
"use strict";
|
|
1731
|
-
var
|
|
1731
|
+
var fs3 = require_fs();
|
|
1732
1732
|
var u = require_universalify().fromPromise;
|
|
1733
1733
|
async function symlinkType(srcpath, type) {
|
|
1734
1734
|
if (type) return type;
|
|
1735
1735
|
let stats;
|
|
1736
1736
|
try {
|
|
1737
|
-
stats = await
|
|
1737
|
+
stats = await fs3.lstat(srcpath);
|
|
1738
1738
|
} catch {
|
|
1739
1739
|
return "file";
|
|
1740
1740
|
}
|
|
@@ -1744,7 +1744,7 @@ var require_symlink_type = __commonJS({
|
|
|
1744
1744
|
if (type) return type;
|
|
1745
1745
|
let stats;
|
|
1746
1746
|
try {
|
|
1747
|
-
stats =
|
|
1747
|
+
stats = fs3.lstatSync(srcpath);
|
|
1748
1748
|
} catch {
|
|
1749
1749
|
return "file";
|
|
1750
1750
|
}
|
|
@@ -1762,8 +1762,8 @@ var require_symlink = __commonJS({
|
|
|
1762
1762
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module) {
|
|
1763
1763
|
"use strict";
|
|
1764
1764
|
var u = require_universalify().fromPromise;
|
|
1765
|
-
var
|
|
1766
|
-
var
|
|
1765
|
+
var path3 = __require("path");
|
|
1766
|
+
var fs3 = require_fs();
|
|
1767
1767
|
var { mkdirs, mkdirsSync } = require_mkdirs();
|
|
1768
1768
|
var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
|
|
1769
1769
|
var { symlinkType, symlinkTypeSync } = require_symlink_type();
|
|
@@ -1772,44 +1772,44 @@ var require_symlink = __commonJS({
|
|
|
1772
1772
|
async function createSymlink(srcpath, dstpath, type) {
|
|
1773
1773
|
let stats;
|
|
1774
1774
|
try {
|
|
1775
|
-
stats = await
|
|
1775
|
+
stats = await fs3.lstat(dstpath);
|
|
1776
1776
|
} catch {
|
|
1777
1777
|
}
|
|
1778
1778
|
if (stats && stats.isSymbolicLink()) {
|
|
1779
1779
|
const [srcStat, dstStat] = await Promise.all([
|
|
1780
|
-
|
|
1781
|
-
|
|
1780
|
+
fs3.stat(srcpath),
|
|
1781
|
+
fs3.stat(dstpath)
|
|
1782
1782
|
]);
|
|
1783
1783
|
if (areIdentical(srcStat, dstStat)) return;
|
|
1784
1784
|
}
|
|
1785
1785
|
const relative = await symlinkPaths(srcpath, dstpath);
|
|
1786
1786
|
srcpath = relative.toDst;
|
|
1787
1787
|
const toType = await symlinkType(relative.toCwd, type);
|
|
1788
|
-
const dir =
|
|
1788
|
+
const dir = path3.dirname(dstpath);
|
|
1789
1789
|
if (!await pathExists(dir)) {
|
|
1790
1790
|
await mkdirs(dir);
|
|
1791
1791
|
}
|
|
1792
|
-
return
|
|
1792
|
+
return fs3.symlink(srcpath, dstpath, toType);
|
|
1793
1793
|
}
|
|
1794
1794
|
function createSymlinkSync(srcpath, dstpath, type) {
|
|
1795
1795
|
let stats;
|
|
1796
1796
|
try {
|
|
1797
|
-
stats =
|
|
1797
|
+
stats = fs3.lstatSync(dstpath);
|
|
1798
1798
|
} catch {
|
|
1799
1799
|
}
|
|
1800
1800
|
if (stats && stats.isSymbolicLink()) {
|
|
1801
|
-
const srcStat =
|
|
1802
|
-
const dstStat =
|
|
1801
|
+
const srcStat = fs3.statSync(srcpath);
|
|
1802
|
+
const dstStat = fs3.statSync(dstpath);
|
|
1803
1803
|
if (areIdentical(srcStat, dstStat)) return;
|
|
1804
1804
|
}
|
|
1805
1805
|
const relative = symlinkPathsSync(srcpath, dstpath);
|
|
1806
1806
|
srcpath = relative.toDst;
|
|
1807
1807
|
type = symlinkTypeSync(relative.toCwd, type);
|
|
1808
|
-
const dir =
|
|
1809
|
-
const exists2 =
|
|
1810
|
-
if (exists2) return
|
|
1808
|
+
const dir = path3.dirname(dstpath);
|
|
1809
|
+
const exists2 = fs3.existsSync(dir);
|
|
1810
|
+
if (exists2) return fs3.symlinkSync(srcpath, dstpath, type);
|
|
1811
1811
|
mkdirsSync(dir);
|
|
1812
|
-
return
|
|
1812
|
+
return fs3.symlinkSync(srcpath, dstpath, type);
|
|
1813
1813
|
}
|
|
1814
1814
|
module.exports = {
|
|
1815
1815
|
createSymlink: u(createSymlink),
|
|
@@ -1878,9 +1878,9 @@ var require_jsonfile = __commonJS({
|
|
|
1878
1878
|
if (typeof options === "string") {
|
|
1879
1879
|
options = { encoding: options };
|
|
1880
1880
|
}
|
|
1881
|
-
const
|
|
1881
|
+
const fs3 = options.fs || _fs;
|
|
1882
1882
|
const shouldThrow = "throws" in options ? options.throws : true;
|
|
1883
|
-
let data = await universalify.fromCallback(
|
|
1883
|
+
let data = await universalify.fromCallback(fs3.readFile)(file, options);
|
|
1884
1884
|
data = stripBom(data);
|
|
1885
1885
|
let obj;
|
|
1886
1886
|
try {
|
|
@@ -1900,10 +1900,10 @@ var require_jsonfile = __commonJS({
|
|
|
1900
1900
|
if (typeof options === "string") {
|
|
1901
1901
|
options = { encoding: options };
|
|
1902
1902
|
}
|
|
1903
|
-
const
|
|
1903
|
+
const fs3 = options.fs || _fs;
|
|
1904
1904
|
const shouldThrow = "throws" in options ? options.throws : true;
|
|
1905
1905
|
try {
|
|
1906
|
-
let content =
|
|
1906
|
+
let content = fs3.readFileSync(file, options);
|
|
1907
1907
|
content = stripBom(content);
|
|
1908
1908
|
return JSON.parse(content, options.reviver);
|
|
1909
1909
|
} catch (err) {
|
|
@@ -1916,15 +1916,15 @@ var require_jsonfile = __commonJS({
|
|
|
1916
1916
|
}
|
|
1917
1917
|
}
|
|
1918
1918
|
async function _writeFile(file, obj, options = {}) {
|
|
1919
|
-
const
|
|
1919
|
+
const fs3 = options.fs || _fs;
|
|
1920
1920
|
const str = stringify2(obj, options);
|
|
1921
|
-
await universalify.fromCallback(
|
|
1921
|
+
await universalify.fromCallback(fs3.writeFile)(file, str, options);
|
|
1922
1922
|
}
|
|
1923
1923
|
var writeFile = universalify.fromPromise(_writeFile);
|
|
1924
1924
|
function writeFileSync(file, obj, options = {}) {
|
|
1925
|
-
const
|
|
1925
|
+
const fs3 = options.fs || _fs;
|
|
1926
1926
|
const str = stringify2(obj, options);
|
|
1927
|
-
return
|
|
1927
|
+
return fs3.writeFileSync(file, str, options);
|
|
1928
1928
|
}
|
|
1929
1929
|
var jsonfile = {
|
|
1930
1930
|
readFile,
|
|
@@ -1956,23 +1956,23 @@ var require_output_file = __commonJS({
|
|
|
1956
1956
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/output-file/index.js"(exports, module) {
|
|
1957
1957
|
"use strict";
|
|
1958
1958
|
var u = require_universalify().fromPromise;
|
|
1959
|
-
var
|
|
1960
|
-
var
|
|
1959
|
+
var fs3 = require_fs();
|
|
1960
|
+
var path3 = __require("path");
|
|
1961
1961
|
var mkdir = require_mkdirs();
|
|
1962
1962
|
var pathExists = require_path_exists().pathExists;
|
|
1963
1963
|
async function outputFile(file, data, encoding = "utf-8") {
|
|
1964
|
-
const dir =
|
|
1964
|
+
const dir = path3.dirname(file);
|
|
1965
1965
|
if (!await pathExists(dir)) {
|
|
1966
1966
|
await mkdir.mkdirs(dir);
|
|
1967
1967
|
}
|
|
1968
|
-
return
|
|
1968
|
+
return fs3.writeFile(file, data, encoding);
|
|
1969
1969
|
}
|
|
1970
1970
|
function outputFileSync(file, ...args) {
|
|
1971
|
-
const dir =
|
|
1972
|
-
if (!
|
|
1971
|
+
const dir = path3.dirname(file);
|
|
1972
|
+
if (!fs3.existsSync(dir)) {
|
|
1973
1973
|
mkdir.mkdirsSync(dir);
|
|
1974
1974
|
}
|
|
1975
|
-
|
|
1975
|
+
fs3.writeFileSync(file, ...args);
|
|
1976
1976
|
}
|
|
1977
1977
|
module.exports = {
|
|
1978
1978
|
outputFile: u(outputFile),
|
|
@@ -2031,8 +2031,8 @@ var require_json = __commonJS({
|
|
|
2031
2031
|
var require_move = __commonJS({
|
|
2032
2032
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move.js"(exports, module) {
|
|
2033
2033
|
"use strict";
|
|
2034
|
-
var
|
|
2035
|
-
var
|
|
2034
|
+
var fs3 = require_fs();
|
|
2035
|
+
var path3 = __require("path");
|
|
2036
2036
|
var { copy: copy4 } = require_copy2();
|
|
2037
2037
|
var { remove } = require_remove();
|
|
2038
2038
|
var { mkdirp } = require_mkdirs();
|
|
@@ -2042,8 +2042,8 @@ var require_move = __commonJS({
|
|
|
2042
2042
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
2043
2043
|
const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
|
|
2044
2044
|
await stat.checkParentPaths(src, srcStat, dest, "move");
|
|
2045
|
-
const destParent =
|
|
2046
|
-
const parsedParentPath =
|
|
2045
|
+
const destParent = path3.dirname(dest);
|
|
2046
|
+
const parsedParentPath = path3.parse(destParent);
|
|
2047
2047
|
if (parsedParentPath.root !== destParent) {
|
|
2048
2048
|
await mkdirp(destParent);
|
|
2049
2049
|
}
|
|
@@ -2058,7 +2058,7 @@ var require_move = __commonJS({
|
|
|
2058
2058
|
}
|
|
2059
2059
|
}
|
|
2060
2060
|
try {
|
|
2061
|
-
await
|
|
2061
|
+
await fs3.rename(src, dest);
|
|
2062
2062
|
} catch (err) {
|
|
2063
2063
|
if (err.code !== "EXDEV") {
|
|
2064
2064
|
throw err;
|
|
@@ -2083,8 +2083,8 @@ var require_move = __commonJS({
|
|
|
2083
2083
|
var require_move_sync = __commonJS({
|
|
2084
2084
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move-sync.js"(exports, module) {
|
|
2085
2085
|
"use strict";
|
|
2086
|
-
var
|
|
2087
|
-
var
|
|
2086
|
+
var fs3 = require_graceful_fs();
|
|
2087
|
+
var path3 = __require("path");
|
|
2088
2088
|
var copySync = require_copy2().copySync;
|
|
2089
2089
|
var removeSync = require_remove().removeSync;
|
|
2090
2090
|
var mkdirpSync = require_mkdirs().mkdirpSync;
|
|
@@ -2094,12 +2094,12 @@ var require_move_sync = __commonJS({
|
|
|
2094
2094
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
2095
2095
|
const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
|
|
2096
2096
|
stat.checkParentPathsSync(src, srcStat, dest, "move");
|
|
2097
|
-
if (!isParentRoot(dest)) mkdirpSync(
|
|
2097
|
+
if (!isParentRoot(dest)) mkdirpSync(path3.dirname(dest));
|
|
2098
2098
|
return doRename(src, dest, overwrite, isChangingCase);
|
|
2099
2099
|
}
|
|
2100
2100
|
function isParentRoot(dest) {
|
|
2101
|
-
const parent =
|
|
2102
|
-
const parsedPath =
|
|
2101
|
+
const parent = path3.dirname(dest);
|
|
2102
|
+
const parsedPath = path3.parse(parent);
|
|
2103
2103
|
return parsedPath.root === parent;
|
|
2104
2104
|
}
|
|
2105
2105
|
function doRename(src, dest, overwrite, isChangingCase) {
|
|
@@ -2108,12 +2108,12 @@ var require_move_sync = __commonJS({
|
|
|
2108
2108
|
removeSync(dest);
|
|
2109
2109
|
return rename(src, dest, overwrite);
|
|
2110
2110
|
}
|
|
2111
|
-
if (
|
|
2111
|
+
if (fs3.existsSync(dest)) throw new Error("dest already exists.");
|
|
2112
2112
|
return rename(src, dest, overwrite);
|
|
2113
2113
|
}
|
|
2114
2114
|
function rename(src, dest, overwrite) {
|
|
2115
2115
|
try {
|
|
2116
|
-
|
|
2116
|
+
fs3.renameSync(src, dest);
|
|
2117
2117
|
} catch (err) {
|
|
2118
2118
|
if (err.code !== "EXDEV") throw err;
|
|
2119
2119
|
return moveAcrossDevice(src, dest, overwrite);
|
|
@@ -2385,9 +2385,9 @@ var require_ClientError = __commonJS({
|
|
|
2385
2385
|
var ts_error_1 = (init_es(), __toCommonJS(es_exports));
|
|
2386
2386
|
var Status_1 = require_Status();
|
|
2387
2387
|
var ClientError = class _ClientError extends ts_error_1.ExtendableError {
|
|
2388
|
-
constructor(
|
|
2389
|
-
super(`${
|
|
2390
|
-
this.path =
|
|
2388
|
+
constructor(path3, code, details) {
|
|
2389
|
+
super(`${path3} ${Status_1.Status[code]}: ${details}`);
|
|
2390
|
+
this.path = path3;
|
|
2391
2391
|
this.code = code;
|
|
2392
2392
|
this.details = details;
|
|
2393
2393
|
this.name = "ClientError";
|
|
@@ -3134,14 +3134,14 @@ var require_tls_helpers = __commonJS({
|
|
|
3134
3134
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3135
3135
|
exports.CIPHER_SUITES = void 0;
|
|
3136
3136
|
exports.getDefaultRootsData = getDefaultRootsData;
|
|
3137
|
-
var
|
|
3137
|
+
var fs3 = __require("fs");
|
|
3138
3138
|
exports.CIPHER_SUITES = process.env.GRPC_SSL_CIPHER_SUITES;
|
|
3139
3139
|
var DEFAULT_ROOTS_FILE_PATH = process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH;
|
|
3140
3140
|
var defaultRootsData = null;
|
|
3141
3141
|
function getDefaultRootsData() {
|
|
3142
3142
|
if (DEFAULT_ROOTS_FILE_PATH) {
|
|
3143
3143
|
if (defaultRootsData === null) {
|
|
3144
|
-
defaultRootsData =
|
|
3144
|
+
defaultRootsData = fs3.readFileSync(DEFAULT_ROOTS_FILE_PATH);
|
|
3145
3145
|
}
|
|
3146
3146
|
return defaultRootsData;
|
|
3147
3147
|
}
|
|
@@ -3172,19 +3172,19 @@ var require_uri_parser = __commonJS({
|
|
|
3172
3172
|
};
|
|
3173
3173
|
}
|
|
3174
3174
|
var NUMBER_REGEX = /^\d+$/;
|
|
3175
|
-
function splitHostPort(
|
|
3176
|
-
if (
|
|
3177
|
-
const hostEnd =
|
|
3175
|
+
function splitHostPort(path3) {
|
|
3176
|
+
if (path3.startsWith("[")) {
|
|
3177
|
+
const hostEnd = path3.indexOf("]");
|
|
3178
3178
|
if (hostEnd === -1) {
|
|
3179
3179
|
return null;
|
|
3180
3180
|
}
|
|
3181
|
-
const host =
|
|
3181
|
+
const host = path3.substring(1, hostEnd);
|
|
3182
3182
|
if (host.indexOf(":") === -1) {
|
|
3183
3183
|
return null;
|
|
3184
3184
|
}
|
|
3185
|
-
if (
|
|
3186
|
-
if (
|
|
3187
|
-
const portString =
|
|
3185
|
+
if (path3.length > hostEnd + 1) {
|
|
3186
|
+
if (path3[hostEnd + 1] === ":") {
|
|
3187
|
+
const portString = path3.substring(hostEnd + 2);
|
|
3188
3188
|
if (NUMBER_REGEX.test(portString)) {
|
|
3189
3189
|
return {
|
|
3190
3190
|
host,
|
|
@@ -3202,7 +3202,7 @@ var require_uri_parser = __commonJS({
|
|
|
3202
3202
|
};
|
|
3203
3203
|
}
|
|
3204
3204
|
} else {
|
|
3205
|
-
const splitPath =
|
|
3205
|
+
const splitPath = path3.split(":");
|
|
3206
3206
|
if (splitPath.length === 2) {
|
|
3207
3207
|
if (NUMBER_REGEX.test(splitPath[1])) {
|
|
3208
3208
|
return {
|
|
@@ -3214,7 +3214,7 @@ var require_uri_parser = __commonJS({
|
|
|
3214
3214
|
}
|
|
3215
3215
|
} else {
|
|
3216
3216
|
return {
|
|
3217
|
-
host:
|
|
3217
|
+
host: path3
|
|
3218
3218
|
};
|
|
3219
3219
|
}
|
|
3220
3220
|
}
|
|
@@ -6347,14 +6347,14 @@ var require_client_interceptors = __commonJS({
|
|
|
6347
6347
|
}
|
|
6348
6348
|
};
|
|
6349
6349
|
exports.InterceptingCall = InterceptingCall;
|
|
6350
|
-
function getCall(channel,
|
|
6350
|
+
function getCall(channel, path3, options) {
|
|
6351
6351
|
var _a, _b;
|
|
6352
6352
|
const deadline = (_a = options.deadline) !== null && _a !== void 0 ? _a : Infinity;
|
|
6353
6353
|
const host = options.host;
|
|
6354
6354
|
const parent = (_b = options.parent) !== null && _b !== void 0 ? _b : null;
|
|
6355
6355
|
const propagateFlags = options.propagate_flags;
|
|
6356
6356
|
const credentials = options.credentials;
|
|
6357
|
-
const call = channel.createCall(
|
|
6357
|
+
const call = channel.createCall(path3, deadline, host, parent, propagateFlags);
|
|
6358
6358
|
if (credentials) {
|
|
6359
6359
|
call.setCredentials(credentials);
|
|
6360
6360
|
}
|
|
@@ -6921,9 +6921,9 @@ var require_make_client = __commonJS({
|
|
|
6921
6921
|
ServiceClientImpl.serviceName = serviceName;
|
|
6922
6922
|
return ServiceClientImpl;
|
|
6923
6923
|
}
|
|
6924
|
-
function partial(fn,
|
|
6924
|
+
function partial(fn, path3, serialize, deserialize) {
|
|
6925
6925
|
return function(...args) {
|
|
6926
|
-
return fn.call(this,
|
|
6926
|
+
return fn.call(this, path3, serialize, deserialize, ...args);
|
|
6927
6927
|
};
|
|
6928
6928
|
}
|
|
6929
6929
|
function isProtobufTypeDefinition(obj) {
|
|
@@ -7403,7 +7403,7 @@ var require_fetch = __commonJS({
|
|
|
7403
7403
|
module.exports = fetch;
|
|
7404
7404
|
var asPromise = require_aspromise();
|
|
7405
7405
|
var inquire = require_inquire();
|
|
7406
|
-
var
|
|
7406
|
+
var fs3 = inquire("fs");
|
|
7407
7407
|
function fetch(filename, options, callback) {
|
|
7408
7408
|
if (typeof options === "function") {
|
|
7409
7409
|
callback = options;
|
|
@@ -7412,8 +7412,8 @@ var require_fetch = __commonJS({
|
|
|
7412
7412
|
options = {};
|
|
7413
7413
|
if (!callback)
|
|
7414
7414
|
return asPromise(fetch, this, filename, options);
|
|
7415
|
-
if (!options.xhr &&
|
|
7416
|
-
return
|
|
7415
|
+
if (!options.xhr && fs3 && fs3.readFile)
|
|
7416
|
+
return fs3.readFile(filename, function fetchReadFileCallback(err, contents) {
|
|
7417
7417
|
return err && typeof XMLHttpRequest !== "undefined" ? fetch.xhr(filename, options, callback) : err ? callback(err) : callback(null, options.binary ? contents : contents.toString("utf8"));
|
|
7418
7418
|
});
|
|
7419
7419
|
return fetch.xhr(filename, options, callback);
|
|
@@ -7451,15 +7451,15 @@ var require_fetch = __commonJS({
|
|
|
7451
7451
|
var require_path = __commonJS({
|
|
7452
7452
|
"../../node_modules/.pnpm/@protobufjs+path@1.1.2/node_modules/@protobufjs/path/index.js"(exports) {
|
|
7453
7453
|
"use strict";
|
|
7454
|
-
var
|
|
7454
|
+
var path3 = exports;
|
|
7455
7455
|
var isAbsolute = (
|
|
7456
7456
|
/**
|
|
7457
7457
|
* Tests if the specified path is absolute.
|
|
7458
7458
|
* @param {string} path Path to test
|
|
7459
7459
|
* @returns {boolean} `true` if path is absolute
|
|
7460
7460
|
*/
|
|
7461
|
-
|
|
7462
|
-
return /^(?:\/|\w+:)/.test(
|
|
7461
|
+
path3.isAbsolute = function isAbsolute2(path4) {
|
|
7462
|
+
return /^(?:\/|\w+:)/.test(path4);
|
|
7463
7463
|
}
|
|
7464
7464
|
);
|
|
7465
7465
|
var normalize = (
|
|
@@ -7468,9 +7468,9 @@ var require_path = __commonJS({
|
|
|
7468
7468
|
* @param {string} path Path to normalize
|
|
7469
7469
|
* @returns {string} Normalized path
|
|
7470
7470
|
*/
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
var parts =
|
|
7471
|
+
path3.normalize = function normalize2(path4) {
|
|
7472
|
+
path4 = path4.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
|
|
7473
|
+
var parts = path4.split("/"), absolute = isAbsolute(path4), prefix = "";
|
|
7474
7474
|
if (absolute)
|
|
7475
7475
|
prefix = parts.shift() + "/";
|
|
7476
7476
|
for (var i = 0; i < parts.length; ) {
|
|
@@ -7489,7 +7489,7 @@ var require_path = __commonJS({
|
|
|
7489
7489
|
return prefix + parts.join("/");
|
|
7490
7490
|
}
|
|
7491
7491
|
);
|
|
7492
|
-
|
|
7492
|
+
path3.resolve = function resolve(originPath, includePath, alreadyNormalized) {
|
|
7493
7493
|
if (!alreadyNormalized)
|
|
7494
7494
|
includePath = normalize(includePath);
|
|
7495
7495
|
if (isAbsolute(includePath))
|
|
@@ -7640,16 +7640,16 @@ var require_namespace = __commonJS({
|
|
|
7640
7640
|
object2.onRemove(this);
|
|
7641
7641
|
return clearCache(this);
|
|
7642
7642
|
};
|
|
7643
|
-
Namespace.prototype.define = function define2(
|
|
7644
|
-
if (util.isString(
|
|
7645
|
-
|
|
7646
|
-
else if (!Array.isArray(
|
|
7643
|
+
Namespace.prototype.define = function define2(path3, json) {
|
|
7644
|
+
if (util.isString(path3))
|
|
7645
|
+
path3 = path3.split(".");
|
|
7646
|
+
else if (!Array.isArray(path3))
|
|
7647
7647
|
throw TypeError("illegal path");
|
|
7648
|
-
if (
|
|
7648
|
+
if (path3 && path3.length && path3[0] === "")
|
|
7649
7649
|
throw Error("path must be relative");
|
|
7650
7650
|
var ptr = this;
|
|
7651
|
-
while (
|
|
7652
|
-
var part =
|
|
7651
|
+
while (path3.length > 0) {
|
|
7652
|
+
var part = path3.shift();
|
|
7653
7653
|
if (ptr.nested && ptr.nested[part]) {
|
|
7654
7654
|
ptr = ptr.nested[part];
|
|
7655
7655
|
if (!(ptr instanceof Namespace))
|
|
@@ -7684,26 +7684,26 @@ var require_namespace = __commonJS({
|
|
|
7684
7684
|
});
|
|
7685
7685
|
return this;
|
|
7686
7686
|
};
|
|
7687
|
-
Namespace.prototype.lookup = function lookup(
|
|
7687
|
+
Namespace.prototype.lookup = function lookup(path3, filterTypes, parentAlreadyChecked) {
|
|
7688
7688
|
if (typeof filterTypes === "boolean") {
|
|
7689
7689
|
parentAlreadyChecked = filterTypes;
|
|
7690
7690
|
filterTypes = void 0;
|
|
7691
7691
|
} else if (filterTypes && !Array.isArray(filterTypes))
|
|
7692
7692
|
filterTypes = [filterTypes];
|
|
7693
|
-
if (util.isString(
|
|
7694
|
-
if (
|
|
7693
|
+
if (util.isString(path3) && path3.length) {
|
|
7694
|
+
if (path3 === ".")
|
|
7695
7695
|
return this.root;
|
|
7696
|
-
|
|
7697
|
-
} else if (!
|
|
7696
|
+
path3 = path3.split(".");
|
|
7697
|
+
} else if (!path3.length)
|
|
7698
7698
|
return this;
|
|
7699
|
-
var flatPath =
|
|
7700
|
-
if (
|
|
7701
|
-
return this.root.lookup(
|
|
7699
|
+
var flatPath = path3.join(".");
|
|
7700
|
+
if (path3[0] === "")
|
|
7701
|
+
return this.root.lookup(path3.slice(1), filterTypes);
|
|
7702
7702
|
var found = this.root._fullyQualifiedObjects && this.root._fullyQualifiedObjects["." + flatPath];
|
|
7703
7703
|
if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {
|
|
7704
7704
|
return found;
|
|
7705
7705
|
}
|
|
7706
|
-
found = this._lookupImpl(
|
|
7706
|
+
found = this._lookupImpl(path3, flatPath);
|
|
7707
7707
|
if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {
|
|
7708
7708
|
return found;
|
|
7709
7709
|
}
|
|
@@ -7711,7 +7711,7 @@ var require_namespace = __commonJS({
|
|
|
7711
7711
|
return null;
|
|
7712
7712
|
var current = this;
|
|
7713
7713
|
while (current.parent) {
|
|
7714
|
-
found = current.parent._lookupImpl(
|
|
7714
|
+
found = current.parent._lookupImpl(path3, flatPath);
|
|
7715
7715
|
if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {
|
|
7716
7716
|
return found;
|
|
7717
7717
|
}
|
|
@@ -7719,49 +7719,49 @@ var require_namespace = __commonJS({
|
|
|
7719
7719
|
}
|
|
7720
7720
|
return null;
|
|
7721
7721
|
};
|
|
7722
|
-
Namespace.prototype._lookupImpl = function lookup(
|
|
7722
|
+
Namespace.prototype._lookupImpl = function lookup(path3, flatPath) {
|
|
7723
7723
|
if (Object.prototype.hasOwnProperty.call(this._lookupCache, flatPath)) {
|
|
7724
7724
|
return this._lookupCache[flatPath];
|
|
7725
7725
|
}
|
|
7726
|
-
var found = this.get(
|
|
7726
|
+
var found = this.get(path3[0]);
|
|
7727
7727
|
var exact = null;
|
|
7728
7728
|
if (found) {
|
|
7729
|
-
if (
|
|
7729
|
+
if (path3.length === 1) {
|
|
7730
7730
|
exact = found;
|
|
7731
7731
|
} else if (found instanceof Namespace) {
|
|
7732
|
-
|
|
7733
|
-
exact = found._lookupImpl(
|
|
7732
|
+
path3 = path3.slice(1);
|
|
7733
|
+
exact = found._lookupImpl(path3, path3.join("."));
|
|
7734
7734
|
}
|
|
7735
7735
|
} else {
|
|
7736
7736
|
for (var i = 0; i < this.nestedArray.length; ++i)
|
|
7737
|
-
if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(
|
|
7737
|
+
if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(path3, flatPath)))
|
|
7738
7738
|
exact = found;
|
|
7739
7739
|
}
|
|
7740
7740
|
this._lookupCache[flatPath] = exact;
|
|
7741
7741
|
return exact;
|
|
7742
7742
|
};
|
|
7743
|
-
Namespace.prototype.lookupType = function lookupType(
|
|
7744
|
-
var found = this.lookup(
|
|
7743
|
+
Namespace.prototype.lookupType = function lookupType(path3) {
|
|
7744
|
+
var found = this.lookup(path3, [Type]);
|
|
7745
7745
|
if (!found)
|
|
7746
|
-
throw Error("no such type: " +
|
|
7746
|
+
throw Error("no such type: " + path3);
|
|
7747
7747
|
return found;
|
|
7748
7748
|
};
|
|
7749
|
-
Namespace.prototype.lookupEnum = function lookupEnum(
|
|
7750
|
-
var found = this.lookup(
|
|
7749
|
+
Namespace.prototype.lookupEnum = function lookupEnum(path3) {
|
|
7750
|
+
var found = this.lookup(path3, [Enum]);
|
|
7751
7751
|
if (!found)
|
|
7752
|
-
throw Error("no such Enum '" +
|
|
7752
|
+
throw Error("no such Enum '" + path3 + "' in " + this);
|
|
7753
7753
|
return found;
|
|
7754
7754
|
};
|
|
7755
|
-
Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(
|
|
7756
|
-
var found = this.lookup(
|
|
7755
|
+
Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path3) {
|
|
7756
|
+
var found = this.lookup(path3, [Type, Enum]);
|
|
7757
7757
|
if (!found)
|
|
7758
|
-
throw Error("no such Type or Enum '" +
|
|
7758
|
+
throw Error("no such Type or Enum '" + path3 + "' in " + this);
|
|
7759
7759
|
return found;
|
|
7760
7760
|
};
|
|
7761
|
-
Namespace.prototype.lookupService = function lookupService(
|
|
7762
|
-
var found = this.lookup(
|
|
7761
|
+
Namespace.prototype.lookupService = function lookupService(path3) {
|
|
7762
|
+
var found = this.lookup(path3, [Service]);
|
|
7763
7763
|
if (!found)
|
|
7764
|
-
throw Error("no such Service '" +
|
|
7764
|
+
throw Error("no such Service '" + path3 + "' in " + this);
|
|
7765
7765
|
return found;
|
|
7766
7766
|
};
|
|
7767
7767
|
Namespace._configure = function(Type_, Service_, Enum_) {
|
|
@@ -9124,14 +9124,14 @@ var require_util = __commonJS({
|
|
|
9124
9124
|
Object.defineProperty(object2, "$type", { value: enm, enumerable: false });
|
|
9125
9125
|
return enm;
|
|
9126
9126
|
};
|
|
9127
|
-
util.setProperty = function setProperty(dst,
|
|
9128
|
-
function setProp(dst2,
|
|
9129
|
-
var part =
|
|
9127
|
+
util.setProperty = function setProperty(dst, path3, value, ifNotSet) {
|
|
9128
|
+
function setProp(dst2, path4, value2) {
|
|
9129
|
+
var part = path4.shift();
|
|
9130
9130
|
if (part === "__proto__" || part === "prototype") {
|
|
9131
9131
|
return dst2;
|
|
9132
9132
|
}
|
|
9133
|
-
if (
|
|
9134
|
-
dst2[part] = setProp(dst2[part] || {},
|
|
9133
|
+
if (path4.length > 0) {
|
|
9134
|
+
dst2[part] = setProp(dst2[part] || {}, path4, value2);
|
|
9135
9135
|
} else {
|
|
9136
9136
|
var prevValue = dst2[part];
|
|
9137
9137
|
if (prevValue && ifNotSet)
|
|
@@ -9144,10 +9144,10 @@ var require_util = __commonJS({
|
|
|
9144
9144
|
}
|
|
9145
9145
|
if (typeof dst !== "object")
|
|
9146
9146
|
throw TypeError("dst must be an object");
|
|
9147
|
-
if (!
|
|
9147
|
+
if (!path3)
|
|
9148
9148
|
throw TypeError("path must be specified");
|
|
9149
|
-
|
|
9150
|
-
return setProp(dst,
|
|
9149
|
+
path3 = path3.split(".");
|
|
9150
|
+
return setProp(dst, path3, value);
|
|
9151
9151
|
};
|
|
9152
9152
|
Object.defineProperty(util, "decorateRoot", {
|
|
9153
9153
|
get: function() {
|
|
@@ -9693,12 +9693,12 @@ var require_object = __commonJS({
|
|
|
9693
9693
|
*/
|
|
9694
9694
|
fullName: {
|
|
9695
9695
|
get: function() {
|
|
9696
|
-
var
|
|
9696
|
+
var path3 = [this.name], ptr = this.parent;
|
|
9697
9697
|
while (ptr) {
|
|
9698
|
-
|
|
9698
|
+
path3.unshift(ptr.name);
|
|
9699
9699
|
ptr = ptr.parent;
|
|
9700
9700
|
}
|
|
9701
|
-
return
|
|
9701
|
+
return path3.join(".");
|
|
9702
9702
|
}
|
|
9703
9703
|
}
|
|
9704
9704
|
});
|
|
@@ -13687,19 +13687,19 @@ var require_util2 = __commonJS({
|
|
|
13687
13687
|
"use strict";
|
|
13688
13688
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13689
13689
|
exports.addCommonProtos = exports.loadProtosWithOptionsSync = exports.loadProtosWithOptions = void 0;
|
|
13690
|
-
var
|
|
13691
|
-
var
|
|
13690
|
+
var fs3 = __require("fs");
|
|
13691
|
+
var path3 = __require("path");
|
|
13692
13692
|
var Protobuf = require_protobufjs();
|
|
13693
13693
|
function addIncludePathResolver(root, includePaths) {
|
|
13694
13694
|
const originalResolvePath = root.resolvePath;
|
|
13695
13695
|
root.resolvePath = (origin, target) => {
|
|
13696
|
-
if (
|
|
13696
|
+
if (path3.isAbsolute(target)) {
|
|
13697
13697
|
return target;
|
|
13698
13698
|
}
|
|
13699
13699
|
for (const directory of includePaths) {
|
|
13700
|
-
const fullPath =
|
|
13700
|
+
const fullPath = path3.join(directory, target);
|
|
13701
13701
|
try {
|
|
13702
|
-
|
|
13702
|
+
fs3.accessSync(fullPath, fs3.constants.R_OK);
|
|
13703
13703
|
return fullPath;
|
|
13704
13704
|
} catch (err) {
|
|
13705
13705
|
continue;
|
|
@@ -19211,9 +19211,9 @@ var require_server_call = __commonJS({
|
|
|
19211
19211
|
return status;
|
|
19212
19212
|
}
|
|
19213
19213
|
var ServerUnaryCallImpl = class extends events_1.EventEmitter {
|
|
19214
|
-
constructor(
|
|
19214
|
+
constructor(path3, call, metadata, request) {
|
|
19215
19215
|
super();
|
|
19216
|
-
this.path =
|
|
19216
|
+
this.path = path3;
|
|
19217
19217
|
this.call = call;
|
|
19218
19218
|
this.metadata = metadata;
|
|
19219
19219
|
this.request = request;
|
|
@@ -19237,9 +19237,9 @@ var require_server_call = __commonJS({
|
|
|
19237
19237
|
};
|
|
19238
19238
|
exports.ServerUnaryCallImpl = ServerUnaryCallImpl;
|
|
19239
19239
|
var ServerReadableStreamImpl = class extends stream_1.Readable {
|
|
19240
|
-
constructor(
|
|
19240
|
+
constructor(path3, call, metadata) {
|
|
19241
19241
|
super({ objectMode: true });
|
|
19242
|
-
this.path =
|
|
19242
|
+
this.path = path3;
|
|
19243
19243
|
this.call = call;
|
|
19244
19244
|
this.metadata = metadata;
|
|
19245
19245
|
this.cancelled = false;
|
|
@@ -19265,9 +19265,9 @@ var require_server_call = __commonJS({
|
|
|
19265
19265
|
};
|
|
19266
19266
|
exports.ServerReadableStreamImpl = ServerReadableStreamImpl;
|
|
19267
19267
|
var ServerWritableStreamImpl = class extends stream_1.Writable {
|
|
19268
|
-
constructor(
|
|
19268
|
+
constructor(path3, call, metadata, request) {
|
|
19269
19269
|
super({ objectMode: true });
|
|
19270
|
-
this.path =
|
|
19270
|
+
this.path = path3;
|
|
19271
19271
|
this.call = call;
|
|
19272
19272
|
this.metadata = metadata;
|
|
19273
19273
|
this.request = request;
|
|
@@ -19315,9 +19315,9 @@ var require_server_call = __commonJS({
|
|
|
19315
19315
|
};
|
|
19316
19316
|
exports.ServerWritableStreamImpl = ServerWritableStreamImpl;
|
|
19317
19317
|
var ServerDuplexStreamImpl = class extends stream_1.Duplex {
|
|
19318
|
-
constructor(
|
|
19318
|
+
constructor(path3, call, metadata) {
|
|
19319
19319
|
super({ objectMode: true });
|
|
19320
|
-
this.path =
|
|
19320
|
+
this.path = path3;
|
|
19321
19321
|
this.call = call;
|
|
19322
19322
|
this.metadata = metadata;
|
|
19323
19323
|
this.pendingStatus = {
|
|
@@ -21187,11 +21187,11 @@ var require_server = __commonJS({
|
|
|
21187
21187
|
}
|
|
21188
21188
|
return true;
|
|
21189
21189
|
}
|
|
21190
|
-
_retrieveHandler(
|
|
21191
|
-
serverCallTrace("Received call to method " +
|
|
21192
|
-
const handler = this.handlers.get(
|
|
21190
|
+
_retrieveHandler(path3) {
|
|
21191
|
+
serverCallTrace("Received call to method " + path3 + " at address " + this.serverAddressString);
|
|
21192
|
+
const handler = this.handlers.get(path3);
|
|
21193
21193
|
if (handler === void 0) {
|
|
21194
|
-
serverCallTrace("No handler registered for method " +
|
|
21194
|
+
serverCallTrace("No handler registered for method " + path3 + ". Sending UNIMPLEMENTED status.");
|
|
21195
21195
|
return null;
|
|
21196
21196
|
}
|
|
21197
21197
|
return handler;
|
|
@@ -21213,10 +21213,10 @@ var require_server = __commonJS({
|
|
|
21213
21213
|
channelzSessionInfo === null || channelzSessionInfo === void 0 ? void 0 : channelzSessionInfo.streamTracker.addCallFailed();
|
|
21214
21214
|
return;
|
|
21215
21215
|
}
|
|
21216
|
-
const
|
|
21217
|
-
const handler = this._retrieveHandler(
|
|
21216
|
+
const path3 = headers[HTTP2_HEADER_PATH];
|
|
21217
|
+
const handler = this._retrieveHandler(path3);
|
|
21218
21218
|
if (!handler) {
|
|
21219
|
-
this._respondWithError(getUnimplementedStatusResponse(
|
|
21219
|
+
this._respondWithError(getUnimplementedStatusResponse(path3), stream, channelzSessionInfo);
|
|
21220
21220
|
return;
|
|
21221
21221
|
}
|
|
21222
21222
|
const callEventTracker = {
|
|
@@ -21264,10 +21264,10 @@ var require_server = __commonJS({
|
|
|
21264
21264
|
if (this._verifyContentType(stream, headers) !== true) {
|
|
21265
21265
|
return;
|
|
21266
21266
|
}
|
|
21267
|
-
const
|
|
21268
|
-
const handler = this._retrieveHandler(
|
|
21267
|
+
const path3 = headers[HTTP2_HEADER_PATH];
|
|
21268
|
+
const handler = this._retrieveHandler(path3);
|
|
21269
21269
|
if (!handler) {
|
|
21270
|
-
this._respondWithError(getUnimplementedStatusResponse(
|
|
21270
|
+
this._respondWithError(getUnimplementedStatusResponse(path3), stream, null);
|
|
21271
21271
|
return;
|
|
21272
21272
|
}
|
|
21273
21273
|
const call = (0, server_interceptors_1.getServerInterceptingCall)([...extraInterceptors, ...this.interceptors], stream, headers, null, handler, this.options);
|
|
@@ -22309,7 +22309,7 @@ var require_certificate_provider = __commonJS({
|
|
|
22309
22309
|
"use strict";
|
|
22310
22310
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22311
22311
|
exports.FileWatcherCertificateProvider = void 0;
|
|
22312
|
-
var
|
|
22312
|
+
var fs3 = __require("fs");
|
|
22313
22313
|
var logging = require_logging();
|
|
22314
22314
|
var constants_1 = require_constants();
|
|
22315
22315
|
var util_1 = __require("util");
|
|
@@ -22317,7 +22317,7 @@ var require_certificate_provider = __commonJS({
|
|
|
22317
22317
|
function trace(text) {
|
|
22318
22318
|
logging.trace(constants_1.LogVerbosity.DEBUG, TRACER_NAME, text);
|
|
22319
22319
|
}
|
|
22320
|
-
var readFilePromise = (0, util_1.promisify)(
|
|
22320
|
+
var readFilePromise = (0, util_1.promisify)(fs3.readFile);
|
|
22321
22321
|
var FileWatcherCertificateProvider = class {
|
|
22322
22322
|
constructor(config) {
|
|
22323
22323
|
this.config = config;
|
|
@@ -22561,13 +22561,13 @@ var require_resolver_uds = __commonJS({
|
|
|
22561
22561
|
this.listener = listener;
|
|
22562
22562
|
this.hasReturnedResult = false;
|
|
22563
22563
|
this.endpoints = [];
|
|
22564
|
-
let
|
|
22564
|
+
let path3;
|
|
22565
22565
|
if (target.authority === "") {
|
|
22566
|
-
|
|
22566
|
+
path3 = "/" + target.path;
|
|
22567
22567
|
} else {
|
|
22568
|
-
|
|
22568
|
+
path3 = target.path;
|
|
22569
22569
|
}
|
|
22570
|
-
this.endpoints = [{ addresses: [{ path:
|
|
22570
|
+
this.endpoints = [{ addresses: [{ path: path3 }] }];
|
|
22571
22571
|
}
|
|
22572
22572
|
updateResolution() {
|
|
22573
22573
|
if (!this.hasReturnedResult) {
|
|
@@ -22625,12 +22625,12 @@ var require_resolver_ip = __commonJS({
|
|
|
22625
22625
|
return;
|
|
22626
22626
|
}
|
|
22627
22627
|
const pathList = target.path.split(",");
|
|
22628
|
-
for (const
|
|
22629
|
-
const hostPort = (0, uri_parser_1.splitHostPort)(
|
|
22628
|
+
for (const path3 of pathList) {
|
|
22629
|
+
const hostPort = (0, uri_parser_1.splitHostPort)(path3);
|
|
22630
22630
|
if (hostPort === null) {
|
|
22631
22631
|
this.error = {
|
|
22632
22632
|
code: constants_1.Status.UNAVAILABLE,
|
|
22633
|
-
details: `Failed to parse ${target.scheme} address ${
|
|
22633
|
+
details: `Failed to parse ${target.scheme} address ${path3}`,
|
|
22634
22634
|
metadata: new metadata_1.Metadata()
|
|
22635
22635
|
};
|
|
22636
22636
|
return;
|
|
@@ -22638,7 +22638,7 @@ var require_resolver_ip = __commonJS({
|
|
|
22638
22638
|
if (target.scheme === IPV4_SCHEME && !(0, net_1.isIPv4)(hostPort.host) || target.scheme === IPV6_SCHEME && !(0, net_1.isIPv6)(hostPort.host)) {
|
|
22639
22639
|
this.error = {
|
|
22640
22640
|
code: constants_1.Status.UNAVAILABLE,
|
|
22641
|
-
details: `Failed to parse ${target.scheme} address ${
|
|
22641
|
+
details: `Failed to parse ${target.scheme} address ${path3}`,
|
|
22642
22642
|
metadata: new metadata_1.Metadata()
|
|
22643
22643
|
};
|
|
22644
22644
|
return;
|
|
@@ -24363,7 +24363,7 @@ var require_createErrorStatusObject = __commonJS({
|
|
|
24363
24363
|
var grpc_js_1 = require_src3();
|
|
24364
24364
|
var abort_controller_x_1 = (init_es2(), __toCommonJS(es_exports2));
|
|
24365
24365
|
var nice_grpc_common_1 = require_lib2();
|
|
24366
|
-
function createErrorStatusObject(
|
|
24366
|
+
function createErrorStatusObject(path3, error, trailer) {
|
|
24367
24367
|
if (error instanceof nice_grpc_common_1.ServerError) {
|
|
24368
24368
|
return {
|
|
24369
24369
|
code: error.code,
|
|
@@ -24377,7 +24377,7 @@ var require_createErrorStatusObject = __commonJS({
|
|
|
24377
24377
|
metadata: trailer
|
|
24378
24378
|
};
|
|
24379
24379
|
} else {
|
|
24380
|
-
process.emitWarning(`${
|
|
24380
|
+
process.emitWarning(`${path3}: Uncaught error in server implementation method. Server methods should only throw ServerError or AbortError. ${error instanceof Error ? error.stack : error}`);
|
|
24381
24381
|
return {
|
|
24382
24382
|
code: grpc_js_1.status.UNKNOWN,
|
|
24383
24383
|
details: "Unknown server error occurred",
|
|
@@ -24828,9 +24828,9 @@ var require_wrapClientError = __commonJS({
|
|
|
24828
24828
|
exports.wrapClientError = wrapClientError;
|
|
24829
24829
|
var nice_grpc_common_1 = require_lib2();
|
|
24830
24830
|
var grpc_js_1 = require_src3();
|
|
24831
|
-
function wrapClientError(error,
|
|
24831
|
+
function wrapClientError(error, path3) {
|
|
24832
24832
|
if (isStatusObject(error)) {
|
|
24833
|
-
return new nice_grpc_common_1.ClientError(
|
|
24833
|
+
return new nice_grpc_common_1.ClientError(path3, error.code, error.details);
|
|
24834
24834
|
}
|
|
24835
24835
|
return error;
|
|
24836
24836
|
}
|
|
@@ -26450,8 +26450,8 @@ var require_RichClientError = __commonJS({
|
|
|
26450
26450
|
exports.RichClientError = void 0;
|
|
26451
26451
|
var nice_grpc_common_1 = require_lib2();
|
|
26452
26452
|
var RichClientError = class extends nice_grpc_common_1.ClientError {
|
|
26453
|
-
constructor(
|
|
26454
|
-
super(
|
|
26453
|
+
constructor(path3, code, details, extra) {
|
|
26454
|
+
super(path3, code, details);
|
|
26455
26455
|
this.name = "RichClientError";
|
|
26456
26456
|
this.extra = extra;
|
|
26457
26457
|
}
|
|
@@ -37970,6 +37970,9 @@ var require_cjs = __commonJS({
|
|
|
37970
37970
|
});
|
|
37971
37971
|
|
|
37972
37972
|
// src/utils.ts
|
|
37973
|
+
import { createRequire } from "module";
|
|
37974
|
+
import path from "path";
|
|
37975
|
+
import fs from "fs";
|
|
37973
37976
|
function mergeProcessResults(results) {
|
|
37974
37977
|
const res = {
|
|
37975
37978
|
...ProcessResult2.create(),
|
|
@@ -38050,11 +38053,21 @@ function compareSemver(a, b2) {
|
|
|
38050
38053
|
}
|
|
38051
38054
|
return 0;
|
|
38052
38055
|
}
|
|
38056
|
+
var require2 = createRequire(import.meta.url);
|
|
38057
|
+
function locatePackageJson(pkgId) {
|
|
38058
|
+
const m = require2.resolve(pkgId);
|
|
38059
|
+
let dir = path.dirname(m);
|
|
38060
|
+
while (!fs.existsSync(path.join(dir, "package.json"))) {
|
|
38061
|
+
dir = path.dirname(dir);
|
|
38062
|
+
}
|
|
38063
|
+
const content = fs.readFileSync(path.join(dir, "package.json"), "utf-8");
|
|
38064
|
+
return JSON.parse(content);
|
|
38065
|
+
}
|
|
38053
38066
|
import("node:process").then((p) => p.stdout.write(""));
|
|
38054
38067
|
|
|
38055
38068
|
// src/endpoints.ts
|
|
38056
38069
|
var import_fs_extra = __toESM(require_lib(), 1);
|
|
38057
|
-
import
|
|
38070
|
+
import path2 from "path";
|
|
38058
38071
|
var Endpoints = class _Endpoints {
|
|
38059
38072
|
static INSTANCE = new _Endpoints();
|
|
38060
38073
|
concurrency = 8;
|
|
@@ -38064,7 +38077,7 @@ var Endpoints = class _Endpoints {
|
|
|
38064
38077
|
batchCount = 1;
|
|
38065
38078
|
};
|
|
38066
38079
|
function configureEndpoints(options) {
|
|
38067
|
-
const fullPath =
|
|
38080
|
+
const fullPath = path2.resolve(options.chainsConfig);
|
|
38068
38081
|
const chainsConfig = import_fs_extra.default.readJsonSync(fullPath);
|
|
38069
38082
|
const concurrencyOverride = process.env["OVERRIDE_CONCURRENCY"] ? parseInt(process.env["OVERRIDE_CONCURRENCY"]) : void 0;
|
|
38070
38083
|
const batchCountOverride = process.env["OVERRIDE_BATCH_COUNT"] ? parseInt(process.env["OVERRIDE_BATCH_COUNT"]) : void 0;
|
|
@@ -60116,6 +60129,7 @@ export {
|
|
|
60116
60129
|
makeEthCallKey,
|
|
60117
60130
|
parseSemver,
|
|
60118
60131
|
compareSemver,
|
|
60132
|
+
locatePackageJson,
|
|
60119
60133
|
require_lib,
|
|
60120
60134
|
Endpoints,
|
|
60121
60135
|
configureEndpoints,
|
|
@@ -60224,4 +60238,4 @@ long/umd/index.js:
|
|
|
60224
60238
|
@noble/curves/esm/secp256k1.js:
|
|
60225
60239
|
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
60226
60240
|
*/
|
|
60227
|
-
//# sourceMappingURL=chunk-
|
|
60241
|
+
//# sourceMappingURL=chunk-TYDHN4Z6.js.map
|