vh-dev-helper 1.0.0 → 1.0.2

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 (192) hide show
  1. package/dist/app.d.ts +8 -0
  2. package/dist/app.js +24 -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/features/logs/logs.route.d.ts +4 -0
  16. package/dist/features/logs/logs.route.js +50 -0
  17. package/dist/features/logs/logs.route.js.map +1 -0
  18. package/dist/features/logs/logs.service.d.ts +1 -0
  19. package/dist/features/logs/logs.service.js +3 -0
  20. package/dist/features/logs/logs.service.js.map +1 -0
  21. package/dist/features/logs/logs.socket.d.ts +16 -0
  22. package/dist/features/logs/logs.socket.js +133 -0
  23. package/dist/features/logs/logs.socket.js.map +1 -0
  24. package/dist/features/logs/logs.store.d.ts +1 -0
  25. package/dist/features/logs/logs.store.js +3 -0
  26. package/dist/features/logs/logs.store.js.map +1 -0
  27. package/dist/features/logs/logs.types.d.ts +1 -0
  28. package/dist/features/logs/logs.types.js +3 -0
  29. package/dist/features/logs/logs.types.js.map +1 -0
  30. package/dist/shared/config/config.d.ts +1 -0
  31. package/dist/shared/config/config.js +3 -0
  32. package/dist/shared/config/config.js.map +1 -0
  33. package/dist/shared/config/config.types.d.ts +1 -0
  34. package/dist/shared/config/config.types.js +3 -0
  35. package/dist/shared/config/config.types.js.map +1 -0
  36. package/dist/shared/config/defaults.d.ts +1 -0
  37. package/dist/shared/config/defaults.js +3 -0
  38. package/dist/shared/config/defaults.js.map +1 -0
  39. package/dist/shared/constants/env.constants.d.ts +1 -0
  40. package/dist/shared/constants/env.constants.js +3 -0
  41. package/dist/shared/constants/env.constants.js.map +1 -0
  42. package/dist/shared/errors/base.error.d.ts +1 -0
  43. package/dist/shared/errors/base.error.js +3 -0
  44. package/dist/shared/errors/base.error.js.map +1 -0
  45. package/dist/shared/errors/cli.error.d.ts +1 -0
  46. package/dist/shared/errors/cli.error.js +3 -0
  47. package/dist/shared/errors/cli.error.js.map +1 -0
  48. package/dist/shared/errors/runtine.error.d.ts +1 -0
  49. package/dist/shared/errors/runtine.error.js +3 -0
  50. package/dist/shared/errors/runtine.error.js.map +1 -0
  51. package/dist/shared/events/event-bus.d.ts +1 -0
  52. package/dist/shared/events/event-bus.js +3 -0
  53. package/dist/shared/events/event-bus.js.map +1 -0
  54. package/dist/shared/events/events.types.d.ts +1 -0
  55. package/dist/shared/events/events.types.js +3 -0
  56. package/dist/shared/events/events.types.js.map +1 -0
  57. package/dist/shared/helpers/gitParsers/parser.controller.d.ts +26 -0
  58. package/dist/shared/helpers/gitParsers/parser.controller.js +169 -0
  59. package/dist/shared/helpers/gitParsers/parser.controller.js.map +1 -0
  60. package/dist/shared/helpers/gitParsers/parser.services.d.ts +29 -0
  61. package/dist/shared/helpers/gitParsers/parser.services.js +368 -0
  62. package/dist/shared/helpers/gitParsers/parser.services.js.map +1 -0
  63. package/dist/shared/helpers/gitParsers/parser.types.d.ts +83 -0
  64. package/dist/shared/helpers/gitParsers/parser.types.js +22 -0
  65. package/dist/shared/helpers/gitParsers/parser.types.js.map +1 -0
  66. package/dist/shared/helpers/logger/logger.d.ts +1 -0
  67. package/dist/shared/helpers/logger/logger.js +3 -0
  68. package/dist/shared/helpers/logger/logger.js.map +1 -0
  69. package/dist/shared/helpers/logger/logger.types.d.ts +1 -0
  70. package/dist/shared/helpers/logger/logger.types.js +3 -0
  71. package/dist/shared/helpers/logger/logger.types.js.map +1 -0
  72. package/dist/shared/helpers/output/index.d.ts +19 -0
  73. package/dist/shared/helpers/output/index.js +78 -0
  74. package/dist/shared/helpers/output/index.js.map +1 -0
  75. package/dist/shared/helpers/prompt/prompt.d.ts +11 -0
  76. package/dist/shared/helpers/prompt/prompt.js +81 -0
  77. package/dist/shared/helpers/prompt/prompt.js.map +1 -0
  78. package/dist/shared/helpers/prompt/prompt.types.d.ts +40 -0
  79. package/dist/shared/helpers/prompt/prompt.types.js +3 -0
  80. package/dist/shared/helpers/prompt/prompt.types.js.map +1 -0
  81. package/dist/shared/helpers/shell/exec.d.ts +15 -0
  82. package/dist/shared/helpers/shell/exec.js +30 -0
  83. package/dist/shared/helpers/shell/exec.js.map +1 -0
  84. package/dist/shared/helpers/shell/spawn.d.ts +1 -0
  85. package/dist/shared/helpers/shell/spawn.js +3 -0
  86. package/dist/shared/helpers/shell/spawn.js.map +1 -0
  87. package/dist/shared/types/common.types.d.ts +1 -0
  88. package/dist/shared/types/common.types.js +3 -0
  89. package/dist/shared/types/common.types.js.map +1 -0
  90. package/dist/shared/ui/stepProgress/index.d.ts +19 -0
  91. package/dist/shared/ui/stepProgress/index.js +100 -0
  92. package/dist/shared/ui/stepProgress/index.js.map +1 -0
  93. package/dist/shared/ui/writer/index.d.ts +6 -0
  94. package/dist/shared/ui/writer/index.js +36 -0
  95. package/dist/shared/ui/writer/index.js.map +1 -0
  96. package/package.json +35 -23
  97. package/dist/src/commands/dashbaord/index.d.ts +0 -2
  98. package/dist/src/commands/dashbaord/index.js +0 -38
  99. package/dist/src/commands/dashbaord/project.command.d.ts +0 -2
  100. package/dist/src/commands/dashbaord/project.command.js +0 -17
  101. package/dist/src/commands/git/bg.command.d.ts +0 -2
  102. package/dist/src/commands/git/bg.command.js +0 -17
  103. package/dist/src/commands/git/cleanup.command.d.ts +0 -2
  104. package/dist/src/commands/git/cleanup.command.js +0 -12
  105. package/dist/src/commands/git/cp.command.d.ts +0 -2
  106. package/dist/src/commands/git/cp.command.js +0 -68
  107. package/dist/src/commands/git/del.command.d.ts +0 -2
  108. package/dist/src/commands/git/del.command.js +0 -19
  109. package/dist/src/commands/git/fetch.command.d.ts +0 -2
  110. package/dist/src/commands/git/fetch.command.js +0 -12
  111. package/dist/src/commands/git/final.command.d.ts +0 -2
  112. package/dist/src/commands/git/final.command.js +0 -23
  113. package/dist/src/commands/git/ga.command.d.ts +0 -2
  114. package/dist/src/commands/git/ga.command.js +0 -22
  115. package/dist/src/commands/git/gcm.command.d.ts +0 -2
  116. package/dist/src/commands/git/gcm.command.js +0 -23
  117. package/dist/src/commands/git/gco.command.d.ts +0 -2
  118. package/dist/src/commands/git/gco.command.js +0 -27
  119. package/dist/src/commands/git/gcob.command.d.ts +0 -2
  120. package/dist/src/commands/git/gcob.command.js +0 -23
  121. package/dist/src/commands/git/gph.command.d.ts +0 -2
  122. package/dist/src/commands/git/gph.command.js +0 -29
  123. package/dist/src/commands/git/gpho.command.d.ts +0 -2
  124. package/dist/src/commands/git/gpho.command.js +0 -20
  125. package/dist/src/commands/git/gpl.command.d.ts +0 -2
  126. package/dist/src/commands/git/gpl.command.js +0 -33
  127. package/dist/src/commands/git/gplo.command.d.ts +0 -2
  128. package/dist/src/commands/git/gplo.command.js +0 -20
  129. package/dist/src/commands/git/gpu.command.d.ts +0 -2
  130. package/dist/src/commands/git/gpu.command.js +0 -23
  131. package/dist/src/commands/git/gr.command.d.ts +0 -2
  132. package/dist/src/commands/git/gr.command.js +0 -20
  133. package/dist/src/commands/git/graph.command.d.ts +0 -2
  134. package/dist/src/commands/git/graph.command.js +0 -12
  135. package/dist/src/commands/git/gs.command.d.ts +0 -2
  136. package/dist/src/commands/git/gs.command.js +0 -23
  137. package/dist/src/commands/git/index.d.ts +0 -2
  138. package/dist/src/commands/git/index.js +0 -52
  139. package/dist/src/commands/git/init.command.d.ts +0 -2
  140. package/dist/src/commands/git/init.command.js +0 -12
  141. package/dist/src/commands/git/merge.command.d.ts +0 -2
  142. package/dist/src/commands/git/merge.command.js +0 -13
  143. package/dist/src/commands/git/sync.command.d.ts +0 -2
  144. package/dist/src/commands/git/sync.command.js +0 -12
  145. package/dist/src/commands/git/undo.command.d.ts +0 -2
  146. package/dist/src/commands/git/undo.command.js +0 -21
  147. package/dist/src/commands/git/untrack.command.d.ts +0 -2
  148. package/dist/src/commands/git/untrack.command.js +0 -27
  149. package/dist/src/commands/index.d.ts +0 -1
  150. package/dist/src/commands/index.js +0 -15
  151. package/dist/src/commands/network/discover.command.d.ts +0 -2
  152. package/dist/src/commands/network/discover.command.js +0 -24
  153. package/dist/src/commands/network/index.d.ts +0 -2
  154. package/dist/src/commands/network/index.js +0 -47
  155. package/dist/src/commands/network/inspect.command.d.ts +0 -2
  156. package/dist/src/commands/network/inspect.command.js +0 -34
  157. package/dist/src/commands/network/ports.command.d.ts +0 -2
  158. package/dist/src/commands/network/ports.command.js +0 -27
  159. package/dist/src/commands/network/ssl.command.d.ts +0 -2
  160. package/dist/src/commands/network/ssl.command.js +0 -32
  161. package/dist/src/commands/network/trace.command.d.ts +0 -2
  162. package/dist/src/commands/network/trace.command.js +0 -30
  163. package/dist/src/core/helper/command.helper.d.ts +0 -1
  164. package/dist/src/core/helper/command.helper.js +0 -28
  165. package/dist/src/core/helper/git.helper.d.ts +0 -2
  166. package/dist/src/core/helper/git.helper.js +0 -58
  167. package/dist/src/core/helper/prompts.helper.d.ts +0 -5
  168. package/dist/src/core/helper/prompts.helper.js +0 -83
  169. package/dist/src/core/shell/exec.d.ts +0 -1
  170. package/dist/src/core/shell/exec.js +0 -38
  171. package/dist/src/dashboards/collectors/project/project.collector.d.ts +0 -9
  172. package/dist/src/dashboards/collectors/project/project.collector.js +0 -29
  173. package/dist/src/dashboards/project/backend/server/dashboard.bootstrap.d.ts +0 -6
  174. package/dist/src/dashboards/project/backend/server/dashboard.bootstrap.js +0 -45
  175. package/dist/src/dashboards/project/backend/server/dashboard.server.d.ts +0 -6
  176. package/dist/src/dashboards/project/backend/server/dashboard.server.js +0 -25
  177. package/dist/src/dashboards/project/backend/server/websocket.server.d.ts +0 -8
  178. package/dist/src/dashboards/project/backend/server/websocket.server.js +0 -28
  179. package/dist/src/dashboards/project/backend/services/git.service.d.ts +0 -9
  180. package/dist/src/dashboards/project/backend/services/git.service.js +0 -18
  181. package/dist/src/dashboards/project/backend/services/metrics.service.d.ts +0 -7
  182. package/dist/src/dashboards/project/backend/services/metrics.service.js +0 -54
  183. package/dist/src/dashboards/project/backend/services/project.service.d.ts +0 -10
  184. package/dist/src/dashboards/project/backend/services/project.service.js +0 -19
  185. package/dist/src/dashboards/project/backend/services/system.service.d.ts +0 -15
  186. package/dist/src/dashboards/project/backend/services/system.service.js +0 -42
  187. package/dist/src/dashboards/project/backend/wrapper/process.wrapper.d.ts +0 -13
  188. package/dist/src/dashboards/project/backend/wrapper/process.wrapper.js +0 -56
  189. package/dist/src/services/git/git.service.d.ts +0 -37
  190. package/dist/src/services/git/git.service.js +0 -303
  191. package/dist/src/services/network/network.service.d.ts +0 -23
  192. package/dist/src/services/network/network.service.js +0 -524
