2019-03-12 16:12:50 +00:00
|
|
|
import { InitData } from "@coder/protocol";
|
2019-03-08 16:37:03 +00:00
|
|
|
import { IProductConfiguration } from "vs/platform/product/node/product";
|
2019-01-18 21:46:40 +00:00
|
|
|
|
2019-03-12 16:12:50 +00:00
|
|
|
class Product implements IProductConfiguration {
|
|
|
|
public nameShort = "code-server";
|
|
|
|
public nameLong = "code-server";
|
2019-04-04 22:04:34 +00:00
|
|
|
public documentationUrl = "https://code.visualstudio.com/docs";
|
|
|
|
public keyboardShortcutsUrlMac = "https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf";
|
|
|
|
public keyboardShortcutsUrlLinux = "https://code.visualstudio.com/shortcuts/keyboard-shortcuts-linux.pdf";
|
|
|
|
public keyboardShortcutsUrlWin = "https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf";
|
|
|
|
public introductoryVideosUrl = "https://code.visualstudio.com/docs/getstarted/introvideos";
|
|
|
|
public tipsAndTricksUrl = "https://code.visualstudio.com/docs/getstarted/tips-and-tricks";
|
|
|
|
public twitterUrl = "https://twitter.com/code";
|
|
|
|
public licenseUrl = "https://github.com/codercom/code-server/blob/master/LICENSE";
|
2019-04-17 22:18:35 +00:00
|
|
|
public aiConfig = process.env.DISABLE_TELEMETRY ? undefined! : {
|
|
|
|
// Only needed so vscode can see that content exists for this value.
|
|
|
|
// We override the application insights module.
|
|
|
|
asimovKey: "content",
|
|
|
|
};
|
|
|
|
public enableTelemetry = process.env.DISABLE_TELEMETRY ? false : true;
|
2019-03-12 16:12:50 +00:00
|
|
|
|
|
|
|
private _dataFolderName: string | undefined;
|
|
|
|
public get dataFolderName(): string {
|
|
|
|
if (!this._dataFolderName) {
|
|
|
|
throw new Error("trying to access data folder name before it has been set");
|
|
|
|
}
|
|
|
|
|
|
|
|
return this._dataFolderName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public extensionsGallery = {
|
2019-03-01 21:51:11 +00:00
|
|
|
serviceUrl: global && global.process && global.process.env.SERVICE_URL
|
|
|
|
|| process.env.SERVICE_URL
|
|
|
|
|| "https://v1.extapi.coder.com",
|
2019-04-17 22:18:35 +00:00
|
|
|
// tslint:disable-next-line:no-any
|
|
|
|
} as any;
|
2019-03-12 16:12:50 +00:00
|
|
|
|
|
|
|
public extensionExecutionEnvironments = {
|
2019-01-18 21:46:40 +00:00
|
|
|
"wayou.vscode-todo-highlight": "worker",
|
|
|
|
"vscodevim.vim": "worker",
|
|
|
|
"coenraads.bracket-pair-colorizer": "worker",
|
2019-03-12 16:12:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
public fetchUrl = "";
|
|
|
|
|
|
|
|
public initialize(_data: InitData): void {
|
|
|
|
// Nothing at the moment; dataFolderName isn't used since we override the
|
|
|
|
// extension path.
|
|
|
|
}
|
2019-01-18 21:46:40 +00:00
|
|
|
}
|
|
|
|
|
2019-03-12 16:12:50 +00:00
|
|
|
export default new Product();
|