@modern-js/upgrade 0.0.0-next-20221129072133 → 0.0.0-next-20221129091510

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.
Files changed (2) hide show
  1. package/dist/index.js +339 -587
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -67478,8 +67478,10 @@ check path: ${_utils.chalk.blue.underline(generator)} exist a package.json file
67478
67478
  };
67479
67479
  }
67480
67480
  async runGenerator(generator, config = {}) {
67481
- const spinner = (0, _utils.ora)("Loading...").start();
67482
- spinner.color = "yellow";
67481
+ const spinner = (0, _utils.ora)({
67482
+ text: "Load Generator...",
67483
+ spinner: "runner"
67484
+ }).start();
67483
67485
  const {
67484
67486
  materialKey,
67485
67487
  generatorPkg,
@@ -67498,8 +67500,10 @@ check path: ${_utils.chalk.blue.underline(generator)} exist a package.json file
67498
67500
  this.setCurrent(null);
67499
67501
  }
67500
67502
  async runSubGenerator(subGenerator, relativePwdPath = "", config) {
67501
- const spinner = (0, _utils.ora)("Loading...").start();
67502
- spinner.color = "yellow";
67503
+ const spinner = (0, _utils.ora)({
67504
+ text: "Load Generator...",
67505
+ spinner: "runner"
67506
+ }).start();
67503
67507
  const {
67504
67508
  materialKey,
67505
67509
  generatorPkg,
@@ -68646,7 +68650,6 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
68646
68650
  this._redirectable.emit(event, arg1, arg2, arg3);
68647
68651
  };
68648
68652
  });
68649
- var InvalidUrlError = createErrorType("ERR_INVALID_URL", "Invalid URL", TypeError);
68650
68653
  var RedirectionError = createErrorType("ERR_FR_REDIRECTION_FAILURE", "Redirected request failed");
68651
68654
  var TooManyRedirectsError = createErrorType("ERR_FR_TOO_MANY_REDIRECTS", "Maximum number of redirects exceeded");
68652
68655
  var MaxBodyLengthExceededError = createErrorType("ERR_FR_MAX_BODY_LENGTH_EXCEEDED", "Request body larger than maxBodyLength limit");
@@ -68679,10 +68682,10 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
68679
68682
  if (this._ending) {
68680
68683
  throw new WriteAfterEndError();
68681
68684
  }
68682
- if (!isString2(data) && !isBuffer(data)) {
68685
+ if (!(typeof data === "string" || typeof data === "object" && "length" in data)) {
68683
68686
  throw new TypeError("data should be a string, Buffer or Uint8Array");
68684
68687
  }
68685
- if (isFunction(encoding)) {
68688
+ if (typeof encoding === "function") {
68686
68689
  callback = encoding;
68687
68690
  encoding = null;
68688
68691
  }
@@ -68702,10 +68705,10 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
68702
68705
  }
68703
68706
  };
