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.
- package/.github/agents/complete.agent.md +257 -0
- package/.github/agents/feature-scaffold.agent.md +248 -0
- package/.github/agents/jsdoc.agent.md +243 -0
- package/.github/agents/plan.agent.md +202 -0
- package/.github/agents/spec-writer.agent.md +169 -0
- package/.github/agents/test-writer.agent.md +169 -0
- package/.stylelintrc.json +27 -0
- package/README.md +94 -94
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +446 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +446 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov.info +7039 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +210 -0
- package/dist/commands/generate.js +262 -5
- package/dist/config/defaults.js +158 -0
- package/dist/config/index.js +10 -0
- package/dist/features/achievements/data/achievements.json +284 -0
- package/dist/features/achievements/engine.js +140 -0
- package/dist/features/achievements/evaluators.js +246 -0
- package/dist/features/achievements/helpers.js +58 -0
- package/dist/features/achievements/index.js +57 -0
- package/dist/features/achievements/loader.js +88 -0
- package/dist/features/achievements/template.js +155 -0
- package/dist/features/achievements/types.js +7 -0
- package/dist/features/commit-quality/analyzer.js +378 -0
- package/dist/features/commit-quality/analyzer.test.js +484 -0
- package/dist/features/commit-quality/index.js +28 -0
- package/dist/features/commit-quality/template.js +114 -0
- package/dist/features/commit-quality/types.js +2 -0
- package/dist/features/comparison/analyzer.js +222 -0
- package/dist/features/comparison/index.js +28 -0
- package/dist/features/comparison/template.js +119 -0
- package/dist/features/comparison/types.js +2 -0
- package/dist/features/contribution-graph/index.js +9 -0
- package/dist/features/contribution-graph/template.js +89 -0
- package/dist/features/events/index.js +31 -0
- package/dist/features/events/parser.js +253 -0
- package/dist/features/events/template.js +113 -0
- package/dist/features/events/types.js +2 -0
- package/dist/features/executive-summary/generator.js +275 -0
- package/dist/features/executive-summary/index.js +27 -0
- package/dist/features/executive-summary/template.js +80 -0
- package/dist/features/executive-summary/types.js +2 -0
- package/dist/features/gaps/analyzer.js +298 -0
- package/dist/features/gaps/analyzer.test.js +517 -0
- package/dist/features/gaps/index.js +27 -0
- package/dist/features/gaps/template.js +190 -0
- package/dist/features/gaps/types.js +2 -0
- package/dist/features/impact/analyzer.js +248 -0
- package/dist/features/impact/index.js +26 -0
- package/dist/features/impact/template.js +118 -0
- package/dist/features/impact/types.js +2 -0
- package/dist/features/index.js +40 -0
- package/dist/features/knowledge/analyzer.js +385 -0
- package/dist/features/knowledge/index.js +26 -0
- package/dist/features/knowledge/template.js +239 -0
- package/dist/features/knowledge/types.js +2 -0
- package/dist/features/streaks/calculator.js +184 -0
- package/dist/features/streaks/calculator.test.js +366 -0
- package/dist/features/streaks/index.js +36 -0
- package/dist/features/streaks/template.js +41 -0
- package/dist/features/streaks/types.js +9 -0
- package/dist/features/team/analyzer.js +316 -0
- package/dist/features/team/index.js +30 -0
- package/dist/features/team/template.js +146 -0
- package/dist/features/team/types.js +2 -0
- package/dist/features/time-patterns/analyzer.js +319 -0
- package/dist/features/time-patterns/analyzer.test.js +278 -0
- package/dist/features/time-patterns/index.js +37 -0
- package/dist/features/time-patterns/template.js +109 -0
- package/dist/features/time-patterns/types.js +9 -0
- package/dist/features/velocity/analyzer.js +257 -0
- package/dist/features/velocity/analyzer.test.js +383 -0
- package/dist/features/velocity/index.js +27 -0
- package/dist/features/velocity/template.js +189 -0
- package/dist/features/velocity/types.js +2 -0
- package/dist/generators/html/scripts/knowledge.js +17 -0
- package/dist/generators/html/styles/base.css +10 -6
- package/dist/generators/html/styles/components.css +121 -1
- package/dist/generators/html/styles/knowledge.css +21 -0
- package/dist/generators/html/styles/leaddev.css +1335 -0
- package/dist/generators/html/styles/strategic-insights.css +1337 -0
- package/dist/generators/html/templates/commitQualitySection.js +28 -2
- package/dist/generators/html/templates/comparisonSection.js +119 -0
- package/dist/generators/html/templates/eventsSection.js +113 -0
- package/dist/generators/html/templates/executiveSummarySection.js +80 -0
- package/dist/generators/html/templates/gapSection.js +190 -0
- package/dist/generators/html/templates/impactSection.js +8 -6
- package/dist/generators/html/templates/knowledgeSection.js +16 -2
- package/dist/generators/html/templates/teamSection.js +146 -0
- package/dist/generators/html/templates/velocitySection.js +189 -0
- package/dist/generators/html/types.js +7 -0
- package/dist/generators/html/utils/analysisRunner.js +93 -0
- package/dist/generators/html/utils/cardBuilder.js +47 -0
- package/dist/generators/html/utils/contextBuilder.js +54 -0
- package/dist/generators/html/utils/htmlDocumentBuilder.js +396 -0
- package/dist/generators/html/utils/kpiBuilder.js +76 -0
- package/dist/generators/html/utils/sectionWrapper.js +71 -0
- package/dist/generators/html/utils/styleLoader.js +2 -1
- package/dist/html/analysisRunner.js +93 -0
- package/dist/html/htmlDocumentBuilder.js +396 -0
- package/dist/html/index.js +29 -0
- package/dist/html/shared/colorUtils.js +61 -0
- package/dist/html/shared/commitMapBuilder.js +23 -0
- package/dist/html/shared/components/cardBuilder.js +47 -0
- package/dist/html/shared/components/index.js +18 -0
- package/dist/html/shared/components/kpiBuilder.js +76 -0
- package/dist/html/shared/components/sectionWrapper.js +71 -0
- package/dist/html/shared/contextBuilder.js +54 -0
- package/dist/html/shared/dateRangeCalculator.js +56 -0
- package/dist/html/shared/developerStatsCalculator.js +28 -0
- package/dist/html/shared/index.js +39 -0
- package/dist/html/shared/scriptLoader.js +15 -0
- package/dist/html/shared/scripts/export.js +125 -0
- package/dist/html/shared/scripts/knowledge.js +137 -0
- package/dist/html/shared/scripts/modal.js +68 -0
- package/dist/html/shared/scripts/navigation.js +156 -0
- package/dist/html/shared/scripts/tabs.js +18 -0
- package/dist/html/shared/scripts/tooltip.js +21 -0
- package/dist/html/shared/styleLoader.js +18 -0
- package/dist/html/shared/styles/achievements.css +387 -0
- package/dist/html/shared/styles/base.css +822 -0
- package/dist/html/shared/styles/components.css +1511 -0
- package/dist/html/shared/styles/knowledge.css +242 -0
- package/dist/html/shared/styles/strategic-insights.css +1337 -0
- package/dist/html/shared/weekGrouper.js +27 -0
- package/dist/html/types.js +7 -0
- package/dist/index.js +54 -21
- package/dist/test/helpers/commitFactory.js +166 -0
- package/dist/test/helpers/dateUtils.js +101 -0
- package/dist/test/helpers/index.js +29 -0
- package/dist/test/setup.js +17 -0
- package/dist/test/smoke.test.js +94 -0
- package/dist/types/achievements.js +7 -0
- package/dist/types/analysis.js +7 -0
- package/dist/types/core.js +7 -0
- package/dist/types/index.js +38 -0
- package/dist/types/options.js +7 -0
- package/dist/types/shared.js +7 -0
- package/dist/types/strategic.js +7 -0
- package/dist/types/summary.js +7 -0
- package/dist/utils/achievementDefinitions.js +22 -22
- package/dist/utils/analyzerContextBuilder.js +124 -0
- package/dist/utils/commitQualityAnalyzer.js +13 -2
- package/dist/utils/emptyResults.js +95 -0
- package/dist/utils/eventAnnotationParser.js +253 -0
- package/dist/utils/executiveSummaryGenerator.js +275 -0
- package/dist/utils/fileHotspotAnalyzer.js +4 -12
- package/dist/utils/gapAnalyzer.js +298 -0
- package/dist/utils/gitParser.test.js +363 -0
- package/dist/utils/htmlGenerator.js +126 -450
- package/dist/utils/impactAnalyzer.js +20 -19
- package/dist/utils/knowledgeDistributionAnalyzer.js +32 -27
- package/dist/utils/matrixGenerator.js +13 -13
- package/dist/utils/rangeComparisonAnalyzer.js +222 -0
- package/dist/utils/streakCalculator.js +77 -27
- package/dist/utils/teamAnalyzer.js +316 -0
- package/dist/utils/timePatternAnalyzer.js +18 -3
- package/dist/utils/velocityAnalyzer.js +257 -0
- package/dist/utils/wrappedGenerator.js +8 -8
- package/package.json +74 -55
- package/vitest.config.ts +46 -0
- package/dist/cli.js +0 -24
- package/dist/commands/index.js +0 -24
package/package.json
CHANGED
|
@@ -1,55 +1,74 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "repo-wrapped",
|
|
3
|
-
"version": "0.0.
|
|
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/
|
|
8
|
-
"start": "node dist/index.js",
|
|
9
|
-
"prepublishOnly": "npm run build",
|
|
10
|
-
"test": "
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
},
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"
|
|
50
|
-
},
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
"
|
|
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
|
+
}
|
package/vitest.config.ts
ADDED
|
@@ -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);
|
package/dist/commands/index.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 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;
|