@theia/process 1.48.0 → 1.48.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +30 -30
  2. package/lib/common/process-common-module.d.ts +3 -3
  3. package/lib/common/process-common-module.js +22 -22
  4. package/lib/common/process-manager-types.d.ts +35 -35
  5. package/lib/common/process-manager-types.js +23 -23
  6. package/lib/common/shell-command-builder.d.ts +49 -49
  7. package/lib/common/shell-command-builder.js +169 -169
  8. package/lib/common/shell-command-builder.slow-spec.d.ts +9 -9
  9. package/lib/common/shell-command-builder.slow-spec.js +404 -404
  10. package/lib/common/shell-quoting.d.ts +91 -91
  11. package/lib/common/shell-quoting.js +145 -145
  12. package/lib/common/shell-quoting.spec.d.ts +1 -1
  13. package/lib/common/shell-quoting.spec.js +170 -170
  14. package/lib/node/dev-null-stream.d.ts +17 -17
  15. package/lib/node/dev-null-stream.js +41 -41
  16. package/lib/node/index.d.ts +6 -6
  17. package/lib/node/index.js +24 -24
  18. package/lib/node/multi-ring-buffer.d.ts +68 -68
  19. package/lib/node/multi-ring-buffer.js +299 -299
  20. package/lib/node/multi-ring-buffer.spec.d.ts +1 -1
  21. package/lib/node/multi-ring-buffer.spec.js +422 -422
  22. package/lib/node/process-backend-module.d.ts +3 -3
  23. package/lib/node/process-backend-module.js +56 -56
  24. package/lib/node/process-manager.d.ts +33 -33
  25. package/lib/node/process-manager.js +102 -102
  26. package/lib/node/process.d.ts +95 -95
  27. package/lib/node/process.js +142 -142
  28. package/lib/node/pseudo-pty.d.ts +22 -22
  29. package/lib/node/pseudo-pty.js +38 -38
  30. package/lib/node/raw-process.d.ts +45 -45
  31. package/lib/node/raw-process.js +104 -104
  32. package/lib/node/raw-process.spec.d.ts +1 -1
  33. package/lib/node/raw-process.spec.js +164 -164
  34. package/lib/node/task-terminal-process.d.ts +10 -10
  35. package/lib/node/task-terminal-process.js +42 -42
  36. package/lib/node/terminal-process.d.ts +60 -60
  37. package/lib/node/terminal-process.js +248 -248
  38. package/lib/node/terminal-process.spec.d.ts +1 -1
  39. package/lib/node/terminal-process.spec.js +103 -103
  40. package/lib/node/test/process-test-container.d.ts +2 -2
  41. package/lib/node/test/process-test-container.js +28 -28
  42. package/lib/node/utils.d.ts +16 -16
  43. package/lib/node/utils.js +77 -77
  44. package/package.json +4 -4
  45. package/src/common/process-common-module.ts +22 -22
  46. package/src/common/process-manager-types.ts +58 -58
  47. package/src/common/shell-command-builder.slow-spec.ts +486 -486
  48. package/src/common/shell-command-builder.ts +187 -187
  49. package/src/common/shell-quoting.spec.ts +176 -176
  50. package/src/common/shell-quoting.ts +236 -236
  51. package/src/common/tests/$weird(),file=name.js +1 -1
  52. package/src/common/tests/white space.js +1 -1
  53. package/src/node/dev-null-stream.ts +47 -47
  54. package/src/node/index.ts +22 -22
  55. package/src/node/multi-ring-buffer.spec.ts +486 -486
  56. package/src/node/multi-ring-buffer.ts +348 -348
  57. package/src/node/process-backend-module.ts +67 -67
  58. package/src/node/process-manager.ts +107 -107
  59. package/src/node/process.ts +207 -207
  60. package/src/node/pseudo-pty.ts +54 -54
  61. package/src/node/raw-process.spec.ts +199 -199
  62. package/src/node/raw-process.ts +156 -156
  63. package/src/node/string-argv.d.ts +21 -21
  64. package/src/node/task-terminal-process.ts +41 -41
  65. package/src/node/terminal-process.spec.ts +121 -121
  66. package/src/node/terminal-process.ts +290 -290
  67. package/src/node/test/process-fork-test.js +22 -22
  68. package/src/node/test/process-test-container.ts +27 -27
  69. package/src/node/utils.ts +79 -79
