@lvce-editor/test-worker 15.8.0 → 15.10.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,16 +673,22 @@ 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>;
678
+ readonly applyStash: () => Promise<void>;
677
679
  readonly branch: (name: string) => Promise<void>;
678
680
  readonly checkout: (ref: string) => Promise<void>;
679
681
  readonly cherryPick: (commitHash: string) => Promise<void>;
682
+ readonly cleanAll: () => Promise<void>;
680
683
  readonly clone: (repositoryUrl: string, cwd: string) => Promise<void>;
681
684
  readonly commit: (message: string) => Promise<void>;
685
+ readonly commitStaged: (message: string) => Promise<void>;
682
686
  readonly config: (values: Record<string, string>) => Promise<void>;
683
687
  readonly createTag: (name: string) => Promise<void>;
688
+ readonly createWorktree: (path: string, ref: string) => Promise<void>;
684
689
  readonly deleteBranch: (name: string) => Promise<void>;
685
690
  readonly deleteTag: (name: string) => Promise<void>;
691
+ readonly deleteWorktree: (path: string) => Promise<void>;
686
692
  readonly fetch: (remote: string) => Promise<void>;
687
693
  readonly fetchAll: () => Promise<void>;
688
694
  readonly fetchPrune: () => Promise<void>;
@@ -700,8 +706,11 @@ interface Git {
700
706
  readonly setUpstream: (remoteUrl: string) => Promise<void>;
701
707
  readonly shouldHaveCommit: (message: string) => Promise<void>;
702
708
  readonly shouldHaveInvocations: (invocations: readonly GitInvocation[]) => Promise<void>;
709
+ readonly stage: (pathSpec: string) => Promise<void>;
703
710
  readonly stash: (message?: string) => Promise<void>;
704
711
  readonly status: () => Promise<unknown>;
712
+ readonly undoLastCommit: () => Promise<void>;
713
+ readonly unstage: (pathSpec: string) => Promise<void>;
705
714
  readonly unstash: () => Promise<void>;
706
715
  }
707
716
 
@@ -3976,9 +3976,21 @@ 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
+ };
3982
+ const stage = async pathSpec => {
3983
+ await executeExtensionCommand('git.stage', pathSpec);
3984
+ };
3985
+ const unstage = async pathSpec => {
3986
+ await executeExtensionCommand('git.unstage', pathSpec);
3987
+ };
3979
3988
  const commit = async message => {
3980
3989
  await executeExtensionCommand('git.commit', message);
3981
3990
  };
3991
+ const commitStaged = async message => {
3992
+ await executeExtensionCommand('git.commitStaged', message);
3993
+ };
3982
3994
  const push$1 = async (remoteOrOptions, branch) => {
3983
3995
  if (typeof remoteOrOptions === 'string') {
3984
3996
  await executeExtensionCommand('git.push', {
@@ -4010,6 +4022,9 @@ const stash = async message => {
4010
4022
  const unstash = async () => {
4011
4023
  await executeExtensionCommand('git.unstash');
4012
4024
  };
4025
+ const applyStash = async () => {
4026
+ await executeExtensionCommand('git.applystash');
4027
+ };
4013
4028
  const checkout = async ref => {
4014
4029
  await executeExtensionCommand('git.checkout', ref);
4015
4030
  };
@@ -4037,6 +4052,18 @@ const createTag = async name => {
4037
4052
  const deleteTag = async name => {
4038
4053
  await executeExtensionCommand('git.deleteTag', name);
4039
4054
  };
4055
+ const undoLastCommit = async () => {
4056
+ await executeExtensionCommand('git.undoLastCommit');
4057
+ };
4058
+ const cleanAll = async () => {
4059
+ await executeExtensionCommand('git.cleanAll');
4060
+ };
4061
+ const createWorktree = async (path, ref) => {
4062
+ await executeExtensionCommand('git.createWorktree', path, ref);
4063
+ };
4064
+ const deleteWorktree = async path => {
4065
+ await executeExtensionCommand('git.deleteWorktree', path);
4066
+ };
4040
4067
  const status = async () => {
4041
4068
  return executeExtensionCommand('git.status');
4042
4069
  };
@@ -4062,9 +4089,7 @@ const setConfig = async (key, value) => {
4062
4089
  await executeExtensionCommand('git.setConfig', key, value);
4063
4090
  };
4064
4091
  const config = async values => {
4065
- for (const [key, value] of Object.entries(values)) {
4066
- await setConfig(key, value);
4067
- }
4092
+ await Promise.all(Object.entries(values).map(([key, value]) => setConfig(key, value)));
4068
4093
  };
4069
4094
  const shouldHaveCommit = async message => {
4070
4095
  const commits = await executeExtensionCommand('git.getCommits');
@@ -4087,16 +4112,22 @@ const shouldHaveInvocations = async invocations => {
4087
4112
 
4088
4113
  const Git = {
4089
4114
  add,
4115
+ addAll,
4090
4116
  addRemote,
4117
+ applyStash,
4091
4118
  branch,
4092
4119
  checkout,
4093
4120
  cherryPick,
4121
+ cleanAll,
4094
4122
  clone,
4095
4123
  commit,
4124
+ commitStaged,
4096
4125
  config,
4097
4126
  createTag,
4127
+ createWorktree,
4098
4128
  deleteBranch,
4099
4129
  deleteTag,
4130
+ deleteWorktree,
4100
4131
  fetch: fetch$1,
4101
4132
  fetchAll,
4102
4133
  fetchPrune,
@@ -4114,8 +4145,11 @@ const Git = {
4114
4145
  setUpstream,
4115
4146
  shouldHaveCommit,
4116
4147
  shouldHaveInvocations,
4148
+ stage,
4117
4149
  stash,
4118
4150
  status,
4151
+ undoLastCommit,
4152
+ unstage,
4119
4153
  unstash
4120
4154
  };
4121
4155
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-worker",
3
- "version": "15.8.0",
3
+ "version": "15.10.0",
4
4
  "description": "Test Worker",
5
5
  "repository": {
6
6
  "type": "git",