@lvce-editor/test-worker 15.5.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.
package/dist/api.d.ts CHANGED
@@ -676,13 +676,23 @@ interface Git {
676
676
  readonly addRemote: (name: string, remoteUrl: string) => Promise<void>;
677
677
  readonly branch: (name: string) => Promise<void>;
678
678
  readonly checkout: (ref: string) => Promise<void>;
679
+ readonly cherryPick: (commitHash: string) => Promise<void>;
679
680
  readonly clone: (repositoryUrl: string, cwd: string) => Promise<void>;
680
681
  readonly commit: (message: string) => Promise<void>;
681
682
  readonly config: (values: Record<string, string>) => Promise<void>;
683
+ readonly createTag: (name: string) => Promise<void>;
684
+ readonly deleteBranch: (name: string) => Promise<void>;
685
+ readonly deleteTag: (name: string) => Promise<void>;
682
686
  readonly fetch: (remote: string) => Promise<void>;
687
+ readonly fetchAll: () => Promise<void>;
688
+ readonly fetchPrune: () => Promise<void>;
683
689
  readonly init: (options?: GitInitOptions) => Promise<void>;
690
+ readonly merge: (ref: string) => Promise<void>;
684
691
  readonly pull: (remote: string, branch: string) => Promise<void>;
685
692
  readonly push: (remoteOrOptions?: string | GitPushOptions, branch?: string) => Promise<void>;
693
+ readonly rebase: (ref: string) => Promise<void>;
694
+ readonly removeRemote: (name: string) => Promise<void>;
695
+ readonly renameBranch: (newName: string) => Promise<void>;
686
696
  readonly setConfig: (key: string, value: string) => Promise<void>;
687
697
  readonly shouldHaveCommit: (message: string) => Promise<void>;
688
698
  readonly shouldHaveInvocations: (invocations: readonly GitInvocation[]) => Promise<void>;
@@ -3963,57 +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);
3996
+ };
3997
+ const fetchAll = async () => {
3998
+ await executeExtensionCommand('git.fetchAll');
3999
+ };
4000
+ const fetchPrune = async () => {
4001
+ await executeExtensionCommand('git.fetchPrune');
3992
4002
  };
3993
4003
  const stash = async message => {
3994
4004
  if (message === undefined) {
3995
- await invoke('ExtensionHost.executeCommand', 'git.stash');
4005
+ await executeExtensionCommand('git.stash');
3996
4006
  return;
3997
4007
  }
3998
- await invoke('ExtensionHost.executeCommand', 'git.stash', message);
4008
+ await executeExtensionCommand('git.stash', message);
3999
4009
  };
4000
4010
  const unstash = async () => {
4001
- await invoke('ExtensionHost.executeCommand', 'git.unstash');
4011
+ await executeExtensionCommand('git.unstash');
4002
4012
  };
4003
4013
  const checkout = async ref => {
4004
- await invoke('ExtensionHost.executeCommand', 'git.checkout', ref);
4014
+ await executeExtensionCommand('git.checkout', ref);
4005
4015
  };
4006
4016
  const branch = async name => {
4007
- await invoke('ExtensionHost.executeCommand', 'git.branch', name);
4017
+ await executeExtensionCommand('git.branch', name);
4018
+ };
4019
+ const deleteBranch = async name => {
4020
+ await executeExtensionCommand('git.deleteBranch', name);
4021
+ };
4022
+ const renameBranch = async newName => {
4023
+ await executeExtensionCommand('git.renameBranch', newName);
4024
+ };
4025
+ const cherryPick = async commitHash => {
4026
+ await executeExtensionCommand('git.cherryPick', commitHash);
4027
+ };
4028
+ const merge = async ref => {
4029
+ await executeExtensionCommand('git.merge', ref);
4030
+ };
4031
+ const rebase = async ref => {
4032
+ await executeExtensionCommand('git.rebase', ref);
4033
+ };
4034
+ const createTag = async name => {
4035
+ await executeExtensionCommand('git.createTag', name);
4036
+ };
4037
+ const deleteTag = async name => {
4038
+ await executeExtensionCommand('git.deleteTag', name);
4008
4039
  };
4009
4040
  const status = async () => {
4010
- return invoke('ExtensionHost.executeCommand', 'git.status');
4041
+ return executeExtensionCommand('git.status');
4011
4042
  };
4012
4043
  const addRemote = async (name, remoteUrl) => {
4013
- await invoke('ExtensionHost.executeCommand', 'git.addRemote', name, remoteUrl);
4044
+ await executeExtensionCommand('git.addRemote', name, remoteUrl);
4045
+ };
4046
+ const removeRemote = async name => {
4047
+ await executeExtensionCommand('git.removeRemote', name);
4014
4048
  };
4015
4049
  const setConfig = async (key, value) => {
4016
- await invoke('ExtensionHost.executeCommand', 'git.setConfig', key, value);
4050
+ await executeExtensionCommand('git.setConfig', key, value);
4017
4051
  };
4018
4052
  const config = async values => {
4019
4053
  for (const [key, value] of Object.entries(values)) {
@@ -4021,7 +4055,7 @@ const config = async values => {
4021
4055
  }
4022
4056
  };
4023
4057
  const shouldHaveCommit = async message => {
4024
- const commits = await invoke('ExtensionHost.executeCommand', 'git.getCommits');
4058
+ const commits = await executeExtensionCommand('git.getCommits');
4025
4059
  if (!Array.isArray(commits)) {
4026
4060
  throw new TypeError(`Expected commits to be an array, but got ${commits}`);
4027
4061
  }
@@ -4044,13 +4078,23 @@ const Git = {
4044
4078
  addRemote,
4045
4079
  branch,
4046
4080
  checkout,
4081
+ cherryPick,
4047
4082
  clone,
4048
4083
  commit,
4049
4084
  config,
4085
+ createTag,
4086
+ deleteBranch,
4087
+ deleteTag,
4050
4088
  fetch: fetch$1,
4089
+ fetchAll,
4090
+ fetchPrune,
4051
4091
  init,
4092
+ merge,
4052
4093
  pull,
4053
4094
  push: push$1,
4095
+ rebase,
4096
+ removeRemote,
4097
+ renameBranch,
4054
4098
  setConfig,
4055
4099
  shouldHaveCommit,
4056
4100
  shouldHaveInvocations,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-worker",
3
- "version": "15.5.0",
3
+ "version": "15.7.0",
4
4
  "description": "Test Worker",
5
5
  "repository": {
6
6
  "type": "git",