forgehive 1.0.8 → 1.0.9
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/dist/cli.js +23 -18
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -9738,6 +9738,16 @@ var CAP_CATEGORIES = [
|
|
|
9738
9738
|
["Messaging", ["rabbitmq", "kafka", "nats", "masstransit", "oban", "broadway", "sidekiq", "celery", "hangfire", "task-queue", "messaging"]],
|
|
9739
9739
|
["Observ.", ["opentelemetry", "prometheus", "sentry", "datadog", "logging", "serilog", "nlog", "logrus", "zap", "pino", "winston", "loguru"]]
|
|
9740
9740
|
];
|
|
9741
|
+
var brand = `${ANSI.orange}${ANSI.bold}Forge${ANSI.reset}${ANSI.bold}Hive${ANSI.reset}${ANSI.orange}\u1D2C\u1D35${ANSI.reset}`;
|
|
9742
|
+
function printScanHeader(projectName, signals, caps) {
|
|
9743
|
+
const cols = process.stdout.columns ?? 60;
|
|
9744
|
+
const sep = ANSI.dim + "\u2500".repeat(cols) + ANSI.reset;
|
|
9745
|
+
console.log(`
|
|
9746
|
+
\u{1F50D} ${brand} ${ANSI.dim}\xB7${ANSI.reset} Stack Intelligence`);
|
|
9747
|
+
console.log(` ${ANSI.green}${projectName} \xB7 ${signals} Signale \xB7 ${caps} Capabilities${ANSI.reset}`);
|
|
9748
|
+
console.log(sep);
|
|
9749
|
+
console.log();
|
|
9750
|
+
}
|
|
9741
9751
|
function buildCapabilitySummary(ids) {
|
|
9742
9752
|
if (ids.length === 0) return " (keine Capabilities erkannt)";
|
|
9743
9753
|
const set2 = new Set(ids);
|
|
@@ -9782,14 +9792,7 @@ if (command === "init") {
|
|
|
9782
9792
|
const capMap = mapSignalsToCapabilities(scanResult);
|
|
9783
9793
|
const totalSignals = scanResult.signals.length;
|
|
9784
9794
|
const totalCaps = capMap.confirmed.length;
|
|
9785
|
-
|
|
9786
|
-
const sep51 = ANSI.dim + "\u2500".repeat(51) + ANSI.reset;
|
|
9787
|
-
const brand = `${ANSI.orange}${ANSI.bold}Forge${ANSI.reset}${ANSI.bold}Hive${ANSI.reset}${ANSI.orange}\u1D2C\u1D35${ANSI.reset}`;
|
|
9788
|
-
console.log(`
|
|
9789
|
-
\u{1F50D} ${brand} ${ANSI.dim}\xB7${ANSI.reset} Stack Intelligence`);
|
|
9790
|
-
console.log(` ${ANSI.green}${projectName} \xB7 ${totalSignals} Signale \xB7 ${totalCaps} Capabilities${ANSI.reset}`);
|
|
9791
|
-
console.log(sep51);
|
|
9792
|
-
console.log();
|
|
9795
|
+
printScanHeader(path40.basename(projectRoot), totalSignals, totalCaps);
|
|
9793
9796
|
const block = loadClaudeMdBlock();
|
|
9794
9797
|
writeForgehiveDir(projectRoot, scanResult, capMap, block);
|
|
9795
9798
|
const hash = computeHash(projectRoot);
|
|
@@ -9826,8 +9829,9 @@ ${ANSI.green}\u2713${ANSI.reset} ${brand} bereit \u2014 \xF6ffne Claude Code in
|
|
|
9826
9829
|
} else if (command === "confirm") {
|
|
9827
9830
|
try {
|
|
9828
9831
|
confirm(projectRoot);
|
|
9829
|
-
console.log(
|
|
9830
|
-
|
|
9832
|
+
console.log(`
|
|
9833
|
+
${ANSI.green}\u2713${ANSI.reset} ${brand} bereit \u2014 \xF6ffne Claude Code in diesem Projekt.
|
|
9834
|
+
`);
|
|
9831
9835
|
} catch (err) {
|
|
9832
9836
|
console.error(`Fehler: ${err.message}`);
|
|
9833
9837
|
process.exit(1);
|
|
@@ -9948,7 +9952,6 @@ Ausf\xFChren mit --remove um zu l\xF6schen: fh memory prune ${days} --remove`);
|
|
|
9948
9952
|
console.log("\u2713 Keine \xC4nderungen erkannt \u2014 capabilities.yaml ist aktuell");
|
|
9949
9953
|
process.exit(0);
|
|
9950
9954
|
}
|
|
9951
|
-
console.log("\u{1F50D} \xC4nderungen erkannt \u2014 scanne erneut...\n");
|
|
9952
9955
|
const oldDoc = jsYaml.load(
|
|
9953
9956
|
fs39.readFileSync(path40.join(forgehiveDir, "capabilities.yaml"), "utf8")
|
|
9954
9957
|
);
|
|
@@ -9956,23 +9959,25 @@ Ausf\xFChren mit --remove um zu l\xF6schen: fh memory prune ${days} --remove`);
|
|
|
9956
9959
|
const scanResult = scan(projectRoot);
|
|
9957
9960
|
const newMap = mapSignalsToCapabilities(scanResult);
|
|
9958
9961
|
const diff = scanDiff(oldMap, newMap);
|
|
9962
|
+
printScanHeader(path40.basename(projectRoot), scanResult.signals.length, newMap.confirmed.length);
|
|
9963
|
+
console.log(buildCapabilitySummary(newMap.confirmed.map((c) => c.id)));
|
|
9964
|
+
console.log();
|
|
9959
9965
|
if (diff.added.length === 0 && diff.removed.length === 0) {
|
|
9960
|
-
console.log(
|
|
9966
|
+
console.log(`${ANSI.green}\u2713${ANSI.reset} ${brand} \u2014 keine \xC4nderungen
|
|
9967
|
+
`);
|
|
9961
9968
|
} else {
|
|
9962
9969
|
if (diff.added.length > 0) {
|
|
9963
|
-
console.log(
|
|
9964
|
-
for (const c of diff.added) console.log(` + ${c.id} (aus ${c.source})`);
|
|
9970
|
+
for (const c of diff.added) console.log(` ${ANSI.green}+${ANSI.reset} ${CAP_DISPLAY[c.id] ?? c.id}`);
|
|
9965
9971
|
}
|
|
9966
9972
|
if (diff.removed.length > 0) {
|
|
9967
|
-
console.log(
|
|
9968
|
-
for (const c of diff.removed) console.log(` - ${c.id}`);
|
|
9973
|
+
for (const c of diff.removed) console.log(` ${ANSI.dim}- ${CAP_DISPLAY[c.id] ?? c.id}${ANSI.reset}`);
|
|
9969
9974
|
}
|
|
9970
9975
|
console.log();
|
|
9971
9976
|
const block = loadClaudeMdBlock();
|
|
9972
9977
|
writeForgehiveDir(projectRoot, scanResult, newMap, block);
|
|
9973
9978
|
fs39.writeFileSync(path40.join(forgehiveDir, ".scan-hash"), currentHash, "utf8");
|
|
9974
|
-
console.log(
|
|
9975
|
-
|
|
9979
|
+
console.log(`${ANSI.green}\u2713${ANSI.reset} ${brand} \u2014 capabilities.yaml aktualisiert ${ANSI.dim}\xB7${ANSI.reset} ${ANSI.bold}fh confirm${ANSI.reset} zum Best\xE4tigen
|
|
9980
|
+
`);
|
|
9976
9981
|
}
|
|
9977
9982
|
} else if (command === "scan" && subcommand === "--check") {
|
|
9978
9983
|
if (!fs39.existsSync(path40.join(forgehiveDir, ".scan-hash"))) {
|