create-qa-architect 5.0.6 → 5.3.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.
- package/.github/workflows/auto-release.yml +49 -0
- package/.github/workflows/dependabot-auto-merge.yml +32 -0
- package/LICENSE +3 -3
- package/README.md +54 -15
- package/docs/ADOPTION-SUMMARY.md +41 -0
- package/docs/ARCHITECTURE-REVIEW.md +67 -0
- package/docs/ARCHITECTURE.md +29 -41
- package/docs/CODE-REVIEW.md +100 -0
- package/docs/PREFLIGHT_REPORT.md +32 -40
- package/docs/REQUIREMENTS.md +148 -0
- package/docs/SECURITY-AUDIT.md +68 -0
- package/docs/TESTING.md +3 -4
- package/docs/test-trace-matrix.md +28 -0
- package/lib/billing-dashboard.html +6 -12
- package/lib/commands/deps.js +245 -0
- package/lib/commands/index.js +25 -0
- package/lib/commands/validate.js +85 -0
- package/lib/error-reporter.js +13 -1
- package/lib/github-api.js +108 -13
- package/lib/license-signing.js +110 -0
- package/lib/license-validator.js +359 -71
- package/lib/licensing.js +343 -111
- package/lib/prelaunch-validator.js +828 -0
- package/lib/quality-tools-generator.js +495 -0
- package/lib/result-types.js +112 -0
- package/lib/security-enhancements.js +1 -1
- package/lib/smart-strategy-generator.js +28 -9
- package/lib/template-loader.js +52 -19
- package/lib/validation/cache-manager.js +36 -6
- package/lib/validation/config-security.js +82 -15
- package/lib/validation/workflow-validation.js +49 -23
- package/package.json +8 -10
- package/scripts/check-test-coverage.sh +46 -0
- package/setup.js +356 -285
- package/templates/QUALITY_TROUBLESHOOTING.md +32 -33
- package/templates/scripts/smart-test-strategy.sh +1 -1
- package/create-saas-monetization.js +0 -1513
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
13
|
# Check if tests are TypeScript validated
|
|
14
|
-
npm run type-check:tests
|
|
14
|
+
npm run type-check:tests || npx tsc --noEmit --project tests/tsconfig.json
|
|
15
15
|
|
|
16
16
|
# If command doesn't exist, add to package.json:
|
|
17
17
|
{
|
|
@@ -29,13 +29,13 @@ npm run type-check:tests
|
|
|
29
29
|
"compilerOptions": {
|
|
30
30
|
"rootDir": "..",
|
|
31
31
|
"noEmit": true,
|
|
32
|
-
"types": ["
|
|
32
|
+
"types": ["node"] // add your test runner types (jest/vitest) if used
|
|
33
33
|
},
|
|
34
34
|
"include": ["../src/**/*", "../tests/**/*"]
|
|
35
35
|
}
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
**Prevention**: Run `npm run
|
|
38
|
+
**Prevention**: Run `npm run lint && npm test` (or `npm run validate:pre-push` if available) before commits
|
|
39
39
|
|
|
40
40
|
### Pre-commit Hooks Too Narrow
|
|
41
41
|
|
|
@@ -47,7 +47,8 @@ npm run type-check:tests
|
|
|
47
47
|
cat .husky/pre-commit
|
|
48
48
|
|
|
49
49
|
# Should run comprehensive checks:
|
|
50
|
-
npx lint-staged && npm run
|
|
50
|
+
npx lint-staged && npm run lint && npm test
|
|
51
|
+
# If your project has TypeScript, add: npm run type-check || npm run type-check:all
|
|
51
52
|
```
|
|
52
53
|
|
|
53
54
|
**Fix**: Enhance `.husky/pre-commit`:
|
|
@@ -55,8 +56,9 @@ npx lint-staged && npm run type-check:all && npm test
|
|
|
55
56
|
```bash
|
|
56
57
|
#!/usr/bin/env sh
|
|
57
58
|
npx lint-staged
|
|
58
|
-
npm run
|
|
59
|
-
npm
|
|
59
|
+
npm run lint
|
|
60
|
+
npm test
|
|
61
|
+
# Optional: npm run type-check || npm run type-check:all
|
|
60
62
|
```
|
|
61
63
|
|
|
62
64
|
## 🔍 Diagnostic Commands
|
|
@@ -64,15 +66,15 @@ npm run test:fast
|
|
|
64
66
|
### Quick Health Check
|
|
65
67
|
|
|
66
68
|
```bash
|
|
67
|
-
# Run
|
|
68
|
-
npm run
|
|
69
|
-
|
|
70
|
-
# If this fails, debug individual components:
|
|
71
|
-
npm run type-check:all # TypeScript issues
|
|
72
|
-
npm run lint # ESLint issues
|
|
73
|
-
npm run format:check # Prettier issues
|
|
69
|
+
# Run core quality gates (should complete without errors)
|
|
70
|
+
npm run lint # ESLint/Stylelint
|
|
71
|
+
npm run format:check # Prettier
|
|
74
72
|
npm test # Test failures
|
|
75
73
|
npm run security:audit # Security vulnerabilities
|
|
74
|
+
|
|
75
|
+
# If you use TypeScript:
|
|
76
|
+
npm run type-check || npx tsc --noEmit
|
|
77
|
+
npm run type-check:all # when defined to cover src + tests
|
|
76
78
|
```
|
|
77
79
|
|
|
78
80
|
### TypeScript Troubleshooting
|
|
@@ -89,7 +91,7 @@ npx tsc --noEmit path/to/file.ts
|
|
|
89
91
|
|
|
90
92
|
# Common issues:
|
|
91
93
|
# 1. Missing type definitions: npm install --save-dev @types/package-name
|
|
92
|
-
# 2. Test globals: Add
|
|
94
|
+
# 2. Test globals: Add your test runner types (e.g., jest or vitest) to tsconfig
|
|
93
95
|
# 3. Node types: Add "node" to types array
|
|
94
96
|
```
|
|
95
97
|
|
|
@@ -99,10 +101,12 @@ npx tsc --noEmit path/to/file.ts
|
|
|
99
101
|
# Run tests with verbose output
|
|
100
102
|
npm test -- --reporter=verbose
|
|
101
103
|
|
|
102
|
-
# Run specific test file
|
|
103
|
-
|
|
104
|
+
# Run specific test file (Node-based runner)
|
|
105
|
+
node path/to/test.test.js
|
|
104
106
|
|
|
105
|
-
# Debug integration tests
|
|
107
|
+
# Debug integration tests (when scripts exist)
|
|
108
|
+
DEBUG=* npm test
|
|
109
|
+
# or
|
|
106
110
|
DEBUG=* npm run test:integration
|
|
107
111
|
|
|
108
112
|
# Common issues:
|
|
@@ -135,10 +139,10 @@ npx eslint . --ext .js,.ts --config eslint-security.config.js
|
|
|
135
139
|
|
|
136
140
|
```bash
|
|
137
141
|
# Database connection tests
|
|
138
|
-
npm run test:integration
|
|
142
|
+
npm run test:integration # if defined; otherwise run npm test
|
|
139
143
|
|
|
140
144
|
# API endpoint tests
|
|
141
|
-
npm run test:e2e
|
|
145
|
+
npm run test:e2e # if defined
|
|
142
146
|
|
|
143
147
|
# Common issues:
|
|
144
148
|
# 1. Database not running: docker-compose up db
|
|
@@ -150,13 +154,13 @@ npm run test:e2e
|
|
|
150
154
|
|
|
151
155
|
```bash
|
|
152
156
|
# Component integration tests
|
|
153
|
-
npm run test:component
|
|
157
|
+
npm run test:component # if defined
|
|
154
158
|
|
|
155
159
|
# Browser E2E tests
|
|
156
|
-
npm run test:e2e
|
|
160
|
+
npm run test:e2e # if defined
|
|
157
161
|
|
|
158
162
|
# Accessibility checks
|
|
159
|
-
npm run accessibility:check
|
|
163
|
+
npm run accessibility:check # if defined
|
|
160
164
|
|
|
161
165
|
# Common issues:
|
|
162
166
|
# 1. Build process: npm run build && npm run test:e2e
|
|
@@ -187,7 +191,7 @@ npm run type-check && tsc --noEmit --skipLibCheck
|
|
|
187
191
|
# Profile test performance
|
|
188
192
|
npm test -- --reporter=verbose --logHeapUsage
|
|
189
193
|
|
|
190
|
-
# Run only fast tests for development
|
|
194
|
+
# Run only fast tests for development (if defined)
|
|
191
195
|
npm run test:fast
|
|
192
196
|
|
|
193
197
|
# Optimize strategies:
|
|
@@ -316,14 +320,9 @@ npm audit --package=package-name
|
|
|
316
320
|
# Generate coverage report
|
|
317
321
|
npm run test:coverage
|
|
318
322
|
|
|
319
|
-
# Check coverage thresholds
|
|
320
|
-
npx vitest run --coverage --reporter=verbose
|
|
321
|
-
|
|
322
323
|
# Common targets:
|
|
323
|
-
# - Lines:
|
|
324
|
-
# -
|
|
325
|
-
# - Branches: >70%
|
|
326
|
-
# - Statements: >80%
|
|
324
|
+
# - Lines/Statements/Functions/Branches: >=75% overall
|
|
325
|
+
# - Critical files (e.g., setup.js): >=80%
|
|
327
326
|
```
|
|
328
327
|
|
|
329
328
|
### Code Quality Metrics
|
|
@@ -382,7 +381,6 @@ npm run type-check:all # Should pass
|
|
|
382
381
|
|
|
383
382
|
- [ESLint Troubleshooting](https://eslint.org/docs/user-guide/troubleshooting)
|
|
384
383
|
- [TypeScript Handbook](https://www.typescriptlang.org/docs/)
|
|
385
|
-
- [Vitest Documentation](https://vitest.dev/guide/)
|
|
386
384
|
- [Playwright Debugging](https://playwright.dev/docs/debug)
|
|
387
385
|
|
|
388
386
|
### Debug Environment Setup
|
|
@@ -392,10 +390,11 @@ npm run type-check:all # Should pass
|
|
|
392
390
|
export DEBUG=quality-automation:*
|
|
393
391
|
|
|
394
392
|
# Run with verbose output
|
|
395
|
-
npm run
|
|
393
|
+
npm run lint -- --max-warnings=0
|
|
394
|
+
npm test -- --reporter=verbose
|
|
396
395
|
|
|
397
396
|
# Generate debug report
|
|
398
|
-
npm run validate:
|
|
397
|
+
npm run validate:pre-push > debug-report.txt 2>&1
|
|
399
398
|
```
|
|
400
399
|
|
|
401
400
|
---
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
# Smart Test Strategy - {{PROJECT_NAME}}
|
|
3
3
|
# Generated by create-qa-architect (Pro/Team/Enterprise feature)
|
|
4
|
-
# https://vibebuildlab.com/
|
|
4
|
+
# https://vibebuildlab.com/qa-architect
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
7
|
echo "🧠 Analyzing changes for optimal test strategy..."
|