@@ -1,104 +1,104 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- // *****************************************************************************
4
- // Copyright (C) 2017 Ericsson and others.
5
- //
6
- // This program and the accompanying materials are made available under the
7
- // terms of the Eclipse Public License v. 2.0 which is available at
8
- // http://www.eclipse.org/legal/epl-2.0.
9
- //
10
- // This Source Code may also be made available under the following Secondary
11
- // Licenses when the conditions for such availability set forth in the Eclipse
12
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
13
- // with the GNU Classpath Exception which is available at
14
- // https://www.gnu.org/software/classpath/license.html.
15
- //
16
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
17
- // *****************************************************************************
18
- const chai = require("chai");
19
- const process = require("process");
20
- const stream = require("stream");
21
- const process_test_container_1 = require("./test/process-test-container");
22
- const terminal_process_1 = require("./terminal-process");
23
- const os_1 = require("@theia/core/lib/common/os");
24
- /**
25
- * Globals
26
- */
27
- const expect = chai.expect;
28
- let terminalProcessFactory;
29
- beforeEach(() => {
30
- terminalProcessFactory = (0, process_test_container_1.createProcessTestContainer)().get(terminal_process_1.TerminalProcessFactory);
31
- });
32
- describe('TerminalProcess', function () {
33
- this.timeout(20000);
34
- it('test error on non existent path', async function () {
35
- const error = await new Promise((resolve, reject) => {
36
- const proc = terminalProcessFactory({ command: '/non-existent' });
37
- proc.onStart(reject);
38
- proc.onError(resolve);
39
- proc.onExit(reject);
40
- });
41
- expect(error.code).eq('ENOENT');
42
- });
43
- it('test implicit .exe (Windows only)', async function () {
44
- const match = /^(.+)\.exe$/.exec(process.execPath);
45
- if (!os_1.isWindows || !match) {
46
- this.skip();
47
- }
48
- const command = match[1];
49
- const args = ['--version'];
50
- const terminal = await new Promise((resolve, reject) => {
51
- const proc = terminalProcessFactory({ command, args });
52
- proc.onExit(resolve);
53
- proc.onError(reject);
54
- });
55
- expect(terminal.code).to.exist;
56
- });
57
- it('test error on trying to execute a directory', async function () {
58
- const error = await new Promise((resolve, reject) => {
59
- const proc = terminalProcessFactory({ command: __dirname });
60
- proc.onStart(reject);
61
- proc.onError(resolve);
62
- proc.onExit(reject);
63
- });
64
- if (os_1.isWindows) {
65
- // On Windows, node-pty returns us a "File not found" message, so we can't really differentiate this case
66
- // from trying to execute a non-existent file. node's child_process.spawn also returns ENOENT, so it's
67
- // probably the best we can get.
68
- expect(error.code).eq('ENOENT');
69
- }
70
- else {
71
- expect(error.code).eq('EACCES');
72
- }
73
- });
74
- it('test exit', async function () {
75
- const args = ['--version'];
76
- const exit = await new Promise((resolve, reject) => {
77
- const proc = terminalProcessFactory({ command: process.execPath, args });
78
- proc.onExit(resolve);
79
- proc.onError(reject);
80
- });
81
- expect(exit.code).eq(0);
82
- });
83
- it('test pipe stream', async function () {
84
- const v = await new Promise((resolve, reject) => {
85
- const args = ['--version'];
86
- const terminalProcess = terminalProcessFactory({ command: process.execPath, args });
87
- terminalProcess.onError(reject);
88
- const outStream = new stream.PassThrough();
89
- terminalProcess.createOutputStream().pipe(outStream);
90
- let version = '';
91
- outStream.on('data', data => {
92
- version += data.toString();
93
- });
94
- /* node-pty is not sending 'end' on the stream as it quits
95
- only 'exit' is sent on the terminal process. */
96
- terminalProcess.onExit(() => {
97
- resolve(version.trim());
98
- });
99
- });
100
- /* Avoid using equal since terminal characters can be inserted at the end. */
101
- expect(v).to.have.string(process.version);
102
- });
103
- });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // *****************************************************************************
4
+ // Copyright (C) 2017 Ericsson and others.
5
+ //
6
+ // This program and the accompanying materials are made available under the
7
+ // terms of the Eclipse Public License v. 2.0 which is available at
8
+ // http://www.eclipse.org/legal/epl-2.0.
9
+ //
10
+ // This Source Code may also be made available under the following Secondary
11
+ // Licenses when the conditions for such availability set forth in the Eclipse
12
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
13
+ // with the GNU Classpath Exception which is available at
14
+ // https://www.gnu.org/software/classpath/license.html.
15
+ //
16
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
17
+ // *****************************************************************************
18
+ const chai = require("chai");
19
+ const process = require("process");
20
+ const stream = require("stream");
21
+ const process_test_container_1 = require("./test/process-test-container");
22
+ const terminal_process_1 = require("./terminal-process");
23
+ const os_1 = require("@theia/core/lib/common/os");
24
+ /**
25
+ * Globals
26
+ */
27
+ const expect = chai.expect;
28
+ let terminalProcessFactory;
29
+ beforeEach(() => {
30
+ terminalProcessFactory = (0, process_test_container_1.createProcessTestContainer)().get(terminal_process_1.TerminalProcessFactory);
31
+ });
32
+ describe('TerminalProcess', function () {
33
+ this.timeout(20000);
34
+ it('test error on non existent path', async function () {
35
+ const error = await new Promise((resolve, reject) => {
36
+ const proc = terminalProcessFactory({ command: '/non-existent' });
37
+ proc.onStart(reject);
38
+ proc.onError(resolve);
39
+ proc.onExit(reject);
40
+ });
41
+ expect(error.code).eq('ENOENT');
42
+ });
43
+ it('test implicit .exe (Windows only)', async function () {
44
+ const match = /^(.+)\.exe$/.exec(process.execPath);
45
+ if (!os_1.isWindows || !match) {
46
+ this.skip();
47
+ }
48
+ const command = match[1];
49
+ const args = ['--version'];
50
+ const terminal = await new Promise((resolve, reject) => {
51
+ const proc = terminalProcessFactory({ command, args });
52
+ proc.onExit(resolve);
53
+ proc.onError(reject);
54
+ });
55
+ expect(terminal.code).to.exist;
56
+ });
57
+ it('test error on trying to execute a directory', async function () {
58
+ const error = await new Promise((resolve, reject) => {
59
+ const proc = terminalProcessFactory({ command: __dirname });
60
+ proc.onStart(reject);
61
+ proc.onError(resolve);
62
+ proc.onExit(reject);
63
+ });
64
+ if (os_1.isWindows) {
65
+ // On Windows, node-pty returns us a "File not found" message, so we can't really differentiate this case
66
+ // from trying to execute a non-existent file. node's child_process.spawn also returns ENOENT, so it's
67
+ // probably the best we can get.
68
+ expect(error.code).eq('ENOENT');
69
+ }
70
+ else {
71
+ expect(error.code).eq('EACCES');
72
+ }
73
+ });
74
+ it('test exit', async function () {
75
+ const args = ['--version'];
76
+ const exit = await new Promise((resolve, reject) => {
77
+ const proc = terminalProcessFactory({ command: process.execPath, args });
78
+ proc.onExit(resolve);
79
+ proc.onError(reject);
80
+ });
81
+ expect(exit.code).eq(0);
82
+ });
83
+ it('test pipe stream', async function () {
84
+ const v = await new Promise((resolve, reject) => {
85
+ const args = ['--version'];
86
+ const terminalProcess = terminalProcessFactory({ command: process.execPath, args });
87
+ terminalProcess.onError(reject);
88
+ const outStream = new stream.PassThrough();
89
+ terminalProcess.createOutputStream().pipe(outStream);
90
+ let version = '';
91
+ outStream.on('data', data => {
92
+ version += data.toString();
93
+ });
94
+ /* node-pty is not sending 'end' on the stream as it quits
95
+ only 'exit' is sent on the terminal process. */
96
+ terminalProcess.onExit(() => {
97
+ resolve(version.trim());
98
+ });
99
+ });
100
+ /* Avoid using equal since terminal characters can be inserted at the end. */
101
+ expect(v).to.have.string(process.version);
102
+ });
103
+ });
104
104
  //# sourceMappingURL=terminal-process.spec.js.map
