4
4
* Licensed under the MIT License. See License.txt in the project root for license information.
5
5
*--------------------------------------------------------------------------------------------*/
6
6
7
- import type { NLSConfiguration , InternalNLSConfiguration } from '../../../base/node/languagePacks' ;
8
- import type * as http from 'http' ;
9
- import type * as net from 'net' ;
10
- import type { AuthType } from 'vs/base/common/auth' ;
7
+ import type * as http from "http" ;
8
+ import type * as net from "net" ;
9
+ import type { AuthType } from "../../../base/common/auth" ;
10
+ import type {
11
+ InternalNLSConfiguration ,
12
+ NLSConfiguration ,
13
+ } from "../../../base/node/languagePacks" ;
11
14
12
15
declare global {
13
16
namespace CodeServerLib {
14
-
15
17
export interface ServerParsedArgs {
16
18
auth : AuthType ;
17
19
port ?: string ;
@@ -25,49 +27,49 @@ declare global {
25
27
*
26
28
* This secret must be communicated to any vscode instance via the resolver or embedder API.
27
29
*/
28
- ' connection-secret' ?: string ;
30
+ " connection-secret" ?: string ;
29
31
host ?: string ;
30
- ' socket-path' ?: string ;
32
+ " socket-path" ?: string ;
31
33
driver ?: string ;
32
- ' print-startup-performance' ?: boolean ;
33
- ' print-ip-address' ?: boolean ;
34
- ' disable-websocket-compression' ?: boolean ;
35
- ' disable-telemetry' ?: boolean ;
34
+ " print-startup-performance" ?: boolean ;
35
+ " print-ip-address" ?: boolean ;
36
+ " disable-websocket-compression" ?: boolean ;
37
+ " disable-telemetry" ?: boolean ;
36
38
fileWatcherPolling ?: string ;
37
- ' start-server' ?: boolean ;
39
+ " start-server" ?: boolean ;
38
40
39
- ' enable-remote-auto-shutdown' ?: boolean ;
40
- ' remote-auto-shutdown-without-delay' ?: boolean ;
41
+ " enable-remote-auto-shutdown" ?: boolean ;
42
+ " remote-auto-shutdown-without-delay" ?: boolean ;
41
43
42
- ' extensions-dir' ?: string ;
43
- ' extensions-download-dir' ?: string ;
44
- ' install-extension' ?: string [ ] ;
45
- ' install-builtin-extension' ?: string [ ] ;
46
- ' uninstall-extension' ?: string [ ] ;
47
- ' list-extensions' ?: boolean ;
48
- ' locate-extension' ?: string [ ] ;
49
- ' show-versions' ?: boolean ;
50
- ' category' ?: string ;
44
+ " extensions-dir" ?: string ;
45
+ " extensions-download-dir" ?: string ;
46
+ " install-extension" ?: string [ ] ;
47
+ " install-builtin-extension" ?: string [ ] ;
48
+ " uninstall-extension" ?: string [ ] ;
49
+ " list-extensions" ?: boolean ;
50
+ " locate-extension" ?: string [ ] ;
51
+ " show-versions" ?: boolean ;
52
+ category ?: string ;
51
53
52
- ' force-disable-user-env' ?: boolean ;
53
- ' use-host-proxy' ?: string ;
54
+ " force-disable-user-env" ?: boolean ;
55
+ " use-host-proxy" ?: string ;
54
56
55
- ' without-browser-env-var' ?: boolean ;
57
+ " without-browser-env-var" ?: boolean ;
56
58
57
59
force ?: boolean ; // used by install-extension
58
- ' do-not-sync' ?: boolean ; // used by install-extension
60
+ " do-not-sync" ?: boolean ; // used by install-extension
59
61
60
- ' user-data-dir' ?: string ;
61
- ' builtin-extensions-dir' ?: string ;
62
+ " user-data-dir" ?: string ;
63
+ " builtin-extensions-dir" ?: string ;
62
64
63
65
// web
64
66
workspace : string ;
65
67
folder : string ;
66
- ' web-user-data-dir' ?: string ;
67
- ' enable-sync' ?: boolean ;
68
- ' github-auth' ?: string ;
69
- ' log' ?: string ;
70
- ' logsPath' ?: string ;
68
+ " web-user-data-dir" ?: string ;
69
+ " enable-sync" ?: boolean ;
70
+ " github-auth" ?: string ;
71
+ log ?: string ;
72
+ logsPath ?: string ;
71
73
72
74
_ : string [ ] ;
73
75
}
@@ -86,7 +88,10 @@ declare global {
86
88
serverUrl : URL ;
87
89
}
88
90
89
- export type CreateServer = ( address : string | net . AddressInfo | null , args : ServerParsedArgs ) => Promise < IServerAPI > ;
91
+ export type CreateServer = (
92
+ address : string | net . AddressInfo | null ,
93
+ args : ServerParsedArgs
94
+ ) => Promise < IServerAPI > ;
90
95
91
96
export interface ProductDescription {
92
97
productName : string ;
@@ -95,10 +100,16 @@ declare global {
95
100
executableName : string ;
96
101
}
97
102
98
- export type RemoteCLIMain = ( desc : ProductDescription , args : string [ ] ) => void ;
103
+ export type RemoteCLIMain = (
104
+ desc : ProductDescription ,
105
+ args : string [ ]
106
+ ) => void ;
99
107
100
108
export interface IServerAPI {
101
- handleRequest ( req : http . IncomingMessage , res : http . ServerResponse ) : Promise < void > ;
109
+ handleRequest (
110
+ req : http . IncomingMessage ,
111
+ res : http . ServerResponse
112
+ ) : Promise < void > ;
102
113
handleUpgrade ( req : http . IncomingMessage , socket : net . Socket ) : void ;
103
114
handleServerError ( err : Error ) : void ;
104
115
dispose ( ) : void ;
@@ -113,15 +124,15 @@ declare global {
113
124
* @deprecated This should be removed when code-server merges with lib/vscode
114
125
*/
115
126
export interface CliMessage {
116
- type : ' cli' ;
127
+ type : " cli" ;
117
128
args : ServerParsedArgs ;
118
129
}
119
130
120
131
/**
121
132
* @deprecated This should be removed when code-server merges with lib/vscode
122
133
*/
123
134
export interface OpenCommandPipeArgs {
124
- type : ' open' ;
135
+ type : " open" ;
125
136
fileURIs ?: string [ ] ;
126
137
folderURIs : string [ ] ;
127
138
forceNewWindow ?: boolean ;
@@ -132,9 +143,11 @@ declare global {
132
143
waitMarkerFilePath ?: string ;
133
144
}
134
145
135
- export type NLSConfigurationWeb = NLSConfiguration | InternalNLSConfiguration ;
146
+ export type NLSConfigurationWeb =
147
+ | NLSConfiguration
148
+ | InternalNLSConfiguration ;
136
149
export { NLSConfiguration , InternalNLSConfiguration } ;
137
150
}
138
151
}
139
152
140
- export { } ;
153
+ export { } ;
0 commit comments