@lvce-editor/test-worker 15.6.0 → 15.7.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.
@@ -3963,87 +3963,91 @@ const FindWidget = {
3963
3963
  toggleUseRegularExpression: toggleUseRegularExpression$1
3964
3964
  };
3965
3965
 
3966
+ const executeExtensionCommand = async (commandId, ...args) => {
3967
+ return invoke('ExtensionHost.executeCommand', commandId, ...args);
3968
+ };
3969
+
3966
3970
  const init = async (options = {}) => {
3967
- await invoke('ExtensionHost.executeCommand', 'git.init', options);
3971
+ await executeExtensionCommand('git.init', options);
3968
3972
  };
3969
3973
  const clone = async (repositoryUrl, cwd) => {
3970
- await invoke('ExtensionHost.executeCommand', 'git.clone', repositoryUrl, cwd);
3974
+ await executeExtensionCommand('git.clone', repositoryUrl, cwd);
3971
3975
  };
3972
3976
  const add = async pathSpec => {
3973
- await invoke('ExtensionHost.executeCommand', 'git.add', pathSpec);
3977
+ await executeExtensionCommand('git.add', pathSpec);
3974
3978
  };
3975
3979
  const commit = async message => {
3976
- await invoke('ExtensionHost.executeCommand', 'git.commit', message);
3980
+ await executeExtensionCommand('git.commit', message);
3977
3981
  };
3978
3982
  const push$1 = async (remoteOrOptions, branch) => {
3979
3983
  if (typeof remoteOrOptions === 'string') {
3980
- await invoke('ExtensionHost.executeCommand', 'git.push', {
3984
+ await executeExtensionCommand('git.push', {
3981
3985
  setUpstream: [remoteOrOptions, branch || '']
3982
3986
  });
3983
3987
  return;
3984
3988
  }
3985
- await invoke('ExtensionHost.executeCommand', 'git.push', remoteOrOptions || {});
3989
+ await executeExtensionCommand('git.push', remoteOrOptions || {});
3986
3990
  };
3987
3991
  const pull = async (remote, branch) => {
3988
- await invoke('ExtensionHost.executeCommand', 'git.pull', remote, branch);
3992
+ await executeExtensionCommand('git.pull', remote, branch);
3989
3993
  };
3990
3994
  const fetch$1 = async remote => {
3991
- await invoke('ExtensionHost.executeCommand', 'git.fetch', remote);
3995
+ await executeExtensionCommand('git.fetch', remote);
3992
3996
  };
3993
3997
  const fetchAll = async () => {
3994
- await invoke('ExtensionHost.executeCommand', 'git.fetchAll');
3998
+ await executeExtensionCommand('git.fetchAll');
3995
3999
  };
3996
4000
  const fetchPrune = async () => {
3997
- await invoke('ExtensionHost.executeCommand', 'git.fetchPrune');
4001
+ await executeExtensionCommand('git.fetchPrune');
3998
4002
  };
3999
4003
  const stash = async message => {
4000
4004
  if (message === undefined) {
4001
- await invoke('ExtensionHost.executeCommand', 'git.stash');
4005
+ await executeExtensionCommand('git.stash');
4002
4006
  return;
4003
4007
  }
4004
- await invoke('ExtensionHost.executeCommand', 'git.stash', message);
4008
+ await executeExtensionCommand('git.stash', message);
4005
4009
  };
4006
4010
  const unstash = async () => {
4007
- await invoke('ExtensionHost.executeCommand', 'git.unstash');
4011
+ await executeExtensionCommand('git.unstash');
4008
4012
  };
4009
4013
  const checkout = async ref => {
4010
- await invoke('ExtensionHost.executeCommand', 'git.checkout', ref);
4014
+ await executeExtensionCommand('git.checkout', ref);
4011
4015
  };
4012
4016
  const branch = async name => {
4013
- await invoke('ExtensionHost.executeCommand', 'git.branch', name);
4017
+ await executeExtensionCommand('git.branch', name);
4014
4018
  };
4015
4019
  const deleteBranch = async name => {
4016
- await invoke('ExtensionHost.executeCommand', 'git.deleteBranch', name);
4020
+ await executeExtensionCommand('git.deleteBranch', name);
4017
4021
  };
4018
4022
  const renameBranch = async newName => {
4019
- await invoke('ExtensionHost.executeCommand', 'git.renameBranch', newName);
4023
+ await executeExtensionCommand('git.renameBranch', newName);
4020
4024
  };
4021
4025
  const cherryPick = async commitHash => {
4022
- await invoke('ExtensionHost.executeCommand', 'git.cherryPick', commitHash);
4026
+ await executeExtensionCommand('git.cherryPick', commitHash);
4023
4027
  };
4024
4028
  const merge = async ref => {
4025
- await invoke('ExtensionHost.executeCommand', 'git.merge', ref);
4029
+ await executeExtensionCommand('git.merge', ref);
4026
4030
  };
4027
4031
  const rebase = async ref => {
4028
- await invoke('ExtensionHost.executeCommand', 'git.rebase', ref);
4032
+ await executeExtensionCommand('git.rebase', ref);
4029
4033
  };
4030
4034
  const createTag = async name => {
4031
- await invoke('ExtensionHost.executeCommand', 'git.createTag', name);
4035
+ await executeExtensionCommand('git.createTag', name);
4032
4036
  };
4033
4037
  const deleteTag = async name => {
4034
- await invoke('ExtensionHost.executeCommand', 'git.deleteTag', name);
4038
+ await executeExtensionCommand('git.deleteTag', name);
4035
4039
  };
4036
4040
  const status = async () => {
4037
- return invoke('ExtensionHost.executeCommand', 'git.status');
4041
+ return executeExtensionCommand('git.status');
4038
4042
  };
4039
4043
  const addRemote = async (name, remoteUrl) => {
4040
- await invoke('ExtensionHost.executeCommand', 'git.addRemote', name, remoteUrl);
4044
+ await executeExtensionCommand('git.addRemote', name, remoteUrl);
4041
4045
  };
4042
4046
  const removeRemote = async name => {
4043
- await invoke('ExtensionHost.executeCommand', 'git.removeRemote', name);
4047
+ await executeExtensionCommand('git.removeRemote', name);
4044
4048
  };
4045
4049
  const setConfig = async (key, value) => {
4046
- await invoke('ExtensionHost.executeCommand', 'git.setConfig', key, value);
4050
+ await executeExtensionCommand('git.setConfig', key, value);
4047
4051
  };
4048
4052
  const config = async values => {
4049
4053
  for (const [key, value] of Object.entries(values)) {
@@ -4051,7 +4055,7 @@ const config = async values => {
4051
4055
  }
4052
4056
  };
4053
4057
  const shouldHaveCommit = async message => {
4054
- const commits = await invoke('ExtensionHost.executeCommand', 'git.getCommits');
4058
+ const commits = await executeExtensionCommand('git.getCommits');
4055
4059
  if (!Array.isArray(commits)) {
4056
4060
  throw new TypeError(`Expected commits to be an array, but got ${commits}`);
4057
4061
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-worker",
3
- "version": "15.6.0",
3
+ "version": "15.7.0",
4
4
  "description": "Test Worker",
5
5
  "repository": {
6
6
  "type": "git",