@theia/userstorage 1.55.1 → 1.57.0-next.7
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/user-storage-contribution.d.ts +4 -0
- package/lib/browser/user-storage-contribution.d.ts.map +1 -1
- package/lib/browser/user-storage-contribution.js +8 -2
- package/lib/browser/user-storage-contribution.js.map +1 -1
- package/package.json +5 -5
- package/src/browser/user-storage-contribution.ts +11 -2
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import URI from '@theia/core/lib/common/uri';
|
|
1
2
|
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
|
2
3
|
import { FileSystemProvider } from '@theia/filesystem/lib/common/files';
|
|
3
4
|
import { FileService, FileServiceContribution } from '@theia/filesystem/lib/browser/file-service';
|
|
5
|
+
import { MaybePromise } from '@theia/core';
|
|
4
6
|
export declare class UserStorageContribution implements FileServiceContribution {
|
|
5
7
|
protected readonly environments: EnvVariablesServer;
|
|
6
8
|
registerFileSystemProviders(service: FileService): void;
|
|
9
|
+
protected getDelegate(service: FileService): MaybePromise<FileSystemProvider>;
|
|
10
|
+
protected getCongigDirUri(): Promise<URI>;
|
|
7
11
|
protected createProvider(service: FileService): Promise<FileSystemProvider>;
|
|
8
12
|
}
|
|
9
13
|
//# sourceMappingURL=user-storage-contribution.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-storage-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/user-storage-contribution.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"user-storage-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/user-storage-contribution.ts"],"names":[],"mappings":"AAiBA,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAE7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAGlG,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,qBACa,uBAAwB,YAAW,uBAAuB;IAGnE,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,kBAAkB,CAAC;IAEpD,2BAA2B,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAWvD,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,YAAY,CAAC,kBAAkB,CAAC;cAI7D,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC;cAI/B,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAyBpF"}
|
|
@@ -34,9 +34,15 @@ let UserStorageContribution = class UserStorageContribution {
|
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
+
getDelegate(service) {
|
|
38
|
+
return service.activateProvider('file');
|
|
39
|
+
}
|
|
40
|
+
async getCongigDirUri() {
|
|
41
|
+
return new uri_1.default(await this.environments.getConfigDirUri());
|
|
42
|
+
}
|
|
37
43
|
async createProvider(service) {
|
|
38
|
-
const delegate = await
|
|
39
|
-
const configDirUri =
|
|
44
|
+
const delegate = await this.getDelegate(service);
|
|
45
|
+
const configDirUri = await this.getCongigDirUri();
|
|
40
46
|
return new delegating_file_system_provider_1.DelegatingFileSystemProvider(delegate, {
|
|
41
47
|
uriConverter: {
|
|
42
48
|
to: resource => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-storage-contribution.js","sourceRoot":"","sources":["../../src/browser/user-storage-contribution.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,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAAkE;AAClE,oDAA6C;AAC7C,kEAAyE;AACzE,wEAA0E;AAG1E,kHAA4G;AAC5G,yDAAoD;
|
|
1
|
+
{"version":3,"file":"user-storage-contribution.js","sourceRoot":"","sources":["../../src/browser/user-storage-contribution.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,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAAkE;AAClE,oDAA6C;AAC7C,kEAAyE;AACzE,wEAA0E;AAG1E,kHAA4G;AAC5G,yDAAoD;AAI7C,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAKhC,2BAA2B,CAAC,OAAoB;QAC5C,OAAO,CAAC,gCAAgC,CAAC,KAAK,CAAC,EAAE;YAC7C,IAAI,KAAK,CAAC,MAAM,KAAK,iCAAc,CAAC,MAAM,EAAE,CAAC;gBACzC,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,IAAI,EAAE;oBACxB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;oBACpD,OAAO,CAAC,gBAAgB,CAAC,iCAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;gBAC9D,CAAC,CAAC,EAAE,CAAC,CAAC;YACV,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAES,WAAW,CAAC,OAAoB;QACtC,OAAO,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC;IAES,KAAK,CAAC,eAAe;QAC3B,OAAO,IAAI,aAAG,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,CAAC,CAAC;IAC9D,CAAC;IAES,KAAK,CAAC,cAAc,CAAC,OAAoB;QAC/C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QACjD,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;QAClD,OAAO,IAAI,8DAA4B,CAAC,QAAQ,EAAE;YAC9C,YAAY,EAAE;gBACV,EAAE,EAAE,QAAQ,CAAC,EAAE;oBACX,MAAM,YAAY,GAAG,iCAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;oBACvD,IAAI,YAAY,EAAE,CAAC;wBACf,OAAO,YAAY,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,aAAa,EAAE,CAAC;oBAC9D,CAAC;oBACD,OAAO,SAAS,CAAC;gBACrB,CAAC;gBACD,IAAI,EAAE,QAAQ,CAAC,EAAE;oBACb,MAAM,YAAY,GAAG,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;oBACrD,IAAI,YAAY,EAAE,CAAC;wBACf,OAAO,iCAAc,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;oBAChD,CAAC;oBACD,OAAO,SAAS,CAAC;gBACrB,CAAC;aACJ;SACJ,EAAE,IAAI,iCAAoB,CACvB,QAAQ,CAAC,KAAK,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAClE,CAAC,CAAC;IACP,CAAC;CAEJ,CAAA;AAjDY,0DAAuB;AAGb;IADlB,IAAA,kBAAM,EAAC,kCAAkB,CAAC;;6DACyB;kCAH3C,uBAAuB;IADnC,IAAA,sBAAU,GAAE;GACA,uBAAuB,CAiDnC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/userstorage",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.57.0-next.7+52945586d",
|
|
4
4
|
"description": "Theia - User Storage Extension",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/core": "1.
|
|
7
|
-
"@theia/filesystem": "1.
|
|
6
|
+
"@theia/core": "1.57.0-next.7+52945586d",
|
|
7
|
+
"@theia/filesystem": "1.57.0-next.7+52945586d",
|
|
8
8
|
"tslib": "^2.6.2"
|
|
9
9
|
},
|
|
10
10
|
"publishConfig": {
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"watch": "theiaext watch"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@theia/ext-scripts": "1.
|
|
43
|
+
"@theia/ext-scripts": "1.56.0"
|
|
44
44
|
},
|
|
45
45
|
"nyc": {
|
|
46
46
|
"extends": "../../configs/nyc.json"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "52945586d4d7c037cc0c35b15a9e1804fccc8e66"
|
|
49
49
|
}
|
|
@@ -22,6 +22,7 @@ import { FileSystemProvider } from '@theia/filesystem/lib/common/files';
|
|
|
22
22
|
import { FileService, FileServiceContribution } from '@theia/filesystem/lib/browser/file-service';
|
|
23
23
|
import { DelegatingFileSystemProvider } from '@theia/filesystem/lib/common/delegating-file-system-provider';
|
|
24
24
|
import { UserStorageUri } from './user-storage-uri';
|
|
25
|
+
import { MaybePromise } from '@theia/core';
|
|
25
26
|
|
|
26
27
|
@injectable()
|
|
27
28
|
export class UserStorageContribution implements FileServiceContribution {
|
|
@@ -40,9 +41,17 @@ export class UserStorageContribution implements FileServiceContribution {
|
|
|
40
41
|
});
|
|
41
42
|
}
|
|
42
43
|
|
|
44
|
+
protected getDelegate(service: FileService): MaybePromise<FileSystemProvider> {
|
|
45
|
+
return service.activateProvider('file');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
protected async getCongigDirUri(): Promise<URI> {
|
|
49
|
+
return new URI(await this.environments.getConfigDirUri());
|
|
50
|
+
}
|
|
51
|
+
|
|
43
52
|
protected async createProvider(service: FileService): Promise<FileSystemProvider> {
|
|
44
|
-
const delegate = await
|
|
45
|
-
const configDirUri =
|
|
53
|
+
const delegate = await this.getDelegate(service);
|
|
54
|
+
const configDirUri = await this.getCongigDirUri();
|
|
46
55
|
return new DelegatingFileSystemProvider(delegate, {
|
|
47
56
|
uriConverter: {
|
|
48
57
|
to: resource => {
|