dev-cockpit 0.6.1 → 0.6.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composer-drift.d.ts","sourceRoot":"","sources":["../../../src/health/predicates/composer-drift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,WAAW,yBAAyB;IACxC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;
|
|
1
|
+
{"version":3,"file":"composer-drift.d.ts","sourceRoot":"","sources":["../../../src/health/predicates/composer-drift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,WAAW,yBAAyB;IACxC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAyBD,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,aAAa,EAClB,IAAI,GAAE,yBAA8B,GACnC,OAAO,CAAC,YAAY,CAAC,CA0CvB;AAeD,MAAM,WAAW,+BAAgC,SAAQ,yBAAyB;IAChF,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IACnC,QAAQ,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IACnC,WAAW,CAAC,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC;CAC1C;AAED,wBAAgB,wBAAwB,CACtC,IAAI,GAAE,+BAAoC,GACzC,WAAW,CA4Bb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remediations.d.ts","sourceRoot":"","sources":["../../src/health/remediations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"remediations.d.ts","sourceRoot":"","sources":["../../src/health/remediations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EAEb,WAAW,EACZ,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;AAEpC;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,WAAW,EAAE,EACrB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GACrC,WAAW,EAAE,CASf;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE,CAevE;AAED,wBAAsB,cAAc,CAClC,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,WAAW,EAAE,EACrB,GAAG,EAAE,aAAa,EAClB,aAAa,EAAE,MAAM,EACrB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GACrC,OAAO,CAAC,IAAI,CAAC,CAQf;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,WAAW,EAAE,GACpB,WAAW,GAAG,SAAS,CAEzB;AAED,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,WAAW,EACxB,GAAG,EAAE,aAAa,EAClB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAef;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,aAAa,EAClB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,CAAC,CAmBjB"}
|
package/dist/index.js
CHANGED
|
@@ -88260,22 +88260,21 @@ async function dispatchRemediation(remediation, ctx, workspaceRoot, sourceId) {
|
|
|
88260
88260
|
await streamCommand(ctx, sourceId, program2, args, cwd);
|
|
88261
88261
|
}
|
|
88262
88262
|
async function streamCommand(ctx, sourceId, program2, args, cwd) {
|
|
88263
|
+
const emit = (severity, text) => ctx.appendOutput?.({ ts: Date.now(), source: `health:${sourceId}`, severity, text });
|
|
88263
88264
|
const handle = spawnStream(program2, args, {
|
|
88264
88265
|
cwd,
|
|
88265
|
-
|
|
88266
|
-
|
|
88267
|
-
|
|
88268
|
-
|
|
88269
|
-
|
|
88270
|
-
|
|
88271
|
-
onStderr: (line2) => ctx.appendOutput?.({
|
|
88272
|
-
ts: Date.now(),
|
|
88273
|
-
source: `health:${sourceId}`,
|
|
88274
|
-
severity: "warn",
|
|
88275
|
-
text: line2
|
|
88276
|
-
})
|
|
88266
|
+
// Stream both channels as info. Many CLIs (composer, git, npm) write all of
|
|
88267
|
+
// their normal progress to stderr, so the channel says nothing about
|
|
88268
|
+
// severity — treating stderr as a warning renders ordinary success output
|
|
88269
|
+
// as a wall of ⚠. Success vs failure is decided by the exit code below.
|
|
88270
|
+
onStdout: (line2) => emit("info", line2),
|
|
88271
|
+
onStderr: (line2) => emit("info", line2)
|
|
88277
88272
|
});
|
|
88278
|
-
|
|
88273
|
+
const code = await handle.exitCode;
|
|
88274
|
+
const label = [program2, ...args].join(" ");
|
|
88275
|
+
if (code === 0) emit("info", `\u2713 ${label}`);
|
|
88276
|
+
else emit("error", `\u2717 ${label} failed (exit ${code})`);
|
|
88277
|
+
return code;
|
|
88279
88278
|
}
|
|
88280
88279
|
|
|
88281
88280
|
// src/health/notify-resolver.ts
|
|
@@ -91137,7 +91136,12 @@ function resolveScopes(workspaceRoot, dirs) {
|
|
|
91137
91136
|
const base = rel ? path15.join(workspaceRoot, rel) : workspaceRoot;
|
|
91138
91137
|
return {
|
|
91139
91138
|
lock: path15.join(base, "composer.lock"),
|
|
91140
|
-
|
|
91139
|
+
// Compare against the autoload dump, which `composer install` regenerates
|
|
91140
|
+
// on EVERY run — even a no-op "Nothing to install". The `vendor/`
|
|
91141
|
+
// directory mtime only moves when entries are added/removed directly in
|
|
91142
|
+
// it, so a clean reinstall would never bump it and a drift flagged
|
|
91143
|
+
// against the dir could never clear.
|
|
91144
|
+
installed: path15.join(base, "vendor", "autoload.php"),
|
|
91141
91145
|
label: rel || "root"
|
|
91142
91146
|
};
|
|
91143
91147
|
});
|
|
@@ -91155,18 +91159,18 @@ async function checkComposerDrift(ctx, opts = {}) {
|
|
|
91155
91159
|
} catch {
|
|
91156
91160
|
continue;
|
|
91157
91161
|
}
|
|
91158
|
-
if (!fs19.existsSync(scope.
|
|
91162
|
+
if (!fs19.existsSync(scope.installed)) {
|
|
91159
91163
|
missing.push(scope.label);
|
|
91160
91164
|
continue;
|
|
91161
91165
|
}
|
|
91162
|
-
let
|
|
91166
|
+
let installedMtime;
|
|
91163
91167
|
try {
|
|
91164
|
-
|
|
91168
|
+
installedMtime = fs19.statSync(scope.installed).mtimeMs;
|
|
91165
91169
|
} catch {
|
|
91166
|
-
stale.push(`${scope.label} (
|
|
91170
|
+
stale.push(`${scope.label} (autoload unreadable)`);
|
|
91167
91171
|
continue;
|
|
91168
91172
|
}
|
|
91169
|
-
if (lockMtime >
|
|
91173
|
+
if (lockMtime > installedMtime) {
|
|
91170
91174
|
stale.push(scope.label);
|
|
91171
91175
|
}
|
|
91172
91176
|
}
|
|
@@ -91174,7 +91178,7 @@ async function checkComposerDrift(ctx, opts = {}) {
|
|
|
91174
91178
|
return status3("ok", "composer.lock and vendor/ are in sync");
|
|
91175
91179
|
}
|
|
91176
91180
|
const parts = [];
|
|
91177
|
-
if (missing.length > 0) parts.push(`
|
|
91181
|
+
if (missing.length > 0) parts.push(`dependencies not installed in: ${missing.join(", ")}`);
|
|
91178
91182
|
if (stale.length > 0) parts.push(`composer.lock newer than vendor/ in: ${stale.join(", ")}`);
|
|
91179
91183
|
return status3("error", `${parts.join("; ")} \u2014 run composer install`);
|
|
91180
91184
|
}
|