@vibecheckai/cli 2.5.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/LICENSE +21 -0
- package/README.md +532 -0
- package/dist/autopatch/verified-autopatch.d.ts +111 -0
- package/dist/autopatch/verified-autopatch.d.ts.map +1 -0
- package/dist/autopatch/verified-autopatch.js +503 -0
- package/dist/autopatch/verified-autopatch.js.map +1 -0
- package/dist/bundles/guardrail-core.js +25799 -0
- package/dist/bundles/guardrail-security.js +208687 -0
- package/dist/bundles/guardrail-ship.js +2318 -0
- package/dist/bundles/index.js +8 -0
- package/dist/commands/autopilot-decision.d.ts +24 -0
- package/dist/commands/autopilot-decision.d.ts.map +1 -0
- package/dist/commands/autopilot-decision.js +304 -0
- package/dist/commands/autopilot-decision.js.map +1 -0
- package/dist/commands/autopilot.d.ts +33 -0
- package/dist/commands/autopilot.d.ts.map +1 -0
- package/dist/commands/autopilot.js +1539 -0
- package/dist/commands/autopilot.js.map +1 -0
- package/dist/commands/baseline.d.ts +7 -0
- package/dist/commands/baseline.d.ts.map +1 -0
- package/dist/commands/baseline.js +79 -0
- package/dist/commands/baseline.js.map +1 -0
- package/dist/commands/cache.d.ts +13 -0
- package/dist/commands/cache.d.ts.map +1 -0
- package/dist/commands/cache.js +165 -0
- package/dist/commands/cache.js.map +1 -0
- package/dist/commands/checkpoint.d.ts +8 -0
- package/dist/commands/checkpoint.d.ts.map +1 -0
- package/dist/commands/checkpoint.js +35 -0
- package/dist/commands/checkpoint.js.map +1 -0
- package/dist/commands/context.d.ts +8 -0
- package/dist/commands/context.d.ts.map +1 -0
- package/dist/commands/context.js +340 -0
- package/dist/commands/context.js.map +1 -0
- package/dist/commands/debug.d.ts +78 -0
- package/dist/commands/debug.d.ts.map +1 -0
- package/dist/commands/debug.js +381 -0
- package/dist/commands/debug.js.map +1 -0
- package/dist/commands/doctor.d.ts +17 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +226 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/evidence.d.ts +45 -0
- package/dist/commands/evidence.d.ts.map +1 -0
- package/dist/commands/evidence.js +197 -0
- package/dist/commands/evidence.js.map +1 -0
- package/dist/commands/explain.d.ts +8 -0
- package/dist/commands/explain.d.ts.map +1 -0
- package/dist/commands/explain.js +52 -0
- package/dist/commands/explain.js.map +1 -0
- package/dist/commands/fix-consolidated.d.ts +19 -0
- package/dist/commands/fix-consolidated.d.ts.map +1 -0
- package/dist/commands/fix-consolidated.js +165 -0
- package/dist/commands/fix-consolidated.js.map +1 -0
- package/dist/commands/index.d.ts +8 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +15 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/init.d.ts +8 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +125 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/launcher.d.ts +10 -0
- package/dist/commands/launcher.d.ts.map +1 -0
- package/dist/commands/launcher.js +174 -0
- package/dist/commands/launcher.js.map +1 -0
- package/dist/commands/on.d.ts +8 -0
- package/dist/commands/on.d.ts.map +1 -0
- package/dist/commands/on.js +123 -0
- package/dist/commands/on.js.map +1 -0
- package/dist/commands/preview.d.ts +54 -0
- package/dist/commands/preview.d.ts.map +1 -0
- package/dist/commands/preview.js +352 -0
- package/dist/commands/preview.js.map +1 -0
- package/dist/commands/quality/check.d.ts +31 -0
- package/dist/commands/quality/check.d.ts.map +1 -0
- package/dist/commands/quality/check.js +242 -0
- package/dist/commands/quality/check.js.map +1 -0
- package/dist/commands/quality/index.d.ts +8 -0
- package/dist/commands/quality/index.d.ts.map +1 -0
- package/dist/commands/quality/index.js +14 -0
- package/dist/commands/quality/index.js.map +1 -0
- package/dist/commands/quality/setup-quality.d.ts +23 -0
- package/dist/commands/quality/setup-quality.d.ts.map +1 -0
- package/dist/commands/quality/setup-quality.js +452 -0
- package/dist/commands/quality/setup-quality.js.map +1 -0
- package/dist/commands/quality/tidy.d.ts +41 -0
- package/dist/commands/quality/tidy.d.ts.map +1 -0
- package/dist/commands/quality/tidy.js +466 -0
- package/dist/commands/quality/tidy.js.map +1 -0
- package/dist/commands/quality/utils.d.ts +73 -0
- package/dist/commands/quality/utils.d.ts.map +1 -0
- package/dist/commands/quality/utils.js +158 -0
- package/dist/commands/quality/utils.js.map +1 -0
- package/dist/commands/replay.d.ts +8 -0
- package/dist/commands/replay.d.ts.map +1 -0
- package/dist/commands/replay.js +52 -0
- package/dist/commands/replay.js.map +1 -0
- package/dist/commands/scan-consolidated.d.ts +61 -0
- package/dist/commands/scan-consolidated.d.ts.map +1 -0
- package/dist/commands/scan-consolidated.js +243 -0
- package/dist/commands/scan-consolidated.js.map +1 -0
- package/dist/commands/scan-secrets.d.ts +47 -0
- package/dist/commands/scan-secrets.d.ts.map +1 -0
- package/dist/commands/scan-secrets.js +225 -0
- package/dist/commands/scan-secrets.js.map +1 -0
- package/dist/commands/scan-vulnerabilities-enhanced.d.ts +41 -0
- package/dist/commands/scan-vulnerabilities-enhanced.d.ts.map +1 -0
- package/dist/commands/scan-vulnerabilities-enhanced.js +368 -0
- package/dist/commands/scan-vulnerabilities-enhanced.js.map +1 -0
- package/dist/commands/scan-vulnerabilities-osv.d.ts +58 -0
- package/dist/commands/scan-vulnerabilities-osv.d.ts.map +1 -0
- package/dist/commands/scan-vulnerabilities-osv.js +716 -0
- package/dist/commands/scan-vulnerabilities-osv.js.map +1 -0
- package/dist/commands/scan-vulnerabilities.d.ts +32 -0
- package/dist/commands/scan-vulnerabilities.d.ts.map +1 -0
- package/dist/commands/scan-vulnerabilities.js +283 -0
- package/dist/commands/scan-vulnerabilities.js.map +1 -0
- package/dist/commands/secrets-allowlist.d.ts +7 -0
- package/dist/commands/secrets-allowlist.d.ts.map +1 -0
- package/dist/commands/secrets-allowlist.js +85 -0
- package/dist/commands/secrets-allowlist.js.map +1 -0
- package/dist/commands/ship-consolidated.d.ts +58 -0
- package/dist/commands/ship-consolidated.d.ts.map +1 -0
- package/dist/commands/ship-consolidated.js +515 -0
- package/dist/commands/ship-consolidated.js.map +1 -0
- package/dist/commands/stats.d.ts +8 -0
- package/dist/commands/stats.d.ts.map +1 -0
- package/dist/commands/stats.js +134 -0
- package/dist/commands/stats.js.map +1 -0
- package/dist/commands/upgrade.d.ts +8 -0
- package/dist/commands/upgrade.d.ts.map +1 -0
- package/dist/commands/upgrade.js +30 -0
- package/dist/commands/upgrade.js.map +1 -0
- package/dist/fix/analytics.d.ts +121 -0
- package/dist/fix/analytics.d.ts.map +1 -0
- package/dist/fix/analytics.js +289 -0
- package/dist/fix/analytics.js.map +1 -0
- package/dist/fix/applicator.d.ts +44 -0
- package/dist/fix/applicator.d.ts.map +1 -0
- package/dist/fix/applicator.js +144 -0
- package/dist/fix/applicator.js.map +1 -0
- package/dist/fix/audit.d.ts +61 -0
- package/dist/fix/audit.d.ts.map +1 -0
- package/dist/fix/audit.js +149 -0
- package/dist/fix/audit.js.map +1 -0
- package/dist/fix/backup.d.ts +38 -0
- package/dist/fix/backup.d.ts.map +1 -0
- package/dist/fix/backup.js +154 -0
- package/dist/fix/backup.js.map +1 -0
- package/dist/fix/config.d.ts +78 -0
- package/dist/fix/config.d.ts.map +1 -0
- package/dist/fix/config.js +200 -0
- package/dist/fix/config.js.map +1 -0
- package/dist/fix/engine.d.ts +55 -0
- package/dist/fix/engine.d.ts.map +1 -0
- package/dist/fix/engine.js +285 -0
- package/dist/fix/engine.js.map +1 -0
- package/dist/fix/impact.d.ts +74 -0
- package/dist/fix/impact.d.ts.map +1 -0
- package/dist/fix/impact.js +281 -0
- package/dist/fix/impact.js.map +1 -0
- package/dist/fix/index.d.ts +5 -0
- package/dist/fix/index.d.ts.map +1 -0
- package/dist/fix/index.js +12 -0
- package/dist/fix/index.js.map +1 -0
- package/dist/fix/interactive.d.ts +22 -0
- package/dist/fix/interactive.d.ts.map +1 -0
- package/dist/fix/interactive.js +172 -0
- package/dist/fix/interactive.js.map +1 -0
- package/dist/fix/learning.d.ts +109 -0
- package/dist/fix/learning.d.ts.map +1 -0
- package/dist/fix/learning.js +296 -0
- package/dist/fix/learning.js.map +1 -0
- package/dist/fix/metrics.d.ts +106 -0
- package/dist/fix/metrics.d.ts.map +1 -0
- package/dist/fix/metrics.js +138 -0
- package/dist/fix/metrics.js.map +1 -0
- package/dist/fix/parallel.d.ts +69 -0
- package/dist/fix/parallel.d.ts.map +1 -0
- package/dist/fix/parallel.js +203 -0
- package/dist/fix/parallel.js.map +1 -0
- package/dist/fix/report.d.ts +40 -0
- package/dist/fix/report.d.ts.map +1 -0
- package/dist/fix/report.js +212 -0
- package/dist/fix/report.js.map +1 -0
- package/dist/fix/strategy.d.ts +53 -0
- package/dist/fix/strategy.d.ts.map +1 -0
- package/dist/fix/strategy.js +143 -0
- package/dist/fix/strategy.js.map +1 -0
- package/dist/fix/templates.d.ts +58 -0
- package/dist/fix/templates.d.ts.map +1 -0
- package/dist/fix/templates.js +259 -0
- package/dist/fix/templates.js.map +1 -0
- package/dist/fix/testing.d.ts +68 -0
- package/dist/fix/testing.d.ts.map +1 -0
- package/dist/fix/testing.js +245 -0
- package/dist/fix/testing.js.map +1 -0
- package/dist/fix/validation.d.ts +71 -0
- package/dist/fix/validation.d.ts.map +1 -0
- package/dist/fix/validation.js +267 -0
- package/dist/fix/validation.js.map +1 -0
- package/dist/fix/visualization.d.ts +73 -0
- package/dist/fix/visualization.d.ts.map +1 -0
- package/dist/fix/visualization.js +243 -0
- package/dist/fix/visualization.js.map +1 -0
- package/dist/formatters/index.d.ts +6 -0
- package/dist/formatters/index.d.ts.map +1 -0
- package/dist/formatters/index.js +11 -0
- package/dist/formatters/index.js.map +1 -0
- package/dist/formatters/sarif-enhanced.d.ts +78 -0
- package/dist/formatters/sarif-enhanced.d.ts.map +1 -0
- package/dist/formatters/sarif-enhanced.js +144 -0
- package/dist/formatters/sarif-enhanced.js.map +1 -0
- package/dist/formatters/sarif-v2.d.ts +121 -0
- package/dist/formatters/sarif-v2.d.ts.map +1 -0
- package/dist/formatters/sarif-v2.js +356 -0
- package/dist/formatters/sarif-v2.js.map +1 -0
- package/dist/formatters/sarif.d.ts +72 -0
- package/dist/formatters/sarif.d.ts.map +1 -0
- package/dist/formatters/sarif.js +146 -0
- package/dist/formatters/sarif.js.map +1 -0
- package/dist/index.d.ts +61 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4455 -0
- package/dist/index.js.map +1 -0
- package/dist/init/ci-generator.d.ts +18 -0
- package/dist/init/ci-generator.d.ts.map +1 -0
- package/dist/init/ci-generator.js +317 -0
- package/dist/init/ci-generator.js.map +1 -0
- package/dist/init/detect-framework.d.ts +15 -0
- package/dist/init/detect-framework.d.ts.map +1 -0
- package/dist/init/detect-framework.js +301 -0
- package/dist/init/detect-framework.js.map +1 -0
- package/dist/init/hooks-installer.d.ts +22 -0
- package/dist/init/hooks-installer.d.ts.map +1 -0
- package/dist/init/hooks-installer.js +310 -0
- package/dist/init/hooks-installer.js.map +1 -0
- package/dist/init/index.d.ts +8 -0
- package/dist/init/index.d.ts.map +1 -0
- package/dist/init/index.js +22 -0
- package/dist/init/index.js.map +1 -0
- package/dist/init/templates.d.ts +401 -0
- package/dist/init/templates.d.ts.map +1 -0
- package/dist/init/templates.js +240 -0
- package/dist/init/templates.js.map +1 -0
- package/dist/mcp/server.d.ts +12 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +42 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/telemetry.d.ts +40 -0
- package/dist/mcp/telemetry.d.ts.map +1 -0
- package/dist/mcp/telemetry.js +98 -0
- package/dist/mcp/telemetry.js.map +1 -0
- package/dist/reality/no-dead-buttons/button-sweep-generator.d.ts +32 -0
- package/dist/reality/no-dead-buttons/button-sweep-generator.d.ts.map +1 -0
- package/dist/reality/no-dead-buttons/button-sweep-generator.js +236 -0
- package/dist/reality/no-dead-buttons/button-sweep-generator.js.map +1 -0
- package/dist/reality/no-dead-buttons/index.d.ts +11 -0
- package/dist/reality/no-dead-buttons/index.d.ts.map +1 -0
- package/dist/reality/no-dead-buttons/index.js +18 -0
- package/dist/reality/no-dead-buttons/index.js.map +1 -0
- package/dist/reality/no-dead-buttons/static-scanner.d.ts +34 -0
- package/dist/reality/no-dead-buttons/static-scanner.d.ts.map +1 -0
- package/dist/reality/no-dead-buttons/static-scanner.js +230 -0
- package/dist/reality/no-dead-buttons/static-scanner.js.map +1 -0
- package/dist/reality/reality-graph.d.ts +192 -0
- package/dist/reality/reality-graph.d.ts.map +1 -0
- package/dist/reality/reality-graph.js +600 -0
- package/dist/reality/reality-graph.js.map +1 -0
- package/dist/reality/reality-runner.d.ts +89 -0
- package/dist/reality/reality-runner.d.ts.map +1 -0
- package/dist/reality/reality-runner.js +540 -0
- package/dist/reality/reality-runner.js.map +1 -0
- package/dist/reality/receipt-generator.d.ts +152 -0
- package/dist/reality/receipt-generator.d.ts.map +1 -0
- package/dist/reality/receipt-generator.js +495 -0
- package/dist/reality/receipt-generator.js.map +1 -0
- package/dist/reality/runtime-tracer.d.ts +75 -0
- package/dist/reality/runtime-tracer.d.ts.map +1 -0
- package/dist/reality/runtime-tracer.js +109 -0
- package/dist/reality/runtime-tracer.js.map +1 -0
- package/dist/runtime/auth-utils.d.ts +43 -0
- package/dist/runtime/auth-utils.d.ts.map +1 -0
- package/dist/runtime/auth-utils.js +130 -0
- package/dist/runtime/auth-utils.js.map +1 -0
- package/dist/runtime/cli-errors.d.ts +38 -0
- package/dist/runtime/cli-errors.d.ts.map +1 -0
- package/dist/runtime/cli-errors.js +354 -0
- package/dist/runtime/cli-errors.js.map +1 -0
- package/dist/runtime/client.d.ts +74 -0
- package/dist/runtime/client.d.ts.map +1 -0
- package/dist/runtime/client.js +222 -0
- package/dist/runtime/client.js.map +1 -0
- package/dist/runtime/creds.d.ts +48 -0
- package/dist/runtime/creds.d.ts.map +1 -0
- package/dist/runtime/creds.js +245 -0
- package/dist/runtime/creds.js.map +1 -0
- package/dist/runtime/exit-codes.d.ts +49 -0
- package/dist/runtime/exit-codes.d.ts.map +1 -0
- package/dist/runtime/exit-codes.js +93 -0
- package/dist/runtime/exit-codes.js.map +1 -0
- package/dist/runtime/index.d.ts +9 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +25 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/json-output.d.ts +42 -0
- package/dist/runtime/json-output.d.ts.map +1 -0
- package/dist/runtime/json-output.js +59 -0
- package/dist/runtime/json-output.js.map +1 -0
- package/dist/runtime/owner-mode.d.ts +48 -0
- package/dist/runtime/owner-mode.d.ts.map +1 -0
- package/dist/runtime/owner-mode.js +284 -0
- package/dist/runtime/owner-mode.js.map +1 -0
- package/dist/runtime/semver.d.ts +37 -0
- package/dist/runtime/semver.d.ts.map +1 -0
- package/dist/runtime/semver.js +110 -0
- package/dist/runtime/semver.js.map +1 -0
- package/dist/scan/dead-ui-detector.d.ts +48 -0
- package/dist/scan/dead-ui-detector.d.ts.map +1 -0
- package/dist/scan/dead-ui-detector.js +170 -0
- package/dist/scan/dead-ui-detector.js.map +1 -0
- package/dist/scan/playwright-sweep.d.ts +40 -0
- package/dist/scan/playwright-sweep.d.ts.map +1 -0
- package/dist/scan/playwright-sweep.js +216 -0
- package/dist/scan/playwright-sweep.js.map +1 -0
- package/dist/scan/proof-bundle.d.ts +25 -0
- package/dist/scan/proof-bundle.d.ts.map +1 -0
- package/dist/scan/proof-bundle.js +203 -0
- package/dist/scan/proof-bundle.js.map +1 -0
- package/dist/scan/proof-graph.d.ts +59 -0
- package/dist/scan/proof-graph.d.ts.map +1 -0
- package/dist/scan/proof-graph.js +64 -0
- package/dist/scan/proof-graph.js.map +1 -0
- package/dist/scan/reality-sniff.d.ts +56 -0
- package/dist/scan/reality-sniff.d.ts.map +1 -0
- package/dist/scan/reality-sniff.js +200 -0
- package/dist/scan/reality-sniff.js.map +1 -0
- package/dist/scan/structural-verifier.d.ts +20 -0
- package/dist/scan/structural-verifier.d.ts.map +1 -0
- package/dist/scan/structural-verifier.js +112 -0
- package/dist/scan/structural-verifier.js.map +1 -0
- package/dist/scan/verification-engine.d.ts +47 -0
- package/dist/scan/verification-engine.d.ts.map +1 -0
- package/dist/scan/verification-engine.js +141 -0
- package/dist/scan/verification-engine.js.map +1 -0
- package/dist/scanner/baseline.d.ts +52 -0
- package/dist/scanner/baseline.d.ts.map +1 -0
- package/dist/scanner/baseline.js +85 -0
- package/dist/scanner/baseline.js.map +1 -0
- package/dist/scanner/incremental.d.ts +30 -0
- package/dist/scanner/incremental.d.ts.map +1 -0
- package/dist/scanner/incremental.js +82 -0
- package/dist/scanner/incremental.js.map +1 -0
- package/dist/scanner/index.d.ts +8 -0
- package/dist/scanner/index.d.ts.map +1 -0
- package/dist/scanner/index.js +15 -0
- package/dist/scanner/index.js.map +1 -0
- package/dist/scanner/parallel.d.ts +43 -0
- package/dist/scanner/parallel.d.ts.map +1 -0
- package/dist/scanner/parallel.js +99 -0
- package/dist/scanner/parallel.js.map +1 -0
- package/dist/scanner/placeholder-detector.d.ts +56 -0
- package/dist/scanner/placeholder-detector.d.ts.map +1 -0
- package/dist/scanner/placeholder-detector.js +220 -0
- package/dist/scanner/placeholder-detector.js.map +1 -0
- package/dist/scanner/route-detector.d.ts +100 -0
- package/dist/scanner/route-detector.d.ts.map +1 -0
- package/dist/scanner/route-detector.js +455 -0
- package/dist/scanner/route-detector.js.map +1 -0
- package/dist/scanner/scoring.d.ts +67 -0
- package/dist/scanner/scoring.d.ts.map +1 -0
- package/dist/scanner/scoring.js +284 -0
- package/dist/scanner/scoring.js.map +1 -0
- package/dist/ship-baseline.d.ts +56 -0
- package/dist/ship-baseline.d.ts.map +1 -0
- package/dist/ship-baseline.js +194 -0
- package/dist/ship-baseline.js.map +1 -0
- package/dist/ship-config.d.ts +91 -0
- package/dist/ship-config.d.ts.map +1 -0
- package/dist/ship-config.js +133 -0
- package/dist/ship-config.js.map +1 -0
- package/dist/ship-data-loader.d.ts +70 -0
- package/dist/ship-data-loader.d.ts.map +1 -0
- package/dist/ship-data-loader.js +301 -0
- package/dist/ship-data-loader.js.map +1 -0
- package/dist/standalone.d.ts +1 -0
- package/dist/standalone.d.ts.map +1 -0
- package/dist/standalone.js +1 -0
- package/dist/standalone.js.map +1 -0
- package/dist/truth-pack/index.d.ts +102 -0
- package/dist/truth-pack/index.d.ts.map +1 -0
- package/dist/truth-pack/index.js +694 -0
- package/dist/truth-pack/index.js.map +1 -0
- package/dist/ui/frame.d.ts +68 -0
- package/dist/ui/frame.d.ts.map +1 -0
- package/dist/ui/frame.js +165 -0
- package/dist/ui/frame.js.map +1 -0
- package/dist/ui/index.d.ts +5 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +16 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui.d.ts +36 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +45 -0
- package/dist/ui.js.map +1 -0
- package/dist/utils/ai-helpers.d.ts +72 -0
- package/dist/utils/ai-helpers.d.ts.map +1 -0
- package/dist/utils/ai-helpers.js +339 -0
- package/dist/utils/ai-helpers.js.map +1 -0
- package/dist/utils/validation.d.ts +34 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +160 -0
- package/dist/utils/validation.js.map +1 -0
- package/package.json +66 -0
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Preview/Dry-Run Utilities
|
|
4
|
+
*
|
|
5
|
+
* Provides preview functionality for paid commands:
|
|
6
|
+
* - gate
|
|
7
|
+
* - ship
|
|
8
|
+
* - reality
|
|
9
|
+
* - autopilot
|
|
10
|
+
*
|
|
11
|
+
* Shows what checks would run, artifacts that would be generated, and sample report skeleton
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.generateShipPreview = generateShipPreview;
|
|
15
|
+
exports.generateGatePreview = generateGatePreview;
|
|
16
|
+
exports.generateRealityPreview = generateRealityPreview;
|
|
17
|
+
exports.generateAutopilotPreview = generateAutopilotPreview;
|
|
18
|
+
exports.formatPreviewAsText = formatPreviewAsText;
|
|
19
|
+
/**
|
|
20
|
+
* Generate preview for ship command
|
|
21
|
+
*/
|
|
22
|
+
function generateShipPreview(projectPath, options = {}) {
|
|
23
|
+
const checks = [
|
|
24
|
+
{
|
|
25
|
+
id: 'no-mock-data',
|
|
26
|
+
name: 'No Mock Data Detected',
|
|
27
|
+
description: 'Scans for mock data patterns in production code',
|
|
28
|
+
category: 'production-readiness',
|
|
29
|
+
tier: 'starter',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 'no-localhost',
|
|
33
|
+
name: 'No Localhost/Ngrok',
|
|
34
|
+
description: 'Checks for localhost, staging, or ngrok URLs in production',
|
|
35
|
+
category: 'production-readiness',
|
|
36
|
+
tier: 'starter',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: 'env-vars',
|
|
40
|
+
name: 'Environment Variables Present',
|
|
41
|
+
description: 'Verifies required environment variables are configured',
|
|
42
|
+
category: 'configuration',
|
|
43
|
+
tier: 'starter',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: 'real-billing',
|
|
47
|
+
name: 'Real Billing',
|
|
48
|
+
description: 'Checks for simulated or test billing implementations',
|
|
49
|
+
category: 'business-logic',
|
|
50
|
+
tier: 'pro',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: 'real-database',
|
|
54
|
+
name: 'Real Database',
|
|
55
|
+
description: 'Verifies production database configuration',
|
|
56
|
+
category: 'infrastructure',
|
|
57
|
+
tier: 'pro',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: 'oauth-callbacks',
|
|
61
|
+
name: 'OAuth Callbacks',
|
|
62
|
+
description: 'Validates OAuth callback URLs are production-ready',
|
|
63
|
+
category: 'security',
|
|
64
|
+
tier: 'pro',
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
const artifacts = [
|
|
68
|
+
{
|
|
69
|
+
type: 'report',
|
|
70
|
+
name: 'Ship Check Report',
|
|
71
|
+
format: options.format || 'table',
|
|
72
|
+
location: options.output || '.guardrail/ship-report.json',
|
|
73
|
+
description: 'Detailed ship check results and recommendations',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
type: 'badge',
|
|
77
|
+
name: 'Ship Badge',
|
|
78
|
+
format: 'svg',
|
|
79
|
+
location: '.guardrail/badges/ship-badge.svg',
|
|
80
|
+
description: 'Ship/no-ship status badge for README',
|
|
81
|
+
},
|
|
82
|
+
];
|
|
83
|
+
const sampleReport = {
|
|
84
|
+
verdict: 'review',
|
|
85
|
+
score: 75,
|
|
86
|
+
checks: [
|
|
87
|
+
{
|
|
88
|
+
id: 'no-mock-data',
|
|
89
|
+
name: 'No Mock Data Detected',
|
|
90
|
+
status: 'pass',
|
|
91
|
+
message: 'No mock data patterns found',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: 'no-localhost',
|
|
95
|
+
name: 'No Localhost/Ngrok',
|
|
96
|
+
status: 'fail',
|
|
97
|
+
message: 'Found 3 localhost URLs in production code',
|
|
98
|
+
details: ['src/api/client.ts:45', 'src/utils/helpers.ts:12'],
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
timestamp: new Date().toISOString(),
|
|
102
|
+
};
|
|
103
|
+
return {
|
|
104
|
+
command: 'ship',
|
|
105
|
+
checks,
|
|
106
|
+
artifacts,
|
|
107
|
+
sampleReport,
|
|
108
|
+
estimatedDuration: '2-5 seconds',
|
|
109
|
+
tierRequired: 'starter',
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Generate preview for gate command
|
|
114
|
+
*/
|
|
115
|
+
function generateGatePreview(projectPath, options = {}) {
|
|
116
|
+
const checks = [
|
|
117
|
+
{
|
|
118
|
+
id: 'secrets',
|
|
119
|
+
name: 'Secrets Detection',
|
|
120
|
+
description: 'Scans for hardcoded secrets and credentials',
|
|
121
|
+
category: 'security',
|
|
122
|
+
tier: 'free',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: 'vulnerabilities',
|
|
126
|
+
name: 'Vulnerability Scan',
|
|
127
|
+
description: 'Checks dependencies for known vulnerabilities',
|
|
128
|
+
category: 'security',
|
|
129
|
+
tier: 'free',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
id: 'compliance',
|
|
133
|
+
name: 'Compliance Check',
|
|
134
|
+
description: 'Validates compliance with configured frameworks',
|
|
135
|
+
category: 'compliance',
|
|
136
|
+
tier: 'pro',
|
|
137
|
+
},
|
|
138
|
+
];
|
|
139
|
+
const artifacts = [
|
|
140
|
+
{
|
|
141
|
+
type: 'report',
|
|
142
|
+
name: 'Gate Report',
|
|
143
|
+
format: options.format || 'sarif',
|
|
144
|
+
location: options.output || '.guardrail/gate-report.sarif',
|
|
145
|
+
description: 'Gate check results in SARIF format for CI/CD',
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
type: 'log',
|
|
149
|
+
name: 'Gate Log',
|
|
150
|
+
format: 'json',
|
|
151
|
+
location: '.guardrail/gate-log.json',
|
|
152
|
+
description: 'Detailed execution log',
|
|
153
|
+
},
|
|
154
|
+
];
|
|
155
|
+
const sampleReport = {
|
|
156
|
+
passed: false,
|
|
157
|
+
findings: {
|
|
158
|
+
critical: 0,
|
|
159
|
+
high: 2,
|
|
160
|
+
medium: 5,
|
|
161
|
+
low: 10,
|
|
162
|
+
},
|
|
163
|
+
summary: {
|
|
164
|
+
secrets: 2,
|
|
165
|
+
vulnerabilities: 5,
|
|
166
|
+
compliance: 8,
|
|
167
|
+
},
|
|
168
|
+
timestamp: new Date().toISOString(),
|
|
169
|
+
};
|
|
170
|
+
return {
|
|
171
|
+
command: 'gate',
|
|
172
|
+
checks,
|
|
173
|
+
artifacts,
|
|
174
|
+
sampleReport,
|
|
175
|
+
estimatedDuration: '5-15 seconds',
|
|
176
|
+
tierRequired: 'free',
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Generate preview for reality command
|
|
181
|
+
*/
|
|
182
|
+
function generateRealityPreview(projectPath, options = {}) {
|
|
183
|
+
const checks = [
|
|
184
|
+
{
|
|
185
|
+
id: 'runtime-exploration',
|
|
186
|
+
name: 'Runtime Exploration',
|
|
187
|
+
description: 'Explores application runtime behavior',
|
|
188
|
+
category: 'testing',
|
|
189
|
+
tier: 'pro',
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
id: 'fake-detection',
|
|
193
|
+
name: 'Fake Success Detection',
|
|
194
|
+
description: 'Detects fake success patterns in API responses',
|
|
195
|
+
category: 'testing',
|
|
196
|
+
tier: 'pro',
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
id: 'auth-enforcement',
|
|
200
|
+
name: 'Auth Enforcement',
|
|
201
|
+
description: 'Validates authentication flow integrity',
|
|
202
|
+
category: 'security',
|
|
203
|
+
tier: 'pro',
|
|
204
|
+
},
|
|
205
|
+
];
|
|
206
|
+
const artifacts = [
|
|
207
|
+
{
|
|
208
|
+
type: 'report',
|
|
209
|
+
name: 'Reality Check Report',
|
|
210
|
+
format: 'json',
|
|
211
|
+
location: options.output || '.guardrail/reality-report.json',
|
|
212
|
+
description: 'Runtime behavior analysis results',
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
type: 'log',
|
|
216
|
+
name: 'Reality Flight Recorder',
|
|
217
|
+
format: 'json',
|
|
218
|
+
location: '.guardrail/reality-recorder.json',
|
|
219
|
+
description: 'Detailed runtime execution log',
|
|
220
|
+
},
|
|
221
|
+
];
|
|
222
|
+
const sampleReport = {
|
|
223
|
+
verdict: 'pass',
|
|
224
|
+
findings: [
|
|
225
|
+
{
|
|
226
|
+
type: 'fake-api-domain',
|
|
227
|
+
severity: 'critical',
|
|
228
|
+
message: 'Request to localhost:3000 detected',
|
|
229
|
+
url: 'http://localhost:3000/api/users',
|
|
230
|
+
},
|
|
231
|
+
],
|
|
232
|
+
timestamp: new Date().toISOString(),
|
|
233
|
+
};
|
|
234
|
+
return {
|
|
235
|
+
command: 'reality',
|
|
236
|
+
checks,
|
|
237
|
+
artifacts,
|
|
238
|
+
sampleReport,
|
|
239
|
+
estimatedDuration: '30-120 seconds',
|
|
240
|
+
tierRequired: 'pro',
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Generate preview for autopilot command
|
|
245
|
+
*/
|
|
246
|
+
function generateAutopilotPreview(projectPath, options = {}) {
|
|
247
|
+
const checks = [
|
|
248
|
+
{
|
|
249
|
+
id: 'code-analysis',
|
|
250
|
+
name: 'Code Analysis',
|
|
251
|
+
description: 'Comprehensive static code analysis',
|
|
252
|
+
category: 'quality',
|
|
253
|
+
tier: 'enterprise',
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
id: 'ai-recommendations',
|
|
257
|
+
name: 'AI Recommendations',
|
|
258
|
+
description: 'AI-powered code improvement suggestions',
|
|
259
|
+
category: 'quality',
|
|
260
|
+
tier: 'enterprise',
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
id: 'auto-fix',
|
|
264
|
+
name: 'Auto-Fix Suggestions',
|
|
265
|
+
description: 'Automated fix recommendations',
|
|
266
|
+
category: 'quality',
|
|
267
|
+
tier: 'enterprise',
|
|
268
|
+
},
|
|
269
|
+
];
|
|
270
|
+
const artifacts = [
|
|
271
|
+
{
|
|
272
|
+
type: 'report',
|
|
273
|
+
name: 'Autopilot Report',
|
|
274
|
+
format: 'json',
|
|
275
|
+
location: options.output || '.guardrail/autopilot-report.json',
|
|
276
|
+
description: 'Comprehensive analysis and recommendations',
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
type: 'data',
|
|
280
|
+
name: 'Fix Suggestions',
|
|
281
|
+
format: 'json',
|
|
282
|
+
location: '.guardrail/autopilot-fixes.json',
|
|
283
|
+
description: 'Automated fix suggestions',
|
|
284
|
+
},
|
|
285
|
+
];
|
|
286
|
+
const sampleReport = {
|
|
287
|
+
recommendations: [
|
|
288
|
+
{
|
|
289
|
+
type: 'security',
|
|
290
|
+
severity: 'high',
|
|
291
|
+
message: 'Hardcoded API key detected',
|
|
292
|
+
suggestion: 'Move to environment variables',
|
|
293
|
+
autoFixable: true,
|
|
294
|
+
},
|
|
295
|
+
],
|
|
296
|
+
timestamp: new Date().toISOString(),
|
|
297
|
+
};
|
|
298
|
+
return {
|
|
299
|
+
command: 'autopilot',
|
|
300
|
+
checks,
|
|
301
|
+
artifacts,
|
|
302
|
+
sampleReport,
|
|
303
|
+
estimatedDuration: '60-300 seconds',
|
|
304
|
+
tierRequired: 'enterprise',
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Format preview as text
|
|
309
|
+
*/
|
|
310
|
+
function formatPreviewAsText(preview) {
|
|
311
|
+
const lines = [];
|
|
312
|
+
lines.push('═══════════════════════════════════════════════════════════════');
|
|
313
|
+
lines.push(`PREVIEW: guardrail ${preview.command}`);
|
|
314
|
+
lines.push('═══════════════════════════════════════════════════════════════');
|
|
315
|
+
lines.push('');
|
|
316
|
+
lines.push(`Tier Required: ${preview.tierRequired.toUpperCase()}`);
|
|
317
|
+
if (preview.estimatedDuration) {
|
|
318
|
+
lines.push(`Estimated Duration: ${preview.estimatedDuration}`);
|
|
319
|
+
}
|
|
320
|
+
lines.push('');
|
|
321
|
+
lines.push('CHECKS THAT WOULD RUN:');
|
|
322
|
+
lines.push('');
|
|
323
|
+
for (const check of preview.checks) {
|
|
324
|
+
lines.push(` ✓ ${check.name} (${check.category})`);
|
|
325
|
+
lines.push(` ${check.description}`);
|
|
326
|
+
lines.push(` Tier: ${check.tier}`);
|
|
327
|
+
lines.push('');
|
|
328
|
+
}
|
|
329
|
+
lines.push('ARTIFACTS THAT WOULD BE GENERATED:');
|
|
330
|
+
lines.push('');
|
|
331
|
+
for (const artifact of preview.artifacts) {
|
|
332
|
+
lines.push(` ${artifact.type === 'report' ? '📄' : artifact.type === 'badge' ? '🛡️' : '📝'} ${artifact.name}`);
|
|
333
|
+
if (artifact.format) {
|
|
334
|
+
lines.push(` Format: ${artifact.format}`);
|
|
335
|
+
}
|
|
336
|
+
lines.push(` Location: ${artifact.location}`);
|
|
337
|
+
lines.push(` ${artifact.description}`);
|
|
338
|
+
lines.push('');
|
|
339
|
+
}
|
|
340
|
+
if (preview.sampleReport) {
|
|
341
|
+
lines.push('SAMPLE REPORT STRUCTURE:');
|
|
342
|
+
lines.push('');
|
|
343
|
+
lines.push(JSON.stringify(preview.sampleReport, null, 2));
|
|
344
|
+
lines.push('');
|
|
345
|
+
}
|
|
346
|
+
lines.push('═══════════════════════════════════════════════════════════════');
|
|
347
|
+
lines.push('This is a preview. No actual checks were executed.');
|
|
348
|
+
lines.push('Run the command without --preview to execute checks.');
|
|
349
|
+
lines.push('═══════════════════════════════════════════════════════════════');
|
|
350
|
+
return lines.join('\n');
|
|
351
|
+
}
|
|
352
|
+
//# sourceMappingURL=preview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview.js","sourceRoot":"","sources":["../../src/commands/preview.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;AA8BH,kDA+FC;AAKD,kDAqEC;AAKD,wDAkEC;AAKD,4DAkEC;AAKD,kDAgDC;AA/WD;;GAEG;AACH,SAAgB,mBAAmB,CACjC,WAAmB,EACnB,UAAe,EAAE;IAEjB,MAAM,MAAM,GAAmB;QAC7B;YACE,EAAE,EAAE,cAAc;YAClB,IAAI,EAAE,uBAAuB;YAC7B,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,sBAAsB;YAChC,IAAI,EAAE,SAAS;SAChB;QACD;YACE,EAAE,EAAE,cAAc;YAClB,IAAI,EAAE,oBAAoB;YAC1B,WAAW,EAAE,4DAA4D;YACzE,QAAQ,EAAE,sBAAsB;YAChC,IA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AAC,CAAC,CAAC;QAC1D,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,iEAAiE,CAAC,CAAC;IAC9E,KAAK,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC;IACjE,KAAK,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAC;IACnE,KAAK,CAAC,IAAI,CAAC,iEAAiE,CAAC,CAAC;IAE9E,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* guardrail check command
|
|
3
|
+
* Adapter/orchestrator that runs existing quality scripts
|
|
4
|
+
*/
|
|
5
|
+
import { Command } from 'commander';
|
|
6
|
+
export interface CheckResult {
|
|
7
|
+
script: string;
|
|
8
|
+
command: string;
|
|
9
|
+
exitCode: number;
|
|
10
|
+
success: boolean;
|
|
11
|
+
output?: string;
|
|
12
|
+
error?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface CheckOptions {
|
|
15
|
+
projectPath: string;
|
|
16
|
+
scripts?: string[];
|
|
17
|
+
json: boolean;
|
|
18
|
+
ci: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Run all quality checks
|
|
22
|
+
*/
|
|
23
|
+
export declare function runChecks(options: CheckOptions): Promise<{
|
|
24
|
+
results: CheckResult[];
|
|
25
|
+
allPassed: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
/**
|
|
28
|
+
* Register check command
|
|
29
|
+
*/
|
|
30
|
+
export declare function registerCheckCommand(program: Command, printLogo: () => void): void;
|
|
31
|
+
//# sourceMappingURL=check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../../src/commands/quality/check.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiBpC,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,EAAE,EAAE,OAAO,CAAC;CACb;AAyGD;;GAEG;AACH,wBAAsB,SAAS,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC;IAC9D,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC,CAoDD;AA2DD;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,MAAM,IAAI,GACpB,IAAI,CA4DN"}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* guardrail check command
|
|
4
|
+
* Adapter/orchestrator that runs existing quality scripts
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.runChecks = runChecks;
|
|
8
|
+
exports.registerCheckCommand = registerCheckCommand;
|
|
9
|
+
const path_1 = require("path");
|
|
10
|
+
const fs_1 = require("fs");
|
|
11
|
+
const child_process_1 = require("child_process");
|
|
12
|
+
const exit_codes_1 = require("../../runtime/exit-codes");
|
|
13
|
+
const utils_1 = require("./utils");
|
|
14
|
+
// Color helpers
|
|
15
|
+
const c = {
|
|
16
|
+
reset: '\x1b[0m',
|
|
17
|
+
bold: (s) => `\x1b[1m${s}\x1b[0m`,
|
|
18
|
+
dim: (s) => `\x1b[2m${s}\x1b[0m`,
|
|
19
|
+
success: (s) => `\x1b[32m${s}\x1b[0m`,
|
|
20
|
+
error: (s) => `\x1b[31m${s}\x1b[0m`,
|
|
21
|
+
info: (s) => `\x1b[34m${s}\x1b[0m`,
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Detect package manager command
|
|
25
|
+
*/
|
|
26
|
+
function getPackageManagerCommand(projectPath, info) {
|
|
27
|
+
const pm = info.packageManager;
|
|
28
|
+
if (pm === 'pnpm') {
|
|
29
|
+
return { cmd: 'pnpm', args: ['run'] };
|
|
30
|
+
}
|
|
31
|
+
if (pm === 'yarn') {
|
|
32
|
+
return { cmd: 'yarn', args: [] };
|
|
33
|
+
}
|
|
34
|
+
// Default to npm
|
|
35
|
+
return { cmd: 'npm', args: ['run'] };
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Run a script using package manager
|
|
39
|
+
*/
|
|
40
|
+
function runScript(projectPath, scriptName, pmCmd, pmArgs) {
|
|
41
|
+
return new Promise((resolve) => {
|
|
42
|
+
const args = [...pmArgs, scriptName];
|
|
43
|
+
const child = (0, child_process_1.spawn)(pmCmd, args, {
|
|
44
|
+
cwd: projectPath,
|
|
45
|
+
stdio: 'pipe',
|
|
46
|
+
shell: process.platform === 'win32',
|
|
47
|
+
});
|
|
48
|
+
let stdout = '';
|
|
49
|
+
let stderr = '';
|
|
50
|
+
child.stdout?.on('data', (data) => {
|
|
51
|
+
stdout += data.toString();
|
|
52
|
+
});
|
|
53
|
+
child.stderr?.on('data', (data) => {
|
|
54
|
+
stderr += data.toString();
|
|
55
|
+
});
|
|
56
|
+
child.on('close', (code) => {
|
|
57
|
+
resolve({
|
|
58
|
+
script: scriptName,
|
|
59
|
+
command: `${pmCmd} ${args.join(' ')}`,
|
|
60
|
+
exitCode: code || 0,
|
|
61
|
+
success: code === 0,
|
|
62
|
+
output: stdout || undefined,
|
|
63
|
+
error: stderr || undefined,
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
child.on('error', (err) => {
|
|
67
|
+
resolve({
|
|
68
|
+
script: scriptName,
|
|
69
|
+
command: `${pmCmd} ${args.join(' ')}`,
|
|
70
|
+
exitCode: 1,
|
|
71
|
+
success: false,
|
|
72
|
+
error: err.message,
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Find quality scripts to run
|
|
79
|
+
*/
|
|
80
|
+
function findQualityScripts(pkg, requestedScripts) {
|
|
81
|
+
if (!pkg || !pkg.scripts) {
|
|
82
|
+
return [];
|
|
83
|
+
}
|
|
84
|
+
const qualityScripts = ['lint', 'test', 'typecheck', 'format:check', 'build'];
|
|
85
|
+
const scripts = [];
|
|
86
|
+
if (requestedScripts && requestedScripts.length > 0) {
|
|
87
|
+
// Use requested scripts
|
|
88
|
+
for (const script of requestedScripts) {
|
|
89
|
+
if ((0, utils_1.hasScript)(pkg, script)) {
|
|
90
|
+
scripts.push(script);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
// Auto-detect
|
|
96
|
+
for (const script of qualityScripts) {
|
|
97
|
+
if ((0, utils_1.hasScript)(pkg, script)) {
|
|
98
|
+
scripts.push(script);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return scripts;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Run all quality checks
|
|
106
|
+
*/
|
|
107
|
+
async function runChecks(options) {
|
|
108
|
+
const info = (0, utils_1.getProjectInfo)(options.projectPath);
|
|
109
|
+
const pkg = (0, utils_1.loadPackageJson)(options.projectPath);
|
|
110
|
+
if (!pkg || !info.hasPackageJson) {
|
|
111
|
+
return {
|
|
112
|
+
results: [],
|
|
113
|
+
allPassed: true,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
const scripts = findQualityScripts(pkg, options.scripts);
|
|
117
|
+
const results = [];
|
|
118
|
+
if (scripts.length === 0) {
|
|
119
|
+
return {
|
|
120
|
+
results: [],
|
|
121
|
+
allPassed: true,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
const pm = getPackageManagerCommand(options.projectPath, info);
|
|
125
|
+
// Run scripts sequentially
|
|
126
|
+
for (const script of scripts) {
|
|
127
|
+
const result = await runScript(options.projectPath, script, pm.cmd, pm.args);
|
|
128
|
+
results.push(result);
|
|
129
|
+
// In non-CI mode, show output
|
|
130
|
+
if (!options.ci && result.output) {
|
|
131
|
+
if (!options.json) {
|
|
132
|
+
console.log(result.output);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
// Stop on first failure if not in CI mode (allow all to run in CI)
|
|
136
|
+
if (!result.success && !options.ci) {
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
const allPassed = results.every((r) => r.success);
|
|
141
|
+
return {
|
|
142
|
+
results,
|
|
143
|
+
allPassed,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Output check results
|
|
148
|
+
*/
|
|
149
|
+
function outputResults(results, allPassed, options) {
|
|
150
|
+
if (options.json) {
|
|
151
|
+
console.log(JSON.stringify({
|
|
152
|
+
success: allPassed,
|
|
153
|
+
results: results.map((r) => ({
|
|
154
|
+
script: r.script,
|
|
155
|
+
command: r.command,
|
|
156
|
+
exitCode: r.exitCode,
|
|
157
|
+
success: r.success,
|
|
158
|
+
})),
|
|
159
|
+
}, null, 2));
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
if (options.ci) {
|
|
163
|
+
// CI mode: minimal output
|
|
164
|
+
if (!allPassed) {
|
|
165
|
+
console.error(`Check failed: ${results.filter((r) => !r.success).map((r) => r.script).join(', ')}`);
|
|
166
|
+
}
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
// Human-readable output
|
|
170
|
+
console.log(`\n${c.bold('✅ QUALITY CHECK RESULTS')}\n`);
|
|
171
|
+
for (const result of results) {
|
|
172
|
+
const icon = result.success ? c.success('✓') : c.error('✗');
|
|
173
|
+
const status = result.success ? c.success('passed') : c.error('failed');
|
|
174
|
+
console.log(` ${icon} ${c.bold(result.script)}: ${status}`);
|
|
175
|
+
if (!result.success && result.error) {
|
|
176
|
+
console.log(` ${c.dim(result.error.split('\n')[0])}`);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
console.log('');
|
|
180
|
+
if (allPassed) {
|
|
181
|
+
console.log(` ${c.success('✓')} All checks passed\n`);
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
const failed = results.filter((r) => !r.success);
|
|
185
|
+
console.log(` ${c.error('✗')} ${failed.length} check(s) failed\n`);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Register check command
|
|
190
|
+
*/
|
|
191
|
+
function registerCheckCommand(program, printLogo) {
|
|
192
|
+
program
|
|
193
|
+
.command('check')
|
|
194
|
+
.description('Run existing quality scripts (lint, test, typecheck, etc.)')
|
|
195
|
+
.option('-p, --path <path>', 'Project path', '.')
|
|
196
|
+
.option('--scripts <scripts>', 'Comma-separated scripts to run (default: auto-detect)')
|
|
197
|
+
.option('--json', 'Output results as JSON', false)
|
|
198
|
+
.option('--ci', 'CI mode: minimal output', false)
|
|
199
|
+
.action(async (opts) => {
|
|
200
|
+
if (!opts.ci) {
|
|
201
|
+
printLogo();
|
|
202
|
+
}
|
|
203
|
+
const projectPath = (0, path_1.resolve)(opts.path);
|
|
204
|
+
if (!(0, fs_1.existsSync)(projectPath)) {
|
|
205
|
+
(0, exit_codes_1.exitWith)(exit_codes_1.ExitCode.USER_ERROR, `Path does not exist: ${projectPath}`);
|
|
206
|
+
}
|
|
207
|
+
const info = (0, utils_1.getProjectInfo)(projectPath);
|
|
208
|
+
if (!info.hasPackageJson) {
|
|
209
|
+
console.log(`\n ${c.error('✗')} No package.json found\n`);
|
|
210
|
+
console.log(` ${c.dim('Tip:')} Run ${c.bold('guardrail setup quality')} to generate baseline files\n`);
|
|
211
|
+
(0, exit_codes_1.exitWith)(exit_codes_1.ExitCode.USER_ERROR, 'No package.json found');
|
|
212
|
+
}
|
|
213
|
+
const scripts = opts.scripts
|
|
214
|
+
? opts.scripts.split(',').map((s) => s.trim())
|
|
215
|
+
: undefined;
|
|
216
|
+
const options = {
|
|
217
|
+
projectPath,
|
|
218
|
+
scripts,
|
|
219
|
+
json: opts.json,
|
|
220
|
+
ci: opts.ci,
|
|
221
|
+
};
|
|
222
|
+
const { results, allPassed } = await runChecks(options);
|
|
223
|
+
if (results.length === 0) {
|
|
224
|
+
console.log(`\n ${c.info('ℹ')} No quality scripts found\n`);
|
|
225
|
+
console.log(` ${c.dim('Available scripts:')}\n`);
|
|
226
|
+
const pkg = (0, utils_1.loadPackageJson)(projectPath);
|
|
227
|
+
if (pkg?.scripts) {
|
|
228
|
+
for (const [name, cmd] of Object.entries(pkg.scripts)) {
|
|
229
|
+
console.log(` ${c.dim(name + ':')} ${cmd}`);
|
|
230
|
+
}
|
|
231
|
+
console.log('');
|
|
232
|
+
}
|
|
233
|
+
console.log(` ${c.dim('Tip:')} Run ${c.bold('guardrail setup quality')} to generate baseline configuration\n`);
|
|
234
|
+
(0, exit_codes_1.exitWith)(exit_codes_1.ExitCode.SUCCESS);
|
|
235
|
+
}
|
|
236
|
+
outputResults(results, allPassed, options);
|
|
237
|
+
if (!allPassed) {
|
|
238
|
+
(0, exit_codes_1.exitWith)(exit_codes_1.ExitCode.POLICY_FAIL, 'One or more checks failed');
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
//# sourceMappingURL=check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../src/commands/quality/check.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AA6IH,8BAuDC;AA8DD,oDA+DC;AA9TD,+BAA+B;AAC/B,2BAAgC;AAChC,iDAAsC;AACtC,yDAA8D;AAC9D,mCAAqE;AAErE,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AClD,MAAM,GAAG,GAAG,IAAA,uBAAe,EAAC,WAAW,CAAC,CAAC;YACzC,IAAI,GAAG,EAAE,OAAO,EAAE,CAAC;gBACjB,KAAK,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;oBACtD,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;gBACjD,CAAC;gBACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAClB,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,yBAAyB,CAAC,uCAAuC,CAAC,CAAC;YAChH,IAAA,qBAAQ,EAAC,qBAAQ,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC;QAED,aAAa,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;QAE3C,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,IAAA,qBAAQ,EAAC,qBAAQ,CAAC,WAAW,EAAE,2BAA2B,CAAC,CAAC;QAC9D,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quality commands module
|
|
3
|
+
* Exports all quality-related commands (tidy, setup-quality, check)
|
|
4
|
+
*/
|
|
5
|
+
export { registerTidyCommand } from './tidy';
|
|
6
|
+
export { registerSetupQualityCommand } from './setup-quality';
|
|
7
|
+
export { registerCheckCommand } from './check';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/quality/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC"}
|