repo-wrapped 0.0.6 → 0.0.9

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 (176) hide show
  1. package/.github/agents/complete.agent.md +257 -0
  2. package/.github/agents/feature-scaffold.agent.md +248 -0
  3. package/.github/agents/jsdoc.agent.md +243 -0
  4. package/.github/agents/plan.agent.md +202 -0
  5. package/.github/agents/spec-writer.agent.md +169 -0
  6. package/.github/agents/test-writer.agent.md +169 -0
  7. package/.stylelintrc.json +27 -0
  8. package/README.md +94 -94
  9. package/coverage/base.css +224 -0
  10. package/coverage/block-navigation.js +87 -0
  11. package/coverage/favicon.png +0 -0
  12. package/coverage/index.html +446 -0
  13. package/coverage/lcov-report/base.css +224 -0
  14. package/coverage/lcov-report/block-navigation.js +87 -0
  15. package/coverage/lcov-report/favicon.png +0 -0
  16. package/coverage/lcov-report/index.html +446 -0
  17. package/coverage/lcov-report/prettify.css +1 -0
  18. package/coverage/lcov-report/prettify.js +2 -0
  19. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  20. package/coverage/lcov-report/sorter.js +210 -0
  21. package/coverage/lcov.info +7039 -0
  22. package/coverage/prettify.css +1 -0
  23. package/coverage/prettify.js +2 -0
  24. package/coverage/sort-arrow-sprite.png +0 -0
  25. package/coverage/sorter.js +210 -0
  26. package/dist/commands/generate.js +262 -5
  27. package/dist/config/defaults.js +158 -0
  28. package/dist/config/index.js +10 -0
  29. package/dist/features/achievements/data/achievements.json +284 -0
  30. package/dist/features/achievements/engine.js +140 -0
  31. package/dist/features/achievements/evaluators.js +246 -0
  32. package/dist/features/achievements/helpers.js +58 -0
  33. package/dist/features/achievements/index.js +57 -0
  34. package/dist/features/achievements/loader.js +88 -0
  35. package/dist/features/achievements/template.js +155 -0
  36. package/dist/features/achievements/types.js +7 -0
  37. package/dist/features/commit-quality/analyzer.js +378 -0
  38. package/dist/features/commit-quality/analyzer.test.js +484 -0
  39. package/dist/features/commit-quality/index.js +28 -0
  40. package/dist/features/commit-quality/template.js +114 -0
  41. package/dist/features/commit-quality/types.js +2 -0
  42. package/dist/features/comparison/analyzer.js +222 -0
  43. package/dist/features/comparison/index.js +28 -0
  44. package/dist/features/comparison/template.js +119 -0
  45. package/dist/features/comparison/types.js +2 -0
  46. package/dist/features/contribution-graph/index.js +9 -0
  47. package/dist/features/contribution-graph/template.js +89 -0
  48. package/dist/features/events/index.js +31 -0
  49. package/dist/features/events/parser.js +253 -0
  50. package/dist/features/events/template.js +113 -0
  51. package/dist/features/events/types.js +2 -0
  52. package/dist/features/executive-summary/generator.js +275 -0
  53. package/dist/features/executive-summary/index.js +27 -0
  54. package/dist/features/executive-summary/template.js +80 -0
  55. package/dist/features/executive-summary/types.js +2 -0
  56. package/dist/features/gaps/analyzer.js +298 -0
  57. package/dist/features/gaps/analyzer.test.js +517 -0
  58. package/dist/features/gaps/index.js +27 -0
  59. package/dist/features/gaps/template.js +190 -0
  60. package/dist/features/gaps/types.js +2 -0
  61. package/dist/features/impact/analyzer.js +248 -0
  62. package/dist/features/impact/index.js +26 -0
  63. package/dist/features/impact/template.js +118 -0
  64. package/dist/features/impact/types.js +2 -0
  65. package/dist/features/index.js +40 -0
  66. package/dist/features/knowledge/analyzer.js +385 -0
  67. package/dist/features/knowledge/index.js +26 -0
  68. package/dist/features/knowledge/template.js +239 -0
  69. package/dist/features/knowledge/types.js +2 -0
  70. package/dist/features/streaks/calculator.js +184 -0
  71. package/dist/features/streaks/calculator.test.js +366 -0
  72. package/dist/features/streaks/index.js +36 -0
  73. package/dist/features/streaks/template.js +41 -0
  74. package/dist/features/streaks/types.js +9 -0
  75. package/dist/features/team/analyzer.js +316 -0
  76. package/dist/features/team/index.js +30 -0
  77. package/dist/features/team/template.js +146 -0
  78. package/dist/features/team/types.js +2 -0
  79. package/dist/features/time-patterns/analyzer.js +319 -0
  80. package/dist/features/time-patterns/analyzer.test.js +278 -0
  81. package/dist/features/time-patterns/index.js +37 -0
  82. package/dist/features/time-patterns/template.js +109 -0
  83. package/dist/features/time-patterns/types.js +9 -0
  84. package/dist/features/velocity/analyzer.js +257 -0
  85. package/dist/features/velocity/analyzer.test.js +383 -0
  86. package/dist/features/velocity/index.js +27 -0
  87. package/dist/features/velocity/template.js +189 -0
  88. package/dist/features/velocity/types.js +2 -0
  89. package/dist/generators/html/scripts/knowledge.js +17 -0
  90. package/dist/generators/html/styles/base.css +10 -6
  91. package/dist/generators/html/styles/components.css +121 -1
  92. package/dist/generators/html/styles/knowledge.css +21 -0
  93. package/dist/generators/html/styles/leaddev.css +1335 -0
  94. package/dist/generators/html/styles/strategic-insights.css +1337 -0
  95. package/dist/generators/html/templates/commitQualitySection.js +28 -2
  96. package/dist/generators/html/templates/comparisonSection.js +119 -0
  97. package/dist/generators/html/templates/eventsSection.js +113 -0
  98. package/dist/generators/html/templates/executiveSummarySection.js +80 -0
  99. package/dist/generators/html/templates/gapSection.js +190 -0
  100. package/dist/generators/html/templates/impactSection.js +8 -6
  101. package/dist/generators/html/templates/knowledgeSection.js +16 -2
  102. package/dist/generators/html/templates/teamSection.js +146 -0
  103. package/dist/generators/html/templates/velocitySection.js +189 -0
  104. package/dist/generators/html/types.js +7 -0
  105. package/dist/generators/html/utils/analysisRunner.js +93 -0
  106. package/dist/generators/html/utils/cardBuilder.js +47 -0
  107. package/dist/generators/html/utils/contextBuilder.js +54 -0
  108. package/dist/generators/html/utils/htmlDocumentBuilder.js +396 -0
  109. package/dist/generators/html/utils/kpiBuilder.js +76 -0
  110. package/dist/generators/html/utils/sectionWrapper.js +71 -0
  111. package/dist/generators/html/utils/styleLoader.js +2 -1
  112. package/dist/html/analysisRunner.js +93 -0
  113. package/dist/html/htmlDocumentBuilder.js +396 -0
  114. package/dist/html/index.js +29 -0
  115. package/dist/html/shared/colorUtils.js +61 -0
  116. package/dist/html/shared/commitMapBuilder.js +23 -0
  117. package/dist/html/shared/components/cardBuilder.js +47 -0
  118. package/dist/html/shared/components/index.js +18 -0
  119. package/dist/html/shared/components/kpiBuilder.js +76 -0
  120. package/dist/html/shared/components/sectionWrapper.js +71 -0
  121. package/dist/html/shared/contextBuilder.js +54 -0
  122. package/dist/html/shared/dateRangeCalculator.js +56 -0
  123. package/dist/html/shared/developerStatsCalculator.js +28 -0
  124. package/dist/html/shared/index.js +39 -0
  125. package/dist/html/shared/scriptLoader.js +15 -0
  126. package/dist/html/shared/scripts/export.js +125 -0
  127. package/dist/html/shared/scripts/knowledge.js +137 -0
  128. package/dist/html/shared/scripts/modal.js +68 -0
  129. package/dist/html/shared/scripts/navigation.js +156 -0
  130. package/dist/html/shared/scripts/tabs.js +18 -0
  131. package/dist/html/shared/scripts/tooltip.js +21 -0
  132. package/dist/html/shared/styleLoader.js +18 -0
  133. package/dist/html/shared/styles/achievements.css +387 -0
  134. package/dist/html/shared/styles/base.css +822 -0
  135. package/dist/html/shared/styles/components.css +1511 -0
  136. package/dist/html/shared/styles/knowledge.css +242 -0
  137. package/dist/html/shared/styles/strategic-insights.css +1337 -0
  138. package/dist/html/shared/weekGrouper.js +27 -0
  139. package/dist/html/types.js +7 -0
  140. package/dist/index.js +54 -21
  141. package/dist/test/helpers/commitFactory.js +166 -0
  142. package/dist/test/helpers/dateUtils.js +101 -0
  143. package/dist/test/helpers/index.js +29 -0
  144. package/dist/test/setup.js +17 -0
  145. package/dist/test/smoke.test.js +94 -0
  146. package/dist/types/achievements.js +7 -0
  147. package/dist/types/analysis.js +7 -0
  148. package/dist/types/core.js +7 -0
  149. package/dist/types/index.js +38 -0
  150. package/dist/types/options.js +7 -0
  151. package/dist/types/shared.js +7 -0
  152. package/dist/types/strategic.js +7 -0
  153. package/dist/types/summary.js +7 -0
  154. package/dist/utils/achievementDefinitions.js +22 -22
  155. package/dist/utils/analyzerContextBuilder.js +124 -0
  156. package/dist/utils/commitQualityAnalyzer.js +13 -2
  157. package/dist/utils/emptyResults.js +95 -0
  158. package/dist/utils/eventAnnotationParser.js +253 -0
  159. package/dist/utils/executiveSummaryGenerator.js +275 -0
  160. package/dist/utils/fileHotspotAnalyzer.js +4 -12
  161. package/dist/utils/gapAnalyzer.js +298 -0
  162. package/dist/utils/gitParser.test.js +363 -0
  163. package/dist/utils/htmlGenerator.js +126 -450
  164. package/dist/utils/impactAnalyzer.js +20 -19
  165. package/dist/utils/knowledgeDistributionAnalyzer.js +32 -27
  166. package/dist/utils/matrixGenerator.js +13 -13
  167. package/dist/utils/rangeComparisonAnalyzer.js +222 -0
  168. package/dist/utils/streakCalculator.js +77 -27
  169. package/dist/utils/teamAnalyzer.js +316 -0
  170. package/dist/utils/timePatternAnalyzer.js +18 -3
  171. package/dist/utils/velocityAnalyzer.js +257 -0
  172. package/dist/utils/wrappedGenerator.js +8 -8
  173. package/package.json +74 -55
  174. package/vitest.config.ts +46 -0
  175. package/dist/cli.js +0 -24
  176. package/dist/commands/index.js +0 -24
