react-doctor 0.9.4-dev.da0647e → 0.9.5
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 +0 -1
- package/dist/cli.js +60 -166
- package/dist/{exit-gracefully-BN2OivAV.js → exit-gracefully-B18ck0kt.js} +384 -1015
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/lsp.js +5 -5
- package/dist/{run-scan-app-_1xMQtKK.js → run-scan-app-CjGdpTbP.js} +127 -45
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -13,7 +13,6 @@ React Doctor deterministically scans your codebase and finds issues across state
|
|
|
13
13
|
|
|
14
14
|
Works across React frameworks and React-enabled sites - Next.js, Vite, Astro, TanStack, React Native, Expo, you name it.
|
|
15
15
|
|
|
16
|
-
Scans JavaScript, TypeScript, and Astro source files plus JavaScript in standard inline `<script>` blocks in `.html` files.
|
|
17
16
|
|
|
18
17
|
[Website →](https://react.doctor/docs)
|
|
19
18
|
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ee33417e-c94f-5f10-ac59-9d4e202b7c9f")}catch(e){}}();
|
|
3
3
|
import { n as __require, r as __toESM, t as __commonJSMin } from "./chunk-q7NCDQ7-.js";
|
|
4
|
-
import { $ as
|
|
4
|
+
import { $ as filterDiagnosticsByCategories, $n as GITHUB_ACTIONS_SETUP_URL, $t as PRE_COMMIT_CONFIG_FILE, A as HANDOFF_TARGET_PREFERENCE_ID, An as VERSION, Ar as loadConfigWithSource, At as openWorkflowPullRequest, B as buildHandoffPayload, Bn as isNonInteractiveEnvironment, Br as log, Bt as spinner, C as isGatePending, Cn as buildSentryScope, Cr as highlighter, Ct as upgradeReactDoctorWorkflowInPlace, D as writePreference, Dn as setJsonReportMode, Dr as isReactDoctorError, Dt as recordDistribution, E as runMigrations, En as setJsonReportDirectory, Er as isPlainObject, Et as recordCount, F as CLI_AGENT_BINARIES, Fn as STAGED_FILES_TEMP_DIR_PREFIX, Fr as setColorEnabled, Ft as hasDoctorDependency, G as inspect, Gn as isCodingAgentEnvironment, H as collectProjectSourceFileCounts, Hn as isDebugFlagEnabled, Hr as provide$1, I as copyToClipboard, In as STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES, Ir as toRelativePath, It as hasDoctorScript, Jn as CI_URL, Jt as HUSKY_HOOKS_PATH, K as printHeadlessReport, Kn as CANONICAL_DISCORD_URL, Kt as HOOK_FILE_NAME, L as launchCliAgent, Lr as validateConfigTypes, Lt as installReactDoctorScriptStep, Mn as METRIC, Mr as messageFromUnknown, Mt as toForwardSlashes, N as SETUP_HINT_EVENT, Nr as remainingDeadlineBudgetMs, Nt as DOCTOR_PACKAGE_NAME, O as ACTION_UPGRADE_EVENT, On as writeJsonErrorReport, Or as isSameRuleKey, Ot as prompts, P as detectLaunchableAgents, Pn as SENTRY_FLUSH_TIMEOUT_MS, Pr as resolveScanTarget, Pt as findNearestPackageDirectory, Qt as OVERCOMMIT_CONFIG_FILE, R as computeDefaultSelectedAgents, Rt as isSpinnerSilent, S as openUrl, Sn as isEnvironmentError, Sr as hasReactRuntime, St as readReactDoctorWorkflow, T as recordGate, Tn as isJsonModeActive, Tr as isPathInsideDirectory, Tt as workflowUsesV1Action, U as deduplicateProjectScans, Ur as runPromise, V as formatSkippedProjectsMessage, Vr as gen, W as createInvocationInspect, Wn as isCiOrCodingAgentEnvironment, Wr as runSync, X as indentMultilineText, Xn as COMPILER_CLEANUP_RULE_KEYS, Xt as LEGACY_HOOK_RUNNER_RELATIVE_PATH, Yn as COMPILER_CLEANUP_BUCKET, Yt as LEFTHOOK_CONFIG_FILES, Z as printDiagnosticsDump, Zt as NON_BLOCKING_REACT_DOCTOR_COMMAND, _ as resolveCliInspectOptions, _n as cliLogger, _t as resolveBlockingLevel, a as shouldFailScanGate, an as getPackageJsonPath, ar as STAGED_FILES_PROJECT_CONFIG_FILENAMES, b as setUpGitHubActions, bn as isExpectedUserError, br as getEquivalentRuleKeys, bt as installReactDoctorWorkflow, c as selectProjects, cn as packageHasNestedRecordKey, cr as buildRuleDocsUrl, d as resolveProjectChangedLineRanges, dn as resolveGitPath, dr as detectAiTrainingEnvironment, dt as recordRunTraceId, en as REACT_DOCTOR_COMMAND, er as Git, et as buildEmptyReportMessage, f as resolveProjectDiffIncludePaths, fn as runGit, fr as discoverReactSubprojects, ft as finalizeScope, g as resolveWorkspaceDeadCodeOwner, gn as runCommand, gr as getBaselineDiffPlan, gt as isValidBlockingLevel, h as retryMissingProjectScores, hn as detectDefaultBranch, hr as formatReactDoctorError, ht as warnDeprecatedDiff, i as validateModeFlags, in as ensureTrailingNewline, ir as SKILL_NAME, j as INSTALL_AGENTS_PREFERENCE_ID, jn as CI_TRUST_COMPANIES, jr as mapWithConcurrency, jt as stageWorkflowFile, k as CI_PITCH_EVENT, kn as writeJsonReport, kr as listWorkspacePackages, kt as unrefStdin, l as buildCodeFrame, ln as packageHasRecordKey, lt as getActiveRunTrace, m as resolveProjectRelativeDirectory, mn as writeJsonFile, mr as formatErrorChain, mt as resolveScope, o as projectManifestChanged, on as isRecord, or as StagedFiles, p as resolveProjectSourceFilePaths, pn as runGitRaw, pr as findLegacyConfig, pt as isScopeValue, qn as CANONICAL_GITHUB_URL, qr as provide, qt as HOOK_RELATIVE_PATH, r as validateIncludeUntrackedScope, rn as VITE_PLUS_HOOKS_PATH, rt as resolveMergeBaseRef, sn as packageHasDependency, sr as buildJsonReport, t as exitGracefully, u as resolveProjectScan, un as readPackageJson, ur as clearConfigCache, ut as getLastRunTraceId, v as filterScansForSurface, vn as flushSentry, vr as getChangedLineRanges, vt as buildWorkflowContent, w as readPreference, wn as enableJsonMode, wr as isErrnoException, wt as upgradeWorkflowActionToV2, x as reportWorkflowResult, xn as formatEnvironmentError, xt as isReactDoctorWorkflowInstalled, y as countUniqueScannedFiles, yn as initializeSentry, yr as getDiffInfo, yt as getReactDoctorWorkflowPath, z as detectAvailableAgents, zn as CliInputError, zr as error, zt as setSpinnerSilent } from "./exit-gracefully-B18ck0kt.js";
|
|
5
5
|
import { execFile, execFileSync } from "node:child_process";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
7
7
|
import path from "node:path";
|
|
@@ -12166,49 +12166,6 @@ const PROJECT_MIGRATIONS = [
|
|
|
12166
12166
|
];
|
|
12167
12167
|
const runProjectMigrations = (projectRoot, options = {}) => runMigrations(PROJECT_MIGRATIONS, { projectRoot }, options);
|
|
12168
12168
|
//#endregion
|
|
12169
|
-
//#region src/cli/utils/render-welcome.ts
|
|
12170
|
-
const HAPPY_FACE_LINES = [
|
|
12171
|
-
"┌─────┐",
|
|
12172
|
-
"│ ◠ ◠ │",
|
|
12173
|
-
"│ ▽ │",
|
|
12174
|
-
"└─────┘"
|
|
12175
|
-
];
|
|
12176
|
-
const FACE_INDENT = " ";
|
|
12177
|
-
const FACE_PREFIX_WIDTH = 2 + (HAPPY_FACE_LINES[0]?.length ?? 0) + 2;
|
|
12178
|
-
const clampToColumns = (text, maxColumns) => {
|
|
12179
|
-
if (maxColumns <= 0) return "";
|
|
12180
|
-
if (text.length <= maxColumns) return text;
|
|
12181
|
-
if (maxColumns === 1) return "…";
|
|
12182
|
-
return `${text.slice(0, maxColumns - 1).trimEnd()}…`;
|
|
12183
|
-
};
|
|
12184
|
-
const typeLine = (linePrefix, text, style, charDelayMs) => gen(function* () {
|
|
12185
|
-
const characters = [...text];
|
|
12186
|
-
for (let length = 1; length <= characters.length; length += 1) {
|
|
12187
|
-
yield* writeStdout(`\r${linePrefix}${style(characters.slice(0, length).join(""))}\x1b[K`);
|
|
12188
|
-
yield* sleep(charDelayMs);
|
|
12189
|
-
}
|
|
12190
|
-
});
|
|
12191
|
-
const playWelcomeScene = (options = {}) => gen(function* () {
|
|
12192
|
-
const speedMultiplier = options.speedMultiplier ?? 1;
|
|
12193
|
-
const charDelayMs = 16 / speedMultiplier;
|
|
12194
|
-
const interLineDelayMs = 250 / speedMultiplier;
|
|
12195
|
-
const explanationHoldMs = WELCOME_EXPLANATION_HOLD_MS / speedMultiplier;
|
|
12196
|
-
const face = HAPPY_FACE_LINES.map((line) => highlighter.success(line));
|
|
12197
|
-
const mouthPrefix = `${FACE_INDENT}${face[2] ?? ""}${FACE_INDENT}`;
|
|
12198
|
-
const terminalColumns = process.stdout.columns;
|
|
12199
|
-
const availableTextColumns = terminalColumns && terminalColumns > 0 ? Math.max(0, terminalColumns - FACE_PREFIX_WIDTH - 1) : Number.POSITIVE_INFINITY;
|
|
12200
|
-
const greeting = clampToColumns("Welcome to React Doctor", availableTextColumns);
|
|
12201
|
-
const tagline = clampToColumns("I diagnose your React code for bugs, security & performance.", availableTextColumns);
|
|
12202
|
-
yield* writeStdout(`\n${face.map((line) => `${FACE_INDENT}${line}`).join("\n")}\n`);
|
|
12203
|
-
yield* writeStdout("\x1B[3A");
|
|
12204
|
-
yield* typeLine(`${FACE_INDENT}${face[1] ?? ""}${FACE_INDENT}`, greeting, (fragment) => highlighter.bold(fragment), charDelayMs);
|
|
12205
|
-
yield* sleep(interLineDelayMs);
|
|
12206
|
-
yield* writeStdout("\x1B[1B");
|
|
12207
|
-
yield* typeLine(mouthPrefix, tagline, (fragment) => highlighter.dim(fragment), charDelayMs);
|
|
12208
|
-
yield* sleep(explanationHoldMs);
|
|
12209
|
-
yield* writeStdout("\x1B[3A\r\x1B[0J");
|
|
12210
|
-
});
|
|
12211
|
-
//#endregion
|
|
12212
12169
|
//#region src/cli/utils/read-changed-files-from.ts
|
|
12213
12170
|
const isSafeRelativePath = (filePath) => {
|
|
12214
12171
|
if (filePath.length === 0) return false;
|
|
@@ -12235,89 +12192,36 @@ const readChangedFilesFrom = (filePath) => {
|
|
|
12235
12192
|
return [...uniqueFiles];
|
|
12236
12193
|
};
|
|
12237
12194
|
//#endregion
|
|
12238
|
-
//#region src/cli/utils/
|
|
12239
|
-
const
|
|
12240
|
-
|
|
12241
|
-
|
|
12242
|
-
|
|
12243
|
-
|
|
12244
|
-
|
|
12245
|
-
|
|
12246
|
-
|
|
12247
|
-
|
|
12248
|
-
|
|
12249
|
-
|
|
12250
|
-
|
|
12251
|
-
|
|
12252
|
-
|
|
12253
|
-
|
|
12254
|
-
|
|
12255
|
-
|
|
12256
|
-
|
|
12257
|
-
|
|
12258
|
-
|
|
12259
|
-
|
|
12260
|
-
|
|
12261
|
-
|
|
12262
|
-
|
|
12263
|
-
|
|
12264
|
-
|
|
12265
|
-
|
|
12266
|
-
const printMultiProjectSummary = (input) => gen(function* () {
|
|
12267
|
-
const { completedScans, verbose, isOffline, projectName, totalElapsedMilliseconds } = input;
|
|
12268
|
-
const categoryFilters = input.categoryFilters ?? /* @__PURE__ */ new Set();
|
|
12269
|
-
const animateRender = !verbose && canAnimateOnboarding(process.stdout);
|
|
12270
|
-
const displayDiagnostics = filterDiagnosticsByCategories(filterScansForSurface(completedScans, "cli"), categoryFilters);
|
|
12271
|
-
const scoreDiagnostics = new Set(filterScansForSurface(completedScans, "score"));
|
|
12272
|
-
const displayedScoreDiagnostics = displayDiagnostics.filter((diagnostic) => scoreDiagnostics.has(diagnostic));
|
|
12273
|
-
const projectRootByDiagnostic = /* @__PURE__ */ new WeakMap();
|
|
12274
|
-
const frameSourceRootByDiagnostic = /* @__PURE__ */ new WeakMap();
|
|
12275
|
-
for (const scan of completedScans) for (const diagnostic of scan.result.diagnostics) {
|
|
12276
|
-
projectRootByDiagnostic.set(diagnostic, scan.result.project.rootDirectory);
|
|
12277
|
-
frameSourceRootByDiagnostic.set(diagnostic, scan.frameSourceRoot ?? scan.result.project.rootDirectory);
|
|
12278
|
-
}
|
|
12279
|
-
const resolveDiagnosticSourceRoot = (diagnostic) => projectRootByDiagnostic.get(diagnostic) ?? "";
|
|
12280
|
-
const resolveDiagnosticFrameSourceRoot = (diagnostic) => frameSourceRootByDiagnostic.get(diagnostic) ?? resolveDiagnosticSourceRoot(diagnostic);
|
|
12281
|
-
const totalScannedFileCount = countUniqueScannedFiles(completedScans.map((scan) => scan.result));
|
|
12282
|
-
yield* log(`${highlighter.success("✔")} Scanned ${totalScannedFileCount} ${totalScannedFileCount === 1 ? "file" : "files"} in ${formatElapsedTime(totalElapsedMilliseconds)}`);
|
|
12283
|
-
if (displayDiagnostics.length > 0) {
|
|
12284
|
-
yield* log("");
|
|
12285
|
-
yield* printDiagnostics(displayDiagnostics, verbose, resolveDiagnosticSourceRoot, buildRulePriorityMap(completedScans.map((scan) => scan.result.score)), isCodingAgentEnvironment(), { animateCountUp: animateRender }, shouldRenderHyperlinks(process.stdout), resolveDiagnosticFrameSourceRoot);
|
|
12286
|
-
}
|
|
12287
|
-
const lowestScoredScan = findLowestScoredScan(completedScans);
|
|
12288
|
-
const aggregateScore = lowestScoredScan?.result.score ?? null;
|
|
12289
|
-
const totalSourceFileCount = completedScans.reduce((sum, scan) => sum + scan.result.project.sourceFileCount, 0);
|
|
12290
|
-
yield* printSummary({
|
|
12291
|
-
diagnostics: displayDiagnostics,
|
|
12292
|
-
elapsedMilliseconds: totalElapsedMilliseconds,
|
|
12293
|
-
scoreResult: aggregateScore,
|
|
12294
|
-
potentialScore: lowestScoredScan ? yield* promise(() => computeProjectedScore(displayedScoreDiagnostics, filterScansForSurface([lowestScoredScan], "score"), lowestScoredScan.result.score)) : null,
|
|
12295
|
-
totalSourceFileCount,
|
|
12296
|
-
noScoreMessage: "Score unavailable.",
|
|
12297
|
-
verbose,
|
|
12298
|
-
outputDirectory: input.outputDirectory,
|
|
12299
|
-
animateProjection: animateRender
|
|
12300
|
-
});
|
|
12301
|
-
const entries = completedScans.map((scan) => {
|
|
12302
|
-
const projectDiagnostics = filterDiagnosticsByCategories(filterScansForSurface([scan], "cli"), categoryFilters);
|
|
12303
|
-
const errorCount = projectDiagnostics.filter((diagnostic) => diagnostic.severity === "error").length;
|
|
12304
|
-
return {
|
|
12305
|
-
projectName: scan.result.project.projectName,
|
|
12306
|
-
score: scan.result.score?.score ?? null,
|
|
12307
|
-
issueCount: projectDiagnostics.length,
|
|
12308
|
-
errorCount
|
|
12309
|
-
};
|
|
12310
|
-
});
|
|
12311
|
-
const longestProjectNameLength = Math.max(...entries.map((entry) => entry.projectName.length));
|
|
12312
|
-
yield* log("");
|
|
12313
|
-
for (const entry of entries) yield* log(buildSummaryLine(entry, longestProjectNameLength));
|
|
12314
|
-
yield* printFooter({
|
|
12315
|
-
diagnostics: displayDiagnostics,
|
|
12316
|
-
scoreResult: aggregateScore,
|
|
12317
|
-
projectName,
|
|
12318
|
-
isOffline
|
|
12195
|
+
//#region src/cli/utils/print-completed-scans-headless.ts
|
|
12196
|
+
const printCompletedScansHeadless = (input) => {
|
|
12197
|
+
const surfaceDiagnostics = filterScansForSurface(input.completedScans, input.outputSurface);
|
|
12198
|
+
const diagnostics = filterDiagnosticsByCategories(surfaceDiagnostics, input.categoryFilters);
|
|
12199
|
+
const allDiagnosticCount = input.completedScans.reduce((total, scan) => total + scan.result.diagnostics.length, 0);
|
|
12200
|
+
const scoreResult = input.completedScans.reduce((lowestScore, scan) => {
|
|
12201
|
+
const scanScore = scan.result.score;
|
|
12202
|
+
if (scanScore === null) return lowestScore;
|
|
12203
|
+
if (lowestScore === null || scanScore.score < lowestScore.score) return scanScore;
|
|
12204
|
+
return lowestScore;
|
|
12205
|
+
}, null);
|
|
12206
|
+
const skippedChecks = [...new Set(input.completedScans.flatMap((scan) => scan.result.skippedChecks))];
|
|
12207
|
+
return gen(function* () {
|
|
12208
|
+
yield* printHeadlessReport({
|
|
12209
|
+
diagnostics,
|
|
12210
|
+
elapsedMilliseconds: input.elapsedMilliseconds,
|
|
12211
|
+
emptyStateMessage: buildEmptyReportMessage({
|
|
12212
|
+
categoryFilters: input.categoryFilters,
|
|
12213
|
+
demotedDiagnosticCount: allDiagnosticCount - surfaceDiagnostics.length,
|
|
12214
|
+
outputSurface: input.outputSurface
|
|
12215
|
+
}),
|
|
12216
|
+
noScoreMessage: input.noScoreMessage,
|
|
12217
|
+
projectName: input.projectName,
|
|
12218
|
+
scannedFileCount: countUniqueScannedFiles(input.completedScans.map((scan) => scan.result)),
|
|
12219
|
+
scoreResult: skippedChecks.length > 0 ? null : scoreResult,
|
|
12220
|
+
skippedChecks
|
|
12221
|
+
});
|
|
12222
|
+
if (input.outputDirectory !== void 0 || input.verbose) yield* printDiagnosticsDump(diagnostics, input.outputDirectory, input.verbose);
|
|
12319
12223
|
});
|
|
12320
|
-
}
|
|
12224
|
+
};
|
|
12321
12225
|
//#endregion
|
|
12322
12226
|
//#region src/cli/utils/prompt-install-setup.ts
|
|
12323
12227
|
const SETUP_HINT_GATE = {
|
|
@@ -12743,8 +12647,6 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
|
|
|
12743
12647
|
});
|
|
12744
12648
|
return;
|
|
12745
12649
|
}
|
|
12746
|
-
if (!isQuiet) if (!flags.verbose && canAnimateOnboarding(process.stdout)) await runPromise(playWelcomeScene({ speedMultiplier: !isOnboardingForced() && hasCompletedOnboarding() ? 2 : 1 }));
|
|
12747
|
-
else runSync(printBrandedHeader);
|
|
12748
12650
|
const scanOptions = resolveCliInspectOptions(flags, userConfig);
|
|
12749
12651
|
const inspectProject = createInvocationInspect(scanOptions.concurrency);
|
|
12750
12652
|
const scanDeadlineEpochMs = scanOptions.maxDurationMs !== void 0 ? Date.now() + scanOptions.maxDurationMs : void 0;
|
|
@@ -12924,8 +12826,7 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
|
|
|
12924
12826
|
rootDirectory: projectScan.scanDirectory
|
|
12925
12827
|
}
|
|
12926
12828
|
},
|
|
12927
|
-
config: projectScan.projectConfig
|
|
12928
|
-
frameSourceRoot: projectTempDirectory
|
|
12829
|
+
config: projectScan.projectConfig
|
|
12929
12830
|
};
|
|
12930
12831
|
};
|
|
12931
12832
|
const stagedBatch = await runProjectScanBatch({
|
|
@@ -12938,27 +12839,22 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
|
|
|
12938
12839
|
throw error;
|
|
12939
12840
|
});
|
|
12940
12841
|
const completedScans = stagedBatch.completedScans;
|
|
12941
|
-
|
|
12942
|
-
|
|
12943
|
-
|
|
12944
|
-
|
|
12945
|
-
|
|
12946
|
-
|
|
12947
|
-
|
|
12948
|
-
|
|
12949
|
-
|
|
12950
|
-
|
|
12951
|
-
|
|
12952
|
-
|
|
12953
|
-
|
|
12954
|
-
|
|
12955
|
-
|
|
12956
|
-
|
|
12957
|
-
}
|
|
12958
|
-
if (flags.outputDir && isMultiProject && isQuiet) await runPromise(printDiagnosticsDump(filterDiagnosticsByCategories(filterScansForSurface(completedScans, scanOptions.outputSurface ?? "cli"), categoryFilters), flags.outputDir, false, "stderr"));
|
|
12959
|
-
} finally {
|
|
12960
|
-
snapshot.cleanup();
|
|
12961
|
-
}
|
|
12842
|
+
snapshot.cleanup();
|
|
12843
|
+
reportSkippedProjects({
|
|
12844
|
+
skippedProjects,
|
|
12845
|
+
isQuiet
|
|
12846
|
+
});
|
|
12847
|
+
if (!isQuiet && isMultiProject && completedScans.length > 0) await runPromise(printCompletedScansHeadless({
|
|
12848
|
+
categoryFilters,
|
|
12849
|
+
completedScans,
|
|
12850
|
+
elapsedMilliseconds: stagedBatch.elapsedMilliseconds,
|
|
12851
|
+
noScoreMessage: "Score unavailable.",
|
|
12852
|
+
outputDirectory: flags.outputDir,
|
|
12853
|
+
outputSurface: scanOptions.outputSurface ?? "cli",
|
|
12854
|
+
projectName: path$1.basename(resolvedDirectory),
|
|
12855
|
+
verbose: Boolean(flags.verbose)
|
|
12856
|
+
}));
|
|
12857
|
+
if (flags.outputDir && isMultiProject && isQuiet) await runPromise(printDiagnosticsDump(filterDiagnosticsByCategories(filterScansForSurface(completedScans, scanOptions.outputSurface ?? "cli"), categoryFilters), flags.outputDir, false, "stderr"));
|
|
12962
12858
|
finalizeScans({
|
|
12963
12859
|
completedScans,
|
|
12964
12860
|
skippedProjects,
|
|
@@ -13121,18 +13017,16 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect") =>
|
|
|
13121
13017
|
skippedProjects,
|
|
13122
13018
|
isQuiet
|
|
13123
13019
|
});
|
|
13124
|
-
if (!isQuiet && isMultiProject && completedScans.length > 0) {
|
|
13125
|
-
|
|
13126
|
-
|
|
13127
|
-
|
|
13128
|
-
|
|
13129
|
-
|
|
13130
|
-
|
|
13131
|
-
|
|
13132
|
-
|
|
13133
|
-
|
|
13134
|
-
}));
|
|
13135
|
-
}
|
|
13020
|
+
if (!isQuiet && isMultiProject && completedScans.length > 0) await runPromise(printCompletedScansHeadless({
|
|
13021
|
+
categoryFilters,
|
|
13022
|
+
completedScans,
|
|
13023
|
+
elapsedMilliseconds: projectBatch.elapsedMilliseconds,
|
|
13024
|
+
noScoreMessage: "Score unavailable.",
|
|
13025
|
+
outputDirectory: flags.outputDir,
|
|
13026
|
+
outputSurface: scanOptions.outputSurface ?? "cli",
|
|
13027
|
+
projectName: path$1.basename(resolvedDirectory),
|
|
13028
|
+
verbose: Boolean(flags.verbose)
|
|
13029
|
+
}));
|
|
13136
13030
|
const selectedSurfaceDiagnostics = filterDiagnosticsByCategories(filterScansForSurface(completedScans, scanOptions.outputSurface ?? "cli"), categoryFilters);
|
|
13137
13031
|
const didScansWriteDump = isMultiProject ? !isQuiet && completedScans.length > 0 : completedScans.length > 0;
|
|
13138
13032
|
if (flags.outputDir && !didScansWriteDump) await runPromise(printDiagnosticsDump(selectedSurfaceDiagnostics, flags.outputDir, false, isQuiet ? "stderr" : "stdout"));
|
|
@@ -13252,7 +13146,7 @@ const runScanCommand = async (input) => {
|
|
|
13252
13146
|
warnDeprecatedFailOn(input.flags, scanTarget.userConfig);
|
|
13253
13147
|
warnDeprecatedDiff(input.flags, scanTarget.userConfig);
|
|
13254
13148
|
recordCount(METRIC.cliInvoked, 1, { command: input.invocationCommand });
|
|
13255
|
-
const { runScanApp } = await import("./run-scan-app-
|
|
13149
|
+
const { runScanApp } = await import("./run-scan-app-CjGdpTbP.js");
|
|
13256
13150
|
const { shouldFail } = await runScanApp({
|
|
13257
13151
|
directory: input.directory,
|
|
13258
13152
|
scanTarget,
|
|
@@ -14380,4 +14274,4 @@ Promise.resolve().then(() => assertNoRemovedFlags(process.argv)).then(() => prog
|
|
|
14380
14274
|
export {};
|
|
14381
14275
|
|
|
14382
14276
|
//# sourceMappingURL=cli.js.map
|
|
14383
|
-
//# debugId=
|
|
14277
|
+
//# debugId=ee33417e-c94f-5f10-ac59-9d4e202b7c9f
|