@jsonjoy.com/fs-node-utils
Advanced tools
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,GAAG,GAAG,GAAG,CAAC;AAMV,QAAA,SAAS,GAAG;IACvB,QAAQ,EAAE,CAAC;IACX,QAAQ,EAAE,CAAC;IACX,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,KAAK;IACd,OAAO,EAAE,KAAK;IACd,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,KAAK;IACd,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,EAAE;IACX,MAAM,EAAE,GAAG;IACX,QAAQ,EAAE,GAAG;IACb,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,KAAK;IAClB,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE,MAAM;IAClB,MAAM,EAAE,OAAO;IACf,SAAS,EAAE,OAAO;IAClB,QAAQ,EAAE,KAAK;IACf,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,GAAG;IACZ,OAAO,EAAE,GAAG;IACZ,OAAO,EAAE,GAAG;IACZ,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IAEV,IAAI,EAAE,CAAC;IACP,IAAI,EAAE,CAAC;IACP,IAAI,EAAE,CAAC;IACP,IAAI,EAAE,CAAC;IAEP,iBAAiB,EAAE,CAAC;IACpB,sBAAsB,EAAE,CAAC;IAEzB,mBAAmB,EAAE,CAAC;IACtB,sBAAsB,EAAE,CAAC;IACzB,4BAA4B,EAAE,CAAC;IAC/B,aA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n\nexport const enum PATH {\n SEP = '/',\n}\n\nexport const constants = {\n O_RDONLY: 0,\n O_WRONLY: 1,\n O_RDWR: 2,\n S_IFMT: 61440,\n S_IFREG: 32768,\n S_IFDIR: 16384,\n S_IFCHR: 8192,\n S_IFBLK: 24576,\n S_IFIFO: 4096,\n S_IFLNK: 40960,\n S_IFSOCK: 49152,\n O_CREAT: 64,\n O_EXCL: 128,\n O_NOCTTY: 256,\n O_TRUNC: 512,\n O_APPEND: 1024,\n O_DIRECTORY: 65536,\n O_NOATIME: 262144,\n O_NOFOLLOW: 131072,\n O_SYNC: 1052672,\n O_SYMLINK: 2097152,\n O_DIRECT: 16384,\n O_NONBLOCK: 2048,\n S_IRWXU: 448,\n S_IRUSR: 256,\n S_IWUSR: 128,\n S_IXUSR: 64,\n S_IRWXG: 56,\n S_IRGRP: 32,\n S_IWGRP: 16,\n S_IXGRP: 8,\n S_IRWXO: 7,\n S_IROTH: 4,\n S_IWOTH: 2,\n S_IXOTH: 1,\n\n F_OK: 0,\n R_OK: 4,\n W_OK: 2,\n X_OK: 1,\n\n UV_FS_SYMLINK_DIR: 1,\n UV_FS_SYMLINK_JUNCTION: 2,\n\n UV_FS_COPYFILE_EXCL: 1,\n UV_FS_COPYFILE_FICLONE: 2,\n UV_FS_COPYFILE_FICLONE_FORCE: 4,\n COPYFILE_EXCL: 1,\n COPYFILE_FICLONE: 2,\n COPYFILE_FICLONE_FORCE: 4,\n};\n\nexport const enum S {\n ISUID = 0b100000000000, // (04000) set-user-ID (set process effective user ID on execve(2))\n ISGID = 0b10000000000, // (02000) set-group-ID (set process effective group ID on execve(2); mandatory locking, as described in fcntl(2); take a new file's group from parent directory, as described in chown(2) and mkdir(2))\n ISVTX = 0b1000000000, // (01000) sticky bit (restricted deletion flag, as described in unlink(2))\n IRUSR = 0b100000000, // (00400) read by owner\n IWUSR = 0b10000000, // (00200) write by owner\n IXUSR = 0b1000000, // (00100) execute/search by owner\n IRGRP = 0b100000, // (00040) read by group\n IWGRP = 0b10000, // (00020) write by group\n IXGRP = 0b1000, // (00010) execute/search by group\n IROTH = 0b100, // (00004) read by others\n IWOTH = 0b10, // (00002) write by others\n IXOTH = 0b1, // (00001) execute/search by others\n}\n\n// Default modes for opening files.\nexport const enum MODE {\n FILE = 0o666,\n DIR = 0o777,\n DEFAULT = MODE.FILE,\n}\n\nexport const ERRSTR = {\n PATH_STR: 'path must be a string, Buffer, or Uint8Array',\n // FD: 'file descriptor must be a unsigned 32-bit integer',\n FD: 'fd must be a file descriptor',\n MODE_INT: 'mode must be an int',\n CB: 'callback must be a function',\n UID: 'uid must be an unsigned int',\n GID: 'gid must be an unsigned int',\n LEN: 'len must be an integer',\n ATIME: 'atime must be an integer',\n MTIME: 'mtime must be an integer',\n PREFIX: 'filename prefix is required',\n BUFFER: 'buffer must be an instance of Buffer or StaticBuffer',\n OFFSET: 'offset must be an integer',\n LENGTH: 'length must be an integer',\n POSITION: 'position must be an integer',\n};\n\nconst { O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL, O_TRUNC, O_APPEND, O_SYNC } = constants;\n\n// List of file `flags` as defined by Node.\nexport enum FLAGS {\n // Open file for reading. An exception occurs if the file does not exist.\n r = O_RDONLY,\n // Open file for reading and writing. An exception occurs if the file does not exist.\n 'r+' = O_RDWR,\n // Open file for reading in synchronous mode. Instructs the operating system to bypass the local file system cache.\n rs = O_RDONLY | O_SYNC,\n sr = FLAGS.rs,\n // Open file for reading and writing, telling the OS to open it synchronously. See notes for 'rs' about using this with caution.\n 'rs+' = O_RDWR | O_SYNC,\n 'sr+' = FLAGS['rs+'],\n // Open file for writing. The file is created (if it does not exist) or truncated (if it exists).\n w = O_WRONLY | O_CREAT | O_TRUNC,\n // Like 'w' but fails if path exists.\n wx = O_WRONLY | O_CREAT | O_TRUNC | O_EXCL,\n xw = FLAGS.wx,\n // Open file for reading and writing. The file is created (if it does not exist) or truncated (if it exists).\n 'w+' = O_RDWR | O_CREAT | O_TRUNC,\n // Like 'w+' but fails if path exists.\n 'wx+' = O_RDWR | O_CREAT | O_TRUNC | O_EXCL,\n 'xw+' = FLAGS['wx+'],\n // Open file for appending. The file is created if it does not exist.\n a = O_WRONLY | O_APPEND | O_CREAT,\n // Like 'a' but fails if path exists.\n ax = O_WRONLY | O_APPEND | O_CREAT | O_EXCL,\n xa = FLAGS.ax,\n // Open file for reading and appending. The file is created if it does not exist.\n 'a+' = O_RDWR | O_APPEND | O_CREAT,\n // Like 'a+' but fails if path exists.\n 'ax+' = O_RDWR | O_APPEND | O_CREAT | O_EXCL,\n 'xa+' = FLAGS['ax+'],\n}\n"]} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"AMODE.js","sourceRoot":"","sources":["../../src/consts/AMODE.ts"],"names":[],"mappings":""} | ||
| {"version":3,"file":"AMODE.js","sourceRoot":"","sources":["../../src/consts/AMODE.ts"],"names":[],"mappings":"","sourcesContent":["// Constants used in `access` system call, see [access(2)](http://man7.org/linux/man-pages/man2/faccessat.2.html).\nexport const enum AMODE {\n /* Tests for the existence of the file. */\n F_OK = 0,\n /** Tests for Execute or Search permissions. */\n X_OK = 1,\n /** Tests for Write permission. */\n W_OK = 2,\n /** Tests for Read permission. */\n R_OK = 4,\n}\n"]} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"FLAG.js","sourceRoot":"","sources":["../../src/consts/FLAG.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;GAQG;AACH,IAAY,IAqBX;AArBD,WAAY,IAAI;IACd,uCAAY,CAAA;IACZ,uCAAY,CAAA;IACZ,mCAAU,CAAA;IACV,yCAAa,CAAA;IACb,sCAAY,CAAA;IACZ,qCAAY,CAAA;IACZ,yCAAc,CAAA;IACd,uCAAa,CAAA;IACb,0CAAe,CAAA;IACf,8CAAiB,CAAA;IACjB,wCAAc,CAAA;IACd,sCAAa,CAAA;IACb,2CAAgB,CAAA;IAChB,6CAAe,CAAA;IACf,iDAAmB,CAAA;IACnB,gDAAmB,CAAA;IACnB,8CAAkB,CAAA;IAClB,8CAAkB,CAAA;IAClB,yCAAgB,CAAA;IAChB,0CAAe,CAAA;AACjB,CAAC,EArBW,IAAI,oBAAJ,IAAI,QAqBf"} | ||
| {"version":3,"file":"FLAG.js","sourceRoot":"","sources":["../../src/consts/FLAG.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;GAQG;AACH,IAAY,IAqBX;AArBD,WAAY,IAAI;IACd,uCAAY,CAAA;IACZ,uCAAY,CAAA;IACZ,mCAAU,CAAA;IACV,yCAAa,CAAA;IACb,sCAAY,CAAA;IACZ,qCAAY,CAAA;IACZ,yCAAc,CAAA;IACd,uCAAa,CAAA;IACb,0CAAe,CAAA;IACf,8CAAiB,CAAA;IACjB,wCAAc,CAAA;IACd,sCAAa,CAAA;IACb,2CAAgB,CAAA;IAChB,6CAAe,CAAA;IACf,iDAAmB,CAAA;IACnB,gDAAmB,CAAA;IACnB,8CAAkB,CAAA;IAClB,8CAAkB,CAAA;IAClB,yCAAgB,CAAA;IAChB,0CAAe,CAAA;AACjB,CAAC,EArBW,IAAI,oBAAJ,IAAI,QAqBf","sourcesContent":["/**\n * Constants used in `open` system calls, see [open(2)](http://man7.org/linux/man-pages/man2/open.2.html).\n *\n * These constants are compatible with Node.js fs constants and can be used with both\n * memfs and native Node.js fs.promises.open().\n *\n * @see http://man7.org/linux/man-pages/man2/open.2.html\n * @see https://www.gnu.org/software/libc/manual/html_node/Open_002dtime-Flags.html\n */\nexport enum FLAG {\n O_RDONLY = 0,\n O_WRONLY = 1,\n O_RDWR = 2,\n O_ACCMODE = 3,\n O_CREAT = 64,\n O_EXCL = 128,\n O_NOCTTY = 256,\n O_TRUNC = 512,\n O_APPEND = 1024,\n O_NONBLOCK = 2048,\n O_DSYNC = 4096,\n FASYNC = 8192,\n O_DIRECT = 16384,\n O_LARGEFILE = 0,\n O_DIRECTORY = 65536,\n O_NOFOLLOW = 131072,\n O_NOATIME = 262144,\n O_CLOEXEC = 524288,\n O_SYNC = 1052672,\n O_NDELAY = 2048,\n}\n\nexport const enum FLAG_CON {\n O_RDONLY = 0,\n O_WRONLY = 1,\n O_RDWR = 2,\n O_ACCMODE = 3,\n O_CREAT = 64,\n O_EXCL = 128,\n O_NOCTTY = 256,\n O_TRUNC = 512,\n O_APPEND = 1024,\n O_NONBLOCK = 2048,\n O_DSYNC = 4096,\n FASYNC = 8192,\n O_DIRECT = 16384,\n O_LARGEFILE = 0,\n O_DIRECTORY = 65536,\n O_NOFOLLOW = 131072,\n O_NOATIME = 262144,\n O_CLOEXEC = 524288,\n O_SYNC = 1052672,\n O_NDELAY = 2048,\n}\n"]} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"encoding.js","sourceRoot":"","sources":["../src/encoding.ts"],"names":[],"mappings":";;;AAMA,wCAEC;AAED,sCAIC;AAdD,8EAA2E;AAC3E,4EAA4E;AAG/D,QAAA,aAAa,GAAmB,MAAM,CAAC;AAEpD,SAAgB,cAAc,CAAC,QAA4B;IACzD,IAAI,QAAQ,IAAI,CAAC,eAAM,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,gCAAgC,EAAE,QAAQ,CAAC,CAAC;AACvH,CAAC;AAED,SAAgB,aAAa,CAAC,GAAW,EAAE,QAA4B;IACrE,IAAI,CAAC,QAAQ,IAAI,QAAQ,KAAK,qBAAa;QAAE,OAAO,GAAG,CAAC,CAAC,QAAQ;IACjE,IAAI,QAAQ,KAAK,QAAQ;QAAE,OAAO,IAAI,eAAM,CAAC,GAAG,CAAC,CAAC,CAAC,oBAAoB;IACvE,OAAO,IAAI,eAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,kBAAkB;AAC/D,CAAC"} | ||
| {"version":3,"file":"encoding.js","sourceRoot":"","sources":["../src/encoding.ts"],"names":[],"mappings":";;;AAMA,wCAEC;AAED,sCAIC;AAdD,8EAA2E;AAC3E,4EAA4E;AAG/D,QAAA,aAAa,GAAmB,MAAM,CAAC;AAEpD,SAAgB,cAAc,CAAC,QAA4B;IACzD,IAAI,QAAQ,IAAI,CAAC,eAAM,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,gCAAgC,EAAE,QAAQ,CAAC,CAAC;AACvH,CAAC;AAED,SAAgB,aAAa,CAAC,GAAW,EAAE,QAA4B;IACrE,IAAI,CAAC,QAAQ,IAAI,QAAQ,KAAK,qBAAa;QAAE,OAAO,GAAG,CAAC,CAAC,QAAQ;IACjE,IAAI,QAAQ,KAAK,QAAQ;QAAE,OAAO,IAAI,eAAM,CAAC,GAAG,CAAC,CAAC,CAAC,oBAAoB;IACvE,OAAO,IAAI,eAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,kBAAkB;AAC/D,CAAC","sourcesContent":["import { Buffer } from '@jsonjoy.com/fs-node-builtins/lib/internal/buffer';\nimport * as errors from '@jsonjoy.com/fs-node-builtins/lib/internal/errors';\nimport { TDataOut, TEncodingExtended } from './types';\n\nexport const ENCODING_UTF8: BufferEncoding = 'utf8';\n\nexport function assertEncoding(encoding: string | undefined) {\n if (encoding && !Buffer.isEncoding(encoding)) throw new errors.TypeError('ERR_INVALID_OPT_VALUE_ENCODING', encoding);\n}\n\nexport function strToEncoding(str: string, encoding?: TEncodingExtended): TDataOut {\n if (!encoding || encoding === ENCODING_UTF8) return str; // UTF-8\n if (encoding === 'buffer') return new Buffer(str); // `buffer` encoding\n return new Buffer(str).toString(encoding); // Custom encoding\n}\n"]} |
+1
-1
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB;AACxB,sDAA4B;AAC5B,yDAA+B;AAC/B,wDAA8B;AAC9B,iDAAuB;AACvB,qDAA2B;AAC3B,wDAA8B"} | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB;AACxB,sDAA4B;AAC5B,yDAA+B;AAC/B,wDAA8B;AAC9B,iDAAuB;AACvB,qDAA2B;AAC3B,wDAA8B","sourcesContent":["export * from './types';\nexport * from './constants';\nexport * from './consts/AMODE';\nexport * from './consts/FLAG';\nexport * from './path';\nexport * from './encoding';\nexport * from './watchIgnore';\n"]} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"fsCallbackApiList.js","sourceRoot":"","sources":["../../src/lists/fsCallbackApiList.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAA+B;IAC3D,QAAQ;IACR,YAAY;IACZ,OAAO;IACP,OAAO;IACP,OAAO;IACP,UAAU;IACV,IAAI;IACJ,kBAAkB;IAClB,mBAAmB;IACnB,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,OAAO;IACP,OAAO;IACP,WAAW;IACX,SAAS;IACT,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,OAAO;IACP,OAAO;IACP,SAAS;IACT,MAAM;IACN,YAAY;IACZ,SAAS;IACT,MAAM;IACN,OAAO;IACP,SAAS;IACT,UAAU;IACV,UAAU;IACV,UAAU;IACV,QAAQ;IACR,IAAI;IACJ,OAAO;IACP,MAAM;IACN,QAAQ;IACR,SAAS;IACT,UAAU;IACV,QAAQ;IACR,aAAa;IACb,QAAQ;IACR,SAAS;IACT,OAAO;IACP,WAAW;IACX,OAAO;IACP,QAAQ;IACR,WAAW;CACZ,CAAC"} | ||
| {"version":3,"file":"fsCallbackApiList.js","sourceRoot":"","sources":["../../src/lists/fsCallbackApiList.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAA+B;IAC3D,QAAQ;IACR,YAAY;IACZ,OAAO;IACP,OAAO;IACP,OAAO;IACP,UAAU;IACV,IAAI;IACJ,kBAAkB;IAClB,mBAAmB;IACnB,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,OAAO;IACP,OAAO;IACP,WAAW;IACX,SAAS;IACT,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,OAAO;IACP,OAAO;IACP,SAAS;IACT,MAAM;IACN,YAAY;IACZ,SAAS;IACT,MAAM;IACN,OAAO;IACP,SAAS;IACT,UAAU;IACV,UAAU;IACV,UAAU;IACV,QAAQ;IACR,IAAI;IACJ,OAAO;IACP,MAAM;IACN,QAAQ;IACR,SAAS;IACT,UAAU;IACV,QAAQ;IACR,aAAa;IACb,QAAQ;IACR,SAAS;IACT,OAAO;IACP,WAAW;IACX,OAAO;IACP,QAAQ;IACR,WAAW;CACZ,CAAC","sourcesContent":["import type { FsCallbackApi } from '../types';\n\nexport const fsCallbackApiList: Array<keyof FsCallbackApi> = [\n 'access',\n 'appendFile',\n 'chmod',\n 'chown',\n 'close',\n 'copyFile',\n 'cp',\n 'createReadStream',\n 'createWriteStream',\n 'exists',\n 'fchmod',\n 'fchown',\n 'fdatasync',\n 'fstat',\n 'fsync',\n 'ftruncate',\n 'futimes',\n 'glob',\n 'lchmod',\n 'lchown',\n 'link',\n 'lstat',\n 'mkdir',\n 'mkdtemp',\n 'open',\n 'openAsBlob',\n 'opendir',\n 'read',\n 'readv',\n 'readdir',\n 'readFile',\n 'readlink',\n 'realpath',\n 'rename',\n 'rm',\n 'rmdir',\n 'stat',\n 'statfs',\n 'symlink',\n 'truncate',\n 'unlink',\n 'unwatchFile',\n 'utimes',\n 'lutimes',\n 'watch',\n 'watchFile',\n 'write',\n 'writev',\n 'writeFile',\n];\n"]} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"fsCommonObjectsList.js","sourceRoot":"","sources":["../../src/lists/fsCommonObjectsList.ts"],"names":[],"mappings":";;;AAEa,QAAA,mBAAmB,GAAiC;IAC/D,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,WAAW;IACX,OAAO;IACP,QAAQ;IACR,KAAK;IACL,QAAQ;IACR,aAAa;IACb,WAAW;IACX,YAAY;IACZ,aAAa;CACd,CAAC"} | ||
| {"version":3,"file":"fsCommonObjectsList.js","sourceRoot":"","sources":["../../src/lists/fsCommonObjectsList.ts"],"names":[],"mappings":";;;AAEa,QAAA,mBAAmB,GAAiC;IAC/D,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,WAAW;IACX,OAAO;IACP,QAAQ;IACR,KAAK;IACL,QAAQ;IACR,aAAa;IACb,WAAW;IACX,YAAY;IACZ,aAAa;CACd,CAAC","sourcesContent":["import type { FsCommonObjects } from '../types/FsCommonObjects';\n\nexport const fsCommonObjectsList: Array<keyof FsCommonObjects> = [\n 'F_OK',\n 'R_OK',\n 'W_OK',\n 'X_OK',\n 'constants',\n 'Stats',\n 'StatFs',\n 'Dir',\n 'Dirent',\n 'StatWatcher',\n 'FSWatcher',\n 'ReadStream',\n 'WriteStream',\n];\n"]} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"fsSynchronousApiList.js","sourceRoot":"","sources":["../../src/lists/fsSynchronousApiList.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAkC;IACjE,YAAY;IACZ,gBAAgB;IAChB,WAAW;IACX,WAAW;IACX,WAAW;IACX,cAAc;IACd,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,eAAe;IACf,WAAW;IACX,WAAW;IACX,eAAe;IACf,aAAa;IACb,UAAU;IACV,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,WAAW;IACX,WAAW;IACX,aAAa;IACb,UAAU;IACV,aAAa;IACb,aAAa;IACb,cAAc;IACd,cAAc;IACd,UAAU;IACV,WAAW;IACX,cAAc;IACd,YAAY;IACZ,WAAW;IACX,QAAQ;IACR,YAAY;IACZ,UAAU;IACV,aAAa;IACb,cAAc;IACd,YAAY;IACZ,YAAY;IACZ,aAAa;IACb,eAAe;IACf,WAAW;IACX,YAAY;CACb,CAAC"} | ||
| {"version":3,"file":"fsSynchronousApiList.js","sourceRoot":"","sources":["../../src/lists/fsSynchronousApiList.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAkC;IACjE,YAAY;IACZ,gBAAgB;IAChB,WAAW;IACX,WAAW;IACX,WAAW;IACX,cAAc;IACd,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,eAAe;IACf,WAAW;IACX,WAAW;IACX,eAAe;IACf,aAAa;IACb,UAAU;IACV,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,WAAW;IACX,WAAW;IACX,aAAa;IACb,UAAU;IACV,aAAa;IACb,aAAa;IACb,cAAc;IACd,cAAc;IACd,UAAU;IACV,WAAW;IACX,cAAc;IACd,YAAY;IACZ,WAAW;IACX,QAAQ;IACR,YAAY;IACZ,UAAU;IACV,aAAa;IACb,cAAc;IACd,YAAY;IACZ,YAAY;IACZ,aAAa;IACb,eAAe;IACf,WAAW;IACX,YAAY;CACb,CAAC","sourcesContent":["import type { FsSynchronousApi } from '../types';\n\nexport const fsSynchronousApiList: Array<keyof FsSynchronousApi> = [\n 'accessSync',\n 'appendFileSync',\n 'chmodSync',\n 'chownSync',\n 'closeSync',\n 'copyFileSync',\n 'cpSync',\n 'existsSync',\n 'fchmodSync',\n 'fchownSync',\n 'fdatasyncSync',\n 'fstatSync',\n 'fsyncSync',\n 'ftruncateSync',\n 'futimesSync',\n 'globSync',\n 'lchmodSync',\n 'lchownSync',\n 'linkSync',\n 'lstatSync',\n 'mkdirSync',\n 'mkdtempSync',\n 'openSync',\n 'opendirSync',\n 'readdirSync',\n 'readFileSync',\n 'readlinkSync',\n 'readSync',\n 'readvSync',\n 'realpathSync',\n 'renameSync',\n 'rmdirSync',\n 'rmSync',\n 'statfsSync',\n 'statSync',\n 'symlinkSync',\n 'truncateSync',\n 'unlinkSync',\n 'utimesSync',\n 'lutimesSync',\n 'writeFileSync',\n 'writeSync',\n 'writevSync',\n];\n"]} |
+1
-1
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"path.js","sourceRoot":"","sources":["../src/path.ts"],"names":[],"mappings":";;;AAAO,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,SAAiB,EAAE,EAAE;IAC1D,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,SAAS;QAAE,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAClE,MAAM,cAAc,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IACnD,OAAO,cAAc,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC;AACvE,CAAC,CAAC;AAJW,QAAA,QAAQ,YAInB"} | ||
| {"version":3,"file":"path.js","sourceRoot":"","sources":["../src/path.ts"],"names":[],"mappings":";;;AAAO,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,SAAiB,EAAE,EAAE;IAC1D,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,SAAS;QAAE,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAClE,MAAM,cAAc,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IACnD,OAAO,cAAc,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC;AACvE,CAAC,CAAC;AAJW,QAAA,QAAQ,YAInB","sourcesContent":["export const basename = (path: string, separator: string) => {\n if (path[path.length - 1] === separator) path = path.slice(0, -1);\n const lastSlashIndex = path.lastIndexOf(separator);\n return lastSlashIndex === -1 ? path : path.slice(lastSlashIndex + 1);\n};\n"]} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"setTimeoutUnref.js","sourceRoot":"","sources":["../src/setTimeoutUnref.ts"],"names":[],"mappings":";;AAEA;;;GAGG;AACH,SAAS,eAAe,CAAC,QAAQ,EAAE,IAAK,EAAE,IAAK;IAC7C,MAAM,GAAG,GAAG,UAAU,CAAC,KAAK,CAAC,OAAO,UAAU,KAAK,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACjG,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,CAAC,KAAK,KAAK,UAAU;QAAE,GAAG,CAAC,KAAK,EAAE,CAAC;IACnF,OAAO,GAAG,CAAC;AACb,CAAC;AAED,kBAAe,eAAe,CAAC"} | ||
| {"version":3,"file":"setTimeoutUnref.js","sourceRoot":"","sources":["../src/setTimeoutUnref.ts"],"names":[],"mappings":";;AAEA;;;GAGG;AACH,SAAS,eAAe,CAAC,QAAQ,EAAE,IAAK,EAAE,IAAK;IAC7C,MAAM,GAAG,GAAG,UAAU,CAAC,KAAK,CAAC,OAAO,UAAU,KAAK,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACjG,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,CAAC,KAAK,KAAK,UAAU;QAAE,GAAG,CAAC,KAAK,EAAE,CAAC;IACnF,OAAO,GAAG,CAAC;AACb,CAAC;AAED,kBAAe,eAAe,CAAC","sourcesContent":["export type TSetTimeout = (callback: (...args) => void, time?: number, args?: any[]) => any;\n\n/**\n * `setTimeoutUnref` is just like `setTimeout`,\n * only in Node's environment it will \"unref\" its macro task.\n */\nfunction setTimeoutUnref(callback, time?, args?): object {\n const ref = setTimeout.apply(typeof globalThis !== 'undefined' ? globalThis : global, arguments);\n if (ref && typeof ref === 'object' && typeof ref.unref === 'function') ref.unref();\n return ref;\n}\n\nexport default setTimeoutUnref;\n"]} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"FsCallbackApi.js","sourceRoot":"","sources":["../../src/types/FsCallbackApi.ts"],"names":[],"mappings":""} | ||
| {"version":3,"file":"FsCallbackApi.js","sourceRoot":"","sources":["../../src/types/FsCallbackApi.ts"],"names":[],"mappings":"","sourcesContent":["import type * as misc from './misc';\nimport type * as opts from './options';\n\nexport interface FsCallbackApi {\n access: {\n (path: misc.PathLike, callback: misc.TCallback<void>): void;\n (path: misc.PathLike, mode: number, callback: misc.TCallback<void>): void;\n };\n appendFile: {\n (id: misc.TFileId, data: misc.TData, callback: misc.TCallback<void>): void;\n (\n id: misc.TFileId,\n data: misc.TData,\n options: opts.IAppendFileOptions | string,\n callback: misc.TCallback<void>,\n ): void;\n };\n chmod: (path: misc.PathLike, mode: misc.TMode, callback: misc.TCallback<void>) => void;\n chown: (path: misc.PathLike, uid: number, gid: number, callback: misc.TCallback<void>) => void;\n close: (fd: number, callback: misc.TCallback<void>) => void;\n copyFile: {\n (src: misc.PathLike, dest: misc.PathLike, callback: misc.TCallback<void>): void;\n (src: misc.PathLike, dest: misc.PathLike, flags: misc.TFlagsCopy, callback: misc.TCallback<void>): void;\n };\n cp: {\n (src: string | URL, dest: string | URL, callback: misc.TCallback<void>): void;\n (src: string | URL, dest: string | URL, options: opts.ICpOptions, callback: misc.TCallback<void>): void;\n };\n createReadStream: (path: misc.PathLike, options?: opts.IReadStreamOptions | string) => misc.IReadStream;\n createWriteStream: (path: misc.PathLike, options?: opts.IWriteStreamOptions | string) => misc.IWriteStream;\n exists: (path: misc.PathLike, callback: (exists: boolean) => void) => void;\n fchmod: (fd: number, mode: misc.TMode, callback: misc.TCallback<void>) => void;\n fchown: (fd: number, uid: number, gid: number, callback: misc.TCallback<void>) => void;\n fdatasync: (fd: number, callback: misc.TCallback<void>) => void;\n fsync: (fd: number, callback: misc.TCallback<void>) => void;\n fstat: {\n (fd: number, callback: misc.TCallback<misc.IStats>): void;\n (fd: number, options: opts.IFStatOptions, callback: misc.TCallback<misc.IStats>): void;\n };\n ftruncate: {\n (fd: number, callback: misc.TCallback<void>): void;\n (fd: number, len: number, callback: misc.TCallback<void>): void;\n };\n futimes: (fd: number, atime: misc.TTime, mtime: misc.TTime, callback: misc.TCallback<void>) => void;\n glob: {\n (pattern: string, callback: misc.TCallback<string[]>): void;\n (pattern: string, options: opts.IGlobOptions, callback: misc.TCallback<string[]>): void;\n };\n lchmod: (path: misc.PathLike, mode: misc.TMode, callback: misc.TCallback<void>) => void;\n lchown: (path: misc.PathLike, uid: number, gid: number, callback: misc.TCallback<void>) => void;\n lutimes: (\n path: misc.PathLike,\n atime: number | string | Date,\n mtime: number | string | Date,\n callback: misc.TCallback<void>,\n ) => void;\n link: (existingPath: misc.PathLike, newPath: misc.PathLike, callback: misc.TCallback<void>) => void;\n lstat: {\n (path: misc.PathLike, callback: misc.TCallback<misc.IStats>): void;\n (path: misc.PathLike, options: opts.IStatOptions, callback: misc.TCallback<misc.IStats>): void;\n };\n mkdir: {\n (path: misc.PathLike, callback: misc.TCallback<void>): void;\n (\n path: misc.PathLike,\n mode: misc.TMode | (opts.IMkdirOptions & { recursive?: false }),\n callback: misc.TCallback<void>,\n ): void;\n (path: misc.PathLike, mode: opts.IMkdirOptions & { recursive: true }, callback: misc.TCallback<string>): void;\n (path: misc.PathLike, mode: misc.TMode | opts.IMkdirOptions, callback: misc.TCallback<string>): void;\n };\n mkdtemp: {\n (prefix: string, callback: misc.TCallback<string>): void;\n (prefix: string, options: opts.IOptions, callback: misc.TCallback<string>): void;\n };\n open: {\n (path: misc.PathLike, flags: misc.TFlags, callback: misc.TCallback<number>): void;\n (path: misc.PathLike, flags: misc.TFlags, mode: misc.TMode, callback: misc.TCallback<number>): void;\n };\n openAsBlob: (path: misc.PathLike, options?: opts.IOpenAsBlobOptions) => Promise<Blob>;\n opendir: (path: misc.PathLike, options: opts.IOpendirOptions, callback: misc.TCallback<misc.IDir>) => void;\n read: (\n fd: number,\n buffer: Buffer | ArrayBufferView | DataView,\n offset: number,\n length: number,\n position: number,\n callback: (err?: Error | null, bytesRead?: number, buffer?: Buffer | ArrayBufferView | DataView) => void,\n ) => void;\n readdir: {\n (path: misc.PathLike, callback: misc.TCallback<misc.TDataOut[] | misc.IDirent[]>): void;\n (\n path: misc.PathLike,\n options: opts.IReaddirOptions | string,\n callback: misc.TCallback<misc.TDataOut[] | misc.IDirent[]>,\n ): void;\n };\n readFile: {\n (id: misc.TFileId, callback: misc.TCallback<misc.TDataOut>): void;\n (id: misc.TFileId, options: opts.IReadFileOptions | string, callback: misc.TCallback<misc.TDataOut>): void;\n };\n readlink: {\n (path: misc.PathLike, callback: misc.TCallback<misc.TDataOut>): void;\n (path: misc.PathLike, options: opts.IOptions, callback: misc.TCallback<misc.TDataOut>): void;\n };\n readv: {\n (fd: number, buffers: ArrayBufferView[], callback: misc.TCallback2<number, ArrayBufferView[]>): void;\n (\n fd: number,\n buffers: ArrayBufferView[],\n position: number | null,\n callback: misc.TCallback2<number, ArrayBufferView[]>,\n ): void;\n };\n realpath: {\n (path: misc.PathLike, callback: misc.TCallback<misc.TDataOut>): void;\n (path: misc.PathLike, options: opts.IRealpathOptions | string, callback: misc.TCallback<misc.TDataOut>): void;\n };\n rename: (oldPath: misc.PathLike, newPath: misc.PathLike, callback: misc.TCallback<void>) => void;\n rmdir: {\n (path: misc.PathLike, callback: misc.TCallback<void>): void;\n (path: misc.PathLike, options: opts.IRmdirOptions, callback: misc.TCallback<void>): void;\n };\n rm: {\n (path: misc.PathLike, callback: misc.TCallback<void>): void;\n (path: misc.PathLike, options: opts.IRmOptions, callback: misc.TCallback<void>): void;\n };\n stat: {\n (path: misc.PathLike, callback: misc.TCallback<misc.IStats>): void;\n (path: misc.PathLike, options: opts.IStatOptions, callback: misc.TCallback<misc.IStats>): void;\n };\n statfs: {\n (path: misc.PathLike, callback: misc.TCallback<misc.IStatFs>): void;\n (path: misc.PathLike, options: opts.IStatOptions, callback: misc.TCallback<misc.IStatFs>): void;\n };\n symlink: {\n (target: misc.PathLike, path: misc.PathLike, callback: misc.TCallback<void>): void;\n (target: misc.PathLike, path: misc.PathLike, type: misc.symlink.Type, callback: misc.TCallback<void>): void;\n };\n truncate: {\n (id: misc.PathLike, callback: misc.TCallback<void>): void;\n (id: misc.PathLike, len: number, callback: misc.TCallback<void>): void;\n };\n unlink: (path: misc.PathLike, callback: misc.TCallback<void>) => void;\n unwatchFile: (path: misc.PathLike, listener?: (curr: misc.IStats, prev: misc.IStats) => void) => void;\n utimes: (path: misc.PathLike, atime: misc.TTime, mtime: misc.TTime, callback: misc.TCallback<void>) => void;\n watch: {\n (path: misc.PathLike, listener?: (eventType: string, filename: string) => void): misc.IFSWatcher;\n (\n path: misc.PathLike,\n options: 'buffer' | (opts.IWatchOptions & { encoding: 'buffer' }),\n listener?: (eventType: string, filename: Buffer) => void,\n ): misc.IFSWatcher;\n (\n path: misc.PathLike,\n options: opts.IWatchOptions | string | undefined,\n listener?: (eventType: string, filename: string) => void,\n ): misc.IFSWatcher;\n };\n watchFile: {\n (path: misc.PathLike, listener: (curr: misc.IStats, prev: misc.IStats) => void): misc.IStatWatcher;\n (\n path: misc.PathLike,\n options: opts.IWatchFileOptions,\n listener: (curr: misc.IStats, prev: misc.IStats) => void,\n ): misc.IStatWatcher;\n };\n write: {\n (fd: number, buffer: Buffer | ArrayBufferView | DataView, callback: (...args) => void): void;\n (fd: number, buffer: Buffer | ArrayBufferView | DataView, offset: number, callback: (...args) => void): void;\n (\n fd: number,\n buffer: Buffer | ArrayBufferView | DataView,\n offset: number,\n length: number,\n callback: (...args) => void,\n ): void;\n (\n fd: number,\n buffer: Buffer | ArrayBufferView | DataView,\n offset: number,\n length: number,\n position: number,\n callback: (...args) => void,\n ): void;\n (fd: number, str: string, callback: (...args) => void): void;\n (fd: number, str: string, position: number, callback: (...args) => void): void;\n (fd: number, str: string, position: number, encoding: BufferEncoding, callback: (...args) => void): void;\n };\n writeFile: {\n (id: misc.TFileId, data: misc.TData, callback: misc.TCallback<void>): void;\n (\n id: misc.TFileId,\n data: misc.TData,\n options: opts.IWriteFileOptions | string,\n callback: misc.TCallback<void>,\n ): void;\n };\n writev: {\n (fd: number, buffers: ArrayBufferView[], callback: WritevCallback): void;\n (fd: number, buffers: ArrayBufferView[], position: number | null, callback: WritevCallback): void;\n };\n}\n\nexport type WritevCallback = (err: Error | null, bytesWritten?: number, buffers?: ArrayBufferView[]) => void;\n"]} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"FsCommonObjects.js","sourceRoot":"","sources":["../../src/types/FsCommonObjects.ts"],"names":[],"mappings":""} | ||
| {"version":3,"file":"FsCommonObjects.js","sourceRoot":"","sources":["../../src/types/FsCommonObjects.ts"],"names":[],"mappings":"","sourcesContent":["import type { constants } from '../constants';\nimport type * as misc from './misc';\n\nexport interface FsCommonObjects {\n F_OK: number;\n R_OK: number;\n W_OK: number;\n X_OK: number;\n constants: typeof constants;\n Dir: new (...args: unknown[]) => misc.IDir;\n Dirent: new (...args: unknown[]) => misc.IDirent;\n FSWatcher: new (...args: unknown[]) => misc.IFSWatcher;\n ReadStream: new (...args: unknown[]) => misc.IReadStream;\n StatFs: new (...args: unknown[]) => misc.IStatFs;\n Stats: new (...args: unknown[]) => misc.IStats;\n StatWatcher: new (...args: unknown[]) => misc.IStatWatcher;\n WriteStream: new (...args: unknown[]) => misc.IWriteStream;\n}\n"]} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"FsPromisesApi.js","sourceRoot":"","sources":["../../src/types/FsPromisesApi.ts"],"names":[],"mappings":""} | ||
| {"version":3,"file":"FsPromisesApi.js","sourceRoot":"","sources":["../../src/types/FsPromisesApi.ts"],"names":[],"mappings":"","sourcesContent":["import type { constants } from '../constants';\nimport * as misc from './misc';\nimport * as opts from './options';\n\nexport interface FsPromisesApi {\n constants: typeof constants;\n FileHandle: new (...args: unknown[]) => misc.IFileHandle;\n access: (path: misc.PathLike, mode?: number) => Promise<void>;\n appendFile: (path: misc.TFileHandle, data: misc.TData, options?: opts.IAppendFileOptions | string) => Promise<void>;\n chmod: (path: misc.PathLike, mode: misc.TMode) => Promise<void>;\n chown: (path: misc.PathLike, uid: number, gid: number) => Promise<void>;\n copyFile: (src: misc.PathLike, dest: misc.PathLike, flags?: misc.TFlagsCopy) => Promise<void>;\n cp: (src: string | URL, dest: string | URL, options?: opts.ICpOptions) => Promise<void>;\n lchmod: (path: misc.PathLike, mode: misc.TMode) => Promise<void>;\n lchown: (path: misc.PathLike, uid: number, gid: number) => Promise<void>;\n lutimes: (path: misc.PathLike, atime: misc.TTime, mtime: misc.TTime) => Promise<void>;\n link: (existingPath: misc.PathLike, newPath: misc.PathLike) => Promise<void>;\n lstat: (path: misc.PathLike, options?: opts.IStatOptions) => Promise<misc.IStats>;\n mkdir: (path: misc.PathLike, options?: misc.TMode | opts.IMkdirOptions) => Promise<string | undefined>;\n mkdtemp: (prefix: string, options?: opts.IOptions) => Promise<misc.TDataOut>;\n open: (path: misc.PathLike, flags?: misc.TFlags, mode?: misc.TMode) => Promise<misc.IFileHandle>;\n opendir: (path: misc.PathLike, options?: opts.IOpendirOptions) => Promise<misc.IDir>;\n readdir: (path: misc.PathLike, options?: opts.IReaddirOptions | string) => Promise<misc.TDataOut[] | misc.IDirent[]>;\n readFile: (id: misc.TFileHandle, options?: opts.IReadFileOptions | string) => Promise<misc.TDataOut>;\n readlink: (path: misc.PathLike, options?: opts.IOptions) => Promise<misc.TDataOut>;\n realpath: (path: misc.PathLike, options?: opts.IRealpathOptions | string) => Promise<misc.TDataOut>;\n rename: (oldPath: misc.PathLike, newPath: misc.PathLike) => Promise<void>;\n rmdir: (path: misc.PathLike, options?: opts.IRmdirOptions) => Promise<void>;\n rm: (path: misc.PathLike, options?: opts.IRmOptions) => Promise<void>;\n stat: (path: misc.PathLike, options?: opts.IStatOptions) => Promise<misc.IStats>;\n statfs: (path: misc.PathLike, options?: opts.IStatOptions) => Promise<misc.IStatFs>;\n symlink: (target: misc.PathLike, path: misc.PathLike, type?: misc.symlink.Type) => Promise<void>;\n truncate: (path: misc.PathLike, len?: number) => Promise<void>;\n unlink: (path: misc.PathLike) => Promise<void>;\n utimes: (path: misc.PathLike, atime: misc.TTime, mtime: misc.TTime) => Promise<void>;\n watch: (\n filename: misc.PathLike,\n options?: opts.IWatchOptions,\n ) => AsyncIterableIterator<{ eventType: string; filename: string | Buffer }>;\n writeFile: (id: misc.TFileHandle, data: misc.TPromisesData, options?: opts.IWriteFileOptions) => Promise<void>;\n glob: (pattern: string, options?: opts.IGlobOptions) => Promise<string[]>;\n}\n"]} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"FsSynchronousApi.js","sourceRoot":"","sources":["../../src/types/FsSynchronousApi.ts"],"names":[],"mappings":""} | ||
| {"version":3,"file":"FsSynchronousApi.js","sourceRoot":"","sources":["../../src/types/FsSynchronousApi.ts"],"names":[],"mappings":"","sourcesContent":["import type * as misc from './misc';\nimport type * as opts from './options';\n\nexport interface FsSynchronousApi {\n accessSync: (path: misc.PathLike, mode?: number) => void;\n appendFileSync: (id: misc.TFileId, data: misc.TData, options?: opts.IAppendFileOptions | string) => void;\n chmodSync: (path: misc.PathLike, mode: misc.TMode) => void;\n chownSync: (path: misc.PathLike, uid: number, gid: number) => void;\n closeSync: (fd: number) => void;\n copyFileSync: (src: misc.PathLike, dest: misc.PathLike, flags?: misc.TFlagsCopy) => void;\n cpSync: (src: string | URL, dest: string | URL, options?: opts.ICpOptions) => void;\n existsSync: (path: misc.PathLike) => boolean;\n fchmodSync: (fd: number, mode: misc.TMode) => void;\n fchownSync: (fd: number, uid: number, gid: number) => void;\n fdatasyncSync: (fd: number) => void;\n fstatSync: {\n (fd: number, options: { bigint: false }): misc.IStats<number>;\n (fd: number, options: { bigint: true }): misc.IStats<bigint>;\n (fd: number): misc.IStats<number>;\n };\n fsyncSync: (fd: number) => void;\n ftruncateSync: (fd: number, len?: number) => void;\n futimesSync: (fd: number, atime: misc.TTime, mtime: misc.TTime) => void;\n globSync: (pattern: string, options?: opts.IGlobOptions) => string[];\n lchmodSync: (path: misc.PathLike, mode: misc.TMode) => void;\n lchownSync: (path: misc.PathLike, uid: number, gid: number) => void;\n lutimesSync: (path: misc.PathLike, atime: number | string | Date, time: number | string | Date) => void;\n linkSync: (existingPath: misc.PathLike, newPath: misc.PathLike) => void;\n lstatSync: {\n (path: misc.PathLike, options: { bigint: false; throwIfNoEntry: false }): misc.IStats<number> | undefined;\n (path: misc.PathLike, options: { bigint: false; throwIfNoEntry?: true | undefined }): misc.IStats<number>;\n (path: misc.PathLike, options: { bigint: true; throwIfNoEntry: false }): misc.IStats<bigint> | undefined;\n (path: misc.PathLike, options: { bigint: true; throwIfNoEntry?: true | undefined }): misc.IStats<bigint>;\n (path: misc.PathLike, options: { throwIfNoEntry: false }): misc.IStats<number> | undefined;\n (path: misc.PathLike, options: { throwIfNoEntry?: true | undefined }): misc.IStats<number>;\n (path: misc.PathLike): misc.IStats<number>;\n };\n mkdirSync: {\n (path: misc.PathLike, options: opts.IMkdirOptions & { recursive: true }): string | undefined;\n (path: misc.PathLike, options?: misc.TMode | (opts.IMkdirOptions & { recursive?: false })): void;\n (path: misc.PathLike, options?: misc.TMode | opts.IMkdirOptions): string | undefined;\n };\n mkdtempSync: (prefix: string, options?: opts.IOptions) => misc.TDataOut;\n openSync: (path: misc.PathLike, flags: misc.TFlags, mode?: misc.TMode) => number;\n opendirSync: (path: misc.PathLike, options?: opts.IOpendirOptions) => misc.IDir;\n readdirSync: (path: misc.PathLike, options?: opts.IReaddirOptions | string) => misc.TDataOut[] | misc.IDirent[];\n readlinkSync: (path: misc.PathLike, options?: opts.IOptions) => misc.TDataOut;\n readSync: (\n fd: number,\n buffer: Buffer | ArrayBufferView | DataView,\n offset: number,\n length: number,\n position: number,\n ) => number;\n readFileSync: (file: misc.TFileId, options?: opts.IReadFileOptions | string) => misc.TDataOut;\n readvSync: (fd: number, buffers: ArrayBufferView[], position?: number | null) => number;\n realpathSync: (path: misc.PathLike, options?: opts.IRealpathOptions | string) => misc.TDataOut;\n renameSync: (oldPath: misc.PathLike, newPath: misc.PathLike) => void;\n rmdirSync: (path: misc.PathLike, options?: opts.IRmdirOptions) => void;\n rmSync: (path: misc.PathLike, options?: opts.IRmOptions) => void;\n statSync: {\n (path: misc.PathLike, options: { bigint: false; throwIfNoEntry: false }): misc.IStats<number> | undefined;\n (path: misc.PathLike, options: { bigint: false; throwIfNoEntry?: true }): misc.IStats<number>;\n (path: misc.PathLike, options: { bigint: true; throwIfNoEntry: false }): misc.IStats<bigint> | undefined;\n (path: misc.PathLike, options: { bigint: true; throwIfNoEntry?: true }): misc.IStats<bigint>;\n (path: misc.PathLike, options: { throwIfNoEntry: false }): misc.IStats<number> | undefined;\n (path: misc.PathLike, options: { throwIfNoEntry?: true }): misc.IStats<number>;\n (path: misc.PathLike): misc.IStats<number>;\n };\n statfsSync: (path: misc.PathLike, options?: opts.IStafsOptions) => misc.IStatFs;\n symlinkSync: (target: misc.PathLike, path: misc.PathLike, type?: misc.symlink.Type) => void;\n truncateSync: (id: misc.TFileId, len?: number) => void;\n unlinkSync: (path: misc.PathLike) => void;\n utimesSync: (path: misc.PathLike, atime: misc.TTime, mtime: misc.TTime) => void;\n writeFileSync: (id: misc.TFileId, data: misc.TData, options?: opts.IWriteFileOptions) => void;\n writeSync: {\n (\n fd: number,\n buffer: Buffer | ArrayBufferView | DataView,\n offset?: number,\n length?: number,\n position?: number | null,\n ): number;\n (fd: number, str: string, position?: number, encoding?: BufferEncoding): number;\n };\n writevSync: (fd: number, buffers: ArrayBufferView[], position?: number | null) => number;\n}\n"]} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":""} | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"","sourcesContent":["import type { FsSynchronousApi } from './FsSynchronousApi';\nimport type { FsCallbackApi } from './FsCallbackApi';\nimport type { FsPromisesApi } from './FsPromisesApi';\n\nexport type * from './misc';\nexport { FsSynchronousApi, FsCallbackApi, FsPromisesApi };\n\nexport interface FsApi extends FsCallbackApi, FsSynchronousApi {\n promises: FsPromisesApi;\n}\n"]} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"misc.js","sourceRoot":"","sources":["../../src/types/misc.ts"],"names":[],"mappings":""} | ||
| {"version":3,"file":"misc.js","sourceRoot":"","sources":["../../src/types/misc.ts"],"names":[],"mappings":"","sourcesContent":["import type { PathLike as NodePathLike, symlink } from '@jsonjoy.com/fs-node-builtins/lib/fs';\nimport type { constants } from '../constants';\nimport type { EventEmitter } from '@jsonjoy.com/fs-node-builtins/lib/events';\nimport type { TSetTimeout } from '../setTimeoutUnref';\nimport type {\n IAppendFileOptions,\n IFileHandleReadStreamOptions,\n IFileHandleWriteStreamOptions,\n IReadableWebStreamOptions,\n IReadFileOptions,\n IStatOptions,\n IWriteFileOptions,\n TWatchIgnorePattern,\n} from './options';\nimport type { Readable, Writable } from '@jsonjoy.com/fs-node-builtins/lib/stream';\n\nexport { symlink };\n\nexport type PathLike = NodePathLike | Uint8Array; // For browser support we add Uint8Array.\nexport type TDataOut = string | Buffer; // Data formats we give back to users.\nexport type TEncodingExtended = BufferEncoding | 'buffer';\nexport type TFileId = PathLike | number; // Number is used as a file descriptor.\nexport type TData = TDataOut | ArrayBufferView | DataView; // Data formats users can give us.\nexport type TPromisesData = TData | Readable; // Data formats users can give us in the promises API.\nexport type TFlags = string | number;\nexport type TMode = string | number; // Mode can be a String, although docs say it should be a Number.\nexport type TTime = number | string | Date;\nexport type TCallback<TData> = (error?: IError | null, data?: TData) => void;\nexport type TCallback2<T1, T2> = (error: IError | null, bytesRead?: T1, buffers?: T2) => void;\n\nexport interface IError extends Error {\n code?: string;\n}\n\nexport type TFlagsCopy =\n | typeof constants.COPYFILE_EXCL\n | typeof constants.COPYFILE_FICLONE\n | typeof constants.COPYFILE_FICLONE_FORCE;\n\nexport type TStatNumber = number | bigint;\n\nexport interface IStats<T = TStatNumber> {\n uid: T;\n gid: T;\n rdev: T;\n blksize: T;\n ino: T;\n size: T;\n blocks: T;\n atime: Date;\n mtime: Date;\n ctime: Date;\n birthtime: Date;\n atimeMs: T;\n mtimeMs: T;\n ctimeMs: T;\n birthtimeMs: T;\n dev: T;\n mode: T;\n nlink: T;\n isDirectory(): boolean;\n isFile(): boolean;\n isBlockDevice(): boolean;\n isCharacterDevice(): boolean;\n isSymbolicLink(): boolean;\n isFIFO(): boolean;\n isSocket(): boolean;\n}\n\nexport interface IStatFs<T = TStatNumber> {\n bavail: T;\n bfree: T;\n blocks: T;\n bsize: T;\n ffree: T;\n files: T;\n type: T;\n}\n\nexport interface IDir extends Disposable, AsyncDisposable {\n path: string;\n close(): Promise<void>;\n close(callback?: (err?: Error) => void): void;\n closeSync(): void;\n read(): Promise<IDirent | null>;\n read(callback?: (err: Error | null, dir?: IDirent | null) => void): void;\n readSync(): IDirent | null;\n [Symbol.asyncIterator](): AsyncIterableIterator<IDirent>;\n}\n\nexport interface IDirent {\n name: TDataOut;\n /**\n * @deprecated\n * @see https://nodejs.org/api/deprecations.html#DEP0178\n */\n parent?: string;\n parentPath: string;\n isDirectory(): boolean;\n isFile(): boolean;\n isBlockDevice(): boolean;\n isCharacterDevice(): boolean;\n isSymbolicLink(): boolean;\n isFIFO(): boolean;\n isSocket(): boolean;\n}\n\nexport interface IStatWatcher extends EventEmitter {\n filename: string;\n interval: number;\n timeoutRef?;\n setTimeout: TSetTimeout;\n prev: IStats;\n start(path: string, persistent?: boolean, interval?: number, bigint?: boolean): void;\n stop(): void;\n ref(): this;\n unref(): this;\n}\n\nexport interface IReadStream extends Readable {\n bytesRead: number;\n path: string | Buffer;\n pending: boolean;\n}\n\nexport interface IWriteStream extends Writable {\n bytesWritten: number;\n path: string;\n pending: boolean;\n close(callback?: (err?: Error) => void): void;\n}\n\nexport interface IFSWatcher extends EventEmitter {\n start(\n path: PathLike,\n persistent?: boolean,\n recursive?: boolean,\n encoding?: BufferEncoding,\n ignore?: TWatchIgnorePattern | TWatchIgnorePattern[],\n ): void;\n close(): void;\n ref(): this;\n unref(): this;\n}\n\n/**\n * Declare ReadableStream in case dom.d.ts is not added to the tsconfig lib causing\n * ReadableStream interface is not defined. For developers with dom.d.ts added,\n * the ReadableStream interface will be merged correctly.\n */\ndeclare global {\n export interface ReadableStream {}\n}\n\nexport interface IFileHandle extends EventEmitter {\n fd: number;\n getAsyncId(): number;\n appendFile(data: TData, options?: IAppendFileOptions | string): Promise<void>;\n chmod(mode: TMode): Promise<void>;\n chown(uid: number, gid: number): Promise<void>;\n close(): Promise<void>;\n createReadStream(options?: IFileHandleReadStreamOptions): IReadStream;\n createWriteStream(options?: IFileHandleWriteStreamOptions): IWriteStream;\n datasync(): Promise<void>;\n readableWebStream(options?: IReadableWebStreamOptions): ReadableStream;\n read(\n buffer: Buffer | Uint8Array,\n offset: number,\n length: number,\n position?: number | null,\n ): Promise<TFileHandleReadResult>;\n readv(buffers: ArrayBufferView[], position?: number | null): Promise<TFileHandleReadvResult>;\n readFile(options?: IReadFileOptions | string): Promise<TDataOut>;\n stat(options?: IStatOptions): Promise<IStats>;\n truncate(len?: number): Promise<void>;\n utimes(atime: TTime, mtime: TTime): Promise<void>;\n write(\n buffer: Buffer | ArrayBufferView | DataView,\n offset?: number,\n length?: number,\n position?: number | null,\n ): Promise<TFileHandleWriteResult>;\n writev(buffers: ArrayBufferView[], position?: number | null): Promise<TFileHandleWritevResult>;\n writeFile(data: TData, options?: IWriteFileOptions): Promise<void>;\n}\n\nexport type TFileHandle = PathLike | IFileHandle;\n\nexport interface TFileHandleReadResult {\n bytesRead: number;\n buffer: Buffer | Uint8Array;\n}\n\nexport interface TFileHandleWriteResult {\n bytesWritten: number;\n buffer: Buffer | Uint8Array;\n}\n\nexport interface TFileHandleReadvResult {\n bytesRead: number;\n buffers: ArrayBufferView[];\n}\n\nexport interface TFileHandleWritevResult {\n bytesWritten: number;\n buffers: ArrayBufferView[];\n}\n\nexport type AssertCallback<T> = T extends () => void ? T : never;\n"]} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/types/options.ts"],"names":[],"mappings":""} | ||
| {"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/types/options.ts"],"names":[],"mappings":"","sourcesContent":["import type { IFileHandle, TEncodingExtended, TFlags, TMode } from './misc';\n\nexport interface IOptions {\n encoding?: BufferEncoding | TEncodingExtended;\n}\n\nexport interface IFileOptions extends IOptions {\n mode?: TMode;\n flag?: TFlags;\n}\n\nexport interface IWriteFileOptions extends IFileOptions {}\n\nexport interface IReadFileOptions extends IOptions {\n flag?: string;\n}\n\nexport interface IRealpathOptions {\n encoding?: TEncodingExtended;\n}\n\nexport interface IAppendFileOptions extends IFileOptions {}\n\nexport interface IStatOptions {\n bigint?: boolean;\n throwIfNoEntry?: boolean;\n}\n\nexport interface IFStatOptions {\n bigint?: boolean;\n}\n\nexport interface IAppendFileOptions extends IFileOptions {}\n\nexport interface IReadableWebStreamOptions {\n type?: 'bytes' | undefined;\n autoClose?: boolean;\n}\n\nexport interface IFileHandleReadStreamOptions {\n encoding?: BufferEncoding;\n autoClose?: boolean;\n emitClose?: boolean;\n start?: number | undefined;\n end?: number;\n highWaterMark?: number;\n flush?: boolean;\n signal?: AbortSignal | undefined;\n}\n\nexport interface IFileHandleWriteStreamOptions {\n encoding?: BufferEncoding;\n autoClose?: boolean;\n emitClose?: boolean;\n start?: number;\n highWaterMark?: number;\n flush?: boolean;\n}\n\nexport interface IReaddirOptions extends IOptions {\n recursive?: boolean;\n withFileTypes?: boolean;\n}\n\nexport interface IMkdirOptions {\n mode?: TMode;\n recursive?: boolean;\n}\n\nexport interface IRmdirOptions {\n recursive?: boolean;\n maxRetries?: number;\n retryDelay?: number;\n}\n\nexport interface IRmOptions {\n force?: boolean;\n maxRetries?: number;\n recursive?: boolean;\n retryDelay?: number;\n}\n\nexport interface IWatchFileOptions {\n /** Whether the stats passed to the listener should be bigint variants. Default: false. */\n bigint?: boolean;\n persistent?: boolean;\n interval?: number;\n}\n\nexport interface IReadStreamOptions extends IOptions {\n /** Defaults to `'r'`. */\n flags?: TFlags;\n /** Defaults to `null`. */\n encoding?: BufferEncoding;\n /** Defaults to `null`. */\n fd?: number | IFileHandle | null;\n /** Defaults to 0o666 */\n mode?: TMode;\n /** Defaults to `true`. */\n autoClose?: boolean;\n /** Defaults to `true`. */\n emitClose?: boolean;\n start?: number;\n /** Defaults to `Infinity`. */\n end?: number;\n /** Defaults to `64 * 1024`. */\n highWaterMark?: number;\n /** Defaults to `null`. */\n fs?: object | null;\n /** Defaults to `null`. */\n signal?: AbortSignal | null;\n}\n\nexport interface IWriteStreamOptions {\n flags?: TFlags;\n encoding?: BufferEncoding;\n fd?: number | IFileHandle;\n mode?: TMode;\n autoClose?: boolean;\n emitClose?: boolean;\n start?: number;\n}\n\nexport type TWatchIgnorePattern = string | RegExp | ((filename: string) => boolean);\n\nexport interface IWatchOptions extends IOptions {\n /**\n * Indicates whether the process should continue to run as long as files are\n * being watched. Default: true.\n */\n persistent?: boolean;\n\n /**\n * Indicates whether all subdirectories should be watched, or only the current\n * directory. This applies when a directory is specified, and only on\n * supported platforms (See caveats). Default: false.\n */\n recursive?: boolean;\n\n /**\n * Allows closing the watcher with an {@link AbortSignal}.\n */\n signal?: AbortSignal;\n\n /**\n * Whether to throw if the watched path does not exist. When `false`, a\n * watcher that was never started is returned instead. Default: true.\n */\n throwIfNoEntry?: boolean;\n\n /**\n * Pattern(s) for event filenames to ignore. Strings are glob patterns, a\n * RegExp is tested against the filename, and a function receives the\n * filename and returns `true` to ignore it. An array may mix all three.\n *\n * @default undefined\n */\n ignore?: TWatchIgnorePattern | TWatchIgnorePattern[];\n\n /**\n * Specifies the number of events to queue between iterations of the AsyncIterator.\n *\n * @default 2048\n */\n maxQueue?: number;\n\n /**\n * Behavior when more events are queued than maxQueue allows. 'ignore' means\n * overflow events are dropped and a warning is emitted, while 'error' means\n * the iterator throws an `ERR_FS_WATCH_QUEUE_OVERFLOW` error. 'throw' is\n * accepted as an alias of 'error' (the Node.js docs use 'throw' while its\n * implementation validates 'error').\n *\n * @default 'ignore'\n */\n overflow?: 'ignore' | 'error' | 'throw';\n}\n\nexport interface ICpOptions {\n /** dereference symlinks. Default: false. */\n dereference?: boolean;\n\n /**\n * When force is false, and the destination exists, throw an error.\n * Default: false.\n */\n errorOnExist?: boolean;\n\n /**\n * Function to filter copied files/directories. Return true to copy the item,\n * false to ignore it. Default: undefined.\n */\n filter?: (src: string, dest: string) => boolean;\n\n /**\n * Overwrite existing file or directory. The copy operation will ignore errors\n * if you set this to false and the destination exists. Use the errorOnExist\n * option to change this behavior. Default: true.\n */\n force?: boolean;\n\n /**\n * Integer, modifiers for copy operation. Default: 0. See mode flag of\n * `fs.copyFileSync()`.\n */\n mode?: number;\n\n /** When true timestamps from src will be preserved. Default: false. */\n preserveTimestamps?: boolean;\n\n /** Copy directories recursively Default: false. */\n recursive?: boolean;\n\n /** When true, path resolution for symlinks will be skipped. Default: false. */\n verbatimSymlinks?: boolean;\n}\n\nexport interface IStafsOptions {\n /** Whether the numeric values in the returned `StatFs` object should be bigint. */\n bigint?: boolean;\n}\n\nexport interface IOpenAsBlobOptions {\n /** An optional mime type for the blob. */\n type?: string;\n}\n\nexport interface IGlobOptions {\n /** Current working directory. */\n cwd?: string | URL;\n /** Exclude patterns. */\n exclude?: string | string[];\n /** Maximum search depth. */\n maxdepth?: number;\n /** Whether to include symbolic links. */\n withFileTypes?: boolean;\n}\n\nexport interface IOpendirOptions extends IOptions {\n /**\n * Number of directory entries that are buffered internally when reading from\n * the directory. Higher values lead to better performance but higher memory\n * usage. Default: 32.\n */\n bufferSize?: number;\n /** Default: false. */\n recursive?: boolean;\n}\n"]} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"watchIgnore.js","sourceRoot":"","sources":["../src/watchIgnore.ts"],"names":[],"mappings":";;;AAAA,uDAA2C;AAG3C,8EAA8E;AACvE,MAAM,2BAA2B,GAAG,CAAC,OAA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EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACzE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,MAAM,KAAK,GAAG,IAAA,0BAAO,EAAC,OAAO,CAAC,CAAC;QAC/B,OAAO,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;IACD,MAAM,IAAI,SAAS,CACjB,+FAA+F;QAC7F,YAAY,OAAO,OAAO,EAAE,CAC/B,CAAC;AACJ,CAAC,CAAC;AAXW,QAAA,2BAA2B,+BAWtC;AAEF,uGAAuG;AAChG,MAAM,oBAAoB,GAAG,CAClC,MAAmD,EAClB,EAAE;IACnC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,mCAA2B,CAAC,CAAC;QACzD,OAAO,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,IAAA,mCAA2B,EAAC,MAAM,CAAC,CAAC;AAC7C,CAAC,CAAC;AARW,QAAA,oBAAoB,wBAQ/B","sourcesContent":["import { toRegex } from 'glob-to-regex.js';\nimport type { TWatchIgnorePattern } from './types/options';\n\n/** Converts a single `watch()` `ignore` pattern into a filename predicate. */\nexport const watchIgnorePatternToMatcher = (pattern: TWatchIgnorePattern): ((filename: string) => boolean) => {\n if (typeof pattern === 'function') return pattern;\n if (pattern instanceof RegExp) return filename => pattern.test(filename);\n if (typeof pattern === 'string') {\n const regex = toRegex(pattern);\n return filename => regex.test(filename);\n }\n throw new TypeError(\n 'The \"options.ignore\" property must be of type string, RegExp, function, or an array thereof. ' +\n `Received ${typeof pattern}`,\n );\n};\n\n/** Converts the `watch()` `ignore` option (pattern or array of patterns) into a filename predicate. */\nexport const watchIgnoreToMatcher = (\n ignore: TWatchIgnorePattern | TWatchIgnorePattern[],\n): ((filename: string) => boolean) => {\n if (Array.isArray(ignore)) {\n const matchers = ignore.map(watchIgnorePatternToMatcher);\n return filename => matchers.some(matcher => matcher(filename));\n }\n return watchIgnorePatternToMatcher(ignore);\n};\n"]} |
+2
-2
@@ -6,3 +6,3 @@ { | ||
| }, | ||
| "version": "4.66.0", | ||
| "version": "4.66.1", | ||
| "description": "Utility functions for Node.js fs module", | ||
@@ -87,5 +87,5 @@ "author": { | ||
| "dependencies": { | ||
| "@jsonjoy.com/fs-node-builtins": "4.66.0", | ||
| "@jsonjoy.com/fs-node-builtins": "4.66.1", | ||
| "glob-to-regex.js": "^1.0.1" | ||
| } | ||
| } |
114833
59.48%+ Added
- Removed