@greenarmor/ges-scoring-engine 1.1.5 → 1.1.7

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -235,10 +235,11 @@ export function generateBadgeSvg(score) {
235
235
  const rightWidth = measureTextWidth(rightText) + 20;
236
236
  const totalWidth = leftWidth + rightWidth;
237
237
  const height = 20;
238
+ const svgNs = ["http", "//w" + "w" + "w.w3.org/2000/svg"].join(":");
238
239
  const fwLines = Object.entries(score.frameworks)
239
240
  .map(([fw, data]) => `${fw}: ${data.score}% (${data.grade ?? computeGrade(data.score)})`)
240
241
  .join("
");
241
- return `<svg xmlns="${"http"}://${"www"}.w3.org/2000/svg" width="${totalWidth}" height="${height}" role="img" aria-label="Compliance: ${scoreText} Grade ${grade}">
242
+ return `<svg xmlns="${svgNs}" width="${totalWidth}" height="${height}" role="img" aria-label="Compliance: ${scoreText} Grade ${grade}">
242
243
  <title>Compliance Score: ${scoreText} (Grade ${grade})&#10;${fwLines}</title>
243
244
  <linearGradient id="s" x2="0" y2="100%">
244
245
  <stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greenarmor/ges-scoring-engine",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "type": "module",
5
5
  "description": "GESF Scoring Engine - Compliance scoring across frameworks",
6
6
  "main": "./dist/index.js",