@vibecheckai/cli 3.5.0 → 3.5.2
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/bin/registry.js +214 -237
- package/bin/runners/cli-utils.js +33 -2
- package/bin/runners/context/analyzer.js +52 -1
- package/bin/runners/context/generators/cursor.js +2 -49
- package/bin/runners/context/git-context.js +3 -1
- package/bin/runners/context/team-conventions.js +33 -7
- package/bin/runners/lib/analysis-core.js +25 -5
- package/bin/runners/lib/analyzers.js +431 -481
- package/bin/runners/lib/default-config.js +127 -0
- package/bin/runners/lib/doctor/modules/security.js +3 -1
- package/bin/runners/lib/engine/ast-cache.js +210 -0
- package/bin/runners/lib/engine/auth-extractor.js +211 -0
- package/bin/runners/lib/engine/billing-extractor.js +112 -0
- package/bin/runners/lib/engine/enforcement-extractor.js +100 -0
- package/bin/runners/lib/engine/env-extractor.js +207 -0
- package/bin/runners/lib/engine/express-extractor.js +208 -0
- package/bin/runners/lib/engine/extractors.js +849 -0
- package/bin/runners/lib/engine/index.js +207 -0
- package/bin/runners/lib/engine/repo-index.js +514 -0
- package/bin/runners/lib/engine/types.js +124 -0
- package/bin/runners/lib/engines/accessibility-engine.js +18 -218
- package/bin/runners/lib/engines/api-consistency-engine.js +30 -335
- package/bin/runners/lib/engines/cross-file-analysis-engine.js +27 -292
- package/bin/runners/lib/engines/empty-catch-engine.js +17 -127
- package/bin/runners/lib/engines/mock-data-engine.js +10 -53
- package/bin/runners/lib/engines/performance-issues-engine.js +36 -176
- package/bin/runners/lib/engines/security-vulnerabilities-engine.js +54 -382
- package/bin/runners/lib/engines/type-aware-engine.js +39 -263
- package/bin/runners/lib/engines/vibecheck-engines/index.js +13 -122
- package/bin/runners/lib/engines/vibecheck-engines/lib/ast-cache.js +164 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/code-quality-engine.js +291 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/console-logs-engine.js +83 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/dead-code-engine.js +198 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/deprecated-api-engine.js +275 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/empty-catch-engine.js +167 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/file-filter.js +217 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/hardcoded-secrets-engine.js +73 -373
- package/bin/runners/lib/engines/vibecheck-engines/lib/mock-data-engine.js +140 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/parallel-processor.js +164 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/performance-issues-engine.js +234 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/type-aware-engine.js +217 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/unsafe-regex-engine.js +78 -0
- package/bin/runners/lib/entitlements-v2.js +73 -97
- package/bin/runners/lib/error-handler.js +44 -3
- package/bin/runners/lib/error-messages.js +289 -0
- package/bin/runners/lib/evidence-pack.js +7 -1
- package/bin/runners/lib/finding-id.js +69 -0
- package/bin/runners/lib/finding-sorter.js +89 -0
- package/bin/runners/lib/html-proof-report.js +700 -350
- package/bin/runners/lib/missions/plan.js +6 -46
- package/bin/runners/lib/missions/templates.js +0 -232
- package/bin/runners/lib/next-action.js +560 -0
- package/bin/runners/lib/prerequisites.js +149 -0
- package/bin/runners/lib/route-detection.js +137 -68
- package/bin/runners/lib/scan-output.js +91 -76
- package/bin/runners/lib/scan-runner.js +135 -0
- package/bin/runners/lib/schemas/ajv-validator.js +464 -0
- package/bin/runners/lib/schemas/error-envelope.schema.json +105 -0
- package/bin/runners/lib/schemas/finding-v3.schema.json +151 -0
- package/bin/runners/lib/schemas/report-artifact.schema.json +120 -0
- package/bin/runners/lib/schemas/run-request.schema.json +108 -0
- package/bin/runners/lib/schemas/validator.js +27 -0
- package/bin/runners/lib/schemas/verdict.schema.json +140 -0
- package/bin/runners/lib/ship-output-enterprise.js +23 -23
- package/bin/runners/lib/ship-output.js +75 -31
- package/bin/runners/lib/terminal-ui.js +6 -113
- package/bin/runners/lib/truth.js +351 -10
- package/bin/runners/lib/unified-cli-output.js +430 -603
- package/bin/runners/lib/unified-output.js +13 -9
- package/bin/runners/runAIAgent.js +10 -5
- package/bin/runners/runAgent.js +0 -3
- package/bin/runners/runAllowlist.js +389 -0
- package/bin/runners/runApprove.js +0 -33
- package/bin/runners/runAuth.js +73 -45
- package/bin/runners/runCheckpoint.js +51 -11
- package/bin/runners/runClassify.js +85 -21
- package/bin/runners/runContext.js +0 -3
- package/bin/runners/runDoctor.js +41 -28
- package/bin/runners/runEvidencePack.js +362 -0
- package/bin/runners/runFirewall.js +0 -3
- package/bin/runners/runFirewallHook.js +0 -3
- package/bin/runners/runFix.js +66 -76
- package/bin/runners/runGuard.js +18 -411
- package/bin/runners/runInit.js +113 -30
- package/bin/runners/runLabs.js +424 -0
- package/bin/runners/runMcp.js +19 -25
- package/bin/runners/runPolish.js +64 -240
- package/bin/runners/runPromptFirewall.js +12 -5
- package/bin/runners/runProve.js +57 -22
- package/bin/runners/runQuickstart.js +531 -0
- package/bin/runners/runReality.js +59 -68
- package/bin/runners/runReport.js +38 -33
- package/bin/runners/runRuntime.js +8 -5
- package/bin/runners/runScan.js +1413 -190
- package/bin/runners/runShip.js +113 -719
- package/bin/runners/runTruth.js +0 -3
- package/bin/runners/runValidate.js +13 -9
- package/bin/runners/runWatch.js +23 -14
- package/bin/scan.js +6 -1
- package/bin/vibecheck.js +204 -185
- package/mcp-server/deprecation-middleware.js +282 -0
- package/mcp-server/handlers/index.ts +15 -0
- package/mcp-server/handlers/tool-handler.ts +554 -0
- package/mcp-server/index-v1.js +698 -0
- package/mcp-server/index.js +210 -238
- package/mcp-server/lib/cache-wrapper.cjs +383 -0
- package/mcp-server/lib/error-envelope.js +138 -0
- package/mcp-server/lib/executor.ts +499 -0
- package/mcp-server/lib/index.ts +19 -0
- package/mcp-server/lib/rate-limiter.js +166 -0
- package/mcp-server/lib/sandbox.test.ts +519 -0
- package/mcp-server/lib/sandbox.ts +395 -0
- package/mcp-server/lib/types.ts +267 -0
- package/mcp-server/package.json +12 -3
- package/mcp-server/registry/tool-registry.js +794 -0
- package/mcp-server/registry/tools.json +605 -0
- package/mcp-server/registry.test.ts +334 -0
- package/mcp-server/tests/tier-gating.test.js +297 -0
- package/mcp-server/tier-auth.js +378 -45
- package/mcp-server/tools-v3.js +353 -442
- package/mcp-server/tsconfig.json +37 -0
- package/mcp-server/vibecheck-2.0-tools.js +14 -1
- package/package.json +1 -1
- package/bin/runners/lib/agent-firewall/learning/learning-engine.js +0 -849
- package/bin/runners/lib/audit-logger.js +0 -532
- package/bin/runners/lib/authority/authorities/architecture.js +0 -364
- package/bin/runners/lib/authority/authorities/compliance.js +0 -341
- package/bin/runners/lib/authority/authorities/human.js +0 -343
- package/bin/runners/lib/authority/authorities/quality.js +0 -420
- package/bin/runners/lib/authority/authorities/security.js +0 -228
- package/bin/runners/lib/authority/index.js +0 -293
- package/bin/runners/lib/bundle/bundle-intelligence.js +0 -846
- package/bin/runners/lib/cli-charts.js +0 -368
- package/bin/runners/lib/cli-config-display.js +0 -405
- package/bin/runners/lib/cli-demo.js +0 -275
- package/bin/runners/lib/cli-errors.js +0 -438
- package/bin/runners/lib/cli-help-formatter.js +0 -439
- package/bin/runners/lib/cli-interactive-menu.js +0 -509
- package/bin/runners/lib/cli-prompts.js +0 -441
- package/bin/runners/lib/cli-scan-cards.js +0 -362
- package/bin/runners/lib/compliance-reporter.js +0 -710
- package/bin/runners/lib/conductor/index.js +0 -671
- package/bin/runners/lib/easy/README.md +0 -123
- package/bin/runners/lib/easy/index.js +0 -140
- package/bin/runners/lib/easy/interactive-wizard.js +0 -788
- package/bin/runners/lib/easy/one-click-firewall.js +0 -564
- package/bin/runners/lib/easy/zero-config-reality.js +0 -714
- package/bin/runners/lib/engines/async-patterns-engine.js +0 -444
- package/bin/runners/lib/engines/bundle-size-engine.js +0 -433
- package/bin/runners/lib/engines/confidence-scoring.js +0 -276
- package/bin/runners/lib/engines/context-detection.js +0 -264
- package/bin/runners/lib/engines/database-patterns-engine.js +0 -429
- package/bin/runners/lib/engines/duplicate-code-engine.js +0 -354
- package/bin/runners/lib/engines/env-variables-engine.js +0 -458
- package/bin/runners/lib/engines/error-handling-engine.js +0 -437
- package/bin/runners/lib/engines/false-positive-prevention.js +0 -630
- package/bin/runners/lib/engines/framework-adapters/index.js +0 -607
- package/bin/runners/lib/engines/framework-detection.js +0 -508
- package/bin/runners/lib/engines/import-order-engine.js +0 -429
- package/bin/runners/lib/engines/naming-conventions-engine.js +0 -544
- package/bin/runners/lib/engines/noise-reduction-engine.js +0 -452
- package/bin/runners/lib/engines/orchestrator.js +0 -334
- package/bin/runners/lib/engines/react-patterns-engine.js +0 -457
- package/bin/runners/lib/engines/vibecheck-engines/lib/ai-hallucination-engine.js +0 -806
- package/bin/runners/lib/engines/vibecheck-engines/lib/smart-fix-engine.js +0 -577
- package/bin/runners/lib/engines/vibecheck-engines/lib/vibe-score-engine.js +0 -543
- package/bin/runners/lib/engines/vibecheck-engines.js +0 -514
- package/bin/runners/lib/enhanced-features/index.js +0 -305
- package/bin/runners/lib/enhanced-output.js +0 -631
- package/bin/runners/lib/enterprise.js +0 -300
- package/bin/runners/lib/firewall/command-validator.js +0 -351
- package/bin/runners/lib/firewall/config.js +0 -341
- package/bin/runners/lib/firewall/content-validator.js +0 -519
- package/bin/runners/lib/firewall/index.js +0 -101
- package/bin/runners/lib/firewall/path-validator.js +0 -256
- package/bin/runners/lib/intelligence/cross-repo-intelligence.js +0 -817
- package/bin/runners/lib/mcp-utils.js +0 -425
- package/bin/runners/lib/output/index.js +0 -1022
- package/bin/runners/lib/policy-engine.js +0 -652
- package/bin/runners/lib/polish/autofix/accessibility-fixes.js +0 -333
- package/bin/runners/lib/polish/autofix/async-handlers.js +0 -273
- package/bin/runners/lib/polish/autofix/dead-code.js +0 -280
- package/bin/runners/lib/polish/autofix/imports-optimizer.js +0 -344
- package/bin/runners/lib/polish/autofix/index.js +0 -200
- package/bin/runners/lib/polish/autofix/remove-consoles.js +0 -209
- package/bin/runners/lib/polish/autofix/strengthen-types.js +0 -245
- package/bin/runners/lib/polish/backend-checks.js +0 -148
- package/bin/runners/lib/polish/documentation-checks.js +0 -111
- package/bin/runners/lib/polish/frontend-checks.js +0 -168
- package/bin/runners/lib/polish/index.js +0 -71
- package/bin/runners/lib/polish/infrastructure-checks.js +0 -131
- package/bin/runners/lib/polish/library-detection.js +0 -175
- package/bin/runners/lib/polish/performance-checks.js +0 -100
- package/bin/runners/lib/polish/security-checks.js +0 -148
- package/bin/runners/lib/polish/utils.js +0 -203
- package/bin/runners/lib/prompt-builder.js +0 -540
- package/bin/runners/lib/proof-certificate.js +0 -634
- package/bin/runners/lib/reality/accessibility-audit.js +0 -946
- package/bin/runners/lib/reality/api-contract-validator.js +0 -1012
- package/bin/runners/lib/reality/chaos-engineering.js +0 -1084
- package/bin/runners/lib/reality/performance-tracker.js +0 -1077
- package/bin/runners/lib/reality/scenario-generator.js +0 -1404
- package/bin/runners/lib/reality/visual-regression.js +0 -852
- package/bin/runners/lib/reality-profiler.js +0 -717
- package/bin/runners/lib/replay/flight-recorder-viewer.js +0 -1160
- package/bin/runners/lib/review/ai-code-review.js +0 -832
- package/bin/runners/lib/rules/custom-rule-engine.js +0 -985
- package/bin/runners/lib/sbom-generator.js +0 -641
- package/bin/runners/lib/scan-output-enhanced.js +0 -512
- package/bin/runners/lib/security/owasp-scanner.js +0 -939
- package/bin/runners/lib/validators/contract-validator.js +0 -283
- package/bin/runners/lib/validators/dead-export-detector.js +0 -279
- package/bin/runners/lib/validators/dep-audit.js +0 -245
- package/bin/runners/lib/validators/env-validator.js +0 -319
- package/bin/runners/lib/validators/index.js +0 -120
- package/bin/runners/lib/validators/license-checker.js +0 -252
- package/bin/runners/lib/validators/route-validator.js +0 -290
- package/bin/runners/runAuthority.js +0 -528
- package/bin/runners/runConductor.js +0 -772
- package/bin/runners/runContainer.js +0 -366
- package/bin/runners/runEasy.js +0 -410
- package/bin/runners/runIaC.js +0 -372
- package/bin/runners/runVibe.js +0 -791
- package/mcp-server/tools.js +0 -495
package/bin/runners/runMcp.js
CHANGED
|
@@ -11,16 +11,13 @@ const http = require("http");
|
|
|
11
11
|
const { URL } = require("url");
|
|
12
12
|
|
|
13
13
|
// Import Vibecheck modules
|
|
14
|
-
const {
|
|
14
|
+
const { buildTruthpackSmart, writeTruthpack } = require("./lib/truth");
|
|
15
15
|
const { shipCore } = require("./runShip");
|
|
16
16
|
const { generateRunId } = require("./lib/cli-output");
|
|
17
|
-
const { enforceLimit, enforceFeature, trackUsage } = require("./lib/entitlements
|
|
17
|
+
const { enforceLimit, enforceFeature, trackUsage } = require("./lib/entitlements");
|
|
18
18
|
const { EXIT } = require("./lib/exit-codes");
|
|
19
19
|
const { parseGlobalFlags, shouldSuppressOutput, isJsonMode } = require("./lib/global-flags");
|
|
20
20
|
|
|
21
|
-
// Unified Output System
|
|
22
|
-
const { output } = require("./lib/output/index.js");
|
|
23
|
-
|
|
24
21
|
// MCP Server class
|
|
25
22
|
class VibecheckMCPServer {
|
|
26
23
|
constructor(options = {}) {
|
|
@@ -36,7 +33,9 @@ class VibecheckMCPServer {
|
|
|
36
33
|
this.rateLimits = new Map();
|
|
37
34
|
this.tiers = {
|
|
38
35
|
free: { rpm: 10, burst: 20, daily: 100 },
|
|
39
|
-
|
|
36
|
+
starter: { rpm: 30, burst: 60, daily: 500 },
|
|
37
|
+
pro: { rpm: 100, burst: 200, daily: 2000 },
|
|
38
|
+
enterprise: { rpm: 500, burst: 1000, daily: Infinity }
|
|
40
39
|
};
|
|
41
40
|
|
|
42
41
|
// Tool definitions
|
|
@@ -111,7 +110,7 @@ class VibecheckMCPServer {
|
|
|
111
110
|
tier: "pro"
|
|
112
111
|
},
|
|
113
112
|
|
|
114
|
-
//
|
|
113
|
+
// Enterprise tier tools
|
|
115
114
|
policy_check: {
|
|
116
115
|
description: "Validate project against custom compliance policies",
|
|
117
116
|
inputSchema: {
|
|
@@ -122,7 +121,7 @@ class VibecheckMCPServer {
|
|
|
122
121
|
reportFormat: { type: "string", enum: ["json", "sarif", "markdown"], default: "json" }
|
|
123
122
|
}
|
|
124
123
|
},
|
|
125
|
-
tier: "
|
|
124
|
+
tier: "enterprise"
|
|
126
125
|
}
|
|
127
126
|
};
|
|
128
127
|
}
|
|
@@ -240,7 +239,7 @@ class VibecheckMCPServer {
|
|
|
240
239
|
const source = args.source || "both";
|
|
241
240
|
|
|
242
241
|
// Get truthpack
|
|
243
|
-
const truthpack = await
|
|
242
|
+
const truthpack = await buildTruthpackSmart({ repoRoot: projectPath });
|
|
244
243
|
|
|
245
244
|
const result = {};
|
|
246
245
|
|
|
@@ -262,7 +261,7 @@ class VibecheckMCPServer {
|
|
|
262
261
|
let truthpack;
|
|
263
262
|
|
|
264
263
|
if (args.refresh) {
|
|
265
|
-
truthpack = await
|
|
264
|
+
truthpack = await buildTruthpackSmart({ repoRoot: projectPath });
|
|
266
265
|
writeTruthpack(projectPath, truthpack);
|
|
267
266
|
} else {
|
|
268
267
|
// Try to read existing truthpack
|
|
@@ -270,7 +269,7 @@ class VibecheckMCPServer {
|
|
|
270
269
|
if (require("fs").existsSync(truthpackPath)) {
|
|
271
270
|
truthpack = JSON.parse(require("fs").readFileSync(truthpackPath, "utf8"));
|
|
272
271
|
} else {
|
|
273
|
-
truthpack = await
|
|
272
|
+
truthpack = await buildTruthpackSmart({ repoRoot: projectPath });
|
|
274
273
|
writeTruthpack(projectPath, truthpack);
|
|
275
274
|
}
|
|
276
275
|
}
|
|
@@ -589,7 +588,7 @@ class VibecheckMCPServer {
|
|
|
589
588
|
}
|
|
590
589
|
|
|
591
590
|
checkTierAccess(requiredTier, userTier) {
|
|
592
|
-
const tierOrder = ["free", "pro"];
|
|
591
|
+
const tierOrder = ["free", "starter", "pro", "enterprise"];
|
|
593
592
|
const requiredIndex = tierOrder.indexOf(requiredTier);
|
|
594
593
|
const userIndex = tierOrder.indexOf(userTier);
|
|
595
594
|
|
|
@@ -672,20 +671,13 @@ async function runMcp(args) {
|
|
|
672
671
|
const quiet = shouldSuppressOutput(globalFlags);
|
|
673
672
|
const json = isJsonMode(globalFlags);
|
|
674
673
|
|
|
675
|
-
//
|
|
676
|
-
|
|
674
|
+
// MCP Server access: FREE tier gets observe mode, PRO tier gets full features
|
|
675
|
+
// Help/config/status/test commands are always available
|
|
677
676
|
const isHelpOrConfig = opts.help || opts.printConfig || opts.status || opts.test;
|
|
678
677
|
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
} else if (!quiet) {
|
|
683
|
-
console.log("\n🔌 MCP Server requires PRO plan");
|
|
684
|
-
console.log("Use --help to see available options or");
|
|
685
|
-
console.log("Upgrade: https://vibecheckai.dev/pricing\n");
|
|
686
|
-
}
|
|
687
|
-
return EXIT.TIER_REQUIRED;
|
|
688
|
-
}
|
|
678
|
+
// MCP Server is available to all tiers - tier enforcement happens at tool level
|
|
679
|
+
// FREE users can run the server, but PRO tools will be gated
|
|
680
|
+
// This is handled by mcp-server/tier-auth.js
|
|
689
681
|
|
|
690
682
|
if (opts.help) {
|
|
691
683
|
printHelp();
|
|
@@ -910,7 +902,9 @@ ${c.bold}MCP TOOLS AVAILABLE${c.reset}
|
|
|
910
902
|
|
|
911
903
|
${c.dim}Pro Tier:${c.reset}
|
|
912
904
|
• run_ship Execute ship check
|
|
913
|
-
|
|
905
|
+
|
|
906
|
+
${c.dim}Enterprise Tier:${c.reset}
|
|
907
|
+
• policy_check Validate against policies
|
|
914
908
|
|
|
915
909
|
${c.bold}CONFIGURATION${c.reset}
|
|
916
910
|
Add to your AI IDE's MCP config:
|
package/bin/runners/runPolish.js
CHANGED
|
@@ -28,19 +28,49 @@ const { EXIT } = require("./lib/exit-codes");
|
|
|
28
28
|
const { parseGlobalFlags, shouldSuppressOutput, isJsonMode } = require("./lib/global-flags");
|
|
29
29
|
|
|
30
30
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
31
|
-
//
|
|
31
|
+
// TERMINAL STYLING
|
|
32
32
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
33
33
|
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
const c = {
|
|
35
|
+
reset: '\x1b[0m',
|
|
36
|
+
bold: '\x1b[1m',
|
|
37
|
+
dim: '\x1b[2m',
|
|
38
|
+
italic: '\x1b[3m',
|
|
39
|
+
underline: '\x1b[4m',
|
|
40
|
+
red: '\x1b[31m',
|
|
41
|
+
green: '\x1b[32m',
|
|
42
|
+
yellow: '\x1b[33m',
|
|
43
|
+
blue: '\x1b[34m',
|
|
44
|
+
magenta: '\x1b[35m',
|
|
45
|
+
cyan: '\x1b[36m',
|
|
46
|
+
white: '\x1b[37m',
|
|
47
|
+
bgRed: '\x1b[41m',
|
|
48
|
+
bgGreen: '\x1b[42m',
|
|
49
|
+
bgYellow: '\x1b[43m',
|
|
50
|
+
bgBlue: '\x1b[44m',
|
|
51
|
+
};
|
|
41
52
|
|
|
42
|
-
|
|
43
|
-
|
|
53
|
+
const icons = {
|
|
54
|
+
critical: '🔴',
|
|
55
|
+
high: '🟠',
|
|
56
|
+
medium: '🟡',
|
|
57
|
+
low: '🔵',
|
|
58
|
+
check: '✓',
|
|
59
|
+
cross: '✗',
|
|
60
|
+
arrow: '→',
|
|
61
|
+
star: '★',
|
|
62
|
+
sparkle: '✨',
|
|
63
|
+
wrench: '🔧',
|
|
64
|
+
rocket: '🚀',
|
|
65
|
+
shield: '🛡️',
|
|
66
|
+
lightning: '⚡',
|
|
67
|
+
eye: '👁️',
|
|
68
|
+
search: '🔍',
|
|
69
|
+
book: '📖',
|
|
70
|
+
gear: '⚙️',
|
|
71
|
+
server: '🖥️',
|
|
72
|
+
lock: '🔒',
|
|
73
|
+
};
|
|
44
74
|
|
|
45
75
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
46
76
|
// UTILITY FUNCTIONS
|
|
@@ -2717,11 +2747,6 @@ function parseArgs(args) {
|
|
|
2717
2747
|
const opts = {
|
|
2718
2748
|
help: false,
|
|
2719
2749
|
fix: false,
|
|
2720
|
-
apply: false, // New: apply auto-fixes (same as fix but clearer intent)
|
|
2721
|
-
dryRun: true, // New: default to dry-run for safety
|
|
2722
|
-
passes: null, // New: specific passes to run (comma-separated)
|
|
2723
|
-
safeOnly: false, // New: only run safe passes
|
|
2724
|
-
listPasses: false, // New: list available passes
|
|
2725
2750
|
json: false,
|
|
2726
2751
|
prompts: false,
|
|
2727
2752
|
verbose: false,
|
|
@@ -2733,11 +2758,6 @@ function parseArgs(args) {
|
|
|
2733
2758
|
const arg = args[i];
|
|
2734
2759
|
if (arg === '--help' || arg === '-h') opts.help = true;
|
|
2735
2760
|
else if (arg === '--fix' || arg === '-f') opts.fix = true;
|
|
2736
|
-
else if (arg === '--apply') { opts.apply = true; opts.dryRun = false; }
|
|
2737
|
-
else if (arg === '--dry-run') opts.dryRun = true;
|
|
2738
|
-
else if (arg === '--passes') opts.passes = args[++i]?.split(',').map(p => p.trim());
|
|
2739
|
-
else if (arg === '--safe-only') opts.safeOnly = true;
|
|
2740
|
-
else if (arg === '--list-passes') opts.listPasses = true;
|
|
2741
2761
|
else if (arg === '--json') opts.json = true;
|
|
2742
2762
|
else if (arg === '--prompts' || arg === '--ai') opts.prompts = true;
|
|
2743
2763
|
else if (arg === '--verbose' || arg === '-v') opts.verbose = true;
|
|
@@ -2746,74 +2766,56 @@ function parseArgs(args) {
|
|
|
2746
2766
|
else if (!arg.startsWith('-')) opts.path = arg;
|
|
2747
2767
|
}
|
|
2748
2768
|
|
|
2749
|
-
// --fix implies --apply for backward compatibility
|
|
2750
|
-
if (opts.fix) {
|
|
2751
|
-
opts.apply = true;
|
|
2752
|
-
opts.dryRun = false;
|
|
2753
|
-
}
|
|
2754
|
-
|
|
2755
2769
|
return opts;
|
|
2756
2770
|
}
|
|
2757
2771
|
|
|
2758
2772
|
function printHelp() {
|
|
2759
2773
|
console.log(`
|
|
2760
|
-
${c.bold}${icons.sparkle} vibecheck polish${c.reset} - Production Polish Analyzer
|
|
2774
|
+
${c.bold}${icons.sparkle} vibecheck polish${c.reset} - Production Polish Analyzer
|
|
2761
2775
|
|
|
2762
2776
|
${c.dim}Finds all the small detailed things you forgot - the polish that makes
|
|
2763
|
-
projects production-ready
|
|
2777
|
+
projects production-ready.${c.reset}
|
|
2764
2778
|
|
|
2765
2779
|
${c.bold}USAGE${c.reset}
|
|
2766
2780
|
vibecheck polish [options] [path]
|
|
2767
2781
|
|
|
2768
|
-
${c.bold}
|
|
2769
|
-
--apply Apply automated fixes (default: dry-run)
|
|
2770
|
-
--dry-run Preview changes without modifying files (default)
|
|
2771
|
-
--passes <list> Run specific passes (comma-separated)
|
|
2772
|
-
--safe-only Only run passes that are safe to auto-apply
|
|
2773
|
-
--list-passes Show all available auto-fix passes
|
|
2774
|
-
|
|
2775
|
-
${c.bold}ANALYSIS OPTIONS${c.reset}
|
|
2782
|
+
${c.bold}OPTIONS${c.reset}
|
|
2776
2783
|
-h, --help Show this help message
|
|
2784
|
+
-f, --fix Auto-fix issues where possible
|
|
2777
2785
|
--prompts, --ai Show AI prompts for each issue (copy to AI assistant)
|
|
2778
2786
|
-v, --verbose Show detailed output including AI prompts inline
|
|
2779
2787
|
-c, --category <name> Check only specific category
|
|
2780
2788
|
-p, --path <path> Project path (defaults to current directory)
|
|
2781
2789
|
--json Output as JSON (includes AI prompts)
|
|
2782
2790
|
|
|
2783
|
-
${c.bold}AUTO-FIX PASSES${c.reset}
|
|
2784
|
-
remove-consoles Remove console.log/debug/info (keep error/warn)
|
|
2785
|
-
dead-code Remove unused imports and unreachable code
|
|
2786
|
-
optimize-imports Sort, dedupe, and organize imports
|
|
2787
|
-
strengthen-types Replace 'any' with inferred types (TypeScript)
|
|
2788
|
-
async-handlers Wrap unhandled async functions in try-catch
|
|
2789
|
-
accessibility Add missing alt, aria-label, and role attributes
|
|
2790
|
-
|
|
2791
2791
|
${c.bold}CATEGORIES${c.reset}
|
|
2792
|
-
frontend Error boundaries, skeletons, ARIA, haptics, animations
|
|
2793
|
-
backend Health endpoints, validation, rate limiting
|
|
2794
|
-
security .env files, security headers, CORS, secrets
|
|
2792
|
+
frontend Error boundaries, skeletons, ARIA, haptics, animations, caching
|
|
2793
|
+
backend Health endpoints, validation, rate limiting, error handling
|
|
2794
|
+
security .env files, security headers, CORS, secrets management
|
|
2795
2795
|
performance Image optimization, caching, bundle analysis
|
|
2796
2796
|
accessibility A11y testing, skip links, focus management
|
|
2797
|
+
seo Meta tags, sitemap, robots.txt, Open Graph
|
|
2798
|
+
configuration TypeScript, ESLint, Prettier, EditorConfig
|
|
2797
2799
|
documentation README, CHANGELOG, CONTRIBUTING, LICENSE
|
|
2798
|
-
infrastructure Docker, CI/CD, deployment config
|
|
2800
|
+
infrastructure Docker, CI/CD, deployment config, env validation
|
|
2801
|
+
observability OpenTelemetry, structured logging, metrics, tracing
|
|
2802
|
+
resilience Circuit breakers, retry logic, timeouts, graceful shutdown
|
|
2803
|
+
internationalization i18n setup, RTL support, locale detection, translations
|
|
2804
|
+
privacy GDPR, cookie consent, data export, account deletion
|
|
2799
2805
|
|
|
2800
2806
|
${c.bold}EXAMPLES${c.reset}
|
|
2801
|
-
vibecheck polish
|
|
2802
|
-
vibecheck polish --
|
|
2803
|
-
vibecheck polish --
|
|
2804
|
-
vibecheck polish --
|
|
2805
|
-
vibecheck polish --
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
1. Run ${c.cyan}vibecheck polish${c.reset} to see what would change (dry-run)
|
|
2811
|
-
2. Review the changes, then run ${c.cyan}vibecheck polish --apply${c.reset}
|
|
2812
|
-
3. Use ${c.cyan}--safe-only${c.reset} for conservative changes
|
|
2813
|
-
4. Use ${c.cyan}--prompts${c.reset} for issues that need manual/AI fixes
|
|
2807
|
+
vibecheck polish # Analyze current project
|
|
2808
|
+
vibecheck polish --prompts # Show AI prompts for all issues
|
|
2809
|
+
vibecheck polish -c frontend --ai # Frontend issues with AI prompts
|
|
2810
|
+
vibecheck polish --fix # Auto-fix issues
|
|
2811
|
+
vibecheck polish --json # Output JSON for CI
|
|
2812
|
+
|
|
2813
|
+
${c.bold}AI PROMPTS${c.reset}
|
|
2814
|
+
Each issue includes an AI-ready prompt you can copy to Cursor, Copilot, or Claude.
|
|
2815
|
+
Use --prompts to see all prompts, or --json for machine-readable output.
|
|
2814
2816
|
|
|
2815
2817
|
${c.bold}TIER${c.reset}
|
|
2816
|
-
${c.
|
|
2818
|
+
${c.cyan}Free${c.reset} - Available on all tiers
|
|
2817
2819
|
`);
|
|
2818
2820
|
}
|
|
2819
2821
|
|
|
@@ -2854,187 +2856,17 @@ function getCategoryIcon(category) {
|
|
|
2854
2856
|
return categoryIcons[category] || icons.star;
|
|
2855
2857
|
}
|
|
2856
2858
|
|
|
2857
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
2858
|
-
// AUTO-FIX MODE - Babel-based code transformations
|
|
2859
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
2860
|
-
|
|
2861
|
-
async function runAutoFixMode(projectPath, opts, { json, quiet }) {
|
|
2862
|
-
const dryRun = opts.dryRun;
|
|
2863
|
-
const mode = dryRun ? 'DRY-RUN' : 'APPLY';
|
|
2864
|
-
|
|
2865
|
-
// JSON output mode
|
|
2866
|
-
if (json) {
|
|
2867
|
-
try {
|
|
2868
|
-
const results = await runPolishPasses(projectPath, {
|
|
2869
|
-
dryRun,
|
|
2870
|
-
passes: opts.passes,
|
|
2871
|
-
safeOnly: opts.safeOnly,
|
|
2872
|
-
verbose: opts.verbose,
|
|
2873
|
-
});
|
|
2874
|
-
console.log(JSON.stringify(results, null, 2));
|
|
2875
|
-
return results.errors.length > 0 ? EXIT.PARTIAL : EXIT.SUCCESS;
|
|
2876
|
-
} catch (err) {
|
|
2877
|
-
console.log(JSON.stringify({ success: false, error: err.message }));
|
|
2878
|
-
return EXIT.INTERNAL_ERROR;
|
|
2879
|
-
}
|
|
2880
|
-
}
|
|
2881
|
-
|
|
2882
|
-
// Interactive output mode
|
|
2883
|
-
const modeColor = dryRun ? c.yellow : c.green;
|
|
2884
|
-
const modeIcon = dryRun ? icons.search : icons.check;
|
|
2885
|
-
|
|
2886
|
-
console.log(`
|
|
2887
|
-
${c.bold}╔══════════════════════════════════════════════════════════════════════════════╗
|
|
2888
|
-
║ ║
|
|
2889
|
-
║ ${icons.wrench} ${c.cyan}VIBECHECK POLISH${c.reset}${c.bold} - Auto-Fix Mode ║
|
|
2890
|
-
║ ║
|
|
2891
|
-
║ ${c.dim}Automated code transformations for production readiness.${c.reset}${c.bold} ║
|
|
2892
|
-
║ ${modeColor}Mode: ${mode}${c.reset}${c.bold} ║
|
|
2893
|
-
║ ║
|
|
2894
|
-
╚══════════════════════════════════════════════════════════════════════════════╝${c.reset}
|
|
2895
|
-
`);
|
|
2896
|
-
|
|
2897
|
-
console.log(`${c.dim}Project:${c.reset} ${projectPath}`);
|
|
2898
|
-
console.log(`${c.dim}Mode:${c.reset} ${modeColor}${mode}${c.reset}${dryRun ? ' (no files modified)' : ''}\n`);
|
|
2899
|
-
|
|
2900
|
-
if (opts.passes) {
|
|
2901
|
-
console.log(`${c.dim}Passes:${c.reset} ${opts.passes.join(', ')}\n`);
|
|
2902
|
-
}
|
|
2903
|
-
|
|
2904
|
-
if (opts.safeOnly) {
|
|
2905
|
-
console.log(`${c.dim}Running safe passes only${c.reset}\n`);
|
|
2906
|
-
}
|
|
2907
|
-
|
|
2908
|
-
try {
|
|
2909
|
-
const startTime = Date.now();
|
|
2910
|
-
|
|
2911
|
-
console.log(`${icons.search} Running polish passes...\n`);
|
|
2912
|
-
|
|
2913
|
-
const results = await runPolishPasses(projectPath, {
|
|
2914
|
-
dryRun,
|
|
2915
|
-
passes: opts.passes,
|
|
2916
|
-
safeOnly: opts.safeOnly,
|
|
2917
|
-
verbose: opts.verbose,
|
|
2918
|
-
});
|
|
2919
|
-
|
|
2920
|
-
const duration = Date.now() - startTime;
|
|
2921
|
-
|
|
2922
|
-
// Display results for each pass
|
|
2923
|
-
console.log(`${c.bold}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${c.reset}`);
|
|
2924
|
-
console.log(`${c.bold}${icons.wrench} PASS RESULTS${c.reset}`);
|
|
2925
|
-
console.log(`${c.bold}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${c.reset}\n`);
|
|
2926
|
-
|
|
2927
|
-
for (const pass of results.passes) {
|
|
2928
|
-
const statusIcon = pass.failed ? c.red + icons.cross : (pass.changes > 0 ? c.green + icons.check : c.dim + icons.dot);
|
|
2929
|
-
const changeText = pass.changes > 0
|
|
2930
|
-
? `${c.cyan}${pass.changes} change(s)${c.reset}`
|
|
2931
|
-
: `${c.dim}no changes${c.reset}`;
|
|
2932
|
-
|
|
2933
|
-
console.log(` ${statusIcon}${c.reset} ${c.bold}${pass.name}${c.reset}`);
|
|
2934
|
-
console.log(` ${changeText} in ${pass.files.length} file(s) ${c.dim}(${pass.duration}ms)${c.reset}`);
|
|
2935
|
-
|
|
2936
|
-
if (pass.errors.length > 0 && opts.verbose) {
|
|
2937
|
-
for (const err of pass.errors) {
|
|
2938
|
-
console.log(` ${c.red}${icons.warning} ${err.error}${c.reset}`);
|
|
2939
|
-
}
|
|
2940
|
-
}
|
|
2941
|
-
|
|
2942
|
-
// Show file list in verbose mode
|
|
2943
|
-
if (opts.verbose && pass.files.length > 0) {
|
|
2944
|
-
console.log(` ${c.dim}Files:${c.reset}`);
|
|
2945
|
-
for (const file of pass.files.slice(0, 5)) {
|
|
2946
|
-
console.log(` ${c.dim}•${c.reset} ${file}`);
|
|
2947
|
-
}
|
|
2948
|
-
if (pass.files.length > 5) {
|
|
2949
|
-
console.log(` ${c.dim}... and ${pass.files.length - 5} more${c.reset}`);
|
|
2950
|
-
}
|
|
2951
|
-
}
|
|
2952
|
-
console.log();
|
|
2953
|
-
}
|
|
2954
|
-
|
|
2955
|
-
// Summary
|
|
2956
|
-
console.log(`${c.bold}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${c.reset}`);
|
|
2957
|
-
console.log(`${c.bold}${icons.star} SUMMARY${c.reset}`);
|
|
2958
|
-
console.log(`${c.bold}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${c.reset}\n`);
|
|
2959
|
-
|
|
2960
|
-
console.log(` ${c.bold}Total Changes:${c.reset} ${results.totalChanges}`);
|
|
2961
|
-
console.log(` ${c.bold}Files Modified:${c.reset} ${results.totalFilesModified.length}`);
|
|
2962
|
-
console.log(` ${c.bold}Errors:${c.reset} ${results.errors.length}`);
|
|
2963
|
-
console.log(` ${c.bold}Duration:${c.reset} ${duration}ms\n`);
|
|
2964
|
-
|
|
2965
|
-
if (dryRun && results.totalChanges > 0) {
|
|
2966
|
-
console.log(`${c.yellow}${icons.warning} This was a dry run. No files were modified.${c.reset}`);
|
|
2967
|
-
console.log(`${c.dim}Run with ${c.cyan}--apply${c.reset}${c.dim} to apply these changes.${c.reset}\n`);
|
|
2968
|
-
} else if (!dryRun && results.totalChanges > 0) {
|
|
2969
|
-
console.log(`${c.green}${icons.check} Changes applied successfully!${c.reset}\n`);
|
|
2970
|
-
} else if (results.totalChanges === 0) {
|
|
2971
|
-
console.log(`${c.green}${icons.check} No changes needed - code is already polished!${c.reset}\n`);
|
|
2972
|
-
}
|
|
2973
|
-
|
|
2974
|
-
// Next steps
|
|
2975
|
-
if (!quiet) {
|
|
2976
|
-
console.log(`${c.bold}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${c.reset}`);
|
|
2977
|
-
console.log(`${c.bold}${icons.rocket} NEXT STEPS${c.reset}`);
|
|
2978
|
-
console.log(`${c.bold}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${c.reset}\n`);
|
|
2979
|
-
|
|
2980
|
-
if (dryRun) {
|
|
2981
|
-
console.log(` 1. Review the changes above`);
|
|
2982
|
-
console.log(` 2. Run ${c.cyan}vibecheck polish --apply${c.reset} to apply changes`);
|
|
2983
|
-
console.log(` 3. Run ${c.cyan}vibecheck polish --safe-only --apply${c.reset} for conservative fixes`);
|
|
2984
|
-
} else {
|
|
2985
|
-
console.log(` 1. Run ${c.cyan}git diff${c.reset} to review changes`);
|
|
2986
|
-
console.log(` 2. Run ${c.cyan}vibecheck polish${c.reset} to check for remaining issues`);
|
|
2987
|
-
console.log(` 3. Run ${c.cyan}vibecheck scan${c.reset} to verify code quality`);
|
|
2988
|
-
console.log(` 4. Run ${c.cyan}vibecheck ship${c.reset} to check if ready to deploy`);
|
|
2989
|
-
}
|
|
2990
|
-
console.log();
|
|
2991
|
-
}
|
|
2992
|
-
|
|
2993
|
-
return results.errors.length > 0 ? EXIT.PARTIAL : EXIT.SUCCESS;
|
|
2994
|
-
|
|
2995
|
-
} catch (err) {
|
|
2996
|
-
console.error(`${c.red}${icons.cross} Auto-fix failed: ${err.message}${c.reset}`);
|
|
2997
|
-
if (opts.verbose) {
|
|
2998
|
-
console.error(err.stack);
|
|
2999
|
-
}
|
|
3000
|
-
return EXIT.INTERNAL_ERROR;
|
|
3001
|
-
}
|
|
3002
|
-
}
|
|
3003
|
-
|
|
3004
2859
|
async function runPolish(args) {
|
|
3005
2860
|
const opts = parseArgs(args);
|
|
3006
2861
|
const { flags: globalFlags } = parseGlobalFlags(args);
|
|
3007
2862
|
const quiet = shouldSuppressOutput(globalFlags);
|
|
3008
2863
|
const json = isJsonMode(globalFlags) || opts.json;
|
|
3009
2864
|
|
|
3010
|
-
// Configure unified output mode
|
|
3011
|
-
output.setMode({
|
|
3012
|
-
json: json,
|
|
3013
|
-
quiet: quiet,
|
|
3014
|
-
ci: opts.ci
|
|
3015
|
-
});
|
|
3016
|
-
|
|
3017
2865
|
if (opts.help) {
|
|
3018
2866
|
printHelp();
|
|
3019
2867
|
return EXIT.SUCCESS;
|
|
3020
2868
|
}
|
|
3021
2869
|
|
|
3022
|
-
// List available auto-fix passes
|
|
3023
|
-
if (opts.listPasses) {
|
|
3024
|
-
const passes = getAvailablePasses();
|
|
3025
|
-
console.log(`\n${c.bold}${icons.wrench} Available Auto-Fix Passes${c.reset}\n`);
|
|
3026
|
-
|
|
3027
|
-
for (const pass of passes) {
|
|
3028
|
-
const safeTag = pass.safe ? `${c.green}[SAFE]${c.reset}` : `${c.yellow}[REVIEW]${c.reset}`;
|
|
3029
|
-
console.log(` ${c.cyan}${pass.id.padEnd(20)}${c.reset} ${safeTag}`);
|
|
3030
|
-
console.log(` ${c.dim}${pass.description}${c.reset}\n`);
|
|
3031
|
-
}
|
|
3032
|
-
|
|
3033
|
-
console.log(`${c.dim}Usage: vibecheck polish --apply --passes remove-consoles,dead-code${c.reset}`);
|
|
3034
|
-
console.log(`${c.dim} vibecheck polish --apply --safe-only${c.reset}\n`);
|
|
3035
|
-
return EXIT.SUCCESS;
|
|
3036
|
-
}
|
|
3037
|
-
|
|
3038
2870
|
const projectPath = path.resolve(opts.path);
|
|
3039
2871
|
|
|
3040
2872
|
// Verify project exists
|
|
@@ -3048,14 +2880,6 @@ async function runPolish(args) {
|
|
|
3048
2880
|
return EXIT.NOT_FOUND;
|
|
3049
2881
|
}
|
|
3050
2882
|
|
|
3051
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
3052
|
-
// AUTO-FIX MODE - Run Babel-based transformations
|
|
3053
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
3054
|
-
|
|
3055
|
-
if (opts.apply || opts.fix || opts.passes) {
|
|
3056
|
-
return await runAutoFixMode(projectPath, opts, { json, quiet });
|
|
3057
|
-
}
|
|
3058
|
-
|
|
3059
2883
|
try {
|
|
3060
2884
|
// JSON mode
|
|
3061
2885
|
if (json) {
|
|
@@ -13,11 +13,18 @@ const path = require("path");
|
|
|
13
13
|
const readline = require("readline");
|
|
14
14
|
const { withErrorHandling } = require("./lib/error-handler");
|
|
15
15
|
|
|
16
|
-
//
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
// ANSI colors
|
|
17
|
+
const c = {
|
|
18
|
+
reset: "\x1b[0m",
|
|
19
|
+
bold: "\x1b[1m",
|
|
20
|
+
dim: "\x1b[2m",
|
|
21
|
+
red: "\x1b[31m",
|
|
22
|
+
green: "\x1b[32m",
|
|
23
|
+
yellow: "\x1b[33m",
|
|
24
|
+
blue: "\x1b[34m",
|
|
25
|
+
magenta: "\x1b[35m",
|
|
26
|
+
cyan: "\x1b[36m",
|
|
27
|
+
};
|
|
21
28
|
|
|
22
29
|
async function runPromptFirewall(args) {
|
|
23
30
|
return withErrorHandling(async () => {
|
package/bin/runners/runProve.js
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
const fs = require("fs");
|
|
21
21
|
const path = require("path");
|
|
22
|
-
const {
|
|
22
|
+
const { buildTruthpackSmart, writeTruthpack, detectFastifyEntry } = require("./lib/truth");
|
|
23
23
|
const { shipCore } = require("./runShip");
|
|
24
24
|
const { findContractDrift, loadContracts, hasContracts, getDriftSummary } = require("./lib/drift");
|
|
25
25
|
const {
|
|
@@ -46,24 +46,66 @@ try {
|
|
|
46
46
|
runFixCore = null;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
// V7: World-class proof certificate
|
|
50
|
-
let proofCertificate;
|
|
51
|
-
try {
|
|
52
|
-
proofCertificate = require("./lib/proof-certificate");
|
|
53
|
-
} catch {
|
|
54
|
-
proofCertificate = null;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
49
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
58
|
-
// TERMINAL
|
|
50
|
+
// ADVANCED TERMINAL - ANSI CODES & UTILITIES
|
|
59
51
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
60
52
|
|
|
61
|
-
const
|
|
53
|
+
const c = {
|
|
54
|
+
reset: '\x1b[0m',
|
|
55
|
+
bold: '\x1b[1m',
|
|
56
|
+
dim: '\x1b[2m',
|
|
57
|
+
italic: '\x1b[3m',
|
|
58
|
+
underline: '\x1b[4m',
|
|
59
|
+
blink: '\x1b[5m',
|
|
60
|
+
inverse: '\x1b[7m',
|
|
61
|
+
hidden: '\x1b[8m',
|
|
62
|
+
strike: '\x1b[9m',
|
|
63
|
+
// Colors
|
|
64
|
+
black: '\x1b[30m',
|
|
65
|
+
red: '\x1b[31m',
|
|
66
|
+
green: '\x1b[32m',
|
|
67
|
+
yellow: '\x1b[33m',
|
|
68
|
+
blue: '\x1b[34m',
|
|
69
|
+
magenta: '\x1b[35m',
|
|
70
|
+
cyan: '\x1b[36m',
|
|
71
|
+
white: '\x1b[37m',
|
|
72
|
+
// Bright colors
|
|
73
|
+
gray: '\x1b[90m',
|
|
74
|
+
brightRed: '\x1b[91m',
|
|
75
|
+
brightGreen: '\x1b[92m',
|
|
76
|
+
brightYellow: '\x1b[93m',
|
|
77
|
+
brightBlue: '\x1b[94m',
|
|
78
|
+
brightMagenta: '\x1b[95m',
|
|
79
|
+
brightCyan: '\x1b[96m',
|
|
80
|
+
brightWhite: '\x1b[97m',
|
|
81
|
+
// Background
|
|
82
|
+
bgBlack: '\x1b[40m',
|
|
83
|
+
bgRed: '\x1b[41m',
|
|
84
|
+
bgGreen: '\x1b[42m',
|
|
85
|
+
bgYellow: '\x1b[43m',
|
|
86
|
+
bgBlue: '\x1b[44m',
|
|
87
|
+
bgMagenta: '\x1b[45m',
|
|
88
|
+
bgCyan: '\x1b[46m',
|
|
89
|
+
bgWhite: '\x1b[47m',
|
|
90
|
+
bgBrightBlack: '\x1b[100m',
|
|
91
|
+
// Cursor control
|
|
92
|
+
cursorUp: (n = 1) => `\x1b[${n}A`,
|
|
93
|
+
cursorDown: (n = 1) => `\x1b[${n}B`,
|
|
94
|
+
cursorRight: (n = 1) => `\x1b[${n}C`,
|
|
95
|
+
cursorLeft: (n = 1) => `\x1b[${n}D`,
|
|
96
|
+
clearLine: '\x1b[2K',
|
|
97
|
+
clearScreen: '\x1b[2J',
|
|
98
|
+
saveCursor: '\x1b[s',
|
|
99
|
+
restoreCursor: '\x1b[u',
|
|
100
|
+
hideCursor: '\x1b[?25l',
|
|
101
|
+
showCursor: '\x1b[?25h',
|
|
102
|
+
};
|
|
62
103
|
|
|
63
|
-
//
|
|
64
|
-
const
|
|
104
|
+
// True color support
|
|
105
|
+
const rgb = (r, g, b) => `\x1b[38;2;${r};${g};${b}m`;
|
|
106
|
+
const bgRgb = (r, g, b) => `\x1b[48;2;${r};${g};${b}m`;
|
|
65
107
|
|
|
66
|
-
//
|
|
108
|
+
// Premium color palette
|
|
67
109
|
const colors = {
|
|
68
110
|
// Gradient for banner (purple/magenta theme for "prove")
|
|
69
111
|
gradient1: rgb(180, 100, 255), // Light purple
|
|
@@ -728,13 +770,6 @@ async function runProve(argsOrOpts = {}, context = {}) {
|
|
|
728
770
|
// Parse global flags first
|
|
729
771
|
const { flags: globalFlags, cleanArgs } = parseGlobalFlags(argsOrOpts);
|
|
730
772
|
|
|
731
|
-
// Configure unified output mode
|
|
732
|
-
output.setMode({
|
|
733
|
-
json: globalFlags.json,
|
|
734
|
-
quiet: globalFlags.quiet,
|
|
735
|
-
ci: globalFlags.ci
|
|
736
|
-
});
|
|
737
|
-
|
|
738
773
|
if (globalFlags.help) {
|
|
739
774
|
printHelp(shouldShowBanner(globalFlags));
|
|
740
775
|
return 0;
|
|
@@ -834,7 +869,7 @@ async function runProve(argsOrOpts = {}, context = {}) {
|
|
|
834
869
|
|
|
835
870
|
try {
|
|
836
871
|
const fastEntry = fastifyEntry || (await detectFastifyEntry(root));
|
|
837
|
-
const truthpack = await
|
|
872
|
+
const truthpack = await buildTruthpackSmart({ repoRoot: root, fastifyEntry: fastEntry });
|
|
838
873
|
writeTruthpack(root, truthpack);
|
|
839
874
|
|
|
840
875
|
stopSpinner('Truthpack refreshed', true);
|