@svelte-vitals/core 0.10.0 → 0.10.1
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 +4 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ var SITEMAP_SOURCE_PATHS = [
|
|
|
28
28
|
|
|
29
29
|
// src/rule.ts
|
|
30
30
|
function docsUrlFor(id) {
|
|
31
|
-
return `https://svelte-vitals
|
|
31
|
+
return `https://oekazuma.github.io/svelte-vitals/rules/${id.toLowerCase()}`;
|
|
32
32
|
}
|
|
33
33
|
function isPenalized(detection, treatDynamicAs) {
|
|
34
34
|
if (detection.presence === "none") return true;
|
|
@@ -679,11 +679,8 @@ function severityToGithubLevel(sev) {
|
|
|
679
679
|
function messageText(result) {
|
|
680
680
|
return result.recommendation ? `${result.message} ${result.recommendation}` : result.message;
|
|
681
681
|
}
|
|
682
|
-
function docsUrlFor2(id) {
|
|
683
|
-
return `https://svelte-vitals.dev/rules/${id}`;
|
|
684
|
-
}
|
|
685
682
|
var RULE_META = new Map(
|
|
686
|
-
allRules.map((r) => [r.id, { title: r.title, severity: r.severity, docsUrl:
|
|
683
|
+
allRules.map((r) => [r.id, { title: r.title, severity: r.severity, docsUrl: docsUrlFor(r.id) }])
|
|
687
684
|
);
|
|
688
685
|
function ruleMetaById(id) {
|
|
689
686
|
return RULE_META.get(id);
|
|
@@ -703,7 +700,7 @@ function formatSarifReport(results, config, meta) {
|
|
|
703
700
|
id: r.id,
|
|
704
701
|
name,
|
|
705
702
|
shortDescription: { text: name },
|
|
706
|
-
helpUri: r.docsUrl ?? m?.docsUrl ??
|
|
703
|
+
helpUri: r.docsUrl ?? m?.docsUrl ?? docsUrlFor(r.id),
|
|
707
704
|
defaultConfiguration: { level: severityToSarifLevel(m?.severity ?? r.severity) }
|
|
708
705
|
});
|
|
709
706
|
}
|
|
@@ -736,7 +733,7 @@ function formatSarifReport(results, config, meta) {
|
|
|
736
733
|
tool: {
|
|
737
734
|
driver: {
|
|
738
735
|
name: "svelte-vitals",
|
|
739
|
-
informationUri: "https://svelte-vitals
|
|
736
|
+
informationUri: "https://oekazuma.github.io/svelte-vitals",
|
|
740
737
|
version: meta.version,
|
|
741
738
|
rules
|
|
742
739
|
}
|