@theia/process 1.23.0-next.5 → 1.23.0-next.54
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/process-common-module.d.ts +0 -15
- package/lib/common/process-common-module.d.ts.map +1 -1
- package/lib/common/process-common-module.js +15 -15
- package/lib/common/process-common-module.js.map +1 -1
- package/lib/common/shell-command-builder.d.ts +0 -15
- package/lib/common/shell-command-builder.d.ts.map +1 -1
- package/lib/common/shell-command-builder.js +19 -19
- package/lib/common/shell-command-builder.js.map +1 -1
- package/lib/common/shell-command-builder.slow-spec.d.ts +0 -15
- package/lib/common/shell-command-builder.slow-spec.d.ts.map +1 -1
- package/lib/common/shell-command-builder.slow-spec.js +19 -19
- package/lib/common/shell-command-builder.slow-spec.js.map +1 -1
- package/lib/common/shell-quoting.d.ts +0 -15
- package/lib/common/shell-quoting.d.ts.map +1 -1
- package/lib/common/shell-quoting.js +15 -15
- package/lib/common/shell-quoting.js.map +1 -1
- package/lib/common/shell-quoting.spec.d.ts +0 -15
- package/lib/common/shell-quoting.spec.d.ts.map +1 -1
- package/lib/common/shell-quoting.spec.js +16 -16
- package/lib/common/shell-quoting.spec.js.map +1 -1
- package/lib/node/dev-null-stream.d.ts +0 -15
- package/lib/node/dev-null-stream.d.ts.map +1 -1
- package/lib/node/dev-null-stream.js +15 -15
- package/lib/node/dev-null-stream.js.map +1 -1
- package/lib/node/index.d.ts +0 -15
- package/lib/node/index.d.ts.map +1 -1
- package/lib/node/index.js +16 -16
- package/lib/node/index.js.map +1 -1
- package/lib/node/multi-ring-buffer.d.ts +0 -15
- package/lib/node/multi-ring-buffer.d.ts.map +1 -1
- package/lib/node/multi-ring-buffer.js +17 -17
- package/lib/node/multi-ring-buffer.js.map +1 -1
- package/lib/node/multi-ring-buffer.spec.d.ts +0 -15
- package/lib/node/multi-ring-buffer.spec.d.ts.map +1 -1
- package/lib/node/multi-ring-buffer.spec.js +15 -15
- package/lib/node/multi-ring-buffer.spec.js.map +1 -1
- package/lib/node/process-backend-module.d.ts +0 -15
- package/lib/node/process-backend-module.d.ts.map +1 -1
- package/lib/node/process-backend-module.js +15 -15
- package/lib/node/process-backend-module.js.map +1 -1
- package/lib/node/process-manager.js +18 -17
- package/lib/node/process-manager.js.map +1 -1
- package/lib/node/process.d.ts +0 -15
- package/lib/node/process.d.ts.map +1 -1
- package/lib/node/process.js +18 -18
- package/lib/node/process.js.map +1 -1
- package/lib/node/pseudo-pty.d.ts +0 -15
- package/lib/node/pseudo-pty.d.ts.map +1 -1
- package/lib/node/pseudo-pty.js +15 -15
- package/lib/node/pseudo-pty.js.map +1 -1
- package/lib/node/raw-process.d.ts +0 -15
- package/lib/node/raw-process.d.ts.map +1 -1
- package/lib/node/raw-process.js +23 -22
- package/lib/node/raw-process.js.map +1 -1
- package/lib/node/raw-process.spec.js +21 -21
- package/lib/node/raw-process.spec.js.map +1 -1
- package/lib/node/task-terminal-process.d.ts +0 -15
- package/lib/node/task-terminal-process.d.ts.map +1 -1
- package/lib/node/task-terminal-process.js +16 -16
- package/lib/node/task-terminal-process.js.map +1 -1
- package/lib/node/terminal-process.d.ts +0 -15
- package/lib/node/terminal-process.d.ts.map +1 -1
- package/lib/node/terminal-process.js +24 -23
- package/lib/node/terminal-process.js.map +1 -1
- package/lib/node/terminal-process.spec.js +16 -16
- package/lib/node/terminal-process.spec.js.map +1 -1
- package/lib/node/test/process-test-container.d.ts +0 -15
- package/lib/node/test/process-test-container.d.ts.map +1 -1
- package/lib/node/test/process-test-container.js +16 -16
- package/lib/node/test/process-test-container.js.map +1 -1
- package/lib/node/utils.d.ts +0 -15
- package/lib/node/utils.d.ts.map +1 -1
- package/lib/node/utils.js +15 -15
- package/lib/node/utils.js.map +1 -1
- package/package.json +3 -3
- package/src/common/process-common-module.ts +15 -15
- package/src/common/shell-command-builder.slow-spec.ts +15 -15
- package/src/common/shell-command-builder.ts +15 -15
- package/src/common/shell-quoting.spec.ts +15 -15
- package/src/common/shell-quoting.ts +15 -15
- package/src/node/dev-null-stream.ts +17 -17
- package/src/node/index.ts +15 -15
- package/src/node/multi-ring-buffer.spec.ts +18 -18
- package/src/node/multi-ring-buffer.ts +17 -17
- package/src/node/process-backend-module.ts +15 -15
- package/src/node/process-manager.ts +15 -15
- package/src/node/process.ts +15 -15
- package/src/node/pseudo-pty.ts +15 -15
- package/src/node/raw-process.spec.ts +19 -22
- package/src/node/raw-process.ts +15 -15
- package/src/node/string-argv.d.ts +15 -15
- package/src/node/task-terminal-process.ts +16 -16
- package/src/node/terminal-process.spec.ts +15 -15
- package/src/node/terminal-process.ts +16 -16
- package/src/node/test/process-fork-test.js +15 -15
- package/src/node/test/process-test-container.ts +15 -15
- package/src/node/utils.ts +15 -15
package/src/node/pseudo-pty.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2020 Alibaba Inc. 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 WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { IPty } from 'node-pty';
|
|
18
18
|
import { Event } from '@theia/core';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2017 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 WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
16
|
import * as chai from 'chai';
|
|
17
17
|
import * as process from 'process';
|
|
18
18
|
import * as stream from 'stream';
|
|
@@ -100,16 +100,13 @@ describe('RawProcess', function (): void {
|
|
|
100
100
|
const args = ['--version'];
|
|
101
101
|
const rawProcess = rawProcessFactory({ command: process.execPath, 'args': args });
|
|
102
102
|
const p = new Promise<number>((resolve, reject) => {
|
|
103
|
-
rawProcess.onError(
|
|
104
|
-
reject();
|
|
105
|
-
});
|
|
106
|
-
|
|
103
|
+
rawProcess.onError(reject);
|
|
107
104
|
rawProcess.onExit(event => {
|
|
108
105
|
if (event.code === undefined) {
|
|
109
|
-
reject();
|
|
106
|
+
reject(new Error('event.code is undefined'));
|
|
107
|
+
} else {
|
|
108
|
+
resolve(event.code);
|
|
110
109
|
}
|
|
111
|
-
|
|
112
|
-
resolve(event.code);
|
|
113
110
|
});
|
|
114
111
|
});
|
|
115
112
|
|
package/src/node/raw-process.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2017 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 WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { injectable, inject, named } from '@theia/core/shared/inversify';
|
|
18
18
|
import { ProcessManager } from './process-manager';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2017 TypeFox 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 WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
declare module 'string-argv' {
|
|
18
18
|
function stringArgv(...args: string[]): string[];
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2021 SAP SE or an SAP affiliate company 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 WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { injectable } from '@theia/core/shared/inversify';
|
|
18
18
|
import { TerminalProcess, TerminalProcessOptions } from './terminal-process';
|
|
@@ -28,7 +28,7 @@ export class TaskTerminalProcess extends TerminalProcess {
|
|
|
28
28
|
public exited = false;
|
|
29
29
|
public attachmentAttempted = false;
|
|
30
30
|
|
|
31
|
-
protected onTerminalExit(code: number | undefined, signal: string | undefined): void {
|
|
31
|
+
protected override onTerminalExit(code: number | undefined, signal: string | undefined): void {
|
|
32
32
|
this.emitOnExit(code, signal);
|
|
33
33
|
this.exited = true;
|
|
34
34
|
// Unregister process only if task terminal already attached (or failed attach),
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2017 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 WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
16
|
import * as chai from 'chai';
|
|
17
17
|
import * as process from 'process';
|
|
18
18
|
import * as stream from 'stream';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2017 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 WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { injectable, inject, named } from '@theia/core/shared/inversify';
|
|
18
18
|
import { isWindows } from '@theia/core';
|
|
@@ -60,7 +60,7 @@ export class TerminalProcess extends Process {
|
|
|
60
60
|
readonly inputStream: Writable;
|
|
61
61
|
|
|
62
62
|
constructor( // eslint-disable-next-line @typescript-eslint/indent
|
|
63
|
-
@inject(TerminalProcessOptions) protected readonly options: TerminalProcessOptions,
|
|
63
|
+
@inject(TerminalProcessOptions) protected override readonly options: TerminalProcessOptions,
|
|
64
64
|
@inject(ProcessManager) processManager: ProcessManager,
|
|
65
65
|
@inject(MultiRingBuffer) protected readonly ringBuffer: MultiRingBuffer,
|
|
66
66
|
@inject(ILogger) @named('process') logger: ILogger
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2018 Arm 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 WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
if (process.argv[2] === 'version') {
|
|
18
18
|
console.log('1.0.0');
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2017 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 WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
16
|
import { Container } from '@theia/core/shared/inversify';
|
|
17
17
|
import { bindLogger } from '@theia/core/lib/node/logger-backend-module';
|
|
18
18
|
import processBackendModule from '../process-backend-module';
|
package/src/node/utils.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2017 TypeFox 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 WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { isWindows } from '@theia/core';
|
|
18
18
|
import * as os from 'os';
|