@codingame/monaco-vscode-1b4486de-4fe4-59c4-9e6d-34f265ff6625-common 13.1.6 → 14.0.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.
- package/package.json +8 -8
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.js +4 -4
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +25 -16
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +17 -17
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +60 -60
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@codingame/monaco-vscode-1b4486de-4fe4-59c4-9e6d-34f265ff6625-common",
|
3
|
-
"version": "
|
3
|
+
"version": "14.0.0",
|
4
4
|
"private": false,
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - common package (remote-agent, view-common)",
|
6
6
|
"keywords": [],
|
@@ -15,13 +15,13 @@
|
|
15
15
|
},
|
16
16
|
"type": "module",
|
17
17
|
"dependencies": {
|
18
|
-
"@codingame/monaco-vscode-422642f2-7e3a-5c1c-9e1e-1d3ef1817346-common": "
|
19
|
-
"@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "
|
20
|
-
"@codingame/monaco-vscode-
|
21
|
-
"@codingame/monaco-vscode-
|
22
|
-
"@codingame/monaco-vscode-a7c9ae3c-16d2-5d17-86b2-981be7094566-common": "
|
23
|
-
"@codingame/monaco-vscode-api": "
|
24
|
-
"@codingame/monaco-vscode-bd6ad8b7-9db3-51a8-9895-0046508c029d-common": "
|
18
|
+
"@codingame/monaco-vscode-422642f2-7e3a-5c1c-9e1e-1d3ef1817346-common": "14.0.0",
|
19
|
+
"@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "14.0.0",
|
20
|
+
"@codingame/monaco-vscode-91789cdf-e3cb-5a04-aaeb-6f7df7d3d231-common": "14.0.0",
|
21
|
+
"@codingame/monaco-vscode-9a1a5840-af83-5d07-a156-ba32a36c5c4b-common": "14.0.0",
|
22
|
+
"@codingame/monaco-vscode-a7c9ae3c-16d2-5d17-86b2-981be7094566-common": "14.0.0",
|
23
|
+
"@codingame/monaco-vscode-api": "14.0.0",
|
24
|
+
"@codingame/monaco-vscode-bd6ad8b7-9db3-51a8-9895-0046508c029d-common": "14.0.0"
|
25
25
|
},
|
26
26
|
"exports": {
|
27
27
|
".": {
|
package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.js
CHANGED
@@ -128,15 +128,15 @@ let ExternalUriOpenerService = class ExternalUriOpenerService extends Disposable
|
|
128
128
|
}));
|
129
129
|
items.push({
|
130
130
|
label: isWeb
|
131
|
-
? ( localize(
|
132
|
-
: ( localize(
|
131
|
+
? ( localize(6488, 'Open in new browser window'))
|
132
|
+
: ( localize(6489, 'Open in default browser')),
|
133
133
|
opener: undefined
|
134
134
|
}, { type: 'separator' }, {
|
135
|
-
label: ( localize(
|
135
|
+
label: ( localize(6490, "Configure default opener...")),
|
136
136
|
opener: 'configureDefault'
|
137
137
|
});
|
138
138
|
const picked = await this.quickInputService.pick(items, {
|
139
|
-
placeHolder: ( localize(
|
139
|
+
placeHolder: ( localize(6491, "How would you like to open: {0}", (targetUri.toString())))
|
140
140
|
});
|
141
141
|
if (!picked) {
|
142
142
|
return true;
|
@@ -28,6 +28,7 @@ export declare class ForwardedPortsView extends Disposable implements IWorkbench
|
|
28
28
|
private readonly contextKeyListener;
|
29
29
|
private readonly activityBadge;
|
30
30
|
private entryAccessor;
|
31
|
+
private hasPortsInSession;
|
31
32
|
constructor(contextKeyService: IContextKeyService, environmentService: IWorkbenchEnvironmentService, remoteExplorerService: IRemoteExplorerService, tunnelService: ITunnelService, activityService: IActivityService, statusbarService: IStatusbarService);
|
32
33
|
private getViewContainer;
|
33
34
|
private enableForwardedPortsFeatures;
|
@@ -24,7 +24,7 @@ import { OperatingSystem, isWeb } from '@codingame/monaco-vscode-api/vscode/vs/b
|
|
24
24
|
import { TunnelPrivacyId } from '@codingame/monaco-vscode-api/vscode/vs/platform/tunnel/common/tunnel';
|
25
25
|
import { ITunnelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/tunnel/common/tunnel.service';
|
26
26
|
import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors';
|
27
|
-
import { ViewPaneContainer } from '@codingame/monaco-vscode-
|
27
|
+
import { ViewPaneContainer } from '@codingame/monaco-vscode-91789cdf-e3cb-5a04-aaeb-6f7df7d3d231-common/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
28
28
|
import { NumberBadge } from '@codingame/monaco-vscode-a7c9ae3c-16d2-5d17-86b2-981be7094566-common/vscode/vs/workbench/services/activity/common/activity';
|
29
29
|
import { IActivityService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/activity/common/activity.service';
|
30
30
|
import { portsViewIcon } from './remoteIcons.js';
|
@@ -51,25 +51,31 @@ let ForwardedPortsView = class ForwardedPortsView extends Disposable {
|
|
51
51
|
this.statusbarService = statusbarService;
|
52
52
|
this.contextKeyListener = this._register(( new MutableDisposable()));
|
53
53
|
this.activityBadge = this._register(( new MutableDisposable()));
|
54
|
+
this.hasPortsInSession = false;
|
54
55
|
this._register(( Registry.as(Extensions.ViewsRegistry)).registerViewWelcomeContent(TUNNEL_VIEW_ID, {
|
55
56
|
content: this.environmentService.remoteAuthority ? ( localize(
|
56
|
-
|
57
|
+
8427,
|
57
58
|
"No forwarded ports. Forward a port to access your running services locally.\n[Forward a Port]({0})",
|
58
59
|
`command:${ForwardPortAction.INLINE_ID}`
|
59
60
|
))
|
60
61
|
: ( localize(
|
61
|
-
|
62
|
+
8428,
|
62
63
|
"No forwarded ports. Forward a port to access your locally running services over the internet.\n[Forward a Port]({0})",
|
63
64
|
`command:${ForwardPortAction.INLINE_ID}`
|
64
65
|
)),
|
65
66
|
}));
|
66
67
|
this.enableBadgeAndStatusBar();
|
67
68
|
this.enableForwardedPortsFeatures();
|
69
|
+
if (!this.environmentService.remoteAuthority) {
|
70
|
+
this._register(Event.once(this.tunnelService.onTunnelOpened)(() => {
|
71
|
+
this.hasPortsInSession = true;
|
72
|
+
}));
|
73
|
+
}
|
68
74
|
}
|
69
75
|
async getViewContainer() {
|
70
76
|
return ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
|
71
77
|
id: TUNNEL_VIEW_CONTAINER_ID,
|
72
|
-
title: ( localize2(
|
78
|
+
title: ( localize2(8429, "Ports")),
|
73
79
|
icon: portsViewIcon,
|
74
80
|
ctorDescriptor: ( new SyncDescriptor(
|
75
81
|
ViewPaneContainer,
|
@@ -126,7 +132,7 @@ let ForwardedPortsView = class ForwardedPortsView extends Disposable {
|
|
126
132
|
this.activityBadge.value = this.activityService.showViewActivity(TUNNEL_VIEW_ID, {
|
127
133
|
badge: ( new NumberBadge(
|
128
134
|
this.remoteExplorerService.tunnelModel.forwarded.size,
|
129
|
-
n => n === 1 ? ( localize(
|
135
|
+
n => n === 1 ? ( localize(8430, "1 forwarded port")) : ( localize(8431, "{0} forwarded ports", n))
|
130
136
|
))
|
131
137
|
});
|
132
138
|
}
|
@@ -135,6 +141,9 @@ let ForwardedPortsView = class ForwardedPortsView extends Disposable {
|
|
135
141
|
}
|
136
142
|
}
|
137
143
|
updateStatusBar() {
|
144
|
+
if (!this.environmentService.remoteAuthority && !this.hasPortsInSession) {
|
145
|
+
return;
|
146
|
+
}
|
138
147
|
if (!this.entryAccessor) {
|
139
148
|
this._register(this.entryAccessor = this.statusbarService.addEntry(this.entry, 'status.forwardedPorts', StatusbarAlignment.LEFT, 40));
|
140
149
|
}
|
@@ -147,19 +156,19 @@ let ForwardedPortsView = class ForwardedPortsView extends Disposable {
|
|
147
156
|
const count = this.remoteExplorerService.tunnelModel.forwarded.size + this.remoteExplorerService.tunnelModel.detected.size;
|
148
157
|
const text = `${count}`;
|
149
158
|
if (count === 0) {
|
150
|
-
tooltip = ( localize(
|
159
|
+
tooltip = ( localize(8432, "No Ports Forwarded"));
|
151
160
|
}
|
152
161
|
else {
|
153
162
|
const allTunnels = Array.from(( this.remoteExplorerService.tunnelModel.forwarded.values()));
|
154
163
|
allTunnels.push(...Array.from(( this.remoteExplorerService.tunnelModel.detected.values())));
|
155
164
|
tooltip = ( localize(
|
156
|
-
|
165
|
+
8433,
|
157
166
|
"Forwarded Ports: {0}",
|
158
167
|
( allTunnels.map(forwarded => forwarded.remotePort)).join(', ')
|
159
168
|
));
|
160
169
|
}
|
161
170
|
return {
|
162
|
-
name: ( localize(
|
171
|
+
name: ( localize(8434, "Forwarded Ports")),
|
163
172
|
text: `$(radio-tower) ${text}`,
|
164
173
|
ariaLabel: tooltip,
|
165
174
|
tooltip,
|
@@ -264,19 +273,19 @@ let AutomaticPortForwarding = class AutomaticPortForwarding extends Disposable {
|
|
264
273
|
await this.configurationService.updateValue(PORT_AUTO_SOURCE_SETTING, PORT_AUTO_SOURCE_SETTING_HYBRID);
|
265
274
|
this.notificationService.notify({
|
266
275
|
message: ( localize(
|
267
|
-
|
276
|
+
8435,
|
268
277
|
"Over 20 ports have been automatically forwarded. The `process` based automatic port forwarding has been switched to `hybrid` in settings. Some ports may no longer be detected."
|
269
278
|
)),
|
270
279
|
severity: Severity.Warning,
|
271
280
|
actions: {
|
272
281
|
primary: [
|
273
|
-
( new Action('switchBack', ( localize(
|
282
|
+
( new Action('switchBack', ( localize(8436, "Undo")), undefined, true, async () => {
|
274
283
|
await this.configurationService.updateValue(PORT_AUTO_SOURCE_SETTING, PORT_AUTO_SOURCE_SETTING_PROCESS);
|
275
284
|
await this.configurationService.updateValue(PORT_AUTO_FALLBACK_SETTING, 0, ConfigurationTarget.WORKSPACE);
|
276
285
|
this.portListener?.dispose();
|
277
286
|
this.portListener = undefined;
|
278
287
|
})),
|
279
|
-
( new Action('showPortSourceSetting', ( localize(
|
288
|
+
( new Action('showPortSourceSetting', ( localize(8437, "Show Setting")), undefined, true, async () => {
|
280
289
|
await this.preferencesService.openSettings({
|
281
290
|
query: 'remote.autoForwardPortsSource'
|
282
291
|
});
|
@@ -486,14 +495,14 @@ class OnAutoForwardedAction extends Disposable {
|
|
486
495
|
const properties = await this.remoteExplorerService.tunnelModel.getAttributes([{ host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort }], false);
|
487
496
|
const label = properties?.get(tunnel.tunnelRemotePort)?.label;
|
488
497
|
return localize(
|
489
|
-
|
498
|
+
8438,
|
490
499
|
"Your application{0} running on port {1} is available. ",
|
491
500
|
label ? ` (${label})` : '',
|
492
501
|
tunnel.tunnelRemotePort
|
493
502
|
);
|
494
503
|
}
|
495
504
|
linkMessage() {
|
496
|
-
return localize(
|
505
|
+
return localize(8439, "[See all forwarded ports]({0})", `command:${TunnelPanel.ID}.focus`);
|
497
506
|
}
|
498
507
|
async showNotification(tunnel) {
|
499
508
|
if (!(await this.hostService.hadLastFocus())) {
|
@@ -507,7 +516,7 @@ class OnAutoForwardedAction extends Disposable {
|
|
507
516
|
}
|
508
517
|
if ((tunnel.tunnelLocalPort !== tunnel.tunnelRemotePort) && this.tunnelService.canElevate && this.tunnelService.isPortPrivileged(tunnel.tunnelRemotePort)) {
|
509
518
|
message += ( localize(
|
510
|
-
|
519
|
+
8440,
|
511
520
|
"You'll need to run as superuser to use port {0} locally. ",
|
512
521
|
tunnel.tunnelRemotePort
|
513
522
|
));
|
@@ -527,7 +536,7 @@ class OnAutoForwardedAction extends Disposable {
|
|
527
536
|
}
|
528
537
|
makePublicChoice(tunnel) {
|
529
538
|
return {
|
530
|
-
label: ( localize(
|
539
|
+
label: ( localize(8441, "Make Public")),
|
531
540
|
run: async () => {
|
532
541
|
const oldTunnelDetails = mapHasAddressLocalhostOrAllInterfaces(this.remoteExplorerService.tunnelModel.forwarded, tunnel.tunnelRemoteHost, tunnel.tunnelRemotePort);
|
533
542
|
await this.remoteExplorerService.close({ host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort }, TunnelCloseReason.Other);
|
@@ -558,7 +567,7 @@ class OnAutoForwardedAction extends Disposable {
|
|
558
567
|
}
|
559
568
|
elevateChoice(tunnel) {
|
560
569
|
return {
|
561
|
-
label: ( localize(
|
570
|
+
label: ( localize(8442, "Use Port {0} as Sudo...", tunnel.tunnelRemotePort)),
|
562
571
|
run: async () => {
|
563
572
|
await this.remoteExplorerService.close({ host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort }, TunnelCloseReason.Other);
|
564
573
|
const newTunnel = await this.remoteExplorerService.forward({
|
@@ -3,22 +3,22 @@ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
3
3
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
4
4
|
import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
|
5
5
|
|
6
|
-
const getStartedIcon = registerIcon('remote-explorer-get-started', Codicon.star, ( localize(
|
7
|
-
const documentationIcon = registerIcon('remote-explorer-documentation', Codicon.book, ( localize(
|
8
|
-
registerIcon('remote-explorer-feedback', Codicon.twitter, ( localize(
|
9
|
-
const reviewIssuesIcon = registerIcon('remote-explorer-review-issues', Codicon.issues, ( localize(
|
10
|
-
const reportIssuesIcon = registerIcon('remote-explorer-report-issues', Codicon.comment, ( localize(
|
11
|
-
const remoteExplorerViewIcon = registerIcon('remote-explorer-view-icon', Codicon.remoteExplorer, ( localize(
|
12
|
-
const portsViewIcon = registerIcon('ports-view-icon', Codicon.plug, ( localize(
|
13
|
-
registerIcon('ports-view-icon', Codicon.plug, ( localize(
|
14
|
-
const privatePortIcon = registerIcon('private-ports-view-icon', Codicon.lock, ( localize(
|
15
|
-
const forwardPortIcon = registerIcon('ports-forward-icon', Codicon.plus, ( localize(
|
16
|
-
const stopForwardIcon = registerIcon('ports-stop-forward-icon', Codicon.x, ( localize(
|
17
|
-
const openBrowserIcon = registerIcon('ports-open-browser-icon', Codicon.globe, ( localize(
|
18
|
-
const openPreviewIcon = registerIcon('ports-open-preview-icon', Codicon.openPreview, ( localize(
|
19
|
-
const copyAddressIcon = registerIcon('ports-copy-address-icon', Codicon.clippy, ( localize(
|
20
|
-
const labelPortIcon = registerIcon('ports-label-icon', Codicon.tag, ( localize(
|
21
|
-
const forwardedPortWithoutProcessIcon = registerIcon('ports-forwarded-without-process-icon', Codicon.circleOutline, ( localize(
|
22
|
-
const forwardedPortWithProcessIcon = registerIcon('ports-forwarded-with-process-icon', Codicon.circleFilled, ( localize(
|
6
|
+
const getStartedIcon = registerIcon('remote-explorer-get-started', Codicon.star, ( localize(8443, 'Getting started icon in the remote explorer view.')));
|
7
|
+
const documentationIcon = registerIcon('remote-explorer-documentation', Codicon.book, ( localize(8444, 'Documentation icon in the remote explorer view.')));
|
8
|
+
registerIcon('remote-explorer-feedback', Codicon.twitter, ( localize(8445, 'Feedback icon in the remote explorer view.')));
|
9
|
+
const reviewIssuesIcon = registerIcon('remote-explorer-review-issues', Codicon.issues, ( localize(8446, 'Review issue icon in the remote explorer view.')));
|
10
|
+
const reportIssuesIcon = registerIcon('remote-explorer-report-issues', Codicon.comment, ( localize(8447, 'Report issue icon in the remote explorer view.')));
|
11
|
+
const remoteExplorerViewIcon = registerIcon('remote-explorer-view-icon', Codicon.remoteExplorer, ( localize(8448, 'View icon of the remote explorer view.')));
|
12
|
+
const portsViewIcon = registerIcon('ports-view-icon', Codicon.plug, ( localize(8449, 'View icon of the remote ports view.')));
|
13
|
+
registerIcon('ports-view-icon', Codicon.plug, ( localize(8450, 'Icon representing a remote port.')));
|
14
|
+
const privatePortIcon = registerIcon('private-ports-view-icon', Codicon.lock, ( localize(8451, 'Icon representing a private remote port.')));
|
15
|
+
const forwardPortIcon = registerIcon('ports-forward-icon', Codicon.plus, ( localize(8452, 'Icon for the forward action.')));
|
16
|
+
const stopForwardIcon = registerIcon('ports-stop-forward-icon', Codicon.x, ( localize(8453, 'Icon for the stop forwarding action.')));
|
17
|
+
const openBrowserIcon = registerIcon('ports-open-browser-icon', Codicon.globe, ( localize(8454, 'Icon for the open browser action.')));
|
18
|
+
const openPreviewIcon = registerIcon('ports-open-preview-icon', Codicon.openPreview, ( localize(8455, 'Icon for the open preview action.')));
|
19
|
+
const copyAddressIcon = registerIcon('ports-copy-address-icon', Codicon.clippy, ( localize(8456, 'Icon for the copy local address action.')));
|
20
|
+
const labelPortIcon = registerIcon('ports-label-icon', Codicon.tag, ( localize(8457, 'Icon for the label port action.')));
|
21
|
+
const forwardedPortWithoutProcessIcon = registerIcon('ports-forwarded-without-process-icon', Codicon.circleOutline, ( localize(8458, 'Icon for forwarded ports that don\'t have a running process.')));
|
22
|
+
const forwardedPortWithProcessIcon = registerIcon('ports-forwarded-with-process-icon', Codicon.circleFilled, ( localize(8459, 'Icon for forwarded ports that do have a running process.')));
|
23
23
|
|
24
24
|
export { copyAddressIcon, documentationIcon, forwardPortIcon, forwardedPortWithProcessIcon, forwardedPortWithoutProcessIcon, getStartedIcon, labelPortIcon, openBrowserIcon, openPreviewIcon, portsViewIcon, privatePortIcon, remoteExplorerViewIcon, reportIssuesIcon, reviewIssuesIcon, stopForwardIcon };
|
@@ -86,7 +86,7 @@ let TunnelViewModel = class TunnelViewModel {
|
|
86
86
|
this.tunnelService = tunnelService;
|
87
87
|
this._candidates = ( new Map());
|
88
88
|
this.input = {
|
89
|
-
label: ( localize(
|
89
|
+
label: ( localize(8487, "Add Port")),
|
90
90
|
icon: undefined,
|
91
91
|
tunnelType: TunnelType.Add,
|
92
92
|
hasRunningProcess: false,
|
@@ -104,7 +104,7 @@ let TunnelViewModel = class TunnelViewModel {
|
|
104
104
|
privacy: {
|
105
105
|
id: TunnelPrivacyId.Private,
|
106
106
|
themeIcon: privatePortIcon.id,
|
107
|
-
label: ( localize(
|
107
|
+
label: ( localize(8488, "Private"))
|
108
108
|
},
|
109
109
|
strip: () => undefined
|
110
110
|
};
|
@@ -192,8 +192,8 @@ class IconColumn {
|
|
192
192
|
}
|
193
193
|
class PortColumn {
|
194
194
|
constructor() {
|
195
|
-
this.label = ( localize(
|
196
|
-
this.tooltip = ( localize(
|
195
|
+
this.label = ( localize(8489, "Port"));
|
196
|
+
this.tooltip = ( localize(8490, "The label and remote port number of the forwarded port."));
|
197
197
|
this.weight = 1;
|
198
198
|
this.templateId = 'actionbar';
|
199
199
|
}
|
@@ -215,8 +215,8 @@ class PortColumn {
|
|
215
215
|
}
|
216
216
|
class LocalAddressColumn {
|
217
217
|
constructor() {
|
218
|
-
this.label = ( localize(
|
219
|
-
this.tooltip = ( localize(
|
218
|
+
this.label = ( localize(8491, "Forwarded Address"));
|
219
|
+
this.tooltip = ( localize(8492, "The address that the forwarded port is available at."));
|
220
220
|
this.weight = 1;
|
221
221
|
this.templateId = 'actionbar';
|
222
222
|
}
|
@@ -244,18 +244,18 @@ class LocalAddressColumn {
|
|
244
244
|
let clickLabel = '';
|
245
245
|
if (editorConf.multiCursorModifier === 'ctrlCmd') {
|
246
246
|
if (isMacintosh) {
|
247
|
-
clickLabel = ( localize(
|
247
|
+
clickLabel = ( localize(8493, "option + click"));
|
248
248
|
}
|
249
249
|
else {
|
250
|
-
clickLabel = ( localize(
|
250
|
+
clickLabel = ( localize(8494, "alt + click"));
|
251
251
|
}
|
252
252
|
}
|
253
253
|
else {
|
254
254
|
if (isMacintosh) {
|
255
|
-
clickLabel = ( localize(
|
255
|
+
clickLabel = ( localize(8495, "cmd + click"));
|
256
256
|
}
|
257
257
|
else {
|
258
|
-
clickLabel = ( localize(
|
258
|
+
clickLabel = ( localize(8496, "ctrl + click"));
|
259
259
|
}
|
260
260
|
}
|
261
261
|
const markdown = ( new MarkdownString('', true));
|
@@ -266,8 +266,8 @@ class LocalAddressColumn {
|
|
266
266
|
}
|
267
267
|
class RunningProcessColumn {
|
268
268
|
constructor() {
|
269
|
-
this.label = ( localize(
|
270
|
-
this.tooltip = ( localize(
|
269
|
+
this.label = ( localize(8497, "Running Process"));
|
270
|
+
this.tooltip = ( localize(8498, "The command line of the process that is using the port."));
|
271
271
|
this.weight = 2;
|
272
272
|
this.templateId = 'actionbar';
|
273
273
|
}
|
@@ -281,9 +281,9 @@ class RunningProcessColumn {
|
|
281
281
|
}
|
282
282
|
class OriginColumn {
|
283
283
|
constructor() {
|
284
|
-
this.label = ( localize(
|
284
|
+
this.label = ( localize(8499, "Origin"));
|
285
285
|
this.tooltip = ( localize(
|
286
|
-
|
286
|
+
8500,
|
287
287
|
"The source that a forwarded port originates from. Can be an extension, user forwarded, statically forwarded, or automatically forwarded."
|
288
288
|
));
|
289
289
|
this.weight = 1;
|
@@ -300,8 +300,8 @@ class OriginColumn {
|
|
300
300
|
}
|
301
301
|
class PrivacyColumn {
|
302
302
|
constructor() {
|
303
|
-
this.label = ( localize(
|
304
|
-
this.tooltip = ( localize(
|
303
|
+
this.label = ( localize(8501, "Visibility"));
|
304
|
+
this.tooltip = ( localize(8502, "The availability of the forwarded port."));
|
305
305
|
this.weight = 1;
|
306
306
|
this.templateId = 'actionbar';
|
307
307
|
}
|
@@ -461,7 +461,7 @@ let ActionBarRenderer = class ActionBarRenderer extends Disposable {
|
|
461
461
|
container.style.paddingLeft = '5px';
|
462
462
|
const value = editableData.startingValue || '';
|
463
463
|
const inputBox = ( new InputBox(container, this.contextViewService, {
|
464
|
-
ariaLabel: ( localize(
|
464
|
+
ariaLabel: ( localize(8503, "Press Enter to confirm or Escape to cancel.")),
|
465
465
|
validationOptions: {
|
466
466
|
validation: (value) => {
|
467
467
|
const message = editableData.validationMessage(value);
|
@@ -626,7 +626,7 @@ class TunnelItem {
|
|
626
626
|
}
|
627
627
|
}
|
628
628
|
else if (this.hasRunningProcess) {
|
629
|
-
description = ( localize(
|
629
|
+
description = ( localize(8504, "Process information unavailable"));
|
630
630
|
}
|
631
631
|
return description;
|
632
632
|
}
|
@@ -634,7 +634,7 @@ class TunnelItem {
|
|
634
634
|
let information;
|
635
635
|
if (this.localAddress) {
|
636
636
|
information = ( localize(
|
637
|
-
|
637
|
+
8505,
|
638
638
|
"Remote port {0}:{1} forwarded to local address {2}. ",
|
639
639
|
this.remoteHost,
|
640
640
|
this.remotePort,
|
@@ -643,7 +643,7 @@ class TunnelItem {
|
|
643
643
|
}
|
644
644
|
else {
|
645
645
|
information = ( localize(
|
646
|
-
|
646
|
+
8506,
|
647
647
|
"Remote port {0}:{1} not forwarded. ",
|
648
648
|
this.remoteHost,
|
649
649
|
this.remotePort
|
@@ -654,8 +654,8 @@ class TunnelItem {
|
|
654
654
|
get iconTooltip() {
|
655
655
|
const isAdd = this.tunnelType === TunnelType.Add;
|
656
656
|
if (!isAdd) {
|
657
|
-
return `${this.processDescription ? ( localize(
|
658
|
-
( localize(
|
657
|
+
return `${this.processDescription ? ( localize(8507, "Port has running process.")) :
|
658
|
+
( localize(8508, "No running process."))}`;
|
659
659
|
}
|
660
660
|
else {
|
661
661
|
return this.label;
|
@@ -664,7 +664,7 @@ class TunnelItem {
|
|
664
664
|
get portTooltip() {
|
665
665
|
const isAdd = this.tunnelType === TunnelType.Add;
|
666
666
|
if (!isAdd) {
|
667
|
-
return `${this.name ? ( localize(
|
667
|
+
return `${this.name ? ( localize(8509, "Port labeled {0}. ", this.name)) : ''}`;
|
668
668
|
}
|
669
669
|
else {
|
670
670
|
return '';
|
@@ -682,14 +682,14 @@ class TunnelItem {
|
|
682
682
|
{
|
683
683
|
id: '',
|
684
684
|
themeIcon: Codicon.question.id,
|
685
|
-
label: ( localize(
|
685
|
+
label: ( localize(8510, "Unknown"))
|
686
686
|
};
|
687
687
|
}
|
688
688
|
else {
|
689
689
|
return {
|
690
690
|
id: TunnelPrivacyId.Private,
|
691
691
|
themeIcon: privatePortIcon.id,
|
692
|
-
label: ( localize(
|
692
|
+
label: ( localize(8488, "Private"))
|
693
693
|
};
|
694
694
|
}
|
695
695
|
}
|
@@ -699,7 +699,7 @@ const TunnelCloseableContextKey = ( new RawContextKey('tunnelCloseable', false,
|
|
699
699
|
const TunnelPrivacyContextKey = ( new RawContextKey('tunnelPrivacy', undefined, true));
|
700
700
|
const TunnelPrivacyEnabledContextKey = ( new RawContextKey('tunnelPrivacyEnabled', false, true));
|
701
701
|
const TunnelProtocolContextKey = ( new RawContextKey('tunnelProtocol', TunnelProtocol.Http, true));
|
702
|
-
const TunnelViewFocusContextKey = ( new RawContextKey('tunnelViewFocus', false, ( localize(
|
702
|
+
const TunnelViewFocusContextKey = ( new RawContextKey('tunnelViewFocus', false, ( localize(8511, "Whether the Ports view has focus."))));
|
703
703
|
const TunnelViewSelectionKeyName = 'tunnelViewSelection';
|
704
704
|
const TunnelViewSelectionContextKey = ( new RawContextKey(TunnelViewSelectionKeyName, undefined, true));
|
705
705
|
const TunnelViewMultiSelectionKeyName = 'tunnelViewMultiSelection';
|
@@ -709,7 +709,7 @@ const ProtocolChangeableContextKey = ( new RawContextKey('protocolChangable', tr
|
|
709
709
|
let TunnelPanel = class TunnelPanel extends ViewPane {
|
710
710
|
static { TunnelPanel_1 = this; }
|
711
711
|
static { this.ID = TUNNEL_VIEW_ID; }
|
712
|
-
static { this.TITLE = ( localize2(
|
712
|
+
static { this.TITLE = ( localize2(8512, "Ports")); }
|
713
713
|
constructor(viewModel, options, keybindingService, contextMenuService, contextKeyService, configurationService, instantiationService, viewDescriptorService, openerService, quickInputService, commandService, menuService, themeService, remoteExplorerService, telemetryService, hoverService, tunnelService, contextViewService) {
|
714
714
|
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
715
715
|
this.viewModel = viewModel;
|
@@ -823,7 +823,7 @@ let TunnelPanel = class TunnelPanel extends ViewPane {
|
|
823
823
|
return item.label;
|
824
824
|
}
|
825
825
|
},
|
826
|
-
getWidgetAriaLabel: () => ( localize(
|
826
|
+
getWidgetAriaLabel: () => ( localize(8513, "Tunnel View"))
|
827
827
|
},
|
828
828
|
openOnSingleClick: true
|
829
829
|
});
|
@@ -1038,7 +1038,7 @@ function isITunnelItem(item) {
|
|
1038
1038
|
var LabelTunnelAction;
|
1039
1039
|
(function (LabelTunnelAction) {
|
1040
1040
|
LabelTunnelAction.ID = 'remote.tunnel.label';
|
1041
|
-
LabelTunnelAction.LABEL = ( localize(
|
1041
|
+
LabelTunnelAction.LABEL = ( localize(8514, "Set Port Label"));
|
1042
1042
|
LabelTunnelAction.COMMAND_ID_KEYWORD = 'label';
|
1043
1043
|
function handler() {
|
1044
1044
|
return async (accessor, arg) => {
|
@@ -1070,7 +1070,7 @@ var LabelTunnelAction;
|
|
1070
1070
|
resolve(changed ? { port: tunnelItem.remotePort, label: value } : undefined);
|
1071
1071
|
},
|
1072
1072
|
validationMessage: () => null,
|
1073
|
-
placeholder: ( localize(
|
1073
|
+
placeholder: ( localize(8515, "Port label")),
|
1074
1074
|
startingValue
|
1075
1075
|
});
|
1076
1076
|
}));
|
@@ -1080,18 +1080,18 @@ var LabelTunnelAction;
|
|
1080
1080
|
}
|
1081
1081
|
LabelTunnelAction.handler = handler;
|
1082
1082
|
})(LabelTunnelAction || (LabelTunnelAction = {}));
|
1083
|
-
const invalidPortString = ( localize(
|
1083
|
+
const invalidPortString = ( localize(8516, "Forwarded port should be a number or a host:port."));
|
1084
1084
|
const maxPortNumber = 65536;
|
1085
|
-
const invalidPortNumberString = ( localize(
|
1086
|
-
const requiresSudoString = ( localize(
|
1087
|
-
const alreadyForwarded = ( localize(
|
1085
|
+
const invalidPortNumberString = ( localize(8517, "Port number must be \u2265 0 and < {0}.", maxPortNumber));
|
1086
|
+
const requiresSudoString = ( localize(8518, "May Require Sudo"));
|
1087
|
+
const alreadyForwarded = ( localize(8519, "Port is already forwarded"));
|
1088
1088
|
var ForwardPortAction;
|
1089
1089
|
(function (ForwardPortAction) {
|
1090
1090
|
ForwardPortAction.INLINE_ID = 'remote.tunnel.forwardInline';
|
1091
1091
|
ForwardPortAction.COMMANDPALETTE_ID = 'remote.tunnel.forwardCommandPalette';
|
1092
|
-
ForwardPortAction.LABEL = ( localize2(
|
1093
|
-
ForwardPortAction.TREEITEM_LABEL = ( localize(
|
1094
|
-
const forwardPrompt = ( localize(
|
1092
|
+
ForwardPortAction.LABEL = ( localize2(8520, "Forward a Port"));
|
1093
|
+
ForwardPortAction.TREEITEM_LABEL = ( localize(8521, "Forward Port"));
|
1094
|
+
const forwardPrompt = ( localize(8522, "Port number or address (eg. 3000 or 10.10.10.10:2000)."));
|
1095
1095
|
function validateInput(remoteExplorerService, tunnelService, value, canElevate) {
|
1096
1096
|
const parsed = parseAddress(value);
|
1097
1097
|
if (!parsed) {
|
@@ -1111,14 +1111,14 @@ var ForwardPortAction;
|
|
1111
1111
|
function error(notificationService, tunnelOrError, host, port) {
|
1112
1112
|
if (!tunnelOrError) {
|
1113
1113
|
notificationService.warn(( localize(
|
1114
|
-
|
1114
|
+
8523,
|
1115
1115
|
"Unable to forward {0}:{1}. The host may not be available or that remote port may already be forwarded",
|
1116
1116
|
host,
|
1117
1117
|
port
|
1118
1118
|
)));
|
1119
1119
|
}
|
1120
1120
|
else if (typeof tunnelOrError === 'string') {
|
1121
|
-
notificationService.warn(( localize(
|
1121
|
+
notificationService.warn(( localize(8524, "Unable to forward {0}:{1}. {2}", host, port, tunnelOrError)));
|
1122
1122
|
}
|
1123
1123
|
}
|
1124
1124
|
function inlineHandler() {
|
@@ -1178,7 +1178,7 @@ function makeTunnelPicks(tunnels, remoteExplorerService, tunnelService) {
|
|
1178
1178
|
if (picks.length === 0) {
|
1179
1179
|
picks.push({
|
1180
1180
|
label: ( localize(
|
1181
|
-
|
1181
|
+
8525,
|
1182
1182
|
"No ports currently forwarded. Try running the {0} command",
|
1183
1183
|
ForwardPortAction.LABEL.value
|
1184
1184
|
))
|
@@ -1190,7 +1190,7 @@ var ClosePortAction;
|
|
1190
1190
|
(function (ClosePortAction) {
|
1191
1191
|
ClosePortAction.INLINE_ID = 'remote.tunnel.closeInline';
|
1192
1192
|
ClosePortAction.COMMANDPALETTE_ID = 'remote.tunnel.closeCommandPalette';
|
1193
|
-
ClosePortAction.LABEL = ( localize2(
|
1193
|
+
ClosePortAction.LABEL = ( localize2(8526, "Stop Forwarding Port"));
|
1194
1194
|
function inlineHandler() {
|
1195
1195
|
return async (accessor, arg) => {
|
1196
1196
|
const contextKeyService = accessor.get(IContextKeyService);
|
@@ -1231,7 +1231,7 @@ var ClosePortAction;
|
|
1231
1231
|
const tunnelService = accessor.get(ITunnelService);
|
1232
1232
|
const commandService = accessor.get(ICommandService);
|
1233
1233
|
const picks = makeTunnelPicks(Array.from(( remoteExplorerService.tunnelModel.forwarded.values())).filter(tunnel => tunnel.closeable), remoteExplorerService, tunnelService);
|
1234
|
-
const result = await quickInputService.pick(picks, { placeHolder: ( localize(
|
1234
|
+
const result = await quickInputService.pick(picks, { placeHolder: ( localize(8527, "Choose a port to stop forwarding")) });
|
1235
1235
|
if (result && result.tunnel) {
|
1236
1236
|
await remoteExplorerService.close({ host: result.tunnel.remoteHost, port: result.tunnel.remotePort }, TunnelCloseReason.User);
|
1237
1237
|
}
|
@@ -1245,7 +1245,7 @@ var ClosePortAction;
|
|
1245
1245
|
var OpenPortInBrowserAction;
|
1246
1246
|
(function (OpenPortInBrowserAction) {
|
1247
1247
|
OpenPortInBrowserAction.ID = 'remote.tunnel.open';
|
1248
|
-
OpenPortInBrowserAction.LABEL = ( localize(
|
1248
|
+
OpenPortInBrowserAction.LABEL = ( localize(8528, "Open in Browser"));
|
1249
1249
|
function handler() {
|
1250
1250
|
return async (accessor, arg) => {
|
1251
1251
|
let key;
|
@@ -1275,7 +1275,7 @@ var OpenPortInBrowserAction;
|
|
1275
1275
|
var OpenPortInPreviewAction;
|
1276
1276
|
(function (OpenPortInPreviewAction) {
|
1277
1277
|
OpenPortInPreviewAction.ID = 'remote.tunnel.openPreview';
|
1278
|
-
OpenPortInPreviewAction.LABEL = ( localize(
|
1278
|
+
OpenPortInPreviewAction.LABEL = ( localize(8529, "Preview in Editor"));
|
1279
1279
|
function handler() {
|
1280
1280
|
return async (accessor, arg) => {
|
1281
1281
|
let key;
|
@@ -1312,7 +1312,7 @@ var OpenPortInPreviewAction;
|
|
1312
1312
|
var OpenPortInBrowserCommandPaletteAction;
|
1313
1313
|
(function (OpenPortInBrowserCommandPaletteAction) {
|
1314
1314
|
OpenPortInBrowserCommandPaletteAction.ID = 'remote.tunnel.openCommandPalette';
|
1315
|
-
OpenPortInBrowserCommandPaletteAction.LABEL = ( localize(
|
1315
|
+
OpenPortInBrowserCommandPaletteAction.LABEL = ( localize(8530, "Open Port in Browser"));
|
1316
1316
|
function handler() {
|
1317
1317
|
return async (accessor, arg) => {
|
1318
1318
|
const remoteExplorerService = accessor.get(IRemoteExplorerService);
|
@@ -1331,15 +1331,15 @@ var OpenPortInBrowserCommandPaletteAction;
|
|
1331
1331
|
}));
|
1332
1332
|
if (options.length === 0) {
|
1333
1333
|
options.push({
|
1334
|
-
label: ( localize(
|
1334
|
+
label: ( localize(8531, "No ports currently forwarded. Open the Ports view to get started."))
|
1335
1335
|
});
|
1336
1336
|
}
|
1337
1337
|
else {
|
1338
1338
|
options.push({
|
1339
|
-
label: ( localize(
|
1339
|
+
label: ( localize(8532, "Open the Ports view..."))
|
1340
1340
|
});
|
1341
1341
|
}
|
1342
|
-
const picked = await quickPickService.pick(options, { placeHolder: ( localize(
|
1342
|
+
const picked = await quickPickService.pick(options, { placeHolder: ( localize(8533, "Choose the port to open")) });
|
1343
1343
|
if (picked && picked.tunnel) {
|
1344
1344
|
return OpenPortInBrowserAction.run(model, openerService, makeAddress(picked.tunnel.remoteHost, picked.tunnel.remotePort));
|
1345
1345
|
}
|
@@ -1354,8 +1354,8 @@ var CopyAddressAction;
|
|
1354
1354
|
(function (CopyAddressAction) {
|
1355
1355
|
CopyAddressAction.INLINE_ID = 'remote.tunnel.copyAddressInline';
|
1356
1356
|
CopyAddressAction.COMMANDPALETTE_ID = 'remote.tunnel.copyAddressCommandPalette';
|
1357
|
-
CopyAddressAction.INLINE_LABEL = ( localize(
|
1358
|
-
CopyAddressAction.COMMANDPALETTE_LABEL = ( localize(
|
1357
|
+
CopyAddressAction.INLINE_LABEL = ( localize(8534, "Copy Local Address"));
|
1358
|
+
CopyAddressAction.COMMANDPALETTE_LABEL = ( localize(8535, "Copy Forwarded Port Address"));
|
1359
1359
|
async function copyAddress(remoteExplorerService, clipboardService, tunnelItem) {
|
1360
1360
|
const address = remoteExplorerService.tunnelModel.address(tunnelItem.remoteHost, tunnelItem.remotePort);
|
1361
1361
|
if (address) {
|
@@ -1387,7 +1387,7 @@ var CopyAddressAction;
|
|
1387
1387
|
const commandService = accessor.get(ICommandService);
|
1388
1388
|
const clipboardService = accessor.get(IClipboardService);
|
1389
1389
|
const tunnels = Array.from(( remoteExplorerService.tunnelModel.forwarded.values())).concat(Array.from(( remoteExplorerService.tunnelModel.detected.values())));
|
1390
|
-
const result = await quickInputService.pick(makeTunnelPicks(tunnels, remoteExplorerService, tunnelService), { placeHolder: ( localize(
|
1390
|
+
const result = await quickInputService.pick(makeTunnelPicks(tunnels, remoteExplorerService, tunnelService), { placeHolder: ( localize(8536, "Choose a forwarded port")) });
|
1391
1391
|
if (result && result.tunnel) {
|
1392
1392
|
await copyAddress(remoteExplorerService, clipboardService, result.tunnel);
|
1393
1393
|
}
|
@@ -1401,10 +1401,10 @@ var CopyAddressAction;
|
|
1401
1401
|
var ChangeLocalPortAction;
|
1402
1402
|
(function (ChangeLocalPortAction) {
|
1403
1403
|
ChangeLocalPortAction.ID = 'remote.tunnel.changeLocalPort';
|
1404
|
-
ChangeLocalPortAction.LABEL = ( localize(
|
1404
|
+
ChangeLocalPortAction.LABEL = ( localize(8537, "Change Local Address Port"));
|
1405
1405
|
function validateInput(tunnelService, value, canElevate) {
|
1406
1406
|
if (!value.match(/^[0-9]+$/)) {
|
1407
|
-
return { content: ( localize(
|
1407
|
+
return { content: ( localize(8538, "Local port should be a number.")), severity: Severity.Error };
|
1408
1408
|
}
|
1409
1409
|
else if (Number(value) >= maxPortNumber) {
|
1410
1410
|
return { content: invalidPortNumberString, severity: Severity.Error };
|
@@ -1448,7 +1448,7 @@ var ChangeLocalPortAction;
|
|
1448
1448
|
});
|
1449
1449
|
if (newForward && (typeof newForward !== 'string') && newForward.tunnelLocalPort !== numberValue) {
|
1450
1450
|
notificationService.warn(( localize(
|
1451
|
-
|
1451
|
+
8539,
|
1452
1452
|
"The local port {0} is not available. Port number {1} has been used instead",
|
1453
1453
|
value,
|
1454
1454
|
newForward.tunnelLocalPort ?? newForward.localAddress
|
@@ -1457,7 +1457,7 @@ var ChangeLocalPortAction;
|
|
1457
1457
|
}
|
1458
1458
|
},
|
1459
1459
|
validationMessage: (value) => validateInput(tunnelService, value, tunnelService.canElevate),
|
1460
|
-
placeholder: ( localize(
|
1460
|
+
placeholder: ( localize(8540, "New local port"))
|
1461
1461
|
});
|
1462
1462
|
}
|
1463
1463
|
};
|
@@ -1489,8 +1489,8 @@ var SetTunnelProtocolAction;
|
|
1489
1489
|
(function (SetTunnelProtocolAction) {
|
1490
1490
|
SetTunnelProtocolAction.ID_HTTP = 'remote.tunnel.setProtocolHttp';
|
1491
1491
|
SetTunnelProtocolAction.ID_HTTPS = 'remote.tunnel.setProtocolHttps';
|
1492
|
-
SetTunnelProtocolAction.LABEL_HTTP = ( localize(
|
1493
|
-
SetTunnelProtocolAction.LABEL_HTTPS = ( localize(
|
1492
|
+
SetTunnelProtocolAction.LABEL_HTTP = ( localize(8541, "HTTP"));
|
1493
|
+
SetTunnelProtocolAction.LABEL_HTTPS = ( localize(8542, "HTTPS"));
|
1494
1494
|
async function handler(arg, protocol, remoteExplorerService, environmentService) {
|
1495
1495
|
if (isITunnelItem(arg)) {
|
1496
1496
|
const attributes = {
|
@@ -1637,14 +1637,14 @@ MenuRegistry.appendMenuItem(MenuId.TunnelContext, ({
|
|
1637
1637
|
group: '2_localaddress',
|
1638
1638
|
order: 2,
|
1639
1639
|
submenu: MenuId.TunnelPrivacy,
|
1640
|
-
title: ( localize(
|
1640
|
+
title: ( localize(8543, "Port Visibility")),
|
1641
1641
|
when: ( ContextKeyExpr.and(isForwardedExpr, TunnelPrivacyEnabledContextKey))
|
1642
1642
|
}));
|
1643
1643
|
MenuRegistry.appendMenuItem(MenuId.TunnelContext, ({
|
1644
1644
|
group: '2_localaddress',
|
1645
1645
|
order: 3,
|
1646
1646
|
submenu: MenuId.TunnelProtocol,
|
1647
|
-
title: ( localize(
|
1647
|
+
title: ( localize(8544, "Change Port Protocol")),
|
1648
1648
|
when: ( ContextKeyExpr.and(isForwardedExpr, isNotMultiSelectionExpr, ProtocolChangeableContextKey))
|
1649
1649
|
}));
|
1650
1650
|
MenuRegistry.appendMenuItem(MenuId.TunnelContext, ({
|
@@ -1738,7 +1738,7 @@ MenuRegistry.appendMenuItem(MenuId.TunnelLocalAddressInline, ({
|
|
1738
1738
|
when: isForwardedOrDetectedExpr
|
1739
1739
|
}));
|
1740
1740
|
registerColor('ports.iconRunningProcessForeground', STATUS_BAR_REMOTE_ITEM_BACKGROUND, ( localize(
|
1741
|
-
|
1741
|
+
8545,
|
1742
1742
|
"The color of the icon for a port that has an associated running process."
|
1743
1743
|
)));
|
1744
1744
|
|