@fenglimg/fabric-cli 2.0.0-rc.1 → 2.0.0-rc.11
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/README.md +6 -6
- package/dist/{chunk-UHNP7T7W.js → chunk-5MQ52F42.js} +347 -86
- package/dist/chunk-6ICJICVU.js +10 -0
- package/dist/chunk-AW3G7ZH5.js +576 -0
- package/dist/chunk-HQLEHH4O.js +321 -0
- package/dist/{chunk-5LOYBXWD.js → chunk-OBQU6NHO.js} +2 -52
- package/dist/chunk-WPTA74BY.js +184 -0
- package/dist/chunk-WWNXR34K.js +49 -0
- package/dist/doctor-RILCO5OG.js +282 -0
- package/dist/hooks-NX32PPEN.js +13 -0
- package/dist/index.js +8 -5
- package/dist/{init-DRHUYHYA.js → init-C56PWHID.js} +225 -491
- package/dist/plan-context-hint-QMUPAXIB.js +98 -0
- package/dist/{scan-HU2EGITF.js → scan-66EKMNAY.js} +6 -2
- package/dist/{serve-3LXXSBFR.js → serve-NGLXHDYC.js} +8 -4
- package/dist/uninstall-DBAR2JBS.js +1082 -0
- package/package.json +3 -3
- package/templates/bootstrap/CLAUDE.md +1 -1
- package/templates/bootstrap/codex-AGENTS-header.md +1 -1
- package/templates/bootstrap/cursor-fabric-bootstrap.mdc +1 -1
- package/templates/hooks/configs/README.md +73 -0
- package/templates/hooks/configs/claude-code.json +37 -0
- package/templates/hooks/configs/codex-hooks.json +20 -0
- package/templates/hooks/configs/cursor-hooks.json +20 -0
- package/templates/hooks/fabric-hint.cjs +1337 -0
- package/templates/hooks/knowledge-hint-broad.cjs +612 -0
- package/templates/hooks/knowledge-hint-narrow.cjs +826 -0
- package/templates/hooks/lib/session-digest-writer.cjs +172 -0
- package/templates/skills/fabric-archive/SKILL.md +640 -0
- package/templates/skills/fabric-import/SKILL.md +850 -0
- package/templates/skills/fabric-review/SKILL.md +717 -0
- package/dist/doctor-DUHWLAYD.js +0 -98
package/dist/doctor-DUHWLAYD.js
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
paint,
|
|
4
|
-
resolveDevMode,
|
|
5
|
-
symbol,
|
|
6
|
-
t
|
|
7
|
-
} from "./chunk-5LOYBXWD.js";
|
|
8
|
-
|
|
9
|
-
// src/commands/doctor.ts
|
|
10
|
-
import { defineCommand } from "citty";
|
|
11
|
-
import { checkLockOrThrow, runDoctorFix, runDoctorReport } from "@fenglimg/fabric-server";
|
|
12
|
-
var doctorCommand = defineCommand({
|
|
13
|
-
meta: {
|
|
14
|
-
name: "doctor",
|
|
15
|
-
description: t("cli.doctor.description")
|
|
16
|
-
},
|
|
17
|
-
args: {
|
|
18
|
-
target: {
|
|
19
|
-
type: "string",
|
|
20
|
-
description: t("cli.doctor.args.target.description")
|
|
21
|
-
},
|
|
22
|
-
fix: {
|
|
23
|
-
type: "boolean",
|
|
24
|
-
description: t("cli.doctor.args.fix.description"),
|
|
25
|
-
default: false
|
|
26
|
-
},
|
|
27
|
-
json: {
|
|
28
|
-
type: "boolean",
|
|
29
|
-
description: t("cli.doctor.args.json.description"),
|
|
30
|
-
default: false
|
|
31
|
-
},
|
|
32
|
-
strict: {
|
|
33
|
-
type: "boolean",
|
|
34
|
-
description: t("cli.doctor.args.strict.description"),
|
|
35
|
-
default: false
|
|
36
|
-
},
|
|
37
|
-
force: {
|
|
38
|
-
type: "boolean",
|
|
39
|
-
description: t("cli.doctor.args.force.description"),
|
|
40
|
-
default: false
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
async run({ args }) {
|
|
44
|
-
const workspaceRoot = process.cwd();
|
|
45
|
-
const resolution = resolveDevMode(args.target, workspaceRoot);
|
|
46
|
-
checkLockOrThrow(resolution.target, { force: args.force });
|
|
47
|
-
const fixReport = args.fix === true ? await runDoctorFix(resolution.target) : null;
|
|
48
|
-
const report = fixReport?.report ?? await runDoctorReport(resolution.target);
|
|
49
|
-
if (args.json === true) {
|
|
50
|
-
writeStdout(JSON.stringify(fixReport ?? report, null, 2));
|
|
51
|
-
} else {
|
|
52
|
-
if (fixReport !== null) {
|
|
53
|
-
writeStdout(fixReport.message);
|
|
54
|
-
}
|
|
55
|
-
renderHumanReport(report);
|
|
56
|
-
}
|
|
57
|
-
if (report.status === "error" || args.strict === true && (report.status === "warn" || report.warnings.length > 0)) {
|
|
58
|
-
process.exitCode = 1;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
var doctor_default = doctorCommand;
|
|
63
|
-
function renderHumanReport(report) {
|
|
64
|
-
writeStdout(`${renderStatus(report.status)} ${paint.ai("fabric doctor")} ${paint.human(report.summary.target)}`);
|
|
65
|
-
for (const check of report.checks) {
|
|
66
|
-
writeStdout(`${renderStatus(check.status)} ${check.name}: ${check.message}`);
|
|
67
|
-
}
|
|
68
|
-
writeIssueSection(t("doctor.section.fixable"), report.fixable_errors);
|
|
69
|
-
writeIssueSection(t("doctor.section.manual"), report.manual_errors);
|
|
70
|
-
writeIssueSection(t("doctor.section.warnings"), report.warnings);
|
|
71
|
-
}
|
|
72
|
-
function writeIssueSection(title, issues) {
|
|
73
|
-
if (issues.length === 0) {
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
writeStdout("");
|
|
77
|
-
writeStdout(title);
|
|
78
|
-
for (const issue of issues) {
|
|
79
|
-
writeStdout(`- ${issue.code}: ${issue.message}`);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
function renderStatus(status) {
|
|
83
|
-
if (status === "ok") {
|
|
84
|
-
return symbol.ok;
|
|
85
|
-
}
|
|
86
|
-
if (status === "warn") {
|
|
87
|
-
return symbol.warn;
|
|
88
|
-
}
|
|
89
|
-
return symbol.error;
|
|
90
|
-
}
|
|
91
|
-
function writeStdout(message) {
|
|
92
|
-
process.stdout.write(`${message}
|
|
93
|
-
`);
|
|
94
|
-
}
|
|
95
|
-
export {
|
|
96
|
-
doctor_default as default,
|
|
97
|
-
doctorCommand
|
|
98
|
-
};
|