@fro.bot/systematic 2.17.0 → 2.18.0
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
CHANGED
|
@@ -16125,12 +16125,17 @@ function resolveValueAtPath(root, path4) {
|
|
|
16125
16125
|
}
|
|
16126
16126
|
function throwTopLevelConfigSchemaError(filePath, trust, rawIssues, rawInput) {
|
|
16127
16127
|
const issues = enrichUnrecognizedKeyIssues(rawIssues, rawInput);
|
|
16128
|
-
|
|
16129
|
-
if (!issue2) {
|
|
16128
|
+
if (issues.length === 0) {
|
|
16130
16129
|
throw Object.assign(new Error(`Invalid Systematic config in ${filePath}: schema validation failed`), { _tag: "ConfigSchemaError", filePath, trust, issues });
|
|
16131
16130
|
}
|
|
16132
|
-
const
|
|
16133
|
-
|
|
16131
|
+
const formatIssue = (issue2) => {
|
|
16132
|
+
const fieldPath = issue2.code === "unrecognized_keys" ? null : issue2.path.join(".");
|
|
16133
|
+
return fieldPath ? `${fieldPath} ${issue2.message}` : issue2.message;
|
|
16134
|
+
};
|
|
16135
|
+
const formatted = issues.map(formatIssue);
|
|
16136
|
+
const message = formatted.length === 1 ? `Invalid Systematic config in ${filePath}: ${formatted[0]}` : `Invalid Systematic config in ${filePath}:
|
|
16137
|
+
${formatted.map((entry) => ` - ${entry}`).join(`
|
|
16138
|
+
`)}`;
|
|
16134
16139
|
throw Object.assign(new Error(message), {
|
|
16135
16140
|
_tag: "ConfigSchemaError",
|
|
16136
16141
|
filePath,
|
package/dist/index.js
CHANGED