@codingame/monaco-vscode-remote-agent-service-override 3.2.3 → 4.1.0

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 (24) hide show
  1. package/package.json +3 -3
  2. package/remoteAgent.js +9 -9
  3. package/external/rollup-plugin-styles/dist/runtime/inject-css.js +0 -3
  4. package/override/vs/platform/dialogs/common/dialogs.js +0 -8
  5. package/vscode/src/vs/platform/download/common/downloadIpc.js +0 -18
  6. package/vscode/src/vs/platform/log/common/logIpc.js +0 -26
  7. package/vscode/src/vs/platform/remote/browser/remoteAuthorityResolverService.js +0 -110
  8. package/vscode/src/vs/workbench/contrib/remote/browser/explorerViewItems.js +0 -135
  9. package/vscode/src/vs/workbench/contrib/remote/browser/media/remoteViewlet.css.js +0 -6
  10. package/vscode/src/vs/workbench/contrib/remote/browser/remote.contribution.js +0 -19
  11. package/vscode/src/vs/workbench/contrib/remote/browser/remote.js +0 -831
  12. package/vscode/src/vs/workbench/contrib/remote/browser/remoteConnectionHealth.js +0 -158
  13. package/vscode/src/vs/workbench/contrib/remote/browser/remoteIndicator.js +0 -774
  14. package/vscode/src/vs/workbench/contrib/remote/browser/remoteStartEntry.contribution.js +0 -6
  15. package/vscode/src/vs/workbench/contrib/remote/browser/remoteStartEntry.js +0 -97
  16. package/vscode/src/vs/workbench/contrib/remote/browser/showCandidate.js +0 -35
  17. package/vscode/src/vs/workbench/contrib/remote/browser/tunnelFactory.js +0 -110
  18. package/vscode/src/vs/workbench/contrib/remote/common/remote.contribution.js +0 -515
  19. package/vscode/src/vs/workbench/services/remote/browser/browserRemoteResourceHandler.js +0 -49
  20. package/vscode/src/vs/workbench/services/remote/browser/remoteAgentService.js +0 -78
  21. package/vscode/src/vs/workbench/services/remote/common/abstractRemoteAgentService.js +0 -179
  22. package/vscode/src/vs/workbench/services/remote/common/remoteAgentEnvironmentChannel.js +0 -54
  23. package/vscode/src/vs/workbench/services/remote/common/remoteExtensionsScanner.js +0 -73
  24. package/vscode/src/vs/workbench/services/tunnel/browser/tunnelService.js +0 -36
