29 lines
1.2 KiB
JavaScript
29 lines
1.2 KiB
JavaScript
// Nur prüfen: Renovate läuft mit --platform=local direkt auf diesem Verzeichnis.
|
||
// Es werden keine Dateien geändert; das Ergebnis (gefundene Updates) landet im Log
|
||
// und als JSON-Report in .renovate-local/report.json.
|
||
import fs from "node:fs";
|
||
import path from "node:path";
|
||
import { ROOT_DIR, STATE_DIR, RENOVATE_VERSION, log, renovateCli, main } from "./lib.mjs";
|
||
|
||
main(async () => {
|
||
fs.mkdirSync(STATE_DIR, { recursive: true });
|
||
const reportPath = path.join(STATE_DIR, "report.json");
|
||
|
||
log(`Renovate ${RENOVATE_VERSION} – Dry-Run (lookup) auf ${ROOT_DIR}`);
|
||
renovateCli(
|
||
["--platform=local", "--dry-run=lookup", "--report-type=file", `--report-path=${reportPath}`],
|
||
{ LOG_LEVEL: process.env.LOG_LEVEL ?? "info" },
|
||
);
|
||
|
||
log("Gefundene Updates:");
|
||
const report = JSON.parse(fs.readFileSync(reportPath, "utf8"));
|
||
for (const repo of Object.values(report.repositories)) {
|
||
for (const [manager, files] of Object.entries(repo.packageFiles)) {
|
||
for (const f of files)
|
||
for (const d of f.deps)
|
||
for (const u of d.updates ?? [])
|
||
console.log(` [${manager}] ${f.packageFile}: ${d.depName} ${d.currentValue} -> ${u.newValue} (${u.updateType})`);
|
||
}
|
||
}
|
||
});
|