@@ -1,3 +1,3 @@
1
- import { Container } from '@theia/core/shared/inversify';
2
- export declare function createProcessTestContainer(): Container;
1
+ import { Container } from '@theia/core/shared/inversify';
2
+ export declare function createProcessTestContainer(): Container;
3
3
  //# sourceMappingURL=process-test-container.d.ts.map
@@ -1,29 +1,29 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createProcessTestContainer = void 0;
4
- // *****************************************************************************
5
- // Copyright (C) 2017 Ericsson and others.
6
- //
7
- // This program and the accompanying materials are made available under the
8
- // terms of the Eclipse Public License v. 2.0 which is available at
9
- // http://www.eclipse.org/legal/epl-2.0.
10
- //
11
- // This Source Code may also be made available under the following Secondary
12
- // Licenses when the conditions for such availability set forth in the Eclipse
13
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
14
- // with the GNU Classpath Exception which is available at
15
- // https://www.gnu.org/software/classpath/license.html.
16
- //
17
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
18
- // *****************************************************************************
19
- const inversify_1 = require("@theia/core/shared/inversify");
20
- const logger_backend_module_1 = require("@theia/core/lib/node/logger-backend-module");
21
- const process_backend_module_1 = require("../process-backend-module");
22
- function createProcessTestContainer() {
23
- const testContainer = new inversify_1.Container();
24
- (0, logger_backend_module_1.bindLogger)(testContainer.bind.bind(testContainer));
25
- testContainer.load(process_backend_module_1.default);
26
- return testContainer;
27
- }
28
- exports.createProcessTestContainer = createProcessTestContainer;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createProcessTestContainer = void 0;
4
+ // *****************************************************************************
5
+ // Copyright (C) 2017 Ericsson and others.
6
+ //
7
+ // This program and the accompanying materials are made available under the
8
+ // terms of the Eclipse Public License v. 2.0 which is available at
9
+ // http://www.eclipse.org/legal/epl-2.0.
10
+ //
11
+ // This Source Code may also be made available under the following Secondary
12
+ // Licenses when the conditions for such availability set forth in the Eclipse
13
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
14
+ // with the GNU Classpath Exception which is available at
15
+ // https://www.gnu.org/software/classpath/license.html.
16
+ //
17
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
18
+ // *****************************************************************************
19
+ const inversify_1 = require("@theia/core/shared/inversify");
20
+ const logger_backend_module_1 = require("@theia/core/lib/node/logger-backend-module");
21
+ const process_backend_module_1 = require("../process-backend-module");
22
+ function createProcessTestContainer() {
23
+ const testContainer = new inversify_1.Container();
24
+ (0, logger_backend_module_1.bindLogger)(testContainer.bind.bind(testContainer));
25
+ testContainer.load(process_backend_module_1.default);
26
+ return testContainer;
27
+ }
28
+ exports.createProcessTestContainer = createProcessTestContainer;
29
29
  //# sourceMappingURL=process-test-container.js.map
