@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.
- package/README.md +4 -4
- package/dist/chunk-BCJZO532.js +7250 -0
- package/dist/{index-CWWQEu8q.d.ts → index-DbUx4tlY.d.ts} +17 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -3
- package/dist/internal.d.ts +3 -19
- package/dist/internal.js +551 -7461
- package/package.json +1 -1
- package/dist/chunk-2N7E4JFX.js +0 -30
|
@@ -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,
|
|
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 {
|
|
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
|
-
|
|
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
|
};
|
package/dist/internal.d.ts
CHANGED
|
@@ -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-
|
|
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
|
|
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,
|
|
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 };
|