svelte-vitals 0.54.4 → 0.54.6
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/{action-pin.generated-C2XJJ3NW.js → action-pin.generated-BkwgIAMh.js} +2 -2
- package/dist/{analyze-BH6tM7-d.js → analyze-B1DhJ_wC.js} +9 -5
- package/dist/bin.js +6 -6
- package/dist/{ci-DdxIti4m.js → ci-Cs-AbY0g.js} +2 -2
- package/dist/{complete-DopIU_Sb.js → complete-B5MjMWIx.js} +6 -6
- package/dist/{docs-hor--7iY.js → docs-CS6y-jmw.js} +2 -2
- package/dist/{explain-BQWRixs6.js → explain-2q_Uvl0L.js} +2 -2
- package/dist/gunshi-registry.js +2 -2
- package/dist/index.d.ts +18 -18
- package/dist/index.js +1 -1
- package/dist/{install-BEsNEdKk.js → install-NaV82t9A.js} +15 -13
- package/dist/{src-BhVse1Wr.js → src-CNeKZkf0.js} +16 -8
- package/package.json +9 -9
|
@@ -56,7 +56,7 @@ function buildWorkflowYaml(opts) {
|
|
|
56
56
|
}
|
|
57
57
|
//#endregion
|
|
58
58
|
//#region src/ci/action-pin.generated.ts
|
|
59
|
-
const ACTION_SHA = "
|
|
60
|
-
const ACTION_VERSION = "0.
|
|
59
|
+
const ACTION_SHA = "91ef310a72272f7473aeadcdec63c9ba1ba6ea11";
|
|
60
|
+
const ACTION_VERSION = "0.12.1";
|
|
61
61
|
//#endregion
|
|
62
62
|
export { planWorkflowWrite as a, buildWorkflowYaml as i, ACTION_VERSION as n, WORKFLOW_PATH as r, ACTION_SHA as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as findUnknownRuleIds, h as readPackageVersion, i as run, l as knownRuleIds, m as readCoreVersion, p as isReporterName } from "./src-
|
|
1
|
+
import { c as findUnknownRuleIds, h as readPackageVersion, i as run, l as knownRuleIds, m as readCoreVersion, p as isReporterName } from "./src-CNeKZkf0.js";
|
|
2
2
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { dirname, resolve } from "node:path";
|
|
4
4
|
import { terminalSafe } from "@svelte-vitals/core/internal";
|
|
@@ -288,8 +288,10 @@ function resolveArgs(argv) {
|
|
|
288
288
|
const diffBase = typeof argv.diff === "string" ? argv.diff || "HEAD" : void 0;
|
|
289
289
|
const staged = Boolean(argv.staged);
|
|
290
290
|
let baselineRef;
|
|
291
|
-
if (argv.baseline !== void 0)
|
|
292
|
-
|
|
291
|
+
if (argv.baseline !== void 0) {
|
|
292
|
+
if (typeof argv.baseline !== "string" || argv.baseline.trim() === "" || argv.baseline.startsWith("-")) errors.push("svelte-vitals: --baseline requires a git ref (e.g. --baseline origin/main).");
|
|
293
|
+
else baselineRef = argv.baseline;
|
|
294
|
+
}
|
|
293
295
|
const allow = toList(argv.rules);
|
|
294
296
|
const ignore = toList(argv.ignore);
|
|
295
297
|
const unknown = findUnknownRuleIds([...allow, ...ignore]);
|
|
@@ -298,8 +300,10 @@ function resolveArgs(argv) {
|
|
|
298
300
|
errors.push(`Known rule ids: ${knownRuleIds().join(", ")}`);
|
|
299
301
|
}
|
|
300
302
|
let reporter;
|
|
301
|
-
if (typeof argv.reporter === "string")
|
|
302
|
-
|
|
303
|
+
if (typeof argv.reporter === "string") {
|
|
304
|
+
if (!isReporterName(argv.reporter)) errors.push(`svelte-vitals: unknown reporter '${argv.reporter}'. Valid values: console, json, agent, sarif, github, html, md.`);
|
|
305
|
+
else reporter = argv.reporter;
|
|
306
|
+
}
|
|
303
307
|
const failOnRaw = argv["fail-on"];
|
|
304
308
|
const failOnValid = isFailOnValue(failOnRaw);
|
|
305
309
|
if (typeof failOnRaw === "string" && !failOnValid) warnings.push(`svelte-vitals: unknown --fail-on '${failOnRaw}'; expected critical|warning|info. No threshold applied.`);
|
package/dist/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { g as realIO, i as resolveLocale, m as consoleIO, n as runAnalyzeCliGunshi } from "./analyze-
|
|
2
|
+
import { g as realIO, i as resolveLocale, m as consoleIO, n as runAnalyzeCliGunshi } from "./analyze-B1DhJ_wC.js";
|
|
3
3
|
import { terminalSafe } from "@svelte-vitals/core/internal";
|
|
4
4
|
//#region src/cli.ts
|
|
5
5
|
/**
|
|
@@ -17,35 +17,35 @@ async function runCli(argv, io = consoleIO, env = process.env) {
|
|
|
17
17
|
try {
|
|
18
18
|
const locale = resolveLocale(env);
|
|
19
19
|
if (argv[0] === "complete") {
|
|
20
|
-
const { runCompleteCliGunshi } = await import("./complete-
|
|
20
|
+
const { runCompleteCliGunshi } = await import("./complete-B5MjMWIx.js");
|
|
21
21
|
return {
|
|
22
22
|
code: await runCompleteCliGunshi(argv, io),
|
|
23
23
|
exit: "natural"
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
if (argv[0] === "docs") {
|
|
27
|
-
const { runDocsCliGunshi } = await import("./docs-
|
|
27
|
+
const { runDocsCliGunshi } = await import("./docs-CS6y-jmw.js");
|
|
28
28
|
return {
|
|
29
29
|
code: await runDocsCliGunshi(argv.slice(1), io, locale),
|
|
30
30
|
exit: "natural"
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
if (argv[0] === "explain") {
|
|
34
|
-
const { runExplainCliGunshi } = await import("./explain-
|
|
34
|
+
const { runExplainCliGunshi } = await import("./explain-2q_Uvl0L.js");
|
|
35
35
|
return {
|
|
36
36
|
code: await runExplainCliGunshi(argv.slice(1), io, locale),
|
|
37
37
|
exit: "natural"
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
if (argv[0] === "install") {
|
|
41
|
-
const { runInstallCliGunshi } = await import("./install-
|
|
41
|
+
const { runInstallCliGunshi } = await import("./install-NaV82t9A.js").then((n) => n.n);
|
|
42
42
|
return {
|
|
43
43
|
code: await runInstallCliGunshi(argv.slice(1), io, locale),
|
|
44
44
|
exit: "immediate"
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
if (argv[0] === "ci") {
|
|
48
|
-
const { runCiCliGunshi } = await import("./ci-
|
|
48
|
+
const { runCiCliGunshi } = await import("./ci-Cs-AbY0g.js");
|
|
49
49
|
return {
|
|
50
50
|
code: await runCiCliGunshi(argv.slice(1), {
|
|
51
51
|
...realIO(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as guardArgs, c as stripUnknownFlags, g as realIO, l as suggestClosest, o as splitAtTerminator, r as localizedOptionsSection, s as stripAutoVersionLine } from "./analyze-
|
|
2
|
-
import { a as planWorkflowWrite, i as buildWorkflowYaml, n as ACTION_VERSION, r as WORKFLOW_PATH, t as ACTION_SHA } from "./action-pin.generated-
|
|
1
|
+
import { a as guardArgs, c as stripUnknownFlags, g as realIO, l as suggestClosest, o as splitAtTerminator, r as localizedOptionsSection, s as stripAutoVersionLine } from "./analyze-B1DhJ_wC.js";
|
|
2
|
+
import { a as planWorkflowWrite, i as buildWorkflowYaml, n as ACTION_VERSION, r as WORKFLOW_PATH, t as ACTION_SHA } from "./action-pin.generated-BkwgIAMh.js";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { cli } from "gunshi/bone";
|
|
5
5
|
import { define } from "gunshi/definition";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { f as REPORTER_NAMES } from "./src-
|
|
2
|
-
import { d as FAIL_ON_VALUES, f as TREAT_DYNAMIC_AS_VALUES, m as consoleIO, t as ROOT_ARGS, u as CATEGORIES } from "./analyze-
|
|
3
|
-
import { t as INSTALL_ARGS } from "./install-
|
|
4
|
-
import { CI_ARGS, CI_UPGRADE_ARGS } from "./ci-
|
|
5
|
-
import { DOCS_LIST_ARGS, DOCS_ROOT_ARGS, DOCS_SHOW_ARGS } from "./docs-
|
|
6
|
-
import { EXPLAIN_ARGS } from "./explain-
|
|
1
|
+
import { f as REPORTER_NAMES } from "./src-CNeKZkf0.js";
|
|
2
|
+
import { d as FAIL_ON_VALUES, f as TREAT_DYNAMIC_AS_VALUES, m as consoleIO, t as ROOT_ARGS, u as CATEGORIES } from "./analyze-B1DhJ_wC.js";
|
|
3
|
+
import { t as INSTALL_ARGS } from "./install-NaV82t9A.js";
|
|
4
|
+
import { CI_ARGS, CI_UPGRADE_ARGS } from "./ci-Cs-AbY0g.js";
|
|
5
|
+
import { DOCS_LIST_ARGS, DOCS_ROOT_ARGS, DOCS_SHOW_ARGS } from "./docs-CS6y-jmw.js";
|
|
6
|
+
import { EXPLAIN_ARGS } from "./explain-2q_Uvl0L.js";
|
|
7
7
|
import { cli } from "gunshi/bone";
|
|
8
8
|
import { define } from "gunshi/definition";
|
|
9
9
|
import { kebabnize } from "gunshi/utils";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as knownRuleIds } from "./src-
|
|
2
|
-
import { a as guardArgs, c as stripUnknownFlags, l as suggestClosest, m as consoleIO, o as splitAtTerminator, r as localizedOptionsSection, s as stripAutoVersionLine } from "./analyze-
|
|
1
|
+
import { l as knownRuleIds } from "./src-CNeKZkf0.js";
|
|
2
|
+
import { a as guardArgs, c as stripUnknownFlags, l as suggestClosest, m as consoleIO, o as splitAtTerminator, r as localizedOptionsSection, s as stripAutoVersionLine } from "./analyze-B1DhJ_wC.js";
|
|
3
3
|
import { docsUrlFor } from "@svelte-vitals/core/internal";
|
|
4
4
|
import { cli } from "gunshi/bone";
|
|
5
5
|
import { define } from "gunshi/definition";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as knownRuleIds } from "./src-
|
|
2
|
-
import { a as guardArgs, c as stripUnknownFlags, l as suggestClosest, m as consoleIO, o as splitAtTerminator, r as localizedOptionsSection, s as stripAutoVersionLine } from "./analyze-
|
|
1
|
+
import { l as knownRuleIds } from "./src-CNeKZkf0.js";
|
|
2
|
+
import { a as guardArgs, c as stripUnknownFlags, l as suggestClosest, m as consoleIO, o as splitAtTerminator, r as localizedOptionsSection, s as stripAutoVersionLine } from "./analyze-B1DhJ_wC.js";
|
|
3
3
|
import { CATEGORIES } from "@svelte-vitals/core";
|
|
4
4
|
import { allRules, explainRule } from "@svelte-vitals/core/internal";
|
|
5
5
|
import { cli } from "gunshi/bone";
|
package/dist/gunshi-registry.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ROOT_ARGS } from "./analyze-
|
|
2
|
-
import { t as INSTALL_ARGS } from "./install-
|
|
1
|
+
import { t as ROOT_ARGS } from "./analyze-B1DhJ_wC.js";
|
|
2
|
+
import { t as INSTALL_ARGS } from "./install-NaV82t9A.js";
|
|
3
3
|
import { t as JA_ARG_DESCRIPTIONS } from "./ja-BDLP3KLG.js";
|
|
4
4
|
export { INSTALL_ARGS, JA_ARG_DESCRIPTIONS, ROOT_ARGS };
|
package/dist/index.d.ts
CHANGED
|
@@ -103,7 +103,7 @@ type ReporterName = 'console' | 'json' | 'agent' | 'sarif' | 'github' | 'html' |
|
|
|
103
103
|
* drift and make the scaffolder create a duplicate config the loader then
|
|
104
104
|
* shadows or ignores.
|
|
105
105
|
*/
|
|
106
|
-
declare const CONFIG_FILENAMES: string[];
|
|
106
|
+
export declare const CONFIG_FILENAMES: string[];
|
|
107
107
|
/** Result of loading and validating a config file. */
|
|
108
108
|
interface LoadedConfigFile {
|
|
109
109
|
/** The file's contents after validation; invalid optional fields are dropped (see `warnings`). */
|
|
@@ -124,16 +124,16 @@ interface LoadedConfigFile {
|
|
|
124
124
|
* config fails validation (unknown rule ids in `rules`, invalid `weights`
|
|
125
125
|
* entries).
|
|
126
126
|
*/
|
|
127
|
-
declare function loadConfigFile(cwd: string): Promise<LoadedConfigFile | undefined>;
|
|
127
|
+
export declare function loadConfigFile(cwd: string): Promise<LoadedConfigFile | undefined>;
|
|
128
128
|
//#endregion
|
|
129
129
|
//#region src/providers/source/project.d.ts
|
|
130
130
|
/** Thrown when the target directory is not a SvelteKit project (CLI maps to exit 2). */
|
|
131
|
-
declare class ProjectError extends Error {
|
|
131
|
+
export declare class ProjectError extends Error {
|
|
132
132
|
constructor(message: string);
|
|
133
133
|
}
|
|
134
134
|
//#endregion
|
|
135
135
|
//#region src/route-matcher.d.ts
|
|
136
|
-
declare function routeMatcher(glob: string | undefined): (route: string) => boolean;
|
|
136
|
+
export declare function routeMatcher(glob: string | undefined): (route: string) => boolean;
|
|
137
137
|
//#endregion
|
|
138
138
|
//#region src/runtime/node.d.ts
|
|
139
139
|
/**
|
|
@@ -141,15 +141,15 @@ declare function routeMatcher(glob: string | undefined): (route: string) => bool
|
|
|
141
141
|
* only place in the static-mode pipeline allowed to touch `node:` APIs; the
|
|
142
142
|
* provider and rules stay runtime-agnostic by going through this interface.
|
|
143
143
|
*/
|
|
144
|
-
declare function createNodeRuntime(): Runtime;
|
|
144
|
+
export declare function createNodeRuntime(): Runtime;
|
|
145
145
|
//#endregion
|
|
146
146
|
//#region src/rules-config.d.ts
|
|
147
147
|
/** Rule ids passed to --rules/--ignore that aren't part of the built-in registry. */
|
|
148
|
-
declare function findUnknownRuleIds(ids: string[]): string[];
|
|
148
|
+
export declare function findUnknownRuleIds(ids: string[]): string[];
|
|
149
149
|
/** All built-in rule ids, sorted — for help and error messages. */
|
|
150
|
-
declare function knownRuleIds(): string[];
|
|
150
|
+
export declare function knownRuleIds(): string[];
|
|
151
151
|
/** The options a rule declares, or undefined when it takes none. */
|
|
152
|
-
declare function ruleOptionsSpec(id: string): RuleOptionsSpec | undefined;
|
|
152
|
+
export declare function ruleOptionsSpec(id: string): RuleOptionsSpec | undefined;
|
|
153
153
|
/**
|
|
154
154
|
* Stamps the rule registry's provenance onto error messages that list known ids.
|
|
155
155
|
* Two copies of svelte-vitals can coexist in one tree (e.g. the Vite plugin's
|
|
@@ -157,10 +157,10 @@ declare function ruleOptionsSpec(id: string): RuleOptionsSpec | undefined;
|
|
|
157
157
|
* a rule that exists in one copy but not the other reads as a mystery rather
|
|
158
158
|
* than a version skew.
|
|
159
159
|
*/
|
|
160
|
-
declare function registryTag(): string;
|
|
160
|
+
export declare function registryTag(): string;
|
|
161
161
|
//#endregion
|
|
162
162
|
//#region src/index.d.ts
|
|
163
|
-
interface RunOptions {
|
|
163
|
+
export interface RunOptions {
|
|
164
164
|
cwd?: string;
|
|
165
165
|
log?: (line: string) => void;
|
|
166
166
|
errorLog?: (line: string) => void;
|
|
@@ -246,14 +246,14 @@ interface RunOptions {
|
|
|
246
246
|
* clutter the log. So gate on `stderrIsTTY` unconditionally, then reuse the color
|
|
247
247
|
* gating (NO_COLOR / --no-color / agent env) with that same TTY value.
|
|
248
248
|
*/
|
|
249
|
-
declare function spinnerEnabled(opts: {
|
|
249
|
+
export declare function spinnerEnabled(opts: {
|
|
250
250
|
reporter: ReporterName;
|
|
251
251
|
rawReporter: ReporterName | undefined;
|
|
252
252
|
stderrIsTTY: boolean;
|
|
253
253
|
env: NodeJS.ProcessEnv;
|
|
254
254
|
noColorFlag?: boolean;
|
|
255
255
|
}): boolean;
|
|
256
|
-
interface AnalyzeOptions {
|
|
256
|
+
export interface AnalyzeOptions {
|
|
257
257
|
cwd?: string;
|
|
258
258
|
metaComponents?: string[];
|
|
259
259
|
treatDynamicAs?: 'pass' | 'warn' | 'fail';
|
|
@@ -306,7 +306,7 @@ interface AnalyzeOptions {
|
|
|
306
306
|
*/
|
|
307
307
|
loadedConfig?: LoadedConfigFile | null;
|
|
308
308
|
}
|
|
309
|
-
interface AnalyzeResult {
|
|
309
|
+
export interface AnalyzeResult {
|
|
310
310
|
results: Result[];
|
|
311
311
|
config: Config;
|
|
312
312
|
version: string;
|
|
@@ -339,8 +339,8 @@ interface AnalyzeResult {
|
|
|
339
339
|
* config file's value is used, otherwise the built-in default (design doc
|
|
340
340
|
* 2026-07-05-config-file-design.md §3).
|
|
341
341
|
*/
|
|
342
|
-
declare function analyzeProject(opts?: AnalyzeOptions): Promise<AnalyzeResult>;
|
|
343
|
-
interface ApplyScopeOptions {
|
|
342
|
+
export declare function analyzeProject(opts?: AnalyzeOptions): Promise<AnalyzeResult>;
|
|
343
|
+
export interface ApplyScopeOptions {
|
|
344
344
|
cwd: string;
|
|
345
345
|
staged?: boolean;
|
|
346
346
|
diffBase?: string;
|
|
@@ -371,11 +371,11 @@ interface ApplyScopeOptions {
|
|
|
371
371
|
* `@svelte-vitals/action` (issue #154) so the git-diff/baseline orchestration
|
|
372
372
|
* lives in exactly one place.
|
|
373
373
|
*/
|
|
374
|
-
declare function applyScope(results: Result[], opts: ApplyScopeOptions): Promise<Result[]>;
|
|
374
|
+
export declare function applyScope(results: Result[], opts: ApplyScopeOptions): Promise<Result[]>;
|
|
375
375
|
/**
|
|
376
376
|
* Run static-mode analysis once and return the process exit code (design §6):
|
|
377
377
|
* 0 = no failing findings, 1 = critical finding present, 2 = execution error.
|
|
378
378
|
*/
|
|
379
|
-
declare function run(opts?: RunOptions): Promise<number>;
|
|
379
|
+
export declare function run(opts?: RunOptions): Promise<number>;
|
|
380
380
|
//#endregion
|
|
381
|
-
export {
|
|
381
|
+
export { type LoadedConfigFile, type ParseCache, defineConfig };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as spinnerEnabled, b as ProjectError, c as findUnknownRuleIds, d as ruleOptionsSpec, i as run, l as knownRuleIds, n as applyScope, o as CONFIG_FILENAMES, r as defineConfig, s as loadConfigFile, t as analyzeProject, u as registryTag, x as createNodeRuntime, y as routeMatcher } from "./src-
|
|
1
|
+
import { a as spinnerEnabled, b as ProjectError, c as findUnknownRuleIds, d as ruleOptionsSpec, i as run, l as knownRuleIds, n as applyScope, o as CONFIG_FILENAMES, r as defineConfig, s as loadConfigFile, t as analyzeProject, u as registryTag, x as createNodeRuntime, y as routeMatcher } from "./src-CNeKZkf0.js";
|
|
2
2
|
export { CONFIG_FILENAMES, ProjectError, analyzeProject, applyScope, createNodeRuntime, defineConfig, findUnknownRuleIds, knownRuleIds, loadConfigFile, registryTag, routeMatcher, ruleOptionsSpec, run, spinnerEnabled };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { _ as hasDep, g as discoverApps, h as readPackageVersion, o as CONFIG_FILENAMES, v as readPkg } from "./src-
|
|
3
|
-
import { a as guardArgs, c as stripUnknownFlags, g as realIO, h as clackPrompts, m as consoleIO, o as splitAtTerminator, p as toList, r as localizedOptionsSection, s as stripAutoVersionLine } from "./analyze-
|
|
4
|
-
import { a as planWorkflowWrite, i as buildWorkflowYaml, n as ACTION_VERSION, r as WORKFLOW_PATH, t as ACTION_SHA } from "./action-pin.generated-
|
|
2
|
+
import { _ as hasDep, g as discoverApps, h as readPackageVersion, o as CONFIG_FILENAMES, v as readPkg } from "./src-CNeKZkf0.js";
|
|
3
|
+
import { a as guardArgs, c as stripUnknownFlags, g as realIO, h as clackPrompts, m as consoleIO, o as splitAtTerminator, p as toList, r as localizedOptionsSection, s as stripAutoVersionLine } from "./analyze-B1DhJ_wC.js";
|
|
4
|
+
import { a as planWorkflowWrite, i as buildWorkflowYaml, n as ACTION_VERSION, r as WORKFLOW_PATH, t as ACTION_SHA } from "./action-pin.generated-BkwgIAMh.js";
|
|
5
5
|
import { buildCursorRules, installHeader } from "./install/skill-content.js";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { parseArgs } from "node:util";
|
|
@@ -572,17 +572,19 @@ async function runInstall(flags, io, prompts, version = "0.0.0") {
|
|
|
572
572
|
if (apps.length === 1) {
|
|
573
573
|
io.errorLog(`svelte-vitals: detected SvelteKit app at ${apps[0]}; targeting it for the Vite/config targets.`);
|
|
574
574
|
appDir = join(io.cwd, apps[0]);
|
|
575
|
-
} else if (apps.length > 1)
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
575
|
+
} else if (apps.length > 1) {
|
|
576
|
+
if (io.isTTY) {
|
|
577
|
+
const picked = await prompts.selectApp(apps);
|
|
578
|
+
if (picked === null) {
|
|
579
|
+
io.log("Cancelled.");
|
|
580
|
+
return 0;
|
|
581
|
+
}
|
|
582
|
+
appDir = join(io.cwd, picked);
|
|
583
|
+
} else {
|
|
584
|
+
io.errorLog(`svelte-vitals: multiple SvelteKit apps found: ${apps.join(", ")}.`);
|
|
585
|
+
io.errorLog(`svelte-vitals: pass one with --app, e.g. \`svelte-vitals install --app ${apps[0]}\`.`);
|
|
586
|
+
return 2;
|
|
580
587
|
}
|
|
581
|
-
appDir = join(io.cwd, picked);
|
|
582
|
-
} else {
|
|
583
|
-
io.errorLog(`svelte-vitals: multiple SvelteKit apps found: ${apps.join(", ")}.`);
|
|
584
|
-
io.errorLog(`svelte-vitals: pass one with --app, e.g. \`svelte-vitals install --app ${apps[0]}\`.`);
|
|
585
|
-
return 2;
|
|
586
588
|
}
|
|
587
589
|
}
|
|
588
590
|
}
|
|
@@ -1383,8 +1383,10 @@ async function resolveRoute(rt, cwd, pageRel, config, layouts, cache, aliases, a
|
|
|
1383
1383
|
if (tag.kind === "jsonld" || tag.kind === "script" || tag.kind === "link" && tag.rel !== "canonical") additiveTags.push(stamped);
|
|
1384
1384
|
else composed.set(tagKey(tag), stamped);
|
|
1385
1385
|
}
|
|
1386
|
-
if (resolved.broad)
|
|
1387
|
-
|
|
1386
|
+
if (resolved.broad) {
|
|
1387
|
+
if (isPage) broadOwn = true;
|
|
1388
|
+
else broadInherited = true;
|
|
1389
|
+
}
|
|
1388
1390
|
componentHeadings.push(...resolved.headings);
|
|
1389
1391
|
}
|
|
1390
1392
|
if (broadOwn || broadInherited) {
|
|
@@ -2553,12 +2555,18 @@ function validateConfigFile(raw, path) {
|
|
|
2553
2555
|
const warnings = [];
|
|
2554
2556
|
const config = {};
|
|
2555
2557
|
for (const key of Object.keys(raw)) if (!KNOWN_TOP_LEVEL_KEYS.has(key)) warnings.push(`${path}: unknown config key '${key}' ignored.`);
|
|
2556
|
-
if (raw.treatDynamicAs !== void 0)
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
if (raw.
|
|
2561
|
-
|
|
2558
|
+
if (raw.treatDynamicAs !== void 0) {
|
|
2559
|
+
if (TREAT_DYNAMIC_AS_VALUES.includes(raw.treatDynamicAs)) config.treatDynamicAs = raw.treatDynamicAs;
|
|
2560
|
+
else warnings.push(`${path}: unknown treatDynamicAs '${String(raw.treatDynamicAs)}'; expected pass|warn|fail. Ignoring.`);
|
|
2561
|
+
}
|
|
2562
|
+
if (raw.failOn !== void 0) {
|
|
2563
|
+
if (FAIL_ON_VALUES.includes(raw.failOn)) config.failOn = raw.failOn;
|
|
2564
|
+
else warnings.push(`${path}: unknown failOn '${String(raw.failOn)}'; expected critical|warning|info. Ignoring.`);
|
|
2565
|
+
}
|
|
2566
|
+
if (raw.metaComponents !== void 0) {
|
|
2567
|
+
if (Array.isArray(raw.metaComponents) && raw.metaComponents.every((c) => typeof c === "string")) config.metaComponents = raw.metaComponents;
|
|
2568
|
+
else warnings.push(`${path}: metaComponents must be an array of strings. Ignoring.`);
|
|
2569
|
+
}
|
|
2562
2570
|
if (raw.rules !== void 0) {
|
|
2563
2571
|
if (!isPlainObject(raw.rules)) throw new Error(`${path}: rules must be an object of rule-id → setting.`);
|
|
2564
2572
|
const rules = raw.rules;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-vitals",
|
|
3
|
-
"version": "0.54.
|
|
3
|
+
"version": "0.54.6",
|
|
4
4
|
"description": "A deterministic SvelteKit code-health scanner (SEO, performance, correctness, security, architecture, accessibility).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,19 +43,19 @@
|
|
|
43
43
|
"dist"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@svelte-vitals/core": "0.
|
|
47
|
-
"@clack/prompts": "^1.
|
|
48
|
-
"@gunshi/plugin-completion": "0.37.
|
|
49
|
-
"@gunshi/plugin-i18n": "0.37.
|
|
50
|
-
"@gunshi/plugin-suggestion": "0.37.
|
|
51
|
-
"gunshi": "0.37.
|
|
46
|
+
"@svelte-vitals/core": "0.54.6",
|
|
47
|
+
"@clack/prompts": "^1.8.0",
|
|
48
|
+
"@gunshi/plugin-completion": "0.37.2",
|
|
49
|
+
"@gunshi/plugin-i18n": "0.37.2",
|
|
50
|
+
"@gunshi/plugin-suggestion": "0.37.2",
|
|
51
|
+
"gunshi": "0.37.2",
|
|
52
52
|
"magicast": "^0.5.4",
|
|
53
53
|
"svelte": "^5.57.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@gunshi/docs": "0.37.
|
|
56
|
+
"@gunshi/docs": "0.37.2",
|
|
57
57
|
"@types/estree": "^1.0.9",
|
|
58
|
-
"@types/node": "^24.13.
|
|
58
|
+
"@types/node": "^24.13.4"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"build": "tsdown",
|