@lvce-editor/extension-search-view 7.28.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
- return `/remote/${path}/${icon}`; // TODO support windows paths
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}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/extension-search-view",
3
- "version": "7.28.0",
3
+ "version": "7.29.1",
4
4
  "description": "Extension Search View Worker",
5
5
  "repository": {
6
6
  "type": "git",