forked from olcxjas-softworks/LarpixClient
update electron to v43
This commit is contained in:
parent
68ac0beedf
commit
fb6c8b6ee9
5385 changed files with 513060 additions and 123058 deletions
55
electron/node_modules/tar/dist/commonjs/pack.js
generated
vendored
55
electron/node_modules/tar/dist/commonjs/pack.js
generated
vendored
|
|
@ -54,6 +54,7 @@ class PackJob {
|
|||
stat;
|
||||
readdir;
|
||||
pending = false;
|
||||
pendingLink = false;
|
||||
ignore = false;
|
||||
piped = false;
|
||||
constructor(path, absolute) {
|
||||
|
|
@ -65,12 +66,12 @@ exports.PackJob = PackJob;
|
|||
const minipass_1 = require("minipass");
|
||||
const zlib = __importStar(require("minizlib"));
|
||||
const yallist_1 = require("yallist");
|
||||
const read_entry_js_1 = require("./read-entry.js");
|
||||
const warn_method_js_1 = require("./warn-method.js");
|
||||
const EOF = Buffer.alloc(1024);
|
||||
const ONSTAT = Symbol('onStat');
|
||||
const ENDED = Symbol('ended');
|
||||
const QUEUE = Symbol('queue');
|
||||
const PENDINGLINKS = Symbol('pendingLinks');
|
||||
const CURRENT = Symbol('current');
|
||||
const PROCESS = Symbol('process');
|
||||
const PROCESSING = Symbol('processing');
|
||||
|
|
@ -122,6 +123,7 @@ class Pack extends minipass_1.Minipass {
|
|||
// class, but then we'd have to be tracking the tail of the queue the
|
||||
// whole time, and Yallist just does that for us anyway.
|
||||
[QUEUE];
|
||||
[PENDINGLINKS] = new Map();
|
||||
[JOBS] = 0;
|
||||
[PROCESSING] = false;
|
||||
[ENDED] = false;
|
||||
|
|
@ -227,11 +229,11 @@ class Pack extends minipass_1.Minipass {
|
|||
if (this[ENDED]) {
|
||||
throw new Error('write after end');
|
||||
}
|
||||
if (path instanceof read_entry_js_1.ReadEntry) {
|
||||
this[ADDTARENTRY](path);
|
||||
if (typeof path === 'string') {
|
||||
this[ADDFSENTRY](path);
|
||||
}
|
||||
else {
|
||||
this[ADDFSENTRY](path);
|
||||
this[ADDTARENTRY](path);
|
||||
}
|
||||
return this.flowing;
|
||||
}
|
||||
|
|
@ -279,14 +281,26 @@ class Pack extends minipass_1.Minipass {
|
|||
}
|
||||
else if (stat.isFile() &&
|
||||
stat.nlink > 1 &&
|
||||
job === this[CURRENT] &&
|
||||
!this.linkCache.get(`${stat.dev}:${stat.ino}`) &&
|
||||
!this.sync) {
|
||||
// if it's not filtered, and it's a new File entry,
|
||||
// jump the queue in case any pending Link entries are about
|
||||
// to try to link to it. This prevents a hardlink from coming ahead
|
||||
// of its target in the archive.
|
||||
this[PROCESSJOB](job);
|
||||
// if it's not filtered, and it's a new File entry, and next anyway
|
||||
// process right away in case any pending Link entries are about
|
||||
// to try to link to it.
|
||||
if (job === this[CURRENT]) {
|
||||
this[PROCESSJOB](job);
|
||||
}
|
||||
else {
|
||||
// if it's NOT the current entry, it needs to be deferred,
|
||||
// so that the link target can be built first.
|
||||
const key = `${stat.dev}:${stat.ino}`;
|
||||
const pending = this[PENDINGLINKS].get(key);
|
||||
if (pending)
|
||||
pending.push(job);
|
||||
else
|
||||
this[PENDINGLINKS].set(key, [job]);
|
||||
job.pendingLink = true;
|
||||
job.pending = true;
|
||||
}
|
||||
}
|
||||
this[PROCESS]();
|
||||
}
|
||||
|
|
@ -334,12 +348,31 @@ class Pack extends minipass_1.Minipass {
|
|||
get [CURRENT]() {
|
||||
return this[QUEUE] && this[QUEUE].head && this[QUEUE].head.value;
|
||||
}
|
||||
[JOBDONE](_job) {
|
||||
[JOBDONE](job) {
|
||||
this[QUEUE].shift();
|
||||
this[JOBS] -= 1;
|
||||
const { stat } = job;
|
||||
if (stat && stat.isFile() && stat.nlink > 1) {
|
||||
// might be a file with pending links
|
||||
const key = `${stat.dev}:${stat.ino}`;
|
||||
const pending = this[PENDINGLINKS].get(key);
|
||||
if (pending) {
|
||||
this[PENDINGLINKS].delete(key);
|
||||
for (const job of pending) {
|
||||
job.pending = false;
|
||||
this[PROCESSJOB](job);
|
||||
}
|
||||
}
|
||||
}
|
||||
this[PROCESS]();
|
||||
}
|
||||
[PROCESSJOB](job) {
|
||||
if (job.pending && job.pendingLink && job === this[CURRENT]) {
|
||||
// At least one of the links to this file are not being included
|
||||
// in the tarball, so we need to just proceed.
|
||||
job.pending = false;
|
||||
job.pendingLink = false;
|
||||
}
|
||||
if (job.pending) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue