@lvce-editor/extension-host-worker 6.5.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.
package/README.md CHANGED
@@ -1,7 +1,3 @@
1
1
  # Extension Host Worker
2
2
 
3
3
  Webworker for the extension host functionality in Lvce Editor.
4
-
5
- ## Gitpod
6
-
7
- [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/extension-host-worker)
@@ -716,7 +716,7 @@ const registerCommand = command => {
716
716
  throw new VError(error, `Failed to register command${commandDisplayId}`);
717
717
  }
718
718
  };
719
- const executeCommand = async (id, ...args) => {
719
+ const executeCommand$1 = async (id, ...args) => {
720
720
  try {
721
721
  const command = state$c.commands[id];
722
722
  if (!command) {
@@ -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 = {
@@ -3397,7 +3397,7 @@ const api = {
3397
3397
  // Comment
3398
3398
 
3399
3399
  executeClosingTagProvider: executeClosingTagProvider,
3400
- executeCommand: executeCommand,
3400
+ executeCommand: executeCommand$1,
3401
3401
  executeCommentProvider: executeCommentProvider,
3402
3402
  executeCompletionProvider: executeCompletionProvider,
3403
3403
  executeDefinitionProvider: executeDefinitionProvider,
@@ -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;
@@ -4944,20 +4949,20 @@ const executeExternalCommand = (method, ...params) => {
4944
4949
  const BraceCompletionExecuteBraceCompletionProvider = 'ExtensionHostBraceCompletion.executeBraceCompletionProvider';
4945
4950
  const ClosingTagExecuteClosingTagProvider = 'ExtensionHostClosingTag.executeClosingTagProvider';
4946
4951
  const CommandExecute = 'ExtensionHostCommand.executeCommand';
4947
- const CompletionExecute = 'ExtensionHostCompletion.execute';
4948
4952
  const CommentProviderExecute = 'ExtensionHostCommment.execute';
4953
+ const CompletionExecute = 'ExtensionHostCompletion.execute';
4949
4954
  const CompletionResolveExecute = 'ExtensionHostCompletion.executeResolve';
4950
4955
  const ConfigurationSetConfiguration = 'ExtensionHostConfiguration.setConfiguration';
4951
4956
  const DefinitionExecuteDefinitionProvider = 'ExtensionHostDefinition.executeDefinitionProvider';
4952
4957
  const DiagnosticExecuteDiagnosticProvider = 'ExtensionHost.executeDiagnosticProvider';
4953
4958
  const ExtensionActivate = 'ExtensionHostExtension.activate';
4954
4959
  const FileSystemGetPathSeparator = 'ExtensionHostFileSystem.getPathSeparator';
4960
+ const FileSystemMkdir = 'ExtensionHostFileSystem.mkdir';
4955
4961
  const FileSystemReadDirWithFileTypes = 'ExtensionHostFileSystem.readDirWithFileTypes';
4956
4962
  const FileSystemReadFile = 'ExtensionHostFileSystem.readFile';
4963
+ const FileSystemRemove = 'ExtensionHostFileSystem.remove';
4957
4964
  const FileSystemRename = 'ExtensionHostFileSystem.rename';
4958
4965
  const FileSystemWriteFile = 'ExtensionHostFileSystem.writeFile';
4959
- const FileSystemRemove = 'ExtensionHostFileSystem.remove';
4960
- const FileSystemMkdir = 'ExtensionHostFileSystem.mkdir';
4961
4966
  const FormattingExecuteFormmattingProvider = 'ExtensionHostFormatting.executeFormattingProvider';
4962
4967
  const HoverExecute = 'ExtensionHostHover.execute';
4963
4968
  const ImplementationExecuteImplementationProvider = 'ExtensionHostImplementation.executeImplementationProvider';
@@ -4975,9 +4980,11 @@ const SourceControlGetChangedFiles = 'ExtensionHost.sourceControlGetChangedFiles
4975
4980
  const SourceControlGetEnabledProviderIds = 'ExtensionHostSourceControl.getEnabledProviderIds';
4976
4981
  const SourceControlGetFileBefore = 'ExtensionHostSourceControl.GetFileBefore';
4977
4982
  const SourceControlGetFileBefore2 = 'ExtensionHostSourceControl.getFileBefore';
4978
- const SourceControlGetGroups = 'ExtensionHostSourceControl.getGroups';
4979
4983
  const SourceControlGetFileDecorations = 'ExtensionHostSourceControl.getFileDecorations';
4984
+ const SourceControlGetGroups = 'ExtensionHostSourceControl.getGroups';
4985
+ const StatusBarExecuteCommand = 'ExtensionHostStatusBar.executeCommand';
4980
4986
  const StatusBarGetStatusBarItems = 'ExtensionHost.getStatusBarItems';
4987
+ const StatusBarGetStatusBarItems2 = 'ExtensionHost.getStatusBarItems2';
4981
4988
  const StatusBarRegisterChangeListener = 'ExtensionHostStatusBar.registerChangeListener';
4982
4989
  const TabCompletionExecuteTabCompletionProvider = 'ExtensionHost.executeTabCompletionProvider';
4983
4990
  const TextDocumentSetLanguageId = 'ExtensionHostTextDocument.setLanguageId';
@@ -5052,9 +5059,24 @@ const getStatusBarItems = async () => {
5052
5059
  }
5053
5060
  return statusBarItems;
5054
5061
  };
5062
+ const getStatusBarItems2 = async () => {
5063
+ const providers = Object.values(state$8.providers);
5064
+ const statusBarItems = [];
5065
+ for (const provider of providers) {
5066
+ // @ts-ignore
5067
+ if (provider && provider.getStatusBarItems) {
5068
+ // @ts-ignore
5069
+ statusBarItems.push(...provider.getStatusBarItems());
5070
+ }
5071
+ }
5072
+ return statusBarItems;
5073
+ };
5055
5074
  const registerChangeListener = () => {
5056
5075
  // TODO
5057
5076
  };
5077
+ const executeCommand = async name => {
5078
+ await executeCommand$1(name);
5079
+ };
5058
5080
 
5059
5081
  const Directory$1 = 3;
5060
5082
  const File$1 = 7;
@@ -5621,6 +5643,12 @@ const hydrate = async () => {
5621
5643
  await setIconTheme(iconThemeId);
5622
5644
  };
5623
5645
 
5646
+ const importExtension2 = async (extensionId, absolutePath) => {
5647
+ string(absolutePath);
5648
+ const module = await importScript(absolutePath);
5649
+ set$5(extensionId, module);
5650
+ };
5651
+
5624
5652
  const importExtension = async (extensionId, absolutePath, activationEvent) => {
5625
5653
  try {
5626
5654
  string(absolutePath);
@@ -6195,12 +6223,14 @@ const commandMap = {
6195
6223
  'ColorTheme.hydrate': hydrate$1,
6196
6224
  'ExecuteExternalCommand.executeExternalCommand': executeExternalCommand,
6197
6225
  'ExtensionHost.activateExtension2': activateExtension2,
6226
+ 'ExtensionHost.activateExtension3': activateExtension3,
6198
6227
  'ExtensionHost.getRuntimeStatus': getRuntimeStatus,
6199
6228
  'ExtensionHost.importExtension': importExtension,
6229
+ 'ExtensionHost.importExtension2': importExtension2,
6200
6230
  'ExtensionHost.launchIframeWorker': launchIframeWorker,
6201
6231
  [BraceCompletionExecuteBraceCompletionProvider]: executeBraceCompletionProvider,
6202
6232
  [ClosingTagExecuteClosingTagProvider]: executeClosingTagProvider,
6203
- [CommandExecute]: executeCommand,
6233
+ [CommandExecute]: executeCommand$1,
6204
6234
  [CommentProviderExecute]: executeCommentProvider,
6205
6235
  [CompletionExecute]: executeCompletionProvider,
6206
6236
  [CompletionResolveExecute]: executeresolveCompletionItemProvider,
@@ -6234,7 +6264,9 @@ const commandMap = {
6234
6264
  [SourceControlGetFileBefore2]: getFileBefore,
6235
6265
  [SourceControlGetFileDecorations]: getFileDecorations,
6236
6266
  [SourceControlGetGroups]: getGroups,
6267
+ [StatusBarExecuteCommand]: executeCommand,
6237
6268
  [StatusBarGetStatusBarItems]: getStatusBarItems,
6269
+ [StatusBarGetStatusBarItems2]: getStatusBarItems2,
6238
6270
  [StatusBarRegisterChangeListener]: registerChangeListener,
6239
6271
  [TabCompletionExecuteTabCompletionProvider]: executeTabCompletionProvider,
6240
6272
  [TextDocumentSetLanguageId]: setLanguageId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/extension-host-worker",
3
- "version": "6.5.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"