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,303 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.gitService = void 0;
4
- const prompts_1 = require("@inquirer/prompts");
5
- const exec_1 = require("../../core/shell/exec");
6
- class GitService {
7
- async deleteBranch(branch, remote = false) {
8
- console.log(`๐Ÿ—‘๏ธ Removing ${branch}`);
9
- try {
10
- await (0, exec_1.exec)(`git branch -d ${branch}`);
11
- console.log("โœ… Local branch removed");
12
- }
13
- catch {
14
- console.log(`
15
- โš ๏ธ Normal delete failed
16
-
17
- Branch may contain unmerged commits
18
- `);
19
- const answer = await (0, prompts_1.input)({
20
- message: "Press F to force delete or Enter to cancel",
21
- });
22
- if (answer.toLowerCase() !== "f") {
23
- console.log("โŒ Cancelled");
24
- return;
25
- }
26
- try {
27
- await (0, exec_1.exec)(`
28
- git branch \
29
- -D \
30
- ${branch}
31
- `);
32
- console.log("โœ… Force deleted");
33
- }
34
- catch {
35
- console.log("โŒ Force delete failed");
36
- return;
37
- }
38
- }
39
- if (remote) {
40
- try {
41
- await (0, exec_1.exec)(`
42
- git push origin \
43
- --delete \
44
- ${branch}
45
- `);
46
- console.log("โœ… Remote deleted");
47
- }
48
- catch {
49
- console.log("โš ๏ธ Remote delete failed");
50
- }
51
- }
52
- }
53
- async cherryPickLines(ref, file, range) {
54
- const commit = await this.resolveRef(ref);
55
- console.log(`
56
- ๐Ÿ’ Interactive patch mode
57
-
58
- Ref: ${ref}
59
-
60
- File: ${file}
61
-
62
- Range: ${range || "interactive"}
63
- `);
64
- await (0, exec_1.exec)(`
65
- git checkout \
66
- -p \
67
- ${commit} \
68
- -- \
69
- ${file}
70
- `, false, true);
71
- }
72
- async cherryPickInteractive(ref, file) {
73
- const commit = await this.resolveRef(ref);
74
- console.log("๐ŸŽฏ Patch selection mode");
75
- await (0, exec_1.exec)(`
76
- git checkout \
77
- -p \
78
- ${commit} \
79
- -- \
80
- ${file}
81
- `, false, true);
82
- }
83
- async cherryPickCommit(ref) {
84
- const commit = await this.resolveRef(ref);
85
- console.log(`๐Ÿ’ Cherry-picking ${commit}`);
86
- await (0, exec_1.exec)(`
87
- git cherry-pick \
88
- ${commit}
89
- `);
90
- console.log("โœ… Complete");
91
- }
92
- async cherryPickFile(ref, file) {
93
- const commit = await this.resolveRef(ref);
94
- console.log(`๐Ÿ’ Picking ${file}`);
95
- console.log(`Using ${commit}`);
96
- await (0, exec_1.exec)(`
97
- git checkout \
98
- ${commit} \
99
- -- \
100
- ${file}
101
- `);
102
- console.log("โœ… File restored");
103
- }
104
- async cherryPickFolder(ref, folder) {
105
- const commit = await this.resolveRef(ref);
106
- console.log(`๐Ÿ’ Picking folder ${folder}`);
107
- await (0, exec_1.exec)(`
108
- git checkout \
109
- ${commit} \
110
- -- \
111
- ${folder}
112
- `);
113
- console.log("โœ… Folder restored");
114
- }
115
- async init() {
116
- console.log("๐Ÿš€ Initializing repository");
117
- await (0, exec_1.exec)("git init");
118
- console.log("โœ… Repository initialized");
119
- }
120
- async fetch() {
121
- console.log("๐Ÿ“ฅ Fetching remotes");
122
- await (0, exec_1.exec)("git fetch --all --prune");
123
- console.log("โœ… Fetch complete");
124
- }
125
- async merge(branch) {
126
- console.log(`๐Ÿ”€ Merging ${branch}`);
127
- await (0, exec_1.exec)(`git merge ${branch}`);
128
- console.log("โœ… Merge complete");
129
- }
130
- async sync() {
131
- console.log("๐Ÿ”„ Syncing repository");
132
- await (0, exec_1.exec)("git fetch --all --prune");
133
- await (0, exec_1.exec)("git pull");
134
- console.log("โœ… Repository synced");
135
- }
136
- async cleanup() {
137
- console.log("๐Ÿงน Cleaning repository");
138
- await (0, exec_1.exec)("git remote prune origin");
139
- try {
140
- await (0, exec_1.exec)(`
141
- git branch --merged \
142
- | grep -v "*" \
143
- | xargs git branch -d
144
- `);
145
- }
146
- catch { }
147
- console.log("โœ… Cleanup complete");
148
- }
149
- async graph() {
150
- await (0, exec_1.exec)(`
151
- git log \
152
- --graph \
153
- --oneline \
154
- --decorate \
155
- --all
156
- `);
157
- }
158
- async undo({ hard = false, mixed = false, commit, index = 1, }) {
159
- let mode = "--soft";
160
- if (hard) {
161
- mode = "--hard";
162
- }
163
- if (mixed) {
164
- mode = "--mixed";
165
- }
166
- const target = commit || `HEAD~${index}`;
167
- console.log(`โ†ฉ๏ธ Resetting ${target}`);
168
- console.log(`Mode: ${mode}`);
169
- await (0, exec_1.exec)(`git reset ${mode} ${target}`);
170
- console.log("โœ… Reset complete");
171
- }
172
- async addAll() {
173
- console.log("๐Ÿ“ฆ Staging all files...");
174
- await (0, exec_1.exec)("git add .");
175
- console.log("โœ… Files staged");
176
- }
177
- async commit(message) {
178
- console.log(`๐Ÿ“ Creating commit: "${message}"`);
179
- await (0, exec_1.exec)(`git commit -m "${message}"`);
180
- console.log("โœ… Commit created");
181
- }
182
- async status() {
183
- console.log("๐Ÿ“Š Repository status\n");
184
- await (0, exec_1.exec)("git status");
185
- }
186
- async checkout(branch) {
187
- console.log(`๐Ÿ”„ Switching to ${branch}`);
188
- await (0, exec_1.exec)(`git checkout ${branch}`);
189
- console.log(`โœ… Now on ${branch}`);
190
- }
191
- async checkoutBranch(branch) {
192
- console.log(`๐ŸŒฑ Creating ${branch}`);
193
- await (0, exec_1.exec)(`git checkout -b ${branch}`);
194
- console.log(`โœ… Switched to ${branch}`);
195
- }
196
- async branches() {
197
- console.log("๐ŸŒฟ Branches\n");
198
- await (0, exec_1.exec)("git branch");
199
- }
200
- async restore(file) {
201
- if (file) {
202
- console.log(`โ†ฉ๏ธ Restoring ${file}`);
203
- await (0, exec_1.exec)(`git restore ${file}`);
204
- }
205
- else {
206
- console.log("โ†ฉ๏ธ Restoring all changes");
207
- await (0, exec_1.exec)("git restore .");
208
- }
209
- console.log("โœ… Restore complete");
210
- }
211
- async pushUpstream() {
212
- const current = (await (0, exec_1.exec)("git branch --show-current", true)).trim();
213
- console.log(`๐Ÿ“ค Pushing ${current}`);
214
- await (0, exec_1.exec)(`git push --set-upstream origin ${current}`);
215
- console.log("โœ… Push complete");
216
- }
217
- async pushOrigin(branch) {
218
- const target = branch || (await (0, exec_1.exec)("git branch --show-current", true)).trim();
219
- console.log(`๐Ÿ“ค Push origin ${target}`);
220
- await (0, exec_1.exec)(`git push origin ${target}`);
221
- console.log("โœ… Push complete");
222
- }
223
- async pullOrigin(branch) {
224
- const target = branch || (await (0, exec_1.exec)("git branch --show-current", true)).trim();
225
- console.log(`๐Ÿ“ฅ Pull origin ${target}`);
226
- await (0, exec_1.exec)(`git pull origin ${target}`);
227
- console.log("โœ… Pull complete");
228
- }
229
- async pushWithPull(branch) {
230
- const currentBranch = (await (0, exec_1.exec)("git branch --show-current", true)).trim();
231
- const pullBranch = branch || currentBranch;
232
- console.log(`๐Ÿš€ Starting push workflow`);
233
- console.log(`๐Ÿ“ Current branch: ${currentBranch}`);
234
- console.log(`๐Ÿ“ฅ Pull branch: ${pullBranch}`);
235
- try {
236
- console.log(`\n๐Ÿ”„ Syncing with ${pullBranch}...`);
237
- await this.pull(pullBranch);
238
- console.log(`\n๐Ÿ“ค Pushing ${currentBranch}...`);
239
- try {
240
- await (0, exec_1.exec)(`git push origin ${currentBranch}`);
241
- console.log(`โœ… Successfully pushed ${currentBranch}`);
242
- }
243
- catch {
244
- console.log("โš ๏ธ Upstream not found");
245
- console.log("๐Ÿ”— Creating upstream...");
246
- await (0, exec_1.exec)(`git push --set-upstream origin ${currentBranch}`);
247
- console.log(`โœ… Upstream created for ${currentBranch}`);
248
- console.log(`โœ… Successfully pushed ${currentBranch}`);
249
- }
250
- console.log("\n๐ŸŽ‰ Workflow completed successfully");
251
- }
252
- catch {
253
- console.log("\nโŒ Pull failed. Aborting push.");
254
- process.exit(1);
255
- }
256
- }
257
- async pull(branch) {
258
- const targetBranch = branch || (await (0, exec_1.exec)("git branch --show-current", true)).trim();
259
- console.log(`๐Ÿ“ฅ Pulling from branch: ${targetBranch}`);
260
- try {
261
- await (0, exec_1.exec)(`git pull origin ${targetBranch}`);
262
- console.log(`โœ… Pulled successfully from ${targetBranch}`);
263
- }
264
- catch {
265
- console.log("โš ๏ธ Upstream missing");
266
- await (0, exec_1.exec)(`git branch --set-upstream-to=origin/${targetBranch} ${targetBranch}`);
267
- console.log("๐Ÿ”„ Trying again...");
268
- await (0, exec_1.exec)(`git pull origin ${targetBranch}`);
269
- console.log(`โœ… Pulled successfully from ${targetBranch}`);
270
- }
271
- }
272
- async resolveRef(ref) {
273
- try {
274
- const commit = (await (0, exec_1.exec)(`git rev-parse ${ref}`, true)).trim();
275
- return commit;
276
- }
277
- catch {
278
- throw new Error(`Invalid ref: ${ref}`);
279
- }
280
- }
281
- async final(message = "final") {
282
- console.log("๐Ÿš€ Running final workflow");
283
- await this.addAll();
284
- await this.commit(message);
285
- await this.pushWithPull();
286
- console.log("\nโœ… Final workflow completed");
287
- }
288
- async untrack(target) {
289
- console.log(`๐Ÿงน Removing tracking from ${target}`);
290
- await (0, exec_1.exec)(`
291
- git rm \
292
- -r \
293
- --cached \
294
- "${target}"
295
- `);
296
- console.log("โœ… Tracking removed");
297
- console.log(`
298
- File remains locally.
299
- Commit changes to finalize.
300
- `);
301
- }
302
- }
303
- exports.gitService = new GitService();
@@ -1,23 +0,0 @@
1
- declare class NetworkService {
2
- discover(target: string): Promise<void>;
3
- private discoverLocal;
4
- private discoverSubnet;
5
- private inspectDevice;
6
- private discoverHost;
7
- ports(host: string, options: {
8
- extended?: boolean;
9
- full?: boolean;
10
- ports?: string;
11
- }): Promise<void>;
12
- trace(host: string): Promise<void>;
13
- ssl(domain: string): Promise<void>;
14
- inspect(input: string): Promise<void>;
15
- private formatTime;
16
- private showDns;
17
- private showIp;
18
- private showRedirects;
19
- private showHeaders;
20
- private showStats;
21
- }
22
- export declare const networkService: NetworkService;
23
- export {};