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/esm/pack.js
generated
vendored
55
electron/node_modules/tar/dist/esm/pack.js
generated
vendored
|
|
@ -15,6 +15,7 @@ export class PackJob {
|
|||
stat;
|
||||
readdir;
|
||||
pending = false;
|
||||
pendingLink = false;
|
||||
ignore = false;
|
||||
piped = false;
|
||||
constructor(path, absolute) {
|
||||
|
|
@ -25,12 +26,12 @@ export class PackJob {
|
|||
import { Minipass } from 'minipass';
|
||||
import * as zlib from 'minizlib';
|
||||
import { Yallist } from 'yallist';
|
||||
import { ReadEntry } from './read-entry.js';
|
||||
import { warnMethod } from './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');
|
||||
|
|
@ -82,6 +83,7 @@ export class Pack extends 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;
|
||||
|
|
@ -187,11 +189,11 @@ export class Pack extends Minipass {
|
|||
if (this[ENDED]) {
|
||||
throw new Error('write after end');
|
||||
}
|
||||
if (path instanceof ReadEntry) {
|
||||
this[ADDTARENTRY](path);
|
||||
if (typeof path === 'string') {
|
||||
this[ADDFSENTRY](path);
|
||||
}
|
||||
else {
|
||||
this[ADDFSENTRY](path);
|
||||
this[ADDTARENTRY](path);
|
||||
}
|
||||
return this.flowing;
|
||||
}
|
||||
|
|
@ -239,14 +241,26 @@ export class Pack extends 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]();
|
||||
}
|
||||
|
|
@ -294,12 +308,31 @@ export class Pack extends 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