mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Setup files for workbench/services to be strict compiled (#9168)
* setup services to be strict compiled. fix some of the issues * fix compile * fix compile * revert some undefined changes
This commit is contained in:
@@ -2818,7 +2818,7 @@ export class InstallVSIXAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.extensions.action.installVSIX';
|
||||
static readonly LABEL = localize('installVSIX', "Install from VSIX...");
|
||||
static readonly AVAILABLE = !(product.disabledFeatures?.indexOf(InstallVSIXAction.ID) >= 0); // {{SQL CARBON EDIT}} add available logic
|
||||
static readonly AVAILABLE = !(product.disabledFeatures && product.disabledFeatures.indexOf(InstallVSIXAction.ID) >= 0); // {{SQL CARBON EDIT}} add available logic
|
||||
|
||||
constructor(
|
||||
id = InstallVSIXAction.ID,
|
||||
|
||||
@@ -130,9 +130,9 @@ class Extension implements IExtension {
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
get downloadPage(): string {
|
||||
get downloadPage(): string | undefined {
|
||||
if (!this.productService.extensionsGallery) {
|
||||
return null;
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return this.gallery && this.gallery.assets && this.gallery.assets.downloadPage && this.gallery.assets.downloadPage.uri;
|
||||
@@ -846,7 +846,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension
|
||||
if (extension.publisherDisplayName === 'Microsoft') {
|
||||
await this.downloadOrBrowse(extension);
|
||||
} else {
|
||||
return Promise.resolve(null);
|
||||
return Promise.reject(new Error('Extension Not Allowed'));
|
||||
}
|
||||
}
|
||||
await this.downloadOrBrowse(extension);
|
||||
@@ -856,11 +856,11 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
private downloadOrBrowse(ext: IExtension): Promise<any> {
|
||||
if (ext.gallery.assets.downloadPage && ext.gallery.assets.downloadPage.uri) {
|
||||
this.openerService.open(URI.parse(ext.gallery.assets.downloadPage.uri));
|
||||
if (ext.gallery!.assets.downloadPage && ext.gallery!.assets.downloadPage.uri) {
|
||||
this.openerService.open(URI.parse(ext.gallery!.assets.downloadPage.uri));
|
||||
return Promise.resolve(undefined);
|
||||
} else {
|
||||
return this.extensionService.installFromGallery(ext.gallery);
|
||||
return this.extensionService.installFromGallery(ext.gallery!);
|
||||
}
|
||||
}
|
||||
// {{SQL CARBON EDIT}} - End
|
||||
|
||||
@@ -42,8 +42,7 @@ export interface IExtension {
|
||||
readonly latestVersion: string;
|
||||
readonly description: string;
|
||||
readonly url?: string;
|
||||
// {{SQL CARBON EDIT}}
|
||||
readonly downloadPage?: string;
|
||||
readonly downloadPage?: string; // {{SQL CARBON EDIT}}
|
||||
readonly repository?: string;
|
||||
readonly iconUrl: string;
|
||||
readonly iconUrlFallback: string;
|
||||
|
||||
Reference in New Issue
Block a user