@@ -1,17 +1,17 @@
1
- /**
2
- * Parses the given line into an array of args respecting escapes and string literals.
3
- * @param line the given line to parse
4
- */
5
- export declare function parseArgs(line: string | undefined): string[];
6
- /**
7
- * Convert a signal number to its short name (using the signal definitions of
8
- * the current host). Should never be called on Windows. For Linux, this is
9
- * only valid for the x86 and ARM architectures, since other architectures may
10
- * use different numbers, see signal(7).
11
- */
12
- export declare function signame(sig: number): string;
13
- /**
14
- * Convert a code number to its short name
15
- */
16
- export declare function codename(code: number): string;
1
+ /**
2
+ * Parses the given line into an array of args respecting escapes and string literals.
3
+ * @param line the given line to parse
4
+ */
5
+ export declare function parseArgs(line: string | undefined): string[];
6
+ /**
7
+ * Convert a signal number to its short name (using the signal definitions of
8
+ * the current host). Should never be called on Windows. For Linux, this is
9
+ * only valid for the x86 and ARM architectures, since other architectures may
10
+ * use different numbers, see signal(7).
11
+ */
12
+ export declare function signame(sig: number): string;
13
+ /**
14
+ * Convert a code number to its short name
15
+ */
16
+ export declare function codename(code: number): string;
17
17
  //# sourceMappingURL=utils.d.ts.map
