@remylagerweij/vue-doctor 2.1.0 → 2.1.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/{baseline-BgcqUbRB.js → baseline-ByBx3bYL.js} +1 -1
- package/dist/{baseline-zPvaJyGF.js → baseline-D4b_oHcn.js} +1 -1
- package/dist/cli.js +21 -21
- package/dist/diagnose-BQSITykQ.js +2 -0
- package/dist/{diagnose-B3lL2Qo2.js → diagnose-CGX29sNK.js} +10 -10
- package/dist/{discover-project-B1uzc9aU.js → discover-project-DMMPWHNA.js} +2 -2
- package/dist/{discover-project-Cj2k7pUX.js → discover-project-DNVbj-s4.js} +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.js +2 -2
- package/dist/{rule-options-dyUSlzk0.js → rule-options-Ds-ve1sd.js} +1 -1
- package/dist/{rules-CkC009c7.js → rules-ByJZ3lPi.js} +3 -3
- package/dist/{runner-DqcMoZQY.js → runner-D4J2cNvQ.js} +1 -1
- package/dist/{server-KeUQYFzs.js → server-HMZ4QLjd.js} +5 -5
- package/dist/{validate-rule-options-CntwdX24.js → validate-rule-options-DHqjaoYW.js} +1 -1
- package/package.json +10 -10
- package/dist/diagnose-9mGhh_uH.js +0 -2
- package/dist/{list-source-files-Uf11_Lde.js → list-source-files-D68XBABM.js} +1 -1
- package/dist/{model-FBOYc7PC.js → model-eTvTct_Z.js} +1 -1
- package/dist/{rule-ids-BrYqJT7o.js → rule-ids-5pSuv8lc.js} +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { r as ruleIdOf } from "./rule-ids-BrYqJT7o.js";
|
|
3
2
|
import fs from "node:fs";
|
|
3
|
+
import { r as ruleIdOf } from "./rule-ids-5pSuv8lc.js";
|
|
4
4
|
// src/core/baseline.ts
|
|
5
5
|
const DEFAULT_BASELINE_FILENAME = ".vue-doctor-baseline.json";
|
|
6
6
|
const BASELINE_VERSION = 1;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export { i as createBaseline, o as writeBaseline } from "./baseline-
|
|
2
|
+
export { i as createBaseline, o as writeBaseline } from "./baseline-ByBx3bYL.js";
|
package/dist/cli.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as logger, c as getToolVersions, d as loadConfig, i as configureLogger, l as mapWithConcurrency, n as diagnose, o as output, r as createKnipSession, s as highlighter, t as NoVueDependencyError, u as createPrivateTempDirectory } from "./diagnose-B3lL2Qo2.js";
|
|
3
|
-
import { f as getCanonicalRuleId, m as getRuleMeta, o as PLUGIN_NAME, r as ruleIdOf, s as RULE_REGISTRY } from "./rule-ids-BrYqJT7o.js";
|
|
4
|
-
import { i as createBaseline, n as DEFAULT_BASELINE_FILENAME, o as writeBaseline } from "./baseline-BgcqUbRB.js";
|
|
5
|
-
import { n as isMonorepoRoot } from "./find-monorepo-root-VE6uVqvK.js";
|
|
6
|
-
import { a as getRootPackage, b as VERSION$1, g as MILLISECONDS_PER_SECOND, i as formatFrameworkName, n as discoverProject, r as discoverVueSubprojects, u as listWorkspacePackages } from "./discover-project-B1uzc9aU.js";
|
|
7
|
-
import { a as filterSourceFiles, c as EXIT_CODES, d as evaluateGate, l as FAIL_ON_VALUES, n as registerExplainCommand, o as getDiffInfo, r as registerRulesCommand, s as docsUrl, u as GATE_SCOPE_VALUES } from "./rules-CkC009c7.js";
|
|
8
|
-
import { n as REPORT_SCHEMA_URL, t as REPORT_FORMAT } from "./constants-Cav5tPU4.js";
|
|
9
2
|
import fs from "node:fs";
|
|
10
3
|
import path from "node:path";
|
|
11
4
|
import { Command, CommanderError, InvalidArgumentError, Option } from "commander";
|
|
12
|
-
import {
|
|
5
|
+
import { a as logger, c as getToolVersions, d as loadConfig, i as configureLogger, l as mapWithConcurrency, n as diagnose, o as output, r as createKnipSession, s as highlighter, t as NoVueDependencyError, u as createPrivateTempDirectory } from "./diagnose-CGX29sNK.js";
|
|
6
|
+
import { i as createBaseline, n as DEFAULT_BASELINE_FILENAME, o as writeBaseline } from "./baseline-ByBx3bYL.js";
|
|
7
|
+
import { a as filterSourceFiles, c as EXIT_CODES, d as evaluateGate, l as FAIL_ON_VALUES, n as registerExplainCommand, o as getDiffInfo, r as registerRulesCommand, s as docsUrl, u as GATE_SCOPE_VALUES } from "./rules-ByJZ3lPi.js";
|
|
8
|
+
import { a as getRootPackage, b as VERSION$1, g as MILLISECONDS_PER_SECOND, i as formatFrameworkName, n as discoverProject, r as discoverVueSubprojects, u as listWorkspacePackages } from "./discover-project-DMMPWHNA.js";
|
|
9
|
+
import { n as isMonorepoRoot } from "./find-monorepo-root-VE6uVqvK.js";
|
|
10
|
+
import { f as getCanonicalRuleId, m as getRuleMeta, o as PLUGIN_NAME, r as ruleIdOf, s as RULE_REGISTRY } from "./rule-ids-5pSuv8lc.js";
|
|
11
|
+
import { n as REPORT_SCHEMA_URL, t as REPORT_FORMAT } from "./constants-Cav5tPU4.js";
|
|
13
12
|
import { createHash } from "node:crypto";
|
|
13
|
+
import { gzipSync } from "node:zlib";
|
|
14
|
+
import { pathToFileURL } from "node:url";
|
|
14
15
|
import { availableParallelism } from "node:os";
|
|
15
|
-
import { execFile, spawnSync } from "node:child_process";
|
|
16
16
|
import pc from "picocolors";
|
|
17
|
-
import {
|
|
17
|
+
import { execFile, spawnSync } from "node:child_process";
|
|
18
18
|
import { promisify } from "node:util";
|
|
19
19
|
// src/utils/handle-error.ts
|
|
20
20
|
/** Reports an error that prevented Vue Doctor from running and exits with the usage-error code. */
|
|
@@ -1485,7 +1485,7 @@ const SARIF_FINGERPRINT_KEY = "vueDoctor/v1";
|
|
|
1485
1485
|
/** GitHub rejects runs with more results than this. */
|
|
1486
1486
|
const SARIF_MAX_RESULTS_PER_RUN = 25e3;
|
|
1487
1487
|
/** GitHub rejects gzip-compressed uploads larger than this. */
|
|
1488
|
-
const SARIF_MAX_GZIP_BYTES =
|
|
1488
|
+
const SARIF_MAX_GZIP_BYTES = 0xa00000;
|
|
1489
1489
|
/**
|
|
1490
1490
|
* `security-severity` (CVSS-like 0-10 string; GitHub: >=9 critical, 7-8.9 high, 4-6.9 medium, <4 low)
|
|
1491
1491
|
* derived from the rule's default severity and its confidence.
|
|
@@ -1666,7 +1666,7 @@ const withSourceRootPrefix = (report, prefix) => {
|
|
|
1666
1666
|
const formatSarif = (inputReport, options = {}) => {
|
|
1667
1667
|
const report = withSourceRootPrefix(inputReport, options.sourceRootPrefix ?? "");
|
|
1668
1668
|
const warn = options.warn ?? (() => {});
|
|
1669
|
-
const maxGzipBytes = options.maxGzipBytes ??
|
|
1669
|
+
const maxGzipBytes = options.maxGzipBytes ?? 0xa00000;
|
|
1670
1670
|
let limit = Math.min(options.maxResultsPerRun ?? 25e3, SARIF_MAX_RESULTS_PER_RUN);
|
|
1671
1671
|
let text = `${JSON.stringify(buildSarif(report, limit, warn), null, 2)}\n`;
|
|
1672
1672
|
while (gzipSync(text).length > maxGzipBytes && limit > 1) {
|
|
@@ -1866,8 +1866,8 @@ const createBatchProgressReporter = async (options) => {
|
|
|
1866
1866
|
// src/scan.ts
|
|
1867
1867
|
const printProjectDetection = (projectInfo, isDiffMode, includePaths) => {
|
|
1868
1868
|
const lines = [];
|
|
1869
|
-
const title = `${pc.bold(pc.green("Vue Doctor"))} ${pc.dim("v2.1.
|
|
1870
|
-
lines.push(createFramedLine(`Vue Doctor v2.1.
|
|
1869
|
+
const title = `${pc.bold(pc.green("Vue Doctor"))} ${pc.dim("v2.1.1")}`;
|
|
1870
|
+
lines.push(createFramedLine(`Vue Doctor v2.1.1`, title));
|
|
1871
1871
|
const vueVersionDisplay = projectInfo.vueVersion ? `Vue ${projectInfo.vueVersion}` : "Vue";
|
|
1872
1872
|
const frameworkDisplay = formatFrameworkName(projectInfo.framework);
|
|
1873
1873
|
const projectLine = `${projectInfo.projectName} · ${frameworkDisplay} · ${vueVersionDisplay}`;
|
|
@@ -2813,7 +2813,7 @@ const registerCiCommand = (program) => {
|
|
|
2813
2813
|
const reportPath = path.resolve(options.reportJson ?? "vue-doctor.json");
|
|
2814
2814
|
if (!fs.existsSync(reportPath)) throw new Error(`Report file not found: ${reportPath}`);
|
|
2815
2815
|
const raw = JSON.parse(fs.readFileSync(reportPath, "utf8"));
|
|
2816
|
-
const { reportSchema } = await import("./model-
|
|
2816
|
+
const { reportSchema } = await import("./model-eTvTct_Z.js");
|
|
2817
2817
|
const report = reportSchema.parse(raw);
|
|
2818
2818
|
const token = options.githubToken ?? process.env.GITHUB_TOKEN;
|
|
2819
2819
|
const repoFullName = process.env.GITHUB_REPOSITORY;
|
|
@@ -3125,7 +3125,7 @@ const registerInitCommand = (program) => {
|
|
|
3125
3125
|
const projectDir = path.resolve(directoryArg);
|
|
3126
3126
|
const isInteractive = Boolean(process.stdin.isTTY) && !options.yes;
|
|
3127
3127
|
const clack = isInteractive ? await import("@clack/prompts") : null;
|
|
3128
|
-
const { discoverProject, formatFrameworkName } = await import("./discover-project-
|
|
3128
|
+
const { discoverProject, formatFrameworkName } = await import("./discover-project-DNVbj-s4.js");
|
|
3129
3129
|
const { isMonorepoRoot } = await import("./find-monorepo-root-Cqb6bdkf.js");
|
|
3130
3130
|
const projectInfo = discoverProject(projectDir);
|
|
3131
3131
|
if (isInteractive && clack) {
|
|
@@ -3312,8 +3312,8 @@ const registerInitCommand = (program) => {
|
|
|
3312
3312
|
if (spinner) spinner.start("Scanning project to record baseline snapshot...");
|
|
3313
3313
|
else logger.log("Scanning project to record baseline snapshot...");
|
|
3314
3314
|
try {
|
|
3315
|
-
const { diagnose } = await import("./diagnose-
|
|
3316
|
-
const { createBaseline, writeBaseline } = await import("./baseline-
|
|
3315
|
+
const { diagnose } = await import("./diagnose-BQSITykQ.js");
|
|
3316
|
+
const { createBaseline, writeBaseline } = await import("./baseline-D4b_oHcn.js");
|
|
3317
3317
|
const baselineData = createBaseline((await diagnose(projectDir, { baseline: null })).diagnostics);
|
|
3318
3318
|
writeBaseline(path.join(projectDir, baselineFileName), baselineData);
|
|
3319
3319
|
const countMsg = `${baselineData.findings.length} finding${baselineData.findings.length === 1 ? "" : "s"}`;
|
|
@@ -3331,12 +3331,12 @@ const registerInitCommand = (program) => {
|
|
|
3331
3331
|
// src/commands/mcp.ts
|
|
3332
3332
|
const registerMcpCommand = (program) => {
|
|
3333
3333
|
program.command("mcp").description("Start Model Context Protocol (MCP) server over stdio for AI agents").action(async () => {
|
|
3334
|
-
const { McpServer } = await import("./server-
|
|
3334
|
+
const { McpServer } = await import("./server-HMZ4QLjd.js");
|
|
3335
3335
|
new McpServer().startStdio();
|
|
3336
3336
|
});
|
|
3337
3337
|
};
|
|
3338
3338
|
// src/program.ts
|
|
3339
|
-
const VERSION = "2.1.
|
|
3339
|
+
const VERSION = "2.1.1";
|
|
3340
3340
|
const parseScore = (value) => {
|
|
3341
3341
|
const score = Number(value);
|
|
3342
3342
|
if (!Number.isInteger(score) || score < 0 || score > 100) throw new InvalidArgumentError("Expected an integer between 0 and 100.");
|
|
@@ -3390,7 +3390,7 @@ const createProgram = () => {
|
|
|
3390
3390
|
const legacyHtmlReport = options.report === true;
|
|
3391
3391
|
if (legacyHtmlReport) logger.warn("--report is deprecated and will be removed in a future release; use --format html --output <file>.");
|
|
3392
3392
|
if (options.fix) {
|
|
3393
|
-
const { runFixes } = await import("./runner-
|
|
3393
|
+
const { runFixes } = await import("./runner-D4J2cNvQ.js");
|
|
3394
3394
|
for (const projectDirectory of projectDirectories) {
|
|
3395
3395
|
const fixReport = runFixes(projectDirectory, { dryRun: options.dryRun });
|
|
3396
3396
|
if (options.dryRun) {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { _ as CUSTOM_TEMPLATE_PLUGIN_NAME, a as OXLINT_RULES, b as isTestFile, d as createTemplateRuleConfig, f as getCanonicalRuleId, g as SCRIPT_DEPENDENT_TEMPLATE_RULES, h as toDiagnosticRule, i as AUDIT_RULES, l as createCustomTemplateRuleConfig, m as getRuleMeta, n as resolveRuleKey, o as PLUGIN_NAME, p as getEnabledFsRules, r as ruleIdOf, t as createRuleIdReporter, u as createOxlintConfig, v as CUSTOM_TEMPLATE_RULES, y as COOKIE_SESSION_FUNCTIONS } from "./rule-ids-BrYqJT7o.js";
|
|
3
|
-
import { a as readBaseline, r as applyBaseline } from "./baseline-BgcqUbRB.js";
|
|
4
|
-
import { i as normalizeRelativePath, n as isInsideAnyDirectory, r as listProjectSourceFiles, t as LINTABLE_FILE_PATTERN } from "./list-source-files-Uf11_Lde.js";
|
|
5
|
-
import { n as isMonorepoRoot, r as readPackageJson, t as findMonorepoRoot } from "./find-monorepo-root-VE6uVqvK.js";
|
|
6
|
-
import { S as WARNING_RULE_PENALTY, _ as OXLINT_NODE_REQUIREMENT, c as listNestedWorkspaceDirectories, d as resolveTsconfigPath, f as resolvePnpmCatalogVersion, h as ERROR_RULE_PENALTY, l as listWorkspaceDirectories, n as discoverProject, s as inferVueVersionFromNuxt, t as NUXT_CONFIG_FILENAMES, u as listWorkspacePackages, x as VUE_FILE_PATTERN } from "./discover-project-B1uzc9aU.js";
|
|
7
|
-
import { r as resolveConfiguredRuleOptions, t as mergeRuleOptions } from "./rule-options-dyUSlzk0.js";
|
|
8
|
-
import Module, { createRequire } from "node:module";
|
|
9
|
-
import fs from "node:fs";
|
|
10
2
|
import path from "node:path";
|
|
11
|
-
import { fileURLToPath } from "node:url";
|
|
12
3
|
import { performance } from "node:perf_hooks";
|
|
4
|
+
import fs from "node:fs";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
import { a as readBaseline, r as applyBaseline } from "./baseline-ByBx3bYL.js";
|
|
13
7
|
import { createHash } from "node:crypto";
|
|
14
8
|
import os from "node:os";
|
|
9
|
+
import { i as normalizeRelativePath, n as isInsideAnyDirectory, r as listProjectSourceFiles, t as LINTABLE_FILE_PATTERN } from "./list-source-files-D68XBABM.js";
|
|
10
|
+
import { _ as CUSTOM_TEMPLATE_PLUGIN_NAME, a as OXLINT_RULES, b as isTestFile, d as createTemplateRuleConfig, f as getCanonicalRuleId, g as SCRIPT_DEPENDENT_TEMPLATE_RULES, h as toDiagnosticRule, i as AUDIT_RULES, l as createCustomTemplateRuleConfig, m as getRuleMeta, n as resolveRuleKey, o as PLUGIN_NAME, p as getEnabledFsRules, r as ruleIdOf, t as createRuleIdReporter, u as createOxlintConfig, v as CUSTOM_TEMPLATE_RULES, y as COOKIE_SESSION_FUNCTIONS } from "./rule-ids-5pSuv8lc.js";
|
|
11
|
+
import { n as isMonorepoRoot, r as readPackageJson, t as findMonorepoRoot } from "./find-monorepo-root-VE6uVqvK.js";
|
|
12
|
+
import { S as WARNING_RULE_PENALTY, _ as OXLINT_NODE_REQUIREMENT, c as listNestedWorkspaceDirectories, d as resolveTsconfigPath, f as resolvePnpmCatalogVersion, h as ERROR_RULE_PENALTY, l as listWorkspaceDirectories, n as discoverProject, s as inferVueVersionFromNuxt, t as NUXT_CONFIG_FILENAMES, u as listWorkspacePackages, x as VUE_FILE_PATTERN } from "./discover-project-DMMPWHNA.js";
|
|
13
|
+
import Module, { createRequire } from "node:module";
|
|
15
14
|
import { spawn, spawnSync } from "node:child_process";
|
|
16
15
|
import pc from "picocolors";
|
|
16
|
+
import { r as resolveConfiguredRuleOptions, t as mergeRuleOptions } from "./rule-options-Ds-ve1sd.js";
|
|
17
17
|
// src/config/load-config.ts
|
|
18
18
|
/** Looked up in the project root only, in this order. More than one is an error. */
|
|
19
19
|
const CONFIG_FILENAMES$1 = [
|
|
@@ -59,7 +59,7 @@ const validateConfig = async (value, filePath) => {
|
|
|
59
59
|
if (!result.success) throw new ConfigError(filePath, result.error.issues.flatMap(formatIssue));
|
|
60
60
|
const config = value;
|
|
61
61
|
if (Object.values(config.rules ?? {}).some((entry) => Array.isArray(entry) && entry.length === 2)) {
|
|
62
|
-
const { validateRuleOptions } = await import("./validate-rule-options-
|
|
62
|
+
const { validateRuleOptions } = await import("./validate-rule-options-DHqjaoYW.js");
|
|
63
63
|
const issues = validateRuleOptions(config);
|
|
64
64
|
if (issues.length > 0) throw new ConfigError(filePath, issues);
|
|
65
65
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as isMonorepoRoot, r as readPackageJson, t as findMonorepoRoot } from "./find-monorepo-root-VE6uVqvK.js";
|
|
3
2
|
import fs from "node:fs";
|
|
4
3
|
import path from "node:path";
|
|
5
4
|
import { spawnSync } from "node:child_process";
|
|
5
|
+
import { n as isMonorepoRoot, r as readPackageJson, t as findMonorepoRoot } from "./find-monorepo-root-VE6uVqvK.js";
|
|
6
6
|
// src/constants.ts
|
|
7
7
|
const DOCS_BASE_URL = "https://remylagerweij.github.io/vue-doctor";
|
|
8
8
|
const SOURCE_FILE_PATTERN = /\.(vue|tsx?|jsx?|mjs|cjs)$/;
|
|
@@ -13,7 +13,7 @@ const SPAWN_ARGS_MAX_LENGTH_CHARS = 24e3;
|
|
|
13
13
|
const DEFAULT_BRANCH_CANDIDATES = ["main", "master"];
|
|
14
14
|
const ERROR_RULE_PENALTY = 1.5;
|
|
15
15
|
const WARNING_RULE_PENALTY = .75;
|
|
16
|
-
const VERSION = "2.1.
|
|
16
|
+
const VERSION = "2.1.1";
|
|
17
17
|
const OXLINT_NODE_REQUIREMENT = "^22.12.0 || >=24.0.0";
|
|
18
18
|
// src/utils/pnpm-catalog.ts
|
|
19
19
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export { n as discoverProject, i as formatFrameworkName } from "./discover-project-
|
|
2
|
+
export { n as discoverProject, i as formatFrameworkName } from "./discover-project-DMMPWHNA.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public programmatic API of Vue Doctor.
|
|
3
|
+
*
|
|
4
|
+
* Importing this module has no side effects: it never parses argv, prints, or exits.
|
|
5
|
+
* The CLI (`vue-doctor` bin) is a thin layer on top of `diagnose()`.
|
|
6
|
+
*/
|
|
1
7
|
import { z } from "zod";
|
|
2
8
|
/**
|
|
3
9
|
* Single source of truth for `vue-doctor.config.*`: the TypeScript types, runtime validation and the
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { S as isTestFile, _ as toDiagnosticRule, a as createRuleIdReporter, b as CUSTOM_TEMPLATE_RULES, c as AUDIT_RULES, d as createCustomTemplateRuleConfig, f as createOxlintConfig, g as getRuleMeta, h as getEnabledFsRules, l as OXLINT_RULES, m as getCanonicalRuleId, o as resolveRuleKey, p as createTemplateRuleConfig, r as resolveConfiguredRuleOptions, s as ruleIdOf, t as mergeRuleOptions, u as PLUGIN_NAME, v as SCRIPT_DEPENDENT_TEMPLATE_RULES, x as COOKIE_SESSION_FUNCTIONS, y as CUSTOM_TEMPLATE_PLUGIN_NAME } from "./rule-options-DKLnjGap.js";
|
|
2
|
-
import Module, { createRequire } from "node:module";
|
|
3
1
|
import path from "node:path";
|
|
4
2
|
import { performance } from "node:perf_hooks";
|
|
5
3
|
import fs from "node:fs";
|
|
6
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { S as isTestFile, _ as toDiagnosticRule, a as createRuleIdReporter, b as CUSTOM_TEMPLATE_RULES, c as AUDIT_RULES, d as createCustomTemplateRuleConfig, f as createOxlintConfig, g as getRuleMeta, h as getEnabledFsRules, l as OXLINT_RULES, m as getCanonicalRuleId, o as resolveRuleKey, p as createTemplateRuleConfig, r as resolveConfiguredRuleOptions, s as ruleIdOf, t as mergeRuleOptions, u as PLUGIN_NAME, v as SCRIPT_DEPENDENT_TEMPLATE_RULES, x as COOKIE_SESSION_FUNCTIONS, y as CUSTOM_TEMPLATE_PLUGIN_NAME } from "./rule-options-DKLnjGap.js";
|
|
7
6
|
import { createHash } from "node:crypto";
|
|
8
7
|
import os from "node:os";
|
|
9
8
|
import { spawn, spawnSync } from "node:child_process";
|
|
9
|
+
import Module, { createRequire } from "node:module";
|
|
10
10
|
import pc from "picocolors";
|
|
11
11
|
// src/config/load-config.ts
|
|
12
12
|
/** Looked up in the project root only, in this order. More than one is an error. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as OXLINT_RULES, f as getCanonicalRuleId, n as resolveRuleKey } from "./rule-ids-
|
|
2
|
+
import { a as OXLINT_RULES, f as getCanonicalRuleId, n as resolveRuleKey } from "./rule-ids-5pSuv8lc.js";
|
|
3
3
|
// src/config/rule-options.ts
|
|
4
4
|
/** `[severity, { ... }]` entries with a non-empty options object. */
|
|
5
5
|
const optionEntries = (config) => Object.entries(config?.rules ?? {}).flatMap(([key, entry]) => Array.isArray(entry) && entry.length === 2 && Object.keys(entry[1]).length > 0 ? [[key, entry[1]]] : []);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as logger } from "./diagnose-
|
|
3
|
-
import { c as categorySlug, f as getCanonicalRuleId, s as RULE_REGISTRY } from "./rule-ids-
|
|
4
|
-
import { m as DOCS_BASE_URL, p as DEFAULT_BRANCH_CANDIDATES, v as SOURCE_FILE_PATTERN } from "./discover-project-
|
|
2
|
+
import { a as logger } from "./diagnose-CGX29sNK.js";
|
|
3
|
+
import { c as categorySlug, f as getCanonicalRuleId, s as RULE_REGISTRY } from "./rule-ids-5pSuv8lc.js";
|
|
4
|
+
import { m as DOCS_BASE_URL, p as DEFAULT_BRANCH_CANDIDATES, v as SOURCE_FILE_PATTERN } from "./discover-project-DMMPWHNA.js";
|
|
5
5
|
import fs from "node:fs";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { spawnSync } from "node:child_process";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { r as listProjectSourceFiles } from "./list-source-files-Uf11_Lde.js";
|
|
3
2
|
import fs from "node:fs";
|
|
4
3
|
import path from "node:path";
|
|
4
|
+
import { r as listProjectSourceFiles } from "./list-source-files-D68XBABM.js";
|
|
5
5
|
// src/fix/codemods.ts
|
|
6
6
|
/**
|
|
7
7
|
* Codemod 1: Lodash per-method imports.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as diagnose } from "./diagnose-B3lL2Qo2.js";
|
|
3
|
-
import { f as getCanonicalRuleId, s as RULE_REGISTRY } from "./rule-ids-BrYqJT7o.js";
|
|
4
|
-
import { b as VERSION } from "./discover-project-B1uzc9aU.js";
|
|
5
|
-
import { a as filterSourceFiles, i as toRuleInfo, o as getDiffInfo, t as findRuleMeta } from "./rules-CkC009c7.js";
|
|
6
|
-
import path from "node:path";
|
|
7
2
|
import readline from "node:readline";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { n as diagnose } from "./diagnose-CGX29sNK.js";
|
|
5
|
+
import { f as getCanonicalRuleId, s as RULE_REGISTRY } from "./rule-ids-5pSuv8lc.js";
|
|
6
|
+
import { a as filterSourceFiles, i as toRuleInfo, o as getDiffInfo, t as findRuleMeta } from "./rules-ByJZ3lPi.js";
|
|
7
|
+
import { b as VERSION } from "./discover-project-DMMPWHNA.js";
|
|
8
8
|
// src/mcp/server.ts
|
|
9
9
|
const TOOLS = [
|
|
10
10
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as rulesForKey, n as optionEntries } from "./rule-options-
|
|
2
|
+
import { i as rulesForKey, n as optionEntries } from "./rule-options-Ds-ve1sd.js";
|
|
3
3
|
// src/config/validate-rule-options.ts
|
|
4
4
|
const matchesType = (schema, value) => {
|
|
5
5
|
if (schema.type === "array") return Array.isArray(value) && value.every((item) => typeof item === "string");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remylagerweij/vue-doctor",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Production-grade diagnostics, performance optimization, security auditing, and dead-code detection for Vue.js and Nuxt applications. Features automated codemods, CI quality gates, and AI agent integration (MCP).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
@@ -96,26 +96,26 @@
|
|
|
96
96
|
"schema:update": "vitest run tests/config.test.ts tests/report.test.ts -u"
|
|
97
97
|
},
|
|
98
98
|
"dependencies": {
|
|
99
|
-
"@clack/prompts": "^1.
|
|
100
|
-
"@typescript-eslint/parser": "^8.
|
|
101
|
-
"commander": "^15.
|
|
102
|
-
"eslint": "^10.
|
|
103
|
-
"eslint-plugin-vue": "^10.12.
|
|
99
|
+
"@clack/prompts": "^1.9.0",
|
|
100
|
+
"@typescript-eslint/parser": "^8.73.0",
|
|
101
|
+
"commander": "^15.1.0",
|
|
102
|
+
"eslint": "^10.15.0",
|
|
103
|
+
"eslint-plugin-vue": "^10.12.1",
|
|
104
104
|
"espree": "^11.2.0",
|
|
105
105
|
"jiti": "^2.7.0",
|
|
106
|
-
"knip": "^6.
|
|
106
|
+
"knip": "^6.46.0",
|
|
107
107
|
"oxlint": "1.86.0",
|
|
108
108
|
"picocolors": "^1.1.1",
|
|
109
109
|
"typescript": "~6.0.3",
|
|
110
|
-
"vue-eslint-parser": "^10.4.
|
|
110
|
+
"vue-eslint-parser": "^10.4.2",
|
|
111
111
|
"zod": "^4.6.7"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
|
-
"@vitest/coverage-v8": "^5.
|
|
114
|
+
"@vitest/coverage-v8": "^5.1.1",
|
|
115
115
|
"ajv": "^8.20.0",
|
|
116
116
|
"ajv-formats": "^3.0.1",
|
|
117
117
|
"happy-dom": "^21.0.4",
|
|
118
|
-
"tsdown": "^0.23.
|
|
118
|
+
"tsdown": "^0.23.7"
|
|
119
119
|
},
|
|
120
120
|
"main": "./dist/index.js",
|
|
121
121
|
"types": "./dist/index.d.ts"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { spawnSync } from "node:child_process";
|
|
2
3
|
import fs from "node:fs";
|
|
3
4
|
import path from "node:path";
|
|
4
|
-
import { spawnSync } from "node:child_process";
|
|
5
5
|
// src/utils/list-source-files.ts
|
|
6
6
|
/** Files the analyzers lint: Vue SFCs and JS/TS modules. */
|
|
7
7
|
const LINTABLE_FILE_PATTERN = /\.(vue|[cm]?[jt]sx?)$/;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as REPORT_FORMAT } from "./constants-Cav5tPU4.js";
|
|
3
2
|
import { z } from "zod";
|
|
3
|
+
import { t as REPORT_FORMAT } from "./constants-Cav5tPU4.js";
|
|
4
4
|
// src/report/model.ts
|
|
5
5
|
/**
|
|
6
6
|
* Single source of truth for the machine-readable report (`vue-doctor/report@2`): the TypeScript
|