@theia/filesystem 1.77.0-next.57 → 1.77.0-next.63

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.
Files changed (75) hide show
  1. package/lib/common/filesystem-watcher-protocol.d.ts +4 -0
  2. package/lib/common/filesystem-watcher-protocol.d.ts.map +1 -1
  3. package/lib/node/disk-file-system-provider.d.ts.map +1 -1
  4. package/lib/node/disk-file-system-provider.js +2 -1
  5. package/lib/node/disk-file-system-provider.js.map +1 -1
  6. package/lib/node/filesystem-backend-module.d.ts +2 -2
  7. package/lib/node/filesystem-backend-module.d.ts.map +1 -1
  8. package/lib/node/filesystem-backend-module.js +5 -4
  9. package/lib/node/filesystem-backend-module.js.map +1 -1
  10. package/lib/node/filesystem-watcher-service-impl.d.ts +30 -0
  11. package/lib/node/filesystem-watcher-service-impl.d.ts.map +1 -0
  12. package/lib/node/filesystem-watcher-service-impl.js +92 -0
  13. package/lib/node/filesystem-watcher-service-impl.js.map +1 -0
  14. package/lib/node/filesystem-watcher-service-impl.spec.d.ts +2 -0
  15. package/lib/node/filesystem-watcher-service-impl.spec.d.ts.map +1 -0
  16. package/lib/node/filesystem-watcher-service-impl.spec.js +202 -0
  17. package/lib/node/filesystem-watcher-service-impl.spec.js.map +1 -0
  18. package/lib/node/filesystem-watcher.d.ts +93 -0
  19. package/lib/node/filesystem-watcher.d.ts.map +1 -0
  20. package/lib/node/filesystem-watcher.js +134 -0
  21. package/lib/node/filesystem-watcher.js.map +1 -0
  22. package/lib/node/nodejs-watcher/node-directory-watcher.d.ts +175 -0
  23. package/lib/node/nodejs-watcher/node-directory-watcher.d.ts.map +1 -0
  24. package/lib/node/nodejs-watcher/node-directory-watcher.js +580 -0
  25. package/lib/node/nodejs-watcher/node-directory-watcher.js.map +1 -0
  26. package/lib/node/nodejs-watcher/node-directory-watcher.spec.d.ts +2 -0
  27. package/lib/node/nodejs-watcher/node-directory-watcher.spec.d.ts.map +1 -0
  28. package/lib/node/nodejs-watcher/node-directory-watcher.spec.js +1284 -0
  29. package/lib/node/nodejs-watcher/node-directory-watcher.spec.js.map +1 -0
  30. package/lib/node/nodejs-watcher/watch-request-router.d.ts +63 -0
  31. package/lib/node/nodejs-watcher/watch-request-router.d.ts.map +1 -0
  32. package/lib/node/nodejs-watcher/watch-request-router.js +183 -0
  33. package/lib/node/nodejs-watcher/watch-request-router.js.map +1 -0
  34. package/lib/node/nodejs-watcher/watcher-host.d.ts +50 -0
  35. package/lib/node/nodejs-watcher/watcher-host.d.ts.map +1 -0
  36. package/lib/node/nodejs-watcher/watcher-host.js +99 -0
  37. package/lib/node/nodejs-watcher/watcher-host.js.map +1 -0
  38. package/lib/node/parcel-watcher/index.js +2 -2
  39. package/lib/node/parcel-watcher/index.js.map +1 -1
  40. package/lib/node/parcel-watcher/parcel-filesystem-service.d.ts +14 -194
  41. package/lib/node/parcel-watcher/parcel-filesystem-service.d.ts.map +1 -1
  42. package/lib/node/parcel-watcher/parcel-filesystem-service.js +7 -424
  43. package/lib/node/parcel-watcher/parcel-filesystem-service.js.map +1 -1
  44. package/lib/node/parcel-watcher/parcel-filesystem-watcher.spec.js +2 -2
  45. package/lib/node/parcel-watcher/parcel-filesystem-watcher.spec.js.map +1 -1
  46. package/lib/node/parcel-watcher/parcel-watcher-exclude.spec.js +3 -3
  47. package/lib/node/parcel-watcher/parcel-watcher-exclude.spec.js.map +1 -1
  48. package/lib/node/parcel-watcher/parcel-watcher-retry.spec.js +2 -2
  49. package/lib/node/parcel-watcher/parcel-watcher-retry.spec.js.map +1 -1
  50. package/lib/node/parcel-watcher/parcel-watcher.d.ts +165 -0
  51. package/lib/node/parcel-watcher/parcel-watcher.d.ts.map +1 -0
  52. package/lib/node/parcel-watcher/parcel-watcher.js +370 -0
  53. package/lib/node/parcel-watcher/parcel-watcher.js.map +1 -0
  54. package/lib/node/test/watcher-test-helper.d.ts +21 -0
  55. package/lib/node/test/watcher-test-helper.d.ts.map +1 -0
  56. package/lib/node/test/watcher-test-helper.js +56 -0
  57. package/lib/node/test/watcher-test-helper.js.map +1 -0
  58. package/package.json +3 -3
  59. package/src/common/filesystem-watcher-protocol.ts +4 -0
  60. package/src/node/disk-file-system-provider.ts +2 -1
  61. package/src/node/filesystem-backend-module.ts +5 -4
  62. package/src/node/filesystem-watcher-service-impl.spec.ts +272 -0
  63. package/src/node/filesystem-watcher-service-impl.ts +109 -0
  64. package/src/node/filesystem-watcher.ts +197 -0
  65. package/src/node/nodejs-watcher/node-directory-watcher.spec.ts +1594 -0
  66. package/src/node/nodejs-watcher/node-directory-watcher.ts +664 -0
  67. package/src/node/nodejs-watcher/watch-request-router.ts +224 -0
  68. package/src/node/nodejs-watcher/watcher-host.ts +126 -0
  69. package/src/node/parcel-watcher/index.ts +2 -2
  70. package/src/node/parcel-watcher/parcel-filesystem-service.ts +14 -500
  71. package/src/node/parcel-watcher/parcel-filesystem-watcher.spec.ts +4 -4
  72. package/src/node/parcel-watcher/parcel-watcher-exclude.spec.ts +4 -4
  73. package/src/node/parcel-watcher/parcel-watcher-retry.spec.ts +3 -3
  74. package/src/node/parcel-watcher/parcel-watcher.ts +432 -0
  75. package/src/node/test/watcher-test-helper.ts +58 -0
