@lvce-editor/extension-management-worker 4.41.0 → 4.41.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.
@@ -1591,11 +1591,11 @@ const tryToGetActualImportErrorMessage = async (url, error) => {
1591
1591
  return `Failed to import ${url}: ${error}`;
1592
1592
  }
1593
1593
  if (response.ok) {
1594
- throw new Error(`Failed to import ${url}: Unknown Error`);
1594
+ return `Failed to import ${url}: ${error}`;
1595
1595
  }
1596
1596
  switch (response.status) {
1597
1597
  case NotFound:
1598
- throw new Error(`Failed to import ${url}: Not found (404)`);
1598
+ return `Failed to import ${url}: Not found (404)`;
1599
1599
  default:
1600
1600
  return `Failed to import ${url}: ${error}`;
1601
1601
  }
@@ -2300,12 +2300,17 @@ const getExtensionId$3 = extension => {
2300
2300
  const getAbsolutePath$1 = (extension, assetDir, platform) => {
2301
2301
  return getExtensionAbsolutePath(extension.id, extension.isWeb, extension.builtin, extension.path || extension.uri, extension.browser, globalThis.location.origin, platform, assetDir);
2302
2302
  };
2303
+ const notifyRunningExtensionsChanged = () => {
2304
+ setTimeout(() => {
2305
+ void invoke$2('Layout.handleExtensionsChanged');
2306
+ }, 0);
2307
+ };
2303
2308
  const doActivateExtension = async (extension, absolutePath, event, platform) => {
2304
2309
  const extensionId = getExtensionId$3(extension);
2305
2310
  try {
2306
2311
  await activateExtension3(extension, absolutePath, event, platform);
2307
2312
  runningExtensions[extensionId] = true;
2308
- await invoke$2('Layout.handleExtensionsChanged');
2313
+ notifyRunningExtensionsChanged();
2309
2314
  } finally {
2310
2315
  delete activatingExtensions[extensionId];
2311
2316
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/extension-management-worker",
3
- "version": "4.41.0",
3
+ "version": "4.41.2",
4
4
  "description": "Webworker for the Extension Management functionality in Lvce Editor.",
5
5
  "keywords": [
6
6
  "web-worker"