@theia/filesystem 1.26.0-next.4 → 1.26.0-next.44
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/breadcrumbs/filepath-breadcrumbs-container.d.ts +1 -2
- package/lib/browser/breadcrumbs/filepath-breadcrumbs-container.d.ts.map +1 -1
- package/lib/browser/breadcrumbs/filepath-breadcrumbs-container.js +3 -4
- package/lib/browser/breadcrumbs/filepath-breadcrumbs-container.js.map +1 -1
- package/lib/browser/file-service.d.ts +5 -0
- package/lib/browser/file-service.d.ts.map +1 -1
- package/lib/browser/file-service.js +5 -0
- package/lib/browser/file-service.js.map +1 -1
- package/lib/browser/file-tree/file-tree-decorator-adapter.d.ts +1 -1
- package/lib/browser/file-tree/file-tree-decorator-adapter.js +1 -1
- package/lib/browser/file-tree/file-tree-widget.js +1 -1
- package/lib/browser/file-tree/file-tree-widget.js.map +1 -1
- package/lib/browser/file-tree/file-tree.d.ts +1 -2
- package/lib/browser/file-tree/file-tree.d.ts.map +1 -1
- package/lib/browser/file-tree/file-tree.js.map +1 -1
- package/lib/browser/filesystem-frontend-module.d.ts.map +1 -1
- package/lib/browser/filesystem-frontend-module.js +0 -165
- package/lib/browser/filesystem-frontend-module.js.map +1 -1
- package/lib/browser/index.d.ts +0 -1
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +0 -1
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/location/location-renderer.js +2 -2
- package/lib/browser/location/location-renderer.js.map +1 -1
- package/lib/common/files.d.ts +13 -4
- package/lib/common/files.d.ts.map +1 -1
- package/lib/common/files.js.map +1 -1
- package/lib/common/filesystem-utils.spec.js +49 -49
- package/lib/common/filesystem-utils.spec.js.map +1 -1
- package/lib/common/filesystem-watcher-protocol.d.ts +1 -22
- package/lib/common/filesystem-watcher-protocol.d.ts.map +1 -1
- package/lib/common/filesystem-watcher-protocol.js +1 -68
- package/lib/common/filesystem-watcher-protocol.js.map +1 -1
- package/lib/common/filesystem.d.ts +0 -229
- package/lib/common/filesystem.d.ts.map +1 -1
- package/lib/common/filesystem.js +1 -51
- package/lib/common/filesystem.js.map +1 -1
- package/lib/common/remote-file-system-provider.d.ts +9 -9
- package/lib/common/remote-file-system-provider.d.ts.map +1 -1
- package/lib/common/remote-file-system-provider.js +9 -10
- package/lib/common/remote-file-system-provider.js.map +1 -1
- package/package.json +3 -3
- package/src/browser/breadcrumbs/filepath-breadcrumbs-container.ts +1 -2
- package/src/browser/file-service.ts +5 -0
- package/src/browser/file-tree/file-tree-decorator-adapter.ts +1 -1
- package/src/browser/file-tree/file-tree-widget.tsx +1 -1
- package/src/browser/file-tree/file-tree.ts +1 -2
- package/src/browser/filesystem-frontend-module.ts +0 -162
- package/src/browser/index.ts +0 -1
- package/src/browser/location/location-renderer.tsx +2 -2
- package/src/common/files.ts +13 -4
- package/src/common/filesystem-utils.spec.ts +1 -1
- package/src/common/filesystem-watcher-protocol.ts +1 -67
- package/src/common/filesystem.ts +0 -262
- package/src/common/remote-file-system-provider.ts +18 -19
- package/lib/browser/filesystem-watcher.d.ts +0 -134
- package/lib/browser/filesystem-watcher.d.ts.map +0 -1
- package/lib/browser/filesystem-watcher.js +0 -240
- package/lib/browser/filesystem-watcher.js.map +0 -1
- package/lib/node/node-file-upload.d.ts +0 -19
- package/lib/node/node-file-upload.d.ts.map +0 -1
- package/lib/node/node-file-upload.js +0 -55
- package/lib/node/node-file-upload.js.map +0 -1
- package/lib/node/nsfw-watcher/nsfw-filesystem-watcher.d.ts +0 -53
- package/lib/node/nsfw-watcher/nsfw-filesystem-watcher.d.ts.map +0 -1
- package/lib/node/nsfw-watcher/nsfw-filesystem-watcher.js +0 -197
- package/lib/node/nsfw-watcher/nsfw-filesystem-watcher.js.map +0 -1
- package/src/browser/filesystem-watcher.ts +0 -249
- package/src/node/node-file-upload.ts +0 -64
- package/src/node/nsfw-watcher/nsfw-filesystem-watcher.ts +0 -255
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2017 TypeFox 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 WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.FileSystemWatcher = exports.FileOperationEmitter = exports.FileMoveEvent = exports.FileChangeEvent = exports.FileChange = void 0;
|
|
28
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
-
const disposable_1 = require("@theia/core/lib/common/disposable");
|
|
30
|
-
const event_1 = require("@theia/core/lib/common/event");
|
|
31
|
-
const file_service_1 = require("./file-service");
|
|
32
|
-
var FileChange;
|
|
33
|
-
(function (FileChange) {
|
|
34
|
-
function isUpdated(change, uri) {
|
|
35
|
-
return change.type === 0 /* UPDATED */ && uri.toString() === change.uri.toString();
|
|
36
|
-
}
|
|
37
|
-
FileChange.isUpdated = isUpdated;
|
|
38
|
-
function isAdded(change, uri) {
|
|
39
|
-
return change.type === 1 /* ADDED */ && uri.toString() === change.uri.toString();
|
|
40
|
-
}
|
|
41
|
-
FileChange.isAdded = isAdded;
|
|
42
|
-
function isDeleted(change, uri) {
|
|
43
|
-
return change.type === 2 /* DELETED */ && change.uri.isEqualOrParent(uri);
|
|
44
|
-
}
|
|
45
|
-
FileChange.isDeleted = isDeleted;
|
|
46
|
-
function isAffected(change, uri) {
|
|
47
|
-
return isDeleted(change, uri) || uri.toString() === change.uri.toString();
|
|
48
|
-
}
|
|
49
|
-
FileChange.isAffected = isAffected;
|
|
50
|
-
function isChanged(change, uri) {
|
|
51
|
-
return !isDeleted(change, uri) && uri.toString() === change.uri.toString();
|
|
52
|
-
}
|
|
53
|
-
FileChange.isChanged = isChanged;
|
|
54
|
-
})(FileChange = exports.FileChange || (exports.FileChange = {}));
|
|
55
|
-
var FileChangeEvent;
|
|
56
|
-
(function (FileChangeEvent) {
|
|
57
|
-
function isUpdated(event, uri) {
|
|
58
|
-
return event.some(change => FileChange.isUpdated(change, uri));
|
|
59
|
-
}
|
|
60
|
-
FileChangeEvent.isUpdated = isUpdated;
|
|
61
|
-
function isAdded(event, uri) {
|
|
62
|
-
return event.some(change => FileChange.isAdded(change, uri));
|
|
63
|
-
}
|
|
64
|
-
FileChangeEvent.isAdded = isAdded;
|
|
65
|
-
function isDeleted(event, uri) {
|
|
66
|
-
return event.some(change => FileChange.isDeleted(change, uri));
|
|
67
|
-
}
|
|
68
|
-
FileChangeEvent.isDeleted = isDeleted;
|
|
69
|
-
function isAffected(event, uri) {
|
|
70
|
-
return event.some(change => FileChange.isAffected(change, uri));
|
|
71
|
-
}
|
|
72
|
-
FileChangeEvent.isAffected = isAffected;
|
|
73
|
-
function isChanged(event, uri) {
|
|
74
|
-
return !isDeleted(event, uri) && event.some(change => FileChange.isChanged(change, uri));
|
|
75
|
-
}
|
|
76
|
-
FileChangeEvent.isChanged = isChanged;
|
|
77
|
-
})(FileChangeEvent = exports.FileChangeEvent || (exports.FileChangeEvent = {}));
|
|
78
|
-
var FileMoveEvent;
|
|
79
|
-
(function (FileMoveEvent) {
|
|
80
|
-
function isRename({ sourceUri, targetUri }) {
|
|
81
|
-
return sourceUri.parent.toString() === targetUri.parent.toString();
|
|
82
|
-
}
|
|
83
|
-
FileMoveEvent.isRename = isRename;
|
|
84
|
-
})(FileMoveEvent = exports.FileMoveEvent || (exports.FileMoveEvent = {}));
|
|
85
|
-
class FileOperationEmitter {
|
|
86
|
-
constructor() {
|
|
87
|
-
this.onWillEmitter = new event_1.Emitter();
|
|
88
|
-
this.onWill = this.onWillEmitter.event;
|
|
89
|
-
this.onDidFailEmitter = new event_1.Emitter();
|
|
90
|
-
this.onDidFail = this.onDidFailEmitter.event;
|
|
91
|
-
this.onDidEmitter = new event_1.Emitter();
|
|
92
|
-
this.onDid = this.onDidEmitter.event;
|
|
93
|
-
this.toDispose = new disposable_1.DisposableCollection(this.onWillEmitter, this.onDidFailEmitter, this.onDidEmitter);
|
|
94
|
-
}
|
|
95
|
-
dispose() {
|
|
96
|
-
this.toDispose.dispose();
|
|
97
|
-
}
|
|
98
|
-
async fireWill(event) {
|
|
99
|
-
await event_1.WaitUntilEvent.fire(this.onWillEmitter, event);
|
|
100
|
-
}
|
|
101
|
-
async fireDid(failed, event) {
|
|
102
|
-
const onDidEmitter = failed ? this.onDidFailEmitter : this.onDidEmitter;
|
|
103
|
-
await event_1.WaitUntilEvent.fire(onDidEmitter, event);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
exports.FileOperationEmitter = FileOperationEmitter;
|
|
107
|
-
/**
|
|
108
|
-
* React to file system events, including calls originating from the
|
|
109
|
-
* application or event coming from the system's filesystem directly
|
|
110
|
-
* (actual file watching).
|
|
111
|
-
*
|
|
112
|
-
* `on(will|did)(create|rename|delete)` events solely come from application
|
|
113
|
-
* usage, not from actual filesystem.
|
|
114
|
-
*
|
|
115
|
-
* @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService.watch` instead
|
|
116
|
-
*/
|
|
117
|
-
let FileSystemWatcher = class FileSystemWatcher {
|
|
118
|
-
constructor() {
|
|
119
|
-
this.toDispose = new disposable_1.DisposableCollection();
|
|
120
|
-
this.toRestartAll = new disposable_1.DisposableCollection();
|
|
121
|
-
this.onFileChangedEmitter = new event_1.Emitter();
|
|
122
|
-
/**
|
|
123
|
-
* @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService.onDidFilesChange` instead
|
|
124
|
-
*/
|
|
125
|
-
this.onFilesChanged = this.onFileChangedEmitter.event;
|
|
126
|
-
this.fileCreateEmitter = new FileOperationEmitter();
|
|
127
|
-
/**
|
|
128
|
-
* @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService.onWillRunUserOperation` instead
|
|
129
|
-
*/
|
|
130
|
-
this.onWillCreate = this.fileCreateEmitter.onWill;
|
|
131
|
-
/**
|
|
132
|
-
* @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService.onDidFailUserOperation` instead
|
|
133
|
-
*/
|
|
134
|
-
this.onDidFailCreate = this.fileCreateEmitter.onDidFail;
|
|
135
|
-
/**
|
|
136
|
-
* @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908),
|
|
137
|
-
* instead use `FileService.onDidRunUserOperation` for events triggered by user gestures
|
|
138
|
-
* or `FileService.onDidRunOperation` triggered by user gestures and programmatically
|
|
139
|
-
*/
|
|
140
|
-
this.onDidCreate = this.fileCreateEmitter.onDid;
|
|
141
|
-
this.fileDeleteEmitter = new FileOperationEmitter();
|
|
142
|
-
/**
|
|
143
|
-
* @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService.onWillRunUserOperation` instead
|
|
144
|
-
*/
|
|
145
|
-
this.onWillDelete = this.fileDeleteEmitter.onWill;
|
|
146
|
-
/**
|
|
147
|
-
* @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService.onDidFailUserOperation` instead
|
|
148
|
-
*/
|
|
149
|
-
this.onDidFailDelete = this.fileDeleteEmitter.onDidFail;
|
|
150
|
-
/**
|
|
151
|
-
* @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908),
|
|
152
|
-
* instead use `FileService.onDidRunUserOperation` for events triggered by user gestures
|
|
153
|
-
* or `FileService.onDidRunOperation` triggered by user gestures and programmatically
|
|
154
|
-
*/
|
|
155
|
-
this.onDidDelete = this.fileDeleteEmitter.onDid;
|
|
156
|
-
this.fileMoveEmitter = new FileOperationEmitter();
|
|
157
|
-
/**
|
|
158
|
-
* @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService.onWillRunUserOperation` instead
|
|
159
|
-
*/
|
|
160
|
-
this.onWillMove = this.fileMoveEmitter.onWill;
|
|
161
|
-
/**
|
|
162
|
-
* @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService.onDidFailUserOperation` instead
|
|
163
|
-
*/
|
|
164
|
-
this.onDidFailMove = this.fileMoveEmitter.onDidFail;
|
|
165
|
-
/**
|
|
166
|
-
* @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908),
|
|
167
|
-
* instead use `FileService.onDidRunUserOperation` for events triggered by user gestures
|
|
168
|
-
* or `FileService.onDidRunOperation` triggered by user gestures and programmatically
|
|
169
|
-
*/
|
|
170
|
-
this.onDidMove = this.fileMoveEmitter.onDid;
|
|
171
|
-
}
|
|
172
|
-
init() {
|
|
173
|
-
this.toDispose.push(this.onFileChangedEmitter);
|
|
174
|
-
this.toDispose.push(this.fileDeleteEmitter);
|
|
175
|
-
this.toDispose.push(this.fileMoveEmitter);
|
|
176
|
-
this.toDispose.push(this.fileService.onWillRunUserOperation(event => {
|
|
177
|
-
if (event.operation === 0 /* CREATE */) {
|
|
178
|
-
this.fileCreateEmitter.fireWill({ uri: event.target });
|
|
179
|
-
}
|
|
180
|
-
else if (event.operation === 1 /* DELETE */) {
|
|
181
|
-
this.fileDeleteEmitter.fireWill({ uri: event.target });
|
|
182
|
-
}
|
|
183
|
-
else if (event.operation === 2 /* MOVE */ && event.source) {
|
|
184
|
-
this.fileMoveEmitter.fireWill({ sourceUri: event.source, targetUri: event.target });
|
|
185
|
-
}
|
|
186
|
-
}));
|
|
187
|
-
this.toDispose.push(this.fileService.onDidFailUserOperation(event => {
|
|
188
|
-
if (event.operation === 0 /* CREATE */) {
|
|
189
|
-
this.fileCreateEmitter.fireDid(true, { uri: event.target });
|
|
190
|
-
}
|
|
191
|
-
else if (event.operation === 1 /* DELETE */) {
|
|
192
|
-
this.fileDeleteEmitter.fireDid(true, { uri: event.target });
|
|
193
|
-
}
|
|
194
|
-
else if (event.operation === 2 /* MOVE */ && event.source) {
|
|
195
|
-
this.fileMoveEmitter.fireDid(true, { sourceUri: event.source, targetUri: event.target });
|
|
196
|
-
}
|
|
197
|
-
}));
|
|
198
|
-
this.toDispose.push(this.fileService.onDidRunUserOperation(event => {
|
|
199
|
-
if (event.operation === 0 /* CREATE */) {
|
|
200
|
-
this.fileCreateEmitter.fireDid(false, { uri: event.target });
|
|
201
|
-
}
|
|
202
|
-
else if (event.operation === 1 /* DELETE */) {
|
|
203
|
-
this.fileDeleteEmitter.fireDid(false, { uri: event.target });
|
|
204
|
-
}
|
|
205
|
-
else if (event.operation === 2 /* MOVE */ && event.source) {
|
|
206
|
-
this.fileMoveEmitter.fireDid(false, { sourceUri: event.source, targetUri: event.target });
|
|
207
|
-
}
|
|
208
|
-
}));
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* Stop watching.
|
|
212
|
-
*/
|
|
213
|
-
dispose() {
|
|
214
|
-
this.toDispose.dispose();
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* Start file watching under the given uri.
|
|
218
|
-
*
|
|
219
|
-
* Resolve when watching is started.
|
|
220
|
-
* Return a disposable to stop file watching under the given uri.
|
|
221
|
-
*/
|
|
222
|
-
async watchFileChanges(uri) {
|
|
223
|
-
return this.fileService.watch(uri);
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
__decorate([
|
|
227
|
-
(0, inversify_1.inject)(file_service_1.FileService),
|
|
228
|
-
__metadata("design:type", file_service_1.FileService)
|
|
229
|
-
], FileSystemWatcher.prototype, "fileService", void 0);
|
|
230
|
-
__decorate([
|
|
231
|
-
(0, inversify_1.postConstruct)(),
|
|
232
|
-
__metadata("design:type", Function),
|
|
233
|
-
__metadata("design:paramtypes", []),
|
|
234
|
-
__metadata("design:returntype", void 0)
|
|
235
|
-
], FileSystemWatcher.prototype, "init", null);
|
|
236
|
-
FileSystemWatcher = __decorate([
|
|
237
|
-
(0, inversify_1.injectable)()
|
|
238
|
-
], FileSystemWatcher);
|
|
239
|
-
exports.FileSystemWatcher = FileSystemWatcher;
|
|
240
|
-
//# sourceMappingURL=filesystem-watcher.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filesystem-watcher.js","sourceRoot":"","sources":["../../src/browser/filesystem-watcher.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E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HY,8CAAiB"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Disposable } from '@theia/core/lib/common/disposable';
|
|
2
|
-
/**
|
|
3
|
-
* @deprecated since 1.17.0
|
|
4
|
-
*/
|
|
5
|
-
export declare class NodeFileUpload implements Disposable {
|
|
6
|
-
readonly uri: string;
|
|
7
|
-
readonly size: number;
|
|
8
|
-
readonly id: string;
|
|
9
|
-
readonly fsPath: string;
|
|
10
|
-
readonly uploadPath: string;
|
|
11
|
-
protected _uploadedBytes: number;
|
|
12
|
-
get uploadedBytes(): number;
|
|
13
|
-
constructor(uri: string, size: number);
|
|
14
|
-
create(): Promise<void>;
|
|
15
|
-
append(chunk: ArrayBuffer): Promise<void>;
|
|
16
|
-
rename(): Promise<void>;
|
|
17
|
-
dispose(): void;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=node-file-upload.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-file-upload.d.ts","sourceRoot":"","sources":["../../src/node/node-file-upload.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAG/D;;GAEG;AACH,qBAAa,cAAe,YAAW,UAAU;IAWzC,QAAQ,CAAC,GAAG,EAAE,MAAM;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM;IAVzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,cAAc,SAAK;IAC7B,IAAI,aAAa,IAAI,MAAM,CAE1B;gBAGY,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM;IAOnB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAIvB,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAKzC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAK7B,OAAO,IAAI,IAAI;CAIlB"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2019 TypeFox 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 WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.NodeFileUpload = void 0;
|
|
19
|
-
const path = require("path");
|
|
20
|
-
const crypto = require("crypto");
|
|
21
|
-
const fs = require("@theia/core/shared/fs-extra");
|
|
22
|
-
const buffer_1 = require("buffer");
|
|
23
|
-
const file_uri_1 = require("@theia/core/lib/node/file-uri");
|
|
24
|
-
/**
|
|
25
|
-
* @deprecated since 1.17.0
|
|
26
|
-
*/
|
|
27
|
-
class NodeFileUpload {
|
|
28
|
-
constructor(uri, size) {
|
|
29
|
-
this.uri = uri;
|
|
30
|
-
this.size = size;
|
|
31
|
-
this._uploadedBytes = 0;
|
|
32
|
-
this.fsPath = file_uri_1.FileUri.fsPath(uri);
|
|
33
|
-
this.id = 'theia_upload_' + crypto.randomBytes(16).toString('hex');
|
|
34
|
-
this.uploadPath = path.join(path.dirname(this.fsPath), this.id);
|
|
35
|
-
}
|
|
36
|
-
get uploadedBytes() {
|
|
37
|
-
return this._uploadedBytes;
|
|
38
|
-
}
|
|
39
|
-
async create() {
|
|
40
|
-
await fs.outputFile(this.uploadPath, '');
|
|
41
|
-
}
|
|
42
|
-
async append(chunk) {
|
|
43
|
-
await fs.appendFile(this.uploadPath, buffer_1.Buffer.from(chunk));
|
|
44
|
-
this._uploadedBytes += chunk.byteLength;
|
|
45
|
-
}
|
|
46
|
-
async rename() {
|
|
47
|
-
await fs.move(this.uploadPath, this.fsPath, { overwrite: true });
|
|
48
|
-
this.dispose = () => Promise.resolve();
|
|
49
|
-
}
|
|
50
|
-
dispose() {
|
|
51
|
-
fs.unlink(this.uploadPath).catch(() => { });
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
exports.NodeFileUpload = NodeFileUpload;
|
|
55
|
-
//# sourceMappingURL=node-file-upload.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-file-upload.js","sourceRoot":"","sources":["../../src/node/node-file-upload.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;;;AAEhF,6BAA6B;AAC7B,iCAAiC;AACjC,kDAAkD;AAClD,mCAAgC;AAEhC,4DAAwD;AAExD;;GAEG;AACH,MAAa,cAAc;IAUvB,YACa,GAAW,EACX,IAAY;QADZ,QAAG,GAAH,GAAG,CAAQ;QACX,SAAI,GAAJ,IAAI,CAAQ;QAPf,mBAAc,GAAG,CAAC,CAAC;QASzB,IAAI,CAAC,MAAM,GAAG,kBAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,CAAC,EAAE,GAAG,eAAe,GAAG,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACnE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IACpE,CAAC;IAXD,IAAI,aAAa;QACb,OAAO,IAAI,CAAC,cAAc,CAAC;IAC/B,CAAC;IAWD,KAAK,CAAC,MAAM;QACR,MAAM,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,KAAkB;QAC3B,MAAM,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,eAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACzD,IAAI,CAAC,cAAc,IAAI,KAAK,CAAC,UAAU,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,MAAM;QACR,MAAM,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACjE,IAAI,CAAC,OAAO,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3C,CAAC;IAED,OAAO;QACH,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAc,CAAC,CAAC,CAAC;IAC3D,CAAC;CAEJ;AArCD,wCAqCC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import * as nsfw from '@theia/core/shared/nsfw';
|
|
2
|
-
import { IMinimatch } from 'minimatch';
|
|
3
|
-
import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
|
|
4
|
-
import { FileChangeType, FileSystemWatcherClient, FileSystemWatcherServer, WatchOptions } from '../../common/filesystem-watcher-protocol';
|
|
5
|
-
import { FileChangeCollection } from '../file-change-collection';
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated since 1.6.0
|
|
8
|
-
*/
|
|
9
|
-
export interface WatcherOptions {
|
|
10
|
-
ignored: IMinimatch[];
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated since 1.6.0 use `NsfwFileSystemWatcherService` instead.
|
|
14
|
-
*/
|
|
15
|
-
export declare class NsfwFileSystemWatcherServer implements FileSystemWatcherServer {
|
|
16
|
-
protected client: FileSystemWatcherClient | undefined;
|
|
17
|
-
protected watcherSequence: number;
|
|
18
|
-
protected readonly watchers: Map<number, Disposable>;
|
|
19
|
-
protected readonly watcherOptions: Map<number, WatcherOptions>;
|
|
20
|
-
protected readonly toDispose: DisposableCollection;
|
|
21
|
-
protected changes: FileChangeCollection;
|
|
22
|
-
protected readonly options: {
|
|
23
|
-
verbose: boolean;
|
|
24
|
-
info: (message: string, ...args: any[]) => void;
|
|
25
|
-
error: (message: string, ...args: any[]) => void;
|
|
26
|
-
nsfwOptions: nsfw.Options;
|
|
27
|
-
};
|
|
28
|
-
constructor(options?: {
|
|
29
|
-
verbose?: boolean;
|
|
30
|
-
nsfwOptions?: nsfw.Options;
|
|
31
|
-
info?: (message: string, ...args: any[]) => void;
|
|
32
|
-
error?: (message: string, ...args: any[]) => void;
|
|
33
|
-
});
|
|
34
|
-
dispose(): void;
|
|
35
|
-
watchFileChanges(uri: string, options?: WatchOptions): Promise<number>;
|
|
36
|
-
protected start(watcherId: number, basePath: string, rawOptions: WatchOptions | undefined, toDisposeWatcher: DisposableCollection): Promise<void>;
|
|
37
|
-
unwatchFileChanges(watcherId: number): Promise<void>;
|
|
38
|
-
setClient(client: FileSystemWatcherClient | undefined): void;
|
|
39
|
-
protected pushAdded(watcherId: number, path: string): void;
|
|
40
|
-
protected pushUpdated(watcherId: number, path: string): void;
|
|
41
|
-
protected pushDeleted(watcherId: number, path: string): void;
|
|
42
|
-
protected pushFileChange(watcherId: number, path: string, type: FileChangeType): void;
|
|
43
|
-
protected resolvePath(directory: string, file: string): string;
|
|
44
|
-
/**
|
|
45
|
-
* Fires file changes to clients.
|
|
46
|
-
* It is debounced in the case if the filesystem is spamming to avoid overwhelming clients with events.
|
|
47
|
-
*/
|
|
48
|
-
protected readonly fireDidFilesChanged: () => void;
|
|
49
|
-
protected doFireDidFilesChanged(): void;
|
|
50
|
-
protected isIgnored(watcherId: number, path: string): boolean;
|
|
51
|
-
protected debug(message: string, ...params: any[]): void;
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=nsfw-filesystem-watcher.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nsfw-filesystem-watcher.d.ts","sourceRoot":"","sources":["../../../src/node/nsfw-watcher/nsfw-filesystem-watcher.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAa,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAErF,OAAO,EACH,cAAc,EACd,uBAAuB,EACvB,uBAAuB,EACvB,YAAY,EACf,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAOjE;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,OAAO,EAAE,UAAU,EAAE,CAAA;CACxB;AAED;;GAEG;AACH,qBAAa,2BAA4B,YAAW,uBAAuB;IAEvE,SAAS,CAAC,MAAM,EAAE,uBAAuB,GAAG,SAAS,CAAC;IAEtD,SAAS,CAAC,eAAe,SAAK;IAC9B,SAAS,CAAC,QAAQ,CAAC,QAAQ,0BAAiC;IAC5D,SAAS,CAAC,QAAQ,CAAC,cAAc,8BAAqC;IAEtE,SAAS,CAAC,QAAQ,CAAC,SAAS,uBAE1B;IAEF,SAAS,CAAC,OAAO,uBAA8B;IAE/C,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE;QACxB,OAAO,EAAE,OAAO,CAAA;QAChB,IAA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;IAK5D,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,GAAG,IAAI;IAWrF,SAAS,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAe9D;;;OAGG;IACH,SAAS,CAAC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,IAAI,CAAoD;IACtG,SAAS,CAAC,qBAAqB,IAAI,IAAI;IASvC,SAAS,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO;IAK7D,SAAS,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI;CAK3D"}
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2017-2018 TypeFox 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 WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.NsfwFileSystemWatcherServer = void 0;
|
|
19
|
-
const fs = require("fs");
|
|
20
|
-
const nsfw = require("@theia/core/shared/nsfw");
|
|
21
|
-
const paths = require("path");
|
|
22
|
-
const minimatch_1 = require("minimatch");
|
|
23
|
-
const disposable_1 = require("@theia/core/lib/common/disposable");
|
|
24
|
-
const file_uri_1 = require("@theia/core/lib/node/file-uri");
|
|
25
|
-
const file_change_collection_1 = require("../file-change-collection");
|
|
26
|
-
const timers_1 = require("timers");
|
|
27
|
-
const debounce = require("@theia/core/shared/lodash.debounce");
|
|
28
|
-
/**
|
|
29
|
-
* @deprecated since 1.6.0 use `NsfwFileSystemWatcherService` instead.
|
|
30
|
-
*/
|
|
31
|
-
class NsfwFileSystemWatcherServer {
|
|
32
|
-
constructor(options) {
|
|
33
|
-
this.watcherSequence = 1;
|
|
34
|
-
this.watchers = new Map();
|
|
35
|
-
this.watcherOptions = new Map();
|
|
36
|
-
this.toDispose = new disposable_1.DisposableCollection(disposable_1.Disposable.create(() => this.setClient(undefined)));
|
|
37
|
-
this.changes = new file_change_collection_1.FileChangeCollection();
|
|
38
|
-
/**
|
|
39
|
-
* Fires file changes to clients.
|
|
40
|
-
* It is debounced in the case if the filesystem is spamming to avoid overwhelming clients with events.
|
|
41
|
-
*/
|
|
42
|
-
this.fireDidFilesChanged = debounce(() => this.doFireDidFilesChanged(), 50);
|
|
43
|
-
this.options = Object.assign({ nsfwOptions: {}, verbose: false, info: (message, ...args) => console.info(message, ...args), error: (message, ...args) => console.error(message, ...args) }, options);
|
|
44
|
-
}
|
|
45
|
-
dispose() {
|
|
46
|
-
this.toDispose.dispose();
|
|
47
|
-
}
|
|
48
|
-
async watchFileChanges(uri, options) {
|
|
49
|
-
const watcherId = this.watcherSequence++;
|
|
50
|
-
const basePath = file_uri_1.FileUri.fsPath(uri);
|
|
51
|
-
this.debug('Starting watching:', basePath);
|
|
52
|
-
const toDisposeWatcher = new disposable_1.DisposableCollection();
|
|
53
|
-
this.watchers.set(watcherId, toDisposeWatcher);
|
|
54
|
-
toDisposeWatcher.push(disposable_1.Disposable.create(() => this.watchers.delete(watcherId)));
|
|
55
|
-
if (fs.existsSync(basePath)) {
|
|
56
|
-
this.start(watcherId, basePath, options, toDisposeWatcher);
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
const toClearTimer = new disposable_1.DisposableCollection();
|
|
60
|
-
const timer = (0, timers_1.setInterval)(() => {
|
|
61
|
-
if (fs.existsSync(basePath)) {
|
|
62
|
-
toClearTimer.dispose();
|
|
63
|
-
this.pushAdded(watcherId, basePath);
|
|
64
|
-
this.start(watcherId, basePath, options, toDisposeWatcher);
|
|
65
|
-
}
|
|
66
|
-
}, 500);
|
|
67
|
-
toClearTimer.push(disposable_1.Disposable.create(() => (0, timers_1.clearInterval)(timer)));
|
|
68
|
-
toDisposeWatcher.push(toClearTimer);
|
|
69
|
-
}
|
|
70
|
-
this.toDispose.push(toDisposeWatcher);
|
|
71
|
-
return watcherId;
|
|
72
|
-
}
|
|
73
|
-
async start(watcherId, basePath, rawOptions, toDisposeWatcher) {
|
|
74
|
-
const options = Object.assign({ ignored: [] }, rawOptions);
|
|
75
|
-
if (options.ignored.length > 0) {
|
|
76
|
-
this.debug('Files ignored for watching', options.ignored);
|
|
77
|
-
}
|
|
78
|
-
let watcher = await nsfw(fs.realpathSync(basePath), (events) => {
|
|
79
|
-
for (const event of events) {
|
|
80
|
-
if (event.action === 0 /* CREATED */) {
|
|
81
|
-
this.pushAdded(watcherId, this.resolvePath(event.directory, event.file));
|
|
82
|
-
}
|
|
83
|
-
if (event.action === 1 /* DELETED */) {
|
|
84
|
-
this.pushDeleted(watcherId, this.resolvePath(event.directory, event.file));
|
|
85
|
-
}
|
|
86
|
-
if (event.action === 2 /* MODIFIED */) {
|
|
87
|
-
this.pushUpdated(watcherId, this.resolvePath(event.directory, event.file));
|
|
88
|
-
}
|
|
89
|
-
if (event.action === 3 /* RENAMED */) {
|
|
90
|
-
this.pushDeleted(watcherId, this.resolvePath(event.directory, event.oldFile));
|
|
91
|
-
this.pushAdded(watcherId, this.resolvePath(event.newDirectory || event.directory, event.newFile));
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}, Object.assign({ errorCallback: error => {
|
|
95
|
-
// see https://github.com/atom/github/issues/342
|
|
96
|
-
console.warn(`Failed to watch "${basePath}":`, error);
|
|
97
|
-
if (error === 'Inotify limit reached') {
|
|
98
|
-
if (this.client) {
|
|
99
|
-
this.client.onError();
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
this.unwatchFileChanges(watcherId);
|
|
103
|
-
} }, this.options.nsfwOptions));
|
|
104
|
-
await watcher.start();
|
|
105
|
-
this.options.info('Started watching:', basePath);
|
|
106
|
-
if (toDisposeWatcher.disposed) {
|
|
107
|
-
this.debug('Stopping watching:', basePath);
|
|
108
|
-
await watcher.stop();
|
|
109
|
-
// remove a reference to nsfw otherwise GC cannot collect it
|
|
110
|
-
watcher = undefined;
|
|
111
|
-
this.options.info('Stopped watching:', basePath);
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
toDisposeWatcher.push(disposable_1.Disposable.create(async () => {
|
|
115
|
-
this.watcherOptions.delete(watcherId);
|
|
116
|
-
if (watcher) {
|
|
117
|
-
this.debug('Stopping watching:', basePath);
|
|
118
|
-
await watcher.stop();
|
|
119
|
-
// remove a reference to nsfw otherwise GC cannot collect it
|
|
120
|
-
watcher = undefined;
|
|
121
|
-
this.options.info('Stopped watching:', basePath);
|
|
122
|
-
}
|
|
123
|
-
}));
|
|
124
|
-
this.watcherOptions.set(watcherId, {
|
|
125
|
-
ignored: options.ignored.map(pattern => new minimatch_1.Minimatch(pattern, { dot: true }))
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
unwatchFileChanges(watcherId) {
|
|
129
|
-
const disposable = this.watchers.get(watcherId);
|
|
130
|
-
if (disposable) {
|
|
131
|
-
this.watchers.delete(watcherId);
|
|
132
|
-
disposable.dispose();
|
|
133
|
-
}
|
|
134
|
-
return Promise.resolve();
|
|
135
|
-
}
|
|
136
|
-
setClient(client) {
|
|
137
|
-
if (client && this.toDispose.disposed) {
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
this.client = client;
|
|
141
|
-
}
|
|
142
|
-
pushAdded(watcherId, path) {
|
|
143
|
-
this.debug('Added:', path);
|
|
144
|
-
this.pushFileChange(watcherId, path, 1 /* ADDED */);
|
|
145
|
-
}
|
|
146
|
-
pushUpdated(watcherId, path) {
|
|
147
|
-
this.debug('Updated:', path);
|
|
148
|
-
this.pushFileChange(watcherId, path, 0 /* UPDATED */);
|
|
149
|
-
}
|
|
150
|
-
pushDeleted(watcherId, path) {
|
|
151
|
-
this.debug('Deleted:', path);
|
|
152
|
-
this.pushFileChange(watcherId, path, 2 /* DELETED */);
|
|
153
|
-
}
|
|
154
|
-
pushFileChange(watcherId, path, type) {
|
|
155
|
-
if (this.isIgnored(watcherId, path)) {
|
|
156
|
-
return;
|
|
157
|
-
}
|
|
158
|
-
const uri = file_uri_1.FileUri.create(path).toString();
|
|
159
|
-
this.changes.push({ uri, type });
|
|
160
|
-
this.fireDidFilesChanged();
|
|
161
|
-
}
|
|
162
|
-
resolvePath(directory, file) {
|
|
163
|
-
const path = paths.join(directory, file);
|
|
164
|
-
try {
|
|
165
|
-
return fs.realpathSync(path);
|
|
166
|
-
}
|
|
167
|
-
catch (_a) {
|
|
168
|
-
try {
|
|
169
|
-
// file does not exist try to resolve directory
|
|
170
|
-
return paths.join(fs.realpathSync(directory), file);
|
|
171
|
-
}
|
|
172
|
-
catch (_b) {
|
|
173
|
-
// directory does not exist fall back to symlink
|
|
174
|
-
return path;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
doFireDidFilesChanged() {
|
|
179
|
-
const changes = this.changes.values();
|
|
180
|
-
this.changes = new file_change_collection_1.FileChangeCollection();
|
|
181
|
-
const event = { changes };
|
|
182
|
-
if (this.client) {
|
|
183
|
-
this.client.onDidFilesChanged(event);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
isIgnored(watcherId, path) {
|
|
187
|
-
const options = this.watcherOptions.get(watcherId);
|
|
188
|
-
return !!options && options.ignored.length > 0 && options.ignored.some(m => m.match(path));
|
|
189
|
-
}
|
|
190
|
-
debug(message, ...params) {
|
|
191
|
-
if (this.options.verbose) {
|
|
192
|
-
this.options.info(message, ...params);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
exports.NsfwFileSystemWatcherServer = NsfwFileSystemWatcherServer;
|
|
197
|
-
//# sourceMappingURL=nsfw-filesystem-watcher.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nsfw-filesystem-watcher.js","sourceRoot":"","sources":["../../../src/node/nsfw-watcher/nsfw-filesystem-watcher.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,8CAA8C;AAC9C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;;;AAEhF,yBAAyB;AACzB,gDAAgD;AAChD,8BAA8B;AAC9B,yCAAkD;AAClD,kEAAqF;AACrF,4DAAwD;AAOxD,sEAAiE;AACjE,mCAAoD;AAEpD,+DAAgE;AAWhE;;GAEG;AACH,MAAa,2BAA2B;IAqBpC,YAAY,OAKX;QAtBS,oBAAe,GAAG,CAAC,CAAC;QACX,aAAQ,GAAG,IAAI,GAAG,EAAsB,CAAC;QACzC,mBAAc,GAAG,IAAI,GAAG,EAA0B,CAAC;QAEnD,cAAS,GAAG,IAAI,iCAAoB,CACnD,uBAAU,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CACrD,CAAC;QAEQ,YAAO,GAAG,IAAI,6CAAoB,EAAE,CAAC;QA6K/C;;;WAGG;QACgB,wBAAmB,GAAe,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE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