/
product.ts
99 lines (93 loc) · 2.76 KB
/
product.ts
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
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as path from 'path';
import { getPathFromAmdModule } from 'vs/base/common/amd';
export interface IProductConfiguration {
nameShort: string;
nameLong: string;
applicationName: 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;
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-ia32': string;
'linux-x64': string;
'darwin': string;
};
logUploaderUrl: string;
portable?: string;
}
export interface ISurveyData {
surveyId: string;
surveyUrl: string;
languageId: string;
editCount: number;
userProbability: number;
}
const rootPath = path.dirname(getPathFromAmdModule(require, ''));
const productJsonPath = path.join(rootPath, 'product.json');
const product = require.__$__nodeRequire(productJsonPath) as IProductConfiguration;
if (process.env['VSCODE_DEV']) {
product.nameShort += ' Dev';
product.nameLong += ' Dev';
product.dataFolderName += '-dev';
}
export default product;