@theia/external-terminal 1.67.0-next.56 → 1.67.0-next.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common/external-terminal.d.ts +35 -0
- package/lib/common/external-terminal.d.ts.map +1 -0
- package/lib/common/external-terminal.js +21 -0
- package/lib/common/external-terminal.js.map +1 -0
- package/lib/electron-browser/external-terminal-contribution.d.ts +36 -0
- package/lib/electron-browser/external-terminal-contribution.d.ts.map +1 -0
- package/lib/electron-browser/external-terminal-contribution.js +121 -0
- package/lib/electron-browser/external-terminal-contribution.js.map +1 -0
- package/lib/electron-browser/external-terminal-frontend-module.d.ts +4 -0
- package/lib/electron-browser/external-terminal-frontend-module.d.ts.map +1 -0
- package/lib/electron-browser/external-terminal-frontend-module.js +30 -0
- package/lib/electron-browser/external-terminal-frontend-module.js.map +1 -0
- package/lib/electron-browser/external-terminal-preference.d.ts +27 -0
- package/lib/electron-browser/external-terminal-preference.d.ts.map +1 -0
- package/lib/electron-browser/external-terminal-preference.js +113 -0
- package/lib/electron-browser/external-terminal-preference.js.map +1 -0
- package/lib/electron-node/external-terminal-backend-module.d.ts +5 -0
- package/lib/electron-node/external-terminal-backend-module.d.ts.map +1 -0
- package/lib/electron-node/external-terminal-backend-module.js +36 -0
- package/lib/electron-node/external-terminal-backend-module.js.map +1 -0
- package/lib/electron-node/linux-external-terminal-service.d.ts +21 -0
- package/lib/electron-node/linux-external-terminal-service.d.ts.map +1 -0
- package/lib/electron-node/linux-external-terminal-service.js +98 -0
- package/lib/electron-node/linux-external-terminal-service.js.map +1 -0
- package/lib/electron-node/mac-external-terminal-service.d.ts +19 -0
- package/lib/electron-node/mac-external-terminal-service.d.ts.map +1 -0
- package/lib/electron-node/mac-external-terminal-service.js +70 -0
- package/lib/electron-node/mac-external-terminal-service.js.map +1 -0
- package/lib/electron-node/windows-external-terminal-service.d.ts +26 -0
- package/lib/electron-node/windows-external-terminal-service.d.ts.map +1 -0
- package/lib/electron-node/windows-external-terminal-service.js +103 -0
- package/lib/electron-node/windows-external-terminal-service.js.map +1 -0
- package/lib/package.spec.d.ts +1 -0
- package/lib/package.spec.d.ts.map +1 -0
- package/lib/package.spec.js +26 -0
- package/lib/package.spec.js.map +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare const ExternalTerminalService: unique symbol;
|
|
2
|
+
export declare const externalTerminalServicePath = "/services/external-terminal";
|
|
3
|
+
/**
|
|
4
|
+
* Represents the external terminal configuration options.
|
|
5
|
+
*/
|
|
6
|
+
export interface ExternalTerminalConfiguration {
|
|
7
|
+
/**
|
|
8
|
+
* The external terminal executable for Windows.
|
|
9
|
+
*/
|
|
10
|
+
'terminal.external.windowsExec': string;
|
|
11
|
+
/**
|
|
12
|
+
* The external terminal executable for OSX.
|
|
13
|
+
*/
|
|
14
|
+
'terminal.external.osxExec': string;
|
|
15
|
+
/**
|
|
16
|
+
* The external terminal executable for Linux.
|
|
17
|
+
*/
|
|
18
|
+
'terminal.external.linuxExec': string;
|
|
19
|
+
}
|
|
20
|
+
export interface ExternalTerminalService {
|
|
21
|
+
/**
|
|
22
|
+
* Open a native terminal in the designated working directory.
|
|
23
|
+
*
|
|
24
|
+
* @param configuration the configuration for opening external terminals.
|
|
25
|
+
* @param cwd the string URI of the current working directory where the terminal should open from.
|
|
26
|
+
*/
|
|
27
|
+
openTerminal(configuration: ExternalTerminalConfiguration, cwd: string): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Get the default executable.
|
|
30
|
+
*
|
|
31
|
+
* @returns the default terminal executable.
|
|
32
|
+
*/
|
|
33
|
+
getDefaultExec(): Promise<string>;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=external-terminal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-terminal.d.ts","sourceRoot":"","sources":["../../src/common/external-terminal.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,uBAAuB,eAAoC,CAAC;AACzE,eAAO,MAAM,2BAA2B,gCAAgC,CAAC;AAEzE;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC1C;;OAEG;IACH,+BAA+B,EAAE,MAAM,CAAC;IACxC;;OAEG;IACH,2BAA2B,EAAE,MAAM,CAAC;IACpC;;OAEG;IACH,6BAA6B,EAAE,MAAM,CAAC;CACzC;AAED,MAAM,WAAW,uBAAuB;IAEpC;;;;;OAKG;IACH,YAAY,CAAC,aAAa,EAAE,6BAA6B,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvF;;;;OAIG;IACH,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAErC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2021 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.externalTerminalServicePath = exports.ExternalTerminalService = void 0;
|
|
19
|
+
exports.ExternalTerminalService = Symbol('ExternalTerminalService');
|
|
20
|
+
exports.externalTerminalServicePath = '/services/external-terminal';
|
|
21
|
+
//# sourceMappingURL=external-terminal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-terminal.js","sourceRoot":"","sources":["../../src/common/external-terminal.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;;;AAEnE,QAAA,uBAAuB,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC;AAC5D,QAAA,2BAA2B,GAAG,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Command, CommandContribution, CommandRegistry } from '@theia/core/lib/common';
|
|
2
|
+
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
|
3
|
+
import { KeybindingContribution, KeybindingRegistry, LabelProvider } from '@theia/core/lib/browser';
|
|
4
|
+
import { EditorManager } from '@theia/editor/lib/browser/editor-manager';
|
|
5
|
+
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
6
|
+
import { ExternalTerminalService } from '../common/external-terminal';
|
|
7
|
+
import { ExternalTerminalPreferenceService } from './external-terminal-preference';
|
|
8
|
+
import { QuickPickService } from '@theia/core/lib/common/quick-pick-service';
|
|
9
|
+
export declare namespace ExternalTerminalCommands {
|
|
10
|
+
const OPEN_NATIVE_CONSOLE: Command;
|
|
11
|
+
}
|
|
12
|
+
export declare class ExternalTerminalFrontendContribution implements CommandContribution, KeybindingContribution {
|
|
13
|
+
protected readonly editorManager: EditorManager;
|
|
14
|
+
protected readonly envVariablesServer: EnvVariablesServer;
|
|
15
|
+
protected readonly labelProvider: LabelProvider;
|
|
16
|
+
protected readonly quickPickService: QuickPickService;
|
|
17
|
+
protected readonly externalTerminalService: ExternalTerminalService;
|
|
18
|
+
protected readonly externalTerminalPreferences: ExternalTerminalPreferenceService;
|
|
19
|
+
protected readonly workspaceService: WorkspaceService;
|
|
20
|
+
registerCommands(commands: CommandRegistry): void;
|
|
21
|
+
registerKeybindings(keybindings: KeybindingRegistry): void;
|
|
22
|
+
/**
|
|
23
|
+
* Open a native console on the host machine.
|
|
24
|
+
*
|
|
25
|
+
* - If multi-root workspace is open, displays a quick pick to let users choose which workspace to spawn the terminal.
|
|
26
|
+
* - If only one workspace is open, the terminal spawns at the root of the current workspace.
|
|
27
|
+
* - If no workspace is open and there is an active editor, the terminal spawns at the parent folder of that file.
|
|
28
|
+
* - If no workspace is open and there are no active editors, the terminal spawns at user home directory.
|
|
29
|
+
*/
|
|
30
|
+
protected openExternalTerminal(): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Display a quick pick for user to choose a target workspace in opened workspaces.
|
|
33
|
+
*/
|
|
34
|
+
protected selectCwd(): Promise<string | undefined>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=external-terminal-contribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-terminal-contribution.d.ts","sourceRoot":"","sources":["../../src/electron-browser/external-terminal-contribution.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACpG,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,iCAAiC,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAG7E,yBAAiB,wBAAwB,CAAC;IAC/B,MAAM,mBAAmB,SAG9B,CAAC;CACN;AAED,qBACa,oCAAqC,YAAW,mBAAmB,EAAE,sBAAsB;IAGpG,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAGhD,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAG1D,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAGhD,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAGtD,SAAS,CAAC,QAAQ,CAAC,uBAAuB,EAAE,uBAAuB,CAAC;IAGpE,SAAS,CAAC,QAAQ,CAAC,2BAA2B,EAAE,iCAAiC,CAAC;IAGlF,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAEtD,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IAMjD,mBAAmB,CAAC,WAAW,EAAE,kBAAkB,GAAG,IAAI;IAQ1D;;;;;;;OAOG;cACa,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC;IAqBrD;;OAEG;cACa,SAAS,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAW3D"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2021 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.ExternalTerminalFrontendContribution = exports.ExternalTerminalCommands = void 0;
|
|
19
|
+
const tslib_1 = require("tslib");
|
|
20
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
+
const common_1 = require("@theia/core/lib/common");
|
|
22
|
+
const env_variables_1 = require("@theia/core/lib/common/env-variables");
|
|
23
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
24
|
+
const editor_manager_1 = require("@theia/editor/lib/browser/editor-manager");
|
|
25
|
+
const browser_2 = require("@theia/workspace/lib/browser");
|
|
26
|
+
const external_terminal_1 = require("../common/external-terminal");
|
|
27
|
+
const external_terminal_preference_1 = require("./external-terminal-preference");
|
|
28
|
+
const quick_pick_service_1 = require("@theia/core/lib/common/quick-pick-service");
|
|
29
|
+
const nls_1 = require("@theia/core/lib/common/nls");
|
|
30
|
+
var ExternalTerminalCommands;
|
|
31
|
+
(function (ExternalTerminalCommands) {
|
|
32
|
+
ExternalTerminalCommands.OPEN_NATIVE_CONSOLE = common_1.Command.toDefaultLocalizedCommand({
|
|
33
|
+
id: 'workbench.action.terminal.openNativeConsole',
|
|
34
|
+
label: 'Open New External Terminal'
|
|
35
|
+
});
|
|
36
|
+
})(ExternalTerminalCommands || (exports.ExternalTerminalCommands = ExternalTerminalCommands = {}));
|
|
37
|
+
let ExternalTerminalFrontendContribution = class ExternalTerminalFrontendContribution {
|
|
38
|
+
registerCommands(commands) {
|
|
39
|
+
commands.registerCommand(ExternalTerminalCommands.OPEN_NATIVE_CONSOLE, {
|
|
40
|
+
execute: () => this.openExternalTerminal()
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
registerKeybindings(keybindings) {
|
|
44
|
+
keybindings.registerKeybinding({
|
|
45
|
+
command: ExternalTerminalCommands.OPEN_NATIVE_CONSOLE.id,
|
|
46
|
+
keybinding: 'ctrlcmd+shift+c',
|
|
47
|
+
when: '!terminalFocus'
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Open a native console on the host machine.
|
|
52
|
+
*
|
|
53
|
+
* - If multi-root workspace is open, displays a quick pick to let users choose which workspace to spawn the terminal.
|
|
54
|
+
* - If only one workspace is open, the terminal spawns at the root of the current workspace.
|
|
55
|
+
* - If no workspace is open and there is an active editor, the terminal spawns at the parent folder of that file.
|
|
56
|
+
* - If no workspace is open and there are no active editors, the terminal spawns at user home directory.
|
|
57
|
+
*/
|
|
58
|
+
async openExternalTerminal() {
|
|
59
|
+
var _a, _b;
|
|
60
|
+
const configuration = this.externalTerminalPreferences.getExternalTerminalConfiguration();
|
|
61
|
+
if (this.workspaceService.isMultiRootWorkspaceOpened) {
|
|
62
|
+
const chosenWorkspaceRoot = await this.selectCwd();
|
|
63
|
+
if (chosenWorkspaceRoot) {
|
|
64
|
+
await this.externalTerminalService.openTerminal(configuration, chosenWorkspaceRoot);
|
|
65
|
+
}
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (this.workspaceService.opened) {
|
|
69
|
+
const workspaceRootUri = this.workspaceService.tryGetRoots()[0].resource;
|
|
70
|
+
await this.externalTerminalService.openTerminal(configuration, workspaceRootUri.toString());
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const fallbackUri = (_b = (_a = this.editorManager.activeEditor) === null || _a === void 0 ? void 0 : _a.editor.uri.parent) !== null && _b !== void 0 ? _b : await this.envVariablesServer.getHomeDirUri();
|
|
74
|
+
await this.externalTerminalService.openTerminal(configuration, fallbackUri.toString());
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Display a quick pick for user to choose a target workspace in opened workspaces.
|
|
78
|
+
*/
|
|
79
|
+
async selectCwd() {
|
|
80
|
+
const roots = this.workspaceService.tryGetRoots();
|
|
81
|
+
const selectedItem = await this.quickPickService.show(roots.map(({ resource }) => ({
|
|
82
|
+
label: this.labelProvider.getName(resource),
|
|
83
|
+
description: this.labelProvider.getLongName(resource),
|
|
84
|
+
value: resource.toString()
|
|
85
|
+
})), { placeholder: nls_1.nls.localize('theia/external-terminal/cwd', 'Select current working directory for new external terminal') });
|
|
86
|
+
return selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.value;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
exports.ExternalTerminalFrontendContribution = ExternalTerminalFrontendContribution;
|
|
90
|
+
tslib_1.__decorate([
|
|
91
|
+
(0, inversify_1.inject)(editor_manager_1.EditorManager),
|
|
92
|
+
tslib_1.__metadata("design:type", editor_manager_1.EditorManager)
|
|
93
|
+
], ExternalTerminalFrontendContribution.prototype, "editorManager", void 0);
|
|
94
|
+
tslib_1.__decorate([
|
|
95
|
+
(0, inversify_1.inject)(env_variables_1.EnvVariablesServer),
|
|
96
|
+
tslib_1.__metadata("design:type", Object)
|
|
97
|
+
], ExternalTerminalFrontendContribution.prototype, "envVariablesServer", void 0);
|
|
98
|
+
tslib_1.__decorate([
|
|
99
|
+
(0, inversify_1.inject)(browser_1.LabelProvider),
|
|
100
|
+
tslib_1.__metadata("design:type", browser_1.LabelProvider)
|
|
101
|
+
], ExternalTerminalFrontendContribution.prototype, "labelProvider", void 0);
|
|
102
|
+
tslib_1.__decorate([
|
|
103
|
+
(0, inversify_1.inject)(quick_pick_service_1.QuickPickService),
|
|
104
|
+
tslib_1.__metadata("design:type", Object)
|
|
105
|
+
], ExternalTerminalFrontendContribution.prototype, "quickPickService", void 0);
|
|
106
|
+
tslib_1.__decorate([
|
|
107
|
+
(0, inversify_1.inject)(external_terminal_1.ExternalTerminalService),
|
|
108
|
+
tslib_1.__metadata("design:type", Object)
|
|
109
|
+
], ExternalTerminalFrontendContribution.prototype, "externalTerminalService", void 0);
|
|
110
|
+
tslib_1.__decorate([
|
|
111
|
+
(0, inversify_1.inject)(external_terminal_preference_1.ExternalTerminalPreferenceService),
|
|
112
|
+
tslib_1.__metadata("design:type", external_terminal_preference_1.ExternalTerminalPreferenceService)
|
|
113
|
+
], ExternalTerminalFrontendContribution.prototype, "externalTerminalPreferences", void 0);
|
|
114
|
+
tslib_1.__decorate([
|
|
115
|
+
(0, inversify_1.inject)(browser_2.WorkspaceService),
|
|
116
|
+
tslib_1.__metadata("design:type", browser_2.WorkspaceService)
|
|
117
|
+
], ExternalTerminalFrontendContribution.prototype, "workspaceService", void 0);
|
|
118
|
+
exports.ExternalTerminalFrontendContribution = ExternalTerminalFrontendContribution = tslib_1.__decorate([
|
|
119
|
+
(0, inversify_1.injectable)()
|
|
120
|
+
], ExternalTerminalFrontendContribution);
|
|
121
|
+
//# sourceMappingURL=external-terminal-contribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-terminal-contribution.js","sourceRoot":"","sources":["../../src/electron-browser/external-terminal-contribution.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;;;;AAEhF,4DAAkE;AAClE,mDAAuF;AACvF,wEAA0E;AAC1E,qDAAoG;AACpG,6EAAyE;AACzE,0DAAgE;AAChE,mEAAsE;AACtE,iFAAmF;AACnF,kFAA6E;AAC7E,oDAAiD;AAEjD,IAAiB,wBAAwB,CAKxC;AALD,WAAiB,wBAAwB;IACxB,4CAAmB,GAAG,gBAAO,CAAC,yBAAyB,CAAC;QACjE,EAAE,EAAE,6CAA6C;QACjD,KAAK,EAAE,4BAA4B;KACtC,CAAC,CAAC;AACP,CAAC,EALgB,wBAAwB,wCAAxB,wBAAwB,QAKxC;AAGM,IAAM,oCAAoC,GAA1C,MAAM,oCAAoC;IAuB7C,gBAAgB,CAAC,QAAyB;QACtC,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
|
|
1
|
+
{"version":3,"file":"external-terminal-frontend-module.d.ts","sourceRoot":"","sources":["../../src/electron-browser/external-terminal-frontend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAc,MAAM,8BAA8B,CAAC;;AAO3E,wBASG"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2021 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
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
19
|
+
const common_1 = require("@theia/core/lib/common");
|
|
20
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
21
|
+
const external_terminal_preference_1 = require("./external-terminal-preference");
|
|
22
|
+
const external_terminal_contribution_1 = require("./external-terminal-contribution");
|
|
23
|
+
const external_terminal_1 = require("../common/external-terminal");
|
|
24
|
+
exports.default = new inversify_1.ContainerModule((bind) => {
|
|
25
|
+
bind(external_terminal_contribution_1.ExternalTerminalFrontendContribution).toSelf().inSingletonScope();
|
|
26
|
+
(0, external_terminal_preference_1.bindExternalTerminalPreferences)(bind);
|
|
27
|
+
[common_1.CommandContribution, browser_1.KeybindingContribution].forEach(serviceIdentifier => bind(serviceIdentifier).toService(external_terminal_contribution_1.ExternalTerminalFrontendContribution));
|
|
28
|
+
bind(external_terminal_1.ExternalTerminalService).toDynamicValue(ctx => browser_1.WebSocketConnectionProvider.createProxy(ctx.container, external_terminal_1.externalTerminalServicePath)).inSingletonScope();
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=external-terminal-frontend-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-terminal-frontend-module.js","sourceRoot":"","sources":["../../src/electron-browser/external-terminal-frontend-module.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;;AAEhF,4DAA2E;AAC3E,mDAA6D;AAC7D,qDAA8F;AAC9F,iFAAiF;AACjF,qFAAwF;AACxF,mEAAmG;AAEnG,kBAAe,IAAI,2BAAe,CAAC,CAAC,IAAqB,EAAE,EAAE;IACzD,IAAI,CAAC,qEAAoC,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACvE,IAAA,8DAA+B,EAAC,IAAI,CAAC,CAAC;IACtC,CAAC,4BAAmB,EAAE,gCAAsB,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,CACtE,IAAI,CAAC,iBAAiB,CAAC,CAAC,SAAS,CAAC,qEAAoC,CAAC,CAC1E,CAAC;IACF,IAAI,CAAC,2CAAuB,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAC/C,qCAA2B,CAAC,WAAW,CAA0B,GAAG,CAAC,SAAS,EAAE,+CAA2B,CAAC,CAC/G,CAAC,gBAAgB,EAAE,CAAC;AACzB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { interfaces } from '@theia/core/shared/inversify';
|
|
2
|
+
import { ExternalTerminalService, ExternalTerminalConfiguration } from '../common/external-terminal';
|
|
3
|
+
import { PreferenceProxy, PreferenceSchema, PreferenceSchemaService } from '@theia/core';
|
|
4
|
+
export declare const ExternalTerminalPreferences: unique symbol;
|
|
5
|
+
export type ExternalTerminalPreferences = PreferenceProxy<ExternalTerminalConfiguration>;
|
|
6
|
+
export declare const ExternalTerminalSchemaProvider: unique symbol;
|
|
7
|
+
export type ExternalTerminalSchemaProvider = () => Promise<PreferenceSchema>;
|
|
8
|
+
export declare function bindExternalTerminalPreferences(bind: interfaces.Bind): void;
|
|
9
|
+
export declare class ExternalTerminalPreferenceService {
|
|
10
|
+
protected readonly preferences: ExternalTerminalPreferences;
|
|
11
|
+
protected readonly preferenceSchemaProvider: PreferenceSchemaService;
|
|
12
|
+
protected readonly promisedSchema: ExternalTerminalSchemaProvider;
|
|
13
|
+
protected init(): void;
|
|
14
|
+
protected doInit(): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Get the external terminal configurations from preferences.
|
|
17
|
+
*/
|
|
18
|
+
getExternalTerminalConfiguration(): ExternalTerminalConfiguration;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Use the backend {@link ExternalTerminalService} to establish the schema for the `ExternalTerminalPreferences`.
|
|
22
|
+
*
|
|
23
|
+
* @param externalTerminalService the external terminal backend service.
|
|
24
|
+
* @returns a preference schema with the OS default exec set by the backend service.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getExternalTerminalSchema(externalTerminalService: ExternalTerminalService): Promise<PreferenceSchema>;
|
|
27
|
+
//# sourceMappingURL=external-terminal-preference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-terminal-preference.d.ts","sourceRoot":"","sources":["../../src/electron-browser/external-terminal-preference.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAsB,UAAU,EAAiB,MAAM,8BAA8B,CAAC;AAE7F,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAErG,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAA0B,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAEjH,eAAO,MAAM,2BAA2B,eAAwC,CAAC;AACjF,MAAM,MAAM,2BAA2B,GAAG,eAAe,CAAC,6BAA6B,CAAC,CAAC;AAEzF,eAAO,MAAM,8BAA8B,eAA0C,CAAC;AACtF,MAAM,MAAM,8BAA8B,GAAG,MAAM,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAE7E,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,CAc3E;AAED,qBACa,iCAAiC;IAG1C,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,2BAA2B,CAAC;IAG5D,SAAS,CAAC,QAAQ,CAAC,wBAAwB,EAAE,uBAAuB,CAAC;IAGrE,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,8BAA8B,CAAC;IAGlE,SAAS,CAAC,IAAI,IAAI,IAAI;cAIN,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAIvC;;OAEG;IACH,gCAAgC,IAAI,6BAA6B;CAOpE;AAED;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAAC,uBAAuB,EAAE,uBAAuB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAsB3H"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2021 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.getExternalTerminalSchema = exports.ExternalTerminalPreferenceService = exports.bindExternalTerminalPreferences = exports.ExternalTerminalSchemaProvider = exports.ExternalTerminalPreferences = void 0;
|
|
19
|
+
const tslib_1 = require("tslib");
|
|
20
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
+
const os_1 = require("@theia/core/lib/common/os");
|
|
22
|
+
const external_terminal_1 = require("../common/external-terminal");
|
|
23
|
+
const nls_1 = require("@theia/core/lib/common/nls");
|
|
24
|
+
const core_1 = require("@theia/core");
|
|
25
|
+
exports.ExternalTerminalPreferences = Symbol('ExternalTerminalPreferences');
|
|
26
|
+
exports.ExternalTerminalSchemaProvider = Symbol('ExternalTerminalSchemaPromise');
|
|
27
|
+
function bindExternalTerminalPreferences(bind) {
|
|
28
|
+
bind(ExternalTerminalPreferenceService).toSelf().inSingletonScope();
|
|
29
|
+
bind(exports.ExternalTerminalSchemaProvider)
|
|
30
|
+
.toProvider(ctx => {
|
|
31
|
+
const schema = getExternalTerminalSchema(ctx.container.get(external_terminal_1.ExternalTerminalService));
|
|
32
|
+
return () => schema;
|
|
33
|
+
});
|
|
34
|
+
bind(exports.ExternalTerminalPreferences)
|
|
35
|
+
.toDynamicValue(ctx => {
|
|
36
|
+
const factory = ctx.container.get(core_1.PreferenceProxyFactory);
|
|
37
|
+
const schemaProvider = ctx.container.get(exports.ExternalTerminalSchemaProvider);
|
|
38
|
+
return factory(schemaProvider());
|
|
39
|
+
})
|
|
40
|
+
.inSingletonScope();
|
|
41
|
+
}
|
|
42
|
+
exports.bindExternalTerminalPreferences = bindExternalTerminalPreferences;
|
|
43
|
+
let ExternalTerminalPreferenceService = class ExternalTerminalPreferenceService {
|
|
44
|
+
init() {
|
|
45
|
+
this.doInit();
|
|
46
|
+
}
|
|
47
|
+
async doInit() {
|
|
48
|
+
this.preferenceSchemaProvider.addSchema(await this.promisedSchema());
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Get the external terminal configurations from preferences.
|
|
52
|
+
*/
|
|
53
|
+
getExternalTerminalConfiguration() {
|
|
54
|
+
return {
|
|
55
|
+
'terminal.external.linuxExec': this.preferences['terminal.external.linuxExec'],
|
|
56
|
+
'terminal.external.osxExec': this.preferences['terminal.external.osxExec'],
|
|
57
|
+
'terminal.external.windowsExec': this.preferences['terminal.external.windowsExec'],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
exports.ExternalTerminalPreferenceService = ExternalTerminalPreferenceService;
|
|
62
|
+
tslib_1.__decorate([
|
|
63
|
+
(0, inversify_1.inject)(exports.ExternalTerminalPreferences),
|
|
64
|
+
tslib_1.__metadata("design:type", Object)
|
|
65
|
+
], ExternalTerminalPreferenceService.prototype, "preferences", void 0);
|
|
66
|
+
tslib_1.__decorate([
|
|
67
|
+
(0, inversify_1.inject)(core_1.PreferenceSchemaService),
|
|
68
|
+
tslib_1.__metadata("design:type", Object)
|
|
69
|
+
], ExternalTerminalPreferenceService.prototype, "preferenceSchemaProvider", void 0);
|
|
70
|
+
tslib_1.__decorate([
|
|
71
|
+
(0, inversify_1.inject)(exports.ExternalTerminalSchemaProvider),
|
|
72
|
+
tslib_1.__metadata("design:type", Function)
|
|
73
|
+
], ExternalTerminalPreferenceService.prototype, "promisedSchema", void 0);
|
|
74
|
+
tslib_1.__decorate([
|
|
75
|
+
(0, inversify_1.postConstruct)(),
|
|
76
|
+
tslib_1.__metadata("design:type", Function),
|
|
77
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
78
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
79
|
+
], ExternalTerminalPreferenceService.prototype, "init", null);
|
|
80
|
+
exports.ExternalTerminalPreferenceService = ExternalTerminalPreferenceService = tslib_1.__decorate([
|
|
81
|
+
(0, inversify_1.injectable)()
|
|
82
|
+
], ExternalTerminalPreferenceService);
|
|
83
|
+
/**
|
|
84
|
+
* Use the backend {@link ExternalTerminalService} to establish the schema for the `ExternalTerminalPreferences`.
|
|
85
|
+
*
|
|
86
|
+
* @param externalTerminalService the external terminal backend service.
|
|
87
|
+
* @returns a preference schema with the OS default exec set by the backend service.
|
|
88
|
+
*/
|
|
89
|
+
async function getExternalTerminalSchema(externalTerminalService) {
|
|
90
|
+
const hostExec = await externalTerminalService.getDefaultExec();
|
|
91
|
+
return {
|
|
92
|
+
properties: {
|
|
93
|
+
'terminal.external.windowsExec': {
|
|
94
|
+
type: 'string',
|
|
95
|
+
typeDetails: { isFilepath: true },
|
|
96
|
+
description: nls_1.nls.localizeByDefault('Customizes which terminal to run on Windows.'),
|
|
97
|
+
default: `${os_1.isWindows ? hostExec : 'C:\\WINDOWS\\System32\\cmd.exe'}`
|
|
98
|
+
},
|
|
99
|
+
'terminal.external.osxExec': {
|
|
100
|
+
type: 'string',
|
|
101
|
+
description: nls_1.nls.localizeByDefault('Customizes which terminal application to run on macOS.'),
|
|
102
|
+
default: `${os_1.isOSX ? hostExec : 'Terminal.app'}`
|
|
103
|
+
},
|
|
104
|
+
'terminal.external.linuxExec': {
|
|
105
|
+
type: 'string',
|
|
106
|
+
description: nls_1.nls.localizeByDefault('Customizes which terminal to run on Linux.'),
|
|
107
|
+
default: `${!(os_1.isWindows || os_1.isOSX) ? hostExec : 'xterm'}`
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
exports.getExternalTerminalSchema = getExternalTerminalSchema;
|
|
113
|
+
//# sourceMappingURL=external-terminal-preference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-terminal-preference.js","sourceRoot":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C,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,EAAE;aAClD;YACD,6BAA6B,EAAE;gBAC3B,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,SAAG,CAAC,iBAAiB,CAAC,4CAA4C,CAAC;gBAChF,OAAO,EAAE,GAAG,CAAC,CAAC,cAAS,IAAI,UAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE;aAC3D;SACJ;KACJ,CAAC;AACN,CAAC;AAtBD,8DAsBC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ContainerModule, interfaces } from '@theia/core/shared/inversify';
|
|
2
|
+
export declare function bindExternalTerminalService(bind: interfaces.Bind): void;
|
|
3
|
+
declare const _default: ContainerModule;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=external-terminal-backend-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-terminal-backend-module.d.ts","sourceRoot":"","sources":["../../src/electron-node/external-terminal-backend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAQ3E,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,CAWvE;;AAED,wBAEG"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2021 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.bindExternalTerminalService = void 0;
|
|
19
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
20
|
+
const common_1 = require("@theia/core/lib/common");
|
|
21
|
+
const os_1 = require("@theia/core/lib/common/os");
|
|
22
|
+
const external_terminal_1 = require("../common/external-terminal");
|
|
23
|
+
const mac_external_terminal_service_1 = require("./mac-external-terminal-service");
|
|
24
|
+
const linux_external_terminal_service_1 = require("./linux-external-terminal-service");
|
|
25
|
+
const windows_external_terminal_service_1 = require("./windows-external-terminal-service");
|
|
26
|
+
function bindExternalTerminalService(bind) {
|
|
27
|
+
const serviceProvider = os_1.isWindows ? windows_external_terminal_service_1.WindowsExternalTerminalService : os_1.isOSX ? mac_external_terminal_service_1.MacExternalTerminalService : linux_external_terminal_service_1.LinuxExternalTerminalService;
|
|
28
|
+
bind(serviceProvider).toSelf().inSingletonScope();
|
|
29
|
+
bind(external_terminal_1.ExternalTerminalService).toService(serviceProvider);
|
|
30
|
+
bind(common_1.ConnectionHandler).toDynamicValue(ctx => new common_1.RpcConnectionHandler(external_terminal_1.externalTerminalServicePath, () => ctx.container.get(external_terminal_1.ExternalTerminalService))).inSingletonScope();
|
|
31
|
+
}
|
|
32
|
+
exports.bindExternalTerminalService = bindExternalTerminalService;
|
|
33
|
+
exports.default = new inversify_1.ContainerModule(bind => {
|
|
34
|
+
bindExternalTerminalService(bind);
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=external-terminal-backend-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-terminal-backend-module.js","sourceRoot":"","sources":["../../src/electron-node/external-terminal-backend-module.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;;;AAEhF,4DAA2E;AAC3E,mDAAiF;AACjF,kDAA6D;AAC7D,mEAAmG;AACnG,mFAA6E;AAC7E,uFAAiF;AACjF,2FAAqF;AAErF,SAAgB,2BAA2B,CAAC,IAAqB;IAC7D,MAAM,eAAe,GACjB,cAAS,CAAC,CAAC,CAAC,kEAA8B,CAAC,CAAC,CAAC,UAAK,CAAC,CAAC,CAAC,0DAA0B,CAAC,CAAC,CAAC,8DAA4B,CAAC;IACnH,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAClD,IAAI,CAAC,2CAAuB,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IAEzD,IAAI,CAAC,0BAAiB,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CACzC,IAAI,6BAAoB,CAAC,+CAA2B,EAAE,GAAG,EAAE,CACvD,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,2CAAuB,CAAC,CAC7C,CACJ,CAAC,gBAAgB,EAAE,CAAC;AACzB,CAAC;AAXD,kEAWC;AAED,kBAAe,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACtC,2BAA2B,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ExternalTerminalService, ExternalTerminalConfiguration } from '../common/external-terminal';
|
|
2
|
+
export declare class LinuxExternalTerminalService implements ExternalTerminalService {
|
|
3
|
+
protected DEFAULT_TERMINAL_LINUX_READY: Promise<string>;
|
|
4
|
+
openTerminal(configuration: ExternalTerminalConfiguration, cwd: string): Promise<void>;
|
|
5
|
+
getDefaultExec(): Promise<string>;
|
|
6
|
+
/**
|
|
7
|
+
* Spawn the external terminal for the given options.
|
|
8
|
+
* - The method spawns the terminal application based on the preferences, else uses the default value.
|
|
9
|
+
* @param configuration the preference configuration.
|
|
10
|
+
* @param cwd the optional current working directory to spawn from.
|
|
11
|
+
*/
|
|
12
|
+
protected spawnTerminal(configuration: ExternalTerminalConfiguration, cwd?: string): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Get the default terminal application on Linux.
|
|
15
|
+
* - The following method uses environment variables to identify the best default possible for each distro.
|
|
16
|
+
*
|
|
17
|
+
* @returns the default application on Linux.
|
|
18
|
+
*/
|
|
19
|
+
protected getDefaultTerminalLinux(): Promise<string>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=linux-external-terminal-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linux-external-terminal-service.d.ts","sourceRoot":"","sources":["../../src/electron-node/linux-external-terminal-service.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAQrG,qBACa,4BAA6B,YAAW,uBAAuB;IACxE,SAAS,CAAC,4BAA4B,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAElD,YAAY,CAAC,aAAa,EAAE,6BAA6B,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAItF,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC;IAIvC;;;;;OAKG;cACa,aAAa,CAAC,aAAa,EAAE,6BAA6B,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBxG;;;;;OAKG;cACa,uBAAuB,IAAI,OAAO,CAAC,MAAM,CAAC;CAyB7D"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2021 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.LinuxExternalTerminalService = void 0;
|
|
19
|
+
const tslib_1 = require("tslib");
|
|
20
|
+
const cp = require("child_process");
|
|
21
|
+
const fs = require("@theia/core/shared/fs-extra");
|
|
22
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
23
|
+
const os_1 = require("@theia/core/lib/common/os");
|
|
24
|
+
const file_uri_1 = require("@theia/core/lib/common/file-uri");
|
|
25
|
+
/*---------------------------------------------------------------------------------------------
|
|
26
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
27
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
28
|
+
*--------------------------------------------------------------------------------------------*/
|
|
29
|
+
// some code copied and modified from https://github.com/microsoft/vscode/blob/1.52.1/src/vs/workbench/contrib/externalTerminal/node/externalTerminalService.ts
|
|
30
|
+
let LinuxExternalTerminalService = class LinuxExternalTerminalService {
|
|
31
|
+
async openTerminal(configuration, cwd) {
|
|
32
|
+
await this.spawnTerminal(configuration, file_uri_1.FileUri.fsPath(cwd));
|
|
33
|
+
}
|
|
34
|
+
async getDefaultExec() {
|
|
35
|
+
return this.getDefaultTerminalLinux();
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Spawn the external terminal for the given options.
|
|
39
|
+
* - The method spawns the terminal application based on the preferences, else uses the default value.
|
|
40
|
+
* @param configuration the preference configuration.
|
|
41
|
+
* @param cwd the optional current working directory to spawn from.
|
|
42
|
+
*/
|
|
43
|
+
async spawnTerminal(configuration, cwd) {
|
|
44
|
+
// Use the executable value from the preferences if available, else fallback to the default.
|
|
45
|
+
const terminalConfig = configuration['terminal.external.linuxExec'];
|
|
46
|
+
const execPromise = terminalConfig ? Promise.resolve(terminalConfig) : this.getDefaultTerminalLinux();
|
|
47
|
+
return new Promise((resolve, reject) => {
|
|
48
|
+
execPromise.then(exec => {
|
|
49
|
+
const env = cwd ? { cwd } : undefined;
|
|
50
|
+
const child = cp.spawn(exec, [], env);
|
|
51
|
+
child.on('error', reject);
|
|
52
|
+
child.on('exit', resolve);
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Get the default terminal application on Linux.
|
|
58
|
+
* - The following method uses environment variables to identify the best default possible for each distro.
|
|
59
|
+
*
|
|
60
|
+
* @returns the default application on Linux.
|
|
61
|
+
*/
|
|
62
|
+
async getDefaultTerminalLinux() {
|
|
63
|
+
if (!this.DEFAULT_TERMINAL_LINUX_READY) {
|
|
64
|
+
this.DEFAULT_TERMINAL_LINUX_READY = new Promise(async (resolve) => {
|
|
65
|
+
if (os_1.OS.type() === os_1.OS.Type.Linux) {
|
|
66
|
+
const isDebian = await fs.pathExists('/etc/debian_version');
|
|
67
|
+
if (isDebian) {
|
|
68
|
+
resolve('x-terminal-emulator');
|
|
69
|
+
}
|
|
70
|
+
else if (process.env.DESKTOP_SESSION === 'gnome' || process.env.DESKTOP_SESSION === 'gnome-classic') {
|
|
71
|
+
resolve('gnome-terminal');
|
|
72
|
+
}
|
|
73
|
+
else if (process.env.DESKTOP_SESSION === 'kde-plasma') {
|
|
74
|
+
resolve('konsole');
|
|
75
|
+
}
|
|
76
|
+
else if (process.env.COLORTERM) {
|
|
77
|
+
resolve(process.env.COLORTERM);
|
|
78
|
+
}
|
|
79
|
+
else if (process.env.TERM) {
|
|
80
|
+
resolve(process.env.TERM);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
resolve('xterm');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
resolve('xterm');
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
return this.DEFAULT_TERMINAL_LINUX_READY;
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
exports.LinuxExternalTerminalService = LinuxExternalTerminalService;
|
|
95
|
+
exports.LinuxExternalTerminalService = LinuxExternalTerminalService = tslib_1.__decorate([
|
|
96
|
+
(0, inversify_1.injectable)()
|
|
97
|
+
], LinuxExternalTerminalService);
|
|
98
|
+
//# sourceMappingURL=linux-external-terminal-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linux-external-terminal-service.js","sourceRoot":"","sources":["../../src/electron-node/linux-external-terminal-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;;;;AAEhF,oCAAoC;AACpC,kDAAkD;AAClD,4DAA0D;AAC1D,kDAA+C;AAC/C,8DAA0D;AAG1D;;;gGAGgG;AAChG,+JAA+J;AAGxJ,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAGrC,KAAK,CAAC,YAAY,CAAC,aAA4C,EAAE,GAAW;QACxE,MAAM,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE,kBAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IACjE,CAAC;IAED,KAAK,CAA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C;oBACnC,CAAC;yBAAM,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,eAAe,EAAE,CAAC;wBACpG,OAAO,CAAC,gBAAgB,CAAC,CAAC;oBAC9B,CAAC;yBAAM,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,YAAY,EAAE,CAAC;wBACtD,OAAO,CAAC,SAAS,CAAC,CAAC;oBACvB,CAAC;yBAAM,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;wBAC/B,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;oBACnC,CAAC;yBAAM,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;wBAC1B,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;oBAC9B,CAAC;yBAAM,CAAC;wBACJ,OAAO,CAAC,OAAO,CAAC,CAAC;oBACrB,CAAC;gBACL,CAAC;qBAAM,CAAC;oBACJ,OAAO,CAAC,OAAO,CAAC,CAAC;gBACrB,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;QACD,OAAO,IAAI,CAAC,4BAA4B,CAAC;IAC7C,CAAC;CACJ,CAAA;AAhEY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,sBAAU,GAAE;GACA,4BAA4B,CAgExC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ExternalTerminalService, ExternalTerminalConfiguration } from '../common/external-terminal';
|
|
2
|
+
export declare class MacExternalTerminalService implements ExternalTerminalService {
|
|
3
|
+
protected osxOpener: string;
|
|
4
|
+
protected defaultTerminalApp: string;
|
|
5
|
+
openTerminal(configuration: ExternalTerminalConfiguration, cwd: string): Promise<void>;
|
|
6
|
+
getDefaultExec(): Promise<string>;
|
|
7
|
+
/**
|
|
8
|
+
* Spawn the external terminal for the given options.
|
|
9
|
+
* - The method spawns the terminal application based on the preferences, else uses the default value.
|
|
10
|
+
* @param configuration the preference configuration.
|
|
11
|
+
* @param cwd the optional current working directory to spawn from.
|
|
12
|
+
*/
|
|
13
|
+
protected spawnTerminal(configuration: ExternalTerminalConfiguration, cwd?: string): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* Get the default terminal app on OSX.
|
|
16
|
+
*/
|
|
17
|
+
protected getDefaultTerminalOSX(): string;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=mac-external-terminal-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mac-external-terminal-service.d.ts","sourceRoot":"","sources":["../../src/electron-node/mac-external-terminal-service.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAQrG,qBACa,0BAA2B,YAAW,uBAAuB;IACtE,SAAS,CAAC,SAAS,SAAmB;IACtC,SAAS,CAAC,kBAAkB,SAAkB;IAExC,YAAY,CAAC,aAAa,EAAE,6BAA6B,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAItF,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC;IAIvC;;;;;OAKG;cACa,aAAa,CAAC,aAAa,EAAE,6BAA6B,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBxG;;OAEG;IACH,SAAS,CAAC,qBAAqB,IAAI,MAAM;CAG5C"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2021 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.MacExternalTerminalService = void 0;
|
|
19
|
+
const tslib_1 = require("tslib");
|
|
20
|
+
const cp = require("child_process");
|
|
21
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
22
|
+
const file_uri_1 = require("@theia/core/lib/common/file-uri");
|
|
23
|
+
/*---------------------------------------------------------------------------------------------
|
|
24
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
25
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
26
|
+
*--------------------------------------------------------------------------------------------*/
|
|
27
|
+
// some code copied and modified from https://github.com/microsoft/vscode/blob/1.52.1/src/vs/workbench/contrib/externalTerminal/node/externalTerminalService.ts
|
|
28
|
+
let MacExternalTerminalService = class MacExternalTerminalService {
|
|
29
|
+
constructor() {
|
|
30
|
+
this.osxOpener = '/usr/bin/open';
|
|
31
|
+
this.defaultTerminalApp = 'Terminal.app';
|
|
32
|
+
}
|
|
33
|
+
async openTerminal(configuration, cwd) {
|
|
34
|
+
await this.spawnTerminal(configuration, file_uri_1.FileUri.fsPath(cwd));
|
|
35
|
+
}
|
|
36
|
+
async getDefaultExec() {
|
|
37
|
+
return this.getDefaultTerminalOSX();
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Spawn the external terminal for the given options.
|
|
41
|
+
* - The method spawns the terminal application based on the preferences, else uses the default value.
|
|
42
|
+
* @param configuration the preference configuration.
|
|
43
|
+
* @param cwd the optional current working directory to spawn from.
|
|
44
|
+
*/
|
|
45
|
+
async spawnTerminal(configuration, cwd) {
|
|
46
|
+
// Use the executable value from the preferences if available, else fallback to the default.
|
|
47
|
+
const terminalConfig = configuration['terminal.external.osxExec'];
|
|
48
|
+
const terminalApp = terminalConfig || this.getDefaultTerminalOSX();
|
|
49
|
+
return new Promise((resolve, reject) => {
|
|
50
|
+
const args = ['-a', terminalApp];
|
|
51
|
+
if (cwd) {
|
|
52
|
+
args.push(cwd);
|
|
53
|
+
}
|
|
54
|
+
const child = cp.spawn(this.osxOpener, args);
|
|
55
|
+
child.on('error', reject);
|
|
56
|
+
child.on('exit', () => resolve());
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Get the default terminal app on OSX.
|
|
61
|
+
*/
|
|
62
|
+
getDefaultTerminalOSX() {
|
|
63
|
+
return this.defaultTerminalApp;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
exports.MacExternalTerminalService = MacExternalTerminalService;
|
|
67
|
+
exports.MacExternalTerminalService = MacExternalTerminalService = tslib_1.__decorate([
|
|
68
|
+
(0, inversify_1.injectable)()
|
|
69
|
+
], MacExternalTerminalService);
|
|
70
|
+
//# sourceMappingURL=mac-external-terminal-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mac-external-terminal-service.js","sourceRoot":"","sources":["../../src/electron-node/mac-external-terminal-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;;;;AAEhF,oCAAoC;AACpC,4DAA0D;AAC1D,8DAA0D;AAG1D;;;gGAGgG;AAChG,+JAA+J;AAGxJ,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IAAhC;QACO,cAAS,GAAG,eAAe,CAAC;Q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
|
|
2
|
+
export declare class WindowsExternalTerminalService implements ExternalTerminalService {
|
|
3
|
+
protected readonly CMD = "cmd.exe";
|
|
4
|
+
protected DEFAULT_TERMINAL_WINDOWS: string;
|
|
5
|
+
openTerminal(configuration: ExternalTerminalConfiguration, cwd: string): Promise<void>;
|
|
6
|
+
getDefaultExec(): Promise<string>;
|
|
7
|
+
/**
|
|
8
|
+
* Spawn the external terminal for the given options.
|
|
9
|
+
* - The method spawns the terminal application based on the preferences, else uses the default value.
|
|
10
|
+
* @param configuration the preference configuration.
|
|
11
|
+
* @param cwd the optional current working directory to spawn from.
|
|
12
|
+
*/
|
|
13
|
+
protected spawnTerminal(configuration: ExternalTerminalConfiguration, cwd?: string): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* Get the default terminal application on Windows.
|
|
16
|
+
* - The following method uses environment variables to identify the best default possible value.
|
|
17
|
+
*
|
|
18
|
+
* @returns the default application on Windows.
|
|
19
|
+
*/
|
|
20
|
+
protected getDefaultTerminalWindows(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Find the Windows Shell process to start up (defaults to cmd.exe).
|
|
23
|
+
*/
|
|
24
|
+
protected getWindowsShell(): string;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=windows-external-terminal-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"windows-external-terminal-service.d.ts","sourceRoot":"","sources":["../../src/electron-node/windows-external-terminal-service.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAQrG,qBACa,8BAA+B,YAAW,uBAAuB;IAC1E,SAAS,CAAC,QAAQ,CAAC,GAAG,aAAa;IACnC,SAAS,CAAC,wBAAwB,EAAE,MAAM,CAAC;IAErC,YAAY,CAAC,aAAa,EAAE,6BAA6B,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAItF,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC;IAIvC;;;;;OAKG;cACa,aAAa,CAAC,aAAa,EAAE,6BAA6B,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAyCxG;;;;;OAKG;IACH,SAAS,CAAC,yBAAyB,IAAI,MAAM;IAQ7C;;OAEG;IACH,SAAS,CAAC,eAAe,IAAI,MAAM;CAItC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2021 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.WindowsExternalTerminalService = void 0;
|
|
19
|
+
const tslib_1 = require("tslib");
|
|
20
|
+
const cp = require("child_process");
|
|
21
|
+
const path = require("path");
|
|
22
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
23
|
+
const file_uri_1 = require("@theia/core/lib/common/file-uri");
|
|
24
|
+
/*---------------------------------------------------------------------------------------------
|
|
25
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
26
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
27
|
+
*--------------------------------------------------------------------------------------------*/
|
|
28
|
+
// some code copied and modified from https://github.com/microsoft/vscode/blob/1.52.1/src/vs/workbench/contrib/externalTerminal/node/externalTerminalService.ts
|
|
29
|
+
let WindowsExternalTerminalService = class WindowsExternalTerminalService {
|
|
30
|
+
constructor() {
|
|
31
|
+
this.CMD = 'cmd.exe';
|
|
32
|
+
}
|
|
33
|
+
async openTerminal(configuration, cwd) {
|
|
34
|
+
await this.spawnTerminal(configuration, file_uri_1.FileUri.fsPath(cwd));
|
|
35
|
+
}
|
|
36
|
+
async getDefaultExec() {
|
|
37
|
+
return this.getDefaultTerminalWindows();
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Spawn the external terminal for the given options.
|
|
41
|
+
* - The method spawns the terminal application based on the preferences, else uses the default value.
|
|
42
|
+
* @param configuration the preference configuration.
|
|
43
|
+
* @param cwd the optional current working directory to spawn from.
|
|
44
|
+
*/
|
|
45
|
+
async spawnTerminal(configuration, cwd) {
|
|
46
|
+
// Use the executable value from the preferences if available, else fallback to the default.
|
|
47
|
+
const terminalConfig = configuration['terminal.external.windowsExec'];
|
|
48
|
+
const exec = terminalConfig || this.getDefaultTerminalWindows();
|
|
49
|
+
// Make the drive letter uppercase on Windows (https://github.com/microsoft/vscode/issues/9448).
|
|
50
|
+
if (cwd && cwd[1] === ':') {
|
|
51
|
+
cwd = cwd[0].toUpperCase() + cwd.substring(1);
|
|
52
|
+
}
|
|
53
|
+
// cmder ignores the environment cwd and instead opts to always open in %USERPROFILE%
|
|
54
|
+
// unless otherwise specified.
|
|
55
|
+
const basename = path.basename(exec).toLowerCase();
|
|
56
|
+
if (basename === 'cmder' || basename === 'cmder.exe') {
|
|
57
|
+
cp.spawn(exec, cwd ? [cwd] : undefined);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const cmdArgs = ['/c', 'start', '/wait'];
|
|
61
|
+
// The "" argument is the window title. Without this, exec doesn't work when the path contains spaces.
|
|
62
|
+
if (exec.indexOf(' ') >= 0) {
|
|
63
|
+
cmdArgs.push('""');
|
|
64
|
+
}
|
|
65
|
+
cmdArgs.push(exec);
|
|
66
|
+
// Add starting directory parameter for Windows Terminal app.
|
|
67
|
+
if (basename === 'wt' || basename === 'wt.exe') {
|
|
68
|
+
cmdArgs.push('-d .');
|
|
69
|
+
}
|
|
70
|
+
return new Promise(async (resolve, reject) => {
|
|
71
|
+
const env = cwd ? { cwd } : undefined;
|
|
72
|
+
const command = this.getWindowsShell();
|
|
73
|
+
const child = cp.spawn(command, cmdArgs, env);
|
|
74
|
+
child.on('error', reject);
|
|
75
|
+
child.on('exit', resolve);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Get the default terminal application on Windows.
|
|
80
|
+
* - The following method uses environment variables to identify the best default possible value.
|
|
81
|
+
*
|
|
82
|
+
* @returns the default application on Windows.
|
|
83
|
+
*/
|
|
84
|
+
getDefaultTerminalWindows() {
|
|
85
|
+
if (!this.DEFAULT_TERMINAL_WINDOWS) {
|
|
86
|
+
const isWoW64 = !!process.env.hasOwnProperty('PROCESSOR_ARCHITEW6432');
|
|
87
|
+
this.DEFAULT_TERMINAL_WINDOWS = `${process.env.windir ? process.env.windir : 'C:\\Windows'}\\${isWoW64 ? 'Sysnative' : 'System32'}\\cmd.exe`;
|
|
88
|
+
}
|
|
89
|
+
return this.DEFAULT_TERMINAL_WINDOWS;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Find the Windows Shell process to start up (defaults to cmd.exe).
|
|
93
|
+
*/
|
|
94
|
+
getWindowsShell() {
|
|
95
|
+
// Find the path to cmd.exe if possible (%compsec% environment variable).
|
|
96
|
+
return process.env.compsec || this.CMD;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
exports.WindowsExternalTerminalService = WindowsExternalTerminalService;
|
|
100
|
+
exports.WindowsExternalTerminalService = WindowsExternalTerminalService = tslib_1.__decorate([
|
|
101
|
+
(0, inversify_1.injectable)()
|
|
102
|
+
], WindowsExternalTerminalService);
|
|
103
|
+
//# sourceMappingURL=windows-external-terminal-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"windows-external-terminal-service.js","sourceRoot":"","sources":["../../src/electron-node/windows-external-terminal-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;;;;AAEhF,oCAAoC;AACpC,6BAA6B;AAC7B,4DAA0D;AAC1D,8DAA0D;AAG1D;;;gGAGgG;AAChG,+JAA+J;AAGxJ,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAApC;QACgB,QAAG,GAAG,SAAS,CAAC;IA+EvC,CAAC;IA5EG,KAAK,CAAC,YAAY,CAAC,aAA4C,EAAE,GAAW;QACxE,MAAM,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE,kBAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IACjE,CAAC;IAED,KAAK,CAAC,cAAc;QAChB,OAAO,IAAI,CAAC,yBAAyB,EAAE,CAAC;IAC5C,CAAC;IAED;;;;;OAKG;IACO,KAAK,CAAC,aAAa,CAAC,aAA4C,EAAE,GAAY;QAEpF,4FAA4F;QAC5F,MAAM,cAAc,GAAG,aAAa,CAAC,+BAA+B,CAAC,CAAC;QACtE,MAAM,IAAI,GAAG,cAAc,IAAI,IAAI,CAAC,yBAAyB,EAAE,CAAC;QAEhE,gGAAgG;QAChG,IAAI,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;YACxB,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAClD,CAAC;QAED,qFAAqF;QACrF,8BAA8B;QAC9B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CAAC,wBAAwB,EAAE,CAAC;YACjC,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,wBAAwB,CAAC,CAAC;YACvE,IAAI,CAAC,wBAAwB,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,aAAa,KAAK,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,WAAW,CAAC;QACjJ,CAAC;QACD,OAAO,IAAI,CAAC,wBAAwB,CAAC;IACzC,CAAC;IAED;;OAEG;IACO,eAAe;QACrB,yEAAyE;QACzE,OAAO,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,IAAI,CAAC,GAAG,CAAC;IAC3C,CAAC;CACJ,CAAA;AAhFY,wEAA8B;yCAA9B,8BAA8B;IAD1C,IAAA,sBAAU,GAAE;GACA,8BAA8B,CAgF1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=package.spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.spec.d.ts","sourceRoot":"","sources":["../src/package.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2021 Ericsson and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
/* note: this bogus test file is required so that
|
|
17
|
+
we are able to run mocha unit tests on this
|
|
18
|
+
package, without having any actual unit tests in it.
|
|
19
|
+
This way a coverage report will be generated,
|
|
20
|
+
showing 0% coverage, instead of no report.
|
|
21
|
+
This file can be removed once we have real unit
|
|
22
|
+
tests in place. */
|
|
23
|
+
describe('external-terminal package', () => {
|
|
24
|
+
it('support code coverage statistics', () => true);
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=package.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.spec.js","sourceRoot":"","sources":["../src/package.spec.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;AAEhF;;;;;;oBAMoB;AAEpB,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IAEzC,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;AAErD,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/external-terminal",
|
|
3
|
-
"version": "1.67.0-next.
|
|
3
|
+
"version": "1.67.0-next.59+3f14297ea",
|
|
4
4
|
"description": "Theia - External Terminal Extension",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/core": "1.67.0-next.
|
|
7
|
-
"@theia/editor": "1.67.0-next.
|
|
8
|
-
"@theia/workspace": "1.67.0-next.
|
|
6
|
+
"@theia/core": "1.67.0-next.59+3f14297ea",
|
|
7
|
+
"@theia/editor": "1.67.0-next.59+3f14297ea",
|
|
8
|
+
"@theia/workspace": "1.67.0-next.59+3f14297ea",
|
|
9
9
|
"tslib": "^2.6.2"
|
|
10
10
|
},
|
|
11
11
|
"publishConfig": {
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"nyc": {
|
|
48
48
|
"extends": "../../configs/nyc.json"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "3f14297ea2edcdb1fffd74afee0613e70b43e125"
|
|
51
51
|
}
|