cast-code 1.0.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.
Files changed (221) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +217 -0
  3. package/dist/app.module.js +45 -0
  4. package/dist/app.module.js.map +1 -0
  5. package/dist/common/common.module.js +49 -0
  6. package/dist/common/common.module.js.map +1 -0
  7. package/dist/common/constants/index.js +105 -0
  8. package/dist/common/constants/index.js.map +1 -0
  9. package/dist/common/index.js +24 -0
  10. package/dist/common/index.js.map +1 -0
  11. package/dist/common/services/config.service.js +119 -0
  12. package/dist/common/services/config.service.js.map +1 -0
  13. package/dist/common/services/llm.service.js +56 -0
  14. package/dist/common/services/llm.service.js.map +1 -0
  15. package/dist/common/services/markdown-parser.service.js +101 -0
  16. package/dist/common/services/markdown-parser.service.js.map +1 -0
  17. package/dist/common/services/markdown-renderer.service.js +220 -0
  18. package/dist/common/services/markdown-renderer.service.js.map +1 -0
  19. package/dist/common/services/multi-llm.service.js +115 -0
  20. package/dist/common/services/multi-llm.service.js.map +1 -0
  21. package/dist/common/types/index.js +20 -0
  22. package/dist/common/types/index.js.map +1 -0
  23. package/dist/common/types/markdown.types.js +6 -0
  24. package/dist/common/types/markdown.types.js.map +1 -0
  25. package/dist/main.js +84 -0
  26. package/dist/main.js.map +1 -0
  27. package/dist/modules/agents/agents.module.js +43 -0
  28. package/dist/modules/agents/agents.module.js.map +1 -0
  29. package/dist/modules/agents/definitions/architect.md +35 -0
  30. package/dist/modules/agents/definitions/backend.md +43 -0
  31. package/dist/modules/agents/definitions/coder.md +34 -0
  32. package/dist/modules/agents/definitions/devops.md +42 -0
  33. package/dist/modules/agents/definitions/frontend.md +46 -0
  34. package/dist/modules/agents/definitions/reviewer.md +35 -0
  35. package/dist/modules/agents/definitions/tester.md +41 -0
  36. package/dist/modules/agents/index.js +23 -0
  37. package/dist/modules/agents/index.js.map +1 -0
  38. package/dist/modules/agents/services/agent-loader.service.js +150 -0
  39. package/dist/modules/agents/services/agent-loader.service.js.map +1 -0
  40. package/dist/modules/agents/services/agent-registry.service.js +108 -0
  41. package/dist/modules/agents/services/agent-registry.service.js.map +1 -0
  42. package/dist/modules/agents/types/agent.types.js +6 -0
  43. package/dist/modules/agents/types/agent.types.js.map +1 -0
  44. package/dist/modules/agents/types/index.js +20 -0
  45. package/dist/modules/agents/types/index.js.map +1 -0
  46. package/dist/modules/config/config.module.js +38 -0
  47. package/dist/modules/config/config.module.js.map +1 -0
  48. package/dist/modules/config/index.js +24 -0
  49. package/dist/modules/config/index.js.map +1 -0
  50. package/dist/modules/config/services/config-commands.service.js +405 -0
  51. package/dist/modules/config/services/config-commands.service.js.map +1 -0
  52. package/dist/modules/config/services/config-manager.service.js +175 -0
  53. package/dist/modules/config/services/config-manager.service.js.map +1 -0
  54. package/dist/modules/config/services/init-config.service.js +238 -0
  55. package/dist/modules/config/services/init-config.service.js.map +1 -0
  56. package/dist/modules/config/types/config.types.js +163 -0
  57. package/dist/modules/config/types/config.types.js.map +1 -0
  58. package/dist/modules/config/types/index.js +20 -0
  59. package/dist/modules/config/types/index.js.map +1 -0
  60. package/dist/modules/core/core.module.js +60 -0
  61. package/dist/modules/core/core.module.js.map +1 -0
  62. package/dist/modules/core/index.js +22 -0
  63. package/dist/modules/core/index.js.map +1 -0
  64. package/dist/modules/core/services/deep-agent.service.js +575 -0
  65. package/dist/modules/core/services/deep-agent.service.js.map +1 -0
  66. package/dist/modules/core/services/plan-mode.service.js +225 -0
  67. package/dist/modules/core/services/plan-mode.service.js.map +1 -0
  68. package/dist/modules/git/git.module.js +48 -0
  69. package/dist/modules/git/git.module.js.map +1 -0
  70. package/dist/modules/git/index.js +23 -0
  71. package/dist/modules/git/index.js.map +1 -0
  72. package/dist/modules/git/services/code-review.service.js +330 -0
  73. package/dist/modules/git/services/code-review.service.js.map +1 -0
  74. package/dist/modules/git/services/commit-generator.service.js +403 -0
  75. package/dist/modules/git/services/commit-generator.service.js.map +1 -0
  76. package/dist/modules/git/services/index.js +21 -0
  77. package/dist/modules/git/services/index.js.map +1 -0
  78. package/dist/modules/git/services/monorepo-detector.service.js +338 -0
  79. package/dist/modules/git/services/monorepo-detector.service.js.map +1 -0
  80. package/dist/modules/git/services/pr-generator.service.js +429 -0
  81. package/dist/modules/git/services/pr-generator.service.js.map +1 -0
  82. package/dist/modules/git/services/release-notes.service.js +426 -0
  83. package/dist/modules/git/services/release-notes.service.js.map +1 -0
  84. package/dist/modules/git/types/git.types.js +6 -0
  85. package/dist/modules/git/types/git.types.js.map +1 -0
  86. package/dist/modules/git/types/index.js +20 -0
  87. package/dist/modules/git/types/index.js.map +1 -0
  88. package/dist/modules/mcp/catalog/mcp-templates.js +606 -0
  89. package/dist/modules/mcp/catalog/mcp-templates.js.map +1 -0
  90. package/dist/modules/mcp/index.js +23 -0
  91. package/dist/modules/mcp/index.js.map +1 -0
  92. package/dist/modules/mcp/mcp.module.js +35 -0
  93. package/dist/modules/mcp/mcp.module.js.map +1 -0
  94. package/dist/modules/mcp/services/mcp-client.service.js +289 -0
  95. package/dist/modules/mcp/services/mcp-client.service.js.map +1 -0
  96. package/dist/modules/mcp/services/mcp-registry.service.js +197 -0
  97. package/dist/modules/mcp/services/mcp-registry.service.js.map +1 -0
  98. package/dist/modules/mcp/types/index.js +20 -0
  99. package/dist/modules/mcp/types/index.js.map +1 -0
  100. package/dist/modules/mcp/types/mcp.types.js +6 -0
  101. package/dist/modules/mcp/types/mcp.types.js.map +1 -0
  102. package/dist/modules/memory/index.js +23 -0
  103. package/dist/modules/memory/index.js.map +1 -0
  104. package/dist/modules/memory/memory.module.js +35 -0
  105. package/dist/modules/memory/memory.module.js.map +1 -0
  106. package/dist/modules/memory/services/memory-tools.service.js +78 -0
  107. package/dist/modules/memory/services/memory-tools.service.js.map +1 -0
  108. package/dist/modules/memory/services/memory.service.js +169 -0
  109. package/dist/modules/memory/services/memory.service.js.map +1 -0
  110. package/dist/modules/memory/types/index.js +20 -0
  111. package/dist/modules/memory/types/index.js.map +1 -0
  112. package/dist/modules/memory/types/memory.types.js +6 -0
  113. package/dist/modules/memory/types/memory.types.js.map +1 -0
  114. package/dist/modules/mentions/index.js +22 -0
  115. package/dist/modules/mentions/index.js.map +1 -0
  116. package/dist/modules/mentions/mentions.module.js +32 -0
  117. package/dist/modules/mentions/mentions.module.js.map +1 -0
  118. package/dist/modules/mentions/services/mentions.service.js +336 -0
  119. package/dist/modules/mentions/services/mentions.service.js.map +1 -0
  120. package/dist/modules/mentions/types/index.js +20 -0
  121. package/dist/modules/mentions/types/index.js.map +1 -0
  122. package/dist/modules/mentions/types/mention.types.js +19 -0
  123. package/dist/modules/mentions/types/mention.types.js.map +1 -0
  124. package/dist/modules/permissions/index.js +23 -0
  125. package/dist/modules/permissions/index.js.map +1 -0
  126. package/dist/modules/permissions/permissions.module.js +35 -0
  127. package/dist/modules/permissions/permissions.module.js.map +1 -0
  128. package/dist/modules/permissions/services/permission.service.js +269 -0
  129. package/dist/modules/permissions/services/permission.service.js.map +1 -0
  130. package/dist/modules/permissions/services/prompt.service.js +116 -0
  131. package/dist/modules/permissions/services/prompt.service.js.map +1 -0
  132. package/dist/modules/permissions/types/permission.types.js +32 -0
  133. package/dist/modules/permissions/types/permission.types.js.map +1 -0
  134. package/dist/modules/project/index.js +24 -0
  135. package/dist/modules/project/index.js.map +1 -0
  136. package/dist/modules/project/project.module.js +38 -0
  137. package/dist/modules/project/project.module.js.map +1 -0
  138. package/dist/modules/project/services/project-analyzer.service.js +1063 -0
  139. package/dist/modules/project/services/project-analyzer.service.js.map +1 -0
  140. package/dist/modules/project/services/project-context.service.js +62 -0
  141. package/dist/modules/project/services/project-context.service.js.map +1 -0
  142. package/dist/modules/project/services/project-loader.service.js +147 -0
  143. package/dist/modules/project/services/project-loader.service.js.map +1 -0
  144. package/dist/modules/project/types/index.js +20 -0
  145. package/dist/modules/project/types/index.js.map +1 -0
  146. package/dist/modules/project/types/project.types.js +6 -0
  147. package/dist/modules/project/types/project.types.js.map +1 -0
  148. package/dist/modules/repl/index.js +21 -0
  149. package/dist/modules/repl/index.js.map +1 -0
  150. package/dist/modules/repl/repl.module.js +66 -0
  151. package/dist/modules/repl/repl.module.js.map +1 -0
  152. package/dist/modules/repl/services/commands/agent-commands.service.js +196 -0
  153. package/dist/modules/repl/services/commands/agent-commands.service.js.map +1 -0
  154. package/dist/modules/repl/services/commands/git-commands.service.js +500 -0
  155. package/dist/modules/repl/services/commands/git-commands.service.js.map +1 -0
  156. package/dist/modules/repl/services/commands/mcp-commands.service.js +579 -0
  157. package/dist/modules/repl/services/commands/mcp-commands.service.js.map +1 -0
  158. package/dist/modules/repl/services/commands/project-commands.service.js +226 -0
  159. package/dist/modules/repl/services/commands/project-commands.service.js.map +1 -0
  160. package/dist/modules/repl/services/commands/repl-commands.service.js +254 -0
  161. package/dist/modules/repl/services/commands/repl-commands.service.js.map +1 -0
  162. package/dist/modules/repl/services/repl.service.js +647 -0
  163. package/dist/modules/repl/services/repl.service.js.map +1 -0
  164. package/dist/modules/repl/services/smart-input.js +544 -0
  165. package/dist/modules/repl/services/smart-input.js.map +1 -0
  166. package/dist/modules/repl/services/welcome-screen.service.js +117 -0
  167. package/dist/modules/repl/services/welcome-screen.service.js.map +1 -0
  168. package/dist/modules/repl/utils/prompts-with-esc.js +187 -0
  169. package/dist/modules/repl/utils/prompts-with-esc.js.map +1 -0
  170. package/dist/modules/repl/utils/theme.js +185 -0
  171. package/dist/modules/repl/utils/theme.js.map +1 -0
  172. package/dist/modules/skills/definitions/general/file-operations.md +60 -0
  173. package/dist/modules/skills/definitions/general/git-operations.md +59 -0
  174. package/dist/modules/skills/definitions/general/planning.md +86 -0
  175. package/dist/modules/skills/definitions/general/search.md +59 -0
  176. package/dist/modules/skills/definitions/specialized/api-design.md +85 -0
  177. package/dist/modules/skills/definitions/specialized/database-operations.md +78 -0
  178. package/dist/modules/skills/definitions/specialized/frontend-bootstrap.md +71 -0
  179. package/dist/modules/skills/definitions/specialized/react-patterns.md +77 -0
  180. package/dist/modules/skills/definitions/specialized/testing-strategies.md +79 -0
  181. package/dist/modules/skills/index.js +23 -0
  182. package/dist/modules/skills/index.js.map +1 -0
  183. package/dist/modules/skills/services/skill-loader.service.js +130 -0
  184. package/dist/modules/skills/services/skill-loader.service.js.map +1 -0
  185. package/dist/modules/skills/services/skill-registry.service.js +96 -0
  186. package/dist/modules/skills/services/skill-registry.service.js.map +1 -0
  187. package/dist/modules/skills/skills.module.js +38 -0
  188. package/dist/modules/skills/skills.module.js.map +1 -0
  189. package/dist/modules/skills/types/index.js +20 -0
  190. package/dist/modules/skills/types/index.js.map +1 -0
  191. package/dist/modules/skills/types/skill.types.js +6 -0
  192. package/dist/modules/skills/types/skill.types.js.map +1 -0
  193. package/dist/modules/tasks/index.js +24 -0
  194. package/dist/modules/tasks/index.js.map +1 -0
  195. package/dist/modules/tasks/services/plan-executor.service.js +199 -0
  196. package/dist/modules/tasks/services/plan-executor.service.js.map +1 -0
  197. package/dist/modules/tasks/services/plan-mode.service.js +118 -0
  198. package/dist/modules/tasks/services/plan-mode.service.js.map +1 -0
  199. package/dist/modules/tasks/services/plan-persistence.service.js +148 -0
  200. package/dist/modules/tasks/services/plan-persistence.service.js.map +1 -0
  201. package/dist/modules/tasks/services/task-management.service.js +255 -0
  202. package/dist/modules/tasks/services/task-management.service.js.map +1 -0
  203. package/dist/modules/tasks/services/task-tools.service.js +270 -0
  204. package/dist/modules/tasks/services/task-tools.service.js.map +1 -0
  205. package/dist/modules/tasks/tasks.module.js +49 -0
  206. package/dist/modules/tasks/tasks.module.js.map +1 -0
  207. package/dist/modules/tasks/types/task.types.js +21 -0
  208. package/dist/modules/tasks/types/task.types.js.map +1 -0
  209. package/dist/modules/tools/index.js +24 -0
  210. package/dist/modules/tools/index.js.map +1 -0
  211. package/dist/modules/tools/services/filesystem-tools.service.js +450 -0
  212. package/dist/modules/tools/services/filesystem-tools.service.js.map +1 -0
  213. package/dist/modules/tools/services/search-tools.service.js +63 -0
  214. package/dist/modules/tools/services/search-tools.service.js.map +1 -0
  215. package/dist/modules/tools/services/shell-tools.service.js +194 -0
  216. package/dist/modules/tools/services/shell-tools.service.js.map +1 -0
  217. package/dist/modules/tools/services/tools-registry.service.js +83 -0
  218. package/dist/modules/tools/services/tools-registry.service.js.map +1 -0
  219. package/dist/modules/tools/tools.module.js +46 -0
  220. package/dist/modules/tools/tools.module.js.map +1 -0
  221. package/package.json +74 -0
