@lvce-editor/extension-management-worker 1.18.0 → 1.19.0
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.
|
@@ -1458,9 +1458,17 @@ const importExtension = async (extensionId, absolutePath, activationEvent) => {
|
|
|
1458
1458
|
}
|
|
1459
1459
|
};
|
|
1460
1460
|
|
|
1461
|
+
const NewLine = '\n';
|
|
1462
|
+
const Slash = '/';
|
|
1463
|
+
|
|
1464
|
+
const interExtensionId = path => {
|
|
1465
|
+
const slashIndex = path.lastIndexOf(Slash);
|
|
1466
|
+
return path.slice(slashIndex + 1);
|
|
1467
|
+
};
|
|
1468
|
+
|
|
1461
1469
|
const activateExtension3 = async (extension, absolutePath, activationEvent, platform) => {
|
|
1462
1470
|
handleRpcInfos(extension, platform);
|
|
1463
|
-
const extensionId = extension.id;
|
|
1471
|
+
const extensionId = extension.id || interExtensionId(extension.uri);
|
|
1464
1472
|
await importExtension(extensionId, absolutePath, activationEvent);
|
|
1465
1473
|
await activateExtension2(extensionId, extension, absolutePath);
|
|
1466
1474
|
};
|
|
@@ -1488,14 +1496,6 @@ const getJson = async url => {
|
|
|
1488
1496
|
}
|
|
1489
1497
|
};
|
|
1490
1498
|
|
|
1491
|
-
const NewLine = '\n';
|
|
1492
|
-
const Slash = '/';
|
|
1493
|
-
|
|
1494
|
-
const interExtensionId = path => {
|
|
1495
|
-
const slashIndex = path.lastIndexOf(Slash);
|
|
1496
|
-
return path.slice(slashIndex + 1);
|
|
1497
|
-
};
|
|
1498
|
-
|
|
1499
1499
|
const getWebExtensionManifest = async (path, manifestPath) => {
|
|
1500
1500
|
try {
|
|
1501
1501
|
const manifest = await getJson(manifestPath);
|