ide на основе vs code · VibeGit
ide на основе vs code Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
krutaya-ide-na-osnove-vs-code / build / darwin / create-universal-app.ts 167 строк · изменён 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
import path from 'path' ;
import fs from 'fs' ;
import minimatch from 'minimatch' ;
import { makeUniversalApp } from 'vscode-universal-bundler' ;
const root = path. dirname ( path. dirname ( import . meta. dirname) ) ;
const nodeModulesBases = [
path. join ( 'Contents' , 'Resources' , 'app' , 'node_modules' ) ,
path. join
x64AppPath arm64AppPath relativePath
inX64 path x64AppPath relativePath
inArm64 path arm64AppPath relativePath
fs inX64 fs inArm64
fs inArm64 recursive
fs inX64 inArm64 recursive
fs inArm64 fs inX64
fs inX64 recursive
fs inArm64 inX64 recursive
buildDir
arch process env
buildDir
product fs path root
appName product nameLong
x64AppPath path buildDir appName
arm64AppPath path buildDir appName
asarRelativePath path
outAppPath path buildDir appName
productJsonPath path outAppPath
plat
base nodeModulesBases
x64AppPath arm64AppPath path base
x64AppPath arm64AppPath path base
x64AppPath arm64AppPath path base plat
x64AppPath arm64AppPath path base plat
x64AppPath arm64AppPath path base plat
x64AppPath arm64AppPath path base plat
copilotExtensionNodeModules path
x64AppPath arm64AppPath path copilotExtensionNodeModules plat
x64AppPath arm64AppPath path copilotExtensionNodeModules plat
x64AppPath arm64AppPath path copilotExtensionNodeModules plat
x64AppPath arm64AppPath path copilotExtensionNodeModules plat
base nodeModulesBases
mxcArch
x64AppPath arm64AppPath path base mxcArch
filesToSkip
x64AppPath
arm64AppPath
asarPath asarRelativePath
outAppPath
force
mergeASARs
singleArchFiles
x64ArchFiles
file
expected filesToSkip
file expected
productJson fs productJsonPath
Object productJson
darwinUniversalAssetId
fs productJsonPath productJson
meta main
process argv err
err
process
(
'Contents'
,
'Resources'
,
'app'
,
'node_modules.asar.unpacked'
)
]
;
function
crossCopyPlatformDir
(
:
string
,
:
string
,
:
string
)
:
void
{
const
=
.
join
(
,
)
;
const
=
.
join
(
,
)
;
if
(
.
existsSync
(
)
&&
!
.
existsSync
(
)
)
{
.
mkdirSync
(
,
{
:
true
}
)
;
.
cpSync
(
,
,
{
:
true
}
)
;
}
else
if
(
.
existsSync
(
)
&&
!
.
existsSync
(
)
)
{
.
mkdirSync
(
,
{
:
true
}
)
;
.
cpSync
(
,
,
{
:
true
}
)
;
}
}
async
function
main
(
?
:
string
)
{
const
=
.
[
'VSCODE_ARCH'
]
;
if
(
!
)
{
throw
new
Error
(
'Build dir not provided'
)
;
}
const
=
JSON
.
parse
(
.
readFileSync
(
.
join
(
,
'product.json'
)
,
'utf8'
)
)
;
const
=
.
+
'.app'
;
const
=
.
join
(
,
'VSCode-darwin-x64'
,
)
;
const
=
.
join
(
,
'VSCode-darwin-arm64'
,
)
;
const
=
.
join
(
'Contents'
,
'Resources'
,
'app'
,
'node_modules.asar'
)
;
const
=
.
join
(
,
` VSCode-darwin- ${ arch} `
,
)
;
const
=
.
resolve
(
,
'Contents'
,
'Resources'
,
'app'
,
'product.json'
)
;
for
(
const
of
[
'darwin-x64'
,
'darwin-arm64'
]
)
{
for
(
const
of
)
{
crossCopyPlatformDir
(
,
,
.
join
(
,
'@github'
,
` copilot- ${ plat} `
)
)
;
crossCopyPlatformDir
(
,
,
.
join
(
,
'@vscode'
,
` os-proxy-resolver- ${ plat} `
)
)
;
crossCopyPlatformDir
(
,
,
.
join
(
,
'@github'
,
'copilot'
,
'prebuilds'
,
)
)
;
crossCopyPlatformDir
(
,
,
.
join
(
,
'@github'
,
'copilot'
,
'tgrep'
,
'bin'
,
)
)
;
crossCopyPlatformDir
(
,
,
.
join
(
,
'@github'
,
'copilot'
,
'sdk'
,
'tgrep'
,
'bin'
,
)
)
;
crossCopyPlatformDir
(
,
,
.
join
(
,
'@vscode'
,
'ripgrep-universal'
,
'bin'
,
)
)
;
}
const
=
.
join
(
'Contents'
,
'Resources'
,
'app'
,
'extensions'
,
'copilot'
,
'node_modules'
)
;
crossCopyPlatformDir
(
,
,
.
join
(
,
'@github'
,
'copilot'
,
'sdk'
,
'prebuilds'
,
)
)
;
crossCopyPlatformDir
(
,
,
.
join
(
,
'@github'
,
'copilot'
,
'sdk'
,
'ripgrep'
,
'bin'
,
)
)
;
crossCopyPlatformDir
(
,
,
.
join
(
,
'@github'
,
'copilot'
,
'sdk'
,
'tgrep'
,
'bin'
,
)
)
;
crossCopyPlatformDir
(
,
,
.
join
(
,
'@github'
,
'copilot'
,
'tgrep'
,
'bin'
,
)
)
;
}
for
(
const
of
)
{
for
(
const
of
[
'x64'
,
'arm64'
]
)
{
crossCopyPlatformDir
(
,
,
.
join
(
,
'@microsoft'
,
'mxc-sdk'
,
'bin'
,
)
)
;
}
}
const
=
[
'**/CodeResources'
,
'**/Credits.rtf'
,
'**/policies/{*.mobileconfig,**/*.plist}'
,
'**/node_modules/@github/copilot-darwin-x64/**'
,
'**/node_modules/@github/copilot-darwin-arm64/**'
,
'**/node_modules.asar.unpacked/@github/copilot-darwin-x64/**'
,
'**/node_modules.asar.unpacked/@github/copilot-darwin-arm64/**'
,
'**/node_modules/@vscode/os-proxy-resolver-darwin-x64/**'
,
'**/node_modules/@vscode/os-proxy-resolver-darwin-arm64/**'
,
'**/node_modules.asar.unpacked/@vscode/os-proxy-resolver-darwin-x64/**'
,
'**/node_modules.asar.unpacked/@vscode/os-proxy-resolver-darwin-arm64/**'
,
'**/node_modules/@github/copilot/prebuilds/darwin-x64/**'
,
'**/node_modules/@github/copilot/prebuilds/darwin-arm64/**'
,
'**/node_modules.asar.unpacked/@github/copilot/prebuilds/darwin-x64/**'
,
'**/node_modules.asar.unpacked/@github/copilot/prebuilds/darwin-arm64/**'
,
'**/node_modules/@github/copilot/tgrep/bin/darwin-x64/**'
,
'**/node_modules/@github/copilot/tgrep/bin/darwin-arm64/**'
,
'**/node_modules.asar.unpacked/@github/copilot/tgrep/bin/darwin-x64/**'
,
'**/node_modules.asar.unpacked/@github/copilot/tgrep/bin/darwin-arm64/**'
,
'**/node_modules/@github/copilot/sdk/tgrep/bin/darwin-x64/**'
,
'**/node_modules/@github/copilot/sdk/tgrep/bin/darwin-arm64/**'
,
'**/node_modules.asar.unpacked/@github/copilot/sdk/tgrep/bin/darwin-x64/**'
,
'**/node_modules.asar.unpacked/@github/copilot/sdk/tgrep/bin/darwin-arm64/**'
,
'**/node_modules/@github/copilot/sdk/prebuilds/darwin-x64/**'
,
'**/node_modules/@github/copilot/sdk/prebuilds/darwin-arm64/**'
,
'**/node_modules/@github/copilot/sdk/ripgrep/bin/darwin-x64/**'
,
'**/node_modules/@github/copilot/sdk/ripgrep/bin/darwin-arm64/**'
,
'**/node_modules/@vscode/ripgrep-universal/bin/darwin-x64/**'
,
'**/node_modules/@vscode/ripgrep-universal/bin/darwin-arm64/**'
,
'**/node_modules.asar.unpacked/@vscode/ripgrep-universal/bin/darwin-x64/**'
,
'**/node_modules.asar.unpacked/@vscode/ripgrep-universal/bin/darwin-arm64/**'
,
'**/node_modules/@microsoft/mxc-sdk/bin/**'
,
'**/node_modules.asar.unpacked/@microsoft/mxc-sdk/bin/**'
,
]
;
await
makeUniversalApp
(
{
,
,
:
,
,
:
true
,
:
true
,
:
'{**/@github/copilot-darwin-*,**/@github/copilot-darwin-*/**,**/@github/copilot/prebuilds/darwin-*,**/@github/copilot/prebuilds/darwin-*/**,**/@github/copilot/tgrep/bin/darwin-*,**/@github/copilot/tgrep/bin/darwin-*/**,**/@github/copilot/sdk/tgrep/bin/darwin-*,**/@github/copilot/sdk/tgrep/bin/darwin-*/**,**/@github/copilot/sdk/prebuilds/darwin-*,**/@github/copilot/sdk/prebuilds/darwin-*/**,**/@github/copilot/sdk/ripgrep/bin/darwin-*,**/@github/copilot/sdk/ripgrep/bin/darwin-*/**,**/@vscode/ripgrep-universal/bin/darwin-*,**/@vscode/ripgrep-universal/bin/darwin-*/**,**/@vscode/os-proxy-resolver-darwin-*,**/@vscode/os-proxy-resolver-darwin-*/**,**/@microsoft/mxc-sdk/bin/*,**/@microsoft/mxc-sdk/bin/*/**}'
,
:
'{*/kerberos.node,**/extensions/microsoft-authentication/dist/libmsalruntime.dylib,**/extensions/microsoft-authentication/dist/msal-node-runtime.node,**/node_modules/@github/copilot-darwin-*/**,**/node_modules/@github/copilot/prebuilds/darwin-*/*,**/node_modules/@github/copilot/tgrep/bin/darwin-*/*,**/node_modules/@github/copilot/sdk/tgrep/bin/darwin-*/*,**/node_modules.asar.unpacked/@github/copilot-darwin-*/**,**/node_modules.asar.unpacked/@github/copilot/prebuilds/darwin-*/*,**/node_modules.asar.unpacked/@github/copilot/tgrep/bin/darwin-*/*,**/node_modules.asar.unpacked/@github/copilot/sdk/tgrep/bin/darwin-*/*,**/extensions/copilot/node_modules/@github/copilot/sdk/prebuilds/darwin-*/*,**/extensions/copilot/node_modules/@github/copilot/sdk/ripgrep/bin/darwin-*/*,**/extensions/copilot/node_modules/@github/copilot/sdk/tgrep/bin/darwin-*/*,**/extensions/copilot/node_modules/@github/copilot/tgrep/bin/darwin-*/*,**/node_modules/@vscode/ripgrep-universal/bin/darwin-*/*,**/node_modules.asar.unpacked/@vscode/ripgrep-universal/bin/darwin-*/*,**/node_modules/@vscode/os-proxy-resolver-darwin-*/**,**/node_modules.asar.unpacked/@vscode/os-proxy-resolver-darwin-*/**,**/node_modules/@microsoft/mxc-sdk/bin/**,**/node_modules.asar.unpacked/@microsoft/mxc-sdk/bin/**}'
,
filesToSkipComparison
:
(
:
string
)
=>
{
for
(
const
of
)
{
if
(
minimatch
(
,
)
)
{
return
true
;
}
}
return
false
;
}
}
)
;
const
=
JSON
.
parse
(
.
readFileSync
(
,
'utf8'
)
)
;
.
assign
(
,
{
:
'darwin-universal'
}
)
;
.
writeFileSync
(
,
JSON
.
stringify
(
,
null
,
'\t'
)
)
;
}
if
(
import
.
.
)
{
main
(
.
[
2
]
)
.
catch
(
=>
{
console
.
error
(
)
;
.
exit
(
1
)
;
}
)
;
}