@svelte-vitals/core 0.44.0 → 0.45.0

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.
@@ -202,6 +202,22 @@ declare function summarize(results: Result[], config: Config): Summary;
202
202
  /** Whether the run should fail the build/CI per the minimum failing severity. */
203
203
  declare function hasFailureAtOrAbove(summary: Summary, min: Severity): boolean;
204
204
 
205
+ /**
206
+ * Render penalized findings as GitHub Actions workflow commands (issue #18, design slice 5).
207
+ * GitHub turns these into inline PR annotations and run-annotation entries. Returns '' when clean.
208
+ */
209
+ declare function formatGithubReport(results: Result[], config: Config): string;
210
+
211
+ /**
212
+ * Render a compact Markdown summary — Health score, per-category table, severity counts, and
213
+ * a findings table — suitable for a GitHub Actions job summary or a sticky PR comment
214
+ * (`svelte-vitals ci install`). Delegates all aggregation to `buildJsonReport` so the numbers
215
+ * never drift from the JSON/console reporters.
216
+ */
217
+ declare function formatMarkdownReport(results: Result[], config: Config, meta: {
218
+ version: string;
219
+ }): string;
220
+
205
221
  /**
206
222
  * Runtime abstraction (design §8). Core defines only the interface; concrete
207
223
  * adapters (Node / Deno / Bun) live in the CLI package and are the only place
@@ -1135,4 +1151,4 @@ declare function formatJsonReport(results: Result[], config: Config, meta: {
1135
1151
  version: string;
1136
1152
  }, ruleIds?: readonly string[], examined?: Record<string, Record<string, number>>): string;
1137
1153
 
1138
- export { formatFailedRuleWarning as $, type A11yOccurrenceInfo as A, type BranchStep as B, type ComponentFacts as C, applyRuleSeverities as D, type EachBlockFact as E, type Fix as F, buildJsonReport as G, type HeadTag as H, type ImageInfo as I, type JsonReport as J, type KitAlias as K, LANDMARK_ROLES as L, classify as M, compileOverrides as N, type OrphanEffectFact as O, type Project as P, computeHealth as Q, type Runtime as R, type SuppressionDirective as S, computeScore as T, decodeFragmentId as U, type Value as V, defaultConfig as W, defaultProject as X, docsUrlFor as Y, effectiveSeverity as Z, foldOccurrences as _, type KitModuleFacts as a, formatJsonReport as a0, hasFailureAtOrAbove as a1, intOption as a2, isMentionedAnywhere as a3, isPenalized as a4, isTopFragment as a5, listOption as a6, mapOption as a7, overrideMatches as a8, resolveRuleOptions as a9, scoresByCategory as aa, selectRules as ab, settingOptions as ac, settingSeverity as ad, shouldSkipRangeCheck as ae, skippedFileWarnings as af, splitTokens as ag, stripTextDirective as ah, summarize as ai, validateRuleOptions as aj, validateRuleSetting as ak, withFailedRulesOff as al, withReadLimit as am, CATEGORIES as an, type Detection as ao, type Presence as ap, type RuleEvidence as aq, type RuleOptions as ar, type RuleOverride as as, type RuleSetting as at, type RuleSettingObject as au, type ScoreModel as av, type Summary as aw, type TreatDynamicAs as ax, defineConfig as ay, type Rule as b, type RuleContext as c, type Result as d, type Category as e, type Severity as f, type RuleOptionSpec as g, type ResolvedHead as h, type Config as i, type Classification as j, type CompiledOverride as k, type EffectFact as l, type HeadProvider as m, type HeadingInfo as n, type HealthResult as o, IDREF_ATTRS as p, READ_CONCURRENCY as q, type ResolvedA11y as r, type ResolvedHeadings as s, type ResolvedImages as t, type RuleOptionsSpec as u, type Scope as v, type ScoreOptions as w, type ScoreResult as x, type SourceSpan as y, applyOverrides as z };
1154
+ export { formatFailedRuleWarning as $, type A11yOccurrenceInfo as A, type BranchStep as B, type ComponentFacts as C, applyRuleSeverities as D, type EachBlockFact as E, type Fix as F, buildJsonReport as G, type HeadTag as H, type ImageInfo as I, type JsonReport as J, type KitAlias as K, LANDMARK_ROLES as L, classify as M, compileOverrides as N, type OrphanEffectFact as O, type Project as P, computeHealth as Q, type Runtime as R, type SuppressionDirective as S, computeScore as T, decodeFragmentId as U, type Value as V, defaultConfig as W, defaultProject as X, docsUrlFor as Y, effectiveSeverity as Z, foldOccurrences as _, type KitModuleFacts as a, formatGithubReport as a0, formatJsonReport as a1, formatMarkdownReport as a2, hasFailureAtOrAbove as a3, intOption as a4, isMentionedAnywhere as a5, isPenalized as a6, isTopFragment as a7, listOption as a8, mapOption as a9, defineConfig as aA, overrideMatches as aa, resolveRuleOptions as ab, scoresByCategory as ac, selectRules as ad, settingOptions as ae, settingSeverity as af, shouldSkipRangeCheck as ag, skippedFileWarnings as ah, splitTokens as ai, stripTextDirective as aj, summarize as ak, validateRuleOptions as al, validateRuleSetting as am, withFailedRulesOff as an, withReadLimit as ao, CATEGORIES as ap, type Detection as aq, type Presence as ar, type RuleEvidence as as, type RuleOptions as at, type RuleOverride as au, type RuleSetting as av, type RuleSettingObject as aw, type ScoreModel as ax, type Summary as ay, type TreatDynamicAs as az, type Rule as b, type RuleContext as c, type Result as d, type Category as e, type Severity as f, type RuleOptionSpec as g, type ResolvedHead as h, type Config as i, type Classification as j, type CompiledOverride as k, type EffectFact as l, type HeadProvider as m, type HeadingInfo as n, type HealthResult as o, IDREF_ATTRS as p, READ_CONCURRENCY as q, type ResolvedA11y as r, type ResolvedHeadings as s, type ResolvedImages as t, type RuleOptionsSpec as u, type Scope as v, type ScoreOptions as w, type ScoreResult as x, type SourceSpan as y, applyOverrides as z };
package/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { an as CATEGORIES, e as Category, i as Config, ao as Detection, F as Fix, J as JsonReport, ap as Presence, d as Result, aq as RuleEvidence, ar as RuleOptions, as as RuleOverride, at as RuleSetting, au as RuleSettingObject, av as ScoreModel, f as Severity, aw as Summary, ax as TreatDynamicAs, V as Value, ay as defineConfig } from './index-CWWQEu8q.js';
1
+ export { ap as CATEGORIES, e as Category, i as Config, aq as Detection, F as Fix, J as JsonReport, ar as Presence, d as Result, as as RuleEvidence, at as RuleOptions, au as RuleOverride, av as RuleSetting, aw as RuleSettingObject, ax as ScoreModel, f as Severity, ay as Summary, az as TreatDynamicAs, V as Value, aA as defineConfig, a0 as formatGithubReport, a2 as formatMarkdownReport, a3 as hasFailureAtOrAbove, ak as summarize } from './index-DbUx4tlY.js';
package/dist/index.js CHANGED
@@ -1,8 +1,16 @@
1
1
  import {
2
2
  CATEGORIES,
3
- defineConfig
4
- } from "./chunk-2N7E4JFX.js";
3
+ defineConfig,
4
+ formatGithubReport,
5
+ formatMarkdownReport,
6
+ hasFailureAtOrAbove,
7
+ summarize
8
+ } from "./chunk-BCJZO532.js";
5
9
  export {
6
10
  CATEGORIES,
7
- defineConfig
11
+ defineConfig,
12
+ formatGithubReport,
13
+ formatMarkdownReport,
14
+ hasFailureAtOrAbove,
15
+ summarize
8
16
  };
@@ -1,5 +1,5 @@
1
- import { C as ComponentFacts, S as SuppressionDirective, R as Runtime, K as KitAlias, a as KitModuleFacts, V as Value, b as Rule, c as RuleContext, d as Result, e as Category, f as Severity, F as Fix, g as RuleOptionSpec, H as HeadTag, h as ResolvedHead, I as ImageInfo, i as Config, J as JsonReport } from './index-CWWQEu8q.js';
2
- export { A as A11yOccurrenceInfo, B as BranchStep, j as Classification, k as CompiledOverride, E as EachBlockFact, l as EffectFact, m as HeadProvider, n as HeadingInfo, o as HealthResult, p as IDREF_ATTRS, L as LANDMARK_ROLES, O as OrphanEffectFact, P as Project, q as READ_CONCURRENCY, r as ResolvedA11y, s as ResolvedHeadings, t as ResolvedImages, u as RuleOptionsSpec, v as Scope, w as ScoreOptions, x as ScoreResult, y as SourceSpan, z as applyOverrides, D as applyRuleSeverities, G as buildJsonReport, M as classify, N as compileOverrides, Q as computeHealth, T as computeScore, U as decodeFragmentId, W as defaultConfig, X as defaultProject, Y as docsUrlFor, Z as effectiveSeverity, _ as foldOccurrences, $ as formatFailedRuleWarning, a0 as formatJsonReport, a1 as hasFailureAtOrAbove, a2 as intOption, a3 as isMentionedAnywhere, a4 as isPenalized, a5 as isTopFragment, a6 as listOption, a7 as mapOption, a8 as overrideMatches, a9 as resolveRuleOptions, aa as scoresByCategory, ab as selectRules, ac as settingOptions, ad as settingSeverity, ae as shouldSkipRangeCheck, af as skippedFileWarnings, ag as splitTokens, ah as stripTextDirective, ai as summarize, aj as validateRuleOptions, ak as validateRuleSetting, al as withFailedRulesOff, am as withReadLimit } from './index-CWWQEu8q.js';
1
+ import { C as ComponentFacts, S as SuppressionDirective, R as Runtime, K as KitAlias, a as KitModuleFacts, V as Value, b as Rule, c as RuleContext, d as Result, e as Category, f as Severity, F as Fix, g as RuleOptionSpec, H as HeadTag, h as ResolvedHead, I as ImageInfo, i as Config, J as JsonReport } from './index-DbUx4tlY.js';
2
+ export { A as A11yOccurrenceInfo, B as BranchStep, j as Classification, k as CompiledOverride, E as EachBlockFact, l as EffectFact, m as HeadProvider, n as HeadingInfo, o as HealthResult, p as IDREF_ATTRS, L as LANDMARK_ROLES, O as OrphanEffectFact, P as Project, q as READ_CONCURRENCY, r as ResolvedA11y, s as ResolvedHeadings, t as ResolvedImages, u as RuleOptionsSpec, v as Scope, w as ScoreOptions, x as ScoreResult, y as SourceSpan, z as applyOverrides, D as applyRuleSeverities, G as buildJsonReport, M as classify, N as compileOverrides, Q as computeHealth, T as computeScore, U as decodeFragmentId, W as defaultConfig, X as defaultProject, Y as docsUrlFor, Z as effectiveSeverity, _ as foldOccurrences, $ as formatFailedRuleWarning, a0 as formatGithubReport, a1 as formatJsonReport, a2 as formatMarkdownReport, a3 as hasFailureAtOrAbove, a4 as intOption, a5 as isMentionedAnywhere, a6 as isPenalized, a7 as isTopFragment, a8 as listOption, a9 as mapOption, aa as overrideMatches, ab as resolveRuleOptions, ac as scoresByCategory, ad as selectRules, ae as settingOptions, af as settingSeverity, ag as shouldSkipRangeCheck, ah as skippedFileWarnings, ai as splitTokens, aj as stripTextDirective, ak as summarize, al as validateRuleOptions, am as validateRuleSetting, an as withFailedRulesOff, ao as withReadLimit } from './index-DbUx4tlY.js';
3
3
  import { AST } from 'svelte/compiler';
4
4
 
5
5
  /** What the per-file parsers produce — `ComponentFacts` minus `file`, with `suppressions` always present. */