@@ -1,179 +0,0 @@
1
- import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
3
- import { getDelayedChannel } from 'vscode/vscode/vs/base/parts/ipc/common/ipc';
4
- import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService';
5
- import { connectRemoteAgentManagement } from 'vscode/vscode/vs/platform/remote/common/remoteAgentConnection';
6
- import { IRemoteAuthorityResolverService } from 'vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver';
7
- import { RemoteExtensionEnvironmentChannelClient } from './remoteAgentEnvironmentChannel.js';
8
- import { Emitter } from 'vscode/vscode/vs/base/common/event';
9
- import { ISignService } from 'vscode/vscode/vs/platform/sign/common/sign';
10
- import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
11
- import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService';
12
- import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile';
13
- import { IRemoteSocketFactoryService } from 'vscode/vscode/vs/platform/remote/common/remoteSocketFactoryService';
14
-
15
- let AbstractRemoteAgentService = class AbstractRemoteAgentService extends Disposable {
16
- constructor(remoteSocketFactoryService, userDataProfileService, _environmentService, productService, _remoteAuthorityResolverService, signService, logService) {
17
- super();
18
- this.remoteSocketFactoryService = remoteSocketFactoryService;
19
- this.userDataProfileService = userDataProfileService;
20
- this._environmentService = _environmentService;
21
- this._remoteAuthorityResolverService = _remoteAuthorityResolverService;
22
- if (this._environmentService.remoteAuthority) {
23
- this._connection = this._register(( new RemoteAgentConnection(
24
- this._environmentService.remoteAuthority,
25
- productService.commit,
26
- productService.quality,
27
- this.remoteSocketFactoryService,
28
- this._remoteAuthorityResolverService,
29
- signService,
30
- logService
31
- )));
32
- }
33
- else {
34
- this._connection = null;
35
- }
36
- this._environment = null;
37
- }
38
- getConnection() {
39
- return this._connection;
40
- }
41
- getEnvironment() {
42
- return this.getRawEnvironment().then(undefined, () => null);
43
- }
44
- getRawEnvironment() {
45
- if (!this._environment) {
46
- this._environment = this._withChannel(async (channel, connection) => {
47
- const env = await RemoteExtensionEnvironmentChannelClient.getEnvironmentData(channel, connection.remoteAuthority, this.userDataProfileService.currentProfile.isDefault ? undefined : this.userDataProfileService.currentProfile.id);
48
- this._remoteAuthorityResolverService._setAuthorityConnectionToken(connection.remoteAuthority, env.connectionToken);
49
- return env;
50
- }, null);
51
- }
52
- return this._environment;
53
- }
54
- getExtensionHostExitInfo(reconnectionToken) {
55
- return this._withChannel((channel, connection) => RemoteExtensionEnvironmentChannelClient.getExtensionHostExitInfo(channel, connection.remoteAuthority, reconnectionToken), null);
56
- }
57
- getDiagnosticInfo(options) {
58
- return this._withChannel(channel => RemoteExtensionEnvironmentChannelClient.getDiagnosticInfo(channel, options), undefined);
59
- }
60
- updateTelemetryLevel(telemetryLevel) {
61
- return this._withTelemetryChannel(channel => RemoteExtensionEnvironmentChannelClient.updateTelemetryLevel(channel, telemetryLevel), undefined);
62
- }
63
- logTelemetry(eventName, data) {
64
- return this._withTelemetryChannel(channel => RemoteExtensionEnvironmentChannelClient.logTelemetry(channel, eventName, data), undefined);
65
- }
66
- flushTelemetry() {
67
- return this._withTelemetryChannel(channel => RemoteExtensionEnvironmentChannelClient.flushTelemetry(channel), undefined);
68
- }
69
- getRoundTripTime() {
70
- return this._withTelemetryChannel(async (channel) => {
71
- const start = Date.now();
72
- await RemoteExtensionEnvironmentChannelClient.ping(channel);
73
- return Date.now() - start;
74
- }, undefined);
75
- }
76
- _withChannel(callback, fallback) {
77
- const connection = this.getConnection();
78
- if (!connection) {
79
- return Promise.resolve(fallback);
80
- }
81
- return connection.withChannel('remoteextensionsenvironment', (channel) => callback(channel, connection));
82
- }
83
- _withTelemetryChannel(callback, fallback) {
84
- const connection = this.getConnection();
85
- if (!connection) {
86
- return Promise.resolve(fallback);
87
- }
88
- return connection.withChannel('telemetry', (channel) => callback(channel, connection));
89
- }
90
- };
91
- AbstractRemoteAgentService = ( __decorate([
92
- ( __param(0, IRemoteSocketFactoryService)),
93
- ( __param(1, IUserDataProfileService)),
94
- ( __param(2, IWorkbenchEnvironmentService)),
95
- ( __param(3, IProductService)),
96
- ( __param(4, IRemoteAuthorityResolverService)),
97
- ( __param(5, ISignService)),
98
- ( __param(6, ILogService))
99
- ], AbstractRemoteAgentService));
100
- class RemoteAgentConnection extends Disposable {
101
- constructor(remoteAuthority, _commit, _quality, _remoteSocketFactoryService, _remoteAuthorityResolverService, _signService, _logService) {
102
- super();
103
- this._commit = _commit;
104
- this._quality = _quality;
105
- this._remoteSocketFactoryService = _remoteSocketFactoryService;
106
- this._remoteAuthorityResolverService = _remoteAuthorityResolverService;
107
- this._signService = _signService;
108
- this._logService = _logService;
109
- this._onReconnecting = this._register(( new Emitter()));
110
- this.onReconnecting = this._onReconnecting.event;
111
- this._onDidStateChange = this._register(( new Emitter()));
112
- this.onDidStateChange = this._onDidStateChange.event;
113
- this.remoteAuthority = remoteAuthority;
114
- this._connection = null;
115
- }
116
- getChannel(channelName) {
117
- return getDelayedChannel(this._getOrCreateConnection().then(c => c.getChannel(channelName)));
118
- }
119
- withChannel(channelName, callback) {
120
- const channel = this.getChannel(channelName);
121
- const result = callback(channel);
122
- return result;
123
- }
124
- registerChannel(channelName, channel) {
125
- this._getOrCreateConnection().then(client => client.registerChannel(channelName, channel));
126
- }
127
- async getInitialConnectionTimeMs() {
128
- try {
129
- await this._getOrCreateConnection();
130
- }
131
- catch {
132
- }
133
- return this._initialConnectionMs;
134
- }
135
- _getOrCreateConnection() {
136
- if (!this._connection) {
137
- this._connection = this._createConnection();
138
- }
139
- return this._connection;
140
- }
141
- async _createConnection() {
142
- let firstCall = true;
143
- const options = {
144
- commit: this._commit,
145
- quality: this._quality,
146
- addressProvider: {
147
- getAddress: async () => {
148
- if (firstCall) {
149
- firstCall = false;
150
- }
151
- else {
152
- this._onReconnecting.fire(undefined);
153
- }
154
- const { authority } = await this._remoteAuthorityResolverService.resolveAuthority(this.remoteAuthority);
155
- return { connectTo: authority.connectTo, connectionToken: authority.connectionToken };
156
- }
157
- },
158
- remoteSocketFactoryService: this._remoteSocketFactoryService,
159
- signService: this._signService,
160
- logService: this._logService,
161
- ipcLogger: null
162
- };
163
- let connection;
164
- const start = Date.now();
165
- try {
166
- connection = this._register(await connectRemoteAgentManagement(options, this.remoteAuthority, `renderer`));
167
- }
168
- finally {
169
- this._initialConnectionMs = Date.now() - start;
170
- }
171
- connection.protocol.onDidDispose(() => {
172
- connection.dispose();
173
- });
174
- this._register(connection.onDidStateChange(e => this._onDidStateChange.fire(e)));
175
- return connection.client;
176
- }
177
- }
178
-
179
- export { AbstractRemoteAgentService };
@@ -1,54 +0,0 @@
1
- import { URI } from 'vscode/vscode/vs/base/common/uri';
2
- import { revive } from 'vscode/vscode/vs/base/common/marshalling';
3
-
4
- class RemoteExtensionEnvironmentChannelClient {
5
- static async getEnvironmentData(channel, remoteAuthority, profile) {
6
- const args = {
7
- remoteAuthority,
8
- profile
9
- };
10
- const data = await channel.call('getEnvironmentData', args);
11
- return {
12
- pid: data.pid,
13
- connectionToken: data.connectionToken,
14
- appRoot: URI.revive(data.appRoot),
15
- settingsPath: URI.revive(data.settingsPath),
16
- logsPath: URI.revive(data.logsPath),
17
- extensionHostLogsPath: URI.revive(data.extensionHostLogsPath),
18
- globalStorageHome: URI.revive(data.globalStorageHome),
19
- workspaceStorageHome: URI.revive(data.workspaceStorageHome),
20
- localHistoryHome: URI.revive(data.localHistoryHome),
21
- userHome: URI.revive(data.userHome),
22
- os: data.os,
23
- arch: data.arch,
24
- marks: data.marks,
25
- useHostProxy: data.useHostProxy,
26
- profiles: revive(data.profiles),
27
- isUnsupportedGlibc: data.isUnsupportedGlibc
28
- };
29
- }
30
- static async getExtensionHostExitInfo(channel, remoteAuthority, reconnectionToken) {
31
- const args = {
32
- remoteAuthority,
33
- reconnectionToken
34
- };
35
- return channel.call('getExtensionHostExitInfo', args);
36
- }
37
- static getDiagnosticInfo(channel, options) {
38
- return channel.call('getDiagnosticInfo', options);
39
- }
40
- static updateTelemetryLevel(channel, telemetryLevel) {
41
- return channel.call('updateTelemetryLevel', { telemetryLevel });
42
- }
43
- static logTelemetry(channel, eventName, data) {
44
- return channel.call('logTelemetry', { eventName, data });
45
- }
46
- static flushTelemetry(channel) {
47
- return channel.call('flushTelemetry');
48
- }
49
- static async ping(channel) {
50
- await channel.call('ping');
51
- }
52
- }
53
-
54
- export { RemoteExtensionEnvironmentChannelClient };
@@ -1,73 +0,0 @@
1
- import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import { IRemoteAgentService } from 'vscode/vscode/vs/workbench/services/remote/common/remoteAgentService';
3
- import { RemoteExtensionsScannerChannelName } from 'vscode/vscode/vs/platform/remote/common/remoteExtensionsScanner';
4
- import { language } from 'vscode/vscode/vs/base/common/platform';
5
- import { URI } from 'vscode/vscode/vs/base/common/uri';
6
- import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile';
7
- import { IRemoteUserDataProfilesService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/remoteUserDataProfiles';
8
- import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService';
9
- import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
10
- import { IActiveLanguagePackService } from 'vscode/vscode/vs/workbench/services/localization/common/locale';
11
-
12
- let RemoteExtensionsScannerService = class RemoteExtensionsScannerService {
13
- constructor(remoteAgentService, environmentService, userDataProfileService, remoteUserDataProfilesService, logService, activeLanguagePackService) {
14
- this.remoteAgentService = remoteAgentService;
15
- this.environmentService = environmentService;
16
- this.userDataProfileService = userDataProfileService;
17
- this.remoteUserDataProfilesService = remoteUserDataProfilesService;
18
- this.logService = logService;
19
- this.activeLanguagePackService = activeLanguagePackService;
20
- }
21
- whenExtensionsReady() {
22
- return this.withChannel(channel => channel.call('whenExtensionsReady'), undefined);
23
- }
24
- async scanExtensions() {
25
- try {
26
- const languagePack = await this.activeLanguagePackService.getExtensionIdProvidingCurrentLocale();
27
- return await this.withChannel(async (channel) => {
28
- const profileLocation = this.userDataProfileService.currentProfile.isDefault ? undefined : (await this.remoteUserDataProfilesService.getRemoteProfile(this.userDataProfileService.currentProfile)).extensionsResource;
29
- const scannedExtensions = await channel.call('scanExtensions', [language, profileLocation, this.environmentService.extensionDevelopmentLocationURI, languagePack]);
30
- scannedExtensions.forEach((extension) => {
31
- extension.extensionLocation = URI.revive(extension.extensionLocation);
32
- });
33
- return scannedExtensions;
34
- }, []);
35
- }
36
- catch (error) {
37
- this.logService.error(error);
38
- return [];
39
- }
40
- }
41
- async scanSingleExtension(extensionLocation, isBuiltin) {
42
- try {
43
- return await this.withChannel(async (channel) => {
44
- const extension = await channel.call('scanSingleExtension', [extensionLocation, isBuiltin, language]);
45
- if (extension !== null) {
46
- extension.extensionLocation = URI.revive(extension.extensionLocation);
47
- }
48
- return extension;
49
- }, null);
50
- }
51
- catch (error) {
52
- this.logService.error(error);
53
- return null;
54
- }
55
- }
56
- withChannel(callback, fallback) {
57
- const connection = this.remoteAgentService.getConnection();
58
- if (!connection) {
59
- return Promise.resolve(fallback);
60
- }
61
- return connection.withChannel(RemoteExtensionsScannerChannelName, (channel) => callback(channel));
62
- }
63
- };
64
- RemoteExtensionsScannerService = ( __decorate([
65
- ( __param(0, IRemoteAgentService)),
66
- ( __param(1, IWorkbenchEnvironmentService)),
67
- ( __param(2, IUserDataProfileService)),
68
- ( __param(3, IRemoteUserDataProfilesService)),
69
- ( __param(4, ILogService)),
70
- ( __param(5, IActiveLanguagePackService))
71
- ], RemoteExtensionsScannerService));
72
-
73
- export { RemoteExtensionsScannerService };
@@ -1,36 +0,0 @@
1
- import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
3
- import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
4
- import { AbstractTunnelService, isTunnelProvider } from 'vscode/vscode/vs/platform/tunnel/common/tunnel';
5
- import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService';
6
-
7
- let TunnelService = class TunnelService extends AbstractTunnelService {
8
- constructor(logService, environmentService, configurationService) {
9
- super(logService, configurationService);
10
- this.environmentService = environmentService;
11
- }
12
- isPortPrivileged(_port) {
13
- return false;
14
- }
15
- retainOrCreateTunnel(tunnelProvider, remoteHost, remotePort, _localHost, localPort, elevateIfNeeded, privacy, protocol) {
16
- const existing = this.getTunnelFromMap(remoteHost, remotePort);
17
- if (existing) {
18
- ++existing.refcount;
19
- return existing.value;
20
- }
21
- if (isTunnelProvider(tunnelProvider)) {
22
- return this.createWithProvider(tunnelProvider, remoteHost, remotePort, localPort, elevateIfNeeded, privacy, protocol);
23
- }
24
- return undefined;
25
- }
26
- canTunnel(uri) {
27
- return super.canTunnel(uri) && !!this.environmentService.remoteAuthority;
28
- }
29
- };
30
- TunnelService = ( __decorate([
31
- ( __param(0, ILogService)),
32
- ( __param(1, IWorkbenchEnvironmentService)),
33
- ( __param(2, IConfigurationService))
34
- ], TunnelService));
35
-
36
- export { TunnelService };