@@ -0,0 +1,580 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2026 Ehab Younes and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.DirectoryWatcherProvider = exports.NodeDirectoryWatcher = exports.DEFAULT_WATCHER_TIMINGS = exports.NodeDirectoryWatcherTimings = void 0;
19
+ const tslib_1 = require("tslib");
20
+ const path = tslib_1.__importStar(require("path"));
21
+ const core_1 = require("@theia/core");
22
+ const promise_util_1 = require("@theia/core/lib/common/promise-util");
23
+ const cancellation_1 = require("@theia/core/lib/common/cancellation");
24
+ const watcher_host_1 = require("./watcher-host");
25
+ const filesystem_watcher_1 = require("../filesystem-watcher");
26
+ const watch_request_router_1 = require("./watch-request-router");
27
+ const throttle = require("@theia/core/shared/lodash.throttle");
28
+ /** How far the poll interval stretches while a handle refuses to open. */
29
+ const MAX_OPEN_BACKOFF = 10;
30
+ var NodeDirectoryWatcherTimings;
31
+ (function (NodeDirectoryWatcherTimings) {
32
+ /** Every delay drives a `setTimeout`, where anything below 1ms silently becomes 1ms. */
33
+ function validate(timings) {
34
+ for (const [name, value] of Object.entries(timings)) {
35
+ if (!Number.isFinite(value) || value <= 0) {
36
+ throw new Error(`Watcher timing "${name}" must be a positive number, was ${value}`);
37
+ }
38
+ }
39
+ }
40
+ NodeDirectoryWatcherTimings.validate = validate;
41
+ })(NodeDirectoryWatcherTimings || (exports.NodeDirectoryWatcherTimings = NodeDirectoryWatcherTimings = {}));
42
+ exports.DEFAULT_WATCHER_TIMINGS = {
43
+ changeDelay: 75,
44
+ deleteDelay: 100,
45
+ existencePollDelay: 500,
46
+ deferredDisposalTimeout: 10_000
47
+ };
48
+ /**
49
+ * Watches one directory level with Node's `fs.watch`.
50
+ *
51
+ * One instance serves every non-recursive request resolving to the same directory, for the directory itself
52
+ * or for a single file in it. Sharing saves more than handles: on macOS libuv keeps one `FSEventStream` per
53
+ * event loop and rebuilds it whenever a handle opens or closes, losing every other watcher's events.
54
+ */
55
+ class NodeDirectoryWatcher extends filesystem_watcher_1.AbstractFileSystemWatcher {
56
+ constructor(target, options, client, timings = exports.DEFAULT_WATCHER_TIMINGS, host = new watcher_host_1.WatcherHost(options)) {
57
+ super(target, options);
58
+ this.client = client;
59
+ this.timings = timings;
60
+ this.host = host;
61
+ /** Direct children of {@link watchedDirectory}, kept in sync to classify changes and to diff a rescan. */
62
+ this.children = new Set();
63
+ /** Set once a start recorded the children. Until then, what clients saw of them is unknown. */
64
+ this.started = false;
65
+ /** Set once the watched path is found missing, until a start finds it. Changes wait for that start meanwhile. */
66
+ this.watchedPathMissing = false;
67
+ // Events in flight: aggregated, then resolved one batch at a time.
68
+ this.pendingEvents = [];
69
+ this.pendingDeletes = new Map();
70
+ // Lifecycle.
71
+ /** Cancels the start attempt in flight, so a superseded one opens no handle. */
72
+ this.attempt = new cancellation_1.CancellationTokenSource();
73
+ this.openFailed = false;
74
+ this.directoryResolvedEmitter = new core_1.Emitter();
75
+ /** Fires when {@link directory} changes, for example when a missing target appears as a file. */
76
+ this.onDidResolveDirectory = this.directoryResolvedEmitter.event;
77
+ this.router = this.createRouter();
78
+ NodeDirectoryWatcherTimings.validate(timings);
79
+ this.scheduleFlush = throttle(() => this.flush(), timings.changeDelay, { leading: false });
80
+ this.watchedDirectory = target;
81
+ this.watchPath = target;
82
+ this.childrenDirectory = target;
83
+ this.announcedDirectory = target;
84
+ // Queued, as a restart is, so that events flushed during the first read wait for its snapshot.
85
+ this.changeQueue = this.whenStarted = this.start(this.attempt.token)
86
+ .catch(error => this.error(`Watcher failed to start at "${this.target}":`, error));
87
+ }
88
+ /** The directory the handle is on, settled once {@link whenStarted} resolved. */
89
+ get directory() {
90
+ return this.watchedDirectory;
91
+ }
92
+ /** Drains the requests, so that they can be moved to the watcher serving their directory. */
93
+ takeRequests() {
94
+ return this.router.takeAll();
95
+ }
96
+ /**
97
+ * Serves requests that a re-key moved here. After the work queued before them runs, each hears where its path
98
+ * differs from what it takes it for.
99
+ */
100
+ adoptRequests(requests) {
101
+ if (requests.size === 0) {
102
+ return;
103
+ }
104
+ clearTimeout(this.disposalTimer);
105
+ this.router.adopt(requests);
106
+ this.changeQueue = this.changeQueue
107
+ .then(() => {
108
+ if (!this.isDisposed) {
109
+ this.router.admitAdopted();
110
+ if (this.started) {
111
+ // Otherwise the start in flight tells them.
112
+ this.reconcile();
113
+ }
114
+ }
115
+ })
116
+ .catch(error => this.error(`Watcher failed to adopt requests at "${this.watchedDirectory}":`, error));
117
+ }
118
+ createRouter() {
119
+ return new watch_request_router_1.WatchRequestRouter(this.client, this.host, () => this.watchedDirectory);
120
+ }
121
+ addRequest(watcherId, request) {
122
+ this.router.add(watcherId, request);
123
+ clearTimeout(this.disposalTimer);
124
+ this.debug('REQUEST++', `watcherId=${watcherId}, requests=${this.router.size}`);
125
+ }
126
+ removeRequest(watcherId) {
127
+ if (this.router.remove(watcherId) && this.router.size === 0) {
128
+ this.disposalTimer = setTimeout(() => this.dispose(), this.timings.deferredDisposalTimeout);
129
+ }
130
+ this.debug('REQUEST--', `watcherId=${watcherId}, requests=${this.router.size}`);
131
+ }
132
+ dispose() {
133
+ if (!this.markDisposed()) {
134
+ return;
135
+ }
136
+ this.attempt.cancel();
137
+ this.closeHandle();
138
+ this.clearPendingDeletes();
139
+ this.scheduleFlush.cancel();
140
+ clearTimeout(this.disposalTimer);
141
+ this.directoryResolvedEmitter.dispose();
142
+ this.debug('DISPOSED');
143
+ }
144
+ /** Waits for the target, then opens the handle before reading the children, so no change is missed. */
145
+ async start(token) {
146
+ if (this.host.isUnsupportedTarget(this.target)) {
147
+ this.error(`Refusing to watch "${this.target}": watching a macOS network share is unstable.`);
148
+ return;
149
+ }
150
+ await this.openWhenAvailable(token);
151
+ if (token.isCancellationRequested) {
152
+ return;
153
+ }
154
+ if (!this.host.samePath(this.watchedDirectory, this.childrenDirectory)) {
155
+ // The baseline lists another directory's children, so skip its diff.
156
+ this.restartBaseline = undefined;
157
+ }
158
+ const children = await this.readChildren(this.restartBaseline ?? new Set());
159
+ if (this.isDisposed) {
160
+ return;
161
+ }
162
+ if (await this.isWatchedDirectoryGone()) {
163
+ // Lost or replaced during the read, so the read describes no directory the handle is on.
164
+ this.restart();
165
+ return;
166
+ }
167
+ // Batches now resolve against this snapshot, so even a superseded start reports it.
168
+ this.children = children;
169
+ this.childrenDirectory = this.watchedDirectory;
170
+ this.started = true;
171
+ this.debug('STARTED', this.watchedDirectory);
172
+ this.watchedPathMissing = false;
173
+ // Before the diff, so a directory request hears of its directory before its children.
174
+ this.reconcile();
175
+ if (this.restartBaseline) {
176
+ this.router.report(this.diff(this.restartBaseline, children));
177
+ this.restartBaseline = undefined;
178
+ }
179
+ }
180
+ /** Polls until the target exists as a directory to watch and a handle is open. */
181
+ async openWhenAvailable(token) {
182
+ let failedOpens = 0;
183
+ while (!token.isCancellationRequested) {
184
+ if (!await this.host.exists(this.watchPath) || !await this.resolveWatchedDirectory()) {
185
+ this.reportLoss();
186
+ }
187
+ else {
188
+ if (!this.host.samePath(this.watchedDirectory, this.announcedDirectory)) {
189
+ // Announced before the handle opens, so a merge spares the directory a second handle.
190
+ this.announcedDirectory = this.watchedDirectory;
191
+ this.directoryResolvedEmitter.fire();
192
+ if (this.isDisposed) {
193
+ // Merged into the watcher already on the directory, which reports to the requests instead.
194
+ return;
195
+ }
196
+ }
197
+ // Read before the handle opens, so a replacement after this point shows as another identity.
198
+ const identity = await this.host.readIdentity(this.watchedDirectory);
199
+ if (identity && !token.isCancellationRequested) {
200
+ if (this.openHandle()) {
201
+ this.identity = identity;
202
+ break;
203
+ }
204
+ // EACCES or an exhausted budget does not clear on its own, so back off.
205
+ failedOpens = Math.min(failedOpens + 1, MAX_OPEN_BACKOFF);
206
+ }
207
+ }
208
+ await (0, promise_util_1.timeout)(this.timings.existencePollDelay * Math.max(failedOpens, 1), token).catch(() => undefined);
209
+ }
210
+ }
211
+ /** Records the watched path as missing, and tells each request that takes its path for existing. */
212
+ reportLoss() {
213
+ this.watchedPathMissing = true;
214
+ this.reconcile();
215
+ }
216
+ /** Tells each request where its own path differs from what the watcher last found, whenever it joined. */
217
+ reconcile() {
218
+ const knows = this.router.knows(this.children);
219
+ this.router.reconcile(request => !this.watchedPathMissing && knows(request));
220
+ }
221
+ /**
222
+ * Reads the children. A child renamed during the read keeps its membership in `known`, as the read can list it
223
+ * or not, and its own event reports it. Only a `rename` announces a creation or a deletion.
224
+ */
225
+ async readChildren(known) {
226
+ const renamed = this.renamedDuringRead = new Set();
227
+ let children;
228
+ try {
229
+ children = await this.host.readChildren(this.watchedDirectory);
230
+ }
231
+ finally {
232
+ this.renamedDuringRead = undefined;
233
+ }
234
+ for (const fileName of renamed) {
235
+ if (known.has(fileName)) {
236
+ children.add(fileName);
237
+ }
238
+ else {
239
+ children.delete(fileName);
240
+ }
241
+ }
242
+ return children;
243
+ }
244
+ /**
245
+ * Resolves the target to the directory to watch. Requests made while the target was missing are resolved
246
+ * here too, and narrowed to the file if the target is one.
247
+ * @returns `false` if the path is a file that the watcher cannot follow to its parent.
248
+ */
249
+ async resolveWatchedDirectory() {
250
+ const resolved = await this.host.resolveTarget(this.watchPath);
251
+ const isFile = !this.host.samePath(resolved.realPath, resolved.directory);
252
+ // Only requests for the target itself follow it to its parent. Requests inside it wait for the directory.
253
+ if (isFile && (this.watchPath !== this.target || !this.router.allFor(this.target))) {
254
+ return false;
255
+ }
256
+ if (isFile) {
257
+ // The target as watched is gone, and the start reports it added as a file.
258
+ this.reportLoss();
259
+ }
260
+ this.watchedDirectory = resolved.directory;
261
+ if (this.watchPath === this.target) {
262
+ this.router.resolveRequests(this.target, resolved.realPath);
263
+ if (isFile) {
264
+ // After the re-key, requests for the directory can join, so a restart polls the directory rather
265
+ // than the file.
266
+ this.watchPath = resolved.directory;
267
+ }
268
+ }
269
+ return true;
270
+ }
271
+ openHandle() {
272
+ try {
273
+ this.handle = this.host.watch(this.watchedDirectory, (eventType, fileName) => this.handleEvent(eventType, fileName));
274
+ this.handle.on('error', error => this.restart(error));
275
+ this.openFailed = false;
276
+ return true;
277
+ }
278
+ catch (error) {
279
+ // Polling recovers a missing directory, but not EACCES or an exhausted handle budget.
280
+ if (!this.openFailed) {
281
+ this.openFailed = true;
282
+ this.error(`Watcher failed to open a handle at "${this.watchedDirectory}", retrying every ${this.timings.existencePollDelay}ms:`, error);
283
+ }
284
+ return false;
285
+ }
286
+ }
287
+ closeHandle() {
288
+ if (this.handle) {
289
+ this.handle.removeAllListeners();
290
+ this.handle.close();
291
+ this.handle = undefined;
292
+ }
293
+ }
294
+ handleEvent(eventType, fileName) {
295
+ if (this.isDisposed) {
296
+ return;
297
+ }
298
+ // Windows reports a `ReadDirectoryChangesW` buffer overflow as a change without a file name. Only a
299
+ // rescan can recover the events lost with it.
300
+ const normalized = fileName ? this.host.normalizeFileName(fileName) : undefined;
301
+ if (normalized && eventType === 'rename') {
302
+ this.renamedDuringRead?.add(normalized);
303
+ }
304
+ this.pendingEvents.push({ eventType, fileName: normalized });
305
+ this.scheduleFlush();
306
+ }
307
+ flush() {
308
+ const events = this.pendingEvents.splice(0);
309
+ this.enqueue(() => this.processEvents(events));
310
+ }
311
+ /** Serializes the async parts of change handling so later events cannot overtake earlier ones. */
312
+ enqueue(resolve) {
313
+ this.changeQueue = this.changeQueue
314
+ .then(async () => {
315
+ // Runs even with no request attached: skipping would leave the children and a pending
316
+ // deletion stale for a request arriving within the disposal grace period. Before a start recorded
317
+ // the children, or while the directory is missing, the start or restart queued next covers it.
318
+ if (!this.isDisposed && this.started && !this.watchedPathMissing) {
319
+ const changes = await resolve();
320
+ // A request that joined while its path was briefly gone hears it is back, before any change inside it.
321
+ this.reconcile();
322
+ this.router.report(changes);
323
+ }
324
+ })
325
+ .catch(error => this.error(`Watcher failed to process changes at "${this.watchedDirectory}":`, error));
326
+ }
327
+ async processEvents(events) {
328
+ const changes = [];
329
+ let renamed = false;
330
+ let rescan = false;
331
+ const batch = this.createBatch();
332
+ for (const { eventType, fileName } of events) {
333
+ if (fileName === undefined) {
334
+ rescan = true;
335
+ }
336
+ else if (fileName.includes('/') || fileName.includes('\\')) {
337
+ continue;
338
+ }
339
+ else if (eventType === 'rename') {
340
+ renamed = true;
341
+ if (!await this.namesWatchedDirectory(fileName, batch)) {
342
+ const change = await this.resolveRename(fileName, batch);
343
+ if (change) {
344
+ changes.push(change);
345
+ }
346
+ }
347
+ }
348
+ else if (await this.namesWatchedDirectory(fileName, batch)) {
349
+ // A metadata change on the watched directory itself, which libuv names after the directory.
350
+ continue;
351
+ }
352
+ else {
353
+ // A child the snapshot missed. Record it, or the set stays stale.
354
+ changes.push(this.recordPresent(fileName));
355
+ }
356
+ }
357
+ if (renamed && await this.isWatchedDirectoryGone()) {
358
+ // Report the changes anyway: the restart's baseline already includes them.
359
+ this.restart();
360
+ }
361
+ else if (rescan) {
362
+ // Rescan last, so it settles the deletions that named events deferred.
363
+ const rescanned = await this.readChildren(this.children);
364
+ const rescanChanges = this.diff(this.children, rescanned);
365
+ rescanChanges.forEach(change => this.cancelDelete(change.fileName));
366
+ changes.push(...rescanChanges);
367
+ this.children = rescanned;
368
+ }
369
+ return changes;
370
+ }
371
+ /**
372
+ * @returns `true` if an event names the watched directory itself rather than a child. macOS reports such an
373
+ * event for any change inside, so {@link isWatchedDirectoryGone} decides whether the directory is gone. A
374
+ * new child with the same name is not in {@link children} yet, so the disk rules it out.
375
+ */
376
+ async namesWatchedDirectory(fileName, batch) {
377
+ return this.host.samePath(fileName, this.host.normalizeFileName(path.basename(this.watchedDirectory)))
378
+ && !this.children.has(fileName)
379
+ && await batch.storedName(fileName) !== fileName;
380
+ }
381
+ /** The change this rename resolves to, or `undefined` when it is deferred to the delete timer. */
382
+ async resolveRename(fileName, batch) {
383
+ const stored = await batch.storedName(fileName);
384
+ if (stored === undefined) {
385
+ batch.scheduleDelete(fileName);
386
+ return undefined;
387
+ }
388
+ this.cancelDelete(fileName);
389
+ if (stored === fileName) {
390
+ return this.recordPresent(fileName);
391
+ }
392
+ // Only the case changed: this name is gone, but the file remains under another case.
393
+ return this.children.delete(fileName) ? { fileName, type: 2 /* FileChangeType.DELETED */, pathRemains: true } : undefined;
394
+ }
395
+ /** Records a child found on disk: an update if it was known, an addition if not. */
396
+ recordPresent(fileName) {
397
+ if (this.children.has(fileName)) {
398
+ return { fileName, type: 0 /* FileChangeType.UPDATED */ };
399
+ }
400
+ this.children.add(fileName);
401
+ return { fileName, type: 1 /* FileChangeType.ADDED */ };
402
+ }
403
+ /** A new {@link EventBatch}. Where names ignore case, its lookups share one directory read. */
404
+ createBatch() {
405
+ return {
406
+ storedName: this.host.childLookup(this.watchedDirectory),
407
+ scheduleDelete: this.deleteScheduler()
408
+ };
409
+ }
410
+ /**
411
+ * A deletion is confirmed rather than reported right away: tools that save atomically delete and recreate
412
+ * the file, which would otherwise surface as a deletion followed by an addition. The deletions of one batch
413
+ * share a timer, created on first use, so that they are confirmed with one directory read as well.
414
+ */
415
+ deleteScheduler() {
416
+ let timer;
417
+ const scheduled = [];
418
+ return fileName => {
419
+ if (this.isDisposed || this.pendingDeletes.has(fileName)) {
420
+ return;
421
+ }
422
+ if (!timer) {
423
+ const created = setTimeout(() => this.enqueue(() => this.confirmDeletes(created, scheduled)), this.timings.deleteDelay);
424
+ timer = created;
425
+ }
426
+ this.pendingDeletes.set(fileName, timer);
427
+ scheduled.push(fileName);
428
+ };
429
+ }
430
+ /** Leaves the shared timer running: it confirms only the names still waiting on it. */
431
+ cancelDelete(fileName) {
432
+ this.pendingDeletes.delete(fileName);
433
+ }
434
+ clearPendingDeletes() {
435
+ new Set(this.pendingDeletes.values()).forEach(timer => clearTimeout(timer));
436
+ this.pendingDeletes.clear();
437
+ }
438
+ /**
439
+ * Confirms the deletions of `scheduled` still waiting on `timer`. A deletion cancelled meanwhile is no longer on
440
+ * it. Only the names this timer scheduled are checked, so each confirmation costs its own batch, not every pending one.
441
+ */
442
+ async confirmDeletes(timer, scheduled) {
443
+ const fileNames = scheduled.filter(fileName => this.pendingDeletes.get(fileName) === timer);
444
+ fileNames.forEach(fileName => this.pendingDeletes.delete(fileName));
445
+ const storedName = this.host.childLookup(this.watchedDirectory);
446
+ const changes = [];
447
+ for (const fileName of fileNames) {
448
+ changes.push(...await this.confirmDelete(fileName, storedName));
449
+ }
450
+ return changes;
451
+ }
452
+ async confirmDelete(fileName, storedName) {
453
+ const stored = await storedName(fileName);
454
+ if (stored === fileName) {
455
+ return [this.recordPresent(fileName)];
456
+ }
457
+ const known = this.children.delete(fileName);
458
+ return known
459
+ ? [{ fileName, type: 2 /* FileChangeType.DELETED */, pathRemains: stored !== undefined }]
460
+ // It appeared and vanished within the delay, so report both rather than a deletion from nowhere.
461
+ : [{ fileName, type: 1 /* FileChangeType.ADDED */ }, { fileName, type: 2 /* FileChangeType.DELETED */ }];
462
+ }
463
+ /**
464
+ * Compares identity rather than mere existence: a directory that is deleted and recreated leaves the handle
465
+ * bound to the old inode, where it would never report anything again.
466
+ */
467
+ async isWatchedDirectoryGone() {
468
+ const identity = await this.host.readIdentity(this.watchedDirectory);
469
+ if (!identity) {
470
+ return true;
471
+ }
472
+ return this.identity !== undefined && (identity.dev !== this.identity.dev
473
+ || identity.ino !== this.identity.ino
474
+ || identity.birthtimeMs !== this.identity.birthtimeMs);
475
+ }
476
+ /** Closes the handle and starts over, reporting the watched paths as deleted if the directory is gone. */
477
+ restart(error) {
478
+ if (this.isDisposed) {
479
+ return;
480
+ }
481
+ // Supersede whatever attempt is in flight rather than decline to start one.
482
+ this.attempt.cancel();
483
+ const token = (this.attempt = new cancellation_1.CancellationTokenSource()).token;
484
+ this.debug('RESTART', error ?? '');
485
+ this.closeHandle();
486
+ this.pendingEvents.length = 0;
487
+ this.scheduleFlush.cancel();
488
+ this.changeQueue = this.changeQueue.then(async () => {
489
+ if (token.isCancellationRequested) {
490
+ return;
491
+ }
492
+ // A batch queued before the restart can still defer a deletion. The diff reports it instead.
493
+ this.clearPendingDeletes();
494
+ if (this.started) {
495
+ // Taken when the restart runs rather than when it is called, so it includes the batches resolved before it.
496
+ this.restartBaseline ??= new Set(this.children);
497
+ }
498
+ // A handle can also fail while the directory is untouched, and then nothing changed.
499
+ const gone = await this.isWatchedDirectoryGone();
500
+ if (token.isCancellationRequested) {
501
+ return;
502
+ }
503
+ if (gone) {
504
+ this.reportLoss();
505
+ }
506
+ // Only a comparison of the contents can recover what happened while the watcher was down.
507
+ await this.start(token);
508
+ }).catch(restartError => this.error(`Watcher failed to restart at "${this.target}":`, restartError));
509
+ }
510
+ /** Deletions come first, so a case-only rename resolves to an update for a request for the file. */
511
+ diff(previous, current) {
512
+ const changes = [];
513
+ const currentKeys = new Set(Array.from(current, fileName => this.host.pathKey(fileName)));
514
+ for (const fileName of previous) {
515
+ if (!current.has(fileName)) {
516
+ changes.push({ fileName, type: 2 /* FileChangeType.DELETED */, pathRemains: currentKeys.has(this.host.pathKey(fileName)) });
517
+ }
518
+ }
519
+ for (const fileName of current) {
520
+ if (!previous.has(fileName)) {
521
+ changes.push({ fileName, type: 1 /* FileChangeType.ADDED */ });
522
+ }
523
+ }
524
+ return changes;
525
+ }
526
+ }
527
+ exports.NodeDirectoryWatcher = NodeDirectoryWatcher;
528
+ /** Serves non-recursive requests. Those resolving to the same directory share one watcher, file or folder alike. */
529
+ class DirectoryWatcherProvider extends filesystem_watcher_1.AbstractWatcherProvider {
530
+ constructor(options, client, timings,
531
+ /** Shared, so every watcher this provider makes resolves paths the same way. */
532
+ host = new watcher_host_1.WatcherHost(options)) {
533
+ super();
534
+ this.options = options;
535
+ this.client = client;
536
+ this.timings = timings;
537
+ this.host = host;
538
+ }
539
+ canHandle(options) {
540
+ return !options.recursive;
541
+ }
542
+ async watch(watcherId, request) {
543
+ const { directory, realPath, exists } = await this.host.resolveTarget(request.path);
544
+ // Nothing is awaited below, so two requests cannot both create a watcher, and no re-key can land
545
+ // between creating one and recording the request on it.
546
+ const watcher = this.getOrCreateWatcher(this.watcherKey(directory), () => this.createRekeyingWatcher(directory));
547
+ const resolved = { ...request, realPath, exists };
548
+ this.serve(watcherId, watcher, resolved);
549
+ }
550
+ /** While the path does not exist, `directory` is a guess, so re-key the watcher once it resolves. */
551
+ createRekeyingWatcher(directory) {
552
+ const watcher = this.createWatcher(directory);
553
+ watcher.onDidResolveDirectory(() => this.rekeyWatcher(watcher));
554
+ return watcher;
555
+ }
556
+ /** Moves a watcher to the key of the directory it resolved to, or hands its requests to the one there. */
557
+ rekeyWatcher(watcher) {
558
+ const watcherKey = this.watcherKey(watcher.directory);
559
+ if (watcher.isDisposed || this.isRegisteredAs(watcher, watcherKey)) {
560
+ return;
561
+ }
562
+ this.unregisterWatcher(watcher);
563
+ const target = this.getOrCreateWatcher(watcherKey, () => watcher);
564
+ if (target !== watcher) {
565
+ const moved = watcher.takeRequests();
566
+ target.adoptRequests(moved);
567
+ moved.forEach((_, movedId) => this.assign(movedId, target));
568
+ watcher.dispose();
569
+ }
570
+ }
571
+ /** Excludes are left out: one level has nothing to prune, so they apply per request. */
572
+ watcherKey(directory) {
573
+ return this.host.pathKey(directory);
574
+ }
575
+ createWatcher(directory) {
576
+ return new NodeDirectoryWatcher(directory, this.options, this.client, this.timings, this.host);
577
+ }
578
+ }
579
+ exports.DirectoryWatcherProvider = DirectoryWatcherProvider;
580
+ //# sourceMappingURL=node-directory-watcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-directory-watcher.js","sourceRoot":"","sources":["../../../src/node/nodejs-watcher/node-directory-watcher.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,6CAA6C;AAC7C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,mDAA6B;AAC7B,sCAAsC;AACtC,sEAA8D;AAC9D,sEAAiG;AACjG,iDAAgE;AAEhE,8DAA8I;AAC9I,iEAAmG;AACnG,+DAAgE;AAEhE,0EAA0E;AAC1E,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAa5B,IAAiB,2BAA2B,CAS3C;AATD,WAAiB,2BAA2B;IACxC,wFAAwF;IACxF,SAAgB,QAAQ,C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AK,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;YACrC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YAC5B,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;YAC5D,OAAO,CAAC,OAAO,EAAE,CAAC;QACtB,CAAC;IACL,CAAC;IAED,wFAAwF;IAC9E,UAAU,CAAC,SAAiB;QAClC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC;IAES,aAAa,CAAC,SAAiB;QACrC,OAAO,IAAI,oBAAoB,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACnG,CAAC;CACJ;AAxDD,4DAwDC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=node-directory-watcher.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-directory-watcher.spec.d.ts","sourceRoot":"","sources":["../../../src/node/nodejs-watcher/node-directory-watcher.spec.ts"],"names":[],"mappings":""}