@atlaspack/fs 2.12.1-dev.3401 → 2.12.1-dev.3450

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/browser.js CHANGED
@@ -1,11 +1,11 @@
1
- var $eHCLO$path = require("path");
2
- var $eHCLO$stream = require("stream");
3
- var $eHCLO$util = require("util");
4
- var $eHCLO$buffer = require("buffer");
5
- var $eHCLO$atlaspackcore = require("@atlaspack/core");
6
- var $eHCLO$atlaspackutils = require("@atlaspack/utils");
7
- var $eHCLO$atlaspackworkers = require("@atlaspack/workers");
8
- var $eHCLO$events = require("events");
1
+ var $f8tya$path = require("path");
2
+ var $f8tya$stream = require("stream");
3
+ var $f8tya$util = require("util");
4
+ var $f8tya$buffer = require("buffer");
5
+ var $f8tya$atlaspackcore = require("@atlaspack/core");
6
+ var $f8tya$atlaspackutils = require("@atlaspack/utils");
7
+ var $f8tya$atlaspackworkers = require("@atlaspack/workers");
8
+ var $f8tya$events = require("events");
9
9
 
10
10
 
11
11
  function $parcel$interopDefault(a) {
@@ -33,77 +33,77 @@ function $parcel$export(e, n, v, s) {
33
33
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
34
34
  }
35
35
 
36
- $parcel$export(module.exports, "ncp", () => $416aba2172cbc610$export$d3a8044e3fef7335);
36
+ $parcel$export(module.exports, "ncp", () => $5a5d53c6cbc0ea26$export$d3a8044e3fef7335);
37
37
 
38
38
 
39
39
 
40
- var $4d6ec4a7ba8784a9$exports = {};
40
+ var $a6946eeec72f95a7$exports = {};
41
41
 
42
- $parcel$export($4d6ec4a7ba8784a9$exports, "NodeFS", () => $4d6ec4a7ba8784a9$export$c4e0ef2ab73c21e7);
42
+ $parcel$export($a6946eeec72f95a7$exports, "NodeFS", () => $a6946eeec72f95a7$export$c4e0ef2ab73c21e7);
43
43
  // $FlowFixMe[prop-missing] handled by the throwing constructor
44
- class $4d6ec4a7ba8784a9$export$c4e0ef2ab73c21e7 {
44
+ class $a6946eeec72f95a7$export$c4e0ef2ab73c21e7 {
45
45
  constructor(){
46
46
  throw new Error("NodeFS isn't available in the browser");
47
47
  }
48
48
  }
49
49
 
50
50
 
51
- var $995ba0f44994569b$exports = {};
51
+ var $fd981db2f03c0168$exports = {};
52
52
 
53
- $parcel$export($995ba0f44994569b$exports, "MemoryFS", () => $995ba0f44994569b$export$3048eb7ec07c2c4e);
54
- $parcel$export($995ba0f44994569b$exports, "FSError", () => $995ba0f44994569b$export$d414276624ebf134);
55
- $parcel$export($995ba0f44994569b$exports, "makeShared", () => $995ba0f44994569b$export$df9eb3e75aa27a22);
56
- $parcel$export($995ba0f44994569b$exports, "File", () => $995ba0f44994569b$export$b6afa8811b7e644e);
53
+ $parcel$export($fd981db2f03c0168$exports, "MemoryFS", () => $fd981db2f03c0168$export$3048eb7ec07c2c4e);
54
+ $parcel$export($fd981db2f03c0168$exports, "FSError", () => $fd981db2f03c0168$export$d414276624ebf134);
55
+ $parcel$export($fd981db2f03c0168$exports, "makeShared", () => $fd981db2f03c0168$export$df9eb3e75aa27a22);
56
+ $parcel$export($fd981db2f03c0168$exports, "File", () => $fd981db2f03c0168$export$b6afa8811b7e644e);
57
57
 
58
58
 
59
59
 
60
60
 
61
- var $b6ff243d7d5008ac$exports = {};
62
- $b6ff243d7d5008ac$exports = JSON.parse("{\"name\":\"@atlaspack/fs\",\"version\":\"2.12.1-dev.3401+b483af77f\",\"description\":\"Blazing fast, zero configuration web application bundler\",\"license\":\"MIT\",\"publishConfig\":{\"access\":\"public\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/atlassian-labs/atlaspack.git\"},\"main\":\"lib/index.js\",\"source\":\"src/index.js\",\"types\":\"index.d.ts\",\"engines\":{\"node\":\">= 16.0.0\"},\"targets\":{\"types\":false,\"main\":{\"includeNodeModules\":{\"@atlaspack/core\":false,\"@atlaspack/feature-flags\":false,\"@atlaspack/rust\":false,\"@atlaspack/types-internal\":false,\"@atlaspack/utils\":false,\"@atlaspack/watcher-watchman-js\":false,\"@parcel/watcher\":false,\"@atlaspack/workers\":false}},\"browser\":{\"includeNodeModules\":{\"@atlaspack/core\":false,\"@atlaspack/feature-flags\":false,\"@atlaspack/rust\":false,\"@atlaspack/types-internal\":false,\"@atlaspack/utils\":false,\"@atlaspack/watcher-watchman-js\":false,\"@parcel/watcher\":false,\"@atlaspack/workers\":false}}},\"scripts\":{\"build-ts\":\"mkdir -p lib && flow-to-ts src/types.js > lib/types.d.ts\",\"check-ts\":\"tsc --noEmit index.d.ts\"},\"dependencies\":{\"@atlaspack/feature-flags\":\"2.12.1-dev.3401+b483af77f\",\"@atlaspack/rust\":\"2.12.1-dev.3401+b483af77f\",\"@atlaspack/types-internal\":\"2.12.1-dev.3401+b483af77f\",\"@atlaspack/utils\":\"2.12.1-dev.3401+b483af77f\",\"@atlaspack/workers\":\"2.12.1-dev.3401+b483af77f\",\"@parcel/watcher\":\"^2.0.7\"},\"devDependencies\":{\"@atlaspack/watcher-watchman-js\":\"2.12.1-dev.3401+b483af77f\",\"graceful-fs\":\"^4.2.4\",\"ncp\":\"^2.0.0\",\"nullthrows\":\"^1.1.1\",\"utility-types\":\"^3.10.0\"},\"peerDependencies\":{\"@atlaspack/core\":\"^2.12.1-dev.3401+b483af77f\"},\"browser\":{\"@atlaspack/fs\":\"./lib/browser.js\",\"./src/NodeFS.js\":\"./src/NodeFS.browser.js\"},\"gitHead\":\"b483af77f02d1258c8dad156e097b94f83671d8e\"}");
61
+ var $db6724898b38062a$exports = {};
62
+ $db6724898b38062a$exports = JSON.parse("{\"name\":\"@atlaspack/fs\",\"version\":\"2.12.1-dev.3450+58845ef87\",\"description\":\"Blazing fast, zero configuration web application bundler\",\"license\":\"(MIT OR Apache-2.0)\",\"publishConfig\":{\"access\":\"public\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/atlassian-labs/atlaspack.git\"},\"main\":\"lib/index.js\",\"source\":\"src/index.js\",\"types\":\"index.d.ts\",\"engines\":{\"node\":\">= 16.0.0\"},\"targets\":{\"types\":false,\"main\":{\"includeNodeModules\":{\"@atlaspack/core\":false,\"@atlaspack/feature-flags\":false,\"@atlaspack/rust\":false,\"@atlaspack/types-internal\":false,\"@atlaspack/utils\":false,\"@atlaspack/watcher-watchman-js\":false,\"@parcel/watcher\":false,\"@atlaspack/workers\":false}},\"browser\":{\"includeNodeModules\":{\"@atlaspack/core\":false,\"@atlaspack/feature-flags\":false,\"@atlaspack/rust\":false,\"@atlaspack/types-internal\":false,\"@atlaspack/utils\":false,\"@atlaspack/watcher-watchman-js\":false,\"@parcel/watcher\":false,\"@atlaspack/workers\":false}}},\"scripts\":{\"build-ts\":\"mkdir -p lib && flow-to-ts src/types.js > lib/types.d.ts\",\"check-ts\":\"tsc --noEmit index.d.ts\"},\"dependencies\":{\"@atlaspack/feature-flags\":\"2.12.1-dev.3450+58845ef87\",\"@atlaspack/rust\":\"2.12.1-dev.3450+58845ef87\",\"@atlaspack/types-internal\":\"2.12.1-dev.3450+58845ef87\",\"@atlaspack/utils\":\"2.12.1-dev.3450+58845ef87\",\"@atlaspack/workers\":\"2.12.1-dev.3450+58845ef87\",\"@parcel/watcher\":\"^2.0.7\"},\"devDependencies\":{\"@atlaspack/watcher-watchman-js\":\"2.12.1-dev.3450+58845ef87\",\"graceful-fs\":\"^4.2.4\",\"ncp\":\"^2.0.0\",\"nullthrows\":\"^1.1.1\",\"utility-types\":\"^3.10.0\"},\"peerDependencies\":{\"@atlaspack/core\":\"^2.12.1-dev.3450+58845ef87\"},\"browser\":{\"@atlaspack/fs\":\"./lib/browser.js\",\"./src/NodeFS.js\":\"./src/NodeFS.browser.js\"},\"gitHead\":\"58845ef87446fcedb7d7d8876440c64184645cbb\"}");
63
63
 
64
64
 
65
65
 
66
- var $023b8d639760db5c$exports = {};
66
+ var $3d4f77aca2be4887$exports = {};
67
67
  'use strict';
68
- function $023b8d639760db5c$var$nullthrows(x, message) {
68
+ function $3d4f77aca2be4887$var$nullthrows(x, message) {
69
69
  if (x != null) return x;
70
70
  var error = new Error(message !== undefined ? message : 'Got unexpected ' + x);
71
71
  error.framesToPop = 1; // Skip nullthrows's own stack frame.
72
72
  throw error;
73
73
  }
74
- $023b8d639760db5c$exports = $023b8d639760db5c$var$nullthrows;
75
- $023b8d639760db5c$exports.default = $023b8d639760db5c$var$nullthrows;
76
- Object.defineProperty($023b8d639760db5c$exports, '__esModule', {
74
+ $3d4f77aca2be4887$exports = $3d4f77aca2be4887$var$nullthrows;
75
+ $3d4f77aca2be4887$exports.default = $3d4f77aca2be4887$var$nullthrows;
76
+ Object.defineProperty($3d4f77aca2be4887$exports, '__esModule', {
77
77
  value: true
78
78
  });
79
79
 
80
80
 
81
81
 
82
82
 
83
- function $a9ed96e57e8d2cf3$export$4c6d088a7d7f9947(fs, moduleName, dir) {
84
- let { root: root } = (0, ($parcel$interopDefault($eHCLO$path))).parse(dir);
83
+ function $b1261e905f7ec91b$export$4c6d088a7d7f9947(fs, moduleName, dir) {
84
+ let { root: root } = (0, ($parcel$interopDefault($f8tya$path))).parse(dir);
85
85
  while(dir !== root){
86
86
  // Skip node_modules directories
87
- if ((0, ($parcel$interopDefault($eHCLO$path))).basename(dir) === 'node_modules') dir = (0, ($parcel$interopDefault($eHCLO$path))).dirname(dir);
87
+ if ((0, ($parcel$interopDefault($f8tya$path))).basename(dir) === 'node_modules') dir = (0, ($parcel$interopDefault($f8tya$path))).dirname(dir);
88
88
  try {
89
- let moduleDir = (0, ($parcel$interopDefault($eHCLO$path))).join(dir, 'node_modules', moduleName);
89
+ let moduleDir = (0, ($parcel$interopDefault($f8tya$path))).join(dir, 'node_modules', moduleName);
90
90
  let stats = fs.statSync(moduleDir);
91
91
  if (stats.isDirectory()) return moduleDir;
92
92
  } catch (err) {
93
93
  // ignore
94
94
  }
95
95
  // Move up a directory
96
- dir = (0, ($parcel$interopDefault($eHCLO$path))).dirname(dir);
96
+ dir = (0, ($parcel$interopDefault($f8tya$path))).dirname(dir);
97
97
  }
98
98
  return null;
99
99
  }
100
- function $a9ed96e57e8d2cf3$export$d51a93c758976388(fs, fileNames, dir, root) {
101
- let { root: pathRoot } = (0, ($parcel$interopDefault($eHCLO$path))).parse(dir);
100
+ function $b1261e905f7ec91b$export$d51a93c758976388(fs, fileNames, dir, root) {
101
+ let { root: pathRoot } = (0, ($parcel$interopDefault($f8tya$path))).parse(dir);
102
102
  // eslint-disable-next-line no-constant-condition
103
103
  while(true){
104
- if ((0, ($parcel$interopDefault($eHCLO$path))).basename(dir) === 'node_modules') return null;
104
+ if ((0, ($parcel$interopDefault($f8tya$path))).basename(dir) === 'node_modules') return null;
105
105
  for (const fileName of fileNames){
106
- let filePath = (0, ($parcel$interopDefault($eHCLO$path))).join(dir, fileName);
106
+ let filePath = (0, ($parcel$interopDefault($f8tya$path))).join(dir, fileName);
107
107
  try {
108
108
  if (fs.statSync(filePath).isFile()) return filePath;
109
109
  } catch (err) {
@@ -111,11 +111,11 @@ function $a9ed96e57e8d2cf3$export$d51a93c758976388(fs, fileNames, dir, root) {
111
111
  }
112
112
  }
113
113
  if (dir === root || dir === pathRoot) break;
114
- dir = (0, ($parcel$interopDefault($eHCLO$path))).dirname(dir);
114
+ dir = (0, ($parcel$interopDefault($f8tya$path))).dirname(dir);
115
115
  }
116
116
  return null;
117
117
  }
118
- function $a9ed96e57e8d2cf3$export$64df6e3182fd5b2d(fs, filePaths) {
118
+ function $b1261e905f7ec91b$export$64df6e3182fd5b2d(fs, filePaths) {
119
119
  for (let filePath of filePaths)try {
120
120
  if (fs.statSync(filePath).isFile()) return filePath;
121
121
  } catch (err) {
@@ -125,46 +125,46 @@ function $a9ed96e57e8d2cf3$export$64df6e3182fd5b2d(fs, filePaths) {
125
125
 
126
126
 
127
127
 
128
- var $995ba0f44994569b$require$Buffer = $eHCLO$buffer.Buffer;
129
- const $995ba0f44994569b$var$instances = new Map();
130
- let $995ba0f44994569b$var$id = 0;
131
- class $995ba0f44994569b$export$3048eb7ec07c2c4e {
128
+ var $fd981db2f03c0168$require$Buffer = $f8tya$buffer.Buffer;
129
+ const $fd981db2f03c0168$var$instances = new Map();
130
+ let $fd981db2f03c0168$var$id = 0;
131
+ class $fd981db2f03c0168$export$3048eb7ec07c2c4e {
132
132
  _numWorkerInstances = 0;
133
133
  _workerRegisterResolves = [];
134
- _emitter = new (0, ($parcel$interopDefault($eHCLO$events)))();
134
+ _emitter = new (0, ($parcel$interopDefault($f8tya$events)))();
135
135
  constructor(workerFarm){
136
136
  this.farm = workerFarm;
137
- this._cwd = (0, ($parcel$interopDefault($eHCLO$path))).resolve((0, ($parcel$interopDefault($eHCLO$path))).sep);
137
+ this._cwd = (0, ($parcel$interopDefault($f8tya$path))).resolve((0, ($parcel$interopDefault($f8tya$path))).sep);
138
138
  this.dirs = new Map([
139
139
  [
140
140
  this._cwd,
141
- new $995ba0f44994569b$var$Directory()
141
+ new $fd981db2f03c0168$var$Directory()
142
142
  ]
143
143
  ]);
144
144
  this.files = new Map();
145
145
  this.symlinks = new Map();
146
146
  this.watchers = new Map();
147
147
  this.events = [];
148
- this.id = $995ba0f44994569b$var$id++;
148
+ this.id = $fd981db2f03c0168$var$id++;
149
149
  this._workerHandles = [];
150
150
  this._eventQueue = [];
151
- $995ba0f44994569b$var$instances.set(this.id, this);
151
+ $fd981db2f03c0168$var$instances.set(this.id, this);
152
152
  this._emitter.on('allWorkersRegistered', ()=>{
153
153
  for (let resolve of this._workerRegisterResolves)resolve();
154
154
  this._workerRegisterResolves = [];
155
155
  });
156
156
  }
157
157
  static deserialize(opts) {
158
- let existing = $995ba0f44994569b$var$instances.get(opts.id);
158
+ let existing = $fd981db2f03c0168$var$instances.get(opts.id);
159
159
  if (existing != null) {
160
160
  // Correct the count of worker instances since serialization assumes a new instance is created
161
- (0, ($parcel$interopDefault($eHCLO$atlaspackworkers))).getWorkerApi().runHandle(opts.handle, [
161
+ (0, ($parcel$interopDefault($f8tya$atlaspackworkers))).getWorkerApi().runHandle(opts.handle, [
162
162
  'decrementWorkerInstance',
163
163
  []
164
164
  ]);
165
165
  return existing;
166
166
  }
167
- let fs = new $995ba0f44994569b$var$WorkerFS(opts.id, (0, (/*@__PURE__*/$parcel$interopDefault($023b8d639760db5c$exports)))(opts.handle));
167
+ let fs = new $fd981db2f03c0168$var$WorkerFS(opts.id, (0, (/*@__PURE__*/$parcel$interopDefault($3d4f77aca2be4887$exports)))(opts.handle));
168
168
  fs.dirs = opts.dirs;
169
169
  fs.files = opts.files;
170
170
  fs.symlinks = opts.symlinks;
@@ -197,15 +197,15 @@ class $995ba0f44994569b$export$3048eb7ec07c2c4e {
197
197
  this._cwd = dir;
198
198
  }
199
199
  _normalizePath(filePath, realpath = true) {
200
- filePath = (0, ($parcel$interopDefault($eHCLO$path))).normalize(filePath);
201
- if (!filePath.startsWith(this.cwd())) filePath = (0, ($parcel$interopDefault($eHCLO$path))).resolve(this.cwd(), filePath);
200
+ filePath = (0, ($parcel$interopDefault($f8tya$path))).normalize(filePath);
201
+ if (!filePath.startsWith(this.cwd())) filePath = (0, ($parcel$interopDefault($f8tya$path))).resolve(this.cwd(), filePath);
202
202
  // get realpath by following symlinks
203
203
  if (realpath) {
204
- let { root: root, dir: dir, base: base } = (0, ($parcel$interopDefault($eHCLO$path))).parse(filePath);
205
- let parts = dir.slice(root.length).split((0, ($parcel$interopDefault($eHCLO$path))).sep).concat(base);
204
+ let { root: root, dir: dir, base: base } = (0, ($parcel$interopDefault($f8tya$path))).parse(filePath);
205
+ let parts = dir.slice(root.length).split((0, ($parcel$interopDefault($f8tya$path))).sep).concat(base);
206
206
  let res = root;
207
207
  for (let part of parts){
208
- res = (0, ($parcel$interopDefault($eHCLO$path))).join(res, part);
208
+ res = (0, ($parcel$interopDefault($f8tya$path))).join(res, part);
209
209
  let symlink = this.symlinks.get(res);
210
210
  if (symlink) res = symlink;
211
211
  }
@@ -215,16 +215,16 @@ class $995ba0f44994569b$export$3048eb7ec07c2c4e {
215
215
  }
216
216
  async writeFile(filePath, contents, options) {
217
217
  filePath = this._normalizePath(filePath);
218
- if (this.dirs.has(filePath)) throw new $995ba0f44994569b$export$d414276624ebf134('EISDIR', filePath, 'is a directory');
219
- let dir = (0, ($parcel$interopDefault($eHCLO$path))).dirname(filePath);
220
- if (!this.dirs.has(dir)) throw new $995ba0f44994569b$export$d414276624ebf134('ENOENT', dir, 'does not exist');
221
- let buffer = $995ba0f44994569b$export$df9eb3e75aa27a22(contents);
218
+ if (this.dirs.has(filePath)) throw new $fd981db2f03c0168$export$d414276624ebf134('EISDIR', filePath, 'is a directory');
219
+ let dir = (0, ($parcel$interopDefault($f8tya$path))).dirname(filePath);
220
+ if (!this.dirs.has(dir)) throw new $fd981db2f03c0168$export$d414276624ebf134('ENOENT', dir, 'does not exist');
221
+ let buffer = $fd981db2f03c0168$export$df9eb3e75aa27a22(contents);
222
222
  let file = this.files.get(filePath);
223
223
  let mode = options && options.mode || 438;
224
224
  if (file) {
225
225
  file.write(buffer, mode);
226
226
  this.files.set(filePath, file);
227
- } else this.files.set(filePath, new $995ba0f44994569b$export$b6afa8811b7e644e(buffer, mode));
227
+ } else this.files.set(filePath, new $fd981db2f03c0168$export$b6afa8811b7e644e(buffer, mode));
228
228
  await this._sendWorkerEvent({
229
229
  type: 'writeFile',
230
230
  path: filePath,
@@ -242,7 +242,7 @@ class $995ba0f44994569b$export$3048eb7ec07c2c4e {
242
242
  readFileSync(filePath, encoding) {
243
243
  filePath = this._normalizePath(filePath);
244
244
  let file = this.files.get(filePath);
245
- if (file == null) throw new $995ba0f44994569b$export$d414276624ebf134('ENOENT', filePath, 'does not exist');
245
+ if (file == null) throw new $fd981db2f03c0168$export$d414276624ebf134('ENOENT', filePath, 'does not exist');
246
246
  let buffer = file.read();
247
247
  if (encoding) return buffer.toString(encoding);
248
248
  return buffer;
@@ -256,7 +256,7 @@ class $995ba0f44994569b$export$3048eb7ec07c2c4e {
256
256
  let dir = this.dirs.get(filePath);
257
257
  if (dir) return dir.stat();
258
258
  let file = this.files.get(filePath);
259
- if (file == null) throw new $995ba0f44994569b$export$d414276624ebf134('ENOENT', filePath, 'does not exist');
259
+ if (file == null) throw new $fd981db2f03c0168$export$d414276624ebf134('ENOENT', filePath, 'does not exist');
260
260
  return file.stat();
261
261
  }
262
262
  // eslint-disable-next-line require-await
@@ -265,26 +265,26 @@ class $995ba0f44994569b$export$3048eb7ec07c2c4e {
265
265
  }
266
266
  readdirSync(dir, opts) {
267
267
  dir = this._normalizePath(dir);
268
- if (!this.dirs.has(dir)) throw new $995ba0f44994569b$export$d414276624ebf134('ENOENT', dir, 'does not exist');
269
- if (!dir.endsWith((0, ($parcel$interopDefault($eHCLO$path))).sep)) dir += (0, ($parcel$interopDefault($eHCLO$path))).sep;
268
+ if (!this.dirs.has(dir)) throw new $fd981db2f03c0168$export$d414276624ebf134('ENOENT', dir, 'does not exist');
269
+ if (!dir.endsWith((0, ($parcel$interopDefault($f8tya$path))).sep)) dir += (0, ($parcel$interopDefault($f8tya$path))).sep;
270
270
  let res = [];
271
271
  for (let [filePath, entry] of this.dirs){
272
272
  if (filePath === dir) continue;
273
- if (filePath.startsWith(dir) && filePath.indexOf((0, ($parcel$interopDefault($eHCLO$path))).sep, dir.length) === -1) {
273
+ if (filePath.startsWith(dir) && filePath.indexOf((0, ($parcel$interopDefault($f8tya$path))).sep, dir.length) === -1) {
274
274
  let name = filePath.slice(dir.length);
275
- if (opts?.withFileTypes) res.push(new $995ba0f44994569b$var$Dirent(name, entry));
275
+ if (opts?.withFileTypes) res.push(new $fd981db2f03c0168$var$Dirent(name, entry));
276
276
  else res.push(name);
277
277
  }
278
278
  }
279
- for (let [filePath, entry] of this.files)if (filePath.startsWith(dir) && filePath.indexOf((0, ($parcel$interopDefault($eHCLO$path))).sep, dir.length) === -1) {
279
+ for (let [filePath, entry] of this.files)if (filePath.startsWith(dir) && filePath.indexOf((0, ($parcel$interopDefault($f8tya$path))).sep, dir.length) === -1) {
280
280
  let name = filePath.slice(dir.length);
281
- if (opts?.withFileTypes) res.push(new $995ba0f44994569b$var$Dirent(name, entry));
281
+ if (opts?.withFileTypes) res.push(new $fd981db2f03c0168$var$Dirent(name, entry));
282
282
  else res.push(name);
283
283
  }
284
- for (let [from] of this.symlinks)if (from.startsWith(dir) && from.indexOf((0, ($parcel$interopDefault($eHCLO$path))).sep, dir.length) === -1) {
284
+ for (let [from] of this.symlinks)if (from.startsWith(dir) && from.indexOf((0, ($parcel$interopDefault($f8tya$path))).sep, dir.length) === -1) {
285
285
  let name = from.slice(dir.length);
286
- if (opts?.withFileTypes) res.push(new $995ba0f44994569b$var$Dirent(name, {
287
- mode: $995ba0f44994569b$var$S_IFLNK
286
+ if (opts?.withFileTypes) res.push(new $fd981db2f03c0168$var$Dirent(name, {
287
+ mode: $fd981db2f03c0168$var$S_IFLNK
288
288
  }));
289
289
  else res.push(name);
290
290
  }
@@ -296,7 +296,7 @@ class $995ba0f44994569b$export$3048eb7ec07c2c4e {
296
296
  }
297
297
  async unlink(filePath) {
298
298
  filePath = this._normalizePath(filePath);
299
- if (!this.files.has(filePath) && !this.dirs.has(filePath)) throw new $995ba0f44994569b$export$d414276624ebf134('ENOENT', filePath, 'does not exist');
299
+ if (!this.files.has(filePath) && !this.dirs.has(filePath)) throw new $fd981db2f03c0168$export$d414276624ebf134('ENOENT', filePath, 'does not exist');
300
300
  this.files.delete(filePath);
301
301
  this.dirs.delete(filePath);
302
302
  this.watchers.delete(filePath);
@@ -313,11 +313,11 @@ class $995ba0f44994569b$export$3048eb7ec07c2c4e {
313
313
  async mkdirp(dir) {
314
314
  dir = this._normalizePath(dir);
315
315
  if (this.dirs.has(dir)) return Promise.resolve();
316
- if (this.files.has(dir)) throw new $995ba0f44994569b$export$d414276624ebf134('ENOENT', dir, 'is not a directory');
317
- let root = (0, ($parcel$interopDefault($eHCLO$path))).parse(dir).root;
316
+ if (this.files.has(dir)) throw new $fd981db2f03c0168$export$d414276624ebf134('ENOENT', dir, 'is not a directory');
317
+ let root = (0, ($parcel$interopDefault($f8tya$path))).parse(dir).root;
318
318
  while(dir !== root){
319
319
  if (this.dirs.has(dir)) break;
320
- this.dirs.set(dir, new $995ba0f44994569b$var$Directory());
320
+ this.dirs.set(dir, new $fd981db2f03c0168$var$Directory());
321
321
  await this._sendWorkerEvent({
322
322
  type: 'mkdir',
323
323
  path: dir
@@ -326,14 +326,14 @@ class $995ba0f44994569b$export$3048eb7ec07c2c4e {
326
326
  type: 'create',
327
327
  path: dir
328
328
  });
329
- dir = (0, ($parcel$interopDefault($eHCLO$path))).dirname(dir);
329
+ dir = (0, ($parcel$interopDefault($f8tya$path))).dirname(dir);
330
330
  }
331
331
  return Promise.resolve();
332
332
  }
333
333
  async rimraf(filePath) {
334
334
  filePath = this._normalizePath(filePath);
335
335
  if (this.dirs.has(filePath)) {
336
- let dir = filePath + (0, ($parcel$interopDefault($eHCLO$path))).sep;
336
+ let dir = filePath + (0, ($parcel$interopDefault($f8tya$path))).sep;
337
337
  for (let filePath of this.files.keys())if (filePath.startsWith(dir)) {
338
338
  this.files.delete(filePath);
339
339
  await this._sendWorkerEvent({
@@ -390,7 +390,7 @@ class $995ba0f44994569b$export$3048eb7ec07c2c4e {
390
390
  source = this._normalizePath(source);
391
391
  if (this.dirs.has(source)) {
392
392
  if (!this.dirs.has(destination)) {
393
- this.dirs.set(destination, new $995ba0f44994569b$var$Directory());
393
+ this.dirs.set(destination, new $fd981db2f03c0168$var$Directory());
394
394
  await this._sendWorkerEvent({
395
395
  type: 'mkdir',
396
396
  path: destination
@@ -400,11 +400,11 @@ class $995ba0f44994569b$export$3048eb7ec07c2c4e {
400
400
  path: destination
401
401
  });
402
402
  }
403
- let dir = source + (0, ($parcel$interopDefault($eHCLO$path))).sep;
403
+ let dir = source + (0, ($parcel$interopDefault($f8tya$path))).sep;
404
404
  for (let dirPath of this.dirs.keys())if (dirPath.startsWith(dir)) {
405
- let destName = (0, ($parcel$interopDefault($eHCLO$path))).join(destination, dirPath.slice(dir.length));
405
+ let destName = (0, ($parcel$interopDefault($f8tya$path))).join(destination, dirPath.slice(dir.length));
406
406
  if (!this.dirs.has(destName)) {
407
- this.dirs.set(destName, new $995ba0f44994569b$var$Directory());
407
+ this.dirs.set(destName, new $fd981db2f03c0168$var$Directory());
408
408
  await this._sendWorkerEvent({
409
409
  type: 'mkdir',
410
410
  path: destination
@@ -416,7 +416,7 @@ class $995ba0f44994569b$export$3048eb7ec07c2c4e {
416
416
  }
417
417
  }
418
418
  for (let [filePath, file] of this.files)if (filePath.startsWith(dir)) {
419
- let destName = (0, ($parcel$interopDefault($eHCLO$path))).join(destination, filePath.slice(dir.length));
419
+ let destName = (0, ($parcel$interopDefault($f8tya$path))).join(destination, filePath.slice(dir.length));
420
420
  let exists = this.files.has(destName);
421
421
  this.files.set(destName, file);
422
422
  await this._sendWorkerEvent({
@@ -432,10 +432,10 @@ class $995ba0f44994569b$export$3048eb7ec07c2c4e {
432
432
  } else await this.copyFile(source, destination);
433
433
  }
434
434
  createReadStream(filePath) {
435
- return new $995ba0f44994569b$var$ReadStream(this, filePath);
435
+ return new $fd981db2f03c0168$var$ReadStream(this, filePath);
436
436
  }
437
437
  createWriteStream(filePath, options) {
438
- return new $995ba0f44994569b$var$WriteStream(this, filePath, options);
438
+ return new $fd981db2f03c0168$var$WriteStream(this, filePath, options);
439
439
  }
440
440
  realpathSync(filePath) {
441
441
  return this._normalizePath(filePath);
@@ -472,7 +472,7 @@ class $995ba0f44994569b$export$3048eb7ec07c2c4e {
472
472
  let events = this._eventQueue;
473
473
  this._eventQueue = [];
474
474
  for (let [dir, watchers] of this.watchers){
475
- if (!dir.endsWith((0, ($parcel$interopDefault($eHCLO$path))).sep)) dir += (0, ($parcel$interopDefault($eHCLO$path))).sep;
475
+ if (!dir.endsWith((0, ($parcel$interopDefault($f8tya$path))).sep)) dir += (0, ($parcel$interopDefault($f8tya$path))).sep;
476
476
  if (event.path.startsWith(dir)) for (let watcher of watchers)watcher.trigger(events);
477
477
  }
478
478
  }, 50);
@@ -490,7 +490,7 @@ class $995ba0f44994569b$export$3048eb7ec07c2c4e {
490
490
  }
491
491
  watch(dir, fn, opts) {
492
492
  dir = this._normalizePath(dir);
493
- let watcher = new $995ba0f44994569b$var$Watcher(fn, opts);
493
+ let watcher = new $fd981db2f03c0168$var$Watcher(fn, opts);
494
494
  let watchers = this.watchers.get(dir);
495
495
  if (!watchers) {
496
496
  watchers = new Set();
@@ -499,7 +499,7 @@ class $995ba0f44994569b$export$3048eb7ec07c2c4e {
499
499
  watchers.add(watcher);
500
500
  return Promise.resolve({
501
501
  unsubscribe: ()=>{
502
- watchers = (0, (/*@__PURE__*/$parcel$interopDefault($023b8d639760db5c$exports)))(watchers);
502
+ watchers = (0, (/*@__PURE__*/$parcel$interopDefault($3d4f77aca2be4887$exports)))(watchers);
503
503
  watchers.delete(watcher);
504
504
  if (watchers.size === 0) this.watchers.delete(dir);
505
505
  return Promise.resolve();
@@ -511,34 +511,34 @@ class $995ba0f44994569b$export$3048eb7ec07c2c4e {
511
511
  let len = Number(contents);
512
512
  let events = this.events.slice(len);
513
513
  let ignore = opts.ignore;
514
- if (ignore) events = events.filter((event)=>!ignore.some((i)=>event.path.startsWith(i + (0, ($parcel$interopDefault($eHCLO$path))).sep)));
514
+ if (ignore) events = events.filter((event)=>!ignore.some((i)=>event.path.startsWith(i + (0, ($parcel$interopDefault($f8tya$path))).sep)));
515
515
  return events;
516
516
  }
517
517
  async writeSnapshot(dir, snapshot) {
518
518
  await this.writeFile(snapshot, '' + this.events.length);
519
519
  }
520
520
  findAncestorFile(fileNames, fromDir, root) {
521
- return (0, $a9ed96e57e8d2cf3$export$d51a93c758976388)(this, fileNames, fromDir, root);
521
+ return (0, $b1261e905f7ec91b$export$d51a93c758976388)(this, fileNames, fromDir, root);
522
522
  }
523
523
  findNodeModule(moduleName, fromDir) {
524
- return (0, $a9ed96e57e8d2cf3$export$4c6d088a7d7f9947)(this, moduleName, fromDir);
524
+ return (0, $b1261e905f7ec91b$export$4c6d088a7d7f9947)(this, moduleName, fromDir);
525
525
  }
526
526
  findFirstFile(filePaths) {
527
- return (0, $a9ed96e57e8d2cf3$export$64df6e3182fd5b2d)(this, filePaths);
527
+ return (0, $b1261e905f7ec91b$export$64df6e3182fd5b2d)(this, filePaths);
528
528
  }
529
529
  }
530
- class $995ba0f44994569b$var$Watcher {
530
+ class $fd981db2f03c0168$var$Watcher {
531
531
  constructor(fn, options){
532
532
  this.fn = fn;
533
533
  this.options = options;
534
534
  }
535
535
  trigger(events) {
536
536
  let ignore = this.options.ignore;
537
- if (ignore) events = events.filter((event)=>!ignore.some((i)=>event.path.startsWith(i + (0, ($parcel$interopDefault($eHCLO$path))).sep)));
537
+ if (ignore) events = events.filter((event)=>!ignore.some((i)=>event.path.startsWith(i + (0, ($parcel$interopDefault($f8tya$path))).sep)));
538
538
  if (events.length > 0) this.fn(null, events);
539
539
  }
540
540
  }
541
- class $995ba0f44994569b$export$d414276624ebf134 extends Error {
541
+ class $fd981db2f03c0168$export$d414276624ebf134 extends Error {
542
542
  constructor(code, path, message){
543
543
  super(`${code}: ${path} ${message}`);
544
544
  this.name = 'FSError';
@@ -547,7 +547,7 @@ class $995ba0f44994569b$export$d414276624ebf134 extends Error {
547
547
  Error.captureStackTrace?.(this, this.constructor);
548
548
  }
549
549
  }
550
- class $995ba0f44994569b$var$ReadStream extends (0, $eHCLO$stream.Readable) {
550
+ class $fd981db2f03c0168$var$ReadStream extends (0, $f8tya$stream.Readable) {
551
551
  constructor(fs, filePath){
552
552
  super();
553
553
  this.fs = fs;
@@ -567,7 +567,7 @@ class $995ba0f44994569b$var$ReadStream extends (0, $eHCLO$stream.Readable) {
567
567
  });
568
568
  }
569
569
  }
570
- class $995ba0f44994569b$var$WriteStream extends (0, $eHCLO$stream.Writable) {
570
+ class $fd981db2f03c0168$var$WriteStream extends (0, $f8tya$stream.Writable) {
571
571
  constructor(fs, filePath, options){
572
572
  super({
573
573
  emitClose: true,
@@ -576,11 +576,11 @@ class $995ba0f44994569b$var$WriteStream extends (0, $eHCLO$stream.Writable) {
576
576
  this.fs = fs;
577
577
  this.filePath = filePath;
578
578
  this.options = options;
579
- this.buffer = $995ba0f44994569b$require$Buffer.alloc(0);
579
+ this.buffer = $fd981db2f03c0168$require$Buffer.alloc(0);
580
580
  }
581
581
  _write(chunk, encoding, callback) {
582
- let c = typeof chunk === 'string' ? $995ba0f44994569b$require$Buffer.from(chunk, encoding) : chunk;
583
- this.buffer = $995ba0f44994569b$require$Buffer.concat([
582
+ let c = typeof chunk === 'string' ? $fd981db2f03c0168$require$Buffer.from(chunk, encoding) : chunk;
583
+ this.buffer = $fd981db2f03c0168$require$Buffer.concat([
584
584
  this.buffer,
585
585
  c
586
586
  ]);
@@ -590,11 +590,11 @@ class $995ba0f44994569b$var$WriteStream extends (0, $eHCLO$stream.Writable) {
590
590
  this.fs.writeFile(this.filePath, this.buffer, this.options).then(callback).catch(callback);
591
591
  }
592
592
  }
593
- const $995ba0f44994569b$var$S_IFREG = 32768;
594
- const $995ba0f44994569b$var$S_IFDIR = 16384;
595
- const $995ba0f44994569b$var$S_IFLNK = 40960;
596
- const $995ba0f44994569b$var$S_IFMT = 61440;
597
- class $995ba0f44994569b$var$Entry {
593
+ const $fd981db2f03c0168$var$S_IFREG = 32768;
594
+ const $fd981db2f03c0168$var$S_IFDIR = 16384;
595
+ const $fd981db2f03c0168$var$S_IFLNK = 40960;
596
+ const $fd981db2f03c0168$var$S_IFMT = 61440;
597
+ class $fd981db2f03c0168$var$Entry {
598
598
  constructor(mode){
599
599
  this.mode = mode;
600
600
  let now = Date.now();
@@ -618,10 +618,10 @@ class $995ba0f44994569b$var$Entry {
618
618
  return 0;
619
619
  }
620
620
  stat() {
621
- return new $995ba0f44994569b$var$Stat(this);
621
+ return new $fd981db2f03c0168$var$Stat(this);
622
622
  }
623
623
  }
624
- class $995ba0f44994569b$var$Stat {
624
+ class $fd981db2f03c0168$var$Stat {
625
625
  dev = 0;
626
626
  ino = 0;
627
627
  nlink = 0;
@@ -643,10 +643,10 @@ class $995ba0f44994569b$var$Stat {
643
643
  this.birthtime = new Date(entry.birthtime);
644
644
  }
645
645
  isFile() {
646
- return Boolean(this.mode & $995ba0f44994569b$var$S_IFREG);
646
+ return Boolean(this.mode & $fd981db2f03c0168$var$S_IFREG);
647
647
  }
648
648
  isDirectory() {
649
- return Boolean(this.mode & $995ba0f44994569b$var$S_IFDIR);
649
+ return Boolean(this.mode & $fd981db2f03c0168$var$S_IFDIR);
650
650
  }
651
651
  isBlockDevice() {
652
652
  return false;
@@ -664,17 +664,17 @@ class $995ba0f44994569b$var$Stat {
664
664
  return false;
665
665
  }
666
666
  }
667
- class $995ba0f44994569b$var$Dirent {
667
+ class $fd981db2f03c0168$var$Dirent {
668
668
  #mode;
669
669
  constructor(name, entry){
670
670
  this.name = name;
671
671
  this.#mode = entry.mode;
672
672
  }
673
673
  isFile() {
674
- return (this.#mode & $995ba0f44994569b$var$S_IFMT) === $995ba0f44994569b$var$S_IFREG;
674
+ return (this.#mode & $fd981db2f03c0168$var$S_IFMT) === $fd981db2f03c0168$var$S_IFREG;
675
675
  }
676
676
  isDirectory() {
677
- return (this.#mode & $995ba0f44994569b$var$S_IFMT) === $995ba0f44994569b$var$S_IFDIR;
677
+ return (this.#mode & $fd981db2f03c0168$var$S_IFMT) === $fd981db2f03c0168$var$S_IFDIR;
678
678
  }
679
679
  isBlockDevice() {
680
680
  return false;
@@ -683,7 +683,7 @@ class $995ba0f44994569b$var$Dirent {
683
683
  return false;
684
684
  }
685
685
  isSymbolicLink() {
686
- return (this.#mode & $995ba0f44994569b$var$S_IFMT) === $995ba0f44994569b$var$S_IFLNK;
686
+ return (this.#mode & $fd981db2f03c0168$var$S_IFMT) === $fd981db2f03c0168$var$S_IFLNK;
687
687
  }
688
688
  isFIFO() {
689
689
  return false;
@@ -692,55 +692,55 @@ class $995ba0f44994569b$var$Dirent {
692
692
  return false;
693
693
  }
694
694
  }
695
- class $995ba0f44994569b$export$b6afa8811b7e644e extends $995ba0f44994569b$var$Entry {
695
+ class $fd981db2f03c0168$export$b6afa8811b7e644e extends $fd981db2f03c0168$var$Entry {
696
696
  constructor(buffer, mode){
697
- super($995ba0f44994569b$var$S_IFREG | mode);
697
+ super($fd981db2f03c0168$var$S_IFREG | mode);
698
698
  this.buffer = buffer;
699
699
  }
700
700
  read() {
701
701
  super.access();
702
- return $995ba0f44994569b$require$Buffer.from(this.buffer);
702
+ return $fd981db2f03c0168$require$Buffer.from(this.buffer);
703
703
  }
704
704
  write(buffer, mode) {
705
- super.modify($995ba0f44994569b$var$S_IFREG | mode);
705
+ super.modify($fd981db2f03c0168$var$S_IFREG | mode);
706
706
  this.buffer = buffer;
707
707
  }
708
708
  getSize() {
709
709
  return this.buffer.byteLength;
710
710
  }
711
711
  }
712
- class $995ba0f44994569b$var$Directory extends $995ba0f44994569b$var$Entry {
712
+ class $fd981db2f03c0168$var$Directory extends $fd981db2f03c0168$var$Entry {
713
713
  constructor(){
714
- super($995ba0f44994569b$var$S_IFDIR);
714
+ super($fd981db2f03c0168$var$S_IFDIR);
715
715
  }
716
716
  }
717
- function $995ba0f44994569b$export$df9eb3e75aa27a22(contents) {
718
- if (typeof contents !== 'string' && contents.buffer instanceof (0, $eHCLO$atlaspackutils.SharedBuffer)) return contents;
717
+ function $fd981db2f03c0168$export$df9eb3e75aa27a22(contents) {
718
+ if (typeof contents !== 'string' && contents.buffer instanceof (0, $f8tya$atlaspackutils.SharedBuffer)) return contents;
719
719
  let contentsBuffer = contents;
720
720
  // For the polyfilled buffer module, it's faster to always convert once so that the subsequent
721
721
  // operations are fast (.byteLength and using .set instead of .write)
722
- contentsBuffer = contentsBuffer instanceof $995ba0f44994569b$require$Buffer ? contentsBuffer : $995ba0f44994569b$require$Buffer.from(contentsBuffer);
723
- let length = $995ba0f44994569b$require$Buffer.byteLength(contentsBuffer);
724
- let shared = new (0, $eHCLO$atlaspackutils.SharedBuffer)(length);
725
- let buffer = $995ba0f44994569b$require$Buffer.from(shared);
722
+ contentsBuffer = contentsBuffer instanceof $fd981db2f03c0168$require$Buffer ? contentsBuffer : $fd981db2f03c0168$require$Buffer.from(contentsBuffer);
723
+ let length = $fd981db2f03c0168$require$Buffer.byteLength(contentsBuffer);
724
+ let shared = new (0, $f8tya$atlaspackutils.SharedBuffer)(length);
725
+ let buffer = $fd981db2f03c0168$require$Buffer.from(shared);
726
726
  if (length > 0) {
727
727
  if (typeof contentsBuffer === 'string') buffer.write(contentsBuffer);
728
728
  else buffer.set(contentsBuffer);
729
729
  }
730
730
  return buffer;
731
731
  }
732
- class $995ba0f44994569b$var$WorkerFS extends $995ba0f44994569b$export$3048eb7ec07c2c4e {
732
+ class $fd981db2f03c0168$var$WorkerFS extends $fd981db2f03c0168$export$3048eb7ec07c2c4e {
733
733
  constructor(id, handle){
734
734
  // TODO Make this not a subclass
735
735
  // $FlowFixMe
736
736
  super();
737
737
  this.id = id;
738
- this.handleFn = (methodName, args)=>(0, ($parcel$interopDefault($eHCLO$atlaspackworkers))).getWorkerApi().runHandle(handle, [
738
+ this.handleFn = (methodName, args)=>(0, ($parcel$interopDefault($f8tya$atlaspackworkers))).getWorkerApi().runHandle(handle, [
739
739
  methodName,
740
740
  args
741
741
  ]);
742
742
  this.handleFn('_registerWorker', [
743
- (0, ($parcel$interopDefault($eHCLO$atlaspackworkers))).getWorkerApi().createReverseHandle((event)=>{
743
+ (0, ($parcel$interopDefault($f8tya$atlaspackworkers))).getWorkerApi().createReverseHandle((event)=>{
744
744
  switch(event.type){
745
745
  case 'writeFile':
746
746
  this.files.set(event.path, event.entry);
@@ -751,7 +751,7 @@ class $995ba0f44994569b$var$WorkerFS extends $995ba0f44994569b$export$3048eb7ec0
751
751
  this.symlinks.delete(event.path);
752
752
  break;
753
753
  case 'mkdir':
754
- this.dirs.set(event.path, new $995ba0f44994569b$var$Directory());
754
+ this.dirs.set(event.path, new $fd981db2f03c0168$var$Directory());
755
755
  break;
756
756
  case 'symlink':
757
757
  this.symlinks.set(event.path, event.target);
@@ -761,7 +761,7 @@ class $995ba0f44994569b$var$WorkerFS extends $995ba0f44994569b$export$3048eb7ec0
761
761
  ]);
762
762
  }
763
763
  static deserialize(opts) {
764
- return (0, (/*@__PURE__*/$parcel$interopDefault($023b8d639760db5c$exports)))($995ba0f44994569b$var$instances.get(opts.id));
764
+ return (0, (/*@__PURE__*/$parcel$interopDefault($3d4f77aca2be4887$exports)))($fd981db2f03c0168$var$instances.get(opts.id));
765
765
  }
766
766
  serialize() {
767
767
  // $FlowFixMe
@@ -771,7 +771,7 @@ class $995ba0f44994569b$var$WorkerFS extends $995ba0f44994569b$export$3048eb7ec0
771
771
  }
772
772
  writeFile(filePath, contents, options) {
773
773
  super.writeFile(filePath, contents, options);
774
- let buffer = $995ba0f44994569b$export$df9eb3e75aa27a22(contents);
774
+ let buffer = $fd981db2f03c0168$export$df9eb3e75aa27a22(contents);
775
775
  return this.handleFn('writeFile', [
776
776
  filePath,
777
777
  buffer,
@@ -811,16 +811,16 @@ class $995ba0f44994569b$var$WorkerFS extends $995ba0f44994569b$export$3048eb7ec0
811
811
  ]);
812
812
  }
813
813
  }
814
- (0, $eHCLO$atlaspackcore.registerSerializableClass)(`${(0, (/*@__PURE__*/$parcel$interopDefault($b6ff243d7d5008ac$exports))).version}:MemoryFS`, $995ba0f44994569b$export$3048eb7ec07c2c4e);
815
- (0, $eHCLO$atlaspackcore.registerSerializableClass)(`${(0, (/*@__PURE__*/$parcel$interopDefault($b6ff243d7d5008ac$exports))).version}:WorkerFS`, $995ba0f44994569b$var$WorkerFS);
816
- (0, $eHCLO$atlaspackcore.registerSerializableClass)(`${(0, (/*@__PURE__*/$parcel$interopDefault($b6ff243d7d5008ac$exports))).version}:Stat`, $995ba0f44994569b$var$Stat);
817
- (0, $eHCLO$atlaspackcore.registerSerializableClass)(`${(0, (/*@__PURE__*/$parcel$interopDefault($b6ff243d7d5008ac$exports))).version}:File`, $995ba0f44994569b$export$b6afa8811b7e644e);
818
- (0, $eHCLO$atlaspackcore.registerSerializableClass)(`${(0, (/*@__PURE__*/$parcel$interopDefault($b6ff243d7d5008ac$exports))).version}:Directory`, $995ba0f44994569b$var$Directory);
814
+ (0, $f8tya$atlaspackcore.registerSerializableClass)(`${(0, (/*@__PURE__*/$parcel$interopDefault($db6724898b38062a$exports))).version}:MemoryFS`, $fd981db2f03c0168$export$3048eb7ec07c2c4e);
815
+ (0, $f8tya$atlaspackcore.registerSerializableClass)(`${(0, (/*@__PURE__*/$parcel$interopDefault($db6724898b38062a$exports))).version}:WorkerFS`, $fd981db2f03c0168$var$WorkerFS);
816
+ (0, $f8tya$atlaspackcore.registerSerializableClass)(`${(0, (/*@__PURE__*/$parcel$interopDefault($db6724898b38062a$exports))).version}:Stat`, $fd981db2f03c0168$var$Stat);
817
+ (0, $f8tya$atlaspackcore.registerSerializableClass)(`${(0, (/*@__PURE__*/$parcel$interopDefault($db6724898b38062a$exports))).version}:File`, $fd981db2f03c0168$export$b6afa8811b7e644e);
818
+ (0, $f8tya$atlaspackcore.registerSerializableClass)(`${(0, (/*@__PURE__*/$parcel$interopDefault($db6724898b38062a$exports))).version}:Directory`, $fd981db2f03c0168$var$Directory);
819
819
 
820
820
 
821
- var $49e8d7e24153085c$exports = {};
821
+ var $68f42b77897ad65b$exports = {};
822
822
 
823
- $parcel$export($49e8d7e24153085c$exports, "OverlayFS", () => $49e8d7e24153085c$export$5963299e2424ca1c);
823
+ $parcel$export($68f42b77897ad65b$exports, "OverlayFS", () => $68f42b77897ad65b$export$5963299e2424ca1c);
824
824
 
825
825
 
826
826
 
@@ -828,16 +828,16 @@ $parcel$export($49e8d7e24153085c$exports, "OverlayFS", () => $49e8d7e24153085c$e
828
828
 
829
829
 
830
830
 
831
- class $49e8d7e24153085c$export$5963299e2424ca1c {
831
+ class $68f42b77897ad65b$export$5963299e2424ca1c {
832
832
  deleted = new Set();
833
833
  constructor(workerFarmOrFS, readable){
834
- if (workerFarmOrFS instanceof (0, ($parcel$interopDefault($eHCLO$atlaspackworkers)))) this.writable = new (0, $995ba0f44994569b$export$3048eb7ec07c2c4e)(workerFarmOrFS);
834
+ if (workerFarmOrFS instanceof (0, ($parcel$interopDefault($f8tya$atlaspackworkers)))) this.writable = new (0, $fd981db2f03c0168$export$3048eb7ec07c2c4e)(workerFarmOrFS);
835
835
  else this.writable = workerFarmOrFS;
836
836
  this.readable = readable;
837
837
  this._cwd = readable.cwd();
838
838
  }
839
839
  static deserialize(opts) {
840
- let fs = new $49e8d7e24153085c$export$5963299e2424ca1c(opts.writable, opts.readable);
840
+ let fs = new $68f42b77897ad65b$export$5963299e2424ca1c(opts.writable, opts.readable);
841
841
  if (opts.deleted != null) fs.deleted = opts.deleted;
842
842
  return fs;
843
843
  }
@@ -851,28 +851,28 @@ class $49e8d7e24153085c$export$5963299e2424ca1c {
851
851
  }
852
852
  _deletedThrows(filePath) {
853
853
  filePath = this._normalizePath(filePath);
854
- if (this.deleted.has(filePath)) throw new $49e8d7e24153085c$var$FSError('ENOENT', filePath, 'does not exist');
854
+ if (this.deleted.has(filePath)) throw new $68f42b77897ad65b$var$FSError('ENOENT', filePath, 'does not exist');
855
855
  return filePath;
856
856
  }
857
857
  _checkExists(filePath) {
858
858
  filePath = this._deletedThrows(filePath);
859
- if (!this.existsSync(filePath)) throw new $49e8d7e24153085c$var$FSError('ENOENT', filePath, 'does not exist');
859
+ if (!this.existsSync(filePath)) throw new $68f42b77897ad65b$var$FSError('ENOENT', filePath, 'does not exist');
860
860
  return filePath;
861
861
  }
862
862
  _isSymlink(filePath) {
863
863
  filePath = this._normalizePath(filePath);
864
864
  // Check the parts of the path to see if any are symlinks.
865
- let { root: root, dir: dir, base: base } = (0, ($parcel$interopDefault($eHCLO$path))).parse(filePath);
866
- let segments = dir.slice(root.length).split((0, ($parcel$interopDefault($eHCLO$path))).sep).concat(base);
865
+ let { root: root, dir: dir, base: base } = (0, ($parcel$interopDefault($f8tya$path))).parse(filePath);
866
+ let segments = dir.slice(root.length).split((0, ($parcel$interopDefault($f8tya$path))).sep).concat(base);
867
867
  while(segments.length){
868
- filePath = (0, ($parcel$interopDefault($eHCLO$path))).join(root, ...segments);
868
+ filePath = (0, ($parcel$interopDefault($f8tya$path))).join(root, ...segments);
869
869
  let name = segments.pop();
870
870
  if (this.deleted.has(filePath)) return false;
871
- else if (this.writable instanceof (0, $995ba0f44994569b$export$3048eb7ec07c2c4e) && this.writable.symlinks.has(filePath)) return true;
871
+ else if (this.writable instanceof (0, $fd981db2f03c0168$export$3048eb7ec07c2c4e) && this.writable.symlinks.has(filePath)) return true;
872
872
  else {
873
873
  // HACK: Atlaspack fs does not provide `lstatSync`,
874
874
  // so we use `readdirSync` to check if the path is a symlink.
875
- let parent = (0, ($parcel$interopDefault($eHCLO$path))).resolve(filePath, '..');
875
+ let parent = (0, ($parcel$interopDefault($f8tya$path))).resolve(filePath, '..');
876
876
  if (parent === filePath) return false;
877
877
  try {
878
878
  for (let dirent of this.readdirSync(parent, {
@@ -893,12 +893,12 @@ class $49e8d7e24153085c$export$5963299e2424ca1c {
893
893
  }
894
894
  async _copyPathForWrite(filePath) {
895
895
  filePath = await this._normalizePath(filePath);
896
- let dirPath = (0, ($parcel$interopDefault($eHCLO$path))).dirname(filePath);
896
+ let dirPath = (0, ($parcel$interopDefault($f8tya$path))).dirname(filePath);
897
897
  if (this.existsSync(dirPath) && !this.writable.existsSync(dirPath)) await this.writable.mkdirp(dirPath);
898
898
  return filePath;
899
899
  }
900
900
  _normalizePath(filePath) {
901
- return (0, ($parcel$interopDefault($eHCLO$path))).resolve(this.cwd(), filePath);
901
+ return (0, ($parcel$interopDefault($f8tya$path))).resolve(this.cwd(), filePath);
902
902
  }
903
903
  // eslint-disable-next-line require-await
904
904
  async readFile(filePath, encoding) {
@@ -931,22 +931,22 @@ class $49e8d7e24153085c$export$5963299e2424ca1c {
931
931
  let toDelete = [
932
932
  filePath
933
933
  ];
934
- if (this.writable instanceof (0, $995ba0f44994569b$export$3048eb7ec07c2c4e) && this._isSymlink(filePath)) this.writable.symlinks.delete(filePath);
934
+ if (this.writable instanceof (0, $fd981db2f03c0168$export$3048eb7ec07c2c4e) && this._isSymlink(filePath)) this.writable.symlinks.delete(filePath);
935
935
  else if (this.statSync(filePath).isDirectory()) {
936
936
  let stack = [
937
937
  filePath
938
938
  ];
939
939
  // Recursively add every descendant path to deleted.
940
940
  while(stack.length){
941
- let root = (0, (/*@__PURE__*/$parcel$interopDefault($023b8d639760db5c$exports)))(stack.pop());
941
+ let root = (0, (/*@__PURE__*/$parcel$interopDefault($3d4f77aca2be4887$exports)))(stack.pop());
942
942
  for (let ent of this.readdirSync(root, {
943
943
  withFileTypes: true
944
944
  }))if (typeof ent === 'string') {
945
- let childPath = (0, ($parcel$interopDefault($eHCLO$path))).join(root, ent);
945
+ let childPath = (0, ($parcel$interopDefault($f8tya$path))).join(root, ent);
946
946
  toDelete.push(childPath);
947
947
  if (this.statSync(childPath).isDirectory()) stack.push(childPath);
948
948
  } else {
949
- let childPath = (0, ($parcel$interopDefault($eHCLO$path))).join(root, ent.name);
949
+ let childPath = (0, ($parcel$interopDefault($f8tya$path))).join(root, ent.name);
950
950
  toDelete.push(childPath);
951
951
  if (ent.isDirectory()) stack.push(childPath);
952
952
  }
@@ -963,10 +963,10 @@ class $49e8d7e24153085c$export$5963299e2424ca1c {
963
963
  dir = this._normalizePath(dir);
964
964
  await this.writable.mkdirp(dir);
965
965
  if (this.deleted != null) {
966
- let root = (0, ($parcel$interopDefault($eHCLO$path))).parse(dir).root;
966
+ let root = (0, ($parcel$interopDefault($f8tya$path))).parse(dir).root;
967
967
  while(dir !== root){
968
968
  this.deleted.delete(dir);
969
- dir = (0, ($parcel$interopDefault($eHCLO$path))).dirname(dir);
969
+ dir = (0, ($parcel$interopDefault($f8tya$path))).dirname(dir);
970
970
  }
971
971
  }
972
972
  }
@@ -1052,7 +1052,7 @@ class $49e8d7e24153085c$export$5963299e2424ca1c {
1052
1052
  let entries = new Map();
1053
1053
  try {
1054
1054
  for (let entry of this.writable.readdirSync(dir, opts)){
1055
- let filePath = (0, ($parcel$interopDefault($eHCLO$path))).join(dir, entry.name ?? entry);
1055
+ let filePath = (0, ($parcel$interopDefault($f8tya$path))).join(dir, entry.name ?? entry);
1056
1056
  if (this.deleted.has(filePath)) continue;
1057
1057
  entries.set(filePath, entry);
1058
1058
  }
@@ -1061,7 +1061,7 @@ class $49e8d7e24153085c$export$5963299e2424ca1c {
1061
1061
  }
1062
1062
  try {
1063
1063
  for (let entry of this.readable.readdirSync(dir, opts)){
1064
- let filePath = (0, ($parcel$interopDefault($eHCLO$path))).join(dir, entry.name ?? entry);
1064
+ let filePath = (0, ($parcel$interopDefault($f8tya$path))).join(dir, entry.name ?? entry);
1065
1065
  if (this.deleted.has(filePath)) continue;
1066
1066
  if (entries.has(filePath)) continue;
1067
1067
  entries.set(filePath, entry);
@@ -1093,16 +1093,16 @@ class $49e8d7e24153085c$export$5963299e2424ca1c {
1093
1093
  await this.writable.writeSnapshot(dir, snapshot, opts);
1094
1094
  }
1095
1095
  findAncestorFile(fileNames, fromDir, root) {
1096
- return (0, $a9ed96e57e8d2cf3$export$d51a93c758976388)(this, fileNames, fromDir, root);
1096
+ return (0, $b1261e905f7ec91b$export$d51a93c758976388)(this, fileNames, fromDir, root);
1097
1097
  }
1098
1098
  findNodeModule(moduleName, fromDir) {
1099
- return (0, $a9ed96e57e8d2cf3$export$4c6d088a7d7f9947)(this, moduleName, fromDir);
1099
+ return (0, $b1261e905f7ec91b$export$4c6d088a7d7f9947)(this, moduleName, fromDir);
1100
1100
  }
1101
1101
  findFirstFile(filePaths) {
1102
- return (0, $a9ed96e57e8d2cf3$export$64df6e3182fd5b2d)(this, filePaths);
1102
+ return (0, $b1261e905f7ec91b$export$64df6e3182fd5b2d)(this, filePaths);
1103
1103
  }
1104
1104
  }
1105
- class $49e8d7e24153085c$var$FSError extends Error {
1105
+ class $68f42b77897ad65b$var$FSError extends Error {
1106
1106
  constructor(code, path, message){
1107
1107
  super(`${code}: ${path} ${message}`);
1108
1108
  this.name = 'FSError';
@@ -1111,24 +1111,24 @@ class $49e8d7e24153085c$var$FSError extends Error {
1111
1111
  Error.captureStackTrace?.(this, this.constructor);
1112
1112
  }
1113
1113
  }
1114
- (0, $eHCLO$atlaspackcore.registerSerializableClass)(`${(0, (/*@__PURE__*/$parcel$interopDefault($b6ff243d7d5008ac$exports))).version}:OverlayFS`, $49e8d7e24153085c$export$5963299e2424ca1c);
1114
+ (0, $f8tya$atlaspackcore.registerSerializableClass)(`${(0, (/*@__PURE__*/$parcel$interopDefault($db6724898b38062a$exports))).version}:OverlayFS`, $68f42b77897ad65b$export$5963299e2424ca1c);
1115
1115
 
1116
1116
 
1117
- const $416aba2172cbc610$var$pipeline = (0, $eHCLO$util.promisify)((0, ($parcel$interopDefault($eHCLO$stream))).pipeline);
1118
- async function $416aba2172cbc610$export$d3a8044e3fef7335(sourceFS, source, destinationFS, destination) {
1117
+ const $5a5d53c6cbc0ea26$var$pipeline = (0, $f8tya$util.promisify)((0, ($parcel$interopDefault($f8tya$stream))).pipeline);
1118
+ async function $5a5d53c6cbc0ea26$export$d3a8044e3fef7335(sourceFS, source, destinationFS, destination) {
1119
1119
  await destinationFS.mkdirp(destination);
1120
1120
  let files = await sourceFS.readdir(source);
1121
1121
  for (let file of files){
1122
- let sourcePath = (0, ($parcel$interopDefault($eHCLO$path))).join(source, file);
1123
- let destPath = (0, ($parcel$interopDefault($eHCLO$path))).join(destination, file);
1122
+ let sourcePath = (0, ($parcel$interopDefault($f8tya$path))).join(source, file);
1123
+ let destPath = (0, ($parcel$interopDefault($f8tya$path))).join(destination, file);
1124
1124
  let stats = await sourceFS.stat(sourcePath);
1125
- if (stats.isFile()) await $416aba2172cbc610$var$pipeline(sourceFS.createReadStream(sourcePath), destinationFS.createWriteStream(destPath));
1126
- else if (stats.isDirectory()) await $416aba2172cbc610$export$d3a8044e3fef7335(sourceFS, sourcePath, destinationFS, destPath);
1125
+ if (stats.isFile()) await $5a5d53c6cbc0ea26$var$pipeline(sourceFS.createReadStream(sourcePath), destinationFS.createWriteStream(destPath));
1126
+ else if (stats.isDirectory()) await $5a5d53c6cbc0ea26$export$d3a8044e3fef7335(sourceFS, sourcePath, destinationFS, destPath);
1127
1127
  }
1128
1128
  }
1129
- $parcel$exportWildcard(module.exports, $4d6ec4a7ba8784a9$exports);
1130
- $parcel$exportWildcard(module.exports, $995ba0f44994569b$exports);
1131
- $parcel$exportWildcard(module.exports, $49e8d7e24153085c$exports);
1129
+ $parcel$exportWildcard(module.exports, $a6946eeec72f95a7$exports);
1130
+ $parcel$exportWildcard(module.exports, $fd981db2f03c0168$exports);
1131
+ $parcel$exportWildcard(module.exports, $68f42b77897ad65b$exports);
1132
1132
 
1133
1133
 
1134
1134
  //# sourceMappingURL=browser.js.map