mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Add app quality to extension API (#20731)
* Add app quality to extension API * Comment * Special case rc1 to stable
This commit is contained in:
17
src/sql/azdata.proposed.d.ts
vendored
17
src/sql/azdata.proposed.d.ts
vendored
@@ -8,6 +8,23 @@
|
||||
import * as vscode from 'vscode';
|
||||
|
||||
declare module 'azdata' {
|
||||
|
||||
export namespace env {
|
||||
/**
|
||||
* Well-known app quality values
|
||||
*/
|
||||
export enum AppQuality {
|
||||
stable = 'stable',
|
||||
insider = 'insider',
|
||||
dev = 'dev'
|
||||
}
|
||||
|
||||
/**
|
||||
* The version of Azure Data Studio this is currently running as - such as `stable`, or `insider`
|
||||
*/
|
||||
export const quality: AppQuality | string | undefined;
|
||||
}
|
||||
|
||||
export namespace nb {
|
||||
export interface NotebookDocument {
|
||||
/**
|
||||
|
||||
@@ -606,6 +606,15 @@ export function createAdsApiFactory(accessor: ServicesAccessor): IAdsExtensionAp
|
||||
ExecutionPlanGraphElementPropertyBetterValue: sqlExtHostTypes.executionPlan.ExecutionPlanGraphElementPropertyBetterValue
|
||||
};
|
||||
|
||||
// Dev/OSS builds don't have a quality set - give it a value here so it's more clear
|
||||
let quality = initData.quality || 'dev';
|
||||
// Special case rc1 quality, that should be treated as stable by extensions
|
||||
quality = quality === 'rc1' ? 'stable' : quality;
|
||||
const env: typeof azdata.env = {
|
||||
AppQuality: sqlExtHostTypes.env.AppQuality,
|
||||
quality
|
||||
};
|
||||
|
||||
return {
|
||||
version: initData.version,
|
||||
accounts,
|
||||
@@ -658,7 +667,8 @@ export function createAdsApiFactory(accessor: ServicesAccessor): IAdsExtensionAp
|
||||
sqlAssessment,
|
||||
TextType: sqlExtHostTypes.TextType,
|
||||
designers: designers,
|
||||
executionPlan: executionPlan
|
||||
executionPlan: executionPlan,
|
||||
env
|
||||
};
|
||||
},
|
||||
extHostNotebook: extHostNotebook,
|
||||
|
||||
@@ -1058,3 +1058,14 @@ export namespace executionPlan {
|
||||
None = 4
|
||||
}
|
||||
}
|
||||
|
||||
export namespace env {
|
||||
/**
|
||||
* Well-known app quality values
|
||||
*/
|
||||
export enum AppQuality {
|
||||
stable = 'stable',
|
||||
insider = 'insider',
|
||||
dev = 'dev'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,6 +102,7 @@ export interface IWorkspaceData extends IStaticWorkspaceData {
|
||||
export interface IInitData {
|
||||
version: string;
|
||||
vscodeVersion: string; // {{SQL CARBON EDIT}} add vscodeVersion
|
||||
quality?: string; // {{SQL CARBON EDIT}} add quality
|
||||
commit?: string;
|
||||
parentPid: number;
|
||||
environment: IEnvironment;
|
||||
|
||||
@@ -384,6 +384,7 @@ export class WebWorkerExtensionHost extends Disposable implements IExtensionHost
|
||||
commit: this._productService.commit,
|
||||
version: this._productService.version,
|
||||
vscodeVersion: this._productService.vscodeVersion, // {{SQL CARBON EDIT}} add vscode version
|
||||
quality: this._productService.quality, // {{SQL CARBON EDIT}} Add quality
|
||||
parentPid: -1,
|
||||
environment: {
|
||||
isExtensionDevelopmentDebug: this._environmentService.debugRenderer,
|
||||
|
||||
@@ -227,6 +227,7 @@ export class RemoteExtensionHost extends Disposable implements IExtensionHost {
|
||||
commit: this._productService.commit,
|
||||
version: this._productService.version,
|
||||
vscodeVersion: this._productService.vscodeVersion, // {{SQL CARBON EDIT}} add vscode version
|
||||
quality: this._productService.quality, // {{SQL CARBON EDIT}} Add quality
|
||||
parentPid: remoteInitData.pid,
|
||||
environment: {
|
||||
isExtensionDevelopmentDebug,
|
||||
|
||||
@@ -550,6 +550,7 @@ export class LocalProcessExtensionHost implements IExtensionHost {
|
||||
commit: this._productService.commit,
|
||||
version: this._productService.version,
|
||||
vscodeVersion: this._productService.vscodeVersion, // {{SQL CARBON EDIT}} add vscode version
|
||||
quality: this._productService.quality, // {{SQL CARBON EDIT}} Add quality
|
||||
parentPid: process.pid,
|
||||
environment: {
|
||||
isExtensionDevelopmentDebug: this._isExtensionDevDebug,
|
||||
|
||||
Reference in New Issue
Block a user