@lvce-editor/extension-host-worker 6.7.0 → 6.9.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.
|
@@ -790,6 +790,10 @@ const get$b = id => {
|
|
|
790
790
|
|
|
791
791
|
const create$a = rpcId => {
|
|
792
792
|
return {
|
|
793
|
+
async dispose() {
|
|
794
|
+
const rpc = get$b(rpcId);
|
|
795
|
+
await rpc.dispose();
|
|
796
|
+
},
|
|
793
797
|
// @ts-ignore
|
|
794
798
|
invoke(method, ...params) {
|
|
795
799
|
const rpc = get$b(rpcId);
|
|
@@ -804,19 +808,15 @@ const create$a = rpcId => {
|
|
|
804
808
|
},
|
|
805
809
|
set(rpc) {
|
|
806
810
|
set$c(rpcId, rpc);
|
|
807
|
-
},
|
|
808
|
-
async dispose() {
|
|
809
|
-
const rpc = get$b(rpcId);
|
|
810
|
-
await rpc.dispose();
|
|
811
811
|
}
|
|
812
812
|
};
|
|
813
813
|
};
|
|
814
814
|
|
|
815
815
|
const {
|
|
816
|
+
dispose,
|
|
816
817
|
invoke: invoke$5,
|
|
817
818
|
invokeAndTransfer: invokeAndTransfer$3,
|
|
818
|
-
set: set$b
|
|
819
|
-
dispose
|
|
819
|
+
set: set$b
|
|
820
820
|
} = create$a(DebugWorker$1);
|
|
821
821
|
|
|
822
822
|
const DebugWorker = {
|
|
@@ -4000,6 +4000,14 @@ const activateExtension2 = async (extensionId, extension, absolutePath) => {
|
|
|
4000
4000
|
}
|
|
4001
4001
|
};
|
|
4002
4002
|
|
|
4003
|
+
const activateExtension3 = async (extensionId, extension) => {
|
|
4004
|
+
const module = acquire(extensionId);
|
|
4005
|
+
if (!module) {
|
|
4006
|
+
throw new Error(`extension module ${extensionId} not found`);
|
|
4007
|
+
}
|
|
4008
|
+
await module.activate(extension);
|
|
4009
|
+
};
|
|
4010
|
+
|
|
4003
4011
|
const getUrlPrefix = (platform, extensionPath) => {
|
|
4004
4012
|
if (extensionPath.startsWith('http://') || extensionPath.startsWith('https://')) {
|
|
4005
4013
|
return extensionPath;
|
|
@@ -5638,6 +5646,12 @@ const hydrate = async () => {
|
|
|
5638
5646
|
await setIconTheme(iconThemeId);
|
|
5639
5647
|
};
|
|
5640
5648
|
|
|
5649
|
+
const importExtension2 = async (extensionId, absolutePath) => {
|
|
5650
|
+
string(absolutePath);
|
|
5651
|
+
const module = await importScript(absolutePath);
|
|
5652
|
+
set$5(extensionId, module);
|
|
5653
|
+
};
|
|
5654
|
+
|
|
5641
5655
|
const importExtension = async (extensionId, absolutePath, activationEvent) => {
|
|
5642
5656
|
try {
|
|
5643
5657
|
string(absolutePath);
|
|
@@ -6212,8 +6226,10 @@ const commandMap = {
|
|
|
6212
6226
|
'ColorTheme.hydrate': hydrate$1,
|
|
6213
6227
|
'ExecuteExternalCommand.executeExternalCommand': executeExternalCommand,
|
|
6214
6228
|
'ExtensionHost.activateExtension2': activateExtension2,
|
|
6229
|
+
'ExtensionHost.activateExtension3': activateExtension3,
|
|
6215
6230
|
'ExtensionHost.getRuntimeStatus': getRuntimeStatus,
|
|
6216
6231
|
'ExtensionHost.importExtension': importExtension,
|
|
6232
|
+
'ExtensionHost.importExtension2': importExtension2,
|
|
6217
6233
|
'ExtensionHost.launchIframeWorker': launchIframeWorker,
|
|
6218
6234
|
[BraceCompletionExecuteBraceCompletionProvider]: executeBraceCompletionProvider,
|
|
6219
6235
|
[ClosingTagExecuteClosingTagProvider]: executeClosingTagProvider,
|