ide на основе vs code · VibeGit
ide на основе vs code Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
krutaya-ide-na-osnove-vs-code / src / vs / server / node / server.cli.ts 532 строк · изменён 14 нояб., 04:52
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
import * as fs from 'fs' ;
import { pathToFileURL } from 'url' ;
import * as cp from 'child_process' ;
import type * as http from 'http' ;
import { cwd } from '../../base/common/process.js' ;
import { dirname, extname, resolve, join } from '../../base/common/path.js' ;
import { parseArgs, buildHelpMessage, buildVersionMessage, OPTIONS , OptionDescriptions, ErrorReporter
NativeParsedArgs
createWaitMarkerFileSync
PipeCommand
hasStdinWithoutTty getStdinFilePath readFromStdin
DeferredPromise
FileAccess
hasAgentCommand
productName
version
commit
executableName
optionId RemoteParsedArgs
optionId
optionId RemoteParsedArgs
optionId
cliPipe process env
cliCommand process env
cliCommandCwd process env
cliRemoteAuthority process env
cliStdInFilePath process env
desc ProductDescription args
cliPipe cliCommand
args
process exitCode
options OptionDescriptions Required RemoteParsedArgs gitCredential type openExternal type
isSupported cliCommand isSupportedForCmd isSupportedForPipe
optionId
optId RemoteParsedArgs optionId
optId
options optId
cliPipe
options type
errorReporter ErrorReporter
id usedValue
id
id
deprecatedOption message
parsedArgs args options errorReporter
mapFileUri cliRemoteAuthority uri uri
verbose parsedArgs
parsedArgs help
desc productName desc executableName desc version options
parsedArgs version
desc version desc commit
parsedArgs
file
parsedArgs
file
file
file
file
file
cliPipe
parsedArgs
parsedArgs verbose
remote parsedArgs remote
remote remote remote
remote
folderURIs parsedArgs mapFileUri
parsedArgs folderURIs
fileURIs parsedArgs mapFileUri
parsedArgs fileURIs
inputPaths parsedArgs
hasReadStdinArg
input inputPaths
input
hasReadStdinArg
input mapFileUri folderURIs fileURIs
parsedArgs
readFromStdinPromise
stdinFilePath
hasReadStdinArg
stdinFilePath cliStdInFilePath
stdinFilePath
stdinFilePath
readFromStdinDone
stdinFilePath verbose readFromStdinDone
parsedArgs wait
readFromStdinPromise readFromStdinDone p
stdinFilePath mapFileUri folderURIs fileURIs
parsedArgs
e
parsedArgs extensionDevelopmentPath
parsedArgs extensionDevelopmentPath parsedArgs extensionDevelopmentPath p p href
parsedArgs extensionTestsPath
parsedArgs extensionTestsPath parsedArgs href
crashReporterDirectory parsedArgs
crashReporterDirectory crashReporterDirectory
cliCommand
parsedArgs parsedArgs parsedArgs parsedArgs
cmdLine
parsedArgs id cmdLine id
parsedArgs id cmdLine id
opt
value parsedArgs NativeParsedArgs opt
value
cmdLine
parsedArgs
cmdLine
childProcess cp FileAccess fsPath cmdLine stdio
childProcess err err
newCommandline
key parsedArgs
val parsedArgs key parsedArgs
val
val
newCommandline key
val
entry val
newCommandline
val
newCommandline
remote
newCommandline
ext cliCommand
ext ext
processCwd cliCommandCwd
verbose
cp cliCommand newCommandline
stdio
cwd processCwd
cliCwd cliCommand
env process env
versionFolder desc commit
fs cliCwd versionFolder
newCommandline
newCommandline
verbose
verbose
childProcess cp cliCommand newCommandline cwd cliCwd env stdio
childProcess stdout data process stdout data
childProcess stderr data process stderr data
cp cliCommand newCommandline cwd cliCwd env stdio
parsedArgs status
type
verbose res
res
e
e
parsedArgs parsedArgs parsedArgs parsedArgs
type
list parsedArgs showVersions parsedArgs category parsedArgs
install parsedArgs
uninstall parsedArgs
force parsedArgs
verbose res
res
e
e
waitMarkerFilePath
parsedArgs
fileURIs length
waitMarkerFilePath verbose
type
fileURIs
folderURIs
diffMode parsedArgs diff
mergeMode parsedArgs merge
addMode parsedArgs add
removeMode parsedArgs remove
gotoLineMode parsedArgs goto
forceReuseWindow parsedArgs
forceNewWindow parsedArgs
waitMarkerFilePath
remoteAuthority remote
verbose e
e
waitMarkerFilePath
waitMarkerFilePath
readFromStdinPromise
readFromStdinPromise
waitMarkerFilePath stdinFilePath
fs stdinFilePath
e
process env
cp encoding
_e
path
fs path
res res
args verbose
uris
location args
location
uris location href
uris location href
e
uris length
type
uris
verbose e
e
args PipeCommand verbose
http
verbose
args
resolve reject
message args
cliPipe
message
opts http RequestOptions
socketPath cliPipe
path
method
headers
req http opts res
res headers
res headers
chunks
res
res chunk
chunks chunk
res err err
res
content chunks
obj content
res statusCode
obj
obj
e
content
req err err
req message
req
inputs
inputs input input input href input
message err
message
err
process
preferredCwd process env
input
input input
input preferredCwd input
input
input input folderURIS fileURIS
url input
mappedUri url href
stat fs fs input
stat
fileURIS mappedUri
stat
folderURIS mappedUri
input
fileURIS mappedUri
e
e code
fileURIS mappedUri
e
uri
uri cliRemoteAuthority
FileAccess fsPath
productName version commit executableName remainingArgs process argv
productName version commit executableName remainingArgs err
err message err stack err
}
from
'../../platform/environment/node/argv.js'
;
import
{
}
from
'../../platform/environment/common/argv.js'
;
import
{
}
from
'../../platform/environment/node/wait.js'
;
import
{
}
from
'../../workbench/api/node/extHostCLIServer.js'
;
import
{
,
,
}
from
'../../platform/environment/node/stdin.js'
;
import
{
}
from
'../../base/common/async.js'
;
import
{
}
from
'../../base/common/network.js'
;
import
{
}
from
'./server.cliAgent.js'
;
interface
ProductDescription
{
:
string
;
:
string
;
:
string
;
:
string
;
}
interface
RemoteParsedArgs
extends
NativeParsedArgs
{
'gitCredential'
?
:
string
;
'openExternal'
?
:
boolean
}
const
isSupportedForCmd
=
(
:
keyof
)
=>
{
switch
(
)
{
case
'user-data-dir'
:
case
'extensions-dir'
:
case
'export-default-configuration'
:
case
'install-source'
:
case
'enable-smoke-test-driver'
:
case
'extensions-download-dir'
:
case
'builtin-extensions-dir'
:
case
'telemetry'
:
return
false
;
default
:
return
true
;
}
}
;
const
isSupportedForPipe
=
(
:
keyof
)
=>
{
switch
(
)
{
case
'version'
:
case
'help'
:
case
'folder-uri'
:
case
'file-uri'
:
case
'add'
:
case
'diff'
:
case
'merge'
:
case
'wait'
:
case
'goto'
:
case
'reuse-window'
:
case
'new-window'
:
case
'status'
:
case
'install-extension'
:
case
'uninstall-extension'
:
case
'update-extensions'
:
case
'list-extensions'
:
case
'force'
:
case
'do-not-include-pack-dependencies'
:
case
'show-versions'
:
case
'category'
:
case
'verbose'
:
case
'remote'
:
case
'locate-shell-integration-path'
:
return
true
;
default
:
return
false
;
}
}
;
const
=
.
[
'VSCODE_IPC_HOOK_CLI'
]
as
string
;
const
=
.
[
'VSCODE_CLIENT_COMMAND'
]
as
string
;
const
=
.
[
'VSCODE_CLIENT_COMMAND_CWD'
]
as
string
;
const
=
.
[
'VSCODE_CLI_AUTHORITY'
]
as
string
;
const
=
.
[
'VSCODE_STDIN_FILE_PATH'
]
as
string
;
export
async
function
main
(
:
,
:
string
[
]
)
:
Promise
<
void
>
{
if
(
!
&&
!
)
{
console
.
log
(
'Command is only available in WSL or inside a Visual Studio Code terminal.'
)
;
return
;
}
if
(
hasAgentCommand
(
)
)
{
console
.
error
(
` The 'agent' command is not supported by the remote CLI. `
)
;
.
=
1
;
return
;
}
const
:
<
<
>>
=
{
...
OPTIONS
,
:
{
:
'string'
}
,
:
{
:
'boolean'
}
}
;
const
=
?
:
;
for
(
const
in
OPTIONS
)
{
const
=
<
keyof
>
;
if
(
!
isSupported
(
)
)
{
delete
[
]
;
}
}
if
(
)
{
[
'openExternal'
]
=
{
:
'boolean'
}
;
}
const
:
=
{
onMultipleValues
:
(
:
string
,
:
string
)
=>
{
console
.
error
(
` Option ' ${ id} ' can only be defined once. Using value ${ usedValue} . `
)
;
}
,
onEmptyValue
:
(
)
=>
{
console
.
error
(
` Ignoring option ' ${ id} ': Value must not be empty. `
)
;
}
,
onUnknownOption
:
(
:
string
)
=>
{
console
.
error
(
` Ignoring option ' ${ id} ': not supported for ${ desc. executableName} . `
)
;
}
,
onDeprecatedOption
:
(
:
string
,
:
string
)
=>
{
console
.
warn
(
` Option ' ${ deprecatedOption} ' is deprecated: ${ message} `
)
;
}
}
;
const
=
parseArgs
(
,
,
)
;
const
=
?
mapFileToRemoteUri
:
(
:
string
)
=>
;
const
=
!
!
[
'verbose'
]
;
if
(
.
)
{
console
.
log
(
buildHelpMessage
(
.
,
.
,
.
,
)
)
;
return
;
}
if
(
.
)
{
console
.
log
(
buildVersionMessage
(
.
,
.
)
)
;
return
;
}
if
(
[
'locate-shell-integration-path'
]
)
{
let
:
string
;
switch
(
[
'locate-shell-integration-path'
]
)
{
case
'bash'
:
=
'shellIntegration-bash.sh'
;
break
;
case
'pwsh'
:
=
'shellIntegration.ps1'
;
break
;
case
'zsh'
:
=
'shellIntegration-rc.zsh'
;
break
;
case
'fish'
:
=
'shellIntegration.fish'
;
break
;
default
:
throw
new
Error
(
'Error using --locate-shell-integration-path: Invalid shell type'
)
;
}
console
.
log
(
join
(
getAppRoot
(
)
,
'out'
,
'vs'
,
'workbench'
,
'contrib'
,
'terminal'
,
'common'
,
'scripts'
,
)
)
;
return
;
}
if
(
)
{
if
(
[
'openExternal'
]
)
{
await
openInBrowser
(
[
'_'
]
,
)
;
return
;
}
}
let
:
string
|
null
|
undefined
=
.
;
if
(
===
'local'
||
===
'false'
||
===
''
)
{
=
null
;
}
const
=
(
[
'folder-uri'
]
||
[
]
)
.
map
(
)
;
[
'folder-uri'
]
=
;
const
=
(
[
'file-uri'
]
||
[
]
)
.
map
(
)
;
[
'file-uri'
]
=
;
const
=
[
'_'
]
;
let
=
false
;
for
(
const
of
)
{
if
(
===
'-'
)
{
=
true
;
}
else
{
translatePath
(
,
,
,
)
;
}
}
[
'_'
]
=
[
]
;
let
:
Promise
<
void
>
|
undefined
;
let
:
string
|
undefined
;
if
(
&&
hasStdinWithoutTty
(
)
)
{
try
{
=
;
if
(
!
)
{
=
getStdinFilePath
(
)
;
const
=
new
DeferredPromise< void >
(
)
;
await
readFromStdin
(
,
,
(
)
=>
.
complete
(
)
)
;
if
(
!
.
)
{
=
.
;
}
}
translatePath
(
,
,
,
)
;
[
'skip-add-to-recently-opened'
]
=
true
;
console
.
log
(
` Reading from stdin via: ${ stdinFilePath} `
)
;
}
catch
(
)
{
console
.
log
(
` Failed to create file to read via stdin: ${ e. toString ( ) } `
)
;
}
}
if
(
.
)
{
.
=
.
.
map
(
=>
mapFileUri
(
pathToURI
(
)
.
)
)
;
}
if
(
.
)
{
.
=
mapFileUri
(
pathToURI
(
[
'extensionTestsPath'
]
)
.
)
;
}
const
=
[
'crash-reporter-directory'
]
;
if
(
!==
undefined
&&
!
.
match
(
/ ^ ( [ a- z A- Z ] :[ \\ \/ ] ) /
)
)
{
console
.
log
(
` The crash reporter directory ' ${ crashReporterDirectory} ' must be an absolute Windows path (e.g. c:/crashes) `
)
;
return
;
}
if
(
)
{
if
(
[
'install-extension'
]
!==
undefined
||
[
'uninstall-extension'
]
!==
undefined
||
[
'list-extensions'
]
||
[
'update-extensions'
]
)
{
const
:
string
[
]
=
[
]
;
[
'install-extension'
]
?.
forEach
(
=>
.
push
(
'--install-extension'
,
)
)
;
[
'uninstall-extension'
]
?.
forEach
(
=>
.
push
(
'--uninstall-extension'
,
)
)
;
[
'list-extensions'
,
'force'
,
'show-versions'
,
'category'
]
.
forEach
(
=>
{
const
=
[
<
keyof
>
]
;
if
(
!==
undefined
)
{
.
push
(
` -- ${ opt} = ${ value} `
)
;
}
}
)
;
if
(
[
'update-extensions'
]
)
{
.
push
(
'--update-extensions'
)
;
}
const
=
.
fork
(
.
asFileUri
(
'server-main'
)
.
,
,
{
:
'inherit'
}
)
;
.
on
(
'error'
,
=>
console
.
log
(
)
)
;
return
;
}
const
:
string
[
]
=
[
]
;
for
(
const
in
)
{
const
=
[
as
keyof
typeof
]
;
if
(
typeof
===
'boolean'
)
{
if
(
)
{
.
push
(
'--'
+
)
;
}
}
else
if
(
Array
.
isArray
(
)
)
{
for
(
const
of
)
{
.
push
(
` -- ${ key} = ${ entry. toString ( ) } `
)
;
}
}
else
if
(
)
{
.
push
(
` -- ${ key} = ${ val. toString ( ) } `
)
;
}
}
if
(
!==
null
)
{
.
push
(
` --remote= ${ remote || cliRemoteAuthority} `
)
;
}
const
=
extname
(
)
;
if
(
===
'.bat'
||
===
'.cmd'
)
{
const
=
||
cwd
(
)
;
if
(
)
{
console
.
log
(
` Invoking: cmd.exe /C ${ cliCommand} ${ newCommandline. join ( ' ' ) } in ${ processCwd} `
)
;
}
.
spawn
(
'cmd.exe'
,
[
'/C'
,
,
...
]
,
{
:
'inherit'
,
:
}
)
;
}
else
{
const
=
dirname
(
)
;
const
=
{
...
.
,
ELECTRON_RUN_AS_NODE
:
'1'
}
;
const
=
.
.
substring
(
0
,
10
)
;
if
(
.
existsSync
(
join
(
,
)
)
)
{
.
unshift
(
` ${ versionFolder} /resources/app/out/cli.js `
)
;
}
else
{
.
unshift
(
'resources/app/out/cli.js'
)
;
}
if
(
)
{
console
.
log
(
` Invoking: cd " ${ cliCwd} " && ELECTRON_RUN_AS_NODE=1 " ${ cliCommand} " " ${ newCommandline. join ( '" "' ) } " `
)
;
}
if
(
runningInWSL2
(
)
)
{
if
(
)
{
console
.
log
(
` Using pipes for output. `
)
;
}
const
=
.
spawn
(
,
,
{
:
,
,
:
[
'inherit'
,
'pipe'
,
'pipe'
]
}
)
;
.
.
on
(
'data'
,
=>
.
.
write
(
)
)
;
.
.
on
(
'data'
,
=>
.
.
write
(
)
)
;
}
else
{
.
spawn
(
,
,
{
:
,
,
:
'inherit'
}
)
;
}
}
}
else
{
if
(
.
)
{
await
sendToPipe
(
{
:
'status'
}
,
)
.
then
(
(
:
string
)
=>
{
console
.
log
(
)
;
}
)
.
catch
(
=>
{
console
.
error
(
'Error when requesting status:'
,
)
;
}
)
;
return
;
}
if
(
[
'install-extension'
]
!==
undefined
||
[
'uninstall-extension'
]
!==
undefined
||
[
'list-extensions'
]
||
[
'update-extensions'
]
)
{
await
sendToPipe
(
{
:
'extensionManagement'
,
:
[
'list-extensions'
]
?
{
:
[
'show-versions'
]
,
:
[
'category'
]
}
:
undefined
,
:
asExtensionIdOrVSIX
(
[
'install-extension'
]
)
,
:
asExtensionIdOrVSIX
(
[
'uninstall-extension'
]
)
,
:
[
'force'
]
}
,
)
.
then
(
(
:
string
)
=>
{
console
.
log
(
)
;
}
)
.
catch
(
=>
{
console
.
error
(
'Error when invoking the extension management command:'
,
)
;
}
)
;
return
;
}
let
:
string
|
undefined
=
undefined
;
if
(
[
'wait'
]
)
{
if
(
!
.
)
{
console
.
log
(
'At least one file must be provided to wait for.'
)
;
return
;
}
=
createWaitMarkerFileSync
(
)
;
}
await
sendToPipe
(
{
:
'open'
,
,
,
:
.
,
:
.
,
:
.
,
:
.
,
:
.
,
:
[
'reuse-window'
]
,
:
[
'new-window'
]
,
,
:
}
,
)
.
catch
(
=>
{
console
.
error
(
'Error when invoking the open command:'
,
)
;
}
)
;
if
(
)
{
await
waitForFileDeleted
(
)
;
}
if
(
)
{
await
;
}
if
(
&&
)
{
try
{
.
unlinkSync
(
)
;
}
catch
(
)
{
}
}
}
}
function
runningInWSL2
(
)
:
boolean
{
if
(
!
!
.
[
'WSL_DISTRO_NAME'
]
)
{
try
{
return
.
execSync
(
'uname -r'
,
{
:
'utf8'
}
)
.
includes
(
'-microsoft-'
)
;
}
catch
(
)
{
}
}
return
false
;
}
async
function
waitForFileDeleted
(
:
string
)
{
while
(
.
existsSync
(
)
)
{
await
new
Promise
(
=>
setTimeout
(
,
1000
)
)
;
}
}
async
function
openInBrowser
(
:
string
[
]
,
:
boolean
)
{
const
:
string
[
]
=
[
]
;
for
(
const
of
)
{
try
{
if
(
/ ^ [ a- z -] + :\/ \/ . + /
.
test
(
)
)
{
.
push
(
new
URL
(
)
.
)
;
}
else
{
.
push
(
pathToURI
(
)
.
)
;
}
}
catch
(
)
{
console
.
log
(
` Invalid url: ${ location} `
)
;
}
}
if
(
.
)
{
await
sendToPipe
(
{
:
'openExternal'
,
}
,
)
.
catch
(
=>
{
console
.
error
(
'Error when invoking the open external command:'
,
)
;
}
)
;
}
}
async
function
sendToPipe
(
:
,
:
boolean
)
:
Promise
<
string
>
{
const
=
await
import
(
'http'
)
;
if
(
)
{
console
.
log
(
JSON
.
stringify
(
,
null
,
' '
)
)
;
}
return
new
Promise < string >
(
(
,
)
=>
{
const
=
JSON
.
stringify
(
)
;
if
(
!
)
{
console
.
log
(
'Message '
+
)
;
resolve
(
''
)
;
return
;
}
const
:
.
=
{
:
,
:
'/'
,
:
'POST'
,
:
{
'content-type'
:
'application/json'
,
'accept'
:
'application/json'
}
}
;
const
=
.
request
(
,
=>
{
if
(
.
[
'content-type'
]
!==
'application/json'
)
{
reject
(
'Error in response: Invalid content type: Expected \'application/json\', is: '
+
.
[
'content-type'
]
)
;
return
;
}
const
:
string
[
]
=
[
]
;
.
setEncoding
(
'utf8'
)
;
.
on
(
'data'
,
=>
{
.
push
(
)
;
}
)
;
.
on
(
'error'
,
(
)
=>
fatal
(
'Error in response.'
,
)
)
;
.
on
(
'end'
,
(
)
=>
{
const
=
.
join
(
''
)
;
try
{
const
=
JSON
.
parse
(
)
;
if
(
.
===
200
)
{
resolve
(
)
;
}
else
{
reject
(
)
;
}
}
catch
(
)
{
reject
(
'Error in response: Unable to parse response as JSON: '
+
)
;
}
}
)
;
}
)
;
.
on
(
'error'
,
(
)
=>
fatal
(
'Error in request.'
,
)
)
;
.
write
(
)
;
.
end
(
)
;
}
)
;
}
function
asExtensionIdOrVSIX
(
:
string
[
]
|
undefined
)
{
return
?.
map
(
=>
/ \. vsix$ / i
.
test
(
)
?
pathToURI
(
)
.
:
)
;
}
function
fatal
(
:
string
,
:
unknown
)
:
void
{
console
.
error
(
'Unable to connect to VS Code server: '
+
)
;
console
.
error
(
)
;
.
exit
(
1
)
;
}
const
=
.
.
PWD
||
cwd
(
)
;
function
pathToURI
(
:
string
)
:
URL
{
=
.
trim
(
)
;
=
resolve
(
,
)
;
return
pathToFileURL
(
)
;
}
function
translatePath
(
:
string
,
mapFileUri
:
(
:
string
)
=>
string
,
:
string
[
]
,
:
string
[
]
)
{
const
=
pathToURI
(
)
;
const
=
mapFileUri
(
.
)
;
try
{
const
=
.
lstatSync
(
.
realpathSync
(
)
)
;
if
(
.
isFile
(
)
)
{
.
push
(
)
;
}
else
if
(
.
isDirectory
(
)
)
{
.
push
(
)
;
}
else
if
(
===
'/dev/null'
)
{
.
push
(
)
;
}
}
catch
(
)
{
if
(
.
===
'ENOENT'
)
{
.
push
(
)
;
}
else
{
console
.
log
(
` Problem accessing file ${ input} . Ignoring file `
,
)
;
}
}
}
function
mapFileToRemoteUri
(
:
string
)
:
string
{
return
.
replace
(
/ ^ file:\/ \/ /
,
'vscode-remote://'
+
)
;
}
function
getAppRoot
(
)
{
return
dirname
(
.
asFileUri
(
''
)
.
)
;
}
const
[
,
,
,
,
,
,
...
]
=
.
;
main
(
{
,
,
,
}
,
)
.
then
(
null
,
=>
{
console
.
error
(
.
||
.
||
)
;
}
)
;