package/lib/node/utils.js CHANGED
@@ -1,78 +1,78 @@
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.codename = exports.signame = exports.parseArgs = void 0;
19
- const core_1 = require("@theia/core");
20
- const os = require("os");
21
- const stringArgv = require('string-argv');
22
- /**
23
- * Parses the given line into an array of args respecting escapes and string literals.
24
- * @param line the given line to parse
25
- */
26
- function parseArgs(line) {
27
- if (line) {
28
- return stringArgv(line);
29
- }
30
- return [];
31
- }
32
- exports.parseArgs = parseArgs;
33
- // Polyfill for Object.entries, until we upgrade to ES2017.
34
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
35
- function objectEntries(obj) {
36
- const props = Object.keys(obj);
37
- const result = new Array(props.length);
38
- for (let i = 0; i < props.length; i++) {
39
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
40
- result[i] = [props[i], obj[props[i]]];
41
- }
42
- return result;
43
- }
44
- /**
45
- * Convert a signal number to its short name (using the signal definitions of
46
- * the current host). Should never be called on Windows. For Linux, this is
47
- * only valid for the x86 and ARM architectures, since other architectures may
48
- * use different numbers, see signal(7).
49
- */
50
- function signame(sig) {
51
- // We should never reach this on Windows, since signals are not a thing
52
- // there.
53
- if (core_1.isWindows) {
54
- throw new Error('Trying to get a signal name on Windows.');
55
- }
56
- for (const entry of objectEntries(os.constants.signals)) {
57
- if (entry[1] === sig) {
58
- return entry[0];
59
- }
60
- }
61
- // Don't know this signal? Return the number as a string.
62
- return sig.toString(10);
63
- }
64
- exports.signame = signame;
65
- /**
66
- * Convert a code number to its short name
67
- */
68
- function codename(code) {
69
- for (const entry of objectEntries(os.constants.errno)) {
70
- if (entry[1] === code) {
71
- return entry[0];
72
- }
73
- }
74
- // Return the number as string if we did not find a name for it.
75
- return code.toString(10);
76
- }
77
- exports.codename = codename;
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.codename = exports.signame = exports.parseArgs = void 0;
19
+ const core_1 = require("@theia/core");
20
+ const os = require("os");
21
+ const stringArgv = require('string-argv');
22
+ /**
23
+ * Parses the given line into an array of args respecting escapes and string literals.
24
+ * @param line the given line to parse
25
+ */
26
+ function parseArgs(line) {
27
+ if (line) {
28
+ return stringArgv(line);
29
+ }
30
+ return [];
31
+ }
32
+ exports.parseArgs = parseArgs;
33
+ // Polyfill for Object.entries, until we upgrade to ES2017.
34
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
35
+ function objectEntries(obj) {
36
+ const props = Object.keys(obj);
37
+ const result = new Array(props.length);
38
+ for (let i = 0; i < props.length; i++) {
39
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
40
+ result[i] = [props[i], obj[props[i]]];
41
+ }
42
+ return result;
43
+ }
44
+ /**
45
+ * Convert a signal number to its short name (using the signal definitions of
46
+ * the current host). Should never be called on Windows. For Linux, this is
47
+ * only valid for the x86 and ARM architectures, since other architectures may
48
+ * use different numbers, see signal(7).
49
+ */
50
+ function signame(sig) {
51
+ // We should never reach this on Windows, since signals are not a thing
52
+ // there.
53
+ if (core_1.isWindows) {
54
+ throw new Error('Trying to get a signal name on Windows.');
55
+ }
56
+ for (const entry of objectEntries(os.constants.signals)) {
57
+ if (entry[1] === sig) {
58
+ return entry[0];
59
+ }
60
+ }
61
+ // Don't know this signal? Return the number as a string.
62
+ return sig.toString(10);
63
+ }
64
+ exports.signame = signame;
65
+ /**
66
+ * Convert a code number to its short name
67
+ */
68
+ function codename(code) {
69
+ for (const entry of objectEntries(os.constants.errno)) {
70
+ if (entry[1] === code) {
71
+ return entry[0];
72
+ }
73
+ }
74
+ // Return the number as string if we did not find a name for it.
75
+ return code.toString(10);
76
+ }
77
+ exports.codename = codename;
78
78
  //# sourceMappingURL=utils.js.map
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@theia/process",
3
- "version": "1.48.0",
3
+ "version": "1.48.1",
4
4
  "description": "Theia process support.",
