@theia/workspace 1.34.2 → 1.34.3

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 (105) hide show
  1. package/LICENSE +641 -641
  2. package/README.md +30 -30
  3. package/lib/browser/diff-service.d.ts +10 -10
  4. package/lib/browser/diff-service.js +85 -85
  5. package/lib/browser/index.d.ts +6 -6
  6. package/lib/browser/index.js +33 -33
  7. package/lib/browser/quick-open-workspace.d.ts +25 -25
  8. package/lib/browser/quick-open-workspace.js +137 -137
  9. package/lib/browser/untitled-workspace-exit-dialog.d.ts +19 -19
  10. package/lib/browser/untitled-workspace-exit-dialog.js +74 -74
  11. package/lib/browser/workspace-breadcrumbs-contribution.d.ts +10 -10
  12. package/lib/browser/workspace-breadcrumbs-contribution.js +66 -66
  13. package/lib/browser/workspace-commands.d.ts +117 -117
  14. package/lib/browser/workspace-commands.js +593 -593
  15. package/lib/browser/workspace-commands.spec.d.ts +1 -1
  16. package/lib/browser/workspace-commands.spec.js +127 -127
  17. package/lib/browser/workspace-compare-handler.d.ts +26 -26
  18. package/lib/browser/workspace-compare-handler.js +66 -66
  19. package/lib/browser/workspace-delete-handler.d.ts +75 -75
  20. package/lib/browser/workspace-delete-handler.js +214 -214
  21. package/lib/browser/workspace-duplicate-handler.d.ts +30 -30
  22. package/lib/browser/workspace-duplicate-handler.js +86 -86
  23. package/lib/browser/workspace-frontend-contribution.d.ts +135 -135
  24. package/lib/browser/workspace-frontend-contribution.js +568 -568
  25. package/lib/browser/workspace-frontend-contribution.spec.d.ts +1 -1
  26. package/lib/browser/workspace-frontend-contribution.spec.js +53 -53
  27. package/lib/browser/workspace-frontend-module.d.ts +3 -3
  28. package/lib/browser/workspace-frontend-module.js +88 -88
  29. package/lib/browser/workspace-input-dialog.d.ts +19 -19
  30. package/lib/browser/workspace-input-dialog.js +73 -73
  31. package/lib/browser/workspace-preferences.d.ts +11 -11
  32. package/lib/browser/workspace-preferences.js +46 -46
  33. package/lib/browser/workspace-schema-updater.d.ts +32 -32
  34. package/lib/browser/workspace-schema-updater.js +148 -148
  35. package/lib/browser/workspace-service.d.ts +182 -182
  36. package/lib/browser/workspace-service.js +729 -729
  37. package/lib/browser/workspace-storage-service.d.ts +15 -15
  38. package/lib/browser/workspace-storage-service.js +80 -80
  39. package/lib/browser/workspace-trust-preferences.d.ts +21 -21
  40. package/lib/browser/workspace-trust-preferences.js +65 -65
  41. package/lib/browser/workspace-trust-service.d.ts +26 -26
  42. package/lib/browser/workspace-trust-service.js +149 -149
  43. package/lib/browser/workspace-uri-contribution.d.ts +20 -20
  44. package/lib/browser/workspace-uri-contribution.js +113 -113
  45. package/lib/browser/workspace-uri-contribution.spec.d.ts +1 -1
  46. package/lib/browser/workspace-uri-contribution.spec.js +169 -169
  47. package/lib/browser/workspace-user-working-directory-provider.d.ts +12 -12
  48. package/lib/browser/workspace-user-working-directory-provider.js +62 -62
  49. package/lib/browser/workspace-utils.d.ts +15 -15
  50. package/lib/browser/workspace-utils.js +54 -54
  51. package/lib/browser/workspace-variable-contribution.d.ts +23 -23
  52. package/lib/browser/workspace-variable-contribution.js +237 -237
  53. package/lib/browser/workspace-window-title-updater.d.ts +7 -7
  54. package/lib/browser/workspace-window-title-updater.js +57 -57
  55. package/lib/common/index.d.ts +2 -2
  56. package/lib/common/index.js +29 -29
  57. package/lib/common/test/mock-workspace-server.d.ts +7 -7
  58. package/lib/common/test/mock-workspace-server.js +35 -35
  59. package/lib/common/utils.d.ts +21 -21
  60. package/lib/common/utils.js +73 -73
  61. package/lib/common/workspace-protocol.d.ts +26 -26
  62. package/lib/common/workspace-protocol.js +23 -23
  63. package/lib/node/default-workspace-server.d.ts +64 -64
  64. package/lib/node/default-workspace-server.js +248 -248
  65. package/lib/node/default-workspace-server.spec.d.ts +1 -1
  66. package/lib/node/default-workspace-server.spec.js +84 -84
  67. package/lib/node/index.d.ts +2 -2
  68. package/lib/node/index.js +29 -29
  69. package/lib/node/workspace-backend-module.d.ts +3 -3
  70. package/lib/node/workspace-backend-module.js +32 -32
  71. package/package.json +6 -6
  72. package/src/browser/diff-service.ts +62 -62
  73. package/src/browser/index.ts +22 -22
  74. package/src/browser/quick-open-workspace.ts +112 -112
  75. package/src/browser/untitled-workspace-exit-dialog.ts +70 -70
  76. package/src/browser/workspace-breadcrumbs-contribution.ts +56 -56
  77. package/src/browser/workspace-commands.spec.ts +153 -153
  78. package/src/browser/workspace-commands.ts +586 -586
  79. package/src/browser/workspace-compare-handler.ts +56 -56
  80. package/src/browser/workspace-delete-handler.ts +212 -212
  81. package/src/browser/workspace-duplicate-handler.ts +75 -75
  82. package/src/browser/workspace-frontend-contribution.spec.ts +63 -63
  83. package/src/browser/workspace-frontend-contribution.ts +558 -558
  84. package/src/browser/workspace-frontend-module.ts +115 -115
  85. package/src/browser/workspace-input-dialog.ts +60 -60
  86. package/src/browser/workspace-preferences.ts +58 -58
  87. package/src/browser/workspace-schema-updater.ts +148 -148
  88. package/src/browser/workspace-service.ts +772 -772
  89. package/src/browser/workspace-storage-service.ts +67 -67
  90. package/src/browser/workspace-trust-preferences.ts +76 -76
  91. package/src/browser/workspace-trust-service.ts +143 -143
  92. package/src/browser/workspace-uri-contribution.spec.ts +191 -191
  93. package/src/browser/workspace-uri-contribution.ts +97 -97
  94. package/src/browser/workspace-user-working-directory-provider.ts +48 -48
  95. package/src/browser/workspace-utils.ts +45 -45
  96. package/src/browser/workspace-variable-contribution.ts +222 -222
  97. package/src/browser/workspace-window-title-updater.ts +45 -45
  98. package/src/common/index.ts +18 -18
  99. package/src/common/test/mock-workspace-server.ts +29 -29
  100. package/src/common/utils.ts +69 -69
  101. package/src/common/workspace-protocol.ts +47 -47
  102. package/src/node/default-workspace-server.spec.ts +99 -99
  103. package/src/node/default-workspace-server.ts +242 -242
  104. package/src/node/index.ts +18 -18
  105. package/src/node/workspace-backend-module.ts +37 -37
