@theia/workspace 1.67.0-next.13 → 1.67.0-next.56

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 (154) hide show
  1. package/README.md +1 -1
  2. package/package.json +5 -5
  3. package/src/browser/diff-service.ts +6 -12
  4. package/src/browser/workspace-schema-updater.ts +3 -3
  5. package/src/browser/workspace-service.ts +2 -2
  6. package/src/browser/workspace-variable-contribution.ts +13 -12
  7. package/lib/browser/canonical-uri-service.d.ts +0 -12
  8. package/lib/browser/canonical-uri-service.d.ts.map +0 -1
  9. package/lib/browser/canonical-uri-service.js +0 -55
  10. package/lib/browser/canonical-uri-service.js.map +0 -1
  11. package/lib/browser/diff-service.d.ts +0 -11
  12. package/lib/browser/diff-service.d.ts.map +0 -1
  13. package/lib/browser/diff-service.js +0 -78
  14. package/lib/browser/diff-service.js.map +0 -1
  15. package/lib/browser/index.d.ts +0 -7
  16. package/lib/browser/index.d.ts.map +0 -1
  17. package/lib/browser/index.js +0 -25
  18. package/lib/browser/index.js.map +0 -1
  19. package/lib/browser/quick-open-workspace.d.ts +0 -18
  20. package/lib/browser/quick-open-workspace.d.ts.map +0 -1
  21. package/lib/browser/quick-open-workspace.js +0 -112
  22. package/lib/browser/quick-open-workspace.js.map +0 -1
  23. package/lib/browser/untitled-workspace-exit-dialog.d.ts +0 -20
  24. package/lib/browser/untitled-workspace-exit-dialog.d.ts.map +0 -1
  25. package/lib/browser/untitled-workspace-exit-dialog.js +0 -64
  26. package/lib/browser/untitled-workspace-exit-dialog.js.map +0 -1
  27. package/lib/browser/workspace-breadcrumbs-contribution.d.ts +0 -11
  28. package/lib/browser/workspace-breadcrumbs-contribution.d.ts.map +0 -1
  29. package/lib/browser/workspace-breadcrumbs-contribution.js +0 -59
  30. package/lib/browser/workspace-breadcrumbs-contribution.js.map +0 -1
  31. package/lib/browser/workspace-commands.d.ts +0 -116
  32. package/lib/browser/workspace-commands.d.ts.map +0 -1
  33. package/lib/browser/workspace-commands.js +0 -568
  34. package/lib/browser/workspace-commands.js.map +0 -1
  35. package/lib/browser/workspace-commands.spec.d.ts +0 -2
  36. package/lib/browser/workspace-commands.spec.d.ts.map +0 -1
  37. package/lib/browser/workspace-commands.spec.js +0 -128
  38. package/lib/browser/workspace-commands.spec.js.map +0 -1
  39. package/lib/browser/workspace-compare-handler.d.ts +0 -27
  40. package/lib/browser/workspace-compare-handler.d.ts.map +0 -1
  41. package/lib/browser/workspace-compare-handler.js +0 -59
  42. package/lib/browser/workspace-compare-handler.js.map +0 -1
  43. package/lib/browser/workspace-delete-handler.d.ts +0 -76
  44. package/lib/browser/workspace-delete-handler.d.ts.map +0 -1
  45. package/lib/browser/workspace-delete-handler.js +0 -207
  46. package/lib/browser/workspace-delete-handler.js.map +0 -1
  47. package/lib/browser/workspace-duplicate-handler.d.ts +0 -31
  48. package/lib/browser/workspace-duplicate-handler.d.ts.map +0 -1
  49. package/lib/browser/workspace-duplicate-handler.js +0 -79
  50. package/lib/browser/workspace-duplicate-handler.js.map +0 -1
  51. package/lib/browser/workspace-frontend-contribution.d.ts +0 -111
  52. package/lib/browser/workspace-frontend-contribution.d.ts.map +0 -1
  53. package/lib/browser/workspace-frontend-contribution.js +0 -538
  54. package/lib/browser/workspace-frontend-contribution.js.map +0 -1
  55. package/lib/browser/workspace-frontend-module.d.ts +0 -4
  56. package/lib/browser/workspace-frontend-module.d.ts.map +0 -1
  57. package/lib/browser/workspace-frontend-module.js +0 -93
  58. package/lib/browser/workspace-frontend-module.js.map +0 -1
  59. package/lib/browser/workspace-input-dialog.d.ts +0 -20
  60. package/lib/browser/workspace-input-dialog.d.ts.map +0 -1
  61. package/lib/browser/workspace-input-dialog.js +0 -64
  62. package/lib/browser/workspace-input-dialog.js.map +0 -1
  63. package/lib/browser/workspace-schema-updater.d.ts +0 -34
  64. package/lib/browser/workspace-schema-updater.d.ts.map +0 -1
  65. package/lib/browser/workspace-schema-updater.js +0 -147
  66. package/lib/browser/workspace-schema-updater.js.map +0 -1
  67. package/lib/browser/workspace-service.d.ts +0 -201
  68. package/lib/browser/workspace-service.d.ts.map +0 -1
  69. package/lib/browser/workspace-service.js +0 -753
  70. package/lib/browser/workspace-service.js.map +0 -1
  71. package/lib/browser/workspace-storage-service.d.ts +0 -16
  72. package/lib/browser/workspace-storage-service.d.ts.map +0 -1
  73. package/lib/browser/workspace-storage-service.js +0 -73
  74. package/lib/browser/workspace-storage-service.js.map +0 -1
  75. package/lib/browser/workspace-trust-service.d.ts +0 -30
  76. package/lib/browser/workspace-trust-service.d.ts.map +0 -1
  77. package/lib/browser/workspace-trust-service.js +0 -153
  78. package/lib/browser/workspace-trust-service.js.map +0 -1
  79. package/lib/browser/workspace-uri-contribution.d.ts +0 -21
  80. package/lib/browser/workspace-uri-contribution.d.ts.map +0 -1
  81. package/lib/browser/workspace-uri-contribution.js +0 -106
  82. package/lib/browser/workspace-uri-contribution.js.map +0 -1
  83. package/lib/browser/workspace-uri-contribution.spec.d.ts +0 -2
  84. package/lib/browser/workspace-uri-contribution.spec.d.ts.map +0 -1
  85. package/lib/browser/workspace-uri-contribution.spec.js +0 -170
  86. package/lib/browser/workspace-uri-contribution.spec.js.map +0 -1
  87. package/lib/browser/workspace-user-working-directory-provider.d.ts +0 -13
  88. package/lib/browser/workspace-user-working-directory-provider.d.ts.map +0 -1
  89. package/lib/browser/workspace-user-working-directory-provider.js +0 -55
  90. package/lib/browser/workspace-user-working-directory-provider.js.map +0 -1
  91. package/lib/browser/workspace-utils.d.ts +0 -16
  92. package/lib/browser/workspace-utils.d.ts.map +0 -1
  93. package/lib/browser/workspace-utils.js +0 -47
  94. package/lib/browser/workspace-utils.js.map +0 -1
  95. package/lib/browser/workspace-variable-contribution.d.ts +0 -24
  96. package/lib/browser/workspace-variable-contribution.d.ts.map +0 -1
  97. package/lib/browser/workspace-variable-contribution.js +0 -230
  98. package/lib/browser/workspace-variable-contribution.js.map +0 -1
  99. package/lib/browser/workspace-window-title-updater.d.ts +0 -8
  100. package/lib/browser/workspace-window-title-updater.d.ts.map +0 -1
  101. package/lib/browser/workspace-window-title-updater.js +0 -50
  102. package/lib/browser/workspace-window-title-updater.js.map +0 -1
  103. package/lib/browser-only/browser-only-workspace-server.d.ts +0 -13
  104. package/lib/browser-only/browser-only-workspace-server.d.ts.map +0 -1
  105. package/lib/browser-only/browser-only-workspace-server.js +0 -73
  106. package/lib/browser-only/browser-only-workspace-server.js.map +0 -1
  107. package/lib/browser-only/workspace-frontend-only-module.d.ts +0 -4
  108. package/lib/browser-only/workspace-frontend-only-module.d.ts.map +0 -1
  109. package/lib/browser-only/workspace-frontend-only-module.js +0 -30
  110. package/lib/browser-only/workspace-frontend-only-module.js.map +0 -1
  111. package/lib/common/index.d.ts +0 -5
  112. package/lib/common/index.d.ts.map +0 -1
  113. package/lib/common/index.js +0 -23
  114. package/lib/common/index.js.map +0 -1
  115. package/lib/common/test/mock-workspace-server.d.ts +0 -8
  116. package/lib/common/test/mock-workspace-server.d.ts.map +0 -1
  117. package/lib/common/test/mock-workspace-server.js +0 -31
  118. package/lib/common/test/mock-workspace-server.js.map +0 -1
  119. package/lib/common/untitled-workspace-service.d.ts +0 -9
  120. package/lib/common/untitled-workspace-service.d.ts.map +0 -1
  121. package/lib/common/untitled-workspace-service.js +0 -53
  122. package/lib/common/untitled-workspace-service.js.map +0 -1
  123. package/lib/common/workspace-file-service.d.ts +0 -27
  124. package/lib/common/workspace-file-service.d.ts.map +0 -1
  125. package/lib/common/workspace-file-service.js +0 -67
  126. package/lib/common/workspace-file-service.js.map +0 -1
  127. package/lib/common/workspace-preferences.d.ts +0 -12
  128. package/lib/common/workspace-preferences.d.ts.map +0 -1
  129. package/lib/common/workspace-preferences.js +0 -46
  130. package/lib/common/workspace-preferences.js.map +0 -1
  131. package/lib/common/workspace-protocol.d.ts +0 -27
  132. package/lib/common/workspace-protocol.d.ts.map +0 -1
  133. package/lib/common/workspace-protocol.js +0 -24
  134. package/lib/common/workspace-protocol.js.map +0 -1
  135. package/lib/common/workspace-trust-preferences.d.ts +0 -22
  136. package/lib/common/workspace-trust-preferences.d.ts.map +0 -1
  137. package/lib/common/workspace-trust-preferences.js +0 -66
  138. package/lib/common/workspace-trust-preferences.js.map +0 -1
  139. package/lib/node/default-workspace-server.d.ts +0 -78
  140. package/lib/node/default-workspace-server.d.ts.map +0 -1
  141. package/lib/node/default-workspace-server.js +0 -265
  142. package/lib/node/default-workspace-server.js.map +0 -1
  143. package/lib/node/default-workspace-server.spec.d.ts +0 -2
  144. package/lib/node/default-workspace-server.spec.d.ts.map +0 -1
  145. package/lib/node/default-workspace-server.spec.js +0 -96
  146. package/lib/node/default-workspace-server.spec.js.map +0 -1
  147. package/lib/node/index.d.ts +0 -3
  148. package/lib/node/index.d.ts.map +0 -1
  149. package/lib/node/index.js +0 -21
  150. package/lib/node/index.js.map +0 -1
  151. package/lib/node/workspace-backend-module.d.ts +0 -4
  152. package/lib/node/workspace-backend-module.d.ts.map +0 -1
  153. package/lib/node/workspace-backend-module.js +0 -40
  154. package/lib/node/workspace-backend-module.js.map +0 -1
