@@ -5,6 +5,7 @@ import * as vscode from 'vscode';
5
5
import { GitpodExtensionContext , ExposedServedGitpodWorkspacePort , GitpodWorkspacePort , isExposedServedGitpodWorkspacePort , isExposedServedPort , PortInfo , TunnelDescriptionI } from 'gitpod-shared' ;
6
6
import { PortsStatus } from '@gitpod/supervisor-api-grpc/lib/status_pb' ;
7
7
import { TunnelVisiblity } from '@gitpod/supervisor-api-grpc/lib/port_pb' ;
8
+ import { PortProtocol , PortVisibility } from 'gitpod-shared/portsview/src/protocol/gitpod' ;
8
9
9
10
const PortCommands = < const > [ 'tunnelNetwork' , 'tunnelHost' , 'makePublic' , 'makePrivate' , 'preview' , 'openBrowser' , 'retryAutoExpose' , 'urlCopy' , 'queryPortData' ] ;
10
11
@@ -34,28 +35,28 @@ export class GitpodPortViewProvider implements vscode.WebviewViewProvider {
34
35
...context . getWorkspaceTelemetryProperties ( ) ,
35
36
action : 'private'
36
37
} ) ;
37
- context . controlPort ( port . status . localPort , { visibility : 'private' } ) ;
38
+ context . controlPort ( port . status . localPort , port . status . exposed , { visibility : PortVisibility . PRIVATE } ) ;
38
39
} ) ) ;
39
40
context . subscriptions . push ( vscode . commands . registerCommand ( 'gitpod.ports.makePublic' , ( { port } : PortItem ) => {
40
41
context . telemetryService . sendTelemetryEvent ( 'vscode_execute_command_gitpod_ports' , {
41
42
...context . getWorkspaceTelemetryProperties ( ) ,
42
43
action : 'public'
43
44
} ) ;
44
- context . controlPort ( port . status . localPort , { visibility : 'public' } ) ;
45
+ context . controlPort ( port . status . localPort , port . status . exposed , { visibility : PortVisibility . PUBLIC } ) ;
45
46
} ) ) ;
46
47
context . subscriptions . push ( vscode . commands . registerCommand ( 'gitpod.ports.makeHTTPS' , ( { port } : PortItem ) => {
47
48
context . telemetryService . sendTelemetryEvent ( 'vscode_execute_command_gitpod_ports' , {
48
49
...context . getWorkspaceTelemetryProperties ( ) ,
49
50
action : 'https'
50
51
} ) ;
51
- context . controlPort ( port . status . localPort , { protocol : 'https' } ) ;
52
+ context . controlPort ( port . status . localPort , port . status . exposed , { protocol : PortProtocol . HTTPS } ) ;
52
53
} ) ) ;
53
54
context . subscriptions . push ( vscode . commands . registerCommand ( 'gitpod.ports.makeHTTP' , ( { port } : PortItem ) => {
54
55
context . telemetryService . sendTelemetryEvent ( 'vscode_execute_command_gitpod_ports' , {
55
56
...context . getWorkspaceTelemetryProperties ( ) ,
56
57
action : 'http'
57
58
} ) ;
58
- context . controlPort ( port . status . localPort , { protocol : 'http' } ) ;
59
+ context . controlPort ( port . status . localPort , port . status . exposed , { protocol : PortProtocol . HTTP } ) ;
59
60
} ) ) ;
60
61
context . subscriptions . push ( vscode . commands . registerCommand ( 'gitpod.ports.preview' , ( { port } : PortItem ) => {
61
62
context . telemetryService . sendTelemetryEvent ( 'vscode_execute_command_gitpod_ports' , {
0 commit comments