@@ -1,183 +1,183 @@
1
- import URI from '@theia/core/lib/common/uri';
2
- import { WorkspaceServer, CommonWorkspaceUtils } from '../common';
3
- import { WindowService } from '@theia/core/lib/browser/window/window-service';
4
- import { FrontendApplicationContribution, PreferenceServiceImpl, PreferenceSchemaProvider, LabelProvider } from '@theia/core/lib/browser';
5
- import { Deferred } from '@theia/core/lib/common/promise-util';
6
- import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
7
- import { ILogger, Disposable, DisposableCollection, Emitter, Event, MaybePromise, MessageService } from '@theia/core';
8
- import { WorkspacePreferences } from './workspace-preferences';
9
- import { FileStat, BaseStat } from '@theia/filesystem/lib/common/files';
10
- import { FileService } from '@theia/filesystem/lib/browser/file-service';
11
- import { WindowTitleService } from '@theia/core/lib/browser/window/window-title-service';
12
- import { FileSystemPreferences } from '@theia/filesystem/lib/browser';
13
- import { WorkspaceSchemaUpdater } from './workspace-schema-updater';
14
- import { IJSONSchema } from '@theia/core/lib/common/json-schema';
15
- /**
16
- * The workspace service.
17
- */
18
- export declare class WorkspaceService implements FrontendApplicationContribution {
19
- protected _workspace: FileStat | undefined;
20
- protected _roots: FileStat[];
21
- protected deferredRoots: Deferred<FileStat[]>;
22
- protected readonly fileService: FileService;
23
- protected readonly server: WorkspaceServer;
24
- protected readonly windowService: WindowService;
25
- protected logger: ILogger;
26
- protected preferences: WorkspacePreferences;
27
- protected readonly preferenceImpl: PreferenceServiceImpl;
28
- protected readonly schemaProvider: PreferenceSchemaProvider;
29
- protected readonly envVariableServer: EnvVariablesServer;
30
- protected readonly messageService: MessageService;
31
- protected readonly labelProvider: LabelProvider;
32
- protected readonly fsPreferences: FileSystemPreferences;
33
- protected readonly schemaUpdater: WorkspaceSchemaUpdater;
34
- protected readonly utils: CommonWorkspaceUtils;
35
- protected readonly windowTitleService: WindowTitleService;
36
- protected _ready: Deferred<void>;
37
- get ready(): Promise<void>;
38
- protected init(): Promise<void>;
39
- /**
40
- * Resolves to the default workspace URI as string.
41
- *
42
- * The default implementation tries to extract the default workspace location
43
- * from the `window.location.hash`, then falls-back to the most recently
44
- * used workspace root from the server.
45
- *
46
- * It is not ensured that the resolved workspace URI is valid, it can point
47
- * to a non-existing location.
48
- */
49
- protected getDefaultWorkspaceUri(): MaybePromise<string | undefined>;
50
- protected doGetDefaultWorkspaceUri(): Promise<string | undefined>;
51
- /**
52
- * Set the URL fragment to the given workspace path.
53
- */
54
- protected setURLFragment(workspacePath: string): void;
55
- get roots(): Promise<FileStat[]>;
56
- tryGetRoots(): FileStat[];
57
- get workspace(): FileStat | undefined;
58
- protected readonly onWorkspaceChangeEmitter: Emitter<FileStat[]>;
59
- get onWorkspaceChanged(): Event<FileStat[]>;
60
- protected readonly onWorkspaceLocationChangedEmitter: Emitter<FileStat | undefined>;
61
- get onWorkspaceLocationChanged(): Event<FileStat | undefined>;
62
- protected readonly toDisposeOnWorkspace: DisposableCollection;
63
- protected setWorkspace(workspaceStat: FileStat | undefined): Promise<void>;
64
- protected updateWorkspace(): Promise<void>;
65
- protected updateRoots(): Promise<void>;
66
- protected computeRoots(): Promise<FileStat[]>;
67
- protected getWorkspaceDataFromFile(): Promise<WorkspaceData | undefined>;
68
- protected updateTitle(): void;
69
- /**
70
- * on unload, we set our workspace root as the last recently used on the backend.
71
- */
72
- onStop(): void;
73
- recentWorkspaces(): Promise<string[]>;
74
- removeRecentWorkspace(uri: string): Promise<void>;
75
- /**
76
- * Returns `true` if theia has an opened workspace or folder
77
- * @returns {boolean}
78
- */
79
- get opened(): boolean;
80
- /**
81
- * Returns `true` if a multiple-root workspace is currently open.
82
- * @returns {boolean}
83
- */
84
- get isMultiRootWorkspaceOpened(): boolean;
85
- /**
86
- * Opens directory, or recreates a workspace from the file that `uri` points to.
87
- */
88
- open(uri: URI, options?: WorkspaceInput): void;
89
- protected doOpen(uri: URI, options?: WorkspaceInput): Promise<URI | undefined>;
90
- /**
91
- * Adds root folder(s) to the workspace
92
- * @param uris URI or URIs of the root folder(s) to add
93
- */
94
- addRoot(uris: URI[] | URI): Promise<void>;
95
- /**
96
- * Removes root folder(s) from workspace.
97
- */
98
- removeRoots(uris: URI[]): Promise<void>;
99
- spliceRoots(start: number, deleteCount?: number, ...rootsToAdd: URI[]): Promise<URI[]>;
100
- getUntitledWorkspace(): Promise<URI>;
101
- protected writeWorkspaceFile(workspaceFile: FileStat | undefined, workspaceData: WorkspaceData): Promise<FileStat | undefined>;
102
- /**
103
- * Clears current workspace root.
104
- */
105
- close(): Promise<void>;
106
- /**
107
- * returns a FileStat if the argument URI points to an existing directory. Otherwise, `undefined`.
108
- */
109
- protected toValidRoot(uri: URI | string | undefined): Promise<FileStat | undefined>;
110
- /**
111
- * returns a FileStat if the argument URI points to a file or directory. Otherwise, `undefined`.
112
- */
113
- protected toFileStat(uri: URI | string | undefined): Promise<FileStat | undefined>;
114
- protected openWindow(uri: FileStat, options?: WorkspaceInput): void;
115
- protected reloadWindow(options?: WorkspaceInput): void;
116
- protected openNewWindow(workspacePath: string, options?: WorkspaceInput): void;
117
- protected shouldPreserveWindow(options?: WorkspaceInput): boolean;
118
- /**
119
- * Return true if one of the paths in paths array is present in the workspace
120
- * NOTE: You should always explicitly use `/` as the separator between the path segments.
121
- */
122
- containsSome(paths: string[]): Promise<boolean>;
123
- /**
124
- * `true` if the current workspace is configured using a configuration file.
125
- *
126
- * `false` if there is no workspace or the workspace is simply a folder.
127
- */
128
- get saved(): boolean;
129
- /**
130
- * Save workspace data into a file
131
- * @param uri URI or FileStat of the workspace file
132
- */
133
- save(uri: URI | FileStat): Promise<void>;
134
- protected readonly rootWatchers: Map<string, Disposable>;
135
- protected watchRoots(): Promise<void>;
136
- protected refreshRootWatchers(): Promise<void>;
137
- protected watchRoot(root: FileStat): Promise<void>;
138
- protected getExcludes(uri: string): string[];
139
- /**
140
- * Returns the workspace root uri that the given file belongs to.
141
- * In case that the file is found in more than one workspace roots, returns the root that is closest to the file.
142
- * If the file is not from the current workspace, returns `undefined`.
143
- * @param uri URI of the file
144
- */
145
- getWorkspaceRootUri(uri: URI | undefined): URI | undefined;
146
- areWorkspaceRoots(uris: URI[]): boolean;
147
- /**
148
- * Check if the file should be considered as a workspace file.
149
- *
150
- * Example: We should not try to read the contents of an .exe file.
151
- */
152
- protected isWorkspaceFile(candidate: FileStat | URI): boolean;
153
- isUntitledWorkspace(candidate?: URI): boolean;
154
- isSafeToReload(withURI?: URI): Promise<boolean>;
155
- /**
156
- *
157
- * @param key the property key under which to store the schema (e.g. tasks, launch)
158
- * @param schema the schema for the property. If none is supplied, the update is treated as a deletion.
159
- */
160
- updateSchema(key: string, schema?: IJSONSchema): Promise<boolean>;
161
- }
162
- export interface WorkspaceInput {
163
- /**
164
- * Tests whether the same window should be used or a new one has to be opened after setting the workspace root. By default it is `false`.
165
- */
166
- preserveWindow?: boolean;
167
- }
168
- export interface WorkspaceData {
169
- folders: Array<{
170
- path: string;
171
- name?: string;
172
- }>;
173
- [key: string]: {
174
- [id: string]: any;
175
- };
176
- }
177
- export declare namespace WorkspaceData {
178
- function is(data: unknown): data is WorkspaceData;
179
- function buildWorkspaceData(folders: string[] | FileStat[], additionalFields?: Partial<WorkspaceData>): WorkspaceData;
180
- function transformToRelative(data: WorkspaceData, workspaceFile?: FileStat): WorkspaceData;
181
- function transformToAbsolute(data: WorkspaceData, workspaceFile?: BaseStat): WorkspaceData;
182
- }
1
+ import URI from '@theia/core/lib/common/uri';
2
+ import { WorkspaceServer, CommonWorkspaceUtils } from '../common';
3
+ import { WindowService } from '@theia/core/lib/browser/window/window-service';
4
+ import { FrontendApplicationContribution, PreferenceServiceImpl, PreferenceSchemaProvider, LabelProvider } from '@theia/core/lib/browser';
5
+ import { Deferred } from '@theia/core/lib/common/promise-util';
6
+ import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
7
+ import { ILogger, Disposable, DisposableCollection, Emitter, Event, MaybePromise, MessageService } from '@theia/core';
8
+ import { WorkspacePreferences } from './workspace-preferences';
9
+ import { FileStat, BaseStat } from '@theia/filesystem/lib/common/files';
10
+ import { FileService } from '@theia/filesystem/lib/browser/file-service';
11
+ import { WindowTitleService } from '@theia/core/lib/browser/window/window-title-service';
12
+ import { FileSystemPreferences } from '@theia/filesystem/lib/browser';
13
+ import { WorkspaceSchemaUpdater } from './workspace-schema-updater';
14
+ import { IJSONSchema } from '@theia/core/lib/common/json-schema';
15
+ /**
16
+ * The workspace service.
17
+ */
18
+ export declare class WorkspaceService implements FrontendApplicationContribution {
19
+ protected _workspace: FileStat | undefined;
20
+ protected _roots: FileStat[];
21
+ protected deferredRoots: Deferred<FileStat[]>;
22
+ protected readonly fileService: FileService;
23
+ protected readonly server: WorkspaceServer;
24
+ protected readonly windowService: WindowService;
25
+ protected logger: ILogger;
26
+ protected preferences: WorkspacePreferences;
27
+ protected readonly preferenceImpl: PreferenceServiceImpl;
28
+ protected readonly schemaProvider: PreferenceSchemaProvider;
29
+ protected readonly envVariableServer: EnvVariablesServer;
30
+ protected readonly messageService: MessageService;
31
+ protected readonly labelProvider: LabelProvider;
32
+ protected readonly fsPreferences: FileSystemPreferences;
33
+ protected readonly schemaUpdater: WorkspaceSchemaUpdater;
34
+ protected readonly utils: CommonWorkspaceUtils;
35
+ protected readonly windowTitleService: WindowTitleService;
36
+ protected _ready: Deferred<void>;
37
+ get ready(): Promise<void>;
38
+ protected init(): Promise<void>;
39
+ /**
40
+ * Resolves to the default workspace URI as string.
41
+ *
42
+ * The default implementation tries to extract the default workspace location
43
+ * from the `window.location.hash`, then falls-back to the most recently
44
+ * used workspace root from the server.
45
+ *
46
+ * It is not ensured that the resolved workspace URI is valid, it can point
47
+ * to a non-existing location.
48
+ */
49
+ protected getDefaultWorkspaceUri(): MaybePromise<string | undefined>;
50
+ protected doGetDefaultWorkspaceUri(): Promise<string | undefined>;
51
+ /**
52
+ * Set the URL fragment to the given workspace path.
53
+ */
54
+ protected setURLFragment(workspacePath: string): void;
55
+ get roots(): Promise<FileStat[]>;
56
+ tryGetRoots(): FileStat[];
57
+ get workspace(): FileStat | undefined;
58
+ protected readonly onWorkspaceChangeEmitter: Emitter<FileStat[]>;
59
+ get onWorkspaceChanged(): Event<FileStat[]>;
60
+ protected readonly onWorkspaceLocationChangedEmitter: Emitter<FileStat | undefined>;
61
+ get onWorkspaceLocationChanged(): Event<FileStat | undefined>;
62
+ protected readonly toDisposeOnWorkspace: DisposableCollection;
63
+ protected setWorkspace(workspaceStat: FileStat | undefined): Promise<void>;
64
+ protected updateWorkspace(): Promise<void>;
65
+ protected updateRoots(): Promise<void>;
66
+ protected computeRoots(): Promise<FileStat[]>;
67
+ protected getWorkspaceDataFromFile(): Promise<WorkspaceData | undefined>;
68
+ protected updateTitle(): void;
69
+ /**
70
+ * on unload, we set our workspace root as the last recently used on the backend.
71
+ */
72
+ onStop(): void;
73
+ recentWorkspaces(): Promise<string[]>;
74
+ removeRecentWorkspace(uri: string): Promise<void>;
75
+ /**
76
+ * Returns `true` if theia has an opened workspace or folder
77
+ * @returns {boolean}
78
+ */
79
+ get opened(): boolean;
80
+ /**
81
+ * Returns `true` if a multiple-root workspace is currently open.
82
+ * @returns {boolean}
83
+ */
84
+ get isMultiRootWorkspaceOpened(): boolean;
85
+ /**
86
+ * Opens directory, or recreates a workspace from the file that `uri` points to.
87
+ */
88
+ open(uri: URI, options?: WorkspaceInput): void;
89
+ protected doOpen(uri: URI, options?: WorkspaceInput): Promise<URI | undefined>;
90
+ /**
91
+ * Adds root folder(s) to the workspace
92
+ * @param uris URI or URIs of the root folder(s) to add
93
+ */
94
+ addRoot(uris: URI[] | URI): Promise<void>;
95
+ /**
96
+ * Removes root folder(s) from workspace.
97
+ */
98
+ removeRoots(uris: URI[]): Promise<void>;
99
+ spliceRoots(start: number, deleteCount?: number, ...rootsToAdd: URI[]): Promise<URI[]>;
100
+ getUntitledWorkspace(): Promise<URI>;
101
+ protected writeWorkspaceFile(workspaceFile: FileStat | undefined, workspaceData: WorkspaceData): Promise<FileStat | undefined>;
102
+ /**
103
+ * Clears current workspace root.
104
+ */
105
+ close(): Promise<void>;
106
+ /**
107
+ * returns a FileStat if the argument URI points to an existing directory. Otherwise, `undefined`.
108
+ */
109
+ protected toValidRoot(uri: URI | string | undefined): Promise<FileStat | undefined>;
110
+ /**
111
+ * returns a FileStat if the argument URI points to a file or directory. Otherwise, `undefined`.
112
+ */
113
+ protected toFileStat(uri: URI | string | undefined): Promise<FileStat | undefined>;
114
+ protected openWindow(uri: FileStat, options?: WorkspaceInput): void;
115
+ protected reloadWindow(options?: WorkspaceInput): void;
116
+ protected openNewWindow(workspacePath: string, options?: WorkspaceInput): void;
117
+ protected shouldPreserveWindow(options?: WorkspaceInput): boolean;
118
+ /**
119
+ * Return true if one of the paths in paths array is present in the workspace
120
+ * NOTE: You should always explicitly use `/` as the separator between the path segments.
121
+ */
122
+ containsSome(paths: string[]): Promise<boolean>;
123
+ /**
124
+ * `true` if the current workspace is configured using a configuration file.
125
+ *
126
+ * `false` if there is no workspace or the workspace is simply a folder.
127
+ */
128
+ get saved(): boolean;
129
+ /**
130
+ * Save workspace data into a file
131
+ * @param uri URI or FileStat of the workspace file
132
+ */
133
+ save(uri: URI | FileStat): Promise<void>;
134
+ protected readonly rootWatchers: Map<string, Disposable>;
135
+ protected watchRoots(): Promise<void>;
136
+ protected refreshRootWatchers(): Promise<void>;
137
+ protected watchRoot(root: FileStat): Promise<void>;
138
+ protected getExcludes(uri: string): string[];
139
+ /**
140
+ * Returns the workspace root uri that the given file belongs to.
141
+ * In case that the file is found in more than one workspace roots, returns the root that is closest to the file.
142
+ * If the file is not from the current workspace, returns `undefined`.
143
+ * @param uri URI of the file
144
+ */
145
+ getWorkspaceRootUri(uri: URI | undefined): URI | undefined;
146
+ areWorkspaceRoots(uris: URI[]): boolean;
147
+ /**
148
+ * Check if the file should be considered as a workspace file.
149
+ *
150
+ * Example: We should not try to read the contents of an .exe file.
151
+ */
152
+ protected isWorkspaceFile(candidate: FileStat | URI): boolean;
153
+ isUntitledWorkspace(candidate?: URI): boolean;
154
+ isSafeToReload(withURI?: URI): Promise<boolean>;
155
+ /**
156
+ *
157
+ * @param key the property key under which to store the schema (e.g. tasks, launch)
158
+ * @param schema the schema for the property. If none is supplied, the update is treated as a deletion.
159
+ */
160
+ updateSchema(key: string, schema?: IJSONSchema): Promise<boolean>;
161
+ }
162
+ export interface WorkspaceInput {
163
+ /**
164
+ * Tests whether the same window should be used or a new one has to be opened after setting the workspace root. By default it is `false`.
165
+ */
166
+ preserveWindow?: boolean;
167
+ }
168
+ export interface WorkspaceData {
169
+ folders: Array<{
170
+ path: string;
171
+ name?: string;
172
+ }>;
173
+ [key: string]: {
174
+ [id: string]: any;
175
+ };
176
+ }
177
+ export declare namespace WorkspaceData {
178
+ function is(data: unknown): data is WorkspaceData;
179
+ function buildWorkspaceData(folders: string[] | FileStat[], additionalFields?: Partial<WorkspaceData>): WorkspaceData;
180
+ function transformToRelative(data: WorkspaceData, workspaceFile?: FileStat): WorkspaceData;
181
+ function transformToAbsolute(data: WorkspaceData, workspaceFile?: BaseStat): WorkspaceData;
182
+ }
183
183
  //# sourceMappingURL=workspace-service.d.ts.map