repo-wrapped 0.0.2 → 0.0.4

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 (38) hide show
  1. package/dist/commands/generate.js +104 -95
  2. package/dist/constants/chronotypes.js +23 -23
  3. package/dist/constants/colors.js +18 -18
  4. package/dist/constants/index.js +18 -18
  5. package/dist/formatters/index.js +17 -17
  6. package/dist/formatters/timeFormatter.js +28 -29
  7. package/dist/generators/html/templates/achievementsSection.js +42 -43
  8. package/dist/generators/html/templates/commitQualitySection.js +25 -26
  9. package/dist/generators/html/templates/contributionGraph.js +47 -48
  10. package/dist/generators/html/templates/impactSection.js +19 -20
  11. package/dist/generators/html/templates/knowledgeSection.js +86 -87
  12. package/dist/generators/html/templates/streakSection.js +8 -9
  13. package/dist/generators/html/templates/timePatternsSection.js +45 -46
  14. package/dist/generators/html/utils/colorUtils.js +21 -21
  15. package/dist/generators/html/utils/commitMapBuilder.js +23 -24
  16. package/dist/generators/html/utils/dateRangeCalculator.js +56 -57
  17. package/dist/generators/html/utils/developerStatsCalculator.js +28 -29
  18. package/dist/generators/html/utils/scriptLoader.js +15 -16
  19. package/dist/generators/html/utils/styleLoader.js +17 -18
  20. package/dist/generators/html/utils/weekGrouper.js +27 -28
  21. package/dist/index.js +99 -77
  22. package/dist/types/index.js +2 -2
  23. package/dist/utils/achievementDefinitions.js +433 -433
  24. package/dist/utils/achievementEngine.js +169 -170
  25. package/dist/utils/commitQualityAnalyzer.js +367 -368
  26. package/dist/utils/fileHotspotAnalyzer.js +269 -270
  27. package/dist/utils/gitParser.js +136 -125
  28. package/dist/utils/htmlGenerator.js +232 -233
  29. package/dist/utils/impactAnalyzer.js +247 -248
  30. package/dist/utils/knowledgeDistributionAnalyzer.js +373 -374
  31. package/dist/utils/matrixGenerator.js +349 -350
  32. package/dist/utils/slideGenerator.js +170 -171
  33. package/dist/utils/streakCalculator.js +134 -135
  34. package/dist/utils/timePatternAnalyzer.js +304 -305
  35. package/dist/utils/wrappedDisplay.js +124 -115
  36. package/dist/utils/wrappedGenerator.js +376 -377
  37. package/dist/utils/wrappedHtmlGenerator.js +105 -106
  38. package/package.json +10 -10
