@aipanel/core 1.3.7 → 1.3.8
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/es/node/diagnostics.mjs
CHANGED
|
@@ -760,8 +760,11 @@ async function runCommandCheck(check, target, phase, severity, optional = false)
|
|
|
760
760
|
if (failure) return { text: failure, diagnostics: [] };
|
|
761
761
|
const raw = rawCommandOutput(outcome);
|
|
762
762
|
try {
|
|
763
|
-
|
|
764
|
-
|
|
763
|
+
const produced2 = check.adapter ? await runAdapterModule(check, outcome, cwd, fileSet) : adaptBuiltinFormat(check.format ?? "text", check, raw, cwd, severity);
|
|
764
|
+
if (phase === "edit" && outcome.exitCode === 0 && produced2.diagnostics.length === 0) {
|
|
765
|
+
return { ...produced2, text: void 0, notes: void 0 };
|
|
766
|
+
}
|
|
767
|
+
return produced2;
|
|
765
768
|
} catch (error) {
|
|
766
769
|
const reason = error instanceof Error ? error.message : String(error);
|
|
767
770
|
const excerpt = raw.replace(/\s+/g, " ").trim().slice(0, 200);
|
package/lib/node/diagnostics.cjs
CHANGED
|
@@ -793,8 +793,11 @@ async function runCommandCheck(check, target, phase, severity, optional = false)
|
|
|
793
793
|
if (failure) return { text: failure, diagnostics: [] };
|
|
794
794
|
const raw = rawCommandOutput(outcome);
|
|
795
795
|
try {
|
|
796
|
-
|
|
797
|
-
|
|
796
|
+
const produced2 = check.adapter ? await runAdapterModule(check, outcome, cwd, fileSet) : adaptBuiltinFormat(check.format ?? "text", check, raw, cwd, severity);
|
|
797
|
+
if (phase === "edit" && outcome.exitCode === 0 && produced2.diagnostics.length === 0) {
|
|
798
|
+
return { ...produced2, text: void 0, notes: void 0 };
|
|
799
|
+
}
|
|
800
|
+
return produced2;
|
|
798
801
|
} catch (error) {
|
|
799
802
|
const reason = error instanceof Error ? error.message : String(error);
|
|
800
803
|
const excerpt = raw.replace(/\s+/g, " ").trim().slice(0, 200);
|