forgehive 1.0.8 → 1.0.10
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 +26 -19
- 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);
|
|
@@ -9810,8 +9813,10 @@ if (command === "init") {
|
|
|
9810
9813
|
const ok = await promptConfirm(` Best\xE4tigen und loslegen? ${ANSI.dim}[Y/n]${ANSI.reset} `);
|
|
9811
9814
|
if (ok) {
|
|
9812
9815
|
confirm(projectRoot);
|
|
9816
|
+
const cols = process.stdout.columns ?? 60;
|
|
9813
9817
|
console.log(`
|
|
9814
|
-
${ANSI.
|
|
9818
|
+
${ANSI.dim}${"\u2500".repeat(cols)}${ANSI.reset}`);
|
|
9819
|
+
console.log(`${ANSI.green}\u2713${ANSI.reset} ${brand} bereit \u2014 \xF6ffne Claude Code in diesem Projekt.
|
|
9815
9820
|
`);
|
|
9816
9821
|
} else {
|
|
9817
9822
|
console.log(`
|
|
@@ -9826,8 +9831,9 @@ ${ANSI.green}\u2713${ANSI.reset} ${brand} bereit \u2014 \xF6ffne Claude Code in
|
|
|
9826
9831
|
} else if (command === "confirm") {
|
|
9827
9832
|
try {
|
|
9828
9833
|
confirm(projectRoot);
|
|
9829
|
-
console.log(
|
|
9830
|
-
|
|
9834
|
+
console.log(`
|
|
9835
|
+
${ANSI.green}\u2713${ANSI.reset} ${brand} bereit \u2014 \xF6ffne Claude Code in diesem Projekt.
|
|
9836
|
+
`);
|
|
9831
9837
|
} catch (err) {
|
|
9832
9838
|
console.error(`Fehler: ${err.message}`);
|
|
9833
9839
|
process.exit(1);
|
|
@@ -9948,7 +9954,6 @@ Ausf\xFChren mit --remove um zu l\xF6schen: fh memory prune ${days} --remove`);
|
|
|
9948
9954
|
console.log("\u2713 Keine \xC4nderungen erkannt \u2014 capabilities.yaml ist aktuell");
|
|
9949
9955
|
process.exit(0);
|
|
9950
9956
|
}
|
|
9951
|
-
console.log("\u{1F50D} \xC4nderungen erkannt \u2014 scanne erneut...\n");
|
|
9952
9957
|
const oldDoc = jsYaml.load(
|
|
9953
9958
|
fs39.readFileSync(path40.join(forgehiveDir, "capabilities.yaml"), "utf8")
|
|
9954
9959
|
);
|
|
@@ -9956,23 +9961,25 @@ Ausf\xFChren mit --remove um zu l\xF6schen: fh memory prune ${days} --remove`);
|
|
|
9956
9961
|
const scanResult = scan(projectRoot);
|
|
9957
9962
|
const newMap = mapSignalsToCapabilities(scanResult);
|
|
9958
9963
|
const diff = scanDiff(oldMap, newMap);
|
|
9964
|
+
printScanHeader(path40.basename(projectRoot), scanResult.signals.length, newMap.confirmed.length);
|
|
9965
|
+
console.log(buildCapabilitySummary(newMap.confirmed.map((c) => c.id)));
|
|
9966
|
+
console.log();
|
|
9959
9967
|
if (diff.added.length === 0 && diff.removed.length === 0) {
|
|
9960
|
-
console.log(
|
|
9968
|
+
console.log(`${ANSI.green}\u2713${ANSI.reset} ${brand} \u2014 keine \xC4nderungen
|
|
9969
|
+
`);
|
|
9961
9970
|
} else {
|
|
9962
9971
|
if (diff.added.length > 0) {
|
|
9963
|
-
console.log(
|
|
9964
|
-
for (const c of diff.added) console.log(` + ${c.id} (aus ${c.source})`);
|
|
9972
|
+
for (const c of diff.added) console.log(` ${ANSI.green}+${ANSI.reset} ${CAP_DISPLAY[c.id] ?? c.id}`);
|
|
9965
9973
|
}
|
|
9966
9974
|
if (diff.removed.length > 0) {
|
|
9967
|
-
console.log(
|
|
9968
|
-
for (const c of diff.removed) console.log(` - ${c.id}`);
|
|
9975
|
+
for (const c of diff.removed) console.log(` ${ANSI.dim}- ${CAP_DISPLAY[c.id] ?? c.id}${ANSI.reset}`);
|
|
9969
9976
|
}
|
|
9970
9977
|
console.log();
|
|
9971
9978
|
const block = loadClaudeMdBlock();
|
|
9972
9979
|
writeForgehiveDir(projectRoot, scanResult, newMap, block);
|
|
9973
9980
|
fs39.writeFileSync(path40.join(forgehiveDir, ".scan-hash"), currentHash, "utf8");
|
|
9974
|
-
console.log(
|
|
9975
|
-
|
|
9981
|
+
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
|
|
9982
|
+
`);
|
|
9976
9983
|
}
|
|
9977
9984
|
} else if (command === "scan" && subcommand === "--check") {
|
|
9978
9985
|
if (!fs39.existsSync(path40.join(forgehiveDir, ".scan-hash"))) {
|