@lvce-editor/extension-search-view 7.29.1 → 7.29.2

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,7 @@ const getDownloadCount = extension => {
4289
4289
  return downloadCount.toLocaleString();
4290
4290
  };
4291
4291
 
4292
+ const pathSeparatorRegex = /[\\/]/;
4292
4293
  const normalizePath = path => {
4293
4294
  return path.split('/').filter(part => part && part !== '.').join('/');
4294
4295
  };
@@ -4302,7 +4303,8 @@ const getRemoteUrl = (extension, platform, assetDir) => {
4302
4303
  const path = 'path' in extension && typeof extension.path === 'string' ? extension.path : '';
4303
4304
  if (platform === Remote || platform === Electron) {
4304
4305
  if (builtin) {
4305
- return `${assetDir}/extensions/${id}/${icon}`;
4306
+ const directory = path.split(pathSeparatorRegex).findLast(Boolean) || id;
4307
+ return `${assetDir}/extensions/${directory}/${icon}`;
4306
4308
  }
4307
4309
  const normalizedPath = normalizePath(path);
4308
4310
  const normalizedIcon = normalizePath(icon);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/extension-search-view",
3
- "version": "7.29.1",
3
+ "version": "7.29.2",
4
4
  "description": "Extension Search View Worker",
5
5
  "repository": {
6
6
  "type": "git",