npm-pkg-lint 5.2.0 → 5.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +117 -116
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4587,7 +4587,7 @@ import * as Ps from "zlib";
|
|
|
4587
4587
|
import en from "zlib";
|
|
4588
4588
|
import { posix as Zt } from "node:path";
|
|
4589
4589
|
import { basename as _n } from "node:path";
|
|
4590
|
-
import
|
|
4590
|
+
import mi from "fs";
|
|
4591
4591
|
import X from "fs";
|
|
4592
4592
|
import js from "path";
|
|
4593
4593
|
import { win32 as Pn } from "node:path";
|
|
@@ -4595,7 +4595,7 @@ import ar from "path";
|
|
|
4595
4595
|
import Br from "node:fs";
|
|
4596
4596
|
import co from "node:assert";
|
|
4597
4597
|
import { randomBytes as Mr } from "node:crypto";
|
|
4598
|
-
import
|
|
4598
|
+
import u from "node:fs";
|
|
4599
4599
|
import R from "node:path";
|
|
4600
4600
|
import pr from "fs";
|
|
4601
4601
|
import wi from "node:fs";
|
|
@@ -4953,7 +4953,7 @@ var Jr = I.writev;
|
|
|
4953
4953
|
var ht = /* @__PURE__ */ Symbol("_autoClose");
|
|
4954
4954
|
var H = /* @__PURE__ */ Symbol("_close");
|
|
4955
4955
|
var te = /* @__PURE__ */ Symbol("_ended");
|
|
4956
|
-
var
|
|
4956
|
+
var m = /* @__PURE__ */ Symbol("_fd");
|
|
4957
4957
|
var Ni = /* @__PURE__ */ Symbol("_finished");
|
|
4958
4958
|
var tt2 = /* @__PURE__ */ Symbol("_flags");
|
|
4959
4959
|
var Ai = /* @__PURE__ */ Symbol("_flush");
|
|
@@ -4980,7 +4980,7 @@ var Me = /* @__PURE__ */ Symbol("_defaultFlag");
|
|
|
4980
4980
|
var bt = /* @__PURE__ */ Symbol("_errored");
|
|
4981
4981
|
var _t = class extends A {
|
|
4982
4982
|
[bt] = false;
|
|
4983
|
-
[
|
|
4983
|
+
[m];
|
|
4984
4984
|
[U];
|
|
4985
4985
|
[Ci];
|
|
4986
4986
|
[j] = false;
|
|
@@ -4989,10 +4989,10 @@ var _t = class extends A {
|
|
|
4989
4989
|
[ht];
|
|
4990
4990
|
constructor(t, e) {
|
|
4991
4991
|
if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
|
|
4992
|
-
this[bt] = false, this[
|
|
4992
|
+
this[bt] = false, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[U] = t, this[Ci] = e.readSize || 16 * 1024 * 1024, this[j] = false, this[Fi] = typeof e.size == "number" ? e.size : 1 / 0, this[ee] = this[Fi], this[ht] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[m] == "number" ? this[zt]() : this[at]();
|
|
4993
4993
|
}
|
|
4994
4994
|
get fd() {
|
|
4995
|
-
return this[
|
|
4995
|
+
return this[m];
|
|
4996
4996
|
}
|
|
4997
4997
|
get path() {
|
|
4998
4998
|
return this[U];
|
|
@@ -5007,7 +5007,7 @@ var _t = class extends A {
|
|
|
5007
5007
|
I.open(this[U], "r", (t, e) => this[Ht](t, e));
|
|
5008
5008
|
}
|
|
5009
5009
|
[Ht](t, e) {
|
|
5010
|
-
t ? this[Ut](t) : (this[
|
|
5010
|
+
t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[zt]());
|
|
5011
5011
|
}
|
|
5012
5012
|
[vi]() {
|
|
5013
5013
|
return Buffer.allocUnsafe(Math.min(this[Ci], this[ee]));
|
|
@@ -5017,16 +5017,16 @@ var _t = class extends A {
|
|
|
5017
5017
|
this[j] = true;
|
|
5018
5018
|
let t = this[vi]();
|
|
5019
5019
|
if (t.length === 0) return process.nextTick(() => this[Ii](null, 0, t));
|
|
5020
|
-
I.read(this[
|
|
5020
|
+
I.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ii](e, i, r));
|
|
5021
5021
|
}
|
|
5022
5022
|
}
|
|
5023
5023
|
[Ii](t, e, i) {
|
|
5024
5024
|
this[j] = false, t ? this[Ut](t) : this[ki](e, i) && this[zt]();
|
|
5025
5025
|
}
|
|
5026
5026
|
[H]() {
|
|
5027
|
-
if (this[ht] && typeof this[
|
|
5028
|
-
let t = this[
|
|
5029
|
-
this[
|
|
5027
|
+
if (this[ht] && typeof this[m] == "number") {
|
|
5028
|
+
let t = this[m];
|
|
5029
|
+
this[m] = void 0, I.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
|
|
5030
5030
|
}
|
|
5031
5031
|
}
|
|
5032
5032
|
[Ut](t) {
|
|
@@ -5042,7 +5042,7 @@ var _t = class extends A {
|
|
|
5042
5042
|
case "finish":
|
|
5043
5043
|
return false;
|
|
5044
5044
|
case "drain":
|
|
5045
|
-
return typeof this[
|
|
5045
|
+
return typeof this[m] == "number" && this[zt](), false;
|
|
5046
5046
|
case "error":
|
|
5047
5047
|
return this[bt] ? false : (this[bt] = true, super.emit(t, ...e));
|
|
5048
5048
|
default:
|
|
@@ -5065,7 +5065,7 @@ var Be = class extends _t {
|
|
|
5065
5065
|
if (!this[j]) {
|
|
5066
5066
|
this[j] = true;
|
|
5067
5067
|
do {
|
|
5068
|
-
let e = this[vi](), i = e.length === 0 ? 0 : I.readSync(this[
|
|
5068
|
+
let e = this[vi](), i = e.length === 0 ? 0 : I.readSync(this[m], e, 0, e.length, null);
|
|
5069
5069
|
if (!this[ki](i, e)) break;
|
|
5070
5070
|
} while (true);
|
|
5071
5071
|
this[j] = false;
|
|
@@ -5076,9 +5076,9 @@ var Be = class extends _t {
|
|
|
5076
5076
|
}
|
|
5077
5077
|
}
|
|
5078
5078
|
[H]() {
|
|
5079
|
-
if (this[ht] && typeof this[
|
|
5080
|
-
let t = this[
|
|
5081
|
-
this[
|
|
5079
|
+
if (this[ht] && typeof this[m] == "number") {
|
|
5080
|
+
let t = this[m];
|
|
5081
|
+
this[m] = void 0, I.closeSync(t), this.emit("close");
|
|
5082
5082
|
}
|
|
5083
5083
|
}
|
|
5084
5084
|
};
|
|
@@ -5093,15 +5093,15 @@ var et = class extends Qr {
|
|
|
5093
5093
|
[U];
|
|
5094
5094
|
[ie];
|
|
5095
5095
|
[ht];
|
|
5096
|
-
[
|
|
5096
|
+
[m];
|
|
5097
5097
|
[Me];
|
|
5098
5098
|
[tt2];
|
|
5099
5099
|
[Ni] = false;
|
|
5100
5100
|
[ot];
|
|
5101
5101
|
constructor(t, e) {
|
|
5102
|
-
e = e || {}, super(e), this[U] = t, this[
|
|
5102
|
+
e = e || {}, super(e), this[U] = t, this[m] = typeof e.fd == "number" ? e.fd : void 0, this[ie] = e.mode === void 0 ? 438 : e.mode, this[ot] = typeof e.start == "number" ? e.start : void 0, this[ht] = typeof e.autoClose == "boolean" ? e.autoClose : true;
|
|
5103
5103
|
let i = this[ot] !== void 0 ? "r+" : "w";
|
|
5104
|
-
this[Me] = e.flags === void 0, this[tt2] = e.flags === void 0 ? i : e.flags, this[
|
|
5104
|
+
this[Me] = e.flags === void 0, this[tt2] = e.flags === void 0 ? i : e.flags, this[m] === void 0 && this[at]();
|
|
5105
5105
|
}
|
|
5106
5106
|
emit(t, ...e) {
|
|
5107
5107
|
if (t === "error") {
|
|
@@ -5111,7 +5111,7 @@ var et = class extends Qr {
|
|
|
5111
5111
|
return super.emit(t, ...e);
|
|
5112
5112
|
}
|
|
5113
5113
|
get fd() {
|
|
5114
|
-
return this[
|
|
5114
|
+
return this[m];
|
|
5115
5115
|
}
|
|
5116
5116
|
get path() {
|
|
5117
5117
|
return this[U];
|
|
@@ -5123,16 +5123,16 @@ var et = class extends Qr {
|
|
|
5123
5123
|
I.open(this[U], this[tt2], this[ie], (t, e) => this[Ht](t, e));
|
|
5124
5124
|
}
|
|
5125
5125
|
[Ht](t, e) {
|
|
5126
|
-
this[Me] && this[tt2] === "r+" && t && t.code === "ENOENT" ? (this[tt2] = "w", this[at]()) : t ? this[Ut](t) : (this[
|
|
5126
|
+
this[Me] && this[tt2] === "r+" && t && t.code === "ENOENT" ? (this[tt2] = "w", this[at]()) : t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[gt] || this[Ai]());
|
|
5127
5127
|
}
|
|
5128
5128
|
end(t, e) {
|
|
5129
|
-
return t && this.write(t, e), this[te] = true, !this[gt] && !this[Y].length && typeof this[
|
|
5129
|
+
return t && this.write(t, e), this[te] = true, !this[gt] && !this[Y].length && typeof this[m] == "number" && this[Pt](null, 0), this;
|
|
5130
5130
|
}
|
|
5131
5131
|
write(t, e) {
|
|
5132
|
-
return typeof t == "string" && (t = Buffer.from(t, e)), this[te] ? (this.emit("error", new Error("write() after end()")), false) : this[
|
|
5132
|
+
return typeof t == "string" && (t = Buffer.from(t, e)), this[te] ? (this.emit("error", new Error("write() after end()")), false) : this[m] === void 0 || this[gt] || this[Y].length ? (this[Y].push(t), this[ke] = true, false) : (this[gt] = true, this[ve](t), true);
|
|
5133
5133
|
}
|
|
5134
5134
|
[ve](t) {
|
|
5135
|
-
I.write(this[
|
|
5135
|
+
I.write(this[m], t, 0, t.length, this[ot], (e, i) => this[Pt](e, i));
|
|
5136
5136
|
}
|
|
5137
5137
|
[Pt](t, e) {
|
|
5138
5138
|
t ? this[Ut](t) : (this[ot] !== void 0 && typeof e == "number" && (this[ot] += e), this[Y].length ? this[Ai]() : (this[gt] = false, this[te] && !this[Ni] ? (this[Ni] = true, this[H](), this.emit("finish")) : this[ke] && (this[ke] = false, this.emit("drain"))));
|
|
@@ -5142,13 +5142,13 @@ var et = class extends Qr {
|
|
|
5142
5142
|
else if (this[Y].length === 1) this[ve](this[Y].pop());
|
|
5143
5143
|
else {
|
|
5144
5144
|
let t = this[Y];
|
|
5145
|
-
this[Y] = [], Jr(this[
|
|
5145
|
+
this[Y] = [], Jr(this[m], t, this[ot], (e, i) => this[Pt](e, i));
|
|
5146
5146
|
}
|
|
5147
5147
|
}
|
|
5148
5148
|
[H]() {
|
|
5149
|
-
if (this[ht] && typeof this[
|
|
5150
|
-
let t = this[
|
|
5151
|
-
this[
|
|
5149
|
+
if (this[ht] && typeof this[m] == "number") {
|
|
5150
|
+
let t = this[m];
|
|
5151
|
+
this[m] = void 0, I.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
|
|
5152
5152
|
}
|
|
5153
5153
|
}
|
|
5154
5154
|
};
|
|
@@ -5165,15 +5165,15 @@ var Wt = class extends et {
|
|
|
5165
5165
|
this[Ht](null, t);
|
|
5166
5166
|
}
|
|
5167
5167
|
[H]() {
|
|
5168
|
-
if (this[ht] && typeof this[
|
|
5169
|
-
let t = this[
|
|
5170
|
-
this[
|
|
5168
|
+
if (this[ht] && typeof this[m] == "number") {
|
|
5169
|
+
let t = this[m];
|
|
5170
|
+
this[m] = void 0, I.closeSync(t), this.emit("close");
|
|
5171
5171
|
}
|
|
5172
5172
|
}
|
|
5173
5173
|
[ve](t) {
|
|
5174
5174
|
let e = true;
|
|
5175
5175
|
try {
|
|
5176
|
-
this[Pt](null, I.writeSync(this[
|
|
5176
|
+
this[Pt](null, I.writeSync(this[m], t, 0, t.length, this[ot])), e = false;
|
|
5177
5177
|
} finally {
|
|
5178
5178
|
if (e) try {
|
|
5179
5179
|
this[H]();
|
|
@@ -5432,7 +5432,7 @@ var dn = (s3) => Ve.has(s3);
|
|
|
5432
5432
|
var Ui = /* @__PURE__ */ new Set(["0", "", "1", "2", "3", "4", "5", "6", "7", "D"]);
|
|
5433
5433
|
var oe = /* @__PURE__ */ new Map([["0", "File"], ["", "OldFile"], ["1", "Link"], ["2", "SymbolicLink"], ["3", "CharacterDevice"], ["4", "BlockDevice"], ["5", "Directory"], ["6", "FIFO"], ["7", "ContiguousFile"], ["g", "GlobalExtendedHeader"], ["x", "ExtendedHeader"], ["A", "SolarisACL"], ["D", "GNUDumpDir"], ["I", "Inode"], ["K", "NextFileHasLongLinkpath"], ["L", "NextFileHasLongPath"], ["M", "ContinuationFile"], ["N", "OldGnuLongPath"], ["S", "SparseFile"], ["V", "TapeVolumeHeader"], ["X", "OldExtendedHeader"]]);
|
|
5434
5434
|
var Ve = new Map(Array.from(oe).map((s3) => [s3[1], s3[0]]));
|
|
5435
|
-
var
|
|
5435
|
+
var un = (s3) => s3 === void 0 || s3 < 0 ? void 0 : s3;
|
|
5436
5436
|
var F = class {
|
|
5437
5437
|
cksumValid = false;
|
|
5438
5438
|
needPax = false;
|
|
@@ -5461,7 +5461,7 @@ var F = class {
|
|
|
5461
5461
|
decode(t, e, i, r) {
|
|
5462
5462
|
if (e || (e = 0), !t || !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
|
|
5463
5463
|
let n = xt(t, e + 156, 1), o = Ui.has(n), h = o ? i : void 0, a = o ? r : void 0;
|
|
5464
|
-
if (this.path = h?.path ?? xt(t, e, 100), this.mode = h?.mode ?? a?.mode ?? lt(t, e + 100, 8), this.uid = h?.uid ?? a?.uid ?? lt(t, e + 108, 8), this.gid = h?.gid ?? a?.gid ?? lt(t, e + 116, 8), this.size =
|
|
5464
|
+
if (this.path = h?.path ?? xt(t, e, 100), this.mode = h?.mode ?? a?.mode ?? lt(t, e + 100, 8), this.uid = h?.uid ?? a?.uid ?? lt(t, e + 108, 8), this.gid = h?.gid ?? a?.gid ?? lt(t, e + 116, 8), this.size = un(h?.size ?? a?.size ?? lt(t, e + 124, 12)), this.mtime = h?.mtime ?? a?.mtime ?? Wi(t, e + 136, 12), this.cksum = lt(t, e + 148, 12), a && this.#i(a, true), h && this.#i(h), ne(n) && (this.#t = n || "0"), this.#t === "0" && this.path.slice(-1) === "/" && (this.#t = "5"), this.#t === "5" && (this.size = 0), this.linkpath = xt(t, e + 157, 100), t.subarray(e + 257, e + 265).toString() === "ustar\x0000") if (this.uname = h?.uname ?? a?.uname ?? xt(t, e + 265, 32), this.gname = h?.gname ?? a?.gname ?? xt(t, e + 297, 32), this.devmaj = h?.devmaj ?? a?.devmaj ?? lt(t, e + 329, 8) ?? 0, this.devmin = h?.devmin ?? a?.devmin ?? lt(t, e + 337, 8) ?? 0, t[e + 475] !== 0) {
|
|
5465
5465
|
let c = xt(t, e + 345, 155);
|
|
5466
5466
|
this.path = c + "/" + this.path;
|
|
5467
5467
|
} else {
|
|
@@ -5478,7 +5478,7 @@ var F = class {
|
|
|
5478
5478
|
}
|
|
5479
5479
|
encode(t, e = 0) {
|
|
5480
5480
|
if (t || (t = this.block = Buffer.alloc(512)), this.#t === "Unsupported" && (this.#t = "0"), !(t.length >= e + 512)) throw new Error("need 512 bytes for header");
|
|
5481
|
-
let i = this.ctime || this.atime ? 130 : 155, r =
|
|
5481
|
+
let i = this.ctime || this.atime ? 130 : 155, r = mn(this.path || "", i), n = r[0], o = r[1];
|
|
5482
5482
|
this.needPax = !!r[2], this.needPax = Lt(t, e, 100, n) || this.needPax, this.needPax = ct(t, e + 100, 8, this.mode) || this.needPax, this.needPax = ct(t, e + 108, 8, this.uid) || this.needPax, this.needPax = ct(t, e + 116, 8, this.gid) || this.needPax, this.needPax = ct(t, e + 124, 12, this.size) || this.needPax, this.needPax = Gi(t, e + 136, 12, this.mtime) || this.needPax, t[e + 156] = Number(this.#t.codePointAt(0)), this.needPax = Lt(t, e + 157, 100, this.linkpath) || this.needPax, t.write("ustar\x0000", e + 257, 8), this.needPax = Lt(t, e + 265, 32, this.uname) || this.needPax, this.needPax = Lt(t, e + 297, 32, this.gname) || this.needPax, this.needPax = ct(t, e + 329, 8, this.devmaj) || this.needPax, this.needPax = ct(t, e + 337, 8, this.devmin) || this.needPax, this.needPax = Lt(t, e + 345, i, o) || this.needPax, t[e + 475] !== 0 ? this.needPax = Lt(t, e + 345, 155, o) || this.needPax : (this.needPax = Lt(t, e + 345, 130, o) || this.needPax, this.needPax = Gi(t, e + 476, 12, this.atime) || this.needPax, this.needPax = Gi(t, e + 488, 12, this.ctime) || this.needPax);
|
|
5483
5483
|
let h = 256;
|
|
5484
5484
|
for (let a = e; a < e + 148; a++) h += t[a];
|
|
@@ -5498,7 +5498,7 @@ var F = class {
|
|
|
5498
5498
|
else throw new TypeError("invalid entry type: " + t);
|
|
5499
5499
|
}
|
|
5500
5500
|
};
|
|
5501
|
-
var
|
|
5501
|
+
var mn = (s3, t) => {
|
|
5502
5502
|
let i = s3, r = "", n, o = Zt.parse(s3).root || ".";
|
|
5503
5503
|
if (Buffer.byteLength(i) < 100) n = [i, r, false];
|
|
5504
5504
|
else {
|
|
@@ -5691,7 +5691,7 @@ var dt = /* @__PURE__ */ Symbol("meta");
|
|
|
5691
5691
|
var Ys = /* @__PURE__ */ Symbol("emitMeta");
|
|
5692
5692
|
var p = /* @__PURE__ */ Symbol("buffer");
|
|
5693
5693
|
var st = /* @__PURE__ */ Symbol("queue");
|
|
5694
|
-
var
|
|
5694
|
+
var ut = /* @__PURE__ */ Symbol("ended");
|
|
5695
5695
|
var Yi = /* @__PURE__ */ Symbol("emittedEnd");
|
|
5696
5696
|
var At = /* @__PURE__ */ Symbol("emit");
|
|
5697
5697
|
var w = /* @__PURE__ */ Symbol("unzip");
|
|
@@ -5733,7 +5733,7 @@ var rt = class extends Dn {
|
|
|
5733
5733
|
[dt] = "";
|
|
5734
5734
|
[V];
|
|
5735
5735
|
[he];
|
|
5736
|
-
[
|
|
5736
|
+
[ut] = false;
|
|
5737
5737
|
[w];
|
|
5738
5738
|
[$] = false;
|
|
5739
5739
|
[It];
|
|
@@ -5871,7 +5871,7 @@ var rt = class extends Dn {
|
|
|
5871
5871
|
}
|
|
5872
5872
|
}
|
|
5873
5873
|
let h = this.brotli === void 0 && !o;
|
|
5874
|
-
if (this[w] === false && h) if (t.length < 512) if (this[
|
|
5874
|
+
if (this[w] === false && h) if (t.length < 512) if (this[ut]) this.brotli = true;
|
|
5875
5875
|
else return this[p] = t, i?.(), true;
|
|
5876
5876
|
else try {
|
|
5877
5877
|
new F(t.subarray(0, 512)), this.brotli = false;
|
|
@@ -5879,13 +5879,13 @@ var rt = class extends Dn {
|
|
|
5879
5879
|
this.brotli = true;
|
|
5880
5880
|
}
|
|
5881
5881
|
if (this[w] === void 0 || this[w] === false && (this.brotli || o)) {
|
|
5882
|
-
let a = this[
|
|
5883
|
-
this[
|
|
5882
|
+
let a = this[ut];
|
|
5883
|
+
this[ut] = false, this[w] = this[w] === void 0 ? new Ue({}) : o ? new Ke({}) : new Ge({}), this[w].on("data", (c) => {
|
|
5884
5884
|
this[Xs](c) && this[Xe](c);
|
|
5885
5885
|
}), this[w].on("error", (c) => {
|
|
5886
5886
|
this[$] || this.abort(c);
|
|
5887
5887
|
}), this[w].on("end", () => {
|
|
5888
|
-
this[
|
|
5888
|
+
this[ut] = true, this[Xe]();
|
|
5889
5889
|
}), this[Yt] = true, this[le] += t.length;
|
|
5890
5890
|
let l = !!this[w][a ? "end" : "write"](t);
|
|
5891
5891
|
return this[Yt] = false, i?.(), l;
|
|
@@ -5899,7 +5899,7 @@ var rt = class extends Dn {
|
|
|
5899
5899
|
t && !this[$] && (this[p] = this[p] ? Buffer.concat([this[p], t]) : t);
|
|
5900
5900
|
}
|
|
5901
5901
|
[Qe]() {
|
|
5902
|
-
if (this[
|
|
5902
|
+
if (this[ut] && !this[Yi] && !this[$] && !this[ae]) {
|
|
5903
5903
|
this[Yi] = true;
|
|
5904
5904
|
let t = this[Nt];
|
|
5905
5905
|
if (t?.blockRemain) {
|
|
@@ -5924,7 +5924,7 @@ var rt = class extends Dn {
|
|
|
5924
5924
|
}
|
|
5925
5925
|
this[ae] = false;
|
|
5926
5926
|
}
|
|
5927
|
-
(!this[p] || this[
|
|
5927
|
+
(!this[p] || this[ut]) && this[Qe]();
|
|
5928
5928
|
}
|
|
5929
5929
|
[qe](t) {
|
|
5930
5930
|
let e = 0, i = t.length;
|
|
@@ -5946,10 +5946,10 @@ var rt = class extends Dn {
|
|
|
5946
5946
|
e < i && (this[p] = this[p] ? Buffer.concat([t.subarray(e), this[p]]) : t.subarray(e));
|
|
5947
5947
|
}
|
|
5948
5948
|
end(t, e, i) {
|
|
5949
|
-
return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e)), i && this.once("finish", i), this[$] || (this[w] ? (t && (this[le] += t.length, this[w].write(t)), this[w].end()) : (this[
|
|
5949
|
+
return typeof t == "function" && (i = t, e = void 0, t = void 0), typeof e == "function" && (i = e, e = void 0), typeof t == "string" && (t = Buffer.from(t, e)), i && this.once("finish", i), this[$] || (this[w] ? (t && (this[le] += t.length, this[w].write(t)), this[w].end()) : (this[ut] = true, (this.brotli === void 0 || this.zstd === void 0) && (t = t || Buffer.alloc(0)), t && this.write(t), this[Qe]())), this;
|
|
5950
5950
|
}
|
|
5951
5951
|
};
|
|
5952
|
-
var
|
|
5952
|
+
var mt = (s3) => {
|
|
5953
5953
|
let t = s3.length - 1, e = -1;
|
|
5954
5954
|
for (; t > -1 && s3.charAt(t) === "/"; ) e = t, t--;
|
|
5955
5955
|
return e === -1 ? s3 : s3.slice(0, e);
|
|
@@ -5961,16 +5961,17 @@ var vn = (s3) => {
|
|
|
5961
5961
|
} : (e) => e.resume();
|
|
5962
5962
|
};
|
|
5963
5963
|
var Qi = (s3, t) => {
|
|
5964
|
-
let e = new Map(t.map((
|
|
5965
|
-
|
|
5966
|
-
|
|
5964
|
+
let e = new Map(t.map((o) => [mt(o), true])), i = s3.filter, r = 100, n = (o, h = "", a = 0) => {
|
|
5965
|
+
if (a >= r) return e.set(o, false), false;
|
|
5966
|
+
let l = h || kn(o).root || ".", c;
|
|
5967
|
+
if (o === l) c = false;
|
|
5967
5968
|
else {
|
|
5968
|
-
let
|
|
5969
|
-
|
|
5969
|
+
let d = e.get(o);
|
|
5970
|
+
c = d !== void 0 ? d : n(Fn(o), l, a + 1);
|
|
5970
5971
|
}
|
|
5971
|
-
return e.set(
|
|
5972
|
+
return e.set(o, c), c;
|
|
5972
5973
|
};
|
|
5973
|
-
s3.filter = i ? (
|
|
5974
|
+
s3.filter = i ? (o, h) => i(o, h) && n(mt(o)) : (o) => n(mt(o));
|
|
5974
5975
|
};
|
|
5975
5976
|
var Mn = (s3) => {
|
|
5976
5977
|
let t = new rt(s3), e = s3.file, i;
|
|
@@ -6027,7 +6028,7 @@ var Un = new Map(ei.map((s3, t) => [s3, ji[t]]));
|
|
|
6027
6028
|
var Hn = new Map(ji.map((s3, t) => [s3, ei[t]]));
|
|
6028
6029
|
var ts = (s3) => ei.reduce((t, e) => t.split(e).join(Un.get(e)), s3);
|
|
6029
6030
|
var Qs = (s3) => ji.reduce((t, e) => t.split(e).join(Hn.get(e)), s3);
|
|
6030
|
-
var rr = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""),
|
|
6031
|
+
var rr = (s3, t) => t ? (s3 = f(s3).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s3) : f(s3);
|
|
6031
6032
|
var Wn = 16 * 1024 * 1024;
|
|
6032
6033
|
var tr = /* @__PURE__ */ Symbol("process");
|
|
6033
6034
|
var er = /* @__PURE__ */ Symbol("file");
|
|
@@ -6454,16 +6455,16 @@ var hi = class s2 {
|
|
|
6454
6455
|
}
|
|
6455
6456
|
};
|
|
6456
6457
|
function Zn(s3, t, e) {
|
|
6457
|
-
let i = t, r = t ? t.next : s3.head, n = new
|
|
6458
|
+
let i = t, r = t ? t.next : s3.head, n = new ue(e, i, r, s3);
|
|
6458
6459
|
return n.next === void 0 && (s3.tail = n), n.prev === void 0 && (s3.head = n), s3.length++, n;
|
|
6459
6460
|
}
|
|
6460
6461
|
function Yn(s3, t) {
|
|
6461
|
-
s3.tail = new
|
|
6462
|
+
s3.tail = new ue(t, s3.tail, void 0, s3), s3.head || (s3.head = s3.tail), s3.length++;
|
|
6462
6463
|
}
|
|
6463
6464
|
function Kn(s3, t) {
|
|
6464
|
-
s3.head = new
|
|
6465
|
+
s3.head = new ue(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
|
|
6465
6466
|
}
|
|
6466
|
-
var
|
|
6467
|
+
var ue = class {
|
|
6467
6468
|
list;
|
|
6468
6469
|
next;
|
|
6469
6470
|
prev;
|
|
@@ -6488,7 +6489,7 @@ var pi = class {
|
|
|
6488
6489
|
};
|
|
6489
6490
|
var nr = Buffer.alloc(1024);
|
|
6490
6491
|
var li = /* @__PURE__ */ Symbol("onStat");
|
|
6491
|
-
var
|
|
6492
|
+
var me = /* @__PURE__ */ Symbol("ended");
|
|
6492
6493
|
var W = /* @__PURE__ */ Symbol("queue");
|
|
6493
6494
|
var pe = /* @__PURE__ */ Symbol("pendingLinks");
|
|
6494
6495
|
var Et = /* @__PURE__ */ Symbol("current");
|
|
@@ -6500,12 +6501,12 @@ var ls = /* @__PURE__ */ Symbol("jobDone");
|
|
|
6500
6501
|
var ci = /* @__PURE__ */ Symbol("addFSEntry");
|
|
6501
6502
|
var or = /* @__PURE__ */ Symbol("addTarEntry");
|
|
6502
6503
|
var ds = /* @__PURE__ */ Symbol("stat");
|
|
6503
|
-
var
|
|
6504
|
+
var us = /* @__PURE__ */ Symbol("readdir");
|
|
6504
6505
|
var fi = /* @__PURE__ */ Symbol("onreaddir");
|
|
6505
6506
|
var di = /* @__PURE__ */ Symbol("pipe");
|
|
6506
6507
|
var hr = /* @__PURE__ */ Symbol("entry");
|
|
6507
6508
|
var cs = /* @__PURE__ */ Symbol("entryOpt");
|
|
6508
|
-
var
|
|
6509
|
+
var ui = /* @__PURE__ */ Symbol("writeEntryClass");
|
|
6509
6510
|
var lr = /* @__PURE__ */ Symbol("write");
|
|
6510
6511
|
var fs2 = /* @__PURE__ */ Symbol("ondrain");
|
|
6511
6512
|
var wt = class extends A {
|
|
@@ -6529,21 +6530,21 @@ var wt = class extends A {
|
|
|
6529
6530
|
mtime;
|
|
6530
6531
|
filter;
|
|
6531
6532
|
jobs;
|
|
6532
|
-
[
|
|
6533
|
+
[ui];
|
|
6533
6534
|
onWriteEntry;
|
|
6534
6535
|
[W];
|
|
6535
6536
|
[pe] = /* @__PURE__ */ new Map();
|
|
6536
6537
|
[G] = 0;
|
|
6537
6538
|
[Ee] = false;
|
|
6538
|
-
[
|
|
6539
|
+
[me] = false;
|
|
6539
6540
|
constructor(t = {}) {
|
|
6540
|
-
if (super(), this.opt = t, this.file = t.file || "", this.cwd = t.cwd || process.cwd(), this.maxReadSize = t.maxReadSize, this.preservePaths = !!t.preservePaths, this.strict = !!t.strict, this.noPax = !!t.noPax, this.prefix = f(t.prefix || ""), this.linkCache = t.linkCache || /* @__PURE__ */ new Map(), this.statCache = t.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t.onWriteEntry, this[
|
|
6541
|
+
if (super(), this.opt = t, this.file = t.file || "", this.cwd = t.cwd || process.cwd(), this.maxReadSize = t.maxReadSize, this.preservePaths = !!t.preservePaths, this.strict = !!t.strict, this.noPax = !!t.noPax, this.prefix = f(t.prefix || ""), this.linkCache = t.linkCache || /* @__PURE__ */ new Map(), this.statCache = t.statCache || /* @__PURE__ */ new Map(), this.readdirCache = t.readdirCache || /* @__PURE__ */ new Map(), this.onWriteEntry = t.onWriteEntry, this[ui] = de, typeof t.onwarn == "function" && this.on("warn", t.onwarn), this.portable = !!t.portable, t.gzip || t.brotli || t.zstd) {
|
|
6541
6542
|
if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
|
|
6542
6543
|
if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = true), this.zip = new ze(t.gzip)), t.brotli && (typeof t.brotli != "object" && (t.brotli = {}), this.zip = new We(t.brotli)), t.zstd && (typeof t.zstd != "object" && (t.zstd = {}), this.zip = new Ye(t.zstd)), !this.zip) throw new Error("impossible");
|
|
6543
6544
|
let e = this.zip;
|
|
6544
6545
|
e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[fs2]()), this.on("resume", () => e.resume());
|
|
6545
6546
|
} else this.on("drain", this[fs2]);
|
|
6546
|
-
this.noDirRecurse = !!t.noDirRecurse, this.follow = !!t.follow, this.noMtime = !!t.noMtime, t.mtime && (this.mtime = t.mtime), this.filter = typeof t.filter == "function" ? t.filter : () => true, this[W] = new hi(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[Ee] = false, this[
|
|
6547
|
+
this.noDirRecurse = !!t.noDirRecurse, this.follow = !!t.follow, this.noMtime = !!t.noMtime, t.mtime && (this.mtime = t.mtime), this.filter = typeof t.filter == "function" ? t.filter : () => true, this[W] = new hi(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[Ee] = false, this[me] = false;
|
|
6547
6548
|
}
|
|
6548
6549
|
[lr](t) {
|
|
6549
6550
|
return super.write(t);
|
|
@@ -6552,10 +6553,10 @@ var wt = class extends A {
|
|
|
6552
6553
|
return this.write(t), this;
|
|
6553
6554
|
}
|
|
6554
6555
|
end(t, e, i) {
|
|
6555
|
-
return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = void 0), t && this.add(t), this[
|
|
6556
|
+
return typeof t == "function" && (i = t, t = void 0), typeof e == "function" && (i = e, e = void 0), t && this.add(t), this[me] = true, this[Ft](), i && i(), this;
|
|
6556
6557
|
}
|
|
6557
6558
|
write(t) {
|
|
6558
|
-
if (this[
|
|
6559
|
+
if (this[me]) throw new Error("write after end");
|
|
6559
6560
|
return typeof t == "string" ? this[ci](t) : this[or](t), this.flowing;
|
|
6560
6561
|
}
|
|
6561
6562
|
[or](t) {
|
|
@@ -6574,7 +6575,7 @@ var wt = class extends A {
|
|
|
6574
6575
|
[ds](t) {
|
|
6575
6576
|
t.pending = true, this[G] += 1;
|
|
6576
6577
|
let e = this.follow ? "stat" : "lstat";
|
|
6577
|
-
|
|
6578
|
+
mi[e](t.absolute, (i, r) => {
|
|
6578
6579
|
t.pending = false, this[G] -= 1, i ? this.emit("error", i) : this[li](t, r);
|
|
6579
6580
|
});
|
|
6580
6581
|
}
|
|
@@ -6587,8 +6588,8 @@ var wt = class extends A {
|
|
|
6587
6588
|
}
|
|
6588
6589
|
this[Ft]();
|
|
6589
6590
|
}
|
|
6590
|
-
[
|
|
6591
|
-
t.pending = true, this[G] += 1,
|
|
6591
|
+
[us](t) {
|
|
6592
|
+
t.pending = true, this[G] += 1, mi.readdir(t.absolute, (e, i) => {
|
|
6592
6593
|
if (t.pending = false, this[G] -= 1, e) return this.emit("error", e);
|
|
6593
6594
|
this[fi](t, i);
|
|
6594
6595
|
});
|
|
@@ -6603,7 +6604,7 @@ var wt = class extends A {
|
|
|
6603
6604
|
let e = t.next;
|
|
6604
6605
|
this[W].removeNode(t), t.next = e;
|
|
6605
6606
|
}
|
|
6606
|
-
this[Ee] = false, this[
|
|
6607
|
+
this[Ee] = false, this[me] && this[W].length === 0 && this[G] === 0 && (this.zip ? this.zip.end(nr) : (super.write(nr), super.end()));
|
|
6607
6608
|
}
|
|
6608
6609
|
}
|
|
6609
6610
|
get [Et]() {
|
|
@@ -6634,7 +6635,7 @@ var wt = class extends A {
|
|
|
6634
6635
|
if (t.stat && !t.ignore) {
|
|
6635
6636
|
if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
|
|
6636
6637
|
let e = this.readdirCache.get(t.absolute);
|
|
6637
|
-
if (e ? this[fi](t, e) : this[
|
|
6638
|
+
if (e ? this[fi](t, e) : this[us](t), !t.readdir) return;
|
|
6638
6639
|
}
|
|
6639
6640
|
if (t.entry = this[hr](t), !t.entry) {
|
|
6640
6641
|
t.ignore = true;
|
|
@@ -6650,7 +6651,7 @@ var wt = class extends A {
|
|
|
6650
6651
|
[hr](t) {
|
|
6651
6652
|
this[G] += 1;
|
|
6652
6653
|
try {
|
|
6653
|
-
return new this[
|
|
6654
|
+
return new this[ui](t.path, this[cs](t)).on("end", () => this[ls](t)).on("error", (i) => this.emit("error", i));
|
|
6654
6655
|
} catch (e) {
|
|
6655
6656
|
this.emit("error", e);
|
|
6656
6657
|
}
|
|
@@ -6681,7 +6682,7 @@ var wt = class extends A {
|
|
|
6681
6682
|
var kt = class extends wt {
|
|
6682
6683
|
sync = true;
|
|
6683
6684
|
constructor(t) {
|
|
6684
|
-
super(t), this[
|
|
6685
|
+
super(t), this[ui] = ni;
|
|
6685
6686
|
}
|
|
6686
6687
|
pause() {
|
|
6687
6688
|
}
|
|
@@ -6689,10 +6690,10 @@ var kt = class extends wt {
|
|
|
6689
6690
|
}
|
|
6690
6691
|
[ds](t) {
|
|
6691
6692
|
let e = this.follow ? "statSync" : "lstatSync";
|
|
6692
|
-
this[li](t,
|
|
6693
|
+
this[li](t, mi[e](t.absolute));
|
|
6693
6694
|
}
|
|
6694
|
-
[
|
|
6695
|
-
this[fi](t,
|
|
6695
|
+
[us](t) {
|
|
6696
|
+
this[fi](t, mi.readdirSync(t.absolute));
|
|
6696
6697
|
}
|
|
6697
6698
|
[di](t) {
|
|
6698
6699
|
let e = t.entry, i = this.zip;
|
|
@@ -6743,13 +6744,13 @@ var Qn = K(Vn, $n, Xn, qn, (s3, t) => {
|
|
|
6743
6744
|
});
|
|
6744
6745
|
var Jn = process.env.__FAKE_PLATFORM__ || process.platform;
|
|
6745
6746
|
var Er = Jn === "win32";
|
|
6746
|
-
var { O_CREAT: wr, O_NOFOLLOW:
|
|
6747
|
+
var { O_CREAT: wr, O_NOFOLLOW: ur, O_TRUNC: Sr, O_WRONLY: yr } = pr.constants;
|
|
6747
6748
|
var Rr = Number(process.env.__FAKE_FS_O_FILENAME__) || pr.constants.UV_FS_O_FILEMAP || 0;
|
|
6748
6749
|
var jn = Er && !!Rr;
|
|
6749
6750
|
var to = 512 * 1024;
|
|
6750
6751
|
var eo = Rr | Sr | wr | yr;
|
|
6751
|
-
var
|
|
6752
|
-
var
|
|
6752
|
+
var mr = !Er && typeof ur == "number" ? ur | Sr | wr | yr : null;
|
|
6753
|
+
var ms = mr !== null ? () => mr : jn ? (s3) => s3 < to ? eo : "w" : () => "w";
|
|
6753
6754
|
var ps = (s3, t, e) => {
|
|
6754
6755
|
try {
|
|
6755
6756
|
return wi.lchownSync(s3, t, e);
|
|
@@ -6917,7 +6918,7 @@ var yi = class {
|
|
|
6917
6918
|
#i = /* @__PURE__ */ new Map();
|
|
6918
6919
|
#s = /* @__PURE__ */ new Set();
|
|
6919
6920
|
reserve(t, e) {
|
|
6920
|
-
t = ao ? ["win32 parallelization disabled"] : t.map((r) =>
|
|
6921
|
+
t = ao ? ["win32 parallelization disabled"] : t.map((r) => mt(xr(Tr(r))));
|
|
6921
6922
|
let i = new Set(t.map((r) => lo(r)).reduce((r, n) => r.concat(n)));
|
|
6922
6923
|
this.#i.set(e, { dirs: i, paths: t });
|
|
6923
6924
|
for (let r of t) {
|
|
@@ -7005,19 +7006,19 @@ var _e = /* @__PURE__ */ Symbol("gid");
|
|
|
7005
7006
|
var Oe = /* @__PURE__ */ Symbol("checkedCwd");
|
|
7006
7007
|
var fo = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
7007
7008
|
var Te = fo === "win32";
|
|
7008
|
-
var
|
|
7009
|
-
var
|
|
7010
|
-
if (!Te) return
|
|
7009
|
+
var uo = 1024;
|
|
7010
|
+
var mo = (s3, t) => {
|
|
7011
|
+
if (!Te) return u.unlink(s3, t);
|
|
7011
7012
|
let e = s3 + ".DELETE." + Mr(16).toString("hex");
|
|
7012
|
-
|
|
7013
|
+
u.rename(s3, e, (i) => {
|
|
7013
7014
|
if (i) return t(i);
|
|
7014
|
-
|
|
7015
|
+
u.unlink(e, t);
|
|
7015
7016
|
});
|
|
7016
7017
|
};
|
|
7017
7018
|
var po = (s3) => {
|
|
7018
|
-
if (!Te) return
|
|
7019
|
+
if (!Te) return u.unlinkSync(s3);
|
|
7019
7020
|
let t = s3 + ".DELETE." + Mr(16).toString("hex");
|
|
7020
|
-
|
|
7021
|
+
u.renameSync(s3, t), u.unlinkSync(t);
|
|
7021
7022
|
};
|
|
7022
7023
|
var vr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
|
|
7023
7024
|
var Xt = class extends rt {
|
|
@@ -7057,7 +7058,7 @@ var Xt = class extends rt {
|
|
|
7057
7058
|
if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
|
|
7058
7059
|
this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
|
|
7059
7060
|
} else this.uid = void 0, this.gid = void 0, this.setOwner = false;
|
|
7060
|
-
this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? process.getuid?.() === 0 : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth :
|
|
7061
|
+
this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? process.getuid?.() === 0 : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : uo, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Te, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(R.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : Lr() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[Dr](e));
|
|
7061
7062
|
}
|
|
7062
7063
|
warn(t, e, i = {}) {
|
|
7063
7064
|
return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = false), super.warn(t, e, i);
|
|
@@ -7131,18 +7132,18 @@ var Xt = class extends rt {
|
|
|
7131
7132
|
return vr(this.gid, t.gid, this.processGid);
|
|
7132
7133
|
}
|
|
7133
7134
|
[Ts](t, e) {
|
|
7134
|
-
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new et(String(t.absolute), { flags:
|
|
7135
|
+
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new et(String(t.absolute), { flags: ms(t.size), mode: i, autoClose: false });
|
|
7135
7136
|
r.on("error", (a) => {
|
|
7136
|
-
r.fd &&
|
|
7137
|
+
r.fd && u.close(r.fd, () => {
|
|
7137
7138
|
}), r.write = () => true, this[O](a, t), e();
|
|
7138
7139
|
});
|
|
7139
7140
|
let n = 1, o = (a) => {
|
|
7140
7141
|
if (a) {
|
|
7141
|
-
r.fd &&
|
|
7142
|
+
r.fd && u.close(r.fd, () => {
|
|
7142
7143
|
}), this[O](a, t), e();
|
|
7143
7144
|
return;
|
|
7144
7145
|
}
|
|
7145
|
-
--n === 0 && r.fd !== void 0 &&
|
|
7146
|
+
--n === 0 && r.fd !== void 0 && u.close(r.fd, (l) => {
|
|
7146
7147
|
l ? this[O](l, t) : this[$t](), e();
|
|
7147
7148
|
});
|
|
7148
7149
|
};
|
|
@@ -7151,12 +7152,12 @@ var Xt = class extends rt {
|
|
|
7151
7152
|
if (typeof l == "number" && t.mtime && !this.noMtime) {
|
|
7152
7153
|
n++;
|
|
7153
7154
|
let c = t.atime || /* @__PURE__ */ new Date(), d = t.mtime;
|
|
7154
|
-
|
|
7155
|
+
u.futimes(l, c, d, (y) => y ? u.utimes(a, c, d, (T) => o(T && y)) : o());
|
|
7155
7156
|
}
|
|
7156
7157
|
if (typeof l == "number" && this[ge](t)) {
|
|
7157
7158
|
n++;
|
|
7158
7159
|
let c = this[be](t), d = this[_e](t);
|
|
7159
|
-
typeof c == "number" && typeof d == "number" &&
|
|
7160
|
+
typeof c == "number" && typeof d == "number" && u.fchown(l, c, d, (y) => y ? u.chown(a, c, d, (T) => o(T && y)) : o());
|
|
7160
7161
|
}
|
|
7161
7162
|
o();
|
|
7162
7163
|
});
|
|
@@ -7175,7 +7176,7 @@ var Xt = class extends rt {
|
|
|
7175
7176
|
let n = 1, o = () => {
|
|
7176
7177
|
--n === 0 && (e(), this[$t](), t.resume());
|
|
7177
7178
|
};
|
|
7178
|
-
t.mtime && !this.noMtime && (n++,
|
|
7179
|
+
t.mtime && !this.noMtime && (n++, u.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[ge](t) && (n++, u.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o)), o();
|
|
7179
7180
|
});
|
|
7180
7181
|
}
|
|
7181
7182
|
[Cr](t) {
|
|
@@ -7197,7 +7198,7 @@ var Xt = class extends rt {
|
|
|
7197
7198
|
let o = i.shift();
|
|
7198
7199
|
if (this.preservePaths || o === void 0) return r();
|
|
7199
7200
|
let h = R.resolve(e, o);
|
|
7200
|
-
|
|
7201
|
+
u.lstat(h, (a, l) => {
|
|
7201
7202
|
if (a) return r();
|
|
7202
7203
|
if (l?.isSymbolicLink()) return n(new St(h, R.resolve(h, i.join("/"))));
|
|
7203
7204
|
this[Re](t, h, i, r, n);
|
|
@@ -7244,7 +7245,7 @@ var Xt = class extends rt {
|
|
|
7244
7245
|
}
|
|
7245
7246
|
o();
|
|
7246
7247
|
}, o = () => {
|
|
7247
|
-
|
|
7248
|
+
u.lstat(String(t.absolute), (h, a) => {
|
|
7248
7249
|
if (a && (this.keep || this.newer && a.mtime > (t.mtime ?? a.mtime))) {
|
|
7249
7250
|
this[Ls](t), i();
|
|
7250
7251
|
return;
|
|
@@ -7253,12 +7254,12 @@ var Xt = class extends rt {
|
|
|
7253
7254
|
if (a.isDirectory()) {
|
|
7254
7255
|
if (t.type === "Directory") {
|
|
7255
7256
|
let l = this.chmod && t.mode && (a.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
|
|
7256
|
-
return l ?
|
|
7257
|
+
return l ? u.chmod(String(t.absolute), Number(t.mode), c) : c();
|
|
7257
7258
|
}
|
|
7258
|
-
if (t.absolute !== this.cwd) return
|
|
7259
|
+
if (t.absolute !== this.cwd) return u.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
|
|
7259
7260
|
}
|
|
7260
7261
|
if (t.absolute === this.cwd) return this[P](null, t, i);
|
|
7261
|
-
|
|
7262
|
+
mo(String(t.absolute), (l) => this[P](l ?? null, t, i));
|
|
7262
7263
|
});
|
|
7263
7264
|
};
|
|
7264
7265
|
this[Oe] ? n() : r();
|
|
@@ -7283,7 +7284,7 @@ var Xt = class extends rt {
|
|
|
7283
7284
|
}
|
|
7284
7285
|
}
|
|
7285
7286
|
[gi](t, e, i, r) {
|
|
7286
|
-
|
|
7287
|
+
u[i](e, String(t.absolute), (n) => {
|
|
7287
7288
|
n ? this[O](n, t) : (this[$t](), t.resume()), r();
|
|
7288
7289
|
});
|
|
7289
7290
|
}
|
|
@@ -7314,17 +7315,17 @@ var xe = class extends Xt {
|
|
|
7314
7315
|
if (o) return this[O](o, t);
|
|
7315
7316
|
}
|
|
7316
7317
|
}
|
|
7317
|
-
let [e, i] = ye(() =>
|
|
7318
|
+
let [e, i] = ye(() => u.lstatSync(String(t.absolute)));
|
|
7318
7319
|
if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[Ls](t);
|
|
7319
7320
|
if (e || this[Os](t, i)) return this[P](null, t);
|
|
7320
7321
|
if (i.isDirectory()) {
|
|
7321
7322
|
if (t.type === "Directory") {
|
|
7322
7323
|
let o = this.chmod && t.mode && (i.mode & 4095) !== t.mode, [h] = o ? ye(() => {
|
|
7323
|
-
|
|
7324
|
+
u.chmodSync(String(t.absolute), Number(t.mode));
|
|
7324
7325
|
}) : [];
|
|
7325
7326
|
return this[P](h, t);
|
|
7326
7327
|
}
|
|
7327
|
-
let [n] = ye(() =>
|
|
7328
|
+
let [n] = ye(() => u.rmdirSync(String(t.absolute)));
|
|
7328
7329
|
this[P](n, t);
|
|
7329
7330
|
}
|
|
7330
7331
|
let [r] = t.absolute === this.cwd ? [] : ye(() => po(String(t.absolute)));
|
|
@@ -7334,21 +7335,21 @@ var xe = class extends Xt {
|
|
|
7334
7335
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (h) => {
|
|
7335
7336
|
let a;
|
|
7336
7337
|
try {
|
|
7337
|
-
|
|
7338
|
+
u.closeSync(n);
|
|
7338
7339
|
} catch (l) {
|
|
7339
7340
|
a = l;
|
|
7340
7341
|
}
|
|
7341
7342
|
(h || a) && this[O](h || a, t), e();
|
|
7342
7343
|
}, n;
|
|
7343
7344
|
try {
|
|
7344
|
-
n =
|
|
7345
|
+
n = u.openSync(String(t.absolute), ms(t.size), i);
|
|
7345
7346
|
} catch (h) {
|
|
7346
7347
|
return r(h);
|
|
7347
7348
|
}
|
|
7348
7349
|
let o = this.transform && this.transform(t) || t;
|
|
7349
7350
|
o !== t && (o.on("error", (h) => this[O](h, t)), t.pipe(o)), o.on("data", (h) => {
|
|
7350
7351
|
try {
|
|
7351
|
-
|
|
7352
|
+
u.writeSync(n, h, 0, h.length);
|
|
7352
7353
|
} catch (a) {
|
|
7353
7354
|
r(a);
|
|
7354
7355
|
}
|
|
@@ -7357,10 +7358,10 @@ var xe = class extends Xt {
|
|
|
7357
7358
|
if (t.mtime && !this.noMtime) {
|
|
7358
7359
|
let a = t.atime || /* @__PURE__ */ new Date(), l = t.mtime;
|
|
7359
7360
|
try {
|
|
7360
|
-
|
|
7361
|
+
u.futimesSync(n, a, l);
|
|
7361
7362
|
} catch (c) {
|
|
7362
7363
|
try {
|
|
7363
|
-
|
|
7364
|
+
u.utimesSync(String(t.absolute), a, l);
|
|
7364
7365
|
} catch {
|
|
7365
7366
|
h = c;
|
|
7366
7367
|
}
|
|
@@ -7369,10 +7370,10 @@ var xe = class extends Xt {
|
|
|
7369
7370
|
if (this[ge](t)) {
|
|
7370
7371
|
let a = this[be](t), l = this[_e](t);
|
|
7371
7372
|
try {
|
|
7372
|
-
|
|
7373
|
+
u.fchownSync(n, Number(a), Number(l));
|
|
7373
7374
|
} catch (c) {
|
|
7374
7375
|
try {
|
|
7375
|
-
|
|
7376
|
+
u.chownSync(String(t.absolute), Number(a), Number(l));
|
|
7376
7377
|
} catch {
|
|
7377
7378
|
h = h || c;
|
|
7378
7379
|
}
|
|
@@ -7388,11 +7389,11 @@ var xe = class extends Xt {
|
|
|
7388
7389
|
return;
|
|
7389
7390
|
}
|
|
7390
7391
|
if (t.mtime && !this.noMtime) try {
|
|
7391
|
-
|
|
7392
|
+
u.utimesSync(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime);
|
|
7392
7393
|
} catch {
|
|
7393
7394
|
}
|
|
7394
7395
|
if (this[ge](t)) try {
|
|
7395
|
-
|
|
7396
|
+
u.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
|
|
7396
7397
|
} catch {
|
|
7397
7398
|
}
|
|
7398
7399
|
e(), t.resume();
|
|
@@ -7409,7 +7410,7 @@ var xe = class extends Xt {
|
|
|
7409
7410
|
let o = e;
|
|
7410
7411
|
for (let h of i) {
|
|
7411
7412
|
o = R.resolve(o, h);
|
|
7412
|
-
let [a, l] = ye(() =>
|
|
7413
|
+
let [a, l] = ye(() => u.lstatSync(o));
|
|
7413
7414
|
if (a) return r();
|
|
7414
7415
|
if (l.isSymbolicLink()) return n(new St(o, R.resolve(e, i.join("/"))));
|
|
7415
7416
|
}
|
|
@@ -7418,7 +7419,7 @@ var xe = class extends Xt {
|
|
|
7418
7419
|
[gi](t, e, i, r) {
|
|
7419
7420
|
let n = `${i}Sync`;
|
|
7420
7421
|
try {
|
|
7421
|
-
|
|
7422
|
+
u[n](e, String(t.absolute)), r(), t.resume();
|
|
7422
7423
|
} catch (o) {
|
|
7423
7424
|
return this[O](o, t);
|
|
7424
7425
|
}
|