@theia/workspace 1.45.1 → 1.46.0-next.72
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/README.md +30 -30
- package/lib/browser/canonical-uri-service.d.ts +11 -11
- package/lib/browser/canonical-uri-service.js +59 -59
- package/lib/browser/diff-service.d.ts +10 -10
- package/lib/browser/diff-service.js +85 -85
- package/lib/browser/index.d.ts +7 -7
- package/lib/browser/index.js +34 -34
- package/lib/browser/quick-open-workspace.d.ts +25 -25
- package/lib/browser/quick-open-workspace.js +137 -137
- package/lib/browser/untitled-workspace-exit-dialog.d.ts +19 -19
- package/lib/browser/untitled-workspace-exit-dialog.js +74 -74
- package/lib/browser/workspace-breadcrumbs-contribution.d.ts +10 -10
- package/lib/browser/workspace-breadcrumbs-contribution.js +66 -66
- package/lib/browser/workspace-commands.d.ts +117 -117
- package/lib/browser/workspace-commands.js +601 -601
- package/lib/browser/workspace-commands.spec.d.ts +1 -1
- package/lib/browser/workspace-commands.spec.js +127 -127
- package/lib/browser/workspace-compare-handler.d.ts +26 -26
- package/lib/browser/workspace-compare-handler.js +66 -66
- package/lib/browser/workspace-delete-handler.d.ts +75 -75
- package/lib/browser/workspace-delete-handler.js +214 -214
- package/lib/browser/workspace-duplicate-handler.d.ts +30 -30
- package/lib/browser/workspace-duplicate-handler.js +86 -86
- package/lib/browser/workspace-frontend-contribution.d.ts +110 -110
- package/lib/browser/workspace-frontend-contribution.js +546 -546
- package/lib/browser/workspace-frontend-contribution.js.map +1 -1
- package/lib/browser/workspace-frontend-module.d.ts +3 -3
- package/lib/browser/workspace-frontend-module.js +91 -91
- package/lib/browser/workspace-input-dialog.d.ts +19 -19
- package/lib/browser/workspace-input-dialog.js +74 -74
- package/lib/browser/workspace-preferences.d.ts +11 -11
- package/lib/browser/workspace-preferences.js +46 -46
- package/lib/browser/workspace-schema-updater.d.ts +34 -34
- package/lib/browser/workspace-schema-updater.js +153 -153
- package/lib/browser/workspace-service.d.ts +184 -184
- package/lib/browser/workspace-service.js +739 -739
- package/lib/browser/workspace-storage-service.d.ts +15 -15
- package/lib/browser/workspace-storage-service.js +80 -80
- package/lib/browser/workspace-trust-preferences.d.ts +21 -21
- package/lib/browser/workspace-trust-preferences.js +65 -65
- package/lib/browser/workspace-trust-service.d.ts +27 -27
- package/lib/browser/workspace-trust-service.js +152 -152
- package/lib/browser/workspace-uri-contribution.d.ts +20 -20
- package/lib/browser/workspace-uri-contribution.js +113 -113
- package/lib/browser/workspace-uri-contribution.spec.d.ts +1 -1
- package/lib/browser/workspace-uri-contribution.spec.js +169 -169
- package/lib/browser/workspace-user-working-directory-provider.d.ts +12 -12
- package/lib/browser/workspace-user-working-directory-provider.js +62 -62
- package/lib/browser/workspace-utils.d.ts +15 -15
- package/lib/browser/workspace-utils.js +54 -54
- package/lib/browser/workspace-variable-contribution.d.ts +23 -23
- package/lib/browser/workspace-variable-contribution.js +237 -237
- package/lib/browser/workspace-window-title-updater.d.ts +7 -7
- package/lib/browser/workspace-window-title-updater.js +57 -57
- package/lib/browser-only/browser-only-workspace-server.d.ts +13 -0
- package/lib/browser-only/browser-only-workspace-server.d.ts.map +1 -0
- package/lib/browser-only/browser-only-workspace-server.js +81 -0
- package/lib/browser-only/browser-only-workspace-server.js.map +1 -0
- package/lib/browser-only/workspace-frontend-only-module.d.ts +4 -0
- package/lib/browser-only/workspace-frontend-only-module.d.ts.map +1 -0
- package/lib/browser-only/workspace-frontend-only-module.js +30 -0
- package/lib/browser-only/workspace-frontend-only-module.js.map +1 -0
- package/lib/common/index.d.ts +3 -3
- package/lib/common/index.js +30 -30
- package/lib/common/test/mock-workspace-server.d.ts +7 -7
- package/lib/common/test/mock-workspace-server.js +35 -35
- package/lib/common/untitled-workspace-service.d.ts +8 -8
- package/lib/common/untitled-workspace-service.js +60 -60
- package/lib/common/workspace-file-service.d.ts +26 -26
- package/lib/common/workspace-file-service.js +71 -71
- package/lib/common/workspace-protocol.d.ts +26 -26
- package/lib/common/workspace-protocol.js +23 -23
- package/lib/node/default-workspace-server.d.ts +65 -65
- package/lib/node/default-workspace-server.js +248 -248
- package/lib/node/default-workspace-server.spec.d.ts +1 -1
- package/lib/node/default-workspace-server.spec.js +85 -85
- package/lib/node/index.d.ts +2 -2
- package/lib/node/index.js +29 -29
- package/lib/node/workspace-backend-module.d.ts +3 -3
- package/lib/node/workspace-backend-module.js +33 -33
- package/package.json +9 -6
- package/src/browser/canonical-uri-service.ts +57 -57
- package/src/browser/diff-service.ts +62 -62
- package/src/browser/index.ts +23 -23
- package/src/browser/quick-open-workspace.ts +112 -112
- package/src/browser/untitled-workspace-exit-dialog.ts +70 -70
- package/src/browser/workspace-breadcrumbs-contribution.ts +56 -56
- package/src/browser/workspace-commands.spec.ts +153 -153
- package/src/browser/workspace-commands.ts +588 -588
- package/src/browser/workspace-compare-handler.ts +56 -56
- package/src/browser/workspace-delete-handler.ts +212 -212
- package/src/browser/workspace-duplicate-handler.ts +75 -75
- package/src/browser/workspace-frontend-contribution.ts +537 -537
- package/src/browser/workspace-frontend-module.ts +118 -118
- package/src/browser/workspace-input-dialog.ts +61 -61
- package/src/browser/workspace-preferences.ts +58 -58
- package/src/browser/workspace-schema-updater.ts +150 -150
- package/src/browser/workspace-service.ts +780 -780
- package/src/browser/workspace-storage-service.ts +67 -67
- package/src/browser/workspace-trust-preferences.ts +76 -76
- package/src/browser/workspace-trust-service.ts +147 -147
- package/src/browser/workspace-uri-contribution.spec.ts +191 -191
- package/src/browser/workspace-uri-contribution.ts +97 -97
- package/src/browser/workspace-user-working-directory-provider.ts +49 -49
- package/src/browser/workspace-utils.ts +45 -45
- package/src/browser/workspace-variable-contribution.ts +222 -222
- package/src/browser/workspace-window-title-updater.ts +45 -45
- package/src/browser-only/browser-only-workspace-server.ts +69 -0
- package/src/browser-only/workspace-frontend-only-module.ts +28 -0
- package/src/common/index.ts +19 -19
- package/src/common/test/mock-workspace-server.ts +29 -29
- package/src/common/untitled-workspace-service.ts +50 -50
- package/src/common/workspace-file-service.ts +72 -72
- package/src/common/workspace-protocol.ts +47 -47
- package/src/node/default-workspace-server.spec.ts +100 -100
- package/src/node/default-workspace-server.ts +244 -244
- package/src/node/index.ts +18 -18
- package/src/node/workspace-backend-module.ts +38 -38
|
@@ -1,27 +1,27 @@
|
|
|
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
|
-
}
|
|
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
27
|
//# sourceMappingURL=workspace-file-service.d.ts.map
|
|
@@ -1,72 +1,72 @@
|
|
|
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
|
-
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.WorkspaceFileService = exports.VSCODE_EXT = exports.THEIA_EXT = void 0;
|
|
25
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
26
|
-
const files_1 = require("@theia/filesystem/lib/common/files");
|
|
27
|
-
/**
|
|
28
|
-
* @deprecated Since 1.39.0. Use `WorkspaceFileService#getWorkspaceFileTypes` instead.
|
|
29
|
-
*/
|
|
30
|
-
exports.THEIA_EXT = 'theia-workspace';
|
|
31
|
-
/**
|
|
32
|
-
* @deprecated Since 1.39.0. Use `WorkspaceFileService#getWorkspaceFileTypes` instead.
|
|
33
|
-
*/
|
|
34
|
-
exports.VSCODE_EXT = 'code-workspace';
|
|
35
|
-
let WorkspaceFileService = class WorkspaceFileService {
|
|
36
|
-
constructor() {
|
|
37
|
-
this._defaultFileTypeIndex = 0;
|
|
38
|
-
}
|
|
39
|
-
get defaultFileTypeIndex() {
|
|
40
|
-
return this._defaultFileTypeIndex;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Check if the file should be considered as a workspace file.
|
|
44
|
-
*
|
|
45
|
-
* Example: We should not try to read the contents of an .exe file.
|
|
46
|
-
*/
|
|
47
|
-
isWorkspaceFile(candidate) {
|
|
48
|
-
const uri = files_1.FileStat.is(candidate) ? candidate.resource : candidate;
|
|
49
|
-
const extensions = this.getWorkspaceFileExtensions(true);
|
|
50
|
-
return extensions.includes(uri.path.ext);
|
|
51
|
-
}
|
|
52
|
-
getWorkspaceFileTypes() {
|
|
53
|
-
return [
|
|
54
|
-
{
|
|
55
|
-
name: 'Theia',
|
|
56
|
-
extension: exports.THEIA_EXT
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
name: 'Visual Studio Code',
|
|
60
|
-
extension: exports.VSCODE_EXT
|
|
61
|
-
}
|
|
62
|
-
];
|
|
63
|
-
}
|
|
64
|
-
getWorkspaceFileExtensions(dot) {
|
|
65
|
-
return this.getWorkspaceFileTypes().map(type => dot ? `.${type.extension}` : type.extension);
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
WorkspaceFileService = __decorate([
|
|
69
|
-
(0, inversify_1.injectable)()
|
|
70
|
-
], WorkspaceFileService);
|
|
71
|
-
exports.WorkspaceFileService = WorkspaceFileService;
|
|
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
|
+
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.WorkspaceFileService = exports.VSCODE_EXT = exports.THEIA_EXT = void 0;
|
|
25
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
26
|
+
const files_1 = require("@theia/filesystem/lib/common/files");
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Since 1.39.0. Use `WorkspaceFileService#getWorkspaceFileTypes` instead.
|
|
29
|
+
*/
|
|
30
|
+
exports.THEIA_EXT = 'theia-workspace';
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Since 1.39.0. Use `WorkspaceFileService#getWorkspaceFileTypes` instead.
|
|
33
|
+
*/
|
|
34
|
+
exports.VSCODE_EXT = 'code-workspace';
|
|
35
|
+
let WorkspaceFileService = class WorkspaceFileService {
|
|
36
|
+
constructor() {
|
|
37
|
+
this._defaultFileTypeIndex = 0;
|
|
38
|
+
}
|
|
39
|
+
get defaultFileTypeIndex() {
|
|
40
|
+
return this._defaultFileTypeIndex;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Check if the file should be considered as a workspace file.
|
|
44
|
+
*
|
|
45
|
+
* Example: We should not try to read the contents of an .exe file.
|
|
46
|
+
*/
|
|
47
|
+
isWorkspaceFile(candidate) {
|
|
48
|
+
const uri = files_1.FileStat.is(candidate) ? candidate.resource : candidate;
|
|
49
|
+
const extensions = this.getWorkspaceFileExtensions(true);
|
|
50
|
+
return extensions.includes(uri.path.ext);
|
|
51
|
+
}
|
|
52
|
+
getWorkspaceFileTypes() {
|
|
53
|
+
return [
|
|
54
|
+
{
|
|
55
|
+
name: 'Theia',
|
|
56
|
+
extension: exports.THEIA_EXT
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'Visual Studio Code',
|
|
60
|
+
extension: exports.VSCODE_EXT
|
|
61
|
+
}
|
|
62
|
+
];
|
|
63
|
+
}
|
|
64
|
+
getWorkspaceFileExtensions(dot) {
|
|
65
|
+
return this.getWorkspaceFileTypes().map(type => dot ? `.${type.extension}` : type.extension);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
WorkspaceFileService = __decorate([
|
|
69
|
+
(0, inversify_1.injectable)()
|
|
70
|
+
], WorkspaceFileService);
|
|
71
|
+
exports.WorkspaceFileService = WorkspaceFileService;
|
|
72
72
|
//# sourceMappingURL=workspace-file-service.js.map
|
|
@@ -1,27 +1,27 @@
|
|
|
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
|
-
}
|
|
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
27
|
//# sourceMappingURL=workspace-protocol.d.ts.map
|
|
@@ -1,24 +1,24 @@
|
|
|
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');
|
|
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
24
|
//# sourceMappingURL=workspace-protocol.js.map
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
/// <reference types="yargs" />
|
|
2
|
-
import * as yargs from '@theia/core/shared/yargs';
|
|
3
|
-
import { BackendApplicationContribution } from '@theia/core/lib/node';
|
|
4
|
-
import { CliContribution } from '@theia/core/lib/node/cli';
|
|
5
|
-
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
6
|
-
import { WorkspaceServer, UntitledWorkspaceService } from '../common';
|
|
7
|
-
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
|
8
|
-
export declare class WorkspaceCliContribution implements CliContribution {
|
|
9
|
-
protected readonly envVariablesServer: EnvVariablesServer;
|
|
10
|
-
protected readonly untitledWorkspaceService: UntitledWorkspaceService;
|
|
11
|
-
workspaceRoot: Deferred<string | undefined>;
|
|
12
|
-
configure(conf: yargs.Argv): void;
|
|
13
|
-
setArguments(args: yargs.Arguments): Promise<void>;
|
|
14
|
-
protected normalizeWorkspaceArg(raw: string): string;
|
|
15
|
-
protected buildWorkspaceForMultipleArguments(workspaceArguments: string[]): Promise<string | undefined>;
|
|
16
|
-
}
|
|
17
|
-
export declare class DefaultWorkspaceServer implements WorkspaceServer, BackendApplicationContribution {
|
|
18
|
-
protected root: Deferred<string | undefined>;
|
|
19
|
-
/**
|
|
20
|
-
* Untitled workspaces that are not among the most recent N workspaces will be deleted on start. Increase this number to keep older files,
|
|
21
|
-
* lower it to delete stale untitled workspaces more aggressively.
|
|
22
|
-
*/
|
|
23
|
-
protected untitledWorkspaceStaleThreshold: number;
|
|
24
|
-
protected readonly cliParams: WorkspaceCliContribution;
|
|
25
|
-
protected readonly envServer: EnvVariablesServer;
|
|
26
|
-
protected readonly untitledWorkspaceService: UntitledWorkspaceService;
|
|
27
|
-
protected init(): void;
|
|
28
|
-
protected doInit(): Promise<void>;
|
|
29
|
-
onStart(): Promise<void>;
|
|
30
|
-
protected getRoot(): Promise<string | undefined>;
|
|
31
|
-
getMostRecentlyUsedWorkspace(): Promise<string | undefined>;
|
|
32
|
-
setMostRecentlyUsedWorkspace(rawUri: string): Promise<void>;
|
|
33
|
-
removeRecentWorkspace(rawUri: string): Promise<void>;
|
|
34
|
-
getRecentWorkspaces(): Promise<string[]>;
|
|
35
|
-
protected workspaceStillExist(workspaceRootUri: string): Promise<boolean>;
|
|
36
|
-
protected getWorkspaceURIFromCli(): Promise<string | undefined>;
|
|
37
|
-
/**
|
|
38
|
-
* Writes the given uri as the most recently used workspace root to the user's home directory.
|
|
39
|
-
* @param uri most recently used uri
|
|
40
|
-
*/
|
|
41
|
-
protected writeToUserHome(data: RecentWorkspacePathsData): Promise<void>;
|
|
42
|
-
protected writeToFile(fsPath: string, data: object): Promise<void>;
|
|
43
|
-
/**
|
|
44
|
-
* Reads the most recently used workspace root from the user's home directory.
|
|
45
|
-
*/
|
|
46
|
-
protected readRecentWorkspacePathsFromUserHome(): Promise<RecentWorkspacePathsData | undefined>;
|
|
47
|
-
protected readJsonFromFile(fsPath: string): Promise<object | undefined>;
|
|
48
|
-
protected getUserStoragePath(): Promise<string>;
|
|
49
|
-
/**
|
|
50
|
-
* Removes untitled workspaces that are not among the most recently used workspaces.
|
|
51
|
-
* Use the `untitledWorkspaceStaleThreshold` to configure when to delete workspaces.
|
|
52
|
-
*/
|
|
53
|
-
protected removeOldUntitledWorkspaces(): Promise<void>;
|
|
54
|
-
}
|
|
55
|
-
export interface RecentWorkspacePathsData {
|
|
56
|
-
recentRoots: string[];
|
|
57
|
-
}
|
|
58
|
-
export declare namespace RecentWorkspacePathsData {
|
|
59
|
-
/**
|
|
60
|
-
* Parses `data` as `RecentWorkspacePathsData` but removes any non-string array entry.
|
|
61
|
-
*
|
|
62
|
-
* Returns undefined if the given `data` does not contain a `recentRoots` array property.
|
|
63
|
-
*/
|
|
64
|
-
function create(data: unknown): RecentWorkspacePathsData | undefined;
|
|
65
|
-
}
|
|
1
|
+
/// <reference types="yargs" />
|
|
2
|
+
import * as yargs from '@theia/core/shared/yargs';
|
|
3
|
+
import { BackendApplicationContribution } from '@theia/core/lib/node';
|
|
4
|
+
import { CliContribution } from '@theia/core/lib/node/cli';
|
|
5
|
+
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
6
|
+
import { WorkspaceServer, UntitledWorkspaceService } from '../common';
|
|
7
|
+
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
|
8
|
+
export declare class WorkspaceCliContribution implements CliContribution {
|
|
9
|
+
protected readonly envVariablesServer: EnvVariablesServer;
|
|
10
|
+
protected readonly untitledWorkspaceService: UntitledWorkspaceService;
|
|
11
|
+
workspaceRoot: Deferred<string | undefined>;
|
|
12
|
+
configure(conf: yargs.Argv): void;
|
|
13
|
+
setArguments(args: yargs.Arguments): Promise<void>;
|
|
14
|
+
protected normalizeWorkspaceArg(raw: string): string;
|
|
15
|
+
protected buildWorkspaceForMultipleArguments(workspaceArguments: string[]): Promise<string | undefined>;
|
|
16
|
+
}
|
|
17
|
+
export declare class DefaultWorkspaceServer implements WorkspaceServer, BackendApplicationContribution {
|
|
18
|
+
protected root: Deferred<string | undefined>;
|
|
19
|
+
/**
|
|
20
|
+
* Untitled workspaces that are not among the most recent N workspaces will be deleted on start. Increase this number to keep older files,
|
|
21
|
+
* lower it to delete stale untitled workspaces more aggressively.
|
|
22
|
+
*/
|
|
23
|
+
protected untitledWorkspaceStaleThreshold: number;
|
|
24
|
+
protected readonly cliParams: WorkspaceCliContribution;
|
|
25
|
+
protected readonly envServer: EnvVariablesServer;
|
|
26
|
+
protected readonly untitledWorkspaceService: UntitledWorkspaceService;
|
|
27
|
+
protected init(): void;
|
|
28
|
+
protected doInit(): Promise<void>;
|
|
29
|
+
onStart(): Promise<void>;
|
|
30
|
+
protected getRoot(): Promise<string | undefined>;
|
|
31
|
+
getMostRecentlyUsedWorkspace(): Promise<string | undefined>;
|
|
32
|
+
setMostRecentlyUsedWorkspace(rawUri: string): Promise<void>;
|
|
33
|
+
removeRecentWorkspace(rawUri: string): Promise<void>;
|
|
34
|
+
getRecentWorkspaces(): Promise<string[]>;
|
|
35
|
+
protected workspaceStillExist(workspaceRootUri: string): Promise<boolean>;
|
|
36
|
+
protected getWorkspaceURIFromCli(): Promise<string | undefined>;
|
|
37
|
+
/**
|
|
38
|
+
* Writes the given uri as the most recently used workspace root to the user's home directory.
|
|
39
|
+
* @param uri most recently used uri
|
|
40
|
+
*/
|
|
41
|
+
protected writeToUserHome(data: RecentWorkspacePathsData): Promise<void>;
|
|
42
|
+
protected writeToFile(fsPath: string, data: object): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Reads the most recently used workspace root from the user's home directory.
|
|
45
|
+
*/
|
|
46
|
+
protected readRecentWorkspacePathsFromUserHome(): Promise<RecentWorkspacePathsData | undefined>;
|
|
47
|
+
protected readJsonFromFile(fsPath: string): Promise<object | undefined>;
|
|
48
|
+
protected getUserStoragePath(): Promise<string>;
|
|
49
|
+
/**
|
|
50
|
+
* Removes untitled workspaces that are not among the most recently used workspaces.
|
|
51
|
+
* Use the `untitledWorkspaceStaleThreshold` to configure when to delete workspaces.
|
|
52
|
+
*/
|
|
53
|
+
protected removeOldUntitledWorkspaces(): Promise<void>;
|
|
54
|
+
}
|
|
55
|
+
export interface RecentWorkspacePathsData {
|
|
56
|
+
recentRoots: string[];
|
|
57
|
+
}
|
|
58
|
+
export declare namespace RecentWorkspacePathsData {
|
|
59
|
+
/**
|
|
60
|
+
* Parses `data` as `RecentWorkspacePathsData` but removes any non-string array entry.
|
|
61
|
+
*
|
|
62
|
+
* Returns undefined if the given `data` does not contain a `recentRoots` array property.
|
|
63
|
+
*/
|
|
64
|
+
function create(data: unknown): RecentWorkspacePathsData | undefined;
|
|
65
|
+
}
|
|
66
66
|
//# sourceMappingURL=default-workspace-server.d.ts.map
|