mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-24 22:00:30 -04:00
Merge from vscode b12f623603e2fc1c5b3037115fa37c1a6acc4165 (#6760)
This commit is contained in:
@@ -10,44 +10,18 @@ export class ProductService implements IProductService {
|
||||
|
||||
_serviceBrand!: ServiceIdentifier<IProductService>;
|
||||
|
||||
private readonly productConfiguration: IProductConfiguration | null;
|
||||
readonly productConfiguration: IProductConfiguration;
|
||||
|
||||
constructor() {
|
||||
const element = document.getElementById('vscode-remote-product-configuration');
|
||||
this.productConfiguration = element ? JSON.parse(element.getAttribute('data-settings')!) : null;
|
||||
this.productConfiguration = {
|
||||
...element ? JSON.parse(element.getAttribute('data-settings')!) : {
|
||||
version: '1.38.0-unknown',
|
||||
nameLong: 'Unknown',
|
||||
extensionAllowedProposedApi: [],
|
||||
}, ...{ urlProtocol: '', enableTelemetry: false },
|
||||
...{ vscodeVersion: '1.35.0' } // {{SQL CARBON EDIT}} add vscodeversion
|
||||
};
|
||||
}
|
||||
|
||||
get version(): string { return this.productConfiguration && this.productConfiguration.version ? this.productConfiguration.version : '1.38.0-unknown'; }
|
||||
|
||||
get vscodeVersion(): string { return '1.35.0'; } // {{SQL CARBON EDIT}} add vscodeversion
|
||||
|
||||
get recommendedExtensionsByScenario(): { [area: string]: Array<string> } { return this.productConfiguration ? this.productConfiguration.recommendedExtensionsByScenario : {}; }// {{SQL CARBON EDIT}} add getter
|
||||
|
||||
get commit(): string | undefined { return this.productConfiguration ? this.productConfiguration.commit : undefined; }
|
||||
|
||||
get nameLong(): string { return this.productConfiguration ? this.productConfiguration.nameLong : 'Unknown'; }
|
||||
|
||||
get urlProtocol(): string { return ''; }
|
||||
|
||||
get extensionAllowedProposedApi(): readonly string[] { return this.productConfiguration ? this.productConfiguration.extensionAllowedProposedApi : []; }
|
||||
|
||||
get uiExtensions(): readonly 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; }
|
||||
|
||||
get settingsSearchBuildId(): number | undefined { return this.productConfiguration ? this.productConfiguration.settingsSearchBuildId : undefined; }
|
||||
|
||||
get settingsSearchUrl(): string | undefined { return this.productConfiguration ? this.productConfiguration.settingsSearchUrl : undefined; }
|
||||
|
||||
get experimentsUrl(): string | undefined { return this.productConfiguration ? this.productConfiguration.experimentsUrl : undefined; }
|
||||
|
||||
get extensionKeywords(): { [extension: string]: readonly string[]; } | undefined { return this.productConfiguration ? this.productConfiguration.extensionKeywords : undefined; }
|
||||
|
||||
get extensionAllowedBadgeProviders(): readonly string[] | undefined { return this.productConfiguration ? this.productConfiguration.extensionAllowedBadgeProviders : undefined; }
|
||||
|
||||
get aiConfig() { return this.productConfiguration ? this.productConfiguration.aiConfig : undefined; }
|
||||
}
|
||||
|
||||
@@ -11,40 +11,7 @@ export interface IProductService {
|
||||
|
||||
_serviceBrand: ServiceIdentifier<any>;
|
||||
|
||||
readonly version: string;
|
||||
readonly vscodeVersion: string; // {{SQL CARBON EDIT}} add vscode version
|
||||
readonly recommendedExtensionsByScenario: { [area: string]: Array<string> }; // {{SQL CARBON EDIT}} add getter
|
||||
readonly commit?: string;
|
||||
readonly date?: string;
|
||||
|
||||
readonly nameLong: string;
|
||||
readonly urlProtocol: string;
|
||||
readonly extensionAllowedProposedApi: readonly string[];
|
||||
readonly uiExtensions?: readonly string[];
|
||||
|
||||
readonly enableTelemetry: boolean;
|
||||
readonly extensionsGallery?: {
|
||||
readonly serviceUrl: string;
|
||||
readonly itemUrl: string;
|
||||
readonly controlUrl: string;
|
||||
readonly recommendationsUrl: string;
|
||||
};
|
||||
|
||||
readonly sendASmile?: {
|
||||
readonly reportIssueUrl: string;
|
||||
readonly requestFeatureUrl: string;
|
||||
};
|
||||
|
||||
readonly settingsSearchBuildId?: number;
|
||||
readonly settingsSearchUrl?: string;
|
||||
|
||||
readonly experimentsUrl?: string;
|
||||
readonly extensionKeywords?: { [extension: string]: readonly string[]; };
|
||||
readonly extensionAllowedBadgeProviders?: readonly string[];
|
||||
|
||||
readonly aiConfig?: {
|
||||
readonly asimovKey: string;
|
||||
};
|
||||
readonly productConfiguration: IProductConfiguration;
|
||||
}
|
||||
|
||||
export interface IProductConfiguration {
|
||||
@@ -76,10 +43,12 @@ export interface IProductConfiguration {
|
||||
readonly controlUrl: string;
|
||||
readonly recommendationsUrl: string;
|
||||
};
|
||||
extensionTips: { [id: string]: string; };
|
||||
recommendedExtensions: string[]; // {{SQL CARBON EDIT}}
|
||||
recommendedExtensionsByScenario: { [area: string]: Array<string> }; // {{SQL CARBON EDIT}}
|
||||
extensionImportantTips: { [id: string]: { name: string; pattern: string; isExtensionPack?: boolean }; };
|
||||
readonly extensionTips: { [id: string]: string; };
|
||||
readonly recommendedExtensions: string[]; // {{SQL CARBON EDIT}}
|
||||
readonly recommendedExtensionsByScenario: { [area: string]: Array<string> }; // {{SQL CARBON EDIT}}
|
||||
readonly vscodeVersion: string; // {{SQL CARBON EDIT}} add vscode version
|
||||
readonly gettingStartedUrl: string; // {SQL CARBON EDIT}
|
||||
readonly extensionImportantTips: { [id: string]: { name: string; pattern: string; isExtensionPack?: boolean }; };
|
||||
readonly exeBasedExtensionTips: { [id: string]: IExeBasedExtensionTip; };
|
||||
readonly extensionKeywords: { [extension: string]: readonly string[]; };
|
||||
readonly extensionAllowedBadgeProviders: readonly string[];
|
||||
@@ -100,8 +69,6 @@ export interface IProductConfiguration {
|
||||
};
|
||||
readonly documentationUrl: string;
|
||||
readonly releaseNotesUrl: string;
|
||||
readonly gettingStartedUrl: string; // {SQL CARBON EDIT}
|
||||
readonly vscodeVersion: string; // {SQL CARBON EDIT}
|
||||
readonly keyboardShortcutsUrlMac: string;
|
||||
readonly keyboardShortcutsUrlLinux: string;
|
||||
readonly keyboardShortcutsUrlWin: string;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IProductService } from 'vs/platform/product/common/product';
|
||||
import { IProductService, IProductConfiguration } from 'vs/platform/product/common/product';
|
||||
import product from 'vs/platform/product/node/product';
|
||||
import pkg from 'vs/platform/product/node/package';
|
||||
import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
@@ -12,35 +12,12 @@ export class ProductService implements IProductService {
|
||||
|
||||
_serviceBrand!: ServiceIdentifier<IProductService>;
|
||||
|
||||
get version(): string { return pkg.version; }
|
||||
readonly productConfiguration: IProductConfiguration;
|
||||
|
||||
get vscodeVersion(): string { return '1.35.0'; } // {{SQL CARBON EDIT}} add vscodeversion
|
||||
constructor() {
|
||||
this.productConfiguration = {
|
||||
...product, ...{ version: pkg.version }, ...{ vscodeVersion: '1.35.0' } // {{SQL CARBON EDIT}} add vscodeversion}
|
||||
};
|
||||
}
|
||||
|
||||
get recommendedExtensionsByScenario(): { [area: string]: Array<string> } { return product.recommendedExtensionsByScenario; }// {{SQL CARBON EDIT}} add getter
|
||||
|
||||
get commit(): string | undefined { return product.commit; }
|
||||
|
||||
get nameLong(): string { return product.nameLong; }
|
||||
|
||||
get urlProtocol(): string { return product.urlProtocol; }
|
||||
|
||||
get extensionAllowedProposedApi(): readonly string[] { return product.extensionAllowedProposedApi; }
|
||||
|
||||
get uiExtensions(): readonly string[] | undefined { return product.uiExtensions; }
|
||||
|
||||
get enableTelemetry(): boolean { return product.enableTelemetry; }
|
||||
|
||||
get sendASmile(): { reportIssueUrl: string, requestFeatureUrl: string } { return product.sendASmile; }
|
||||
|
||||
get extensionsGallery() { return product.extensionsGallery; }
|
||||
|
||||
get settingsSearchBuildId(): number | undefined { return product.settingsSearchBuildId; }
|
||||
|
||||
get settingsSearchUrl(): string | undefined { return product.settingsSearchUrl; }
|
||||
|
||||
get experimentsUrl(): string | undefined { return product.experimentsUrl; }
|
||||
|
||||
get extensionKeywords(): { [extension: string]: readonly string[]; } | undefined { return product.extensionKeywords; }
|
||||
|
||||
get extensionAllowedBadgeProviders(): readonly string[] | undefined { return product.extensionAllowedBadgeProviders; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user