@@ -801,22 +801,6 @@ declare function formatSarifReport(results: Result[], config: Config, meta: {
801
801
  version: string;
802
802
  }): string;
803
803
 
804
- /**
805
- * Render penalized findings as GitHub Actions workflow commands (issue #18, design slice 5).
806
- * GitHub turns these into inline PR annotations and run-annotation entries. Returns '' when clean.
807
- */
808
- declare function formatGithubReport(results: Result[], config: Config): string;
809
-
810
- /**
811
- * Render a compact Markdown summary — Health score, per-category table, severity counts, and
812
- * a findings table — suitable for a GitHub Actions job summary or a sticky PR comment
813
- * (`svelte-vitals ci install`). Delegates all aggregation to `buildJsonReport` so the numbers
814
- * never drift from the JSON/console reporters.
815
- */
816
- declare function formatMarkdownReport(results: Result[], config: Config, meta: {
817
- version: string;
818
- }): string;
819
-
820
804
  type Band = 'good' | 'warn' | 'poor';
821
805
  declare const BAND_COLOR: Record<Band, string>;
822
806
  declare function scoreBand(score: number): Band;
@@ -880,4 +864,4 @@ declare function formatHtmlReport(results: Result[], config: Config, meta: {
880
864
  coreVersion?: string;
881
865
  }): string;
