Update dist folder

This commit is contained in:
Riccardo Rigutini 2024-04-01 12:03:44 +00:00 committed by GitHub
parent 3599dacedd
commit 9868d32787
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 137 additions and 66 deletions

201
dist/index.js generated vendored
View File

@ -3248,30 +3248,6 @@ module.exports = require("net");
/***/ }),
/***/ 5673:
/***/ ((module) => {
"use strict";
module.exports = require("node:events");
/***/ }),
/***/ 4492:
/***/ ((module) => {
"use strict";
module.exports = require("node:stream");
/***/ }),
/***/ 6915:
/***/ ((module) => {
"use strict";
module.exports = require("node:string_decoder");
/***/ }),
/***/ 2037:
/***/ ((module) => {
@ -3288,6 +3264,22 @@ module.exports = require("path");
/***/ }),
/***/ 2781:
/***/ ((module) => {
"use strict";
module.exports = require("stream");
/***/ }),
/***/ 1576:
/***/ ((module) => {
"use strict";
module.exports = require("string_decoder");
/***/ }),
/***/ 4404:
/***/ ((module) => {
@ -3320,7 +3312,7 @@ module.exports = require("util");
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.Glob = void 0;
const minimatch_1 = __nccwpck_require__(266);
const path_scurry_1 = __nccwpck_require__(9569);
const path_scurry_1 = __nccwpck_require__(1081);
const url_1 = __nccwpck_require__(7310);
const pattern_js_1 = __nccwpck_require__(6866);
const walker_js_1 = __nccwpck_require__(153);
@ -3659,6 +3651,12 @@ class Ignore {
if (!parsed || !globParts) {
throw new Error('invalid pattern object');
}
// strip off leading ./ portions
// https://github.com/isaacs/node-glob/issues/570
while (parsed[0] === '.' && globParts[0] === '.') {
parsed.shift();
globParts.shift();
}
/* c8 ignore stop */
const p = new pattern_js_1.Pattern(parsed, globParts, 0, platform);
const m = new minimatch_1.Minimatch(p.globString(), mmopts);
@ -4334,7 +4332,7 @@ exports.GlobStream = exports.GlobWalker = exports.GlobUtil = void 0;
*
* @module
*/
const minipass_1 = __nccwpck_require__(8865);
const minipass_1 = __nccwpck_require__(4968);
const ignore_js_1 = __nccwpck_require__(9703);
const processor_js_1 = __nccwpck_require__(4628);
const makeIgnore = (ignore, opts) => typeof ignore === 'string'
@ -4423,13 +4421,26 @@ class GlobUtil {
e = rpc;
}
const needStat = e.isUnknown() || this.opts.stat;
return this.matchCheckTest(needStat ? await e.lstat() : e, ifDir);
const s = needStat ? await e.lstat() : e;
if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {
const target = await s.realpath();
/* c8 ignore start */
if (target && (target.isUnknown() || this.opts.stat)) {
await target.lstat();
}
/* c8 ignore stop */
}
return this.matchCheckTest(s, ifDir);
}
matchCheckTest(e, ifDir) {
return e &&
(this.maxDepth === Infinity || e.depth() <= this.maxDepth) &&
(!ifDir || e.canReaddir()) &&
(!this.opts.nodir || !e.isDirectory()) &&
(!this.opts.nodir ||
!this.opts.follow ||
!e.isSymbolicLink() ||
!e.realpathCached()?.isDirectory()) &&
!this.#ignored(e)
? e
: undefined;
@ -4445,7 +4456,14 @@ class GlobUtil {
e = rpc;
}
const needStat = e.isUnknown() || this.opts.stat;
return this.matchCheckTest(needStat ? e.lstatSync() : e, ifDir);
const s = needStat ? e.lstatSync() : e;
if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {
const target = s.realpathSync();
if (target && (target?.isUnknown() || this.opts.stat)) {
target.lstatSync();
}
}
return this.matchCheckTest(s, ifDir);
}
matchFinish(e, absolute) {
if (this.#ignored(e))
@ -6517,7 +6535,7 @@ exports.unescape = unescape;
/***/ }),
/***/ 8865:
/***/ 4968:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@ -6533,9 +6551,9 @@ const proc = typeof process === 'object' && process
stdout: null,
stderr: null,
};
const node_events_1 = __nccwpck_require__(5673);
const node_stream_1 = __importDefault(__nccwpck_require__(4492));
const node_string_decoder_1 = __nccwpck_require__(6915);
const events_1 = __nccwpck_require__(2361);
const stream_1 = __importDefault(__nccwpck_require__(2781));
const string_decoder_1 = __nccwpck_require__(1576);
/**
* Return true if the argument is a Minipass stream, Node stream, or something
* else that Minipass can interact with.
@ -6543,7 +6561,7 @@ const node_string_decoder_1 = __nccwpck_require__(6915);
const isStream = (s) => !!s &&
typeof s === 'object' &&
(s instanceof Minipass ||
s instanceof node_stream_1.default ||
s instanceof stream_1.default ||
(0, exports.isReadable)(s) ||
(0, exports.isWritable)(s));
exports.isStream = isStream;
@ -6552,17 +6570,17 @@ exports.isStream = isStream;
*/
const isReadable = (s) => !!s &&
typeof s === 'object' &&
s instanceof node_events_1.EventEmitter &&
s instanceof events_1.EventEmitter &&
typeof s.pipe === 'function' &&
// node core Writable streams have a pipe() method, but it throws
s.pipe !== node_stream_1.default.Writable.prototype.pipe;
s.pipe !== stream_1.default.Writable.prototype.pipe;
exports.isReadable = isReadable;
/**
* Return true if the argument is a valid {@link Minipass.Writable}
*/
const isWritable = (s) => !!s &&
typeof s === 'object' &&
s instanceof node_events_1.EventEmitter &&
s instanceof events_1.EventEmitter &&
typeof s.write === 'function' &&
typeof s.end === 'function';
exports.isWritable = isWritable;
@ -6669,7 +6687,7 @@ const isEncodingOptions = (o) => !o.objectMode && !!o.encoding && o.encoding !==
* `Events` is the set of event handler signatures that this object
* will emit, see {@link Minipass.Events}
*/
class Minipass extends node_events_1.EventEmitter {
class Minipass extends events_1.EventEmitter {
[FLOWING] = false;
[PAUSED] = false;
[PIPES] = [];
@ -6724,7 +6742,7 @@ class Minipass extends node_events_1.EventEmitter {
}
this[ASYNC] = !!options.async;
this[DECODER] = this[ENCODING]
? new node_string_decoder_1.StringDecoder(this[ENCODING])
? new string_decoder_1.StringDecoder(this[ENCODING])
: null;
//@ts-ignore - private option for debugging and testing
if (options && options.debugExposeBuffer === true) {
@ -7385,9 +7403,9 @@ class Minipass extends node_events_1.EventEmitter {
throw new Error('cannot concat in objectMode');
}
const buf = await this.collect();
return this[ENCODING]
return (this[ENCODING]
? buf.join('')
: Buffer.concat(buf, buf.dataLength);
: Buffer.concat(buf, buf.dataLength));
}
/**
* Return a void Promise that resolves once the stream ends.
@ -7552,7 +7570,7 @@ exports.Minipass = Minipass;
/***/ }),
/***/ 9569:
/***/ 1081:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@ -7582,7 +7600,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.PathScurry = exports.Path = exports.PathScurryDarwin = exports.PathScurryPosix = exports.PathScurryWin32 = exports.PathScurryBase = exports.PathPosix = exports.PathWin32 = exports.PathBase = exports.ChildrenCache = exports.ResolveCache = void 0;
const lru_cache_1 = __nccwpck_require__(7433);
const lru_cache_1 = __nccwpck_require__(6091);
const path_1 = __nccwpck_require__(1017);
const url_1 = __nccwpck_require__(7310);
const actualFS = __importStar(__nccwpck_require__(7147));
@ -7591,7 +7609,7 @@ const realpathSync = fs_1.realpathSync.native;
// TODO: test perf of fs/promises realpath vs realpathCB,
// since the promises one uses realpath.native
const promises_1 = __nccwpck_require__(3292);
const minipass_1 = __nccwpck_require__(8865);
const minipass_1 = __nccwpck_require__(4968);
const defaultFS = {
lstatSync: fs_1.lstatSync,
readdir: fs_1.readdir,
@ -7633,21 +7651,21 @@ const IFMT = 0b1111;
// mask to unset low 4 bits
const IFMT_UNKNOWN = ~IFMT;
// set after successfully calling readdir() and getting entries.
const READDIR_CALLED = 16;
const READDIR_CALLED = 0b0000_0001_0000;
// set after a successful lstat()
const LSTAT_CALLED = 32;
const LSTAT_CALLED = 0b0000_0010_0000;
// set if an entry (or one of its parents) is definitely not a dir
const ENOTDIR = 64;
const ENOTDIR = 0b0000_0100_0000;
// set if an entry (or one of its parents) does not exist
// (can also be set on lstat errors like EACCES or ENAMETOOLONG)
const ENOENT = 128;
const ENOENT = 0b0000_1000_0000;
// cannot have child entries -- also verify &IFMT is either IFDIR or IFLNK
// set if we fail to readlink
const ENOREADLINK = 256;
const ENOREADLINK = 0b0001_0000_0000;
// set if we know realpath() will fail
const ENOREALPATH = 512;
const ENOREALPATH = 0b0010_0000_0000;
const ENOCHILD = ENOTDIR | ENOENT | ENOREALPATH;
const TYPEMASK = 1023;
const TYPEMASK = 0b0011_1111_1111;
const entToType = (s) => s.isFile()
? IFREG
: s.isDirectory()
@ -8261,7 +8279,7 @@ class PathBase {
/* c8 ignore stop */
try {
const read = await this.#fs.promises.readlink(this.fullpath());
const linkTarget = this.parent.resolve(read);
const linkTarget = (await this.parent.realpath())?.resolve(read);
if (linkTarget) {
return (this.#linkTarget = linkTarget);
}
@ -8290,7 +8308,7 @@ class PathBase {
/* c8 ignore stop */
try {
const read = this.#fs.readlinkSync(this.fullpath());
const linkTarget = this.parent.resolve(read);
const linkTarget = (this.parent.realpathSync())?.resolve(read);
if (linkTarget) {
return (this.#linkTarget = linkTarget);
}
@ -8305,7 +8323,9 @@ class PathBase {
this.#type |= READDIR_CALLED;
// mark all remaining provisional children as ENOENT
for (let p = children.provisional; p < children.length; p++) {
children[p].#markENOENT();
const c = children[p];
if (c)
c.#markENOENT();
}
}
#markENOENT() {
@ -9577,7 +9597,7 @@ exports.PathScurry = process.platform === 'win32'
/***/ }),
/***/ 7433:
/***/ 6091:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
@ -10018,6 +10038,9 @@ class LRUCache {
if (ttls[index]) {
const ttl = ttls[index];
const start = starts[index];
/* c8 ignore next */
if (!ttl || !start)
return;
status.ttl = ttl;
status.start = start;
status.now = cachedNow || getNow();
@ -10049,16 +10072,16 @@ class LRUCache {
}
const ttl = ttls[index];
const start = starts[index];
if (ttl === 0 || start === 0) {
if (!ttl || !start) {
return Infinity;
}
const age = (cachedNow || getNow()) - start;
return ttl - age;
};
this.#isStale = index => {
return (ttls[index] !== 0 &&
starts[index] !== 0 &&
(cachedNow || getNow()) - starts[index] > ttls[index]);
const s = starts[index];
const t = ttls[index];
return !!t && !!s && (cachedNow || getNow()) - s > t;
};
}
// conditionally set private methods related to TTL
@ -10253,6 +10276,11 @@ class LRUCache {
[Symbol.iterator]() {
return this.entries();
}
/**
* A String value that is used in the creation of the default string description of an object.
* Called by the built-in method Object.prototype.toString.
*/
[Symbol.toStringTag] = 'LRUCache';
/**
* Find a value for which the supplied fn method returns a truthy value,
* similar to Array.find(). fn is called as fn(value, key, cache).
@ -10316,6 +10344,37 @@ class LRUCache {
}
return deleted;
}
/**
* Get the extended info about a given entry, to get its value, size, and
* TTL info simultaneously. Like {@link LRUCache#dump}, but just for a
* single key. Always returns stale values, if their info is found in the
* cache, so be sure to check for expired TTLs if relevant.
*/
info(key) {
const i = this.#keyMap.get(key);
if (i === undefined)
return undefined;
const v = this.#valList[i];
const value = this.#isBackgroundFetch(v)
? v.__staleWhileFetching
: v;
if (value === undefined)
return undefined;
const entry = { value };
if (this.#ttls && this.#starts) {
const ttl = this.#ttls[i];
const start = this.#starts[i];
if (ttl && start) {
const remain = ttl - (perf.now() - start);
entry.ttl = remain;
entry.start = Date.now();
}
}
if (this.#sizes) {
entry.size = this.#sizes[i];
}
return entry;
}
/**
* Return an array of [key, {@link LRUCache.Entry}] tuples which can be
* passed to cache.load()
@ -10420,6 +10479,15 @@ class LRUCache {
if (v !== oldVal) {
if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {
oldVal.__abortController.abort(new Error('replaced'));
const { __staleWhileFetching: s } = oldVal;
if (s !== undefined && !noDisposeOnSet) {
if (this.#hasDispose) {
this.#dispose?.(s, k, 'set');
}
if (this.#hasDisposeAfter) {
this.#disposed?.push([s, k, 'set']);
}
}
}
else if (!noDisposeOnSet) {
if (this.#hasDispose) {
@ -10573,12 +10641,13 @@ class LRUCache {
peek(k, peekOptions = {}) {
const { allowStale = this.allowStale } = peekOptions;
const index = this.#keyMap.get(k);
if (index !== undefined &&
(allowStale || !this.#isStale(index))) {
const v = this.#valList[index];
// either stale and allowed, or forcing a refresh of non-stale value
return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
if (index === undefined ||
(!allowStale && this.#isStale(index))) {
return;
}
const v = this.#valList[index];
// either stale and allowed, or forcing a refresh of non-stale value
return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
}
#backgroundFetch(k, index, options, context) {
const v = index === undefined ? undefined : this.#valList[index];
@ -10914,8 +10983,10 @@ class LRUCache {
this.#head = this.#next[index];
}
else {
this.#next[this.#prev[index]] = this.#next[index];
this.#prev[this.#next[index]] = this.#prev[index];
const pi = this.#prev[index];
this.#next[pi] = this.#next[index];
const ni = this.#next[index];
this.#prev[ni] = this.#prev[index];
}
this.#size--;
this.#free.push(index);

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long