@hydranium/client-theia 1.0.0-next.8 → 1.0.0-next.85
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 +2 -2
- package/lib/browser/connection-diagnostics-contribution.d.ts +69 -0
- package/lib/browser/connection-diagnostics-contribution.d.ts.map +1 -0
- package/lib/browser/connection-diagnostics-contribution.js +153 -0
- package/lib/browser/connection-diagnostics-contribution.js.map +1 -0
- package/lib/browser/index.d.ts +2 -0
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +2 -0
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/log-level-preference.d.ts.map +1 -1
- package/lib/browser/log-level-preference.js +11 -0
- package/lib/browser/log-level-preference.js.map +1 -1
- package/lib/browser/memory-diagnostics-contribution.d.ts +40 -4
- package/lib/browser/memory-diagnostics-contribution.d.ts.map +1 -1
- package/lib/browser/memory-diagnostics-contribution.js +161 -31
- package/lib/browser/memory-diagnostics-contribution.js.map +1 -1
- package/lib/browser/session-aware-connection-source.d.ts +98 -0
- package/lib/browser/session-aware-connection-source.d.ts.map +1 -0
- package/lib/browser/session-aware-connection-source.js +167 -0
- package/lib/browser/session-aware-connection-source.js.map +1 -0
- package/lib/common/connection-resilience-options.d.ts +24 -0
- package/lib/common/connection-resilience-options.d.ts.map +1 -0
- package/lib/common/connection-resilience-options.js +11 -0
- package/lib/common/connection-resilience-options.js.map +1 -0
- package/lib/common/framed-socket-write-buffer.d.ts +121 -0
- package/lib/common/framed-socket-write-buffer.d.ts.map +1 -0
- package/lib/common/framed-socket-write-buffer.js +190 -0
- package/lib/common/framed-socket-write-buffer.js.map +1 -0
- package/lib/common/index.d.ts +11 -0
- package/lib/common/index.d.ts.map +1 -0
- package/lib/common/index.js +30 -0
- package/lib/common/index.js.map +1 -0
- package/lib/node/index.d.ts +1 -0
- package/lib/node/index.d.ts.map +1 -1
- package/lib/node/index.js +1 -0
- package/lib/node/index.js.map +1 -1
- package/lib/node/session-bound-frontend-connection-service.d.ts +77 -0
- package/lib/node/session-bound-frontend-connection-service.d.ts.map +1 -0
- package/lib/node/session-bound-frontend-connection-service.js +128 -0
- package/lib/node/session-bound-frontend-connection-service.js.map +1 -0
- package/package.json +16 -7
- package/src/browser/connection-diagnostics-contribution.ts +142 -0
- package/src/browser/index.ts +2 -0
- package/src/browser/log-level-preference.ts +11 -0
- package/src/browser/memory-diagnostics-contribution.ts +268 -45
- package/src/browser/session-aware-connection-source.ts +179 -0
- package/src/common/connection-resilience-options.ts +24 -0
- package/src/common/framed-socket-write-buffer.ts +227 -0
- package/src/common/index.ts +14 -0
- package/src/node/index.ts +1 -0
- package/src/node/session-bound-frontend-connection-service.ts +155 -0
package/README.md
CHANGED
|
@@ -59,8 +59,8 @@ declared peer dependencies are:
|
|
|
59
59
|
| Peer | Range |
|
|
60
60
|
| --------------------- | ------------- |
|
|
61
61
|
| `@hydranium/protocol` | `^1.0.0-next` |
|
|
62
|
-
| `@theia/core` | `^1.
|
|
63
|
-
| `@theia/output` | `^1.
|
|
62
|
+
| `@theia/core` | `^1.70.0` |
|
|
63
|
+
| `@theia/output` | `^1.70.0` |
|
|
64
64
|
| `inversify` | `^6.0.0` |
|
|
65
65
|
|
|
66
66
|
`@theia/output` is easy to miss: the memory-diagnostics commands and the channel
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
import { MessageService } from '@theia/core';
|
|
10
|
+
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
|
|
11
|
+
import { ConnectionStatus, ConnectionStatusService } from '@theia/core/lib/browser/connection-status-service';
|
|
12
|
+
import { WebSocketConnectionSource } from '@theia/core/lib/browser/messaging/ws-connection-source';
|
|
13
|
+
import { type interfaces } from '@theia/core/shared/inversify';
|
|
14
|
+
import { type ConnectionBufferOverflow } from '../common/framed-socket-write-buffer';
|
|
15
|
+
import { ChannelLogger } from './channel-logger';
|
|
16
|
+
/**
|
|
17
|
+
* Records the browser side of the websocket lifecycle into the adopter's Output
|
|
18
|
+
* channel, and tells the user the one thing they cannot recover from on their
|
|
19
|
+
* own.
|
|
20
|
+
*
|
|
21
|
+
* Theia reports an outage only as an "Offline" status-bar item, which cannot
|
|
22
|
+
* distinguish a plain network drop from the server having stopped answering on a
|
|
23
|
+
* socket that is still up. The latter is what a connection defect looks like
|
|
24
|
+
* from here, so the two are logged differently — that distinction is what says
|
|
25
|
+
* whether reopening an editor helps or only a reload does.
|
|
26
|
+
*
|
|
27
|
+
* Purely observational apart from the overflow message: nothing here changes how
|
|
28
|
+
* the connection behaves.
|
|
29
|
+
*/
|
|
30
|
+
export declare class ConnectionDiagnosticsContribution implements FrontendApplicationContribution {
|
|
31
|
+
protected readonly connectionSource: WebSocketConnectionSource;
|
|
32
|
+
protected readonly connectionStatus: ConnectionStatusService;
|
|
33
|
+
protected readonly logger: ChannelLogger;
|
|
34
|
+
protected readonly messageService: MessageService;
|
|
35
|
+
/** Main channels created so far; more than one means the server did not recognise this frontend. */
|
|
36
|
+
protected channelCount: number;
|
|
37
|
+
protected socketClosedAt?: number;
|
|
38
|
+
protected offlineAt?: number;
|
|
39
|
+
initialize(): void;
|
|
40
|
+
protected handleSocketOpen(): void;
|
|
41
|
+
protected handleSocketClose(): void;
|
|
42
|
+
/**
|
|
43
|
+
* A second channel means the reconnect was refused and the session discarded.
|
|
44
|
+
* Only reachable with `reloadOnReconnect` off — with it on, Theia reloads the
|
|
45
|
+
* page instead of opening another channel.
|
|
46
|
+
*/
|
|
47
|
+
protected handleChannelOpen(): void;
|
|
48
|
+
protected handleStatusChange(status: ConnectionStatus): void;
|
|
49
|
+
/**
|
|
50
|
+
* The outage outlasted what the buffer can hold, so changes made from here on
|
|
51
|
+
* are being thrown away rather than queued. Reconnecting resumes sending but
|
|
52
|
+
* cannot bring those back, which leaves the editor disagreeing with the
|
|
53
|
+
* server — and without a message the user would see nothing but an editor
|
|
54
|
+
* that has quietly stopped saving, so say it plainly.
|
|
55
|
+
*/
|
|
56
|
+
protected handleBufferOverflow(overflow: ConnectionBufferOverflow): void;
|
|
57
|
+
protected socketId(): string;
|
|
58
|
+
protected statusName(status: ConnectionStatus): string;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Bind {@link ConnectionDiagnosticsContribution} as a `FrontendApplicationContribution`.
|
|
62
|
+
*
|
|
63
|
+
* Needs a {@link ChannelLogger} binding, so call it from a module that has also
|
|
64
|
+
* called `bindChannelLogger`. Unlike `bindConnectionResilience` this belongs in a
|
|
65
|
+
* normal frontend module: it only observes, so it has no reason to run during
|
|
66
|
+
* preload, and `MessageService` is not available that early.
|
|
67
|
+
*/
|
|
68
|
+
export declare function bindConnectionDiagnostics(bind: interfaces.Bind): void;
|
|
69
|
+
//# sourceMappingURL=connection-diagnostics-contribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-diagnostics-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/connection-diagnostics-contribution.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,cAAc,EAAO,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,+BAA+B,EAAE,MAAM,2DAA2D,CAAC;AAC5G,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,mDAAmD,CAAC;AAC9G,OAAO,EAAE,yBAAyB,EAAE,MAAM,wDAAwD,CAAC;AACnG,OAAO,EAAsB,KAAK,UAAU,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD;;;;;;;;;;;;;GAaG;AACH,qBACa,iCAAkC,YAAW,+BAA+B;IACnD,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,yBAAyB,CAAC;IACjE,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,uBAAuB,CAAC;IACvE,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IACxC,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAE1E,oGAAoG;IACpG,SAAS,CAAC,YAAY,SAAK;IAC3B,SAAS,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IAClC,SAAS,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE7B,UAAU,IAAI,IAAI;IAalB,SAAS,CAAC,gBAAgB,IAAI,IAAI;IAMlC,SAAS,CAAC,iBAAiB,IAAI,IAAI;IAKnC;;;;OAIG;IACH,SAAS,CAAC,iBAAiB,IAAI,IAAI;IAYnC,SAAS,CAAC,kBAAkB,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI;IAmB5D;;;;;;OAMG;IACH,SAAS,CAAC,oBAAoB,CAAC,QAAQ,EAAE,wBAAwB,GAAG,IAAI;IAUxE,SAAS,CAAC,QAAQ,IAAI,MAAM;IAI5B,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM;CAGxD;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,CAGrE"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the MIT License which is available in the project root.
|
|
7
|
+
*
|
|
8
|
+
* SPDX-License-Identifier: MIT
|
|
9
|
+
********************************************************************************/
|
|
10
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
11
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
12
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
13
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15
|
+
};
|
|
16
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
17
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.ConnectionDiagnosticsContribution = void 0;
|
|
21
|
+
exports.bindConnectionDiagnostics = bindConnectionDiagnostics;
|
|
22
|
+
const core_1 = require("@theia/core");
|
|
23
|
+
const frontend_application_contribution_1 = require("@theia/core/lib/browser/frontend-application-contribution");
|
|
24
|
+
const connection_status_service_1 = require("@theia/core/lib/browser/connection-status-service");
|
|
25
|
+
const ws_connection_source_1 = require("@theia/core/lib/browser/messaging/ws-connection-source");
|
|
26
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
27
|
+
const channel_logger_1 = require("./channel-logger");
|
|
28
|
+
const session_aware_connection_source_1 = require("./session-aware-connection-source");
|
|
29
|
+
/**
|
|
30
|
+
* Records the browser side of the websocket lifecycle into the adopter's Output
|
|
31
|
+
* channel, and tells the user the one thing they cannot recover from on their
|
|
32
|
+
* own.
|
|
33
|
+
*
|
|
34
|
+
* Theia reports an outage only as an "Offline" status-bar item, which cannot
|
|
35
|
+
* distinguish a plain network drop from the server having stopped answering on a
|
|
36
|
+
* socket that is still up. The latter is what a connection defect looks like
|
|
37
|
+
* from here, so the two are logged differently — that distinction is what says
|
|
38
|
+
* whether reopening an editor helps or only a reload does.
|
|
39
|
+
*
|
|
40
|
+
* Purely observational apart from the overflow message: nothing here changes how
|
|
41
|
+
* the connection behaves.
|
|
42
|
+
*/
|
|
43
|
+
let ConnectionDiagnosticsContribution = class ConnectionDiagnosticsContribution {
|
|
44
|
+
connectionSource;
|
|
45
|
+
connectionStatus;
|
|
46
|
+
logger;
|
|
47
|
+
messageService;
|
|
48
|
+
/** Main channels created so far; more than one means the server did not recognise this frontend. */
|
|
49
|
+
channelCount = 0;
|
|
50
|
+
socketClosedAt;
|
|
51
|
+
offlineAt;
|
|
52
|
+
initialize() {
|
|
53
|
+
this.connectionSource.onSocketDidOpen(() => this.handleSocketOpen());
|
|
54
|
+
this.connectionSource.onSocketDidClose(() => this.handleSocketClose());
|
|
55
|
+
this.connectionSource.onConnectionDidOpen(() => this.handleChannelOpen());
|
|
56
|
+
this.connectionStatus.onStatusChange(status => this.handleStatusChange(status));
|
|
57
|
+
if (this.connectionSource instanceof session_aware_connection_source_1.SessionAwareConnectionSource) {
|
|
58
|
+
this.connectionSource.onBufferOverflow(overflow => this.handleBufferOverflow(overflow));
|
|
59
|
+
}
|
|
60
|
+
// The socket is opened by the preloader, before this contribution exists, so the first
|
|
61
|
+
// `onSocketDidOpen` has already fired; state the current situation instead.
|
|
62
|
+
this.logger.info(`diagnostics active; socket ${this.socketId()}, backend ${this.statusName(this.connectionStatus.currentStatus)}`);
|
|
63
|
+
}
|
|
64
|
+
handleSocketOpen() {
|
|
65
|
+
const downFor = this.socketClosedAt === undefined ? '' : ` after ${Date.now() - this.socketClosedAt} ms down`;
|
|
66
|
+
this.socketClosedAt = undefined;
|
|
67
|
+
this.logger.info(`websocket connected: socket ${this.socketId()}${downFor}`);
|
|
68
|
+
}
|
|
69
|
+
handleSocketClose() {
|
|
70
|
+
this.socketClosedAt = Date.now();
|
|
71
|
+
this.logger.info(`websocket disconnected: socket ${this.socketId()}; outgoing messages are buffered until it returns`);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* A second channel means the reconnect was refused and the session discarded.
|
|
75
|
+
* Only reachable with `reloadOnReconnect` off — with it on, Theia reloads the
|
|
76
|
+
* page instead of opening another channel.
|
|
77
|
+
*/
|
|
78
|
+
handleChannelOpen() {
|
|
79
|
+
this.channelCount++;
|
|
80
|
+
if (this.channelCount === 1) {
|
|
81
|
+
this.logger.info(`initial channel opened on socket ${this.socketId()}`);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
this.logger.warn(`new channel #${this.channelCount} on socket ${this.socketId()}: the backend did not recognise this frontend, ` +
|
|
85
|
+
'so its session was discarded and every pending request rejected');
|
|
86
|
+
}
|
|
87
|
+
handleStatusChange(status) {
|
|
88
|
+
if (status === connection_status_service_1.ConnectionStatus.ONLINE) {
|
|
89
|
+
const offlineFor = this.offlineAt === undefined ? '' : ` after ${Date.now() - this.offlineAt} ms`;
|
|
90
|
+
this.offlineAt = undefined;
|
|
91
|
+
this.logger.info(`backend reachable again${offlineFor}`);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
this.offlineAt = Date.now();
|
|
95
|
+
const socket = this.connectionSource.socket;
|
|
96
|
+
if (socket?.connected) {
|
|
97
|
+
this.logger.warn(`backend stopped answering while socket ${socket.id} is still connected: nothing this session sends will ` +
|
|
98
|
+
'arrive, and socket.io will not reconnect on its own. Reload the page to recover.');
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
this.logger.info(`backend unreachable; websocket is disconnected (socket ${this.socketId()})`);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* The outage outlasted what the buffer can hold, so changes made from here on
|
|
105
|
+
* are being thrown away rather than queued. Reconnecting resumes sending but
|
|
106
|
+
* cannot bring those back, which leaves the editor disagreeing with the
|
|
107
|
+
* server — and without a message the user would see nothing but an editor
|
|
108
|
+
* that has quietly stopped saving, so say it plainly.
|
|
109
|
+
*/
|
|
110
|
+
handleBufferOverflow(overflow) {
|
|
111
|
+
this.logger.error(`buffer full at ${overflow.maxBytes} bytes holding ${overflow.messages} message(s)`);
|
|
112
|
+
this.messageService.error(core_1.nls.localize('hydranium/connection/offlineLimitReached', 'Disconnected for too long: recent changes were not sent. Reload the page before continuing.'));
|
|
113
|
+
}
|
|
114
|
+
socketId() {
|
|
115
|
+
return this.connectionSource.socket?.id ?? ws_connection_source_1.WebSocketConnectionSource.NO_CONNECTION;
|
|
116
|
+
}
|
|
117
|
+
statusName(status) {
|
|
118
|
+
return status === connection_status_service_1.ConnectionStatus.ONLINE ? 'online' : 'offline';
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
exports.ConnectionDiagnosticsContribution = ConnectionDiagnosticsContribution;
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, inversify_1.inject)(ws_connection_source_1.WebSocketConnectionSource),
|
|
124
|
+
__metadata("design:type", ws_connection_source_1.WebSocketConnectionSource)
|
|
125
|
+
], ConnectionDiagnosticsContribution.prototype, "connectionSource", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, inversify_1.inject)(connection_status_service_1.ConnectionStatusService),
|
|
128
|
+
__metadata("design:type", Object)
|
|
129
|
+
], ConnectionDiagnosticsContribution.prototype, "connectionStatus", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
(0, inversify_1.inject)(channel_logger_1.ChannelLogger),
|
|
132
|
+
__metadata("design:type", channel_logger_1.ChannelLogger)
|
|
133
|
+
], ConnectionDiagnosticsContribution.prototype, "logger", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, inversify_1.inject)(core_1.MessageService),
|
|
136
|
+
__metadata("design:type", core_1.MessageService)
|
|
137
|
+
], ConnectionDiagnosticsContribution.prototype, "messageService", void 0);
|
|
138
|
+
exports.ConnectionDiagnosticsContribution = ConnectionDiagnosticsContribution = __decorate([
|
|
139
|
+
(0, inversify_1.injectable)()
|
|
140
|
+
], ConnectionDiagnosticsContribution);
|
|
141
|
+
/**
|
|
142
|
+
* Bind {@link ConnectionDiagnosticsContribution} as a `FrontendApplicationContribution`.
|
|
143
|
+
*
|
|
144
|
+
* Needs a {@link ChannelLogger} binding, so call it from a module that has also
|
|
145
|
+
* called `bindChannelLogger`. Unlike `bindConnectionResilience` this belongs in a
|
|
146
|
+
* normal frontend module: it only observes, so it has no reason to run during
|
|
147
|
+
* preload, and `MessageService` is not available that early.
|
|
148
|
+
*/
|
|
149
|
+
function bindConnectionDiagnostics(bind) {
|
|
150
|
+
bind(ConnectionDiagnosticsContribution).toSelf().inSingletonScope();
|
|
151
|
+
bind(frontend_application_contribution_1.FrontendApplicationContribution).toService(ConnectionDiagnosticsContribution);
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=connection-diagnostics-contribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-diagnostics-contribution.js","sourceRoot":"","sources":["../../src/browser/connection-diagnostics-contribution.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;AAmIlF,8DAGC;AApID,sCAAkD;AAClD,iHAA4G;AAC5G,iGAA8G;AAC9G,iGAAmG;AACnG,4DAAmF;AAEnF,qDAAiD;AACjD,uFAAiF;AAEjF;;;;;;;;;;;;;GAaG;AAEI,IAAM,iCAAiC,GAAvC,MAAM,iCAAiC;IACW,gBAAgB,CAA4B;IAC9C,gBAAgB,CAA0B;IACpD,MAAM,CAAgB;IACrB,cAAc,CAAiB;IAE1E,oGAAoG;IAC1F,YAAY,GAAG,CAAC,CAAC;IACjB,cAAc,CAAU;IACxB,SAAS,CAAU;IAE7B,UAAU;QACP,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC;QACrE,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;QACvE,IAAI,CAAC,gBAAgB,CAAC,mBAA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K,CACtB,UAAG,CAAC,QAAQ,CACT,0CAA0C,EAC1C,6FAA6F,CAC/F,CACH,CAAC;IACL,CAAC;IAES,QAAQ;QACf,OAAO,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,EAAE,IAAI,gDAAyB,CAAC,aAAa,CAAC;IACtF,CAAC;IAES,UAAU,CAAC,MAAwB;QAC1C,OAAO,MAAM,KAAK,4CAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IACpE,CAAC;CACH,CAAA;AA/FY,8EAAiC;AACW;IAArD,IAAA,kBAAM,EAAC,gDAAyB,CAAC;8BAAsC,gDAAyB;2EAAC;AAC9C;IAAnD,IAAA,kBAAM,EAAC,mDAAuB,CAAC;;2EAA8D;AACpD;IAAzC,IAAA,kBAAM,EAAC,8BAAa,CAAC;8BAA4B,8BAAa;iEAAC;AACrB;IAA1C,IAAA,kBAAM,EAAC,qBAAc,CAAC;8BAAoC,qBAAc;yEAAC;4CAJhE,iCAAiC;IAD7C,IAAA,sBAAU,GAAE;GACA,iCAAiC,CA+F7C;AAED;;;;;;;GAOG;AACH,SAAgB,yBAAyB,CAAC,IAAqB;IAC5D,IAAI,CAAC,iCAAiC,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACpE,IAAI,CAAC,mEAA+B,CAAC,CAAC,SAAS,CAAC,iCAAiC,CAAC,CAAC;AACtF,CAAC"}
|
package/lib/browser/index.d.ts
CHANGED
|
@@ -10,4 +10,6 @@ export * from './channel-logger';
|
|
|
10
10
|
export * from './log-level-preference';
|
|
11
11
|
export * from './browser-capture';
|
|
12
12
|
export * from './memory-diagnostics-contribution';
|
|
13
|
+
export * from './session-aware-connection-source';
|
|
14
|
+
export * from './connection-diagnostics-contribution';
|
|
13
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAGlF,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mCAAmC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAGlF,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC"}
|
package/lib/browser/index.js
CHANGED
|
@@ -27,4 +27,6 @@ __exportStar(require("./channel-logger"), exports);
|
|
|
27
27
|
__exportStar(require("./log-level-preference"), exports);
|
|
28
28
|
__exportStar(require("./browser-capture"), exports);
|
|
29
29
|
__exportStar(require("./memory-diagnostics-contribution"), exports);
|
|
30
|
+
__exportStar(require("./session-aware-connection-source"), exports);
|
|
31
|
+
__exportStar(require("./connection-diagnostics-contribution"), exports);
|
|
30
32
|
//# sourceMappingURL=index.js.map
|
package/lib/browser/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;;;;;AAElF,gFAAgF;AAChF,mDAAiC;AACjC,yDAAuC;AACvC,oDAAkC;AAClC,oEAAkD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;;;;;AAElF,gFAAgF;AAChF,mDAAiC;AACjC,yDAAuC;AACvC,oDAAkC;AAClC,oEAAkD;AAClD,oEAAkD;AAClD,wEAAsD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-level-preference.d.ts","sourceRoot":"","sources":["../../src/browser/log-level-preference.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,oBAAoB,EAAyB,MAAM,qBAAqB,CAAC;AAIlF,OAAO,EAAE,+BAA+B,EAAE,MAAM,2DAA2D,CAAC;AAC5G,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uDAAuD,CAAC;AAC1F,OAAO,EAAsB,KAAK,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAEnF,4FAA4F;AAC5F,eAAO,MAAM,kBAAkB,eAA+B,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBACa,8BAA+B,YAAW,+BAA+B;IACvD,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAG,MAAM,CAAC;IAC5C,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAG,iBAAiB,CAAC;IAC7D,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAG,OAAO,CAAC;IAErD;;gEAE4D;IAC5D,SAAS,CAAC,QAAQ,CAAC,SAAS,uBAA8B;IAC1D;;mBAEe;IACf,SAAS,CAAC,UAAU,UAAS;IAE7B;;;;;;;;;;OAUG;IACH,OAAO,IAAI,IAAI;IAIf;yEACqE;cACrD,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAsB/C,MAAM,IAAI,IAAI;IAId;;;;;;OAMG;IACH,SAAS,CAAC,UAAU,IAAI,IAAI;
|
|
1
|
+
{"version":3,"file":"log-level-preference.d.ts","sourceRoot":"","sources":["../../src/browser/log-level-preference.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,oBAAoB,EAAyB,MAAM,qBAAqB,CAAC;AAIlF,OAAO,EAAE,+BAA+B,EAAE,MAAM,2DAA2D,CAAC;AAC5G,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uDAAuD,CAAC;AAC1F,OAAO,EAAsB,KAAK,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAEnF,4FAA4F;AAC5F,eAAO,MAAM,kBAAkB,eAA+B,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBACa,8BAA+B,YAAW,+BAA+B;IACvD,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAG,MAAM,CAAC;IAC5C,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAG,iBAAiB,CAAC;IAC7D,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAG,OAAO,CAAC;IAErD;;gEAE4D;IAC5D,SAAS,CAAC,QAAQ,CAAC,SAAS,uBAA8B;IAC1D;;mBAEe;IACf,SAAS,CAAC,UAAU,UAAS;IAE7B;;;;;;;;;;OAUG;IACH,OAAO,IAAI,IAAI;IAIf;yEACqE;cACrD,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAsB/C,MAAM,IAAI,IAAI;IAId;;;;;;OAMG;IACH,SAAS,CAAC,UAAU,IAAI,IAAI;CAiB9B;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,GAAG,IAAI,CAI1F"}
|
|
@@ -111,7 +111,18 @@ let LogLevelPreferenceContribution = class LogLevelPreferenceContribution {
|
|
|
111
111
|
applyLevel() {
|
|
112
112
|
const level = (0, protocol_1.parseLogLevel)(this.preferences.get(this.preferenceName));
|
|
113
113
|
if (level) {
|
|
114
|
+
const previous = protocol_1.Logger.getLevel();
|
|
114
115
|
protocol_1.Logger.setLevel(level);
|
|
116
|
+
if (previous !== level) {
|
|
117
|
+
// Through Theia's `ILogger`, which has a threshold of its own and so
|
|
118
|
+
// is not silenced by the value just applied — the framework logger
|
|
119
|
+
// this preference governs would drop the line on a switch to `error`.
|
|
120
|
+
//
|
|
121
|
+
// Frontend and server announce separately: this preference reaches
|
|
122
|
+
// the server only if a client delivers it as configuration, so one
|
|
123
|
+
// line without the other says it did not.
|
|
124
|
+
this.logger.info(`Log level ${previous} → ${level} (preference '${this.preferenceName}')`);
|
|
125
|
+
}
|
|
115
126
|
}
|
|
116
127
|
}
|
|
117
128
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-level-preference.js","sourceRoot":"","sources":["../../src/browser/log-level-preference.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"log-level-preference.js","sourceRoot":"","sources":["../../src/browser/log-level-preference.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;AA8HlF,wDAIC;AAhID,kDAAkF;AAClF,gFAAgF;AAChF,gFAAgF;AAChF,6EAA6E;AAC7E,iHAA4G;AAC5G,0DAAwD;AACxD,8FAA0F;AAC1F,4DAAmF;AAEnF,4FAA4F;AAC/E,QAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;GAoBG;AAEI,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IACO,cAAc,CAAU;IACzB,WAAW,CAAqB;IAC1C,MAAM,CAAW;IAErD;;gEAE4D;IACzC,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC1D;;mBAEe;IACL,UAAU,GAAG,KAAK,CAAC;IAE7B;;;;;;;;;;OAUG;IACH,OAAO;QACJ,KAAK,IAAI,CAAC,cAAc,EAAE,CAAC;IAC9B,CAAC;IAED;yEACqE;IAC3D,KAAK,CAAC,cAAc;QAC3B,IAAI,CAAC;YACF,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;YAC7B,IAAI,CAAC,UAAU,EAAE,CAAC;YAClB,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;gBACnB,OAAO;YACV,CAAC;YACD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;YACvB,IAAI,CAAC,SA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,kBAAM,EAAC,gBAAO,CAAC;;8DAAqC;yCAH3C,8BAA8B;IAD1C,IAAA,sBAAU,GAAE;GACA,8BAA8B,CAiF1C;AAED;;;;;;GAMG;AACH,SAAgB,sBAAsB,CAAC,IAAqB,EAAE,cAAsB;IACjF,IAAI,CAAC,0BAAkB,CAAC,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;IACzD,IAAI,CAAC,8BAA8B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACjE,IAAI,CAAC,mEAA+B,CAAC,CAAC,SAAS,CAAC,8BAA8B,CAAC,CAAC;AACnF,CAAC"}
|
|
@@ -43,6 +43,15 @@ export declare const MemoryDiagnosticsService: unique symbol;
|
|
|
43
43
|
*/
|
|
44
44
|
export type HostMemoryDiagnosticsService = HostDiagnosticsProtocol;
|
|
45
45
|
export declare const HostMemoryDiagnosticsService: unique symbol;
|
|
46
|
+
/**
|
|
47
|
+
* What a `report` call captured, as a code rather than a prose fragment. The
|
|
48
|
+
* sentences it appears in are authored once per code, because a fragment
|
|
49
|
+
* substituted into a sentence is itself translatable text and a translator
|
|
50
|
+
* given the sentence alone cannot inflect around a hole.
|
|
51
|
+
*/
|
|
52
|
+
export type DiagnosticsSubject = 'server-state' | 'pod-memory' | 'latency' | 'backend-state' | 'profile';
|
|
53
|
+
/** Which process a heap snapshot is taken of; a code, for the reason {@link DiagnosticsSubject} is one. */
|
|
54
|
+
export type HeapSnapshotTarget = 'server' | 'backend';
|
|
46
55
|
/**
|
|
47
56
|
* Memory-diagnostics commands, one per layer reachable from the frontend. Full
|
|
48
57
|
* multi-line snapshots are appended to the configured output channel; a one-line
|
|
@@ -77,14 +86,28 @@ export declare class MemoryDiagnosticsContribution implements CommandContributio
|
|
|
77
86
|
*/
|
|
78
87
|
protected readonly stopProfilingLabel: string;
|
|
79
88
|
registerCommands(registry: CommandRegistry): void;
|
|
80
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Takes an object rather than positional arguments so that `label` — the one
|
|
91
|
+
* user-facing member — is addressable by name. A lint rule guarding the
|
|
92
|
+
* localization of labels has only syntax to work with, and a selector for an
|
|
93
|
+
* argument position would equally catch `id`, which must stay a bare literal.
|
|
94
|
+
*/
|
|
95
|
+
protected command(spec: {
|
|
96
|
+
id: string;
|
|
97
|
+
label: string;
|
|
98
|
+
category: string;
|
|
99
|
+
}): Command;
|
|
100
|
+
/** The record window as whole seconds, for the label and the toast that must agree on it. */
|
|
101
|
+
protected recordDurationSeconds(): number;
|
|
81
102
|
/** Run a snapshot call, append the full result to the channel, toast the first matching summary line. */
|
|
82
|
-
protected report(
|
|
83
|
-
protected writeSnapshot(target:
|
|
103
|
+
protected report(subject: DiagnosticsSubject, produce: () => Promise<string>, summaryKeys: string[]): Promise<void>;
|
|
104
|
+
protected writeSnapshot(target: HeapSnapshotTarget, produce: (label: string) => Promise<string>): Promise<void>;
|
|
84
105
|
/** Begin an open-ended capture; the toast's stop action ends it and reports. */
|
|
85
106
|
protected startProfiling(): Promise<void>;
|
|
86
107
|
/** End the capture and report it. Shared, so the toast action and the command cannot diverge in behaviour. */
|
|
87
108
|
protected stopProfiling(): Promise<void>;
|
|
109
|
+
/** One authored sentence for both start paths; identical literals in two places drift apart under translation. */
|
|
110
|
+
protected startProfilingFailedMessage(detail: string): string;
|
|
88
111
|
/** Capture a fixed-length window: start, wait, stop, and report the result. */
|
|
89
112
|
protected recordProfile(): Promise<void>;
|
|
90
113
|
/** Isolated so tests can drive the record window without a real timer. */
|
|
@@ -92,7 +115,20 @@ export declare class MemoryDiagnosticsContribution implements CommandContributio
|
|
|
92
115
|
protected dumpFrontendState(): Promise<void>;
|
|
93
116
|
protected channel(): OutputChannel;
|
|
94
117
|
/** Pull the first line starting with one of `keys` for a one-line toast; full text is in the channel. */
|
|
95
|
-
protected summarize(snapshot: string,
|
|
118
|
+
protected summarize(snapshot: string, subject: DiagnosticsSubject, keys: string[]): string;
|
|
119
|
+
/**
|
|
120
|
+
* The captured-with-detail toast. The detail is a machine-formatted figure,
|
|
121
|
+
* so it is safe as a substitution parameter; the subject is not, hence one
|
|
122
|
+
* authored sentence per subject.
|
|
123
|
+
*/
|
|
124
|
+
protected capturedDetailMessage(subject: DiagnosticsSubject, detail: string): string;
|
|
125
|
+
/** The captured-without-detail toast; the channel name is adopter branding, not translatable text. */
|
|
126
|
+
protected capturedChannelMessage(subject: DiagnosticsSubject): string;
|
|
127
|
+
/** The failed-to-dump toast; the detail is a technical error string, safe as a parameter. */
|
|
128
|
+
protected dumpFailedMessage(subject: DiagnosticsSubject, detail: string): string;
|
|
129
|
+
protected writingSnapshotMessage(target: HeapSnapshotTarget): string;
|
|
130
|
+
protected wroteSnapshotMessage(target: HeapSnapshotTarget, filePath: string): string;
|
|
131
|
+
protected writeSnapshotFailedMessage(target: HeapSnapshotTarget, detail: string): string;
|
|
96
132
|
protected errorMessage(error: unknown): string;
|
|
97
133
|
}
|
|
98
134
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-diagnostics-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/memory-diagnostics-contribution.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAEJ,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACzB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,mBAAmB,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"memory-diagnostics-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/memory-diagnostics-contribution.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAEJ,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACzB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAO,KAAK,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAC3G,OAAO,EAAgC,KAAK,UAAU,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