@theia/filesystem 1.26.0-next.9 → 1.26.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.
Files changed (56) hide show
  1. package/lib/browser/breadcrumbs/filepath-breadcrumbs-container.d.ts +1 -2
  2. package/lib/browser/breadcrumbs/filepath-breadcrumbs-container.d.ts.map +1 -1
  3. package/lib/browser/breadcrumbs/filepath-breadcrumbs-container.js +3 -4
  4. package/lib/browser/breadcrumbs/filepath-breadcrumbs-container.js.map +1 -1
  5. package/lib/browser/file-tree/file-tree-decorator-adapter.d.ts +1 -1
  6. package/lib/browser/file-tree/file-tree-decorator-adapter.js +1 -1
  7. package/lib/browser/file-tree/file-tree-widget.js +1 -1
  8. package/lib/browser/file-tree/file-tree-widget.js.map +1 -1
  9. package/lib/browser/file-tree/file-tree.d.ts +1 -2
  10. package/lib/browser/file-tree/file-tree.d.ts.map +1 -1
  11. package/lib/browser/file-tree/file-tree.js.map +1 -1
  12. package/lib/browser/filesystem-frontend-module.d.ts.map +1 -1
  13. package/lib/browser/filesystem-frontend-module.js +0 -165
  14. package/lib/browser/filesystem-frontend-module.js.map +1 -1
  15. package/lib/browser/index.d.ts +0 -1
  16. package/lib/browser/index.d.ts.map +1 -1
  17. package/lib/browser/index.js +0 -1
  18. package/lib/browser/index.js.map +1 -1
  19. package/lib/browser/location/location-renderer.js +2 -2
  20. package/lib/browser/location/location-renderer.js.map +1 -1
  21. package/lib/common/filesystem-utils.spec.js +49 -49
  22. package/lib/common/filesystem-utils.spec.js.map +1 -1
  23. package/lib/common/filesystem-watcher-protocol.d.ts +1 -22
  24. package/lib/common/filesystem-watcher-protocol.d.ts.map +1 -1
  25. package/lib/common/filesystem-watcher-protocol.js +1 -68
  26. package/lib/common/filesystem-watcher-protocol.js.map +1 -1
  27. package/lib/common/filesystem.d.ts +0 -226
  28. package/lib/common/filesystem.d.ts.map +1 -1
  29. package/lib/common/filesystem.js +1 -48
  30. package/lib/common/filesystem.js.map +1 -1
  31. package/package.json +4 -4
  32. package/src/browser/breadcrumbs/filepath-breadcrumbs-container.ts +1 -2
  33. package/src/browser/file-tree/file-tree-decorator-adapter.ts +1 -1
  34. package/src/browser/file-tree/file-tree-widget.tsx +1 -1
  35. package/src/browser/file-tree/file-tree.ts +1 -2
  36. package/src/browser/filesystem-frontend-module.ts +0 -162
  37. package/src/browser/index.ts +0 -1
  38. package/src/browser/location/location-renderer.tsx +2 -2
  39. package/src/common/filesystem-utils.spec.ts +1 -1
  40. package/src/common/filesystem-watcher-protocol.ts +1 -67
  41. package/src/common/filesystem.ts +0 -259
  42. package/lib/browser/filesystem-watcher.d.ts +0 -134
  43. package/lib/browser/filesystem-watcher.d.ts.map +0 -1
  44. package/lib/browser/filesystem-watcher.js +0 -240
  45. package/lib/browser/filesystem-watcher.js.map +0 -1
  46. package/lib/node/node-file-upload.d.ts +0 -19
  47. package/lib/node/node-file-upload.d.ts.map +0 -1
  48. package/lib/node/node-file-upload.js +0 -55
  49. package/lib/node/node-file-upload.js.map +0 -1
  50. package/lib/node/nsfw-watcher/nsfw-filesystem-watcher.d.ts +0 -53
  51. package/lib/node/nsfw-watcher/nsfw-filesystem-watcher.d.ts.map +0 -1
  52. package/lib/node/nsfw-watcher/nsfw-filesystem-watcher.js +0 -197
  53. package/lib/node/nsfw-watcher/nsfw-filesystem-watcher.js.map +0 -1
  54. package/src/browser/filesystem-watcher.ts +0 -249
  55. package/src/node/node-file-upload.ts +0 -64
  56. package/src/node/nsfw-watcher/nsfw-filesystem-watcher.ts +0 -255
