@buoy-design/cli 0.1.0 → 0.1.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/dist/commands/baseline.d.ts +39 -0
- package/dist/commands/baseline.d.ts.map +1 -0
- package/dist/commands/baseline.js +298 -0
- package/dist/commands/baseline.js.map +1 -0
- package/dist/commands/bootstrap.js +1 -1
- package/dist/commands/bootstrap.js.map +1 -1
- package/dist/commands/ci.d.ts +2 -2
- package/dist/commands/ci.d.ts.map +1 -1
- package/dist/commands/ci.js +107 -129
- package/dist/commands/ci.js.map +1 -1
- package/dist/commands/drift.d.ts +1 -1
- package/dist/commands/drift.d.ts.map +1 -1
- package/dist/commands/drift.js +68 -95
- package/dist/commands/drift.js.map +1 -1
- package/dist/commands/index.d.ts +9 -8
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +9 -8
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +61 -86
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/plugins.d.ts.map +1 -1
- package/dist/commands/plugins.js +32 -41
- package/dist/commands/plugins.js.map +1 -1
- package/dist/commands/scan.d.ts +1 -1
- package/dist/commands/scan.d.ts.map +1 -1
- package/dist/commands/scan.js +59 -211
- package/dist/commands/scan.js.map +1 -1
- package/dist/commands/status.d.ts +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +79 -116
- package/dist/commands/status.js.map +1 -1
- package/dist/detect/frameworks.d.ts +6 -1
- package/dist/detect/frameworks.d.ts.map +1 -1
- package/dist/detect/frameworks.js +43 -69
- package/dist/detect/frameworks.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist/integrations/github-formatter.d.ts +3 -0
- package/dist/integrations/github-formatter.d.ts.map +1 -0
- package/dist/integrations/github-formatter.js +69 -0
- package/dist/integrations/github-formatter.js.map +1 -0
- package/dist/integrations/github.d.ts +20 -0
- package/dist/integrations/github.d.ts.map +1 -0
- package/dist/integrations/github.js +69 -0
- package/dist/integrations/github.js.map +1 -0
- package/dist/integrations/index.d.ts +4 -0
- package/dist/integrations/index.d.ts.map +1 -0
- package/dist/integrations/index.js +4 -0
- package/dist/integrations/index.js.map +1 -0
- package/dist/scan/orchestrator.d.ts +76 -0
- package/dist/scan/orchestrator.d.ts.map +1 -0
- package/dist/scan/orchestrator.js +247 -0
- package/dist/scan/orchestrator.js.map +1 -0
- package/package.json +26 -17
- package/dist/plugins/index.d.ts +0 -3
- package/dist/plugins/index.d.ts.map +0 -1
- package/dist/plugins/index.js +0 -3
- package/dist/plugins/index.js.map +0 -1
- package/dist/plugins/loader.d.ts +0 -11
- package/dist/plugins/loader.d.ts.map +0 -1
- package/dist/plugins/loader.js +0 -77
- package/dist/plugins/loader.js.map +0 -1
- package/dist/plugins/registry.d.ts +0 -15
- package/dist/plugins/registry.d.ts.map +0 -1
- package/dist/plugins/registry.js +0 -32
- package/dist/plugins/registry.js.map +0 -1
package/dist/commands/ci.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// apps/cli/src/commands/ci.ts
|
|
2
|
-
import { Command } from
|
|
3
|
-
import { loadConfig, getConfigPath } from
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import { loadConfig, getConfigPath } from "../config/loader.js";
|
|
4
|
+
import { setJsonMode } from "../output/reporters.js";
|
|
5
|
+
import { ScanOrchestrator } from "../scan/orchestrator.js";
|
|
6
|
+
import { GitHubClient, parseRepoString, formatPRComment, } from "../integrations/index.js";
|
|
6
7
|
const SEVERITY_ORDER = {
|
|
7
8
|
info: 0,
|
|
8
9
|
warning: 1,
|
|
@@ -13,8 +14,8 @@ function validateGitHubOptions(options) {
|
|
|
13
14
|
const repo = options.githubRepo || process.env.GITHUB_REPOSITORY;
|
|
14
15
|
const prInput = options.githubPr || process.env.GITHUB_PR_NUMBER;
|
|
15
16
|
// Validate token: must be non-empty if provided
|
|
16
|
-
if (token !== undefined && token.trim() ===
|
|
17
|
-
throw new Error(
|
|
17
|
+
if (token !== undefined && token.trim() === "") {
|
|
18
|
+
throw new Error("Invalid GitHub token: must be non-empty if provided.");
|
|
18
19
|
}
|
|
19
20
|
// Validate repo format: must be "owner/repo" with non-empty parts
|
|
20
21
|
if (repo !== undefined) {
|
|
@@ -22,8 +23,8 @@ function validateGitHubOptions(options) {
|
|
|
22
23
|
if (!repoPattern.test(repo)) {
|
|
23
24
|
throw new Error(`Invalid GitHub repo format: '${repo}'. Must be in 'owner/repo' format (e.g., 'facebook/react').`);
|
|
24
25
|
}
|
|
25
|
-
const [owner, repoName] = repo.split(
|
|
26
|
-
if (!owner || owner.trim() ===
|
|
26
|
+
const [owner, repoName] = repo.split("/");
|
|
27
|
+
if (!owner || owner.trim() === "" || !repoName || repoName.trim() === "") {
|
|
27
28
|
throw new Error(`Invalid GitHub repo format: '${repo}'. Both owner and repo parts must be non-empty.`);
|
|
28
29
|
}
|
|
29
30
|
}
|
|
@@ -31,7 +32,10 @@ function validateGitHubOptions(options) {
|
|
|
31
32
|
let pr;
|
|
32
33
|
if (prInput !== undefined) {
|
|
33
34
|
const parsed = parseInt(prInput, 10);
|
|
34
|
-
if (isNaN(parsed) ||
|
|
35
|
+
if (isNaN(parsed) ||
|
|
36
|
+
parsed <= 0 ||
|
|
37
|
+
!Number.isInteger(parsed) ||
|
|
38
|
+
String(parsed) !== prInput.trim()) {
|
|
35
39
|
throw new Error(`Invalid PR number: '${prInput}'. Must be a positive integer.`);
|
|
36
40
|
}
|
|
37
41
|
pr = parsed;
|
|
@@ -43,18 +47,19 @@ function validateGitHubOptions(options) {
|
|
|
43
47
|
};
|
|
44
48
|
}
|
|
45
49
|
export function createCICommand() {
|
|
46
|
-
const cmd = new Command(
|
|
47
|
-
.description(
|
|
48
|
-
.option(
|
|
49
|
-
.option(
|
|
50
|
-
.option(
|
|
51
|
-
.option(
|
|
52
|
-
.option(
|
|
53
|
-
.option(
|
|
54
|
-
.option(
|
|
50
|
+
const cmd = new Command("ci")
|
|
51
|
+
.description("Run drift detection for CI environments")
|
|
52
|
+
.option("--fail-on <severity>", "Exit 1 if drift at this severity or higher: critical, warning, info, none", "critical")
|
|
53
|
+
.option("--format <format>", "Output format: json, summary", "json")
|
|
54
|
+
.option("--quiet", "Suppress non-essential output")
|
|
55
|
+
.option("--top <n>", "Number of top issues to include", "10")
|
|
56
|
+
.option("--include-baseline", "Include baselined drifts (by default only new issues shown)")
|
|
57
|
+
.option("--github-token <token>", "GitHub token for PR comments (or use GITHUB_TOKEN env)")
|
|
58
|
+
.option("--github-repo <repo>", "GitHub repo in owner/repo format (or use GITHUB_REPOSITORY env)")
|
|
59
|
+
.option("--github-pr <number>", "PR number to comment on (or use GITHUB_PR_NUMBER env)")
|
|
55
60
|
.action(async (options) => {
|
|
56
61
|
// Set JSON mode to ensure any reporter output goes to stderr
|
|
57
|
-
if (options.format ===
|
|
62
|
+
if (options.format === "json") {
|
|
58
63
|
setJsonMode(true);
|
|
59
64
|
}
|
|
60
65
|
const log = options.quiet ? () => { } : console.error.bind(console);
|
|
@@ -64,7 +69,7 @@ export function createCICommand() {
|
|
|
64
69
|
// Check for config
|
|
65
70
|
if (!getConfigPath()) {
|
|
66
71
|
const output = {
|
|
67
|
-
version:
|
|
72
|
+
version: "0.0.1",
|
|
68
73
|
timestamp: new Date().toISOString(),
|
|
69
74
|
summary: { total: 0, critical: 0, warning: 0, info: 0 },
|
|
70
75
|
topIssues: [],
|
|
@@ -73,61 +78,16 @@ export function createCICommand() {
|
|
|
73
78
|
console.log(JSON.stringify(output, null, 2));
|
|
74
79
|
return;
|
|
75
80
|
}
|
|
76
|
-
log(
|
|
81
|
+
log("Loading configuration...");
|
|
77
82
|
const { config } = await loadConfig();
|
|
78
|
-
log(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
// Scan components
|
|
85
|
-
const components = [];
|
|
86
|
-
// Determine which sources to scan from config
|
|
87
|
-
const sourcesToScan = [];
|
|
88
|
-
if (config.sources.react?.enabled)
|
|
89
|
-
sourcesToScan.push('react');
|
|
90
|
-
if (config.sources.vue?.enabled)
|
|
91
|
-
sourcesToScan.push('vue');
|
|
92
|
-
if (config.sources.svelte?.enabled)
|
|
93
|
-
sourcesToScan.push('svelte');
|
|
94
|
-
if (config.sources.angular?.enabled)
|
|
95
|
-
sourcesToScan.push('angular');
|
|
96
|
-
// Scan each source
|
|
97
|
-
for (const source of sourcesToScan) {
|
|
98
|
-
const plugin = registry.getByDetection(source);
|
|
99
|
-
if (plugin && plugin.scan) {
|
|
100
|
-
// Use plugin
|
|
101
|
-
const sourceConfig = config.sources[source];
|
|
102
|
-
const result = await plugin.scan({
|
|
103
|
-
projectRoot: process.cwd(),
|
|
104
|
-
config: sourceConfig || {},
|
|
105
|
-
include: sourceConfig?.include,
|
|
106
|
-
exclude: sourceConfig?.exclude,
|
|
107
|
-
});
|
|
108
|
-
components.push(...result.components);
|
|
109
|
-
if (result.errors && result.errors.length > 0) {
|
|
110
|
-
for (const err of result.errors) {
|
|
111
|
-
log(`[${source}] ${err.file || ''}: ${err.message}`);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
// Fall back to bundled scanner
|
|
117
|
-
if (source === 'react' && config.sources.react) {
|
|
118
|
-
const scanner = new ReactComponentScanner({
|
|
119
|
-
projectRoot: process.cwd(),
|
|
120
|
-
include: config.sources.react.include,
|
|
121
|
-
exclude: config.sources.react.exclude,
|
|
122
|
-
designSystemPackage: config.sources.react.designSystemPackage,
|
|
123
|
-
});
|
|
124
|
-
const result = await scanner.scan();
|
|
125
|
-
components.push(...result.items);
|
|
126
|
-
}
|
|
127
|
-
// Add other framework fallbacks as needed
|
|
128
|
-
}
|
|
129
|
-
}
|
|
83
|
+
log("Scanning for drift...");
|
|
84
|
+
// Scan components using orchestrator
|
|
85
|
+
const orchestrator = new ScanOrchestrator(config);
|
|
86
|
+
const { components } = await orchestrator.scanComponents({
|
|
87
|
+
onProgress: (msg) => log(msg),
|
|
88
|
+
});
|
|
130
89
|
// Run semantic diff
|
|
90
|
+
const { SemanticDiffEngine } = await import("@buoy-design/core/analysis");
|
|
131
91
|
const engine = new SemanticDiffEngine();
|
|
132
92
|
const diffResult = engine.analyzeComponents(components, {
|
|
133
93
|
checkDeprecated: true,
|
|
@@ -137,63 +97,76 @@ export function createCICommand() {
|
|
|
137
97
|
let drifts = diffResult.drifts;
|
|
138
98
|
// Apply ignore rules
|
|
139
99
|
for (const ignoreRule of config.drift.ignore) {
|
|
140
|
-
drifts = drifts.filter(d => {
|
|
100
|
+
drifts = drifts.filter((d) => {
|
|
141
101
|
if (d.type !== ignoreRule.type)
|
|
142
102
|
return true;
|
|
143
103
|
if (!ignoreRule.pattern)
|
|
144
104
|
return false;
|
|
145
|
-
|
|
146
|
-
|
|
105
|
+
try {
|
|
106
|
+
const regex = new RegExp(ignoreRule.pattern);
|
|
107
|
+
return !regex.test(d.source.entityName);
|
|
108
|
+
}
|
|
109
|
+
catch {
|
|
110
|
+
log(`Warning: Invalid regex pattern "${ignoreRule.pattern}" in ignore rule, skipping`);
|
|
111
|
+
return true; // Don't filter out drift if regex is invalid
|
|
112
|
+
}
|
|
147
113
|
});
|
|
148
114
|
}
|
|
115
|
+
// Apply baseline filtering unless --include-baseline is set
|
|
116
|
+
let baselinedCount = 0;
|
|
117
|
+
if (!options.includeBaseline) {
|
|
118
|
+
const { loadBaseline, filterBaseline } = await import("./baseline.js");
|
|
119
|
+
const baseline = await loadBaseline();
|
|
120
|
+
const filtered = filterBaseline(drifts, baseline);
|
|
121
|
+
drifts = filtered.newDrifts;
|
|
122
|
+
baselinedCount = filtered.baselinedCount;
|
|
123
|
+
if (baselinedCount > 0) {
|
|
124
|
+
log(`Filtered out ${baselinedCount} baselined drift signals.`);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
149
127
|
// Build output
|
|
150
128
|
const output = buildCIOutput(drifts, options);
|
|
151
129
|
// Post to GitHub if configured (using pre-validated values)
|
|
152
130
|
if (github.token && github.repo && github.pr) {
|
|
153
131
|
try {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
log('Posted PR comment');
|
|
186
|
-
}
|
|
187
|
-
else {
|
|
188
|
-
log('GitHub plugin not installed, skipping PR comment');
|
|
189
|
-
}
|
|
132
|
+
log("Posting to GitHub PR...");
|
|
133
|
+
const { owner, repo: repoName } = parseRepoString(github.repo);
|
|
134
|
+
const client = new GitHubClient({
|
|
135
|
+
token: github.token,
|
|
136
|
+
owner,
|
|
137
|
+
repo: repoName,
|
|
138
|
+
prNumber: github.pr,
|
|
139
|
+
});
|
|
140
|
+
const driftResult = {
|
|
141
|
+
signals: drifts.map((d) => ({
|
|
142
|
+
type: d.type,
|
|
143
|
+
severity: d.severity,
|
|
144
|
+
message: d.message,
|
|
145
|
+
component: d.source.entityName,
|
|
146
|
+
file: d.source.location?.split(":")[0],
|
|
147
|
+
line: d.source.location?.includes(":")
|
|
148
|
+
? parseInt(d.source.location.split(":")[1] || "0", 10)
|
|
149
|
+
: undefined,
|
|
150
|
+
suggestion: d.details.suggestions?.[0],
|
|
151
|
+
})),
|
|
152
|
+
summary: {
|
|
153
|
+
total: drifts.length,
|
|
154
|
+
critical: drifts.filter((d) => d.severity === "critical")
|
|
155
|
+
.length,
|
|
156
|
+
warning: drifts.filter((d) => d.severity === "warning").length,
|
|
157
|
+
info: drifts.filter((d) => d.severity === "info").length,
|
|
158
|
+
},
|
|
159
|
+
};
|
|
160
|
+
const comment = formatPRComment(driftResult);
|
|
161
|
+
await client.createOrUpdateComment(comment);
|
|
162
|
+
log("Posted PR comment");
|
|
190
163
|
}
|
|
191
164
|
catch (err) {
|
|
192
165
|
const msg = err instanceof Error ? err.message : String(err);
|
|
193
166
|
log(`Failed to post GitHub comment: ${msg}`);
|
|
194
167
|
}
|
|
195
168
|
}
|
|
196
|
-
if (options.format ===
|
|
169
|
+
if (options.format === "json") {
|
|
197
170
|
console.log(JSON.stringify(output, null, 2));
|
|
198
171
|
}
|
|
199
172
|
else {
|
|
@@ -212,15 +185,15 @@ export function createCICommand() {
|
|
|
212
185
|
function buildCIOutput(drifts, options) {
|
|
213
186
|
const summary = {
|
|
214
187
|
total: drifts.length,
|
|
215
|
-
critical: drifts.filter(d => d.severity ===
|
|
216
|
-
warning: drifts.filter(d => d.severity ===
|
|
217
|
-
info: drifts.filter(d => d.severity ===
|
|
188
|
+
critical: drifts.filter((d) => d.severity === "critical").length,
|
|
189
|
+
warning: drifts.filter((d) => d.severity === "warning").length,
|
|
190
|
+
info: drifts.filter((d) => d.severity === "info").length,
|
|
218
191
|
};
|
|
219
192
|
// Sort by severity (critical first)
|
|
220
193
|
const sorted = [...drifts].sort((a, b) => SEVERITY_ORDER[b.severity] - SEVERITY_ORDER[a.severity]);
|
|
221
194
|
const topN = parseInt(options.top, 10) || 10;
|
|
222
|
-
const topIssues = sorted.slice(0, topN).map(d => {
|
|
223
|
-
const locationParts = d.source.location?.split(
|
|
195
|
+
const topIssues = sorted.slice(0, topN).map((d) => {
|
|
196
|
+
const locationParts = d.source.location?.split(":");
|
|
224
197
|
return {
|
|
225
198
|
type: d.type,
|
|
226
199
|
severity: d.severity,
|
|
@@ -234,13 +207,13 @@ function buildCIOutput(drifts, options) {
|
|
|
234
207
|
// Determine exit code
|
|
235
208
|
let exitCode = 0;
|
|
236
209
|
const failOn = options.failOn;
|
|
237
|
-
if (failOn !==
|
|
210
|
+
if (failOn !== "none") {
|
|
238
211
|
const threshold = SEVERITY_ORDER[failOn] ?? SEVERITY_ORDER.critical;
|
|
239
|
-
const hasFailure = drifts.some(d => SEVERITY_ORDER[d.severity] >= threshold);
|
|
212
|
+
const hasFailure = drifts.some((d) => SEVERITY_ORDER[d.severity] >= threshold);
|
|
240
213
|
exitCode = hasFailure ? 1 : 0;
|
|
241
214
|
}
|
|
242
215
|
return {
|
|
243
|
-
version:
|
|
216
|
+
version: "0.0.1",
|
|
244
217
|
timestamp: new Date().toISOString(),
|
|
245
218
|
summary,
|
|
246
219
|
topIssues,
|
|
@@ -248,21 +221,26 @@ function buildCIOutput(drifts, options) {
|
|
|
248
221
|
};
|
|
249
222
|
}
|
|
250
223
|
function printSummary(output) {
|
|
251
|
-
const icon = output.exitCode === 0 ?
|
|
252
|
-
const status = output.exitCode === 0 ?
|
|
224
|
+
const icon = output.exitCode === 0 ? "+" : "x";
|
|
225
|
+
const status = output.exitCode === 0 ? "PASS" : "FAIL";
|
|
253
226
|
console.log(`${icon} Buoy Drift Check: ${status}`);
|
|
254
|
-
console.log(
|
|
227
|
+
console.log("");
|
|
255
228
|
console.log(` Total: ${output.summary.total}`);
|
|
256
229
|
console.log(` Critical: ${output.summary.critical}`);
|
|
257
230
|
console.log(` Warning: ${output.summary.warning}`);
|
|
258
231
|
console.log(` Info: ${output.summary.info}`);
|
|
259
232
|
if (output.topIssues.length > 0) {
|
|
260
|
-
console.log(
|
|
261
|
-
console.log(
|
|
233
|
+
console.log("");
|
|
234
|
+
console.log("Top issues:");
|
|
262
235
|
for (const issue of output.topIssues.slice(0, 5)) {
|
|
263
|
-
const sev = issue.severity ===
|
|
264
|
-
|
|
265
|
-
|
|
236
|
+
const sev = issue.severity === "critical"
|
|
237
|
+
? "!"
|
|
238
|
+
: issue.severity === "warning"
|
|
239
|
+
? "~"
|
|
240
|
+
: "i";
|
|
241
|
+
const loc = issue.file
|
|
242
|
+
? ` (${issue.file}${issue.line ? `:${issue.line}` : ""})`
|
|
243
|
+
: "";
|
|
266
244
|
console.log(` [${sev}] ${issue.component}: ${issue.message}${loc}`);
|
|
267
245
|
}
|
|
268
246
|
if (output.topIssues.length > 5) {
|
package/dist/commands/ci.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci.js","sourceRoot":"","sources":["../../src/commands/ci.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAwBrD,MAAM,cAAc,GAA6B;IAC/C,IAAI,EAAE,CAAC;IACP,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,CAAC;CACZ,CAAC;AAQF,SAAS,qBAAqB,CAAC,OAI9B;IACC,MAAM,KAAK,GAAG,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;IAC9D,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;IACjE,MAAM,OAAO,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;IAEjE,gDAAgD;IAChD,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QAC/C,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IAC1E,CAAC;IAED,kEAAkE;IAClE,IAAI,IAAI,KAAK,SAAS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AAC,EAAE,CAAC,CAAC,EAAE,CAAC;YACjD,MAAM,GAAG,GACP,KAAK,CAAC,QAAQ,KAAK,UAAU;gBAC3B,CAAC,CAAC,GAAG;gBACL,CAAC,CAAC,KAAK,CAAC,QAAQ,KAAK,SAAS;oBAC5B,CAAC,CAAC,GAAG;oBACL,CAAC,CAAC,GAAG,CAAC;YACZ,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI;gBACpB,CAAC,CAAC,KAAK,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG;gBACzD,CAAC,CAAC,EAAE,CAAC;YACP,OAAO,CAAC,GAAG,CAAC,MAAM,GAAG,KAAK,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,OAAO,GAAG,GAAG,EAAE,CAAC,CAAC;QACvE,CAAC;QAED,IAAI,MAAM,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAChC,OAAO,CAAC,GAAG,CAAC,aAAa,MAAM,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,OAAO,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/dist/commands/drift.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drift.d.ts","sourceRoot":"","sources":["../../src/commands/drift.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"drift.d.ts","sourceRoot":"","sources":["../../src/commands/drift.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsBpC,wBAAgB,kBAAkB,IAAI,OAAO,CAuK5C"}
|
package/dist/commands/drift.js
CHANGED
|
@@ -1,47 +1,40 @@
|
|
|
1
|
-
import { Command } from
|
|
2
|
-
import { loadConfig } from
|
|
3
|
-
import { spinner, success, error, info, warning, header, keyValue, newline, setJsonMode, } from
|
|
4
|
-
import { formatDriftTable, formatDriftList, formatJson, formatMarkdown, } from
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { loadConfig } from "../config/loader.js";
|
|
3
|
+
import { spinner, success, error, info, warning, header, keyValue, newline, setJsonMode, } from "../output/reporters.js";
|
|
4
|
+
import { formatDriftTable, formatDriftList, formatJson, formatMarkdown, } from "../output/formatters.js";
|
|
5
|
+
import { ScanOrchestrator } from "../scan/orchestrator.js";
|
|
5
6
|
export function createDriftCommand() {
|
|
6
|
-
const cmd = new Command(
|
|
7
|
-
.description('Detect and manage design system drift');
|
|
7
|
+
const cmd = new Command("drift").description("Detect and manage design system drift");
|
|
8
8
|
// drift check
|
|
9
9
|
cmd
|
|
10
|
-
.command(
|
|
11
|
-
.description(
|
|
12
|
-
.option(
|
|
13
|
-
.option(
|
|
14
|
-
.option(
|
|
15
|
-
.option(
|
|
16
|
-
.option(
|
|
17
|
-
.option(
|
|
10
|
+
.command("check")
|
|
11
|
+
.description("Check for drift in the current project")
|
|
12
|
+
.option("-s, --severity <level>", "Filter by minimum severity (info, warning, critical)")
|
|
13
|
+
.option("-t, --type <type>", "Filter by drift type")
|
|
14
|
+
.option("--json", "Output as JSON")
|
|
15
|
+
.option("--markdown", "Output as Markdown")
|
|
16
|
+
.option("--compact", "Compact table output (less detail)")
|
|
17
|
+
.option("-v, --verbose", "Verbose output")
|
|
18
|
+
.option("--include-baseline", "Include baselined drifts (show all)")
|
|
18
19
|
.action(async (options) => {
|
|
19
20
|
// Set JSON mode before creating spinner to redirect spinner to stderr
|
|
20
21
|
if (options.json) {
|
|
21
22
|
setJsonMode(true);
|
|
22
23
|
}
|
|
23
|
-
const spin = spinner(
|
|
24
|
+
const spin = spinner("Loading configuration...");
|
|
24
25
|
try {
|
|
25
26
|
const { config } = await loadConfig();
|
|
26
|
-
spin.text =
|
|
27
|
-
//
|
|
28
|
-
const
|
|
29
|
-
const {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
projectRoot: process.cwd(),
|
|
36
|
-
include: config.sources.react.include,
|
|
37
|
-
exclude: config.sources.react.exclude,
|
|
38
|
-
designSystemPackage: config.sources.react.designSystemPackage,
|
|
39
|
-
});
|
|
40
|
-
const result = await scanner.scan();
|
|
41
|
-
sourceComponents.push(...result.items);
|
|
42
|
-
}
|
|
43
|
-
spin.text = 'Analyzing drift...';
|
|
27
|
+
spin.text = "Scanning for drift...";
|
|
28
|
+
// Scan components using orchestrator
|
|
29
|
+
const orchestrator = new ScanOrchestrator(config);
|
|
30
|
+
const { components: sourceComponents } = await orchestrator.scanComponents({
|
|
31
|
+
onProgress: (msg) => {
|
|
32
|
+
spin.text = msg;
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
spin.text = "Analyzing drift...";
|
|
44
36
|
// Run semantic diff engine
|
|
37
|
+
const { SemanticDiffEngine } = await import("@buoy-design/core/analysis");
|
|
45
38
|
const engine = new SemanticDiffEngine();
|
|
46
39
|
const diffResult = engine.analyzeComponents(sourceComponents, {
|
|
47
40
|
checkDeprecated: true,
|
|
@@ -57,39 +50,61 @@ export function createDriftCommand() {
|
|
|
57
50
|
critical: 2,
|
|
58
51
|
};
|
|
59
52
|
const minSeverity = severityOrder[options.severity] || 0;
|
|
60
|
-
drifts = drifts.filter(d => severityOrder[d.severity] >= minSeverity);
|
|
53
|
+
drifts = drifts.filter((d) => severityOrder[d.severity] >= minSeverity);
|
|
61
54
|
}
|
|
62
55
|
if (options.type) {
|
|
63
|
-
drifts = drifts.filter(d => d.type === options.type);
|
|
56
|
+
drifts = drifts.filter((d) => d.type === options.type);
|
|
64
57
|
}
|
|
65
58
|
// Apply ignore rules from config
|
|
66
59
|
for (const ignoreRule of config.drift.ignore) {
|
|
67
|
-
drifts = drifts.filter(d => {
|
|
60
|
+
drifts = drifts.filter((d) => {
|
|
68
61
|
if (d.type !== ignoreRule.type)
|
|
69
62
|
return true;
|
|
70
63
|
if (!ignoreRule.pattern)
|
|
71
64
|
return false;
|
|
72
|
-
|
|
73
|
-
|
|
65
|
+
try {
|
|
66
|
+
const regex = new RegExp(ignoreRule.pattern);
|
|
67
|
+
return !regex.test(d.source.entityName);
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
warning(`Invalid regex pattern "${ignoreRule.pattern}" in ignore rule, skipping`);
|
|
71
|
+
return true; // Don't filter out drift if regex is invalid
|
|
72
|
+
}
|
|
74
73
|
});
|
|
75
74
|
}
|
|
75
|
+
// Apply baseline filtering unless --include-baseline is set
|
|
76
|
+
let baselinedCount = 0;
|
|
77
|
+
if (!options.includeBaseline) {
|
|
78
|
+
const { loadBaseline, filterBaseline } = await import("./baseline.js");
|
|
79
|
+
const baseline = await loadBaseline();
|
|
80
|
+
const filtered = filterBaseline(drifts, baseline);
|
|
81
|
+
drifts = filtered.newDrifts;
|
|
82
|
+
baselinedCount = filtered.baselinedCount;
|
|
83
|
+
}
|
|
76
84
|
spin.stop();
|
|
77
85
|
// Output results
|
|
78
86
|
if (options.json) {
|
|
79
|
-
console.log(formatJson({
|
|
87
|
+
console.log(formatJson({
|
|
88
|
+
drifts,
|
|
89
|
+
summary: getSummary(drifts),
|
|
90
|
+
baselinedCount,
|
|
91
|
+
}));
|
|
80
92
|
return;
|
|
81
93
|
}
|
|
82
94
|
if (options.markdown) {
|
|
83
95
|
console.log(formatMarkdown(drifts));
|
|
84
96
|
return;
|
|
85
97
|
}
|
|
86
|
-
header(
|
|
98
|
+
header("Drift Analysis");
|
|
87
99
|
newline();
|
|
88
100
|
const summary = getSummary(drifts);
|
|
89
|
-
keyValue(
|
|
90
|
-
keyValue(
|
|
91
|
-
keyValue(
|
|
92
|
-
keyValue(
|
|
101
|
+
keyValue("Components scanned", String(sourceComponents.length));
|
|
102
|
+
keyValue("Critical", String(summary.critical));
|
|
103
|
+
keyValue("Warning", String(summary.warning));
|
|
104
|
+
keyValue("Info", String(summary.info));
|
|
105
|
+
if (baselinedCount > 0) {
|
|
106
|
+
keyValue("Baselined (hidden)", String(baselinedCount));
|
|
107
|
+
}
|
|
93
108
|
newline();
|
|
94
109
|
// Use compact table or detailed list
|
|
95
110
|
if (options.compact) {
|
|
@@ -103,7 +118,7 @@ export function createDriftCommand() {
|
|
|
103
118
|
warning(`${summary.critical} critical issues require attention.`);
|
|
104
119
|
}
|
|
105
120
|
else if (drifts.length === 0) {
|
|
106
|
-
success(
|
|
121
|
+
success("No drift detected. Your design system is aligned!");
|
|
107
122
|
}
|
|
108
123
|
else {
|
|
109
124
|
info(`Found ${drifts.length} drift signals. Run with --compact for summary view.`);
|
|
@@ -119,60 +134,18 @@ export function createDriftCommand() {
|
|
|
119
134
|
process.exit(1);
|
|
120
135
|
}
|
|
121
136
|
});
|
|
122
|
-
// drift explain
|
|
123
|
-
//
|
|
124
|
-
//
|
|
125
|
-
//
|
|
126
|
-
//
|
|
127
|
-
// 2. Fetch git context for the affected file/line:
|
|
128
|
-
// - git blame -L <line>,<line> <file> → who changed it, when, commit hash
|
|
129
|
-
// - git log -1 --format="%s%n%n%b" <hash> → commit message
|
|
130
|
-
// - git show <hash>^:<file> → previous version of the code
|
|
131
|
-
// - git log -p -L <line>,<line>:<file> → full history of this line
|
|
132
|
-
// 3. Try to find associated PR (GitHub API or parse commit message for #123)
|
|
133
|
-
// 4. Build context object matching GitContext schema in @buoy-design/core
|
|
134
|
-
// 5. Send to Claude API with structured prompt:
|
|
135
|
-
// - Drift type and severity
|
|
136
|
-
// - Current vs expected code
|
|
137
|
-
// - Git blame info (who, when, why)
|
|
138
|
-
// - Previous code before drift
|
|
139
|
-
// - Ask for: root cause, impact, fix, prevention
|
|
140
|
-
// 6. Display formatted explanation with actionable next steps
|
|
141
|
-
//
|
|
142
|
-
// See: packages/core/src/models/drift.ts → GitContextSchema
|
|
143
|
-
cmd
|
|
144
|
-
.command('explain <driftId>')
|
|
145
|
-
.description('Get detailed explanation for a drift signal (uses AI + git history)')
|
|
146
|
-
.action(async (driftId) => {
|
|
147
|
-
info('Claude integration not yet implemented.');
|
|
148
|
-
info(`To explain drift: ${driftId}`);
|
|
149
|
-
info('Enable Claude in buoy.config.ts and ensure ANTHROPIC_API_KEY is set.');
|
|
150
|
-
info('');
|
|
151
|
-
info('When implemented, this will:');
|
|
152
|
-
info(' • Analyze git blame to find who introduced the drift');
|
|
153
|
-
info(' • Check commit history for context on why');
|
|
154
|
-
info(' • Use Claude to explain impact and suggest fixes');
|
|
155
|
-
});
|
|
156
|
-
// drift resolve
|
|
157
|
-
cmd
|
|
158
|
-
.command('resolve <driftId>')
|
|
159
|
-
.description('Mark a drift signal as resolved')
|
|
160
|
-
.option('-r, --resolution <type>', 'Resolution type (ignored, fixed, documented)', 'fixed')
|
|
161
|
-
.option('-m, --message <message>', 'Resolution message')
|
|
162
|
-
.action(async (driftId, options) => {
|
|
163
|
-
info(`Marking drift ${driftId} as ${options.resolution}`);
|
|
164
|
-
if (options.message) {
|
|
165
|
-
info(`Reason: ${options.message}`);
|
|
166
|
-
}
|
|
167
|
-
success('Drift resolved (note: persistence not yet implemented)');
|
|
168
|
-
});
|
|
137
|
+
// NOTE: `drift explain` and `drift resolve` commands are planned but not yet implemented.
|
|
138
|
+
// They will be added once the following are complete:
|
|
139
|
+
// - drift explain: Requires Claude API integration and git forensics
|
|
140
|
+
// - drift resolve: Requires persistence layer for tracking resolutions
|
|
141
|
+
// See: docs/ROADMAP.md for implementation timeline
|
|
169
142
|
return cmd;
|
|
170
143
|
}
|
|
171
144
|
function getSummary(drifts) {
|
|
172
145
|
return {
|
|
173
|
-
critical: drifts.filter(d => d.severity ===
|
|
174
|
-
warning: drifts.filter(d => d.severity ===
|
|
175
|
-
info: drifts.filter(d => d.severity ===
|
|
146
|
+
critical: drifts.filter((d) => d.severity === "critical").length,
|
|
147
|
+
warning: drifts.filter((d) => d.severity === "warning").length,
|
|
148
|
+
info: drifts.filter((d) => d.severity === "info").length,
|
|
176
149
|
};
|
|
177
150
|
}
|
|
178
151
|
//# sourceMappingURL=drift.js.map
|