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