@@ -14,75 +14,8 @@
14
14
  //
15
15
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
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
- var __param = (this && this.__param) || function (paramIndex, decorator) {
27
- return function (target, key) { decorator(target, key, paramIndex); }
28
- };
29
17
  Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.ReconnectingFileSystemWatcherServer = exports.FileSystemWatcherServerProxy = exports.FileSystemWatcherServer = exports.FileSystemWatcherService = void 0;
31
- const inversify_1 = require("@theia/core/shared/inversify");
18
+ exports.FileSystemWatcherServer = exports.FileSystemWatcherService = void 0;
32
19
  exports.FileSystemWatcherService = Symbol('FileSystemWatcherServer2');
33
20
  exports.FileSystemWatcherServer = Symbol('FileSystemWatcherServer');
34
- exports.FileSystemWatcherServerProxy = Symbol('FileSystemWatcherServerProxy');
35
- /**
36
- * @deprecated not used internally anymore.
37
- */
38
- let ReconnectingFileSystemWatcherServer = class ReconnectingFileSystemWatcherServer {
39
- constructor(proxy) {
40
- this.proxy = proxy;
41
- this.watcherSequence = 1;
42
- this.watchParams = new Map();
43
- this.localToRemoteWatcher = new Map();
44
- const onInitialized = this.proxy.onDidOpenConnection(() => {
45
- // skip reconnection on the first connection
46
- onInitialized.dispose();
47
- this.proxy.onDidOpenConnection(() => this.reconnect());
48
- });
49
- }
50
- reconnect() {
51
- for (const [watcher, { uri, options }] of this.watchParams.entries()) {
52
- this.doWatchFileChanges(watcher, uri, options);
53
- }
54
- }
55
- dispose() {
56
- this.proxy.dispose();
57
- }
58
- watchFileChanges(uri, options) {
59
- const watcher = this.watcherSequence++;
60
- this.watchParams.set(watcher, { uri, options });
61
- return this.doWatchFileChanges(watcher, uri, options);
62
- }
63
- doWatchFileChanges(watcher, uri, options) {
64
- return this.proxy.watchFileChanges(uri, options).then(remote => {
65
- this.localToRemoteWatcher.set(watcher, remote);
66
- return watcher;
67
- });
68
- }
69
- unwatchFileChanges(watcher) {
70
- this.watchParams.delete(watcher);
71
- const remote = this.localToRemoteWatcher.get(watcher);
72
- if (remote) {
73
- this.localToRemoteWatcher.delete(watcher);
74
- return this.proxy.unwatchFileChanges(remote);
75
- }
76
- return Promise.resolve();
77
- }
78
- setClient(client) {
79
- this.proxy.setClient(client);
80
- }
81
- };
82
- ReconnectingFileSystemWatcherServer = __decorate([
83
- (0, inversify_1.injectable)(),
84
- __param(0, (0, inversify_1.inject)(exports.FileSystemWatcherServerProxy)),
85
- __metadata("design:paramtypes", [Object])
86
- ], ReconnectingFileSystemWatcherServer);
87
- exports.ReconnectingFileSystemWatcherServer = ReconnectingFileSystemWatcherServer;
88
21
  //# sourceMappingURL=filesystem-watcher-protocol.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"filesystem-watcher-protocol.js","sourceRoot":"","sources":["../../src/common/filesystem-watcher-protocol.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,4DAAkE;AAKrD,QAAA,wBAAwB,GAAG,MAAM,CAAC,0BAA0B,CAAC,CAAC;AAyC9D,QAAA,uBAAuB,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC;AAoC5D,QAAA,4BAA4B,GAAG,MAAM,CAAC,8BAA8B,CAAC,CAAC;AAGnF;;GAEG;AAEH,IAAa,mCAAmC,GAAhD,MAAa,mCAAmC;IAS5C,YAC6D,KAAmC;QAAnC,UAAK,GAAL,KAAK,CAA8B;QARtF,oBAAe,GAAG,CAA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AED,kBAAkB,CAAC,OAAe;QAC9B,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACjC,MAAM,MAAM,GAAG,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACtD,IAAI,MAAM,EAAE;YACR,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAC1C,OAAO,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;SAChD;QACD,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED,SAAS,CAAC,MAA2C;QACjD,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;CAEJ,CAAA;AAxDY,mCAAmC;IAD/C,IAAA,sBAAU,GAAE;IAWJ,WAAA,IAAA,kBAAM,EAAC,oCAA4B,CAAC,CAAA;;GAVhC,mCAAmC,CAwD/C;AAxDY,kFAAmC"}
