@lvce-editor/extension-search-view 7.29.0 → 7.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4289,6 +4289,9 @@ const getDownloadCount = extension => {
|
|
|
4289
4289
|
return downloadCount.toLocaleString();
|
|
4290
4290
|
};
|
|
4291
4291
|
|
|
4292
|
+
const normalizePath = path => {
|
|
4293
|
+
return path.split('/').filter(part => part && part !== '.').join('/');
|
|
4294
|
+
};
|
|
4292
4295
|
const getRemoteUrl = (extension, platform, assetDir) => {
|
|
4293
4296
|
if (extension === null || typeof extension !== 'object') {
|
|
4294
4297
|
return '';
|
|
@@ -4301,7 +4304,9 @@ const getRemoteUrl = (extension, platform, assetDir) => {
|
|
|
4301
4304
|
if (builtin) {
|
|
4302
4305
|
return `${assetDir}/extensions/${id}/${icon}`;
|
|
4303
4306
|
}
|
|
4304
|
-
|
|
4307
|
+
const normalizedPath = normalizePath(path);
|
|
4308
|
+
const normalizedIcon = normalizePath(icon);
|
|
4309
|
+
return `/remote/${[normalizedPath, normalizedIcon].filter(Boolean).join('/')}`; // TODO support windows paths
|
|
4305
4310
|
}
|
|
4306
4311
|
if (platform === Web) {
|
|
4307
4312
|
return `${path}/${icon}`;
|