pnpm 7.29.3 → 7.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -27
- package/dist/node_modules/.modules.yaml +1 -1
- package/dist/pnpm.cjs +852 -30
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -119,27 +119,7 @@ why it works fine with the Node.js ecosystem, read this small article: [Flat nod
|
|
|
119
119
|
|
|
120
120
|
## Installation
|
|
121
121
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
```
|
|
125
|
-
curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
On Windows (using PowerShell):
|
|
129
|
-
|
|
130
|
-
```
|
|
131
|
-
(Invoke-WebRequest 'https://get.pnpm.io/v6.16.js' -UseBasicParsing).Content | node - add --global pnpm
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
Using npm:
|
|
135
|
-
|
|
136
|
-
```
|
|
137
|
-
npx pnpm add -g pnpm
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
For other installation options [visit our website](https://pnpm.io/installation).
|
|
141
|
-
|
|
142
|
-
We also ship a version of pnpm that may be used even with no Node.js installed on the system, see [@pnpm/exe](https://www.npmjs.com/package/@pnpm/exe).
|
|
122
|
+
For installation options [visit our website](https://pnpm.io/installation).
|
|
143
123
|
|
|
144
124
|
## Usage
|
|
145
125
|
|
|
@@ -149,12 +129,6 @@ Just use pnpm in place of npm/Yarn. E.g., install dependencies via:
|
|
|
149
129
|
pnpm install
|
|
150
130
|
```
|
|
151
131
|
|
|
152
|
-
Also, `pnpm dlx` instead of npx:
|
|
153
|
-
|
|
154
|
-
```
|
|
155
|
-
pnpm dlx create-react-app my-cool-new-app
|
|
156
|
-
```
|
|
157
|
-
|
|
158
132
|
For more advanced usage, read [pnpm CLI](https://pnpm.io/pnpm-cli) on our website, or run `pnpm help`.
|
|
159
133
|
|
|
160
134
|
## Benchmark
|
package/dist/pnpm.cjs
CHANGED
|
@@ -50,9 +50,9 @@ var __privateMethod = (obj, member, method) => {
|
|
|
50
50
|
return method;
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
-
// ../node_modules/.pnpm/graceful-fs@4.2.
|
|
53
|
+
// ../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js
|
|
54
54
|
var require_polyfills = __commonJS({
|
|
55
|
-
"../node_modules/.pnpm/graceful-fs@4.2.
|
|
55
|
+
"../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports2, module2) {
|
|
56
56
|
var constants = require("constants");
|
|
57
57
|
var origCwd = process.cwd;
|
|
58
58
|
var cwd = null;
|
|
@@ -124,7 +124,7 @@ var require_polyfills = __commonJS({
|
|
|
124
124
|
var start = Date.now();
|
|
125
125
|
var backoff = 0;
|
|
126
126
|
fs$rename(from, to, function CB(er) {
|
|
127
|
-
if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) {
|
|
127
|
+
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
|
|
128
128
|
setTimeout(function() {
|
|
129
129
|
fs2.stat(to, function(stater, st) {
|
|
130
130
|
if (stater && stater.code === "ENOENT")
|
|
@@ -366,9 +366,9 @@ var require_polyfills = __commonJS({
|
|
|
366
366
|
}
|
|
367
367
|
});
|
|
368
368
|
|
|
369
|
-
// ../node_modules/.pnpm/graceful-fs@4.2.
|
|
369
|
+
// ../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js
|
|
370
370
|
var require_legacy_streams = __commonJS({
|
|
371
|
-
"../node_modules/.pnpm/graceful-fs@4.2.
|
|
371
|
+
"../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
|
|
372
372
|
var Stream = require("stream").Stream;
|
|
373
373
|
module2.exports = legacy;
|
|
374
374
|
function legacy(fs2) {
|
|
@@ -465,9 +465,9 @@ var require_legacy_streams = __commonJS({
|
|
|
465
465
|
}
|
|
466
466
|
});
|
|
467
467
|
|
|
468
|
-
// ../node_modules/.pnpm/graceful-fs@4.2.
|
|
468
|
+
// ../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js
|
|
469
469
|
var require_clone = __commonJS({
|
|
470
|
-
"../node_modules/.pnpm/graceful-fs@4.2.
|
|
470
|
+
"../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports2, module2) {
|
|
471
471
|
"use strict";
|
|
472
472
|
module2.exports = clone;
|
|
473
473
|
var getPrototypeOf = Object.getPrototypeOf || function(obj) {
|
|
@@ -488,9 +488,9 @@ var require_clone = __commonJS({
|
|
|
488
488
|
}
|
|
489
489
|
});
|
|
490
490
|
|
|
491
|
-
// ../node_modules/.pnpm/graceful-fs@4.2.
|
|
491
|
+
// ../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
|
|
492
492
|
var require_graceful_fs = __commonJS({
|
|
493
|
-
"../node_modules/.pnpm/graceful-fs@4.2.
|
|
493
|
+
"../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
|
|
494
494
|
var fs2 = require("fs");
|
|
495
495
|
var polyfills = require_polyfills();
|
|
496
496
|
var legacy = require_legacy_streams();
|
|
@@ -3244,7 +3244,7 @@ var require_lib4 = __commonJS({
|
|
|
3244
3244
|
var load_json_file_1 = __importDefault3(require_load_json_file());
|
|
3245
3245
|
var defaultManifest = {
|
|
3246
3246
|
name: "pnpm" != null && true ? "pnpm" : "pnpm",
|
|
3247
|
-
version: "7.
|
|
3247
|
+
version: "7.30.0" != null && true ? "7.30.0" : "0.0.0"
|
|
3248
3248
|
};
|
|
3249
3249
|
var pkgJson;
|
|
3250
3250
|
if (require.main == null) {
|
|
@@ -13324,6 +13324,814 @@ var require_lib8 = __commonJS({
|
|
|
13324
13324
|
}
|
|
13325
13325
|
});
|
|
13326
13326
|
|
|
13327
|
+
// ../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/polyfills.js
|
|
13328
|
+
var require_polyfills2 = __commonJS({
|
|
13329
|
+
"../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/polyfills.js"(exports2, module2) {
|
|
13330
|
+
var constants = require("constants");
|
|
13331
|
+
var origCwd = process.cwd;
|
|
13332
|
+
var cwd = null;
|
|
13333
|
+
var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
|
|
13334
|
+
process.cwd = function() {
|
|
13335
|
+
if (!cwd)
|
|
13336
|
+
cwd = origCwd.call(process);
|
|
13337
|
+
return cwd;
|
|
13338
|
+
};
|
|
13339
|
+
try {
|
|
13340
|
+
process.cwd();
|
|
13341
|
+
} catch (er) {
|
|
13342
|
+
}
|
|
13343
|
+
if (typeof process.chdir === "function") {
|
|
13344
|
+
chdir = process.chdir;
|
|
13345
|
+
process.chdir = function(d) {
|
|
13346
|
+
cwd = null;
|
|
13347
|
+
chdir.call(process, d);
|
|
13348
|
+
};
|
|
13349
|
+
if (Object.setPrototypeOf)
|
|
13350
|
+
Object.setPrototypeOf(process.chdir, chdir);
|
|
13351
|
+
}
|
|
13352
|
+
var chdir;
|
|
13353
|
+
module2.exports = patch;
|
|
13354
|
+
function patch(fs2) {
|
|
13355
|
+
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
13356
|
+
patchLchmod(fs2);
|
|
13357
|
+
}
|
|
13358
|
+
if (!fs2.lutimes) {
|
|
13359
|
+
patchLutimes(fs2);
|
|
13360
|
+
}
|
|
13361
|
+
fs2.chown = chownFix(fs2.chown);
|
|
13362
|
+
fs2.fchown = chownFix(fs2.fchown);
|
|
13363
|
+
fs2.lchown = chownFix(fs2.lchown);
|
|
13364
|
+
fs2.chmod = chmodFix(fs2.chmod);
|
|
13365
|
+
fs2.fchmod = chmodFix(fs2.fchmod);
|
|
13366
|
+
fs2.lchmod = chmodFix(fs2.lchmod);
|
|
13367
|
+
fs2.chownSync = chownFixSync(fs2.chownSync);
|
|
13368
|
+
fs2.fchownSync = chownFixSync(fs2.fchownSync);
|
|
13369
|
+
fs2.lchownSync = chownFixSync(fs2.lchownSync);
|
|
13370
|
+
fs2.chmodSync = chmodFixSync(fs2.chmodSync);
|
|
13371
|
+
fs2.fchmodSync = chmodFixSync(fs2.fchmodSync);
|
|
13372
|
+
fs2.lchmodSync = chmodFixSync(fs2.lchmodSync);
|
|
13373
|
+
fs2.stat = statFix(fs2.stat);
|
|
13374
|
+
fs2.fstat = statFix(fs2.fstat);
|
|
13375
|
+
fs2.lstat = statFix(fs2.lstat);
|
|
13376
|
+
fs2.statSync = statFixSync(fs2.statSync);
|
|
13377
|
+
fs2.fstatSync = statFixSync(fs2.fstatSync);
|
|
13378
|
+
fs2.lstatSync = statFixSync(fs2.lstatSync);
|
|
13379
|
+
if (fs2.chmod && !fs2.lchmod) {
|
|
13380
|
+
fs2.lchmod = function(path2, mode, cb) {
|
|
13381
|
+
if (cb)
|
|
13382
|
+
process.nextTick(cb);
|
|
13383
|
+
};
|
|
13384
|
+
fs2.lchmodSync = function() {
|
|
13385
|
+
};
|
|
13386
|
+
}
|
|
13387
|
+
if (fs2.chown && !fs2.lchown) {
|
|
13388
|
+
fs2.lchown = function(path2, uid, gid, cb) {
|
|
13389
|
+
if (cb)
|
|
13390
|
+
process.nextTick(cb);
|
|
13391
|
+
};
|
|
13392
|
+
fs2.lchownSync = function() {
|
|
13393
|
+
};
|
|
13394
|
+
}
|
|
13395
|
+
if (platform === "win32") {
|
|
13396
|
+
fs2.rename = typeof fs2.rename !== "function" ? fs2.rename : function(fs$rename) {
|
|
13397
|
+
function rename(from, to, cb) {
|
|
13398
|
+
var start = Date.now();
|
|
13399
|
+
var backoff = 0;
|
|
13400
|
+
fs$rename(from, to, function CB(er) {
|
|
13401
|
+
if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) {
|
|
13402
|
+
setTimeout(function() {
|
|
13403
|
+
fs2.stat(to, function(stater, st) {
|
|
13404
|
+
if (stater && stater.code === "ENOENT")
|
|
13405
|
+
fs$rename(from, to, CB);
|
|
13406
|
+
else
|
|
13407
|
+
cb(er);
|
|
13408
|
+
});
|
|
13409
|
+
}, backoff);
|
|
13410
|
+
if (backoff < 100)
|
|
13411
|
+
backoff += 10;
|
|
13412
|
+
return;
|
|
13413
|
+
}
|
|
13414
|
+
if (cb)
|
|
13415
|
+
cb(er);
|
|
13416
|
+
});
|
|
13417
|
+
}
|
|
13418
|
+
if (Object.setPrototypeOf)
|
|
13419
|
+
Object.setPrototypeOf(rename, fs$rename);
|
|
13420
|
+
return rename;
|
|
13421
|
+
}(fs2.rename);
|
|
13422
|
+
}
|
|
13423
|
+
fs2.read = typeof fs2.read !== "function" ? fs2.read : function(fs$read) {
|
|
13424
|
+
function read(fd, buffer, offset, length, position, callback_) {
|
|
13425
|
+
var callback;
|
|
13426
|
+
if (callback_ && typeof callback_ === "function") {
|
|
13427
|
+
var eagCounter = 0;
|
|
13428
|
+
callback = function(er, _, __) {
|
|
13429
|
+
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
13430
|
+
eagCounter++;
|
|
13431
|
+
return fs$read.call(fs2, fd, buffer, offset, length, position, callback);
|
|
13432
|
+
}
|
|
13433
|
+
callback_.apply(this, arguments);
|
|
13434
|
+
};
|
|
13435
|
+
}
|
|
13436
|
+
return fs$read.call(fs2, fd, buffer, offset, length, position, callback);
|
|
13437
|
+
}
|
|
13438
|
+
if (Object.setPrototypeOf)
|
|
13439
|
+
Object.setPrototypeOf(read, fs$read);
|
|
13440
|
+
return read;
|
|
13441
|
+
}(fs2.read);
|
|
13442
|
+
fs2.readSync = typeof fs2.readSync !== "function" ? fs2.readSync : function(fs$readSync) {
|
|
13443
|
+
return function(fd, buffer, offset, length, position) {
|
|
13444
|
+
var eagCounter = 0;
|
|
13445
|
+
while (true) {
|
|
13446
|
+
try {
|
|
13447
|
+
return fs$readSync.call(fs2, fd, buffer, offset, length, position);
|
|
13448
|
+
} catch (er) {
|
|
13449
|
+
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
13450
|
+
eagCounter++;
|
|
13451
|
+
continue;
|
|
13452
|
+
}
|
|
13453
|
+
throw er;
|
|
13454
|
+
}
|
|
13455
|
+
}
|
|
13456
|
+
};
|
|
13457
|
+
}(fs2.readSync);
|
|
13458
|
+
function patchLchmod(fs3) {
|
|
13459
|
+
fs3.lchmod = function(path2, mode, callback) {
|
|
13460
|
+
fs3.open(
|
|
13461
|
+
path2,
|
|
13462
|
+
constants.O_WRONLY | constants.O_SYMLINK,
|
|
13463
|
+
mode,
|
|
13464
|
+
function(err, fd) {
|
|
13465
|
+
if (err) {
|
|
13466
|
+
if (callback)
|
|
13467
|
+
callback(err);
|
|
13468
|
+
return;
|
|
13469
|
+
}
|
|
13470
|
+
fs3.fchmod(fd, mode, function(err2) {
|
|
13471
|
+
fs3.close(fd, function(err22) {
|
|
13472
|
+
if (callback)
|
|
13473
|
+
callback(err2 || err22);
|
|
13474
|
+
});
|
|
13475
|
+
});
|
|
13476
|
+
}
|
|
13477
|
+
);
|
|
13478
|
+
};
|
|
13479
|
+
fs3.lchmodSync = function(path2, mode) {
|
|
13480
|
+
var fd = fs3.openSync(path2, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
13481
|
+
var threw = true;
|
|
13482
|
+
var ret;
|
|
13483
|
+
try {
|
|
13484
|
+
ret = fs3.fchmodSync(fd, mode);
|
|
13485
|
+
threw = false;
|
|
13486
|
+
} finally {
|
|
13487
|
+
if (threw) {
|
|
13488
|
+
try {
|
|
13489
|
+
fs3.closeSync(fd);
|
|
13490
|
+
} catch (er) {
|
|
13491
|
+
}
|
|
13492
|
+
} else {
|
|
13493
|
+
fs3.closeSync(fd);
|
|
13494
|
+
}
|
|
13495
|
+
}
|
|
13496
|
+
return ret;
|
|
13497
|
+
};
|
|
13498
|
+
}
|
|
13499
|
+
function patchLutimes(fs3) {
|
|
13500
|
+
if (constants.hasOwnProperty("O_SYMLINK") && fs3.futimes) {
|
|
13501
|
+
fs3.lutimes = function(path2, at, mt, cb) {
|
|
13502
|
+
fs3.open(path2, constants.O_SYMLINK, function(er, fd) {
|
|
13503
|
+
if (er) {
|
|
13504
|
+
if (cb)
|
|
13505
|
+
cb(er);
|
|
13506
|
+
return;
|
|
13507
|
+
}
|
|
13508
|
+
fs3.futimes(fd, at, mt, function(er2) {
|
|
13509
|
+
fs3.close(fd, function(er22) {
|
|
13510
|
+
if (cb)
|
|
13511
|
+
cb(er2 || er22);
|
|
13512
|
+
});
|
|
13513
|
+
});
|
|
13514
|
+
});
|
|
13515
|
+
};
|
|
13516
|
+
fs3.lutimesSync = function(path2, at, mt) {
|
|
13517
|
+
var fd = fs3.openSync(path2, constants.O_SYMLINK);
|
|
13518
|
+
var ret;
|
|
13519
|
+
var threw = true;
|
|
13520
|
+
try {
|
|
13521
|
+
ret = fs3.futimesSync(fd, at, mt);
|
|
13522
|
+
threw = false;
|
|
13523
|
+
} finally {
|
|
13524
|
+
if (threw) {
|
|
13525
|
+
try {
|
|
13526
|
+
fs3.closeSync(fd);
|
|
13527
|
+
} catch (er) {
|
|
13528
|
+
}
|
|
13529
|
+
} else {
|
|
13530
|
+
fs3.closeSync(fd);
|
|
13531
|
+
}
|
|
13532
|
+
}
|
|
13533
|
+
return ret;
|
|
13534
|
+
};
|
|
13535
|
+
} else if (fs3.futimes) {
|
|
13536
|
+
fs3.lutimes = function(_a, _b, _c, cb) {
|
|
13537
|
+
if (cb)
|
|
13538
|
+
process.nextTick(cb);
|
|
13539
|
+
};
|
|
13540
|
+
fs3.lutimesSync = function() {
|
|
13541
|
+
};
|
|
13542
|
+
}
|
|
13543
|
+
}
|
|
13544
|
+
function chmodFix(orig) {
|
|
13545
|
+
if (!orig)
|
|
13546
|
+
return orig;
|
|
13547
|
+
return function(target, mode, cb) {
|
|
13548
|
+
return orig.call(fs2, target, mode, function(er) {
|
|
13549
|
+
if (chownErOk(er))
|
|
13550
|
+
er = null;
|
|
13551
|
+
if (cb)
|
|
13552
|
+
cb.apply(this, arguments);
|
|
13553
|
+
});
|
|
13554
|
+
};
|
|
13555
|
+
}
|
|
13556
|
+
function chmodFixSync(orig) {
|
|
13557
|
+
if (!orig)
|
|
13558
|
+
return orig;
|
|
13559
|
+
return function(target, mode) {
|
|
13560
|
+
try {
|
|
13561
|
+
return orig.call(fs2, target, mode);
|
|
13562
|
+
} catch (er) {
|
|
13563
|
+
if (!chownErOk(er))
|
|
13564
|
+
throw er;
|
|
13565
|
+
}
|
|
13566
|
+
};
|
|
13567
|
+
}
|
|
13568
|
+
function chownFix(orig) {
|
|
13569
|
+
if (!orig)
|
|
13570
|
+
return orig;
|
|
13571
|
+
return function(target, uid, gid, cb) {
|
|
13572
|
+
return orig.call(fs2, target, uid, gid, function(er) {
|
|
13573
|
+
if (chownErOk(er))
|
|
13574
|
+
er = null;
|
|
13575
|
+
if (cb)
|
|
13576
|
+
cb.apply(this, arguments);
|
|
13577
|
+
});
|
|
13578
|
+
};
|
|
13579
|
+
}
|
|
13580
|
+
function chownFixSync(orig) {
|
|
13581
|
+
if (!orig)
|
|
13582
|
+
return orig;
|
|
13583
|
+
return function(target, uid, gid) {
|
|
13584
|
+
try {
|
|
13585
|
+
return orig.call(fs2, target, uid, gid);
|
|
13586
|
+
} catch (er) {
|
|
13587
|
+
if (!chownErOk(er))
|
|
13588
|
+
throw er;
|
|
13589
|
+
}
|
|
13590
|
+
};
|
|
13591
|
+
}
|
|
13592
|
+
function statFix(orig) {
|
|
13593
|
+
if (!orig)
|
|
13594
|
+
return orig;
|
|
13595
|
+
return function(target, options, cb) {
|
|
13596
|
+
if (typeof options === "function") {
|
|
13597
|
+
cb = options;
|
|
13598
|
+
options = null;
|
|
13599
|
+
}
|
|
13600
|
+
function callback(er, stats) {
|
|
13601
|
+
if (stats) {
|
|
13602
|
+
if (stats.uid < 0)
|
|
13603
|
+
stats.uid += 4294967296;
|
|
13604
|
+
if (stats.gid < 0)
|
|
13605
|
+
stats.gid += 4294967296;
|
|
13606
|
+
}
|
|
13607
|
+
if (cb)
|
|
13608
|
+
cb.apply(this, arguments);
|
|
13609
|
+
}
|
|
13610
|
+
return options ? orig.call(fs2, target, options, callback) : orig.call(fs2, target, callback);
|
|
13611
|
+
};
|
|
13612
|
+
}
|
|
13613
|
+
function statFixSync(orig) {
|
|
13614
|
+
if (!orig)
|
|
13615
|
+
return orig;
|
|
13616
|
+
return function(target, options) {
|
|
13617
|
+
var stats = options ? orig.call(fs2, target, options) : orig.call(fs2, target);
|
|
13618
|
+
if (stats) {
|
|
13619
|
+
if (stats.uid < 0)
|
|
13620
|
+
stats.uid += 4294967296;
|
|
13621
|
+
if (stats.gid < 0)
|
|
13622
|
+
stats.gid += 4294967296;
|
|
13623
|
+
}
|
|
13624
|
+
return stats;
|
|
13625
|
+
};
|
|
13626
|
+
}
|
|
13627
|
+
function chownErOk(er) {
|
|
13628
|
+
if (!er)
|
|
13629
|
+
return true;
|
|
13630
|
+
if (er.code === "ENOSYS")
|
|
13631
|
+
return true;
|
|
13632
|
+
var nonroot = !process.getuid || process.getuid() !== 0;
|
|
13633
|
+
if (nonroot) {
|
|
13634
|
+
if (er.code === "EINVAL" || er.code === "EPERM")
|
|
13635
|
+
return true;
|
|
13636
|
+
}
|
|
13637
|
+
return false;
|
|
13638
|
+
}
|
|
13639
|
+
}
|
|
13640
|
+
}
|
|
13641
|
+
});
|
|
13642
|
+
|
|
13643
|
+
// ../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/legacy-streams.js
|
|
13644
|
+
var require_legacy_streams2 = __commonJS({
|
|
13645
|
+
"../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
|
|
13646
|
+
var Stream = require("stream").Stream;
|
|
13647
|
+
module2.exports = legacy;
|
|
13648
|
+
function legacy(fs2) {
|
|
13649
|
+
return {
|
|
13650
|
+
ReadStream,
|
|
13651
|
+
WriteStream
|
|
13652
|
+
};
|
|
13653
|
+
function ReadStream(path2, options) {
|
|
13654
|
+
if (!(this instanceof ReadStream))
|
|
13655
|
+
return new ReadStream(path2, options);
|
|
13656
|
+
Stream.call(this);
|
|
13657
|
+
var self2 = this;
|
|
13658
|
+
this.path = path2;
|
|
13659
|
+
this.fd = null;
|
|
13660
|
+
this.readable = true;
|
|
13661
|
+
this.paused = false;
|
|
13662
|
+
this.flags = "r";
|
|
13663
|
+
this.mode = 438;
|
|
13664
|
+
this.bufferSize = 64 * 1024;
|
|
13665
|
+
options = options || {};
|
|
13666
|
+
var keys = Object.keys(options);
|
|
13667
|
+
for (var index = 0, length = keys.length; index < length; index++) {
|
|
13668
|
+
var key = keys[index];
|
|
13669
|
+
this[key] = options[key];
|
|
13670
|
+
}
|
|
13671
|
+
if (this.encoding)
|
|
13672
|
+
this.setEncoding(this.encoding);
|
|
13673
|
+
if (this.start !== void 0) {
|
|
13674
|
+
if ("number" !== typeof this.start) {
|
|
13675
|
+
throw TypeError("start must be a Number");
|
|
13676
|
+
}
|
|
13677
|
+
if (this.end === void 0) {
|
|
13678
|
+
this.end = Infinity;
|
|
13679
|
+
} else if ("number" !== typeof this.end) {
|
|
13680
|
+
throw TypeError("end must be a Number");
|
|
13681
|
+
}
|
|
13682
|
+
if (this.start > this.end) {
|
|
13683
|
+
throw new Error("start must be <= end");
|
|
13684
|
+
}
|
|
13685
|
+
this.pos = this.start;
|
|
13686
|
+
}
|
|
13687
|
+
if (this.fd !== null) {
|
|
13688
|
+
process.nextTick(function() {
|
|
13689
|
+
self2._read();
|
|
13690
|
+
});
|
|
13691
|
+
return;
|
|
13692
|
+
}
|
|
13693
|
+
fs2.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
13694
|
+
if (err) {
|
|
13695
|
+
self2.emit("error", err);
|
|
13696
|
+
self2.readable = false;
|
|
13697
|
+
return;
|
|
13698
|
+
}
|
|
13699
|
+
self2.fd = fd;
|
|
13700
|
+
self2.emit("open", fd);
|
|
13701
|
+
self2._read();
|
|
13702
|
+
});
|
|
13703
|
+
}
|
|
13704
|
+
function WriteStream(path2, options) {
|
|
13705
|
+
if (!(this instanceof WriteStream))
|
|
13706
|
+
return new WriteStream(path2, options);
|
|
13707
|
+
Stream.call(this);
|
|
13708
|
+
this.path = path2;
|
|
13709
|
+
this.fd = null;
|
|
13710
|
+
this.writable = true;
|
|
13711
|
+
this.flags = "w";
|
|
13712
|
+
this.encoding = "binary";
|
|
13713
|
+
this.mode = 438;
|
|
13714
|
+
this.bytesWritten = 0;
|
|
13715
|
+
options = options || {};
|
|
13716
|
+
var keys = Object.keys(options);
|
|
13717
|
+
for (var index = 0, length = keys.length; index < length; index++) {
|
|
13718
|
+
var key = keys[index];
|
|
13719
|
+
this[key] = options[key];
|
|
13720
|
+
}
|
|
13721
|
+
if (this.start !== void 0) {
|
|
13722
|
+
if ("number" !== typeof this.start) {
|
|
13723
|
+
throw TypeError("start must be a Number");
|
|
13724
|
+
}
|
|
13725
|
+
if (this.start < 0) {
|
|
13726
|
+
throw new Error("start must be >= zero");
|
|
13727
|
+
}
|
|
13728
|
+
this.pos = this.start;
|
|
13729
|
+
}
|
|
13730
|
+
this.busy = false;
|
|
13731
|
+
this._queue = [];
|
|
13732
|
+
if (this.fd === null) {
|
|
13733
|
+
this._open = fs2.open;
|
|
13734
|
+
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
|
13735
|
+
this.flush();
|
|
13736
|
+
}
|
|
13737
|
+
}
|
|
13738
|
+
}
|
|
13739
|
+
}
|
|
13740
|
+
});
|
|
13741
|
+
|
|
13742
|
+
// ../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/clone.js
|
|
13743
|
+
var require_clone2 = __commonJS({
|
|
13744
|
+
"../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/clone.js"(exports2, module2) {
|
|
13745
|
+
"use strict";
|
|
13746
|
+
module2.exports = clone;
|
|
13747
|
+
var getPrototypeOf = Object.getPrototypeOf || function(obj) {
|
|
13748
|
+
return obj.__proto__;
|
|
13749
|
+
};
|
|
13750
|
+
function clone(obj) {
|
|
13751
|
+
if (obj === null || typeof obj !== "object")
|
|
13752
|
+
return obj;
|
|
13753
|
+
if (obj instanceof Object)
|
|
13754
|
+
var copy = { __proto__: getPrototypeOf(obj) };
|
|
13755
|
+
else
|
|
13756
|
+
var copy = /* @__PURE__ */ Object.create(null);
|
|
13757
|
+
Object.getOwnPropertyNames(obj).forEach(function(key) {
|
|
13758
|
+
Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
|
|
13759
|
+
});
|
|
13760
|
+
return copy;
|
|
13761
|
+
}
|
|
13762
|
+
}
|
|
13763
|
+
});
|
|
13764
|
+
|
|
13765
|
+
// ../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js
|
|
13766
|
+
var require_graceful_fs2 = __commonJS({
|
|
13767
|
+
"../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
|
|
13768
|
+
var fs2 = require("fs");
|
|
13769
|
+
var polyfills = require_polyfills2();
|
|
13770
|
+
var legacy = require_legacy_streams2();
|
|
13771
|
+
var clone = require_clone2();
|
|
13772
|
+
var util = require("util");
|
|
13773
|
+
var gracefulQueue;
|
|
13774
|
+
var previousSymbol;
|
|
13775
|
+
if (typeof Symbol === "function" && typeof Symbol.for === "function") {
|
|
13776
|
+
gracefulQueue = Symbol.for("graceful-fs.queue");
|
|
13777
|
+
previousSymbol = Symbol.for("graceful-fs.previous");
|
|
13778
|
+
} else {
|
|
13779
|
+
gracefulQueue = "___graceful-fs.queue";
|
|
13780
|
+
previousSymbol = "___graceful-fs.previous";
|
|
13781
|
+
}
|
|
13782
|
+
function noop() {
|
|
13783
|
+
}
|
|
13784
|
+
function publishQueue(context, queue2) {
|
|
13785
|
+
Object.defineProperty(context, gracefulQueue, {
|
|
13786
|
+
get: function() {
|
|
13787
|
+
return queue2;
|
|
13788
|
+
}
|
|
13789
|
+
});
|
|
13790
|
+
}
|
|
13791
|
+
var debug = noop;
|
|
13792
|
+
if (util.debuglog)
|
|
13793
|
+
debug = util.debuglog("gfs4");
|
|
13794
|
+
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
|
|
13795
|
+
debug = function() {
|
|
13796
|
+
var m = util.format.apply(util, arguments);
|
|
13797
|
+
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
13798
|
+
console.error(m);
|
|
13799
|
+
};
|
|
13800
|
+
if (!fs2[gracefulQueue]) {
|
|
13801
|
+
queue = global[gracefulQueue] || [];
|
|
13802
|
+
publishQueue(fs2, queue);
|
|
13803
|
+
fs2.close = function(fs$close) {
|
|
13804
|
+
function close(fd, cb) {
|
|
13805
|
+
return fs$close.call(fs2, fd, function(err) {
|
|
13806
|
+
if (!err) {
|
|
13807
|
+
resetQueue();
|
|
13808
|
+
}
|
|
13809
|
+
if (typeof cb === "function")
|
|
13810
|
+
cb.apply(this, arguments);
|
|
13811
|
+
});
|
|
13812
|
+
}
|
|
13813
|
+
Object.defineProperty(close, previousSymbol, {
|
|
13814
|
+
value: fs$close
|
|
13815
|
+
});
|
|
13816
|
+
return close;
|
|
13817
|
+
}(fs2.close);
|
|
13818
|
+
fs2.closeSync = function(fs$closeSync) {
|
|
13819
|
+
function closeSync(fd) {
|
|
13820
|
+
fs$closeSync.apply(fs2, arguments);
|
|
13821
|
+
resetQueue();
|
|
13822
|
+
}
|
|
13823
|
+
Object.defineProperty(closeSync, previousSymbol, {
|
|
13824
|
+
value: fs$closeSync
|
|
13825
|
+
});
|
|
13826
|
+
return closeSync;
|
|
13827
|
+
}(fs2.closeSync);
|
|
13828
|
+
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
13829
|
+
process.on("exit", function() {
|
|
13830
|
+
debug(fs2[gracefulQueue]);
|
|
13831
|
+
require("assert").equal(fs2[gracefulQueue].length, 0);
|
|
13832
|
+
});
|
|
13833
|
+
}
|
|
13834
|
+
}
|
|
13835
|
+
var queue;
|
|
13836
|
+
if (!global[gracefulQueue]) {
|
|
13837
|
+
publishQueue(global, fs2[gracefulQueue]);
|
|
13838
|
+
}
|
|
13839
|
+
module2.exports = patch(clone(fs2));
|
|
13840
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs2.__patched) {
|
|
13841
|
+
module2.exports = patch(fs2);
|
|
13842
|
+
fs2.__patched = true;
|
|
13843
|
+
}
|
|
13844
|
+
function patch(fs3) {
|
|
13845
|
+
polyfills(fs3);
|
|
13846
|
+
fs3.gracefulify = patch;
|
|
13847
|
+
fs3.createReadStream = createReadStream;
|
|
13848
|
+
fs3.createWriteStream = createWriteStream;
|
|
13849
|
+
var fs$readFile = fs3.readFile;
|
|
13850
|
+
fs3.readFile = readFile;
|
|
13851
|
+
function readFile(path2, options, cb) {
|
|
13852
|
+
if (typeof options === "function")
|
|
13853
|
+
cb = options, options = null;
|
|
13854
|
+
return go$readFile(path2, options, cb);
|
|
13855
|
+
function go$readFile(path3, options2, cb2, startTime) {
|
|
13856
|
+
return fs$readFile(path3, options2, function(err) {
|
|
13857
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
13858
|
+
enqueue([go$readFile, [path3, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
13859
|
+
else {
|
|
13860
|
+
if (typeof cb2 === "function")
|
|
13861
|
+
cb2.apply(this, arguments);
|
|
13862
|
+
}
|
|
13863
|
+
});
|
|
13864
|
+
}
|
|
13865
|
+
}
|
|
13866
|
+
var fs$writeFile = fs3.writeFile;
|
|
13867
|
+
fs3.writeFile = writeFile;
|
|
13868
|
+
function writeFile(path2, data, options, cb) {
|
|
13869
|
+
if (typeof options === "function")
|
|
13870
|
+
cb = options, options = null;
|
|
13871
|
+
return go$writeFile(path2, data, options, cb);
|
|
13872
|
+
function go$writeFile(path3, data2, options2, cb2, startTime) {
|
|
13873
|
+
return fs$writeFile(path3, data2, options2, function(err) {
|
|
13874
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
13875
|
+
enqueue([go$writeFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
13876
|
+
else {
|
|
13877
|
+
if (typeof cb2 === "function")
|
|
13878
|
+
cb2.apply(this, arguments);
|
|
13879
|
+
}
|
|
13880
|
+
});
|
|
13881
|
+
}
|
|
13882
|
+
}
|
|
13883
|
+
var fs$appendFile = fs3.appendFile;
|
|
13884
|
+
if (fs$appendFile)
|
|
13885
|
+
fs3.appendFile = appendFile;
|
|
13886
|
+
function appendFile(path2, data, options, cb) {
|
|
13887
|
+
if (typeof options === "function")
|
|
13888
|
+
cb = options, options = null;
|
|
13889
|
+
return go$appendFile(path2, data, options, cb);
|
|
13890
|
+
function go$appendFile(path3, data2, options2, cb2, startTime) {
|
|
13891
|
+
return fs$appendFile(path3, data2, options2, function(err) {
|
|
13892
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
13893
|
+
enqueue([go$appendFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
13894
|
+
else {
|
|
13895
|
+
if (typeof cb2 === "function")
|
|
13896
|
+
cb2.apply(this, arguments);
|
|
13897
|
+
}
|
|
13898
|
+
});
|
|
13899
|
+
}
|
|
13900
|
+
}
|
|
13901
|
+
var fs$copyFile = fs3.copyFile;
|
|
13902
|
+
if (fs$copyFile)
|
|
13903
|
+
fs3.copyFile = copyFile;
|
|
13904
|
+
function copyFile(src, dest, flags, cb) {
|
|
13905
|
+
if (typeof flags === "function") {
|
|
13906
|
+
cb = flags;
|
|
13907
|
+
flags = 0;
|
|
13908
|
+
}
|
|
13909
|
+
return go$copyFile(src, dest, flags, cb);
|
|
13910
|
+
function go$copyFile(src2, dest2, flags2, cb2, startTime) {
|
|
13911
|
+
return fs$copyFile(src2, dest2, flags2, function(err) {
|
|
13912
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
13913
|
+
enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
13914
|
+
else {
|
|
13915
|
+
if (typeof cb2 === "function")
|
|
13916
|
+
cb2.apply(this, arguments);
|
|
13917
|
+
}
|
|
13918
|
+
});
|
|
13919
|
+
}
|
|
13920
|
+
}
|
|
13921
|
+
var fs$readdir = fs3.readdir;
|
|
13922
|
+
fs3.readdir = readdir;
|
|
13923
|
+
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
13924
|
+
function readdir(path2, options, cb) {
|
|
13925
|
+
if (typeof options === "function")
|
|
13926
|
+
cb = options, options = null;
|
|
13927
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path3, options2, cb2, startTime) {
|
|
13928
|
+
return fs$readdir(path3, fs$readdirCallback(
|
|
13929
|
+
path3,
|
|
13930
|
+
options2,
|
|
13931
|
+
cb2,
|
|
13932
|
+
startTime
|
|
13933
|
+
));
|
|
13934
|
+
} : function go$readdir2(path3, options2, cb2, startTime) {
|
|
13935
|
+
return fs$readdir(path3, options2, fs$readdirCallback(
|
|
13936
|
+
path3,
|
|
13937
|
+
options2,
|
|
13938
|
+
cb2,
|
|
13939
|
+
startTime
|
|
13940
|
+
));
|
|
13941
|
+
};
|
|
13942
|
+
return go$readdir(path2, options, cb);
|
|
13943
|
+
function fs$readdirCallback(path3, options2, cb2, startTime) {
|
|
13944
|
+
return function(err, files) {
|
|
13945
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
13946
|
+
enqueue([
|
|
13947
|
+
go$readdir,
|
|
13948
|
+
[path3, options2, cb2],
|
|
13949
|
+
err,
|
|
13950
|
+
startTime || Date.now(),
|
|
13951
|
+
Date.now()
|
|
13952
|
+
]);
|
|
13953
|
+
else {
|
|
13954
|
+
if (files && files.sort)
|
|
13955
|
+
files.sort();
|
|
13956
|
+
if (typeof cb2 === "function")
|
|
13957
|
+
cb2.call(this, err, files);
|
|
13958
|
+
}
|
|
13959
|
+
};
|
|
13960
|
+
}
|
|
13961
|
+
}
|
|
13962
|
+
if (process.version.substr(0, 4) === "v0.8") {
|
|
13963
|
+
var legStreams = legacy(fs3);
|
|
13964
|
+
ReadStream = legStreams.ReadStream;
|
|
13965
|
+
WriteStream = legStreams.WriteStream;
|
|
13966
|
+
}
|
|
13967
|
+
var fs$ReadStream = fs3.ReadStream;
|
|
13968
|
+
if (fs$ReadStream) {
|
|
13969
|
+
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
|
13970
|
+
ReadStream.prototype.open = ReadStream$open;
|
|
13971
|
+
}
|
|
13972
|
+
var fs$WriteStream = fs3.WriteStream;
|
|
13973
|
+
if (fs$WriteStream) {
|
|
13974
|
+
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
13975
|
+
WriteStream.prototype.open = WriteStream$open;
|
|
13976
|
+
}
|
|
13977
|
+
Object.defineProperty(fs3, "ReadStream", {
|
|
13978
|
+
get: function() {
|
|
13979
|
+
return ReadStream;
|
|
13980
|
+
},
|
|
13981
|
+
set: function(val) {
|
|
13982
|
+
ReadStream = val;
|
|
13983
|
+
},
|
|
13984
|
+
enumerable: true,
|
|
13985
|
+
configurable: true
|
|
13986
|
+
});
|
|
13987
|
+
Object.defineProperty(fs3, "WriteStream", {
|
|
13988
|
+
get: function() {
|
|
13989
|
+
return WriteStream;
|
|
13990
|
+
},
|
|
13991
|
+
set: function(val) {
|
|
13992
|
+
WriteStream = val;
|
|
13993
|
+
},
|
|
13994
|
+
enumerable: true,
|
|
13995
|
+
configurable: true
|
|
13996
|
+
});
|
|
13997
|
+
var FileReadStream = ReadStream;
|
|
13998
|
+
Object.defineProperty(fs3, "FileReadStream", {
|
|
13999
|
+
get: function() {
|
|
14000
|
+
return FileReadStream;
|
|
14001
|
+
},
|
|
14002
|
+
set: function(val) {
|
|
14003
|
+
FileReadStream = val;
|
|
14004
|
+
},
|
|
14005
|
+
enumerable: true,
|
|
14006
|
+
configurable: true
|
|
14007
|
+
});
|
|
14008
|
+
var FileWriteStream = WriteStream;
|
|
14009
|
+
Object.defineProperty(fs3, "FileWriteStream", {
|
|
14010
|
+
get: function() {
|
|
14011
|
+
return FileWriteStream;
|
|
14012
|
+
},
|
|
14013
|
+
set: function(val) {
|
|
14014
|
+
FileWriteStream = val;
|
|
14015
|
+
},
|
|
14016
|
+
enumerable: true,
|
|
14017
|
+
configurable: true
|
|
14018
|
+
});
|
|
14019
|
+
function ReadStream(path2, options) {
|
|
14020
|
+
if (this instanceof ReadStream)
|
|
14021
|
+
return fs$ReadStream.apply(this, arguments), this;
|
|
14022
|
+
else
|
|
14023
|
+
return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
|
|
14024
|
+
}
|
|
14025
|
+
function ReadStream$open() {
|
|
14026
|
+
var that = this;
|
|
14027
|
+
open(that.path, that.flags, that.mode, function(err, fd) {
|
|
14028
|
+
if (err) {
|
|
14029
|
+
if (that.autoClose)
|
|
14030
|
+
that.destroy();
|
|
14031
|
+
that.emit("error", err);
|
|
14032
|
+
} else {
|
|
14033
|
+
that.fd = fd;
|
|
14034
|
+
that.emit("open", fd);
|
|
14035
|
+
that.read();
|
|
14036
|
+
}
|
|
14037
|
+
});
|
|
14038
|
+
}
|
|
14039
|
+
function WriteStream(path2, options) {
|
|
14040
|
+
if (this instanceof WriteStream)
|
|
14041
|
+
return fs$WriteStream.apply(this, arguments), this;
|
|
14042
|
+
else
|
|
14043
|
+
return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
|
|
14044
|
+
}
|
|
14045
|
+
function WriteStream$open() {
|
|
14046
|
+
var that = this;
|
|
14047
|
+
open(that.path, that.flags, that.mode, function(err, fd) {
|
|
14048
|
+
if (err) {
|
|
14049
|
+
that.destroy();
|
|
14050
|
+
that.emit("error", err);
|
|
14051
|
+
} else {
|
|
14052
|
+
that.fd = fd;
|
|
14053
|
+
that.emit("open", fd);
|
|
14054
|
+
}
|
|
14055
|
+
});
|
|
14056
|
+
}
|
|
14057
|
+
function createReadStream(path2, options) {
|
|
14058
|
+
return new fs3.ReadStream(path2, options);
|
|
14059
|
+
}
|
|
14060
|
+
function createWriteStream(path2, options) {
|
|
14061
|
+
return new fs3.WriteStream(path2, options);
|
|
14062
|
+
}
|
|
14063
|
+
var fs$open = fs3.open;
|
|
14064
|
+
fs3.open = open;
|
|
14065
|
+
function open(path2, flags, mode, cb) {
|
|
14066
|
+
if (typeof mode === "function")
|
|
14067
|
+
cb = mode, mode = null;
|
|
14068
|
+
return go$open(path2, flags, mode, cb);
|
|
14069
|
+
function go$open(path3, flags2, mode2, cb2, startTime) {
|
|
14070
|
+
return fs$open(path3, flags2, mode2, function(err, fd) {
|
|
14071
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
14072
|
+
enqueue([go$open, [path3, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
14073
|
+
else {
|
|
14074
|
+
if (typeof cb2 === "function")
|
|
14075
|
+
cb2.apply(this, arguments);
|
|
14076
|
+
}
|
|
14077
|
+
});
|
|
14078
|
+
}
|
|
14079
|
+
}
|
|
14080
|
+
return fs3;
|
|
14081
|
+
}
|
|
14082
|
+
function enqueue(elem) {
|
|
14083
|
+
debug("ENQUEUE", elem[0].name, elem[1]);
|
|
14084
|
+
fs2[gracefulQueue].push(elem);
|
|
14085
|
+
retry();
|
|
14086
|
+
}
|
|
14087
|
+
var retryTimer;
|
|
14088
|
+
function resetQueue() {
|
|
14089
|
+
var now = Date.now();
|
|
14090
|
+
for (var i = 0; i < fs2[gracefulQueue].length; ++i) {
|
|
14091
|
+
if (fs2[gracefulQueue][i].length > 2) {
|
|
14092
|
+
fs2[gracefulQueue][i][3] = now;
|
|
14093
|
+
fs2[gracefulQueue][i][4] = now;
|
|
14094
|
+
}
|
|
14095
|
+
}
|
|
14096
|
+
retry();
|
|
14097
|
+
}
|
|
14098
|
+
function retry() {
|
|
14099
|
+
clearTimeout(retryTimer);
|
|
14100
|
+
retryTimer = void 0;
|
|
14101
|
+
if (fs2[gracefulQueue].length === 0)
|
|
14102
|
+
return;
|
|
14103
|
+
var elem = fs2[gracefulQueue].shift();
|
|
14104
|
+
var fn2 = elem[0];
|
|
14105
|
+
var args2 = elem[1];
|
|
14106
|
+
var err = elem[2];
|
|
14107
|
+
var startTime = elem[3];
|
|
14108
|
+
var lastTime = elem[4];
|
|
14109
|
+
if (startTime === void 0) {
|
|
14110
|
+
debug("RETRY", fn2.name, args2);
|
|
14111
|
+
fn2.apply(null, args2);
|
|
14112
|
+
} else if (Date.now() - startTime >= 6e4) {
|
|
14113
|
+
debug("TIMEOUT", fn2.name, args2);
|
|
14114
|
+
var cb = args2.pop();
|
|
14115
|
+
if (typeof cb === "function")
|
|
14116
|
+
cb.call(null, err);
|
|
14117
|
+
} else {
|
|
14118
|
+
var sinceAttempt = Date.now() - lastTime;
|
|
14119
|
+
var sinceStart = Math.max(lastTime - startTime, 1);
|
|
14120
|
+
var desiredDelay = Math.min(sinceStart * 1.2, 100);
|
|
14121
|
+
if (sinceAttempt >= desiredDelay) {
|
|
14122
|
+
debug("RETRY", fn2.name, args2);
|
|
14123
|
+
fn2.apply(null, args2.concat([startTime]));
|
|
14124
|
+
} else {
|
|
14125
|
+
fs2[gracefulQueue].push(elem);
|
|
14126
|
+
}
|
|
14127
|
+
}
|
|
14128
|
+
if (retryTimer === void 0) {
|
|
14129
|
+
retryTimer = setTimeout(retry, 0);
|
|
14130
|
+
}
|
|
14131
|
+
}
|
|
14132
|
+
}
|
|
14133
|
+
});
|
|
14134
|
+
|
|
13327
14135
|
// ../node_modules/.pnpm/@pnpm+network.ca-file@1.0.2/node_modules/@pnpm/network.ca-file/dist/ca-file.js
|
|
13328
14136
|
var require_ca_file = __commonJS({
|
|
13329
14137
|
"../node_modules/.pnpm/@pnpm+network.ca-file@1.0.2/node_modules/@pnpm/network.ca-file/dist/ca-file.js"(exports2) {
|
|
@@ -13333,7 +14141,7 @@ var require_ca_file = __commonJS({
|
|
|
13333
14141
|
};
|
|
13334
14142
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
13335
14143
|
exports2.readCAFileSync = void 0;
|
|
13336
|
-
var graceful_fs_1 = __importDefault3(
|
|
14144
|
+
var graceful_fs_1 = __importDefault3(require_graceful_fs2());
|
|
13337
14145
|
function readCAFileSync(filePath) {
|
|
13338
14146
|
try {
|
|
13339
14147
|
const contents = graceful_fs_1.default.readFileSync(filePath, "utf8");
|
|
@@ -24685,6 +25493,9 @@ var require_dirs = __commonJS({
|
|
|
24685
25493
|
}
|
|
24686
25494
|
exports2.getStateDir = getStateDir;
|
|
24687
25495
|
function getDataDir(opts) {
|
|
25496
|
+
if (opts.env.PNPM_HOME) {
|
|
25497
|
+
return opts.env.PNPM_HOME;
|
|
25498
|
+
}
|
|
24688
25499
|
if (opts.env.XDG_DATA_HOME) {
|
|
24689
25500
|
return path_1.default.join(opts.env.XDG_DATA_HOME, "pnpm");
|
|
24690
25501
|
}
|
|
@@ -25347,6 +26158,7 @@ var require_lib21 = __commonJS({
|
|
|
25347
26158
|
offline: Boolean,
|
|
25348
26159
|
"only-built-dependencies": [String],
|
|
25349
26160
|
"package-import-method": ["auto", "hardlink", "clone", "copy"],
|
|
26161
|
+
"patches-dir": String,
|
|
25350
26162
|
pnpmfile: String,
|
|
25351
26163
|
"prefer-frozen-lockfile": Boolean,
|
|
25352
26164
|
"prefer-offline": Boolean,
|
|
@@ -25545,7 +26357,7 @@ var require_lib21 = __commonJS({
|
|
|
25545
26357
|
}
|
|
25546
26358
|
return void 0;
|
|
25547
26359
|
})();
|
|
25548
|
-
pnpmConfig.pnpmHomeDir =
|
|
26360
|
+
pnpmConfig.pnpmHomeDir = (0, dirs_1.getDataDir)(process);
|
|
25549
26361
|
if (cliOptions["global"]) {
|
|
25550
26362
|
let globalDirRoot;
|
|
25551
26363
|
if (pnpmConfig["globalDir"]) {
|
|
@@ -108250,9 +109062,9 @@ ${versionDir}`;
|
|
|
108250
109062
|
}
|
|
108251
109063
|
});
|
|
108252
109064
|
|
|
108253
|
-
// ../node_modules/.pnpm/@zkochan+cmd-shim@
|
|
109065
|
+
// ../node_modules/.pnpm/@zkochan+cmd-shim@6.0.0/node_modules/@zkochan/cmd-shim/index.js
|
|
108254
109066
|
var require_cmd_shim = __commonJS({
|
|
108255
|
-
"../node_modules/.pnpm/@zkochan+cmd-shim@
|
|
109067
|
+
"../node_modules/.pnpm/@zkochan+cmd-shim@6.0.0/node_modules/@zkochan/cmd-shim/index.js"(exports2, module2) {
|
|
108256
109068
|
"use strict";
|
|
108257
109069
|
cmdShim.ifExists = cmdShimIfExists;
|
|
108258
109070
|
var util_1 = require("util");
|
|
@@ -108403,7 +109215,7 @@ var require_cmd_shim = __commonJS({
|
|
|
108403
109215
|
cmd += `@IF NOT DEFINED NODE_PATH (\r
|
|
108404
109216
|
@SET "NODE_PATH=${nodePath}"\r
|
|
108405
109217
|
) ELSE (\r
|
|
108406
|
-
@SET "NODE_PATH
|
|
109218
|
+
@SET "NODE_PATH=${nodePath};%NODE_PATH%"\r
|
|
108407
109219
|
)\r
|
|
108408
109220
|
`;
|
|
108409
109221
|
}
|
|
@@ -108457,7 +109269,7 @@ esac
|
|
|
108457
109269
|
sh += `if [ -z "$NODE_PATH" ]; then
|
|
108458
109270
|
export NODE_PATH="${shNodePath}"
|
|
108459
109271
|
else
|
|
108460
|
-
export NODE_PATH="$
|
|
109272
|
+
export NODE_PATH="${shNodePath}:$NODE_PATH"
|
|
108461
109273
|
fi
|
|
108462
109274
|
`;
|
|
108463
109275
|
}
|
|
@@ -108525,7 +109337,7 @@ ${shNodePath ? ` $new_node_path="${shNodePath}"
|
|
|
108525
109337
|
pwsh += `if ([string]::IsNullOrEmpty($env_node_path)) {
|
|
108526
109338
|
$env:NODE_PATH=$new_node_path
|
|
108527
109339
|
} else {
|
|
108528
|
-
$env:NODE_PATH="$
|
|
109340
|
+
$env:NODE_PATH="$new_node_path$pathsep$env_node_path"
|
|
108529
109341
|
}
|
|
108530
109342
|
`;
|
|
108531
109343
|
}
|
|
@@ -109729,7 +110541,7 @@ var require_cloneRegExp = __commonJS({
|
|
|
109729
110541
|
});
|
|
109730
110542
|
|
|
109731
110543
|
// ../node_modules/.pnpm/@pnpm+ramda@0.28.1/node_modules/@pnpm/ramda/src/internal/_clone.js
|
|
109732
|
-
var
|
|
110544
|
+
var require_clone3 = __commonJS({
|
|
109733
110545
|
"../node_modules/.pnpm/@pnpm+ramda@0.28.1/node_modules/@pnpm/ramda/src/internal/_clone.js"(exports2, module2) {
|
|
109734
110546
|
var _cloneRegExp = require_cloneRegExp();
|
|
109735
110547
|
var type = require_type2();
|
|
@@ -109782,9 +110594,9 @@ var require_clone2 = __commonJS({
|
|
|
109782
110594
|
});
|
|
109783
110595
|
|
|
109784
110596
|
// ../node_modules/.pnpm/@pnpm+ramda@0.28.1/node_modules/@pnpm/ramda/src/clone.js
|
|
109785
|
-
var
|
|
110597
|
+
var require_clone4 = __commonJS({
|
|
109786
110598
|
"../node_modules/.pnpm/@pnpm+ramda@0.28.1/node_modules/@pnpm/ramda/src/clone.js"(exports2, module2) {
|
|
109787
|
-
var _clone =
|
|
110599
|
+
var _clone = require_clone3();
|
|
109788
110600
|
var _curry1 = require_curry1();
|
|
109789
110601
|
var clone = /* @__PURE__ */ _curry1(function clone2(value) {
|
|
109790
110602
|
return value != null && typeof value.clone === "function" ? value.clone() : _clone(value, [], [], true);
|
|
@@ -110417,7 +111229,7 @@ var require_lib69 = __commonJS({
|
|
|
110417
111229
|
var lru_cache_1 = __importDefault3(require_lru_cache3());
|
|
110418
111230
|
var normalize_path_1 = __importDefault3(require_normalize_path());
|
|
110419
111231
|
var p_memoize_1 = __importDefault3(require_p_memoize());
|
|
110420
|
-
var clone_1 = __importDefault3(
|
|
111232
|
+
var clone_1 = __importDefault3(require_clone4());
|
|
110421
111233
|
var semver_12 = __importDefault3(require_semver2());
|
|
110422
111234
|
var ssri_1 = __importDefault3(require_lib44());
|
|
110423
111235
|
var pickPackage_1 = require_pickPackage();
|
|
@@ -125299,7 +126111,7 @@ var require_readLockfiles = __commonJS({
|
|
|
125299
126111
|
var lockfile_file_1 = require_lib84();
|
|
125300
126112
|
var logger_1 = require_lib6();
|
|
125301
126113
|
var ci_info_1 = require_ci_info();
|
|
125302
|
-
var clone_1 = __importDefault3(
|
|
126114
|
+
var clone_1 = __importDefault3(require_clone4());
|
|
125303
126115
|
var equals_1 = __importDefault3(require_equals2());
|
|
125304
126116
|
async function readLockfiles(opts) {
|
|
125305
126117
|
const wantedLockfileVersion = opts.useLockfileV6 ? constants_1.LOCKFILE_VERSION_V6 : constants_1.LOCKFILE_VERSION;
|
|
@@ -125399,7 +126211,7 @@ var require_lib107 = __commonJS({
|
|
|
125399
126211
|
var types_1 = require_lib25();
|
|
125400
126212
|
var rimraf_1 = __importDefault3(require_rimraf2());
|
|
125401
126213
|
var path_absolute_1 = __importDefault3(require_path_absolute());
|
|
125402
|
-
var clone_1 = __importDefault3(
|
|
126214
|
+
var clone_1 = __importDefault3(require_clone4());
|
|
125403
126215
|
var equals_1 = __importDefault3(require_equals2());
|
|
125404
126216
|
var checkCompatibility_1 = require_checkCompatibility();
|
|
125405
126217
|
var UnexpectedStoreError_1 = require_UnexpectedStoreError();
|
|
@@ -214218,7 +215030,7 @@ var require_xreduceBy = __commonJS({
|
|
|
214218
215030
|
// ../node_modules/.pnpm/@pnpm+ramda@0.28.1/node_modules/@pnpm/ramda/src/reduceBy.js
|
|
214219
215031
|
var require_reduceBy = __commonJS({
|
|
214220
215032
|
"../node_modules/.pnpm/@pnpm+ramda@0.28.1/node_modules/@pnpm/ramda/src/reduceBy.js"(exports2, module2) {
|
|
214221
|
-
var _clone =
|
|
215033
|
+
var _clone = require_clone3();
|
|
214222
215034
|
var _curryN = require_curryN();
|
|
214223
215035
|
var _dispatchable = require_dispatchable();
|
|
214224
215036
|
var _has = require_has();
|
|
@@ -215493,7 +216305,7 @@ var require_stepCat = __commonJS({
|
|
|
215493
216305
|
// ../node_modules/.pnpm/@pnpm+ramda@0.28.1/node_modules/@pnpm/ramda/src/into.js
|
|
215494
216306
|
var require_into = __commonJS({
|
|
215495
216307
|
"../node_modules/.pnpm/@pnpm+ramda@0.28.1/node_modules/@pnpm/ramda/src/into.js"(exports2, module2) {
|
|
215496
|
-
var _clone =
|
|
216308
|
+
var _clone = require_clone3();
|
|
215497
216309
|
var _curry3 = require_curry3();
|
|
215498
216310
|
var _isTransformer = require_isTransformer();
|
|
215499
216311
|
var _reduce = require_reduce2();
|
|
@@ -217456,7 +218268,7 @@ var require_src10 = __commonJS({
|
|
|
217456
218268
|
module2.exports.call = require_call();
|
|
217457
218269
|
module2.exports.chain = require_chain2();
|
|
217458
218270
|
module2.exports.clamp = require_clamp();
|
|
217459
|
-
module2.exports.clone =
|
|
218271
|
+
module2.exports.clone = require_clone4();
|
|
217460
218272
|
module2.exports.collectBy = require_collectBy();
|
|
217461
218273
|
module2.exports.comparator = require_comparator2();
|
|
217462
218274
|
module2.exports.complement = require_complement2();
|
|
@@ -219412,6 +220224,7 @@ var require_patchCommit = __commonJS({
|
|
|
219412
220224
|
var plugin_commands_installation_1 = require_lib146();
|
|
219413
220225
|
var read_package_json_1 = require_lib41();
|
|
219414
220226
|
var read_project_manifest_1 = require_lib16();
|
|
220227
|
+
var normalize_path_1 = __importDefault3(require_normalize_path());
|
|
219415
220228
|
var pick_1 = __importDefault3(require_pick());
|
|
219416
220229
|
var safe_execa_1 = __importDefault3(require_lib65());
|
|
219417
220230
|
var escape_string_regexp_1 = __importDefault3(require_escape_string_regexp2());
|
|
@@ -219421,14 +220234,22 @@ var require_patchCommit = __commonJS({
|
|
|
219421
220234
|
var parse_wanted_dependency_1 = require_lib136();
|
|
219422
220235
|
exports2.rcOptionsTypes = cliOptionsTypes;
|
|
219423
220236
|
function cliOptionsTypes() {
|
|
219424
|
-
return (0, pick_1.default)([], config_1.types);
|
|
220237
|
+
return (0, pick_1.default)(["patches-dir"], config_1.types);
|
|
219425
220238
|
}
|
|
219426
220239
|
exports2.cliOptionsTypes = cliOptionsTypes;
|
|
219427
220240
|
exports2.commandNames = ["patch-commit"];
|
|
219428
220241
|
function help() {
|
|
219429
220242
|
return (0, render_help_1.default)({
|
|
219430
220243
|
description: "Generate a patch out of a directory",
|
|
219431
|
-
descriptionLists: [
|
|
220244
|
+
descriptionLists: [{
|
|
220245
|
+
title: "Options",
|
|
220246
|
+
list: [
|
|
220247
|
+
{
|
|
220248
|
+
description: "The generated patch file will be saved to this directory",
|
|
220249
|
+
name: "--patches-dir"
|
|
220250
|
+
}
|
|
220251
|
+
]
|
|
220252
|
+
}],
|
|
219432
220253
|
url: (0, cli_utils_1.docsUrl)("patch-commit"),
|
|
219433
220254
|
usages: ["pnpm patch-commit <patchDir>"]
|
|
219434
220255
|
});
|
|
@@ -219437,7 +220258,8 @@ var require_patchCommit = __commonJS({
|
|
|
219437
220258
|
async function handler(opts, params) {
|
|
219438
220259
|
const userDir = params[0];
|
|
219439
220260
|
const lockfileDir = opts.lockfileDir ?? opts.dir ?? process.cwd();
|
|
219440
|
-
const
|
|
220261
|
+
const patchesDirName = (0, normalize_path_1.default)(path_1.default.normalize(opts.patchesDir ?? "patches"));
|
|
220262
|
+
const patchesDir = path_1.default.join(lockfileDir, patchesDirName);
|
|
219441
220263
|
await fs_1.default.promises.mkdir(patchesDir, { recursive: true });
|
|
219442
220264
|
const patchedPkgManifest = await (0, read_package_json_1.readPackageJsonFromDir)(userDir);
|
|
219443
220265
|
const pkgNameAndVersion = `${patchedPkgManifest.name}@${patchedPkgManifest.version}`;
|
|
@@ -219455,7 +220277,7 @@ var require_patchCommit = __commonJS({
|
|
|
219455
220277
|
} else if (!rootProjectManifest.pnpm.patchedDependencies) {
|
|
219456
220278
|
rootProjectManifest.pnpm.patchedDependencies = {};
|
|
219457
220279
|
}
|
|
219458
|
-
rootProjectManifest.pnpm.patchedDependencies[pkgNameAndVersion] =
|
|
220280
|
+
rootProjectManifest.pnpm.patchedDependencies[pkgNameAndVersion] = `${patchesDirName}/${patchFileName}.patch`;
|
|
219459
220281
|
await writeProjectManifest(rootProjectManifest);
|
|
219460
220282
|
if (opts?.selectedProjectsGraph?.[lockfileDir]) {
|
|
219461
220283
|
opts.selectedProjectsGraph[lockfileDir].package.manifest = rootProjectManifest;
|