Rebuild the dist/ directory
This commit is contained in:
parent
9bff44db71
commit
35114e3696
|
|
@ -7696,6 +7696,29 @@ class PathBase {
|
||||||
isUnknown() {
|
isUnknown() {
|
||||||
return (this.#type & IFMT) === UNKNOWN;
|
return (this.#type & IFMT) === UNKNOWN;
|
||||||
}
|
}
|
||||||
|
isType(type) {
|
||||||
|
return this[`is${type}`]();
|
||||||
|
}
|
||||||
|
getType() {
|
||||||
|
return this.isUnknown()
|
||||||
|
? 'Unknown'
|
||||||
|
: this.isDirectory()
|
||||||
|
? 'Directory'
|
||||||
|
: this.isFile()
|
||||||
|
? 'File'
|
||||||
|
: this.isSymbolicLink()
|
||||||
|
? 'SymbolicLink'
|
||||||
|
: this.isFIFO()
|
||||||
|
? 'FIFO'
|
||||||
|
: this.isCharacterDevice()
|
||||||
|
? 'CharacterDevice'
|
||||||
|
: this.isBlockDevice()
|
||||||
|
? 'BlockDevice'
|
||||||
|
: /* c8 ignore start */ this.isSocket()
|
||||||
|
? 'Socket'
|
||||||
|
: 'Unknown';
|
||||||
|
/* c8 ignore stop */
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Is the Path a regular file?
|
* Is the Path a regular file?
|
||||||
*/
|
*/
|
||||||
|
|
@ -10267,7 +10290,7 @@ class LRUCache {
|
||||||
const pcall = (res, rej) => {
|
const pcall = (res, rej) => {
|
||||||
const fmp = this.#fetchMethod?.(k, v, fetchOpts);
|
const fmp = this.#fetchMethod?.(k, v, fetchOpts);
|
||||||
if (fmp && fmp instanceof Promise) {
|
if (fmp && fmp instanceof Promise) {
|
||||||
fmp.then(v => res(v), rej);
|
fmp.then(v => res(v === undefined ? undefined : v), rej);
|
||||||
}
|
}
|
||||||
// ignored, we go until we finish, regardless.
|
// ignored, we go until we finish, regardless.
|
||||||
// defer check until we are actually aborting,
|
// defer check until we are actually aborting,
|
||||||
|
|
@ -10275,7 +10298,7 @@ class LRUCache {
|
||||||
ac.signal.addEventListener('abort', () => {
|
ac.signal.addEventListener('abort', () => {
|
||||||
if (!options.ignoreFetchAbort ||
|
if (!options.ignoreFetchAbort ||
|
||||||
options.allowStaleOnFetchAbort) {
|
options.allowStaleOnFetchAbort) {
|
||||||
res();
|
res(undefined);
|
||||||
// when it eventually resolves, update the cache.
|
// when it eventually resolves, update the cache.
|
||||||
if (options.allowStaleOnFetchAbort) {
|
if (options.allowStaleOnFetchAbort) {
|
||||||
res = v => cb(v, true);
|
res = v => cb(v, true);
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue