create-qa-architect 5.0.1 ā 5.0.7
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/RELEASE_CHECKLIST.md +2 -4
- package/.github/workflows/daily-deploy-check.yml +136 -0
- package/.github/workflows/dependabot-auto-merge.yml +32 -0
- package/.github/workflows/nightly-gitleaks-verification.yml +1 -1
- package/.github/workflows/release.yml +12 -10
- package/.github/workflows/weekly-audit.yml +173 -0
- package/LICENSE +3 -3
- package/README.md +11 -17
- package/config/defaults.js +22 -1
- package/config/quality-config.schema.json +1 -1
- package/create-saas-monetization.js +65 -27
- package/docs/ARCHITECTURE.md +16 -13
- package/docs/DEPLOYMENT.md +1 -2
- package/docs/PREFLIGHT_REPORT.md +100 -0
- package/docs/TESTING.md +4 -6
- package/lib/billing-dashboard.html +6 -12
- package/lib/config-validator.js +8 -2
- package/lib/dependency-monitoring-premium.js +21 -19
- package/lib/github-api.js +249 -0
- package/lib/interactive/questions.js +4 -0
- package/lib/license-validator.js +1 -1
- package/lib/licensing.js +16 -18
- package/lib/package-utils.js +9 -8
- package/lib/project-maturity.js +1 -1
- package/lib/template-loader.js +2 -0
- package/lib/ui-helpers.js +2 -1
- package/lib/validation/base-validator.js +5 -1
- package/lib/validation/cache-manager.js +1 -0
- package/lib/validation/config-security.js +9 -4
- package/lib/validation/validation-factory.js +1 -1
- package/lib/validation/workflow-validation.js +27 -22
- package/lib/yaml-utils.js +15 -10
- package/package.json +17 -14
- package/scripts/check-docs.sh +63 -0
- package/scripts/smart-test-strategy.sh +98 -0
- package/scripts/test-e2e-package.sh +283 -0
- package/scripts/validate-command-patterns.js +112 -0
- package/setup.js +38 -9
- package/templates/QUALITY_TROUBLESHOOTING.md +32 -33
- package/templates/scripts/smart-test-strategy.sh +1 -1
package/setup.js
CHANGED
|
@@ -355,6 +355,7 @@ function parseArguments(rawArgs) {
|
|
|
355
355
|
const disableActionlint = sanitizedArgs.includes('--no-actionlint')
|
|
356
356
|
const disableMarkdownlint = sanitizedArgs.includes('--no-markdownlint')
|
|
357
357
|
const disableEslintSecurity = sanitizedArgs.includes('--no-eslint-security')
|
|
358
|
+
const allowLatestGitleaks = sanitizedArgs.includes('--allow-latest-gitleaks')
|
|
358
359
|
|
|
359
360
|
return {
|
|
360
361
|
sanitizedArgs,
|
|
@@ -381,6 +382,7 @@ function parseArguments(rawArgs) {
|
|
|
381
382
|
disableActionlint,
|
|
382
383
|
disableMarkdownlint,
|
|
383
384
|
disableEslintSecurity,
|
|
385
|
+
allowLatestGitleaks,
|
|
384
386
|
}
|
|
385
387
|
}
|
|
386
388
|
|
|
@@ -418,6 +420,7 @@ function parseArguments(rawArgs) {
|
|
|
418
420
|
disableActionlint,
|
|
419
421
|
disableMarkdownlint,
|
|
420
422
|
disableEslintSecurity,
|
|
423
|
+
allowLatestGitleaks,
|
|
421
424
|
} = parsedConfig
|
|
422
425
|
|
|
423
426
|
// Initialize telemetry session (opt-in only, fails silently)
|
|
@@ -490,6 +493,7 @@ function parseArguments(rawArgs) {
|
|
|
490
493
|
disableActionlint,
|
|
491
494
|
disableMarkdownlint,
|
|
492
495
|
disableEslintSecurity,
|
|
496
|
+
allowLatestGitleaks,
|
|
493
497
|
} = parsedConfig)
|
|
494
498
|
|
|
495
499
|
console.log('š Configuration after interactive selections applied\n')
|
|
@@ -652,6 +656,7 @@ HELP:
|
|
|
652
656
|
disableActionlint,
|
|
653
657
|
disableMarkdownlint,
|
|
654
658
|
disableEslintSecurity,
|
|
659
|
+
allowLatestGitleaks,
|
|
655
660
|
}
|
|
656
661
|
const validator = new ValidationRunner(validationOptions)
|
|
657
662
|
|
|
@@ -741,7 +746,7 @@ HELP:
|
|
|
741
746
|
if (!capCheck.allowed) {
|
|
742
747
|
console.error(`ā ${capCheck.reason}`)
|
|
743
748
|
console.error(
|
|
744
|
-
' Upgrade to Pro, Team, or Enterprise for unlimited runs: https://vibebuildlab.com/
|
|
749
|
+
' Upgrade to Pro, Team, or Enterprise for unlimited runs: https://vibebuildlab.com/qa-architect'
|
|
745
750
|
)
|
|
746
751
|
process.exit(1)
|
|
747
752
|
}
|
|
@@ -866,9 +871,31 @@ HELP:
|
|
|
866
871
|
showUpgradeMessage('Framework-Aware Dependency Grouping')
|
|
867
872
|
}
|
|
868
873
|
|
|
874
|
+
// Auto-enable Dependabot on GitHub if token available
|
|
875
|
+
console.log('\nš§ Attempting to enable Dependabot on GitHub...')
|
|
876
|
+
try {
|
|
877
|
+
const { setupDependabot } = require('./lib/github-api')
|
|
878
|
+
const result = await setupDependabot(projectPath, { verbose: true })
|
|
879
|
+
|
|
880
|
+
if (result.success) {
|
|
881
|
+
console.log('ā
Dependabot alerts and security updates enabled!')
|
|
882
|
+
} else if (result.errors.length > 0) {
|
|
883
|
+
console.log('ā ļø Could not auto-enable Dependabot:')
|
|
884
|
+
result.errors.forEach(err => console.log(` ⢠${err}`))
|
|
885
|
+
console.log('\nš” Manual steps needed:')
|
|
886
|
+
console.log(' ⢠Go to GitHub repo ā Settings ā Code security')
|
|
887
|
+
console.log(
|
|
888
|
+
' ⢠Enable "Dependabot alerts" and "Dependabot security updates"'
|
|
889
|
+
)
|
|
890
|
+
}
|
|
891
|
+
} catch (error) {
|
|
892
|
+
console.log('ā ļø Could not auto-enable Dependabot:', error.message)
|
|
893
|
+
console.log('\nš” Manual steps:')
|
|
894
|
+
console.log(' ⢠Enable Dependabot in GitHub repo settings')
|
|
895
|
+
}
|
|
896
|
+
|
|
869
897
|
console.log('\nš” Next steps:')
|
|
870
898
|
console.log(' ⢠Review and commit .github/dependabot.yml')
|
|
871
|
-
console.log(' ⢠Enable Dependabot alerts in GitHub repository settings')
|
|
872
899
|
console.log(
|
|
873
900
|
' ⢠Dependabot will start monitoring weekly for dependency updates'
|
|
874
901
|
)
|
|
@@ -900,11 +927,11 @@ HELP:
|
|
|
900
927
|
console.log('\nā License activation failed.')
|
|
901
928
|
console.log('⢠Check your license key format (QAA-XXXX-XXXX-XXXX-XXXX)')
|
|
902
929
|
console.log('⢠Verify your email address')
|
|
903
|
-
console.log('⢠Contact support:
|
|
930
|
+
console.log('⢠Contact support: support@vibebuildlab.com')
|
|
904
931
|
}
|
|
905
932
|
} catch (error) {
|
|
906
933
|
console.error('\nā License activation error:', error.message)
|
|
907
|
-
console.log('Contact support for assistance:
|
|
934
|
+
console.log('Contact support for assistance: support@vibebuildlab.com')
|
|
908
935
|
}
|
|
909
936
|
|
|
910
937
|
process.exit(0)
|
|
@@ -1005,7 +1032,7 @@ HELP:
|
|
|
1005
1032
|
if (!repoCheck.allowed) {
|
|
1006
1033
|
console.error(`\nā ${repoCheck.reason}`)
|
|
1007
1034
|
console.error(
|
|
1008
|
-
' Upgrade to Pro for unlimited repos: https://vibebuildlab.com/
|
|
1035
|
+
' Upgrade to Pro for unlimited repos: https://vibebuildlab.com/qa-architect'
|
|
1009
1036
|
)
|
|
1010
1037
|
process.exit(1)
|
|
1011
1038
|
}
|
|
@@ -1098,6 +1125,8 @@ HELP:
|
|
|
1098
1125
|
description: '',
|
|
1099
1126
|
main: 'index.js',
|
|
1100
1127
|
scripts: {},
|
|
1128
|
+
devDependencies: {},
|
|
1129
|
+
'lint-staged': {},
|
|
1101
1130
|
}
|
|
1102
1131
|
}
|
|
1103
1132
|
|
|
@@ -1259,8 +1288,8 @@ HELP:
|
|
|
1259
1288
|
}
|
|
1260
1289
|
|
|
1261
1290
|
packageJson['lint-staged'] = mergeLintStaged(
|
|
1262
|
-
packageJson['lint-staged'] || {},
|
|
1263
1291
|
finalLintStaged,
|
|
1292
|
+
packageJson['lint-staged'] || {},
|
|
1264
1293
|
{ stylelintTargets },
|
|
1265
1294
|
patternIncludesStylelintExtension
|
|
1266
1295
|
)
|
|
@@ -1670,7 +1699,7 @@ let tier = 'FREE'
|
|
|
1670
1699
|
try {
|
|
1671
1700
|
const data = JSON.parse(fs.readFileSync(licenseFile, 'utf8'))
|
|
1672
1701
|
tier = (data && data.tier) || 'FREE'
|
|
1673
|
-
} catch
|
|
1702
|
+
} catch {
|
|
1674
1703
|
tier = 'FREE'
|
|
1675
1704
|
}
|
|
1676
1705
|
|
|
@@ -1683,14 +1712,14 @@ try {
|
|
|
1683
1712
|
if (data.month === currentMonth) {
|
|
1684
1713
|
usage = { ...usage, ...data }
|
|
1685
1714
|
}
|
|
1686
|
-
} catch
|
|
1715
|
+
} catch {
|
|
1687
1716
|
// First run or corrupt file ā start fresh
|
|
1688
1717
|
}
|
|
1689
1718
|
|
|
1690
1719
|
const CAP = 50
|
|
1691
1720
|
if (usage.prePushRuns >= CAP) {
|
|
1692
1721
|
console.error('ā Free tier limit reached: ' + usage.prePushRuns + '/' + CAP + ' pre-push runs this month')
|
|
1693
|
-
console.error(' Upgrade to Pro, Team, or Enterprise: https://vibebuildlab.com/
|
|
1722
|
+
console.error(' Upgrade to Pro, Team, or Enterprise: https://vibebuildlab.com/qa-architect')
|
|
1694
1723
|
process.exit(1)
|
|
1695
1724
|
}
|
|
1696
1725
|
|
|
@@ -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..."
|