@@ -0,0 +1,426 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "ReleaseNotesService", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return ReleaseNotesService;
9
+ }
10
+ });
11
+ const _common = require("@nestjs/common");
12
+ const _child_process = require("child_process");
13
+ const _messages = require("@langchain/core/messages");
14
+ const _multillmservice = require("../../../common/services/multi-llm.service");
15
+ const _fs = /*#__PURE__*/ _interop_require_wildcard(require("fs"));
16
+ const _path = /*#__PURE__*/ _interop_require_wildcard(require("path"));
17
+ function _getRequireWildcardCache(nodeInterop) {
18
+ if (typeof WeakMap !== "function") return null;
19
+ var cacheBabelInterop = new WeakMap();
20
+ var cacheNodeInterop = new WeakMap();
21
+ return (_getRequireWildcardCache = function(nodeInterop) {
22
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
23
+ })(nodeInterop);
24
+ }
25
+ function _interop_require_wildcard(obj, nodeInterop) {
26
+ if (!nodeInterop && obj && obj.__esModule) {
27
+ return obj;
28
+ }
29
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
30
+ return {
31
+ default: obj
32
+ };
33
+ }
34
+ var cache = _getRequireWildcardCache(nodeInterop);
35
+ if (cache && cache.has(obj)) {
36
+ return cache.get(obj);
37
+ }
38
+ var newObj = {
39
+ __proto__: null
40
+ };
41
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
42
+ for(var key in obj){
43
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
44
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
45
+ if (desc && (desc.get || desc.set)) {
46
+ Object.defineProperty(newObj, key, desc);
47
+ } else {
48
+ newObj[key] = obj[key];
49
+ }
50
+ }
51
+ }
52
+ newObj.default = obj;
53
+ if (cache) {
54
+ cache.set(obj, newObj);
55
+ }
56
+ return newObj;
57
+ }
58
+ function _ts_decorate(decorators, target, key, desc) {
59
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
60
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
61
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
62
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
63
+ }
64
+ function _ts_metadata(k, v) {
65
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
66
+ }
67
+ let ReleaseNotesService = class ReleaseNotesService {
68
+ async generateReleaseNotes(sinceTag, version) {
69
+ try {
70
+ const cwd = process.cwd();
71
+ const releaseVersion = version || this.detectVersion();
72
+ const today = new Date();
73
+ const dateStr = today.toLocaleDateString('pt-BR');
74
+ const fileName = `${today.getDate().toString().padStart(2, '0')}-${(today.getMonth() + 1).toString().padStart(2, '0')}-${today.getFullYear()}.md`;
75
+ const commits = this.getCommitsSince(sinceTag);
76
+ const changedFiles = this.getChangedFiles(sinceTag);
77
+ const dependencies = this.getDependencyChanges();
78
+ const aiData = await this.generateAIAnalysis(commits, changedFiles);
79
+ const notes = this.buildReleaseNotes({
80
+ version: releaseVersion,
81
+ date: dateStr,
82
+ features: aiData.features,
83
+ accessibility: aiData.accessibility,
84
+ notes: aiData.notes,
85
+ library: aiData.library,
86
+ search: aiData.search,
87
+ bugfixes: aiData.bugfixes,
88
+ performance: aiData.performance,
89
+ uiux: aiData.uiux,
90
+ breaking: aiData.breaking,
91
+ dependencies: dependencies.length > 0 ? dependencies : aiData.dependencies,
92
+ contributors: this.getContributors(sinceTag)
93
+ });
94
+ const releaseDir = _path.join(cwd, 'release');
95
+ if (!_fs.existsSync(releaseDir)) {
96
+ _fs.mkdirSync(releaseDir, {
97
+ recursive: true
98
+ });
99
+ }
100
+ const filePath = _path.join(releaseDir, fileName);
101
+ _fs.writeFileSync(filePath, notes);
102
+ return {
103
+ success: true,
104
+ filePath,
105
+ content: notes
106
+ };
107
+ } catch (error) {
108
+ return {
109
+ success: false,
110
+ error: error.message
111
+ };
112
+ }
113
+ }
114
+ detectVersion() {
115
+ try {
116
+ const pkg = JSON.parse(_fs.readFileSync('package.json', 'utf-8'));
117
+ if (pkg.version) return pkg.version;
118
+ } catch {}
119
+ try {
120
+ const tag = (0, _child_process.execSync)('git describe --tags --abbrev=0', {
121
+ cwd: process.cwd(),
122
+ encoding: 'utf-8'
123
+ }).trim();
124
+ return tag.replace(/^v/, '');
125
+ } catch {}
126
+ return '1.0.0';
127
+ }
128
+ getCommitsSince(sinceTag) {
129
+ try {
130
+ const cwd = process.cwd();
131
+ let cmd;
132
+ if (sinceTag) {
133
+ cmd = `git log ${sinceTag}..HEAD --pretty=format:"%H|%s|%an|%ad" --date=short`;
134
+ } else {
135
+ cmd = `git log -30 --pretty=format:"%H|%s|%an|%ad" --date=short`;
136
+ }
137
+ const output = (0, _child_process.execSync)(cmd, {
138
+ cwd,
139
+ encoding: 'utf-8'
140
+ });
141
+ return output.trim().split('\n').filter((l)=>l);
142
+ } catch {
143
+ return [];
144
+ }
145
+ }
146
+ getChangedFiles(sinceTag) {
147
+ try {
148
+ const cwd = process.cwd();
149
+ const cmd = sinceTag ? `git diff --name-only ${sinceTag}..HEAD` : `git diff --name-only HEAD~30..HEAD`;
150
+ const output = (0, _child_process.execSync)(cmd, {
151
+ cwd,
152
+ encoding: 'utf-8'
153
+ });
154
+ return output.trim().split('\n').filter((f)=>f);
155
+ } catch {
156
+ return [];
157
+ }
158
+ }
159
+ getDependencyChanges() {
160
+ try {
161
+ const pkg = JSON.parse(_fs.readFileSync('package.json', 'utf-8'));
162
+ const changes = [];
163
+ const diff = (0, _child_process.execSync)('git diff HEAD~5 package.json', {
164
+ cwd: process.cwd(),
165
+ encoding: 'utf-8'
166
+ }).trim();
167
+ if (diff.includes('"dependencies"') || diff.includes('"devDependencies"')) {
168
+ const deps = {
169
+ ...pkg.dependencies,
170
+ ...pkg.devDependencies
171
+ };
172
+ for (const [name, version] of Object.entries(deps).slice(0, 10)){
173
+ changes.push(`Atualizado \`${name}\` para \`${version}\``);
174
+ }
175
+ }
176
+ return changes;
177
+ } catch {
178
+ return [];
179
+ }
180
+ }
181
+ getContributors(sinceTag) {
182
+ try {
183
+ const cwd = process.cwd();
184
+ const cmd = sinceTag ? `git log ${sinceTag}..HEAD --pretty=format:"%an" | sort | uniq` : `git log -30 --pretty=format:"%an" | sort | uniq`;
185
+ const output = (0, _child_process.execSync)(cmd, {
186
+ cwd,
187
+ encoding: 'utf-8'
188
+ });
189
+ return output.trim().split('\n').filter((n)=>n).slice(0, 10);
190
+ } catch {
191
+ return [];
192
+ }
193
+ }
194
+ async generateAIAnalysis(commits, changedFiles) {
195
+ const llm = this.multiLlmService.createModel('cheap');
196
+ const commitMessages = commits.map((c)=>{
197
+ const parts = c.split('|');
198
+ return parts[1] || c;
199
+ }).join('\n');
200
+ const prompt = `Analyze these commits and categorize them into release notes sections.
201
+
202
+ **Commits:**
203
+ ${commitMessages.slice(0, 2000)}
204
+
205
+ **Changed Files:**
206
+ ${changedFiles.slice(0, 20).join('\n')}
207
+
208
+ Categorize into these sections (return empty array if none):
209
+ - features: New features added
210
+ - accessibility: Accessibility improvements
211
+ - notes: General improvements and notes
212
+ - library: Library/organization features
213
+ - search: Search functionality changes
214
+ - bugfixes: Bug fixes
215
+ - performance: Performance optimizations
216
+ - uiux: UI/UX changes
217
+ - breaking: Breaking changes
218
+ - dependencies: Dependency updates
219
+
220
+ **OUTPUT FORMAT (JSON):**
221
+ \`\`\`json
222
+ {
223
+ "features": ["Description of feature 1", "Description of feature 2"],
224
+ "accessibility": [],
225
+ "notes": [],
226
+ "library": [],
227
+ "search": [],
228
+ "bugfixes": [],
229
+ "performance": [],
230
+ "uiux": [],
231
+ "breaking": [],
232
+ "dependencies": []
233
+ }
234
+ \`\`\``;
235
+ try {
236
+ const response = await llm.invoke([
237
+ new _messages.SystemMessage('You are a technical writer creating release notes. Be concise and professional. Use Brazilian Portuguese.'),
238
+ new _messages.HumanMessage(prompt)
239
+ ]);
240
+ const content = this.extractContent(response.content);
241
+ const jsonMatch = content.match(/```json\s*([\s\S]*?)\s*```/) || content.match(/\{[\s\S]*\}/);
242
+ if (jsonMatch) {
243
+ const parsed = JSON.parse(jsonMatch[1] || jsonMatch[0]);
244
+ return {
245
+ features: parsed.features || [],
246
+ accessibility: parsed.accessibility || [],
247
+ notes: parsed.notes || [],
248
+ library: parsed.library || [],
249
+ search: parsed.search || [],
250
+ bugfixes: parsed.bugfixes || [],
251
+ performance: parsed.performance || [],
252
+ uiux: parsed.uiux || [],
253
+ breaking: parsed.breaking || [],
254
+ dependencies: parsed.dependencies || []
255
+ };
256
+ }
257
+ } catch {}
258
+ return {
259
+ features: [],
260
+ accessibility: [],
261
+ notes: [],
262
+ library: [],
263
+ search: [],
264
+ bugfixes: [],
265
+ performance: [],
266
+ uiux: [],
267
+ breaking: [],
268
+ dependencies: []
269
+ };
270
+ }
271
+ buildReleaseNotes(data) {
272
+ const sections = [];
273
+ sections.push(`# Notas de Versão - Versão ${data.version}`);
274
+ sections.push('');
275
+ sections.push(`**Data de Lançamento:** ${data.date}`);
276
+ sections.push('');
277
+ sections.push('---');
278
+ sections.push('');
279
+ if (data.features.length > 0) {
280
+ sections.push('## 📖 Recursos de Leitura');
281
+ sections.push('');
282
+ for (const item of data.features){
283
+ sections.push(`- **${this.extractFeatureName(item)}:** ${this.extractFeatureDesc(item)}`);
284
+ }
285
+ sections.push('');
286
+ sections.push('---');
287
+ sections.push('');
288
+ }
289
+ if (data.accessibility.length > 0) {
290
+ sections.push('## ♿ Acessibilidade');
291
+ sections.push('');
292
+ for (const item of data.accessibility){
293
+ sections.push(`- **Melhoria:** ${item}`);
294
+ }
295
+ sections.push('');
296
+ sections.push('---');
297
+ sections.push('');
298
+ }
299
+ if (data.notes.length > 0) {
300
+ sections.push('## 📝 Anotações');
301
+ sections.push('');
302
+ for (const item of data.notes){
303
+ sections.push(`- **Aprimoramento:** ${item}`);
304
+ }
305
+ sections.push('');
306
+ sections.push('---');
307
+ sections.push('');
308
+ }
309
+ if (data.library.length > 0) {
310
+ sections.push('## 📚 Biblioteca');
311
+ sections.push('');
312
+ for (const item of data.library){
313
+ sections.push(`- **Adição:** ${item}`);
314
+ }
315
+ sections.push('');
316
+ sections.push('---');
317
+ sections.push('');
318
+ }
319
+ if (data.search.length > 0) {
320
+ sections.push('## 🔍 Busca');
321
+ sections.push('');
322
+ for (const item of data.search){
323
+ sections.push(`- **Melhoria:** ${item}`);
324
+ }
325
+ sections.push('');
326
+ sections.push('---');
327
+ sections.push('');
328
+ }
329
+ if (data.bugfixes.length > 0) {
330
+ sections.push('## 🐛 Correções de Bugs');
331
+ sections.push('');
332
+ for (const item of data.bugfixes){
333
+ sections.push(`- **Corrigido:** ${item}`);
334
+ }
335
+ sections.push('');
336
+ sections.push('---');
337
+ sections.push('');
338
+ }
339
+ if (data.performance.length > 0) {
340
+ sections.push('## 🚀 Performance');
341
+ sections.push('');
342
+ for (const item of data.performance){
343
+ sections.push(`- **Otimização:** ${item}`);
344
+ }
345
+ sections.push('');
346
+ sections.push('---');
347
+ sections.push('');
348
+ }
349
+ if (data.uiux.length > 0) {
350
+ sections.push('## 🎨 UI/UX');
351
+ sections.push('');
352
+ for (const item of data.uiux){
353
+ sections.push(`- **Atualização:** ${item}`);
354
+ }
355
+ sections.push('');
356
+ sections.push('---');
357
+ sections.push('');
358
+ }
359
+ if (data.breaking.length > 0) {
360
+ sections.push('## ⚠️ Mudanças Incompatíveis (Breaking Changes)');
361
+ sections.push('');
362
+ for (const item of data.breaking){
363
+ sections.push(`- **Mudança:** ${item}`);
364
+ }
365
+ sections.push('');
366
+ sections.push('---');
367
+ sections.push('');
368
+ }
369
+ if (data.dependencies.length > 0) {
370
+ sections.push('## 📦 Dependências');
371
+ sections.push('');
372
+ for (const item of data.dependencies){
373
+ sections.push(`- ${item}`);
374
+ }
375
+ sections.push('');
376
+ sections.push('---');
377
+ sections.push('');
378
+ }
379
+ if (data.contributors.length > 0) {
380
+ sections.push('## 🙏 Colaboradores');
381
+ sections.push('');
382
+ sections.push('Agradecimentos a todos os colaboradores que tornaram esta versão possível!');
383
+ sections.push('');
384
+ for (const contributor of data.contributors){
385
+ sections.push(`- @${contributor.toLowerCase().replace(/\s+/g, '')}`);
386
+ }
387
+ sections.push('');
388
+ sections.push('---');
389
+ sections.push('');
390
+ }
391
+ sections.push('## 📄 Changelog Completo');
392
+ sections.push('');
393
+ sections.push(`[Link para o changelog completo](https://github.com/sua-org/seu-repo/compare/v${data.version}...v${data.version})`);
394
+ sections.push('');
395
+ return sections.join('\n');
396
+ }
397
+ extractFeatureName(item) {
398
+ const match = item.match(/^([^:]+):/);
399
+ return match ? match[1].trim() : 'Novo Recurso';
400
+ }
401
+ extractFeatureDesc(item) {
402
+ return item.replace(/^[^:]+:/, '').trim() || item;
403
+ }
404
+ extractContent(content) {
405
+ if (typeof content === 'string') return content;
406
+ if (Array.isArray(content) && content.length > 0) {
407
+ const first = content[0];
408
+ if (typeof first === 'object' && first !== null && 'text' in first) {
409
+ return String(first.text);
410
+ }
411
+ }
412
+ return String(content);
413
+ }
414
+ constructor(multiLlmService){
415
+ this.multiLlmService = multiLlmService;
416
+ }
417
+ };
418
+ ReleaseNotesService = _ts_decorate([
419
+ (0, _common.Injectable)(),
420
+ _ts_metadata("design:type", Function),
421
+ _ts_metadata("design:paramtypes", [
422
+ typeof _multillmservice.MultiLlmService === "undefined" ? Object : _multillmservice.MultiLlmService
423
+ ])
424
+ ], ReleaseNotesService);
425
+
426
+ //# sourceMappingURL=release-notes.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/modules/git/services/release-notes.service.ts"],"sourcesContent":["import { Injectable } from '@nestjs/common';\nimport { execSync } from 'child_process';\nimport { HumanMessage, SystemMessage } from '@langchain/core/messages';\nimport { MultiLlmService } from '../../../common/services/multi-llm.service';\nimport * as fs from 'fs';\nimport * as path from 'path';\n\nexport interface ReleaseNotesData {\n version: string;\n date: string;\n features: string[];\n accessibility: string[];\n notes: string[];\n library: string[];\n search: string[];\n bugfixes: string[];\n performance: string[];\n uiux: string[];\n breaking: string[];\n dependencies: string[];\n contributors: string[];\n}\n\n@Injectable()\nexport class ReleaseNotesService {\n constructor(private readonly multiLlmService: MultiLlmService) {}\n\n async generateReleaseNotes(\n sinceTag?: string,\n version?: string\n ): Promise<{ success: boolean; filePath?: string; error?: string; content?: string }> {\n try {\n const cwd = process.cwd();\n \n const releaseVersion = version || this.detectVersion();\n \n const today = new Date();\n const dateStr = today.toLocaleDateString('pt-BR');\n const fileName = `${today.getDate().toString().padStart(2, '0')}-${(today.getMonth() + 1).toString().padStart(2, '0')}-${today.getFullYear()}.md`;\n \n const commits = this.getCommitsSince(sinceTag);\n \n const changedFiles = this.getChangedFiles(sinceTag);\n \n const dependencies = this.getDependencyChanges();\n \n const aiData = await this.generateAIAnalysis(commits, changedFiles);\n \n const notes = this.buildReleaseNotes({\n version: releaseVersion,\n date: dateStr,\n features: aiData.features,\n accessibility: aiData.accessibility,\n notes: aiData.notes,\n library: aiData.library,\n search: aiData.search,\n bugfixes: aiData.bugfixes,\n performance: aiData.performance,\n uiux: aiData.uiux,\n breaking: aiData.breaking,\n dependencies: dependencies.length > 0 ? dependencies : aiData.dependencies,\n contributors: this.getContributors(sinceTag),\n });\n \n const releaseDir = path.join(cwd, 'release');\n if (!fs.existsSync(releaseDir)) {\n fs.mkdirSync(releaseDir, { recursive: true });\n }\n \n const filePath = path.join(releaseDir, fileName);\n fs.writeFileSync(filePath, notes);\n \n return { success: true, filePath, content: notes };\n } catch (error: any) {\n return { success: false, error: error.message };\n }\n }\n\n private detectVersion(): string {\n try {\n const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'));\n if (pkg.version) return pkg.version;\n } catch {}\n \n try {\n const tag = execSync('git describe --tags --abbrev=0', { cwd: process.cwd(), encoding: 'utf-8' }).trim();\n return tag.replace(/^v/, '');\n } catch {}\n \n return '1.0.0';\n }\n\n private getCommitsSince(sinceTag?: string): string[] {\n try {\n const cwd = process.cwd();\n let cmd: string;\n \n if (sinceTag) {\n cmd = `git log ${sinceTag}..HEAD --pretty=format:\"%H|%s|%an|%ad\" --date=short`;\n } else {\n cmd = `git log -30 --pretty=format:\"%H|%s|%an|%ad\" --date=short`;\n }\n \n const output = execSync(cmd, { cwd, encoding: 'utf-8' });\n return output.trim().split('\\n').filter(l => l);\n } catch {\n return [];\n }\n }\n\n private getChangedFiles(sinceTag?: string): string[] {\n try {\n const cwd = process.cwd();\n const cmd = sinceTag \n ? `git diff --name-only ${sinceTag}..HEAD`\n : `git diff --name-only HEAD~30..HEAD`;\n \n const output = execSync(cmd, { cwd, encoding: 'utf-8' });\n return output.trim().split('\\n').filter(f => f);\n } catch {\n return [];\n }\n }\n\n private getDependencyChanges(): string[] {\n try {\n const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'));\n const changes: string[] = [];\n \n const diff = execSync('git diff HEAD~5 package.json', { cwd: process.cwd(), encoding: 'utf-8' }).trim();\n \n if (diff.includes('\"dependencies\"') || diff.includes('\"devDependencies\"')) {\n const deps = { ...pkg.dependencies, ...pkg.devDependencies };\n for (const [name, version] of Object.entries(deps).slice(0, 10)) {\n changes.push(`Atualizado \\`${name}\\` para \\`${version}\\``);\n }\n }\n \n return changes;\n } catch {\n return [];\n }\n }\n\n private getContributors(sinceTag?: string): string[] {\n try {\n const cwd = process.cwd();\n const cmd = sinceTag\n ? `git log ${sinceTag}..HEAD --pretty=format:\"%an\" | sort | uniq`\n : `git log -30 --pretty=format:\"%an\" | sort | uniq`;\n \n const output = execSync(cmd, { cwd, encoding: 'utf-8' });\n return output.trim().split('\\n').filter(n => n).slice(0, 10);\n } catch {\n return [];\n }\n }\n\n private async generateAIAnalysis(commits: string[], changedFiles: string[]): Promise<Partial<ReleaseNotesData>> {\n const llm = this.multiLlmService.createModel('cheap');\n \n const commitMessages = commits.map(c => {\n const parts = c.split('|');\n return parts[1] || c;\n }).join('\\n');\n \n const prompt = `Analyze these commits and categorize them into release notes sections.\n\n**Commits:**\n${commitMessages.slice(0, 2000)}\n\n**Changed Files:**\n${changedFiles.slice(0, 20).join('\\n')}\n\nCategorize into these sections (return empty array if none):\n- features: New features added\n- accessibility: Accessibility improvements\n- notes: General improvements and notes\n- library: Library/organization features\n- search: Search functionality changes\n- bugfixes: Bug fixes\n- performance: Performance optimizations\n- uiux: UI/UX changes\n- breaking: Breaking changes\n- dependencies: Dependency updates\n\n**OUTPUT FORMAT (JSON):**\n\\`\\`\\`json\n{\n \"features\": [\"Description of feature 1\", \"Description of feature 2\"],\n \"accessibility\": [],\n \"notes\": [],\n \"library\": [],\n \"search\": [],\n \"bugfixes\": [],\n \"performance\": [],\n \"uiux\": [],\n \"breaking\": [],\n \"dependencies\": []\n}\n\\`\\`\\``;\n\n try {\n const response = await llm.invoke([\n new SystemMessage('You are a technical writer creating release notes. Be concise and professional. Use Brazilian Portuguese.'),\n new HumanMessage(prompt),\n ]);\n\n const content = this.extractContent(response.content);\n const jsonMatch = content.match(/```json\\s*([\\s\\S]*?)\\s*```/) || content.match(/\\{[\\s\\S]*\\}/);\n \n if (jsonMatch) {\n const parsed = JSON.parse(jsonMatch[1] || jsonMatch[0]);\n return {\n features: parsed.features || [],\n accessibility: parsed.accessibility || [],\n notes: parsed.notes || [],\n library: parsed.library || [],\n search: parsed.search || [],\n bugfixes: parsed.bugfixes || [],\n performance: parsed.performance || [],\n uiux: parsed.uiux || [],\n breaking: parsed.breaking || [],\n dependencies: parsed.dependencies || [],\n };\n }\n } catch {\n }\n\n return {\n features: [],\n accessibility: [],\n notes: [],\n library: [],\n search: [],\n bugfixes: [],\n performance: [],\n uiux: [],\n breaking: [],\n dependencies: [],\n };\n }\n\n private buildReleaseNotes(data: ReleaseNotesData): string {\n const sections: string[] = [];\n \n sections.push(`# Notas de Versão - Versão ${data.version}`);\n sections.push('');\n sections.push(`**Data de Lançamento:** ${data.date}`);\n sections.push('');\n sections.push('---');\n sections.push('');\n \n if (data.features.length > 0) {\n sections.push('## 📖 Recursos de Leitura');\n sections.push('');\n for (const item of data.features) {\n sections.push(`- **${this.extractFeatureName(item)}:** ${this.extractFeatureDesc(item)}`);\n }\n sections.push('');\n sections.push('---');\n sections.push('');\n }\n \n if (data.accessibility.length > 0) {\n sections.push('## ♿ Acessibilidade');\n sections.push('');\n for (const item of data.accessibility) {\n sections.push(`- **Melhoria:** ${item}`);\n }\n sections.push('');\n sections.push('---');\n sections.push('');\n }\n \n if (data.notes.length > 0) {\n sections.push('## 📝 Anotações');\n sections.push('');\n for (const item of data.notes) {\n sections.push(`- **Aprimoramento:** ${item}`);\n }\n sections.push('');\n sections.push('---');\n sections.push('');\n }\n \n if (data.library.length > 0) {\n sections.push('## 📚 Biblioteca');\n sections.push('');\n for (const item of data.library) {\n sections.push(`- **Adição:** ${item}`);\n }\n sections.push('');\n sections.push('---');\n sections.push('');\n }\n \n if (data.search.length > 0) {\n sections.push('## 🔍 Busca');\n sections.push('');\n for (const item of data.search) {\n sections.push(`- **Melhoria:** ${item}`);\n }\n sections.push('');\n sections.push('---');\n sections.push('');\n }\n \n if (data.bugfixes.length > 0) {\n sections.push('## 🐛 Correções de Bugs');\n sections.push('');\n for (const item of data.bugfixes) {\n sections.push(`- **Corrigido:** ${item}`);\n }\n sections.push('');\n sections.push('---');\n sections.push('');\n }\n \n if (data.performance.length > 0) {\n sections.push('## 🚀 Performance');\n sections.push('');\n for (const item of data.performance) {\n sections.push(`- **Otimização:** ${item}`);\n }\n sections.push('');\n sections.push('---');\n sections.push('');\n }\n \n if (data.uiux.length > 0) {\n sections.push('## 🎨 UI/UX');\n sections.push('');\n for (const item of data.uiux) {\n sections.push(`- **Atualização:** ${item}`);\n }\n sections.push('');\n sections.push('---');\n sections.push('');\n }\n \n if (data.breaking.length > 0) {\n sections.push('## ⚠️ Mudanças Incompatíveis (Breaking Changes)');\n sections.push('');\n for (const item of data.breaking) {\n sections.push(`- **Mudança:** ${item}`);\n }\n sections.push('');\n sections.push('---');\n sections.push('');\n }\n \n if (data.dependencies.length > 0) {\n sections.push('## 📦 Dependências');\n sections.push('');\n for (const item of data.dependencies) {\n sections.push(`- ${item}`);\n }\n sections.push('');\n sections.push('---');\n sections.push('');\n }\n \n if (data.contributors.length > 0) {\n sections.push('## 🙏 Colaboradores');\n sections.push('');\n sections.push('Agradecimentos a todos os colaboradores que tornaram esta versão possível!');\n sections.push('');\n for (const contributor of data.contributors) {\n sections.push(`- @${contributor.toLowerCase().replace(/\\s+/g, '')}`);\n }\n sections.push('');\n sections.push('---');\n sections.push('');\n }\n \n sections.push('## 📄 Changelog Completo');\n sections.push('');\n sections.push(`[Link para o changelog completo](https://github.com/sua-org/seu-repo/compare/v${data.version}...v${data.version})`);\n sections.push('');\n \n return sections.join('\\n');\n }\n\n private extractFeatureName(item: string): string {\n const match = item.match(/^([^:]+):/);\n return match ? match[1].trim() : 'Novo Recurso';\n }\n\n private extractFeatureDesc(item: string): string {\n return item.replace(/^[^:]+:/, '').trim() || item;\n }\n\n private extractContent(content: unknown): string {\n if (typeof content === 'string') return content;\n if (Array.isArray(content) && content.length > 0) {\n const first = content[0];\n if (typeof first === 'object' && first !== null && 'text' in first) {\n return String(first.text);\n }\n }\n return String(content);\n }\n}\n"],"names":["ReleaseNotesService","generateReleaseNotes","sinceTag","version","cwd","process","releaseVersion","detectVersion","today","Date","dateStr","toLocaleDateString","fileName","getDate","toString","padStart","getMonth","getFullYear","commits","getCommitsSince","changedFiles","getChangedFiles","dependencies","getDependencyChanges","aiData","generateAIAnalysis","notes","buildReleaseNotes","date","features","accessibility","library","search","bugfixes","performance","uiux","breaking","length","contributors","getContributors","releaseDir","path","join","fs","existsSync","mkdirSync","recursive","filePath","writeFileSync","success","content","error","message","pkg","JSON","parse","readFileSync","tag","execSync","encoding","trim","replace","cmd","output","split","filter","l","f","changes","diff","includes","deps","devDependencies","name","Object","entries","slice","push","n","llm","multiLlmService","createModel","commitMessages","map","c","parts","prompt","response","invoke","SystemMessage","HumanMessage","extractContent","jsonMatch","match","parsed","data","sections","item","extractFeatureName","extractFeatureDesc","contributor","toLowerCase","Array","isArray","first","String","text"],"mappings":";;;;+BAwBaA;;;eAAAA;;;wBAxBc;+BACF;0BACmB;iCACZ;4DACZ;8DACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBf,IAAA,AAAMA,sBAAN,MAAMA;IAGX,MAAMC,qBACJC,QAAiB,EACjBC,OAAgB,EACoE;QACpF,IAAI;YACF,MAAMC,MAAMC,QAAQD,GAAG;YAEvB,MAAME,iBAAiBH,WAAW,IAAI,CAACI,aAAa;YAEpD,MAAMC,QAAQ,IAAIC;YAClB,MAAMC,UAAUF,MAAMG,kBAAkB,CAAC;YACzC,MAAMC,WAAW,GAAGJ,MAAMK,OAAO,GAAGC,QAAQ,GAAGC,QAAQ,CAAC,GAAG,KAAK,CAAC,EAAE,AAACP,CAAAA,MAAMQ,QAAQ,KAAK,CAAA,EAAGF,QAAQ,GAAGC,QAAQ,CAAC,GAAG,KAAK,CAAC,EAAEP,MAAMS,WAAW,GAAG,GAAG,CAAC;YAEjJ,MAAMC,UAAU,IAAI,CAACC,eAAe,CAACjB;YAErC,MAAMkB,eAAe,IAAI,CAACC,eAAe,CAACnB;YAE1C,MAAMoB,eAAe,IAAI,CAACC,oBAAoB;YAE9C,MAAMC,SAAS,MAAM,IAAI,CAACC,kBAAkB,CAACP,SAASE;Y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AASnB,IAAI,CAAC;QAEd,OAAOmB,SAAStD,IAAI,CAAC;IACvB;IAEQwD,mBAAmBD,IAAY,EAAU;QAC/C,MAAMJ,QAAQI,KAAKJ,KAAK,CAAC;QACzB,OAAOA,QAAQA,KAAK,CAAC,EAAE,CAACjC,IAAI,KAAK;IACnC;IAEQuC,mBAAmBF,IAAY,EAAU;QAC/C,OAAOA,KAAKpC,OAAO,CAAC,WAAW,IAAID,IAAI,MAAMqC;IAC/C;IAEQN,eAAezC,OAAgB,EAAU;QAC/C,IAAI,OAAOA,YAAY,UAAU,OAAOA;QACxC,IAAIoD,MAAMC,OAAO,CAACrD,YAAYA,QAAQb,MAAM,GAAG,GAAG;YAChD,MAAMmE,QAAQtD,OAAO,CAAC,EAAE;YACxB,IAAI,OAAOsD,UAAU,YAAYA,UAAU,QAAQ,UAAUA,OAAO;gBAClE,OAAOC,OAAOD,MAAME,IAAI;YAC1B;QACF;QACA,OAAOD,OAAOvD;IAChB;IAzXA,YAAY,AAAiB8B,eAAgC,CAAE;aAAlCA,kBAAAA;IAAmC;AA0XlE"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+
6
+ //# sourceMappingURL=git.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/modules/git/types/git.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ _export_star(require("./git.types"), exports);
6
+ function _export_star(from, to) {
7
+ Object.keys(from).forEach(function(k) {
8
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
9
+ Object.defineProperty(to, k, {
10
+ enumerable: true,
11
+ get: function() {
12
+ return from[k];
13
+ }
14
+ });
15
+ }
16
+ });
17
+ return from;
18
+ }
19
+
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/modules/git/types/index.ts"],"sourcesContent":["export * from './git.types';\n"],"names":[],"mappings":";;;;qBAAc"}