@soulbatical/tetra-dev-toolkit 1.1.1 → 1.2.0

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.
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /**
4
- * VCA Quality Toolkit - Main CLI
4
+ * Tetra Dev Toolkit - Main CLI
5
5
  *
6
6
  * Usage:
7
- * vca-audit # Run all checks
8
- * vca-audit security # Run security checks only
9
- * vca-audit stability # Run stability checks only
10
- * vca-audit quick # Run quick critical checks
11
- * vca-audit --ci # CI mode (GitHub Actions annotations)
12
- * vca-audit --json # JSON output
7
+ * tetra-audit # Run all checks
8
+ * tetra-audit security # Run security checks only
9
+ * tetra-audit stability # Run stability checks only
10
+ * tetra-audit quick # Run quick critical checks
11
+ * tetra-audit --ci # CI mode (GitHub Actions annotations)
12
+ * tetra-audit --json # JSON output
13
13
  */
14
14
 
15
15
  import { program } from 'commander'
@@ -17,9 +17,9 @@ import { runAllChecks, runSecurityChecks, runStabilityChecks, runCodeQualityChec
17
17
  import { formatResults, formatGitHubActions } from '../lib/reporters/terminal.js'
18
18
 
19
19
  program
20
- .name('vca-audit')
21
- .description('VCA Quality Toolkit - Unified quality checks for all projects')
22
- .version('1.0.0')
20
+ .name('tetra-audit')
21
+ .description('Tetra Dev Toolkit - Unified quality checks for all projects')
22
+ .version('1.2.0')
23
23
  .argument('[suite]', 'Check suite to run: security, stability, quick, or all (default)')
24
24
  .option('--ci', 'CI mode - output GitHub Actions annotations')
25
25
  .option('--json', 'Output results as JSON')
@@ -56,7 +56,7 @@ program
56
56
 
57
57
  // Also print summary
58
58
  console.log('')
59
- console.log('## VCA Quality Audit Results')
59
+ console.log('## Tetra Quality Audit Results')
60
60
  console.log('')
61
61
  console.log(`- **Status**: ${results.passed ? '✅ PASSED' : '❌ FAILED'}`)
62
62
  console.log(`- **Checks**: ${results.summary.passed} passed, ${results.summary.failed} failed`)
@@ -1,25 +1,25 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /**
4
- * VCA Dev Toolkit - Dev Token CLI
4
+ * Tetra Dev Toolkit - Dev Token CLI
5
5
  *
6
6
  * Manage Supabase dev tokens for API testing.
7
7
  * Auto-detects project from package.json, finds Supabase config from .env files.
8
8
  *
9
9
  * Usage:
10
- * vca-dev-token # Auto-refresh or show status
11
- * vca-dev-token --login # Interactive login (prompts for password)
12
- * vca-dev-token --status # Show current token status
13
- * vca-dev-token --project myapp # Override project detection
10
+ * tetra-dev-token # Auto-refresh or show status
11
+ * tetra-dev-token --login # Interactive login (prompts for password)
12
+ * tetra-dev-token --status # Show current token status
13
+ * tetra-dev-token --project myapp # Override project detection
14
14
  */
15
15
 
16
16
  import { program } from 'commander'
17
17
  import { runDevToken } from '../lib/commands/dev-token.js'
18
18
 
19
19
  program
20
- .name('vca-dev-token')
20
+ .name('tetra-dev-token')
21
21
  .description('Manage Supabase dev tokens for API testing')
22
- .version('1.1.0')
22
+ .version('1.2.0')
23
23
  .option('--login', 'Interactive login (prompts for email/password)')
24
24
  .option('--status', 'Show current token status')
25
25
  .option('--project <name>', 'Override auto-detected project slug')
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /**
4
- * VCA Quality Toolkit - Setup CLI
4
+ * Tetra Dev Toolkit - Setup CLI
5
5
  *
6
6
  * Sets up quality infrastructure in a project:
7
7
  * - Husky pre-commit hooks
@@ -9,10 +9,10 @@
9
9
  * - Configuration file
10
10
  *
11
11
  * Usage:
12
- * vca-setup # Interactive setup
13
- * vca-setup hooks # Setup Husky hooks only
14
- * vca-setup ci # Setup GitHub Actions only
15
- * vca-setup config # Create .vca-quality.json
12
+ * tetra-setup # Interactive setup
13
+ * tetra-setup hooks # Setup Husky hooks only
14
+ * tetra-setup ci # Setup GitHub Actions only
15
+ * tetra-setup config # Create .tetra-quality.json
16
16
  */
17
17
 
18
18
  import { program } from 'commander'
@@ -23,14 +23,14 @@ import { join } from 'path'
23
23
  const projectRoot = process.cwd()
24
24
 
25
25
  program
26
- .name('vca-setup')
27
- .description('Setup VCA Quality Toolkit in your project')
28
- .version('1.0.0')
26
+ .name('tetra-setup')
27
+ .description('Setup Tetra Dev Toolkit in your project')
28
+ .version('1.2.0')
29
29
  .argument('[component]', 'Component to setup: hooks, ci, config, or all (default)')
30
30
  .option('-f, --force', 'Overwrite existing files')
31
31
  .action(async (component, options) => {
32
32
  console.log('')
33
- console.log('🔧 VCA Quality Toolkit - Setup')
33
+ console.log('🔧 Tetra Dev Toolkit - Setup')
34
34
  console.log('═'.repeat(50))
35
35
  console.log('')
36
36
 
@@ -58,7 +58,7 @@ program
58
58
  console.log('✅ Setup complete!')
59
59
  console.log('')
60
60
  console.log('Next steps:')
61
- console.log(' 1. Run `vca-audit` to check your project')
61
+ console.log(' 1. Run `tetra-audit` to check your project')
62
62
  console.log(' 2. Commit the generated files')
63
63
  console.log(' 3. Push to trigger CI checks')
64
64
  console.log('')
@@ -95,14 +95,14 @@ async function setupHooks(options) {
95
95
  const preCommitContent = `#!/bin/sh
96
96
  . "$(dirname "$0")/_/husky.sh"
97
97
 
98
- echo "🔍 Running VCA Quality checks..."
98
+ echo "🔍 Running Tetra quality checks..."
99
99
 
100
100
  # Run quick security checks (fast, blocks commit on critical issues)
101
- npx vca-audit quick
101
+ npx tetra-audit quick
102
102
  if [ $? -ne 0 ]; then
103
103
  echo ""
104
104
  echo "❌ Security issues found! Fix before committing."
105
- echo " Run 'vca-audit' for detailed report."
105
+ echo " Run 'tetra-audit' for detailed report."
106
106
  exit 1
107
107
  fi
108
108
 
@@ -149,7 +149,7 @@ on:
149
149
 
150
150
  jobs:
151
151
  quality:
152
- name: 🔍 VCA Quality Audit
152
+ name: 🔍 Tetra Quality Audit
153
153
  runs-on: ubuntu-latest
154
154
 
155
155
  steps:
@@ -165,8 +165,8 @@ jobs:
165
165
  - name: Install dependencies
166
166
  run: npm ci
167
167
 
168
- - name: Run VCA Quality Audit
169
- run: npx @vca/quality-toolkit --ci
168
+ - name: Run Tetra Quality Audit
169
+ run: npx tetra-audit --ci
170
170
 
171
171
  - name: Upload results
172
172
  if: always()
@@ -186,10 +186,10 @@ jobs:
186
186
  async function setupConfig(options) {
187
187
  console.log('📝 Setting up configuration...')
188
188
 
189
- const configPath = join(projectRoot, '.vca-quality.json')
189
+ const configPath = join(projectRoot, '.tetra-quality.json')
190
190
  if (!existsSync(configPath) || options.force) {
191
191
  const config = {
192
- "$schema": "https://vca-tools.dev/schemas/quality-toolkit.json",
192
+ "$schema": "https://tetra-tools.dev/schemas/quality-toolkit.json",
193
193
  "suites": {
194
194
  "security": true,
195
195
  "stability": true,
@@ -218,7 +218,7 @@ async function setupConfig(options) {
218
218
  }
219
219
 
220
220
  writeFileSync(configPath, JSON.stringify(config, null, 2) + '\n')
221
- console.log(' ✅ Created .vca-quality.json')
221
+ console.log(' ✅ Created .tetra-quality.json')
222
222
  } else {
223
223
  console.log(' ⏭️ Config already exists (use --force to overwrite)')
224
224
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Health Check: @vca/dev-toolkit Installation
2
+ * Health Check: @soulbatical/tetra-dev-toolkit Installation
3
3
  *
4
4
  * Checks if the quality toolkit is installed and CLI commands available.
5
5
  * Score: 0 = not installed, 1 = installed, 2 = all commands available
@@ -15,7 +15,7 @@ export async function check(projectPath, { getCachedCodeQuality } = {}) {
15
15
  const result = createCheck('quality-toolkit', 2, {
16
16
  installed: false,
17
17
  version: null,
18
- commands: { 'vca-audit': false, 'vca-setup': false, 'vca-dev-token': false }
18
+ commands: { 'tetra-audit': false, 'tetra-setup': false, 'tetra-dev-token': false }
19
19
  })
20
20
 
21
21
  const packageJsonPath = join(projectPath, 'package.json')
@@ -28,12 +28,12 @@ export async function check(projectPath, { getCachedCodeQuality } = {}) {
28
28
  try {
29
29
  const pkg = JSON.parse(readFileSync(packageJsonPath, 'utf-8'))
30
30
  const allDeps = { ...pkg.dependencies, ...pkg.devDependencies }
31
- const toolkitDep = allDeps['@vca/dev-toolkit'] || allDeps['@vca/quality-toolkit']
31
+ const toolkitDep = allDeps['@soulbatical/tetra-dev-toolkit'] || allDeps['@vca/dev-toolkit'] || allDeps['@vca/quality-toolkit']
32
32
 
33
33
  if (!toolkitDep) {
34
34
  result.status = 'warning'
35
35
  result.details.message = 'Not installed'
36
- result.details.installCommand = 'npm install --save-dev /Users/albertbarth/projecten/vca-quality-toolkit'
36
+ result.details.installCommand = 'npm install --save-dev @soulbatical/tetra-dev-toolkit'
37
37
  return result
38
38
  }
39
39
 
@@ -42,8 +42,12 @@ export async function check(projectPath, { getCachedCodeQuality } = {}) {
42
42
  result.score = 1
43
43
 
44
44
  // Get installed version from node_modules
45
- for (const pkgName of ['dev-toolkit', 'quality-toolkit']) {
46
- const toolkitPackagePath = join(projectPath, 'node_modules', '@vca', pkgName, 'package.json')
45
+ const lookupPaths = [
46
+ join(projectPath, 'node_modules', '@soulbatical', 'tetra-dev-toolkit', 'package.json'),
47
+ join(projectPath, 'node_modules', '@vca', 'dev-toolkit', 'package.json'),
48
+ join(projectPath, 'node_modules', '@vca', 'quality-toolkit', 'package.json'),
49
+ ]
50
+ for (const toolkitPackagePath of lookupPaths) {
47
51
  if (existsSync(toolkitPackagePath)) {
48
52
  try {
49
53
  result.details.version = JSON.parse(readFileSync(toolkitPackagePath, 'utf-8')).version
@@ -54,9 +58,9 @@ export async function check(projectPath, { getCachedCodeQuality } = {}) {
54
58
  }
55
59
  }
56
60
 
57
- // Check CLI commands
61
+ // Check CLI commands (check new tetra-* names, fall back to legacy vca-*)
58
62
  const binPath = join(projectPath, 'node_modules', '.bin')
59
- const commands = ['vca-audit', 'vca-setup', 'vca-dev-token']
63
+ const commands = ['tetra-audit', 'tetra-setup', 'tetra-dev-token']
60
64
  for (const cmd of commands) {
61
65
  result.details.commands[cmd] = existsSync(join(binPath, cmd))
62
66
  }
@@ -43,7 +43,7 @@ export async function check(projectPath) {
43
43
 
44
44
  try {
45
45
  const response = await fetch(`https://api.github.com/repos/${owner}/${repo}`, {
46
- headers: { 'User-Agent': 'vca-health-check' },
46
+ headers: { 'User-Agent': 'tetra-health-check' },
47
47
  signal: AbortSignal.timeout(5000)
48
48
  })
49
49
 
@@ -91,7 +91,7 @@ export async function run(config, projectRoot) {
91
91
  },
92
92
  {
93
93
  name: 'security-audit',
94
- patterns: ['npm audit', 'vca-audit', 'security-check', 'snyk', 'CodeQL'],
94
+ patterns: ['npm audit', 'tetra-audit', 'vca-audit', 'security-check', 'snyk', 'CodeQL'],
95
95
  severity: 'medium'
96
96
  }
97
97
  ]
@@ -56,7 +56,7 @@ export async function run(config, projectRoot) {
56
56
  { name: 'lint', patterns: ['lint', 'eslint'] },
57
57
  { name: 'type-check', patterns: ['tsc', 'typecheck', 'type-check'] },
58
58
  { name: 'test', patterns: ['test', 'jest', 'vitest'] },
59
- { name: 'security', patterns: ['security', 'audit', 'vca-'] }
59
+ { name: 'security', patterns: ['security', 'audit', 'tetra-', 'vca-'] }
60
60
  ]
61
61
 
62
62
  const missingChecks = []
@@ -1,7 +1,7 @@
1
1
  /**
2
- * VCA Dev Toolkit - Dev Token Manager
2
+ * Tetra Dev Toolkit - Dev Token Manager
3
3
  *
4
- * Centralized dev token management for all VCA/Supabase projects.
4
+ * Centralized dev token management for all Tetra/Supabase projects.
5
5
  * Auto-detects project name, finds Supabase config, manages token lifecycle.
6
6
  *
7
7
  * Replaces per-project generate-dev-token.js scripts.
@@ -279,7 +279,7 @@ export async function runDevToken({ forceLogin = false, showStatus = false, proj
279
279
  if (showStatus) {
280
280
  if (!cache) {
281
281
  console.log(chalk.red('No cached token.'))
282
- console.log(chalk.dim(`Run: vca-dev-token --login`))
282
+ console.log(chalk.dim(`Run: tetra-dev-token --login`))
283
283
  process.exit(1)
284
284
  }
285
285
  const payload = decodeJWT(cache.access_token)
@@ -337,6 +337,6 @@ export async function runDevToken({ forceLogin = false, showStatus = false, proj
337
337
  }
338
338
 
339
339
  console.log(chalk.red('No valid token.'))
340
- console.log(chalk.dim(`Run: vca-dev-token --login`))
340
+ console.log(chalk.dim(`Run: tetra-dev-token --login`))
341
341
  process.exit(1)
342
342
  }
package/lib/config.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
- * VCA Quality Toolkit - Configuration
2
+ * Tetra Dev Toolkit - Configuration
3
3
  *
4
4
  * Default configuration that can be overridden per project via:
5
- * - .vca-quality.json in project root
6
- * - vca-quality key in package.json
5
+ * - .tetra-quality.json in project root (also checks legacy .vca-quality.json)
6
+ * - tetra-quality key in package.json (also checks legacy vca-quality key)
7
7
  */
8
8
 
9
9
  import { readFileSync, existsSync } from 'fs'
@@ -135,23 +135,26 @@ export const DEFAULT_CONFIG = {
135
135
  export function loadConfig(projectRoot = process.cwd()) {
136
136
  let projectConfig = {}
137
137
 
138
- // Check for .vca-quality.json
139
- const configFile = join(projectRoot, '.vca-quality.json')
140
- if (existsSync(configFile)) {
138
+ // Check for .tetra-quality.json (with legacy .vca-quality.json fallback)
139
+ const configFile = join(projectRoot, '.tetra-quality.json')
140
+ const legacyConfigFile = join(projectRoot, '.vca-quality.json')
141
+ const activeConfigFile = existsSync(configFile) ? configFile : (existsSync(legacyConfigFile) ? legacyConfigFile : null)
142
+ if (activeConfigFile) {
141
143
  try {
142
- projectConfig = JSON.parse(readFileSync(configFile, 'utf-8'))
144
+ projectConfig = JSON.parse(readFileSync(activeConfigFile, 'utf-8'))
143
145
  } catch (e) {
144
- console.warn(`Warning: Could not parse ${configFile}`)
146
+ console.warn(`Warning: Could not parse ${activeConfigFile}`)
145
147
  }
146
148
  }
147
149
 
148
- // Check for vca-quality in package.json
150
+ // Check for tetra-quality in package.json (with legacy vca-quality fallback)
149
151
  const packageFile = join(projectRoot, 'package.json')
150
152
  if (existsSync(packageFile)) {
151
153
  try {
152
154
  const pkg = JSON.parse(readFileSync(packageFile, 'utf-8'))
153
- if (pkg['vca-quality']) {
154
- projectConfig = { ...projectConfig, ...pkg['vca-quality'] }
155
+ const pkgConfig = pkg['tetra-quality'] || pkg['vca-quality']
156
+ if (pkgConfig) {
157
+ projectConfig = { ...projectConfig, ...pkgConfig }
155
158
  }
156
159
  } catch (e) {
157
160
  // Ignore
package/lib/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
- * VCA Quality Toolkit
2
+ * Tetra Dev Toolkit
3
3
  *
4
- * Unified quality checks for all VCA projects.
4
+ * Unified quality checks for all Tetra projects.
5
5
  * Consolidates security, stability, and code quality checks
6
- * from sparkbuddy-live and vca-tools into a single npm package.
6
+ * into a single npm package.
7
7
  */
8
8
 
9
9
  export { loadConfig, detectSupabase, DEFAULT_CONFIG } from './config.js'
@@ -24,7 +24,7 @@ export function formatResults(results, options = {}) {
24
24
  // Header
25
25
  lines.push('')
26
26
  lines.push(chalk.bold('═══════════════════════════════════════════════════════════════'))
27
- lines.push(chalk.bold.cyan(' 🔍 VCA Quality Toolkit - Audit Results'))
27
+ lines.push(chalk.bold.cyan(' 🔍 Tetra Dev Toolkit - Audit Results'))
28
28
  lines.push(chalk.bold('═══════════════════════════════════════════════════════════════'))
29
29
  lines.push('')
30
30
 
package/lib/runner.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * VCA Quality Toolkit - Check Runner
2
+ * Tetra Dev Toolkit - Check Runner
3
3
  *
4
4
  * Orchestrates running all checks and collecting results
5
5
  */
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@soulbatical/tetra-dev-toolkit",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "publishConfig": {
5
5
  "access": "restricted"
6
6
  },
7
- "description": "Developer toolkit for all VCA projects - audit, dev-token, quality checks",
7
+ "description": "Developer toolkit for Tetra projects - audit, dev-token, quality checks",
8
8
  "author": "Albert Barth <albertbarth@gmail.com>",
9
9
  "license": "MIT",
10
10
  "repository": {
@@ -25,11 +25,9 @@
25
25
  "type": "module",
26
26
  "main": "lib/index.js",
27
27
  "bin": {
28
- "vca-audit": "./bin/vca-audit.js",
29
- "vca-security": "./bin/vca-security.js",
30
- "vca-stability": "./bin/vca-stability.js",
31
- "vca-setup": "./bin/vca-setup.js",
32
- "vca-dev-token": "./bin/vca-dev-token.js"
28
+ "tetra-audit": "./bin/tetra-audit.js",
29
+ "tetra-setup": "./bin/tetra-setup.js",
30
+ "tetra-dev-token": "./bin/tetra-dev-token.js"
33
31
  },
34
32
  "files": [
35
33
  "bin/",