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AAAA;QAJA,KAAK,CAAE,CAAA,EAAEzJ,KAAK,EAAA,EAAIhE,KAAK,CAAA,EAAG0N,QAAQ,CAAC;QACnC,IAAI,CAAClC,IAAI,GAAG;QACZ,IAAI,CAACxH,IAAI,GAAGA;QACZ,IAAI,CAAChE,IAAI,GAAGA;SACZyN,2BAAAA,CAAAA,SAAAA,OAAME,iBAAiB,cAAvBF,+CAAAA,8BAAAA,QAA0B,IAAI,EAAE,IAAI,CAAClF,WAAW;IAClD;AACF;AAEA/G,CAAAA,GAAAA,2CAAAA,EAA2B,CAAA,EAAEG,CAAAA,GAAAA,gEAAAA,EAAYyE,OAAQ,CAAA,UAAA,CAAW,EAAE2K;;;AXxa9D,MAAM5Q,iCAAkDD,CAAAA,GAAAA,qBAAAA,EACtDD,CAAAA,GAAAA,uCAAAA,EAAOE,QACT;AAGO,eAAeC,0CACpBC,QAAoB,EACpBC,MAAgB,EAChBC,aAAyB,EACzBC,WAAqB;IAErB,MAAMD,cAAcE,MAAM,CAACD;IAC3B,IAAIE,QAAQ,MAAML,SAASM,OAAO,CAACL;IACnC,KAAK,IAAIM,QAAQF,MAAO;QACtB,IAAIG,aAAab,CAAAA,GAAAA,qCAAAA,EAAKc,IAAI,CAACR,QAAQM;QACnC,IAAIG,WAAWf,CAAAA,GAAAA,qCAAAA,EAAKc,IAAI,CAACN,aAAaI;QACtC,IAAII,QAAQ,MAAMX,SAASY,IAAI,CAACJ;QAChC,IAAIG,MAAME,MAAM,IACd,MAAMf,+BACJE,SAASc,gBAAgB,CAACN,aAC1BN,cAAca,iBAAiB,CAACL;aAE7B,IAAIC,MAAMK,WAAW,IAC1B,MAAMjB,0CAAIC,UAAUQ,YAAYN,eAAeQ;IAEnD;AACF","sources":["packages/core/fs/src/index.js","packages/core/fs/src/NodeFS.js","node_modules/graceful-fs/graceful-fs.js","node_modules/graceful-fs/polyfills.js","node_modules/graceful-fs/legacy-streams.js","node_modules/graceful-fs/clone.js","node_modules/ncp/lib/ncp.js","packages/core/fs/package.json","packages/core/fs/src/find.js","packages/core/fs/src/MemoryFS.js","node_modules/nullthrows/nullthrows.js","packages/core/fs/src/OverlayFS.js"],"sourcesContent":["// @flow strict-local\nimport type {FileSystem} from './types';\nimport type {FilePath} from '@parcel/types';\nimport type {Readable, Writable} from 'stream';\n\nimport path from 'path';\nimport stream from 'stream';\nimport {promisify} from 'util';\n\nexport type * from './types';\nexport * from './NodeFS';\nexport * from './MemoryFS';\nexport * from './OverlayFS';\n\nconst pipeline: (Readable, Writable) => Promise<void> = promisify(\n stream.pipeline,\n);\n\n// Recursively copies a directory from the sourceFS to the destinationFS\nexport async function ncp(\n sourceFS: FileSystem,\n source: FilePath,\n destinationFS: FileSystem,\n destination: FilePath,\n) {\n await destinationFS.mkdirp(destination);\n let files = await sourceFS.readdir(source);\n for (let file of files) {\n let sourcePath = path.join(source, file);\n let destPath = path.join(destination, file);\n let stats = await sourceFS.stat(sourcePath);\n if (stats.isFile()) {\n await pipeline(\n sourceFS.createReadStream(sourcePath),\n destinationFS.createWriteStream(destPath),\n );\n } else if (stats.isDirectory()) {\n await ncp(sourceFS, sourcePath, destinationFS, destPath);\n }\n }\n}\n","// @flow\nimport type {ReadStream, Stats} from 'fs';\nimport type {Writable} from 'stream';\nimport type {FileOptions, FileSystem, Encoding} from './types';\nimport type {FilePath} from '@parcel/types';\nimport type {\n Event,\n Options as WatcherOptions,\n AsyncSubscription,\n} from '@parcel/watcher';\n\nimport fs from 'graceful-fs';\nimport nativeFS from 'fs';\nimport ncp from 'ncp';\nimport {promisify} from 'util';\nimport {registerSerializableClass} from '@parcel/core';\nimport {hashFile} from '@parcel/utils';\nimport watcher from '@parcel/watcher';\nimport packageJSON from '../package.json';\n\nimport * as searchNative from '@parcel/rust';\nimport * as searchJS from './find';\n\n// Most of this can go away once we only support Node 10+, which includes\n// require('fs').promises\n\nconst realpath = promisify(\n process.platform === 'win32' ? fs.realpath : fs.realpath.native,\n);\nconst isPnP = process.versions.pnp != null;\n\nexport class NodeFS implements FileSystem {\n readFile: any = promisify(fs.readFile);\n copyFile: any = promisify(fs.copyFile);\n stat: any = promisify(fs.stat);\n readdir: any = promisify(fs.readdir);\n symlink: any = promisify(fs.symlink);\n unlink: any = promisify(fs.unlink);\n utimes: any = promisify(fs.utimes);\n ncp: any = promisify(ncp);\n createReadStream: (path: string, options?: any) => ReadStream =\n fs.createReadStream;\n cwd: () => string = () => process.cwd();\n chdir: (directory: string) => void = directory => process.chdir(directory);\n\n statSync: (path: string) => Stats = path => fs.statSync(path);\n realpathSync: (path: string, cache?: any) => string =\n process.platform === 'win32' ? fs.realpathSync : fs.realpathSync.native;\n existsSync: (path: string) => boolean = fs.existsSync;\n readdirSync: any = (fs.readdirSync: any);\n findAncestorFile: any = isPnP\n ? (...args) => searchJS.findAncestorFile(this, ...args)\n : searchNative.findAncestorFile;\n findNodeModule: any = isPnP\n ? (...args) => searchJS.findNodeModule(this, ...args)\n : searchNative.findNodeModule;\n findFirstFile: any = isPnP\n ? (...args) => searchJS.findFirstFile(this, ...args)\n : searchNative.findFirstFile;\n\n createWriteStream(filePath: string, options: any): Writable {\n // Make createWriteStream atomic\n let tmpFilePath = getTempFilePath(filePath);\n let failed = false;\n\n const move = async () => {\n if (!failed) {\n try {\n await fs.promises.rename(tmpFilePath, filePath);\n } catch (e) {\n // This is adapted from fs-write-stream-atomic. Apparently\n // Windows doesn't like renaming when the target already exists.\n if (\n process.platform === 'win32' &&\n e.syscall &&\n e.syscall === 'rename' &&\n e.code &&\n e.code === 'EPERM'\n ) {\n let [hashTmp, hashTarget] = await Promise.all([\n hashFile(this, tmpFilePath),\n hashFile(this, filePath),\n ]);\n\n await this.unlink(tmpFilePath);\n\n if (hashTmp != hashTarget) {\n throw e;\n }\n }\n }\n }\n };\n\n let writeStream = fs.createWriteStream(tmpFilePath, {\n ...options,\n fs: {\n ...fs,\n close: (fd, cb) => {\n fs.close(fd, err => {\n if (err) {\n cb(err);\n } else {\n move().then(\n () => cb(),\n err => cb(err),\n );\n }\n });\n },\n },\n });\n\n writeStream.once('error', () => {\n failed = true;\n fs.unlinkSync(tmpFilePath);\n });\n\n return writeStream;\n }\n\n async writeFile(\n filePath: FilePath,\n contents: Buffer | string,\n options: ?FileOptions,\n ): Promise<void> {\n let tmpFilePath = getTempFilePath(filePath);\n await fs.promises.writeFile(tmpFilePath, contents, options);\n await fs.promises.rename(tmpFilePath, filePath);\n }\n\n readFileSync(filePath: FilePath, encoding?: Encoding): any {\n if (encoding != null) {\n return fs.readFileSync(filePath, encoding);\n }\n return fs.readFileSync(filePath);\n }\n\n async realpath(originalPath: string): Promise<string> {\n try {\n return await realpath(originalPath, 'utf8');\n } catch (e) {\n // do nothing\n }\n\n return originalPath;\n }\n\n exists(filePath: FilePath): Promise<boolean> {\n return new Promise(resolve => {\n fs.exists(filePath, resolve);\n });\n }\n\n watch(\n dir: FilePath,\n fn: (err: ?Error, events: Array<Event>) => mixed,\n opts: WatcherOptions,\n ): Promise<AsyncSubscription> {\n return watcher.subscribe(dir, fn, opts);\n }\n\n getEventsSince(\n dir: FilePath,\n snapshot: FilePath,\n opts: WatcherOptions,\n ): Promise<Array<Event>> {\n return watcher.getEventsSince(dir, snapshot, opts);\n }\n\n async writeSnapshot(\n dir: FilePath,\n snapshot: FilePath,\n opts: WatcherOptions,\n ): Promise<void> {\n await watcher.writeSnapshot(dir, snapshot, opts);\n }\n\n static deserialize(): NodeFS {\n return new NodeFS();\n }\n\n serialize(): null {\n return null;\n }\n\n async mkdirp(filePath: FilePath): Promise<void> {\n await nativeFS.promises.mkdir(filePath, {recursive: true});\n }\n\n async rimraf(filePath: FilePath): Promise<void> {\n if (fs.promises.rm) {\n await fs.promises.rm(filePath, {recursive: true, force: true});\n return;\n }\n\n // fs.promises.rm is not supported in node 12...\n let stat;\n try {\n stat = await this.stat(filePath);\n } catch (err) {\n return;\n }\n\n if (stat.isDirectory()) {\n // $FlowFixMe\n await nativeFS.promises.rmdir(filePath, {recursive: true});\n } else {\n await nativeFS.promises.unlink(filePath);\n }\n }\n}\n\nregisterSerializableClass(`${packageJSON.version}:NodeFS`, NodeFS);\n\nlet writeStreamCalls = 0;\n\nlet threadId;\ntry {\n ({threadId} = require('worker_threads'));\n} catch {\n //\n}\n\n// Generate a temporary file path used for atomic writing of files.\nfunction getTempFilePath(filePath: FilePath) {\n writeStreamCalls = writeStreamCalls % Number.MAX_SAFE_INTEGER;\n return (\n filePath +\n '.' +\n process.pid +\n (threadId != null ? '.' + threadId : '') +\n '.' +\n (writeStreamCalls++).toString(36)\n );\n}\n","var fs = require('fs')\nvar polyfills = require('./polyfills.js')\nvar legacy = require('./legacy-streams.js')\nvar clone = require('./clone.js')\n\nvar util = require('util')\n\n/* istanbul ignore next - node 0.x polyfill */\nvar gracefulQueue\nvar previousSymbol\n\n/* istanbul ignore else - node 0.x polyfill */\nif (typeof Symbol === 'function' && typeof Symbol.for === 'function') {\n gracefulQueue = Symbol.for('graceful-fs.queue')\n // This is used in testing by future versions\n previousSymbol = Symbol.for('graceful-fs.previous')\n} else {\n gracefulQueue = '___graceful-fs.queue'\n previousSymbol = '___graceful-fs.previous'\n}\n\nfunction noop () {}\n\nfunction publishQueue(context, queue) {\n Object.defineProperty(context, gracefulQueue, {\n get: function() {\n return queue\n }\n })\n}\n\nvar debug = noop\nif (util.debuglog)\n debug = util.debuglog('gfs4')\nelse if (/\\bgfs4\\b/i.test(process.env.NODE_DEBUG || ''))\n debug = function() {\n var m = util.format.apply(util, arguments)\n m = 'GFS4: ' + m.split(/\\n/).join('\\nGFS4: ')\n console.error(m)\n }\n\n// Once time initialization\nif (!fs[gracefulQueue]) {\n // This queue can be shared by multiple loaded instances\n var queue = global[gracefulQueue] || []\n publishQueue(fs, queue)\n\n // Patch fs.close/closeSync to shared queue version, because we need\n // to retry() whenever a close happens *anywhere* in the program.\n // This is essential when multiple graceful-fs instances are\n // in play at the same time.\n fs.close = (function (fs$close) {\n function close (fd, cb) {\n return fs$close.call(fs, fd, function (err) {\n // This function uses the graceful-fs shared queue\n if (!err) {\n retry()\n }\n\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n })\n }\n\n Object.defineProperty(close, previousSymbol, {\n value: fs$close\n })\n return close\n })(fs.close)\n\n fs.closeSync = (function (fs$closeSync) {\n function closeSync (fd) {\n // This function uses the graceful-fs shared queue\n fs$closeSync.apply(fs, arguments)\n retry()\n }\n\n Object.defineProperty(closeSync, previousSymbol, {\n value: fs$closeSync\n })\n return closeSync\n })(fs.closeSync)\n\n if (/\\bgfs4\\b/i.test(process.env.NODE_DEBUG || '')) {\n process.on('exit', function() {\n debug(fs[gracefulQueue])\n require('assert').equal(fs[gracefulQueue].length, 0)\n })\n }\n}\n\nif (!global[gracefulQueue]) {\n publishQueue(global, fs[gracefulQueue]);\n}\n\nmodule.exports = patch(clone(fs))\nif (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {\n module.exports = patch(fs)\n fs.__patched = true;\n}\n\nfunction patch (fs) {\n // Everything that references the open() function needs to be in here\n polyfills(fs)\n fs.gracefulify = patch\n\n fs.createReadStream = createReadStream\n fs.createWriteStream = createWriteStream\n var fs$readFile = fs.readFile\n fs.readFile = readFile\n function readFile (path, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n return go$readFile(path, options, cb)\n\n function go$readFile (path, options, cb) {\n return fs$readFile(path, options, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$readFile, [path, options, cb]])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n retry()\n }\n })\n }\n }\n\n var fs$writeFile = fs.writeFile\n fs.writeFile = writeFile\n function writeFile (path, data, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n return go$writeFile(path, data, options, cb)\n\n function go$writeFile (path, data, options, cb) {\n return fs$writeFile(path, data, options, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$writeFile, [path, data, options, cb]])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n retry()\n }\n })\n }\n }\n\n var fs$appendFile = fs.appendFile\n if (fs$appendFile)\n fs.appendFile = appendFile\n function appendFile (path, data, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n return go$appendFile(path, data, options, cb)\n\n function go$appendFile (path, data, options, cb) {\n return fs$appendFile(path, data, options, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$appendFile, [path, data, options, cb]])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n retry()\n }\n })\n }\n }\n\n var fs$readdir = fs.readdir\n fs.readdir = readdir\n function readdir (path, options, cb) {\n var args = [path]\n if (typeof options !== 'function') {\n args.push(options)\n } else {\n cb = options\n }\n args.push(go$readdir$cb)\n\n return go$readdir(args)\n\n function go$readdir$cb (err, files) {\n if (files && files.sort)\n files.sort()\n\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$readdir, [args]])\n\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n retry()\n }\n }\n }\n\n function go$readdir (args) {\n return fs$readdir.apply(fs, args)\n }\n\n if (process.version.substr(0, 4) === 'v0.8') {\n var legStreams = legacy(fs)\n ReadStream = legStreams.ReadStream\n WriteStream = legStreams.WriteStream\n }\n\n var fs$ReadStream = fs.ReadStream\n if (fs$ReadStream) {\n ReadStream.prototype = Object.create(fs$ReadStream.prototype)\n ReadStream.prototype.open = ReadStream$open\n }\n\n var fs$WriteStream = fs.WriteStream\n if (fs$WriteStream) {\n WriteStream.prototype = Object.create(fs$WriteStream.prototype)\n WriteStream.prototype.open = WriteStream$open\n }\n\n Object.defineProperty(fs, 'ReadStream', {\n get: function () {\n return ReadStream\n },\n set: function (val) {\n ReadStream = val\n },\n enumerable: true,\n configurable: true\n })\n Object.defineProperty(fs, 'WriteStream', {\n get: function () {\n return WriteStream\n },\n set: function (val) {\n WriteStream = val\n },\n enumerable: true,\n configurable: true\n })\n\n // legacy names\n var FileReadStream = ReadStream\n Object.defineProperty(fs, 'FileReadStream', {\n get: function () {\n return FileReadStream\n },\n set: function (val) {\n FileReadStream = val\n },\n enumerable: true,\n configurable: true\n })\n var FileWriteStream = WriteStream\n Object.defineProperty(fs, 'FileWriteStream', {\n get: function () {\n return FileWriteStream\n },\n set: function (val) {\n FileWriteStream = val\n },\n enumerable: true,\n configurable: true\n })\n\n function ReadStream (path, options) {\n if (this instanceof ReadStream)\n return fs$ReadStream.apply(this, arguments), this\n else\n return ReadStream.apply(Object.create(ReadStream.prototype), arguments)\n }\n\n function ReadStream$open () {\n var that = this\n open(that.path, that.flags, that.mode, function (err, fd) {\n if (err) {\n if (that.autoClose)\n that.destroy()\n\n that.emit('error', err)\n } else {\n that.fd = fd\n that.emit('open', fd)\n that.read()\n }\n })\n }\n\n function WriteStream (path, options) {\n if (this instanceof WriteStream)\n return fs$WriteStream.apply(this, arguments), this\n else\n return WriteStream.apply(Object.create(WriteStream.prototype), arguments)\n }\n\n function WriteStream$open () {\n var that = this\n open(that.path, that.flags, that.mode, function (err, fd) {\n if (err) {\n that.destroy()\n that.emit('error', err)\n } else {\n that.fd = fd\n that.emit('open', fd)\n }\n })\n }\n\n function createReadStream (path, options) {\n return new fs.ReadStream(path, options)\n }\n\n function createWriteStream (path, options) {\n return new fs.WriteStream(path, options)\n }\n\n var fs$open = fs.open\n fs.open = open\n function open (path, flags, mode, cb) {\n if (typeof mode === 'function')\n cb = mode, mode = null\n\n return go$open(path, flags, mode, cb)\n\n function go$open (path, flags, mode, cb) {\n return fs$open(path, flags, mode, function (err, fd) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$open, [path, flags, mode, cb]])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n retry()\n }\n })\n }\n }\n\n return fs\n}\n\nfunction enqueue (elem) {\n debug('ENQUEUE', elem[0].name, elem[1])\n fs[gracefulQueue].push(elem)\n}\n\nfunction retry () {\n var elem = fs[gracefulQueue].shift()\n if (elem) {\n debug('RETRY', elem[0].name, elem[1])\n elem[0].apply(null, elem[1])\n }\n}\n","var constants = require('constants')\n\nvar origCwd = process.cwd\nvar cwd = null\n\nvar platform = process.env.GRACEFUL_FS_PLATFORM || process.platform\n\nprocess.cwd = function() {\n if (!cwd)\n cwd = origCwd.call(process)\n return cwd\n}\ntry {\n process.cwd()\n} catch (er) {}\n\nvar chdir = process.chdir\nprocess.chdir = function(d) {\n cwd = null\n chdir.call(process, d)\n}\n\nmodule.exports = patch\n\nfunction patch (fs) {\n // (re-)implement some things that are known busted or missing.\n\n // lchmod, broken prior to 0.6.2\n // back-port the fix here.\n if (constants.hasOwnProperty('O_SYMLINK') &&\n process.version.match(/^v0\\.6\\.[0-2]|^v0\\.5\\./)) {\n patchLchmod(fs)\n }\n\n // lutimes implementation, or no-op\n if (!fs.lutimes) {\n patchLutimes(fs)\n }\n\n // https://github.com/isaacs/node-graceful-fs/issues/4\n // Chown should not fail on einval or eperm if non-root.\n // It should not fail on enosys ever, as this just indicates\n // that a fs doesn't support the intended operation.\n\n fs.chown = chownFix(fs.chown)\n fs.fchown = chownFix(fs.fchown)\n fs.lchown = chownFix(fs.lchown)\n\n fs.chmod = chmodFix(fs.chmod)\n fs.fchmod = chmodFix(fs.fchmod)\n fs.lchmod = chmodFix(fs.lchmod)\n\n fs.chownSync = chownFixSync(fs.chownSync)\n fs.fchownSync = chownFixSync(fs.fchownSync)\n fs.lchownSync = chownFixSync(fs.lchownSync)\n\n fs.chmodSync = chmodFixSync(fs.chmodSync)\n fs.fchmodSync = chmodFixSync(fs.fchmodSync)\n fs.lchmodSync = chmodFixSync(fs.lchmodSync)\n\n fs.stat = statFix(fs.stat)\n fs.fstat = statFix(fs.fstat)\n fs.lstat = statFix(fs.lstat)\n\n fs.statSync = statFixSync(fs.statSync)\n fs.fstatSync = statFixSync(fs.fstatSync)\n fs.lstatSync = statFixSync(fs.lstatSync)\n\n // if lchmod/lchown do not exist, then make them no-ops\n if (!fs.lchmod) {\n fs.lchmod = function (path, mode, cb) {\n if (cb) process.nextTick(cb)\n }\n fs.lchmodSync = function () {}\n }\n if (!fs.lchown) {\n fs.lchown = function (path, uid, gid, cb) {\n if (cb) process.nextTick(cb)\n }\n fs.lchownSync = function () {}\n }\n\n // on Windows, A/V software can lock the directory, causing this\n // to fail with an EACCES or EPERM if the directory contains newly\n // created files. Try again on failure, for up to 60 seconds.\n\n // Set the timeout this long because some Windows Anti-Virus, such as Parity\n // bit9, may lock files for up to a minute, causing npm package install\n // failures. Also, take care to yield the scheduler. Windows scheduling gives\n // CPU to a busy looping process, which can cause the program causing the lock\n // contention to be starved of CPU by node, so the contention doesn't resolve.\n if (platform === \"win32\") {\n fs.rename = (function (fs$rename) { return function (from, to, cb) {\n var start = Date.now()\n var backoff = 0;\n fs$rename(from, to, function CB (er) {\n if (er\n && (er.code === \"EACCES\" || er.code === \"EPERM\")\n && Date.now() - start < 60000) {\n setTimeout(function() {\n fs.stat(to, function (stater, st) {\n if (stater && stater.code === \"ENOENT\")\n fs$rename(from, to, CB);\n else\n cb(er)\n })\n }, backoff)\n if (backoff < 100)\n backoff += 10;\n return;\n }\n if (cb) cb(er)\n })\n }})(fs.rename)\n }\n\n // if read() returns EAGAIN, then just try it again.\n fs.read = (function (fs$read) {\n function read (fd, buffer, offset, length, position, callback_) {\n var callback\n if (callback_ && typeof callback_ === 'function') {\n var eagCounter = 0\n callback = function (er, _, __) {\n if (er && er.code === 'EAGAIN' && eagCounter < 10) {\n eagCounter ++\n return fs$read.call(fs, fd, buffer, offset, length, position, callback)\n }\n callback_.apply(this, arguments)\n }\n }\n return fs$read.call(fs, fd, buffer, offset, length, position, callback)\n }\n\n // This ensures `util.promisify` works as it does for native `fs.read`.\n read.__proto__ = fs$read\n return read\n })(fs.read)\n\n fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) {\n var eagCounter = 0\n while (true) {\n try {\n return fs$readSync.call(fs, fd, buffer, offset, length, position)\n } catch (er) {\n if (er.code === 'EAGAIN' && eagCounter < 10) {\n eagCounter ++\n continue\n }\n throw er\n }\n }\n }})(fs.readSync)\n\n function patchLchmod (fs) {\n fs.lchmod = function (path, mode, callback) {\n fs.open( path\n , constants.O_WRONLY | constants.O_SYMLINK\n , mode\n , function (err, fd) {\n if (err) {\n if (callback) callback(err)\n return\n }\n // prefer to return the chmod error, if one occurs,\n // but still try to close, and report closing errors if they occur.\n fs.fchmod(fd, mode, function (err) {\n fs.close(fd, function(err2) {\n if (callback) callback(err || err2)\n })\n })\n })\n }\n\n fs.lchmodSync = function (path, mode) {\n var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)\n\n // prefer to return the chmod error, if one occurs,\n // but still try to close, and report closing errors if they occur.\n var threw = true\n var ret\n try {\n ret = fs.fchmodSync(fd, mode)\n threw = false\n } finally {\n if (threw) {\n try {\n fs.closeSync(fd)\n } catch (er) {}\n } else {\n fs.closeSync(fd)\n }\n }\n return ret\n }\n }\n\n function patchLutimes (fs) {\n if (constants.hasOwnProperty(\"O_SYMLINK\")) {\n fs.lutimes = function (path, at, mt, cb) {\n fs.open(path, constants.O_SYMLINK, function (er, fd) {\n if (er) {\n if (cb) cb(er)\n return\n }\n fs.futimes(fd, at, mt, function (er) {\n fs.close(fd, function (er2) {\n if (cb) cb(er || er2)\n })\n })\n })\n }\n\n fs.lutimesSync = function (path, at, mt) {\n var fd = fs.openSync(path, constants.O_SYMLINK)\n var ret\n var threw = true\n try {\n ret = fs.futimesSync(fd, at, mt)\n threw = false\n } finally {\n if (threw) {\n try {\n fs.closeSync(fd)\n } catch (er) {}\n } else {\n fs.closeSync(fd)\n }\n }\n return ret\n }\n\n } else {\n fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) }\n fs.lutimesSync = function () {}\n }\n }\n\n function chmodFix (orig) {\n if (!orig) return orig\n return function (target, mode, cb) {\n return orig.call(fs, target, mode, function (er) {\n if (chownErOk(er)) er = null\n if (cb) cb.apply(this, arguments)\n })\n }\n }\n\n function chmodFixSync (orig) {\n if (!orig) return orig\n return function (target, mode) {\n try {\n return orig.call(fs, target, mode)\n } catch (er) {\n if (!chownErOk(er)) throw er\n }\n }\n }\n\n\n function chownFix (orig) {\n if (!orig) return orig\n return function (target, uid, gid, cb) {\n return orig.call(fs, target, uid, gid, function (er) {\n if (chownErOk(er)) er = null\n if (cb) cb.apply(this, arguments)\n })\n }\n }\n\n function chownFixSync (orig) {\n if (!orig) return orig\n return function (target, uid, gid) {\n try {\n return orig.call(fs, target, uid, gid)\n } catch (er) {\n if (!chownErOk(er)) throw er\n }\n }\n }\n\n function statFix (orig) {\n if (!orig) return orig\n // Older versions of Node erroneously returned signed integers for\n // uid + gid.\n return function (target, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = null\n }\n function callback (er, stats) {\n if (stats) {\n if (stats.uid < 0) stats.uid += 0x100000000\n if (stats.gid < 0) stats.gid += 0x100000000\n }\n if (cb) cb.apply(this, arguments)\n }\n return options ? orig.call(fs, target, options, callback)\n : orig.call(fs, target, callback)\n }\n }\n\n function statFixSync (orig) {\n if (!orig) return orig\n // Older versions of Node erroneously returned signed integers for\n // uid + gid.\n return function (target, options) {\n var stats = options ? orig.call(fs, target, options)\n : orig.call(fs, target)\n if (stats.uid < 0) stats.uid += 0x100000000\n if (stats.gid < 0) stats.gid += 0x100000000\n return stats;\n }\n }\n\n // ENOSYS means that the fs doesn't support the op. Just ignore\n // that, because it doesn't matter.\n //\n // if there's no getuid, or if getuid() is something other\n // than 0, and the error is EINVAL or EPERM, then just ignore\n // it.\n //\n // This specific case is a silent failure in cp, install, tar,\n // and most other unix tools that manage permissions.\n //\n // When running as root, or if other types of errors are\n // encountered, then it's strict.\n function chownErOk (er) {\n if (!er)\n return true\n\n if (er.code === \"ENOSYS\")\n return true\n\n var nonroot = !process.getuid || process.getuid() !== 0\n if (nonroot) {\n if (er.code === \"EINVAL\" || er.code === \"EPERM\")\n return true\n }\n\n return false\n }\n}\n","var Stream = require('stream').Stream\n\nmodule.exports = legacy\n\nfunction legacy (fs) {\n return {\n ReadStream: ReadStream,\n WriteStream: WriteStream\n }\n\n function ReadStream (path, options) {\n if (!(this instanceof ReadStream)) return new ReadStream(path, options);\n\n Stream.call(this);\n\n var self = this;\n\n this.path = path;\n this.fd = null;\n this.readable = true;\n this.paused = false;\n\n this.flags = 'r';\n this.mode = 438; /*=0666*/\n this.bufferSize = 64 * 1024;\n\n options = options || {};\n\n // Mixin options into this\n var keys = Object.keys(options);\n for (var index = 0, length = keys.length; index < length; index++) {\n var key = keys[index];\n this[key] = options[key];\n }\n\n if (this.encoding) this.setEncoding(this.encoding);\n\n if (this.start !== undefined) {\n if ('number' !== typeof this.start) {\n throw TypeError('start must be a Number');\n }\n if (this.end === undefined) {\n this.end = Infinity;\n } else if ('number' !== typeof this.end) {\n throw TypeError('end must be a Number');\n }\n\n if (this.start > this.end) {\n throw new Error('start must be <= end');\n }\n\n this.pos = this.start;\n }\n\n if (this.fd !== null) {\n process.nextTick(function() {\n self._read();\n });\n return;\n }\n\n fs.open(this.path, this.flags, this.mode, function (err, fd) {\n if (err) {\n self.emit('error', err);\n self.readable = false;\n return;\n }\n\n self.fd = fd;\n self.emit('open', fd);\n self._read();\n })\n }\n\n function WriteStream (path, options) {\n if (!(this instanceof WriteStream)) return new WriteStream(path, options);\n\n Stream.call(this);\n\n this.path = path;\n this.fd = null;\n this.writable = true;\n\n this.flags = 'w';\n this.encoding = 'binary';\n this.mode = 438; /*=0666*/\n this.bytesWritten = 0;\n\n options = options || {};\n\n // Mixin options into this\n var keys = Object.keys(options);\n for (var index = 0, length = keys.length; index < length; index++) {\n var key = keys[index];\n this[key] = options[key];\n }\n\n if (this.start !== undefined) {\n if ('number' !== typeof this.start) {\n throw TypeError('start must be a Number');\n }\n if (this.start < 0) {\n throw new Error('start must be >= zero');\n }\n\n this.pos = this.start;\n }\n\n this.busy = false;\n this._queue = [];\n\n if (this.fd === null) {\n this._open = fs.open;\n this._queue.push([this._open, this.path, this.flags, this.mode, undefined]);\n this.flush();\n }\n }\n}\n","'use strict'\n\nmodule.exports = clone\n\nfunction clone (obj) {\n if (obj === null || typeof obj !== 'object')\n return obj\n\n if (obj instanceof Object)\n var copy = { __proto__: obj.__proto__ }\n else\n var copy = Object.create(null)\n\n Object.getOwnPropertyNames(obj).forEach(function (key) {\n Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key))\n })\n\n return copy\n}\n","var fs = require('fs'),\n path = require('path');\n\nmodule.exports = ncp;\nncp.ncp = ncp;\n\nfunction ncp (source, dest, options, callback) {\n var cback = callback;\n\n if (!callback) {\n cback = options;\n options = {};\n }\n\n var basePath = process.cwd(),\n currentPath = path.resolve(basePath, source),\n targetPath = path.resolve(basePath, dest),\n filter = options.filter,\n rename = options.rename,\n transform = options.transform,\n clobber = options.clobber !== false,\n modified = options.modified,\n dereference = options.dereference,\n errs = null,\n started = 0,\n finished = 0,\n running = 0,\n limit = options.limit || ncp.limit || 16;\n\n limit = (limit < 1) ? 1 : (limit > 512) ? 512 : limit;\n\n startCopy(currentPath);\n \n function startCopy(source) {\n started++;\n if (filter) {\n if (filter instanceof RegExp) {\n if (!filter.test(source)) {\n return cb(true);\n }\n }\n else if (typeof filter === 'function') {\n if (!filter(source)) {\n return cb(true);\n }\n }\n }\n return getStats(source);\n }\n\n function getStats(source) {\n var stat = dereference ? fs.stat : fs.lstat;\n if (running >= limit) {\n return setImmediate(function () {\n getStats(source);\n });\n }\n running++;\n stat(source, function (err, stats) {\n var item = {};\n if (err) {\n return onError(err);\n }\n\n // We need to get the mode from the stats object and preserve it.\n item.name = source;\n item.mode = stats.mode;\n item.mtime = stats.mtime; //modified time\n item.atime = stats.atime; //access time\n\n if (stats.isDirectory()) {\n return onDir(item);\n }\n else if (stats.isFile()) {\n return onFile(item);\n }\n else if (stats.isSymbolicLink()) {\n // Symlinks don't really need to know about the mode.\n return onLink(source);\n }\n });\n }\n\n function onFile(file) {\n var target = file.name.replace(currentPath, targetPath);\n if(rename) {\n target = rename(target);\n }\n isWritable(target, function (writable) {\n if (writable) {\n return copyFile(file, target);\n }\n if(clobber) {\n rmFile(target, function () {\n copyFile(file, target);\n });\n }\n if (modified) {\n var stat = dereference ? fs.stat : fs.lstat;\n stat(target, function(err, stats) {\n //if souce modified time greater to target modified time copy file\n if (file.mtime.getTime()>stats.mtime.getTime())\n copyFile(file, target);\n else return cb();\n });\n }\n else {\n return cb();\n }\n });\n }\n\n function copyFile(file, target) {\n var readStream = fs.createReadStream(file.name),\n writeStream = fs.createWriteStream(target, { mode: file.mode });\n \n readStream.on('error', onError);\n writeStream.on('error', onError);\n \n if(transform) {\n transform(readStream, writeStream, file);\n } else {\n writeStream.on('open', function() {\n readStream.pipe(writeStream);\n });\n }\n writeStream.once('finish', function() {\n if (modified) {\n //target file modified date sync.\n fs.utimesSync(target, file.atime, file.mtime);\n cb();\n }\n else cb();\n });\n }\n\n function rmFile(file, done) {\n fs.unlink(file, function (err) {\n if (err) {\n return onError(err);\n }\n return done();\n });\n }\n\n function onDir(dir) {\n var target = dir.name.replace(currentPath, targetPath);\n isWritable(target, function (writable) {\n if (writable) {\n return mkDir(dir, target);\n }\n copyDir(dir.name);\n });\n }\n\n function mkDir(dir, target) {\n fs.mkdir(target, dir.mode, function (err) {\n if (err) {\n return onError(err);\n }\n copyDir(dir.name);\n });\n }\n\n function copyDir(dir) {\n fs.readdir(dir, function (err, items) {\n if (err) {\n return onError(err);\n }\n items.forEach(function (item) {\n startCopy(path.join(dir, item));\n });\n return cb();\n });\n }\n\n function onLink(link) {\n var target = link.replace(currentPath, targetPath);\n fs.readlink(link, function (err, resolvedPath) {\n if (err) {\n return onError(err);\n }\n checkLink(resolvedPath, target);\n });\n }\n\n function checkLink(resolvedPath, target) {\n if (dereference) {\n resolvedPath = path.resolve(basePath, resolvedPath);\n }\n isWritable(target, function (writable) {\n if (writable) {\n return makeLink(resolvedPath, target);\n }\n fs.readlink(target, function (err, targetDest) {\n if (err) {\n return onError(err);\n }\n if (dereference) {\n targetDest = path.resolve(basePath, targetDest);\n }\n if (targetDest === resolvedPath) {\n return cb();\n }\n return rmFile(target, function () {\n makeLink(resolvedPath, target);\n });\n });\n });\n }\n\n function makeLink(linkPath, target) {\n fs.symlink(linkPath, target, function (err) {\n if (err) {\n return onError(err);\n }\n return cb();\n });\n }\n\n function isWritable(path, done) {\n fs.lstat(path, function (err) {\n if (err) {\n if (err.code === 'ENOENT') return done(true);\n return done(false);\n }\n return done(false);\n });\n }\n\n function onError(err) {\n if (options.stopOnError) {\n return cback(err);\n }\n else if (!errs && options.errs) {\n errs = fs.createWriteStream(options.errs);\n }\n else if (!errs) {\n errs = [];\n }\n if (typeof errs.write === 'undefined') {\n errs.push(err);\n }\n else { \n errs.write(err.stack + '\\n\\n');\n }\n return cb();\n }\n\n function cb(skipped) {\n if (!skipped) running--;\n finished++;\n if ((started === finished) && (running === 0)) {\n if (cback !== undefined ) {\n return errs ? cback(errs) : cback(null);\n }\n }\n }\n}\n\n\n","{\n \"name\": \"@parcel/fs\",\n \"version\": \"2.12.0\",\n \"description\": \"Blazing fast, zero configuration web application bundler\",\n \"license\": \"MIT\",\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"funding\": {\n \"type\": \"opencollective\",\n \"url\": \"https://opencollective.com/parcel\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/parcel-bundler/parcel.git\"\n },\n \"main\": \"lib/index.js\",\n \"source\": \"src/index.js\",\n \"types\": \"index.d.ts\",\n \"engines\": {\n \"node\": \">= 12.0.0\"\n },\n \"targets\": {\n \"types\": false,\n \"main\": {\n \"includeNodeModules\": {\n \"@parcel/core\": false,\n \"@parcel/rust\": false,\n \"@parcel/types\": false,\n \"@parcel/utils\": false,\n \"@parcel/watcher\": false,\n \"@parcel/workers\": false\n }\n },\n \"browser\": {\n \"includeNodeModules\": {\n \"@parcel/core\": false,\n \"@parcel/rust\": false,\n \"@parcel/types\": false,\n \"@parcel/utils\": false,\n \"@parcel/watcher\": false,\n \"@parcel/workers\": false\n }\n }\n },\n \"scripts\": {\n \"build-ts\": \"mkdir -p lib && flow-to-ts src/types.js > lib/types.d.ts\",\n \"check-ts\": \"tsc --noEmit index.d.ts\"\n },\n \"dependencies\": {\n \"@parcel/rust\": \"2.12.0\",\n \"@parcel/types\": \"2.12.0\",\n \"@parcel/utils\": \"2.12.0\",\n \"@parcel/watcher\": \"^2.0.7\",\n \"@parcel/workers\": \"2.12.0\"\n },\n \"devDependencies\": {\n \"graceful-fs\": \"^4.2.4\",\n \"ncp\": \"^2.0.0\",\n \"nullthrows\": \"^1.1.1\",\n \"utility-types\": \"^3.10.0\"\n },\n \"peerDependencies\": {\n \"@parcel/core\": \"^2.12.0\"\n },\n \"browser\": {\n \"@parcel/fs\": \"./lib/browser.js\",\n \"./src/NodeFS.js\": \"./src/NodeFS.browser.js\"\n },\n \"gitHead\": \"2059029ee91e5f03a273b0954d3e629d7375f986\"\n}\n","// @flow\nimport type {FilePath} from '@parcel/types';\nimport type {FileSystem} from './types';\nimport path from 'path';\n\nexport function findNodeModule(\n fs: FileSystem,\n moduleName: string,\n dir: FilePath,\n): ?FilePath {\n let {root} = path.parse(dir);\n while (dir !== root) {\n // Skip node_modules directories\n if (path.basename(dir) === 'node_modules') {\n dir = path.dirname(dir);\n }\n\n try {\n let moduleDir = path.join(dir, 'node_modules', moduleName);\n let stats = fs.statSync(moduleDir);\n if (stats.isDirectory()) {\n return moduleDir;\n }\n } catch (err) {\n // ignore\n }\n\n // Move up a directory\n dir = path.dirname(dir);\n }\n\n return null;\n}\n\nexport function findAncestorFile(\n fs: FileSystem,\n fileNames: Array<string>,\n dir: FilePath,\n root: FilePath,\n): ?FilePath {\n let {root: pathRoot} = path.parse(dir);\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (path.basename(dir) === 'node_modules') {\n return null;\n }\n\n for (const fileName of fileNames) {\n let filePath = path.join(dir, fileName);\n try {\n if (fs.statSync(filePath).isFile()) {\n return filePath;\n }\n } catch (err) {\n // ignore\n }\n }\n\n if (dir === root || dir === pathRoot) {\n break;\n }\n\n dir = path.dirname(dir);\n }\n\n return null;\n}\n\nexport function findFirstFile(\n fs: FileSystem,\n filePaths: Array<FilePath>,\n): ?FilePath {\n for (let filePath of filePaths) {\n try {\n if (fs.statSync(filePath).isFile()) {\n return filePath;\n }\n } catch (err) {\n // ignore\n }\n }\n}\n","// @flow\n\nimport type {FileSystem, FileOptions, ReaddirOptions, Encoding} from './types';\nimport type {FilePath} from '@parcel/types';\nimport type {\n Event,\n Options as WatcherOptions,\n AsyncSubscription,\n} from '@parcel/watcher';\n\nimport path from 'path';\nimport {Readable, Writable} from 'stream';\nimport {registerSerializableClass} from '@parcel/core';\nimport {SharedBuffer} from '@parcel/utils';\nimport packageJSON from '../package.json';\nimport WorkerFarm, {Handle} from '@parcel/workers';\nimport nullthrows from 'nullthrows';\nimport EventEmitter from 'events';\nimport {findAncestorFile, findNodeModule, findFirstFile} from './find';\n\nconst instances: Map<number, MemoryFS> = new Map();\nlet id = 0;\n\ntype HandleFunction = (...args: Array<any>) => any;\ntype SerializedMemoryFS = {\n id: number,\n handle: any,\n dirs: Map<FilePath, Directory>,\n files: Map<FilePath, File>,\n symlinks: Map<FilePath, FilePath>,\n ...\n};\n\ntype WorkerEvent = {|\n type: 'writeFile' | 'unlink' | 'mkdir' | 'symlink',\n path: FilePath,\n entry?: Entry,\n target?: FilePath,\n|};\n\ntype ResolveFunction = () => mixed;\n\nexport class MemoryFS implements FileSystem {\n dirs: Map<FilePath, Directory>;\n files: Map<FilePath, File>;\n symlinks: Map<FilePath, FilePath>;\n watchers: Map<FilePath, Set<Watcher>>;\n events: Array<Event>;\n id: number;\n handle: Handle;\n farm: WorkerFarm;\n _cwd: FilePath;\n _eventQueue: Array<Event>;\n _watcherTimer: TimeoutID;\n _numWorkerInstances: number = 0;\n _workerHandles: Array<Handle>;\n _workerRegisterResolves: Array<ResolveFunction> = [];\n _emitter: EventEmitter = new EventEmitter();\n\n constructor(workerFarm: WorkerFarm) {\n this.farm = workerFarm;\n this._cwd = path.resolve(path.sep);\n this.dirs = new Map([[this._cwd, new Directory()]]);\n this.files = new Map();\n this.symlinks = new Map();\n this.watchers = new Map();\n this.events = [];\n this.id = id++;\n this._workerHandles = [];\n this._eventQueue = [];\n instances.set(this.id, this);\n this._emitter.on('allWorkersRegistered', () => {\n for (let resolve of this._workerRegisterResolves) {\n resolve();\n }\n this._workerRegisterResolves = [];\n });\n }\n\n static deserialize(opts: SerializedMemoryFS): MemoryFS | WorkerFS {\n let existing = instances.get(opts.id);\n if (existing != null) {\n // Correct the count of worker instances since serialization assumes a new instance is created\n WorkerFarm.getWorkerApi().runHandle(opts.handle, [\n 'decrementWorkerInstance',\n [],\n ]);\n return existing;\n }\n\n let fs = new WorkerFS(opts.id, nullthrows(opts.handle));\n fs.dirs = opts.dirs;\n fs.files = opts.files;\n fs.symlinks = opts.symlinks;\n return fs;\n }\n\n serialize(): SerializedMemoryFS {\n if (!this.handle) {\n this.handle = this.farm.createReverseHandle(\n (fn: string, args: Array<mixed>) => {\n // $FlowFixMe\n return this[fn](...args);\n },\n );\n }\n\n // If a worker instance already exists, it will decrement this number\n this._numWorkerInstances++;\n\n return {\n $$raw: false,\n id: this.id,\n handle: this.handle,\n dirs: this.dirs,\n files: this.files,\n symlinks: this.symlinks,\n };\n }\n\n decrementWorkerInstance() {\n this._numWorkerInstances--;\n if (this._numWorkerInstances === this._workerHandles.length) {\n this._emitter.emit('allWorkersRegistered');\n }\n }\n\n cwd(): FilePath {\n return this._cwd;\n }\n\n chdir(dir: FilePath) {\n this._cwd = dir;\n }\n\n _normalizePath(filePath: FilePath, realpath: boolean = true): FilePath {\n filePath = path.normalize(filePath);\n if (!filePath.startsWith(this.cwd())) {\n filePath = path.resolve(this.cwd(), filePath);\n }\n\n // get realpath by following symlinks\n if (realpath) {\n let {root, dir, base} = path.parse(filePath);\n let parts = dir.slice(root.length).split(path.sep).concat(base);\n let res = root;\n for (let part of parts) {\n res = path.join(res, part);\n let symlink = this.symlinks.get(res);\n if (symlink) {\n res = symlink;\n }\n }\n\n return res;\n }\n\n return filePath;\n }\n\n async writeFile(\n filePath: FilePath,\n contents: Buffer | string,\n options?: ?FileOptions,\n ) {\n filePath = this._normalizePath(filePath);\n if (this.dirs.has(filePath)) {\n throw new FSError('EISDIR', filePath, 'is a directory');\n }\n\n let dir = path.dirname(filePath);\n if (!this.dirs.has(dir)) {\n throw new FSError('ENOENT', dir, 'does not exist');\n }\n\n let buffer = makeShared(contents);\n let file = this.files.get(filePath);\n let mode = (options && options.mode) || 0o666;\n if (file) {\n file.write(buffer, mode);\n this.files.set(filePath, file);\n } else {\n this.files.set(filePath, new File(buffer, mode));\n }\n\n await this._sendWorkerEvent({\n type: 'writeFile',\n path: filePath,\n entry: this.files.get(filePath),\n });\n\n this._triggerEvent({\n type: file ? 'update' : 'create',\n path: filePath,\n });\n }\n\n // eslint-disable-next-line require-await\n async readFile(filePath: FilePath, encoding?: Encoding): Promise<any> {\n return this.readFileSync(filePath, encoding);\n }\n\n readFileSync(filePath: FilePath, encoding?: Encoding): any {\n filePath = this._normalizePath(filePath);\n let file = this.files.get(filePath);\n if (file == null) {\n throw new FSError('ENOENT', filePath, 'does not exist');\n }\n\n let buffer = file.read();\n if (encoding) {\n return buffer.toString(encoding);\n }\n\n return buffer;\n }\n\n async copyFile(source: FilePath, destination: FilePath) {\n let contents = await this.readFile(source);\n await this.writeFile(destination, contents);\n }\n\n statSync(filePath: FilePath): Stat {\n filePath = this._normalizePath(filePath);\n\n let dir = this.dirs.get(filePath);\n if (dir) {\n return dir.stat();\n }\n\n let file = this.files.get(filePath);\n if (file == null) {\n throw new FSError('ENOENT', filePath, 'does not exist');\n }\n\n return file.stat();\n }\n\n // eslint-disable-next-line require-await\n async stat(filePath: FilePath): Promise<Stat> {\n return this.statSync(filePath);\n }\n\n readdirSync(dir: FilePath, opts?: ReaddirOptions): any {\n dir = this._normalizePath(dir);\n if (!this.dirs.has(dir)) {\n throw new FSError('ENOENT', dir, 'does not exist');\n }\n\n if (!dir.endsWith(path.sep)) {\n dir += path.sep;\n }\n\n let res = [];\n for (let [filePath, entry] of this.dirs) {\n if (filePath === dir) {\n continue;\n }\n if (\n filePath.startsWith(dir) &&\n filePath.indexOf(path.sep, dir.length) === -1\n ) {\n let name = filePath.slice(dir.length);\n if (opts?.withFileTypes) {\n res.push(new Dirent(name, entry));\n } else {\n res.push(name);\n }\n }\n }\n\n for (let [filePath, entry] of this.files) {\n if (\n filePath.startsWith(dir) &&\n filePath.indexOf(path.sep, dir.length) === -1\n ) {\n let name = filePath.slice(dir.length);\n if (opts?.withFileTypes) {\n res.push(new Dirent(name, entry));\n } else {\n res.push(name);\n }\n }\n }\n\n for (let [from] of this.symlinks) {\n if (from.startsWith(dir) && from.indexOf(path.sep, dir.length) === -1) {\n let name = from.slice(dir.length);\n if (opts?.withFileTypes) {\n res.push(new Dirent(name, {mode: S_IFLNK}));\n } else {\n res.push(name);\n }\n }\n }\n\n return res;\n }\n\n // eslint-disable-next-line require-await\n async readdir(dir: FilePath, opts?: ReaddirOptions): Promise<any> {\n return this.readdirSync(dir, opts);\n }\n\n async unlink(filePath: FilePath): Promise<void> {\n filePath = this._normalizePath(filePath);\n if (!this.files.has(filePath) && !this.dirs.has(filePath)) {\n throw new FSError('ENOENT', filePath, 'does not exist');\n }\n\n this.files.delete(filePath);\n this.dirs.delete(filePath);\n this.watchers.delete(filePath);\n\n await this._sendWorkerEvent({\n type: 'unlink',\n path: filePath,\n });\n\n this._triggerEvent({\n type: 'delete',\n path: filePath,\n });\n\n return Promise.resolve();\n }\n\n async mkdirp(dir: FilePath): Promise<void> {\n dir = this._normalizePath(dir);\n if (this.dirs.has(dir)) {\n return Promise.resolve();\n }\n\n if (this.files.has(dir)) {\n throw new FSError('ENOENT', dir, 'is not a directory');\n }\n\n let root = path.parse(dir).root;\n while (dir !== root) {\n if (this.dirs.has(dir)) {\n break;\n }\n\n this.dirs.set(dir, new Directory());\n await this._sendWorkerEvent({\n type: 'mkdir',\n path: dir,\n });\n\n this._triggerEvent({\n type: 'create',\n path: dir,\n });\n\n dir = path.dirname(dir);\n }\n\n return Promise.resolve();\n }\n\n async rimraf(filePath: FilePath): Promise<void> {\n filePath = this._normalizePath(filePath);\n\n if (this.dirs.has(filePath)) {\n let dir = filePath + path.sep;\n for (let filePath of this.files.keys()) {\n if (filePath.startsWith(dir)) {\n this.files.delete(filePath);\n await this._sendWorkerEvent({\n type: 'unlink',\n path: filePath,\n });\n\n this._triggerEvent({\n type: 'delete',\n path: filePath,\n });\n }\n }\n\n for (let dirPath of this.dirs.keys()) {\n if (dirPath.startsWith(dir)) {\n this.dirs.delete(dirPath);\n this.watchers.delete(dirPath);\n await this._sendWorkerEvent({\n type: 'unlink',\n path: filePath,\n });\n\n this._triggerEvent({\n type: 'delete',\n path: dirPath,\n });\n }\n }\n\n for (let filePath of this.symlinks.keys()) {\n if (filePath.startsWith(dir)) {\n this.symlinks.delete(filePath);\n await this._sendWorkerEvent({\n type: 'unlink',\n path: filePath,\n });\n }\n }\n\n this.dirs.delete(filePath);\n await this._sendWorkerEvent({\n type: 'unlink',\n path: filePath,\n });\n\n this._triggerEvent({\n type: 'delete',\n path: filePath,\n });\n } else if (this.files.has(filePath)) {\n this.files.delete(filePath);\n await this._sendWorkerEvent({\n type: 'unlink',\n path: filePath,\n });\n\n this._triggerEvent({\n type: 'delete',\n path: filePath,\n });\n }\n\n return Promise.resolve();\n }\n\n async ncp(source: FilePath, destination: FilePath) {\n source = this._normalizePath(source);\n\n if (this.dirs.has(source)) {\n if (!this.dirs.has(destination)) {\n this.dirs.set(destination, new Directory());\n await this._sendWorkerEvent({\n type: 'mkdir',\n path: destination,\n });\n\n this._triggerEvent({\n type: 'create',\n path: destination,\n });\n }\n\n let dir = source + path.sep;\n for (let dirPath of this.dirs.keys()) {\n if (dirPath.startsWith(dir)) {\n let destName = path.join(destination, dirPath.slice(dir.length));\n if (!this.dirs.has(destName)) {\n this.dirs.set(destName, new Directory());\n await this._sendWorkerEvent({\n type: 'mkdir',\n path: destination,\n });\n this._triggerEvent({\n type: 'create',\n path: destName,\n });\n }\n }\n }\n\n for (let [filePath, file] of this.files) {\n if (filePath.startsWith(dir)) {\n let destName = path.join(destination, filePath.slice(dir.length));\n let exists = this.files.has(destName);\n this.files.set(destName, file);\n await this._sendWorkerEvent({\n type: 'writeFile',\n path: destName,\n entry: file,\n });\n\n this._triggerEvent({\n type: exists ? 'update' : 'create',\n path: destName,\n });\n }\n }\n } else {\n await this.copyFile(source, destination);\n }\n }\n\n createReadStream(filePath: FilePath): ReadStream {\n return new ReadStream(this, filePath);\n }\n\n createWriteStream(filePath: FilePath, options: ?FileOptions): WriteStream {\n return new WriteStream(this, filePath, options);\n }\n\n realpathSync(filePath: FilePath): FilePath {\n return this._normalizePath(filePath);\n }\n\n // eslint-disable-next-line require-await\n async realpath(filePath: FilePath): Promise<FilePath> {\n return this.realpathSync(filePath);\n }\n\n async symlink(target: FilePath, path: FilePath) {\n target = this._normalizePath(target);\n path = this._normalizePath(path);\n this.symlinks.set(path, target);\n await this._sendWorkerEvent({\n type: 'symlink',\n path,\n target,\n });\n }\n\n existsSync(filePath: FilePath): boolean {\n filePath = this._normalizePath(filePath);\n return this.files.has(filePath) || this.dirs.has(filePath);\n }\n\n // eslint-disable-next-line require-await\n async exists(filePath: FilePath): Promise<boolean> {\n return this.existsSync(filePath);\n }\n\n _triggerEvent(event: Event) {\n this.events.push(event);\n if (this.watchers.size === 0) {\n return;\n }\n\n // Batch events\n this._eventQueue.push(event);\n clearTimeout(this._watcherTimer);\n\n this._watcherTimer = setTimeout(() => {\n let events = this._eventQueue;\n this._eventQueue = [];\n\n for (let [dir, watchers] of this.watchers) {\n if (!dir.endsWith(path.sep)) {\n dir += path.sep;\n }\n\n if (event.path.startsWith(dir)) {\n for (let watcher of watchers) {\n watcher.trigger(events);\n }\n }\n }\n }, 50);\n }\n\n _registerWorker(handle: Handle) {\n this._workerHandles.push(handle);\n if (this._numWorkerInstances === this._workerHandles.length) {\n this._emitter.emit('allWorkersRegistered');\n }\n }\n\n async _sendWorkerEvent(event: WorkerEvent) {\n // Wait for worker instances to register their handles\n while (this._workerHandles.length < this._numWorkerInstances) {\n await new Promise(resolve => this._workerRegisterResolves.push(resolve));\n }\n\n await Promise.all(\n this._workerHandles.map(workerHandle =>\n this.farm.workerApi.runHandle(workerHandle, [event]),\n ),\n );\n }\n\n watch(\n dir: FilePath,\n fn: (err: ?Error, events: Array<Event>) => mixed,\n opts: WatcherOptions,\n ): Promise<AsyncSubscription> {\n dir = this._normalizePath(dir);\n let watcher = new Watcher(fn, opts);\n let watchers = this.watchers.get(dir);\n if (!watchers) {\n watchers = new Set();\n this.watchers.set(dir, watchers);\n }\n\n watchers.add(watcher);\n\n return Promise.resolve({\n unsubscribe: () => {\n watchers = nullthrows(watchers);\n watchers.delete(watcher);\n\n if (watchers.size === 0) {\n this.watchers.delete(dir);\n }\n\n return Promise.resolve();\n },\n });\n }\n\n async getEventsSince(\n dir: FilePath,\n snapshot: FilePath,\n opts: WatcherOptions,\n ): Promise<Array<Event>> {\n let contents = await this.readFile(snapshot, 'utf8');\n let len = Number(contents);\n let events = this.events.slice(len);\n let ignore = opts.ignore;\n if (ignore) {\n events = events.filter(\n event => !ignore.some(i => event.path.startsWith(i + path.sep)),\n );\n }\n\n return events;\n }\n\n async writeSnapshot(dir: FilePath, snapshot: FilePath): Promise<void> {\n await this.writeFile(snapshot, '' + this.events.length);\n }\n\n findAncestorFile(\n fileNames: Array<string>,\n fromDir: FilePath,\n root: FilePath,\n ): ?FilePath {\n return findAncestorFile(this, fileNames, fromDir, root);\n }\n\n findNodeModule(moduleName: string, fromDir: FilePath): ?FilePath {\n return findNodeModule(this, moduleName, fromDir);\n }\n\n findFirstFile(filePaths: Array<FilePath>): ?FilePath {\n return findFirstFile(this, filePaths);\n }\n}\n\nclass Watcher {\n fn: (err: ?Error, events: Array<Event>) => mixed;\n options: WatcherOptions;\n\n constructor(\n fn: (err: ?Error, events: Array<Event>) => mixed,\n options: WatcherOptions,\n ) {\n this.fn = fn;\n this.options = options;\n }\n\n trigger(events: Array<Event>) {\n let ignore = this.options.ignore;\n if (ignore) {\n events = events.filter(\n event => !ignore.some(i => event.path.startsWith(i + path.sep)),\n );\n }\n\n if (events.length > 0) {\n this.fn(null, events);\n }\n }\n}\n\nexport class FSError extends Error {\n code: string;\n path: FilePath;\n constructor(code: string, path: FilePath, message: string) {\n super(`${code}: ${path} ${message}`);\n this.name = 'FSError';\n this.code = code;\n this.path = path;\n Error.captureStackTrace?.(this, this.constructor);\n }\n}\n\nclass ReadStream extends Readable {\n fs: FileSystem;\n filePath: FilePath;\n reading: boolean;\n bytesRead: number;\n constructor(fs: FileSystem, filePath: FilePath) {\n super();\n this.fs = fs;\n this.filePath = filePath;\n this.reading = false;\n this.bytesRead = 0;\n }\n\n _read() {\n if (this.reading) {\n return;\n }\n\n this.reading = true;\n this.fs.readFile(this.filePath).then(\n res => {\n this.bytesRead += res.byteLength;\n this.push(res);\n this.push(null);\n },\n err => {\n this.emit('error', err);\n },\n );\n }\n}\n\nclass WriteStream extends Writable {\n fs: FileSystem;\n filePath: FilePath;\n options: ?FileOptions;\n buffer: Buffer;\n\n constructor(fs: FileSystem, filePath: FilePath, options: ?FileOptions) {\n super({emitClose: true, autoDestroy: true});\n this.fs = fs;\n this.filePath = filePath;\n this.options = options;\n this.buffer = Buffer.alloc(0);\n }\n\n _write(\n chunk: Buffer | string,\n encoding: any,\n callback: (error?: Error) => void,\n ) {\n let c = typeof chunk === 'string' ? Buffer.from(chunk, encoding) : chunk;\n this.buffer = Buffer.concat([this.buffer, c]);\n callback();\n }\n\n _final(callback: (error?: Error) => void) {\n this.fs\n .writeFile(this.filePath, this.buffer, this.options)\n .then(callback)\n .catch(callback);\n }\n}\n\nconst S_IFREG = 0o100000;\nconst S_IFDIR = 0o040000;\nconst S_IFLNK = 0o120000;\nconst S_IFMT = 0o170000;\n\nclass Entry {\n mode: number;\n atime: number;\n mtime: number;\n ctime: number;\n birthtime: number;\n constructor(mode: number) {\n this.mode = mode;\n let now = Date.now();\n this.atime = now;\n this.mtime = now;\n this.ctime = now;\n this.birthtime = now;\n }\n\n access() {\n let now = Date.now();\n this.atime = now;\n this.ctime = now;\n }\n\n modify(mode: number) {\n let now = Date.now();\n this.mtime = now;\n this.ctime = now;\n this.mode = mode;\n }\n\n getSize(): number {\n return 0;\n }\n\n stat(): Stat {\n return new Stat(this);\n }\n}\n\nclass Stat {\n dev: number = 0;\n ino: number = 0;\n mode: number;\n nlink: number = 0;\n uid: number = 0;\n gid: number = 0;\n rdev: number = 0;\n size: number;\n blksize: number = 0;\n blocks: number = 0;\n atimeMs: number;\n mtimeMs: number;\n ctimeMs: number;\n birthtimeMs: number;\n atime: Date;\n mtime: Date;\n ctime: Date;\n birthtime: Date;\n\n constructor(entry: Entry) {\n this.mode = entry.mode;\n this.size = entry.getSize();\n this.atimeMs = entry.atime;\n this.mtimeMs = entry.mtime;\n this.ctimeMs = entry.ctime;\n this.birthtimeMs = entry.birthtime;\n this.atime = new Date(entry.atime);\n this.mtime = new Date(entry.mtime);\n this.ctime = new Date(entry.ctime);\n this.birthtime = new Date(entry.birthtime);\n }\n\n isFile(): boolean {\n return Boolean(this.mode & S_IFREG);\n }\n\n isDirectory(): boolean {\n return Boolean(this.mode & S_IFDIR);\n }\n\n isBlockDevice(): boolean {\n return false;\n }\n\n isCharacterDevice(): boolean {\n return false;\n }\n\n isSymbolicLink(): boolean {\n return false;\n }\n\n isFIFO(): boolean {\n return false;\n }\n\n isSocket(): boolean {\n return false;\n }\n}\n\nclass Dirent {\n name: string;\n #mode: number;\n\n constructor(name: string, entry: interface {mode: number}) {\n this.name = name;\n this.#mode = entry.mode;\n }\n\n isFile(): boolean {\n return (this.#mode & S_IFMT) === S_IFREG;\n }\n\n isDirectory(): boolean {\n return (this.#mode & S_IFMT) === S_IFDIR;\n }\n\n isBlockDevice(): boolean {\n return false;\n }\n\n isCharacterDevice(): boolean {\n return false;\n }\n\n isSymbolicLink(): boolean {\n return (this.#mode & S_IFMT) === S_IFLNK;\n }\n\n isFIFO(): boolean {\n return false;\n }\n\n isSocket(): boolean {\n return false;\n }\n}\n\nexport class File extends Entry {\n buffer: Buffer;\n constructor(buffer: Buffer, mode: number) {\n super(S_IFREG | mode);\n this.buffer = buffer;\n }\n\n read(): Buffer {\n super.access();\n return Buffer.from(this.buffer);\n }\n\n write(buffer: Buffer, mode: number) {\n super.modify(S_IFREG | mode);\n this.buffer = buffer;\n }\n\n getSize(): number {\n return this.buffer.byteLength;\n }\n}\n\nclass Directory extends Entry {\n constructor() {\n super(S_IFDIR);\n }\n}\n\nexport function makeShared(contents: Buffer | string): Buffer {\n if (typeof contents !== 'string' && contents.buffer instanceof SharedBuffer) {\n return contents;\n }\n\n let contentsBuffer: Buffer | string = contents;\n // $FlowFixMe\n if (process.browser) {\n // For the polyfilled buffer module, it's faster to always convert once so that the subsequent\n // operations are fast (.byteLength and using .set instead of .write)\n contentsBuffer =\n contentsBuffer instanceof Buffer\n ? contentsBuffer\n : Buffer.from(contentsBuffer);\n }\n\n let length = Buffer.byteLength(contentsBuffer);\n let shared = new SharedBuffer(length);\n let buffer = Buffer.from(shared);\n if (length > 0) {\n if (typeof contentsBuffer === 'string') {\n buffer.write(contentsBuffer);\n } else {\n buffer.set(contentsBuffer);\n }\n }\n\n return buffer;\n}\n\nclass WorkerFS extends MemoryFS {\n id: number;\n handleFn: HandleFunction;\n\n constructor(id: number, handle: Handle) {\n // TODO Make this not a subclass\n // $FlowFixMe\n super();\n this.id = id;\n this.handleFn = (methodName, args) =>\n WorkerFarm.getWorkerApi().runHandle(handle, [methodName, args]);\n\n this.handleFn('_registerWorker', [\n WorkerFarm.getWorkerApi().createReverseHandle(event => {\n switch (event.type) {\n case 'writeFile':\n this.files.set(event.path, event.entry);\n break;\n case 'unlink':\n this.files.delete(event.path);\n this.dirs.delete(event.path);\n this.symlinks.delete(event.path);\n break;\n case 'mkdir':\n this.dirs.set(event.path, new Directory());\n break;\n case 'symlink':\n this.symlinks.set(event.path, event.target);\n break;\n }\n }),\n ]);\n }\n\n static deserialize(opts: SerializedMemoryFS): MemoryFS {\n return nullthrows(instances.get(opts.id));\n }\n\n serialize(): SerializedMemoryFS {\n // $FlowFixMe\n return {\n id: this.id,\n };\n }\n\n writeFile(\n filePath: FilePath,\n contents: Buffer | string,\n options: ?FileOptions,\n ): Promise<void> {\n super.writeFile(filePath, contents, options);\n let buffer = makeShared(contents);\n return this.handleFn('writeFile', [filePath, buffer, options]);\n }\n\n unlink(filePath: FilePath): Promise<void> {\n super.unlink(filePath);\n return this.handleFn('unlink', [filePath]);\n }\n\n mkdirp(dir: FilePath): Promise<void> {\n super.mkdirp(dir);\n return this.handleFn('mkdirp', [dir]);\n }\n\n rimraf(filePath: FilePath): Promise<void> {\n super.rimraf(filePath);\n return this.handleFn('rimraf', [filePath]);\n }\n\n ncp(source: FilePath, destination: FilePath): Promise<void> {\n super.ncp(source, destination);\n return this.handleFn('ncp', [source, destination]);\n }\n\n symlink(target: FilePath, path: FilePath): Promise<void> {\n super.symlink(target, path);\n return this.handleFn('symlink', [target, path]);\n }\n}\n\nregisterSerializableClass(`${packageJSON.version}:MemoryFS`, MemoryFS);\nregisterSerializableClass(`${packageJSON.version}:WorkerFS`, WorkerFS);\nregisterSerializableClass(`${packageJSON.version}:Stat`, Stat);\nregisterSerializableClass(`${packageJSON.version}:File`, File);\nregisterSerializableClass(`${packageJSON.version}:Directory`, Directory);\n","'use strict';\n\nfunction nullthrows(x, message) {\n if (x != null) {\n return x;\n }\n var error = new Error(message !== undefined ? message : 'Got unexpected ' + x);\n error.framesToPop = 1; // Skip nullthrows's own stack frame.\n throw error;\n}\n\nmodule.exports = nullthrows;\nmodule.exports.default = nullthrows;\n\nObject.defineProperty(module.exports, '__esModule', {value: true});\n","// @flow\n\nimport type {Readable, Writable} from 'stream';\nimport type {\n Encoding,\n FileOptions,\n FileSystem,\n ReaddirOptions,\n Stats,\n} from './types';\nimport type {FilePath} from '@parcel/types';\nimport type {\n Event,\n Options as WatcherOptions,\n AsyncSubscription,\n} from '@parcel/watcher';\n\nimport {registerSerializableClass} from '@parcel/core';\nimport WorkerFarm from '@parcel/workers';\nimport packageJSON from '../package.json';\nimport {findAncestorFile, findNodeModule, findFirstFile} from './find';\nimport {MemoryFS} from './MemoryFS';\n\nimport nullthrows from 'nullthrows';\nimport path from 'path';\n\nexport class OverlayFS implements FileSystem {\n deleted: Set<FilePath> = new Set();\n writable: FileSystem;\n readable: FileSystem;\n _cwd: FilePath;\n\n constructor(workerFarmOrFS: WorkerFarm | FileSystem, readable: FileSystem) {\n if (workerFarmOrFS instanceof WorkerFarm) {\n this.writable = new MemoryFS(workerFarmOrFS);\n } else {\n this.writable = workerFarmOrFS;\n }\n this.readable = readable;\n this._cwd = readable.cwd();\n }\n\n static deserialize(opts: any): OverlayFS {\n let fs = new OverlayFS(opts.writable, opts.readable);\n if (opts.deleted != null) fs.deleted = opts.deleted;\n return fs;\n }\n\n serialize(): {|\n $$raw: boolean,\n readable: FileSystem,\n writable: FileSystem,\n deleted: Set<FilePath>,\n |} {\n return {\n $$raw: false,\n writable: this.writable,\n readable: this.readable,\n deleted: this.deleted,\n };\n }\n\n _deletedThrows(filePath: FilePath): FilePath {\n filePath = this._normalizePath(filePath);\n if (this.deleted.has(filePath)) {\n throw new FSError('ENOENT', filePath, 'does not exist');\n }\n return filePath;\n }\n\n _checkExists(filePath: FilePath): FilePath {\n filePath = this._deletedThrows(filePath);\n if (!this.existsSync(filePath)) {\n throw new FSError('ENOENT', filePath, 'does not exist');\n }\n return filePath;\n }\n\n _isSymlink(filePath: FilePath): boolean {\n filePath = this._normalizePath(filePath);\n // Check the parts of the path to see if any are symlinks.\n let {root, dir, base} = path.parse(filePath);\n let segments = dir.slice(root.length).split(path.sep).concat(base);\n while (segments.length) {\n filePath = path.join(root, ...segments);\n let name = segments.pop();\n if (this.deleted.has(filePath)) {\n return false;\n } else if (\n this.writable instanceof MemoryFS &&\n this.writable.symlinks.has(filePath)\n ) {\n return true;\n } else {\n // HACK: Parcel fs does not provide `lstatSync`,\n // so we use `readdirSync` to check if the path is a symlink.\n let parent = path.resolve(filePath, '..');\n if (parent === filePath) {\n return false;\n }\n try {\n for (let dirent of this.readdirSync(parent, {withFileTypes: true})) {\n if (typeof dirent === 'string') {\n break; // {withFileTypes: true} not supported\n } else if (dirent.name === name) {\n if (dirent.isSymbolicLink()) {\n return true;\n }\n }\n }\n } catch (e) {\n if (e.code === 'ENOENT') {\n return false;\n }\n throw e;\n }\n }\n }\n\n return false;\n }\n\n async _copyPathForWrite(filePath: FilePath): Promise<FilePath> {\n filePath = await this._normalizePath(filePath);\n let dirPath = path.dirname(filePath);\n if (this.existsSync(dirPath) && !this.writable.existsSync(dirPath)) {\n await this.writable.mkdirp(dirPath);\n }\n return filePath;\n }\n\n _normalizePath(filePath: FilePath): FilePath {\n return path.resolve(this.cwd(), filePath);\n }\n\n // eslint-disable-next-line require-await\n async readFile(filePath: FilePath, encoding?: Encoding): Promise<any> {\n return this.readFileSync(filePath, encoding);\n }\n\n async writeFile(\n filePath: FilePath,\n contents: string | Buffer,\n options: ?FileOptions,\n ): Promise<void> {\n filePath = await this._copyPathForWrite(filePath);\n await this.writable.writeFile(filePath, contents, options);\n this.deleted.delete(filePath);\n }\n\n async copyFile(source: FilePath, destination: FilePath): Promise<void> {\n source = this._normalizePath(source);\n destination = await this._copyPathForWrite(destination);\n\n if (await this.writable.exists(source)) {\n await this.writable.writeFile(\n destination,\n await this.writable.readFile(source),\n );\n } else {\n await this.writable.writeFile(\n destination,\n await this.readable.readFile(source),\n );\n }\n\n this.deleted.delete(destination);\n }\n\n // eslint-disable-next-line require-await\n async stat(filePath: FilePath): Promise<Stats> {\n return this.statSync(filePath);\n }\n\n async symlink(target: FilePath, filePath: FilePath): Promise<void> {\n target = this._normalizePath(target);\n filePath = this._normalizePath(filePath);\n await this.writable.symlink(target, filePath);\n this.deleted.delete(filePath);\n }\n\n async unlink(filePath: FilePath): Promise<void> {\n filePath = this._normalizePath(filePath);\n\n let toDelete = [filePath];\n\n if (this.writable instanceof MemoryFS && this._isSymlink(filePath)) {\n this.writable.symlinks.delete(filePath);\n } else if (this.statSync(filePath).isDirectory()) {\n let stack = [filePath];\n\n // Recursively add every descendant path to deleted.\n while (stack.length) {\n let root = nullthrows(stack.pop());\n for (let ent of this.readdirSync(root, {withFileTypes: true})) {\n if (typeof ent === 'string') {\n let childPath = path.join(root, ent);\n toDelete.push(childPath);\n if (this.statSync(childPath).isDirectory()) {\n stack.push(childPath);\n }\n } else {\n let childPath = path.join(root, ent.name);\n toDelete.push(childPath);\n if (ent.isDirectory()) {\n stack.push(childPath);\n }\n }\n }\n }\n }\n\n try {\n await this.writable.unlink(filePath);\n } catch (e) {\n if (e.code === 'ENOENT' && !this.readable.existsSync(filePath)) {\n throw e;\n }\n }\n\n for (let pathToDelete of toDelete) {\n this.deleted.add(pathToDelete);\n }\n }\n\n async mkdirp(dir: FilePath): Promise<void> {\n dir = this._normalizePath(dir);\n await this.writable.mkdirp(dir);\n\n if (this.deleted != null) {\n let root = path.parse(dir).root;\n while (dir !== root) {\n this.deleted.delete(dir);\n dir = path.dirname(dir);\n }\n }\n }\n\n async rimraf(filePath: FilePath): Promise<void> {\n try {\n await this.unlink(filePath);\n } catch (e) {\n // noop\n }\n }\n\n // eslint-disable-next-line require-await\n async ncp(source: FilePath, destination: FilePath): Promise<void> {\n // TODO: Implement this correctly.\n return this.writable.ncp(source, destination);\n }\n\n createReadStream(filePath: FilePath, opts?: ?FileOptions): Readable {\n filePath = this._deletedThrows(filePath);\n if (this.writable.existsSync(filePath)) {\n return this.writable.createReadStream(filePath, opts);\n }\n\n return this.readable.createReadStream(filePath, opts);\n }\n\n createWriteStream(path: FilePath, opts?: ?FileOptions): Writable {\n path = this._normalizePath(path);\n this.deleted.delete(path);\n return this.writable.createWriteStream(path, opts);\n }\n\n cwd(): FilePath {\n return this._cwd;\n }\n\n chdir(path: FilePath): void {\n this._cwd = this._checkExists(path);\n }\n\n // eslint-disable-next-line require-await\n async realpath(filePath: FilePath): Promise<FilePath> {\n return this.realpathSync(filePath);\n }\n\n readFileSync(filePath: FilePath, encoding?: Encoding): any {\n filePath = this.realpathSync(filePath);\n try {\n // $FlowFixMe[incompatible-call]\n return this.writable.readFileSync(filePath, encoding);\n } catch (err) {\n // $FlowFixMe[incompatible-call]\n return this.readable.readFileSync(filePath, encoding);\n }\n }\n\n statSync(filePath: FilePath): Stats {\n filePath = this._normalizePath(filePath);\n try {\n return this.writable.statSync(filePath);\n } catch (e) {\n if (e.code === 'ENOENT' && this.existsSync(filePath)) {\n return this.readable.statSync(filePath);\n }\n throw e;\n }\n }\n\n realpathSync(filePath: FilePath): FilePath {\n filePath = this._deletedThrows(filePath);\n filePath = this._deletedThrows(this.writable.realpathSync(filePath));\n if (!this.writable.existsSync(filePath)) {\n return this.readable.realpathSync(filePath);\n }\n return filePath;\n }\n\n // eslint-disable-next-line require-await\n async exists(filePath: FilePath): Promise<boolean> {\n return this.existsSync(filePath);\n }\n\n existsSync(filePath: FilePath): boolean {\n filePath = this._normalizePath(filePath);\n if (this.deleted.has(filePath)) return false;\n\n try {\n filePath = this.realpathSync(filePath);\n } catch (err) {\n if (err.code !== 'ENOENT') throw err;\n }\n\n if (this.deleted.has(filePath)) return false;\n\n return (\n this.writable.existsSync(filePath) || this.readable.existsSync(filePath)\n );\n }\n\n // eslint-disable-next-line require-await\n async readdir(path: FilePath, opts?: ReaddirOptions): Promise<any> {\n return this.readdirSync(path, opts);\n }\n\n readdirSync(dir: FilePath, opts?: ReaddirOptions): any {\n dir = this.realpathSync(dir);\n // Read from both filesystems and merge the results\n let entries = new Map();\n\n try {\n for (let entry: any of this.writable.readdirSync(dir, opts)) {\n let filePath = path.join(dir, entry.name ?? entry);\n if (this.deleted.has(filePath)) continue;\n entries.set(filePath, entry);\n }\n } catch {\n // noop\n }\n\n try {\n for (let entry: any of this.readable.readdirSync(dir, opts)) {\n let filePath = path.join(dir, entry.name ?? entry);\n if (this.deleted.has(filePath)) continue;\n if (entries.has(filePath)) continue;\n entries.set(filePath, entry);\n }\n } catch {\n // noop\n }\n\n return Array.from(entries.values());\n }\n\n async watch(\n dir: FilePath,\n fn: (err: ?Error, events: Array<Event>) => mixed,\n opts: WatcherOptions,\n ): Promise<AsyncSubscription> {\n let writableSubscription = await this.writable.watch(dir, fn, opts);\n let readableSubscription = await this.readable.watch(dir, fn, opts);\n return {\n unsubscribe: async () => {\n await writableSubscription.unsubscribe();\n await readableSubscription.unsubscribe();\n },\n };\n }\n\n async getEventsSince(\n dir: FilePath,\n snapshot: FilePath,\n opts: WatcherOptions,\n ): Promise<Array<Event>> {\n let writableEvents = await this.writable.getEventsSince(\n dir,\n snapshot,\n opts,\n );\n let readableEvents = await this.readable.getEventsSince(\n dir,\n snapshot,\n opts,\n );\n return [...writableEvents, ...readableEvents];\n }\n\n async writeSnapshot(\n dir: FilePath,\n snapshot: FilePath,\n opts: WatcherOptions,\n ): Promise<void> {\n await this.writable.writeSnapshot(dir, snapshot, opts);\n }\n\n findAncestorFile(\n fileNames: Array<string>,\n fromDir: FilePath,\n root: FilePath,\n ): ?FilePath {\n return findAncestorFile(this, fileNames, fromDir, root);\n }\n\n findNodeModule(moduleName: string, fromDir: FilePath): ?FilePath {\n return findNodeModule(this, moduleName, fromDir);\n }\n\n findFirstFile(filePaths: Array<FilePath>): ?FilePath {\n return findFirstFile(this, filePaths);\n }\n}\n\nclass FSError extends Error {\n code: string;\n path: FilePath;\n constructor(code: string, path: FilePath, message: string) {\n super(`${code}: ${path} ${message}`);\n this.name = 'FSError';\n this.code = code;\n this.path = path;\n Error.captureStackTrace?.(this, this.constructor);\n }\n}\n\nregisterSerializableClass(`${packageJSON.version}:OverlayFS`, OverlayFS);\n"],"names":["path","stream","promisify","pipeline","ncp","sourceFS","source","destinationFS","destination","mkdirp","files","readdir","file","sourcePath","join","destPath","stats","stat","isFile","createReadStream","createWriteStream","isDirectory","fs","nativeFS","registerSerializableClass","hashFile","watcher","packageJSON","searchNative","searchJS","realpath","process","platform","native","isPnP","versions","pnp","NodeFS","readFile","copyFile","symlink","unlink","utimes","cwd","chdir","directory","statSync","realpathSync","existsSync","readdirSync","findAncestorFile","args","findNodeModule","findFirstFile","filePath","options","tmpFilePath","getTempFilePath","failed","move","promises","rename","e","syscall","code","hashTmp","hashTarget","Promise","all","writeStream","close","fd","cb","err","then","once","unlinkSync","writeFile","contents","readFileSync","encoding","originalPath","exists","resolve","watch","dir","fn","opts","subscribe","getEventsSince","snapshot","writeSnapshot","deserialize","serialize","mkdir","recursive","rimraf","rm","force","rmdir","version","writeStreamCalls","threadId","require","Number","MAX_SAFE_INTEGER","pid","toString","module","exports","JSON","parse","moduleName","root","basename","dirname","moduleDir","fileNames","pathRoot","fileName","filePaths","Readable","Writable","SharedBuffer","WorkerFarm","Handle","nullthrows","EventEmitter","instances","Map","id","MemoryFS","_numWorkerInstances","_workerRegisterResolves","_emitter","constructor","workerFarm","farm","_cwd","sep","dirs","Directory","symlinks","watchers","events","_workerHandles","_eventQueue","set","on","existing","get","getWorkerApi","runHandle","handle","WorkerFS","createReverseHandle","$$raw","decrementWorkerInstance","length","emit","_normalizePath","normalize","startsWith","base","parts","slice","split","concat","res","part","has","FSError","buffer","makeShared","mode","write","File","_sendWorkerEvent","type","entry","_triggerEvent","read","endsWith","indexOf","name","withFileTypes","push","Dirent","from","S_IFLNK","delete","keys","dirPath","destName","ReadStream","WriteStream","target","event","size","clearTimeout","_watcherTimer","setTimeout","trigger","_registerWorker","map","workerHandle","workerApi","Watcher","Set","add","unsubscribe","len","ignore","filter","some","i","fromDir","Error","message","captureStackTrace","reading","bytesRead","_read","byteLength","emitClose","autoDestroy","Buffer","alloc","_write","chunk","callback","c","_final","catch","S_IFREG","S_IFDIR","S_IFMT","Entry","now","Date","atime","mtime","ctime","birthtime","access","modify","getSize","Stat","dev","ino","nlink","uid","gid","rdev","blksize","blocks","atimeMs","mtimeMs","ctimeMs","birthtimeMs","Boolean","isBlockDevice","isCharacterDevice","isSymbolicLink","isFIFO","isSocket","contentsBuffer","browser","shared","handleFn","methodName","OverlayFS","deleted","workerFarmOrFS","readable","writable","_deletedThrows","_checkExists","_isSymlink","segments","pop","parent","dirent","_copyPathForWrite","toDelete","stack","ent","childPath","pathToDelete","entries","Array","values","writableSubscription","readableSubscription","writableEvents","readableEvents"],"version":3,"file":"index.js.map","sourceRoot":"../../../../"} |