vh-dev-helper 1.0.0 → 1.0.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.
Files changed (177) hide show
  1. package/dist/app.d.ts +8 -0
  2. package/dist/app.js +22 -0
  3. package/dist/app.js.map +1 -0
  4. package/dist/bin/index.js +6 -2
  5. package/dist/bin/index.js.map +1 -0
  6. package/dist/features/git/git.controller.d.ts +24 -0
  7. package/dist/features/git/git.controller.js +154 -0
  8. package/dist/features/git/git.controller.js.map +1 -0
  9. package/dist/features/git/git.route.d.ts +20 -0
  10. package/dist/features/git/git.route.js +132 -0
  11. package/dist/features/git/git.route.js.map +1 -0
  12. package/dist/features/git/git.service.d.ts +14 -0
  13. package/dist/features/git/git.service.js +342 -0
  14. package/dist/features/git/git.service.js.map +1 -0
  15. package/dist/shared/config/config.d.ts +1 -0
  16. package/dist/shared/config/config.js +3 -0
  17. package/dist/shared/config/config.js.map +1 -0
  18. package/dist/shared/config/config.types.d.ts +1 -0
  19. package/dist/shared/config/config.types.js +3 -0
  20. package/dist/shared/config/config.types.js.map +1 -0
  21. package/dist/shared/config/defaults.d.ts +1 -0
  22. package/dist/shared/config/defaults.js +3 -0
  23. package/dist/shared/config/defaults.js.map +1 -0
  24. package/dist/shared/constants/env.constants.d.ts +1 -0
  25. package/dist/shared/constants/env.constants.js +3 -0
  26. package/dist/shared/constants/env.constants.js.map +1 -0
  27. package/dist/shared/errors/base.error.d.ts +1 -0
  28. package/dist/shared/errors/base.error.js +3 -0
  29. package/dist/shared/errors/base.error.js.map +1 -0
  30. package/dist/shared/errors/cli.error.d.ts +1 -0
  31. package/dist/shared/errors/cli.error.js +3 -0
  32. package/dist/shared/errors/cli.error.js.map +1 -0
  33. package/dist/shared/errors/runtine.error.d.ts +1 -0
  34. package/dist/shared/errors/runtine.error.js +3 -0
  35. package/dist/shared/errors/runtine.error.js.map +1 -0
  36. package/dist/shared/events/event-bus.d.ts +1 -0
  37. package/dist/shared/events/event-bus.js +3 -0
  38. package/dist/shared/events/event-bus.js.map +1 -0
  39. package/dist/shared/events/events.types.d.ts +1 -0
  40. package/dist/shared/events/events.types.js +3 -0
  41. package/dist/shared/events/events.types.js.map +1 -0
  42. package/dist/shared/helpers/gitParsers/parser.controller.d.ts +26 -0
  43. package/dist/shared/helpers/gitParsers/parser.controller.js +169 -0
  44. package/dist/shared/helpers/gitParsers/parser.controller.js.map +1 -0
  45. package/dist/shared/helpers/gitParsers/parser.services.d.ts +29 -0
  46. package/dist/shared/helpers/gitParsers/parser.services.js +368 -0
  47. package/dist/shared/helpers/gitParsers/parser.services.js.map +1 -0
  48. package/dist/shared/helpers/gitParsers/parser.types.d.ts +83 -0
  49. package/dist/shared/helpers/gitParsers/parser.types.js +22 -0
  50. package/dist/shared/helpers/gitParsers/parser.types.js.map +1 -0
  51. package/dist/shared/helpers/logger/logger.d.ts +1 -0
  52. package/dist/shared/helpers/logger/logger.js +3 -0
  53. package/dist/shared/helpers/logger/logger.js.map +1 -0
  54. package/dist/shared/helpers/logger/logger.types.d.ts +1 -0
  55. package/dist/shared/helpers/logger/logger.types.js +3 -0
  56. package/dist/shared/helpers/logger/logger.types.js.map +1 -0
  57. package/dist/shared/helpers/output/index.d.ts +19 -0
  58. package/dist/shared/helpers/output/index.js +78 -0
  59. package/dist/shared/helpers/output/index.js.map +1 -0
  60. package/dist/shared/helpers/prompt/prompt.d.ts +11 -0
  61. package/dist/shared/helpers/prompt/prompt.js +81 -0
  62. package/dist/shared/helpers/prompt/prompt.js.map +1 -0
  63. package/dist/shared/helpers/prompt/prompt.types.d.ts +40 -0
  64. package/dist/shared/helpers/prompt/prompt.types.js +3 -0
  65. package/dist/shared/helpers/prompt/prompt.types.js.map +1 -0
  66. package/dist/shared/helpers/shell/exec.d.ts +15 -0
  67. package/dist/shared/helpers/shell/exec.js +30 -0
  68. package/dist/shared/helpers/shell/exec.js.map +1 -0
  69. package/dist/shared/helpers/shell/spawn.d.ts +1 -0
  70. package/dist/shared/helpers/shell/spawn.js +3 -0
  71. package/dist/shared/helpers/shell/spawn.js.map +1 -0
  72. package/dist/shared/types/common.types.d.ts +1 -0
  73. package/dist/shared/types/common.types.js +3 -0
  74. package/dist/shared/types/common.types.js.map +1 -0
  75. package/dist/shared/ui/stepProgress/index.d.ts +19 -0
  76. package/dist/shared/ui/stepProgress/index.js +100 -0
  77. package/dist/shared/ui/stepProgress/index.js.map +1 -0
  78. package/dist/shared/ui/writer/index.d.ts +6 -0
  79. package/dist/shared/ui/writer/index.js +36 -0
  80. package/dist/shared/ui/writer/index.js.map +1 -0
  81. package/package.json +34 -23
  82. package/dist/src/commands/dashbaord/index.d.ts +0 -2
  83. package/dist/src/commands/dashbaord/index.js +0 -38
  84. package/dist/src/commands/dashbaord/project.command.d.ts +0 -2
  85. package/dist/src/commands/dashbaord/project.command.js +0 -17
  86. package/dist/src/commands/git/bg.command.d.ts +0 -2
  87. package/dist/src/commands/git/bg.command.js +0 -17
  88. package/dist/src/commands/git/cleanup.command.d.ts +0 -2
  89. package/dist/src/commands/git/cleanup.command.js +0 -12
  90. package/dist/src/commands/git/cp.command.d.ts +0 -2
  91. package/dist/src/commands/git/cp.command.js +0 -68
  92. package/dist/src/commands/git/del.command.d.ts +0 -2
  93. package/dist/src/commands/git/del.command.js +0 -19
  94. package/dist/src/commands/git/fetch.command.d.ts +0 -2
  95. package/dist/src/commands/git/fetch.command.js +0 -12
  96. package/dist/src/commands/git/final.command.d.ts +0 -2
  97. package/dist/src/commands/git/final.command.js +0 -23
  98. package/dist/src/commands/git/ga.command.d.ts +0 -2
  99. package/dist/src/commands/git/ga.command.js +0 -22
  100. package/dist/src/commands/git/gcm.command.d.ts +0 -2
  101. package/dist/src/commands/git/gcm.command.js +0 -23
  102. package/dist/src/commands/git/gco.command.d.ts +0 -2
  103. package/dist/src/commands/git/gco.command.js +0 -27
  104. package/dist/src/commands/git/gcob.command.d.ts +0 -2
  105. package/dist/src/commands/git/gcob.command.js +0 -23
  106. package/dist/src/commands/git/gph.command.d.ts +0 -2
  107. package/dist/src/commands/git/gph.command.js +0 -29
  108. package/dist/src/commands/git/gpho.command.d.ts +0 -2
  109. package/dist/src/commands/git/gpho.command.js +0 -20
  110. package/dist/src/commands/git/gpl.command.d.ts +0 -2
  111. package/dist/src/commands/git/gpl.command.js +0 -33
  112. package/dist/src/commands/git/gplo.command.d.ts +0 -2
  113. package/dist/src/commands/git/gplo.command.js +0 -20
  114. package/dist/src/commands/git/gpu.command.d.ts +0 -2
  115. package/dist/src/commands/git/gpu.command.js +0 -23
  116. package/dist/src/commands/git/gr.command.d.ts +0 -2
  117. package/dist/src/commands/git/gr.command.js +0 -20
  118. package/dist/src/commands/git/graph.command.d.ts +0 -2
  119. package/dist/src/commands/git/graph.command.js +0 -12
  120. package/dist/src/commands/git/gs.command.d.ts +0 -2
  121. package/dist/src/commands/git/gs.command.js +0 -23
  122. package/dist/src/commands/git/index.d.ts +0 -2
  123. package/dist/src/commands/git/index.js +0 -52
  124. package/dist/src/commands/git/init.command.d.ts +0 -2
  125. package/dist/src/commands/git/init.command.js +0 -12
  126. package/dist/src/commands/git/merge.command.d.ts +0 -2
  127. package/dist/src/commands/git/merge.command.js +0 -13
  128. package/dist/src/commands/git/sync.command.d.ts +0 -2
  129. package/dist/src/commands/git/sync.command.js +0 -12
  130. package/dist/src/commands/git/undo.command.d.ts +0 -2
  131. package/dist/src/commands/git/undo.command.js +0 -21
  132. package/dist/src/commands/git/untrack.command.d.ts +0 -2
  133. package/dist/src/commands/git/untrack.command.js +0 -27
  134. package/dist/src/commands/index.d.ts +0 -1
  135. package/dist/src/commands/index.js +0 -15
  136. package/dist/src/commands/network/discover.command.d.ts +0 -2
  137. package/dist/src/commands/network/discover.command.js +0 -24
  138. package/dist/src/commands/network/index.d.ts +0 -2
  139. package/dist/src/commands/network/index.js +0 -47
  140. package/dist/src/commands/network/inspect.command.d.ts +0 -2
  141. package/dist/src/commands/network/inspect.command.js +0 -34
  142. package/dist/src/commands/network/ports.command.d.ts +0 -2
  143. package/dist/src/commands/network/ports.command.js +0 -27
  144. package/dist/src/commands/network/ssl.command.d.ts +0 -2
  145. package/dist/src/commands/network/ssl.command.js +0 -32
  146. package/dist/src/commands/network/trace.command.d.ts +0 -2
  147. package/dist/src/commands/network/trace.command.js +0 -30
  148. package/dist/src/core/helper/command.helper.d.ts +0 -1
  149. package/dist/src/core/helper/command.helper.js +0 -28
  150. package/dist/src/core/helper/git.helper.d.ts +0 -2
  151. package/dist/src/core/helper/git.helper.js +0 -58
  152. package/dist/src/core/helper/prompts.helper.d.ts +0 -5
  153. package/dist/src/core/helper/prompts.helper.js +0 -83
  154. package/dist/src/core/shell/exec.d.ts +0 -1
  155. package/dist/src/core/shell/exec.js +0 -38
  156. package/dist/src/dashboards/collectors/project/project.collector.d.ts +0 -9
  157. package/dist/src/dashboards/collectors/project/project.collector.js +0 -29
  158. package/dist/src/dashboards/project/backend/server/dashboard.bootstrap.d.ts +0 -6
  159. package/dist/src/dashboards/project/backend/server/dashboard.bootstrap.js +0 -45
  160. package/dist/src/dashboards/project/backend/server/dashboard.server.d.ts +0 -6
  161. package/dist/src/dashboards/project/backend/server/dashboard.server.js +0 -25
  162. package/dist/src/dashboards/project/backend/server/websocket.server.d.ts +0 -8
  163. package/dist/src/dashboards/project/backend/server/websocket.server.js +0 -28
  164. package/dist/src/dashboards/project/backend/services/git.service.d.ts +0 -9
  165. package/dist/src/dashboards/project/backend/services/git.service.js +0 -18
  166. package/dist/src/dashboards/project/backend/services/metrics.service.d.ts +0 -7
  167. package/dist/src/dashboards/project/backend/services/metrics.service.js +0 -54
  168. package/dist/src/dashboards/project/backend/services/project.service.d.ts +0 -10
  169. package/dist/src/dashboards/project/backend/services/project.service.js +0 -19
  170. package/dist/src/dashboards/project/backend/services/system.service.d.ts +0 -15
  171. package/dist/src/dashboards/project/backend/services/system.service.js +0 -42
  172. package/dist/src/dashboards/project/backend/wrapper/process.wrapper.d.ts +0 -13
  173. package/dist/src/dashboards/project/backend/wrapper/process.wrapper.js +0 -56
  174. package/dist/src/services/git/git.service.d.ts +0 -37
  175. package/dist/src/services/git/git.service.js +0 -303
  176. package/dist/src/services/network/network.service.d.ts +0 -23
  177. package/dist/src/services/network/network.service.js +0 -524
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.registerDashboardCommands = registerDashboardCommands;
4
- const dashboard_bootstrap_1 = require("../../dashboards/project/backend/server/dashboard.bootstrap");
5
- function registerDashboardCommands(program) {
6
- program
7
- .command("dashboard")
8
- .description("Dashboard utilities")
9
- .allowUnknownOption(true)
10
- .allowExcessArguments(true)
11
- .option("--project", "Start project dashboard")
12
- .argument("[command...]", "command to wrap")
13
- .addHelpText("after", `
14
- Examples:
15
-
16
- vh dashboard --project yarn dev
17
-
18
- vh dashboard --project npm run dev
19
-
20
- vh dashboard --project expo start
21
- `)
22
- .action(async (command, options, cmd) => {
23
- if (!options.project) {
24
- console.log("Use --project flag");
25
- return;
26
- }
27
- const args = cmd.args.filter((arg) => arg !== "--project");
28
- if (!args.length) {
29
- console.log("Provide command");
30
- return;
31
- }
32
- const [executable, ...commandArgs] = args;
33
- await (0, dashboard_bootstrap_1.dashboardBootstrap)({
34
- command: executable,
35
- args: commandArgs,
36
- });
37
- });
38
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function projectDashboardCommand(program: Command): void;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.projectDashboardCommand = projectDashboardCommand;
4
- const dashboard_bootstrap_1 = require("../../dashboards/project/backend/server/dashboard.bootstrap");
5
- function projectDashboardCommand(program) {
6
- program
7
- .command("project")
8
- .description("Project monitoring dashboard")
9
- .argument("<command>", "command to run")
10
- .argument("[args...]", "command arguments")
11
- .action(async (command, args) => {
12
- await (0, dashboard_bootstrap_1.dashboardBootstrap)({
13
- command,
14
- args,
15
- });
16
- });
17
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function bgCommand(program: Command): void;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.bgCommand = bgCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- function bgCommand(program) {
6
- program
7
- .command("bg")
8
- .description("List git branches")
9
- .addHelpText("after", `
10
- Examples:
11
-
12
- vh bg
13
- `)
14
- .action(async () => {
15
- await git_service_1.gitService.branches();
16
- });
17
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function cleanupCommand(program: Command): void;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.cleanupCommand = cleanupCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- function cleanupCommand(program) {
6
- program
7
- .command("cleanup")
8
- .description("Cleanup merged branches")
9
- .action(async () => {
10
- await git_service_1.gitService.cleanup();
11
- });
12
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function cpCommand(program: Command): void;
@@ -1,68 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.cpCommand = cpCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- const prompts_helper_1 = require("../../core/helper/prompts.helper");
6
- const command_helper_1 = require("../../core/helper/command.helper");
7
- function cpCommand(program) {
8
- const cp = program
9
- .command("cp")
10
- .description("Smart cherry pick");
11
- /*
12
- * commit
13
- */
14
- cp.command("commit")
15
- .argument("<ref>")
16
- .action((ref) => (0, command_helper_1.safeCommand)(async () => {
17
- await git_service_1.gitService.cherryPickCommit(ref);
18
- }));
19
- /*
20
- * file
21
- */
22
- cp.command("file")
23
- .argument("<ref>")
24
- .argument("[file]")
25
- .action((ref, file) => (0, command_helper_1.safeCommand)(async () => {
26
- if (!file) {
27
- file = await (0, prompts_helper_1.pickFile)(ref);
28
- }
29
- await git_service_1.gitService.cherryPickFile(ref, file);
30
- }));
31
- /*
32
- * folder
33
- */
34
- cp.command("folder")
35
- .argument("<ref>")
36
- .argument("[folder]")
37
- .action((ref, folder) => (0, command_helper_1.safeCommand)(async () => {
38
- if (!folder) {
39
- folder = await (0, prompts_helper_1.pickFolder)(ref);
40
- }
41
- await git_service_1.gitService.cherryPickFolder(ref, folder);
42
- }));
43
- /*
44
- * line
45
- */
46
- cp.command("line")
47
- .argument("<ref>")
48
- .argument("[file]")
49
- .argument("[range]")
50
- .action((ref, file, range) => (0, command_helper_1.safeCommand)(async () => {
51
- if (!file) {
52
- file = await (0, prompts_helper_1.pickFile)(ref);
53
- }
54
- await git_service_1.gitService.cherryPickLines(ref, file, range);
55
- }));
56
- /*
57
- * interactive
58
- */
59
- cp.command("interactive")
60
- .argument("<ref>")
61
- .argument("[file]")
62
- .action((ref, file) => (0, command_helper_1.safeCommand)(async () => {
63
- if (!file) {
64
- file = await (0, prompts_helper_1.pickFile)(ref);
65
- }
66
- await git_service_1.gitService.cherryPickInteractive(ref, file);
67
- }));
68
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function delCommand(program: Command): void;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.delCommand = delCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- const git_helper_1 = require("../../core/helper/git.helper");
6
- const command_helper_1 = require("../../core/helper/command.helper");
7
- function delCommand(program) {
8
- program
9
- .command("del")
10
- .argument("[branch]")
11
- .option("-r, --remote", "Delete remote also")
12
- .description("Delete branch")
13
- .action((branch, options) => (0, command_helper_1.safeCommand)(async () => {
14
- if (!branch) {
15
- branch = await (0, git_helper_1.pickBranch)();
16
- }
17
- await git_service_1.gitService.deleteBranch(branch, options.remote);
18
- }));
19
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function fetchCommand(program: Command): void;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchCommand = fetchCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- function fetchCommand(program) {
6
- program
7
- .command("fetch")
8
- .description("Fetch remotes")
9
- .action(async () => {
10
- await git_service_1.gitService.fetch();
11
- });
12
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function finalCommand(program: Command): void;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.finalCommand = finalCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- const command_helper_1 = require("../../core/helper/command.helper");
6
- function finalCommand(program) {
7
- program
8
- .command("final")
9
- .argument("[message]", "Commit message")
10
- .description("Add + Commit + Push workflow")
11
- .addHelpText("after", `
12
- Examples:
13
-
14
- vh git final
15
-
16
- vh git final "fix login"
17
-
18
- vh git final "dashboard updates"
19
- `)
20
- .action((message) => (0, command_helper_1.safeCommand)(async () => {
21
- await git_service_1.gitService.final(message);
22
- }));
23
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function gaCommand(program: Command): void;
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.gaCommand = gaCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- function gaCommand(program) {
6
- program
7
- .command("ga")
8
- .description("Stage all modified files")
9
- .addHelpText("after", `
10
- Examples:
11
-
12
- vh ga
13
-
14
- Workflow:
15
-
16
- 1. Run git add .
17
- 2. Stage all changes
18
- `)
19
- .action(async () => {
20
- await git_service_1.gitService.addAll();
21
- });
22
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function gcmCommand(program: Command): void;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.gcmCommand = gcmCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- function gcmCommand(program) {
6
- program
7
- .command("gcm")
8
- .argument("<message>", "Commit message")
9
- .description("Create git commit")
10
- .addHelpText("after", `
11
- Examples:
12
-
13
- vh gcm "fix login issue"
14
-
15
- Workflow:
16
-
17
- 1. Create commit
18
- 2. Use provided message
19
- `)
20
- .action(async (message) => {
21
- await git_service_1.gitService.commit(message);
22
- });
23
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function gcoCommand(program: Command): void;
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.gcoCommand = gcoCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- const git_helper_1 = require("../../core/helper/git.helper");
6
- const command_helper_1 = require("../../core/helper/command.helper");
7
- function gcoCommand(program) {
8
- program
9
- .command("gco")
10
- .argument("[branch]", "Branch name")
11
- .description("Checkout existing branch")
12
- .addHelpText("after", `
13
- Examples:
14
-
15
- vh git gco main
16
-
17
- vh git gco develop
18
-
19
- vh git gco
20
- `)
21
- .action((branch) => (0, command_helper_1.safeCommand)(async () => {
22
- if (!branch) {
23
- branch = await (0, git_helper_1.pickBranch)();
24
- }
25
- await git_service_1.gitService.checkout(branch);
26
- }));
27
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function gcobCommand(program: Command): void;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.gcobCommand = gcobCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- function gcobCommand(program) {
6
- program
7
- .command("gcob")
8
- .argument("<branch>", "New branch name")
9
- .description("Create and switch branch")
10
- .addHelpText("after", `
11
- Examples:
12
-
13
- vh gcob feature/auth
14
-
15
- Workflow:
16
-
17
- 1. Create branch
18
- 2. Checkout branch
19
- `)
20
- .action(async (branch) => {
21
- await git_service_1.gitService.checkoutBranch(branch);
22
- });
23
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function gphCommand(program: Command): void;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.gphCommand = gphCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- function gphCommand(program) {
6
- program
7
- .command("gph")
8
- .description("Pull latest changes and push current branch to remote")
9
- .argument("[branch]", "Branch to pull before pushing (default: current branch)")
10
- .addHelpText("after", `
11
- Examples:
12
-
13
- vh gph
14
- Pull current branch then push it
15
-
16
- vh gph main
17
- Pull from main then push current branch
18
-
19
- Workflow:
20
-
21
- 1. Detect current branch
22
- 2. Pull latest changes
23
- 3. Create upstream if missing
24
- 4. Push branch to remote
25
- `)
26
- .action(async (branch) => {
27
- await git_service_1.gitService.pushWithPull(branch);
28
- });
29
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function gphoCommand(program: Command): void;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.gphoCommand = gphoCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- function gphoCommand(program) {
6
- program
7
- .command("gpho")
8
- .argument("[branch]", "Branch name")
9
- .description("Push directly to origin")
10
- .addHelpText("after", `
11
- Examples:
12
-
13
- vh gpho
14
-
15
- vh gpho main
16
- `)
17
- .action(async (branch) => {
18
- await git_service_1.gitService.pushOrigin(branch);
19
- });
20
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function gplCommand(program: Command): void;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.gplCommand = gplCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- function gplCommand(program) {
6
- program
7
- .command("gpl")
8
- .description("Pull latest changes from remote branch")
9
- .argument("[branch]", "Branch to pull from (default: current branch)")
10
- .addHelpText("after", `
11
- Examples:
12
-
13
- vh gpl
14
- Pull current branch
15
-
16
- vh gpl main
17
- Pull latest changes from main
18
-
19
- vh gpl develop
20
- Pull latest changes from develop
21
-
22
- Workflow:
23
-
24
- 1. Detect target branch
25
- 2. Fetch latest remote changes
26
- 3. Check commit difference
27
- 4. Create upstream if missing
28
- 5. Pull latest commits
29
- `)
30
- .action(async (branch) => {
31
- await git_service_1.gitService.pull(branch);
32
- });
33
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function gploCommand(program: Command): void;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.gploCommand = gploCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- function gploCommand(program) {
6
- program
7
- .command("gplo")
8
- .argument("[branch]", "Branch name")
9
- .description("Pull directly from origin")
10
- .addHelpText("after", `
11
- Examples:
12
-
13
- vh gplo
14
-
15
- vh gplo main
16
- `)
17
- .action(async (branch) => {
18
- await git_service_1.gitService.pullOrigin(branch);
19
- });
20
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function gpuCommand(program: Command): void;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.gpuCommand = gpuCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- function gpuCommand(program) {
6
- program
7
- .command("gpu")
8
- .description("Push current branch and create upstream if needed")
9
- .addHelpText("after", `
10
- Examples:
11
-
12
- vh gpu
13
-
14
- Workflow:
15
-
16
- 1. Detect current branch
17
- 2. Create upstream
18
- 3. Push branch
19
- `)
20
- .action(async () => {
21
- await git_service_1.gitService.pushUpstream();
22
- });
23
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function grCommand(program: Command): void;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.grCommand = grCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- function grCommand(program) {
6
- program
7
- .command("gr")
8
- .argument("[file]", "File path")
9
- .description("Restore file changes")
10
- .addHelpText("after", `
11
- Examples:
12
-
13
- vh gr
14
-
15
- vh gr src/index.ts
16
- `)
17
- .action(async (file) => {
18
- await git_service_1.gitService.restore(file);
19
- });
20
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function graphCommand(program: Command): void;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.graphCommand = graphCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- function graphCommand(program) {
6
- program
7
- .command("graph")
8
- .description("Show git graph")
9
- .action(async () => {
10
- await git_service_1.gitService.graph();
11
- });
12
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function gsCommand(program: Command): void;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.gsCommand = gsCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- function gsCommand(program) {
6
- program
7
- .command("gs")
8
- .description("Show repository status")
9
- .addHelpText("after", `
10
- Examples:
11
-
12
- vh gs
13
-
14
- Shows:
15
-
16
- modified files
17
- staged files
18
- branch status
19
- `)
20
- .action(async () => {
21
- await git_service_1.gitService.status();
22
- });
23
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function registerGitCommands(program: Command): void;
@@ -1,52 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.registerGitCommands = registerGitCommands;
4
- const gpl_command_1 = require("./gpl.command");
5
- const gph_command_1 = require("./gph.command");
6
- const ga_command_1 = require("./ga.command");
7
- const gcm_command_1 = require("./gcm.command");
8
- const gs_command_1 = require("./gs.command");
9
- const gco_command_1 = require("./gco.command");
10
- const gcob_command_1 = require("./gcob.command");
11
- const bg_command_1 = require("./bg.command");
12
- const gr_command_1 = require("./gr.command");
13
- const gpu_command_1 = require("./gpu.command");
14
- const gpho_command_1 = require("./gpho.command");
15
- const gplo_command_1 = require("./gplo.command");
16
- const init_command_1 = require("./init.command");
17
- const fetch_command_1 = require("./fetch.command");
18
- const merge_command_1 = require("./merge.command");
19
- const sync_command_1 = require("./sync.command");
20
- const cleanup_command_1 = require("./cleanup.command");
21
- const graph_command_1 = require("./graph.command");
22
- const undo_command_1 = require("./undo.command");
23
- const cp_command_1 = require("./cp.command");
24
- const del_command_1 = require("./del.command");
25
- const final_command_1 = require("./final.command");
26
- const untrack_command_1 = require("./untrack.command");
27
- function registerGitCommands(program) {
28
- const git = program.command("git").description("Git utilities");
29
- (0, gpl_command_1.gplCommand)(git);
30
- (0, gph_command_1.gphCommand)(git);
31
- (0, ga_command_1.gaCommand)(git);
32
- (0, gcm_command_1.gcmCommand)(git);
33
- (0, gs_command_1.gsCommand)(git);
34
- (0, gco_command_1.gcoCommand)(git);
35
- (0, gcob_command_1.gcobCommand)(git);
36
- (0, bg_command_1.bgCommand)(git);
37
- (0, gr_command_1.grCommand)(git);
38
- (0, gpu_command_1.gpuCommand)(git);
39
- (0, gpho_command_1.gphoCommand)(git);
40
- (0, gplo_command_1.gploCommand)(git);
41
- (0, init_command_1.initCommand)(git);
42
- (0, fetch_command_1.fetchCommand)(git);
43
- (0, merge_command_1.mergeCommand)(git);
44
- (0, sync_command_1.syncCommand)(git);
45
- (0, cleanup_command_1.cleanupCommand)(git);
46
- (0, graph_command_1.graphCommand)(git);
47
- (0, undo_command_1.undoCommand)(git);
48
- (0, cp_command_1.cpCommand)(git);
49
- (0, del_command_1.delCommand)(git);
50
- (0, final_command_1.finalCommand)(git);
51
- (0, untrack_command_1.untrackCommand)(git);
52
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function initCommand(program: Command): void;