@@ -1,50 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2022 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-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.WorkspaceWindowTitleUpdater = void 0;
19
- const tslib_1 = require("tslib");
20
- const window_title_updater_1 = require("@theia/core/lib/browser/window/window-title-updater");
21
- const inversify_1 = require("@theia/core/shared/inversify");
22
- const workspace_service_1 = require("./workspace-service");
23
- const navigatable_1 = require("@theia/core/lib/browser/navigatable");
24
- let WorkspaceWindowTitleUpdater = class WorkspaceWindowTitleUpdater extends window_title_updater_1.WindowTitleUpdater {
25
- updateTitleWidget(widget) {
26
- super.updateTitleWidget(widget);
27
- let folderName;
28
- let folderPath;
29
- if (navigatable_1.Navigatable.is(widget)) {
30
- const folder = this.workspaceService.getWorkspaceRootUri(widget.getResourceUri());
31
- if (folder) {
32
- folderName = this.labelProvider.getName(folder);
33
- folderPath = folder.path.toString();
34
- }
35
- }
36
- this.windowTitleService.update({
37
- folderName,
38
- folderPath
39
- });
40
- }
41
- };
42
- exports.WorkspaceWindowTitleUpdater = WorkspaceWindowTitleUpdater;
43
- tslib_1.__decorate([
44
- (0, inversify_1.inject)(workspace_service_1.WorkspaceService),
45
- tslib_1.__metadata("design:type", workspace_service_1.WorkspaceService)
46
- ], WorkspaceWindowTitleUpdater.prototype, "workspaceService", void 0);
47
- exports.WorkspaceWindowTitleUpdater = WorkspaceWindowTitleUpdater = tslib_1.__decorate([
48
- (0, inversify_1.injectable)()
49
- ], WorkspaceWindowTitleUpdater);
50
- //# sourceMappingURL=workspace-window-title-updater.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspace-window-title-updater.js","sourceRoot":"","sources":["../../src/browser/workspace-window-title-updater.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,8FAAyF;AACzF,4DAAkE;AAElE,2DAAuD;AACvD,qEAAkE;AAG3D,IAAM,2BAA2B,GAAjC,MAAM,2BAA4B,SAAQ,yCAAkB;IAI5C,iBAAiB,CAAC,MAAe;QAChD,KAAK,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,UAA8B,CAAC;QACnC,IAAI,UAA8B,CAAC;QACnC,IAAI,yBAAW,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;YACzB,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC;YAClF,IAAI,MAAM,EAAE,CAAC;gBACT,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;gBAChD,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACxC,CAAC;QACL,CAAC;QACD,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC;YAC3B,UAAU;YACV,UAAU;SACb,CAAC,CAAC;IACP,CAAC;CAEJ,CAAA;AArBY,kEAA2B;AAES;IAA5C,IAAA,kBAAM,EAAC,oCAAgB,CAAC;sCAAsC,oCAAgB;qEAAC;sCAFvE,2BAA2B;IADvC,IAAA,sBAAU,GAAE;GACA,2BAA2B,CAqBvC"}
@@ -1,13 +0,0 @@
1
- import { WorkspaceServer } from '../common/workspace-protocol';
2
- import { ILogger } from '@theia/core';
3
- import { FileService } from '@theia/filesystem/lib/browser/file-service';
4
- export declare const RECENT_WORKSPACES_LOCAL_STORAGE_KEY = "workspaces";
5
- export declare class BrowserOnlyWorkspaceServer implements WorkspaceServer {
6
- protected logger: ILogger;
7
- protected readonly fileService: FileService;
8
- getRecentWorkspaces(): Promise<string[]>;
9
- getMostRecentlyUsedWorkspace(): Promise<string | undefined>;
10
- setMostRecentlyUsedWorkspace(uri: string): Promise<void>;
11
- removeRecentWorkspace(uri: string): Promise<void>;
12
- }
13
- //# sourceMappingURL=browser-only-workspace-server.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"browser-only-workspace-server.d.ts","sourceRoot":"","sources":["../../src/browser-only/browser-only-workspace-server.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAiB,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAEzE,eAAO,MAAM,mCAAmC,eAAe,CAAC;AAEhE,qBACa,0BAA2B,YAAW,eAAe;IAG9D,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC;IAG1B,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAEtC,mBAAmB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAiBxC,4BAA4B,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAK3D,4BAA4B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQxD,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAO1D"}
@@ -1,73 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BrowserOnlyWorkspaceServer = exports.RECENT_WORKSPACES_LOCAL_STORAGE_KEY = void 0;
4
- const tslib_1 = require("tslib");
5
- // *****************************************************************************
6
- // Copyright (C) 2023 EclipseSource and others.
7
- //
8
- // This program and the accompanying materials are made available under the
9
- // terms of the Eclipse Public License v. 2.0 which is available at
10
- // http://www.eclipse.org/legal/epl-2.0.
11
- //
12
- // This Source Code may also be made available under the following Secondary
13
- // Licenses when the conditions for such availability set forth in the Eclipse
14
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
15
- // with the GNU Classpath Exception which is available at
16
- // https://www.gnu.org/software/classpath/license.html.
17
- //
18
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
19
- // *****************************************************************************
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const core_1 = require("@theia/core");
22
- const file_service_1 = require("@theia/filesystem/lib/browser/file-service");
23
- exports.RECENT_WORKSPACES_LOCAL_STORAGE_KEY = 'workspaces';
24
- let BrowserOnlyWorkspaceServer = class BrowserOnlyWorkspaceServer {
25
- async getRecentWorkspaces() {
26
- const storedWorkspaces = localStorage.getItem(exports.RECENT_WORKSPACES_LOCAL_STORAGE_KEY);
27
- if (!storedWorkspaces) {
28
- return [];
29
- }
30
- try {
31
- const parsedWorkspaces = JSON.parse(storedWorkspaces);
32
- if ((0, core_1.isStringArray)(parsedWorkspaces)) {
33
- return parsedWorkspaces;
34
- }
35
- }
36
- catch (e) {
37
- this.logger.error(e);
38
- return [];
39
- }
40
- return [];
41
- }
42
- async getMostRecentlyUsedWorkspace() {
43
- const workspaces = await this.getRecentWorkspaces();
44
- return workspaces[0];
45
- }
46
- async setMostRecentlyUsedWorkspace(uri) {
47
- const workspaces = await this.getRecentWorkspaces();
48
- if (workspaces.includes(uri)) {
49
- workspaces.splice(workspaces.indexOf(uri), 1);
50
- }
51
- localStorage.setItem(exports.RECENT_WORKSPACES_LOCAL_STORAGE_KEY, JSON.stringify([uri, ...workspaces]));
52
- }
53
- async removeRecentWorkspace(uri) {
54
- const workspaces = await this.getRecentWorkspaces();
55
- if (workspaces.includes(uri)) {
56
- workspaces.splice(workspaces.indexOf(uri), 1);
57
- }
58
- localStorage.setItem(exports.RECENT_WORKSPACES_LOCAL_STORAGE_KEY, JSON.stringify(workspaces));
59
- }
60
- };
61
- exports.BrowserOnlyWorkspaceServer = BrowserOnlyWorkspaceServer;
62
- tslib_1.__decorate([
63
- (0, inversify_1.inject)(core_1.ILogger),
64
- tslib_1.__metadata("design:type", Object)
65
- ], BrowserOnlyWorkspaceServer.prototype, "logger", void 0);
66
- tslib_1.__decorate([
67
- (0, inversify_1.inject)(file_service_1.FileService),
68
- tslib_1.__metadata("design:type", file_service_1.FileService)
69
- ], BrowserOnlyWorkspaceServer.prototype, "fileService", void 0);
70
- exports.BrowserOnlyWorkspaceServer = BrowserOnlyWorkspaceServer = tslib_1.__decorate([
71
- (0, inversify_1.injectable)()
72
- ], BrowserOnlyWorkspaceServer);
73
- //# sourceMappingURL=browser-only-workspace-server.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"browser-only-workspace-server.js","sourceRoot":"","sources":["../../src/browser-only/browser-only-workspace-server.ts"],"names":[],"mappings":";;;;AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,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;AAChF,4DAAkE;AAElE,sCAAqD;AACrD,6EAAyE;AAE5D,QAAA,mCAAmC,GAAG,YAAY,CAAC;AAGzD,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IAQnC,KAAK,CAAC,mBAAmB;QACrB,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,CAAC,2CAAmC,CAAC,CAAC;QACnF,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACpB,OAAO,EAAE,CAAC;QACd,CAAC;QACD,IAAI,CAAC;YACD,MAAM,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;YACtD,IAAI,IAAA,oBAAa,EAAC,gBAAgB,CAAC,EAAE,CAAC;gBAClC,OAAO,gBAAgB,CAAC;YAC5B,CAAC;QACL,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACT,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACrB,OAAO,EAAE,CAAC;QACd,CAAC;QACD,OAAO,EAAE,CAAC;IACd,CAAC;IAED,KAAK,CAAC,4BAA4B;QAC9B,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACpD,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,4BAA4B,CAAC,GAAW;QAC1C,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACpD,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC3B,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QAClD,CAAC;QACD,YAAY,CAAC,OAAO,CAAC,2CAAmC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;IACpG,CAAC;IAED,KAAK,CAAC,qBAAqB,CAAC,GAAW;QACnC,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACpD,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC3B,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QAClD,CAAC;QACD,YAAY,CAAC,OAAO,CAAC,2CAAmC,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;IAC1F,CAAC;CACJ,CAAA;AA7CY,gEAA0B;AAGzB;IADT,IAAA,kBAAM,EAAC,cAAO,CAAC;;0DACU;AAGP;IADlB,IAAA,kBAAM,EAAC,0BAAW,CAAC;sCACY,0BAAW;+DAAC;qCANnC,0BAA0B;IADtC,IAAA,sBAAU,GAAE;GACA,0BAA0B,CA6CtC"}
@@ -1,4 +0,0 @@
1
- import { ContainerModule } from '@theia/core/shared/inversify';
2
- declare const _default: ContainerModule;
3
- export default _default;
4
- //# sourceMappingURL=workspace-frontend-only-module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspace-frontend-only-module.d.ts","sourceRoot":"","sources":["../../src/browser-only/workspace-frontend-only-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAc,MAAM,8BAA8B,CAAC;;AAI3E,wBAOG"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2023 EclipseSource and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const inversify_1 = require("@theia/core/shared/inversify");
19
- const browser_only_workspace_server_1 = require("./browser-only-workspace-server");
20
- const common_1 = require("../common");
21
- exports.default = new inversify_1.ContainerModule((bind, unbind, isBound, rebind) => {
22
- bind(browser_only_workspace_server_1.BrowserOnlyWorkspaceServer).toSelf().inSingletonScope();
23
- if (isBound(common_1.WorkspaceServer)) {
24
- rebind(common_1.WorkspaceServer).toService(browser_only_workspace_server_1.BrowserOnlyWorkspaceServer);
25
- }
26
- else {
27
- bind(common_1.WorkspaceServer).toService(browser_only_workspace_server_1.BrowserOnlyWorkspaceServer);
28
- }
29
- });
30
- //# sourceMappingURL=workspace-frontend-only-module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspace-frontend-only-module.js","sourceRoot":"","sources":["../../src/browser-only/workspace-frontend-only-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,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,4DAA2E;AAC3E,mFAA6E;AAC7E,sCAA4C;AAE5C,kBAAe,IAAI,2BAAe,CAAC,CAAC,IAAqB,EAAE,MAAyB,EAAE,OAA2B,EAAE,MAAyB,EAAE,EAAE;IAC5I,IAAI,CAAC,0DAA0B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC7D,IAAI,OAAO,CAAC,wBAAe,CAAC,EAAE,CAAC;QAC3B,MAAM,CAAC,wBAAe,CAAC,CAAC,SAAS,CAAC,0DAA0B,CAAC,CAAC;IAClE,CAAC;SAAM,CAAC;QACJ,IAAI,CAAC,wBAAe,CAAC,CAAC,SAAS,CAAC,0DAA0B,CAAC,CAAC;IAChE,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- export * from './workspace-protocol';
2
- export * from './workspace-file-service';
3
- export * from './untitled-workspace-service';
4
- export * from './workspace-preferences';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAgBA,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC"}
@@ -1,23 +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-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const tslib_1 = require("tslib");
19
- tslib_1.__exportStar(require("./workspace-protocol"), exports);
20
- tslib_1.__exportStar(require("./workspace-file-service"), exports);
21
- tslib_1.__exportStar(require("./untitled-workspace-service"), exports);
22
- tslib_1.__exportStar(require("./workspace-preferences"), exports);
23
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.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,+DAAqC;AACrC,mEAAyC;AACzC,uEAA6C;AAC7C,kEAAwC"}
@@ -1,8 +0,0 @@
1
- import { WorkspaceServer } from '../workspace-protocol';
2
- export declare class MockWorkspaceServer implements WorkspaceServer {
3
- getRecentWorkspaces(): Promise<string[]>;
4
- getMostRecentlyUsedWorkspace(): Promise<string | undefined>;
5
- setMostRecentlyUsedWorkspace(uri: string): Promise<void>;
6
- removeRecentWorkspace(uri: string): Promise<void>;
7
- }
8
- //# sourceMappingURL=mock-workspace-server.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mock-workspace-server.d.ts","sourceRoot":"","sources":["../../../src/common/test/mock-workspace-server.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,qBACa,mBAAoB,YAAW,eAAe;IAEvD,mBAAmB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAExC,4BAA4B,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAE3D,4BAA4B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAExD,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CACpD"}
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MockWorkspaceServer = void 0;
4
- const tslib_1 = require("tslib");
5
- // *****************************************************************************
6
- // Copyright (C) 2017 Ericsson and others.
7
- //
8
- // This program and the accompanying materials are made available under the
9
- // terms of the Eclipse Public License v. 2.0 which is available at
10
- // http://www.eclipse.org/legal/epl-2.0.
11
- //
12
- // This Source Code may also be made available under the following Secondary
13
- // Licenses when the conditions for such availability set forth in the Eclipse
14
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
15
- // with the GNU Classpath Exception which is available at
16
- // https://www.gnu.org/software/classpath/license.html.
17
- //
18
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
19
- // *****************************************************************************
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- let MockWorkspaceServer = class MockWorkspaceServer {
22
- getRecentWorkspaces() { return Promise.resolve([]); }
23
- getMostRecentlyUsedWorkspace() { return Promise.resolve(''); }
24
- setMostRecentlyUsedWorkspace(uri) { return Promise.resolve(); }
25
- removeRecentWorkspace(uri) { return Promise.resolve(); }
26
- };
27
- exports.MockWorkspaceServer = MockWorkspaceServer;
28
- exports.MockWorkspaceServer = MockWorkspaceServer = tslib_1.__decorate([
29
- (0, inversify_1.injectable)()
30
- ], MockWorkspaceServer);
31
- //# sourceMappingURL=mock-workspace-server.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mock-workspace-server.js","sourceRoot":"","sources":["../../../src/common/test/mock-workspace-server.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;AAChF,4DAA0D;AAInD,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAE5B,mBAAmB,KAAwB,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAExE,4BAA4B,KAAkC,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAE3F,4BAA4B,CAAC,GAAW,IAAmB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAEtF,qBAAqB,CAAC,GAAW,IAAmB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;CAClF,CAAA;AATY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,sBAAU,GAAE;GACA,mBAAmB,CAS/B"}
@@ -1,9 +0,0 @@
1
- import URI from '@theia/core/lib/common/uri';
2
- import { MaybePromise } from '@theia/core';
3
- import { WorkspaceFileService } from './workspace-file-service';
4
- export declare class UntitledWorkspaceService {
5
- protected readonly workspaceFileService: WorkspaceFileService;
6
- isUntitledWorkspace(candidate?: URI): boolean;
7
- getUntitledWorkspaceUri(configDirUri: URI, isAcceptable: (candidate: URI) => MaybePromise<boolean>, warnOnHits?: () => unknown): Promise<URI>;
8
- }
9
- //# sourceMappingURL=untitled-workspace-service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"untitled-workspace-service.d.ts","sourceRoot":"","sources":["../../src/common/untitled-workspace-service.ts"],"names":[],"mappings":"AAgBA,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,qBACa,wBAAwB;IAGjC,SAAS,CAAC,QAAQ,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAE9D,mBAAmB,CAAC,SAAS,CAAC,EAAE,GAAG,GAAG,OAAO;IAIvC,uBAAuB,CAAC,YAAY,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC,SAAS,EAAE,GAAG,KAAK,YAAY,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC,EAAE,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC;CAkBtJ"}
@@ -1,53 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2018 Ericsson and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.UntitledWorkspaceService = void 0;
19
- const tslib_1 = require("tslib");
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const workspace_file_service_1 = require("./workspace-file-service");
22
- let UntitledWorkspaceService = class UntitledWorkspaceService {
23
- isUntitledWorkspace(candidate) {
24
- return !!candidate && this.workspaceFileService.isWorkspaceFile(candidate) && candidate.path.base.startsWith('Untitled');
25
- }
26
- async getUntitledWorkspaceUri(configDirUri, isAcceptable, warnOnHits) {
27
- const parentDir = configDirUri.resolve('workspaces');
28
- const workspaceExtensions = this.workspaceFileService.getWorkspaceFileExtensions();
29
- const defaultFileExtension = workspaceExtensions[this.workspaceFileService.defaultFileTypeIndex];
30
- let uri;
31
- let attempts = 0;
32
- do {
33
- attempts++;
34
- uri = parentDir.resolve(`Untitled-${Math.round(Math.random() * 1000)}.${defaultFileExtension}`);
35
- if (attempts === 10) {
36
- warnOnHits === null || warnOnHits === void 0 ? void 0 : warnOnHits();
37
- }
38
- if (attempts === 50) {
39
- throw new Error('Workspace Service: too many attempts to find unused filename.');
40
- }
41
- } while (!(await isAcceptable(uri)));
42
- return uri;
43
- }
44
- };
45
- exports.UntitledWorkspaceService = UntitledWorkspaceService;
46
- tslib_1.__decorate([
47
- (0, inversify_1.inject)(workspace_file_service_1.WorkspaceFileService),
48
- tslib_1.__metadata("design:type", workspace_file_service_1.WorkspaceFileService)
49
- ], UntitledWorkspaceService.prototype, "workspaceFileService", void 0);
50
- exports.UntitledWorkspaceService = UntitledWorkspaceService = tslib_1.__decorate([
51
- (0, inversify_1.injectable)()
52
- ], UntitledWorkspaceService);
53
- //# sourceMappingURL=untitled-workspace-service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"untitled-workspace-service.js","sourceRoot":"","sources":["../../src/common/untitled-workspace-service.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;;;;AAGhF,4DAAkE;AAElE,qEAAgE;AAGzD,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAKjC,mBAAmB,CAAC,SAAe;QAC/B,OAAO,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,oBAAoB,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC7H,CAAC;IAED,KAAK,CAAC,uBAAuB,CAAC,YAAiB,EAAE,YAAuD,EAAE,UAA0B;QAChI,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QACrD,MAAM,mBAAmB,GAAG,IAAI,CAAC,oBAAoB,CAAC,0BAA0B,EAAE,CAAC;QACnF,MAAM,oBAAoB,GAAG,mBAAmB,CAAC,IAAI,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;QACjG,IAAI,GAAG,CAAC;QACR,IAAI,QAAQ,GAAG,CAAC,CAAC;QACjB,GAAG,CAAC;YACA,QAAQ,EAAE,CAAC;YACX,GAAG,GAAG,SAAS,CAAC,OAAO,CAAC,YAAY,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC;YAChG,IAAI,QAAQ,KAAK,EAAE,EAAE,CAAC;gBAClB,UAAU,aAAV,UAAU,uBAAV,UAAU,EAAI,CAAC;YACnB,CAAC;YACD,IAAI,QAAQ,KAAK,EAAE,EAAE,CAAC;gBAClB,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;YACrF,CAAC;QACL,CAAC,QAAQ,CAAC,CAAC,MAAM,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE;QACrC,OAAO,GAAG,CAAC;IACf,CAAC;CACJ,CAAA;AA3BY,4DAAwB;AAGd;IADlB,IAAA,kBAAM,EAAC,6CAAoB,CAAC;sCACY,6CAAoB;sEAAC;mCAHrD,wBAAwB;IADpC,IAAA,sBAAU,GAAE;GACA,wBAAwB,CA2BpC"}
@@ -1,27 +0,0 @@
1
- import { URI } from '@theia/core';
2
- import { FileStat } from '@theia/filesystem/lib/common/files';
3
- export interface WorkspaceFileType {
4
- extension: string;
5
- name: string;
6
- }
7
- /**
8
- * @deprecated Since 1.39.0. Use `WorkspaceFileService#getWorkspaceFileTypes` instead.
9
- */
10
- export declare const THEIA_EXT = "theia-workspace";
11
- /**
12
- * @deprecated Since 1.39.0. Use `WorkspaceFileService#getWorkspaceFileTypes` instead.
13
- */
14
- export declare const VSCODE_EXT = "code-workspace";
15
- export declare class WorkspaceFileService {
16
- protected _defaultFileTypeIndex: number;
17
- get defaultFileTypeIndex(): number;
18
- /**
19
- * Check if the file should be considered as a workspace file.
20
- *
21
- * Example: We should not try to read the contents of an .exe file.
22
- */
23
- isWorkspaceFile(candidate: FileStat | URI): boolean;
24
- getWorkspaceFileTypes(): WorkspaceFileType[];
25
- getWorkspaceFileExtensions(dot?: boolean): string[];
26
- }
27
- //# sourceMappingURL=workspace-file-service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspace-file-service.d.ts","sourceRoot":"","sources":["../../src/common/workspace-file-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAE9D,MAAM,WAAW,iBAAiB;IAC9B,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,oBAAoB,CAAC;AAC3C;;GAEG;AACH,eAAO,MAAM,UAAU,mBAAmB,CAAC;AAE3C,qBACa,oBAAoB;IAE7B,SAAS,CAAC,qBAAqB,SAAK;IAEpC,IAAI,oBAAoB,IAAI,MAAM,CAEjC;IAED;;;;OAIG;IACH,eAAe,CAAC,SAAS,EAAE,QAAQ,GAAG,GAAG,GAAG,OAAO;IAMnD,qBAAqB,IAAI,iBAAiB,EAAE;IAa5C,0BAA0B,CAAC,GAAG,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE;CAItD"}
@@ -1,67 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2023 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-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.WorkspaceFileService = exports.VSCODE_EXT = exports.THEIA_EXT = void 0;
19
- const tslib_1 = require("tslib");
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const files_1 = require("@theia/filesystem/lib/common/files");
22
- /**
23
- * @deprecated Since 1.39.0. Use `WorkspaceFileService#getWorkspaceFileTypes` instead.
24
- */
25
- exports.THEIA_EXT = 'theia-workspace';
26
- /**
27
- * @deprecated Since 1.39.0. Use `WorkspaceFileService#getWorkspaceFileTypes` instead.
28
- */
29
- exports.VSCODE_EXT = 'code-workspace';
30
- let WorkspaceFileService = class WorkspaceFileService {
31
- constructor() {
32
- this._defaultFileTypeIndex = 0;
33
- }
34
- get defaultFileTypeIndex() {
35
- return this._defaultFileTypeIndex;
36
- }
37
- /**
38
- * Check if the file should be considered as a workspace file.
39
- *
40
- * Example: We should not try to read the contents of an .exe file.
41
- */
42
- isWorkspaceFile(candidate) {
43
- const uri = files_1.FileStat.is(candidate) ? candidate.resource : candidate;
44
- const extensions = this.getWorkspaceFileExtensions(true);
45
- return extensions.includes(uri.path.ext);
46
- }
47
- getWorkspaceFileTypes() {
48
- return [
49
- {
50
- name: 'Theia',
51
- extension: exports.THEIA_EXT
52
- },
53
- {
54
- name: 'Visual Studio Code',
55
- extension: exports.VSCODE_EXT
56
- }
57
- ];
58
- }
59
- getWorkspaceFileExtensions(dot) {
60
- return this.getWorkspaceFileTypes().map(type => dot ? `.${type.extension}` : type.extension);
61
- }
62
- };
63
- exports.WorkspaceFileService = WorkspaceFileService;
64
- exports.WorkspaceFileService = WorkspaceFileService = tslib_1.__decorate([
65
- (0, inversify_1.injectable)()
66
- ], WorkspaceFileService);
67
- //# sourceMappingURL=workspace-file-service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspace-file-service.js","sourceRoot":"","sources":["../../src/common/workspace-file-service.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;;;;AAGhF,4DAA0D;AAC1D,8DAA8D;AAO9D;;GAEG;AACU,QAAA,SAAS,GAAG,iBAAiB,CAAC;AAC3C;;GAEG;AACU,QAAA,UAAU,GAAG,gBAAgB,CAAC;AAGpC,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAA1B;QAEO,0BAAqB,GAAG,CAAC,CAAC;IAkCxC,CAAC;IAhCG,IAAI,oBAAoB;QACpB,OAAO,IAAI,CAAC,qBAAqB,CAAC;IACtC,CAAC;IAED;;;;OAIG;IACH,eAAe,CAAC,SAAyB;QACrC,MAAM,GAAG,GAAG,gBAAQ,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;QACpE,MAAM,UAAU,GAAG,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,CAAC;QACzD,OAAO,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7C,CAAC;IAED,qBAAqB;QACjB,OAAO;YACH;gBACI,IAAI,EAAE,OAAO;gBACb,SAAS,EAAE,iBAAS;aACvB;YACD;gBACI,IAAI,EAAE,oBAAoB;gBAC1B,SAAS,EAAE,kBAAU;aACxB;SACJ,CAAC;IACN,CAAC;IAED,0BAA0B,CAAC,GAAa;QACpC,OAAO,IAAI,CAAC,qBAAqB,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACjG,CAAC;CAEJ,CAAA;AApCY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CAoChC"}
@@ -1,12 +0,0 @@
1
- import { interfaces } from '@theia/core/shared/inversify';
2
- import { PreferenceProxy, PreferenceService, PreferenceSchema } from '@theia/core/lib/common/preferences';
3
- export declare const workspacePreferenceSchema: PreferenceSchema;
4
- export interface WorkspaceConfiguration {
5
- 'workspace.preserveWindow': boolean;
6
- }
7
- export declare const WorkspacePreferenceContribution: unique symbol;
8
- export declare const WorkspacePreferences: unique symbol;
9
- export type WorkspacePreferences = PreferenceProxy<WorkspaceConfiguration>;
10
- export declare function createWorkspacePreferences(preferences: PreferenceService, schema?: PreferenceSchema): WorkspacePreferences;
11
- export declare function bindWorkspacePreferences(bind: interfaces.Bind): void;
12
- //# sourceMappingURL=workspace-preferences.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspace-preferences.d.ts","sourceRoot":"","sources":["../../src/common/workspace-preferences.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAyB,eAAe,EAAE,iBAAiB,EAA0B,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAGzJ,eAAO,MAAM,yBAAyB,EAAE,gBAQvC,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACnC,0BAA0B,EAAE,OAAO,CAAC;CACvC;AAED,eAAO,MAAM,+BAA+B,eAA4C,CAAC;AACzF,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AACnE,MAAM,MAAM,oBAAoB,GAAG,eAAe,CAAC,sBAAsB,CAAC,CAAC;AAE3E,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,iBAAiB,EAAE,MAAM,GAAE,gBAA4C,GAAG,oBAAoB,CAErJ;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,CAQpE"}
@@ -1,46 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2018 Ericsson and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.bindWorkspacePreferences = exports.createWorkspacePreferences = exports.WorkspacePreferences = exports.WorkspacePreferenceContribution = exports.workspacePreferenceSchema = void 0;
19
- const preferences_1 = require("@theia/core/lib/common/preferences");
20
- const nls_1 = require("@theia/core/lib/common/nls");
21
- exports.workspacePreferenceSchema = {
22
- properties: {
23
- 'workspace.preserveWindow': {
24
- description: nls_1.nls.localize('theia/workspace/preserveWindow', 'Enable opening workspaces in current window.'),
25
- type: 'boolean',
26
- default: false
27
- },
28
- }
29
- };
30
- exports.WorkspacePreferenceContribution = Symbol('WorkspacePreferenceContribution');
31
- exports.WorkspacePreferences = Symbol('WorkspacePreferences');
32
- function createWorkspacePreferences(preferences, schema = exports.workspacePreferenceSchema) {
33
- return (0, preferences_1.createPreferenceProxy)(preferences, schema);
34
- }
35
- exports.createWorkspacePreferences = createWorkspacePreferences;
36
- function bindWorkspacePreferences(bind) {
37
- bind(exports.WorkspacePreferences).toDynamicValue(ctx => {
38
- const preferences = ctx.container.get(preferences_1.PreferenceService);
39
- const contribution = ctx.container.get(exports.WorkspacePreferenceContribution);
40
- return createWorkspacePreferences(preferences, contribution.schema);
41
- }).inSingletonScope();
42
- bind(exports.WorkspacePreferenceContribution).toConstantValue({ schema: exports.workspacePreferenceSchema });
43
- bind(preferences_1.PreferenceContribution).toService(exports.WorkspacePreferenceContribution);
44
- }
45
- exports.bindWorkspacePreferences = bindWorkspacePreferences;
46
- //# sourceMappingURL=workspace-preferences.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspace-preferences.js","sourceRoot":"","sources":["../../src/common/workspace-preferences.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;;;AAGhF,oEAAyJ;AACzJ,oDAAiD;AAEpC,QAAA,yBAAyB,GAAqB;IACvD,UAAU,EAAE;QACR,0BAA0B,EAAE;YACxB,WAAW,EAAE,SAAG,CAAC,QAAQ,CAAC,gCAAgC,EAAE,8CAA8C,CAAC;YAC3G,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,KAAK;SACjB;KACJ;CACJ,CAAC;AAMW,QAAA,+BAA+B,GAAG,MAAM,CAAC,iCAAiC,CAAC,CAAC;AAC5E,QAAA,oBAAoB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAGnE,SAAgB,0BAA0B,CAAC,WAA8B,EAAE,SAA2B,iCAAyB;IAC3H,OAAO,IAAA,mCAAqB,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC;AAFD,gEAEC;AAED,SAAgB,wBAAwB,CAAC,IAAqB;IAC1D,IAAI,CAAC,4BAAoB,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;QAC5C,MAAM,WAAW,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,CAAoB,+BAAiB,CAAC,CAAC;QAC5E,MAAM,YAAY,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,CAAyB,uCAA+B,CAAC,CAAC;QAChG,OAAO,0BAA0B,CAAC,WAAW,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACtB,IAAI,CAAC,uCAA+B,CAAC,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,iCAAyB,EAAE,CAAC,CAAC;IAC7F,IAAI,CAAC,oCAAsB,CAAC,CAAC,SAAS,CAAC,uCAA+B,CAAC,CAAC;AAC5E,CAAC;AARD,4DAQC"}
@@ -1,27 +0,0 @@
1
- export declare const workspacePath = "/services/workspace";
2
- /**
3
- * The JSON-RPC workspace interface.
4
- */
5
- export declare const WorkspaceServer: unique symbol;
6
- export interface WorkspaceServer {
7
- /**
8
- * Returns with a promise that resolves to the most recently used workspace folder URI as a string.
9
- * Resolves to `undefined` if the workspace folder is not yet set.
10
- */
11
- getMostRecentlyUsedWorkspace(): Promise<string | undefined>;
12
- /**
13
- * Sets the desired string representation of the URI as the most recently used workspace folder.
14
- */
15
- setMostRecentlyUsedWorkspace(uri: string): Promise<void>;
16
- /**
17
- * Removes a workspace from the list of recently opened workspaces.
18
- *
19
- * @param uri the workspace uri.
20
- */
21
- removeRecentWorkspace(uri: string): Promise<void>;
22
- /**
23
- * Returns list of recently opened workspaces as an array.
24
- */
25
- getRecentWorkspaces(): Promise<string[]>;
26
- }
27
- //# sourceMappingURL=workspace-protocol.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspace-protocol.d.ts","sourceRoot":"","sources":["../../src/common/workspace-protocol.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,aAAa,wBAAwB,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,eAAe,eAA4B,CAAC;AACzD,MAAM,WAAW,eAAe;IAE5B;;;OAGG;IACH,4BAA4B,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAE5D;;OAEG;IACH,4BAA4B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzD;;;;OAIG;IACH,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAElD;;OAEG;IACH,mBAAmB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;CAC3C"}
@@ -1,24 +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-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.WorkspaceServer = exports.workspacePath = void 0;
19
- exports.workspacePath = '/services/workspace';
20
- /**
21
- * The JSON-RPC workspace interface.
22
- */
23
- exports.WorkspaceServer = Symbol('WorkspaceServer');
24
- //# sourceMappingURL=workspace-protocol.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspace-protocol.js","sourceRoot":"","sources":["../../src/common/workspace-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,gFAAgF;AAChF,gFAAgF;;;AAEnE,QAAA,aAAa,GAAG,qBAAqB,CAAC;AAEnD;;GAEG;AACU,QAAA,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC"}
@@ -1,22 +0,0 @@
1
- import { PreferenceProxy, PreferenceService, PreferenceSchema } from '@theia/core/lib/common/preferences';
2
- import { interfaces } from '@theia/core/shared/inversify';
3
- export declare const WORKSPACE_TRUST_ENABLED = "security.workspace.trust.enabled";
4
- export declare const WORKSPACE_TRUST_STARTUP_PROMPT = "security.workspace.trust.startupPrompt";
5
- export declare const WORKSPACE_TRUST_EMPTY_WINDOW = "security.workspace.trust.emptyWindow";
6
- export declare enum WorkspaceTrustPrompt {
7
- ALWAYS = "always",
8
- ONCE = "once",
9
- NEVER = "never"
10
- }
11
- export declare const workspaceTrustPreferenceSchema: PreferenceSchema;
12
- export interface WorkspaceTrustConfiguration {
13
- [WORKSPACE_TRUST_ENABLED]: boolean;
14
- [WORKSPACE_TRUST_STARTUP_PROMPT]: WorkspaceTrustPrompt;
15
- [WORKSPACE_TRUST_EMPTY_WINDOW]: boolean;
16
- }
17
- export declare const WorkspaceTrustPreferenceContribution: unique symbol;
18
- export declare const WorkspaceTrustPreferences: unique symbol;
19
- export type WorkspaceTrustPreferences = PreferenceProxy<WorkspaceTrustConfiguration>;
20
- export declare function createWorkspaceTrustPreferences(preferences: PreferenceService, schema?: PreferenceSchema): WorkspaceTrustPreferences;
21
- export declare function bindWorkspaceTrustPreferences(bind: interfaces.Bind): void;
22
- //# sourceMappingURL=workspace-trust-preferences.d.ts.map