avil13-co 2.2.0 → 2.2.1
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/index.js +5 -0
- package/package.json +1 -1
- package/src/index.ts +6 -0
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ const ask_1 = require("./ask");
|
|
|
4
4
|
const cli_commands_1 = require("./cli-commands");
|
|
5
5
|
const commands_1 = require("./commands");
|
|
6
6
|
const delete_barnch_1 = require("./commands/delete-barnch");
|
|
7
|
+
const merge_branch_1 = require("./commands/merge-branch");
|
|
7
8
|
const run = async () => {
|
|
8
9
|
const userWish = (0, cli_commands_1.getWishOfUser)();
|
|
9
10
|
if (cli_commands_1.Commands.Help === userWish) {
|
|
@@ -23,6 +24,10 @@ const run = async () => {
|
|
|
23
24
|
(0, delete_barnch_1.deleteBranch)(branch);
|
|
24
25
|
return;
|
|
25
26
|
}
|
|
27
|
+
if (cli_commands_1.Commands.MergeBranch === userWish) {
|
|
28
|
+
(0, merge_branch_1.mergeBranch)(branch);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
26
31
|
await (0, commands_1.checkoutBranch)(branch);
|
|
27
32
|
await (0, commands_1.getCurrentBranchName)();
|
|
28
33
|
};
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { ask } from './ask';
|
|
|
2
2
|
import { Commands, getHelp, getWishOfUser } from './cli-commands';
|
|
3
3
|
import { BranchesType, checkoutBranch, getBranches, getCurrentBranchName } from './commands';
|
|
4
4
|
import { deleteBranch } from './commands/delete-barnch';
|
|
5
|
+
import { mergeBranch } from './commands/merge-branch';
|
|
5
6
|
|
|
6
7
|
const run = async () => {
|
|
7
8
|
const userWish = getWishOfUser();
|
|
@@ -28,6 +29,11 @@ const run = async () => {
|
|
|
28
29
|
return;
|
|
29
30
|
}
|
|
30
31
|
|
|
32
|
+
if (Commands.MergeBranch === userWish) {
|
|
33
|
+
mergeBranch(branch);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
|
|
31
37
|
await checkoutBranch(branch);
|
|
32
38
|
|
|
33
39
|
await getCurrentBranchName()
|