@dragonshorn-studios/elyseum-cli 0.1.6 → 0.1.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/dist/index.js CHANGED
@@ -9978,11 +9978,6 @@ class GithubPRCommentCoverageReporter {
9978
9978
  default: 80,
9979
9979
  },
9980
9980
  };
9981
- this.coverage_low = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M2.344 2.343h-.001a8 8 0 0 1 11.314 11.314A8.002 8.002 0 0 1 .234 10.089a8 8 0 0 1 2.11-7.746Zm1.06 10.253a6.5 6.5 0 1 0 9.108-9.275 6.5 6.5 0 0 0-9.108 9.275ZM6.03 4.97 8 6.94l1.97-1.97a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l1.97 1.97a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-1.97 1.97a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L6.94 8 4.97 6.03a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018Z"></path></svg>`;
9982
- this.coverage_med = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm9.78-2.22-5.5 5.5a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l5.5-5.5a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path></svg>`;
9983
- this.coverage_high = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm1.5 0a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm10.28-1.72-4.5 4.5a.75.75 0 0 1-1.06 0l-2-2a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018l1.47 1.47 3.97-3.97a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path></svg>`;
9984
- this.quality_gate_passed = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12Zm16.28-2.72a.751.751 0 0 0-.018-1.042.751.751 0 0 0-1.042-.018l-5.97 5.97-2.47-2.47a.751.751 0 0 0-1.042.018.751.751 0 0 0-.018 1.042l3 3a.75.75 0 0 0 1.06 0Z"></path></svg>`;
9985
- this.quality_gate_failed = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12Zm8.036-4.024a.751.751 0 0 0-1.042.018.751.751 0 0 0-.018 1.042L10.939 12l-2.963 2.963a.749.749 0 0 0 .326 1.275.749.749 0 0 0 .734-.215L12 13.06l2.963 2.964a.75.75 0 0 0 1.061-1.06L13.061 12l2.963-2.964a.749.749 0 0 0-.326-1.275.749.749 0 0 0-.734.215L12 10.939Z"></path></svg>`;
9986
9981
  }
9987
9982
  report(diffCoverage) {
9988
9983
  // check if we have github ci environment variables, and if not, return
@@ -10006,10 +10001,10 @@ class GithubPRCommentCoverageReporter {
10006
10001
  let coverageQualityText = ``;
10007
10002
  if (qualityGate) {
10008
10003
  if (qualityGateFailed) {
10009
- coverageQualityText += `> [!CAUTION]\n### Coverage Quality Gate Failed ${qualityGateFailed}`;
10004
+ coverageQualityText += `> [!CAUTION]\n> ### Coverage Quality Gate Failed 🟥\n`;
10010
10005
  }
10011
10006
  else {
10012
- coverageQualityText += `> [!TIP]\n### Coverage Quality Gate Passed ${qualityGateFailed}`;
10007
+ coverageQualityText += `> [!TIP]\n> ### Coverage Quality Gate Passed 🟩\n`;
10013
10008
  }
10014
10009
  coverageQualityText += `> ${this.getIcon(diffCoverage.lines.percent)} Lines: ${diffCoverage.lines.percent.toFixed(2)}% (baseline: ${qualityGate}%)\n`;
10015
10010
  coverageQualityText += `> ${this.getIcon(diffCoverage.functions.percent)} Functions: ${diffCoverage.functions.percent.toFixed(2)}% (baseline: ${qualityGate}%)\n`;
@@ -10035,20 +10030,23 @@ class GithubPRCommentCoverageReporter {
10035
10030
  reportInfo += ` against base commit ${diffCoverage.baseSha}`;
10036
10031
  }
10037
10032
  reportInfo += ` (triggering run: <a href="/${repoName}/actions/runs/${runId}">${runId}</a>)`;
10033
+ markdown += `\n\n---\n\n${reportInfo}`;
10038
10034
  fs$1.mkdirSync(reportPath.substring(0, reportPath.lastIndexOf("/")), {
10039
10035
  recursive: true,
10040
10036
  });
10041
10037
  fs$1.writeFileSync(reportPath, markdown);
10042
10038
  }
10043
10039
  getIcon(percent) {
10040
+ // emoji based
10044
10041
  if (percent >= 80) {
10045
- return `<span style='color: #28a745;'>${this.coverage_high}</span>`;
10042
+ // green circle
10043
+ return "🟢";
10046
10044
  }
10047
10045
  else if (percent >= 50) {
10048
- return `<span style='color: #f66a0a;'>${this.coverage_med}</span>`;
10046
+ return "🟡";
10049
10047
  }
10050
10048
  else {
10051
- return `<span style='color: #cb2431;'>${this.coverage_low}</span>`;
10049
+ return "🔴";
10052
10050
  }
10053
10051
  }
10054
10052
  percentOrNA(percent) {