create-qa-architect 5.0.1 → 5.0.6
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/nightly-gitleaks-verification.yml +1 -1
- package/.github/workflows/release.yml +12 -10
- package/.github/workflows/weekly-audit.yml +173 -0
- package/README.md +4 -4
- 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 +0 -1
- package/docs/DEPLOYMENT.md +1 -2
- package/docs/PREFLIGHT_REPORT.md +108 -0
- package/docs/TESTING.md +1 -2
- 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 +9 -9
- 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 +5 -4
- package/lib/validation/validation-factory.js +1 -1
- package/lib/yaml-utils.js +15 -10
- package/package.json +12 -9
- 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 +33 -9
- package/templates/scripts/smart-test-strategy.sh +1 -1
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Validates that command patterns in config/defaults.js
|
|
6
|
+
* don't contain known deprecated patterns
|
|
7
|
+
*
|
|
8
|
+
* This prevents issues like the ESLint --ext bug from being committed
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const fs = require('fs')
|
|
12
|
+
const path = require('path')
|
|
13
|
+
|
|
14
|
+
const DEPRECATED_PATTERNS = [
|
|
15
|
+
{
|
|
16
|
+
pattern: /eslint.*--ext\s+\S+/,
|
|
17
|
+
message: 'ESLint --ext flag is deprecated in ESLint 9 flat config',
|
|
18
|
+
file: 'config/defaults.js',
|
|
19
|
+
suggestion: 'Use "eslint ." - file selection is in eslint.config.js',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
pattern: /husky install/,
|
|
23
|
+
message: 'husky install is deprecated in Husky 9+',
|
|
24
|
+
file: 'config/defaults.js',
|
|
25
|
+
suggestion: 'Use just "husky" as the prepare script',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
pattern: /prettier.*--no-semi/,
|
|
29
|
+
message: '--no-semi is deprecated in Prettier 3+',
|
|
30
|
+
file: 'config/defaults.js',
|
|
31
|
+
suggestion: 'Use .prettierrc configuration file',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
pattern: /stylelint.*--config\s+\S+/,
|
|
35
|
+
message: 'Stylelint --config flag should use config file',
|
|
36
|
+
file: 'config/defaults.js',
|
|
37
|
+
suggestion: 'Use .stylelintrc.json instead',
|
|
38
|
+
},
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
const FILES_TO_CHECK = [
|
|
42
|
+
'config/defaults.js',
|
|
43
|
+
'setup.js',
|
|
44
|
+
'lib/package-utils.js',
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
function validateFile(filePath, patterns) {
|
|
48
|
+
const fullPath = path.join(__dirname, '..', filePath)
|
|
49
|
+
|
|
50
|
+
if (!fs.existsSync(fullPath)) {
|
|
51
|
+
console.warn(`⚠️ File not found: ${filePath} (skipping)`)
|
|
52
|
+
return []
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const content = fs.readFileSync(fullPath, 'utf8')
|
|
56
|
+
const errors = []
|
|
57
|
+
|
|
58
|
+
patterns.forEach(({ pattern, message, file, suggestion }) => {
|
|
59
|
+
// Only check patterns for this file
|
|
60
|
+
if (file && file !== filePath) {
|
|
61
|
+
return
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (pattern.test(content)) {
|
|
65
|
+
errors.push({
|
|
66
|
+
file: filePath,
|
|
67
|
+
message,
|
|
68
|
+
suggestion,
|
|
69
|
+
pattern: pattern.toString(),
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
return errors
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function main() {
|
|
78
|
+
console.log('🔍 Validating command patterns...\n')
|
|
79
|
+
|
|
80
|
+
let totalErrors = 0
|
|
81
|
+
const allErrors = []
|
|
82
|
+
|
|
83
|
+
FILES_TO_CHECK.forEach(filePath => {
|
|
84
|
+
const errors = validateFile(filePath, DEPRECATED_PATTERNS)
|
|
85
|
+
totalErrors += errors.length
|
|
86
|
+
allErrors.push(...errors)
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
if (totalErrors > 0) {
|
|
90
|
+
console.error(`❌ Found ${totalErrors} deprecated pattern(s):\n`)
|
|
91
|
+
|
|
92
|
+
allErrors.forEach(({ file, message, suggestion, pattern }) => {
|
|
93
|
+
console.error(` ${file}:`)
|
|
94
|
+
console.error(` ❌ ${message}`)
|
|
95
|
+
console.error(` 💡 ${suggestion}`)
|
|
96
|
+
console.error(` 🔎 Pattern: ${pattern}`)
|
|
97
|
+
console.error('')
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
console.error('Fix these before committing!\n')
|
|
101
|
+
process.exit(1)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
console.log('✅ No deprecated command patterns found')
|
|
105
|
+
process.exit(0)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (require.main === module) {
|
|
109
|
+
main()
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
module.exports = { validateFile, DEPRECATED_PATTERNS }
|
package/setup.js
CHANGED
|
@@ -741,7 +741,7 @@ HELP:
|
|
|
741
741
|
if (!capCheck.allowed) {
|
|
742
742
|
console.error(`❌ ${capCheck.reason}`)
|
|
743
743
|
console.error(
|
|
744
|
-
' Upgrade to Pro, Team, or Enterprise for unlimited runs: https://vibebuildlab.com/
|
|
744
|
+
' Upgrade to Pro, Team, or Enterprise for unlimited runs: https://vibebuildlab.com/tools/qa-architect'
|
|
745
745
|
)
|
|
746
746
|
process.exit(1)
|
|
747
747
|
}
|
|
@@ -866,9 +866,31 @@ HELP:
|
|
|
866
866
|
showUpgradeMessage('Framework-Aware Dependency Grouping')
|
|
867
867
|
}
|
|
868
868
|
|
|
869
|
+
// Auto-enable Dependabot on GitHub if token available
|
|
870
|
+
console.log('\n🔧 Attempting to enable Dependabot on GitHub...')
|
|
871
|
+
try {
|
|
872
|
+
const { setupDependabot } = require('./lib/github-api')
|
|
873
|
+
const result = await setupDependabot(projectPath, { verbose: true })
|
|
874
|
+
|
|
875
|
+
if (result.success) {
|
|
876
|
+
console.log('✅ Dependabot alerts and security updates enabled!')
|
|
877
|
+
} else if (result.errors.length > 0) {
|
|
878
|
+
console.log('⚠️ Could not auto-enable Dependabot:')
|
|
879
|
+
result.errors.forEach(err => console.log(` • ${err}`))
|
|
880
|
+
console.log('\n💡 Manual steps needed:')
|
|
881
|
+
console.log(' • Go to GitHub repo → Settings → Code security')
|
|
882
|
+
console.log(
|
|
883
|
+
' • Enable "Dependabot alerts" and "Dependabot security updates"'
|
|
884
|
+
)
|
|
885
|
+
}
|
|
886
|
+
} catch (error) {
|
|
887
|
+
console.log('⚠️ Could not auto-enable Dependabot:', error.message)
|
|
888
|
+
console.log('\n💡 Manual steps:')
|
|
889
|
+
console.log(' • Enable Dependabot in GitHub repo settings')
|
|
890
|
+
}
|
|
891
|
+
|
|
869
892
|
console.log('\n💡 Next steps:')
|
|
870
893
|
console.log(' • Review and commit .github/dependabot.yml')
|
|
871
|
-
console.log(' • Enable Dependabot alerts in GitHub repository settings')
|
|
872
894
|
console.log(
|
|
873
895
|
' • Dependabot will start monitoring weekly for dependency updates'
|
|
874
896
|
)
|
|
@@ -900,11 +922,11 @@ HELP:
|
|
|
900
922
|
console.log('\n❌ License activation failed.')
|
|
901
923
|
console.log('• Check your license key format (QAA-XXXX-XXXX-XXXX-XXXX)')
|
|
902
924
|
console.log('• Verify your email address')
|
|
903
|
-
console.log('• Contact support:
|
|
925
|
+
console.log('• Contact support: support@vibebuildlab.com')
|
|
904
926
|
}
|
|
905
927
|
} catch (error) {
|
|
906
928
|
console.error('\n❌ License activation error:', error.message)
|
|
907
|
-
console.log('Contact support for assistance:
|
|
929
|
+
console.log('Contact support for assistance: support@vibebuildlab.com')
|
|
908
930
|
}
|
|
909
931
|
|
|
910
932
|
process.exit(0)
|
|
@@ -1005,7 +1027,7 @@ HELP:
|
|
|
1005
1027
|
if (!repoCheck.allowed) {
|
|
1006
1028
|
console.error(`\n❌ ${repoCheck.reason}`)
|
|
1007
1029
|
console.error(
|
|
1008
|
-
' Upgrade to Pro for unlimited repos: https://vibebuildlab.com/
|
|
1030
|
+
' Upgrade to Pro for unlimited repos: https://vibebuildlab.com/tools/qa-architect'
|
|
1009
1031
|
)
|
|
1010
1032
|
process.exit(1)
|
|
1011
1033
|
}
|
|
@@ -1098,6 +1120,8 @@ HELP:
|
|
|
1098
1120
|
description: '',
|
|
1099
1121
|
main: 'index.js',
|
|
1100
1122
|
scripts: {},
|
|
1123
|
+
devDependencies: {},
|
|
1124
|
+
'lint-staged': {},
|
|
1101
1125
|
}
|
|
1102
1126
|
}
|
|
1103
1127
|
|
|
@@ -1259,8 +1283,8 @@ HELP:
|
|
|
1259
1283
|
}
|
|
1260
1284
|
|
|
1261
1285
|
packageJson['lint-staged'] = mergeLintStaged(
|
|
1262
|
-
packageJson['lint-staged'] || {},
|
|
1263
1286
|
finalLintStaged,
|
|
1287
|
+
packageJson['lint-staged'] || {},
|
|
1264
1288
|
{ stylelintTargets },
|
|
1265
1289
|
patternIncludesStylelintExtension
|
|
1266
1290
|
)
|
|
@@ -1670,7 +1694,7 @@ let tier = 'FREE'
|
|
|
1670
1694
|
try {
|
|
1671
1695
|
const data = JSON.parse(fs.readFileSync(licenseFile, 'utf8'))
|
|
1672
1696
|
tier = (data && data.tier) || 'FREE'
|
|
1673
|
-
} catch
|
|
1697
|
+
} catch {
|
|
1674
1698
|
tier = 'FREE'
|
|
1675
1699
|
}
|
|
1676
1700
|
|
|
@@ -1683,14 +1707,14 @@ try {
|
|
|
1683
1707
|
if (data.month === currentMonth) {
|
|
1684
1708
|
usage = { ...usage, ...data }
|
|
1685
1709
|
}
|
|
1686
|
-
} catch
|
|
1710
|
+
} catch {
|
|
1687
1711
|
// First run or corrupt file – start fresh
|
|
1688
1712
|
}
|
|
1689
1713
|
|
|
1690
1714
|
const CAP = 50
|
|
1691
1715
|
if (usage.prePushRuns >= CAP) {
|
|
1692
1716
|
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/
|
|
1717
|
+
console.error(' Upgrade to Pro, Team, or Enterprise: https://vibebuildlab.com/tools/qa-architect')
|
|
1694
1718
|
process.exit(1)
|
|
1695
1719
|
}
|
|
1696
1720
|
|
|
@@ -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/tools/qa-architect
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
7
|
echo "🧠 Analyzing changes for optimal test strategy..."
|