mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-18 19:11:36 -04:00
Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)
* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 * disable strict null check
This commit is contained in:
49
src/vs/platform/product/browser/productService.ts
Normal file
49
src/vs/platform/product/browser/productService.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. 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 vscodeVersion(): string { return '1.35.0'; } // {{SQL CARBON EDIT}} add vscodeversion
|
||||
|
||||
get commit(): string | undefined { return undefined; }
|
||||
|
||||
get nameLong(): string { return ''; }
|
||||
|
||||
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; }
|
||||
}
|
||||
@@ -10,8 +10,121 @@ export const IProductService = createDecorator<IProductService>('productService'
|
||||
export interface IProductService {
|
||||
_serviceBrand: any;
|
||||
|
||||
version?: string;
|
||||
commit?: string;
|
||||
readonly version: string;
|
||||
readonly vscodeVersion: string; // {{SQL CARBON EDIT}} add vscode version
|
||||
readonly commit?: string;
|
||||
|
||||
enableTelemetry: boolean;
|
||||
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[];
|
||||
}
|
||||
|
||||
export interface IProductConfiguration {
|
||||
nameShort: string;
|
||||
nameLong: string;
|
||||
readonly applicationName: string;
|
||||
readonly win32AppId: string;
|
||||
readonly win32x64AppId: string;
|
||||
readonly win32UserAppId: string;
|
||||
readonly win32x64UserAppId: string;
|
||||
readonly win32AppUserModelId: string;
|
||||
readonly win32MutexName: string;
|
||||
readonly darwinBundleIdentifier: string;
|
||||
readonly urlProtocol: string;
|
||||
dataFolderName: string;
|
||||
readonly downloadUrl: string;
|
||||
readonly updateUrl?: string;
|
||||
readonly quality?: string;
|
||||
readonly target?: string;
|
||||
readonly commit?: string;
|
||||
readonly settingsSearchBuildId?: number;
|
||||
readonly settingsSearchUrl?: string;
|
||||
readonly experimentsUrl?: string;
|
||||
readonly date: string;
|
||||
readonly extensionsGallery?: {
|
||||
readonly serviceUrl: string;
|
||||
readonly itemUrl: string;
|
||||
readonly controlUrl: string;
|
||||
readonly recommendationsUrl: string;
|
||||
};
|
||||
extensionTips: { [id: string]: string; };
|
||||
// {{SQL CARBON EDIT}}
|
||||
recommendedExtensions: string[];
|
||||
extensionImportantTips: { [id: string]: { name: string; pattern: string; }; };
|
||||
readonly exeBasedExtensionTips: { [id: string]: { friendlyName: string, windowsPath?: string, recommendations: readonly string[] }; };
|
||||
readonly extensionKeywords: { [extension: string]: readonly string[]; };
|
||||
readonly extensionAllowedBadgeProviders: readonly string[];
|
||||
readonly extensionAllowedProposedApi: readonly string[];
|
||||
readonly keymapExtensionTips: readonly string[];
|
||||
readonly crashReporter: {
|
||||
readonly companyName: string;
|
||||
readonly productName: string;
|
||||
};
|
||||
readonly welcomePage: string;
|
||||
readonly enableTelemetry: boolean;
|
||||
readonly aiConfig: {
|
||||
readonly asimovKey: string;
|
||||
};
|
||||
readonly sendASmile: {
|
||||
readonly reportIssueUrl: string,
|
||||
readonly requestFeatureUrl: string
|
||||
};
|
||||
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;
|
||||
readonly introductoryVideosUrl: string;
|
||||
readonly tipsAndTricksUrl: string;
|
||||
readonly newsletterSignupUrl: string;
|
||||
readonly twitterUrl: string;
|
||||
readonly requestFeatureUrl: string;
|
||||
readonly reportIssueUrl: string;
|
||||
readonly licenseUrl: string;
|
||||
readonly privacyStatementUrl: string;
|
||||
readonly telemetryOptOutUrl: string;
|
||||
readonly npsSurveyUrl: string;
|
||||
readonly surveys: readonly ISurveyData[];
|
||||
readonly checksums: { [path: string]: string; };
|
||||
readonly checksumFailMoreInfoUrl: string;
|
||||
readonly hockeyApp: {
|
||||
readonly 'win32-ia32': string;
|
||||
readonly 'win32-x64': string;
|
||||
readonly 'linux-x64': string;
|
||||
readonly 'darwin': string;
|
||||
};
|
||||
readonly logUploaderUrl: string;
|
||||
readonly portable?: string;
|
||||
readonly uiExtensions?: readonly string[];
|
||||
}
|
||||
|
||||
export interface ISurveyData {
|
||||
surveyId: string;
|
||||
surveyUrl: string;
|
||||
languageId: string;
|
||||
editCount: number;
|
||||
userProbability: number;
|
||||
}
|
||||
|
||||
@@ -5,98 +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; };
|
||||
// {{SQL CARBON EDIT}}
|
||||
recommendedExtensions: 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;
|
||||
// {SQL CARBON EDIT}
|
||||
gettingStartedUrl: string;
|
||||
// {SQL CARBON EDIT}
|
||||
vscodeVersion: 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-ia32': 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');
|
||||
|
||||
@@ -6,14 +6,39 @@
|
||||
import { IProductService } 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';
|
||||
|
||||
export class ProductService implements IProductService {
|
||||
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: ServiceIdentifier<IProductService>;
|
||||
|
||||
get version(): string | undefined { return pkg.version; }
|
||||
get version(): string { return pkg.version; }
|
||||
|
||||
get vscodeVersion(): string { return '1.35.0'; } // {{SQL CARBON EDIT}} add vscodeversion
|
||||
|
||||
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