68704
68707
  RedirectableRequest.prototype.end = function(data, encoding, callback) {
68705
- if (isFunction(data)) {
68708
+ if (typeof data === "function") {
68706
68709
  callback = data;
68707
68710
  data = encoding = null;
68708
- } else if (isFunction(encoding)) {
68711
+ } else if (typeof encoding === "function") {
68709
68712
  callback = encoding;
68710
68713
  encoding = null;
68711
68714
  }
@@ -68829,7 +68832,7 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
68829
68832
  for (var event of events) {
68830
68833
  request.on(event, eventHandlers[event]);
68831
68834
  }
68832
- this._currentUrl = /^\//.test(this._options.path) ? url.format(this._options) : this._options.path;
68835
+ this._currentUrl = /^\//.test(this._options.path) ? url.format(this._options) : this._currentUrl = this._options.path;
68833
68836
  if (this._isRedirect) {
68834
68837
  var i = 0;
68835
68838
  var self2 = this;
@@ -68894,7 +68897,7 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
68894
68897
  try {
68895
68898
  redirectUrl = url.resolve(currentUrl, location);
68896
68899
  } catch (cause) {
68897
- this.emit("error", new RedirectionError({ cause }));
68900
+ this.emit("error", new RedirectionError(cause));
68898
68901
  return;
68899
68902
  }
68900
68903
  debug("redirecting to", redirectUrl);
@@ -68904,7 +68907,7 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
68904
68907
  if (redirectUrlParts.protocol !== currentUrlParts.protocol && redirectUrlParts.protocol !== "https:" || redirectUrlParts.host !== currentHost && !isSubdomain(redirectUrlParts.host, currentHost)) {
68905
68908
  removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);
68906
68909
  }
68907
- if (isFunction(beforeRedirect)) {
68910
+ if (typeof beforeRedirect === "function") {
68908
68911
  var responseDetails = {
68909
68912
  headers: response.headers,
68910
68913
  statusCode
@@ -68925,7 +68928,7 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
68925
68928
  try {
68926
68929
  this._performRequest();
68927
68930
  } catch (cause) {
68928
- this.emit("error", new RedirectionError({ cause }));
68931
+ this.emit("error", new RedirectionError(cause));
68929
68932
  }
68930
68933
  };
68931
68934
  function wrap(protocols) {
@@ -68939,17 +68942,13 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
68939
68942
  var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
68940
68943
  var wrappedProtocol = exports2[scheme] = Object.create(nativeProtocol);
68941
68944
  function request(input, options3, callback) {
68942
- if (isString2(input)) {
68943
- var parsed;
68945
+ if (typeof input === "string") {
68946
+ var urlStr = input;
68944
68947
  try {
68945
- parsed = urlToOptions(new URL(input));
68948
+ input = urlToOptions(new URL(urlStr));
68946
68949
  } catch (err) {
68947
- parsed = url.parse(input);
68950
+ input = url.parse(urlStr);
68948
68951
  }
68949
- if (!isString2(parsed.protocol)) {
68950
- throw new InvalidUrlError({ input });
68951
- }
68952
- input = parsed;
68953
68952
  } else if (URL && input instanceof URL) {
68954
68953
  input = urlToOptions(input);
68955
68954
  } else {
@@ -68957,7 +68956,7 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
68957
68956
  options3 = input;
68958
68957
  input = { protocol };
68959
68958
  }
68960
- if (isFunction(options3)) {
68959
+ if (typeof options3 === "function") {
68961
68960
  callback = options3;
68962
68961
  options3 = null;
68963
68962
  }
@@ -68966,9 +68965,6 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
68966
68965
  maxBodyLength: exports2.maxBodyLength
68967
68966
  }, input, options3);
68968
68967
  options3.nativeProtocols = nativeProtocols;
68969
- if (!isString2(options3.host) && !isString2(options3.hostname)) {
68970
- options3.hostname = "::1";
68971
- }
68972
68968
  assert.equal(options3.protocol, protocol, "protocol mismatch");
68973
68969
  debug("options", options3);
68974
68970
  return new RedirectableRequest(options3, callback);
@@ -69012,16 +69008,20 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
69012
69008
  }
69013
69009
  return lastValue === null || typeof lastValue === "undefined" ? void 0 : String(lastValue).trim();
69014
69010
  }
69015
- function createErrorType(code, message, baseClass) {
69016
- function CustomError(properties) {
69011
+ function createErrorType(code, defaultMessage) {
69012
+ function CustomError(cause) {
69017
69013
  Error.captureStackTrace(this, this.constructor);
69018
- Object.assign(this, properties || {});
69019
- this.code = code;
69020
- this.message = this.cause ? message + ": " + this.cause.message : message;
69014
+ if (!cause) {
69015
+ this.message = defaultMessage;
69016
+ } else {
69017
+ this.message = defaultMessage + ": " + cause.message;
69018
+ this.cause = cause;
69019
+ }
69021
69020
  }
69022
- CustomError.prototype = new (baseClass || Error)();
69021
+ CustomError.prototype = new Error();
69023
69022
  CustomError.prototype.constructor = CustomError;
69024
69023
  CustomError.prototype.name = "Error [" + code + "]";
69024
+ CustomError.prototype.code = code;
69025
69025
  return CustomError;
69026
69026
  }
69027
69027
  function abortRequest(request) {
@@ -69032,19 +69032,9 @@ var require_follow_redirects = __commonJSMin((exports, module2) => {
69032
69032
  request.abort();
69033
69033
  }
69034
69034
  function isSubdomain(subdomain, domain) {
69035
- assert(isString2(subdomain) && isString2(domain));
69036
- var dot = subdomain.length - domain.length - 1;
69035
+ const dot = subdomain.length - domain.length - 1;
69037
69036
  return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
69038
69037
  }
69039
- function isString2(value) {
69040
- return typeof value === "string" || value instanceof String;
69041
- }
69042
- function isFunction(value) {
69043
- return typeof value === "function";
69044
- }
69045
- function isBuffer(value) {
69046
- return typeof value === "object" && "length" in value;
69047
- }
69048
69038
  module2.exports = wrap({ http, https });
69049
69039
  module2.exports.wrap = wrap;
69050
69040
  });
@@ -70874,9 +70864,8 @@ var require_read_entry = __commonJSMin((exports, module2) => {
70874
70864
  }
70875
70865
  this.path = normPath(header.path);
70876
70866
  this.mode = header.mode;
70877
- if (this.mode) {
70867
+ if (this.mode)
70878
70868
  this.mode = this.mode & 4095;
70879
- }
70880
70869
  this.uid = header.uid;
70881
70870
  this.gid = header.gid;
70882
70871
  this.uname = header.uname;
@@ -70888,35 +70877,29 @@ var require_read_entry = __commonJSMin((exports, module2) => {
70888
70877
  this.linkpath = normPath(header.linkpath);
70889
70878
  this.uname = header.uname;
70890
70879
  this.gname = header.gname;
70891
- if (ex) {
70880
+ if (ex)
70892
70881
  this[SLURP](ex);
70893
- }
70894
- if (gex) {
70882
+ if (gex)
70895
70883
  this[SLURP](gex, true);
70896
- }
70897
70884
  }
70898
70885
  write(data) {
70899
70886
  const writeLen = data.length;
70900
- if (writeLen > this.blockRemain) {
70887
+ if (writeLen > this.blockRemain)
70901
70888
  throw new Error("writing more to entry than is appropriate");
70902
- }
70903
70889
  const r = this.remain;
70904
70890
  const br = this.blockRemain;
70905
70891
  this.remain = Math.max(0, r - writeLen);
70906
70892
  this.blockRemain = Math.max(0, br - writeLen);
70907
- if (this.ignore) {
70893
+ if (this.ignore)
70908
70894
  return true;
70909
- }
70910
- if (r >= writeLen) {
70895
+ if (r >= writeLen)
70911
70896
  return super.write(data);
70912
- }
70913
70897
  return super.write(data.slice(0, r));
70914
70898
  }
70915
70899
  [SLURP](ex, global2) {
70916
70900
  for (const k in ex) {
70917
- if (ex[k] !== null && ex[k] !== void 0 && !(global2 && k === "path")) {
70901
+ if (ex[k] !== null && ex[k] !== void 0 && !(global2 && k === "path"))
70918
70902
  this[k] = k === "path" || k === "linkpath" ? normPath(ex[k]) : ex[k];
70919
- }
70920
70903
  }
70921
70904
  }
70922
70905
  };
@@ -70951,13 +70934,12 @@ var require_types = __commonJSMin((exports) => {
70951
70934
  var require_large_numbers = __commonJSMin((exports, module2) => {
70952
70935
  "use strict";
70953
70936
  var encode = (num, buf) => {
70954
- if (!Number.isSafeInteger(num)) {
70937
+ if (!Number.isSafeInteger(num))
70955
70938
  throw Error("cannot encode number outside of javascript safe integer range");
70956
- } else if (num < 0) {
70939
+ else if (num < 0)
70957
70940
  encodeNegative(num, buf);
70958
- } else {
70941
+ else
70959
70942
  encodePositive(num, buf);
70960
- }
70961
70943
  return buf;
70962
70944
  };
70963
70945
  var encodePositive = (num, buf) => {
@@ -70974,11 +70956,11 @@ var require_large_numbers = __commonJSMin((exports, module2) => {
70974
70956
  for (var i = buf.length; i > 1; i--) {
70975
70957
  var byte = num & 255;
70976
70958
  num = Math.floor(num / 256);
70977
- if (flipped) {
70959
+ if (flipped)
70978
70960
  buf[i - 1] = onesComp(byte);
70979
- } else if (byte === 0) {
70961
+ else if (byte === 0)
70980
70962
  buf[i - 1] = 0;
70981
- } else {
70963
+ else {
70982
70964
  flipped = true;
70983
70965
  buf[i - 1] = twosComp(byte);
70984
70966
  }
@@ -70987,12 +70969,10 @@ var require_large_numbers = __commonJSMin((exports, module2) => {
70987
70969
  var parse = (buf) => {
70988
70970
  const pre = buf[0];
70989
70971
  const value = pre === 128 ? pos(buf.slice(1, buf.length)) : pre === 255 ? twos(buf) : null;
70990
- if (value === null) {
70972
+ if (value === null)
70991
70973
  throw Error("invalid base256 encoding");
70992
- }
70993
- if (!Number.isSafeInteger(value)) {
70974
+ if (!Number.isSafeInteger(value))
70994
70975
  throw Error("parsed number outside of javascript safe integer range");
70995
- }
70996
70976
  return value;
70997
70977
  };
70998
70978
  var twos = (buf) => {
@@ -71002,17 +70982,16 @@ var require_large_numbers = __commonJSMin((exports, module2) => {
71002
70982
  for (var i = len - 1; i > -1; i--) {
71003
70983
  var byte = buf[i];
71004
70984
  var f;
71005
- if (flipped) {
70985
+ if (flipped)
71006
70986
  f = onesComp(byte);
71007
- } else if (byte === 0) {
70987
+ else if (byte === 0)
71008
70988
  f = byte;
71009
- } else {
70989
+ else {
71010
70990
  flipped = true;
71011
70991
  f = twosComp(byte);
71012
70992
  }
71013
- if (f !== 0) {
70993
+ if (f !== 0)
71014
70994
  sum -= f * Math.pow(256, len - i - 1);
71015
- }
71016
70995
  }
71017
70996
  return sum;
71018
70997
  };
@@ -71021,9 +71000,8 @@ var require_large_numbers = __commonJSMin((exports, module2) => {
71021
71000
  var sum = 0;
71022
71001
  for (var i = len - 1; i > -1; i--) {
71023
71002
  var byte = buf[i];
71024
- if (byte !== 0) {
71003
+ if (byte !== 0)
71025
71004
  sum += byte * Math.pow(256, len - i - 1);
71026
- }
71027
71005
  }
71028
71006
  return sum;
71029
71007
  };
@@ -71062,19 +71040,16 @@ var require_header = __commonJSMin((exports, module2) => {
71062
71040
  this.devmin = 0;
71063
71041
  this.atime = null;
71064
71042
  this.ctime = null;
71065
- if (Buffer.isBuffer(data)) {
71043
+ if (Buffer.isBuffer(data))
71066
71044
  this.decode(data, off || 0, ex, gex);
71067
- } else if (data) {
71045
+ else if (data)
71068
71046
  this.set(data);
71069
- }
71070
71047
  }
71071
71048
  decode(buf, off, ex, gex) {
71072
- if (!off) {
71049
+ if (!off)
71073
71050
  off = 0;
71074
- }
71075
- if (!buf || !(buf.length >= off + 512)) {
71051
+ if (!buf || !(buf.length >= off + 512))
71076
71052
  throw new Error("need 512 bytes for header");
71077
- }
71078
71053
  this.path = decString(buf, off, 100);
71079
71054
  this.mode = decNumber(buf, off + 100, 8);
71080
71055
  this.uid = decNumber(buf, off + 108, 8);
@@ -71085,15 +71060,12 @@ var require_header = __commonJSMin((exports, module2) => {
71085
71060
  this[SLURP](ex);
71086
71061
  this[SLURP](gex, true);
71087
71062
  this[TYPE] = decString(buf, off + 156, 1);
71088
- if (this[TYPE] === "") {
71063
+ if (this[TYPE] === "")
71089
71064
  this[TYPE] = "0";
71090
- }
71091
- if (this[TYPE] === "0" && this.path.slice(-1) === "/") {
71065
+ if (this[TYPE] === "0" && this.path.substr(-1) === "/")
71092
71066
  this[TYPE] = "5";
71093
- }
71094
- if (this[TYPE] === "5") {
71067
+ if (this[TYPE] === "5")
71095
71068
  this.size = 0;
71096
- }
71097
71069
  this.linkpath = decString(buf, off + 157, 100);
71098
71070
  if (buf.slice(off + 257, off + 265).toString() === "ustar\x0000") {
71099
71071
  this.uname = decString(buf, off + 265, 32);
@@ -71105,30 +71077,25 @@ var require_header = __commonJSMin((exports, module2) => {
71105
71077
  this.path = prefix + "/" + this.path;
71106
71078
  } else {
71107
71079
  const prefix = decString(buf, off + 345, 130);
71108
- if (prefix) {
71080
+ if (prefix)
71109
71081
  this.path = prefix + "/" + this.path;
71110
- }
71111
71082
  this.atime = decDate(buf, off + 476, 12);
71112
71083
  this.ctime = decDate(buf, off + 488, 12);
71113
71084
  }
71114
71085
  }
71115
71086
  let sum = 8 * 32;
71116
- for (let i = off; i < off + 148; i++) {
71087
+ for (let i = off; i < off + 148; i++)
71117
71088
  sum += buf[i];
71118
- }
71119
- for (let i = off + 156; i < off + 512; i++) {
71089
+ for (let i = off + 156; i < off + 512; i++)
71120
71090
  sum += buf[i];
71121
- }
71122
71091
  this.cksumValid = sum === this.cksum;
71123
- if (this.cksum === null && sum === 8 * 32) {
71092
+ if (this.cksum === null && sum === 8 * 32)
71124
71093
  this.nullBlock = true;
71125
- }
71126
71094
  }
71127
71095
  [SLURP](ex, global2) {
71128
71096
  for (const k in ex) {
71129
- if (ex[k] !== null && ex[k] !== void 0 && !(global2 && k === "path")) {
71097
+ if (ex[k] !== null && ex[k] !== void 0 && !(global2 && k === "path"))
71130
71098
  this[k] = ex[k];
71131
- }
71132
71099
  }
71133
71100
  }
71134
71101
  encode(buf, off) {
@@ -71136,12 +71103,10 @@ var require_header = __commonJSMin((exports, module2) => {
71136
71103
  buf = this.block = Buffer.alloc(512);
71137
71104
  off = 0;
71138
71105
  }
71139
- if (!off) {
71106
+ if (!off)
71140
71107
  off = 0;
71141
- }
71142
- if (!(buf.length >= off + 512)) {
71108
+ if (!(buf.length >= off + 512))
71143
71109
  throw new Error("need 512 bytes for header");
71144
- }
71145
71110
  const prefixSize = this.ctime || this.atime ? 130 : 155;
71146
71111
  const split = splitPrefix(this.path || "", prefixSize);
71147
71112
  const path = split[0];
@@ -71161,20 +71126,18 @@ var require_header = __commonJSMin((exports, module2) => {
71161
71126
  this.needPax = encNumber(buf, off + 329, 8, this.devmaj) || this.needPax;
71162
71127
  this.needPax = encNumber(buf, off + 337, 8, this.devmin) || this.needPax;
71163
71128
  this.needPax = encString(buf, off + 345, prefixSize, prefix) || this.needPax;
71164
- if (buf[off + 475] !== 0) {
71129
+ if (buf[off + 475] !== 0)
71165
71130
  this.needPax = encString(buf, off + 345, 155, prefix) || this.needPax;
71166
- } else {
71131
+ else {
71167
71132
  this.needPax = encString(buf, off + 345, 130, prefix) || this.needPax;
71168
71133
  this.needPax = encDate(buf, off + 476, 12, this.atime) || this.needPax;
71169
71134
  this.needPax = encDate(buf, off + 488, 12, this.ctime) || this.needPax;
71170
71135
  }
71171
71136
  let sum = 8 * 32;
71172
- for (let i = off; i < off + 148; i++) {
71137
+ for (let i = off; i < off + 148; i++)
71173
71138
  sum += buf[i];
71174
- }
71175
- for (let i = off + 156; i < off + 512; i++) {
71139
+ for (let i = off + 156; i < off + 512; i++)
71176
71140
  sum += buf[i];
71177
- }
71178
71141
  this.cksum = sum;
71179
71142
  encNumber(buf, off + 148, 8, this.cksum);
71180
71143
  this.cksumValid = true;
@@ -71182,9 +71145,8 @@ var require_header = __commonJSMin((exports, module2) => {
71182
71145
  }
71183
71146
  set(data) {
71184
71147
  for (const i in data) {
71185
- if (data[i] !== null && data[i] !== void 0) {
71148
+ if (data[i] !== null && data[i] !== void 0)
71186
71149
  this[i] = data[i];
71187
- }
71188
71150
  }
71189
71151
  }
71190
71152
  get type() {
@@ -71194,11 +71156,10 @@ var require_header = __commonJSMin((exports, module2) => {
71194
71156
  return this[TYPE];
71195
71157
  }
71196
71158
  set type(type) {
71197
- if (types.code.has(type)) {
71159
+ if (types.code.has(type))
71198
71160
  this[TYPE] = types.code.get(type);
71199
- } else {
71161
+ else
71200
71162
  this[TYPE] = type;
71201
- }
71202
71163
  }
71203
71164
  };
71204
71165
  var splitPrefix = (p, prefixSize) => {
@@ -71207,24 +71168,23 @@ var require_header = __commonJSMin((exports, module2) => {
71207
71168
  let prefix = "";
71208
71169
  let ret;
71209
71170
  const root = pathModule.parse(p).root || ".";
71210
- if (Buffer.byteLength(pp) < pathSize) {
71171
+ if (Buffer.byteLength(pp) < pathSize)
71211
71172
  ret = [pp, prefix, false];
71212
- } else {
71173
+ else {
71213
71174
  prefix = pathModule.dirname(pp);
71214
71175
  pp = pathModule.basename(pp);
71215
71176
  do {
71216
- if (Buffer.byteLength(pp) <= pathSize && Buffer.byteLength(prefix) <= prefixSize) {
71177
+ if (Buffer.byteLength(pp) <= pathSize && Buffer.byteLength(prefix) <= prefixSize)
71217
71178
  ret = [pp, prefix, false];
71218
- } else if (Buffer.byteLength(pp) > pathSize && Buffer.byteLength(prefix) <= prefixSize) {
71219
- ret = [pp.slice(0, pathSize - 1), prefix, true];
71220
- } else {
71179
+ else if (Buffer.byteLength(pp) > pathSize && Buffer.byteLength(prefix) <= prefixSize)
71180
+ ret = [pp.substr(0, pathSize - 1), prefix, true];
71181
+ else {
71221
71182
  pp = pathModule.join(pathModule.basename(prefix), pp);
71222
71183
  prefix = pathModule.dirname(prefix);
71223
71184
  }
71224
71185
  } while (prefix !== root && !ret);
71225
- if (!ret) {
71226
- ret = [p.slice(0, pathSize - 1), "", true];
71227
- }
71186
+ if (!ret)
71187
+ ret = [p.substr(0, pathSize - 1), "", true];
71228
71188
  }
71229
71189
  return ret;
71230
71190
  };
@@ -71272,15 +71232,13 @@ var require_pax = __commonJSMin((exports, module2) => {
71272
71232
  }
71273
71233
  encode() {
71274
71234
  const body = this.encodeBody();
71275
- if (body === "") {
71235
+ if (body === "")
71276
71236
  return null;
71277
- }
71278
71237
  const bodyLen = Buffer.byteLength(body);
71279
71238
  const bufLen = 512 * Math.ceil(1 + bodyLen / 512);
71280
71239
  const buf = Buffer.allocUnsafe(bufLen);
71281
- for (let i = 0; i < 512; i++) {
71240
+ for (let i = 0; i < 512; i++)
71282
71241
  buf[i] = 0;
71283
- }
71284
71242
  new Header({
71285
71243
  path: ("PaxHeader/" + path.basename(this.path)).slice(0, 99),
71286
71244
  mode: this.mode || 420,
@@ -71298,25 +71256,22 @@ var require_pax = __commonJSMin((exports, module2) => {
71298
71256
  ctime: this.ctime || null
71299
71257
  }).encode(buf);
71300
71258
  buf.write(body, 512, bodyLen, "utf8");
71301
- for (let i = bodyLen + 512; i < buf.length; i++) {
71259
+ for (let i = bodyLen + 512; i < buf.length; i++)
71302
71260
  buf[i] = 0;
71303
- }
71304
71261
  return buf;
71305
71262
  }
71306
71263
  encodeBody() {
71307
71264
  return this.encodeField("path") + this.encodeField("ctime") + this.encodeField("atime") + this.encodeField("dev") + this.encodeField("ino") + this.encodeField("nlink") + this.encodeField("charset") + this.encodeField("comment") + this.encodeField("gid") + this.encodeField("gname") + this.encodeField("linkpath") + this.encodeField("mtime") + this.encodeField("size") + this.encodeField("uid") + this.encodeField("uname");
71308
71265
  }
71309
71266
  encodeField(field) {
71310
- if (this[field] === null || this[field] === void 0) {
71267
+ if (this[field] === null || this[field] === void 0)
71311
71268
  return "";
71312
- }
71313
71269
  const v = this[field] instanceof Date ? this[field].getTime() / 1e3 : this[field];
71314
71270
  const s = " " + (field === "dev" || field === "ino" || field === "nlink" ? "SCHILY." : "") + field + "=" + v + "\n";
71315
71271
  const byteLen = Buffer.byteLength(s);
71316
71272
  let digits = Math.floor(Math.log(byteLen) / Math.log(10)) + 1;
71317
- if (byteLen + digits >= Math.pow(10, digits)) {
71273
+ if (byteLen + digits >= Math.pow(10, digits))
71318
71274
  digits += 1;
71319
- }
71320
71275
  const len = digits + byteLen;
71321
71276
  return len + s;
71322
71277
  }
@@ -71326,15 +71281,13 @@ var require_pax = __commonJSMin((exports, module2) => {
71326
71281
  var parseKV = (string) => string.replace(/\n$/, "").split("\n").reduce(parseKVLine, /* @__PURE__ */ Object.create(null));
71327
71282
  var parseKVLine = (set, line) => {
71328
71283
  const n = parseInt(line, 10);
71329
- if (n !== Buffer.byteLength(line) + 1) {
71284
+ if (n !== Buffer.byteLength(line) + 1)
71330
71285
  return set;
71331
- }
71332
- line = line.slice((n + " ").length);
71286
+ line = line.substr((n + " ").length);
71333
71287
  const kv = line.split("=");
71334
71288
  const k = kv.shift().replace(/^SCHILY\.(dev|ino|nlink)/, "$1");
71335
- if (!k) {
71289
+ if (!k)
71336
71290
  return set;
71337
- }
71338
71291
  const v = kv.join("=");
71339
71292
  set[k] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(k) ? new Date(v * 1e3) : /^[0-9]+$/.test(v) ? +v : v;
71340
71293
  return set;
@@ -71356,12 +71309,10 @@ var require_warn_mixin = __commonJSMin((exports, module2) => {
71356
71309
  "use strict";
71357
71310
  module2.exports = (Base) => class extends Base {
71358
71311
  warn(code, message, data = {}) {
71359
- if (this.file) {
71312
+ if (this.file)
71360
71313
  data.file = this.file;
71361
- }
71362
- if (this.cwd) {
71314
+ if (this.cwd)
71363
71315
  data.cwd = this.cwd;
71364
- }
71365
71316
  data.code = message instanceof Error && message.code || code;
71366
71317
  data.tarCode = code;
71367
71318
  if (!this.strict && data.recoverable !== false) {
@@ -71370,11 +71321,10 @@ var require_warn_mixin = __commonJSMin((exports, module2) => {
71370
71321
  message = message.message;
71371
71322
  }
71372
71323
  this.emit("warn", data.tarCode, message, data);
71373
- } else if (message instanceof Error) {
71324
+ } else if (message instanceof Error)
71374
71325
  this.emit("error", Object.assign(message, data));
71375
- } else {
71326
+ else
71376
71327
  this.emit("error", Object.assign(new Error(`${code}: ${message}`), data));
71377
- }
71378
71328
  }
71379
71329
  };
71380
71330
  });
@@ -71402,7 +71352,7 @@ var require_strip_absolute_path = __commonJSMin((exports, module2) => {
71402
71352
  let parsed = parse(path);
71403
71353
  while (isAbsolute(path) || parsed.root) {
71404
71354
  const root = path.charAt(0) === "/" && path.slice(0, 4) !== "//?/" ? "/" : parsed.root;
71405
- path = path.slice(root.length);
71355
+ path = path.substr(root.length);
71406
71356
  r += root;
71407
71357
  parsed = parse(path);
71408
71358
  }
@@ -71413,19 +71363,15 @@ var require_mode_fix = __commonJSMin((exports, module2) => {
71413
71363
  "use strict";
71414
71364
  module2.exports = (mode, isDir, portable) => {
71415
71365
  mode &= 4095;
71416
- if (portable) {
71366
+ if (portable)
71417
71367
  mode = (mode | 384) & ~18;
71418
- }
71419
71368
  if (isDir) {
71420
- if (mode & 256) {
71369
+ if (mode & 256)
71421
71370
  mode |= 64;
71422
- }
71423
- if (mode & 32) {
71371
+ if (mode & 32)
71424
71372
  mode |= 8;
71425
- }
71426
- if (mode & 4) {
71373
+ if (mode & 4)
71427
71374
  mode |= 1;
71428
- }
71429
71375
  }
71430
71376
  return mode;
71431
71377
  };
@@ -71440,9 +71386,8 @@ var require_write_entry = __commonJSMin((exports, module2) => {
71440
71386
  var normPath = require_normalize_windows_path();
71441
71387
  var stripSlash = require_strip_trailing_slashes();
71442
71388
  var prefixPath = (path2, prefix) => {
71443
- if (!prefix) {
71389
+ if (!prefix)
71444
71390
  return normPath(path2);
71445
- }
71446
71391
  path2 = normPath(path2).replace(/^\.(\/|$)/, "");
71447
71392
  return stripSlash(prefix) + "/" + path2;
71448
71393
  };
@@ -71474,9 +71419,8 @@ var require_write_entry = __commonJSMin((exports, module2) => {
71474
71419
  constructor(p, opt) {
71475
71420
  opt = opt || {};
71476
71421
  super(opt);
71477
- if (typeof p !== "string") {
71422
+ if (typeof p !== "string")
71478
71423
  throw new TypeError("path is required");
71479
- }
71480
71424
  this.path = normPath(p);
71481
71425
  this.portable = !!opt.portable;
71482
71426
  this.myuid = process.getuid && process.getuid() || 0;
@@ -71499,9 +71443,8 @@ var require_write_entry = __commonJSMin((exports, module2) => {
71499
71443
  this.length = null;
71500
71444
  this.pos = null;
71501
71445
  this.remain = null;
71502
- if (typeof opt.onwarn === "function") {
71446
+ if (typeof opt.onwarn === "function")
71503
71447
  this.on("warn", opt.onwarn);
71504
- }
71505
71448
  let pathWarn = false;
71506
71449
  if (!this.preservePaths) {
71507
71450
  const [root, stripped] = stripAbsolutePath(this.path);
@@ -71516,41 +71459,36 @@ var require_write_entry = __commonJSMin((exports, module2) => {
71516
71459
  p = p.replace(/\\/g, "/");
71517
71460
  }
71518
71461
  this.absolute = normPath(opt.absolute || path.resolve(this.cwd, p));
71519
- if (this.path === "") {
71462
+ if (this.path === "")
71520
71463
  this.path = "./";
71521
- }
71522
71464
  if (pathWarn) {
71523
71465
  this.warn("TAR_ENTRY_INFO", `stripping ${pathWarn} from absolute path`, {
71524
71466
  entry: this,
71525
71467
  path: pathWarn + this.path
71526
71468
  });
71527
71469
  }
71528
- if (this.statCache.has(this.absolute)) {
71470
+ if (this.statCache.has(this.absolute))
71529
71471
  this[ONLSTAT](this.statCache.get(this.absolute));
71530
- } else {
71472
+ else
71531
71473
  this[LSTAT]();
71532
- }
71533
71474
  }
71534
71475
  emit(ev, ...data) {
71535
- if (ev === "error") {
71476
+ if (ev === "error")
71536
71477
  this[HAD_ERROR] = true;
71537
- }
71538
71478
  return super.emit(ev, ...data);
71539
71479
  }
71540
71480
  [LSTAT]() {
71541
71481
  fs.lstat(this.absolute, (er, stat) => {
71542
- if (er) {
71482
+ if (er)
71543
71483
  return this.emit("error", er);
71544
- }
71545
71484
  this[ONLSTAT](stat);
71546
71485
  });
71547
71486
  }
71548
71487
  [ONLSTAT](stat) {
71549
71488
  this.statCache.set(this.absolute, stat);
71550
71489
  this.stat = stat;
71551
- if (!stat.isFile()) {
71490
+ if (!stat.isFile())
71552
71491
  stat.size = 0;
71553
- }
71554
71492
  this.type = getType(stat);
71555
71493
  this.emit("stat", stat);
71556
71494
  this[PROCESS]();
@@ -71574,9 +71512,8 @@ var require_write_entry = __commonJSMin((exports, module2) => {
71574
71512
  return prefixPath(path2, this.prefix);
71575
71513
  }
71576
71514
  [HEADER]() {
71577
- if (this.type === "Directory" && this.portable) {
71515
+ if (this.type === "Directory" && this.portable)
71578
71516
  this.noMtime = true;
71579
- }
71580
71517
  this.header = new Header({
71581
71518
  path: this[PREFIX](this.path),
71582
71519
  linkpath: this.type === "Link" ? this[PREFIX](this.linkpath) : this.linkpath,
@@ -71609,18 +71546,16 @@ var require_write_entry = __commonJSMin((exports, module2) => {
71609
71546
  super.write(this.header.block);
71610
71547
  }
71611
71548
  [DIRECTORY]() {
71612
- if (this.path.slice(-1) !== "/") {
71549
+ if (this.path.substr(-1) !== "/")
71613
71550
  this.path += "/";
71614
- }
71615
71551
  this.stat.size = 0;
71616
71552
  this[HEADER]();
71617
71553
  this.end();
71618
71554
  }
71619
71555
  [SYMLINK]() {
71620
71556
  fs.readlink(this.absolute, (er, linkpath) => {
71621
- if (er) {
71557
+ if (er)
71622
71558
  return this.emit("error", er);
71623
- }
71624
71559
  this[ONREADLINK](linkpath);
71625
71560
  });
71626
71561
  }
@@ -71641,31 +71576,27 @@ var require_write_entry = __commonJSMin((exports, module2) => {
71641
71576
  const linkKey = this.stat.dev + ":" + this.stat.ino;
71642
71577
  if (this.linkCache.has(linkKey)) {
71643
71578
  const linkpath = this.linkCache.get(linkKey);
71644
- if (linkpath.indexOf(this.cwd) === 0) {
71579
+ if (linkpath.indexOf(this.cwd) === 0)
71645
71580
  return this[HARDLINK](linkpath);
71646
- }
71647
71581
  }
71648
71582
  this.linkCache.set(linkKey, this.absolute);
71649
71583
  }
71650
71584
  this[HEADER]();
71651
- if (this.stat.size === 0) {
71585
+ if (this.stat.size === 0)
71652
71586
  return this.end();
71653
- }
71654
71587
  this[OPENFILE]();
71655
71588
  }
71656
71589
  [OPENFILE]() {
71657
71590
  fs.open(this.absolute, "r", (er, fd) => {
71658
- if (er) {
71591
+ if (er)
71659
71592
  return this.emit("error", er);
71660
- }
71661
71593
  this[ONOPENFILE](fd);
71662
71594
  });
71663
71595
  }
71664
71596
  [ONOPENFILE](fd) {
71665
71597
  this.fd = fd;
71666
- if (this[HAD_ERROR]) {
71598
+ if (this[HAD_ERROR])
71667
71599
  return this[CLOSE]();
71668
- }
71669
71600
  this.blockLen = 512 * Math.ceil(this.stat.size / 512);
71670
71601
  this.blockRemain = this.blockLen;
71671
71602
  const bufLen = Math.min(this.blockLen, this.maxReadSize);
@@ -71712,11 +71643,10 @@ var require_write_entry = __commonJSMin((exports, module2) => {
71712
71643
  }
71713
71644
  const writeBuf = this.offset === 0 && bytesRead === this.buf.length ? this.buf : this.buf.slice(this.offset, this.offset + bytesRead);
71714
71645
  const flushed = this.write(writeBuf);
71715
- if (!flushed) {
71646
+ if (!flushed)
71716
71647
  this[AWAITDRAIN](() => this[ONDRAIN]());
71717
- } else {
71648
+ else
71718
71649
  this[ONDRAIN]();
71719
- }
71720
71650
  }
71721
71651
  [AWAITDRAIN](cb) {
71722
71652
  this.once("drain", cb);
@@ -71735,9 +71665,8 @@ var require_write_entry = __commonJSMin((exports, module2) => {
71735
71665
  }
71736
71666
  [ONDRAIN]() {
71737
71667
  if (!this.remain) {
71738
- if (this.blockRemain) {
71668
+ if (this.blockRemain)
71739
71669
  super.write(Buffer.alloc(this.blockRemain));
71740
- }
71741
71670
  return this[CLOSE]((er) => er ? this.emit("error", er) : this.end());
71742
71671
  }
71743
71672
  if (this.offset >= this.length) {
@@ -71794,9 +71723,8 @@ var require_write_entry = __commonJSMin((exports, module2) => {
71794
71723
  this.noMtime = !!opt.noMtime;
71795
71724
  this.readEntry = readEntry;
71796
71725
  this.type = readEntry.type;
71797
- if (this.type === "Directory" && this.portable) {
71726
+ if (this.type === "Directory" && this.portable)
71798
71727
  this.noMtime = true;
71799
- }
71800
71728
  this.prefix = opt.prefix || null;
71801
71729
  this.path = normPath(readEntry.path);
71802
71730
  this.mode = this[MODE](readEntry.mode);
@@ -71809,9 +71737,8 @@ var require_write_entry = __commonJSMin((exports, module2) => {
71809
71737
  this.atime = this.portable ? null : readEntry.atime;
71810
71738
  this.ctime = this.portable ? null : readEntry.ctime;
71811
71739
  this.linkpath = normPath(readEntry.linkpath);
71812
- if (typeof opt.onwarn === "function") {
71740
+ if (typeof opt.onwarn === "function")
71813
71741
  this.on("warn", opt.onwarn);
71814
- }
71815
71742
  let pathWarn = false;
71816
71743
  if (!this.preservePaths) {
71817
71744
  const [root, stripped] = stripAbsolutePath(this.path);
@@ -71868,16 +71795,14 @@ var require_write_entry = __commonJSMin((exports, module2) => {
71868
71795
  }
71869
71796
  write(data) {
71870
71797
  const writeLen = data.length;
71871
- if (writeLen > this.blockRemain) {
71798
+ if (writeLen > this.blockRemain)
71872
71799
  throw new Error("writing more to entry than is appropriate");
71873
- }
71874
71800
  this.blockRemain -= writeLen;
71875
71801
  return super.write(data);
71876
71802
  }
71877
71803
  end() {
71878
- if (this.blockRemain) {
71804
+ if (this.blockRemain)
71879
71805
  super.write(Buffer.alloc(this.blockRemain));
71880
- }
71881
71806
  return super.end();
71882
71807
  }
71883
71808
  });
@@ -72323,26 +72248,22 @@ var require_pack = __commonJSMin((exports, module2) => {
72323
72248
  this.statCache = opt.statCache || /* @__PURE__ */ new Map();
72324
72249
  this.readdirCache = opt.readdirCache || /* @__PURE__ */ new Map();
72325
72250
  this[WRITEENTRYCLASS] = WriteEntry;
72326
- if (typeof opt.onwarn === "function") {
72251
+ if (typeof opt.onwarn === "function")
72327
72252
  this.on("warn", opt.onwarn);
72328
- }
72329
72253
  this.portable = !!opt.portable;
72330
72254
  this.zip = null;
72331
72255
  if (opt.gzip) {
72332
- if (typeof opt.gzip !== "object") {
72256
+ if (typeof opt.gzip !== "object")
72333
72257
  opt.gzip = {};
72334
- }
72335
- if (this.portable) {
72258
+ if (this.portable)
72336
72259
  opt.gzip.portable = true;
72337
- }
72338
72260
  this.zip = new zlib.Gzip(opt.gzip);
72339
72261
  this.zip.on("data", (chunk) => super.write(chunk));
72340
72262
  this.zip.on("end", (_) => super.end());
72341
72263
  this.zip.on("drain", (_) => this[ONDRAIN]());
72342
72264
  this.on("resume", (_) => this.zip.resume());
72343
- } else {
72265
+ } else
72344
72266
  this.on("drain", this[ONDRAIN]);
72345
- }
72346
72267
  this.noDirRecurse = !!opt.noDirRecurse;
72347
72268
  this.follow = !!opt.follow;
72348
72269
  this.noMtime = !!opt.noMtime;
@@ -72362,29 +72283,26 @@ var require_pack = __commonJSMin((exports, module2) => {
72362
72283
  return this;
72363
72284
  }
72364
72285
  end(path2) {
72365
- if (path2) {
72286
+ if (path2)
72366
72287
  this.write(path2);
72367
- }
72368
72288
  this[ENDED] = true;
72369
72289
  this[PROCESS]();
72370
72290
  return this;
72371
72291
  }
72372
72292
  write(path2) {
72373
- if (this[ENDED]) {
72293
+ if (this[ENDED])
72374
72294
  throw new Error("write after end");
72375
- }
72376
- if (path2 instanceof ReadEntry) {
72295
+ if (path2 instanceof ReadEntry)
72377
72296
  this[ADDTARENTRY](path2);
72378
- } else {
72297
+ else
72379
72298
  this[ADDFSENTRY](path2);
72380
- }
72381
72299
  return this.flowing;
72382
72300
  }
72383
72301
  [ADDTARENTRY](p) {
72384
72302
  const absolute = normPath(path.resolve(this.cwd, p.path));
72385
- if (!this.filter(p.path, p)) {
72303
+ if (!this.filter(p.path, p))
72386
72304
  p.resume();
72387
- } else {
72305
+ else {
72388
72306
  const job = new PackJob(p.path, absolute, false);
72389
72307
  job.entry = new WriteEntryTar(p, this[ENTRYOPT](job));
72390
72308
  job.entry.on("end", (_) => this[JOBDONE](job));
@@ -72405,19 +72323,17 @@ var require_pack = __commonJSMin((exports, module2) => {
72405
72323
  fs[stat](job.absolute, (er, stat2) => {
72406
72324
  job.pending = false;
72407
72325
  this[JOBS] -= 1;
72408
- if (er) {
72326
+ if (er)
72409
72327
  this.emit("error", er);
72410
- } else {
72328
+ else
72411
72329
  this[ONSTAT](job, stat2);
72412
- }
72413
72330
  });
72414
72331
  }
72415
72332
  [ONSTAT](job, stat) {
72416
72333
  this.statCache.set(job.absolute, stat);
72417
72334
  job.stat = stat;
72418
- if (!this.filter(job.path, stat)) {
72335
+ if (!this.filter(job.path, stat))
72419
72336
  job.ignore = true;
72420
- }
72421
72337
  this[PROCESS]();
72422
72338
  }
72423
72339
  [READDIR](job) {
@@ -72426,9 +72342,8 @@ var require_pack = __commonJSMin((exports, module2) => {
72426
72342
  fs.readdir(job.absolute, (er, entries) => {
72427
72343
  job.pending = false;
72428
72344
  this[JOBS] -= 1;
72429
- if (er) {
72345
+ if (er)
72430
72346
  return this.emit("error", er);
72431
- }
72432
72347
  this[ONREADDIR](job, entries);
72433
72348
  });
72434
72349
  }
@@ -72438,9 +72353,8 @@ var require_pack = __commonJSMin((exports, module2) => {
72438
72353
  this[PROCESS]();
72439
72354
  }
72440
72355
  [PROCESS]() {
72441
- if (this[PROCESSING]) {
72356
+ if (this[PROCESSING])
72442
72357
  return;
72443
- }
72444
72358
  this[PROCESSING] = true;
72445
72359
  for (let w = this[QUEUE].head; w !== null && this[JOBS] < this.jobs; w = w.next) {
72446
72360
  this[PROCESSJOB](w.value);
@@ -72452,9 +72366,9 @@ var require_pack = __commonJSMin((exports, module2) => {
72452
72366
  }
72453
72367
  this[PROCESSING] = false;
72454
72368
  if (this[ENDED] && !this[QUEUE].length && this[JOBS] === 0) {
72455
- if (this.zip) {
72369
+ if (this.zip)
72456
72370
  this.zip.end(EOF);
72457
- } else {
72371
+ else {
72458
72372
  super.write(EOF);
72459
72373
  super.end();
72460
72374
  }
@@ -72469,46 +72383,38 @@ var require_pack = __commonJSMin((exports, module2) => {
72469
72383
  this[PROCESS]();
72470
72384
  }
72471
72385
  [PROCESSJOB](job) {
72472
- if (job.pending) {
72386
+ if (job.pending)
72473
72387
  return;
72474
- }
72475
72388
  if (job.entry) {
72476
- if (job === this[CURRENT] && !job.piped) {
72389
+ if (job === this[CURRENT] && !job.piped)
72477
72390
  this[PIPE](job);
72478
- }
72479
72391
  return;
72480
72392
  }
72481
72393
  if (!job.stat) {
72482
- if (this.statCache.has(job.absolute)) {
72394
+ if (this.statCache.has(job.absolute))
72483
72395
  this[ONSTAT](job, this.statCache.get(job.absolute));
72484
- } else {
72396
+ else
72485
72397
  this[STAT](job);
72486
- }
72487
72398
  }
72488
- if (!job.stat) {
72399
+ if (!job.stat)
72489
72400
  return;
72490
- }
72491
- if (job.ignore) {
72401
+ if (job.ignore)
72492
72402
  return;
72493
- }
72494
72403
  if (!this.noDirRecurse && job.stat.isDirectory() && !job.readdir) {
72495
- if (this.readdirCache.has(job.absolute)) {
72404
+ if (this.readdirCache.has(job.absolute))
72496
72405
  this[ONREADDIR](job, this.readdirCache.get(job.absolute));
72497
- } else {
72406
+ else
72498
72407
  this[READDIR](job);
72499
- }
72500
- if (!job.readdir) {
72408
+ if (!job.readdir)
72501
72409
  return;
72502
- }
72503
72410
  }
72504
72411
  job.entry = this[ENTRY](job);
72505
72412
  if (!job.entry) {
72506
72413
  job.ignore = true;
72507
72414
  return;
72508
72415
  }
72509
- if (job === this[CURRENT] && !job.piped) {
72416
+ if (job === this[CURRENT] && !job.piped)
72510
72417
  this[PIPE](job);
72511
- }
72512
72418
  }
72513
72419
  [ENTRYOPT](job) {
72514
72420
  return {
@@ -72536,9 +72442,8 @@ var require_pack = __commonJSMin((exports, module2) => {
72536
72442
  }
72537
72443
  }
72538
72444
  [ONDRAIN]() {
72539
- if (this[CURRENT] && this[CURRENT].entry) {
72445
+ if (this[CURRENT] && this[CURRENT].entry)
72540
72446
  this[CURRENT].entry.resume();
72541
- }
72542
72447
  }
72543
72448
  [PIPE](job) {
72544
72449
  job.piped = true;
@@ -72553,22 +72458,19 @@ var require_pack = __commonJSMin((exports, module2) => {
72553
72458
  const zip = this.zip;
72554
72459
  if (zip) {
72555
72460
  source.on("data", (chunk) => {
72556
- if (!zip.write(chunk)) {
72461
+ if (!zip.write(chunk))
72557
72462
  source.pause();
72558
- }
72559
72463
  });
72560
72464
  } else {
72561
72465
  source.on("data", (chunk) => {
72562
- if (!super.write(chunk)) {
72466
+ if (!super.write(chunk))
72563
72467
  source.pause();
72564
- }
72565
72468
  });
72566
72469
  }
72567
72470
  }
72568
72471
  pause() {
72569
- if (this.zip) {
72472
+ if (this.zip)
72570
72473
  this.zip.pause();
72571
- }
72572
72474
  return super.pause();
72573
72475
  }
72574
72476
  });
@@ -72980,7 +72882,6 @@ var require_parse = __commonJSMin((exports, module2) => {
72980
72882
  var Entry = require_read_entry();
72981
72883
  var Pax = require_pax();
72982
72884
  var zlib = require_minizlib();
72983
- var { nextTick } = __require("process");
72984
72885
  var gzipHeader = Buffer.from([31, 139]);
72985
72886
  var STATE = Symbol("state");
72986
72887
  var WRITEENTRY = Symbol("writeEntry");
@@ -73011,7 +72912,6 @@ var require_parse = __commonJSMin((exports, module2) => {
73011
72912
  var SAW_VALID_ENTRY = Symbol("sawValidEntry");
73012
72913
  var SAW_NULL_BLOCK = Symbol("sawNullBlock");
73013
72914
  var SAW_EOF = Symbol("sawEOF");
73014
- var CLOSESTREAM = Symbol("closeStream");
73015
72915
  var noop = (_) => true;
73016
72916
  module2.exports = warner(class Parser extends EE {
73017
72917
  constructor(opt) {
@@ -73024,13 +72924,14 @@ var require_parse = __commonJSMin((exports, module2) => {
73024
72924
  this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
73025
72925
  }
73026
72926
  });
73027
- if (opt.ondone) {
72927
+ if (opt.ondone)
73028
72928
  this.on(DONE, opt.ondone);
73029
- } else {
72929
+ else {
73030
72930
  this.on(DONE, (_) => {
73031
72931
  this.emit("prefinish");
73032
72932
  this.emit("finish");
73033
72933
  this.emit("end");
72934
+ this.emit("close");
73034
72935
  });
73035
72936
  }
73036
72937
  this.strict = !!opt.strict;
@@ -73051,18 +72952,14 @@ var require_parse = __commonJSMin((exports, module2) => {
73051
72952
  this[ABORTED] = false;
73052
72953
  this[SAW_NULL_BLOCK] = false;
73053
72954
  this[SAW_EOF] = false;
73054
- this.on("end", () => this[CLOSESTREAM]());
73055
- if (typeof opt.onwarn === "function") {
72955
+ if (typeof opt.onwarn === "function")
73056
72956
  this.on("warn", opt.onwarn);
73057
- }
73058
- if (typeof opt.onentry === "function") {
72957
+ if (typeof opt.onentry === "function")
73059
72958
  this.on("entry", opt.onentry);
73060
- }
73061
72959
  }
73062
72960
  [CONSUMEHEADER](chunk, position) {
73063
- if (this[SAW_VALID_ENTRY] === null) {
72961
+ if (this[SAW_VALID_ENTRY] === null)
73064
72962
  this[SAW_VALID_ENTRY] = false;
73065
- }
73066
72963
  let header;
73067
72964
  try {
73068
72965
  header = new Header(chunk, position, this[EX], this[GEX]);
@@ -73072,9 +72969,8 @@ var require_parse = __commonJSMin((exports, module2) => {
73072
72969
  if (header.nullBlock) {
73073
72970
  if (this[SAW_NULL_BLOCK]) {
73074
72971
  this[SAW_EOF] = true;
73075
- if (this[STATE] === "begin") {
72972
+ if (this[STATE] === "begin")
73076
72973
  this[STATE] = "header";
73077
- }
73078
72974
  this[EMIT]("eof");
73079
72975
  } else {
73080
72976
  this[SAW_NULL_BLOCK] = true;
@@ -73082,29 +72978,27 @@ var require_parse = __commonJSMin((exports, module2) => {
73082
72978
  }
73083
72979
  } else {
73084
72980
  this[SAW_NULL_BLOCK] = false;
73085
- if (!header.cksumValid) {
72981
+ if (!header.cksumValid)
73086
72982
  this.warn("TAR_ENTRY_INVALID", "checksum failure", { header });
73087
- } else if (!header.path) {
72983
+ else if (!header.path)
73088
72984
  this.warn("TAR_ENTRY_INVALID", "path is required", { header });
73089
- } else {
72985
+ else {
73090
72986
  const type = header.type;
73091
- if (/^(Symbolic)?Link$/.test(type) && !header.linkpath) {
72987
+ if (/^(Symbolic)?Link$/.test(type) && !header.linkpath)
73092
72988
  this.warn("TAR_ENTRY_INVALID", "linkpath required", { header });
73093
- } else if (!/^(Symbolic)?Link$/.test(type) && header.linkpath) {
72989
+ else if (!/^(Symbolic)?Link$/.test(type) && header.linkpath)
73094
72990
  this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header });
73095
- } else {
72991
+ else {
73096
72992
  const entry = this[WRITEENTRY] = new Entry(header, this[EX], this[GEX]);
73097
72993
  if (!this[SAW_VALID_ENTRY]) {
73098
72994
  if (entry.remain) {
73099
72995
  const onend = () => {
73100
- if (!entry.invalid) {
72996
+ if (!entry.invalid)
73101
72997
  this[SAW_VALID_ENTRY] = true;
73102
- }
73103
72998
  };
73104
72999
  entry.on("end", onend);
73105
- } else {
73000
+ } else
73106
73001
  this[SAW_VALID_ENTRY] = true;
73107
- }
73108
73002
  }
73109
73003
  if (entry.meta) {
73110
73004
  if (entry.size > this.maxMetaEntrySize) {
@@ -73125,35 +73019,31 @@ var require_parse = __commonJSMin((exports, module2) => {
73125
73019
  this[STATE] = entry.remain ? "ignore" : "header";
73126
73020
  entry.resume();
73127
73021
  } else {
73128
- if (entry.remain) {
73022
+ if (entry.remain)
73129
73023
  this[STATE] = "body";
73130
- } else {
73024
+ else {
73131
73025
  this[STATE] = "header";
73132
73026
  entry.end();
73133
73027
  }
73134
73028
  if (!this[READENTRY]) {
73135
73029
  this[QUEUE].push(entry);
73136
73030
  this[NEXTENTRY]();
73137
- } else {
73031
+ } else
73138
73032
  this[QUEUE].push(entry);
73139
- }
73140
73033
  }
73141
73034
  }
73142
73035
  }
73143
73036
  }
73144
73037
  }
73145
73038
  }
73146
- [CLOSESTREAM]() {
73147
- nextTick(() => this.emit("close"));
73148
- }
73149
73039
  [PROCESSENTRY](entry) {
73150
73040
  let go = true;
73151
73041
  if (!entry) {
73152
73042
  this[READENTRY] = null;
73153
73043
  go = false;
73154
- } else if (Array.isArray(entry)) {
73044
+ } else if (Array.isArray(entry))
73155
73045
  this.emit.apply(this, entry);
73156
- } else {
73046
+ else {
73157
73047
  this[READENTRY] = entry;
73158
73048
  this.emit("entry", entry);
73159
73049
  if (!entry.emittedEnd) {
@@ -73170,12 +73060,10 @@ var require_parse = __commonJSMin((exports, module2) => {
73170
73060
  const re = this[READENTRY];
73171
73061
  const drainNow = !re || re.flowing || re.size === re.remain;
73172
73062
  if (drainNow) {
73173
- if (!this[WRITING]) {
73063
+ if (!this[WRITING])
73174
73064
  this.emit("drain");
73175
- }
73176
- } else {
73065
+ } else
73177
73066
  re.once("drain", (_) => this.emit("drain"));
73178
- }
73179
73067
  }
73180
73068
  }
73181
73069
  [CONSUMEBODY](chunk, position) {
@@ -73193,17 +73081,15 @@ var require_parse = __commonJSMin((exports, module2) => {
73193
73081
  [CONSUMEMETA](chunk, position) {
73194
73082
  const entry = this[WRITEENTRY];
73195
73083
  const ret = this[CONSUMEBODY](chunk, position);
73196
- if (!this[WRITEENTRY]) {
73084
+ if (!this[WRITEENTRY])
73197
73085
  this[EMITMETA](entry);
73198
- }
73199
73086
  return ret;
73200
73087
  }
73201
73088
  [EMIT](ev, data, extra) {
73202
- if (!this[QUEUE].length && !this[READENTRY]) {
73089
+ if (!this[QUEUE].length && !this[READENTRY])
73203
73090
  this.emit(ev, data, extra);
73204
- } else {
73091
+ else
73205
73092
  this[QUEUE].push([ev, data, extra]);
73206
- }
73207
73093
  }
73208
73094
  [EMITMETA](entry) {
73209
73095
  this[EMIT]("meta", this[META]);
@@ -73234,9 +73120,8 @@ var require_parse = __commonJSMin((exports, module2) => {
73234
73120
  this.warn("TAR_ABORT", error, { recoverable: false });
73235
73121
  }
73236
73122
  write(chunk) {
73237
- if (this[ABORTED]) {
73123
+ if (this[ABORTED])
73238
73124
  return;
73239
- }
73240
73125
  if (this[UNZIP] === null && chunk) {
73241
73126
  if (this[BUFFER]) {
73242
73127
  chunk = Buffer.concat([this[BUFFER], chunk]);
@@ -73247,9 +73132,8 @@ var require_parse = __commonJSMin((exports, module2) => {
73247
73132
  return true;
73248
73133
  }
73249
73134
  for (let i = 0; this[UNZIP] === null && i < gzipHeader.length; i++) {
73250
- if (chunk[i] !== gzipHeader[i]) {
73135
+ if (chunk[i] !== gzipHeader[i])
73251
73136
  this[UNZIP] = false;
73252
- }
73253
73137
  }
73254
73138
  if (this[UNZIP] === null) {
73255
73139
  const ended = this[ENDED];
@@ -73268,22 +73152,19 @@ var require_parse = __commonJSMin((exports, module2) => {
73268
73152
  }
73269
73153
  }
73270
73154
  this[WRITING] = true;
73271
- if (this[UNZIP]) {
73155
+ if (this[UNZIP])
73272
73156
  this[UNZIP].write(chunk);
73273
- } else {
73157
+ else
73274
73158
  this[CONSUMECHUNK](chunk);
73275
- }
73276
73159
  this[WRITING] = false;
73277
73160
  const ret = this[QUEUE].length ? false : this[READENTRY] ? this[READENTRY].flowing : true;
73278
- if (!ret && !this[QUEUE].length) {
73161
+ if (!ret && !this[QUEUE].length)
73279
73162
  this[READENTRY].once("drain", (_) => this.emit("drain"));
73280
- }
73281
73163
  return ret;
73282
73164
  }
73283
73165
  [BUFFERCONCAT](c) {
73284
- if (c && !this[ABORTED]) {
73166
+ if (c && !this[ABORTED])
73285
73167
  this[BUFFER] = this[BUFFER] ? Buffer.concat([this[BUFFER], c]) : c;
73286
- }
73287
73168
  }
73288
73169
  [MAYBEEND]() {
73289
73170
  if (this[ENDED] && !this[EMITTEDEND] && !this[ABORTED] && !this[CONSUMING]) {
@@ -73292,29 +73173,27 @@ var require_parse = __commonJSMin((exports, module2) => {
73292
73173
  if (entry && entry.blockRemain) {
73293
73174
  const have = this[BUFFER] ? this[BUFFER].length : 0;
73294
73175
  this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${entry.blockRemain} more bytes, only ${have} available)`, { entry });
73295
- if (this[BUFFER]) {
73176
+ if (this[BUFFER])
73296
73177
  entry.write(this[BUFFER]);
73297
- }
73298
73178
  entry.end();
73299
73179
  }
73300
73180
  this[EMIT](DONE);
73301
73181
  }
73302
73182
  }
73303
73183
  [CONSUMECHUNK](chunk) {
73304
- if (this[CONSUMING]) {
73184
+ if (this[CONSUMING])
73305
73185
  this[BUFFERCONCAT](chunk);
73306
- } else if (!chunk && !this[BUFFER]) {
73186
+ else if (!chunk && !this[BUFFER])
73307
73187
  this[MAYBEEND]();
73308
- } else {
73188
+ else {
73309
73189
  this[CONSUMING] = true;
73310
73190
  if (this[BUFFER]) {
73311
73191
  this[BUFFERCONCAT](chunk);
73312
73192
  const c = this[BUFFER];
73313
73193
  this[BUFFER] = null;
73314
73194
  this[CONSUMECHUNKSUB](c);
73315
- } else {
73195
+ } else
73316
73196
  this[CONSUMECHUNKSUB](chunk);
73317
- }
73318
73197
  while (this[BUFFER] && this[BUFFER].length >= 512 && !this[ABORTED] && !this[SAW_EOF]) {
73319
73198
  const c = this[BUFFER];
73320
73199
  this[BUFFER] = null;
@@ -73322,9 +73201,8 @@ var require_parse = __commonJSMin((exports, module2) => {
73322
73201
  }
73323
73202
  this[CONSUMING] = false;
73324
73203
  }
73325
- if (!this[BUFFER] || this[ENDED]) {
73204
+ if (!this[BUFFER] || this[ENDED])
73326
73205
  this[MAYBEEND]();
73327
- }
73328
73206
  }
73329
73207
  [CONSUMECHUNKSUB](chunk) {
73330
73208
  let position = 0;
@@ -73348,18 +73226,17 @@ var require_parse = __commonJSMin((exports, module2) => {
73348
73226
  }
73349
73227
  }
73350
73228
  if (position < length) {
73351
- if (this[BUFFER]) {
73229
+ if (this[BUFFER])
73352
73230
  this[BUFFER] = Buffer.concat([chunk.slice(position), this[BUFFER]]);
73353
- } else {
73231
+ else
73354
73232
  this[BUFFER] = chunk.slice(position);
73355
- }
73356
73233
  }
73357
73234
  }
73358
73235
  end(chunk) {
73359
73236
  if (!this[ABORTED]) {
73360
- if (this[UNZIP]) {
73237
+ if (this[UNZIP])
73361
73238
  this[UNZIP].end(chunk);
73362
- } else {
73239
+ else {
73363
73240
  this[ENDED] = true;
73364
73241
  this.write(chunk);
73365
73242
  }
@@ -73376,32 +73253,25 @@ var require_list = __commonJSMin((exports, module2) => {
73376
73253
  var path = __require("path");
73377
73254
  var stripSlash = require_strip_trailing_slashes();
73378
73255
  module2.exports = (opt_, files, cb) => {
73379
- if (typeof opt_ === "function") {
73256
+ if (typeof opt_ === "function")
73380
73257
  cb = opt_, files = null, opt_ = {};
73381
- } else if (Array.isArray(opt_)) {
73258
+ else if (Array.isArray(opt_))
73382
73259
  files = opt_, opt_ = {};
73383
- }
73384
- if (typeof files === "function") {
73260
+ if (typeof files === "function")
73385
73261
  cb = files, files = null;
73386
- }
73387
- if (!files) {
73262
+ if (!files)
73388
73263
  files = [];
73389
- } else {
73264
+ else
73390
73265
  files = Array.from(files);
73391
- }
73392
73266
  const opt = hlo(opt_);
73393
- if (opt.sync && typeof cb === "function") {
73267
+ if (opt.sync && typeof cb === "function")
73394
73268
  throw new TypeError("callback not supported for sync tar functions");
73395
- }
73396
- if (!opt.file && typeof cb === "function") {
73269
+ if (!opt.file && typeof cb === "function")
73397
73270
  throw new TypeError("callback only supported with file option");
73398
- }
73399
- if (files.length) {
73271
+ if (files.length)
73400
73272
  filesFilter(opt, files);
73401
- }
73402
- if (!opt.noResume) {
73273
+ if (!opt.noResume)
73403
73274
  onentryFunction(opt);
73404
- }
73405
73275
  return opt.file && opt.sync ? listFileSync(opt) : opt.file ? listFile(opt, cb) : list(opt);
73406
73276
  };
73407
73277
  var onentryFunction = (opt) => {
@@ -73430,9 +73300,9 @@ var require_list = __commonJSMin((exports, module2) => {
73430
73300
  try {
73431
73301
  const stat = fs.statSync(file);
73432
73302
  const readSize = opt.maxReadSize || 16 * 1024 * 1024;
73433
- if (stat.size < readSize) {
73303
+ if (stat.size < readSize)
73434
73304
  p.end(fs.readFileSync(file));
73435
- } else {
73305
+ else {
73436
73306
  let pos = 0;
73437
73307
  const buf = Buffer.allocUnsafe(readSize);
73438
73308
  fd = fs.openSync(file, "r");
@@ -73461,9 +73331,9 @@ var require_list = __commonJSMin((exports, module2) => {
73461
73331
  parse.on("error", reject);
73462
73332
  parse.on("end", resolve);
73463
73333
  fs.stat(file, (er, stat) => {
73464
- if (er) {
73334
+ if (er)
73465
73335
  reject(er);
73466
- } else {
73336
+ else {
73467
73337
  const stream = new fsm.ReadStream(file, {
73468
73338
  readSize,
73469
73339
  size: stat.size
@@ -73485,23 +73355,18 @@ var require_create = __commonJSMin((exports, module2) => {
73485
73355
  var t = require_list();
73486
73356
  var path = __require("path");
73487
73357
  module2.exports = (opt_, files, cb) => {
73488
- if (typeof files === "function") {
73358
+ if (typeof files === "function")
73489
73359
  cb = files;
73490
- }
73491
- if (Array.isArray(opt_)) {
73360
+ if (Array.isArray(opt_))
73492
73361
  files = opt_, opt_ = {};
73493
- }
73494
- if (!files || !Array.isArray(files) || !files.length) {
73362
+ if (!files || !Array.isArray(files) || !files.length)
73495
73363
  throw new TypeError("no files or directories specified");
73496
- }
73497
73364
  files = Array.from(files);
73498
73365
  const opt = hlo(opt_);
73499
- if (opt.sync && typeof cb === "function") {
73366
+ if (opt.sync && typeof cb === "function")
73500
73367
  throw new TypeError("callback not supported for sync tar functions");
73501
- }
73502
- if (!opt.file && typeof cb === "function") {
73368
+ if (!opt.file && typeof cb === "function")
73503
73369
  throw new TypeError("callback only supported with file option");
73504
- }
73505
73370
  return opt.file && opt.sync ? createFileSync(opt, files) : opt.file ? createFile(opt, files, cb) : opt.sync ? createSync(opt, files) : create(opt, files);
73506
73371
  };
73507
73372
  var createFileSync = (opt, files) => {
@@ -73530,14 +73395,13 @@ var require_create = __commonJSMin((exports, module2) => {
73530
73395
  files.forEach((file) => {
73531
73396
  if (file.charAt(0) === "@") {
73532
73397
  t({
73533
- file: path.resolve(p.cwd, file.slice(1)),
73398
+ file: path.resolve(p.cwd, file.substr(1)),
73534
73399
  sync: true,
73535
73400
  noResume: true,
73536
73401
  onentry: (entry) => p.add(entry)
73537
73402
  });
73538
- } else {
73403
+ } else
73539
73404
  p.add(file);
73540
- }
73541
73405
  });
73542
73406
  p.end();
73543
73407
  };
@@ -73546,13 +73410,12 @@ var require_create = __commonJSMin((exports, module2) => {
73546
73410
  const file = files.shift();
73547
73411
  if (file.charAt(0) === "@") {
73548
73412
  return t({
73549
- file: path.resolve(p.cwd, file.slice(1)),
73413
+ file: path.resolve(p.cwd, file.substr(1)),
73550
73414
  noResume: true,
73551
73415
  onentry: (entry) => p.add(entry)
73552
73416
  }).then((_) => addFilesAsync(p, files));
73553
- } else {
73417
+ } else
73554
73418
  p.add(file);
73555
- }
73556
73419
  }
73557
73420
  p.end();
73558
73421
  };
@@ -73578,15 +73441,12 @@ var require_replace = __commonJSMin((exports, module2) => {
73578
73441
  var Header = require_header();
73579
73442
  module2.exports = (opt_, files, cb) => {
73580
73443
  const opt = hlo(opt_);
73581
- if (!opt.file) {
73444
+ if (!opt.file)
73582
73445
  throw new TypeError("file is required");
73583
- }
73584
- if (opt.gzip) {
73446
+ if (opt.gzip)
73585
73447
  throw new TypeError("cannot append to compressed archives");
73586
- }
73587
- if (!files || !Array.isArray(files) || !files.length) {
73448
+ if (!files || !Array.isArray(files) || !files.length)
73588
73449
  throw new TypeError("no files or directories specified");
73589
- }
73590
73450
  files = Array.from(files);
73591
73451
  return opt.sync ? replaceSync(opt, files) : replace(opt, files, cb);
73592
73452
  };
@@ -73599,11 +73459,10 @@ var require_replace = __commonJSMin((exports, module2) => {
73599
73459
  try {
73600
73460
  fd = fs.openSync(opt.file, "r+");
73601
73461
  } catch (er) {
73602
- if (er.code === "ENOENT") {
73462
+ if (er.code === "ENOENT")
73603
73463
  fd = fs.openSync(opt.file, "w+");
73604
- } else {
73464
+ else
73605
73465
  throw er;
73606
- }
73607
73466
  }
73608
73467
  const st = fs.fstatSync(fd);
73609
73468
  const headBuf = Buffer.alloc(512);
@@ -73611,25 +73470,20 @@ var require_replace = __commonJSMin((exports, module2) => {
73611
73470
  for (position = 0; position < st.size; position += 512) {
73612
73471
  for (let bufPos = 0, bytes = 0; bufPos < 512; bufPos += bytes) {
73613
73472
  bytes = fs.readSync(fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos);
73614
- if (position === 0 && headBuf[0] === 31 && headBuf[1] === 139) {
73473
+ if (position === 0 && headBuf[0] === 31 && headBuf[1] === 139)
73615
73474
  throw new Error("cannot append to compressed archives");
73616
- }
73617
- if (!bytes) {
73475
+ if (!bytes)
73618
73476
  break POSITION;
73619
- }
73620
73477
  }
73621
73478
  const h = new Header(headBuf);
73622
- if (!h.cksumValid) {
73479
+ if (!h.cksumValid)
73623
73480
  break;
73624
- }
73625
73481
  const entryBlockSize = 512 * Math.ceil(h.size / 512);
73626
- if (position + entryBlockSize + 512 > st.size) {
73482
+ if (position + entryBlockSize + 512 > st.size)
73627
73483
  break;
73628
- }
73629
73484
  position += entryBlockSize;
73630
- if (opt.mtimeCache) {
73485
+ if (opt.mtimeCache)
73631
73486
  opt.mtimeCache.set(h.path, h.mtime);
73632
- }
73633
73487
  }
73634
73488
  threw = false;
73635
73489
  streamSync(opt, p, position, fd, files);
@@ -73655,47 +73509,38 @@ var require_replace = __commonJSMin((exports, module2) => {
73655
73509
  const p = new Pack(opt);
73656
73510
  const getPos = (fd, size, cb_) => {
73657
73511
  const cb2 = (er, pos) => {
73658
- if (er) {
73512
+ if (er)
73659
73513
  fs.close(fd, (_) => cb_(er));
73660
- } else {
73514
+ else
73661
73515
  cb_(null, pos);
73662
- }
73663
73516
  };
73664
73517
  let position = 0;
73665
- if (size === 0) {
73518
+ if (size === 0)
73666
73519
  return cb2(null, 0);
73667
- }
73668
73520
  let bufPos = 0;
73669
73521
  const headBuf = Buffer.alloc(512);
73670
73522
  const onread = (er, bytes) => {
73671
- if (er) {
73523
+ if (er)
73672
73524
  return cb2(er);
73673
- }
73674
73525
  bufPos += bytes;
73675
73526
  if (bufPos < 512 && bytes) {
73676
73527
  return fs.read(fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos, onread);
73677
73528
  }
73678
- if (position === 0 && headBuf[0] === 31 && headBuf[1] === 139) {
73529
+ if (position === 0 && headBuf[0] === 31 && headBuf[1] === 139)
73679
73530
  return cb2(new Error("cannot append to compressed archives"));
73680
- }
73681
- if (bufPos < 512) {
73531
+ if (bufPos < 512)
73682
73532
  return cb2(null, position);
73683
- }
73684
73533
  const h = new Header(headBuf);
73685
- if (!h.cksumValid) {
73534
+ if (!h.cksumValid)
73686
73535
  return cb2(null, position);
73687
- }
73688
73536
  const entryBlockSize = 512 * Math.ceil(h.size / 512);
73689
- if (position + entryBlockSize + 512 > size) {
73537
+ if (position + entryBlockSize + 512 > size)
73690
73538
  return cb2(null, position);
73691
- }
73692
73539
  position += entryBlockSize + 512;
73693
- if (position >= size) {
73540
+ if (position >= size)
73694
73541
  return cb2(null, position);
73695
- }
73696
- if (opt.mtimeCache) {
73542
+ if (opt.mtimeCache)
73697
73543
  opt.mtimeCache.set(h.path, h.mtime);
73698
- }
73699
73544
  bufPos = 0;
73700
73545
  fs.read(fd, headBuf, 0, 512, position, onread);
73701
73546
  };
@@ -73709,17 +73554,14 @@ var require_replace = __commonJSMin((exports, module2) => {
73709
73554
  flag = "w+";
73710
73555
  return fs.open(opt.file, flag, onopen);
73711
73556
  }
73712
- if (er) {
73557
+ if (er)
73713
73558
  return reject(er);
73714
- }
73715
73559
  fs.fstat(fd, (er2, st) => {
73716
- if (er2) {
73560
+ if (er2)
73717
73561
  return fs.close(fd, () => reject(er2));
73718
- }
73719
73562
  getPos(fd, st.size, (er3, position) => {
73720
- if (er3) {
73563
+ if (er3)
73721
73564
  return reject(er3);
73722
- }
73723
73565
  const stream = new fsm.WriteStream(opt.file, {
73724
73566
  fd,
73725
73567
  start: position
@@ -73739,14 +73581,13 @@ var require_replace = __commonJSMin((exports, module2) => {
73739
73581
  files.forEach((file) => {
73740
73582
  if (file.charAt(0) === "@") {
73741
73583
  t({
73742
- file: path.resolve(p.cwd, file.slice(1)),
73584
+ file: path.resolve(p.cwd, file.substr(1)),
73743
73585
  sync: true,
73744
73586
  noResume: true,
73745
73587
  onentry: (entry) => p.add(entry)
73746
73588
  });
73747
- } else {
73589
+ } else
73748
73590
  p.add(file);
73749
- }
73750
73591
  });
73751
73592
  p.end();
73752
73593
  };
@@ -73755,13 +73596,12 @@ var require_replace = __commonJSMin((exports, module2) => {
73755
73596
  const file = files.shift();
73756
73597
  if (file.charAt(0) === "@") {
73757
73598
  return t({
73758
- file: path.resolve(p.cwd, file.slice(1)),
73599
+ file: path.resolve(p.cwd, file.substr(1)),
73759
73600
  noResume: true,
73760
73601
  onentry: (entry) => p.add(entry)
73761
73602
  }).then((_) => addFilesAsync(p, files));
73762
- } else {
73603
+ } else
73763
73604
  p.add(file);
73764
- }
73765
73605
  }
73766
73606
  p.end();
73767
73607
  };
@@ -73772,24 +73612,20 @@ var require_update = __commonJSMin((exports, module2) => {
73772
73612
  var r = require_replace();
73773
73613
  module2.exports = (opt_, files, cb) => {
73774
73614
  const opt = hlo(opt_);
73775
- if (!opt.file) {
73615
+ if (!opt.file)
73776
73616
  throw new TypeError("file is required");
73777
- }
73778
- if (opt.gzip) {
73617
+ if (opt.gzip)
73779
73618
  throw new TypeError("cannot append to compressed archives");
73780
- }
73781
- if (!files || !Array.isArray(files) || !files.length) {
73619
+ if (!files || !Array.isArray(files) || !files.length)
73782
73620
  throw new TypeError("no files or directories specified");
73783
- }
73784
73621
  files = Array.from(files);
73785
73622
  mtimeFilter(opt);
73786
73623
  return r(opt, files, cb);
73787
73624
  };
73788
73625
  var mtimeFilter = (opt) => {
73789
73626
  const filter = opt.filter;
73790
- if (!opt.mtimeCache) {
73627
+ if (!opt.mtimeCache)
73791
73628
  opt.mtimeCache = /* @__PURE__ */ new Map();
73792
- }
73793
73629
  opt.filter = filter ? (path, stat) => filter(path, stat) && !(opt.mtimeCache.get(path) > stat.mtime) : (path, stat) => !(opt.mtimeCache.get(path) > stat.mtime);
73794
73630
  };
73795
73631
  });
@@ -74141,9 +73977,8 @@ var require_mkdir = __commonJSMin((exports, module2) => {
74141
73977
  var cSet = (cache, key, val) => cache.set(normPath(key), val);
74142
73978
  var checkCwd = (dir, cb) => {
74143
73979
  fs.stat(dir, (er, st) => {
74144
- if (er || !st.isDirectory()) {
73980
+ if (er || !st.isDirectory())
74145
73981
  er = new CwdError(dir, er && er.code || "ENOTDIR");
74146
- }
74147
73982
  cb(er);
74148
73983
  });
74149
73984
  };
@@ -74160,41 +73995,35 @@ var require_mkdir = __commonJSMin((exports, module2) => {
74160
73995
  const cache = opt.cache;
74161
73996
  const cwd = normPath(opt.cwd);
74162
73997
  const done = (er, created) => {
74163
- if (er) {
73998
+ if (er)
74164
73999
  cb(er);
74165
- } else {
74000
+ else {
74166
74001
  cSet(cache, dir, true);
74167
- if (created && doChown) {
74002
+ if (created && doChown)
74168
74003
  chownr(created, uid, gid, (er2) => done(er2));
74169
- } else if (needChmod) {
74004
+ else if (needChmod)
74170
74005
  fs.chmod(dir, mode, cb);
74171
- } else {
74006
+ else
74172
74007
  cb();
74173
- }
74174
74008
  }
74175
74009
  };
74176
- if (cache && cGet(cache, dir) === true) {
74010
+ if (cache && cGet(cache, dir) === true)
74177
74011
  return done();
74178
- }
74179
- if (dir === cwd) {
74012
+ if (dir === cwd)
74180
74013
  return checkCwd(dir, done);
74181
- }
74182
- if (preserve) {
74014
+ if (preserve)
74183
74015
  return mkdirp(dir, { mode }).then((made) => done(null, made), done);
74184
- }
74185
74016
  const sub = normPath(path.relative(cwd, dir));
74186
74017
  const parts = sub.split("/");
74187
74018
  mkdir_(cwd, parts, mode, cache, unlink, cwd, null, done);
74188
74019
  };
74189
74020
  var mkdir_ = (base, parts, mode, cache, unlink, cwd, created, cb) => {
74190
- if (!parts.length) {
74021
+ if (!parts.length)
74191
74022
  return cb(null, created);
74192
- }
74193
74023
  const p = parts.shift();
74194
74024
  const part = normPath(path.resolve(base + "/" + p));
74195
- if (cGet(cache, part)) {
74025
+ if (cGet(cache, part))
74196
74026
  return mkdir_(part, parts, mode, cache, unlink, cwd, created, cb);
74197
- }
74198
74027
  fs.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb));
74199
74028
  };
74200
74029
  var onmkdir = (part, parts, mode, cache, unlink, cwd, created, cb) => (er) => {
@@ -74203,20 +74032,18 @@ var require_mkdir = __commonJSMin((exports, module2) => {
74203
74032
  if (statEr) {
74204
74033
  statEr.path = statEr.path && normPath(statEr.path);
74205
74034
  cb(statEr);
74206
- } else if (st.isDirectory()) {
74035
+ } else if (st.isDirectory())
74207
74036
  mkdir_(part, parts, mode, cache, unlink, cwd, created, cb);
74208
- } else if (unlink) {
74037
+ else if (unlink) {
74209
74038
  fs.unlink(part, (er2) => {
74210
- if (er2) {
74039
+ if (er2)
74211
74040
  return cb(er2);
74212
- }
74213
74041
  fs.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb));
74214
74042
  });
74215
- } else if (st.isSymbolicLink()) {
74043
+ } else if (st.isSymbolicLink())
74216
74044
  return cb(new SymlinkError(part, part + "/" + parts.join("/")));
74217
- } else {
74045
+ else
74218
74046
  cb(er);
74219
- }
74220
74047
  });
74221
74048
  } else {
74222
74049
  created = created || part;
@@ -74231,9 +74058,8 @@ var require_mkdir = __commonJSMin((exports, module2) => {
74231
74058
  } catch (er) {
74232
74059
  code = er.code;
74233
74060
  } finally {
74234
- if (!ok) {
74061
+ if (!ok)
74235
74062
  throw new CwdError(dir, code);
74236
- }
74237
74063
  }
74238
74064
  };
74239
74065
  module2.exports.sync = (dir, opt) => {
@@ -74250,31 +74076,26 @@ var require_mkdir = __commonJSMin((exports, module2) => {
74250
74076
  const cwd = normPath(opt.cwd);
74251
74077
  const done = (created2) => {
74252
74078
  cSet(cache, dir, true);
74253
- if (created2 && doChown) {
74079
+ if (created2 && doChown)
74254
74080
  chownr.sync(created2, uid, gid);
74255
- }
74256
- if (needChmod) {
74081
+ if (needChmod)
74257
74082
  fs.chmodSync(dir, mode);
74258
- }
74259
74083
  };
74260
- if (cache && cGet(cache, dir) === true) {
74084
+ if (cache && cGet(cache, dir) === true)
74261
74085
  return done();
74262
- }
74263
74086
  if (dir === cwd) {
74264
74087
  checkCwdSync(cwd);
74265
74088
  return done();
74266
74089
  }
74267
- if (preserve) {
74090
+ if (preserve)
74268
74091
  return done(mkdirp.sync(dir, mode));
74269
- }
74270
74092
  const sub = normPath(path.relative(cwd, dir));
74271
74093
  const parts = sub.split("/");
74272
74094
  let created = null;
74273
74095
  for (let p = parts.shift(), part = cwd; p && (part += "/" + p); p = parts.shift()) {
74274
74096
  part = normPath(path.resolve(part));
74275
- if (cGet(cache, part)) {
74097
+ if (cGet(cache, part))
74276
74098
  continue;
74277
- }
74278
74099
  try {
74279
74100
  fs.mkdirSync(part, mode);
74280
74101
  created = created || part;
@@ -74290,9 +74111,8 @@ var require_mkdir = __commonJSMin((exports, module2) => {
74290
74111
  created = created || part;
74291
74112
  cSet(cache, part, true);
74292
74113
  continue;
74293
- } else if (st.isSymbolicLink()) {
74114
+ } else if (st.isSymbolicLink())
74294
74115
  return new SymlinkError(part, part + "/" + parts.join("/"));
74295
- }
74296
74116
  }
74297
74117
  }
74298
74118
  return done(created);
@@ -74302,9 +74122,8 @@ var require_normalize_unicode = __commonJSMin((exports, module2) => {
74302
74122
  var normalizeCache = /* @__PURE__ */ Object.create(null);
74303
74123
  var { hasOwnProperty } = Object.prototype;
74304
74124
  module2.exports = (s) => {
74305
- if (!hasOwnProperty.call(normalizeCache, s)) {
74125
+ if (!hasOwnProperty.call(normalizeCache, s))
74306
74126
  normalizeCache[s] = s.normalize("NFKD");
74307
- }
74308
74127
  return normalizeCache[s];
74309
74128
  };
74310
74129
  });
@@ -74320,9 +74139,8 @@ var require_path_reservations = __commonJSMin((exports, module2) => {
74320
74139
  const reservations = /* @__PURE__ */ new Map();
74321
74140
  const getDirs = (path) => {
74322
74141
  const dirs = path.split("/").slice(0, -1).reduce((set, path2) => {
74323
- if (set.length) {
74142
+ if (set.length)
74324
74143
  path2 = join(set[set.length - 1], path2);
74325
- }
74326
74144
  set.push(path2 || "/");
74327
74145
  return set;
74328
74146
  }, []);
@@ -74331,9 +74149,8 @@ var require_path_reservations = __commonJSMin((exports, module2) => {
74331
74149
  const running = /* @__PURE__ */ new Set();
74332
74150
  const getQueues = (fn) => {
74333
74151
  const res = reservations.get(fn);
74334
- if (!res) {
74152
+ if (!res)
74335
74153
  throw new Error("function does not have any path reservations");
74336
- }
74337
74154
  return {
74338
74155
  paths: res.paths.map((path) => queues.get(path)),
74339
74156
  dirs: [...res.dirs].map((path) => queues.get(path))
@@ -74344,44 +74161,40 @@ var require_path_reservations = __commonJSMin((exports, module2) => {
74344
74161
  return paths.every((q) => q[0] === fn) && dirs.every((q) => q[0] instanceof Set && q[0].has(fn));
74345
74162
  };
74346
74163
  const run = (fn) => {
74347
- if (running.has(fn) || !check(fn)) {
74164
+ if (running.has(fn) || !check(fn))
74348
74165
  return false;
74349
- }
74350
74166
  running.add(fn);
74351
74167
  fn(() => clear(fn));
74352
74168
  return true;
74353
74169
  };
74354
74170
  const clear = (fn) => {
74355
- if (!running.has(fn)) {
74171
+ if (!running.has(fn))
74356
74172
  return false;
74357
- }
74358
74173
  const { paths, dirs } = reservations.get(fn);
74359
74174
  const next = /* @__PURE__ */ new Set();
74360
74175
  paths.forEach((path) => {
74361
74176
  const q = queues.get(path);
74362
74177
  assert.equal(q[0], fn);
74363
- if (q.length === 1) {
74178
+ if (q.length === 1)
74364
74179
  queues.delete(path);
74365
- } else {
74180
+ else {
74366
74181
  q.shift();
74367
- if (typeof q[0] === "function") {
74182
+ if (typeof q[0] === "function")
74368
74183
  next.add(q[0]);
74369
- } else {
74184
+ else
74370
74185
  q[0].forEach((fn2) => next.add(fn2));
74371
- }
74372
74186
  }
74373
74187
  });
74374
74188
  dirs.forEach((dir) => {
74375
74189
  const q = queues.get(dir);
74376
74190
  assert(q[0] instanceof Set);
74377
- if (q[0].size === 1 && q.length === 1) {
74191
+ if (q[0].size === 1 && q.length === 1)
74378
74192
  queues.delete(dir);
74379
- } else if (q[0].size === 1) {
74193
+ else if (q[0].size === 1) {
74380
74194
  q.shift();
74381
74195
  next.add(q[0]);
74382
- } else {
74196
+ } else
74383
74197
  q[0].delete(fn);
74384
- }
74385
74198
  });
74386
74199
  running.delete(fn);
74387
74200
  next.forEach((fn2) => run(fn2));
@@ -74395,21 +74208,19 @@ var require_path_reservations = __commonJSMin((exports, module2) => {
74395
74208
  reservations.set(fn, { dirs, paths });
74396
74209
  paths.forEach((path) => {
74397
74210
  const q = queues.get(path);
74398
- if (!q) {
74211
+ if (!q)
74399
74212
  queues.set(path, [fn]);
74400
- } else {
74213
+ else
74401
74214
  q.push(fn);
74402
- }
74403
74215
  });
74404
74216
  dirs.forEach((dir) => {
74405
74217
  const q = queues.get(dir);
74406
- if (!q) {
74218
+ if (!q)
74407
74219
  queues.set(dir, [/* @__PURE__ */ new Set([fn])]);
74408
- } else if (q[q.length - 1] instanceof Set) {
74220
+ else if (q[q.length - 1] instanceof Set)
74409
74221
  q[q.length - 1].add(fn);
74410
- } else {
74222
+ else
74411
74223
  q.push(/* @__PURE__ */ new Set([fn]));
74412
- }
74413
74224
  });
74414
74225
  return run(fn);
74415
74226
  };
@@ -74470,21 +74281,18 @@ var require_unpack = __commonJSMin((exports, module2) => {
74470
74281
  var platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
74471
74282
  var isWindows = platform === "win32";
74472
74283
  var unlinkFile = (path2, cb) => {
74473
- if (!isWindows) {
74284
+ if (!isWindows)
74474
74285
  return fs.unlink(path2, cb);
74475
- }
74476
74286
  const name4 = path2 + ".DELETE." + crypto.randomBytes(16).toString("hex");
74477
74287
  fs.rename(path2, name4, (er) => {
74478
- if (er) {
74288
+ if (er)
74479
74289
  return cb(er);
74480
- }
74481
74290
  fs.unlink(name4, cb);
74482
74291
  });
74483
74292
  };
74484
74293
  var unlinkFileSync = (path2) => {
74485
- if (!isWindows) {
74294
+ if (!isWindows)
74486
74295
  return fs.unlinkSync(path2);
74487
- }
74488
74296
  const name4 = path2 + ".DELETE." + crypto.randomBytes(16).toString("hex");
74489
74297
  fs.renameSync(path2, name4);
74490
74298
  fs.unlinkSync(name4);
@@ -74495,21 +74303,18 @@ var require_unpack = __commonJSMin((exports, module2) => {
74495
74303
  abs = cacheKeyNormalize(abs);
74496
74304
  for (const path2 of cache.keys()) {
74497
74305
  const pnorm = cacheKeyNormalize(path2);
74498
- if (pnorm === abs || pnorm.indexOf(abs + "/") === 0) {
74306
+ if (pnorm === abs || pnorm.indexOf(abs + "/") === 0)
74499
74307
  cache.delete(path2);
74500
- }
74501
74308
  }
74502
74309
  };
74503
74310
  var dropCache = (cache) => {
74504
- for (const key of cache.keys()) {
74311
+ for (const key of cache.keys())
74505
74312
  cache.delete(key);
74506
- }
74507
74313
  };
74508
74314
  var Unpack = class extends Parser {
74509
74315
  constructor(opt) {
74510
- if (!opt) {
74316
+ if (!opt)
74511
74317
  opt = {};
74512
- }
74513
74318
  opt.ondone = (_) => {
74514
74319
  this[ENDED] = true;
74515
74320
  this[MAYBECLOSE]();
@@ -74524,9 +74329,8 @@ var require_unpack = __commonJSMin((exports, module2) => {
74524
74329
  this[ENDED] = false;
74525
74330
  this.dirCache = opt.dirCache || /* @__PURE__ */ new Map();
74526
74331
  if (typeof opt.uid === "number" || typeof opt.gid === "number") {
74527
- if (typeof opt.uid !== "number" || typeof opt.gid !== "number") {
74332
+ if (typeof opt.uid !== "number" || typeof opt.gid !== "number")
74528
74333
  throw new TypeError("cannot set owner without number uid and gid");
74529
- }
74530
74334
  if (opt.preserveOwner) {
74531
74335
  throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
74532
74336
  }
@@ -74538,11 +74342,10 @@ var require_unpack = __commonJSMin((exports, module2) => {
74538
74342
  this.gid = null;
74539
74343
  this.setOwner = false;
74540
74344
  }
74541
- if (opt.preserveOwner === void 0 && typeof opt.uid !== "number") {
74345
+ if (opt.preserveOwner === void 0 && typeof opt.uid !== "number")
74542
74346
  this.preserveOwner = process.getuid && process.getuid() === 0;
74543
- } else {
74347
+ else
74544
74348
  this.preserveOwner = !!opt.preserveOwner;
74545
- }
74546
74349
  this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : null;
74547
74350
  this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : null;
74548
74351
  this.forceChown = opt.forceChown === true;
@@ -74561,9 +74364,8 @@ var require_unpack = __commonJSMin((exports, module2) => {
74561
74364
  this.on("entry", (entry) => this[ONENTRY](entry));
74562
74365
  }
74563
74366
  warn(code, msg, data = {}) {
74564
- if (code === "TAR_BAD_ARCHIVE" || code === "TAR_ABORT") {
74367
+ if (code === "TAR_BAD_ARCHIVE" || code === "TAR_ABORT")
74565
74368
  data.recoverable = false;
74566
- }
74567
74369
  return super.warn(code, msg, data);
74568
74370
  }
74569
74371
  [MAYBECLOSE]() {
@@ -74571,22 +74373,21 @@ var require_unpack = __commonJSMin((exports, module2) => {
74571
74373
  this.emit("prefinish");
74572
74374
  this.emit("finish");
74573
74375
  this.emit("end");
74376
+ this.emit("close");
74574
74377
  }
74575
74378
  }
74576
74379
  [CHECKPATH](entry) {
74577
74380
  if (this.strip) {
74578
74381
  const parts = normPath(entry.path).split("/");
74579
- if (parts.length < this.strip) {
74382
+ if (parts.length < this.strip)
74580
74383
  return false;
74581
- }
74582
74384
  entry.path = parts.slice(this.strip).join("/");
74583
74385
  if (entry.type === "Link") {
74584
74386
  const linkparts = normPath(entry.linkpath).split("/");
74585
- if (linkparts.length >= this.strip) {
74387
+ if (linkparts.length >= this.strip)
74586
74388
  entry.linkpath = linkparts.slice(this.strip).join("/");
74587
- } else {
74389
+ else
74588
74390
  return false;
74589
- }
74590
74391
  }
74591
74392
  }
74592
74393
  if (!this.preservePaths) {
@@ -74608,11 +74409,10 @@ var require_unpack = __commonJSMin((exports, module2) => {
74608
74409
  });
74609
74410
  }
74610
74411
  }
74611
- if (path.isAbsolute(entry.path)) {
74412
+ if (path.isAbsolute(entry.path))
74612
74413
  entry.absolute = normPath(path.resolve(entry.path));
74613
- } else {
74414
+ else
74614
74415
  entry.absolute = normPath(path.resolve(this.cwd, entry.path));
74615
- }
74616
74416
  if (!this.preservePaths && entry.absolute.indexOf(this.cwd + "/") !== 0 && entry.absolute !== this.cwd) {
74617
74417
  this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", {
74618
74418
  entry,
@@ -74622,28 +74422,25 @@ var require_unpack = __commonJSMin((exports, module2) => {
74622
74422
  });
74623
74423
  return false;
74624
74424
  }
74625
- if (entry.absolute === this.cwd && entry.type !== "Directory" && entry.type !== "GNUDumpDir") {
74425
+ if (entry.absolute === this.cwd && entry.type !== "Directory" && entry.type !== "GNUDumpDir")
74626
74426
  return false;
74627
- }
74628
74427
  if (this.win32) {
74629
74428
  const { root: aRoot } = path.win32.parse(entry.absolute);
74630
- entry.absolute = aRoot + wc.encode(entry.absolute.slice(aRoot.length));
74429
+ entry.absolute = aRoot + wc.encode(entry.absolute.substr(aRoot.length));
74631
74430
  const { root: pRoot } = path.win32.parse(entry.path);
74632
- entry.path = pRoot + wc.encode(entry.path.slice(pRoot.length));
74431
+ entry.path = pRoot + wc.encode(entry.path.substr(pRoot.length));
74633
74432
  }
74634
74433
  return true;
74635
74434
  }
74636
74435
  [ONENTRY](entry) {
74637
- if (!this[CHECKPATH](entry)) {
74436
+ if (!this[CHECKPATH](entry))
74638
74437
  return entry.resume();
74639
- }
74640
74438
  assert.equal(typeof entry.absolute, "string");
74641
74439
  switch (entry.type) {
74642
74440
  case "Directory":
74643
74441
  case "GNUDumpDir":
74644
- if (entry.mode) {
74442
+ if (entry.mode)
74645
74443
  entry.mode = entry.mode | 448;
74646
- }
74647
74444
  case "File":
74648
74445
  case "OldFile":
74649
74446
  case "ContiguousFile":
@@ -74658,9 +74455,9 @@ var require_unpack = __commonJSMin((exports, module2) => {
74658
74455
  }
74659
74456
  }
74660
74457
  [ONERROR](er, entry) {
74661
- if (er.name === "CwdError") {
74458
+ if (er.name === "CwdError")
74662
74459
  this.emit("error", er);
74663
- } else {
74460
+ else {
74664
74461
  this.warn("TAR_ENTRY_ERROR", er, { entry });
74665
74462
  this[UNPEND]();
74666
74463
  entry.resume();
@@ -74698,10 +74495,9 @@ var require_unpack = __commonJSMin((exports, module2) => {
74698
74495
  autoClose: false
74699
74496
  });
74700
74497
  stream.on("error", (er) => {
74701
- if (stream.fd) {
74498
+ if (stream.fd)
74702
74499
  fs.close(stream.fd, () => {
74703
74500
  });
74704
- }
74705
74501
  stream.write = () => true;
74706
74502
  this[ONERROR](er, entry);
74707
74503
  fullyDone();
@@ -74709,21 +74505,19 @@ var require_unpack = __commonJSMin((exports, module2) => {
74709
74505
  let actions = 1;
74710
74506
  const done = (er) => {
74711
74507
  if (er) {
74712
- if (stream.fd) {
74508
+ if (stream.fd)
74713
74509
  fs.close(stream.fd, () => {
74714
74510
  });
74715
- }
74716
74511
  this[ONERROR](er, entry);
74717
74512
  fullyDone();
74718
74513
  return;
74719
74514
  }
74720
74515
  if (--actions === 0) {
74721
74516
  fs.close(stream.fd, (er2) => {
74722
- if (er2) {
74517
+ if (er2)
74723
74518
  this[ONERROR](er2, entry);
74724
- } else {
74519
+ else
74725
74520
  this[UNPEND]();
74726
- }
74727
74521
  fullyDone();
74728
74522
  });
74729
74523
  }
@@ -74811,17 +74605,15 @@ var require_unpack = __commonJSMin((exports, module2) => {
74811
74605
  [CHECKFS](entry) {
74812
74606
  this[PEND]();
74813
74607
  const paths = [entry.path];
74814
- if (entry.linkpath) {
74608
+ if (entry.linkpath)
74815
74609
  paths.push(entry.linkpath);
74816
- }
74817
74610
  this.reservations.reserve(paths, (done) => this[CHECKFS2](entry, done));
74818
74611
  }
74819
74612
  [PRUNECACHE](entry) {
74820
- if (entry.type === "SymbolicLink") {
74613
+ if (entry.type === "SymbolicLink")
74821
74614
  dropCache(this.dirCache);
74822
- } else if (entry.type !== "Directory") {
74615
+ else if (entry.type !== "Directory")
74823
74616
  pruneCache(this.dirCache, entry.absolute);
74824
- }
74825
74617
  }
74826
74618
  [CHECKFS2](entry, fullyDone) {
74827
74619
  this[PRUNECACHE](entry);
@@ -74863,33 +74655,29 @@ var require_unpack = __commonJSMin((exports, module2) => {
74863
74655
  done();
74864
74656
  return;
74865
74657
  }
74866
- if (lstatEr || this[ISREUSABLE](entry, st)) {
74658
+ if (lstatEr || this[ISREUSABLE](entry, st))
74867
74659
  return this[MAKEFS](null, entry, done);
74868
- }
74869
74660
  if (st.isDirectory()) {
74870
74661
  if (entry.type === "Directory") {
74871
74662
  const needChmod = !this.noChmod && entry.mode && (st.mode & 4095) !== entry.mode;
74872
74663
  const afterChmod = (er) => this[MAKEFS](er, entry, done);
74873
- if (!needChmod) {
74664
+ if (!needChmod)
74874
74665
  return afterChmod();
74875
- }
74876
74666
  return fs.chmod(entry.absolute, entry.mode, afterChmod);
74877
74667
  }
74878
74668
  if (entry.absolute !== this.cwd) {
74879
74669
  return fs.rmdir(entry.absolute, (er) => this[MAKEFS](er, entry, done));
74880
74670
  }
74881
74671
  }
74882
- if (entry.absolute === this.cwd) {
74672
+ if (entry.absolute === this.cwd)
74883
74673
  return this[MAKEFS](null, entry, done);
74884
- }
74885
74674
  unlinkFile(entry.absolute, (er) => this[MAKEFS](er, entry, done));
74886
74675
  });
74887
74676
  };
74888
- if (this[CHECKED_CWD]) {
74677
+ if (this[CHECKED_CWD])
74889
74678
  start();
74890
- } else {
74679
+ else
74891
74680
  checkCwd();
74892
- }
74893
74681
  }
74894
74682
  [MAKEFS](er, entry, done) {
74895
74683
  if (er) {
@@ -74913,9 +74701,9 @@ var require_unpack = __commonJSMin((exports, module2) => {
74913
74701
  }
74914
74702
  [LINK](entry, linkpath, link, done) {
74915
74703
  fs[link](linkpath, entry.absolute, (er) => {
74916
- if (er) {
74704
+ if (er)
74917
74705
  this[ONERROR](er, entry);
74918
- } else {
74706
+ else {
74919
74707
  this[UNPEND]();
74920
74708
  entry.resume();
74921
74709
  }
@@ -74939,27 +74727,23 @@ var require_unpack = __commonJSMin((exports, module2) => {
74939
74727
  this[PRUNECACHE](entry);
74940
74728
  if (!this[CHECKED_CWD]) {
74941
74729
  const er2 = this[MKDIR](this.cwd, this.dmode);
74942
- if (er2) {
74730
+ if (er2)
74943
74731
  return this[ONERROR](er2, entry);
74944
- }
74945
74732
  this[CHECKED_CWD] = true;
74946
74733
  }
74947
74734
  if (entry.absolute !== this.cwd) {
74948
74735
  const parent = normPath(path.dirname(entry.absolute));
74949
74736
  if (parent !== this.cwd) {
74950
74737
  const mkParent = this[MKDIR](parent, this.dmode);
74951
- if (mkParent) {
74738
+ if (mkParent)
74952
74739
  return this[ONERROR](mkParent, entry);
74953
- }
74954
74740
  }
74955
74741
  }
74956
74742
  const [lstatEr, st] = callSync(() => fs.lstatSync(entry.absolute));
74957
- if (st && (this.keep || this.newer && st.mtime > entry.mtime)) {
74743
+ if (st && (this.keep || this.newer && st.mtime > entry.mtime))
74958
74744
  return this[SKIP](entry);
74959
- }
74960
- if (lstatEr || this[ISREUSABLE](entry, st)) {
74745
+ if (lstatEr || this[ISREUSABLE](entry, st))
74961
74746
  return this[MAKEFS](null, entry);
74962
- }
74963
74747
  if (st.isDirectory()) {
74964
74748
  if (entry.type === "Directory") {
74965
74749
  const needChmod = !this.noChmod && entry.mode && (st.mode & 4095) !== entry.mode;
@@ -74983,9 +74767,8 @@ var require_unpack = __commonJSMin((exports, module2) => {
74983
74767
  } catch (e) {
74984
74768
  closeError = e;
74985
74769
  }
74986
- if (er || closeError) {
74770
+ if (er || closeError)
74987
74771
  this[ONERROR](er || closeError, entry);
74988
- }
74989
74772
  done();
74990
74773
  };
74991
74774
  let fd;
@@ -75100,29 +74883,23 @@ var require_extract = __commonJSMin((exports, module2) => {
75100
74883
  var path = __require("path");
75101
74884
  var stripSlash = require_strip_trailing_slashes();
75102
74885
  module2.exports = (opt_, files, cb) => {
75103
- if (typeof opt_ === "function") {
74886
+ if (typeof opt_ === "function")
75104
74887
  cb = opt_, files = null, opt_ = {};
75105
- } else if (Array.isArray(opt_)) {
74888
+ else if (Array.isArray(opt_))
75106
74889
  files = opt_, opt_ = {};
75107
- }
75108
- if (typeof files === "function") {
74890
+ if (typeof files === "function")
75109
74891
  cb = files, files = null;
75110
- }
75111
- if (!files) {
74892
+ if (!files)
75112
74893
  files = [];
75113
- } else {
74894
+ else
75114
74895
  files = Array.from(files);
75115
- }
75116
74896
  const opt = hlo(opt_);
75117
- if (opt.sync && typeof cb === "function") {
74897
+ if (opt.sync && typeof cb === "function")
75118
74898
  throw new TypeError("callback not supported for sync tar functions");
75119
- }
75120
- if (!opt.file && typeof cb === "function") {
74899
+ if (!opt.file && typeof cb === "function")
75121
74900
  throw new TypeError("callback only supported with file option");
75122
- }
75123
- if (files.length) {
74901
+ if (files.length)
75124
74902
  filesFilter(opt, files);
75125
- }
75126
74903
  return opt.file && opt.sync ? extractFileSync(opt) : opt.file ? extractFile(opt, cb) : opt.sync ? extractSync(opt) : extract(opt);
75127
74904
  };
75128
74905
  var filesFilter = (opt, files) => {
@@ -75155,9 +74932,9 @@ var require_extract = __commonJSMin((exports, module2) => {
75155
74932
  u.on("error", reject);
75156
74933
  u.on("close", resolve);
75157
74934
  fs.stat(file, (er, stat) => {
75158
- if (er) {
74935
+ if (er)
75159
74936
  reject(er);
75160
- } else {
74937
+ else {
75161
74938
  const stream = new fsm.ReadStream(file, {
75162
74939
  readSize,
75163
74940
  size: stat.size
@@ -75714,30 +75491,6 @@ function _classCallCheck(instance, Constructor) {
75714
75491
  throw new TypeError("Cannot call a class as a function");
75715
75492
  }
75716
75493
  }
75717
- function _typeof(obj) {
75718
- "@babel/helpers - typeof";
75719
- return _typeof = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(obj2) {
75720
- return typeof obj2;
75721
- } : function(obj2) {
75722
- return obj2 && typeof Symbol == "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
75723
- }, _typeof(obj);
75724
- }
75725
- function _toPrimitive(input, hint) {
75726
- if (_typeof(input) !== "object" || input === null)
75727
- return input;
75728
- var prim = input[Symbol.toPrimitive];
75729
- if (prim !== void 0) {
75730
- var res = prim.call(input, hint || "default");
75731
- if (_typeof(res) !== "object")
75732
- return res;
75733
- throw new TypeError("@@toPrimitive must return a primitive value.");
75734
- }
75735
- return (hint === "string" ? String : Number)(input);
75736
- }
75737
- function _toPropertyKey(arg) {
75738
- var key = _toPrimitive(arg, "string");
75739
- return _typeof(key) === "symbol" ? key : String(key);
75740
- }
75741
75494
  function _defineProperties(target, props) {
75742
75495
  for (var i = 0; i < props.length; i++) {
75743
75496
  var descriptor = props[i];
@@ -75745,7 +75498,7 @@ function _defineProperties(target, props) {
75745
75498
  descriptor.configurable = true;
75746
75499
  if ("value" in descriptor)
75747
75500
  descriptor.writable = true;
75748
- Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
75501
+ Object.defineProperty(target, descriptor.key, descriptor);
75749
75502
  }
75750
75503
  }
75751
75504
  function _createClass(Constructor, protoProps, staticProps) {
@@ -75759,7 +75512,6 @@ function _createClass(Constructor, protoProps, staticProps) {
75759
75512
  return Constructor;
75760
75513
  }
75761
75514
  function _defineProperty(obj, key, value) {
75762
- key = _toPropertyKey(key);
75763
75515
  if (key in obj) {
75764
75516
  Object.defineProperty(obj, key, {
75765
75517
  value,