diff --git a/dist/index.js b/dist/index.js index 00d97fe..40a3c84 100644 --- a/dist/index.js +++ b/dist/index.js @@ -34994,7 +34994,8 @@ function processValidationResult(validationResult) { } return { success: true, - resultText: `Validated ${validationResult.url}!`, + resultText: `${validationResult.url} has structured data of these types: +${validationResult.tripleGroups.map((group) => ` - ${group.type}`).join("\n")}`, }; } diff --git a/dist/validate.d.ts.map b/dist/validate.d.ts.map index 7932c97..6983fb6 100644 --- a/dist/validate.d.ts.map +++ b/dist/validate.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"","sourceRoot":"","sources":["file:///home/john/code/github/schemar/src/validate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EACN,KAAK,gBAAgB,EAErB,MAAM,uBAAuB,CAAC;AAG/B,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAsBxE;AAED,wBAAgB,yBAAyB,CACxC,YAAY,EAAE,MAAM,GAClB,gBAAgB,CAsClB;AAED,wBAAgB,uBAAuB,CACtC,gBAAgB,EAAE,gBAAgB,GAChC,yBAAyB,CAsB3B"} \ No newline at end of file +{"version":3,"file":"","sourceRoot":"","sources":["file:///home/john/code/github/schemar/src/validate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EACN,KAAK,gBAAgB,EAErB,MAAM,uBAAuB,CAAC;AAG/B,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAsBxE;AAED,wBAAgB,yBAAyB,CACxC,YAAY,EAAE,MAAM,GAClB,gBAAgB,CAsClB;AAED,wBAAgB,uBAAuB,CACtC,gBAAgB,EAAE,gBAAgB,GAChC,yBAAyB,CAuB3B"} \ No newline at end of file diff --git a/src/validate.ts b/src/validate.ts index 94551d0..ec71e69 100644 --- a/src/validate.ts +++ b/src/validate.ts @@ -94,6 +94,7 @@ export function processValidationResult( return { success: true, - resultText: `Validated ${validationResult.url}!`, + resultText: `${validationResult.url} has structured data of these types: +${validationResult.tripleGroups.map((group) => ` - ${group.type}`).join("\n")}`, }; } diff --git a/test/__snapshots__/validate.test.ts.snap b/test/__snapshots__/validate.test.ts.snap index f83362e..ef02d2c 100644 --- a/test/__snapshots__/validate.test.ts.snap +++ b/test/__snapshots__/validate.test.ts.snap @@ -16,7 +16,8 @@ exports[`processValidationResult > given no structured data returns unsuccessful exports[`processValidationResult > given valid schema without errors / warnings returns successfully 1`] = ` { - "resultText": "Validated https://deploy-preview-9669--docusaurus-2.netlify.app/blog/releases/2.4/!", + "resultText": "https://deploy-preview-9669--docusaurus-2.netlify.app/blog/releases/2.4/ has structured data of these types: + - BlogPosting", "success": true, } `;