Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
彭彦祖
code-server
提交
40778b15
C
code-server
项目概览
彭彦祖
/
code-server
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
code-server
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
40778b15
编写于
5月 14, 2020
作者:
A
Anmol Sethi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add code-server version into VS Code about
Closes #1506
上级
d7234029
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
39 addition
and
4 deletion
+39
-4
ci/build/npm-postinstall.sh
ci/build/npm-postinstall.sh
+2
-2
ci/dev/vscode.patch
ci/dev/vscode.patch
+35
-2
src/node/app/vscode.ts
src/node/app/vscode.ts
+2
-0
未找到文件。
ci/build/npm-postinstall.sh
浏览文件 @
40778b15
...
...
@@ -2,8 +2,6 @@
set
-eu
main
()
{
cd
lib/vscode
case
"
${
npm_config_user_agent
-
}
"
in
npm
*
)
# We are running under npm.
if
[
"
${
npm_config_unsafe_perm
-
}
"
!=
"true"
]
;
then
...
...
@@ -16,6 +14,8 @@ main() {
;;
esac
cd
lib/vscode
# We have to rename node_modules.bundled to node_modules.
# The bundled modules were renamed originally to avoid being ignored by yarn.
node_modules
=
"
$(
find
.
-depth
-name
"node_modules.bundled"
)
"
...
...
ci/dev/vscode.patch
浏览文件 @
40778b15
...
...
@@ -653,6 +653,19 @@ index 87a3b99c70..09e2c93172 100644
}
// Node: AMD loader
diff --git a/src/vs/platform/product/common/productService.ts b/src/vs/platform/product/common/productService.ts
index 266aa69fc6..e9b51f5fde 100644
--- a/src/vs/platform/product/common/productService.ts
+++ b/src/vs/platform/product/common/productService.ts
@@ -25,6 +25,8 @@
export interface IBuiltInExtension {
export type ConfigurationSyncStore = { url: string, authenticationProviders: IStringDictionary<{ scopes: string[] }> };
export interface IProductConfiguration {
+ readonly codeServerVersion?: string;
+
readonly version: string;
readonly date?: string;
readonly quality?: string;
diff --git a/src/vs/platform/remote/browser/browserSocketFactory.ts b/src/vs/platform/remote/browser/browserSocketFactory.ts
index d0f6e6b18a..1966fd297d 100644
--- a/src/vs/platform/remote/browser/browserSocketFactory.ts
...
...
@@ -1328,10 +1341,10 @@ index 0000000000..56331ff1fc
+require('../../bootstrap-amd').load('vs/server/entry');
diff --git a/src/vs/server/ipc.d.ts b/src/vs/server/ipc.d.ts
new file mode 100644
index 0000000000..
d4771351d
e
index 0000000000..
0a9c95d50
e
--- /dev/null
+++ b/src/vs/server/ipc.d.ts
@@ -0,0 +1,11
6
@@
@@ -0,0 +1,11
7
@@
+/**
+ * External interfaces for integration into code-server over IPC. No vs imports
+ * should be made in this file.
...
...
@@ -1434,6 +1447,7 @@ index 0000000000..d4771351de
+ };
+ readonly remoteUserDataUri: UriComponents;
+ readonly productConfiguration: {
+ codeServerVersion?: string;
+ readonly extensionsGallery?: {
+ readonly serviceUrl: string;
+ readonly itemUrl: string;
...
...
@@ -3185,6 +3199,25 @@ index f2ca5011dd..4683e80a68 100644
} catch (e) {
console.error('Could not rewrite csp');
}
diff --git a/src/vs/workbench/services/dialogs/browser/dialogService.ts b/src/vs/workbench/services/dialogs/browser/dialogService.ts
index 6b42535bff..88b7e3c3ea 100644
--- a/src/vs/workbench/services/dialogs/browser/dialogService.ts
+++ b/src/vs/workbench/services/dialogs/browser/dialogService.ts
@@ -124,11 +124,12 @@
export class DialogService implements IDialogService {
async about(): Promise<void> {
const detailString = (useAgo: boolean): string => {
return nls.localize('aboutDetail',
- "Version: {0}\nCommit: {1}\nDate: {2}\nBrowser: {3}",
+ "code-server: v{4}\n VS Code: v{0}\nCommit: {1}\nDate: {2}\nBrowser: {3}",
this.productService.version || 'Unknown',
this.productService.commit || 'Unknown',
this.productService.date ? `${this.productService.date}${useAgo ? ' (' + fromNow(new Date(this.productService.date), true) + ')' : ''}` : 'Unknown',
- navigator.userAgent
+ navigator.userAgent,
+ this.productService.codeServerVersion || 'Unknown',
);
};
diff --git a/src/vs/workbench/services/environment/browser/environmentService.ts b/src/vs/workbench/services/environment/browser/environmentService.ts
index 7ed6e9e21a..223fa72662 100644
--- a/src/vs/workbench/services/environment/browser/environmentService.ts
...
...
src/node/app/vscode.ts
浏览文件 @
40778b15
...
...
@@ -192,6 +192,8 @@ export class VscodeHttpProvider extends HttpProvider {
response
.
content
=
response
.
content
.
replace
(
/<!-- PROD_ONLY/g
,
""
).
replace
(
/END_PROD_ONLY -->/g
,
""
)
}
options
.
productConfiguration
.
codeServerVersion
=
require
(
"
../../../package.json
"
).
version
response
.
content
=
response
.
content
.
replace
(
`"{{REMOTE_USER_DATA_URI}}"`
,
`'
${
JSON
.
stringify
(
options
.
remoteUserDataUri
)}
'`
)
.
replace
(
`"{{PRODUCT_CONFIGURATION}}"`
,
`'
${
JSON
.
stringify
(
options
.
productConfiguration
)}
'`
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录