ide на основе vs code · VibeGit
ide на основе vs code Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
krutaya-ide-na-osnove-vs-code / build / lib / test / osProxyResolver.test.ts 108 строк · изменён 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
import assert from 'assert' ;
import * as fs from 'fs' ;
import * as os from 'os' ;
import * as path from 'path' ;
import { suite, test } from 'node:test' ;
import { create } from 'tar' ;
import { ensureOSProxyResolverPlatformPackage, getOSProxyResolverExcludeFilter, getOSProxyResolverPlatformFiles, osProxyResolverPlatforms } from '../osProxyResolver.ts' ;
suite ( 'osProxyResolver' ,
assert
assert
assert
assert
assert
osProxyResolverPlatforms
platform platform
platform
assert
osProxyResolverPlatforms platform
assert
assert
lockFilePath path meta dirname
lockFile fs lockFilePath
lockedPlatforms Object lockFile packages
key key groups platform
platform platform
assert lockedPlatforms osProxyResolverPlatforms
repoRoot fs path os
nodeModulesRoot path repoRoot
fs nodeModulesRoot recursive
fs path repoRoot
packages
version
nodeModulesRoot
_packageName _version tempDir
packageRoot path tempDir
fs packageRoot recursive
fs path packageRoot
tarball path tempDir
file tarball cwd tempDir gzip sync
tarball
fs path nodeModulesRoot
fs repoRoot recursive force
(
)
=>
{
test
(
'selects the target platform package'
,
(
)
=>
{
.
deepStrictEqual
(
getOSProxyResolverPlatformFiles
(
'darwin'
,
'x64'
)
,
[
'node_modules/@vscode/os-proxy-resolver-darwin-x64/**'
,
]
)
;
.
deepStrictEqual
(
getOSProxyResolverPlatformFiles
(
'linux'
,
'armhf'
)
,
[
'node_modules/@vscode/os-proxy-resolver-linux-arm-gnueabihf/**'
,
]
)
;
.
deepStrictEqual
(
getOSProxyResolverPlatformFiles
(
'win32'
,
'arm64'
)
,
[
'node_modules/@vscode/os-proxy-resolver-win32-arm64-msvc/**'
,
]
)
;
.
deepStrictEqual
(
getOSProxyResolverPlatformFiles
(
'alpine'
,
'arm64'
)
,
[
]
)
;
}
)
;
test
(
'excludes non-target platform packages'
,
(
)
=>
{
.
deepStrictEqual
(
getOSProxyResolverExcludeFilter
(
'darwin'
,
'x64'
)
,
[
'**'
,
...
.
filter
(
=>
!==
'darwin-x64'
)
.
map
(
=>
` !**/node_modules/@vscode/os-proxy-resolver- ${ platform} /** `
)
,
]
)
;
.
deepStrictEqual
(
getOSProxyResolverExcludeFilter
(
'alpine'
,
'arm64'
)
,
[
'**'
,
...
.
map
(
=>
` !**/node_modules/@vscode/os-proxy-resolver- ${ platform} /** `
)
,
]
)
;
}
)
;
test
(
'excludes the musl packages from the glibc linux targets'
,
(
)
=>
{
.
deepStrictEqual
(
getOSProxyResolverExcludeFilter
(
'linux'
,
'x64'
)
,
[
'**'
,
'!**/node_modules/@vscode/os-proxy-resolver-darwin-arm64/**'
,
'!**/node_modules/@vscode/os-proxy-resolver-darwin-x64/**'
,
'!**/node_modules/@vscode/os-proxy-resolver-linux-arm-gnueabihf/**'
,
'!**/node_modules/@vscode/os-proxy-resolver-linux-arm64-gnu/**'
,
'!**/node_modules/@vscode/os-proxy-resolver-linux-arm64-musl/**'
,
'!**/node_modules/@vscode/os-proxy-resolver-linux-x64-musl/**'
,
'!**/node_modules/@vscode/os-proxy-resolver-win32-arm64-msvc/**'
,
'!**/node_modules/@vscode/os-proxy-resolver-win32-x64-msvc/**'
,
]
)
;
.
deepStrictEqual
(
getOSProxyResolverExcludeFilter
(
'linux'
,
'arm64'
)
,
[
'**'
,
'!**/node_modules/@vscode/os-proxy-resolver-darwin-arm64/**'
,
'!**/node_modules/@vscode/os-proxy-resolver-darwin-x64/**'
,
'!**/node_modules/@vscode/os-proxy-resolver-linux-arm-gnueabihf/**'
,
'!**/node_modules/@vscode/os-proxy-resolver-linux-arm64-musl/**'
,
'!**/node_modules/@vscode/os-proxy-resolver-linux-x64-gnu/**'
,
'!**/node_modules/@vscode/os-proxy-resolver-linux-x64-musl/**'
,
'!**/node_modules/@vscode/os-proxy-resolver-win32-arm64-msvc/**'
,
'!**/node_modules/@vscode/os-proxy-resolver-win32-x64-msvc/**'
,
]
)
;
}
)
;
test
(
'accounts for every platform package in the lockfile'
,
(
)
=>
{
const
=
.
join
(
import
.
.
,
'..'
,
'..'
,
'..'
,
'package-lock.json'
)
;
const
=
JSON
.
parse
(
.
readFileSync
(
,
'utf8'
)
)
;
const
=
.
keys
(
.
)
.
map
(
=>
/ (?: ^ | \/ ) node_modules\/ @vscode\/ os-proxy-resolver-(?<platform > . + ) $ /
.
exec
(
)
?.
?.
)
.
filter
(
=>
!==
undefined
)
.
sort
(
)
;
.
deepStrictEqual
(
,
[
...
]
.
sort
(
)
)
;
}
)
;
test
(
'materializes a missing target platform package'
,
(
)
=>
{
const
=
.
mkdtempSync
(
.
join
(
.
tmpdir
(
)
,
'vscode-os-proxy-resolver-platform-test-'
)
)
;
const
=
.
join
(
,
'node_modules'
)
;
try
{
.
mkdirSync
(
,
{
:
true
}
)
;
.
writeFileSync
(
.
join
(
,
'package-lock.json'
)
,
JSON
.
stringify
(
{
:
{
'node_modules/@vscode/os-proxy-resolver-darwin-x64'
:
{
:
'0.2.0'
,
}
}
}
)
)
;
ensureOSProxyResolverPlatformPackage
(
'darwin'
,
'x64'
,
,
{
packPackage
:
(
,
,
)
=>
{
const
=
.
join
(
,
'package'
)
;
.
mkdirSync
(
,
{
:
true
}
)
;
.
writeFileSync
(
.
join
(
,
'os_proxy_resolver.node'
)
,
''
)
;
const
=
.
join
(
,
'os-proxy-resolver-darwin-x64.tgz'
)
;
create
(
{
:
,
:
,
:
true
,
:
true
}
,
[
'package'
]
)
;
return
;
}
}
)
;
assert
(
.
existsSync
(
.
join
(
,
'@vscode'
,
'os-proxy-resolver-darwin-x64'
,
'os_proxy_resolver.node'
)
)
)
;
}
finally
{
.
rmSync
(
,
{
:
true
,
:
true
}
)
;
}
}
)
;
}
)
;