react-doctor 0.9.18 → 0.9.19-dev.2c5d72c
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/{build-section-divider-Dpv0R267.js → build-section-divider-CJ-x02h0.js} +5 -5
- package/dist/{ci-GE7HpZZO.js → ci-BZI5zvYM.js} +13 -13
- package/dist/cli.js +25 -25
- package/dist/{constants-_b1h6lxa.js → constants-CBmbPBA4.js} +6 -5
- package/dist/constants-DNh19qg9.js +2 -2
- package/dist/{design-BEEzwtu-.js → design-BKrYfOfm.js} +4 -4
- package/dist/{exit-gracefully-Cp3r9mjN.js → exit-gracefully-DcyXZcqm.js} +6 -6
- package/dist/{handle-error-UbC9DMvZ.js → handle-error-BQ0C5xTU.js} +6 -6
- package/dist/index.d.ts +3 -2
- package/dist/index.js +304 -36
- package/dist/{inspect-BJleAXM5.js → inspect-CmU5JhiH.js} +16 -16
- package/dist/{install-YHgG6Rzc.js → install-DdNBJ1DK.js} +10 -10
- package/dist/{install-doctor-script-BvrxLUFo.js → install-doctor-script-CWIsVQ9v.js} +5 -5
- package/dist/{install-github-workflow-BABtyGBR.js → install-github-workflow-0fuv6nHk.js} +6 -6
- package/dist/{install-react-doctor-WkrWOqc4.js → install-react-doctor-BhGIaCoA.js} +9 -9
- package/dist/{is-cache-globally-disabled-BTTLvugj.js → is-cache-globally-disabled-BbehqqPi.js} +4 -4
- package/dist/{jsx-runtime-mnxPtbiq.js → jsx-runtime-KvdvQwRU.js} +6 -6
- package/dist/{print-branded-header-D1eqThu5.js → print-branded-header-CFeORBcq.js} +4 -4
- package/dist/{prompt-runtime-scan-url-DkntQoEi.js → prompt-runtime-scan-url-CiZ9Mq33.js} +5 -5
- package/dist/{read-object-file-D9jF1KIF.js → read-object-file-BGC8MAOz.js} +4 -4
- package/dist/{record-metric-AbxY4m3i.js → record-metric-XodT8W8_.js} +337 -58
- package/dist/{report-error-D3uGbvdG.js → report-error-C6KS9c_Y.js} +6 -6
- package/dist/{report-workflow-result-DQ2CaExl.js → report-workflow-result-CR4uqr4z.js} +6 -6
- package/dist/{resolve-scan-exit-code-CKO-d5OH.js → resolve-scan-exit-code-C5WlxWT5.js} +14 -13
- package/dist/{resolve-scope-D27oa5iH.js → resolve-scope-DxC2ZYT-.js} +6 -6
- package/dist/{rules-DMV85h9u.js → rules-BWX6xkKo.js} +7 -7
- package/dist/{run-scan-app-BS_zTwT4.js → run-scan-app-B3KtnarC.js} +11 -11
- package/dist/{runtime-scan-CNSkDPqQ.js → runtime-scan-BDG1Kr_b.js} +10 -10
- package/dist/{sanitize-runtime-url-RZN3i1Kf.js → sanitize-runtime-url-DV0OeCaY.js} +4 -4
- package/dist/{scan-CShLBeps.js → scan-BAJlwgKE.js} +10 -10
- package/dist/{should-skip-prompts-DrbDyg_I.js → should-skip-prompts-B4MPJTRl.js} +4 -4
- package/dist/{should-use-tui-ZZii9Kea.js → should-use-tui-B8X9qDfr.js} +4 -4
- package/dist/skills/react-doctor/SKILL.md +6 -0
- package/dist/{start-scan-preamble-BbzEgrwo.js → start-scan-preamble-CC9PH7Zr.js} +5 -5
- package/dist/start-scan-preamble.js +3 -3
- package/dist/{telemetry-runtime-B0ira8s1.js → telemetry-runtime-DCZr7D76.js} +7 -7
- package/dist/{version-DjYlkGhN.js → version-BJIZNpXG.js} +5 -5
- package/dist/{why-7TTdEYqN.js → why-Bpn1xfg4.js} +4 -4
- package/dist/{with-run-span-353qeuiD.js → with-run-span-YA8mLZIX.js} +6 -6
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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]="f63b0406-6e8f-5f5b-b096-50e1c0f42305")}catch(e){}}();
|
|
3
3
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import * as fs$1$2 from "node:fs";
|
|
@@ -13,20 +13,20 @@ import { fileURLToPath } from "node:url";
|
|
|
13
13
|
import * as os$1 from "node:os";
|
|
14
14
|
import os from "node:os";
|
|
15
15
|
import * as Crypto from "node:crypto";
|
|
16
|
-
import crypto, { createHash
|
|
16
|
+
import crypto, { createHash } from "node:crypto";
|
|
17
17
|
import { Worker } from "node:worker_threads";
|
|
18
18
|
import * as net from "node:net";
|
|
19
19
|
import { parseSync } from "oxc-parser";
|
|
20
20
|
import * as fs$1$1 from "node:fs/promises";
|
|
21
21
|
import { ResolverFactory } from "oxc-resolver";
|
|
22
|
-
import { ALL_REACT_DOCTOR_RULE_KEYS, CROSS_FILE_DEPENDENCY_COLLECTORS, CROSS_FILE_RULE_IDS, FRAMEWORK_SPECIFIC_RULE_KEYS, FRAMEWORK_TOKENS, MOTION_LIBRARY_PACKAGES, REACT_COMPILER_RULES, REACT_DOCTOR_OPT_IN_PROJECT_RULE_IDS, REACT_DOCTOR_PROJECT_RULES, REACT_DOCTOR_RULES, REACT_DOCTOR_RULE_REGISTRY, REACT_DOCTOR_SCAN_RULES, classifySecurityScanFile, collectCrossFileDependencyProbes, resetManifestCaches, shouldReadSecurityScanContent } from "oxlint-plugin-react-doctor/core";
|
|
22
|
+
import { ALL_REACT_DOCTOR_RULE_KEYS, CROSS_FILE_DEPENDENCY_COLLECTORS, CROSS_FILE_RULE_IDS, FRAMEWORK_SPECIFIC_RULE_KEYS, FRAMEWORK_TOKENS, MOTION_LIBRARY_PACKAGES, REACT_COMPILER_RULES, REACT_DOCTOR_OPT_IN_PROJECT_RULE_IDS, REACT_DOCTOR_PROJECT_RULES, REACT_DOCTOR_RULES, REACT_DOCTOR_RULE_REGISTRY, REACT_DOCTOR_SCAN_RULES, atomicWriteFile, classifySecurityScanFile, collectCrossFileDependencyProbes, getDiagnosticContextPath, resetManifestCaches, shouldReadSecurityScanContent } from "oxlint-plugin-react-doctor/core";
|
|
23
23
|
import { parseJSON5, parseJSONC } from "confbox";
|
|
24
24
|
import { createJiti } from "jiti";
|
|
25
25
|
import { PassThrough } from "node:stream";
|
|
26
26
|
import { convertToTSX } from "@astrojs/compiler/sync";
|
|
27
27
|
import { STATUS_CODES } from "node:http";
|
|
28
28
|
import { gzipSync } from "node:zlib";
|
|
29
|
-
//#region ../core/dist/constants-
|
|
29
|
+
//#region ../core/dist/constants-Bfo63bV_.js
|
|
30
30
|
const HTML_FILE_PATTERN = /\.html$/i;
|
|
31
31
|
const SOURCE_FILE_PATTERN = /\.(?:astro|tsx?|jsx?|mts|mjs|[hH][tT][mM][lL])$/;
|
|
32
32
|
const GENERATED_BUNDLE_FILE_PATTERN = /\.(iife|umd|global|min)\.m?js$/i;
|
|
@@ -58,6 +58,7 @@ const IGNORED_DIRECTORIES = new Set([
|
|
|
58
58
|
".next",
|
|
59
59
|
".nuxt",
|
|
60
60
|
".nx",
|
|
61
|
+
".open-next",
|
|
61
62
|
".output",
|
|
62
63
|
".parcel-cache",
|
|
63
64
|
".serverless",
|
|
@@ -439,7 +440,7 @@ const isPlainObject = (value) => {
|
|
|
439
440
|
//#region ../core/dist/react-compiler-detection-worker-protocol-Dp5LlrE8.js
|
|
440
441
|
const isReactCompilerDetectionReply = (value) => typeof value === "object" && value !== null && "id" in value && typeof value.id === "number" && "hasReactCompiler" in value && (typeof value.hasReactCompiler === "boolean" || value.hasReactCompiler === null);
|
|
441
442
|
//#endregion
|
|
442
|
-
//#region ../core/dist/react-compiler-detection-client-
|
|
443
|
+
//#region ../core/dist/react-compiler-detection-client-D6vRhKk7.js
|
|
443
444
|
const pendingOutputsByRequestKey = /* @__PURE__ */ new Map();
|
|
444
445
|
const toRequestKey = (request) => [
|
|
445
446
|
request.directory,
|
|
@@ -2709,7 +2710,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2709
2710
|
module.exports = picomatch;
|
|
2710
2711
|
}));
|
|
2711
2712
|
//#endregion
|
|
2712
|
-
//#region ../core/dist/collect-unplugin-auto-import-global-scopes-
|
|
2713
|
+
//#region ../core/dist/collect-unplugin-auto-import-global-scopes-CxJHEp2_.js
|
|
2713
2714
|
var import_picomatch = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2714
2715
|
const pico = require_picomatch$1();
|
|
2715
2716
|
const utils = require_utils();
|
|
@@ -3159,7 +3160,7 @@ const collectUnpluginAutoImportGlobalScopes = ({ rootDirectory, candidateFiles }
|
|
|
3159
3160
|
return scopes.some((scope) => scope.names.length > 0) ? scopes : [];
|
|
3160
3161
|
};
|
|
3161
3162
|
//#endregion
|
|
3162
|
-
//#region ../core/dist/detect-duplicate-jsx-subtrees-
|
|
3163
|
+
//#region ../core/dist/detect-duplicate-jsx-subtrees-CC2sqFAB.js
|
|
3163
3164
|
const yieldToEventLoop = () => new Promise((resolve) => {
|
|
3164
3165
|
setImmediate(resolve);
|
|
3165
3166
|
});
|
|
@@ -3716,7 +3717,7 @@ const detectDuplicateJsxSubtreesCooperative = async (sourceReader, options = {})
|
|
|
3716
3717
|
});
|
|
3717
3718
|
};
|
|
3718
3719
|
//#endregion
|
|
3719
|
-
//#region ../core/dist/detect-react-compiler-
|
|
3720
|
+
//#region ../core/dist/detect-react-compiler-CTmgM0WG.js
|
|
3720
3721
|
const NEXT_CONFIG_FILENAMES = [
|
|
3721
3722
|
"next.config.js",
|
|
3722
3723
|
"next.config.mjs",
|
|
@@ -7838,6 +7839,37 @@ const mapInput = /* @__PURE__ */ dual(2, (self, f) => make$37((b1, b2) => self(f
|
|
|
7838
7839
|
*/
|
|
7839
7840
|
const isGreaterThan$1 = (O) => dual(2, (self, that) => O(self, that) === 1);
|
|
7840
7841
|
/**
|
|
7842
|
+
* Checks whether one value is greater than or equal to another according to the given order.
|
|
7843
|
+
*
|
|
7844
|
+
* **When to use**
|
|
7845
|
+
*
|
|
7846
|
+
* Use when you need a boolean greater-than-or-equal predicate using an
|
|
7847
|
+
* `Order`.
|
|
7848
|
+
*
|
|
7849
|
+
* **Details**
|
|
7850
|
+
*
|
|
7851
|
+
* Returns `true` if the order returns `1` or `0`, and returns `false` only if
|
|
7852
|
+
* the order returns `-1`.
|
|
7853
|
+
*
|
|
7854
|
+
* **Example** (Checking greater-than-or-equal comparisons)
|
|
7855
|
+
*
|
|
7856
|
+
* ```ts
|
|
7857
|
+
* import { Order } from "effect"
|
|
7858
|
+
*
|
|
7859
|
+
* const isGreaterThanOrEqualToNumber = Order.isGreaterThanOrEqualTo(Order.Number)
|
|
7860
|
+
*
|
|
7861
|
+
* console.log(isGreaterThanOrEqualToNumber(2, 1)) // true
|
|
7862
|
+
* console.log(isGreaterThanOrEqualToNumber(1, 1)) // true
|
|
7863
|
+
* console.log(isGreaterThanOrEqualToNumber(1, 2)) // false
|
|
7864
|
+
* ```
|
|
7865
|
+
*
|
|
7866
|
+
* @see {@link isGreaterThan} for strict greater than
|
|
7867
|
+
* @see {@link isLessThanOrEqualTo} for less than or equal
|
|
7868
|
+
* @category predicates
|
|
7869
|
+
* @since 4.0.0
|
|
7870
|
+
*/
|
|
7871
|
+
const isGreaterThanOrEqualTo$1 = (O) => dual(2, (self, that) => O(self, that) !== -1);
|
|
7872
|
+
/**
|
|
7841
7873
|
* Returns the maximum of two values according to the given order. If they are equal, returns the first argument.
|
|
7842
7874
|
*
|
|
7843
7875
|
* **When to use**
|
|
@@ -24722,6 +24754,203 @@ function link$1() {
|
|
|
24722
24754
|
};
|
|
24723
24755
|
}
|
|
24724
24756
|
/**
|
|
24757
|
+
* Creates a custom validation filter from a predicate function.
|
|
24758
|
+
*
|
|
24759
|
+
* **Details**
|
|
24760
|
+
*
|
|
24761
|
+
* The predicate receives the decoded input value, the schema AST, and parse
|
|
24762
|
+
* options, and returns a `FilterOutput`. Non-success outputs are normalized into
|
|
24763
|
+
* schema issues. The `annotations` parameter annotates the filter itself; with
|
|
24764
|
+
* the default formatter, failures use `message` first, `expected` second, and
|
|
24765
|
+
* `<filter>` when neither is provided.
|
|
24766
|
+
*
|
|
24767
|
+
* When `abort` is `true`, parsing stops after this filter fails instead of
|
|
24768
|
+
* collecting later check failures.
|
|
24769
|
+
*
|
|
24770
|
+
* **Example** (Reporting failure at a nested path)
|
|
24771
|
+
*
|
|
24772
|
+
* ```ts
|
|
24773
|
+
* import { Schema } from "effect"
|
|
24774
|
+
*
|
|
24775
|
+
* const schema = Schema.Struct({ password: Schema.String, confirmPassword: Schema.String }).check(
|
|
24776
|
+
* Schema.makeFilter((o) =>
|
|
24777
|
+
* o.password === o.confirmPassword
|
|
24778
|
+
* ? undefined
|
|
24779
|
+
* : { path: ["password"], issue: "password and confirmPassword must match" }
|
|
24780
|
+
* )
|
|
24781
|
+
* )
|
|
24782
|
+
*
|
|
24783
|
+
* console.log(String(Schema.decodeUnknownExit(schema)({ password: "123456", confirmPassword: "1234567" })))
|
|
24784
|
+
* // Failure(Cause([Fail(SchemaError: password and confirmPassword must match
|
|
24785
|
+
* // at ["password"])]))
|
|
24786
|
+
* ```
|
|
24787
|
+
*
|
|
24788
|
+
* **Example** (Reporting multiple failures at once)
|
|
24789
|
+
*
|
|
24790
|
+
* ```ts
|
|
24791
|
+
* import { Schema } from "effect"
|
|
24792
|
+
*
|
|
24793
|
+
* const schema = Schema.Struct({ a: Schema.Finite, b: Schema.Finite, c: Schema.Finite }).check(
|
|
24794
|
+
* Schema.makeFilter((o) => {
|
|
24795
|
+
* const issues: Array<Schema.FilterIssue> = []
|
|
24796
|
+
* if (o.a > 0) {
|
|
24797
|
+
* if (o.b <= 0) issues.push({ path: ["b"], issue: "b must be greater than 0" })
|
|
24798
|
+
* if (o.c <= 0) issues.push({ path: ["c"], issue: "c must be greater than 0" })
|
|
24799
|
+
* }
|
|
24800
|
+
* return issues
|
|
24801
|
+
* })
|
|
24802
|
+
* )
|
|
24803
|
+
*
|
|
24804
|
+
* console.log(String(Schema.decodeUnknownExit(schema)({ a: 1, b: 0, c: 0 })))
|
|
24805
|
+
* // Failure(Cause([Fail(SchemaError: b must be greater than 0
|
|
24806
|
+
* // at ["b"]
|
|
24807
|
+
* // c must be greater than 0
|
|
24808
|
+
* // at ["c"])]))
|
|
24809
|
+
* ```
|
|
24810
|
+
*
|
|
24811
|
+
* @category constructors
|
|
24812
|
+
* @since 4.0.0
|
|
24813
|
+
*/
|
|
24814
|
+
const makeFilter = makeFilter$1;
|
|
24815
|
+
/**
|
|
24816
|
+
* Creates a greater-than (`>`) check for any ordered type from an
|
|
24817
|
+
* `Order.Order` instance.
|
|
24818
|
+
*
|
|
24819
|
+
* @category Order checks
|
|
24820
|
+
* @since 4.0.0
|
|
24821
|
+
*/
|
|
24822
|
+
function makeIsGreaterThan(options) {
|
|
24823
|
+
const gt = isGreaterThan$1(options.order);
|
|
24824
|
+
const formatter = options.formatter ?? format$1;
|
|
24825
|
+
return (exclusiveMinimum, annotations) => {
|
|
24826
|
+
return makeFilter((input) => gt(input, exclusiveMinimum), {
|
|
24827
|
+
expected: `a value greater than ${formatter(exclusiveMinimum)}`,
|
|
24828
|
+
arbitrary: { constraint: { ordered: {
|
|
24829
|
+
order: options.order,
|
|
24830
|
+
minimum: exclusiveMinimum,
|
|
24831
|
+
exclusiveMinimum: true
|
|
24832
|
+
} } },
|
|
24833
|
+
...options.annotate?.(exclusiveMinimum),
|
|
24834
|
+
...annotations
|
|
24835
|
+
});
|
|
24836
|
+
};
|
|
24837
|
+
}
|
|
24838
|
+
/**
|
|
24839
|
+
* Creates a greater-than-or-equal-to (`>=`) check for any ordered type from an
|
|
24840
|
+
* `Order.Order` instance.
|
|
24841
|
+
*
|
|
24842
|
+
* @category Order checks
|
|
24843
|
+
* @since 4.0.0
|
|
24844
|
+
*/
|
|
24845
|
+
function makeIsGreaterThanOrEqualTo(options) {
|
|
24846
|
+
const gte = isGreaterThanOrEqualTo$1(options.order);
|
|
24847
|
+
const formatter = options.formatter ?? format$1;
|
|
24848
|
+
return (minimum, annotations) => {
|
|
24849
|
+
return makeFilter((input) => gte(input, minimum), {
|
|
24850
|
+
expected: `a value greater than or equal to ${formatter(minimum)}`,
|
|
24851
|
+
arbitrary: { constraint: { ordered: {
|
|
24852
|
+
order: options.order,
|
|
24853
|
+
minimum
|
|
24854
|
+
} } },
|
|
24855
|
+
...options.annotate?.(minimum),
|
|
24856
|
+
...annotations
|
|
24857
|
+
});
|
|
24858
|
+
};
|
|
24859
|
+
}
|
|
24860
|
+
function encodeNumberPayload(number) {
|
|
24861
|
+
if (!globalThis.Number.isFinite(number)) throw new globalThis.RangeError(`Expected a finite number, got ${format$1(number)}`);
|
|
24862
|
+
return number;
|
|
24863
|
+
}
|
|
24864
|
+
/**
|
|
24865
|
+
* Validates that a number is greater than the specified value (exclusive).
|
|
24866
|
+
*
|
|
24867
|
+
* **Details**
|
|
24868
|
+
*
|
|
24869
|
+
* JSON Schema:
|
|
24870
|
+
*
|
|
24871
|
+
* This check corresponds to the `exclusiveMinimum` constraint in JSON Schema.
|
|
24872
|
+
*
|
|
24873
|
+
* Arbitrary:
|
|
24874
|
+
*
|
|
24875
|
+
* When generating test data with fast-check, this applies an
|
|
24876
|
+
* `exclusiveMinimum` constraint to ensure generated numbers are greater than
|
|
24877
|
+
* the specified value.
|
|
24878
|
+
*
|
|
24879
|
+
* @category Number checks
|
|
24880
|
+
* @since 4.0.0
|
|
24881
|
+
*/
|
|
24882
|
+
const isGreaterThan = /* @__PURE__ */ makeIsGreaterThan({
|
|
24883
|
+
order: Number$5,
|
|
24884
|
+
annotate: (exclusiveMinimum) => ({
|
|
24885
|
+
representation: {
|
|
24886
|
+
id: "effect/schema/isGreaterThan",
|
|
24887
|
+
payload: { exclusiveMinimum: encodeNumberPayload(exclusiveMinimum) }
|
|
24888
|
+
},
|
|
24889
|
+
toJsonSchema: () => ({ exclusiveMinimum }),
|
|
24890
|
+
toCode: () => ({ runtime: `Schema.isGreaterThan(${format$1(exclusiveMinimum)})` })
|
|
24891
|
+
})
|
|
24892
|
+
});
|
|
24893
|
+
/**
|
|
24894
|
+
* Validates that a number is greater than or equal to the specified value
|
|
24895
|
+
* (inclusive).
|
|
24896
|
+
*
|
|
24897
|
+
* **Details**
|
|
24898
|
+
*
|
|
24899
|
+
* JSON Schema:
|
|
24900
|
+
*
|
|
24901
|
+
* This check corresponds to the `minimum` constraint in JSON Schema.
|
|
24902
|
+
*
|
|
24903
|
+
* Arbitrary:
|
|
24904
|
+
*
|
|
24905
|
+
* When generating test data with fast-check, this applies a `minimum` constraint
|
|
24906
|
+
* to ensure generated numbers are greater than or equal to the specified value.
|
|
24907
|
+
*
|
|
24908
|
+
* @category Number checks
|
|
24909
|
+
* @since 4.0.0
|
|
24910
|
+
*/
|
|
24911
|
+
const isGreaterThanOrEqualTo = /* @__PURE__ */ makeIsGreaterThanOrEqualTo({
|
|
24912
|
+
order: Number$5,
|
|
24913
|
+
annotate: (minimum) => ({
|
|
24914
|
+
representation: {
|
|
24915
|
+
id: "effect/schema/isGreaterThanOrEqualTo",
|
|
24916
|
+
payload: { minimum: encodeNumberPayload(minimum) }
|
|
24917
|
+
},
|
|
24918
|
+
toJsonSchema: () => ({ minimum }),
|
|
24919
|
+
toCode: () => ({ runtime: `Schema.isGreaterThanOrEqualTo(${format$1(minimum)})` })
|
|
24920
|
+
})
|
|
24921
|
+
});
|
|
24922
|
+
/**
|
|
24923
|
+
* Validates that a number is a safe integer (within the safe integer range
|
|
24924
|
+
* that can be exactly represented in JavaScript).
|
|
24925
|
+
*
|
|
24926
|
+
* **Details**
|
|
24927
|
+
*
|
|
24928
|
+
* JSON Schema:
|
|
24929
|
+
*
|
|
24930
|
+
* This check corresponds to the `type: "integer"` constraint in JSON Schema.
|
|
24931
|
+
*
|
|
24932
|
+
* Arbitrary:
|
|
24933
|
+
*
|
|
24934
|
+
* When generating test data with fast-check, this applies an `integer: true`
|
|
24935
|
+
* constraint to ensure generated numbers are integers.
|
|
24936
|
+
*
|
|
24937
|
+
* @category Integer checks
|
|
24938
|
+
* @since 4.0.0
|
|
24939
|
+
*/
|
|
24940
|
+
function isInt(annotations) {
|
|
24941
|
+
return makeFilter((n) => globalThis.Number.isSafeInteger(n), {
|
|
24942
|
+
expected: "an integer",
|
|
24943
|
+
representation: {
|
|
24944
|
+
id: "effect/schema/isInt",
|
|
24945
|
+
payload: null
|
|
24946
|
+
},
|
|
24947
|
+
toJsonSchema: () => ({ type: "integer" }),
|
|
24948
|
+
toCode: () => ({ runtime: "Schema.isInt()" }),
|
|
24949
|
+
arbitrary: { constraint: { integer: true } },
|
|
24950
|
+
...annotations
|
|
24951
|
+
});
|
|
24952
|
+
}
|
|
24953
|
+
/**
|
|
24725
24954
|
* Schema for values that hide sensitive information from error output and
|
|
24726
24955
|
* inspection.
|
|
24727
24956
|
*
|
|
@@ -72105,6 +72334,7 @@ const SECURITY_SCAN_MAX_FILE_SIZE_BYTES = 2 * 1024 * 1024;
|
|
|
72105
72334
|
const SECURITY_SCAN_MAX_BUNDLE_FILE_SIZE_BYTES = 8 * 1024 * 1024;
|
|
72106
72335
|
const SKIPPED_DIRECTORY_NAMES = new Set([
|
|
72107
72336
|
".git",
|
|
72337
|
+
".open-next",
|
|
72108
72338
|
".turbo",
|
|
72109
72339
|
".vercel",
|
|
72110
72340
|
"coverage",
|
|
@@ -74090,6 +74320,7 @@ const normalizeConfigForHash = (config) => {
|
|
|
74090
74320
|
const clone = JSON.parse(JSON.stringify(config));
|
|
74091
74321
|
if (clone?.settings?.["react-doctor"]) {
|
|
74092
74322
|
const reactDoctorSettings = clone.settings["react-doctor"];
|
|
74323
|
+
delete reactDoctorSettings.diagnosticContextDirectory;
|
|
74093
74324
|
reactDoctorSettings.rootDirectory = ROOT_DIRECTORY_PLACEHOLDER;
|
|
74094
74325
|
if (Array.isArray(reactDoctorSettings.unpluginAutoImportRootDirectories)) reactDoctorSettings.unpluginAutoImportRootDirectories = [ROOT_DIRECTORY_PLACEHOLDER];
|
|
74095
74326
|
}
|
|
@@ -74251,7 +74482,7 @@ const buildUserPluginRules = (userPlugin, severityControls) => {
|
|
|
74251
74482
|
}
|
|
74252
74483
|
return enabled;
|
|
74253
74484
|
};
|
|
74254
|
-
const createOxlintConfig = ({ pluginPath, project, customRulesOnly = false, extendsPaths = [], ignoredTags = /* @__PURE__ */ new Set(), includedTags = /* @__PURE__ */ new Set(), includeTagDefaults = false, runtimeGlobals, unpluginAutoImportGlobalScopes, serverAuthFunctionNames, projectIndexModuleSources, severityControls, adoptedSettings = {}, userPlugins = [], disableReactHooksJsPlugin = false, ruleSelection, sidecarRuleIdFilter }) => {
|
|
74485
|
+
const createOxlintConfig = ({ pluginPath, diagnosticContextDirectory, project, customRulesOnly = false, extendsPaths = [], ignoredTags = /* @__PURE__ */ new Set(), includedTags = /* @__PURE__ */ new Set(), includeTagDefaults = false, runtimeGlobals, unpluginAutoImportGlobalScopes, serverAuthFunctionNames, projectIndexModuleSources, severityControls, adoptedSettings = {}, userPlugins = [], disableReactHooksJsPlugin = false, ruleSelection, sidecarRuleIdFilter }) => {
|
|
74255
74486
|
const hasIncludedTags = includedTags.size > 0;
|
|
74256
74487
|
const reactHooksJsPlugin = disableReactHooksJsPlugin || ruleSelection === "sidecar" || hasIncludedTags ? null : resolveReactHooksJsPlugin(project.hasReactCompiler || project.hasReactCompilerLintPlugin === true, customRulesOnly);
|
|
74257
74488
|
const reactCompilerRules = reactHooksJsPlugin ? applyRuleSeverityControls(filterRulesToAvailable(REACT_COMPILER_RULES, "react-hooks-js", reactHooksJsPlugin.availableRuleNames), severityControls) : {};
|
|
@@ -74311,6 +74542,7 @@ const createOxlintConfig = ({ pluginPath, project, customRulesOnly = false, exte
|
|
|
74311
74542
|
...adoptedSettings,
|
|
74312
74543
|
"react-doctor": {
|
|
74313
74544
|
portedRuleMode: "curated",
|
|
74545
|
+
...diagnosticContextDirectory ? { diagnosticContextDirectory } : {},
|
|
74314
74546
|
framework: project.framework,
|
|
74315
74547
|
rootDirectory: settingsRootDirectory,
|
|
74316
74548
|
capabilities: [...capabilities].sort(),
|
|
@@ -74980,22 +75212,14 @@ const runOxlintProbeJob = async (input) => {
|
|
|
74980
75212
|
if (!isProbeResult(parsed) || parsed.traces.length !== input.probeRequest.files.length) throw new Error("oxlint worker returned a malformed probe result");
|
|
74981
75213
|
return parsed;
|
|
74982
75214
|
};
|
|
74983
|
-
|
|
74984
|
-
|
|
74985
|
-
|
|
74986
|
-
|
|
74987
|
-
|
|
74988
|
-
|
|
74989
|
-
|
|
74990
|
-
|
|
74991
|
-
} catch {
|
|
74992
|
-
return;
|
|
74993
|
-
} finally {
|
|
74994
|
-
if (temporaryPath !== null) try {
|
|
74995
|
-
fs$1$2.rmSync(temporaryPath, { force: true });
|
|
74996
|
-
} catch {}
|
|
74997
|
-
}
|
|
74998
|
-
};
|
|
75215
|
+
var DiagnosticContextRangeSchema = class extends Class("DiagnosticContextRange")({
|
|
75216
|
+
offset: Number$1.check(isInt(), isGreaterThanOrEqualTo(0)),
|
|
75217
|
+
length: Number$1.check(isInt(), isGreaterThan(0))
|
|
75218
|
+
}) {};
|
|
75219
|
+
var CachedDiagnostic = class extends Class("CachedDiagnostic")({
|
|
75220
|
+
...Diagnostic.fields,
|
|
75221
|
+
contextRanges: optional(ArraySchema(DiagnosticContextRangeSchema))
|
|
75222
|
+
}) {};
|
|
74999
75223
|
const atomicWriteJson = (filePath, value) => {
|
|
75000
75224
|
try {
|
|
75001
75225
|
atomicWriteFile(filePath, JSON.stringify(value));
|
|
@@ -75003,7 +75227,7 @@ const atomicWriteJson = (filePath, value) => {
|
|
|
75003
75227
|
return;
|
|
75004
75228
|
}
|
|
75005
75229
|
};
|
|
75006
|
-
const validateDiagnostic$1 = decodeUnknownSync(
|
|
75230
|
+
const validateDiagnostic$1 = decodeUnknownSync(CachedDiagnostic);
|
|
75007
75231
|
const decodeDiagnostic = (raw) => {
|
|
75008
75232
|
const diagnostic = validateDiagnostic$1(raw);
|
|
75009
75233
|
return {
|
|
@@ -75123,7 +75347,7 @@ const createSidecarProbeAnswerResolver = (input) => {
|
|
|
75123
75347
|
toRelativePath
|
|
75124
75348
|
};
|
|
75125
75349
|
};
|
|
75126
|
-
const validateDiagnostic = decodeUnknownSync(
|
|
75350
|
+
const validateDiagnostic = decodeUnknownSync(CachedDiagnostic);
|
|
75127
75351
|
const isProbeKind = (value) => value === "content" || value === "exists";
|
|
75128
75352
|
const isProbeIdArray = (value, probeCount) => Array.isArray(value) && value.every((probeId) => typeof probeId === "number" && Number.isInteger(probeId) && probeId >= 0 && probeId < probeCount);
|
|
75129
75353
|
const createProbeTable = () => {
|
|
@@ -75365,6 +75589,29 @@ const columnOfUtf8Offset = (sourceBuffer, utf8Offset) => {
|
|
|
75365
75589
|
while (lineStartOffset > 0 && sourceBuffer[lineStartOffset - 1] !== 10) lineStartOffset--;
|
|
75366
75590
|
return sourceBuffer.subarray(lineStartOffset, boundedOffset).toString("utf8").length + 1;
|
|
75367
75591
|
};
|
|
75592
|
+
const decodeRanges = decodeUnknownSync(ArraySchema(DiagnosticContextRangeSchema));
|
|
75593
|
+
const createDiagnosticContextReader = (directory) => {
|
|
75594
|
+
const recordedRules = /* @__PURE__ */ new Set();
|
|
75595
|
+
if (directory) try {
|
|
75596
|
+
for (const filename of fs$1$2.readdirSync(directory)) {
|
|
75597
|
+
if (!filename.endsWith(".json")) continue;
|
|
75598
|
+
recordedRules.add(filename.slice(0, filename.lastIndexOf("-")));
|
|
75599
|
+
}
|
|
75600
|
+
} catch {
|
|
75601
|
+
recordedRules.clear();
|
|
75602
|
+
}
|
|
75603
|
+
return (identity) => {
|
|
75604
|
+
if (!directory || !recordedRules.has(encodeURIComponent(identity.rule))) return [];
|
|
75605
|
+
try {
|
|
75606
|
+
return decodeRanges(failOpenReadJson(getDiagnosticContextPath({
|
|
75607
|
+
...identity,
|
|
75608
|
+
directory
|
|
75609
|
+
}), []));
|
|
75610
|
+
} catch {
|
|
75611
|
+
return [];
|
|
75612
|
+
}
|
|
75613
|
+
};
|
|
75614
|
+
};
|
|
75368
75615
|
const utf8OffsetFromSourcePosition = (sourceBuffer, lineNumber, zeroBasedColumn) => {
|
|
75369
75616
|
if (lineNumber < 1 || zeroBasedColumn < 0) return null;
|
|
75370
75617
|
const sourceLines = sourceBuffer.toString("utf8").split("\n");
|
|
@@ -76006,7 +76253,7 @@ const isOxlintOutput = (value) => isRecord(value) && Array.isArray(value.diagnos
|
|
|
76006
76253
|
* to the first `{`. Raises `OxlintOutputUnparseable` when the
|
|
76007
76254
|
* stdout isn't valid JSON or doesn't carry a `diagnostics` array.
|
|
76008
76255
|
*/
|
|
76009
|
-
const parseOxlintOutput = (stdout, project, rootDirectory, sourcePathByLintPath, sourceMapByLintPath) => {
|
|
76256
|
+
const parseOxlintOutput = (stdout, project, rootDirectory, sourcePathByLintPath, sourceMapByLintPath, diagnosticContextDirectory) => {
|
|
76010
76257
|
if (!stdout) return [];
|
|
76011
76258
|
const jsonStart = stdout.indexOf("{");
|
|
76012
76259
|
const sanitizedStdout = jsonStart > 0 ? stdout.slice(jsonStart) : stdout;
|
|
@@ -76056,19 +76303,33 @@ const parseOxlintOutput = (stdout, project, rootDirectory, sourcePathByLintPath,
|
|
|
76056
76303
|
minifiedFileCache.set(absolutePath, minified);
|
|
76057
76304
|
return minified;
|
|
76058
76305
|
};
|
|
76059
|
-
|
|
76306
|
+
const readContextRanges = createDiagnosticContextReader(diagnosticContextDirectory);
|
|
76307
|
+
return suppressMemoizationInBailedOutFunctions(parsed.diagnostics.flatMap((rawDiagnostic) => {
|
|
76308
|
+
if (!isMappableOxlintDiagnostic(rawDiagnostic)) return [];
|
|
76309
|
+
const { plugin, rule } = parseRuleCode(rawDiagnostic.code);
|
|
76310
|
+
const primarySpan = rawDiagnostic.labels[0]?.span;
|
|
76311
|
+
const contextRanges = diagnosticContextDirectory && plugin === "react-doctor" && primarySpan ? readContextRanges({
|
|
76312
|
+
filename: resolveAbsolutePath(rawDiagnostic.filename),
|
|
76313
|
+
rule,
|
|
76314
|
+
offset: primarySpan.offset,
|
|
76315
|
+
message: rawDiagnostic.message
|
|
76316
|
+
}) : [];
|
|
76317
|
+
const diagnostic = {
|
|
76318
|
+
...rawDiagnostic,
|
|
76319
|
+
contextRanges
|
|
76320
|
+
};
|
|
76060
76321
|
const preparedSourceMap = resolvePreparedSourceMap(diagnostic.filename);
|
|
76061
76322
|
if (preparedSourceMap === void 0) return [diagnostic];
|
|
76062
|
-
const { plugin, rule } = parseRuleCode(diagnostic.code);
|
|
76063
76323
|
if (plugin !== "react-doctor" || !REACT_DOCTOR_RULE_REGISTRY[rule]?.tags?.includes("design")) return [];
|
|
76064
76324
|
const labels = mapPreparedSourceLabels(diagnostic.labels, preparedSourceMap);
|
|
76065
76325
|
const sourceFilename = resolveMappedSourceFilename(diagnostic.filename);
|
|
76066
76326
|
return labels === null || sourceFilename === void 0 ? [] : [{
|
|
76067
76327
|
...diagnostic,
|
|
76068
76328
|
filename: sourceFilename,
|
|
76069
|
-
labels
|
|
76329
|
+
labels,
|
|
76330
|
+
contextRanges: []
|
|
76070
76331
|
}];
|
|
76071
|
-
}).filter((diagnostic) =>
|
|
76332
|
+
}).filter((diagnostic) => isLintableSourceFile(resolveSourceFilename(diagnostic.filename)) && !(TYPESCRIPT_DECLARATION_FILE_PATTERN.test(diagnostic.filename) && OXLINT_IGNORED_DECLARATION_DIAGNOSTIC_CODES.has(diagnostic.code)) && !isMinifiedDiagnosticFile(diagnostic.filename) && !shouldSuppressLocalUseHookDiagnostic(diagnostic, rootDirectory) && !shouldSuppressCompilerFindingInWorklet(diagnostic, project, rootDirectory)).map((diagnostic) => {
|
|
76072
76333
|
const { plugin, rule } = parseRuleCode(diagnostic.code);
|
|
76073
76334
|
const primaryLabel = diagnostic.labels[0];
|
|
76074
76335
|
const cleaned = cleanDiagnosticMessage(diagnostic.message, diagnostic.help, plugin, rule, project);
|
|
@@ -76105,6 +76366,7 @@ const parseOxlintOutput = (stdout, project, rootDirectory, sourcePathByLintPath,
|
|
|
76105
76366
|
...primarySpanEndLine !== void 0 ? { endLine: primarySpanEndLine } : {}
|
|
76106
76367
|
} : {},
|
|
76107
76368
|
category,
|
|
76369
|
+
...diagnostic.contextRanges.length > 0 ? { contextRanges: diagnostic.contextRanges } : {},
|
|
76108
76370
|
...matchByOccurrence ? { matchByOccurrence: true } : {},
|
|
76109
76371
|
...relatedLocations.length > 0 ? { relatedLocations } : {}
|
|
76110
76372
|
};
|
|
@@ -76217,7 +76479,7 @@ const spawnLintBatches = async (input) => {
|
|
|
76217
76479
|
};
|
|
76218
76480
|
const stdout = input.spawnSlots === void 0 ? await spawnBatch() : await input.spawnSlots.run(spawnBatch, signal);
|
|
76219
76481
|
if (stdout === null) return [];
|
|
76220
|
-
return parseOxlintOutput(stdout, project, rootDirectory, sourcePathByLintPath, sourceMapByLintPath);
|
|
76482
|
+
return parseOxlintOutput(stdout, project, rootDirectory, sourcePathByLintPath, sourceMapByLintPath, input.diagnosticContextDirectory);
|
|
76221
76483
|
} catch (error) {
|
|
76222
76484
|
if (!isSplittableReactDoctorError(error)) throw error;
|
|
76223
76485
|
if (isPastDeadline()) {
|
|
@@ -76946,6 +77208,8 @@ const runOxlint = async (options) => {
|
|
|
76946
77208
|
const configDirectory = fs$1$2.mkdtempSync(path$1$1.join(os.tmpdir(), "react-doctor-oxlintrc-"));
|
|
76947
77209
|
const configPath = path$1$1.join(configDirectory, "oxlintrc.json");
|
|
76948
77210
|
try {
|
|
77211
|
+
const diagnosticContextDirectory = path$1$1.join(configDirectory, "contexts");
|
|
77212
|
+
fs$1$2.mkdirSync(diagnosticContextDirectory);
|
|
76949
77213
|
const oxlintBinary = resolveOxlintBinary();
|
|
76950
77214
|
const sharedArgs = [];
|
|
76951
77215
|
let tsconfigContent = null;
|
|
@@ -76994,6 +77258,7 @@ const runOxlint = async (options) => {
|
|
|
76994
77258
|
} : project;
|
|
76995
77259
|
const buildConfig = (overrides) => createOxlintConfig({
|
|
76996
77260
|
pluginPath,
|
|
77261
|
+
diagnosticContextDirectory,
|
|
76997
77262
|
project: lintProject,
|
|
76998
77263
|
customRulesOnly,
|
|
76999
77264
|
extendsPaths: overrides.extendsPaths,
|
|
@@ -77045,6 +77310,7 @@ const runOxlint = async (options) => {
|
|
|
77045
77310
|
project: lintProject,
|
|
77046
77311
|
sourcePathByLintPath: preparedLintSources.sourcePathByLintPath,
|
|
77047
77312
|
sourceMapByLintPath: preparedLintSources.sourceMapByLintPath,
|
|
77313
|
+
diagnosticContextDirectory,
|
|
77048
77314
|
onPartialFailure: reportPartialFailure,
|
|
77049
77315
|
onAnalyzedFiles: (filePaths) => {
|
|
77050
77316
|
analyzedFiles = filePaths;
|
|
@@ -77272,6 +77538,7 @@ const runOxlint = async (options) => {
|
|
|
77272
77538
|
project: lintProject,
|
|
77273
77539
|
sourcePathByLintPath: preparedLintSources.sourcePathByLintPath,
|
|
77274
77540
|
sourceMapByLintPath: preparedLintSources.sourceMapByLintPath,
|
|
77541
|
+
diagnosticContextDirectory,
|
|
77275
77542
|
onPartialFailure,
|
|
77276
77543
|
onAnalyzedFiles: (filePaths) => {
|
|
77277
77544
|
analyzedFiles = filePaths;
|
|
@@ -77568,7 +77835,7 @@ const ScoreApiResponseSchema = Struct({
|
|
|
77568
77835
|
});
|
|
77569
77836
|
const EMPTY_SCORE_REQUEST_METADATA = {};
|
|
77570
77837
|
const parseScoreResult = (value) => getOrNull(decodeUnknownOption(ScoreApiResponseSchema)(value));
|
|
77571
|
-
const sanitizeScoreDiagnostics = (diagnostics) => diagnostics.map(({ filePath, fileContext: _fileContext, fixGroupId: _fixGroupId, ...rest }) => ({
|
|
77838
|
+
const sanitizeScoreDiagnostics = (diagnostics) => diagnostics.map(({ filePath, fileContext: _fileContext, fixGroupId: _fixGroupId, contextRanges: _contextRanges, ...rest }) => ({
|
|
77572
77839
|
...rest,
|
|
77573
77840
|
filePath: redactSensitiveText(scrubSensitivePaths(filePath))
|
|
77574
77841
|
}));
|
|
@@ -78824,12 +79091,13 @@ const findWorstScoredProject = (projects) => {
|
|
|
78824
79091
|
return worst;
|
|
78825
79092
|
};
|
|
78826
79093
|
const toJsonReportDiagnostic = (diagnostic, projectRoot, reportRoot) => {
|
|
79094
|
+
const { contextRanges: _contextRanges, ...publicDiagnostic } = diagnostic;
|
|
78827
79095
|
const resolvedFilePath = resolveCandidateReadPath(projectRoot, diagnostic.filePath);
|
|
78828
79096
|
const normalizedFilePath = toNormalizedRelativePath(resolvedFilePath, projectRoot);
|
|
78829
79097
|
const reportRelativeFilePath = toNormalizedRelativePath(resolvedFilePath, reportRoot);
|
|
78830
79098
|
const ruleIdentity = getDiagnosticRuleIdentity(diagnostic);
|
|
78831
79099
|
return {
|
|
78832
|
-
...
|
|
79100
|
+
...publicDiagnostic,
|
|
78833
79101
|
id: buildDiagnosticIdentity({
|
|
78834
79102
|
filePath: reportRelativeFilePath,
|
|
78835
79103
|
line: diagnostic.line,
|
|
@@ -79322,4 +79590,4 @@ const toJsonReport = (result, options) => buildJsonReport({
|
|
|
79322
79590
|
export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, hasReactRuntime, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
|
|
79323
79591
|
|
|
79324
79592
|
//# sourceMappingURL=index.js.map
|
|
79325
|
-
//# debugId=
|
|
79593
|
+
//# debugId=f63b0406-6e8f-5f5b-b096-50e1c0f42305
|
|
@@ -1,19 +1,19 @@
|
|
|
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 { N as discardPrefetchedGitCommands, T as STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES, lt as CANONICAL_GITHUB_URL, u as METRIC, w as STAGED_FILES_TEMP_DIR_PREFIX, xn as STAGED_FILES_PROJECT_CONFIG_FILENAMES } from "./constants-
|
|
4
|
-
import { At as hasSupportedFrameworkOrLibrary, Bn as messageFromUnknown, Ct as getChangedLineRanges, D as isCodingAgentEnvironment, E as isCiOrCodingAgentEnvironment, Gn as isPlainObject, K as StagedFiles, Mt as highlighter, S as isDebugFlagEnabled, St as getBaselineDiffPlan, Tt as getDiffInfo, Un as isErrnoException, Ut as mapWithConcurrency, Vt as listWorkspacePackages, Xt as resolveScanTarget, Z as buildJsonReport, _ as VERSION, f as setJsonReportDirectory, ft as detectAiTrainingEnvironment, g as writeJsonReport, gn as gen, h as writeJsonErrorReport, j as Git, jn as provide, mn as decodeUnknownSync, n as recordDistribution, p as setJsonReportMode, pn as JsonReport, pt as discoverSupportedSubprojects, qt as remainingDeadlineBudgetMs, rn as toRelativePath, t as recordCount, u as enableJsonMode, vt as findLegacyConfig, wn as runPromise, xn as provide$1, y as CliInputError } from "./record-metric-
|
|
5
|
-
import { n as shutdownTelemetry, o as isExpectedUserError, r as flushSentry } from "./telemetry-runtime-
|
|
6
|
-
import { n as handleUserError, t as handleError } from "./handle-error-
|
|
7
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
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]="fc44ab38-985f-5fed-8b88-6aa6d6273d53")}catch(e){}}();
|
|
3
|
+
import { N as discardPrefetchedGitCommands, T as STAGED_SNAPSHOT_ADDITIONAL_CONFIG_FILENAMES, lt as CANONICAL_GITHUB_URL, u as METRIC, w as STAGED_FILES_TEMP_DIR_PREFIX, xn as STAGED_FILES_PROJECT_CONFIG_FILENAMES } from "./constants-CBmbPBA4.js";
|
|
4
|
+
import { At as hasSupportedFrameworkOrLibrary, Bn as messageFromUnknown, Ct as getChangedLineRanges, D as isCodingAgentEnvironment, E as isCiOrCodingAgentEnvironment, Gn as isPlainObject, K as StagedFiles, Mt as highlighter, S as isDebugFlagEnabled, St as getBaselineDiffPlan, Tt as getDiffInfo, Un as isErrnoException, Ut as mapWithConcurrency, Vt as listWorkspacePackages, Xt as resolveScanTarget, Z as buildJsonReport, _ as VERSION, f as setJsonReportDirectory, ft as detectAiTrainingEnvironment, g as writeJsonReport, gn as gen, h as writeJsonErrorReport, j as Git, jn as provide, mn as decodeUnknownSync, n as recordDistribution, p as setJsonReportMode, pn as JsonReport, pt as discoverSupportedSubprojects, qt as remainingDeadlineBudgetMs, rn as toRelativePath, t as recordCount, u as enableJsonMode, vt as findLegacyConfig, wn as runPromise, xn as provide$1, y as CliInputError } from "./record-metric-XodT8W8_.js";
|
|
5
|
+
import { n as shutdownTelemetry, o as isExpectedUserError, r as flushSentry } from "./telemetry-runtime-DCZr7D76.js";
|
|
6
|
+
import { n as handleUserError, t as handleError } from "./handle-error-BQ0C5xTU.js";
|
|
7
|
+
import { t as reportErrorToSentry } from "./report-error-C6KS9c_Y.js";
|
|
8
8
|
import { t as toForwardSlashes } from "./path-format-By20mo8A.js";
|
|
9
|
-
import { N as cliLogger, c as spinner, i as hasDoctorScript, j as runGitRaw, k as runGit, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-
|
|
10
|
-
import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-
|
|
11
|
-
import { c as openWorkflowPullRequest, i as warnDeprecatedDiff, l as stageWorkflowFile, r as resolveScope, s as resolveBlockingLevel, t as finalizeScope } from "./resolve-scope-
|
|
12
|
-
import { t as shouldSkipPrompts } from "./should-skip-prompts-
|
|
13
|
-
import { A as createInvocationInspect, C as detectLaunchableAgents, D as buildHandoffPayload, E as launchCliAgent, M as resolveMergeBaseRef, N as printHeadlessReport, O as collectProjectSourceFiles, R as printDiagnosticsDump, S as setUpGitHubActions, T as copyToClipboard, U as buildEmptyReportMessage, V as filterDiagnosticsByCategories, W as resolveInvocationOxlintConcurrency, _ as retryMissingProjectScores, a as validateModeFlags, b as filterScansForSurface, c as partitionProjectScanOutcomes, d as buildCodeFrame, f as resolveProjectScan, g as resolveProjectRelativeDirectory, h as resolveProjectSourceFilePaths, i as validateIncludeUntrackedScope, j as inspect, k as deduplicateProjectScans, l as discoverWorkspacePackages, m as resolveProjectDiffIncludePaths, n as formatSkippedProjectsMessage, o as resolveExcludedProjectDirectories, p as resolveProjectChangedLineRanges, s as projectManifestChanged, t as resolveScanExitCode, u as selectProjects, v as resolveWorkspaceDeadCodeOwner, w as CLI_AGENT_BINARIES, x as countUniqueScannedFiles, y as resolveCliInspectOptions } from "./resolve-scan-exit-code-
|
|
14
|
-
import { a as recordGate, g as loadAgentInstall, i as readPreference, o as runMigrations, p as SETUP_HINT_EVENT, r as isGatePending, s as writePreference, u as HANDOFF_TARGET_PREFERENCE_ID } from "./report-workflow-result-
|
|
15
|
-
import { a as askUpgradeActionVersion, c as recordCiPromptDecision, i as installReactDoctorAgentHooks, l as hasHandledActionUpgrade, o as askAddToGitHubActions, r as findAgentsWithOutdatedReactDoctorHooks, s as hasHandledCiPrompt, t as getSkillSourceDirectory, u as recordActionUpgradeDecision } from "./install-react-doctor-
|
|
16
|
-
import { t as readObjectFile } from "./read-object-file-
|
|
9
|
+
import { N as cliLogger, c as spinner, i as hasDoctorScript, j as runGitRaw, k as runGit, n as findNearestPackageDirectory, o as isSpinnerSilent, s as setSpinnerSilent } from "./install-doctor-script-CWIsVQ9v.js";
|
|
10
|
+
import { a as readReactDoctorWorkflow, c as workflowUsesV1Action, i as isReactDoctorWorkflowInstalled, l as prompts, s as upgradeWorkflowActionToV2 } from "./install-github-workflow-0fuv6nHk.js";
|
|
11
|
+
import { c as openWorkflowPullRequest, i as warnDeprecatedDiff, l as stageWorkflowFile, r as resolveScope, s as resolveBlockingLevel, t as finalizeScope } from "./resolve-scope-DxC2ZYT-.js";
|
|
12
|
+
import { t as shouldSkipPrompts } from "./should-skip-prompts-B4MPJTRl.js";
|
|
13
|
+
import { A as createInvocationInspect, C as detectLaunchableAgents, D as buildHandoffPayload, E as launchCliAgent, M as resolveMergeBaseRef, N as printHeadlessReport, O as collectProjectSourceFiles, R as printDiagnosticsDump, S as setUpGitHubActions, T as copyToClipboard, U as buildEmptyReportMessage, V as filterDiagnosticsByCategories, W as resolveInvocationOxlintConcurrency, _ as retryMissingProjectScores, a as validateModeFlags, b as filterScansForSurface, c as partitionProjectScanOutcomes, d as buildCodeFrame, f as resolveProjectScan, g as resolveProjectRelativeDirectory, h as resolveProjectSourceFilePaths, i as validateIncludeUntrackedScope, j as inspect, k as deduplicateProjectScans, l as discoverWorkspacePackages, m as resolveProjectDiffIncludePaths, n as formatSkippedProjectsMessage, o as resolveExcludedProjectDirectories, p as resolveProjectChangedLineRanges, s as projectManifestChanged, t as resolveScanExitCode, u as selectProjects, v as resolveWorkspaceDeadCodeOwner, w as CLI_AGENT_BINARIES, x as countUniqueScannedFiles, y as resolveCliInspectOptions } from "./resolve-scan-exit-code-C5WlxWT5.js";
|
|
14
|
+
import { a as recordGate, g as loadAgentInstall, i as readPreference, o as runMigrations, p as SETUP_HINT_EVENT, r as isGatePending, s as writePreference, u as HANDOFF_TARGET_PREFERENCE_ID } from "./report-workflow-result-CR4uqr4z.js";
|
|
15
|
+
import { a as askUpgradeActionVersion, c as recordCiPromptDecision, i as installReactDoctorAgentHooks, l as hasHandledActionUpgrade, o as askAddToGitHubActions, r as findAgentsWithOutdatedReactDoctorHooks, s as hasHandledCiPrompt, t as getSkillSourceDirectory, u as recordActionUpgradeDecision } from "./install-react-doctor-BhGIaCoA.js";
|
|
16
|
+
import { t as readObjectFile } from "./read-object-file-BGC8MAOz.js";
|
|
17
17
|
import * as fs$1 from "node:fs";
|
|
18
18
|
import fs from "node:fs";
|
|
19
19
|
import * as path$1 from "node:path";
|
|
@@ -1528,5 +1528,5 @@ const inspectAction = async (directory, flags, invocationCommand = "inspect", se
|
|
|
1528
1528
|
//#endregion
|
|
1529
1529
|
export { warnDeprecatedFailOn as n, runProjectMigrations as r, inspectAction as t };
|
|
1530
1530
|
|
|
1531
|
-
//# sourceMappingURL=inspect-
|
|
1532
|
-
//# debugId=
|
|
1531
|
+
//# sourceMappingURL=inspect-CmU5JhiH.js.map
|
|
1532
|
+
//# debugId=fc44ab38-985f-5fed-8b88-6aa6d6273d53
|
|
@@ -1,12 +1,12 @@
|
|
|
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 { u as METRIC } from "./constants-
|
|
4
|
-
import { Tn as runSync, t as recordCount } from "./record-metric-
|
|
5
|
-
import { o as isExpectedUserError } from "./telemetry-runtime-
|
|
6
|
-
import { n as handleUserError, t as handleError } from "./handle-error-
|
|
7
|
-
import { t as reportErrorToSentry } from "./report-error-
|
|
8
|
-
import { t as printBrandedHeader } from "./print-branded-header-
|
|
9
|
-
import { n as runInstallReactDoctor } from "./install-react-doctor-
|
|
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]="7a849cab-3f27-54c4-8259-4ef1daa46b7c")}catch(e){}}();
|
|
3
|
+
import { u as METRIC } from "./constants-CBmbPBA4.js";
|
|
4
|
+
import { Tn as runSync, t as recordCount } from "./record-metric-XodT8W8_.js";
|
|
5
|
+
import { o as isExpectedUserError } from "./telemetry-runtime-DCZr7D76.js";
|
|
6
|
+
import { n as handleUserError, t as handleError } from "./handle-error-BQ0C5xTU.js";
|
|
7
|
+
import { t as reportErrorToSentry } from "./report-error-C6KS9c_Y.js";
|
|
8
|
+
import { t as printBrandedHeader } from "./print-branded-header-CFeORBcq.js";
|
|
9
|
+
import { n as runInstallReactDoctor } from "./install-react-doctor-BhGIaCoA.js";
|
|
10
10
|
//#region src/cli/commands/install.ts
|
|
11
11
|
const installAction = async (options, command) => {
|
|
12
12
|
recordCount(METRIC.cliInvoked, 1, { command: "install" });
|
|
@@ -30,5 +30,5 @@ const installAction = async (options, command) => {
|
|
|
30
30
|
//#endregion
|
|
31
31
|
export { installAction };
|
|
32
32
|
|
|
33
|
-
//# sourceMappingURL=install-
|
|
34
|
-
//# debugId=
|
|
33
|
+
//# sourceMappingURL=install-DdNBJ1DK.js.map
|
|
34
|
+
//# debugId=7a849cab-3f27-54c4-8259-4ef1daa46b7c
|
|
@@ -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]="
|
|
3
|
-
import { B as resolveGitCommand, g as RUN_GIT_MAX_BUFFER_BYTES } from "./constants-
|
|
4
|
-
import { Mt as highlighter, Tn as runSync, b as isNonInteractiveEnvironment, cn as error$1, dn as warn, ln as info$1, un as log } from "./record-metric-
|
|
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]="2fd9d2ba-fafe-592e-97a5-b9971fc2ea42")}catch(e){}}();
|
|
3
|
+
import { B as resolveGitCommand, g as RUN_GIT_MAX_BUFFER_BYTES } from "./constants-CBmbPBA4.js";
|
|
4
|
+
import { Mt as highlighter, Tn as runSync, b as isNonInteractiveEnvironment, cn as error$1, dn as warn, ln as info$1, un as log } from "./record-metric-XodT8W8_.js";
|
|
5
5
|
import { a as chalk, i as stripAnsi, t as eastAsianWidth } from "./get-east-asian-width-DRPy7dqz.js";
|
|
6
6
|
import * as fs$1 from "node:fs";
|
|
7
7
|
import * as path$1 from "node:path";
|
|
@@ -2818,5 +2818,5 @@ const installReactDoctorScriptStep = (projectRoot) => {
|
|
|
2818
2818
|
//#endregion
|
|
2819
2819
|
export { runGitAsync as A, isRecord as C, readPackageJson as D, packageHasRecordKey as E, writeJsonFile as M, cliLogger as N, resolveGitPath as O, getPackageJsonPath as S, packageHasNestedRecordKey as T, REACT_DOCTOR_COMMAND as _, installReactDoctorScriptStep as a, VITE_PLUS_HOOKS_PATH as b, spinner as c, HUSKY_HOOKS_PATH as d, LEFTHOOK_CONFIG_FILES as f, PRE_COMMIT_CONFIG_FILE as g, OVERCOMMIT_CONFIG_FILE as h, hasDoctorScript as i, runGitRaw as j, runGit as k, HOOK_FILE_NAME as l, NON_BLOCKING_REACT_DOCTOR_COMMAND as m, findNearestPackageDirectory as n, isSpinnerSilent as o, LEGACY_HOOK_RUNNER_RELATIVE_PATH as p, hasDoctorDependency as r, setSpinnerSilent as s, DOCTOR_PACKAGE_NAME as t, HOOK_RELATIVE_PATH as u, SIMPLE_GIT_HOOKS_CONFIG_FILE as v, packageHasDependency as w, ensureTrailingNewline as x, SIMPLE_GIT_HOOKS_PACKAGE_JSON_KEY as y };
|
|
2820
2820
|
|
|
2821
|
-
//# sourceMappingURL=install-doctor-script-
|
|
2822
|
-
//# debugId=
|
|
2821
|
+
//# sourceMappingURL=install-doctor-script-CWIsVQ9v.js.map
|
|
2822
|
+
//# debugId=2fd9d2ba-fafe-592e-97a5-b9971fc2ea42
|