1
+ {"version":3,"file":"filesystem-watcher-protocol.js","sourceRoot":"","sources":["../../src/common/filesystem-watcher-protocol.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;;;AAMnE,QAAA,wBAAwB,GAAG,MAAM,CAAC,0BAA0B,CAAC,CAAC;AAyC9D,QAAA,uBAAuB,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC"}
@@ -1,170 +1,3 @@
1
- import { TextDocumentContentChangeEvent } from '@theia/core/shared/vscode-languageserver-protocol';
2
- import { ApplicationError } from '@theia/core/lib/common';
3
- /**
4
- * @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService` instead
5
- */
6
- export declare const FileSystem: unique symbol;
7
- export interface FileSystem {
8
- /**
9
- * Returns the file stat for the given URI.
10
- *
11
- * If the uri points to a folder it will contain one level of unresolved children.
12
- *
13
- * `undefined` if a file for the given URI does not exist.
14
- *
15
- * @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService.resolve` instead
16
- */
17
- getFileStat(uri: string): Promise<FileStat | undefined>;
18
- /**
19
- * Finds out if a file identified by the resource exists.
20
- *
21
- * @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService.exists` instead
22
- */
23
- exists(uri: string): Promise<boolean>;
24
- /**
25
- * Resolve the contents of a file identified by the resource.
26
- *
27
- * @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService.read` instead
28
- */
29
- resolveContent(uri: string, options?: {
30
- encoding?: string;
31
- }): Promise<{
32
- stat: FileStat;
33
- content: string;
34
- }>;
35
- /**
36
- * Updates the content replacing its previous value.
37
- *
38
- * @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService.write` instead
39
- */
40
- setContent(file: FileStat, content: string, options?: {
41
- encoding?: string;
42
- }): Promise<FileStat>;
43
- /**
44
- * Updates the content replacing its previous value.
45
- *
46
- * The optional parameter `overwriteEncoding` can be used to transform the encoding of a file.
47
- *
48
- * | | encoding | overwriteEncoding | behaviour |
49
- * |---|----------|-------------------|-----------|
50
- * | 1 | undefined | undefined | read & write file in default encoding |
51
- * | 2 | undefined | ✓ | read file in default encoding; write file in `overwriteEncoding` |
52
- * | 3 | ✓ | undefined | read & write file in `encoding` |
53
- * | 4 | ✓ | ✓ | read file in `encoding`; write file in `overwriteEncoding` |
54
- *
55
- * @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService.write` instead
56
- */
57
- updateContent(file: FileStat, contentChanges: TextDocumentContentChangeEvent[], options?: {
58
- encoding?: string;
59
- overwriteEncoding?: string;
60
- }): Promise<FileStat>;
61
- /**
62
- * Moves the file to a new path identified by the resource.
63
- *
64
- * The optional parameter overwrite can be set to replace an existing file at the location.
65
- *
66
- * | | missing | file | empty dir | dir |
67
- * |-----------|---------|------|-----------|-----------|
68
- * | missing | x | x | x | x |
69
- * | file | ✓ | x | x | x |
70
- * | empty dir | ✓ | x | x | overwrite |
71
- * | dir | ✓ | x | overwrite | overwrite |
72
- *
73
- * @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService.move` instead
74
- */
75
- move(sourceUri: string, targetUri: string, options?: FileMoveOptions): Promise<FileStat>;
76
- /**
77
- * Copies the file to a path identified by the resource.
78
- *
79
- * The optional parameter overwrite can be set to replace an existing file at the location.
80
- *
81
- * @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService.copy` instead
82
- */
83
- copy(sourceUri: string, targetUri: string, options?: {
84
- overwrite?: boolean;
85
- recursive?: boolean;
86
- }): Promise<FileStat>;
87
- /**
88
- * Creates a new file with the given path. The returned promise
89
- * will have the stat model object as a result.
90
- *
91
- * The optional parameter content can be used as value to fill into the new file.
92
- *
93
- * @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService.create` instead
94
- */
95
- createFile(uri: string, options?: {
96
- content?: string;
97
- encoding?: string;
98
- }): Promise<FileStat>;
99
- /**
100
- * Creates a new folder with the given path. The returned promise
101
- * will have the stat model object as a result.
102
- *
103
- * @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService.createFolder` instead
104
- */
105
- createFolder(uri: string): Promise<FileStat>;
106
- /**
107
- * Creates a new empty file if the given path does not exist and otherwise
108
- * will set the mtime and atime of the file to the current date.
109
- */
110
- touchFile(uri: string): Promise<FileStat>;
111
- /**
112
- * Deletes the provided file. The optional moveToTrash parameter allows to
113
- * move the file to trash.
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.delete` instead
116
- */
117
- delete(uri: string, options?: FileDeleteOptions): Promise<void>;
118
- /**
119
- * Returns the encoding of the given file resource.
120
- *
121
- * @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908) use `FileService.read` without `autoGuessEncoding` option instead
122
- */
123
- getEncoding(uri: string): Promise<string>;
124
- /**
125
- * Guess encoding of a given file based on its content.
126
- *
127
- * @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService.read` with `autoGuessEncoding` option instead
128
- */
129
- guessEncoding(uri: string): Promise<string | undefined>;
130
- /**
131
- * Return list of available roots.
132
- */
133
- getRoots(): Promise<FileStat[]>;
134
- /**
135
- * Returns a promise that resolves to a file stat representing the current user's home directory.
136
- *
137
- * @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `EnvVariablesServer.getHomeDirUri` instead
138
- */
139
- getCurrentUserHome(): Promise<FileStat | undefined>;
140
- /**
141
- * Resolves to an array of URIs pointing to the available drives on the filesystem.
142
- *
143
- * @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `EnvVariablesServer.getDrives` instead
144
- */
145
- getDrives(): Promise<string[]>;
146
- /**
147
- * Tests a user's permissions for the file or directory specified by URI.
148
- * The mode argument is an optional integer that specifies the accessibility checks to be performed.
149
- * Check `FileAccess.Constants` for possible values of mode.
150
- * It is possible to create a mask consisting of the bitwise `OR` of two or more values (e.g. FileAccess.Constants.W_OK | FileAccess.Constants.R_OK).
151
- * If `mode` is not defined, `FileAccess.Constants.F_OK` will be used instead.
152
- *
153
- * @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService.access` instead
154
- */
155
- access(uri: string, mode?: number): Promise<boolean>;
156
- /**
157
- * Returns the path of the given file URI, specific to the backend's operating system.
158
- * If the URI is not a file URI, undefined is returned.
159
- *
160
- * USE WITH CAUTION: You should always prefer URIs to paths if possible, as they are
161
- * portable and platform independent. Paths should only be used in cases you directly
162
- * interact with the OS, e.g. when running a command on the shell.
163
- *
164
- * @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService.fsPath` instead
165
- */
166
- getFsPath(uri: string): Promise<string | undefined>;
167
- }
168
1
  export declare namespace FileAccess {
169
2
  namespace Constants {
170
3
  /**
@@ -187,63 +20,4 @@ export declare namespace FileAccess {
187
20
  const X_OK: number;
188
21
  }
189
22
  }
190
- export interface FileMoveOptions {
191
- overwrite?: boolean;
192
- }
193
- export interface FileDeleteOptions {
194
- moveToTrash?: boolean;
195
- }
196
- /**
197
- * A file resource with meta information.
198
- *
199
- * @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileStat` from `@theia/filesystem/lib/common/files` instead
200
- */
201
- export interface FileStat {
202
- /**
203
- * The URI of the file.
204
- */
205
- uri: string;
206
- /**
207
- * The last modification of this file.
208
- */
209
- lastModification: number;
210
- /**
211
- * `true` if the resource is a directory. Otherwise, `false`.
212
- */
213
- isDirectory: boolean;
214
- /**
215
- * The children of the file stat.
216
- * If it is `undefined` and `isDirectory` is `true`, then this file stat is unresolved.
217
- */
218
- children?: FileStat[];
219
- /**
220
- * The size of the file if known.
221
- */
222
- size?: number;
223
- }
224
- export declare namespace FileStat {
225
- function is(candidate: Object | undefined): candidate is FileStat;
226
- function equals(one: object | undefined, other: object | undefined): boolean;
227
- }
228
- /**
229
- * @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileOperationError` instead
230
- */
231
- export declare namespace FileSystemError {
232
- const FileNotFound: ApplicationError.Constructor<-33000, {
233
- uri: string;
234
- }>;
235
- const FileExists: ApplicationError.Constructor<-33001, {
236
- uri: string;
237
- }>;
238
- const FileIsDirectory: ApplicationError.Constructor<-33002, {
239
- uri: string;
240
- }>;
241
- const FileNotDirectory: ApplicationError.Constructor<-33003, {
242
- uri: string;
243
- }>;
244
- const FileIsOutOfSync: ApplicationError.Constructor<-33004, {
245
- file: FileStat;
246
- stat: FileStat;
247
- }>;
248
- }
249
23
  //# sourceMappingURL=filesystem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"filesystem.d.ts","sourceRoot":"","sources":["../../src/common/filesystem.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,8BAA8B,EAAE,MAAM,mDAAmD,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,UAAU,eAAuB,CAAC;AAC/C,MAAM,WAAW,UAAU;IAEvB;;;;;;;;OAQG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;IAExD;;;;OAIG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEtC;;;;OAIG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,QAAQ,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAE3G;;;;OAIG;IACH,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEhG;;;;;;;;;;;;;OAaG;IACH,aAAa,CAAC,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,8BAA8B,EAAE,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,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAOlF;CACJ;AAED;;GAEG;AACH,yBAAiB,eAAe,CAAC;IACtB,MAAM,YAAY;;MAGtB,CAAC;IACG,MAAM,UAAU;;MAGpB,CAAC;IACG,MAAM,eAAe;;MAGzB,CAAC;IACG,MAAM,gBAAgB;;MAG1B,CAAC;IACG,MAAM,eAAe;;;MAGzB,CAAC;CACP"}
1
+ {"version":3,"file":"filesystem.d.ts","sourceRoot":"","sources":["../../src/common/filesystem.ts"],"names":[],"mappings":"AAgBA,yBAAiB,UAAU,CAAC;IAExB,UAAiB,SAAS,CAAC;QAEvB;;;WAGG;QACI,MAAM,IAAI,EAAE,MAAU,CAAC;QAE9B;;WAEG;QACI,MAAM,IAAI,EAAE,MAAU,CAAC;QAE9B;;WAEG;QACI,MAAM,IAAI,EAAE,MAAU,CAAC;QAE9B;;;WAGG;QACI,MAAM,IAAI,EAAE,MAAU,CAAC;KACjC;CACJ"}
@@ -15,12 +15,7 @@
15
15
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
16
  // *****************************************************************************
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.FileSystemError = exports.FileStat = exports.FileAccess = exports.FileSystem = void 0;
19
- const common_1 = require("@theia/core/lib/common");
20
- /**
21
- * @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileService` instead
22
- */
23
- exports.FileSystem = Symbol('FileSystem');
18
+ exports.FileAccess = void 0;
24
19
  var FileAccess;
25
20
  (function (FileAccess) {
26
21
  let Constants;
@@ -45,46 +40,4 @@ var FileAccess;
45
40
  Constants.X_OK = 1;
46
41
  })(Constants = FileAccess.Constants || (FileAccess.Constants = {}));
47
42
  })(FileAccess = exports.FileAccess || (exports.FileAccess = {}));
48
- var FileStat;
49
- (function (FileStat) {
50
- function is(candidate) {
51
- return typeof candidate === 'object' && ('uri' in candidate) && ('lastModification' in candidate) && ('isDirectory' in candidate);
52
- }
53
- FileStat.is = is;
54
- function equals(one, other) {
55
- if (!one || !other || !is(one) || !is(other)) {
56
- return false;
57
- }
58
- return one.uri === other.uri
59
- && one.lastModification === other.lastModification
60
- && one.isDirectory === other.isDirectory;
61
- }
62
- FileStat.equals = equals;
63
- })(FileStat = exports.FileStat || (exports.FileStat = {}));
64
- /**
65
- * @deprecated since 1.4.0 - in order to support VS Code FS API (https://github.com/eclipse-theia/theia/pull/7908), use `FileOperationError` instead
66
- */
67
- var FileSystemError;
68
- (function (FileSystemError) {
69
- FileSystemError.FileNotFound = common_1.ApplicationError.declare(-33000, (uri, prefix) => ({
70
- message: `${prefix ? prefix + ' ' : ''}'${uri}' has not been found.`,
71
- data: { uri }
72
- }));
73
- FileSystemError.FileExists = common_1.ApplicationError.declare(-33001, (uri, prefix) => ({
74
- message: `${prefix ? prefix + ' ' : ''}'${uri}' already exists.`,
75
- data: { uri }
76
- }));
77
- FileSystemError.FileIsDirectory = common_1.ApplicationError.declare(-33002, (uri, prefix) => ({
78
- message: `${prefix ? prefix + ' ' : ''}'${uri}' is a directory.`,
79
- data: { uri }
80
- }));
81
- FileSystemError.FileNotDirectory = common_1.ApplicationError.declare(-33003, (uri, prefix) => ({
82
- message: `${prefix ? prefix + ' ' : ''}'${uri}' is not a directory.`,
83
- data: { uri }
84
- }));
85
- FileSystemError.FileIsOutOfSync = common_1.ApplicationError.declare(-33004, (file, stat) => ({
86
- message: `'${file.uri}' is out of sync.`,
87
- data: { file, stat }
88
- }));
89
- })(FileSystemError = exports.FileSystemError || (exports.FileSystemError = {}));
90
43
  //# sourceMappingURL=filesystem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"filesystem.js","sourceRoot":"","sources":["../../src/common/filesystem.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;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AAuB;QACpE,IAAI,EAAE,EAAE,GAAG,EAAE;KAChB,CAAC,CAAC,CAAC;IACS,+BAAe,GAAG,yBAAgB,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC,IAAc,EAAE,IAAc,EAAE,EAAE,CAAC,CAAC;QACjG,OAAO,EAAE,IAAI,IAAI,CAAC,GAAG,mBAAmB;QACxC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;KACvB,CAAC,CAAC,CAAC;AACR,CAAC,EArBgB,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAqB/B"}
1
+ {"version":3,"file":"filesystem.js","sourceRoot":"","sources":["../../src/common/filesystem.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,IAAiB,UAAU,CA0B1B;AA1BD,WAAiB,UAAU;IAEvB,IAAiB,SAAS,CAuBzB;IAvBD,WAAiB,SAAS;QAEtB;;;WAGG;QACU,cAAI,GAAW,CAAC,CAAC;QAE9B;;WAEG;QACU,cAAI,GAAW,CAAC,CAAC;QAE9B;;WAEG;QACU,cAAI,GAAW,CAAC,CAAC;QAE9B;;;WAGG;QACU,cAAI,GAAW,CAAC,CAAC;IAClC,CAAC,EAvBgB,SAAS,GAAT,oBAAS,KAAT,oBAAS,QAuBzB;AACL,CAAC,EA1BgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QA0B1B"}
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@theia/filesystem",
3
- "version": "1.26.0-next.9+cd33db1fee0",
3
+ "version": "1.26.0",
4
4
  "description": "Theia - FileSystem Extension",
5
5
  "dependencies": {
6
- "@theia/core": "1.26.0-next.9+cd33db1fee0",
6
+ "@theia/core": "1.26.0",
7
7
  "@types/body-parser": "^1.17.0",
8
8
  "@types/multer": "^1.4.7",
9
9
  "@types/rimraf": "^2.0.2",
@@ -63,10 +63,10 @@
63
63
  "watch": "theiaext watch"
64
64
  },
65
65
  "devDependencies": {
66
- "@theia/ext-scripts": "1.25.0"
66
+ "@theia/ext-scripts": "1.26.0"
67
67
  },
68
68
  "nyc": {
69
69
  "extends": "../../configs/nyc.json"
70
70
  },
71
- "gitHead": "cd33db1fee04ac1f922de81c5923e381b2579173"
71
+ "gitHead": "38e2466568e69d55a9c64c96878deff5a005b814"
72
72
  }
@@ -16,8 +16,7 @@
16
16
 
17
17
  import { Container, interfaces, injectable, inject } from '@theia/core/shared/inversify';
18
18
  import { TreeProps, ContextMenuRenderer, TreeNode, OpenerService, open, NodeProps, defaultTreeProps } from '@theia/core/lib/browser';
19
- import { createFileTreeContainer, FileTreeWidget } from '../';
20
- import { FileTreeModel, FileStatNode } from '../file-tree';
19
+ import { FileTreeModel, FileStatNode, createFileTreeContainer, FileTreeWidget } from '../file-tree';
21
20
 
22
21
  const BREADCRUMBS_FILETREE_CLASS = 'theia-FilepathBreadcrumbFileTree';
23
22
 
@@ -143,7 +143,7 @@ export class FileTreeDecoratorAdapter implements TreeDecorator {
143
143
  }
144
144
 
145
145
  /**
146
- * Sort higher priorities earier. I.e. positive number means right higher than left.
146
+ * Sort higher priorities earlier. I.e. positive number means right higher than left.
147
147
  */
148
148
  protected compareWeight(left: Decoration, right: Decoration): number {
149
149
  return (right.weight ?? 0) - (left.weight ?? 0);
@@ -280,7 +280,7 @@ export class FileTreeWidget extends CompressedTreeWidget {
280
280
  if (node.fileStat) {
281
281
  stat = {
282
282
  type: node.fileStat.isDirectory ? FileType.Directory : FileType.File,
283
- mtime: node.fileStat.lastModification,
283
+ mtime: node.fileStat.mtime,
284
284
  size: node.fileStat.size
285
285
  };
286
286
  delete node['fileStat'];
@@ -19,7 +19,6 @@ import URI from '@theia/core/lib/common/uri';
19
19
  import { TreeNode, CompositeTreeNode, SelectableTreeNode, ExpandableTreeNode, TreeImpl } from '@theia/core/lib/browser';
20
20
  import { Mutable } from '@theia/core/lib/common/types';
21
21
  import { FileStat, Stat, FileType, FileOperationError, FileOperationResult } from '../../common/files';
22
- import { FileStat as DeprecatedFileStat } from '../../common/filesystem';
23
22
  import { UriSelection } from '@theia/core/lib/common/selection';
24
23
  import { MessageService } from '@theia/core/lib/common/message-service';
25
24
  import { FileSelection } from '../file-selection';
@@ -117,7 +116,7 @@ export namespace FileStatNode {
117
116
  export type FileStatNodeData = Omit<FileStatNode, 'uri' | 'fileStat'> & {
118
117
  uri: string
119
118
  stat?: Stat | { type: FileType } & Partial<Stat>
120
- fileStat?: DeprecatedFileStat
119
+ fileStat?: FileStat
121
120
  };
122
121
  export namespace FileStatNodeData {
123
122
  export function is(node: object | undefined): node is FileStatNodeData {