react-doctor 0.9.16 → 0.9.17-dev.066a7c7
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 +19 -23
- package/dist/{build-section-divider-DdDfVhIU.js → build-section-divider-Bir8L5EX.js} +5 -5
- package/dist/{ci-DB7v3zSt.js → ci-REczH_Cr.js} +18 -14
- package/dist/cli.js +40 -31
- package/dist/{constants-rmkaA7iw.js → constants-Bwylqy0B.js} +7 -5
- package/dist/constants-DNh19qg9.js +2 -2
- package/dist/{design-CdjV6tS8.js → design-ZfyyEv09.js} +4 -4
- package/dist/{exit-gracefully-DYAZMdvL.js → exit-gracefully-DHm8xU1Z.js} +6 -6
- package/dist/{handle-error-rZIxgzIJ.js → handle-error-CMzUBjYP.js} +6 -6
- package/dist/index.d.ts +4 -1
- package/dist/index.js +10 -7
- package/dist/{inspect-td2f87RL.js → inspect-5cPWzG-2.js} +35 -32
- package/dist/{install-DFz26Git.js → install-Gj8mFy3f.js} +10 -10
- package/dist/{install-doctor-script-DutA3AmF.js → install-doctor-script-tXwokAgA.js} +10 -6
- package/dist/{install-github-workflow-CrCUq-fk.js → install-github-workflow-BcHvpq2i.js} +22 -8
- package/dist/{install-react-doctor-AjM8eNr6.js → install-react-doctor-C-Ij1VpA.js} +9 -9
- package/dist/{is-cache-globally-disabled-DquUESHw.js → is-cache-globally-disabled-BvdYcw6Q.js} +4 -4
- package/dist/{jsx-runtime-CmVfaGKL.js → jsx-runtime-CrdOPOJQ.js} +6 -6
- package/dist/{print-branded-header-BSPcMb1k.js → print-branded-header--2SHdWPw.js} +4 -4
- package/dist/{prompt-runtime-scan-url-9SslR9ci.js → prompt-runtime-scan-url-CIYKBQrq.js} +5 -5
- package/dist/{read-object-file-FXP4EgJe.js → read-object-file-DuS2a53u.js} +4 -4
- package/dist/{record-metric-DlQ2Xkco.js → record-metric-C5UBQqkS.js} +158 -83
- package/dist/{report-error-CsS16tjk.js → report-error-N4i-Hejx.js} +6 -6
- package/dist/{report-workflow-result-DL4pJV2h.js → report-workflow-result-Ci5GLxeI.js} +8 -7
- package/dist/{should-fail-scan-gate-ASw8KS4V.js → resolve-scan-exit-code-CPHZSx3J.js} +115 -25
- package/dist/{resolve-scope-Dydx4htr.js → resolve-scope-K1c-uQP2.js} +6 -6
- package/dist/{rules-BITRtAOo.js → rules-CNn-tv4a.js} +7 -7
- package/dist/{run-scan-app-BvZAmq01.js → run-scan-app-CHC39n_x.js} +27 -19
- package/dist/{runtime-scan-BKWHOq5l.js → runtime-scan-Dj7Us5sQ.js} +10 -10
- package/dist/{sanitize-runtime-url-SAbuIQOl.js → sanitize-runtime-url-iIWcHvte.js} +4 -4
- package/dist/{scan-BNqVRm8k.js → scan-Bd3LUmCE.js} +14 -13
- package/dist/{should-skip-prompts-D86BK2WZ.js → should-skip-prompts-wO06Jnwa.js} +4 -4
- package/dist/{should-use-tui--ondyPLd.js → should-use-tui-DnwgOl2f.js} +4 -4
- package/dist/skills/react-doctor/SKILL.md +5 -1
- package/dist/{start-scan-preamble-CCqs1vP4.js → start-scan-preamble-2uz0joCl.js} +5 -5
- package/dist/start-scan-preamble.js +3 -3
- package/dist/{telemetry-runtime-DRB6SHxI.js → telemetry-runtime-Cgsi8HjU.js} +7 -7
- package/dist/{version-c57nNOfC.js → version-BxebuFjX.js} +5 -5
- package/dist/{why-B16Tzl_q.js → why-BwJn5rXa.js} +4 -4
- package/dist/{with-run-span-BpoDt67p.js → with-run-span-Fo2rFfpM.js} +6 -6
- package/package.json +4 -4
|
@@ -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]="9e84f68b-abc2-5a15-bdc5-51d1554ac402")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
|
-
import { $ as warmReactCompilerDetection, $t as OXLINT_WORKER_JOB_END_MARKER, A as buildGitSourceListingRequest, An as TARGET_BLANK_BROWSER_SUPPORT, At as GITHUB_VIEWER_PERMISSION_TIMEOUT_MS, B as resolveGitCommand, Bt as MAINTAINABILITY_DUPLICATE_JSX_RULE, Cn as SUPPLY_CHAIN_CACHE_TTL_MS, Ct as ES_TARGET_YEAR_BY_NAME, Dn as SUPPLY_CHAIN_PLUGIN, Dt as GENERATED_BUNDLE_FILE_PATTERN, En as SUPPLY_CHAIN_OVERLAP_TIMEOUT_MS, Et as FILE_LINT_CACHE_MAX_FILE_COUNT, F as lowerChildProcessPriority, Fn as VERCEL_NEXTJS_SECURITY_RELEASE_URL, Ft as HTML_FILE_PATTERN, G as resolvePluginPath, Gt as MINIFIED_SNIFF_BYTES, H as resolveOxlintThreadCount, It as IGNORED_DIRECTORIES, J as resolveTsConfigRelativePath, K as resolveReactDoctorCacheDir, Kt as OCCURRENCE_MATCHED_CATEGORIES, Lt as JSX_DUPLICATION_SOURCE_FILE_PATTERN, M as buildOxlintWorkerSpawnSpec, Mn as TELEMETRY_SHUTDOWN_TIMEOUT_MS, Mt as GIT_LS_FILES_MAX_BUFFER_BYTES, Nn as TSCONFIG_FILENAMES, Nt as GIT_SHOW_MAX_BUFFER_BYTES, On as SUPPLY_CHAIN_RULE, Ot as GENERATED_SOURCE_DIRECTORY_PATTERN, P as killUnadoptedOxlintWorkers, Pn as TYPESCRIPT_DECLARATION_FILE_PATTERN, Pt as GIT_SOURCE_LISTING_ARGUMENTS, Q as takeReactCompilerDetection, Qt as OXLINT_SPLIT_TOTAL_BUDGET_MS, R as readSystemConcurrencyFacts, Sn as SUPPLY_CHAIN_CACHE_SUBDIR, Tn as SUPPLY_CHAIN_IGNORED_PACKAGES, Tt as FILE_LINT_CACHE_FILENAME, U as resolveOxlintToolchainVersions, Ut as MAX_GLOB_PATTERN_LENGTH_CHARS, V as resolveOxlintBinary, Vt as MAINTAINABILITY_PLUGIN, W as resolveOxlintWorkerRuntime, Wt as MILLISECONDS_PER_SECOND, X as spawnOxlintWorkerProcess, Xt as OXLINT_OUTPUT_MAX_BYTES, Y as setChildProcessRef, Yt as OXLINT_OOM_RESCUE_BUDGET_MS, Z as takePrespawnedOxlintWorker, Zt as OXLINT_SPAWN_TIMEOUT_MS, _n as SOURCE_FILE_PATTERN, _t as DIAGNOSTIC_CATEGORY_BUCKETS, an as REACT_ROUTER_CAPABILITY_THRESHOLDS, at as AXIOM_METRICS_DATASET_HEADER, bn as SPAWN_ARGS_MAX_LENGTH_CHARS_POSIX, cn as ROOT_CAUSE_GROUPABLE_RULE_KEYS, d as METRIC_DISTRIBUTION_BOUNDARIES, dt as COMPILER_CLEANUP_BUCKET, en as PROJECT_ANALYSIS_WORKER_MAX_OLD_SPACE_MB, et as ABORT_EXIT_CODES, fn as SIDECAR_LINT_CACHE_FILENAME, ft as COMPILER_CLEANUP_RULE_KEYS, gn as SOCKET_PACKAGE_PAGE_BASE, gt as DEFAULT_BRANCH_CANDIDATES, hn as SOCKET_FREE_USER_AGENT, in as REACT_BLOG_RSC_ADVISORY_URL, j as buildOxlintChildEnv, jn as TELEMETRY_EXPORT_INTERVAL_MS, jt as GIT_CHECK_ATTR_MAX_BUFFER_BYTES, kn as TAILWIND_POSTCSS7_COMPAT_ALIAS, l as INTERNAL_ERROR_JSON_FALLBACK, ln as SCANNED_DOT_DIRECTORIES, mn as SOCKET_FREE_PURL_API_BASE, mt as CONFIG_FINGERPRINT_FILENAMES, nn as PROJECT_ANALYSIS_WORKER_TIMEOUT_CEILING_MS, nt as APP_ONLY_RULE_KEYS, on as REACT_SERVER_DOM_PACKAGES, ot as AXIOM_METRICS_PATH, pt as CONFIG_CACHE_TTL_MS, q as resolveScanConcurrency, qt as OXLINT_IGNORED_DECLARATION_DIAGNOSTIC_CODES, rn as PROJECT_ANALYSIS_WORKER_TIMEOUT_MS, rt as AXIOM_DATASET_HEADER, sn as RECOMMENDED_PNPM_MINIMUM_RELEASE_AGE_MINUTES, st as AXIOM_TRACES_PATH, tn as PROJECT_ANALYSIS_WORKER_MEMORY_BUDGET_BYTES, tt as ADOPTABLE_LINT_CONFIG_FILENAMES, un as SCORE_API_URL, vn as SPAWN_ARGS_MAX_LENGTH_CHARS, vt as DISABLE_DIRECTIVE_BACKUP_DIRECTORY_SEGMENTS, wn as SUPPLY_CHAIN_CATEGORY, wt as FETCH_TIMEOUT_MS, xn as STAGED_FILES_PROJECT_CONFIG_FILENAMES, xt as DUPLICATE_JSX_WORKER_IDLE_TIMEOUT_MS, yn as SPAWN_ARGS_MAX_LENGTH_CHARS_DARWIN, yt as DOCS_RULES_BASE_URL, z as resolveConfiguredScanConcurrency, zt as MAINTAINABILITY_CATEGORY } from "./constants-
|
|
4
|
+
import { $ as warmReactCompilerDetection, $t as OXLINT_WORKER_JOB_END_MARKER, A as buildGitSourceListingRequest, An as TARGET_BLANK_BROWSER_SUPPORT, At as GITHUB_VIEWER_PERMISSION_TIMEOUT_MS, B as resolveGitCommand, Bt as MAINTAINABILITY_DUPLICATE_JSX_RULE, Cn as SUPPLY_CHAIN_CACHE_TTL_MS, Ct as ES_TARGET_YEAR_BY_NAME, Dn as SUPPLY_CHAIN_PLUGIN, Dt as GENERATED_BUNDLE_FILE_PATTERN, En as SUPPLY_CHAIN_OVERLAP_TIMEOUT_MS, Et as FILE_LINT_CACHE_MAX_FILE_COUNT, F as lowerChildProcessPriority, Fn as VERCEL_NEXTJS_SECURITY_RELEASE_URL, Ft as HTML_FILE_PATTERN, G as resolvePluginPath, Gt as MINIFIED_SNIFF_BYTES, H as resolveOxlintThreadCount, It as IGNORED_DIRECTORIES, J as resolveTsConfigRelativePath, K as resolveReactDoctorCacheDir, Kt as OCCURRENCE_MATCHED_CATEGORIES, Lt as JSX_DUPLICATION_SOURCE_FILE_PATTERN, M as buildOxlintWorkerSpawnSpec, Mn as TELEMETRY_SHUTDOWN_TIMEOUT_MS, Mt as GIT_LS_FILES_MAX_BUFFER_BYTES, Nn as TSCONFIG_FILENAMES, Nt as GIT_SHOW_MAX_BUFFER_BYTES, On as SUPPLY_CHAIN_RULE, Ot as GENERATED_SOURCE_DIRECTORY_PATTERN, P as killUnadoptedOxlintWorkers, Pn as TYPESCRIPT_DECLARATION_FILE_PATTERN, Pt as GIT_SOURCE_LISTING_ARGUMENTS, Q as takeReactCompilerDetection, Qt as OXLINT_SPLIT_TOTAL_BUDGET_MS, R as readSystemConcurrencyFacts, Sn as SUPPLY_CHAIN_CACHE_SUBDIR, Tn as SUPPLY_CHAIN_IGNORED_PACKAGES, Tt as FILE_LINT_CACHE_FILENAME, U as resolveOxlintToolchainVersions, Ut as MAX_GLOB_PATTERN_LENGTH_CHARS, V as resolveOxlintBinary, Vt as MAINTAINABILITY_PLUGIN, W as resolveOxlintWorkerRuntime, Wt as MILLISECONDS_PER_SECOND, X as spawnOxlintWorkerProcess, Xt as OXLINT_OUTPUT_MAX_BYTES, Y as setChildProcessRef, Yt as OXLINT_OOM_RESCUE_BUDGET_MS, Z as takePrespawnedOxlintWorker, Zt as OXLINT_SPAWN_TIMEOUT_MS, _n as SOURCE_FILE_PATTERN, _t as DIAGNOSTIC_CATEGORY_BUCKETS, an as REACT_ROUTER_CAPABILITY_THRESHOLDS, at as AXIOM_METRICS_DATASET_HEADER, bn as SPAWN_ARGS_MAX_LENGTH_CHARS_POSIX, cn as ROOT_CAUSE_GROUPABLE_RULE_KEYS, d as METRIC_DISTRIBUTION_BOUNDARIES, dt as COMPILER_CLEANUP_BUCKET, en as PROJECT_ANALYSIS_WORKER_MAX_OLD_SPACE_MB, et as ABORT_EXIT_CODES, fn as SIDECAR_LINT_CACHE_FILENAME, ft as COMPILER_CLEANUP_RULE_KEYS, gn as SOCKET_PACKAGE_PAGE_BASE, gt as DEFAULT_BRANCH_CANDIDATES, hn as SOCKET_FREE_USER_AGENT, in as REACT_BLOG_RSC_ADVISORY_URL, j as buildOxlintChildEnv, jn as TELEMETRY_EXPORT_INTERVAL_MS, jt as GIT_CHECK_ATTR_MAX_BUFFER_BYTES, kn as TAILWIND_POSTCSS7_COMPAT_ALIAS, l as INTERNAL_ERROR_JSON_FALLBACK, ln as SCANNED_DOT_DIRECTORIES, mn as SOCKET_FREE_PURL_API_BASE, mt as CONFIG_FINGERPRINT_FILENAMES, nn as PROJECT_ANALYSIS_WORKER_TIMEOUT_CEILING_MS, nt as APP_ONLY_RULE_KEYS, on as REACT_SERVER_DOM_PACKAGES, ot as AXIOM_METRICS_PATH, pt as CONFIG_CACHE_TTL_MS, q as resolveScanConcurrency, qt as OXLINT_IGNORED_DECLARATION_DIAGNOSTIC_CODES, rn as PROJECT_ANALYSIS_WORKER_TIMEOUT_MS, rt as AXIOM_DATASET_HEADER, sn as RECOMMENDED_PNPM_MINIMUM_RELEASE_AGE_MINUTES, st as AXIOM_TRACES_PATH, tn as PROJECT_ANALYSIS_WORKER_MEMORY_BUDGET_BYTES, tt as ADOPTABLE_LINT_CONFIG_FILENAMES, un as SCORE_API_URL, vn as SPAWN_ARGS_MAX_LENGTH_CHARS, vt as DISABLE_DIRECTIVE_BACKUP_DIRECTORY_SEGMENTS, wn as SUPPLY_CHAIN_CATEGORY, wt as FETCH_TIMEOUT_MS, xn as STAGED_FILES_PROJECT_CONFIG_FILENAMES, xt as DUPLICATE_JSX_WORKER_IDLE_TIMEOUT_MS, yn as SPAWN_ARGS_MAX_LENGTH_CHARS_DARWIN, yt as DOCS_RULES_BASE_URL, z as resolveConfiguredScanConcurrency, zt as MAINTAINABILITY_CATEGORY } from "./constants-Bwylqy0B.js";
|
|
5
5
|
import { n as require_picomatch, t as require_semver } from "./semver-BZIuy1gP.js";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import * as fs$1$2 from "node:fs";
|
|
@@ -88,7 +88,7 @@ const unwrapTypescriptExpression = (expression) => {
|
|
|
88
88
|
return currentExpression;
|
|
89
89
|
};
|
|
90
90
|
//#endregion
|
|
91
|
-
//#region ../core/dist/collect-unplugin-auto-import-global-scopes-
|
|
91
|
+
//#region ../core/dist/collect-unplugin-auto-import-global-scopes-CSHedw9o.js
|
|
92
92
|
var import_picomatch = /* @__PURE__ */ __toESM(require_picomatch(), 1);
|
|
93
93
|
const LINGUIST_ATTRIBUTES = ["linguist-generated", "linguist-vendored"];
|
|
94
94
|
const DISABLED_ATTRIBUTE_VALUES = new Set([
|
|
@@ -526,7 +526,7 @@ const collectUnpluginAutoImportGlobalScopes = ({ rootDirectory, candidateFiles }
|
|
|
526
526
|
return scopes.some((scope) => scope.names.length > 0) ? scopes : [];
|
|
527
527
|
};
|
|
528
528
|
//#endregion
|
|
529
|
-
//#region ../core/dist/detect-duplicate-jsx-subtrees-
|
|
529
|
+
//#region ../core/dist/detect-duplicate-jsx-subtrees-Df5xaEva.js
|
|
530
530
|
const yieldToEventLoop = () => new Promise((resolve) => {
|
|
531
531
|
setImmediate(resolve);
|
|
532
532
|
});
|
|
@@ -1083,7 +1083,7 @@ const detectDuplicateJsxSubtreesCooperative = async (sourceReader, options = {})
|
|
|
1083
1083
|
});
|
|
1084
1084
|
};
|
|
1085
1085
|
//#endregion
|
|
1086
|
-
//#region ../core/dist/detect-react-compiler-
|
|
1086
|
+
//#region ../core/dist/detect-react-compiler-CP4BcCz0.js
|
|
1087
1087
|
const NEXT_CONFIG_FILENAMES = [
|
|
1088
1088
|
"next.config.js",
|
|
1089
1089
|
"next.config.mjs",
|
|
@@ -23309,6 +23309,7 @@ var JsonReportProjectEntry = class extends Class("JsonReportProjectEntry")({
|
|
|
23309
23309
|
var JsonReportProjectEntryV3 = class extends Class("JsonReportProjectEntryV3")({
|
|
23310
23310
|
directory: String$1,
|
|
23311
23311
|
packageRoot: String$1,
|
|
23312
|
+
sourceFilterConfigHash: optional(String$1),
|
|
23312
23313
|
framework: Framework,
|
|
23313
23314
|
project: Unknown,
|
|
23314
23315
|
diagnostics: ArraySchema(JsonReportDiagnosticV3),
|
|
@@ -70383,87 +70384,118 @@ const checkProjectAnalysis = async (options) => {
|
|
|
70383
70384
|
};
|
|
70384
70385
|
const fingerprintDiagnosticEvidence = (evidence) => createHash("sha256").update(evidence.replace(/\s+/g, " ").trim()).digest("hex");
|
|
70385
70386
|
const DIAGNOSTIC_DELTA_IDENTITY = Symbol.for("react-doctor/diagnostic-delta-identity");
|
|
70386
|
-
const
|
|
70387
|
-
const
|
|
70388
|
-
const messageFingerprint = fingerprintDiagnosticEvidence(`${diagnostic.title ?? ""}\0${diagnostic.message}`);
|
|
70389
|
-
const evidenceFingerprint = diagnostic.fingerprint ?? (evidence?.trim() ? fingerprintDiagnosticEvidence(evidence) : null);
|
|
70387
|
+
const buildMatchCandidates = (diagnostics, indexes, readEvidence, readLine, mapLine) => indexes.map((diagnosticIndex) => {
|
|
70388
|
+
const diagnostic = diagnostics[diagnosticIndex];
|
|
70390
70389
|
const explicitIdentity = Reflect.get(diagnostic, DIAGNOSTIC_DELTA_IDENTITY);
|
|
70391
|
-
let
|
|
70392
|
-
if (typeof explicitIdentity === "string")
|
|
70393
|
-
else if (
|
|
70394
|
-
|
|
70390
|
+
let fingerprint = diagnostic.fingerprint ?? null;
|
|
70391
|
+
if (typeof explicitIdentity === "string") fingerprint = `identity:${fingerprintDiagnosticEvidence(explicitIdentity)}`;
|
|
70392
|
+
else if (fingerprint === null) {
|
|
70393
|
+
const evidence = readEvidence?.(diagnostic) ?? readLine(diagnostic.filePath, diagnostic.line);
|
|
70394
|
+
if (evidence?.trim()) fingerprint = fingerprintDiagnosticEvidence(evidence);
|
|
70395
|
+
}
|
|
70396
|
+
const message = `${diagnostic.title ?? ""}\0${diagnostic.message}`;
|
|
70395
70397
|
return {
|
|
70396
|
-
|
|
70397
|
-
|
|
70398
|
-
|
|
70398
|
+
diagnosticIndex,
|
|
70399
|
+
fingerprint,
|
|
70400
|
+
message,
|
|
70401
|
+
messageWords: new Set(message.toLowerCase().match(/\w+/g) ?? []),
|
|
70402
|
+
line: mapLine(diagnostic)
|
|
70403
|
+
};
|
|
70404
|
+
});
|
|
70405
|
+
const compareMatchRanks = (left, right) => right.messageSimilarity - left.messageSimilarity || left.lineDistance - right.lineDistance;
|
|
70406
|
+
const rankDiagnosticMatch = (head, base) => {
|
|
70407
|
+
let sharedWordCount = 0;
|
|
70408
|
+
for (const word of head.messageWords) if (base.messageWords.has(word)) sharedWordCount += 1;
|
|
70409
|
+
const unionWordCount = head.messageWords.size + base.messageWords.size - sharedWordCount;
|
|
70410
|
+
return {
|
|
70411
|
+
messageSimilarity: head.message === base.message ? 1 : sharedWordCount / Math.max(1, unionWordCount),
|
|
70412
|
+
lineDistance: Math.abs(head.line - base.line)
|
|
70399
70413
|
};
|
|
70400
70414
|
};
|
|
70401
|
-
const addDiagnosticIndex = (buckets, key, diagnosticIndex) => {
|
|
70402
|
-
if (key === null) return;
|
|
70403
|
-
const diagnosticIndexes = buckets.get(key) ?? [];
|
|
70404
|
-
diagnosticIndexes.push(diagnosticIndex);
|
|
70405
|
-
buckets.set(key, diagnosticIndexes);
|
|
70406
|
-
};
|
|
70407
|
-
const takeMatchingDiagnosticIndex = (buckets, key, matchedDiagnosticIndexes) => {
|
|
70408
|
-
if (key === null) return null;
|
|
70409
|
-
for (const diagnosticIndex of buckets.get(key) ?? []) if (!matchedDiagnosticIndexes.has(diagnosticIndex)) return diagnosticIndex;
|
|
70410
|
-
return null;
|
|
70411
|
-
};
|
|
70412
|
-
const readDiagnosticEvidence = (diagnostic, readEvidence, readLine) => readEvidence?.(diagnostic) ?? readLine(diagnostic.filePath, diagnostic.line);
|
|
70413
|
-
const buildMatchCandidates = (diagnostics, readEvidence, readLine, renamedFiles = {}) => diagnostics.map((diagnostic, diagnosticIndex) => ({
|
|
70414
|
-
diagnosticIndex,
|
|
70415
|
-
...getDiagnosticMatchKeys({
|
|
70416
|
-
...diagnostic,
|
|
70417
|
-
filePath: renamedFiles[diagnostic.filePath] ?? diagnostic.filePath
|
|
70418
|
-
}, readDiagnosticEvidence(diagnostic, readEvidence, readLine))
|
|
70419
|
-
}));
|
|
70420
|
-
/**
|
|
70421
|
-
* Diffs a head scan against a base scan using a multiset of construct-level
|
|
70422
|
-
* evidence. Detector-provided identities take precedence when source text is
|
|
70423
|
-
* intentionally normalized. Otherwise, stable identities combine plugin/rule,
|
|
70424
|
-
* the diagnostic message, and normalized diagnosed source, so unchanged
|
|
70425
|
-
* findings can move across files while changed constructs or messages remain
|
|
70426
|
-
* new. Cardinality is retained for identical findings. Diagnostics explicitly marked
|
|
70427
|
-
* `matchByOccurrence` may fall back to same-file plugin/rule/message matching
|
|
70428
|
-
* after same-file strict evidence matching. Cross-file evidence matching runs
|
|
70429
|
-
* last so a copy cannot consume a reformatted local occurrence. Unreadable
|
|
70430
|
-
* evidence uses the same conservative fallback rather than matching across
|
|
70431
|
-
* files without proof.
|
|
70432
|
-
*/
|
|
70433
70415
|
const computeDiagnosticDelta = (input) => {
|
|
70434
|
-
const
|
|
70435
|
-
const
|
|
70436
|
-
|
|
70437
|
-
|
|
70438
|
-
|
|
70439
|
-
|
|
70440
|
-
|
|
70441
|
-
|
|
70442
|
-
|
|
70443
|
-
}
|
|
70444
|
-
const matchedHeadDiagnosticIndexes = /* @__PURE__ */ new Set();
|
|
70445
|
-
const matchedBaseDiagnosticIndexes = /* @__PURE__ */ new Set();
|
|
70446
|
-
const matchCandidates = (baseBuckets, getKey, onMatch) => {
|
|
70447
|
-
for (const candidate of headCandidates) {
|
|
70448
|
-
if (matchedHeadDiagnosticIndexes.has(candidate.diagnosticIndex)) continue;
|
|
70449
|
-
const baseDiagnosticIndex = takeMatchingDiagnosticIndex(baseBuckets, getKey(candidate), matchedBaseDiagnosticIndexes);
|
|
70450
|
-
if (baseDiagnosticIndex === null) continue;
|
|
70451
|
-
matchedHeadDiagnosticIndexes.add(candidate.diagnosticIndex);
|
|
70452
|
-
matchedBaseDiagnosticIndexes.add(baseDiagnosticIndex);
|
|
70453
|
-
onMatch?.(candidate.diagnosticIndex, baseDiagnosticIndex);
|
|
70454
|
-
}
|
|
70455
|
-
};
|
|
70456
|
-
matchCandidates(baseBySameFileStableEvidence, (candidate) => candidate.sameFileStableEvidenceKey);
|
|
70457
|
-
matchCandidates(baseBySameFileFallback, (candidate) => candidate.sameFileFallbackKey);
|
|
70458
|
-
let unrestrictedCrossFileMatchCount = 0;
|
|
70459
|
-
if (input.renamedFiles === void 0) matchCandidates(baseByStableEvidence, (candidate) => candidate.stableEvidenceKey, (headIndex, baseIndex) => {
|
|
70460
|
-
if (input.headDiagnostics[headIndex].filePath !== input.baseDiagnostics[baseIndex].filePath) unrestrictedCrossFileMatchCount += 1;
|
|
70416
|
+
const groups = /* @__PURE__ */ new Map();
|
|
70417
|
+
for (const isBase of [true, false]) (isBase ? input.baseDiagnostics : input.headDiagnostics).forEach((diagnostic, diagnosticIndex) => {
|
|
70418
|
+
const groupKey = `${isBase ? input.renamedFiles?.[diagnostic.filePath] ?? diagnostic.filePath : diagnostic.filePath}\0${diagnostic.plugin}/${diagnostic.rule}`;
|
|
70419
|
+
const group = groups.get(groupKey) ?? {
|
|
70420
|
+
headIndexes: [],
|
|
70421
|
+
baseIndexes: []
|
|
70422
|
+
};
|
|
70423
|
+
(isBase ? group.baseIndexes : group.headIndexes).push(diagnosticIndex);
|
|
70424
|
+
groups.set(groupKey, group);
|
|
70461
70425
|
});
|
|
70462
|
-
const
|
|
70426
|
+
const newIndexes = /* @__PURE__ */ new Set();
|
|
70427
|
+
let fixedCount = 0;
|
|
70428
|
+
let crossFileMatchCount = 0;
|
|
70429
|
+
let ruleCountMatchCount = 0;
|
|
70430
|
+
for (const group of groups.values()) {
|
|
70431
|
+
const matchedCount = Math.min(group.headIndexes.length, group.baseIndexes.length);
|
|
70432
|
+
fixedCount += group.baseIndexes.length - matchedCount;
|
|
70433
|
+
crossFileMatchCount += Math.min(matchedCount, group.baseIndexes.filter((diagnosticIndex) => Boolean(input.renamedFiles?.[input.baseDiagnostics[diagnosticIndex].filePath])).length);
|
|
70434
|
+
if (group.headIndexes.length <= group.baseIndexes.length) {
|
|
70435
|
+
ruleCountMatchCount += matchedCount;
|
|
70436
|
+
continue;
|
|
70437
|
+
}
|
|
70438
|
+
if (group.baseIndexes.length === 0) {
|
|
70439
|
+
for (const diagnosticIndex of group.headIndexes) newIndexes.add(diagnosticIndex);
|
|
70440
|
+
continue;
|
|
70441
|
+
}
|
|
70442
|
+
const headCandidates = buildMatchCandidates(input.headDiagnostics, group.headIndexes, input.readHeadEvidence, input.readHeadLine, (diagnostic) => diagnostic.line);
|
|
70443
|
+
const baseCandidates = buildMatchCandidates(input.baseDiagnostics, group.baseIndexes, input.readBaseEvidence, input.readBaseLine, (diagnostic) => input.mapBaseLine?.(input.renamedFiles?.[diagnostic.filePath] ?? diagnostic.filePath, diagnostic.line) ?? diagnostic.line).sort((left, right) => left.line - right.line);
|
|
70444
|
+
const unmatchedHeads = new Map(headCandidates.map((candidate) => [candidate.diagnosticIndex, candidate]));
|
|
70445
|
+
const unmatchedBases = new Set(baseCandidates);
|
|
70446
|
+
for (const matchKind of [
|
|
70447
|
+
"exact",
|
|
70448
|
+
"fingerprint",
|
|
70449
|
+
"message"
|
|
70450
|
+
]) {
|
|
70451
|
+
const headBuckets = /* @__PURE__ */ new Map();
|
|
70452
|
+
const keyFor = (candidate) => {
|
|
70453
|
+
if (matchKind === "message") return candidate.message;
|
|
70454
|
+
if (matchKind === "fingerprint") return candidate.fingerprint;
|
|
70455
|
+
if (candidate.fingerprint === null) return null;
|
|
70456
|
+
return JSON.stringify([candidate.fingerprint, candidate.message]);
|
|
70457
|
+
};
|
|
70458
|
+
for (const head of unmatchedHeads.values()) {
|
|
70459
|
+
const key = keyFor(head);
|
|
70460
|
+
if (key === null) continue;
|
|
70461
|
+
const bucket = headBuckets.get(key) ?? [];
|
|
70462
|
+
bucket.push(head);
|
|
70463
|
+
headBuckets.set(key, bucket);
|
|
70464
|
+
}
|
|
70465
|
+
for (const base of unmatchedBases) {
|
|
70466
|
+
const key = keyFor(base);
|
|
70467
|
+
const bucket = key === null ? void 0 : headBuckets.get(key);
|
|
70468
|
+
if (!bucket?.length) continue;
|
|
70469
|
+
let closestIndex = 0;
|
|
70470
|
+
for (let index = 1; index < bucket.length; index += 1) if (Math.abs(bucket[index].line - base.line) < Math.abs(bucket[closestIndex].line - base.line)) closestIndex = index;
|
|
70471
|
+
const [head] = bucket.splice(closestIndex, 1);
|
|
70472
|
+
unmatchedHeads.delete(head.diagnosticIndex);
|
|
70473
|
+
unmatchedBases.delete(base);
|
|
70474
|
+
if (matchKind !== "exact") ruleCountMatchCount += 1;
|
|
70475
|
+
}
|
|
70476
|
+
}
|
|
70477
|
+
for (const base of unmatchedBases) {
|
|
70478
|
+
let bestHead;
|
|
70479
|
+
let bestRank;
|
|
70480
|
+
for (const head of unmatchedHeads.values()) {
|
|
70481
|
+
const rank = rankDiagnosticMatch(head, base);
|
|
70482
|
+
if (!bestRank || compareMatchRanks(rank, bestRank) < 0) {
|
|
70483
|
+
bestHead = head;
|
|
70484
|
+
bestRank = rank;
|
|
70485
|
+
}
|
|
70486
|
+
}
|
|
70487
|
+
if (bestHead) {
|
|
70488
|
+
unmatchedHeads.delete(bestHead.diagnosticIndex);
|
|
70489
|
+
ruleCountMatchCount += 1;
|
|
70490
|
+
}
|
|
70491
|
+
}
|
|
70492
|
+
for (const diagnosticIndex of unmatchedHeads.keys()) newIndexes.add(diagnosticIndex);
|
|
70493
|
+
}
|
|
70463
70494
|
return {
|
|
70464
|
-
newDiagnostics: input.headDiagnostics.filter((_diagnostic,
|
|
70465
|
-
fixedCount
|
|
70466
|
-
crossFileMatchCount
|
|
70495
|
+
newDiagnostics: input.headDiagnostics.filter((_diagnostic, index) => newIndexes.has(index)),
|
|
70496
|
+
fixedCount,
|
|
70497
|
+
crossFileMatchCount,
|
|
70498
|
+
ruleCountMatchCount
|
|
70467
70499
|
};
|
|
70468
70500
|
};
|
|
70469
70501
|
const isDuplicateJsxWorkerReply = (value) => typeof value === "object" && value !== null && "id" in value && typeof value.id === "number" && "ok" in value && typeof value.ok === "boolean";
|
|
@@ -76481,6 +76513,7 @@ const buildJsonReport = (input) => {
|
|
|
76481
76513
|
return {
|
|
76482
76514
|
directory,
|
|
76483
76515
|
packageRoot: result.project.rootDirectory,
|
|
76516
|
+
...result.sourceFilterConfigHash ? { sourceFilterConfigHash: result.sourceFilterConfigHash } : {},
|
|
76484
76517
|
framework: result.project.framework,
|
|
76485
76518
|
project: result.project,
|
|
76486
76519
|
diagnostics: result.diagnostics.map((diagnostic) => toJsonReportDiagnostic(diagnostic, result.project.rootDirectory, input.directory)),
|
|
@@ -76612,6 +76645,47 @@ const getChangedLineRanges = (input) => runPromise(gen(function* () {
|
|
|
76612
76645
|
}));
|
|
76613
76646
|
}).pipe(provide(Git.layerNode)));
|
|
76614
76647
|
/**
|
|
76648
|
+
* Array-shaped wrapper over `buildDiagnosticPipeline` for legacy
|
|
76649
|
+
* callers and tests. Production code uses the streaming pipeline
|
|
76650
|
+
* inside `runInspect`; this thin shim runs the same per-element
|
|
76651
|
+
* closure over an in-memory diagnostic array.
|
|
76652
|
+
*/
|
|
76653
|
+
const mergeAndFilterDiagnostics = (mergedDiagnostics, directory, userConfig, readFileLinesSync, options = {}) => {
|
|
76654
|
+
const pipeline = buildDiagnosticPipeline({
|
|
76655
|
+
rootDirectory: directory,
|
|
76656
|
+
userConfig,
|
|
76657
|
+
readFileLinesSync,
|
|
76658
|
+
respectInlineDisables: options.respectInlineDisables ?? true,
|
|
76659
|
+
showWarnings: options.warnings ?? userConfig?.warnings ?? true
|
|
76660
|
+
});
|
|
76661
|
+
const result = [];
|
|
76662
|
+
for (const diagnostic of mergedDiagnostics) {
|
|
76663
|
+
const filtered = pipeline.apply(diagnostic);
|
|
76664
|
+
if (filtered !== null) result.push(filtered);
|
|
76665
|
+
}
|
|
76666
|
+
return dedupeRelatedDiagnostics(result);
|
|
76667
|
+
};
|
|
76668
|
+
const lookupOwnRule = (rule) => Object.hasOwn(REACT_DOCTOR_RULE_REGISTRY, rule) ? REACT_DOCTOR_RULE_REGISTRY[rule] : void 0;
|
|
76669
|
+
/**
|
|
76670
|
+
* Returns presentation metadata for `<plugin>/<rule>`, or `null` when the
|
|
76671
|
+
* rule is not part of the bundled react-doctor plugin (e.g. an adopted
|
|
76672
|
+
* `eslint` / `unicorn` rule folded in via the user's lint config — those
|
|
76673
|
+
* carry their own help/url on the diagnostic instead).
|
|
76674
|
+
*/
|
|
76675
|
+
const getRuleMetadata = (plugin, rule) => {
|
|
76676
|
+
if (plugin !== "react-doctor") return null;
|
|
76677
|
+
const definition = lookupOwnRule(rule);
|
|
76678
|
+
if (!definition) return null;
|
|
76679
|
+
return {
|
|
76680
|
+
id: rule,
|
|
76681
|
+
plugin,
|
|
76682
|
+
category: definition.category ?? null,
|
|
76683
|
+
recommendation: definition.recommendation ?? null,
|
|
76684
|
+
tags: definition.tags ?? [],
|
|
76685
|
+
defaultEnabled: definition.defaultEnabled ?? true
|
|
76686
|
+
};
|
|
76687
|
+
};
|
|
76688
|
+
/**
|
|
76615
76689
|
* Canonical URL for a rule's documentation page — its reviewer-tested fix
|
|
76616
76690
|
* recipe rendered for humans — served at
|
|
76617
76691
|
* `https://react.doctor/docs/rules/<plugin>/<rule>`. The CLI links here
|
|
@@ -76845,6 +76919,7 @@ const GITHUB_ACTION_MARKER_ENVIRONMENT_VARIABLE = "REACT_DOCTOR_GITHUB_ACTION";
|
|
|
76845
76919
|
const ACTION_INPUT_ENVIRONMENT_VARIABLES = {
|
|
76846
76920
|
blocking: "REACT_DOCTOR_ACTION_BLOCKING",
|
|
76847
76921
|
comment: "REACT_DOCTOR_ACTION_COMMENT",
|
|
76922
|
+
commentOnClean: "REACT_DOCTOR_ACTION_COMMENT_ON_CLEAN",
|
|
76848
76923
|
reviewComments: "REACT_DOCTOR_ACTION_REVIEW_COMMENTS",
|
|
76849
76924
|
version: "REACT_DOCTOR_ACTION_VERSION"
|
|
76850
76925
|
};
|
|
@@ -77020,7 +77095,7 @@ const makeNoopConsole = () => ({
|
|
|
77020
77095
|
});
|
|
77021
77096
|
//#endregion
|
|
77022
77097
|
//#region src/cli/utils/version.ts
|
|
77023
|
-
const VERSION = "0.9.
|
|
77098
|
+
const VERSION = "0.9.17-dev.066a7c7";
|
|
77024
77099
|
//#endregion
|
|
77025
77100
|
//#region src/cli/utils/json-mode.ts
|
|
77026
77101
|
let context = null;
|
|
@@ -77362,7 +77437,7 @@ const recordDistribution = (name, value, options = {}) => {
|
|
|
77362
77437
|
} catch {}
|
|
77363
77438
|
};
|
|
77364
77439
|
//#endregion
|
|
77365
|
-
export { buildRuleSeverityControls as $,
|
|
77440
|
+
export { buildRuleSeverityControls as $, setColorEnabled as $t, Files as A, provide$2 as An, hashFileContents as At, PerFileLintCacheEnabled as B, toCanonicalPath as Bn, listWorkspacePackages as Bt, ACTION_INPUT_ENVIRONMENT_VARIABLES as C, runPromise as Cn, getDiagnosticRuleIdentity as Ct, isCodingAgentEnvironment as D, void_ as Dn, groupBy as Dt, isCiOrCodingAgentEnvironment as E, try_ as En, getRuleMetadata as Et, Linter as F, void_$1 as Fn, isSameRuleKey as Ft, SidecarLintCacheEnabled as G, mergeReactDoctorConfigs as Gt, Project as H, isErrnoException as Hn, mapWithConcurrency as Ht, Maintainability as I, ParentSpan as In, isScanComplete as It, anonymizeInPlace as J, resolveLintBatchOrdering as Jt, StagedFiles as K, remainingDeadlineBudgetMs as Kt, NodeResolver as L, isMonorepoRoot as Ln, layerObservability as Lt, InvocationCaches as M, close as Mn, isPathInsideDirectory as Mt, LEGACY_CONFIG_FILENAME as N, makeUnsafe$5 as Nn, isProjectDiscoveryError as Nt, Config as O, buildWithScope as On, hasPublishedFixRecipe as Ot, LintPartialFailures as P, fail$5 as Pn, isReactDoctorError as Pt, buildRuleDocsUrl as Q, scrubSensitivePaths as Qt, OxlintConcurrency as R, yieldToEventLoop as Rn, listSourceFiles as Rt, isDebugFlagEnabled as S, provideService as Sn, getChangedLineRanges as St, isCiEnvironment as T, sync as Tn, getEquivalentRuleKeys as Tt, Reporter as U, isFile as Un, materializeSourceTree as Ut, Progress as V, isDirectory as Vn, loadConfigWithSource as Vt, Score as W, isPlainObject as Wn, mergeAndFilterDiagnostics as Wt, atomicWriteJson as X, restoreLegacyThrow as Xt, anonymizeText as Y, resolveScanTarget as Yt, buildJsonReport as Z, runInspect as Zt, VERSION as _, map$3 as _n, findLegacyConfig as _t, isEnvFlagEnabled as a, warmOxlintWorkerPool as an, collectSourceFilesByDirectory as at, isNonInteractiveEnvironment as b, provide as bn, formatReactDoctorError as bt, setSentryProjectInfo as c, info as cn, countOptInProjectRuleSelections as ct, isJsonModeActive as d, Diagnostic as dn, detectAiTrainingEnvironment as dt, shouldUseMaintainabilityLayer as en, buildSkippedChecks as et, setJsonReportDirectory as f, JsonReport as fn, discoverSupportedSubprojects as ft, writeJsonReport as g, makeSpan$1 as gn, findGitRepositoryRoot as gt, writeJsonErrorReport as h, gen as hn, filterSourceFiles as ht, isTelemetryEnabled as i, warmDuplicateJsxWorker as in, clearConfigCache as it, Git as j, succeed$3 as jn, highlighter as jt, DIAGNOSTIC_DELTA_IDENTITY as k, mergeAll$1 as kn, hasSupportedFrameworkOrLibrary as kt, getRunId as l, log as ln, createInvocationCaches as lt, writeJsonCancellationReport as m, make$30 as mn, filterPathsOutsideDirectories as mt, recordDistribution as n, toRelativePath as nn, canonicalizeUserRuleKey as nt, buildSentryScope as o, Console as on, computeConfigFingerprint as ot, setJsonReportMode as p, decodeUnknownSync as pn, filterDiagnosticsForSurface as pt, SupplyChain as q, resolveGithubActionsScoreMetadata as qt, toSpanAttributes as r, validateConfigTypes as rn, classifyFileContext as rt, buildSentryProjectContext as s, error as sn, computeDiagnosticDelta as st, recordCount as t, summarizeDiagnostics as tn, calculateScore as tt, enableJsonMode as u, warn$1 as un, createOxlintSpawnSlots as ut, makeNoopConsole as v, orElseSucceed as vn, fingerprintDiagnosticEvidence as vt, detectRunnerOs as w, runSync as wn, getDiffInfo as wt, isGitHookEnvironment as x, provideContext as xn, getBaselineDiffPlan as xt, CliInputError as y, promise as yn, formatErrorChain as yt, OxlintSpawnSlots as z, messageFromUnknown as zn, listSourceFilesCooperative as zt };
|
|
77366
77441
|
|
|
77367
|
-
//# sourceMappingURL=record-metric-
|
|
77368
|
-
//# debugId=
|
|
77442
|
+
//# sourceMappingURL=record-metric-C5UBQqkS.js.map
|
|
77443
|
+
//# debugId=9e84f68b-abc2-5a15-bdc5-51d1554ac402
|
|
@@ -1,8 +1,8 @@
|
|
|
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]="
|
|
3
|
-
import { S as SENTRY_FLUSH_TIMEOUT_MS, u as METRIC } from "./constants-
|
|
4
|
-
import {
|
|
5
|
-
import { i as getSentry, n as shutdownTelemetry, o as isExpectedUserError } from "./telemetry-runtime-
|
|
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]="cc677f20-9f93-54a0-a957-cc0b53d382d4")}catch(e){}}();
|
|
3
|
+
import { S as SENTRY_FLUSH_TIMEOUT_MS, u as METRIC } from "./constants-Bwylqy0B.js";
|
|
4
|
+
import { Pt as isReactDoctorError, l as getRunId, o as buildSentryScope, t as recordCount } from "./record-metric-C5UBQqkS.js";
|
|
5
|
+
import { i as getSentry, n as shutdownTelemetry, o as isExpectedUserError } from "./telemetry-runtime-Cgsi8HjU.js";
|
|
6
6
|
import { r as recordRunTraceId, t as getActiveRunTrace } from "./active-run-trace-Dewycxda.js";
|
|
7
7
|
//#region src/cli/utils/report-error.ts
|
|
8
8
|
/**
|
|
@@ -61,5 +61,5 @@ const reportErrorToSentry = async (error) => {
|
|
|
61
61
|
//#endregion
|
|
62
62
|
export { reportErrorToSentry as t };
|
|
63
63
|
|
|
64
|
-
//# sourceMappingURL=report-error-
|
|
65
|
-
//# debugId=
|
|
64
|
+
//# sourceMappingURL=report-error-N4i-Hejx.js.map
|
|
65
|
+
//# debugId=cc677f20-9f93-54a0-a957-cc0b53d382d4
|
|
@@ -1,8 +1,8 @@
|
|
|
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]="
|
|
3
|
-
import { m as REACT_DOCTOR_CONFIG_PROJECT_NAME, u as METRIC } from "./constants-
|
|
4
|
-
import { t as recordCount } from "./record-metric-
|
|
5
|
-
import { u as isCommandAvailable } from "./install-github-workflow-
|
|
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]="fe693379-aba9-5966-9428-1493f338918c")}catch(e){}}();
|
|
3
|
+
import { m as REACT_DOCTOR_CONFIG_PROJECT_NAME, u as METRIC } from "./constants-Bwylqy0B.js";
|
|
4
|
+
import { t as recordCount } from "./record-metric-C5UBQqkS.js";
|
|
5
|
+
import { u as isCommandAvailable } from "./install-github-workflow-BcHvpq2i.js";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import * as path$1 from "node:path";
|
|
8
8
|
import { spawn } from "node:child_process";
|
|
@@ -274,7 +274,8 @@ const openUrl = (url) => new Promise((resolve) => {
|
|
|
274
274
|
//#region src/cli/utils/report-workflow-result.ts
|
|
275
275
|
const reportWorkflowResult = (workflowSpinner, result, projectRoot) => {
|
|
276
276
|
if (result.status === "failed") {
|
|
277
|
-
workflowSpinner.fail("Couldn't write the GitHub Actions workflow.");
|
|
277
|
+
if (result.error === "no-git-root") workflowSpinner.fail("Couldn't write the GitHub Actions workflow: no git repository found. Run this command from inside a git repository.");
|
|
278
|
+
else workflowSpinner.fail("Couldn't write the GitHub Actions workflow.");
|
|
278
279
|
return false;
|
|
279
280
|
}
|
|
280
281
|
if (result.status === "exists") {
|
|
@@ -288,5 +289,5 @@ const reportWorkflowResult = (workflowSpinner, result, projectRoot) => {
|
|
|
288
289
|
//#endregion
|
|
289
290
|
export { recordGate as a, ACTION_UPGRADE_EVENT as c, INSTALL_AGENTS_PREFERENCE_ID as d, ONBOARDING_EVENT as f, loadAgentInstall as g, detectAvailableAgents as h, readPreference as i, CI_PITCH_EVENT as l, computeDefaultSelectedAgents as m, openUrl as n, runMigrations as o, SETUP_HINT_EVENT as p, isGatePending as r, writePreference as s, reportWorkflowResult as t, HANDOFF_TARGET_PREFERENCE_ID as u };
|
|
290
291
|
|
|
291
|
-
//# sourceMappingURL=report-workflow-result-
|
|
292
|
-
//# debugId=
|
|
292
|
+
//# sourceMappingURL=report-workflow-result-Ci5GLxeI.js.map
|
|
293
|
+
//# debugId=fe693379-aba9-5966-9428-1493f338918c
|