5
5
  "dependencies": {
6
- "@theia/core": "1.48.0",
6
+ "@theia/core": "1.48.1",
7
7
  "node-pty": "0.11.0-beta17",
8
8
  "string-argv": "^0.1.1",
9
9
  "tslib": "^2.6.2"
@@ -45,10 +45,10 @@
45
45
  "watch": "theiaext watch"
46
46
  },
47
47
  "devDependencies": {
48
- "@theia/ext-scripts": "1.48.0"
48
+ "@theia/ext-scripts": "1.48.1"
49
49
  },
50
50
  "nyc": {
51
51
  "extends": "../../configs/nyc.json"
52
52
  },
53
- "gitHead": "ffae6a0739f7924a7cacafeb5ceb1140d93fe010"
53
+ "gitHead": "04c631933dfd14f58d1df5b9b28dd5596c84ec04"
54
54
  }
@@ -1,22 +1,22 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2020 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
-
17
- import { ContainerModule } from '@theia/core/shared/inversify';
18
- import { ShellCommandBuilder } from './shell-command-builder';
19
-
20
- export default new ContainerModule((bind, unbind, isBound, rebind) => {
21
- bind(ShellCommandBuilder).toSelf().inSingletonScope();
22
- });
1
+ // *****************************************************************************
2
+ // Copyright (C) 2020 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
+
17
+ import { ContainerModule } from '@theia/core/shared/inversify';
18
+ import { ShellCommandBuilder } from './shell-command-builder';
19
+
20
+ export default new ContainerModule((bind, unbind, isBound, rebind) => {
21
+ bind(ShellCommandBuilder).toSelf().inSingletonScope();
22
+ });
@@ -1,58 +1,58 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2022 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
-
17
- import { Event } from '@theia/core';
18
-
19
- export interface ManagedProcessManager {
20
- register(process: ManagedProcess): number;
21
- unregister(process: ManagedProcess): void;
22
- get(id: number): ManagedProcess | undefined;
23
- }
24
-
25
- export interface ManagedProcess {
26
- readonly id: number;
27
- readonly onStart: Event<IProcessStartEvent>;
28
- readonly onExit: Event<IProcessExitEvent>;
29
- readonly onClose: Event<IProcessExitEvent>;
30
- readonly onError: Event<ProcessErrorEvent>;
31
- readonly killed: boolean;
32
- kill(): void;
33
- }
34
-
35
- export interface IProcessExitEvent {
36
- // Exactly one of code and signal will be set.
37
- readonly code?: number,
38
- readonly signal?: string
39
- }
40
-
41
- /**
42
- * Data emitted when a process has been successfully started.
43
- */
44
- export interface IProcessStartEvent {
45
- }
46
-
47
- /**
48
- * Data emitted when a process has failed to start.
49
- */
50
- export interface ProcessErrorEvent extends Error {
51
- /** An errno-like error string (e.g. ENOENT). */
52
- code: string;
53
- }
54
-
55
- export enum ProcessType {
56
- 'Raw',
57
- 'Terminal'
58
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2022 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
+
17
+ import { Event } from '@theia/core';
18
+
19
+ export interface ManagedProcessManager {
20
+ register(process: ManagedProcess): number;
21
+ unregister(process: ManagedProcess): void;
22
+ get(id: number): ManagedProcess | undefined;
23
+ }
24
+
25
+ export interface ManagedProcess {
26
+ readonly id: number;
27
+ readonly onStart: Event<IProcessStartEvent>;
28
+ readonly onExit: Event<IProcessExitEvent>;
29
+ readonly onClose: Event<IProcessExitEvent>;
30
+ readonly onError: Event<ProcessErrorEvent>;
31
+ readonly killed: boolean;
32
+ kill(): void;
33
+ }
34
+
35
+ export interface IProcessExitEvent {
36
+ // Exactly one of code and signal will be set.
37
+ readonly code?: number,
38
+ readonly signal?: string
39
+ }
40
+
41
+ /**
42
+ * Data emitted when a process has been successfully started.
43
+ */
44
+ export interface IProcessStartEvent {
45
+ }
46
+
47
+ /**
48
+ * Data emitted when a process has failed to start.
49
+ */
50
+ export interface ProcessErrorEvent extends Error {
51
+ /** An errno-like error string (e.g. ENOENT). */
52
+ code: string;
53
+ }
54
+
55
+ export enum ProcessType {
56
+ 'Raw',
57
+ 'Terminal'
58
+ }