@theia/core 1.77.0-next.4 → 1.77.0-next.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/lib/browser/catalog.json +207 -22
- package/lib/browser/color-application-contribution.d.ts +6 -0
- package/lib/browser/color-application-contribution.d.ts.map +1 -1
- package/lib/browser/color-application-contribution.js +15 -4
- package/lib/browser/color-application-contribution.js.map +1 -1
- package/lib/browser/color-application-contribution.spec.d.ts +2 -0
- package/lib/browser/color-application-contribution.spec.d.ts.map +1 -0
- package/lib/browser/color-application-contribution.spec.js +96 -0
- package/lib/browser/color-application-contribution.spec.js.map +1 -0
- package/lib/browser/color-registry.d.ts +6 -0
- package/lib/browser/color-registry.d.ts.map +1 -1
- package/lib/browser/color-registry.js +12 -0
- package/lib/browser/color-registry.js.map +1 -1
- package/lib/browser/tree/tree-selection-state.d.ts +23 -1
- package/lib/browser/tree/tree-selection-state.d.ts.map +1 -1
- package/lib/browser/tree/tree-selection-state.js +23 -1
- package/lib/browser/tree/tree-selection-state.js.map +1 -1
- package/lib/browser/tree/tree-widget.d.ts +28 -0
- package/lib/browser/tree/tree-widget.d.ts.map +1 -1
- package/lib/browser/tree/tree-widget.js +59 -3
- package/lib/browser/tree/tree-widget.js.map +1 -1
- package/lib/browser/tree/tree-widget.spec.js +53 -3
- package/lib/browser/tree/tree-widget.spec.js.map +1 -1
- package/lib/browser/widgets/select-component.d.ts.map +1 -1
- package/lib/browser/widgets/select-component.js +6 -11
- package/lib/browser/widgets/select-component.js.map +1 -1
- package/lib/browser/widgets/select-component.spec.d.ts +2 -0
- package/lib/browser/widgets/select-component.spec.d.ts.map +1 -0
- package/lib/browser/widgets/select-component.spec.js +66 -0
- package/lib/browser/widgets/select-component.spec.js.map +1 -0
- package/lib/common/core-preferences.js +5 -5
- package/lib/common/core-preferences.js.map +1 -1
- package/lib/node/messaging/binary-message-pipe.d.ts.map +1 -1
- package/lib/node/messaging/binary-message-pipe.js +5 -3
- package/lib/node/messaging/binary-message-pipe.js.map +1 -1
- package/lib/node/messaging/binary-message-pipe.spec.d.ts +2 -0
- package/lib/node/messaging/binary-message-pipe.spec.d.ts.map +1 -0
- package/lib/node/messaging/binary-message-pipe.spec.js +71 -0
- package/lib/node/messaging/binary-message-pipe.spec.js.map +1 -0
- package/package.json +16 -16
- package/src/browser/color-application-contribution.spec.ts +108 -0
- package/src/browser/color-application-contribution.ts +16 -4
- package/src/browser/color-registry.ts +13 -0
- package/src/browser/style/hover-service.css +0 -2
- package/src/browser/tree/tree-selection-state.ts +40 -1
- package/src/browser/tree/tree-widget.spec.tsx +59 -3
- package/src/browser/tree/tree-widget.tsx +64 -2
- package/src/browser/widgets/select-component.spec.ts +77 -0
- package/src/browser/widgets/select-component.tsx +6 -10
- package/src/common/core-preferences.ts +5 -5
- package/src/node/messaging/binary-message-pipe.spec.ts +81 -0
- package/src/node/messaging/binary-message-pipe.ts +5 -4
|
@@ -153,18 +153,18 @@ export const corePreferenceSchema: PreferenceSchema = {
|
|
|
153
153
|
'http.proxy': {
|
|
154
154
|
type: 'string',
|
|
155
155
|
pattern: '^https?://([^:]*(:[^@]*)?@)?([^:]+|\\[[:0-9a-fA-F]+\\])(:\\d+)?/?$|^$',
|
|
156
|
-
markdownDescription: nls.
|
|
156
|
+
markdownDescription: nls.localize('theia/core/http/proxy', 'The proxy setting to use. If not set, will be inherited from the `http_proxy` and `https_proxy` environment variables.'),
|
|
157
157
|
scope: PreferenceScope.User
|
|
158
158
|
},
|
|
159
159
|
'http.proxyStrictSSL': {
|
|
160
160
|
type: 'boolean',
|
|
161
161
|
default: true,
|
|
162
|
-
description: nls.
|
|
162
|
+
description: nls.localize('theia/core/http/proxyStrictSSL', 'Controls whether the proxy server certificate should be verified against the list of supplied CAs.'),
|
|
163
163
|
scope: PreferenceScope.User
|
|
164
164
|
},
|
|
165
165
|
'http.proxyAuthorization': {
|
|
166
166
|
type: 'string',
|
|
167
|
-
markdownDescription: nls.
|
|
167
|
+
markdownDescription: nls.localize('theia/core/http/proxyAuthorization', 'The value to send as the `Proxy-Authorization` header for every network request.'),
|
|
168
168
|
scope: PreferenceScope.User
|
|
169
169
|
},
|
|
170
170
|
'http.proxySupport': {
|
|
@@ -177,13 +177,13 @@ export const corePreferenceSchema: PreferenceSchema = {
|
|
|
177
177
|
nls.localizeByDefault('Enable proxy support for extensions, override request options.'),
|
|
178
178
|
],
|
|
179
179
|
default: 'override',
|
|
180
|
-
description: nls.
|
|
180
|
+
description: nls.localize('theia/core/http/proxySupport', 'Use the proxy support for extensions.'),
|
|
181
181
|
scope: PreferenceScope.User
|
|
182
182
|
},
|
|
183
183
|
'http.systemCertificates': {
|
|
184
184
|
type: 'boolean',
|
|
185
185
|
default: true,
|
|
186
|
-
description: nls.
|
|
186
|
+
description: nls.localize('theia/core/http/systemCertificates', 'Controls whether CA certificates should be loaded from the OS. On Windows and macOS, a reload of the window is required after turning this off.'),
|
|
187
187
|
scope: PreferenceScope.User
|
|
188
188
|
},
|
|
189
189
|
'workbench.list.openMode': {
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2026 Ivan Baksheev 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 { expect } from 'chai';
|
|
18
|
+
import { PassThrough } from 'stream';
|
|
19
|
+
import { BinaryMessagePipe } from './binary-message-pipe';
|
|
20
|
+
|
|
21
|
+
class TestBinaryMessagePipe extends BinaryMessagePipe {
|
|
22
|
+
override encodeMessageStart(message: Uint8Array): Uint8Array {
|
|
23
|
+
return super.encodeMessageStart(message);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
override get messageStartByteLength(): number {
|
|
27
|
+
return super.messageStartByteLength;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
describe('BinaryMessagePipe', () => {
|
|
32
|
+
const payload = Buffer.alloc(64, 0x41);
|
|
33
|
+
let headerLength: number;
|
|
34
|
+
let headerSplit: number;
|
|
35
|
+
let stream: PassThrough;
|
|
36
|
+
let pipe: TestBinaryMessagePipe;
|
|
37
|
+
let messages: Buffer[];
|
|
38
|
+
let frame: Buffer;
|
|
39
|
+
|
|
40
|
+
beforeEach(() => {
|
|
41
|
+
stream = new PassThrough();
|
|
42
|
+
pipe = new TestBinaryMessagePipe(stream);
|
|
43
|
+
headerLength = pipe.messageStartByteLength;
|
|
44
|
+
headerSplit = Math.floor(headerLength / 2);
|
|
45
|
+
messages = [];
|
|
46
|
+
frame = encodeFrame(payload);
|
|
47
|
+
pipe.onMessage(message => messages.push(Buffer.from(message)));
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
afterEach(() => {
|
|
51
|
+
pipe.dispose();
|
|
52
|
+
stream.destroy();
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it('accumulates consecutive chunks that are shorter than the header', () => {
|
|
56
|
+
stream.emit('data', frame.subarray(0, headerSplit));
|
|
57
|
+
stream.emit('data', frame.subarray(headerSplit, headerLength));
|
|
58
|
+
stream.emit('data', frame.subarray(headerLength));
|
|
59
|
+
|
|
60
|
+
expect(messages).to.deep.equal([payload]);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it('receives the original payload when the header is split between chunks', () => {
|
|
64
|
+
stream.emit('data', frame.subarray(0, headerSplit));
|
|
65
|
+
stream.emit('data', frame.subarray(headerSplit));
|
|
66
|
+
|
|
67
|
+
expect(messages).to.deep.equal([payload]);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it('preserves the next frame in the same chunk after a partial header', () => {
|
|
71
|
+
const nextPayload = Buffer.from('next');
|
|
72
|
+
stream.emit('data', frame.subarray(0, headerSplit));
|
|
73
|
+
stream.emit('data', Buffer.concat([frame.subarray(headerSplit), encodeFrame(nextPayload)]));
|
|
74
|
+
|
|
75
|
+
expect(messages).to.deep.equal([payload, nextPayload]);
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
function encodeFrame(message: Uint8Array): Buffer {
|
|
79
|
+
return Buffer.concat([Buffer.from(pipe.encodeMessageStart(message)), Buffer.from(message)]);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
@@ -57,6 +57,10 @@ export class BinaryMessagePipe implements Disposable {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
protected handleNewMessage(chunk: Uint8Array): void {
|
|
60
|
+
if (this.cachedMessageData.partialMessageStart) {
|
|
61
|
+
chunk = Buffer.concat([this.cachedMessageData.partialMessageStart, chunk]);
|
|
62
|
+
this.cachedMessageData.partialMessageStart = undefined;
|
|
63
|
+
}
|
|
60
64
|
if (chunk.byteLength < this.messageStartByteLength) {
|
|
61
65
|
// The chunk only contains a part of the encoded message start
|
|
62
66
|
this.cachedMessageData.partialMessageStart = chunk;
|
|
@@ -137,10 +141,7 @@ export class BinaryMessagePipe implements Disposable {
|
|
|
137
141
|
* @throws An error if the message start can not be read successfully.
|
|
138
142
|
*/
|
|
139
143
|
protected readMessageStart(chunk: Uint8Array): number {
|
|
140
|
-
const
|
|
141
|
-
this.cachedMessageData.partialMessageStart = undefined;
|
|
142
|
-
|
|
143
|
-
const reader = new Uint8ArrayReadBuffer(messageData);
|
|
144
|
+
const reader = new Uint8ArrayReadBuffer(chunk);
|
|
144
145
|
const identifier = reader.readString();
|
|
145
146
|
|
|
146
147
|
if (identifier !== BinaryMessagePipe.MESSAGE_START_IDENTIFIER) {
|