Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
8fb99cd9
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
Vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8fb99cd9
编写于
6月 19, 2019
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
product service for web
- get product configuration from server
上级
535c9d56
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
158 addition
and
107 deletion
+158
-107
src/vs/code/browser/workbench/workbench.html
src/vs/code/browser/workbench/workbench.html
+3
-0
src/vs/platform/product/browser/productService.ts
src/vs/platform/product/browser/productService.ts
+37
-0
src/vs/platform/product/common/product.ts
src/vs/platform/product/common/product.ts
+85
-0
src/vs/platform/product/node/product.ts
src/vs/platform/product/node/product.ts
+1
-85
src/vs/workbench/browser/web.main.ts
src/vs/workbench/browser/web.main.ts
+3
-2
src/vs/workbench/browser/web.simpleservices.ts
src/vs/workbench/browser/web.simpleservices.ts
+0
-18
src/vs/workbench/contrib/surveys/electron-browser/languageSurveys.contribution.ts
.../surveys/electron-browser/languageSurveys.contribution.ts
+2
-1
src/vs/workbench/services/userData/common/userDataService.ts
src/vs/workbench/services/userData/common/userDataService.ts
+27
-0
src/vs/workbench/workbench.web.main.ts
src/vs/workbench/workbench.web.main.ts
+0
-1
未找到文件。
src/vs/code/browser/workbench/workbench.html
浏览文件 @
8fb99cd9
...
...
@@ -15,6 +15,9 @@
<!-- Workaround to pass remote user data uri-->
<meta
id=
"vscode-remote-user-data-uri"
data-settings=
"{{REMOTE_USER_DATA_URI}}"
>
<!-- Workaround to pass product configuration-->
<meta
id=
"vscode-remote-product-configuration"
data-settings=
"{{PRODUCT_CONFIGURATION}}"
>
<!-- Workaround to pass remote connection token-->
<meta
id=
"vscode-remote-connection-token"
data-settings=
"{{CONNECTION_AUTH_TOKEN}}"
>
</head>
...
...
src/vs/platform/product/browser/productService.ts
0 → 100644
浏览文件 @
8fb99cd9
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
IProductService
,
IProductConfiguration
}
from
'
vs/platform/product/common/product
'
;
import
{
ServiceIdentifier
}
from
'
vs/platform/instantiation/common/instantiation
'
;
export
class
ProductService
implements
IProductService
{
private
readonly
productConfiguration
:
IProductConfiguration
|
null
;
constructor
()
{
const
element
=
document
.
getElementById
(
'
vscode-remote-product-configuration
'
);
this
.
productConfiguration
=
element
?
JSON
.
parse
(
element
.
getAttribute
(
'
data-settings
'
)
!
)
:
null
;
}
_serviceBrand
:
ServiceIdentifier
<
IProductService
>
;
get
version
():
string
{
return
'
1.35.0
'
;
}
get
commit
():
string
|
undefined
{
return
undefined
;
}
get
nameLong
():
string
{
return
''
;
}
get
urlProtocol
():
string
{
return
''
;
}
get
extensionAllowedProposedApi
():
string
[]
{
return
this
.
productConfiguration
?
this
.
productConfiguration
.
extensionAllowedProposedApi
:
[];
}
get
uiExtensions
():
string
[]
|
undefined
{
return
this
.
productConfiguration
?
this
.
productConfiguration
.
uiExtensions
:
undefined
;
}
get
enableTelemetry
():
boolean
{
return
false
;
}
get
sendASmile
():
{
reportIssueUrl
:
string
,
requestFeatureUrl
:
string
}
|
undefined
{
return
this
.
productConfiguration
?
this
.
productConfiguration
.
sendASmile
:
undefined
;
}
get
extensionsGallery
()
{
return
this
.
productConfiguration
?
this
.
productConfiguration
.
extensionsGallery
:
undefined
;
}
}
\ No newline at end of file
src/vs/platform/product/common/product.ts
浏览文件 @
8fb99cd9
...
...
@@ -30,4 +30,89 @@ export interface IProductService {
reportIssueUrl
:
string
;
requestFeatureUrl
:
string
;
};
}
export
interface
IProductConfiguration
{
nameShort
:
string
;
nameLong
:
string
;
applicationName
:
string
;
win32AppId
:
string
;
win32x64AppId
:
string
;
win32UserAppId
:
string
;
win32x64UserAppId
:
string
;
win32AppUserModelId
:
string
;
win32MutexName
:
string
;
darwinBundleIdentifier
:
string
;
urlProtocol
:
string
;
dataFolderName
:
string
;
downloadUrl
:
string
;
updateUrl
?:
string
;
quality
?:
string
;
target
?:
string
;
commit
?:
string
;
settingsSearchBuildId
?:
number
;
settingsSearchUrl
?:
string
;
experimentsUrl
?:
string
;
date
:
string
;
extensionsGallery
?:
{
serviceUrl
:
string
;
itemUrl
:
string
;
controlUrl
:
string
;
recommendationsUrl
:
string
;
};
extensionTips
:
{
[
id
:
string
]:
string
;
};
extensionImportantTips
:
{
[
id
:
string
]:
{
name
:
string
;
pattern
:
string
;
};
};
exeBasedExtensionTips
:
{
[
id
:
string
]:
{
friendlyName
:
string
,
windowsPath
?:
string
,
recommendations
:
string
[]
};
};
extensionKeywords
:
{
[
extension
:
string
]:
string
[];
};
extensionAllowedBadgeProviders
:
string
[];
extensionAllowedProposedApi
:
string
[];
keymapExtensionTips
:
string
[];
crashReporter
:
{
companyName
:
string
;
productName
:
string
;
};
welcomePage
:
string
;
enableTelemetry
:
boolean
;
aiConfig
:
{
asimovKey
:
string
;
};
sendASmile
:
{
reportIssueUrl
:
string
,
requestFeatureUrl
:
string
};
documentationUrl
:
string
;
releaseNotesUrl
:
string
;
keyboardShortcutsUrlMac
:
string
;
keyboardShortcutsUrlLinux
:
string
;
keyboardShortcutsUrlWin
:
string
;
introductoryVideosUrl
:
string
;
tipsAndTricksUrl
:
string
;
newsletterSignupUrl
:
string
;
twitterUrl
:
string
;
requestFeatureUrl
:
string
;
reportIssueUrl
:
string
;
licenseUrl
:
string
;
privacyStatementUrl
:
string
;
telemetryOptOutUrl
:
string
;
npsSurveyUrl
:
string
;
surveys
:
ISurveyData
[];
checksums
:
{
[
path
:
string
]:
string
;
};
checksumFailMoreInfoUrl
:
string
;
hockeyApp
:
{
'
win32-ia32
'
:
string
;
'
win32-x64
'
:
string
;
'
linux-x64
'
:
string
;
'
darwin
'
:
string
;
};
logUploaderUrl
:
string
;
portable
?:
string
;
uiExtensions
?:
string
[];
}
export
interface
ISurveyData
{
surveyId
:
string
;
surveyUrl
:
string
;
languageId
:
string
;
editCount
:
number
;
userProbability
:
number
;
}
\ No newline at end of file
src/vs/platform/product/node/product.ts
浏览文件 @
8fb99cd9
...
...
@@ -5,91 +5,7 @@
import
*
as
path
from
'
vs/base/common/path
'
;
import
{
getPathFromAmdModule
}
from
'
vs/base/common/amd
'
;
export
interface
IProductConfiguration
{
nameShort
:
string
;
nameLong
:
string
;
applicationName
:
string
;
win32AppId
:
string
;
win32x64AppId
:
string
;
win32UserAppId
:
string
;
win32x64UserAppId
:
string
;
win32AppUserModelId
:
string
;
win32MutexName
:
string
;
darwinBundleIdentifier
:
string
;
urlProtocol
:
string
;
dataFolderName
:
string
;
downloadUrl
:
string
;
updateUrl
?:
string
;
quality
?:
string
;
target
?:
string
;
commit
?:
string
;
settingsSearchBuildId
?:
number
;
settingsSearchUrl
?:
string
;
experimentsUrl
?:
string
;
date
:
string
;
extensionsGallery
?:
{
serviceUrl
:
string
;
itemUrl
:
string
;
controlUrl
:
string
;
recommendationsUrl
:
string
;
};
extensionTips
:
{
[
id
:
string
]:
string
;
};
extensionImportantTips
:
{
[
id
:
string
]:
{
name
:
string
;
pattern
:
string
;
};
};
exeBasedExtensionTips
:
{
[
id
:
string
]:
{
friendlyName
:
string
,
windowsPath
?:
string
,
recommendations
:
string
[]
};
};
extensionKeywords
:
{
[
extension
:
string
]:
string
[];
};
extensionAllowedBadgeProviders
:
string
[];
extensionAllowedProposedApi
:
string
[];
keymapExtensionTips
:
string
[];
crashReporter
:
{
companyName
:
string
;
productName
:
string
;
};
welcomePage
:
string
;
enableTelemetry
:
boolean
;
aiConfig
:
{
asimovKey
:
string
;
};
sendASmile
:
{
reportIssueUrl
:
string
,
requestFeatureUrl
:
string
};
documentationUrl
:
string
;
releaseNotesUrl
:
string
;
keyboardShortcutsUrlMac
:
string
;
keyboardShortcutsUrlLinux
:
string
;
keyboardShortcutsUrlWin
:
string
;
introductoryVideosUrl
:
string
;
tipsAndTricksUrl
:
string
;
newsletterSignupUrl
:
string
;
twitterUrl
:
string
;
requestFeatureUrl
:
string
;
reportIssueUrl
:
string
;
licenseUrl
:
string
;
privacyStatementUrl
:
string
;
telemetryOptOutUrl
:
string
;
npsSurveyUrl
:
string
;
surveys
:
ISurveyData
[];
checksums
:
{
[
path
:
string
]:
string
;
};
checksumFailMoreInfoUrl
:
string
;
hockeyApp
:
{
'
win32-ia32
'
:
string
;
'
win32-x64
'
:
string
;
'
linux-x64
'
:
string
;
'
darwin
'
:
string
;
};
logUploaderUrl
:
string
;
portable
?:
string
;
uiExtensions
?:
string
[];
}
export
interface
ISurveyData
{
surveyId
:
string
;
surveyUrl
:
string
;
languageId
:
string
;
editCount
:
number
;
userProbability
:
number
;
}
import
{
IProductConfiguration
}
from
'
vs/platform/product/common/product
'
;
const
rootPath
=
path
.
dirname
(
getPathFromAmdModule
(
require
,
''
));
const
productJsonPath
=
path
.
join
(
rootPath
,
'
product.json
'
);
...
...
src/vs/workbench/browser/web.main.ts
浏览文件 @
8fb99cd9
...
...
@@ -8,7 +8,7 @@ import { domContentLoaded, addDisposableListener, EventType } from 'vs/base/brow
import
{
ServiceCollection
}
from
'
vs/platform/instantiation/common/serviceCollection
'
;
import
{
ILogService
}
from
'
vs/platform/log/common/log
'
;
import
{
Disposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
SimpleLogService
,
SimpleProductService
}
from
'
vs/workbench/browser/web.simpleservices
'
;
import
{
SimpleLogService
}
from
'
vs/workbench/browser/web.simpleservices
'
;
import
{
BrowserWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/browser/environmentService
'
;
import
{
Workbench
}
from
'
vs/workbench/browser/workbench
'
;
import
{
IChannel
}
from
'
vs/base/parts/ipc/common/ipc
'
;
...
...
@@ -35,6 +35,7 @@ import { ISignService } from 'vs/platform/sign/common/sign';
import
{
SignService
}
from
'
vs/platform/sign/browser/signService
'
;
import
{
hash
}
from
'
vs/base/common/hash
'
;
import
{
IWorkbenchConstructionOptions
}
from
'
vs/workbench/workbench.web.api
'
;
import
{
ProductService
}
from
'
vs/platform/product/browser/productService
'
;
class
CodeRendererMain
extends
Disposable
{
...
...
@@ -90,7 +91,7 @@ class CodeRendererMain extends Disposable {
serviceCollection
.
set
(
IWorkbenchEnvironmentService
,
environmentService
);
// Product
const
productService
=
new
Simple
ProductService
();
const
productService
=
new
ProductService
();
serviceCollection
.
set
(
IProductService
,
productService
);
// Remote
...
...
src/vs/workbench/browser/web.simpleservices.ts
浏览文件 @
8fb99cd9
...
...
@@ -23,7 +23,6 @@ import { IURLHandler, IURLService } from 'vs/platform/url/common/url';
import
{
ITelemetryService
,
ITelemetryData
,
ITelemetryInfo
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
ConsoleLogService
}
from
'
vs/platform/log/common/log
'
;
import
{
ILifecycleService
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
import
{
IProductService
}
from
'
vs/platform/product/common/product
'
;
import
{
Disposable
,
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
IStorageService
,
IWorkspaceStorageChangeEvent
,
StorageScope
,
IWillSaveStateEvent
,
WillSaveStateReason
}
from
'
vs/platform/storage/common/storage
'
;
import
{
IUpdateService
,
State
}
from
'
vs/platform/update/common/update
'
;
...
...
@@ -517,23 +516,6 @@ export class SimpleMultiExtensionsManagementService implements IExtensionManagem
//#endregion
//#region Product
export
class
SimpleProductService
implements
IProductService
{
_serviceBrand
:
any
;
version
:
string
=
'
1.35.0
'
;
commit
?:
string
;
nameLong
:
string
=
''
;
urlProtocol
:
string
=
''
;
extensionAllowedProposedApi
:
string
[]
=
[];
uiExtensions
?:
string
[];
enableTelemetry
:
boolean
=
false
;
}
//#endregion
//#region Request
export
const
IRequestService
=
createDecorator
<
IRequestService
>
(
'
requestService
'
);
...
...
src/vs/workbench/contrib/surveys/electron-browser/languageSurveys.contribution.ts
浏览文件 @
8fb99cd9
...
...
@@ -11,7 +11,8 @@ import { Registry } from 'vs/platform/registry/common/platform';
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
import
pkg
from
'
vs/platform/product/node/package
'
;
import
product
,
{
ISurveyData
}
from
'
vs/platform/product/node/product
'
;
import
product
from
'
vs/platform/product/node/product
'
;
import
{
ISurveyData
}
from
'
vs/platform/product/common/product
'
;
import
{
LifecyclePhase
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
import
{
Severity
,
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
ITextFileService
,
StateChange
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
...
...
src/vs/workbench/services/userData/common/userDataService.ts
0 → 100644
浏览文件 @
8fb99cd9
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
Event
}
from
'
vs/base/common/event
'
;
export
const
IUserDataService
=
createDecorator
<
IUserDataService
>
(
'
userDataService
'
);
export
interface
IUserDataService
{
_serviceBrand
:
any
;
onDidChange
:
Event
<
string
>
;
read
(
key
:
string
):
Promise
<
string
>
;
write
(
key
:
string
,
value
:
string
):
Promise
<
void
>
;
}
export
const
IUserDataEditorService
=
createDecorator
<
IUserDataEditorService
>
(
'
userDataEditorService
'
);
export
interface
IUserDataEditorService
{
_serviceBrand
:
any
;
openInEditor
(
key
:
string
):
Promise
<
void
>
;
}
\ No newline at end of file
src/vs/workbench/workbench.web.main.ts
浏览文件 @
8fb99cd9
...
...
@@ -157,7 +157,6 @@ registerSingleton(IContextViewService, ContextViewService, true);
registerSingleton
(
ILifecycleService
,
BrowserLifecycleService
);
// registerSingleton(ILocalizationsService, LocalizationsService);
// registerSingleton(ISharedProcessService, SharedProcessService, true);
// registerSingleton(IProductService, ProductService, true);
// registerSingleton(IWindowsService, WindowsService);
// registerSingleton(IUpdateService, UpdateService);
// registerSingleton(IIssueService, IssueService);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录