@lvce-editor/test-worker 15.6.0 → 15.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/dist/api.d.ts +4 -0
- package/dist/testWorkerMain.js +47 -27
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -691,9 +691,13 @@ interface Git {
|
|
|
691
691
|
readonly pull: (remote: string, branch: string) => Promise<void>;
|
|
692
692
|
readonly push: (remoteOrOptions?: string | GitPushOptions, branch?: string) => Promise<void>;
|
|
693
693
|
readonly rebase: (ref: string) => Promise<void>;
|
|
694
|
+
readonly removeOrigin: () => Promise<void>;
|
|
694
695
|
readonly removeRemote: (name: string) => Promise<void>;
|
|
696
|
+
readonly removeUpstream: () => Promise<void>;
|
|
695
697
|
readonly renameBranch: (newName: string) => Promise<void>;
|
|
696
698
|
readonly setConfig: (key: string, value: string) => Promise<void>;
|
|
699
|
+
readonly setOrigin: (remoteUrl: string) => Promise<void>;
|
|
700
|
+
readonly setUpstream: (remoteUrl: string) => Promise<void>;
|
|
697
701
|
readonly shouldHaveCommit: (message: string) => Promise<void>;
|
|
698
702
|
readonly shouldHaveInvocations: (invocations: readonly GitInvocation[]) => Promise<void>;
|
|
699
703
|
readonly stash: (message?: string) => Promise<void>;
|
package/dist/testWorkerMain.js
CHANGED
|
@@ -3963,87 +3963,103 @@ 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
|
|
3971
|
+
await executeExtensionCommand('git.init', options);
|
|
3968
3972
|
};
|
|
3969
3973
|
const clone = async (repositoryUrl, cwd) => {
|
|
3970
|
-
await
|
|
3974
|
+
await executeExtensionCommand('git.clone', repositoryUrl, cwd);
|
|
3971
3975
|
};
|
|
3972
3976
|
const add = async pathSpec => {
|
|
3973
|
-
await
|
|
3977
|
+
await executeExtensionCommand('git.add', pathSpec);
|
|
3974
3978
|
};
|
|
3975
3979
|
const commit = async message => {
|
|
3976
|
-
await
|
|
3980
|
+
await executeExtensionCommand('git.commit', message);
|
|
3977
3981
|
};
|
|
3978
3982
|
const push$1 = async (remoteOrOptions, branch) => {
|
|
3979
3983
|
if (typeof remoteOrOptions === 'string') {
|
|
3980
|
-
await
|
|
3984
|
+
await executeExtensionCommand('git.push', {
|
|
3981
3985
|
setUpstream: [remoteOrOptions, branch || '']
|
|
3982
3986
|
});
|
|
3983
3987
|
return;
|
|
3984
3988
|
}
|
|
3985
|
-
await
|
|
3989
|
+
await executeExtensionCommand('git.push', remoteOrOptions || {});
|
|
3986
3990
|
};
|
|
3987
3991
|
const pull = async (remote, branch) => {
|
|
3988
|
-
await
|
|
3992
|
+
await executeExtensionCommand('git.pull', remote, branch);
|
|
3989
3993
|
};
|
|
3990
3994
|
const fetch$1 = async remote => {
|
|
3991
|
-
await
|
|
3995
|
+
await executeExtensionCommand('git.fetch', remote);
|
|
3992
3996
|
};
|
|
3993
3997
|
const fetchAll = async () => {
|
|
3994
|
-
await
|
|
3998
|
+
await executeExtensionCommand('git.fetchAll');
|
|
3995
3999
|
};
|
|
3996
4000
|
const fetchPrune = async () => {
|
|
3997
|
-
await
|
|
4001
|
+
await executeExtensionCommand('git.fetchPrune');
|
|
3998
4002
|
};
|
|
3999
4003
|
const stash = async message => {
|
|
4000
4004
|
if (message === undefined) {
|
|
4001
|
-
await
|
|
4005
|
+
await executeExtensionCommand('git.stash');
|
|
4002
4006
|
return;
|
|
4003
4007
|
}
|
|
4004
|
-
await
|
|
4008
|
+
await executeExtensionCommand('git.stash', message);
|
|
4005
4009
|
};
|
|
4006
4010
|
const unstash = async () => {
|
|
4007
|
-
await
|
|
4011
|
+
await executeExtensionCommand('git.unstash');
|
|
4008
4012
|
};
|
|
4009
4013
|
const checkout = async ref => {
|
|
4010
|
-
await
|
|
4014
|
+
await executeExtensionCommand('git.checkout', ref);
|
|
4011
4015
|
};
|
|
4012
4016
|
const branch = async name => {
|
|
4013
|
-
await
|
|
4017
|
+
await executeExtensionCommand('git.branch', name);
|
|
4014
4018
|
};
|
|
4015
4019
|
const deleteBranch = async name => {
|
|
4016
|
-
await
|
|
4020
|
+
await executeExtensionCommand('git.deleteBranch', name);
|
|
4017
4021
|
};
|
|
4018
4022
|
const renameBranch = async newName => {
|
|
4019
|
-
await
|
|
4023
|
+
await executeExtensionCommand('git.renameBranch', newName);
|
|
4020
4024
|
};
|
|
4021
4025
|
const cherryPick = async commitHash => {
|
|
4022
|
-
await
|
|
4026
|
+
await executeExtensionCommand('git.cherryPick', commitHash);
|
|
4023
4027
|
};
|
|
4024
4028
|
const merge = async ref => {
|
|
4025
|
-
await
|
|
4029
|
+
await executeExtensionCommand('git.merge', ref);
|
|
4026
4030
|
};
|
|
4027
4031
|
const rebase = async ref => {
|
|
4028
|
-
await
|
|
4032
|
+
await executeExtensionCommand('git.rebase', ref);
|
|
4029
4033
|
};
|
|
4030
4034
|
const createTag = async name => {
|
|
4031
|
-
await
|
|
4035
|
+
await executeExtensionCommand('git.createTag', name);
|
|
4032
4036
|
};
|
|
4033
4037
|
const deleteTag = async name => {
|
|
4034
|
-
await
|
|
4038
|
+
await executeExtensionCommand('git.deleteTag', name);
|
|
4035
4039
|
};
|
|
4036
4040
|
const status = async () => {
|
|
4037
|
-
return
|
|
4041
|
+
return executeExtensionCommand('git.status');
|
|
4038
4042
|
};
|
|
4039
4043
|
const addRemote = async (name, remoteUrl) => {
|
|
4040
|
-
await
|
|
4044
|
+
await executeExtensionCommand('git.addRemote', name, remoteUrl);
|
|
4045
|
+
};
|
|
4046
|
+
const setOrigin = async remoteUrl => {
|
|
4047
|
+
await addRemote('origin', remoteUrl);
|
|
4048
|
+
};
|
|
4049
|
+
const setUpstream = async remoteUrl => {
|
|
4050
|
+
await addRemote('upstream', remoteUrl);
|
|
4041
4051
|
};
|
|
4042
4052
|
const removeRemote = async name => {
|
|
4043
|
-
await
|
|
4053
|
+
await executeExtensionCommand('git.removeRemote', name);
|
|
4054
|
+
};
|
|
4055
|
+
const removeOrigin = async () => {
|
|
4056
|
+
await removeRemote('origin');
|
|
4057
|
+
};
|
|
4058
|
+
const removeUpstream = async () => {
|
|
4059
|
+
await removeRemote('upstream');
|
|
4044
4060
|
};
|
|
4045
4061
|
const setConfig = async (key, value) => {
|
|
4046
|
-
await
|
|
4062
|
+
await executeExtensionCommand('git.setConfig', key, value);
|
|
4047
4063
|
};
|
|
4048
4064
|
const config = async values => {
|
|
4049
4065
|
for (const [key, value] of Object.entries(values)) {
|
|
@@ -4051,7 +4067,7 @@ const config = async values => {
|
|
|
4051
4067
|
}
|
|
4052
4068
|
};
|
|
4053
4069
|
const shouldHaveCommit = async message => {
|
|
4054
|
-
const commits = await
|
|
4070
|
+
const commits = await executeExtensionCommand('git.getCommits');
|
|
4055
4071
|
if (!Array.isArray(commits)) {
|
|
4056
4072
|
throw new TypeError(`Expected commits to be an array, but got ${commits}`);
|
|
4057
4073
|
}
|
|
@@ -4089,9 +4105,13 @@ const Git = {
|
|
|
4089
4105
|
pull,
|
|
4090
4106
|
push: push$1,
|
|
4091
4107
|
rebase,
|
|
4108
|
+
removeOrigin,
|
|
4092
4109
|
removeRemote,
|
|
4110
|
+
removeUpstream,
|
|
4093
4111
|
renameBranch,
|
|
4094
4112
|
setConfig,
|
|
4113
|
+
setOrigin,
|
|
4114
|
+
setUpstream,
|
|
4095
4115
|
shouldHaveCommit,
|
|
4096
4116
|
shouldHaveInvocations,
|
|
4097
4117
|
stash,
|