Update dist folder

This commit is contained in:
Riccardo Rigutini 2024-05-13 18:02:28 +00:00 committed by GitHub
parent bd235b18b6
commit 81bf468cb6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 127 additions and 109 deletions

234
dist/index.js generated vendored
View File

@ -3125,14 +3125,6 @@ module.exports = require("fs");
/***/ }),
/***/ 3292:
/***/ ((module) => {
"use strict";
module.exports = require("fs/promises");
/***/ }),
/***/ 3685:
/***/ ((module) => {
@ -3157,6 +3149,62 @@ module.exports = require("net");
/***/ }),
/***/ 5673:
/***/ ((module) => {
"use strict";
module.exports = require("node:events");
/***/ }),
/***/ 7561:
/***/ ((module) => {
"use strict";
module.exports = require("node:fs");
/***/ }),
/***/ 3977:
/***/ ((module) => {
"use strict";
module.exports = require("node:fs/promises");
/***/ }),
/***/ 9411:
/***/ ((module) => {
"use strict";
module.exports = require("node:path");
/***/ }),
/***/ 4492:
/***/ ((module) => {
"use strict";
module.exports = require("node:stream");
/***/ }),
/***/ 6915:
/***/ ((module) => {
"use strict";
module.exports = require("node:string_decoder");
/***/ }),
/***/ 1041:
/***/ ((module) => {
"use strict";
module.exports = require("node:url");
/***/ }),
/***/ 2037:
/***/ ((module) => {
@ -3173,22 +3221,6 @@ module.exports = require("path");
/***/ }),
/***/ 2781:
/***/ ((module) => {
"use strict";
module.exports = require("stream");
/***/ }),
/***/ 1576:
/***/ ((module) => {
"use strict";
module.exports = require("string_decoder");
/***/ }),
/***/ 4404:
/***/ ((module) => {
@ -3197,14 +3229,6 @@ module.exports = require("tls");
/***/ }),
/***/ 7310:
/***/ ((module) => {
"use strict";
module.exports = require("url");
/***/ }),
/***/ 3837:
/***/ ((module) => {
@ -3222,7 +3246,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.Glob = void 0;
const minimatch_1 = __nccwpck_require__(266);
const path_scurry_1 = __nccwpck_require__(1081);
const url_1 = __nccwpck_require__(7310);
const node_url_1 = __nccwpck_require__(1041);
const pattern_js_1 = __nccwpck_require__(6866);
const walker_js_1 = __nccwpck_require__(153);
// if no process global, just call it linux.
@ -3296,7 +3320,7 @@ class Glob {
this.cwd = '';
}
else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) {
opts.cwd = (0, url_1.fileURLToPath)(opts.cwd);
opts.cwd = (0, node_url_1.fileURLToPath)(opts.cwd);
}
this.cwd = opts.cwd || '';
this.root = opts.root;
@ -6460,9 +6484,9 @@ const proc = typeof process === 'object' && process
stdout: null,
stderr: null,
};
const events_1 = __nccwpck_require__(2361);
const stream_1 = __importDefault(__nccwpck_require__(2781));
const string_decoder_1 = __nccwpck_require__(1576);
const node_events_1 = __nccwpck_require__(5673);
const node_stream_1 = __importDefault(__nccwpck_require__(4492));
const node_string_decoder_1 = __nccwpck_require__(6915);
/**
* Return true if the argument is a Minipass stream, Node stream, or something
* else that Minipass can interact with.
@ -6470,7 +6494,7 @@ const string_decoder_1 = __nccwpck_require__(1576);
const isStream = (s) => !!s &&
typeof s === 'object' &&
(s instanceof Minipass ||
s instanceof stream_1.default ||
s instanceof node_stream_1.default ||
(0, exports.isReadable)(s) ||
(0, exports.isWritable)(s));
exports.isStream = isStream;
@ -6479,17 +6503,17 @@ exports.isStream = isStream;
*/
const isReadable = (s) => !!s &&
typeof s === 'object' &&
s instanceof events_1.EventEmitter &&
s instanceof node_events_1.EventEmitter &&
typeof s.pipe === 'function' &&
// node core Writable streams have a pipe() method, but it throws
s.pipe !== stream_1.default.Writable.prototype.pipe;
s.pipe !== node_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 events_1.EventEmitter &&
s instanceof node_events_1.EventEmitter &&
typeof s.write === 'function' &&
typeof s.end === 'function';
exports.isWritable = isWritable;
@ -6596,7 +6620,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 events_1.EventEmitter {
class Minipass extends node_events_1.EventEmitter {
[FLOWING] = false;
[PAUSED] = false;
[PIPES] = [];
@ -6651,7 +6675,7 @@ class Minipass extends events_1.EventEmitter {
}
this[ASYNC] = !!options.async;
this[DECODER] = this[ENCODING]
? new string_decoder_1.StringDecoder(this[ENCODING])
? new node_string_decoder_1.StringDecoder(this[ENCODING])
: null;
//@ts-ignore - private option for debugging and testing
if (options && options.debugExposeBuffer === true) {
@ -7510,14 +7534,14 @@ 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__(6091);
const path_1 = __nccwpck_require__(1017);
const url_1 = __nccwpck_require__(7310);
const actualFS = __importStar(__nccwpck_require__(7147));
const node_path_1 = __nccwpck_require__(9411);
const node_url_1 = __nccwpck_require__(1041);
const fs_1 = __nccwpck_require__(7147);
const actualFS = __importStar(__nccwpck_require__(7561));
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 promises_1 = __nccwpck_require__(3977);
const minipass_1 = __nccwpck_require__(4968);
const defaultFS = {
lstatSync: fs_1.lstatSync,
@ -7533,8 +7557,8 @@ const defaultFS = {
},
};
// if they just gave us require('fs') then use our default
const fsFromOption = (fsOption) => !fsOption || fsOption === defaultFS || fsOption === actualFS
? defaultFS
const fsFromOption = (fsOption) => !fsOption || fsOption === defaultFS || fsOption === actualFS ?
defaultFS
: {
...defaultFS,
...fsOption,
@ -7575,20 +7599,13 @@ const ENOREADLINK = 0b0001_0000_0000;
const ENOREALPATH = 0b0010_0000_0000;
const ENOCHILD = ENOTDIR | ENOENT | ENOREALPATH;
const TYPEMASK = 0b0011_1111_1111;
const entToType = (s) => s.isFile()
? IFREG
: s.isDirectory()
? IFDIR
: s.isSymbolicLink()
? IFLNK
: s.isCharacterDevice()
? IFCHR
: s.isBlockDevice()
? IFBLK
: s.isSocket()
? IFSOCK
: s.isFIFO()
? IFIFO
const entToType = (s) => s.isFile() ? IFREG
: s.isDirectory() ? IFDIR
: s.isSymbolicLink() ? IFLNK
: s.isCharacterDevice() ? IFCHR
: s.isBlockDevice() ? IFBLK
: s.isSocket() ? IFSOCK
: s.isFIFO() ? IFIFO
: UNKNOWN;
// normalize unicode path names
const normalizeCache = new Map();
@ -7692,6 +7709,11 @@ class PathBase {
* @internal
*/
nocase;
/**
* boolean indicating that this path is the current working directory
* of the PathScurry collection that contains it.
*/
isCWD = false;
// potential default fs override
#fs;
// Stats fields
@ -7779,13 +7801,19 @@ class PathBase {
#realpath;
/**
* This property is for compatibility with the Dirent class as of
* Node v20, where Dirent['path'] refers to the path of the directory
* that was passed to readdir. So, somewhat counterintuitively, this
* property refers to the *parent* path, not the path object itself.
* For root entries, it's the path to the entry itself.
* Node v20, where Dirent['parentPath'] refers to the path of the
* directory that was passed to readdir. For root entries, it's the path
* to the entry itself.
*/
get parentPath() {
return (this.parent || this).fullpath();
}
/**
* Deprecated alias for Dirent['parentPath'] Somewhat counterintuitively,
* this property refers to the *parent* path, not the path object itself.
*/
get path() {
return (this.parent || this).fullpath();
return this.parentPath;
}
/**
* Do not create new Path objects directly. They should always be accessed
@ -7840,8 +7868,8 @@ class PathBase {
const rootPath = this.getRootString(path);
const dir = path.substring(rootPath.length);
const dirParts = dir.split(this.splitSep);
const result = rootPath
? this.getRoot(rootPath).#resolveParts(dirParts)
const result = rootPath ?
this.getRoot(rootPath).#resolveParts(dirParts)
: this.#resolveParts(dirParts);
return result;
}
@ -7892,9 +7920,7 @@ class PathBase {
}
// find the child
const children = this.children();
const name = this.nocase
? normalizeNocase(pathPart)
: normalize(pathPart);
const name = this.nocase ? normalizeNocase(pathPart) : normalize(pathPart);
for (const p of children) {
if (p.#matchName === name) {
return p;
@ -7904,9 +7930,7 @@ class PathBase {
// actually exist. If we know the parent isn't a dir, then
// in fact it CAN'T exist.
const s = this.parent ? this.sep : '';
const fullpath = this.#fullpath
? this.#fullpath + s + pathPart
: undefined;
const fullpath = this.#fullpath ? this.#fullpath + s + pathPart : undefined;
const pchild = this.newChild(pathPart, UNKNOWN, {
...opts,
parent: this,
@ -7925,6 +7949,8 @@ class PathBase {
* the cwd, then this ends up being equivalent to the fullpath()
*/
relative() {
if (this.isCWD)
return '';
if (this.#relative !== undefined) {
return this.#relative;
}
@ -7945,6 +7971,8 @@ class PathBase {
relativePosix() {
if (this.sep === '/')
return this.relative();
if (this.isCWD)
return '';
if (this.#relativePosix !== undefined)
return this.#relativePosix;
const name = this.name;
@ -8010,23 +8038,15 @@ class PathBase {
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';
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 */
}
/**
@ -8160,8 +8180,8 @@ class PathBase {
* directly.
*/
isNamed(n) {
return !this.nocase
? this.#matchName === normalize(n)
return !this.nocase ?
this.#matchName === normalize(n)
: this.#matchName === normalizeNocase(n);
}
/**
@ -8217,7 +8237,7 @@ class PathBase {
/* c8 ignore stop */
try {
const read = this.#fs.readlinkSync(this.fullpath());
const linkTarget = (this.parent.realpathSync())?.resolve(read);
const linkTarget = this.parent.realpathSync()?.resolve(read);
if (linkTarget) {
return (this.#linkTarget = linkTarget);
}
@ -8338,9 +8358,7 @@ class PathBase {
#readdirMaybePromoteChild(e, c) {
for (let p = c.provisional; p < c.length; p++) {
const pchild = c[p];
const name = this.nocase
? normalizeNocase(e.name)
: normalize(e.name);
const name = this.nocase ? normalizeNocase(e.name) : normalize(e.name);
if (name !== pchild.#matchName) {
continue;
}
@ -8639,6 +8657,8 @@ class PathBase {
[setAsCwd](oldCwd) {
if (oldCwd === this)
return;
oldCwd.isCWD = false;
this.isCWD = true;
const changed = new Set([]);
let rp = [];
let p = this;
@ -8693,7 +8713,7 @@ class PathWin32 extends PathBase {
* @internal
*/
getRootString(path) {
return path_1.win32.parse(path).root;
return node_path_1.win32.parse(path).root;
}
/**
* @internal
@ -8815,7 +8835,7 @@ class PathScurryBase {
constructor(cwd = process.cwd(), pathImpl, sep, { nocase, childrenCacheSize = 16 * 1024, fs = defaultFS, } = {}) {
this.#fs = fsFromOption(fs);
if (cwd instanceof URL || cwd.startsWith('file://')) {
cwd = (0, url_1.fileURLToPath)(cwd);
cwd = (0, node_url_1.fileURLToPath)(cwd);
}
// resolve and split root, and then add to the store.
// this is the only time we call path.resolve()
@ -9404,7 +9424,7 @@ class PathScurryWin32 extends PathScurryBase {
sep = '\\';
constructor(cwd = process.cwd(), opts = {}) {
const { nocase = true } = opts;
super(cwd, path_1.win32, '\\', { ...opts, nocase });
super(cwd, node_path_1.win32, '\\', { ...opts, nocase });
this.nocase = nocase;
for (let p = this.cwd; p; p = p.parent) {
p.nocase = this.nocase;
@ -9417,7 +9437,7 @@ class PathScurryWin32 extends PathScurryBase {
// if the path starts with a single separator, it's not a UNC, and we'll
// just get separator as the root, and driveFromUNC will return \
// In that case, mount \ on the root from the cwd.
return path_1.win32.parse(dir).root.toUpperCase();
return node_path_1.win32.parse(dir).root.toUpperCase();
}
/**
* @internal
@ -9447,7 +9467,7 @@ class PathScurryPosix extends PathScurryBase {
sep = '/';
constructor(cwd = process.cwd(), opts = {}) {
const { nocase = false } = opts;
super(cwd, path_1.posix, '/', { ...opts, nocase });
super(cwd, node_path_1.posix, '/', { ...opts, nocase });
this.nocase = nocase;
}
/**
@ -9497,10 +9517,8 @@ exports.Path = process.platform === 'win32' ? PathWin32 : PathPosix;
* {@link PathScurryWin32} on Windows systems, {@link PathScurryDarwin} on
* Darwin (macOS) systems, {@link PathScurryPosix} on all others.
*/
exports.PathScurry = process.platform === 'win32'
? PathScurryWin32
: process.platform === 'darwin'
? PathScurryDarwin
exports.PathScurry = process.platform === 'win32' ? PathScurryWin32
: process.platform === 'darwin' ? PathScurryDarwin
: PathScurryPosix;
//# sourceMappingURL=index.js.map

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long