mirror of
https://github.com/VSCodium/vscodium.git
synced 2026-04-19 13:46:03 +10:00
fix: gallery (#2506)
This commit is contained in:
@@ -31,22 +31,11 @@ index deba4c4..1b41bde 100644
|
|||||||
+ resolveUserProduct();
|
+ resolveUserProduct();
|
||||||
|
|
||||||
diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
|
diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
|
||||||
index 5a6c171..0cb5e20 100644
|
index 5a6c171..275cbcf 100644
|
||||||
--- a/src/vs/platform/product/common/product.ts
|
--- a/src/vs/platform/product/common/product.ts
|
||||||
+++ b/src/vs/platform/product/common/product.ts
|
+++ b/src/vs/platform/product/common/product.ts
|
||||||
@@ -31,2 +31,36 @@ else if (globalThis._VSCODE_PRODUCT_JSON && globalThis._VSCODE_PACKAGE_JSON) {
|
@@ -31,2 +31,25 @@ else if (globalThis._VSCODE_PRODUCT_JSON && globalThis._VSCODE_PACKAGE_JSON) {
|
||||||
|
|
||||||
+ const { serviceUrl, controlUrl, extensionUrlTemplate, resourceUrlTemplate } = product.extensionsGallery || {};
|
|
||||||
+
|
|
||||||
+ Object.assign(product, {
|
|
||||||
+ extensionsGallery: {
|
|
||||||
+ serviceUrl: env['VSCODE_GALLERY_SERVICE_URL'] || serviceUrl,
|
|
||||||
+ controlUrl: env['VSCODE_GALLERY_CONTROL_URL'] || controlUrl,
|
|
||||||
+ extensionUrlTemplate: env['VSCODE_GALLERY_EXTENSION_URL_TEMPLATE'] || extensionUrlTemplate,
|
|
||||||
+ resourceUrlTemplate: env['VSCODE_GALLERY_RESOURCE_URL_TEMPLATE'] || resourceUrlTemplate,
|
|
||||||
+ }
|
|
||||||
+ });
|
|
||||||
+
|
|
||||||
+ // Merge user-customized product.json
|
+ // Merge user-customized product.json
|
||||||
+ try {
|
+ try {
|
||||||
+ const merge = (...objects: any[]) =>
|
+ const merge = (...objects: any[]) =>
|
||||||
42
patches/fix-gallery.patch
Normal file
42
patches/fix-gallery.patch
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts
|
||||||
|
index 3954823..f8026cd 100644
|
||||||
|
--- a/src/vs/base/common/product.ts
|
||||||
|
+++ b/src/vs/base/common/product.ts
|
||||||
|
@@ -112,2 +112,4 @@ export interface IProductConfiguration {
|
||||||
|
readonly accessSKUs?: string[];
|
||||||
|
+ readonly itemUrl: string;
|
||||||
|
+ readonly latestUrlTemplate?: string;
|
||||||
|
};
|
||||||
|
diff --git a/src/vs/platform/extensionManagement/common/extensionGalleryManifestService.ts b/src/vs/platform/extensionManagement/common/extensionGalleryManifestService.ts
|
||||||
|
index 658219e..d1bf7a9 100644
|
||||||
|
--- a/src/vs/platform/extensionManagement/common/extensionGalleryManifestService.ts
|
||||||
|
+++ b/src/vs/platform/extensionManagement/common/extensionGalleryManifestService.ts
|
||||||
|
@@ -19,2 +19,3 @@ type ExtensionGalleryConfig = {
|
||||||
|
readonly nlsBaseUrl: string;
|
||||||
|
+ readonly latestUrlTemplate?: string;
|
||||||
|
};
|
||||||
|
@@ -49,3 +50,3 @@ export class ExtensionGalleryManifestService extends Disposable implements IExte
|
||||||
|
{
|
||||||
|
- id: `${extensionsGallery.serviceUrl}/vscode/{publisher}/{name}/latest`,
|
||||||
|
+ id: extensionsGallery.latestUrlTemplate ?? `${extensionsGallery.serviceUrl}/vscode/{publisher}/{name}/latest`,
|
||||||
|
type: ExtensionGalleryResourceType.ExtensionLatestVersionUri
|
||||||
|
diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
|
||||||
|
index 5a6c171..112b31b 100644
|
||||||
|
--- a/src/vs/platform/product/common/product.ts
|
||||||
|
+++ b/src/vs/platform/product/common/product.ts
|
||||||
|
@@ -31,2 +31,15 @@ else if (globalThis._VSCODE_PRODUCT_JSON && globalThis._VSCODE_PACKAGE_JSON) {
|
||||||
|
|
||||||
|
+ const { serviceUrl, controlUrl, itemUrl, latestUrlTemplate, extensionUrlTemplate, resourceUrlTemplate } = product.extensionsGallery || {};
|
||||||
|
+
|
||||||
|
+ Object.assign(product, {
|
||||||
|
+ extensionsGallery: {
|
||||||
|
+ serviceUrl: env['VSCODE_GALLERY_SERVICE_URL'] || serviceUrl,
|
||||||
|
+ controlUrl: env['VSCODE_GALLERY_CONTROL_URL'] || controlUrl,
|
||||||
|
+ itemUrl: env['VSCODE_GALLERY_ITEM_URL'] || itemUrl,
|
||||||
|
+ latestUrlTemplate: env['VSCODE_GALLERY_LATEST_URL_TEMPLATE'] || latestUrlTemplate,
|
||||||
|
+ extensionUrlTemplate: env['VSCODE_GALLERY_EXTENSION_URL_TEMPLATE'] || extensionUrlTemplate,
|
||||||
|
+ resourceUrlTemplate: env['VSCODE_GALLERY_RESOURCE_URL_TEMPLATE'] || resourceUrlTemplate,
|
||||||
|
+ }
|
||||||
|
+ });
|
||||||
|
+
|
||||||
|
// Running out of sources
|
||||||
@@ -116,7 +116,8 @@ cp product.json{,.bak}
|
|||||||
|
|
||||||
setpath "product" "checksumFailMoreInfoUrl" "https://go.microsoft.com/fwlink/?LinkId=828886"
|
setpath "product" "checksumFailMoreInfoUrl" "https://go.microsoft.com/fwlink/?LinkId=828886"
|
||||||
setpath "product" "documentationUrl" "https://go.microsoft.com/fwlink/?LinkID=533484#vscode"
|
setpath "product" "documentationUrl" "https://go.microsoft.com/fwlink/?LinkID=533484#vscode"
|
||||||
setpath_json "product" "extensionsGallery" '{"serviceUrl": "https://open-vsx.org/vscode/gallery", "itemUrl": "https://open-vsx.org/vscode/item", "extensionUrlTemplate": "https://open-vsx.org/vscode/gallery/{publisher}/{name}/latest", "controlUrl": "https://raw.githubusercontent.com/EclipseFdn/publish-extensions/refs/heads/master/extension-control/extensions.json"}'
|
setpath_json "product" "extensionsGallery" '{"serviceUrl": "https://open-vsx.org/vscode/gallery", "itemUrl": "https://open-vsx.org/vscode/item", "latestUrlTemplate": "https://open-vsx.org/vscode/gallery/{publisher}/{name}/latest", "controlUrl": "https://raw.githubusercontent.com/EclipseFdn/publish-extensions/refs/heads/master/extension-control/extensions.json"}'
|
||||||
|
|
||||||
setpath "product" "introductoryVideosUrl" "https://go.microsoft.com/fwlink/?linkid=832146"
|
setpath "product" "introductoryVideosUrl" "https://go.microsoft.com/fwlink/?linkid=832146"
|
||||||
setpath "product" "keyboardShortcutsUrlLinux" "https://go.microsoft.com/fwlink/?linkid=832144"
|
setpath "product" "keyboardShortcutsUrlLinux" "https://go.microsoft.com/fwlink/?linkid=832144"
|
||||||
setpath "product" "keyboardShortcutsUrlMac" "https://go.microsoft.com/fwlink/?linkid=832143"
|
setpath "product" "keyboardShortcutsUrlMac" "https://go.microsoft.com/fwlink/?linkid=832143"
|
||||||
|
|||||||
Reference in New Issue
Block a user