faf-taf-git 2.0.4 → 2.2.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 (48) hide show
  1. package/.github/workflows/ci.yml +53 -0
  2. package/.github/workflows/claude-code-review.yml.disabled +29 -0
  3. package/.github/workflows/claude.yml +39 -0
  4. package/.github/workflows/homebrew.yml +19 -0
  5. package/.taf +79 -2
  6. package/CHANGELOG.md +28 -0
  7. package/CLAUDE.md +29 -21
  8. package/CODE_OF_CONDUCT.md +21 -0
  9. package/CONTRIBUTING.md +3 -0
  10. package/README.md +69 -12
  11. package/SECURITY.md +19 -0
  12. package/action.yml +6 -1
  13. package/badge.svg +21 -0
  14. package/dist/badge.d.ts +23 -0
  15. package/dist/badge.d.ts.map +1 -0
  16. package/dist/badge.js +147 -0
  17. package/dist/badge.js.map +1 -0
  18. package/dist/cli.d.ts +5 -6
  19. package/dist/cli.d.ts.map +1 -1
  20. package/dist/cli.js +144 -193
  21. package/dist/cli.js.map +1 -1
  22. package/dist/index.js +26045 -20566
  23. package/dist/index.js.map +1 -1
  24. package/dist/licenses.txt +0 -22
  25. package/dist/parsers/bun.d.ts +59 -0
  26. package/dist/parsers/bun.d.ts.map +1 -0
  27. package/dist/parsers/bun.js +100 -0
  28. package/dist/parsers/bun.js.map +1 -0
  29. package/dist/parsers/index.d.ts +20 -0
  30. package/dist/parsers/index.d.ts.map +1 -0
  31. package/dist/parsers/index.js +26 -0
  32. package/dist/parsers/index.js.map +1 -0
  33. package/dist/parsers/vitest.d.ts +17 -0
  34. package/dist/parsers/vitest.d.ts.map +1 -0
  35. package/dist/parsers/vitest.js +61 -0
  36. package/dist/parsers/vitest.js.map +1 -0
  37. package/package.json +6 -7
  38. package/project.faf +20 -24
  39. package/src/badge.ts +138 -0
  40. package/src/cli.ts +154 -200
  41. package/src/index.ts +79 -10
  42. package/src/parsers/bun.ts +103 -0
  43. package/src/parsers/index.ts +27 -0
  44. package/src/parsers/vitest.ts +65 -0
  45. package/tests/badge.test.ts +260 -0
  46. package/tests/bun-parser.test.ts +173 -0
  47. package/tests/vitest-parser.test.ts +112 -0
  48. package/.faf +0 -126
