Skip to content

Commit 8738045

Browse files
authored
ability to configure PPE Url (microsoft#164460)
1 parent feab94a commit 8738045

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

src/vs/base/common/product.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export interface IProductConfiguration {
7070

7171
readonly extensionsGallery?: {
7272
readonly serviceUrl: string;
73+
readonly servicePPEUrl?: string;
7374
readonly searchUrl?: string;
7475
readonly itemUrl: string;
7576
readonly publisherUrl: string;

src/vs/platform/extensionManagement/common/extensionGalleryService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ abstract class AbstractExtensionGalleryService implements IExtensionGalleryServi
587587
@IConfigurationService private readonly configurationService: IConfigurationService,
588588
) {
589589
const config = productService.extensionsGallery;
590-
this.extensionsGalleryUrl = config?.serviceUrl;
590+
this.extensionsGalleryUrl = config?.servicePPEUrl && configurationService.getValue('_extensionsGallery.enablePPE') ? config.servicePPEUrl : config?.serviceUrl;
591591
this.extensionsGallerySearchUrl = config?.searchUrl;
592592
this.extensionsControlUrl = config?.controlUrl;
593593
this.commonHeadersPromise = resolveMarketplaceHeaders(

src/vs/workbench/contrib/relauncher/browser/relauncher.contribution.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ interface IConfiguration extends IWindowsConfiguration {
2828
security?: { workspace?: { trust?: { enabled?: boolean } } };
2929
window: IWindowSettings & { experimental?: { windowControlsOverlay?: { enabled?: boolean }; useSandbox?: boolean } };
3030
workbench?: { experimental?: { settingsProfiles?: { enabled?: boolean } }; enableExperiments?: boolean };
31+
_extensionsGallery?: { enablePPE?: boolean };
3132
}
3233

3334
export class SettingsChangeRelauncher extends Disposable implements IWorkbenchContribution {
@@ -43,6 +44,7 @@ export class SettingsChangeRelauncher extends Disposable implements IWorkbenchCo
4344
private workspaceTrustEnabled: boolean | undefined;
4445
private settingsProfilesEnabled: boolean | undefined;
4546
private experimentsEnabled: boolean | undefined;
47+
private enablePPEExtensionsGallery: boolean | undefined;
4648

4749
constructor(
4850
@IHostService private readonly hostService: IHostService,
@@ -130,6 +132,12 @@ export class SettingsChangeRelauncher extends Disposable implements IWorkbenchCo
130132
changed = true;
131133
}
132134

135+
// Profiles
136+
if (this.productService.quality !== 'stable' && typeof config._extensionsGallery?.enablePPE === 'boolean' && config._extensionsGallery?.enablePPE !== this.enablePPEExtensionsGallery) {
137+
this.enablePPEExtensionsGallery = config._extensionsGallery?.enablePPE;
138+
changed = true;
139+
}
140+
133141
// Notify only when changed and we are the focused window (avoids notification spam across windows)
134142
if (notify && changed) {
135143
this.doConfirm(

0 commit comments

Comments
 (0)