@@ -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;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.initCommand = initCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- function initCommand(program) {
6
- program
7
- .command("init")
8
- .description("Initialize repository")
9
- .action(async () => {
10
- await git_service_1.gitService.init();
11
- });
12
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function mergeCommand(program: Command): void;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mergeCommand = mergeCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- function mergeCommand(program) {
6
- program
7
- .command("merge")
8
- .argument("<branch>")
9
- .description("Merge branch")
10
- .action(async (branch) => {
11
- await git_service_1.gitService.merge(branch);
12
- });
13
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function syncCommand(program: Command): void;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.syncCommand = syncCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- function syncCommand(program) {
6
- program
7
- .command("sync")
8
- .description("Fetch and pull latest")
9
- .action(async () => {
10
- await git_service_1.gitService.sync();
11
- });
12
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function undoCommand(program: Command): void;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.undoCommand = undoCommand;
4
- const git_service_1 = require("../../services/git/git.service");
5
- function undoCommand(program) {
6
- program
7
- .command("undo")
8
- .description("Advanced git reset")
9
- .argument("[index]", "commits back", "1")
10
- .option("--hard", "hard reset")
11
- .option("--mixed", "mixed reset")
12
- .option("--commit <hash>", "reset to commit")
13
- .action(async (index, options) => {
14
- await git_service_1.gitService.undo({
15
- hard: options.hard,
16
- mixed: options.mixed,
17
- commit: options.commit,
18
- index: Number(index),
19
- });
20
- });
21
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function untrackCommand(program: Command): void;
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.untrackCommand = untrackCommand;
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 untrackCommand(program) {
8
- program
9
- .command("untrack")
10
- .argument("[target]")
11
- .description("Stop tracking file/folder")
12
- .addHelpText("after", `
13
- Examples:
14
-
15
- vh git untrack
16
-
17
- vh git untrack src/temp.ts
18
-
19
- vh git untrack src/components
20
- `)
21
- .action((target) => (0, command_helper_1.safeCommand)(async () => {
22
- if (!target) {
23
- target = await (0, git_helper_1.pickTracked)();
24
- }
25
- await git_service_1.gitService.untrack(target);
26
- }));
27
- }
@@ -1 +0,0 @@
1
- export declare function registerCommands(): void;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.registerCommands = registerCommands;
4
- const commander_1 = require("commander");
5
- const git_1 = require("./git");
6
- const network_1 = require("./network");
7
- const dashbaord_1 = require("./dashbaord");
8
- function registerCommands() {
9
- const program = new commander_1.Command();
10
- program.name("vh");
11
- (0, git_1.registerGitCommands)(program);
12
- (0, network_1.registerNetworkCommands)(program);
13
- (0, dashbaord_1.registerDashboardCommands)(program);
14
- program.parse();
15
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function discoverCommand(program: Command): void;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.discoverCommand = discoverCommand;
4
- const network_service_1 = require("../../services/network/network.service");
5
- function discoverCommand(program) {
6
- program
7
- .command("discover")
8
- .argument("<target>", "localhost / subnet / ip / domain")
9
- .description("Discover hosts and network information")
10
- .addHelpText("after", `
11
- Examples:
12
-
13
- vh net discover localhost
14
-
15
- vh net discover 192.168.0.0/24
16
-
17
- vh net discover 192.168.0.15
18
-
19
- vh net discover gemlay.com
20
- `)
21
- .action(async (target) => {
22
- await network_service_1.networkService.discover(target);
23
- });
24
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function registerNetworkCommands(program: Command): void;
@@ -1,47 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.registerNetworkCommands = registerNetworkCommands;
4
- const inspect_command_1 = require("./inspect.command");
5
- const ssl_command_1 = require("./ssl.command");
6
- const trace_command_1 = require("./trace.command");
7
- const ports_command_1 = require("./ports.command");
8
- const discover_command_1 = require("./discover.command");
9
- function registerNetworkCommands(program) {
10
- const net = program
11
- .command("net")
12
- .description("Network utilities")
13
- .addHelpText("after", `
14
- Examples:
15
-
16
- vh net inspect google.com
17
-
18
- vh net ssl google.com
19
-
20
- vh net trace google.com
21
-
22
- vh net ports google.com
23
-
24
- vh net discover localhost
25
-
26
- vh net discover 192.168.0.15
27
-
28
- vh net discover gemlay.com
29
-
30
- Available tools:
31
-
32
- inspect DNS, redirects, timings, IP metadata
33
-
34
- ssl SSL certificate inspection
35
-
36
- trace Route hops, latency, path analysis
37
-
38
- ports Scan ports and detect services
39
-
40
- discover Discover hosts, devices, and target information
41
- `);
42
- (0, inspect_command_1.netInspectCommand)(net);
43
- (0, ssl_command_1.sslCommand)(net);
44
- (0, trace_command_1.traceCommand)(net);
45
- (0, ports_command_1.portsCommand)(net);
46
- (0, discover_command_1.discoverCommand)(net);
47
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function netInspectCommand(program: Command): void;
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.netInspectCommand = netInspectCommand;
4
- const network_service_1 = require("../../services/network/network.service");
5
- function netInspectCommand(program) {
6
- program
7
- .command("inspect")
8
- .argument("<url>", "URL or domain to inspect")
9
- .description("Inspect DNS, redirects, timings, and network info")
10
- .addHelpText("after", `
11
- Examples:
12
-
13
- vh net inspect google.com
14
-
15
- vh net inspect https://google.com
16
-
17
- Shows:
18
-
19
- DNS
20
-
21
- redirect chain
22
-
23
- latency
24
-
25
- TLS timing
26
-
27
- IP info
28
-
29
- response metadata
30
- `)
31
- .action(async (url) => {
32
- await network_service_1.networkService.inspect(url);
33
- });
34
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function portsCommand(program: Command): void;
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.portsCommand = portsCommand;
4
- const network_service_1 = require("../../services/network/network.service");
5
- function portsCommand(program) {
6
- program
7
- .command("ports")
8
- .argument("<host>", "Domain or IP")
9
- .option("--extended", "Scan extended ports")
10
- .option("--full", "Scan all ports")
11
- .option("--ports <ports>", "Custom ports ex: 22,80,443")
12
- .description("Scan network ports")
13
- .addHelpText("after", `
14
- Examples:
15
-
16
- vh net ports google.com
17
-
18
- vh net ports google.com --extended
19
-
20
- vh net ports google.com --full
21
-
22
- vh net ports google.com --ports 22,80,443
23
- `)
24
- .action(async (host, options) => {
25
- await network_service_1.networkService.ports(host, options);
26
- });
27
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function sslCommand(program: Command): void;
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sslCommand = sslCommand;
4
- const network_service_1 = require("../../services/network/network.service");
5
- function sslCommand(program) {
6
- program
7
- .command("ssl")
8
- .argument("<domain>", "Domain name")
9
- .description("Inspect SSL certificate details")
10
- .addHelpText("after", `
11
- Examples:
12
-
13
- vh net ssl google.com
14
-
15
- vh net ssl api.example.com
16
-
17
- Shows:
18
-
19
- issuer
20
-
21
- expiry
22
-
23
- TLS version
24
-
25
- days remaining
26
-
27
- SAN domains
28
- `)
29
- .action(async (domain) => {
30
- await network_service_1.networkService.ssl(domain);
31
- });
32
- }
@@ -1,2 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function traceCommand(program: Command): void;
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.traceCommand = traceCommand;
4
- const network_service_1 = require("../../services/network/network.service");
5
- function traceCommand(program) {
6
- program
7
- .command("trace")
8
- .argument("<host>", "Domain or IP")
9
- .description("Trace network route to destination")
10
- .addHelpText("after", `
11
- Examples:
12
-
13
- vh net trace google.com
14
-
15
- vh net trace 8.8.8.8
16
-
17
- Shows:
18
-
19
- route hops
20
-
21
- latency
22
-
23
- packet path
24
-
25
- routing failures
26
- `)
27
- .action(async (host) => {
28
- await network_service_1.networkService.trace(host);
29
- });
30
- }
@@ -1 +0,0 @@
1
- export declare function safeCommand(callback: () => Promise<void>): Promise<void>;
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.safeCommand = safeCommand;
4
- const prompts_helper_1 = require("./prompts.helper");
5
- async function safeCommand(callback) {
6
- try {
7
- await callback();
8
- }
9
- catch (error) {
10
- /*
11
- * User cancelled manually
12
- */
13
- if (error instanceof prompts_helper_1.UserCancelledError) {
14
- console.log("\n❌ Operation cancelled");
15
- return;
16
- }
17
- /*
18
- * Ctrl + C / SIGINT from inquirer
19
- */
20
- if (error?.name === "ExitPromptError" ||
21
- error?.message?.includes("SIGINT")) {
22
- console.log("\n❌ Prompt closed");
23
- return;
24
- }
25
- console.error("\n❌ Error:", error);
26
- process.exit(1);
27
- }
28
- }
@@ -1,2 +0,0 @@
1
- export declare function pickBranch(): Promise<string>;
2
- export declare function pickTracked(): Promise<string>;
@@ -1,58 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.pickBranch = pickBranch;
4
- exports.pickTracked = pickTracked;
5
- const prompts_1 = require("@inquirer/prompts");
6
- const exec_1 = require("../shell/exec");
7
- const prompts_helper_1 = require("./prompts.helper");
8
- async function pickBranch() {
9
- const branches = (await (0, exec_1.exec)("git branch --format='%(refname:short)'", true))
10
- .split("\n")
11
- .filter(Boolean)
12
- .filter((value, index, arr) => arr.indexOf(value) === index)
13
- .sort();
14
- const branch = await (0, prompts_1.search)({
15
- message: "Search branch",
16
- source: async (input = "") => {
17
- const query = input.toLowerCase();
18
- return branches
19
- .filter((branch) => branch.toLowerCase().includes(query))
20
- .slice(0, 30)
21
- .map((branch) => ({
22
- name: branch,
23
- value: branch,
24
- }));
25
- },
26
- });
27
- const accepted = await (0, prompts_1.confirm)({
28
- message: `Use "${branch}" ?`,
29
- default: true,
30
- });
31
- if (!accepted) {
32
- throw new prompts_helper_1.UserCancelledError();
33
- }
34
- return branch;
35
- }
36
- async function pickTracked() {
37
- const files = (await (0, exec_1.exec)("git ls-files", true))
38
- .split("\n")
39
- .filter(Boolean);
40
- const selected = await (0, prompts_1.search)({
41
- message: "Search tracked file/folder",
42
- source: async (input = "") => files
43
- .filter((item) => item.toLowerCase().includes(input.toLowerCase()))
44
- .slice(0, 100)
45
- .map((item) => ({
46
- name: item,
47
- value: item,
48
- })),
49
- });
50
- const accepted = await (0, prompts_1.confirm)({
51
- message: `Stop tracking "${selected}" ?`,
52
- default: true,
53
- });
54
- if (!accepted) {
55
- throw new prompts_helper_1.UserCancelledError();
56
- }
57
- return selected;
58
- }
@@ -1,5 +0,0 @@
1
- export declare class UserCancelledError extends Error {
2
- constructor();
3
- }
4
- export declare function pickFile(ref: string): Promise<string>;
5
- export declare function pickFolder(ref: string): Promise<string>;