882
866
 
883
- export { APP_SCRIPT, APP_STYLE, type AppSnapshot, BAND_COLOR, CHILD_NODE_KEYS, ComponentFacts, type ConsoleReportOptions, type FailedRule, HeadTag, ImageInfo, KitAlias, KitModuleFacts, type Palette, ROBOTS_SOURCE_PATHS, type RawKitAliases, ResolvedHead, type RouteBadge, Rule, RuleContext, type RuleInfo, type RuleOptionInfo, RuleOptionSpec, Runtime, SITEMAP_SOURCE_PATHS, SVELTE_CONFIG_FILES, SuppressionDirective, VITE_CONFIG_FILES, type ViteKitConfigResult, a11yAccessibleName, a11yDoctype, a11yDuplicateLandmark, a11yIdDuplication, a11yInteractiveNesting, a11yInvalidAriaValue, a11yInvalidRole, a11yLabelHasControl, a11yNoMissingIdRef, a11yPlaceholderLabelOption, a11yRequireDatetime, a11yRequiredAriaProps, a11yTopLevelLandmark, a11yUnknownAriaAttribute, a11yUseList, allRules, architectureComponentSize, architectureDirectoryNaming, architectureDocLinkTarget, architecturePrivateScopeImport, architecturePropCount, architectureReservedDirectoryNames, architectureReservedNamePlacement, architectureRouteComponentImport, architectureUnitEntryFile, attrText, attrTextOf, attrValue, attrValueOf, buildHtmlDocument, collectComponentFacts, collectKitModuleFacts, collectSourceFiles, correctnessBasePathNavigation, correctnessCheckableBindValue, correctnessEachIndexKey, correctnessEachKey, correctnessEffectAsDerived, correctnessEffectAsOnMount, correctnessInstanceBrowserGlobal, correctnessNonreactiveBuiltinState, correctnessOrphanEffect, correctnessOrphanLifecycle, correctnessPropMutation, correctnessServerBrowserGlobal, correctnessStalePropDerivation, correctnessUnmutatedState, emptyComponentFacts, emptyKitModuleFacts, escapeHtml, explainRule, findAttr, findKitAliasesInSvelteConfig, findKitPathsBaseInSvelteConfig, findKitPathsBaseInViteConfig, findMinifyDisabled, formatAgentReport, formatConsoleReport, formatGithubReport, formatHtmlReport, formatMarkdownReport, formatSarifReport, headTagRule, imageRule, lineOf, linkRule, noColorPalette, parseComponentFacts, parseKitModuleFacts, parseSvelte, performanceFontPreloadCrossorigin, performanceHeavyImport, performanceImageDimensions, performanceImageLoadingHint, performanceLcpImage, performanceLoadWaterfall, performanceMinifyDisabled, performanceNamespaceImport, performancePreconnect, performancePreloadMissingAs, performanceRenderBlockingScript, performanceResponsiveImage, performanceSequentialAwaits, performanceStateRaw, renderAppShell, resolveKitAliases, resolveKitPathsBase, resolveRepoLocalPath, resolveRunesModuleSpecifier, runRules, safeHref, scoreBand, scoreColor, securityHandlerStateWrite, securityJavascriptUrl, securityRawHtml, securityServerModuleState, securitySharedStateImport, seoCanonicalUrl, seoCharset, seoDescriptionLength, seoDescriptionPresence, seoDuplicateDescription, seoDuplicateTitle, seoHeadingLevelSkip, seoHreflang, seoHtmlLang, seoImageAlt, seoIndexability, seoJsonLd, seoJsonLdDateFormat, seoJsonLdDeprecatedType, seoJsonLdPlaceholder, seoJsonLdRelativeUrl, seoJsonLdRequiredProps, seoJsonLdValidity, seoOgDescription, seoOgImage, seoOgTitle, seoOgUrl, seoRobotsTxt, seoSingleH1, seoSitemapInRobots, seoSitemapXml, seoSsrDisabled, seoTitleLength, seoTitlePresence, seoTwitterCard, seoViewport, terminalSafe, textFromNodes, valueFromNodes };
867
+ export { APP_SCRIPT, APP_STYLE, type AppSnapshot, BAND_COLOR, CHILD_NODE_KEYS, ComponentFacts, type ConsoleReportOptions, type FailedRule, HeadTag, ImageInfo, KitAlias, KitModuleFacts, type Palette, ROBOTS_SOURCE_PATHS, type RawKitAliases, ResolvedHead, type RouteBadge, Rule, RuleContext, type RuleInfo, type RuleOptionInfo, RuleOptionSpec, Runtime, SITEMAP_SOURCE_PATHS, SVELTE_CONFIG_FILES, SuppressionDirective, VITE_CONFIG_FILES, type ViteKitConfigResult, a11yAccessibleName, a11yDoctype, a11yDuplicateLandmark, a11yIdDuplication, a11yInteractiveNesting, a11yInvalidAriaValue, a11yInvalidRole, a11yLabelHasControl, a11yNoMissingIdRef, a11yPlaceholderLabelOption, a11yRequireDatetime, a11yRequiredAriaProps, a11yTopLevelLandmark, a11yUnknownAriaAttribute, a11yUseList, allRules, architectureComponentSize, architectureDirectoryNaming, architectureDocLinkTarget, architecturePrivateScopeImport, architecturePropCount, architectureReservedDirectoryNames, architectureReservedNamePlacement, architectureRouteComponentImport, architectureUnitEntryFile, attrText, attrTextOf, attrValue, attrValueOf, buildHtmlDocument, collectComponentFacts, collectKitModuleFacts, collectSourceFiles, correctnessBasePathNavigation, correctnessCheckableBindValue, correctnessEachIndexKey, correctnessEachKey, correctnessEffectAsDerived, correctnessEffectAsOnMount, correctnessInstanceBrowserGlobal, correctnessNonreactiveBuiltinState, correctnessOrphanEffect, correctnessOrphanLifecycle, correctnessPropMutation, correctnessServerBrowserGlobal, correctnessStalePropDerivation, correctnessUnmutatedState, emptyComponentFacts, emptyKitModuleFacts, escapeHtml, explainRule, findAttr, findKitAliasesInSvelteConfig, findKitPathsBaseInSvelteConfig, findKitPathsBaseInViteConfig, findMinifyDisabled, formatAgentReport, formatConsoleReport, formatHtmlReport, formatSarifReport, headTagRule, imageRule, lineOf, linkRule, noColorPalette, parseComponentFacts, parseKitModuleFacts, parseSvelte, performanceFontPreloadCrossorigin, performanceHeavyImport, performanceImageDimensions, performanceImageLoadingHint, performanceLcpImage, performanceLoadWaterfall, performanceMinifyDisabled, performanceNamespaceImport, performancePreconnect, performancePreloadMissingAs, performanceRenderBlockingScript, performanceResponsiveImage, performanceSequentialAwaits, performanceStateRaw, renderAppShell, resolveKitAliases, resolveKitPathsBase, resolveRepoLocalPath, resolveRunesModuleSpecifier, runRules, safeHref, scoreBand, scoreColor, securityHandlerStateWrite, securityJavascriptUrl, securityRawHtml, securityServerModuleState, securitySharedStateImport, seoCanonicalUrl, seoCharset, seoDescriptionLength, seoDescriptionPresence, seoDuplicateDescription, seoDuplicateTitle, seoHeadingLevelSkip, seoHreflang, seoHtmlLang, seoImageAlt, seoIndexability, seoJsonLd, seoJsonLdDateFormat, seoJsonLdDeprecatedType, seoJsonLdPlaceholder, seoJsonLdRelativeUrl, seoJsonLdRequiredProps, seoJsonLdValidity, seoOgDescription, seoOgImage, seoOgTitle, seoOgUrl, seoRobotsTxt, seoSingleH1, seoSitemapInRobots, seoSitemapXml, seoSsrDisabled, seoTitleLength, seoTitlePresence, seoTwitterCard, seoViewport, terminalSafe, textFromNodes, valueFromNodes };