@inlang/core
Advanced tools
Comparing version 0.7.3 to 0.7.4
var _ValidateConfigException_id; | ||
import { Resource } from "../ast/zod.js"; | ||
import { dedent } from "ts-dedent"; | ||
export class ValidateConfigException extends Error { | ||
@@ -82,6 +83,14 @@ constructor() { | ||
if (JSON.stringify(message) !== JSON.stringify(matchingReadResource.body[messageIndex])) | ||
throw new ValidateConfigException(commonErrorMessage + | ||
`The message with id "${message.id.name}" does not match for the resource with languageTag.name "${resource.languageTag.name}".`); | ||
throw new ValidateConfigException(dedent(` | ||
${commonErrorMessage} | ||
The message with id "${message.id.name}" does not match for the resource with languageTag.name "${resource.languageTag.name}". | ||
Received: | ||
${(JSON.stringify(message), undefined, 2)} | ||
Expected: | ||
${(JSON.stringify(matchingReadResource.body[messageIndex]), undefined, 2)} | ||
`)); | ||
} | ||
} | ||
} |
{ | ||
"name": "@inlang/core", | ||
"type": "module", | ||
"version": "0.7.3", | ||
"version": "0.7.4", | ||
"publishConfig": { | ||
@@ -6,0 +6,0 @@ "access": "public" |
@@ -5,2 +5,3 @@ import type { InlangConfig } from "../config/schema.js" | ||
import type { Result } from "../utilities/result.js" | ||
import { dedent } from "ts-dedent" | ||
@@ -98,4 +99,14 @@ export class ValidateConfigException extends Error { | ||
throw new ValidateConfigException( | ||
commonErrorMessage + | ||
`The message with id "${message.id.name}" does not match for the resource with languageTag.name "${resource.languageTag.name}".`, | ||
dedent(` | ||
${commonErrorMessage} | ||
The message with id "${message.id.name}" does not match for the resource with languageTag.name "${ | ||
resource.languageTag.name | ||
}". | ||
Received: | ||
${(JSON.stringify(message), undefined, 2)} | ||
Expected: | ||
${(JSON.stringify(matchingReadResource.body[messageIndex]), undefined, 2)} | ||
`), | ||
) | ||
@@ -102,0 +113,0 @@ } |
Sorry, the diff of this file is not supported yet
454652
5352