@lvce-editor/extension-host-worker 6.7.0 → 6.8.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,11 @@ const activateExtension2 = async (extensionId, extension, absolutePath) => {
4000
4000
  }
4001
4001
  };
4002
4002
 
4003
+ const activateExtension3 = async (extensionId, extension) => {
4004
+ const module = acquire(extensionId);
4005
+ await module.activate(extension);
4006
+ };
4007
+
4003
4008
  const getUrlPrefix = (platform, extensionPath) => {
4004
4009
  if (extensionPath.startsWith('http://') || extensionPath.startsWith('https://')) {
4005
4010
  return extensionPath;
@@ -5638,6 +5643,12 @@ const hydrate = async () => {
5638
5643
  await setIconTheme(iconThemeId);
5639
5644
  };
5640
5645
 
5646
+ const importExtension2 = async (extensionId, absolutePath) => {
5647
+ string(absolutePath);
5648
+ const module = await importScript(absolutePath);
5649
+ set$5(extensionId, module);
5650
+ };
5651
+
5641
5652
  const importExtension = async (extensionId, absolutePath, activationEvent) => {
5642
5653
  try {
5643
5654
  string(absolutePath);
@@ -6212,8 +6223,10 @@ const commandMap = {
6212
6223
  'ColorTheme.hydrate': hydrate$1,
6213
6224
  'ExecuteExternalCommand.executeExternalCommand': executeExternalCommand,
6214
6225
  'ExtensionHost.activateExtension2': activateExtension2,
6226
+ 'ExtensionHost.activateExtension3': activateExtension3,
6215
6227
  'ExtensionHost.getRuntimeStatus': getRuntimeStatus,
6216
6228
  'ExtensionHost.importExtension': importExtension,
6229
+ 'ExtensionHost.importExtension2': importExtension2,
6217
6230
  'ExtensionHost.launchIframeWorker': launchIframeWorker,
6218
6231
  [BraceCompletionExecuteBraceCompletionProvider]: executeBraceCompletionProvider,
6219
6232
  [ClosingTagExecuteClosingTagProvider]: executeClosingTagProvider,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/extension-host-worker",
3
- "version": "6.7.0",
3
+ "version": "6.8.0",
4
4
  "description": "Webworker for the extension host functionality in Lvce Editor.",
5
5
  "keywords": [
6
6
  "web-worker"