@@ -0,0 +1,112 @@
1
+ /**
2
+ * Vitest Parser Tests
3
+ */
4
+
5
+ import { parseVitestOutput } from '../src/parsers/vitest';
6
+
7
+ describe('Vitest Parser', () => {
8
+ describe('parseVitestOutput', () => {
9
+ test('should parse all passing tests', () => {
10
+ const output = `
11
+ ✓ tests/basic.test.ts (3)
12
+ ✓ tests/advanced.test.ts (5)
13
+
14
+ Test Files 2 passed (2)
15
+ Tests 8 passed (8)
16
+ Start at 14:23:45
17
+ Duration 1.23s
18
+ `;
19
+ const result = parseVitestOutput(output);
20
+ expect(result).not.toBeNull();
21
+ expect(result!.total).toBe(8);
22
+ expect(result!.passed).toBe(8);
23
+ expect(result!.failed).toBe(0);
24
+ expect(result!.result).toBe('PASSED');
25
+ });
26
+
27
+ test('should parse with failed tests', () => {
28
+ const output = `
29
+ ❯ tests/basic.test.ts (3)
30
+ ✓ adds numbers
31
+ × fails gracefully
32
+ ✓ handles edge case
33
+
34
+ Test Files 1 failed | 1 passed (2)
35
+ Tests 1 failed | 7 passed (8)
36
+ Start at 14:23:45
37
+ Duration 2.34s
38
+ `;
39
+ const result = parseVitestOutput(output);
40
+ expect(result).not.toBeNull();
41
+ expect(result!.total).toBe(8);
42
+ expect(result!.passed).toBe(7);
43
+ expect(result!.failed).toBe(1);
44
+ expect(result!.result).toBe('FAILED');
45
+ });
46
+
47
+ test('should parse with skipped tests', () => {
48
+ const output = `
49
+ ✓ tests/basic.test.ts (7)
50
+
51
+ Test Files 1 passed (1)
52
+ Tests 2 skipped | 5 passed (7)
53
+ Start at 14:23:45
54
+ Duration 0.89s
55
+ `;
56
+ const result = parseVitestOutput(output);
57
+ expect(result).not.toBeNull();
58
+ expect(result!.total).toBe(7);
59
+ expect(result!.passed).toBe(5);
60
+ expect(result!.skipped).toBe(2);
61
+ expect(result!.result).toBe('PASSED');
62
+ });
63
+
64
+ test('should parse with failed, skipped, and todo', () => {
65
+ const output = `
66
+ Test Files 1 failed | 2 passed (3)
67
+ Tests 1 failed | 2 skipped | 1 todo | 6 passed (10)
68
+ Duration 3.45s
69
+ `;
70
+ const result = parseVitestOutput(output);
71
+ expect(result).not.toBeNull();
72
+ expect(result!.total).toBe(10);
73
+ expect(result!.passed).toBe(6);
74
+ expect(result!.failed).toBe(1);
75
+ expect(result!.skipped).toBe(3); // 2 skipped + 1 todo
76
+ expect(result!.result).toBe('FAILED');
77
+ });
78
+
79
+ test('should handle output without test summary', () => {
80
+ const output = 'Some random output\nNo test results here';
81
+ const result = parseVitestOutput(output);
82
+ expect(result).toBeNull();
83
+ });
84
+
85
+ test('should handle output with ANSI color codes', () => {
86
+ const output = `
87
+ \x1b[32m ✓\x1b[0m tests/basic.test.ts (5)
88
+
89
+ Test Files \x1b[1m\x1b[32m1 passed\x1b[0m (1)
90
+ Tests \x1b[1m\x1b[32m5 passed\x1b[0m (5)
91
+ Duration 0.45s
92
+ `;
93
+ const result = parseVitestOutput(output);
94
+ expect(result).not.toBeNull();
95
+ expect(result!.total).toBe(5);
96
+ expect(result!.passed).toBe(5);
97
+ expect(result!.result).toBe('PASSED');
98
+ });
99
+
100
+ test('should handle large test counts', () => {
101
+ const output = `
102
+ Test Files 45 passed (45)
103
+ Tests 1234 passed (1234)
104
+ Duration 45.67s
105
+ `;
106
+ const result = parseVitestOutput(output);
107
+ expect(result).not.toBeNull();
108
+ expect(result!.total).toBe(1234);
109
+ expect(result!.passed).toBe(1234);
110
+ });
111
+ });
112
+ });
package/.faf DELETED
@@ -1,126 +0,0 @@
1
- faf_version: 2.5.0
2
- ai_scoring_system: 2025-09-20
3
- ai_score: 65%
4
- ai_confidence: MODERATE
5
- ai_value: 30_seconds_replaces_20_minutes_of_questions
6
- ai_tldr:
7
- project: faf-taf-git - Platform-agnostic TAF updater for ANY CI/CD
8
- stack: TypeScript (core + wrappers architecture)
9
- quality_bar: ZERO_ERRORS_F1_STANDARDS
10
- current_focus: Ready for npm publication and GitHub release
11
- your_role: Build features with perfect context
12
- instant_context:
13
- what_building: Platform-agnostic CLI + GitHub Action for TAF updates
14
- tech_stack: TypeScript
15
- main_language: TypeScript
16
- deployment: npm + GitHub Actions Marketplace
17
- key_files:
18
- - src/cli.ts (core)
19
- - src/index.ts (GitHub wrapper)
20
- - src/taf-core.ts (MCP-portable)
21
- - package.json
22
- context_quality:
23
- slots_filled: 11/21 (52%)
24
- ai_confidence: LOW
25
- handoff_ready: false
26
- missing_context:
27
- - CI/CD pipeline
28
- - Database
29
- project:
30
- name: faf-taf-git
31
- goal: Platform-agnostic TAF updater - works in ANY CI/CD
32
- main_language: TypeScript
33
- type: typescript
34
- generated: 2025-10-28T01:26:05.656Z
35
- mission: 🚀 Make Your AI Happy! 🧡 Trust-Driven 🤖
36
- revolution: 30 seconds replaces 20 minutes of questions
37
- brand: F1-Inspired Software Engineering - Championship AI Context
38
- ai_instructions:
39
- priority_order:
40
- - 1. Read THIS .faf file first
41
- - 2. Check CLAUDE.md for session context
42
- - 3. Review package.json for dependencies
43
- working_style:
44
- code_first: true
45
- explanations: minimal
46
- quality_bar: zero_errors
47
- testing: required
48
- warnings:
49
- - Never modify dial components without approval
50
- - All TypeScript must pass strict mode
51
- - Test coverage required for new features
52
- stack:
53
- frontend: None
54
- css_framework: None
55
- ui_library: None
56
- state_management: None
57
- backend: None
58
- runtime: None
59
- database: None
60
- build: None
61
- package_manager: npm
62
- api_type: REST
63
- hosting: None
64
- cicd: None
65
- preferences:
66
- quality_bar: zero_errors
67
- commit_style: conventional_emoji
68
- response_style: concise_code_first
69
- explanation_level: minimal
70
- communication: direct
71
- testing: required
72
- documentation: as_needed
73
- state:
74
- phase: development
75
- version: 1.0.0
76
- focus: production_deployment
77
- status: green_flag
78
- next_milestone: npm_publication
79
- blockers: null
80
- tags:
81
- auto_generated:
82
- - faf-taf-action
83
- - none
84
- - typescript
85
- smart_defaults:
86
- - .faf
87
- - ai-ready
88
- - "2025"
89
- - software
90
- - open-source
91
- user_defined: null
92
- human_context:
93
- who: Development teams
94
- what: infinite loops
95
- why: Improve development efficiency
96
- where: Cloud platform
97
- when: timeline [skip ci]`
98
- how: Test-driven development
99
- additional_context: null
100
- context_score: 0
101
- total_prd_score: 65
102
- success_rate: 50%
103
- scores:
104
- faf_score: 50
105
- slot_based_percentage: 52
106
- ai_score: 65
107
- total_slots: 21
108
- filled_slots: 11
109
- scoring_method: Honest percentage - no fake minimums
110
- trust_embedded: COUNT ONCE architecture - trust MY embedded scores
111
- ai_scoring_details:
112
- system_date: 2025-09-20
113
- slot_based_percentage: 52
114
- ai_score: 65
115
- total_slots: 21
116
- filled_slots: 11
117
- scoring_method: Honest percentage - no fake minimums
118
- trust_embedded: COUNT ONCE architecture - trust MY embedded scores
119
- faf_dna:
120
- birth_dna: 22
121
- birth_certificate: FAF-2025-FAFTAFAC-TMZU
122
- birth_date: 2025-10-28T01:26:05.692Z
123
- current_score: 50
124
- projectName: faf-taf-git
125
- projectGoal: Platform-agnostic TAF (Testing Activity Feed) updater - works in ANY CI/CD
126
- generated: 2025-10-28T17:48:24.837Z