package/package.json CHANGED
@@ -1,55 +1,74 @@
1
- {
2
- "name": "repo-wrapped",
3
- "version": "0.0.6",
4
- "description": "A tool to generate Git repository analytics and visualizations in CLI or HTML.",
5
- "main": "dist/index.js",
6
- "scripts": {
7
- "build": "tsc && shx cp -r src/generators/html/styles dist/generators/html/ && shx cp -r src/generators/html/scripts dist/generators/html/",
8
- "start": "node dist/index.js",
9
- "prepublishOnly": "npm run build",
10
- "test": "echo \"No tests specified\" && exit 0",
11
- "release:patch": "npm version patch && npm publish",
12
- "release:minor": "npm version minor && npm publish",
13
- "release:major": "npm version major && npm publish",
14
- "release:dry": "npm publish --dry-run",
15
- "preversion": "npm run build",
16
- "postversion": "git push && git push --tags"
17
- },
18
- "bin": {
19
- "repo-wrapped": "dist/index.js"
20
- },
21
- "dependencies": {
22
- "chalk": "5.6.2",
23
- "commander": "14.0.3",
24
- "date-fns": "4.1.0",
25
- "ora": "9.1.0"
26
- },
27
- "devDependencies": {
28
- "@types/node": "25.1.0",
29
- "shx": "0.4.0",
30
- "typescript": "5.9.3"
31
- },
32
- "keywords": [
33
- "cli",
34
- "git",
35
- "commit",
36
- "matrix",
37
- "visualization",
38
- "gitlab",
39
- "contributions",
40
- "analytics"
41
- ],
42
- "author": "Kevin Hahn",
43
- "license": "MIT",
44
- "repository": {
45
- "type": "git",
46
- "url": "git+https://gitlab.com/hahn-ai/repo-wrapped.git"
47
- },
48
- "bugs": {
49
- "url": "https://gitlab.com/hahn-ai/repo-wrapped/issues"
50
- },
51
- "homepage": "https://gitlab.com/hahn-ai/repo-wrapped#readme",
52
- "engines": {
53
- "node": ">=24.0.0"
54
- }
55
- }
1
+ {
2
+ "name": "repo-wrapped",
3
+ "version": "0.0.9",
4
+ "description": "A tool to generate Git repository analytics and visualizations in CLI or HTML.",
5
+ "main": "dist/index.js",
6
+ "scripts": {
7
+ "build": "tsc && shx cp -r src/html/shared/styles dist/html/shared/ && shx cp -r src/html/shared/scripts dist/html/shared/",
8
+ "start": "node dist/index.js",
9
+ "prepublishOnly": "npm run build",
10
+ "test": "vitest run",
11
+ "test:watch": "vitest",
12
+ "test:coverage": "vitest run --coverage",
13
+ "test:ui": "vitest --ui --coverage",
14
+ "lint:css": "stylelint \"src/**/*.css\"",
15
+ "lint:css:fix": "stylelint \"src/**/*.css\" --fix",
16
+ "release:patch": "npm version patch && npm publish",
17
+ "release:minor": "npm version minor && npm publish",
18
+ "release:major": "npm version major && npm publish",
19
+ "release:dry": "npm publish --dry-run",
20
+ "preversion": "npm run build",
21
+ "postversion": "git push && git push --tags",
22
+ "debug:html": "npm run build && node dist/index.js generate . --html",
23
+ "debug:html:all": "npm run build && node dist/index.js generate . --html --all",
24
+ "debug:html:deep": "npm run build && node dist/index.js generate . --html --deep-analysis",
25
+ "debug:html:velocity": "npm run build && node dist/index.js generate . --html --velocity",
26
+ "debug:html:gaps": "npm run build && node dist/index.js generate . --html --gap-analysis",
27
+ "debug:html:executive": "npm run build && node dist/index.js generate . --html --executive-summary",
28
+ "debug:html:compare": "npm run build && node dist/index.js generate . --html --compare 2025-01-01..2025-06-30 2025-07-01..2025-12-31 --compare-labels H1,H2",
29
+ "debug:html:strategic": "npm run build && node dist/index.js generate . --html --velocity --gap-analysis --executive-summary",
30
+ "debug:html:full": "npm run build && node dist/index.js generate . --html --all --deep-analysis --velocity --gap-analysis --executive-summary"
31
+ },
32
+ "bin": {
33
+ "repo-wrapped": "dist/index.js"
34
+ },
35
+ "dependencies": {
36
+ "chalk": "5.6.2",
37
+ "commander": "14.0.3",
38
+ "date-fns": "4.1.0",
39
+ "ora": "9.1.0"
40
+ },
41
+ "devDependencies": {
42
+ "@types/node": "25.1.0",
43
+ "@vitest/coverage-v8": "^4.0.18",
44
+ "@vitest/ui": "^4.0.18",
45
+ "shx": "0.4.0",
46
+ "stylelint": "^17.1.0",
47
+ "stylelint-config-standard": "^40.0.0",
48
+ "typescript": "5.9.3",
49
+ "vitest": "^4.0.18"
50
+ },
51
+ "keywords": [
52
+ "cli",
53
+ "git",
54
+ "commit",
55
+ "matrix",
56
+ "visualization",
57
+ "gitlab",
58
+ "contributions",
59
+ "analytics"
60
+ ],
61
+ "author": "Kevin Hahn",
62
+ "license": "MIT",
63
+ "repository": {
64
+ "type": "git",
65
+ "url": "git+https://gitlab.com/hahn-ai/git-wrapped.git"
66
+ },
67
+ "bugs": {
68
+ "url": "https://gitlab.com/hahn-ai/repo-wrapped/issues"
69
+ },
70
+ "homepage": "https://gitlab.com/hahn-ai/repo-wrapped#readme",
71
+ "engines": {
72
+ "node": ">=24.0.0"
73
+ }
74
+ }
@@ -0,0 +1,46 @@
1
+ import { defineConfig } from 'vitest/config';
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ // Global test settings
6
+ globals: true,
7
+
8
+ // Environment
9
+ environment: 'node',
10
+
11
+ // Include patterns
12
+ include: ['src/**/*.test.ts', 'src/**/*.spec.ts'],
13
+
14
+ // Exclude patterns
15
+ exclude: ['node_modules', 'dist', '.spec'],
16
+
17
+ // Coverage configuration
18
+ coverage: {
19
+ provider: 'v8',
20
+ reporter: ['text', 'html', 'lcov'],
21
+ include: ['src/**/*.ts'],
22
+ exclude: [
23
+ 'src/**/*.test.ts',
24
+ 'src/**/*.spec.ts',
25
+ 'src/test/**',
26
+ 'src/types/**',
27
+ ],
28
+ thresholds: {
29
+ // Start with achievable thresholds, increase over time
30
+ lines: 50,
31
+ functions: 50,
32
+ branches: 50,
33
+ statements: 50,
34
+ },
35
+ },
36
+
37
+ // Setup files
38
+ setupFiles: ['src/test/setup.ts'],
39
+
40
+ // Timeout
41
+ testTimeout: 10000,
42
+
43
+ // Reporter
44
+ reporters: ['verbose'],
45
+ },
46
+ });
package/dist/cli.js DELETED
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const commander_1 = require("commander");
4
- const gitParser_1 = require("./utils/gitParser");
5
- const matrixGenerator_1 = require("./utils/matrixGenerator");
6
- const program = new commander_1.Command();
7
- program
8
- .command('generate-matrix <repoPath>')
9
- .description('Generate a GitHub-like commit matrix for the specified repository')
10
- .option('-y, --year <year>', 'Year to generate matrix for', String(new Date().getFullYear()))
11
- .option('-m, --month <month>', 'Month to generate matrix for (1-12)', String(new Date().getMonth() + 1))
12
- .action(async (repoPath, options) => {
13
- try {
14
- const commits = (0, gitParser_1.parseGitCommits)(repoPath);
15
- const year = parseInt(options.year);
16
- const month = parseInt(options.month);
17
- const matrix = (0, matrixGenerator_1.generateCommitMatrix)(commits, year, month, repoPath);
18
- console.log(matrix);
19
- }
20
- catch (error) {
21
- console.error('Error generating commit matrix:', error);
22
- }
23
- });
24
- program.parse(process.argv);
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const commander_1 = require("commander");
4
- const gitParser_1 = require("../utils/gitParser");
5
- const matrixGenerator_1 = require("../utils/matrixGenerator");
6
- const program = new commander_1.Command();
7
- program
8
- .command('generate-matrix <repoPath>')
9
- .description('Generate a GitHub-like commit visualization for the specified repository')
10
- .option('-y, --year <year>', 'Year to generate visualization for', String(new Date().getFullYear()))
11
- .option('-m, --month <month>', 'Month to generate visualization for (1-12)', String(new Date().getMonth() + 1))
12
- .action(async (repoPath, options) => {
13
- try {
14
- const commits = (0, gitParser_1.parseGitCommits)(repoPath);
15
- const year = parseInt(options.year);
16
- const month = parseInt(options.month);
17
- const matrix = (0, matrixGenerator_1.generateCommitMatrix)(commits, year, month, repoPath);
18
- console.log(matrix);
19
- }
20
- catch (error) {
21
- console.error('Error generating commit visualization:', error);
22
- }
23
- });
24
- exports.default = program;