@@ -1,115 +1,124 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.displayWrappedSlideshow = void 0;
30
- const chalk_1 = __importDefault(require("chalk"));
31
- const readline = __importStar(require("readline"));
32
- function displayWrappedSlideshow(slides) {
33
- let currentSlide = 0;
34
- const rl = readline.createInterface({
35
- input: process.stdin,
36
- output: process.stdout
37
- });
38
- // Set raw mode to capture single keystrokes
39
- if (process.stdin.isTTY) {
40
- readline.emitKeypressEvents(process.stdin);
41
- process.stdin.setRawMode(true);
42
- }
43
- function displaySlide(index) {
44
- console.clear();
45
- console.log(slides[index].content);
46
- console.log();
47
- // Show navigation hints
48
- const hints = [];
49
- if (index < slides.length - 1)
50
- hints.push(chalk_1.default.gray('Press ENTER for next'));
51
- if (index > 0)
52
- hints.push(chalk_1.default.gray('Press B for back'));
53
- hints.push(chalk_1.default.gray('Press Q to quit'));
54
- console.log(chalk_1.default.dim(hints.join(' | ')));
55
- console.log();
56
- console.log(chalk_1.default.gray(`Slide ${index + 1}/${slides.length}`));
57
- }
58
- function navigate(direction) {
59
- if (direction === 'quit') {
60
- cleanup();
61
- return;
62
- }
63
- if (direction === 'next' && currentSlide < slides.length - 1) {
64
- currentSlide++;
65
- displaySlide(currentSlide);
66
- }
67
- else if (direction === 'next' && currentSlide === slides.length - 1) {
68
- // At the end
69
- cleanup();
70
- }
71
- else if (direction === 'prev' && currentSlide > 0) {
72
- currentSlide--;
73
- displaySlide(currentSlide);
74
- }
75
- }
76
- function cleanup() {
77
- if (process.stdin.isTTY) {
78
- process.stdin.setRawMode(false);
79
- }
80
- rl.close();
81
- console.log();
82
- console.log(chalk_1.default.green('✨ Thanks for exploring your Year in Code!'));
83
- console.log();
84
- }
85
- // Handle keypress events
86
- process.stdin.on('keypress', (str, key) => {
87
- if (key.ctrl && key.name === 'c') {
88
- cleanup();
89
- process.exit();
90
- }
91
- switch (key.name) {
92
- case 'return':
93
- case 'enter':
94
- case 'space':
95
- navigate('next');
96
- break;
97
- case 'b':
98
- navigate('prev');
99
- break;
100
- case 'q':
101
- case 'escape':
102
- navigate('quit');
103
- break;
104
- case 'left':
105
- navigate('prev');
106
- break;
107
- case 'right':
108
- navigate('next');
109
- break;
110
- }
111
- });
112
- // Display first slide
113
- displaySlide(currentSlide);
114
- }
115
- exports.displayWrappedSlideshow = displayWrappedSlideshow;
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.displayWrappedSlideshow = displayWrappedSlideshow;
40
+ const chalk_1 = __importDefault(require("chalk"));
41
+ const readline = __importStar(require("readline"));
42
+ function displayWrappedSlideshow(slides) {
43
+ let currentSlide = 0;
44
+ const rl = readline.createInterface({
45
+ input: process.stdin,
46
+ output: process.stdout
47
+ });
48
+ // Set raw mode to capture single keystrokes
49
+ if (process.stdin.isTTY) {
50
+ readline.emitKeypressEvents(process.stdin);
51
+ process.stdin.setRawMode(true);
52
+ }
53
+ function displaySlide(index) {
54
+ console.clear();
55
+ console.log(slides[index].content);
56
+ console.log();
57
+ // Show navigation hints
58
+ const hints = [];
59
+ if (index < slides.length - 1)
60
+ hints.push(chalk_1.default.gray('Press ENTER for next'));
61
+ if (index > 0)
62
+ hints.push(chalk_1.default.gray('Press B for back'));
63
+ hints.push(chalk_1.default.gray('Press Q to quit'));
64
+ console.log(chalk_1.default.dim(hints.join(' | ')));
65
+ console.log();
66
+ console.log(chalk_1.default.gray(`Slide ${index + 1}/${slides.length}`));
67
+ }
68
+ function navigate(direction) {
69
+ if (direction === 'quit') {
70
+ cleanup();
71
+ return;
72
+ }
73
+ if (direction === 'next' && currentSlide < slides.length - 1) {
74
+ currentSlide++;
75
+ displaySlide(currentSlide);
76
+ }
77
+ else if (direction === 'next' && currentSlide === slides.length - 1) {
78
+ // At the end
79
+ cleanup();
80
+ }
81
+ else if (direction === 'prev' && currentSlide > 0) {
82
+ currentSlide--;
83
+ displaySlide(currentSlide);
84
+ }
85
+ }
86
+ function cleanup() {
87
+ if (process.stdin.isTTY) {
88
+ process.stdin.setRawMode(false);
89
+ }
90
+ rl.close();
91
+ console.log();
92
+ console.log(chalk_1.default.green('✨ Thanks for exploring your Year in Code!'));
93
+ console.log();
94
+ }
95
+ // Handle keypress events
96
+ process.stdin.on('keypress', (str, key) => {
97
+ if (key.ctrl && key.name === 'c') {
98
+ cleanup();
99
+ process.exit();
100
+ }
101
+ switch (key.name) {
102
+ case 'return':
103
+ case 'enter':
104
+ case 'space':
105
+ navigate('next');
106
+ break;
107
+ case 'b':
108
+ navigate('prev');
109
+ break;
110
+ case 'q':
111
+ case 'escape':
112
+ navigate('quit');
113
+ break;
114
+ case 'left':
115
+ navigate('prev');
116
+ break;
117
+ case 'right':
118
+ navigate('next');
119
+ break;
120
+ }
121
+ });
122
+ // Display first slide
123
+ displaySlide(currentSlide);
124
+ }