@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.
- package/lib/common/filesystem-watcher-protocol.d.ts +4 -0
- package/lib/common/filesystem-watcher-protocol.d.ts.map +1 -1
- package/lib/node/disk-file-system-provider.d.ts.map +1 -1
- package/lib/node/disk-file-system-provider.js +2 -1
- package/lib/node/disk-file-system-provider.js.map +1 -1
- package/lib/node/filesystem-backend-module.d.ts +2 -2
- package/lib/node/filesystem-backend-module.d.ts.map +1 -1
- package/lib/node/filesystem-backend-module.js +5 -4
- package/lib/node/filesystem-backend-module.js.map +1 -1
- package/lib/node/filesystem-watcher-service-impl.d.ts +30 -0
- package/lib/node/filesystem-watcher-service-impl.d.ts.map +1 -0
- package/lib/node/filesystem-watcher-service-impl.js +92 -0
- package/lib/node/filesystem-watcher-service-impl.js.map +1 -0
- package/lib/node/filesystem-watcher-service-impl.spec.d.ts +2 -0
- package/lib/node/filesystem-watcher-service-impl.spec.d.ts.map +1 -0
- package/lib/node/filesystem-watcher-service-impl.spec.js +202 -0
- package/lib/node/filesystem-watcher-service-impl.spec.js.map +1 -0
- package/lib/node/filesystem-watcher.d.ts +93 -0
- package/lib/node/filesystem-watcher.d.ts.map +1 -0
- package/lib/node/filesystem-watcher.js +134 -0
- package/lib/node/filesystem-watcher.js.map +1 -0
- package/lib/node/nodejs-watcher/node-directory-watcher.d.ts +175 -0
- package/lib/node/nodejs-watcher/node-directory-watcher.d.ts.map +1 -0
- package/lib/node/nodejs-watcher/node-directory-watcher.js +580 -0
- package/lib/node/nodejs-watcher/node-directory-watcher.js.map +1 -0
- package/lib/node/nodejs-watcher/node-directory-watcher.spec.d.ts +2 -0
- package/lib/node/nodejs-watcher/node-directory-watcher.spec.d.ts.map +1 -0
- package/lib/node/nodejs-watcher/node-directory-watcher.spec.js +1284 -0
- package/lib/node/nodejs-watcher/node-directory-watcher.spec.js.map +1 -0
- package/lib/node/nodejs-watcher/watch-request-router.d.ts +63 -0
- package/lib/node/nodejs-watcher/watch-request-router.d.ts.map +1 -0
- package/lib/node/nodejs-watcher/watch-request-router.js +183 -0
- package/lib/node/nodejs-watcher/watch-request-router.js.map +1 -0
- package/lib/node/nodejs-watcher/watcher-host.d.ts +50 -0
- package/lib/node/nodejs-watcher/watcher-host.d.ts.map +1 -0
- package/lib/node/nodejs-watcher/watcher-host.js +99 -0
- package/lib/node/nodejs-watcher/watcher-host.js.map +1 -0
- package/lib/node/parcel-watcher/index.js +2 -2
- package/lib/node/parcel-watcher/index.js.map +1 -1
- package/lib/node/parcel-watcher/parcel-filesystem-service.d.ts +14 -194
- package/lib/node/parcel-watcher/parcel-filesystem-service.d.ts.map +1 -1
- package/lib/node/parcel-watcher/parcel-filesystem-service.js +7 -424
- package/lib/node/parcel-watcher/parcel-filesystem-service.js.map +1 -1
- package/lib/node/parcel-watcher/parcel-filesystem-watcher.spec.js +2 -2
- package/lib/node/parcel-watcher/parcel-filesystem-watcher.spec.js.map +1 -1
- package/lib/node/parcel-watcher/parcel-watcher-exclude.spec.js +3 -3
- package/lib/node/parcel-watcher/parcel-watcher-exclude.spec.js.map +1 -1
- package/lib/node/parcel-watcher/parcel-watcher-retry.spec.js +2 -2
- package/lib/node/parcel-watcher/parcel-watcher-retry.spec.js.map +1 -1
- package/lib/node/parcel-watcher/parcel-watcher.d.ts +165 -0
- package/lib/node/parcel-watcher/parcel-watcher.d.ts.map +1 -0
- package/lib/node/parcel-watcher/parcel-watcher.js +370 -0
- package/lib/node/parcel-watcher/parcel-watcher.js.map +1 -0
- package/lib/node/test/watcher-test-helper.d.ts +21 -0
- package/lib/node/test/watcher-test-helper.d.ts.map +1 -0
- package/lib/node/test/watcher-test-helper.js +56 -0
- package/lib/node/test/watcher-test-helper.js.map +1 -0
- package/package.json +3 -3
- package/src/common/filesystem-watcher-protocol.ts +4 -0
- package/src/node/disk-file-system-provider.ts +2 -1
- package/src/node/filesystem-backend-module.ts +5 -4
- package/src/node/filesystem-watcher-service-impl.spec.ts +272 -0
- package/src/node/filesystem-watcher-service-impl.ts +109 -0
- package/src/node/filesystem-watcher.ts +197 -0
- package/src/node/nodejs-watcher/node-directory-watcher.spec.ts +1594 -0
- package/src/node/nodejs-watcher/node-directory-watcher.ts +664 -0
- package/src/node/nodejs-watcher/watch-request-router.ts +224 -0
- package/src/node/nodejs-watcher/watcher-host.ts +126 -0
- package/src/node/parcel-watcher/index.ts +2 -2
- package/src/node/parcel-watcher/parcel-filesystem-service.ts +14 -500
- package/src/node/parcel-watcher/parcel-filesystem-watcher.spec.ts +4 -4
- package/src/node/parcel-watcher/parcel-watcher-exclude.spec.ts +4 -4
- package/src/node/parcel-watcher/parcel-watcher-retry.spec.ts +3 -3
- package/src/node/parcel-watcher/parcel-watcher.ts +432 -0
- package/src/node/test/watcher-test-helper.ts +58 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { WatchOptions } from '../common/filesystem-watcher-protocol';
|
|
2
|
+
/** How a watcher reports what it is doing. */
|
|
3
|
+
export interface WatcherLogger {
|
|
4
|
+
verbose: boolean;
|
|
5
|
+
info: (message: string, ...args: unknown[]) => void;
|
|
6
|
+
error: (message: string, ...args: unknown[]) => void;
|
|
7
|
+
}
|
|
8
|
+
/** A single client request served by a {@link FileSystemWatcher}. */
|
|
9
|
+
export interface WatchRequest {
|
|
10
|
+
/** Client to route the changes of this request to. */
|
|
11
|
+
readonly clientId: number;
|
|
12
|
+
/** Path as requested by the client. Change URIs are built from it, never from the real path. */
|
|
13
|
+
readonly path: string;
|
|
14
|
+
/** Exclude patterns of this request alone. */
|
|
15
|
+
readonly ignored: readonly string[];
|
|
16
|
+
}
|
|
17
|
+
/** A watch shared by every request that resolves to the same target. Implementations decide whether it recurses. */
|
|
18
|
+
export interface FileSystemWatcher {
|
|
19
|
+
/** A disposed watcher released its resources and must not be given further requests. */
|
|
20
|
+
readonly isDisposed: boolean;
|
|
21
|
+
/** Resolves once this watcher disposed itself. Never rejects. */
|
|
22
|
+
readonly whenDisposed: Promise<void>;
|
|
23
|
+
/** Serves `request` until {@link removeRequest} is called with the same `watcherId`. */
|
|
24
|
+
addRequest(watcherId: number, request: WatchRequest): void;
|
|
25
|
+
/** Releases a request. The watcher disposes itself once it has none left. */
|
|
26
|
+
removeRequest(watcherId: number): void;
|
|
27
|
+
}
|
|
28
|
+
/** Handles disposal and logging for a watcher. Subclasses decide how to observe the file system. */
|
|
29
|
+
export declare abstract class AbstractFileSystemWatcher implements FileSystemWatcher {
|
|
30
|
+
/** Path this watcher was asked about; the subclass decides what it resolves to. */
|
|
31
|
+
protected readonly target: string;
|
|
32
|
+
private readonly logger;
|
|
33
|
+
private static debugIdSequence;
|
|
34
|
+
private readonly debugId;
|
|
35
|
+
private readonly disposalDeferred;
|
|
36
|
+
private readonly disposal;
|
|
37
|
+
readonly whenDisposed: Promise<void>;
|
|
38
|
+
constructor(
|
|
39
|
+
/** Path this watcher was asked about; the subclass decides what it resolves to. */
|
|
40
|
+
target: string, logger: WatcherLogger);
|
|
41
|
+
get isDisposed(): boolean;
|
|
42
|
+
abstract addRequest(watcherId: number, request: WatchRequest): void;
|
|
43
|
+
abstract removeRequest(watcherId: number): void;
|
|
44
|
+
/**
|
|
45
|
+
* Marks this watcher disposed.
|
|
46
|
+
* @returns `false` if it already was, in which case the caller must not clean up again.
|
|
47
|
+
*/
|
|
48
|
+
protected markDisposed(): boolean;
|
|
49
|
+
/** Logs as-is. Unlike {@link info} it is not prefixed, since these messages name their own path. */
|
|
50
|
+
protected error(message: string, ...params: unknown[]): void;
|
|
51
|
+
protected info(prefix: string, ...params: unknown[]): void;
|
|
52
|
+
protected debug(prefix: string, ...params: unknown[]): void;
|
|
53
|
+
}
|
|
54
|
+
export type ResolvedWatchOptions = Required<WatchOptions>;
|
|
55
|
+
/** Serves either recursive or non-recursive requests, and decides which watcher serves each one. */
|
|
56
|
+
export interface WatcherProvider {
|
|
57
|
+
/** @returns `true` if this provider serves requests made with these options. */
|
|
58
|
+
canHandle(options: ResolvedWatchOptions): boolean;
|
|
59
|
+
/** Serves `request` under `watcherId`, on a watcher shared with requests resolving to the same target. */
|
|
60
|
+
watch(watcherId: number, request: WatchRequest): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Releases the request registered under `watcherId`.
|
|
63
|
+
* @returns `true` if this provider served the request.
|
|
64
|
+
*/
|
|
65
|
+
unwatch(watcherId: number): boolean;
|
|
66
|
+
}
|
|
67
|
+
/** A {@link WatcherProvider} that keeps one watcher per target. Subclasses decide which key a target maps to. */
|
|
68
|
+
export declare abstract class AbstractWatcherProvider implements WatcherProvider {
|
|
69
|
+
private readonly watchersByTarget;
|
|
70
|
+
/** The watcher that serves each request, by `watcherId`. */
|
|
71
|
+
private readonly watchersByRequest;
|
|
72
|
+
/** Every watcher this provider currently has open. */
|
|
73
|
+
protected get activeWatchers(): readonly FileSystemWatcher[];
|
|
74
|
+
abstract canHandle(options: ResolvedWatchOptions): boolean;
|
|
75
|
+
abstract watch(watcherId: number, request: WatchRequest): Promise<void>;
|
|
76
|
+
unwatch(watcherId: number): boolean;
|
|
77
|
+
/** The watcher serving a request, if this provider has one. */
|
|
78
|
+
protected watcherFor(watcherId: number): FileSystemWatcher | undefined;
|
|
79
|
+
/** Puts a request on a watcher and records which one, so {@link unwatch} finds it again. */
|
|
80
|
+
protected serve(watcherId: number, watcher: FileSystemWatcher, request: WatchRequest): void;
|
|
81
|
+
/** Records the watcher of a request that reached it without {@link serve}, such as through a re-key. */
|
|
82
|
+
protected assign(watcherId: number, watcher: FileSystemWatcher): void;
|
|
83
|
+
/**
|
|
84
|
+
* Returns the watcher under `watcherKey`, or creates one. A disposed watcher stays in the map until a later
|
|
85
|
+
* promise callback removes it, so it is replaced here rather than handed a new request.
|
|
86
|
+
*/
|
|
87
|
+
protected getOrCreateWatcher<T extends FileSystemWatcher>(watcherKey: string, create: () => T): T;
|
|
88
|
+
/** @returns `true` if `watcher` is the one registered under `watcherKey`. */
|
|
89
|
+
protected isRegisteredAs(watcher: FileSystemWatcher, watcherKey: string): boolean;
|
|
90
|
+
/** Forgets every key a watcher is registered under, so that it can be registered under another. */
|
|
91
|
+
protected unregisterWatcher(watcher: FileSystemWatcher): void;
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=filesystem-watcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filesystem-watcher.d.ts","sourceRoot":"","sources":["../../src/node/filesystem-watcher.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAErE,8CAA8C;AAC9C,MAAM,WAAW,aAAa;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACpD,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CACxD;AAED,qEAAqE;AACrE,MAAM,WAAW,YAAY;IACzB,sDAAsD;IACtD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,gGAAgG;IAChG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,8CAA8C;IAC9C,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AAED,oHAAoH;AACpH,MAAM,WAAW,iBAAiB;IAC9B,wFAAwF;IACxF,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,iEAAiE;IACjE,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,wFAAwF;IACxF,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,IAAI,CAAC;IAC3D,6EAA6E;IAC7E,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C;AAED,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
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.AbstractWatcherProvider = exports.AbstractFileSystemWatcher = void 0;
|
|
19
|
+
const promise_util_1 = require("@theia/core/lib/common/promise-util");
|
|
20
|
+
const cancellation_1 = require("@theia/core/lib/common/cancellation");
|
|
21
|
+
/** Handles disposal and logging for a watcher. Subclasses decide how to observe the file system. */
|
|
22
|
+
class AbstractFileSystemWatcher {
|
|
23
|
+
static { this.debugIdSequence = 0; }
|
|
24
|
+
constructor(
|
|
25
|
+
/** Path this watcher was asked about; the subclass decides what it resolves to. */
|
|
26
|
+
target, logger) {
|
|
27
|
+
this.target = target;
|
|
28
|
+
this.logger = logger;
|
|
29
|
+
this.debugId = AbstractFileSystemWatcher.debugIdSequence++;
|
|
30
|
+
this.disposalDeferred = new promise_util_1.Deferred();
|
|
31
|
+
this.disposal = new cancellation_1.CancellationTokenSource();
|
|
32
|
+
this.whenDisposed = this.disposalDeferred.promise;
|
|
33
|
+
}
|
|
34
|
+
get isDisposed() {
|
|
35
|
+
return this.disposal.token.isCancellationRequested;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Marks this watcher disposed.
|
|
39
|
+
* @returns `false` if it already was, in which case the caller must not clean up again.
|
|
40
|
+
*/
|
|
41
|
+
markDisposed() {
|
|
42
|
+
if (this.isDisposed) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
this.disposal.cancel();
|
|
46
|
+
this.disposalDeferred.resolve();
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
/** Logs as-is. Unlike {@link info} it is not prefixed, since these messages name their own path. */
|
|
50
|
+
error(message, ...params) {
|
|
51
|
+
this.logger.error(message, ...params);
|
|
52
|
+
}
|
|
53
|
+
info(prefix, ...params) {
|
|
54
|
+
this.logger.info(`${prefix} ${this.constructor.name}(${this.debugId} at "${this.target}"):`, ...params);
|
|
55
|
+
}
|
|
56
|
+
debug(prefix, ...params) {
|
|
57
|
+
if (this.logger.verbose) {
|
|
58
|
+
this.info(prefix, ...params);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.AbstractFileSystemWatcher = AbstractFileSystemWatcher;
|
|
63
|
+
/** A {@link WatcherProvider} that keeps one watcher per target. Subclasses decide which key a target maps to. */
|
|
64
|
+
class AbstractWatcherProvider {
|
|
65
|
+
constructor() {
|
|
66
|
+
this.watchersByTarget = new Map();
|
|
67
|
+
/** The watcher that serves each request, by `watcherId`. */
|
|
68
|
+
this.watchersByRequest = new Map();
|
|
69
|
+
}
|
|
70
|
+
/** Every watcher this provider currently has open. */
|
|
71
|
+
get activeWatchers() {
|
|
72
|
+
return Array.from(this.watchersByTarget.values());
|
|
73
|
+
}
|
|
74
|
+
unwatch(watcherId) {
|
|
75
|
+
const watcher = this.watchersByRequest.get(watcherId);
|
|
76
|
+
if (!watcher) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
this.watchersByRequest.delete(watcherId);
|
|
80
|
+
watcher.removeRequest(watcherId);
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
/** The watcher serving a request, if this provider has one. */
|
|
84
|
+
watcherFor(watcherId) {
|
|
85
|
+
return this.watchersByRequest.get(watcherId);
|
|
86
|
+
}
|
|
87
|
+
/** Puts a request on a watcher and records which one, so {@link unwatch} finds it again. */
|
|
88
|
+
serve(watcherId, watcher, request) {
|
|
89
|
+
watcher.addRequest(watcherId, request);
|
|
90
|
+
this.assign(watcherId, watcher);
|
|
91
|
+
}
|
|
92
|
+
/** Records the watcher of a request that reached it without {@link serve}, such as through a re-key. */
|
|
93
|
+
assign(watcherId, watcher) {
|
|
94
|
+
this.watchersByRequest.set(watcherId, watcher);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Returns the watcher under `watcherKey`, or creates one. A disposed watcher stays in the map until a later
|
|
98
|
+
* promise callback removes it, so it is replaced here rather than handed a new request.
|
|
99
|
+
*/
|
|
100
|
+
getOrCreateWatcher(watcherKey, create) {
|
|
101
|
+
const existing = this.watchersByTarget.get(watcherKey);
|
|
102
|
+
if (existing && !existing.isDisposed) {
|
|
103
|
+
return existing;
|
|
104
|
+
}
|
|
105
|
+
const watcher = create();
|
|
106
|
+
this.watchersByTarget.set(watcherKey, watcher);
|
|
107
|
+
watcher.whenDisposed.then(() => {
|
|
108
|
+
if (this.watchersByTarget.get(watcherKey) === watcher) {
|
|
109
|
+
this.watchersByTarget.delete(watcherKey);
|
|
110
|
+
}
|
|
111
|
+
// Requests it handed to another watcher already point there, so drop only the ones still on it.
|
|
112
|
+
for (const [watcherId, serving] of this.watchersByRequest) {
|
|
113
|
+
if (serving === watcher) {
|
|
114
|
+
this.watchersByRequest.delete(watcherId);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
return watcher;
|
|
119
|
+
}
|
|
120
|
+
/** @returns `true` if `watcher` is the one registered under `watcherKey`. */
|
|
121
|
+
isRegisteredAs(watcher, watcherKey) {
|
|
122
|
+
return this.watchersByTarget.get(watcherKey) === watcher;
|
|
123
|
+
}
|
|
124
|
+
/** Forgets every key a watcher is registered under, so that it can be registered under another. */
|
|
125
|
+
unregisterWatcher(watcher) {
|
|
126
|
+
for (const [watcherKey, registered] of this.watchersByTarget) {
|
|
127
|
+
if (registered === watcher) {
|
|
128
|
+
this.watchersByTarget.delete(watcherKey);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
exports.AbstractWatcherProvider = AbstractWatcherProvider;
|
|
134
|
+
//# sourceMappingURL=filesystem-watcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filesystem-watcher.js","sourceRoot":"","sources":["../../src/node/filesystem-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,sEAA+D;AAC/D,sEAA8E;AAgC9E,oGAAoG;AACpG,MAAsB,yBAAyB;aAE5B,oBAAe,GAAG,CAAC,AAAJ,CAAK;IAQnC;IACI,mFAAmF;IAChE,MAAc,EAChB,MAAqB;QADnB,WAAM,GAAN,MAAM,CAAQ;QAChB,WAAM,GAAN,MAAM,CAAe;QATzB,YAAO,GAAG,yBAAyB,CAAC,eAAe,EAAE,CAAC;QACtD,qBAAgB,GAAG,IAAI,uBAAQ,EAAQ,CAAC;QACxC,aAAQ,GAAG,IAAI,sCAAuB,EAAE,CAAC;QAEjD,iBAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;IAMlD,CAAC;IAEL,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,uBAAuB,CAAC;IACvD,CAAC;IAKD;;;OAGG;IACO,YAAY;QAClB,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YA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AI,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBACxD,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;oBACtB,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;gBAC7C,CAAC;YACL,CAAC;QACL,CAAC,CAAC,CAAC;QACH,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,6EAA6E;IACnE,cAAc,CAAC,OAA0B,EAAE,UAAkB;QACnE,OAAO,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,OAAO,CAAC;IAC7D,CAAC;IAED,mGAAmG;IACzF,iBAAiB,CAAC,OAA0B;QAClD,KAAK,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC3D,IAAI,UAAU,KAAK,OAAO,EAAE,CAAC;gBACzB,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAC7C,CAAC;QACL,CAAC;IACL,CAAC;CACJ;AA9ED,0DA8EC"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { CancellationToken } from '@theia/core/lib/common/cancellation';
|
|
2
|
+
import { WatcherHost } from './watcher-host';
|
|
3
|
+
import { FileSystemWatcherServiceClient } from '../../common/filesystem-watcher-protocol';
|
|
4
|
+
import { AbstractFileSystemWatcher, AbstractWatcherProvider, ResolvedWatchOptions, WatcherLogger, WatchRequest } from '../filesystem-watcher';
|
|
5
|
+
import { DirectoryWatchRequest, ResolvedChange, WatchRequestRouter } from './watch-request-router';
|
|
6
|
+
export interface NodeDirectoryWatcherTimings {
|
|
7
|
+
/** Aggregation window before raw events are resolved against the file system. */
|
|
8
|
+
readonly changeDelay: number;
|
|
9
|
+
/** Grace period before a deletion is confirmed, so an atomic save is not reported as one. */
|
|
10
|
+
readonly deleteDelay: number;
|
|
11
|
+
/** Poll interval for a path that does not exist yet. */
|
|
12
|
+
readonly existencePollDelay: number;
|
|
13
|
+
/** How long an unreferenced watcher is kept, so a reconnecting frontend can reuse it. */
|
|
14
|
+
readonly deferredDisposalTimeout: number;
|
|
15
|
+
}
|
|
16
|
+
export declare namespace NodeDirectoryWatcherTimings {
|
|
17
|
+
/** Every delay drives a `setTimeout`, where anything below 1ms silently becomes 1ms. */
|
|
18
|
+
function validate(timings: NodeDirectoryWatcherTimings): void;
|
|
19
|
+
}
|
|
20
|
+
export declare const DEFAULT_WATCHER_TIMINGS: NodeDirectoryWatcherTimings;
|
|
21
|
+
interface PendingEvent {
|
|
22
|
+
eventType: string;
|
|
23
|
+
fileName: string | undefined;
|
|
24
|
+
}
|
|
25
|
+
/** What the events of one batch share: one directory read, and one timer for the deletions they defer. */
|
|
26
|
+
interface EventBatch {
|
|
27
|
+
/** The child's name on disk, which can differ from `fileName` in case, or `undefined` if there is none. */
|
|
28
|
+
storedName(fileName: string): Promise<string | undefined>;
|
|
29
|
+
scheduleDelete(fileName: string): void;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Watches one directory level with Node's `fs.watch`.
|
|
33
|
+
*
|
|
34
|
+
* One instance serves every non-recursive request resolving to the same directory, for the directory itself
|
|
35
|
+
* or for a single file in it. Sharing saves more than handles: on macOS libuv keeps one `FSEventStream` per
|
|
36
|
+
* event loop and rebuilds it whenever a handle opens or closes, losing every other watcher's events.
|
|
37
|
+
*/
|
|
38
|
+
export declare class NodeDirectoryWatcher extends AbstractFileSystemWatcher {
|
|
39
|
+
protected readonly client: FileSystemWatcherServiceClient;
|
|
40
|
+
protected readonly timings: NodeDirectoryWatcherTimings;
|
|
41
|
+
protected readonly host: WatcherHost;
|
|
42
|
+
protected watchedDirectory: string;
|
|
43
|
+
/** The path polled and resolved on each start: the target, or its directory once it turned out to be a file. */
|
|
44
|
+
protected watchPath: string;
|
|
45
|
+
private handle;
|
|
46
|
+
/** The identity of the directory the handle is bound to, read before it opened. */
|
|
47
|
+
private identity;
|
|
48
|
+
/** Direct children of {@link watchedDirectory}, kept in sync to classify changes and to diff a rescan. */
|
|
49
|
+
protected children: Set<string>;
|
|
50
|
+
/** Set once a start recorded the children. Until then, what clients saw of them is unknown. */
|
|
51
|
+
private started;
|
|
52
|
+
/** The directory that {@link children} list, which a re-key can move {@link watchedDirectory} away from. */
|
|
53
|
+
private childrenDirectory;
|
|
54
|
+
/** The children clients last saw. Kept until a restart reports its diff, so a superseded restart passes it on. */
|
|
55
|
+
private restartBaseline;
|
|
56
|
+
/** Set once the watched path is found missing, until a start finds it. Changes wait for that start meanwhile. */
|
|
57
|
+
private watchedPathMissing;
|
|
58
|
+
/** The directory last announced through {@link onDidResolveDirectory}, which the provider keys the watcher by. */
|
|
59
|
+
private announcedDirectory;
|
|
60
|
+
protected readonly router: WatchRequestRouter;
|
|
61
|
+
private readonly pendingEvents;
|
|
62
|
+
private readonly pendingDeletes;
|
|
63
|
+
private changeQueue;
|
|
64
|
+
/** Names from `rename` events that arrive while {@link readChildren} runs, else `undefined`. */
|
|
65
|
+
private renamedDuringRead;
|
|
66
|
+
/** Collects raw events for one `changeDelay` window, counted from the first. */
|
|
67
|
+
private readonly scheduleFlush;
|
|
68
|
+
/** Cancels the start attempt in flight, so a superseded one opens no handle. */
|
|
69
|
+
private attempt;
|
|
70
|
+
private disposalTimer;
|
|
71
|
+
private openFailed;
|
|
72
|
+
private readonly directoryResolvedEmitter;
|
|
73
|
+
/** Fires when {@link directory} changes, for example when a missing target appears as a file. */
|
|
74
|
+
readonly onDidResolveDirectory: import("@theia/core").Event<void>;
|
|
75
|
+
/** Resolves once the watcher is up, or once it got disposed while starting. Never rejects. */
|
|
76
|
+
readonly whenStarted: Promise<void>;
|
|
77
|
+
constructor(target: string, options: WatcherLogger, client: FileSystemWatcherServiceClient, timings?: NodeDirectoryWatcherTimings, host?: WatcherHost);
|
|
78
|
+
/** The directory the handle is on, settled once {@link whenStarted} resolved. */
|
|
79
|
+
get directory(): string;
|
|
80
|
+
/** Drains the requests, so that they can be moved to the watcher serving their directory. */
|
|
81
|
+
takeRequests(): Map<number, DirectoryWatchRequest>;
|
|
82
|
+
/**
|
|
83
|
+
* Serves requests that a re-key moved here. After the work queued before them runs, each hears where its path
|
|
84
|
+
* differs from what it takes it for.
|
|
85
|
+
*/
|
|
86
|
+
adoptRequests(requests: Map<number, DirectoryWatchRequest>): void;
|
|
87
|
+
protected createRouter(): WatchRequestRouter;
|
|
88
|
+
addRequest(watcherId: number, request: DirectoryWatchRequest): void;
|
|
89
|
+
removeRequest(watcherId: number): void;
|
|
90
|
+
dispose(): void;
|
|
91
|
+
/** Waits for the target, then opens the handle before reading the children, so no change is missed. */
|
|
92
|
+
protected start(token: CancellationToken): Promise<void>;
|
|
93
|
+
/** Polls until the target exists as a directory to watch and a handle is open. */
|
|
94
|
+
protected openWhenAvailable(token: CancellationToken): Promise<void>;
|
|
95
|
+
/** Records the watched path as missing, and tells each request that takes its path for existing. */
|
|
96
|
+
private reportLoss;
|
|
97
|
+
/** Tells each request where its own path differs from what the watcher last found, whenever it joined. */
|
|
98
|
+
private reconcile;
|
|
99
|
+
/**
|
|
100
|
+
* Reads the children. A child renamed during the read keeps its membership in `known`, as the read can list it
|
|
101
|
+
* or not, and its own event reports it. Only a `rename` announces a creation or a deletion.
|
|
102
|
+
*/
|
|
103
|
+
private readChildren;
|
|
104
|
+
/**
|
|
105
|
+
* Resolves the target to the directory to watch. Requests made while the target was missing are resolved
|
|
106
|
+
* here too, and narrowed to the file if the target is one.
|
|
107
|
+
* @returns `false` if the path is a file that the watcher cannot follow to its parent.
|
|
108
|
+
*/
|
|
109
|
+
protected resolveWatchedDirectory(): Promise<boolean>;
|
|
110
|
+
protected openHandle(): boolean;
|
|
111
|
+
private closeHandle;
|
|
112
|
+
protected handleEvent(eventType: string, fileName: string | null): void;
|
|
113
|
+
private flush;
|
|
114
|
+
/** Serializes the async parts of change handling so later events cannot overtake earlier ones. */
|
|
115
|
+
private enqueue;
|
|
116
|
+
protected processEvents(events: PendingEvent[]): Promise<ResolvedChange[]>;
|
|
117
|
+
/**
|
|
118
|
+
* @returns `true` if an event names the watched directory itself rather than a child. macOS reports such an
|
|
119
|
+
* event for any change inside, so {@link isWatchedDirectoryGone} decides whether the directory is gone. A
|
|
120
|
+
* new child with the same name is not in {@link children} yet, so the disk rules it out.
|
|
121
|
+
*/
|
|
122
|
+
protected namesWatchedDirectory(fileName: string, batch: EventBatch): Promise<boolean>;
|
|
123
|
+
/** The change this rename resolves to, or `undefined` when it is deferred to the delete timer. */
|
|
124
|
+
protected resolveRename(fileName: string, batch: EventBatch): Promise<ResolvedChange | undefined>;
|
|
125
|
+
/** Records a child found on disk: an update if it was known, an addition if not. */
|
|
126
|
+
private recordPresent;
|
|
127
|
+
/** A new {@link EventBatch}. Where names ignore case, its lookups share one directory read. */
|
|
128
|
+
protected createBatch(): EventBatch;
|
|
129
|
+
/**
|
|
130
|
+
* A deletion is confirmed rather than reported right away: tools that save atomically delete and recreate
|
|
131
|
+
* the file, which would otherwise surface as a deletion followed by an addition. The deletions of one batch
|
|
132
|
+
* share a timer, created on first use, so that they are confirmed with one directory read as well.
|
|
133
|
+
*/
|
|
134
|
+
private deleteScheduler;
|
|
135
|
+
/** Leaves the shared timer running: it confirms only the names still waiting on it. */
|
|
136
|
+
private cancelDelete;
|
|
137
|
+
private clearPendingDeletes;
|
|
138
|
+
/**
|
|
139
|
+
* Confirms the deletions of `scheduled` still waiting on `timer`. A deletion cancelled meanwhile is no longer on
|
|
140
|
+
* it. Only the names this timer scheduled are checked, so each confirmation costs its own batch, not every pending one.
|
|
141
|
+
*/
|
|
142
|
+
protected confirmDeletes(timer: NodeJS.Timeout, scheduled: readonly string[]): Promise<ResolvedChange[]>;
|
|
143
|
+
protected confirmDelete(fileName: string, storedName: EventBatch['storedName']): Promise<ResolvedChange[]>;
|
|
144
|
+
/**
|
|
145
|
+
* Compares identity rather than mere existence: a directory that is deleted and recreated leaves the handle
|
|
146
|
+
* bound to the old inode, where it would never report anything again.
|
|
147
|
+
*/
|
|
148
|
+
protected isWatchedDirectoryGone(): Promise<boolean>;
|
|
149
|
+
/** Closes the handle and starts over, reporting the watched paths as deleted if the directory is gone. */
|
|
150
|
+
protected restart(error?: unknown): void;
|
|
151
|
+
/** Deletions come first, so a case-only rename resolves to an update for a request for the file. */
|
|
152
|
+
protected diff(previous: Set<string>, current: Set<string>): ResolvedChange[];
|
|
153
|
+
}
|
|
154
|
+
/** Serves non-recursive requests. Those resolving to the same directory share one watcher, file or folder alike. */
|
|
155
|
+
export declare class DirectoryWatcherProvider extends AbstractWatcherProvider {
|
|
156
|
+
protected readonly options: WatcherLogger;
|
|
157
|
+
protected readonly client: FileSystemWatcherServiceClient;
|
|
158
|
+
protected readonly timings?: NodeDirectoryWatcherTimings | undefined;
|
|
159
|
+
/** Shared, so every watcher this provider makes resolves paths the same way. */
|
|
160
|
+
protected readonly host: WatcherHost;
|
|
161
|
+
constructor(options: WatcherLogger, client: FileSystemWatcherServiceClient, timings?: NodeDirectoryWatcherTimings | undefined,
|
|
162
|
+
/** Shared, so every watcher this provider makes resolves paths the same way. */
|
|
163
|
+
host?: WatcherHost);
|
|
164
|
+
canHandle(options: ResolvedWatchOptions): boolean;
|
|
165
|
+
watch(watcherId: number, request: WatchRequest): Promise<void>;
|
|
166
|
+
/** While the path does not exist, `directory` is a guess, so re-key the watcher once it resolves. */
|
|
167
|
+
protected createRekeyingWatcher(directory: string): NodeDirectoryWatcher;
|
|
168
|
+
/** Moves a watcher to the key of the directory it resolved to, or hands its requests to the one there. */
|
|
169
|
+
protected rekeyWatcher(watcher: NodeDirectoryWatcher): void;
|
|
170
|
+
/** Excludes are left out: one level has nothing to prune, so they apply per request. */
|
|
171
|
+
protected watcherKey(directory: string): string;
|
|
172
|
+
protected createWatcher(directory: string): NodeDirectoryWatcher;
|
|
173
|
+
}
|
|
174
|
+
export {};
|
|
175
|
+
//# sourceMappingURL=node-directory-watcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-directory-watc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