Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
镜像
Coder
code-server
提交
219cad17
C
code-server
项目概览
镜像
/
Coder
/
code-server
2022-09-21 03:15:05同步失败
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
code-server
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
219cad17
编写于
11月 03, 2021
作者:
J
Joe Previte
提交者:
GitHub
11月 03, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "Add linkup command to improve link functionality" (#4439)
This reverts commit
2504f6fc
.
上级
dcc9cf3d
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
1 addition
and
50 deletion
+1
-50
.gitignore
.gitignore
+0
-1
ci/build/build-code-server.sh
ci/build/build-code-server.sh
+0
-9
ci/build/build-release.sh
ci/build/build-release.sh
+0
-1
ci/build/npm-postinstall.sh
ci/build/npm-postinstall.sh
+0
-6
src/node/link.ts
src/node/link.ts
+0
-16
src/node/main.ts
src/node/main.ts
+1
-17
未找到文件。
.gitignore
浏览文件 @
219cad17
...
@@ -12,7 +12,6 @@ vendor/modules
...
@@ -12,7 +12,6 @@ vendor/modules
node-*
node-*
/plugins
/plugins
/lib/coder-cloud-agent
/lib/coder-cloud-agent
/lib/linkup
.home
.home
coverage
coverage
**/.DS_Store
**/.DS_Store
...
...
ci/build/build-code-server.sh
浏览文件 @
219cad17
...
@@ -30,15 +30,6 @@ main() {
...
@@ -30,15 +30,6 @@ main() {
chmod
+x ./lib/coder-cloud-agent
chmod
+x ./lib/coder-cloud-agent
set
-e
set
-e
fi
fi
if
!
[
-f
./lib/linkup
]
;
then
echo
"Downloading Link agent..."
set
+e
curl
-fsSL
"https://storage.googleapis.com/coder-link-releases/latest/linkup-
$OS
-
$ARCH
"
-o
./lib/linkup
chmod
+x ./lib/linkup
set
-e
fi
}
}
main
"
$@
"
main
"
$@
"
ci/build/build-release.sh
浏览文件 @
219cad17
...
@@ -61,7 +61,6 @@ EOF
...
@@ -61,7 +61,6 @@ EOF
rsync node_modules/
"
$RELEASE_PATH
/node_modules"
rsync node_modules/
"
$RELEASE_PATH
/node_modules"
mkdir
-p
"
$RELEASE_PATH
/lib"
mkdir
-p
"
$RELEASE_PATH
/lib"
rsync ./lib/coder-cloud-agent
"
$RELEASE_PATH
/lib"
rsync ./lib/coder-cloud-agent
"
$RELEASE_PATH
/lib"
rsync ./lib/linkup
"
$RELEASE_PATH
/lib"
fi
fi
}
}
...
...
ci/build/npm-postinstall.sh
浏览文件 @
219cad17
...
@@ -66,12 +66,6 @@ main() {
...
@@ -66,12 +66,6 @@ main() {
echo
"Failed to download cloud agent; --link will not work"
echo
"Failed to download cloud agent; --link will not work"
fi
fi
if
curl
-fsSL
"https://storage.googleapis.com/coder-link-releases/latest/linkup-
$OS
-
$ARCH
"
-o
./lib/linkup
;
then
chmod
+x ./lib/linkup
else
echo
"Failed to download Link agent; the Link extension will not work"
fi
if
!
vscode_yarn
;
then
if
!
vscode_yarn
;
then
echo
"You may not have the required dependencies to build the native modules."
echo
"You may not have the required dependencies to build the native modules."
echo
"Please see https://github.com/cdr/code-server/blob/master/docs/npm.md"
echo
"Please see https://github.com/cdr/code-server/blob/master/docs/npm.md"
...
...
src/node/link.ts
已删除
100644 → 0
浏览文件 @
dcc9cf3d
import
{
logger
}
from
"
@coder/logger
"
import
{
ChildProcessWithoutNullStreams
,
spawn
}
from
"
child_process
"
import
path
from
"
path
"
export
function
startLink
(
address
:
URL
|
string
):
ChildProcessWithoutNullStreams
{
if
(
typeof
address
===
"
string
"
)
{
throw
new
Error
(
"
Cannot link socket paths
"
)
}
const
port
=
parseInt
(
address
.
port
,
10
)
logger
.
debug
(
`running link targeting
${
port
}
`
)
return
spawn
(
path
.
resolve
(
__dirname
,
"
../../lib/linkup
"
),
[
"
--devurl
"
,
`code:
${
port
}
:code-server`
],
{
shell
:
false
,
})
}
src/node/main.ts
浏览文件 @
219cad17
import
{
field
,
logger
}
from
"
@coder/logger
"
import
{
field
,
logger
}
from
"
@coder/logger
"
import
{
ChildProcessWithoutNullStreams
}
from
"
child_process
"
import
http
from
"
http
"
import
http
from
"
http
"
import
path
from
"
path
"
import
path
from
"
path
"
import
{
Disposable
}
from
"
../common/emitter
"
import
{
Disposable
}
from
"
../common/emitter
"
import
{
plural
,
logError
}
from
"
../common/util
"
import
{
plural
}
from
"
../common/util
"
import
{
createApp
,
ensureAddress
}
from
"
./app
"
import
{
createApp
,
ensureAddress
}
from
"
./app
"
import
{
AuthType
,
DefaultedArgs
,
Feature
}
from
"
./cli
"
import
{
AuthType
,
DefaultedArgs
,
Feature
}
from
"
./cli
"
import
{
coderCloudBind
}
from
"
./coder_cloud
"
import
{
coderCloudBind
}
from
"
./coder_cloud
"
import
{
commit
,
version
,
vsRootPath
}
from
"
./constants
"
import
{
commit
,
version
,
vsRootPath
}
from
"
./constants
"
import
{
startLink
}
from
"
./link
"
import
{
register
}
from
"
./routes
"
import
{
register
}
from
"
./routes
"
import
{
humanPath
,
isFile
,
loadAMDModule
,
open
}
from
"
./util
"
import
{
humanPath
,
isFile
,
loadAMDModule
,
open
}
from
"
./util
"
...
@@ -156,19 +154,6 @@ export const runCodeServer = async (
...
@@ -156,19 +154,6 @@ export const runCodeServer = async (
logger
.
info
(
"
- Connected to cloud agent
"
)
logger
.
info
(
"
- Connected to cloud agent
"
)
}
}
let
linkAgent
:
undefined
|
ChildProcessWithoutNullStreams
try
{
linkAgent
=
startLink
(
serverAddress
)
linkAgent
.
on
(
"
error
"
,
(
error
)
=>
{
logError
(
logger
,
"
link daemon
"
,
error
)
})
linkAgent
.
on
(
"
close
"
,
(
code
)
=>
{
logger
.
debug
(
"
link daemon closed
"
,
field
(
"
code
"
,
code
))
})
}
catch
(
error
)
{
logError
(
logger
,
"
link daemon
"
,
error
)
}
if
(
args
.
enable
&&
args
.
enable
.
length
>
0
)
{
if
(
args
.
enable
&&
args
.
enable
.
length
>
0
)
{
logger
.
info
(
"
Enabling the following experimental features:
"
)
logger
.
info
(
"
Enabling the following experimental features:
"
)
args
.
enable
.
forEach
((
feature
)
=>
{
args
.
enable
.
forEach
((
feature
)
=>
{
...
@@ -196,7 +181,6 @@ export const runCodeServer = async (
...
@@ -196,7 +181,6 @@ export const runCodeServer = async (
return
{
return
{
server
:
app
.
server
,
server
:
app
.
server
,
dispose
:
async
()
=>
{
dispose
:
async
()
=>
{
linkAgent
?.
kill
()
disposeRoutes
()
disposeRoutes
()
await
app
.
dispose
()
await
app
.
dispose
()
},
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录