@theia/filesystem 1.55.0-next.4 → 1.55.0
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/file-dialog/file-dialog-widget.d.ts +2 -0
- package/lib/browser/file-dialog/file-dialog-widget.d.ts.map +1 -1
- package/lib/browser/file-dialog/file-dialog-widget.js +9 -0
- package/lib/browser/file-dialog/file-dialog-widget.js.map +1 -1
- package/lib/browser/file-tree/file-tree-model.d.ts +1 -5
- package/lib/browser/file-tree/file-tree-model.d.ts.map +1 -1
- package/lib/browser/file-tree/file-tree-model.js +0 -17
- package/lib/browser/file-tree/file-tree-model.js.map +1 -1
- package/lib/browser/file-upload-service.d.ts.map +1 -1
- package/lib/browser/file-upload-service.js +6 -0
- package/lib/browser/file-upload-service.js.map +1 -1
- package/lib/browser/filesystem-preferences.d.ts.map +1 -1
- package/lib/browser/filesystem-preferences.js +1 -2
- package/lib/browser/filesystem-preferences.js.map +1 -1
- package/lib/node/download/file-download-cache.d.ts.map +1 -1
- package/lib/node/download/file-download-cache.js +3 -5
- package/lib/node/download/file-download-cache.js.map +1 -1
- package/lib/node/filesystem-backend-module.d.ts +8 -8
- package/lib/node/filesystem-backend-module.d.ts.map +1 -1
- package/lib/node/filesystem-backend-module.js +27 -27
- package/lib/node/filesystem-backend-module.js.map +1 -1
- package/lib/node/filesystem-watcher-client.d.ts +1 -2
- package/lib/node/filesystem-watcher-client.d.ts.map +1 -1
- package/lib/node/filesystem-watcher-client.js +2 -3
- package/lib/node/filesystem-watcher-client.js.map +1 -1
- package/lib/node/node-file-upload-service.d.ts.map +1 -1
- package/lib/node/node-file-upload-service.js +8 -1
- package/lib/node/node-file-upload-service.js.map +1 -1
- package/lib/node/parcel-watcher/index.d.ts.map +1 -0
- package/lib/node/{nsfw-watcher → parcel-watcher}/index.js +3 -3
- package/lib/node/parcel-watcher/index.js.map +1 -0
- package/lib/node/{nsfw-watcher/nsfw-filesystem-service.d.ts → parcel-watcher/parcel-filesystem-service.d.ts} +29 -29
- package/lib/node/parcel-watcher/parcel-filesystem-service.d.ts.map +1 -0
- package/lib/node/{nsfw-watcher/nsfw-filesystem-service.js → parcel-watcher/parcel-filesystem-service.js} +55 -66
- package/lib/node/parcel-watcher/parcel-filesystem-service.js.map +1 -0
- package/lib/node/parcel-watcher/parcel-filesystem-watcher.spec.d.ts +2 -0
- package/lib/node/parcel-watcher/parcel-filesystem-watcher.spec.d.ts.map +1 -0
- package/lib/node/{nsfw-watcher/nsfw-filesystem-watcher.spec.js → parcel-watcher/parcel-filesystem-watcher.spec.js} +22 -29
- package/lib/node/parcel-watcher/parcel-filesystem-watcher.spec.js.map +1 -0
- package/lib/node/parcel-watcher/parcel-options.d.ts +7 -0
- package/lib/node/parcel-watcher/parcel-options.d.ts.map +1 -0
- package/lib/node/{nsfw-watcher/nsfw-options.js → parcel-watcher/parcel-options.js} +4 -4
- package/lib/node/parcel-watcher/parcel-options.js.map +1 -0
- package/package.json +5 -6
- package/src/browser/file-dialog/file-dialog-widget.ts +11 -0
- package/src/browser/file-tree/file-tree-model.ts +1 -19
- package/src/browser/file-upload-service.ts +5 -0
- package/src/browser/filesystem-preferences.ts +1 -2
- package/src/node/download/file-download-cache.ts +3 -5
- package/src/node/filesystem-backend-module.ts +27 -27
- package/src/node/filesystem-watcher-client.ts +1 -3
- package/src/node/node-file-upload-service.ts +7 -1
- package/src/node/{nsfw-watcher → parcel-watcher}/index.ts +3 -3
- package/src/node/{nsfw-watcher/nsfw-filesystem-service.ts → parcel-watcher/parcel-filesystem-service.ts} +62 -72
- package/src/node/{nsfw-watcher/nsfw-filesystem-watcher.spec.ts → parcel-watcher/parcel-filesystem-watcher.spec.ts} +22 -29
- package/src/node/{nsfw-watcher/nsfw-options.ts → parcel-watcher/parcel-options.ts} +4 -4
- package/lib/node/nsfw-watcher/index.d.ts.map +0 -1
- package/lib/node/nsfw-watcher/index.js.map +0 -1
- package/lib/node/nsfw-watcher/nsfw-filesystem-service.d.ts.map +0 -1
- package/lib/node/nsfw-watcher/nsfw-filesystem-service.js.map +0 -1
- package/lib/node/nsfw-watcher/nsfw-filesystem-watcher.spec.d.ts +0 -2
- package/lib/node/nsfw-watcher/nsfw-filesystem-watcher.spec.d.ts.map +0 -1
- package/lib/node/nsfw-watcher/nsfw-filesystem-watcher.spec.js.map +0 -1
- package/lib/node/nsfw-watcher/nsfw-options.d.ts +0 -7
- package/lib/node/nsfw-watcher/nsfw-options.d.ts.map +0 -1
- package/lib/node/nsfw-watcher/nsfw-options.js.map +0 -1
- package/src/typings/nsfw/index.d.ts +0 -18
- /package/lib/node/{nsfw-watcher → parcel-watcher}/index.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parcel-filesystem-watcher.spec.js","sourceRoot":"","sources":["../../../src/node/parcel-watcher/parcel-filesystem-watcher.spec.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,0CAA0C;AAC1C,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,6BAA6B;AAC7B,6BAA6B;AAC7B,oCAAoC;AACpC,kDAAkD;AAClD,iCAAiC;AAEjC,+CAA+C;AAC/C,2EAA6E;AAG7E,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;AAC3B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;AAE3B,QAAQ,CAAC,2BAA2B,EAAE;IAElC,IAAI,IAAS,CAAC;IACd,IAAI,cAA8C,CAAC;IACnD,IAAI,SAAiB,CAAC;IAEtB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAErB,UAAU,CAAC,KAAK,IAAI,EAAE;QAClB,IAAI,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,cAA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,KAAK,CAAC,IAAY;QACvB,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;IAC7D,CAAC;AAEL,CAAC,CAAC,CAAC;AAEH,8DAA8D;AAC9D,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,MAAW,EAAE,EAAE;IAC7C,OAAO,CAAC,KAAK,CAAC,+BAA+B,GAAG,MAAM,CAAC,CAAC;AAC5D,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Options } from '@theia/core/shared/@parcel/watcher';
|
|
2
|
+
/**
|
|
3
|
+
* Inversify service identifier allowing extensions to override options passed to parcel by the file watcher.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ParcelWatcherOptions: unique symbol;
|
|
6
|
+
export type ParcelWatcherOptions = Options;
|
|
7
|
+
//# sourceMappingURL=parcel-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parcel-options.d.ts","sourceRoot":"","sources":["../../../src/node/parcel-watcher/parcel-options.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AACnE,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC"}
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
16
|
// *****************************************************************************
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
18
|
+
exports.ParcelWatcherOptions = void 0;
|
|
19
19
|
/**
|
|
20
|
-
* Inversify service identifier allowing extensions to override options passed to
|
|
20
|
+
* Inversify service identifier allowing extensions to override options passed to parcel by the file watcher.
|
|
21
21
|
*/
|
|
22
|
-
exports.
|
|
23
|
-
//# sourceMappingURL=
|
|
22
|
+
exports.ParcelWatcherOptions = Symbol('ParcelWatcherOptions');
|
|
23
|
+
//# sourceMappingURL=parcel-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parcel-options.js","sourceRoot":"","sources":["../../../src/node/parcel-watcher/parcel-options.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,gFAAgF;AAChF,gFAAgF;;;AAIhF;;GAEG;AACU,QAAA,oBAAoB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/filesystem",
|
|
3
|
-
"version": "1.55.0
|
|
3
|
+
"version": "1.55.0",
|
|
4
4
|
"description": "Theia - FileSystem Extension",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/core": "1.55.0
|
|
6
|
+
"@theia/core": "1.55.0",
|
|
7
7
|
"@types/body-parser": "^1.17.0",
|
|
8
8
|
"@types/multer": "^1.4.7",
|
|
9
|
-
"@types/rimraf": "^2.0.2",
|
|
10
9
|
"@types/tar-fs": "^1.16.1",
|
|
11
10
|
"async-mutex": "^0.3.1",
|
|
12
11
|
"body-parser": "^1.18.3",
|
|
@@ -14,7 +13,7 @@
|
|
|
14
13
|
"http-status-codes": "^1.3.0",
|
|
15
14
|
"minimatch": "^5.1.0",
|
|
16
15
|
"multer": "1.4.4-lts.1",
|
|
17
|
-
"rimraf": "^
|
|
16
|
+
"rimraf": "^5.0.0",
|
|
18
17
|
"stat-mode": "^1.0.0",
|
|
19
18
|
"tar-fs": "^1.16.2",
|
|
20
19
|
"trash": "^7.2.0",
|
|
@@ -73,10 +72,10 @@
|
|
|
73
72
|
"watch": "theiaext watch"
|
|
74
73
|
},
|
|
75
74
|
"devDependencies": {
|
|
76
|
-
"@theia/ext-scripts": "1.
|
|
75
|
+
"@theia/ext-scripts": "1.55.0"
|
|
77
76
|
},
|
|
78
77
|
"nyc": {
|
|
79
78
|
"extends": "../../configs/nyc.json"
|
|
80
79
|
},
|
|
81
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "0e7a523b8e798679d2e098709c63bd7060e54c8a"
|
|
82
81
|
}
|
|
@@ -55,6 +55,17 @@ export class FileDialogWidget extends FileTreeWidget {
|
|
|
55
55
|
return attr;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
protected override handleEnter(event: KeyboardEvent): boolean | void {
|
|
59
|
+
// Handle ENTER in the dialog to Accept.
|
|
60
|
+
// Tree view will just expand/collapse the node. This works also with arrow keys or SPACE.
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
protected override handleEscape(event: KeyboardEvent): boolean | void {
|
|
65
|
+
// Handle ESC in the dialog to Cancel and close the Dialog.
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
|
|
58
69
|
protected override createNodeClassNames(node: TreeNode, props: NodeProps): string[] {
|
|
59
70
|
const classNames = super.createNodeClassNames(node, props);
|
|
60
71
|
if (this.shouldDisableSelection(node)) {
|
|
@@ -21,7 +21,7 @@ import { FileStatNode, DirNode, FileNode } from './file-tree';
|
|
|
21
21
|
import { LocationService } from '../location';
|
|
22
22
|
import { LabelProvider } from '@theia/core/lib/browser/label-provider';
|
|
23
23
|
import { FileService } from '../file-service';
|
|
24
|
-
import { FileOperationError, FileOperationResult, FileChangesEvent, FileChangeType, FileChange
|
|
24
|
+
import { FileOperationError, FileOperationResult, FileChangesEvent, FileChangeType, FileChange } from '../../common/files';
|
|
25
25
|
import { MessageService } from '@theia/core/lib/common/message-service';
|
|
26
26
|
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
|
27
27
|
import { FileSystemUtils } from '../../common';
|
|
@@ -45,7 +45,6 @@ export class FileTreeModel extends CompressedTreeModel implements LocationServic
|
|
|
45
45
|
protected override init(): void {
|
|
46
46
|
super.init();
|
|
47
47
|
this.toDispose.push(this.fileService.onDidFilesChange(changes => this.onFilesChanged(changes)));
|
|
48
|
-
this.toDispose.push(this.fileService.onDidRunOperation(event => this.onDidMove(event)));
|
|
49
48
|
}
|
|
50
49
|
|
|
51
50
|
get location(): URI | undefined {
|
|
@@ -92,23 +91,6 @@ export class FileTreeModel extends CompressedTreeModel implements LocationServic
|
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
93
|
|
|
95
|
-
/**
|
|
96
|
-
* to workaround https://github.com/Axosoft/nsfw/issues/42
|
|
97
|
-
*/
|
|
98
|
-
protected onDidMove(event: FileOperationEvent): void {
|
|
99
|
-
if (!event.isOperation(FileOperation.MOVE)) {
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
if (event.resource.parent.toString() === event.target.resource.parent.toString()) {
|
|
103
|
-
// file rename
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
this.refreshAffectedNodes([
|
|
107
|
-
event.resource,
|
|
108
|
-
event.target.resource
|
|
109
|
-
]);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
94
|
protected onFilesChanged(changes: FileChangesEvent): void {
|
|
113
95
|
if (!this.refreshAffectedNodes(this.getAffectedUris(changes)) && this.isRootAffected(changes)) {
|
|
114
96
|
this.refresh();
|
|
@@ -254,6 +254,7 @@ export class FileUploadService {
|
|
|
254
254
|
} catch (error) {
|
|
255
255
|
uploadSemaphore.cancel();
|
|
256
256
|
if (!isCancelled(error)) {
|
|
257
|
+
this.messageService.error(nls.localize('theia/filesystem/uploadFailed', 'An error occurred while uploading a file. {0}', error.message));
|
|
257
258
|
throw error;
|
|
258
259
|
}
|
|
259
260
|
}
|
|
@@ -348,6 +349,10 @@ export class FileUploadService {
|
|
|
348
349
|
unregister();
|
|
349
350
|
if (xhr.status === 200) {
|
|
350
351
|
resolve();
|
|
352
|
+
} else if (xhr.status === 500 && xhr.statusText !== xhr.response) {
|
|
353
|
+
// internal error with cause message
|
|
354
|
+
// see packages/filesystem/src/node/node-file-upload-service.ts
|
|
355
|
+
reject(new Error(`Internal server error: ${xhr.response}`));
|
|
351
356
|
} else {
|
|
352
357
|
reject(new Error(`POST request failed: ${xhr.status} ${xhr.statusText}`));
|
|
353
358
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
import { injectable, inject } from '@theia/core/shared/inversify';
|
|
17
17
|
import { ILogger } from '@theia/core/lib/common/logger';
|
|
18
|
-
import
|
|
18
|
+
import { rimraf } from 'rimraf';
|
|
19
19
|
|
|
20
20
|
export interface DownloadStorageItem {
|
|
21
21
|
file: string;
|
|
@@ -70,10 +70,8 @@ export class FileDownloadCache {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
protected deleteRecursively(pathToDelete: string): void {
|
|
73
|
-
rimraf(pathToDelete
|
|
74
|
-
|
|
75
|
-
this.logger.warn(`An error occurred while deleting the temporary data from the disk. Cannot clean up: ${pathToDelete}.`, error);
|
|
76
|
-
}
|
|
73
|
+
rimraf(pathToDelete).catch(error => {
|
|
74
|
+
this.logger.warn(`An error occurred while deleting the temporary data from the disk. Cannot clean up: ${pathToDelete}.`, error);
|
|
77
75
|
});
|
|
78
76
|
}
|
|
79
77
|
|
|
@@ -19,9 +19,9 @@ import { ContainerModule, interfaces } from '@theia/core/shared/inversify';
|
|
|
19
19
|
import { ConnectionHandler, RpcConnectionHandler, ILogger } from '@theia/core/lib/common';
|
|
20
20
|
import { FileSystemWatcherServer, FileSystemWatcherService } from '../common/filesystem-watcher-protocol';
|
|
21
21
|
import { FileSystemWatcherServerClient } from './filesystem-watcher-client';
|
|
22
|
-
import {
|
|
22
|
+
import { ParcelFileSystemWatcherService, ParcelFileSystemWatcherServerOptions } from './parcel-watcher/parcel-filesystem-service';
|
|
23
23
|
import { NodeFileUploadService } from './node-file-upload-service';
|
|
24
|
-
import {
|
|
24
|
+
import { ParcelWatcherOptions } from './parcel-watcher/parcel-options';
|
|
25
25
|
import { DiskFileSystemProvider } from './disk-file-system-provider';
|
|
26
26
|
import {
|
|
27
27
|
remoteFileSystemPath, RemoteFileSystemServer, RemoteFileSystemClient, FileSystemProviderServer, RemoteFileSystemProxyFactory
|
|
@@ -32,16 +32,16 @@ import { BackendApplicationContribution, IPCConnectionProvider } from '@theia/co
|
|
|
32
32
|
import { RpcProxyFactory, ConnectionErrorHandler } from '@theia/core';
|
|
33
33
|
import { FileSystemWatcherServiceDispatcher } from './filesystem-watcher-dispatcher';
|
|
34
34
|
|
|
35
|
-
export const
|
|
36
|
-
export const
|
|
35
|
+
export const WATCHER_SINGLE_THREADED = process.argv.includes('--no-cluster');
|
|
36
|
+
export const WATCHER_VERBOSE = process.argv.includes('--watcher-verbose');
|
|
37
37
|
|
|
38
|
-
export const
|
|
38
|
+
export const FileSystemWatcherServiceProcessOptions = Symbol('FileSystemWatcherServiceProcessOptions');
|
|
39
39
|
/**
|
|
40
|
-
* Options to control the way the `
|
|
40
|
+
* Options to control the way the `ParcelFileSystemWatcherService` process is spawned.
|
|
41
41
|
*/
|
|
42
|
-
export interface
|
|
42
|
+
export interface FileSystemWatcherServiceProcessOptions {
|
|
43
43
|
/**
|
|
44
|
-
* Path to the script that will run the `
|
|
44
|
+
* Path to the script that will run the `ParcelFileSystemWatcherService` in a new process.
|
|
45
45
|
*/
|
|
46
46
|
entryPoint: string;
|
|
47
47
|
}
|
|
@@ -66,41 +66,41 @@ export default new ContainerModule(bind => {
|
|
|
66
66
|
});
|
|
67
67
|
|
|
68
68
|
export function bindFileSystemWatcherServer(bind: interfaces.Bind): void {
|
|
69
|
-
bind<
|
|
69
|
+
bind<ParcelWatcherOptions>(ParcelWatcherOptions).toConstantValue({});
|
|
70
70
|
|
|
71
71
|
bind(FileSystemWatcherServiceDispatcher).toSelf().inSingletonScope();
|
|
72
72
|
|
|
73
73
|
bind(FileSystemWatcherServerClient).toSelf();
|
|
74
74
|
bind(FileSystemWatcherServer).toService(FileSystemWatcherServerClient);
|
|
75
75
|
|
|
76
|
-
bind<
|
|
77
|
-
entryPoint: path.join(__dirname, '
|
|
76
|
+
bind<FileSystemWatcherServiceProcessOptions>(FileSystemWatcherServiceProcessOptions).toDynamicValue(ctx => ({
|
|
77
|
+
entryPoint: path.join(__dirname, 'parcel-watcher'),
|
|
78
78
|
})).inSingletonScope();
|
|
79
|
-
bind<
|
|
79
|
+
bind<ParcelFileSystemWatcherServerOptions>(ParcelFileSystemWatcherServerOptions).toDynamicValue(ctx => {
|
|
80
80
|
const logger = ctx.container.get<ILogger>(ILogger);
|
|
81
|
-
const
|
|
81
|
+
const watcherOptions = ctx.container.get<ParcelWatcherOptions>(ParcelWatcherOptions);
|
|
82
82
|
return {
|
|
83
|
-
|
|
84
|
-
verbose:
|
|
83
|
+
parcelOptions: watcherOptions,
|
|
84
|
+
verbose: WATCHER_VERBOSE,
|
|
85
85
|
info: (message, ...args) => logger.info(message, ...args),
|
|
86
86
|
error: (message, ...args) => logger.error(message, ...args),
|
|
87
87
|
};
|
|
88
88
|
}).inSingletonScope();
|
|
89
89
|
|
|
90
90
|
bind<FileSystemWatcherService>(FileSystemWatcherService).toDynamicValue(
|
|
91
|
-
ctx =>
|
|
92
|
-
?
|
|
93
|
-
:
|
|
91
|
+
ctx => WATCHER_SINGLE_THREADED
|
|
92
|
+
? createParcelFileSystemWatcherService(ctx)
|
|
93
|
+
: spawnParcelFileSystemWatcherServiceProcess(ctx)
|
|
94
94
|
).inSingletonScope();
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
98
|
* Run the watch server in the current process.
|
|
99
99
|
*/
|
|
100
|
-
export function
|
|
101
|
-
const options = ctx.container.get<
|
|
100
|
+
export function createParcelFileSystemWatcherService(ctx: interfaces.Context): FileSystemWatcherService {
|
|
101
|
+
const options = ctx.container.get<ParcelFileSystemWatcherServerOptions>(ParcelFileSystemWatcherServerOptions);
|
|
102
102
|
const dispatcher = ctx.container.get<FileSystemWatcherServiceDispatcher>(FileSystemWatcherServiceDispatcher);
|
|
103
|
-
const server = new
|
|
103
|
+
const server = new ParcelFileSystemWatcherService(options);
|
|
104
104
|
server.setClient(dispatcher);
|
|
105
105
|
return server;
|
|
106
106
|
}
|
|
@@ -109,21 +109,21 @@ export function createNsfwFileSystemWatcherService(ctx: interfaces.Context): Fil
|
|
|
109
109
|
* Run the watch server in a child process.
|
|
110
110
|
* Return a proxy forwarding calls to the child process.
|
|
111
111
|
*/
|
|
112
|
-
export function
|
|
113
|
-
const options = ctx.container.get<
|
|
112
|
+
export function spawnParcelFileSystemWatcherServiceProcess(ctx: interfaces.Context): FileSystemWatcherService {
|
|
113
|
+
const options = ctx.container.get<FileSystemWatcherServiceProcessOptions>(FileSystemWatcherServiceProcessOptions);
|
|
114
114
|
const dispatcher = ctx.container.get<FileSystemWatcherServiceDispatcher>(FileSystemWatcherServiceDispatcher);
|
|
115
|
-
const serverName = '
|
|
115
|
+
const serverName = 'parcel-watcher';
|
|
116
116
|
const logger = ctx.container.get<ILogger>(ILogger);
|
|
117
|
-
const
|
|
117
|
+
const watcherOptions = ctx.container.get<ParcelWatcherOptions>(ParcelWatcherOptions);
|
|
118
118
|
const ipcConnectionProvider = ctx.container.get<IPCConnectionProvider>(IPCConnectionProvider);
|
|
119
119
|
const proxyFactory = new RpcProxyFactory<FileSystemWatcherService>();
|
|
120
120
|
const serverProxy = proxyFactory.createProxy();
|
|
121
121
|
// We need to call `.setClient` before listening, else the JSON-RPC calls won't go through.
|
|
122
122
|
serverProxy.setClient(dispatcher);
|
|
123
123
|
const args: string[] = [
|
|
124
|
-
`--
|
|
124
|
+
`--watchOptions=${JSON.stringify(watcherOptions)}`
|
|
125
125
|
];
|
|
126
|
-
if (
|
|
126
|
+
if (WATCHER_VERBOSE) {
|
|
127
127
|
args.push('--verbose');
|
|
128
128
|
}
|
|
129
129
|
ipcConnectionProvider.listen({
|
|
@@ -18,10 +18,8 @@ import { injectable, inject } from '@theia/core/shared/inversify';
|
|
|
18
18
|
import { FileSystemWatcherServer, WatchOptions, FileSystemWatcherClient, FileSystemWatcherService } from '../common/filesystem-watcher-protocol';
|
|
19
19
|
import { FileSystemWatcherServiceDispatcher } from './filesystem-watcher-dispatcher';
|
|
20
20
|
|
|
21
|
-
export const NSFW_WATCHER = 'nsfw-watcher';
|
|
22
|
-
|
|
23
21
|
/**
|
|
24
|
-
* Wraps the
|
|
22
|
+
* Wraps the watcher singleton service for each frontend.
|
|
25
23
|
*/
|
|
26
24
|
@injectable()
|
|
27
25
|
export class FileSystemWatcherServerClient implements FileSystemWatcherServer {
|
|
@@ -73,7 +73,13 @@ export class NodeFileUploadService implements BackendApplicationContribution {
|
|
|
73
73
|
response.status(200).send(target); // ok
|
|
74
74
|
} catch (error) {
|
|
75
75
|
console.error(error);
|
|
76
|
-
|
|
76
|
+
if (error.message) {
|
|
77
|
+
// internal server error with error message as response
|
|
78
|
+
response.status(500).send(error.message);
|
|
79
|
+
} else {
|
|
80
|
+
// default internal server error
|
|
81
|
+
response.sendStatus(500);
|
|
82
|
+
}
|
|
77
83
|
}
|
|
78
84
|
}
|
|
79
85
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import * as yargs from '@theia/core/shared/yargs';
|
|
18
18
|
import { RpcProxyFactory } from '@theia/core';
|
|
19
19
|
import { FileSystemWatcherServiceClient } from '../../common/filesystem-watcher-protocol';
|
|
20
|
-
import {
|
|
20
|
+
import { ParcelFileSystemWatcherService } from './parcel-filesystem-service';
|
|
21
21
|
import { IPCEntryPoint } from '@theia/core/lib/node/messaging/ipc-protocol';
|
|
22
22
|
|
|
23
23
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -30,7 +30,7 @@ const options: {
|
|
|
30
30
|
alias: 'v',
|
|
31
31
|
type: 'boolean'
|
|
32
32
|
})
|
|
33
|
-
.option('
|
|
33
|
+
.option('watchOptions', {
|
|
34
34
|
alias: 'o',
|
|
35
35
|
type: 'string',
|
|
36
36
|
coerce: JSON.parse
|
|
@@ -38,7 +38,7 @@ const options: {
|
|
|
38
38
|
.argv as any;
|
|
39
39
|
|
|
40
40
|
export default <IPCEntryPoint>(connection => {
|
|
41
|
-
const server = new
|
|
41
|
+
const server = new ParcelFileSystemWatcherService(options);
|
|
42
42
|
const factory = new RpcProxyFactory<FileSystemWatcherServiceClient>(server);
|
|
43
43
|
server.setClient(factory.createProxy());
|
|
44
44
|
factory.listen(connection);
|