@lvce-editor/test-worker 15.7.0 → 15.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.
package/dist/api.d.ts CHANGED
@@ -673,6 +673,7 @@ interface FindWidget {
673
673
 
674
674
  interface Git {
675
675
  readonly add: (pathSpec: string) => Promise<void>;
676
+ readonly addAll: () => Promise<void>;
676
677
  readonly addRemote: (name: string, remoteUrl: string) => Promise<void>;
677
678
  readonly branch: (name: string) => Promise<void>;
678
679
  readonly checkout: (ref: string) => Promise<void>;
@@ -691,9 +692,13 @@ interface Git {
691
692
  readonly pull: (remote: string, branch: string) => Promise<void>;
692
693
  readonly push: (remoteOrOptions?: string | GitPushOptions, branch?: string) => Promise<void>;
693
694
  readonly rebase: (ref: string) => Promise<void>;
695
+ readonly removeOrigin: () => Promise<void>;
694
696
  readonly removeRemote: (name: string) => Promise<void>;
697
+ readonly removeUpstream: () => Promise<void>;
695
698
  readonly renameBranch: (newName: string) => Promise<void>;
696
699
  readonly setConfig: (key: string, value: string) => Promise<void>;
700
+ readonly setOrigin: (remoteUrl: string) => Promise<void>;
701
+ readonly setUpstream: (remoteUrl: string) => Promise<void>;
697
702
  readonly shouldHaveCommit: (message: string) => Promise<void>;
698
703
  readonly shouldHaveInvocations: (invocations: readonly GitInvocation[]) => Promise<void>;
699
704
  readonly stash: (message?: string) => Promise<void>;
@@ -3976,6 +3976,9 @@ const clone = async (repositoryUrl, cwd) => {
3976
3976
  const add = async pathSpec => {
3977
3977
  await executeExtensionCommand('git.add', pathSpec);
3978
3978
  };
3979
+ const addAll = async () => {
3980
+ await add('.');
3981
+ };
3979
3982
  const commit = async message => {
3980
3983
  await executeExtensionCommand('git.commit', message);
3981
3984
  };
@@ -4043,16 +4046,26 @@ const status = async () => {
4043
4046
  const addRemote = async (name, remoteUrl) => {
4044
4047
  await executeExtensionCommand('git.addRemote', name, remoteUrl);
4045
4048
  };
4049
+ const setOrigin = async remoteUrl => {
4050
+ await addRemote('origin', remoteUrl);
4051
+ };
4052
+ const setUpstream = async remoteUrl => {
4053
+ await addRemote('upstream', remoteUrl);
4054
+ };
4046
4055
  const removeRemote = async name => {
4047
4056
  await executeExtensionCommand('git.removeRemote', name);
4048
4057
  };
4058
+ const removeOrigin = async () => {
4059
+ await removeRemote('origin');
4060
+ };
4061
+ const removeUpstream = async () => {
4062
+ await removeRemote('upstream');
4063
+ };
4049
4064
  const setConfig = async (key, value) => {
4050
4065
  await executeExtensionCommand('git.setConfig', key, value);
4051
4066
  };
4052
4067
  const config = async values => {
4053
- for (const [key, value] of Object.entries(values)) {
4054
- await setConfig(key, value);
4055
- }
4068
+ await Promise.all(Object.entries(values).map(([key, value]) => setConfig(key, value)));
4056
4069
  };
4057
4070
  const shouldHaveCommit = async message => {
4058
4071
  const commits = await executeExtensionCommand('git.getCommits');
@@ -4075,6 +4088,7 @@ const shouldHaveInvocations = async invocations => {
4075
4088
 
4076
4089
  const Git = {
4077
4090
  add,
4091
+ addAll,
4078
4092
  addRemote,
4079
4093
  branch,
4080
4094
  checkout,
@@ -4093,9 +4107,13 @@ const Git = {
4093
4107
  pull,
4094
4108
  push: push$1,
4095
4109
  rebase,
4110
+ removeOrigin,
4096
4111
  removeRemote,
4112
+ removeUpstream,
4097
4113
  renameBranch,
4098
4114
  setConfig,
4115
+ setOrigin,
4116
+ setUpstream,
4099
4117
  shouldHaveCommit,
4100
4118
  shouldHaveInvocations,
4101
4119
  stash,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-worker",
3
- "version": "15.7.0",
3
+ "version": "15.9.0",
4
4
  "description": "Test Worker",
5
5
  "repository": {
6
6
  "type": "git",