react-doctor 0.9.13-dev.8956a92 → 0.9.13-dev.c9e3e15

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.
Files changed (46) hide show
  1. package/dist/_react-doctor_require-typescript-DnwIzXJn.js +7 -0
  2. package/dist/{active-scan-abort-registry-DwG6tSPy.js → active-scan-abort-registry-B72ASBUh.js} +3 -3
  3. package/dist/build-section-divider-DGlnlwtd.js +80 -0
  4. package/dist/{ci-DcaC-51Q.js → ci-CtMRwcOm.js} +12 -12
  5. package/dist/cli.js +25 -26
  6. package/dist/constants-CKOk_Fa9.js +23 -0
  7. package/dist/{design-C1SplTKL.js → design-CuKy2v5o.js} +4 -4
  8. package/dist/{devtools-CC2PAZ85.js → devtools-DOdrAPkZ.js} +3 -3
  9. package/dist/duplicate-jsx-worker.d.ts +1 -0
  10. package/dist/duplicate-jsx-worker.js +636 -0
  11. package/dist/{exit-gracefully-CxKc4Fse.js → exit-gracefully-BPz1SPF6.js} +7 -7
  12. package/dist/{get-east-asian-width-Bv2TD3Xj.js → get-east-asian-width-CM5BOEC-.js} +3 -3
  13. package/dist/{handle-error-vpTKmXC3.js → handle-error-BRM9Jl2c.js} +5 -5
  14. package/dist/index.js +2323 -1618
  15. package/dist/{inspect-D3JrHeDo.js → inspect-BlBbDkzN.js} +25 -21
  16. package/dist/{install-CsUzOzEd.js → install-DoFWd3LC.js} +9 -9
  17. package/dist/{install-doctor-script-p9GyAugK.js → install-doctor-script-B5crMwar.js} +5 -5
  18. package/dist/{install-github-workflow-LVv6-WlO.js → install-github-workflow-aq2-gNc7.js} +5 -5
  19. package/dist/{install-react-doctor-BsCqPJBN.js → install-react-doctor-Biq1AyA8.js} +8 -8
  20. package/dist/{jsx-runtime-B9qfSWpE.js → jsx-runtime-CoD9HQfw.js} +7 -7
  21. package/dist/oxlint-worker.d.ts +1 -0
  22. package/dist/oxlint-worker.js +135 -0
  23. package/dist/{print-branded-header-OziBy0S5.js → print-branded-header-CQ2IW7mp.js} +4 -4
  24. package/dist/project-analysis-worker.js +452 -469
  25. package/dist/{prompt-runtime-scan-url-BDZzPc-x.js → prompt-runtime-scan-url-DpW6EctP.js} +5 -5
  26. package/dist/{read-object-file-Dcr3cckI.js → read-object-file-n418C9ko.js} +4 -4
  27. package/dist/{record-metric-pb1e8P9I.js → record-metric-BQ61xWwo.js} +1816 -1061
  28. package/dist/{report-error-B0KBOFH9.js → report-error-Z4ttMj5v.js} +7 -7
  29. package/dist/{report-workflow-result-u3G2YJSU.js → report-workflow-result-B1sML-GW.js} +5 -5
  30. package/dist/{resolve-scope-JhGAGZwO.js → resolve-scope-JhfesQxz.js} +6 -6
  31. package/dist/{rules-XUcA4uQg.js → rules-DOFdAlvC.js} +6 -6
  32. package/dist/{run-scan-app-BLJ840P-.js → run-scan-app-BwaOIoZz.js} +28 -22
  33. package/dist/{runtime-scan-B9YIev8P.js → runtime-scan-1mmAp6Kf.js} +11 -11
  34. package/dist/{sanitize-runtime-url-Dth_Cukj.js → sanitize-runtime-url-D98qgAlF.js} +4 -4
  35. package/dist/{scan-C_zXvkun.js → scan-C6DY2n5E.js} +9 -9
  36. package/dist/{semver-DFtnEmN-.js → semver-DlmXks31.js} +3 -3
  37. package/dist/{should-fail-scan-gate-CeuvZ1I6.js → should-fail-scan-gate-BgGDP7mN.js} +115 -71
  38. package/dist/{should-skip-prompts-MKm6VIXy.js → should-skip-prompts-ClG7HmQX.js} +4 -4
  39. package/dist/{should-use-tui-Dito5blR.js → should-use-tui-CJ7Fa93v.js} +4 -4
  40. package/dist/{telemetry-runtime-Djy7h7P-.js → telemetry-runtime-DzmPjvy4.js} +153 -5
  41. package/dist/unwrap-typescript-expression-CbO_6kmC.js +14 -0
  42. package/dist/{version-BBnyBjmE.js → version-2r79_x7e.js} +4 -4
  43. package/dist/{why-DytY8MwI.js → why-DCCv-ofR.js} +4 -4
  44. package/dist/{with-run-span-D39IpL2Z.js → with-run-span-C5tQQ0-4.js} +5 -5
  45. package/package.json +6 -6
  46. package/dist/build-section-divider-B9SKGyOE.js +0 -216
@@ -1,19 +1,21 @@
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]="36894edb-acbd-5c90-9ce2-80c54b021bfb")}catch(e){}}();
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]="a64790d6-0fbf-5baf-969b-f9980583a72d")}catch(e){}}();
3
3
  import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "./chunk-ChKA3wi6.js";
4
- import { n as require_picomatch$2, t as require_semver } from "./semver-DFtnEmN-.js";
4
+ import { n as require_picomatch$2, t as require_semver } from "./semver-DlmXks31.js";
5
+ import { t as _react_doctor_require_typescript_default } from "./_react-doctor_require-typescript-DnwIzXJn.js";
6
+ import { t as unwrapTypescriptExpression } from "./unwrap-typescript-expression-CbO_6kmC.js";
7
+ import { a as MAX_GLOB_PATTERN_LENGTH_CHARS, c as GIT_CHECK_ATTR_MAX_BUFFER_BYTES } from "./constants-CKOk_Fa9.js";
5
8
  import { builtinModules } from "node:module";
6
9
  import { spawnSync } from "node:child_process";
7
10
  import * as path$1 from "node:path";
8
11
  import path, { basename, dirname, extname, isAbsolute, join, parse, posix, relative, resolve, sep } from "node:path";
9
12
  import * as fs$1 from "node:fs";
10
13
  import { existsSync, readFileSync, readdirSync, realpathSync, statSync } from "node:fs";
11
- import ts from "typescript";
12
14
  import { parseSync } from "oxc-parser";
15
+ import { readFile } from "node:fs/promises";
13
16
  import { ResolverFactory } from "oxc-resolver";
14
17
  import { devNull } from "node:os";
15
18
  import { parseJSONC, parseTOML, parseYAML } from "confbox";
16
- import { readFile } from "node:fs/promises";
17
19
  import { parse as parse$1 } from "@astrojs/compiler/sync";
18
20
  //#region ../core/src/project-analysis/constants.ts
19
21
  const DEFAULT_EXTENSIONS = [
@@ -13380,19 +13382,19 @@ const collectStylesheetImportSpecifiers = (content) => {
13380
13382
  const extractJitiLoadReferences = (sourceText) => {
13381
13383
  if (!sourceText.includes("jiti")) return [];
13382
13384
  const virtualFilePath = "react-doctor-jiti-source.tsx";
13383
- const sourceFile = ts.createSourceFile(virtualFilePath, sourceText, ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX);
13385
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile(virtualFilePath, sourceText, _react_doctor_require_typescript_default.ScriptTarget.Latest, true, _react_doctor_require_typescript_default.ScriptKind.TSX);
13384
13386
  const compilerOptions = {
13385
13387
  allowJs: true,
13386
- jsx: ts.JsxEmit.Preserve,
13388
+ jsx: _react_doctor_require_typescript_default.JsxEmit.Preserve,
13387
13389
  noLib: true,
13388
13390
  noResolve: true,
13389
- target: ts.ScriptTarget.Latest
13391
+ target: _react_doctor_require_typescript_default.ScriptTarget.Latest
13390
13392
  };
13391
- const compilerHost = ts.createCompilerHost(compilerOptions);
13393
+ const compilerHost = _react_doctor_require_typescript_default.createCompilerHost(compilerOptions);
13392
13394
  compilerHost.fileExists = (candidatePath) => candidatePath === virtualFilePath;
13393
13395
  compilerHost.getSourceFile = (candidatePath) => candidatePath === virtualFilePath ? sourceFile : void 0;
13394
13396
  compilerHost.readFile = (candidatePath) => candidatePath === virtualFilePath ? sourceText : void 0;
13395
- const program = ts.createProgram({
13397
+ const program = _react_doctor_require_typescript_default.createProgram({
13396
13398
  rootNames: [virtualFilePath],
13397
13399
  options: compilerOptions,
13398
13400
  host: compilerHost
@@ -13407,60 +13409,60 @@ const extractJitiLoadReferences = (sourceText) => {
13407
13409
  const factorySymbols = /* @__PURE__ */ new Set();
13408
13410
  const moduleSymbols = /* @__PURE__ */ new Set();
13409
13411
  const loaderSymbols = /* @__PURE__ */ new Set();
13410
- const isRequireJitiCall = (expression) => ts.isCallExpression(expression) && ts.isIdentifier(expression.expression) && expression.expression.text === "require" && typeChecker.getSymbolAtLocation(expression.expression) === void 0 && expression.arguments.length === 1 && ts.isStringLiteralLike(expression.arguments[0]) && expression.arguments[0].text === "jiti";
13412
+ const isRequireJitiCall = (expression) => _react_doctor_require_typescript_default.isCallExpression(expression) && _react_doctor_require_typescript_default.isIdentifier(expression.expression) && expression.expression.text === "require" && typeChecker.getSymbolAtLocation(expression.expression) === void 0 && expression.arguments.length === 1 && _react_doctor_require_typescript_default.isStringLiteralLike(expression.arguments[0]) && expression.arguments[0].text === "jiti";
13411
13413
  for (const statement of boundSourceFile.statements) {
13412
- if (ts.isImportDeclaration(statement) && ts.isStringLiteral(statement.moduleSpecifier) && statement.moduleSpecifier.text === "jiti") {
13414
+ if (_react_doctor_require_typescript_default.isImportDeclaration(statement) && _react_doctor_require_typescript_default.isStringLiteral(statement.moduleSpecifier) && statement.moduleSpecifier.text === "jiti") {
13413
13415
  const importClause = statement.importClause;
13414
13416
  if (!importClause) continue;
13415
13417
  if (importClause.name) {
13416
13418
  const defaultImportSymbol = typeChecker.getSymbolAtLocation(importClause.name);
13417
13419
  if (defaultImportSymbol) factorySymbols.add(defaultImportSymbol);
13418
13420
  }
13419
- if (importClause.namedBindings && ts.isNamespaceImport(importClause.namedBindings)) {
13421
+ if (importClause.namedBindings && _react_doctor_require_typescript_default.isNamespaceImport(importClause.namedBindings)) {
13420
13422
  const moduleSymbol = typeChecker.getSymbolAtLocation(importClause.namedBindings.name);
13421
13423
  if (moduleSymbol) moduleSymbols.add(moduleSymbol);
13422
13424
  }
13423
- if (importClause.namedBindings && ts.isNamedImports(importClause.namedBindings)) for (const importSpecifier of importClause.namedBindings.elements) {
13425
+ if (importClause.namedBindings && _react_doctor_require_typescript_default.isNamedImports(importClause.namedBindings)) for (const importSpecifier of importClause.namedBindings.elements) {
13424
13426
  if ((importSpecifier.propertyName?.text ?? importSpecifier.name.text) !== "createJiti") continue;
13425
13427
  const factorySymbol = typeChecker.getSymbolAtLocation(importSpecifier.name);
13426
13428
  if (factorySymbol) factorySymbols.add(factorySymbol);
13427
13429
  }
13428
13430
  continue;
13429
13431
  }
13430
- if (!ts.isVariableStatement(statement)) continue;
13432
+ if (!_react_doctor_require_typescript_default.isVariableStatement(statement)) continue;
13431
13433
  for (const declaration of statement.declarationList.declarations) {
13432
13434
  if (!declaration.initializer || !isRequireJitiCall(declaration.initializer)) continue;
13433
- if (ts.isIdentifier(declaration.name)) {
13435
+ if (_react_doctor_require_typescript_default.isIdentifier(declaration.name)) {
13434
13436
  const moduleSymbol = typeChecker.getSymbolAtLocation(declaration.name);
13435
13437
  if (moduleSymbol) moduleSymbols.add(moduleSymbol);
13436
13438
  continue;
13437
13439
  }
13438
- if (!ts.isObjectBindingPattern(declaration.name)) continue;
13440
+ if (!_react_doctor_require_typescript_default.isObjectBindingPattern(declaration.name)) continue;
13439
13441
  for (const bindingElement of declaration.name.elements) {
13440
13442
  const importedName = bindingElement.propertyName ?? bindingElement.name;
13441
- if (!ts.isIdentifier(importedName) || importedName.text !== "createJiti") continue;
13442
- if (!ts.isIdentifier(bindingElement.name)) continue;
13443
+ if (!_react_doctor_require_typescript_default.isIdentifier(importedName) || importedName.text !== "createJiti") continue;
13444
+ if (!_react_doctor_require_typescript_default.isIdentifier(bindingElement.name)) continue;
13443
13445
  const factorySymbol = typeChecker.getSymbolAtLocation(bindingElement.name);
13444
13446
  if (factorySymbol) factorySymbols.add(factorySymbol);
13445
13447
  }
13446
13448
  }
13447
13449
  }
13448
- const isRequireJitiFactoryCall = (expression) => ts.isCallExpression(expression) && isRequireJitiCall(expression.expression);
13450
+ const isRequireJitiFactoryCall = (expression) => _react_doctor_require_typescript_default.isCallExpression(expression) && isRequireJitiCall(expression.expression);
13449
13451
  const isFactoryExpression = (expression) => {
13450
13452
  const factorySymbol = typeChecker.getSymbolAtLocation(expression);
13451
13453
  if (factorySymbol && factorySymbols.has(factorySymbol)) return true;
13452
- if (!ts.isPropertyAccessExpression(expression) || expression.name.text !== "createJiti") return false;
13454
+ if (!_react_doctor_require_typescript_default.isPropertyAccessExpression(expression) || expression.name.text !== "createJiti") return false;
13453
13455
  const moduleSymbol = typeChecker.getSymbolAtLocation(expression.expression);
13454
13456
  return moduleSymbol !== void 0 && moduleSymbols.has(moduleSymbol);
13455
13457
  };
13456
13458
  const collectLoaderBindings = (node) => {
13457
- if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name) && node.initializer && ts.isCallExpression(node.initializer)) {
13459
+ if (_react_doctor_require_typescript_default.isVariableDeclaration(node) && _react_doctor_require_typescript_default.isIdentifier(node.name) && node.initializer && _react_doctor_require_typescript_default.isCallExpression(node.initializer)) {
13458
13460
  if (isRequireJitiFactoryCall(node.initializer) || isFactoryExpression(node.initializer.expression)) {
13459
13461
  const loaderSymbol = typeChecker.getSymbolAtLocation(node.name);
13460
13462
  if (loaderSymbol) loaderSymbols.add(loaderSymbol);
13461
13463
  }
13462
13464
  }
13463
- ts.forEachChild(node, collectLoaderBindings);
13465
+ _react_doctor_require_typescript_default.forEachChild(node, collectLoaderBindings);
13464
13466
  };
13465
13467
  collectLoaderBindings(boundSourceFile);
13466
13468
  const references = [];
@@ -13468,25 +13470,25 @@ const extractJitiLoadReferences = (sourceText) => {
13468
13470
  const firstArgument = callExpression.arguments[0];
13469
13471
  const position = boundSourceFile.getLineAndCharacterOfPosition(callExpression.getStart());
13470
13472
  references.push({
13471
- path: firstArgument && ts.isStringLiteralLike(firstArgument) ? firstArgument.text : void 0,
13473
+ path: firstArgument && _react_doctor_require_typescript_default.isStringLiteralLike(firstArgument) ? firstArgument.text : void 0,
13472
13474
  line: position.line + 1,
13473
13475
  column: position.character
13474
13476
  });
13475
13477
  };
13476
13478
  const visitLoaderCalls = (node) => {
13477
- if (ts.isCallExpression(node)) {
13479
+ if (_react_doctor_require_typescript_default.isCallExpression(node)) {
13478
13480
  const calleeSymbol = typeChecker.getSymbolAtLocation(node.expression);
13479
13481
  if (calleeSymbol && loaderSymbols.has(calleeSymbol)) recordLoaderCall(node);
13480
- else if (ts.isCallExpression(node.expression)) {
13482
+ else if (_react_doctor_require_typescript_default.isCallExpression(node.expression)) {
13481
13483
  if (isRequireJitiFactoryCall(node.expression) || isFactoryExpression(node.expression.expression)) recordLoaderCall(node);
13482
- } else if (ts.isPropertyAccessExpression(node.expression) && node.expression.name.text === "import") {
13484
+ } else if (_react_doctor_require_typescript_default.isPropertyAccessExpression(node.expression) && node.expression.name.text === "import") {
13483
13485
  const loaderExpression = node.expression.expression;
13484
13486
  const loaderSymbol = typeChecker.getSymbolAtLocation(loaderExpression);
13485
- const isInlineFactory = ts.isCallExpression(loaderExpression) && isFactoryExpression(loaderExpression.expression);
13487
+ const isInlineFactory = _react_doctor_require_typescript_default.isCallExpression(loaderExpression) && isFactoryExpression(loaderExpression.expression);
13486
13488
  if (loaderSymbol && loaderSymbols.has(loaderSymbol) || isInlineFactory) recordLoaderCall(node);
13487
13489
  }
13488
13490
  }
13489
- ts.forEachChild(node, visitLoaderCalls);
13491
+ _react_doctor_require_typescript_default.forEachChild(node, visitLoaderCalls);
13490
13492
  };
13491
13493
  visitLoaderCalls(boundSourceFile);
13492
13494
  return references;
@@ -36057,10 +36059,10 @@ const extractMarkdownModuleStatements = (sourceText) => {
36057
36059
  //#endregion
36058
36060
  //#region ../core/src/project-analysis/collect/parse.ts
36059
36061
  const extractRecoveryImports = (filePath, sourceText) => {
36060
- const sourceFile = ts.createSourceFile(filePath, sourceText, ts.ScriptTarget.Latest, true, filePath.endsWith("x") ? ts.ScriptKind.TSX : ts.ScriptKind.TS);
36062
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile(filePath, sourceText, _react_doctor_require_typescript_default.ScriptTarget.Latest, true, filePath.endsWith("x") ? _react_doctor_require_typescript_default.ScriptKind.TSX : _react_doctor_require_typescript_default.ScriptKind.TS);
36061
36063
  const imports = [];
36062
36064
  for (const statement of sourceFile.statements) {
36063
- if (!ts.isImportDeclaration(statement) || !ts.isStringLiteral(statement.moduleSpecifier)) continue;
36065
+ if (!_react_doctor_require_typescript_default.isImportDeclaration(statement) || !_react_doctor_require_typescript_default.isStringLiteral(statement.moduleSpecifier)) continue;
36064
36066
  const importedNames = [];
36065
36067
  const importClause = statement.importClause;
36066
36068
  if (importClause?.name) importedNames.push({
@@ -36070,14 +36072,14 @@ const extractRecoveryImports = (filePath, sourceText) => {
36070
36072
  isDefault: true,
36071
36073
  isTypeOnly: importClause.isTypeOnly
36072
36074
  });
36073
- if (importClause?.namedBindings && ts.isNamespaceImport(importClause.namedBindings)) importedNames.push({
36075
+ if (importClause?.namedBindings && _react_doctor_require_typescript_default.isNamespaceImport(importClause.namedBindings)) importedNames.push({
36074
36076
  name: "*",
36075
36077
  alias: importClause.namedBindings.name.text,
36076
36078
  isNamespace: true,
36077
36079
  isDefault: false,
36078
36080
  isTypeOnly: importClause.isTypeOnly
36079
36081
  });
36080
- if (importClause?.namedBindings && ts.isNamedImports(importClause.namedBindings)) for (const element of importClause.namedBindings.elements) importedNames.push({
36082
+ if (importClause?.namedBindings && _react_doctor_require_typescript_default.isNamedImports(importClause.namedBindings)) for (const element of importClause.namedBindings.elements) importedNames.push({
36081
36083
  name: element.propertyName?.text ?? element.name.text,
36082
36084
  alias: element.name.text,
36083
36085
  isNamespace: false,
@@ -36102,18 +36104,18 @@ const restoreMaskedSourceRange = (maskedSource, sourceSection, startOffset) => {
36102
36104
  for (let characterIndex = 0; characterIndex < sourceSection.length; characterIndex++) maskedSource[startOffset + characterIndex] = sourceSection[characterIndex];
36103
36105
  };
36104
36106
  const maskSelectedExportKeywords = (sourceText, shouldMaskStatement) => {
36105
- const sourceFile = ts.createSourceFile("embedded-component.tsx", sourceText, ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX);
36107
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile("embedded-component.tsx", sourceText, _react_doctor_require_typescript_default.ScriptTarget.Latest, true, _react_doctor_require_typescript_default.ScriptKind.TSX);
36106
36108
  const maskedSource = sourceText.split("");
36107
36109
  for (const statement of sourceFile.statements) {
36108
- if (!shouldMaskStatement(statement) || !ts.canHaveModifiers(statement)) continue;
36109
- const exportModifier = ts.getModifiers(statement)?.find((modifier) => modifier.kind === ts.SyntaxKind.ExportKeyword);
36110
+ if (!shouldMaskStatement(statement) || !_react_doctor_require_typescript_default.canHaveModifiers(statement)) continue;
36111
+ const exportModifier = _react_doctor_require_typescript_default.getModifiers(statement)?.find((modifier) => modifier.kind === _react_doctor_require_typescript_default.SyntaxKind.ExportKeyword);
36110
36112
  if (!exportModifier) continue;
36111
36113
  for (let characterIndex = exportModifier.getStart(sourceFile); characterIndex < exportModifier.end; characterIndex++) maskedSource[characterIndex] = " ";
36112
36114
  }
36113
36115
  return maskedSource.join("");
36114
36116
  };
36115
- const maskAstroPropsExports = (sourceText) => maskSelectedExportKeywords(sourceText, (statement) => (ts.isInterfaceDeclaration(statement) || ts.isTypeAliasDeclaration(statement)) && statement.name.text === "Props");
36116
- const maskSvelteInstancePropExports = (sourceText) => maskSelectedExportKeywords(sourceText, (statement) => ts.isVariableStatement(statement) && (statement.declarationList.flags & ts.NodeFlags.Let) !== 0);
36117
+ const maskAstroPropsExports = (sourceText) => maskSelectedExportKeywords(sourceText, (statement) => (_react_doctor_require_typescript_default.isInterfaceDeclaration(statement) || _react_doctor_require_typescript_default.isTypeAliasDeclaration(statement)) && statement.name.text === "Props");
36118
+ const maskSvelteInstancePropExports = (sourceText) => maskSelectedExportKeywords(sourceText, (statement) => _react_doctor_require_typescript_default.isVariableStatement(statement) && (statement.declarationList.flags & _react_doctor_require_typescript_default.NodeFlags.Let) !== 0);
36117
36119
  const extractAstroSources = (sourceText) => {
36118
36120
  const maskedSource = createWhitespaceMask(sourceText);
36119
36121
  let astroRoot;
@@ -38057,13 +38059,6 @@ const discoverMobileEntryPoints = (directory) => {
38057
38059
  }
38058
38060
  };
38059
38061
  //#endregion
38060
- //#region ../core/src/utils/unwrap-typescript-expression.ts
38061
- const unwrapTypescriptExpression = (expression) => {
38062
- let currentExpression = expression;
38063
- while (ts.isParenthesizedExpression(currentExpression) || ts.isAsExpression(currentExpression) || ts.isSatisfiesExpression(currentExpression) || ts.isNonNullExpression(currentExpression) || ts.isTypeAssertionExpression(currentExpression)) currentExpression = currentExpression.expression;
38064
- return currentExpression;
38065
- };
38066
- //#endregion
38067
38062
  //#region ../core/src/project-analysis/collect/expo-config-plugin-entries.ts
38068
38063
  const EXPO_CONFIG_FILE_GLOBS = ["app.config.{ts,mts,cts,js,mjs,cjs}", "app.json"];
38069
38064
  const NESTED_EXPO_CONFIG_FILE_GLOBS = [
@@ -38107,52 +38102,52 @@ const addExpoPluginEntry = (entries, packageNamePlugins, rootDirectory, configDi
38107
38102
  entries.add(resolvedPath);
38108
38103
  };
38109
38104
  const getPropertyName$4 = (name) => {
38110
- if (ts.isIdentifier(name) || ts.isStringLiteral(name) || ts.isNumericLiteral(name)) return name.text;
38105
+ if (_react_doctor_require_typescript_default.isIdentifier(name) || _react_doctor_require_typescript_default.isStringLiteral(name) || _react_doctor_require_typescript_default.isNumericLiteral(name)) return name.text;
38111
38106
  };
38112
38107
  const collectExpoPluginPathsFromArray = (array, entries, packageNamePlugins, rootDirectory, configDirectory) => {
38113
38108
  for (const element of array.elements) {
38114
- if (ts.isStringLiteral(element) || ts.isNoSubstitutionTemplateLiteral(element)) {
38109
+ if (_react_doctor_require_typescript_default.isStringLiteral(element) || _react_doctor_require_typescript_default.isNoSubstitutionTemplateLiteral(element)) {
38115
38110
  addExpoPluginEntry(entries, packageNamePlugins, rootDirectory, configDirectory, element.text);
38116
38111
  continue;
38117
38112
  }
38118
- if (ts.isArrayLiteralExpression(element)) {
38113
+ if (_react_doctor_require_typescript_default.isArrayLiteralExpression(element)) {
38119
38114
  const [pluginName] = element.elements;
38120
- if (pluginName && (ts.isStringLiteral(pluginName) || ts.isNoSubstitutionTemplateLiteral(pluginName))) addExpoPluginEntry(entries, packageNamePlugins, rootDirectory, configDirectory, pluginName.text);
38115
+ if (pluginName && (_react_doctor_require_typescript_default.isStringLiteral(pluginName) || _react_doctor_require_typescript_default.isNoSubstitutionTemplateLiteral(pluginName))) addExpoPluginEntry(entries, packageNamePlugins, rootDirectory, configDirectory, pluginName.text);
38121
38116
  }
38122
38117
  }
38123
38118
  };
38124
38119
  const collectExpoPluginPathsFromConfigObject = (objectLiteral, entries, packageNamePlugins, rootDirectory, configDirectory) => {
38125
38120
  for (const property of objectLiteral.properties) {
38126
- if (!ts.isPropertyAssignment(property)) continue;
38121
+ if (!_react_doctor_require_typescript_default.isPropertyAssignment(property)) continue;
38127
38122
  const propertyName = getPropertyName$4(property.name);
38128
- if (propertyName === "plugins" && ts.isArrayLiteralExpression(property.initializer)) collectExpoPluginPathsFromArray(property.initializer, entries, packageNamePlugins, rootDirectory, configDirectory);
38129
- if (propertyName === "expo" && ts.isObjectLiteralExpression(property.initializer)) collectExpoPluginPathsFromConfigObject(property.initializer, entries, packageNamePlugins, rootDirectory, configDirectory);
38123
+ if (propertyName === "plugins" && _react_doctor_require_typescript_default.isArrayLiteralExpression(property.initializer)) collectExpoPluginPathsFromArray(property.initializer, entries, packageNamePlugins, rootDirectory, configDirectory);
38124
+ if (propertyName === "expo" && _react_doctor_require_typescript_default.isObjectLiteralExpression(property.initializer)) collectExpoPluginPathsFromConfigObject(property.initializer, entries, packageNamePlugins, rootDirectory, configDirectory);
38130
38125
  }
38131
38126
  };
38132
38127
  const collectReturnedExpoConfigPluginPaths = (body, entries, packageNamePlugins, rootDirectory, configDirectory) => {
38133
- if (!ts.isBlock(body)) {
38128
+ if (!_react_doctor_require_typescript_default.isBlock(body)) {
38134
38129
  const expression = unwrapTypescriptExpression(body);
38135
- if (ts.isObjectLiteralExpression(expression)) collectExpoPluginPathsFromConfigObject(expression, entries, packageNamePlugins, rootDirectory, configDirectory);
38130
+ if (_react_doctor_require_typescript_default.isObjectLiteralExpression(expression)) collectExpoPluginPathsFromConfigObject(expression, entries, packageNamePlugins, rootDirectory, configDirectory);
38136
38131
  return;
38137
38132
  }
38138
38133
  const visit = (node) => {
38139
- if (ts.isFunctionDeclaration(node) || ts.isFunctionExpression(node) || ts.isArrowFunction(node)) return;
38140
- if (ts.isReturnStatement(node) && node.expression) {
38134
+ if (_react_doctor_require_typescript_default.isFunctionDeclaration(node) || _react_doctor_require_typescript_default.isFunctionExpression(node) || _react_doctor_require_typescript_default.isArrowFunction(node)) return;
38135
+ if (_react_doctor_require_typescript_default.isReturnStatement(node) && node.expression) {
38141
38136
  const expression = unwrapTypescriptExpression(node.expression);
38142
- if (ts.isObjectLiteralExpression(expression)) collectExpoPluginPathsFromConfigObject(expression, entries, packageNamePlugins, rootDirectory, configDirectory);
38137
+ if (_react_doctor_require_typescript_default.isObjectLiteralExpression(expression)) collectExpoPluginPathsFromConfigObject(expression, entries, packageNamePlugins, rootDirectory, configDirectory);
38143
38138
  return;
38144
38139
  }
38145
- ts.forEachChild(node, visit);
38140
+ _react_doctor_require_typescript_default.forEachChild(node, visit);
38146
38141
  };
38147
38142
  visit(body);
38148
38143
  };
38149
38144
  const collectExpoPluginPathsFromConfigExpression = (expression, entries, packageNamePlugins, rootDirectory, configDirectory, bindings, seenIdentifiers = /* @__PURE__ */ new Set()) => {
38150
38145
  const configExpression = unwrapTypescriptExpression(expression);
38151
- if (ts.isObjectLiteralExpression(configExpression)) {
38146
+ if (_react_doctor_require_typescript_default.isObjectLiteralExpression(configExpression)) {
38152
38147
  collectExpoPluginPathsFromConfigObject(configExpression, entries, packageNamePlugins, rootDirectory, configDirectory);
38153
38148
  return;
38154
38149
  }
38155
- if (ts.isIdentifier(configExpression)) {
38150
+ if (_react_doctor_require_typescript_default.isIdentifier(configExpression)) {
38156
38151
  if (seenIdentifiers.has(configExpression.text)) return;
38157
38152
  seenIdentifiers.add(configExpression.text);
38158
38153
  const boundExpression = bindings.expressions.get(configExpression.text);
@@ -38164,23 +38159,23 @@ const collectExpoPluginPathsFromConfigExpression = (expression, entries, package
38164
38159
  if (boundFunction?.body) collectReturnedExpoConfigPluginPaths(boundFunction.body, entries, packageNamePlugins, rootDirectory, configDirectory);
38165
38160
  return;
38166
38161
  }
38167
- if (ts.isArrowFunction(configExpression)) {
38162
+ if (_react_doctor_require_typescript_default.isArrowFunction(configExpression)) {
38168
38163
  collectReturnedExpoConfigPluginPaths(configExpression.body, entries, packageNamePlugins, rootDirectory, configDirectory);
38169
38164
  return;
38170
38165
  }
38171
- if (ts.isFunctionExpression(configExpression) && configExpression.body) collectReturnedExpoConfigPluginPaths(configExpression.body, entries, packageNamePlugins, rootDirectory, configDirectory);
38166
+ if (_react_doctor_require_typescript_default.isFunctionExpression(configExpression) && configExpression.body) collectReturnedExpoConfigPluginPaths(configExpression.body, entries, packageNamePlugins, rootDirectory, configDirectory);
38172
38167
  };
38173
- const hasDefaultExportModifier = (node) => Boolean(ts.canHaveModifiers(node) && ts.getModifiers(node)?.some((modifier) => modifier.kind === ts.SyntaxKind.DefaultKeyword));
38174
- const isModuleExportsAssignmentTarget = (node) => ts.isPropertyAccessExpression(node) && ts.isIdentifier(node.expression) && node.expression.text === "module" && node.name.text === "exports";
38168
+ const hasDefaultExportModifier = (node) => Boolean(_react_doctor_require_typescript_default.canHaveModifiers(node) && _react_doctor_require_typescript_default.getModifiers(node)?.some((modifier) => modifier.kind === _react_doctor_require_typescript_default.SyntaxKind.DefaultKeyword));
38169
+ const isModuleExportsAssignmentTarget = (node) => _react_doctor_require_typescript_default.isPropertyAccessExpression(node) && _react_doctor_require_typescript_default.isIdentifier(node.expression) && node.expression.text === "module" && node.name.text === "exports";
38175
38170
  const collectStaticConfigBindings = (sourceFile) => {
38176
38171
  const expressions = /* @__PURE__ */ new Map();
38177
38172
  const functions = /* @__PURE__ */ new Map();
38178
38173
  for (const statement of sourceFile.statements) {
38179
- if (ts.isVariableStatement(statement)) {
38180
- for (const declaration of statement.declarationList.declarations) if (ts.isIdentifier(declaration.name) && declaration.initializer) expressions.set(declaration.name.text, declaration.initializer);
38174
+ if (_react_doctor_require_typescript_default.isVariableStatement(statement)) {
38175
+ for (const declaration of statement.declarationList.declarations) if (_react_doctor_require_typescript_default.isIdentifier(declaration.name) && declaration.initializer) expressions.set(declaration.name.text, declaration.initializer);
38181
38176
  continue;
38182
38177
  }
38183
- if (ts.isFunctionDeclaration(statement) && statement.name) functions.set(statement.name.text, statement);
38178
+ if (_react_doctor_require_typescript_default.isFunctionDeclaration(statement) && statement.name) functions.set(statement.name.text, statement);
38184
38179
  }
38185
38180
  return {
38186
38181
  expressions,
@@ -38189,23 +38184,23 @@ const collectStaticConfigBindings = (sourceFile) => {
38189
38184
  };
38190
38185
  const collectExpoPluginPathsFromAppConfig = (configPath, entries, packageNamePlugins, rootDirectory) => {
38191
38186
  const extension = extname(configPath);
38192
- const sourceFile = ts.createSourceFile(configPath, readFileSync(configPath, "utf8"), ts.ScriptTarget.Latest, true, extension === ".ts" || extension === ".mts" || extension === ".cts" ? ts.ScriptKind.TS : ts.ScriptKind.JS);
38187
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile(configPath, readFileSync(configPath, "utf8"), _react_doctor_require_typescript_default.ScriptTarget.Latest, true, extension === ".ts" || extension === ".mts" || extension === ".cts" ? _react_doctor_require_typescript_default.ScriptKind.TS : _react_doctor_require_typescript_default.ScriptKind.JS);
38193
38188
  const configDirectory = dirname(configPath);
38194
38189
  const bindings = collectStaticConfigBindings(sourceFile);
38195
38190
  const visit = (node) => {
38196
- if (ts.isExportAssignment(node)) {
38191
+ if (_react_doctor_require_typescript_default.isExportAssignment(node)) {
38197
38192
  collectExpoPluginPathsFromConfigExpression(node.expression, entries, packageNamePlugins, rootDirectory, configDirectory, bindings);
38198
38193
  return;
38199
38194
  }
38200
- if (ts.isFunctionDeclaration(node) && hasDefaultExportModifier(node) && node.body) {
38195
+ if (_react_doctor_require_typescript_default.isFunctionDeclaration(node) && hasDefaultExportModifier(node) && node.body) {
38201
38196
  collectReturnedExpoConfigPluginPaths(node.body, entries, packageNamePlugins, rootDirectory, configDirectory);
38202
38197
  return;
38203
38198
  }
38204
- if (ts.isBinaryExpression(node) && node.operatorToken.kind === ts.SyntaxKind.EqualsToken && isModuleExportsAssignmentTarget(node.left)) {
38199
+ if (_react_doctor_require_typescript_default.isBinaryExpression(node) && node.operatorToken.kind === _react_doctor_require_typescript_default.SyntaxKind.EqualsToken && isModuleExportsAssignmentTarget(node.left)) {
38205
38200
  collectExpoPluginPathsFromConfigExpression(node.right, entries, packageNamePlugins, rootDirectory, configDirectory, bindings);
38206
38201
  return;
38207
38202
  }
38208
- ts.forEachChild(node, visit);
38203
+ _react_doctor_require_typescript_default.forEachChild(node, visit);
38209
38204
  };
38210
38205
  visit(sourceFile);
38211
38206
  };
@@ -38885,23 +38880,23 @@ const resolveGeneratedOutputs = (patterns, configDirectory) => {
38885
38880
  };
38886
38881
  const extractVitePluginConfigContents = (content) => {
38887
38882
  const pluginConfigContents = [];
38888
- const sourceFile = ts.createSourceFile("vite.config.ts", content, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
38889
- const pluginName = sourceFile.statements.find((statement) => ts.isImportDeclaration(statement) && ts.isStringLiteral(statement.moduleSpecifier) && statement.moduleSpecifier.text === "vite-plugin-graphql-codegen" && statement.importClause?.name !== void 0)?.importClause?.name?.text;
38883
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile("vite.config.ts", content, _react_doctor_require_typescript_default.ScriptTarget.Latest, true, _react_doctor_require_typescript_default.ScriptKind.TS);
38884
+ const pluginName = sourceFile.statements.find((statement) => _react_doctor_require_typescript_default.isImportDeclaration(statement) && _react_doctor_require_typescript_default.isStringLiteral(statement.moduleSpecifier) && statement.moduleSpecifier.text === "vite-plugin-graphql-codegen" && statement.importClause?.name !== void 0)?.importClause?.name?.text;
38890
38885
  if (!pluginName) return [];
38891
- const exportAssignment = sourceFile.statements.find((statement) => ts.isExportAssignment(statement) && !statement.isExportEquals);
38886
+ const exportAssignment = sourceFile.statements.find((statement) => _react_doctor_require_typescript_default.isExportAssignment(statement) && !statement.isExportEquals);
38892
38887
  if (!exportAssignment) return [];
38893
38888
  const topLevelVariableInitializers = /* @__PURE__ */ new Map();
38894
38889
  for (const statement of sourceFile.statements) {
38895
- if (!ts.isVariableStatement(statement)) continue;
38896
- for (const declaration of statement.declarationList.declarations) if (ts.isIdentifier(declaration.name) && declaration.initializer) topLevelVariableInitializers.set(declaration.name.text, declaration.initializer);
38890
+ if (!_react_doctor_require_typescript_default.isVariableStatement(statement)) continue;
38891
+ for (const declaration of statement.declarationList.declarations) if (_react_doctor_require_typescript_default.isIdentifier(declaration.name) && declaration.initializer) topLevelVariableInitializers.set(declaration.name.text, declaration.initializer);
38897
38892
  }
38898
38893
  const unwrapExpression = (expression) => {
38899
- if (ts.isParenthesizedExpression(expression) || ts.isAsExpression(expression) || ts.isSatisfiesExpression(expression)) return unwrapExpression(expression.expression);
38894
+ if (_react_doctor_require_typescript_default.isParenthesizedExpression(expression) || _react_doctor_require_typescript_default.isAsExpression(expression) || _react_doctor_require_typescript_default.isSatisfiesExpression(expression)) return unwrapExpression(expression.expression);
38900
38895
  return expression;
38901
38896
  };
38902
38897
  const collectPluginExpression = (expression, variableInitializers, isPluginNameShadowed, visitedIdentifiers = /* @__PURE__ */ new Set()) => {
38903
38898
  const unwrappedExpression = unwrapExpression(expression);
38904
- if (ts.isCallExpression(unwrappedExpression) && ts.isIdentifier(unwrappedExpression.expression) && unwrappedExpression.expression.text === pluginName) {
38899
+ if (_react_doctor_require_typescript_default.isCallExpression(unwrappedExpression) && _react_doctor_require_typescript_default.isIdentifier(unwrappedExpression.expression) && unwrappedExpression.expression.text === pluginName) {
38905
38900
  const configArgument = unwrappedExpression.arguments[0];
38906
38901
  if (configArgument && !isPluginNameShadowed) {
38907
38902
  const bindingStatements = [...variableInitializers.entries()].map(([variableName, initializer]) => `const ${variableName} = (${initializer.getText(sourceFile)});`).join("\n");
@@ -38909,54 +38904,54 @@ const extractVitePluginConfigContents = (content) => {
38909
38904
  }
38910
38905
  return;
38911
38906
  }
38912
- if (ts.isIdentifier(unwrappedExpression) && !visitedIdentifiers.has(unwrappedExpression.text)) {
38907
+ if (_react_doctor_require_typescript_default.isIdentifier(unwrappedExpression) && !visitedIdentifiers.has(unwrappedExpression.text)) {
38913
38908
  const initializer = variableInitializers.get(unwrappedExpression.text);
38914
38909
  if (!initializer) return;
38915
38910
  collectPluginExpression(initializer, variableInitializers, isPluginNameShadowed, new Set(visitedIdentifiers).add(unwrappedExpression.text));
38916
38911
  return;
38917
38912
  }
38918
- if (ts.isArrayLiteralExpression(unwrappedExpression)) {
38919
- for (const element of unwrappedExpression.elements) collectPluginExpression(ts.isSpreadElement(element) ? element.expression : element, variableInitializers, isPluginNameShadowed, visitedIdentifiers);
38913
+ if (_react_doctor_require_typescript_default.isArrayLiteralExpression(unwrappedExpression)) {
38914
+ for (const element of unwrappedExpression.elements) collectPluginExpression(_react_doctor_require_typescript_default.isSpreadElement(element) ? element.expression : element, variableInitializers, isPluginNameShadowed, visitedIdentifiers);
38920
38915
  return;
38921
38916
  }
38922
- if (ts.isConditionalExpression(unwrappedExpression)) {
38917
+ if (_react_doctor_require_typescript_default.isConditionalExpression(unwrappedExpression)) {
38923
38918
  collectPluginExpression(unwrappedExpression.whenTrue, variableInitializers, isPluginNameShadowed, visitedIdentifiers);
38924
38919
  collectPluginExpression(unwrappedExpression.whenFalse, variableInitializers, isPluginNameShadowed, visitedIdentifiers);
38925
38920
  return;
38926
38921
  }
38927
- if (ts.isBinaryExpression(unwrappedExpression) && (unwrappedExpression.operatorToken.kind === ts.SyntaxKind.AmpersandAmpersandToken || unwrappedExpression.operatorToken.kind === ts.SyntaxKind.BarBarToken || unwrappedExpression.operatorToken.kind === ts.SyntaxKind.QuestionQuestionToken)) {
38922
+ if (_react_doctor_require_typescript_default.isBinaryExpression(unwrappedExpression) && (unwrappedExpression.operatorToken.kind === _react_doctor_require_typescript_default.SyntaxKind.AmpersandAmpersandToken || unwrappedExpression.operatorToken.kind === _react_doctor_require_typescript_default.SyntaxKind.BarBarToken || unwrappedExpression.operatorToken.kind === _react_doctor_require_typescript_default.SyntaxKind.QuestionQuestionToken)) {
38928
38923
  collectPluginExpression(unwrappedExpression.left, variableInitializers, isPluginNameShadowed, visitedIdentifiers);
38929
38924
  collectPluginExpression(unwrappedExpression.right, variableInitializers, isPluginNameShadowed, visitedIdentifiers);
38930
38925
  }
38931
38926
  };
38932
38927
  const collectConfigPlugins = (expression, variableInitializers, isPluginNameShadowed, visitedIdentifiers = /* @__PURE__ */ new Set()) => {
38933
38928
  const unwrappedExpression = unwrapExpression(expression);
38934
- if (ts.isIdentifier(unwrappedExpression) && !visitedIdentifiers.has(unwrappedExpression.text)) {
38929
+ if (_react_doctor_require_typescript_default.isIdentifier(unwrappedExpression) && !visitedIdentifiers.has(unwrappedExpression.text)) {
38935
38930
  const initializer = variableInitializers.get(unwrappedExpression.text);
38936
38931
  if (!initializer) return;
38937
38932
  collectConfigPlugins(initializer, variableInitializers, isPluginNameShadowed, new Set(visitedIdentifiers).add(unwrappedExpression.text));
38938
38933
  return;
38939
38934
  }
38940
- if (ts.isCallExpression(unwrappedExpression)) {
38935
+ if (_react_doctor_require_typescript_default.isCallExpression(unwrappedExpression)) {
38941
38936
  const calledExpression = unwrapExpression(unwrappedExpression.expression);
38942
- if (!ts.isIdentifier(calledExpression) || calledExpression.text !== "defineConfig") return;
38937
+ if (!_react_doctor_require_typescript_default.isIdentifier(calledExpression) || calledExpression.text !== "defineConfig") return;
38943
38938
  const configArgument = unwrappedExpression.arguments[0];
38944
38939
  if (!configArgument) return;
38945
38940
  const unwrappedArgument = unwrapExpression(configArgument);
38946
- if (ts.isArrowFunction(unwrappedArgument) || ts.isFunctionExpression(unwrappedArgument)) {
38947
- let callbackPluginNameShadowed = isPluginNameShadowed || unwrappedArgument.parameters.some((parameter) => ts.isIdentifier(parameter.name) && parameter.name.text === pluginName);
38948
- if (!ts.isBlock(unwrappedArgument.body)) {
38941
+ if (_react_doctor_require_typescript_default.isArrowFunction(unwrappedArgument) || _react_doctor_require_typescript_default.isFunctionExpression(unwrappedArgument)) {
38942
+ let callbackPluginNameShadowed = isPluginNameShadowed || unwrappedArgument.parameters.some((parameter) => _react_doctor_require_typescript_default.isIdentifier(parameter.name) && parameter.name.text === pluginName);
38943
+ if (!_react_doctor_require_typescript_default.isBlock(unwrappedArgument.body)) {
38949
38944
  collectConfigPlugins(unwrappedArgument.body, variableInitializers, callbackPluginNameShadowed);
38950
38945
  return;
38951
38946
  }
38952
38947
  const callbackVariableInitializers = new Map(variableInitializers);
38953
38948
  for (const statement of unwrappedArgument.body.statements) {
38954
- if (ts.isVariableStatement(statement)) for (const declaration of statement.declarationList.declarations) {
38955
- if (!ts.isIdentifier(declaration.name)) continue;
38949
+ if (_react_doctor_require_typescript_default.isVariableStatement(statement)) for (const declaration of statement.declarationList.declarations) {
38950
+ if (!_react_doctor_require_typescript_default.isIdentifier(declaration.name)) continue;
38956
38951
  if (declaration.name.text === pluginName) callbackPluginNameShadowed = true;
38957
38952
  if (declaration.initializer) callbackVariableInitializers.set(declaration.name.text, declaration.initializer);
38958
38953
  }
38959
- if (ts.isReturnStatement(statement) && statement.expression) {
38954
+ if (_react_doctor_require_typescript_default.isReturnStatement(statement) && statement.expression) {
38960
38955
  collectConfigPlugins(statement.expression, callbackVariableInitializers, callbackPluginNameShadowed);
38961
38956
  return;
38962
38957
  }
@@ -38966,10 +38961,10 @@ const extractVitePluginConfigContents = (content) => {
38966
38961
  collectConfigPlugins(unwrappedArgument, variableInitializers, isPluginNameShadowed);
38967
38962
  return;
38968
38963
  }
38969
- if (!ts.isObjectLiteralExpression(unwrappedExpression)) return;
38964
+ if (!_react_doctor_require_typescript_default.isObjectLiteralExpression(unwrappedExpression)) return;
38970
38965
  for (const property of unwrappedExpression.properties) {
38971
- if (ts.isPropertyAssignment(property) && (ts.isIdentifier(property.name) && property.name.text === "plugins" || ts.isStringLiteral(property.name) && property.name.text === "plugins")) collectPluginExpression(property.initializer, variableInitializers, isPluginNameShadowed);
38972
- if (ts.isShorthandPropertyAssignment(property) && property.name.text === "plugins") collectPluginExpression(property.name, variableInitializers, isPluginNameShadowed);
38966
+ if (_react_doctor_require_typescript_default.isPropertyAssignment(property) && (_react_doctor_require_typescript_default.isIdentifier(property.name) && property.name.text === "plugins" || _react_doctor_require_typescript_default.isStringLiteral(property.name) && property.name.text === "plugins")) collectPluginExpression(property.initializer, variableInitializers, isPluginNameShadowed);
38967
+ if (_react_doctor_require_typescript_default.isShorthandPropertyAssignment(property) && property.name.text === "plugins") collectPluginExpression(property.name, variableInitializers, isPluginNameShadowed);
38973
38968
  }
38974
38969
  };
38975
38970
  collectConfigPlugins(exportAssignment.expression, topLevelVariableInitializers, false);
@@ -39093,24 +39088,24 @@ const TARO_ARRAY_SELECTION_METHODS = new Set([
39093
39088
  "splice"
39094
39089
  ]);
39095
39090
  const getPropertyName$2 = (propertyName) => {
39096
- if (ts.isIdentifier(propertyName) || ts.isStringLiteral(propertyName) || ts.isNoSubstitutionTemplateLiteral(propertyName)) return propertyName.text;
39091
+ if (_react_doctor_require_typescript_default.isIdentifier(propertyName) || _react_doctor_require_typescript_default.isStringLiteral(propertyName) || _react_doctor_require_typescript_default.isNoSubstitutionTemplateLiteral(propertyName)) return propertyName.text;
39097
39092
  };
39098
39093
  const unwrapConfigExpression = (expression) => {
39099
- if (ts.isParenthesizedExpression(expression) || ts.isAsExpression(expression) || ts.isSatisfiesExpression(expression)) return unwrapConfigExpression(expression.expression);
39100
- if (ts.isCallExpression(expression)) {
39094
+ if (_react_doctor_require_typescript_default.isParenthesizedExpression(expression) || _react_doctor_require_typescript_default.isAsExpression(expression) || _react_doctor_require_typescript_default.isSatisfiesExpression(expression)) return unwrapConfigExpression(expression.expression);
39095
+ if (_react_doctor_require_typescript_default.isCallExpression(expression)) {
39101
39096
  const [configArgument] = expression.arguments;
39102
39097
  return configArgument ? unwrapConfigExpression(configArgument) : expression;
39103
39098
  }
39104
39099
  return expression;
39105
39100
  };
39106
39101
  const unwrapArrayExpression = (expression) => {
39107
- if (ts.isParenthesizedExpression(expression) || ts.isAsExpression(expression) || ts.isSatisfiesExpression(expression)) return unwrapArrayExpression(expression.expression);
39102
+ if (_react_doctor_require_typescript_default.isParenthesizedExpression(expression) || _react_doctor_require_typescript_default.isAsExpression(expression) || _react_doctor_require_typescript_default.isSatisfiesExpression(expression)) return unwrapArrayExpression(expression.expression);
39108
39103
  return expression;
39109
39104
  };
39110
39105
  const getPropertyInitializer = (objectLiteral, propertyNames) => {
39111
39106
  for (const property of objectLiteral.properties) {
39112
- if (ts.isShorthandPropertyAssignment(property) && propertyNames.has(property.name.text)) return property.name;
39113
- if (!ts.isPropertyAssignment(property)) continue;
39107
+ if (_react_doctor_require_typescript_default.isShorthandPropertyAssignment(property) && propertyNames.has(property.name.text)) return property.name;
39108
+ if (!_react_doctor_require_typescript_default.isPropertyAssignment(property)) continue;
39114
39109
  const propertyName = getPropertyName$2(property.name);
39115
39110
  if (propertyName && propertyNames.has(propertyName)) return property.initializer;
39116
39111
  }
@@ -39118,16 +39113,16 @@ const getPropertyInitializer = (objectLiteral, propertyNames) => {
39118
39113
  const collectArrayElements = (expression, variableInitializers, pushedElements, visitedIdentifiers = /* @__PURE__ */ new Set()) => {
39119
39114
  if (!expression) return [];
39120
39115
  const unwrappedExpression = unwrapArrayExpression(expression);
39121
- if (ts.isArrayLiteralExpression(unwrappedExpression)) return [...unwrappedExpression.elements];
39122
- if (ts.isConditionalExpression(unwrappedExpression)) return [...collectArrayElements(unwrappedExpression.whenTrue, variableInitializers, pushedElements, visitedIdentifiers), ...collectArrayElements(unwrappedExpression.whenFalse, variableInitializers, pushedElements, visitedIdentifiers)];
39123
- if (ts.isCallExpression(unwrappedExpression) && ts.isPropertyAccessExpression(unwrappedExpression.expression) && TARO_ARRAY_SELECTION_METHODS.has(unwrappedExpression.expression.name.text)) return collectArrayElements(unwrappedExpression.expression.expression, variableInitializers, pushedElements, visitedIdentifiers);
39124
- if (ts.isIdentifier(unwrappedExpression) && !visitedIdentifiers.has(unwrappedExpression.text)) {
39116
+ if (_react_doctor_require_typescript_default.isArrayLiteralExpression(unwrappedExpression)) return [...unwrappedExpression.elements];
39117
+ if (_react_doctor_require_typescript_default.isConditionalExpression(unwrappedExpression)) return [...collectArrayElements(unwrappedExpression.whenTrue, variableInitializers, pushedElements, visitedIdentifiers), ...collectArrayElements(unwrappedExpression.whenFalse, variableInitializers, pushedElements, visitedIdentifiers)];
39118
+ if (_react_doctor_require_typescript_default.isCallExpression(unwrappedExpression) && _react_doctor_require_typescript_default.isPropertyAccessExpression(unwrappedExpression.expression) && TARO_ARRAY_SELECTION_METHODS.has(unwrappedExpression.expression.name.text)) return collectArrayElements(unwrappedExpression.expression.expression, variableInitializers, pushedElements, visitedIdentifiers);
39119
+ if (_react_doctor_require_typescript_default.isIdentifier(unwrappedExpression) && !visitedIdentifiers.has(unwrappedExpression.text)) {
39125
39120
  const nextVisitedIdentifiers = new Set(visitedIdentifiers).add(unwrappedExpression.text);
39126
39121
  return [...collectArrayElements(variableInitializers.get(unwrappedExpression.text), variableInitializers, pushedElements, nextVisitedIdentifiers), ...pushedElements.get(unwrappedExpression.text) ?? []];
39127
39122
  }
39128
39123
  return [];
39129
39124
  };
39130
- const collectPagePaths = (expression, variableInitializers, pushedElements) => collectArrayElements(expression, variableInitializers, pushedElements).flatMap((element) => ts.isStringLiteral(element) || ts.isNoSubstitutionTemplateLiteral(element) ? [element.text] : []);
39125
+ const collectPagePaths = (expression, variableInitializers, pushedElements) => collectArrayElements(expression, variableInitializers, pushedElements).flatMap((element) => _react_doctor_require_typescript_default.isStringLiteral(element) || _react_doctor_require_typescript_default.isNoSubstitutionTemplateLiteral(element) ? [element.text] : []);
39131
39126
  const resolvePageEntries = (configDirectory, pagePaths) => pagePaths.flatMap((pagePath) => {
39132
39127
  const resolvedEntry = resolveEntryWithExtensions(resolve(configDirectory, pagePath));
39133
39128
  return resolvedEntry ? [resolvedEntry] : [];
@@ -39136,9 +39131,9 @@ const collectConfigPageEntries = (configDirectory, configObject, variableInitial
39136
39131
  const entries = resolvePageEntries(configDirectory, collectPagePaths(getPropertyInitializer(configObject, new Set(["pages"])), variableInitializers, pushedElements));
39137
39132
  const subPackagesExpression = getPropertyInitializer(configObject, new Set(["subPackages", "subpackages"]));
39138
39133
  for (const subPackageElement of collectArrayElements(subPackagesExpression, variableInitializers, pushedElements)) {
39139
- if (!ts.isObjectLiteralExpression(subPackageElement)) continue;
39134
+ if (!_react_doctor_require_typescript_default.isObjectLiteralExpression(subPackageElement)) continue;
39140
39135
  const rootExpression = getPropertyInitializer(subPackageElement, new Set(["root"]));
39141
- if (!rootExpression || !ts.isStringLiteral(rootExpression) && !ts.isNoSubstitutionTemplateLiteral(rootExpression)) continue;
39136
+ if (!rootExpression || !_react_doctor_require_typescript_default.isStringLiteral(rootExpression) && !_react_doctor_require_typescript_default.isNoSubstitutionTemplateLiteral(rootExpression)) continue;
39142
39137
  const subPackagePages = collectPagePaths(getPropertyInitializer(subPackageElement, new Set(["pages"])), variableInitializers, pushedElements).map((pagePath) => `${rootExpression.text}/${pagePath}`);
39143
39138
  entries.push(...resolvePageEntries(configDirectory, subPackagePages));
39144
39139
  }
@@ -39147,56 +39142,56 @@ const collectConfigPageEntries = (configDirectory, configObject, variableInitial
39147
39142
  const collectVariableInitializers = (sourceFile) => {
39148
39143
  const variableInitializers = /* @__PURE__ */ new Map();
39149
39144
  for (const statement of sourceFile.statements) {
39150
- if (!ts.isVariableStatement(statement)) continue;
39151
- for (const declaration of statement.declarationList.declarations) if (ts.isIdentifier(declaration.name) && declaration.initializer) variableInitializers.set(declaration.name.text, declaration.initializer);
39145
+ if (!_react_doctor_require_typescript_default.isVariableStatement(statement)) continue;
39146
+ for (const declaration of statement.declarationList.declarations) if (_react_doctor_require_typescript_default.isIdentifier(declaration.name) && declaration.initializer) variableInitializers.set(declaration.name.text, declaration.initializer);
39152
39147
  }
39153
39148
  return variableInitializers;
39154
39149
  };
39155
39150
  const collectShadowedBindingNames = (bindingName, topLevelVariableNames) => {
39156
- if (ts.isIdentifier(bindingName)) return topLevelVariableNames.has(bindingName.text) ? [bindingName.text] : [];
39157
- return bindingName.elements.flatMap((bindingElement) => ts.isBindingElement(bindingElement) ? collectShadowedBindingNames(bindingElement.name, topLevelVariableNames) : []);
39151
+ if (_react_doctor_require_typescript_default.isIdentifier(bindingName)) return topLevelVariableNames.has(bindingName.text) ? [bindingName.text] : [];
39152
+ return bindingName.elements.flatMap((bindingElement) => _react_doctor_require_typescript_default.isBindingElement(bindingElement) ? collectShadowedBindingNames(bindingElement.name, topLevelVariableNames) : []);
39158
39153
  };
39159
39154
  const collectPushedElements = (sourceFile, topLevelVariableNames) => {
39160
39155
  const pushedElements = /* @__PURE__ */ new Map();
39161
39156
  const visitNode = (node, shadowedNames) => {
39162
- if (ts.isFunctionDeclaration(node) || ts.isFunctionExpression(node) || ts.isArrowFunction(node) || ts.isMethodDeclaration(node) || ts.isGetAccessorDeclaration(node) || ts.isSetAccessorDeclaration(node) || ts.isConstructorDeclaration(node)) return;
39157
+ if (_react_doctor_require_typescript_default.isFunctionDeclaration(node) || _react_doctor_require_typescript_default.isFunctionExpression(node) || _react_doctor_require_typescript_default.isArrowFunction(node) || _react_doctor_require_typescript_default.isMethodDeclaration(node) || _react_doctor_require_typescript_default.isGetAccessorDeclaration(node) || _react_doctor_require_typescript_default.isSetAccessorDeclaration(node) || _react_doctor_require_typescript_default.isConstructorDeclaration(node)) return;
39163
39158
  let nextShadowedNames = shadowedNames;
39164
39159
  const shadowBindingNames = (bindingNames) => {
39165
39160
  const newlyShadowedNames = bindingNames.flatMap((bindingName) => collectShadowedBindingNames(bindingName, topLevelVariableNames));
39166
39161
  if (newlyShadowedNames.length > 0) nextShadowedNames = new Set([...nextShadowedNames, ...newlyShadowedNames]);
39167
39162
  };
39168
- if (ts.isBlock(node)) shadowBindingNames(node.statements.flatMap((statement) => {
39169
- if (!ts.isVariableStatement(statement) || !(statement.declarationList.flags & ts.NodeFlags.BlockScoped)) return [];
39163
+ if (_react_doctor_require_typescript_default.isBlock(node)) shadowBindingNames(node.statements.flatMap((statement) => {
39164
+ if (!_react_doctor_require_typescript_default.isVariableStatement(statement) || !(statement.declarationList.flags & _react_doctor_require_typescript_default.NodeFlags.BlockScoped)) return [];
39170
39165
  return statement.declarationList.declarations.map((declaration) => declaration.name);
39171
39166
  }));
39172
- if (ts.isCatchClause(node) && node.variableDeclaration) shadowBindingNames([node.variableDeclaration.name]);
39173
- if (ts.isForStatement(node) || ts.isForInStatement(node) || ts.isForOfStatement(node)) {
39167
+ if (_react_doctor_require_typescript_default.isCatchClause(node) && node.variableDeclaration) shadowBindingNames([node.variableDeclaration.name]);
39168
+ if (_react_doctor_require_typescript_default.isForStatement(node) || _react_doctor_require_typescript_default.isForInStatement(node) || _react_doctor_require_typescript_default.isForOfStatement(node)) {
39174
39169
  const initializer = node.initializer;
39175
- if (initializer && ts.isVariableDeclarationList(initializer) && initializer.flags & ts.NodeFlags.BlockScoped) shadowBindingNames(initializer.declarations.map((declaration) => declaration.name));
39170
+ if (initializer && _react_doctor_require_typescript_default.isVariableDeclarationList(initializer) && initializer.flags & _react_doctor_require_typescript_default.NodeFlags.BlockScoped) shadowBindingNames(initializer.declarations.map((declaration) => declaration.name));
39176
39171
  }
39177
- if (ts.isCallExpression(node) && ts.isPropertyAccessExpression(node.expression) && node.expression.name.text === "push" && ts.isIdentifier(node.expression.expression) && topLevelVariableNames.has(node.expression.expression.text) && !nextShadowedNames.has(node.expression.expression.text)) {
39172
+ if (_react_doctor_require_typescript_default.isCallExpression(node) && _react_doctor_require_typescript_default.isPropertyAccessExpression(node.expression) && node.expression.name.text === "push" && _react_doctor_require_typescript_default.isIdentifier(node.expression.expression) && topLevelVariableNames.has(node.expression.expression.text) && !nextShadowedNames.has(node.expression.expression.text)) {
39178
39173
  const identifier = node.expression.expression.text;
39179
39174
  const existingElements = pushedElements.get(identifier) ?? [];
39180
39175
  existingElements.push(...node.arguments);
39181
39176
  pushedElements.set(identifier, existingElements);
39182
39177
  }
39183
- ts.forEachChild(node, (childNode) => visitNode(childNode, nextShadowedNames));
39178
+ _react_doctor_require_typescript_default.forEachChild(node, (childNode) => visitNode(childNode, nextShadowedNames));
39184
39179
  };
39185
39180
  visitNode(sourceFile, /* @__PURE__ */ new Set());
39186
39181
  return pushedElements;
39187
39182
  };
39188
39183
  const extractConfigObject = (sourceFile, variableInitializers) => {
39189
39184
  for (const statement of sourceFile.statements) {
39190
- if (!ts.isExportAssignment(statement) || statement.isExportEquals) continue;
39185
+ if (!_react_doctor_require_typescript_default.isExportAssignment(statement) || statement.isExportEquals) continue;
39191
39186
  let expression = unwrapConfigExpression(statement.expression);
39192
39187
  const visitedIdentifiers = /* @__PURE__ */ new Set();
39193
- while (ts.isIdentifier(expression) && !visitedIdentifiers.has(expression.text)) {
39188
+ while (_react_doctor_require_typescript_default.isIdentifier(expression) && !visitedIdentifiers.has(expression.text)) {
39194
39189
  visitedIdentifiers.add(expression.text);
39195
39190
  const initializer = variableInitializers.get(expression.text);
39196
39191
  if (!initializer) break;
39197
39192
  expression = unwrapConfigExpression(initializer);
39198
39193
  }
39199
- if (ts.isObjectLiteralExpression(expression)) return expression;
39194
+ if (_react_doctor_require_typescript_default.isObjectLiteralExpression(expression)) return expression;
39200
39195
  }
39201
39196
  };
39202
39197
  const extractTaroPageEntries = (directory, dependencies) => {
@@ -39209,7 +39204,7 @@ const extractTaroPageEntries = (directory, dependencies) => {
39209
39204
  });
39210
39205
  for (const configPath of configPaths) try {
39211
39206
  const sourceText = readFileSync(configPath, "utf8");
39212
- const sourceFile = ts.createSourceFile(configPath, sourceText, ts.ScriptTarget.Latest, true);
39207
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile(configPath, sourceText, _react_doctor_require_typescript_default.ScriptTarget.Latest, true);
39213
39208
  const variableInitializers = collectVariableInitializers(sourceFile);
39214
39209
  const pushedElements = collectPushedElements(sourceFile, new Set(variableInitializers.keys()));
39215
39210
  const configObject = extractConfigObject(sourceFile, variableInitializers);
@@ -39680,20 +39675,20 @@ const extractJestModuleNameMapperAliases = (content, configDirectory) => {
39680
39675
  const extractWebpackModuleDirectories = (content, configDirectory) => {
39681
39676
  const moduleDirectories = [];
39682
39677
  const moduleDirectoryNames = [];
39683
- const sourceFile = ts.createSourceFile("webpack.config.ts", content, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
39678
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile("webpack.config.ts", content, _react_doctor_require_typescript_default.ScriptTarget.Latest, true, _react_doctor_require_typescript_default.ScriptKind.TS);
39684
39679
  const variableInitializers = /* @__PURE__ */ new Map();
39685
39680
  for (const statement of sourceFile.statements) {
39686
- if (!ts.isVariableStatement(statement)) continue;
39687
- for (const declaration of statement.declarationList.declarations) if (ts.isIdentifier(declaration.name) && declaration.initializer) variableInitializers.set(declaration.name.text, declaration.initializer);
39681
+ if (!_react_doctor_require_typescript_default.isVariableStatement(statement)) continue;
39682
+ for (const declaration of statement.declarationList.declarations) if (_react_doctor_require_typescript_default.isIdentifier(declaration.name) && declaration.initializer) variableInitializers.set(declaration.name.text, declaration.initializer);
39688
39683
  }
39689
39684
  const unwrapExpression = (expression) => {
39690
- if (ts.isParenthesizedExpression(expression) || ts.isAsExpression(expression) || ts.isSatisfiesExpression(expression)) return unwrapExpression(expression.expression);
39685
+ if (_react_doctor_require_typescript_default.isParenthesizedExpression(expression) || _react_doctor_require_typescript_default.isAsExpression(expression) || _react_doctor_require_typescript_default.isSatisfiesExpression(expression)) return unwrapExpression(expression.expression);
39691
39686
  return expression;
39692
39687
  };
39693
39688
  const resolveObjectExpression = (expression, visitedIdentifiers = /* @__PURE__ */ new Set()) => {
39694
39689
  const unwrappedExpression = unwrapExpression(expression);
39695
- if (ts.isObjectLiteralExpression(unwrappedExpression)) return unwrappedExpression;
39696
- if (ts.isIdentifier(unwrappedExpression) && !visitedIdentifiers.has(unwrappedExpression.text)) {
39690
+ if (_react_doctor_require_typescript_default.isObjectLiteralExpression(unwrappedExpression)) return unwrappedExpression;
39691
+ if (_react_doctor_require_typescript_default.isIdentifier(unwrappedExpression) && !visitedIdentifiers.has(unwrappedExpression.text)) {
39697
39692
  const initializer = variableInitializers.get(unwrappedExpression.text);
39698
39693
  if (!initializer) return void 0;
39699
39694
  return resolveObjectExpression(initializer, new Set(visitedIdentifiers).add(unwrappedExpression.text));
@@ -39701,82 +39696,82 @@ const extractWebpackModuleDirectories = (content, configDirectory) => {
39701
39696
  };
39702
39697
  const collectModules = (resolveObject) => {
39703
39698
  for (const property of resolveObject.properties) {
39704
- if (!ts.isPropertyAssignment(property)) continue;
39705
- const propertyName = ts.isIdentifier(property.name) || ts.isStringLiteral(property.name) ? property.name.text : void 0;
39699
+ if (!_react_doctor_require_typescript_default.isPropertyAssignment(property)) continue;
39700
+ const propertyName = _react_doctor_require_typescript_default.isIdentifier(property.name) || _react_doctor_require_typescript_default.isStringLiteral(property.name) ? property.name.text : void 0;
39706
39701
  if (propertyName !== "modules" && propertyName !== "modulesDirectories") continue;
39707
- if (!ts.isArrayLiteralExpression(property.initializer)) continue;
39702
+ if (!_react_doctor_require_typescript_default.isArrayLiteralExpression(property.initializer)) continue;
39708
39703
  for (const element of property.initializer.elements) {
39709
- if (ts.isStringLiteral(element) || ts.isNoSubstitutionTemplateLiteral(element)) {
39704
+ if (_react_doctor_require_typescript_default.isStringLiteral(element) || _react_doctor_require_typescript_default.isNoSubstitutionTemplateLiteral(element)) {
39710
39705
  if (element.text === "node_modules") continue;
39711
39706
  if (element.text.startsWith(".") || element.text.includes("/")) moduleDirectories.push(resolveConfigPathValue(element.text, configDirectory));
39712
39707
  else moduleDirectoryNames.push(element.text);
39713
39708
  continue;
39714
39709
  }
39715
- if (!ts.isCallExpression(element)) continue;
39710
+ if (!_react_doctor_require_typescript_default.isCallExpression(element)) continue;
39716
39711
  const calledExpression = element.expression;
39717
- if (!ts.isPropertyAccessExpression(calledExpression) || !ts.isIdentifier(calledExpression.expression) || calledExpression.expression.text !== "path" || calledExpression.name.text !== "resolve" && calledExpression.name.text !== "join") continue;
39718
- const pathSegments = element.arguments.slice(1).flatMap((argument) => ts.isStringLiteral(argument) || ts.isNoSubstitutionTemplateLiteral(argument) ? [argument.text] : []);
39712
+ if (!_react_doctor_require_typescript_default.isPropertyAccessExpression(calledExpression) || !_react_doctor_require_typescript_default.isIdentifier(calledExpression.expression) || calledExpression.expression.text !== "path" || calledExpression.name.text !== "resolve" && calledExpression.name.text !== "join") continue;
39713
+ const pathSegments = element.arguments.slice(1).flatMap((argument) => _react_doctor_require_typescript_default.isStringLiteral(argument) || _react_doctor_require_typescript_default.isNoSubstitutionTemplateLiteral(argument) ? [argument.text] : []);
39719
39714
  if (pathSegments.length > 0) moduleDirectories.push(resolve(configDirectory, ...pathSegments));
39720
39715
  }
39721
39716
  }
39722
39717
  };
39723
39718
  const collectConfigExpression = (expression, visitedIdentifiers = /* @__PURE__ */ new Set()) => {
39724
39719
  const unwrappedExpression = unwrapExpression(expression);
39725
- if (ts.isBinaryExpression(unwrappedExpression) && unwrappedExpression.operatorToken.kind === ts.SyntaxKind.EqualsToken) {
39720
+ if (_react_doctor_require_typescript_default.isBinaryExpression(unwrappedExpression) && unwrappedExpression.operatorToken.kind === _react_doctor_require_typescript_default.SyntaxKind.EqualsToken) {
39726
39721
  collectConfigExpression(unwrappedExpression.right, visitedIdentifiers);
39727
39722
  return;
39728
39723
  }
39729
- if (ts.isIdentifier(unwrappedExpression)) {
39724
+ if (_react_doctor_require_typescript_default.isIdentifier(unwrappedExpression)) {
39730
39725
  if (visitedIdentifiers.has(unwrappedExpression.text)) return;
39731
39726
  const initializer = variableInitializers.get(unwrappedExpression.text);
39732
39727
  if (!initializer) return;
39733
39728
  collectConfigExpression(initializer, new Set(visitedIdentifiers).add(unwrappedExpression.text));
39734
39729
  return;
39735
39730
  }
39736
- if (ts.isArrayLiteralExpression(unwrappedExpression)) {
39737
- for (const element of unwrappedExpression.elements) if (ts.isSpreadElement(element)) collectConfigExpression(element.expression, visitedIdentifiers);
39731
+ if (_react_doctor_require_typescript_default.isArrayLiteralExpression(unwrappedExpression)) {
39732
+ for (const element of unwrappedExpression.elements) if (_react_doctor_require_typescript_default.isSpreadElement(element)) collectConfigExpression(element.expression, visitedIdentifiers);
39738
39733
  else collectConfigExpression(element, visitedIdentifiers);
39739
39734
  return;
39740
39735
  }
39741
- if (ts.isConditionalExpression(unwrappedExpression)) {
39736
+ if (_react_doctor_require_typescript_default.isConditionalExpression(unwrappedExpression)) {
39742
39737
  collectConfigExpression(unwrappedExpression.whenTrue, visitedIdentifiers);
39743
39738
  collectConfigExpression(unwrappedExpression.whenFalse, visitedIdentifiers);
39744
39739
  return;
39745
39740
  }
39746
- if (ts.isArrowFunction(unwrappedExpression) || ts.isFunctionExpression(unwrappedExpression)) {
39747
- if (!ts.isBlock(unwrappedExpression.body)) {
39741
+ if (_react_doctor_require_typescript_default.isArrowFunction(unwrappedExpression) || _react_doctor_require_typescript_default.isFunctionExpression(unwrappedExpression)) {
39742
+ if (!_react_doctor_require_typescript_default.isBlock(unwrappedExpression.body)) {
39748
39743
  collectConfigExpression(unwrappedExpression.body, visitedIdentifiers);
39749
39744
  return;
39750
39745
  }
39751
- for (const statement of unwrappedExpression.body.statements) if (ts.isReturnStatement(statement) && statement.expression) collectConfigExpression(statement.expression, visitedIdentifiers);
39746
+ for (const statement of unwrappedExpression.body.statements) if (_react_doctor_require_typescript_default.isReturnStatement(statement) && statement.expression) collectConfigExpression(statement.expression, visitedIdentifiers);
39752
39747
  return;
39753
39748
  }
39754
- if (!ts.isObjectLiteralExpression(unwrappedExpression)) return;
39749
+ if (!_react_doctor_require_typescript_default.isObjectLiteralExpression(unwrappedExpression)) return;
39755
39750
  for (const property of unwrappedExpression.properties) {
39756
- if (ts.isSpreadAssignment(property)) {
39751
+ if (_react_doctor_require_typescript_default.isSpreadAssignment(property)) {
39757
39752
  collectConfigExpression(property.expression, visitedIdentifiers);
39758
39753
  continue;
39759
39754
  }
39760
- if (ts.isShorthandPropertyAssignment(property) && property.name.text === "resolve") {
39755
+ if (_react_doctor_require_typescript_default.isShorthandPropertyAssignment(property) && property.name.text === "resolve") {
39761
39756
  const resolveObject = resolveObjectExpression(property.name);
39762
39757
  if (resolveObject) collectModules(resolveObject);
39763
39758
  continue;
39764
39759
  }
39765
- if (!ts.isPropertyAssignment(property)) continue;
39766
- if ((ts.isIdentifier(property.name) || ts.isStringLiteral(property.name) ? property.name.text : void 0) !== "resolve") continue;
39760
+ if (!_react_doctor_require_typescript_default.isPropertyAssignment(property)) continue;
39761
+ if ((_react_doctor_require_typescript_default.isIdentifier(property.name) || _react_doctor_require_typescript_default.isStringLiteral(property.name) ? property.name.text : void 0) !== "resolve") continue;
39767
39762
  const resolveObject = resolveObjectExpression(property.initializer);
39768
39763
  if (resolveObject) collectModules(resolveObject);
39769
39764
  }
39770
39765
  };
39771
- const isModuleExports = (expression) => ts.isPropertyAccessExpression(expression) && ts.isIdentifier(expression.expression) && expression.expression.text === "module" && expression.name.text === "exports";
39766
+ const isModuleExports = (expression) => _react_doctor_require_typescript_default.isPropertyAccessExpression(expression) && _react_doctor_require_typescript_default.isIdentifier(expression.expression) && expression.expression.text === "module" && expression.name.text === "exports";
39772
39767
  const collectModuleExportsAssignment = (expression) => {
39773
- if (ts.isBinaryExpression(expression) && expression.operatorToken.kind === ts.SyntaxKind.EqualsToken) if (isModuleExports(expression.left)) collectConfigExpression(expression.right);
39768
+ if (_react_doctor_require_typescript_default.isBinaryExpression(expression) && expression.operatorToken.kind === _react_doctor_require_typescript_default.SyntaxKind.EqualsToken) if (isModuleExports(expression.left)) collectConfigExpression(expression.right);
39774
39769
  else collectModuleExportsAssignment(expression.right);
39775
39770
  };
39776
39771
  for (const statement of sourceFile.statements) {
39777
- if (ts.isExportAssignment(statement) && !statement.isExportEquals) collectConfigExpression(statement.expression);
39778
- if (ts.isExpressionStatement(statement)) collectModuleExportsAssignment(statement.expression);
39779
- if (ts.isVariableStatement(statement)) {
39772
+ if (_react_doctor_require_typescript_default.isExportAssignment(statement) && !statement.isExportEquals) collectConfigExpression(statement.expression);
39773
+ if (_react_doctor_require_typescript_default.isExpressionStatement(statement)) collectModuleExportsAssignment(statement.expression);
39774
+ if (_react_doctor_require_typescript_default.isVariableStatement(statement)) {
39780
39775
  for (const declaration of statement.declarationList.declarations) if (declaration.initializer) collectModuleExportsAssignment(declaration.initializer);
39781
39776
  }
39782
39777
  }
@@ -40540,20 +40535,20 @@ const extractImportSpecifiers = (sourceText) => {
40540
40535
  };
40541
40536
  const extractStylelintPluginSpecifiers = (sourceText) => {
40542
40537
  const specifiers = [];
40543
- const sourceFile = ts.createSourceFile("stylelint.config.mjs", sourceText, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
40538
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile("stylelint.config.mjs", sourceText, _react_doctor_require_typescript_default.ScriptTarget.Latest, true, _react_doctor_require_typescript_default.ScriptKind.TS);
40544
40539
  const collectStringLiterals = (node) => {
40545
- if (ts.isStringLiteralLike(node)) {
40540
+ if (_react_doctor_require_typescript_default.isStringLiteralLike(node)) {
40546
40541
  specifiers.push(node.text);
40547
40542
  return;
40548
40543
  }
40549
- ts.forEachChild(node, collectStringLiterals);
40544
+ _react_doctor_require_typescript_default.forEachChild(node, collectStringLiterals);
40550
40545
  };
40551
40546
  const visitNode = (node) => {
40552
- if (ts.isPropertyAssignment(node) && (ts.isIdentifier(node.name) || ts.isStringLiteralLike(node.name)) && node.name.text === "plugins") {
40547
+ if (_react_doctor_require_typescript_default.isPropertyAssignment(node) && (_react_doctor_require_typescript_default.isIdentifier(node.name) || _react_doctor_require_typescript_default.isStringLiteralLike(node.name)) && node.name.text === "plugins") {
40553
40548
  collectStringLiterals(node.initializer);
40554
40549
  return;
40555
40550
  }
40556
- ts.forEachChild(node, visitNode);
40551
+ _react_doctor_require_typescript_default.forEachChild(node, visitNode);
40557
40552
  };
40558
40553
  visitNode(sourceFile);
40559
40554
  return specifiers;
@@ -41012,17 +41007,17 @@ const isPathInsideDirectoryOrEqual = (candidatePath, directoryPath) => {
41012
41007
  //#region ../core/src/project-analysis/collect/static-globby-entries.ts
41013
41008
  const getCalledName = (expression) => {
41014
41009
  const unwrappedExpression = unwrapTypescriptExpression(expression);
41015
- if (ts.isIdentifier(unwrappedExpression)) return unwrappedExpression.text;
41016
- if (ts.isPropertyAccessExpression(unwrappedExpression)) return unwrappedExpression.name.text;
41010
+ if (_react_doctor_require_typescript_default.isIdentifier(unwrappedExpression)) return unwrappedExpression.text;
41011
+ if (_react_doctor_require_typescript_default.isPropertyAccessExpression(unwrappedExpression)) return unwrappedExpression.name.text;
41017
41012
  };
41018
41013
  const isImportMetaUrl = (expression) => {
41019
41014
  const unwrappedExpression = unwrapTypescriptExpression(expression);
41020
- return ts.isPropertyAccessExpression(unwrappedExpression) && unwrappedExpression.name.text === "url" && ts.isMetaProperty(unwrappedExpression.expression) && unwrappedExpression.expression.keywordToken === ts.SyntaxKind.ImportKeyword;
41015
+ return _react_doctor_require_typescript_default.isPropertyAccessExpression(unwrappedExpression) && unwrappedExpression.name.text === "url" && _react_doctor_require_typescript_default.isMetaProperty(unwrappedExpression.expression) && unwrappedExpression.expression.keywordToken === _react_doctor_require_typescript_default.SyntaxKind.ImportKeyword;
41021
41016
  };
41022
41017
  const evaluateDirectoryExpression = (expression, context, seenIdentifiers = /* @__PURE__ */ new Set()) => {
41023
41018
  const unwrappedExpression = unwrapTypescriptExpression(expression);
41024
- if (ts.isStringLiteralLike(unwrappedExpression)) return resolve(dirname(context.entryFilePath), unwrappedExpression.text);
41025
- if (ts.isIdentifier(unwrappedExpression)) {
41019
+ if (_react_doctor_require_typescript_default.isStringLiteralLike(unwrappedExpression)) return resolve(dirname(context.entryFilePath), unwrappedExpression.text);
41020
+ if (_react_doctor_require_typescript_default.isIdentifier(unwrappedExpression)) {
41026
41021
  if (unwrappedExpression.text === "__dirname") return dirname(context.entryFilePath);
41027
41022
  if (seenIdentifiers.has(unwrappedExpression.text)) return void 0;
41028
41023
  const initializer = context.variableDeclarations.get(unwrappedExpression.text);
@@ -41031,10 +41026,10 @@ const evaluateDirectoryExpression = (expression, context, seenIdentifiers = /* @
41031
41026
  nextSeenIdentifiers.add(unwrappedExpression.text);
41032
41027
  return evaluateDirectoryExpression(initializer, context, nextSeenIdentifiers);
41033
41028
  }
41034
- if (ts.isPropertyAccessExpression(unwrappedExpression) && unwrappedExpression.name.text === "dirname" && ts.isMetaProperty(unwrappedExpression.expression) && unwrappedExpression.expression.keywordToken === ts.SyntaxKind.ImportKeyword) return dirname(context.entryFilePath);
41035
- if (!ts.isCallExpression(unwrappedExpression)) return void 0;
41029
+ if (_react_doctor_require_typescript_default.isPropertyAccessExpression(unwrappedExpression) && unwrappedExpression.name.text === "dirname" && _react_doctor_require_typescript_default.isMetaProperty(unwrappedExpression.expression) && unwrappedExpression.expression.keywordToken === _react_doctor_require_typescript_default.SyntaxKind.ImportKeyword) return dirname(context.entryFilePath);
41030
+ if (!_react_doctor_require_typescript_default.isCallExpression(unwrappedExpression)) return void 0;
41036
41031
  const calledName = getCalledName(unwrappedExpression.expression);
41037
- if (calledName === "cwd" && ts.isPropertyAccessExpression(unwrappedExpression.expression) && ts.isIdentifier(unwrappedExpression.expression.expression) && unwrappedExpression.expression.expression.text === "process") return context.projectRoot;
41032
+ if (calledName === "cwd" && _react_doctor_require_typescript_default.isPropertyAccessExpression(unwrappedExpression.expression) && _react_doctor_require_typescript_default.isIdentifier(unwrappedExpression.expression.expression) && unwrappedExpression.expression.expression.text === "process") return context.projectRoot;
41038
41033
  if (calledName === "fileURLToPath" && unwrappedExpression.arguments[0] && isImportMetaUrl(unwrappedExpression.arguments[0])) return context.entryFilePath;
41039
41034
  if (calledName === "dirname" && unwrappedExpression.arguments[0]) {
41040
41035
  const evaluatedPath = evaluateDirectoryExpression(unwrappedExpression.arguments[0], context, seenIdentifiers);
@@ -41048,19 +41043,19 @@ const evaluateDirectoryExpression = (expression, context, seenIdentifiers = /* @
41048
41043
  const pathSegments = [];
41049
41044
  for (const segmentExpression of segmentExpressions) {
41050
41045
  const unwrappedSegment = unwrapTypescriptExpression(segmentExpression);
41051
- if (!ts.isStringLiteralLike(unwrappedSegment)) return void 0;
41046
+ if (!_react_doctor_require_typescript_default.isStringLiteralLike(unwrappedSegment)) return void 0;
41052
41047
  pathSegments.push(unwrappedSegment.text);
41053
41048
  }
41054
41049
  return calledName === "join" ? join(baseDirectory, ...pathSegments) : resolve(baseDirectory, ...pathSegments);
41055
41050
  };
41056
41051
  const collectStaticPatterns = (expression) => {
41057
41052
  const unwrappedExpression = unwrapTypescriptExpression(expression);
41058
- if (ts.isStringLiteralLike(unwrappedExpression)) return [unwrappedExpression.text];
41059
- if (!ts.isArrayLiteralExpression(unwrappedExpression)) return [];
41053
+ if (_react_doctor_require_typescript_default.isStringLiteralLike(unwrappedExpression)) return [unwrappedExpression.text];
41054
+ if (!_react_doctor_require_typescript_default.isArrayLiteralExpression(unwrappedExpression)) return [];
41060
41055
  const patterns = [];
41061
41056
  for (const element of unwrappedExpression.elements) {
41062
41057
  const unwrappedElement = unwrapTypescriptExpression(element);
41063
- if (!ts.isStringLiteralLike(unwrappedElement)) return [];
41058
+ if (!_react_doctor_require_typescript_default.isStringLiteralLike(unwrappedElement)) return [];
41064
41059
  patterns.push(unwrappedElement.text);
41065
41060
  }
41066
41061
  return patterns;
@@ -41068,16 +41063,16 @@ const collectStaticPatterns = (expression) => {
41068
41063
  const findCwdExpression = (expression) => {
41069
41064
  if (!expression) return void 0;
41070
41065
  const unwrappedExpression = unwrapTypescriptExpression(expression);
41071
- if (!ts.isObjectLiteralExpression(unwrappedExpression)) return void 0;
41066
+ if (!_react_doctor_require_typescript_default.isObjectLiteralExpression(unwrappedExpression)) return void 0;
41072
41067
  for (const property of unwrappedExpression.properties) {
41073
- if (!ts.isPropertyAssignment(property)) continue;
41074
- if ((ts.isIdentifier(property.name) || ts.isStringLiteralLike(property.name) ? property.name.text : void 0) === "cwd") return property.initializer;
41068
+ if (!_react_doctor_require_typescript_default.isPropertyAssignment(property)) continue;
41069
+ if ((_react_doctor_require_typescript_default.isIdentifier(property.name) || _react_doctor_require_typescript_default.isStringLiteralLike(property.name) ? property.name.text : void 0) === "cwd") return property.initializer;
41075
41070
  }
41076
41071
  };
41077
41072
  const collectGlobbyLocalNames = (sourceFile) => {
41078
41073
  const localNames = /* @__PURE__ */ new Set();
41079
41074
  for (const statement of sourceFile.statements) {
41080
- if (!ts.isImportDeclaration(statement) || !ts.isStringLiteral(statement.moduleSpecifier) || statement.moduleSpecifier.text !== "globby" || !statement.importClause?.namedBindings || !ts.isNamedImports(statement.importClause.namedBindings)) continue;
41075
+ if (!_react_doctor_require_typescript_default.isImportDeclaration(statement) || !_react_doctor_require_typescript_default.isStringLiteral(statement.moduleSpecifier) || statement.moduleSpecifier.text !== "globby" || !statement.importClause?.namedBindings || !_react_doctor_require_typescript_default.isNamedImports(statement.importClause.namedBindings)) continue;
41081
41076
  for (const element of statement.importClause.namedBindings.elements) {
41082
41077
  const importedName = element.propertyName?.text ?? element.name.text;
41083
41078
  if (importedName === "globby" || importedName === "globbySync") localNames.add(element.name.text);
@@ -41088,8 +41083,8 @@ const collectGlobbyLocalNames = (sourceFile) => {
41088
41083
  const collectVariableDeclarations = (sourceFile) => {
41089
41084
  const declarations = /* @__PURE__ */ new Map();
41090
41085
  const visitNode = (node) => {
41091
- if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name) && node.initializer) declarations.set(node.name.text, node.initializer);
41092
- ts.forEachChild(node, visitNode);
41086
+ if (_react_doctor_require_typescript_default.isVariableDeclaration(node) && _react_doctor_require_typescript_default.isIdentifier(node.name) && node.initializer) declarations.set(node.name.text, node.initializer);
41087
+ _react_doctor_require_typescript_default.forEachChild(node, visitNode);
41093
41088
  };
41094
41089
  visitNode(sourceFile);
41095
41090
  return declarations;
@@ -41103,7 +41098,7 @@ const extractGlobbyEntriesFromFile = (entryFilePath, projectRoot) => {
41103
41098
  return [];
41104
41099
  }
41105
41100
  if (!sourceText.includes("globby")) return [];
41106
- const sourceFile = ts.createSourceFile(entryFilePath, sourceText, ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX);
41101
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile(entryFilePath, sourceText, _react_doctor_require_typescript_default.ScriptTarget.Latest, true, _react_doctor_require_typescript_default.ScriptKind.TSX);
41107
41102
  const globbyLocalNames = collectGlobbyLocalNames(sourceFile);
41108
41103
  if (globbyLocalNames.size === 0) return [];
41109
41104
  const context = {
@@ -41114,7 +41109,7 @@ const extractGlobbyEntriesFromFile = (entryFilePath, projectRoot) => {
41114
41109
  };
41115
41110
  const entries = /* @__PURE__ */ new Set();
41116
41111
  const visitNode = (node) => {
41117
- if (ts.isCallExpression(node) && ts.isIdentifier(unwrapTypescriptExpression(node.expression)) && globbyLocalNames.has(unwrapTypescriptExpression(node.expression).getText()) && node.arguments[0]) {
41112
+ if (_react_doctor_require_typescript_default.isCallExpression(node) && _react_doctor_require_typescript_default.isIdentifier(unwrapTypescriptExpression(node.expression)) && globbyLocalNames.has(unwrapTypescriptExpression(node.expression).getText()) && node.arguments[0]) {
41118
41113
  const patterns = collectStaticPatterns(node.arguments[0]);
41119
41114
  const cwdExpression = findCwdExpression(node.arguments[1]);
41120
41115
  const workingDirectory = cwdExpression ? evaluateDirectoryExpression(cwdExpression, context) : dirname(entryFilePath);
@@ -41127,7 +41122,7 @@ const extractGlobbyEntriesFromFile = (entryFilePath, projectRoot) => {
41127
41122
  })) if (isPathInsideDirectoryOrEqual(filePath, projectRoot) && DEFAULT_EXTENSIONS.some((extension) => filePath.endsWith(extension))) entries.add(filePath);
41128
41123
  }
41129
41124
  }
41130
- ts.forEachChild(node, visitNode);
41125
+ _react_doctor_require_typescript_default.forEachChild(node, visitNode);
41131
41126
  };
41132
41127
  visitNode(sourceFile);
41133
41128
  return [...entries];
@@ -41635,7 +41630,7 @@ const extractReactEmailTemplateEntries = (directory) => {
41635
41630
  //#endregion
41636
41631
  //#region ../core/src/project-analysis/utils/parse-typescript-config.ts
41637
41632
  const parseTypeScriptConfig = (configPath, source) => {
41638
- const parsedConfig = ts.parseConfigFileTextToJson(configPath, source);
41633
+ const parsedConfig = _react_doctor_require_typescript_default.parseConfigFileTextToJson(configPath, source);
41639
41634
  return parsedConfig.error ? void 0 : parsedConfig.config;
41640
41635
  };
41641
41636
  //#endregion
@@ -42693,9 +42688,9 @@ const collectWebpackConfigModules = (configPath) => {
42693
42688
  if (visitedModulePaths.has(modulePath)) continue;
42694
42689
  visitedModulePaths.add(modulePath);
42695
42690
  configModulePaths.push(modulePath);
42696
- const sourceFile = ts.createSourceFile(modulePath, readFileSync(modulePath, "utf-8"), ts.ScriptTarget.Latest, true);
42691
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile(modulePath, readFileSync(modulePath, "utf-8"), _react_doctor_require_typescript_default.ScriptTarget.Latest, true);
42697
42692
  for (const statement of sourceFile.statements) {
42698
- if (!ts.isImportDeclaration(statement) || !ts.isStringLiteral(statement.moduleSpecifier)) continue;
42693
+ if (!_react_doctor_require_typescript_default.isImportDeclaration(statement) || !_react_doctor_require_typescript_default.isStringLiteral(statement.moduleSpecifier)) continue;
42699
42694
  const specifier = statement.moduleSpecifier.text;
42700
42695
  if (!specifier.startsWith(".")) continue;
42701
42696
  const importedModulePath = resolveEntryWithExtensions(resolve(dirname(modulePath), specifier));
@@ -42708,7 +42703,7 @@ const extractComputedWebpackEntries = (configPath, projectDirectory) => {
42708
42703
  const entries = [];
42709
42704
  for (const modulePath of collectWebpackConfigModules(configPath)) {
42710
42705
  const sourceText = readFileSync(modulePath, "utf-8");
42711
- const sourceFile = ts.createSourceFile(modulePath, sourceText, ts.ScriptTarget.Latest, true);
42706
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile(modulePath, sourceText, _react_doctor_require_typescript_default.ScriptTarget.Latest, true);
42712
42707
  const program = parseOxcProgram(modulePath, sourceText);
42713
42708
  if (program) visitOxcAstWithBindings(program, (node, bindingNames) => {
42714
42709
  if (node.type === "FunctionDeclaration" || node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression") return false;
@@ -42720,30 +42715,30 @@ const extractComputedWebpackEntries = (configPath, projectDirectory) => {
42720
42715
  });
42721
42716
  const objectInitializers = /* @__PURE__ */ new Map();
42722
42717
  for (const statement of sourceFile.statements) {
42723
- if (!ts.isVariableStatement(statement)) continue;
42724
- for (const declaration of statement.declarationList.declarations) if (ts.isIdentifier(declaration.name) && declaration.initializer && ts.isObjectLiteralExpression(declaration.initializer)) objectInitializers.set(declaration.name.text, declaration.initializer);
42718
+ if (!_react_doctor_require_typescript_default.isVariableStatement(statement)) continue;
42719
+ for (const declaration of statement.declarationList.declarations) if (_react_doctor_require_typescript_default.isIdentifier(declaration.name) && declaration.initializer && _react_doctor_require_typescript_default.isObjectLiteralExpression(declaration.initializer)) objectInitializers.set(declaration.name.text, declaration.initializer);
42725
42720
  }
42726
42721
  const exportedObjects = sourceFile.statements.flatMap((statement) => {
42727
42722
  let exportedExpression;
42728
- if (ts.isExportAssignment(statement)) exportedExpression = statement.expression;
42729
- else if (ts.isExpressionStatement(statement) && ts.isBinaryExpression(statement.expression) && statement.expression.operatorToken.kind === ts.SyntaxKind.EqualsToken && ts.isPropertyAccessExpression(statement.expression.left) && ts.isIdentifier(statement.expression.left.expression) && statement.expression.left.expression.text === "module" && statement.expression.left.name.text === "exports") exportedExpression = statement.expression.right;
42723
+ if (_react_doctor_require_typescript_default.isExportAssignment(statement)) exportedExpression = statement.expression;
42724
+ else if (_react_doctor_require_typescript_default.isExpressionStatement(statement) && _react_doctor_require_typescript_default.isBinaryExpression(statement.expression) && statement.expression.operatorToken.kind === _react_doctor_require_typescript_default.SyntaxKind.EqualsToken && _react_doctor_require_typescript_default.isPropertyAccessExpression(statement.expression.left) && _react_doctor_require_typescript_default.isIdentifier(statement.expression.left.expression) && statement.expression.left.expression.text === "module" && statement.expression.left.name.text === "exports") exportedExpression = statement.expression.right;
42730
42725
  if (!exportedExpression) return [];
42731
- if (ts.isObjectLiteralExpression(exportedExpression)) return [exportedExpression];
42732
- if (ts.isIdentifier(exportedExpression)) {
42726
+ if (_react_doctor_require_typescript_default.isObjectLiteralExpression(exportedExpression)) return [exportedExpression];
42727
+ if (_react_doctor_require_typescript_default.isIdentifier(exportedExpression)) {
42733
42728
  const objectInitializer = objectInitializers.get(exportedExpression.text);
42734
42729
  return objectInitializer ? [objectInitializer] : [];
42735
42730
  }
42736
42731
  return [];
42737
42732
  });
42738
42733
  for (const exportedObject of exportedObjects) {
42739
- const entryProperty = exportedObject.properties.find((property) => ts.isPropertyAssignment(property) && (ts.isIdentifier(property.name) && property.name.text === "entry" || ts.isStringLiteral(property.name) && property.name.text === "entry"));
42734
+ const entryProperty = exportedObject.properties.find((property) => _react_doctor_require_typescript_default.isPropertyAssignment(property) && (_react_doctor_require_typescript_default.isIdentifier(property.name) && property.name.text === "entry" || _react_doctor_require_typescript_default.isStringLiteral(property.name) && property.name.text === "entry"));
42740
42735
  const pathSegments = [];
42741
- if (entryProperty && ts.isCallExpression(entryProperty.initializer)) {
42742
- for (const argument of entryProperty.initializer.arguments) if (ts.isStringLiteral(argument) || ts.isNoSubstitutionTemplateLiteral(argument)) pathSegments.push(argument.text);
42736
+ if (entryProperty && _react_doctor_require_typescript_default.isCallExpression(entryProperty.initializer)) {
42737
+ for (const argument of entryProperty.initializer.arguments) if (_react_doctor_require_typescript_default.isStringLiteral(argument) || _react_doctor_require_typescript_default.isNoSubstitutionTemplateLiteral(argument)) pathSegments.push(argument.text);
42743
42738
  }
42744
- const entryCallExpression = entryProperty && ts.isCallExpression(entryProperty.initializer) ? entryProperty.initializer : void 0;
42745
- const entryPathObjectName = entryCallExpression && ts.isPropertyAccessExpression(entryCallExpression.expression) && ts.isIdentifier(entryCallExpression.expression.expression) ? entryCallExpression.expression.expression.text : void 0;
42746
- const entryPathMethodName = entryCallExpression && ts.isPropertyAccessExpression(entryCallExpression.expression) ? entryCallExpression.expression.name.text : void 0;
42739
+ const entryCallExpression = entryProperty && _react_doctor_require_typescript_default.isCallExpression(entryProperty.initializer) ? entryProperty.initializer : void 0;
42740
+ const entryPathObjectName = entryCallExpression && _react_doctor_require_typescript_default.isPropertyAccessExpression(entryCallExpression.expression) && _react_doctor_require_typescript_default.isIdentifier(entryCallExpression.expression.expression) ? entryCallExpression.expression.expression.text : void 0;
42741
+ const entryPathMethodName = entryCallExpression && _react_doctor_require_typescript_default.isPropertyAccessExpression(entryCallExpression.expression) ? entryCallExpression.expression.name.text : void 0;
42747
42742
  if (!entryProperty || !entryCallExpression || !entryPathObjectName || !entryPathMethodName || !/path/i.test(entryPathObjectName) || pathSegments.length !== entryCallExpression.arguments.length) continue;
42748
42743
  const candidatePaths = entryPathObjectName === "path" && (entryPathMethodName === "join" || entryPathMethodName === "resolve") ? [resolve(dirname(modulePath), ...pathSegments)] : [resolve(projectDirectory, entryPathMethodName, ...pathSegments), resolve(projectDirectory, "src", entryPathMethodName, ...pathSegments)];
42749
42744
  for (const candidatePath of candidatePaths) {
@@ -44538,20 +44533,8 @@ const isConfigFile = (filePath) => {
44538
44533
  return KNOWN_CONFIG_PREFIXES.some((prefix) => fileName.startsWith(prefix));
44539
44534
  };
44540
44535
  //#endregion
44541
- //#region ../core/src/project-info/constants.ts
44542
- var import_picomatch = /* @__PURE__ */ __toESM(require_picomatch$2(), 1);
44543
- const GIT_CHECK_ATTR_MAX_BUFFER_BYTES = 50 * 1024 * 1024;
44544
- new Map(Object.entries({
44545
- Security: "An attacker can read user data, act as your users, or run code you never shipped.",
44546
- Bugs: "Real users hit crashes, wrong output, or state that silently corrupts.",
44547
- Performance: "Users feel extra latency and wasted renders on every interaction.",
44548
- Accessibility: "Users on screen readers, keyboards, or assistive tech get locked out.",
44549
- Maintainability: "Every future change gets slower and riskier to make."
44550
- }));
44551
- const MAX_GLOB_PATTERN_LENGTH_CHARS = 1024;
44552
- process.env.REACT_DOCTOR_CORE_VERSION;
44553
- //#endregion
44554
44536
  //#region ../core/src/utils/message-from-unknown.ts
44537
+ var import_picomatch = /* @__PURE__ */ __toESM(require_picomatch$2(), 1);
44555
44538
  const messageFromUnknown = (error) => error instanceof Error ? error.message : String(error);
44556
44539
  //#endregion
44557
44540
  //#region ../core/src/utils/match-glob-pattern.ts
@@ -45449,18 +45432,18 @@ const collectDynamicBuildImports = (sourceFile, typeChecker) => {
45449
45432
  const globNamespaceSymbols = /* @__PURE__ */ new Set();
45450
45433
  const pathNamespaceSymbols = /* @__PURE__ */ new Set();
45451
45434
  for (const statement of sourceFile.statements) {
45452
- if (!ts.isImportDeclaration(statement) || !ts.isStringLiteral(statement.moduleSpecifier) || !statement.importClause) continue;
45435
+ if (!_react_doctor_require_typescript_default.isImportDeclaration(statement) || !_react_doctor_require_typescript_default.isStringLiteral(statement.moduleSpecifier) || !statement.importClause) continue;
45453
45436
  const moduleName = statement.moduleSpecifier.text;
45454
45437
  const namedBindings = statement.importClause.namedBindings;
45455
- if (moduleName === "glob" && namedBindings && ts.isNamespaceImport(namedBindings)) {
45438
+ if (moduleName === "glob" && namedBindings && _react_doctor_require_typescript_default.isNamespaceImport(namedBindings)) {
45456
45439
  const globNamespaceSymbol = typeChecker.getSymbolAtLocation(namedBindings.name);
45457
45440
  if (globNamespaceSymbol) globNamespaceSymbols.add(globNamespaceSymbol);
45458
45441
  }
45459
- if (moduleName === "path" && namedBindings && ts.isNamespaceImport(namedBindings)) {
45442
+ if (moduleName === "path" && namedBindings && _react_doctor_require_typescript_default.isNamespaceImport(namedBindings)) {
45460
45443
  const pathNamespaceSymbol = typeChecker.getSymbolAtLocation(namedBindings.name);
45461
45444
  if (pathNamespaceSymbol) pathNamespaceSymbols.add(pathNamespaceSymbol);
45462
45445
  }
45463
- if (moduleName !== "tsup" || !namedBindings || !ts.isNamedImports(namedBindings)) continue;
45446
+ if (moduleName !== "tsup" || !namedBindings || !_react_doctor_require_typescript_default.isNamedImports(namedBindings)) continue;
45464
45447
  for (const importSpecifier of namedBindings.elements) if ((importSpecifier.propertyName ?? importSpecifier.name).text === "build") {
45465
45448
  const buildSymbol = typeChecker.getSymbolAtLocation(importSpecifier.name);
45466
45449
  if (buildSymbol) buildSymbols.add(buildSymbol);
@@ -45473,18 +45456,18 @@ const collectDynamicBuildImports = (sourceFile, typeChecker) => {
45473
45456
  };
45474
45457
  };
45475
45458
  const extractGlobPattern = (expression, imports, scriptDirectory, typeChecker) => {
45476
- if (!ts.isCallExpression(expression) || !ts.isPropertyAccessExpression(expression.expression) || expression.expression.name.text !== "sync" || !ts.isIdentifier(expression.expression.expression) || !hasMatchingSymbol(expression.expression.expression, imports.globNamespaceSymbols, typeChecker) || expression.arguments.length !== 1) return;
45459
+ if (!_react_doctor_require_typescript_default.isCallExpression(expression) || !_react_doctor_require_typescript_default.isPropertyAccessExpression(expression.expression) || expression.expression.name.text !== "sync" || !_react_doctor_require_typescript_default.isIdentifier(expression.expression.expression) || !hasMatchingSymbol(expression.expression.expression, imports.globNamespaceSymbols, typeChecker) || expression.arguments.length !== 1) return;
45477
45460
  const patternExpression = expression.arguments[0];
45478
- if (!ts.isCallExpression(patternExpression) || !ts.isPropertyAccessExpression(patternExpression.expression) || patternExpression.expression.name.text !== "join" || !ts.isIdentifier(patternExpression.expression.expression) || !hasMatchingSymbol(patternExpression.expression.expression, imports.pathNamespaceSymbols, typeChecker) || patternExpression.arguments.length !== 2 || !ts.isIdentifier(patternExpression.arguments[0]) || patternExpression.arguments[0].text !== "__dirname" || !ts.isStringLiteral(patternExpression.arguments[1]) && !ts.isNoSubstitutionTemplateLiteral(patternExpression.arguments[1])) return;
45461
+ if (!_react_doctor_require_typescript_default.isCallExpression(patternExpression) || !_react_doctor_require_typescript_default.isPropertyAccessExpression(patternExpression.expression) || patternExpression.expression.name.text !== "join" || !_react_doctor_require_typescript_default.isIdentifier(patternExpression.expression.expression) || !hasMatchingSymbol(patternExpression.expression.expression, imports.pathNamespaceSymbols, typeChecker) || patternExpression.arguments.length !== 2 || !_react_doctor_require_typescript_default.isIdentifier(patternExpression.arguments[0]) || patternExpression.arguments[0].text !== "__dirname" || !_react_doctor_require_typescript_default.isStringLiteral(patternExpression.arguments[1]) && !_react_doctor_require_typescript_default.isNoSubstitutionTemplateLiteral(patternExpression.arguments[1])) return;
45479
45462
  const relativeGlobPattern = patternExpression.arguments[1].text;
45480
45463
  if (!relativeGlobPattern.includes("*")) return void 0;
45481
45464
  return toPosixPath(resolve(scriptDirectory, relativeGlobPattern));
45482
45465
  };
45483
45466
  const extractExcludedPathSubstring = (callback) => {
45484
- if (callback.parameters.length !== 1 || !ts.isIdentifier(callback.parameters[0].name)) return;
45467
+ if (callback.parameters.length !== 1 || !_react_doctor_require_typescript_default.isIdentifier(callback.parameters[0].name)) return;
45485
45468
  const filePathName = callback.parameters[0].name.text;
45486
- const returnedExpression = ts.isBlock(callback.body) ? callback.body.statements.length === 1 && ts.isReturnStatement(callback.body.statements[0]) ? callback.body.statements[0].expression : void 0 : callback.body;
45487
- if (!returnedExpression || !ts.isPrefixUnaryExpression(returnedExpression) || returnedExpression.operator !== ts.SyntaxKind.ExclamationToken || !ts.isCallExpression(returnedExpression.operand) || !ts.isPropertyAccessExpression(returnedExpression.operand.expression) || returnedExpression.operand.expression.name.text !== "includes" || !ts.isIdentifier(returnedExpression.operand.expression.expression) || returnedExpression.operand.expression.expression.text !== filePathName || returnedExpression.operand.arguments.length !== 1 || !ts.isStringLiteral(returnedExpression.operand.arguments[0]) && !ts.isNoSubstitutionTemplateLiteral(returnedExpression.operand.arguments[0])) return;
45469
+ const returnedExpression = _react_doctor_require_typescript_default.isBlock(callback.body) ? callback.body.statements.length === 1 && _react_doctor_require_typescript_default.isReturnStatement(callback.body.statements[0]) ? callback.body.statements[0].expression : void 0 : callback.body;
45470
+ if (!returnedExpression || !_react_doctor_require_typescript_default.isPrefixUnaryExpression(returnedExpression) || returnedExpression.operator !== _react_doctor_require_typescript_default.SyntaxKind.ExclamationToken || !_react_doctor_require_typescript_default.isCallExpression(returnedExpression.operand) || !_react_doctor_require_typescript_default.isPropertyAccessExpression(returnedExpression.operand.expression) || returnedExpression.operand.expression.name.text !== "includes" || !_react_doctor_require_typescript_default.isIdentifier(returnedExpression.operand.expression.expression) || returnedExpression.operand.expression.expression.text !== filePathName || returnedExpression.operand.arguments.length !== 1 || !_react_doctor_require_typescript_default.isStringLiteral(returnedExpression.operand.arguments[0]) && !_react_doctor_require_typescript_default.isNoSubstitutionTemplateLiteral(returnedExpression.operand.arguments[0])) return;
45488
45471
  return toPosixPath(returnedExpression.operand.arguments[0].text);
45489
45472
  };
45490
45473
  const extractFileCollection = (initializer, imports, scriptDirectory, typeChecker) => {
@@ -45493,7 +45476,7 @@ const extractFileCollection = (initializer, imports, scriptDirectory, typeChecke
45493
45476
  excludedPathSubstrings: [],
45494
45477
  globPattern: directGlobPattern
45495
45478
  };
45496
- if (!ts.isCallExpression(initializer) || !ts.isPropertyAccessExpression(initializer.expression) || initializer.expression.name.text !== "filter" || initializer.arguments.length !== 1 || !ts.isArrowFunction(initializer.arguments[0]) && !ts.isFunctionExpression(initializer.arguments[0])) return;
45479
+ if (!_react_doctor_require_typescript_default.isCallExpression(initializer) || !_react_doctor_require_typescript_default.isPropertyAccessExpression(initializer.expression) || initializer.expression.name.text !== "filter" || initializer.arguments.length !== 1 || !_react_doctor_require_typescript_default.isArrowFunction(initializer.arguments[0]) && !_react_doctor_require_typescript_default.isFunctionExpression(initializer.arguments[0])) return;
45497
45480
  const globPattern = extractGlobPattern(initializer.expression.expression, imports, scriptDirectory, typeChecker);
45498
45481
  const excludedPathSubstring = extractExcludedPathSubstring(initializer.arguments[0]);
45499
45482
  if (!globPattern || excludedPathSubstring === void 0) return void 0;
@@ -45502,36 +45485,36 @@ const extractFileCollection = (initializer, imports, scriptDirectory, typeChecke
45502
45485
  globPattern
45503
45486
  };
45504
45487
  };
45505
- const isPathNamespaceCall = (expression, methodName, imports, typeChecker) => ts.isCallExpression(expression) && ts.isPropertyAccessExpression(expression.expression) && expression.expression.name.text === methodName && ts.isIdentifier(expression.expression.expression) && hasMatchingSymbol(expression.expression.expression, imports.pathNamespaceSymbols, typeChecker);
45488
+ const isPathNamespaceCall = (expression, methodName, imports, typeChecker) => _react_doctor_require_typescript_default.isCallExpression(expression) && _react_doctor_require_typescript_default.isPropertyAccessExpression(expression.expression) && expression.expression.name.text === methodName && _react_doctor_require_typescript_default.isIdentifier(expression.expression.expression) && hasMatchingSymbol(expression.expression.expression, imports.pathNamespaceSymbols, typeChecker);
45506
45489
  const hasMatchingOutputEntryPath = (callback, filePathName, outputEntryName, imports, typeChecker) => {
45507
- if (!ts.isBlock(callback.body)) return false;
45490
+ if (!_react_doctor_require_typescript_default.isBlock(callback.body)) return false;
45508
45491
  const initializersByName = /* @__PURE__ */ new Map();
45509
45492
  for (const statement of callback.body.statements) {
45510
- if (!ts.isVariableStatement(statement)) continue;
45511
- for (const declaration of statement.declarationList.declarations) if (ts.isIdentifier(declaration.name) && declaration.initializer) initializersByName.set(declaration.name.text, declaration.initializer);
45493
+ if (!_react_doctor_require_typescript_default.isVariableStatement(statement)) continue;
45494
+ for (const declaration of statement.declarationList.declarations) if (_react_doctor_require_typescript_default.isIdentifier(declaration.name) && declaration.initializer) initializersByName.set(declaration.name.text, declaration.initializer);
45512
45495
  }
45513
45496
  const outputEntryInitializer = initializersByName.get(outputEntryName);
45514
45497
  if (!outputEntryInitializer || !isPathNamespaceCall(outputEntryInitializer, "join", imports, typeChecker)) return false;
45515
45498
  const outputFilenameExpression = outputEntryInitializer.arguments.at(-1);
45516
- if (!outputFilenameExpression || !ts.isBinaryExpression(outputFilenameExpression) || outputFilenameExpression.operatorToken.kind !== ts.SyntaxKind.PlusToken || !ts.isStringLiteralLike(outputFilenameExpression.right) || outputFilenameExpression.right.text !== ".js" || !isPathNamespaceCall(outputFilenameExpression.left, "basename", imports, typeChecker) || outputFilenameExpression.left.arguments.length !== 2 || !ts.isIdentifier(outputFilenameExpression.left.arguments[0]) || !ts.isStringLiteralLike(outputFilenameExpression.left.arguments[1]) || outputFilenameExpression.left.arguments[1].text !== ".tsx") return false;
45499
+ if (!outputFilenameExpression || !_react_doctor_require_typescript_default.isBinaryExpression(outputFilenameExpression) || outputFilenameExpression.operatorToken.kind !== _react_doctor_require_typescript_default.SyntaxKind.PlusToken || !_react_doctor_require_typescript_default.isStringLiteralLike(outputFilenameExpression.right) || outputFilenameExpression.right.text !== ".js" || !isPathNamespaceCall(outputFilenameExpression.left, "basename", imports, typeChecker) || outputFilenameExpression.left.arguments.length !== 2 || !_react_doctor_require_typescript_default.isIdentifier(outputFilenameExpression.left.arguments[0]) || !_react_doctor_require_typescript_default.isStringLiteralLike(outputFilenameExpression.left.arguments[1]) || outputFilenameExpression.left.arguments[1].text !== ".tsx") return false;
45517
45500
  const basenameSourceName = outputFilenameExpression.left.arguments[0].text;
45518
45501
  if (basenameSourceName === filePathName) return true;
45519
45502
  const basenameSourceInitializer = initializersByName.get(basenameSourceName);
45520
- return Boolean(basenameSourceInitializer && isPathNamespaceCall(basenameSourceInitializer, "relative", imports, typeChecker) && basenameSourceInitializer.arguments.length === 2 && ts.isIdentifier(basenameSourceInitializer.arguments[1]) && basenameSourceInitializer.arguments[1].text === filePathName);
45503
+ return Boolean(basenameSourceInitializer && isPathNamespaceCall(basenameSourceInitializer, "relative", imports, typeChecker) && basenameSourceInitializer.arguments.length === 2 && _react_doctor_require_typescript_default.isIdentifier(basenameSourceInitializer.arguments[1]) && basenameSourceInitializer.arguments[1].text === filePathName);
45521
45504
  };
45522
45505
  const findBuildInvocation = (callback, filePathName, imports, typeChecker) => {
45523
45506
  let buildInvocation;
45524
45507
  const visitNode = (node) => {
45525
- if (ts.isCallExpression(node) && ts.isAwaitExpression(node.parent) && ts.isIdentifier(node.expression) && hasMatchingSymbol(node.expression, imports.buildSymbols, typeChecker) && node.arguments.length === 1 && ts.isObjectLiteralExpression(node.arguments[0])) {
45526
- const hasMatchingEntry = node.arguments[0].properties.some((property) => ts.isPropertyAssignment(property) && (ts.isIdentifier(property.name) && property.name.text === "entry" || ts.isStringLiteral(property.name) && property.name.text === "entry") && ts.isArrayLiteralExpression(property.initializer) && property.initializer.elements.length === 1 && ts.isIdentifier(property.initializer.elements[0]) && property.initializer.elements[0].text === filePathName);
45527
- const outDirectoryProperty = node.arguments[0].properties.find((property) => ts.isPropertyAssignment(property) && (ts.isIdentifier(property.name) && property.name.text === "outDir" || ts.isStringLiteral(property.name) && property.name.text === "outDir"));
45528
- const hasCommonJsFormat = node.arguments[0].properties.some((property) => ts.isPropertyAssignment(property) && (ts.isIdentifier(property.name) && property.name.text === "format" || ts.isStringLiteral(property.name) && property.name.text === "format") && ts.isStringLiteralLike(property.initializer) && property.initializer.text === "cjs");
45529
- if (hasMatchingEntry && hasCommonJsFormat && outDirectoryProperty && ts.isPropertyAssignment(outDirectoryProperty) && ts.isCallExpression(outDirectoryProperty.initializer) && ts.isPropertyAccessExpression(outDirectoryProperty.initializer.expression) && outDirectoryProperty.initializer.expression.name.text === "dirname" && ts.isIdentifier(outDirectoryProperty.initializer.expression.expression) && hasMatchingSymbol(outDirectoryProperty.initializer.expression.expression, imports.pathNamespaceSymbols, typeChecker) && outDirectoryProperty.initializer.arguments.length === 1 && ts.isIdentifier(outDirectoryProperty.initializer.arguments[0]) && hasMatchingOutputEntryPath(callback, filePathName, outDirectoryProperty.initializer.arguments[0].text, imports, typeChecker)) buildInvocation = {
45508
+ if (_react_doctor_require_typescript_default.isCallExpression(node) && _react_doctor_require_typescript_default.isAwaitExpression(node.parent) && _react_doctor_require_typescript_default.isIdentifier(node.expression) && hasMatchingSymbol(node.expression, imports.buildSymbols, typeChecker) && node.arguments.length === 1 && _react_doctor_require_typescript_default.isObjectLiteralExpression(node.arguments[0])) {
45509
+ const hasMatchingEntry = node.arguments[0].properties.some((property) => _react_doctor_require_typescript_default.isPropertyAssignment(property) && (_react_doctor_require_typescript_default.isIdentifier(property.name) && property.name.text === "entry" || _react_doctor_require_typescript_default.isStringLiteral(property.name) && property.name.text === "entry") && _react_doctor_require_typescript_default.isArrayLiteralExpression(property.initializer) && property.initializer.elements.length === 1 && _react_doctor_require_typescript_default.isIdentifier(property.initializer.elements[0]) && property.initializer.elements[0].text === filePathName);
45510
+ const outDirectoryProperty = node.arguments[0].properties.find((property) => _react_doctor_require_typescript_default.isPropertyAssignment(property) && (_react_doctor_require_typescript_default.isIdentifier(property.name) && property.name.text === "outDir" || _react_doctor_require_typescript_default.isStringLiteral(property.name) && property.name.text === "outDir"));
45511
+ const hasCommonJsFormat = node.arguments[0].properties.some((property) => _react_doctor_require_typescript_default.isPropertyAssignment(property) && (_react_doctor_require_typescript_default.isIdentifier(property.name) && property.name.text === "format" || _react_doctor_require_typescript_default.isStringLiteral(property.name) && property.name.text === "format") && _react_doctor_require_typescript_default.isStringLiteralLike(property.initializer) && property.initializer.text === "cjs");
45512
+ if (hasMatchingEntry && hasCommonJsFormat && outDirectoryProperty && _react_doctor_require_typescript_default.isPropertyAssignment(outDirectoryProperty) && _react_doctor_require_typescript_default.isCallExpression(outDirectoryProperty.initializer) && _react_doctor_require_typescript_default.isPropertyAccessExpression(outDirectoryProperty.initializer.expression) && outDirectoryProperty.initializer.expression.name.text === "dirname" && _react_doctor_require_typescript_default.isIdentifier(outDirectoryProperty.initializer.expression.expression) && hasMatchingSymbol(outDirectoryProperty.initializer.expression.expression, imports.pathNamespaceSymbols, typeChecker) && outDirectoryProperty.initializer.arguments.length === 1 && _react_doctor_require_typescript_default.isIdentifier(outDirectoryProperty.initializer.arguments[0]) && hasMatchingOutputEntryPath(callback, filePathName, outDirectoryProperty.initializer.arguments[0].text, imports, typeChecker)) buildInvocation = {
45530
45513
  end: node.parent.end,
45531
45514
  outputEntryName: outDirectoryProperty.initializer.arguments[0].text
45532
45515
  };
45533
45516
  }
45534
- if (!buildInvocation) ts.forEachChild(node, visitNode);
45517
+ if (!buildInvocation) _react_doctor_require_typescript_default.forEachChild(node, visitNode);
45535
45518
  };
45536
45519
  visitNode(callback.body);
45537
45520
  return buildInvocation;
@@ -45540,19 +45523,19 @@ const collectImportedNamespaceExportNames = (callback, buildInvocation, typeChec
45540
45523
  const importedNamespaceDeclarationEndBySymbol = /* @__PURE__ */ new Map();
45541
45524
  const exportNames = /* @__PURE__ */ new Set();
45542
45525
  const collectNamespaceNames = (node) => {
45543
- if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name) && node.initializer && ts.isAwaitExpression(node.initializer) && node.initializer.pos >= buildInvocation.end && ts.isCallExpression(node.initializer.expression) && node.initializer.expression.expression.kind === ts.SyntaxKind.ImportKeyword && node.initializer.expression.arguments.length === 1 && ts.isIdentifier(node.initializer.expression.arguments[0]) && node.initializer.expression.arguments[0].text === buildInvocation.outputEntryName) {
45526
+ if (_react_doctor_require_typescript_default.isVariableDeclaration(node) && _react_doctor_require_typescript_default.isIdentifier(node.name) && node.initializer && _react_doctor_require_typescript_default.isAwaitExpression(node.initializer) && node.initializer.pos >= buildInvocation.end && _react_doctor_require_typescript_default.isCallExpression(node.initializer.expression) && node.initializer.expression.expression.kind === _react_doctor_require_typescript_default.SyntaxKind.ImportKeyword && node.initializer.expression.arguments.length === 1 && _react_doctor_require_typescript_default.isIdentifier(node.initializer.expression.arguments[0]) && node.initializer.expression.arguments[0].text === buildInvocation.outputEntryName) {
45544
45527
  const namespaceSymbol = typeChecker.getSymbolAtLocation(node.name);
45545
45528
  if (namespaceSymbol) importedNamespaceDeclarationEndBySymbol.set(namespaceSymbol, node.end);
45546
45529
  }
45547
- ts.forEachChild(node, collectNamespaceNames);
45530
+ _react_doctor_require_typescript_default.forEachChild(node, collectNamespaceNames);
45548
45531
  };
45549
45532
  collectNamespaceNames(callback.body);
45550
45533
  const collectExportNames = (node) => {
45551
- const namespaceSymbol = (ts.isPropertyAccessExpression(node) || ts.isElementAccessExpression(node)) && ts.isIdentifier(node.expression) ? typeChecker.getSymbolAtLocation(node.expression) : void 0;
45534
+ const namespaceSymbol = (_react_doctor_require_typescript_default.isPropertyAccessExpression(node) || _react_doctor_require_typescript_default.isElementAccessExpression(node)) && _react_doctor_require_typescript_default.isIdentifier(node.expression) ? typeChecker.getSymbolAtLocation(node.expression) : void 0;
45552
45535
  const namespaceDeclarationEnd = namespaceSymbol ? importedNamespaceDeclarationEndBySymbol.get(namespaceSymbol) : void 0;
45553
- if (ts.isPropertyAccessExpression(node) && namespaceDeclarationEnd !== void 0 && node.pos >= namespaceDeclarationEnd) exportNames.add(node.name.text);
45554
- else if (ts.isElementAccessExpression(node) && namespaceDeclarationEnd !== void 0 && node.pos >= namespaceDeclarationEnd && node.argumentExpression && ts.isStringLiteral(node.argumentExpression)) exportNames.add(node.argumentExpression.text);
45555
- ts.forEachChild(node, collectExportNames);
45536
+ if (_react_doctor_require_typescript_default.isPropertyAccessExpression(node) && namespaceDeclarationEnd !== void 0 && node.pos >= namespaceDeclarationEnd) exportNames.add(node.name.text);
45537
+ else if (_react_doctor_require_typescript_default.isElementAccessExpression(node) && namespaceDeclarationEnd !== void 0 && node.pos >= namespaceDeclarationEnd && node.argumentExpression && _react_doctor_require_typescript_default.isStringLiteral(node.argumentExpression)) exportNames.add(node.argumentExpression.text);
45538
+ _react_doctor_require_typescript_default.forEachChild(node, collectExportNames);
45556
45539
  };
45557
45540
  collectExportNames(callback.body);
45558
45541
  return exportNames;
@@ -45568,14 +45551,14 @@ const collectScriptConsumedExportKeys = (scriptPath, packageDirectory) => {
45568
45551
  noLib: true,
45569
45552
  noResolve: true
45570
45553
  };
45571
- const sourceFile = ts.createSourceFile(scriptPath, source, ts.ScriptTarget.Latest, true);
45572
- const compilerHost = ts.createCompilerHost(compilerOptions);
45554
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile(scriptPath, source, _react_doctor_require_typescript_default.ScriptTarget.Latest, true);
45555
+ const compilerHost = _react_doctor_require_typescript_default.createCompilerHost(compilerOptions);
45573
45556
  const scriptIdentity = getFileIdentityKey(scriptPath);
45574
45557
  const isScriptPath = (candidatePath) => getFileIdentityKey(candidatePath) === scriptIdentity;
45575
45558
  compilerHost.fileExists = isScriptPath;
45576
45559
  compilerHost.getSourceFile = (candidatePath) => isScriptPath(candidatePath) ? sourceFile : void 0;
45577
45560
  compilerHost.readFile = (candidatePath) => isScriptPath(candidatePath) ? source : void 0;
45578
- const program = ts.createProgram({
45561
+ const program = _react_doctor_require_typescript_default.createProgram({
45579
45562
  rootNames: [scriptPath],
45580
45563
  options: compilerOptions,
45581
45564
  host: compilerHost
@@ -45587,22 +45570,22 @@ const collectScriptConsumedExportKeys = (scriptPath, packageDirectory) => {
45587
45570
  if (imports.buildSymbols.size === 0 || imports.globNamespaceSymbols.size === 0 || imports.pathNamespaceSymbols.size === 0) return /* @__PURE__ */ new Set();
45588
45571
  const collectionsBySymbol = /* @__PURE__ */ new Map();
45589
45572
  const visitCollection = (node) => {
45590
- if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name) && node.initializer) {
45573
+ if (_react_doctor_require_typescript_default.isVariableDeclaration(node) && _react_doctor_require_typescript_default.isIdentifier(node.name) && node.initializer) {
45591
45574
  const collection = extractFileCollection(node.initializer, imports, dirname(scriptPath), typeChecker);
45592
45575
  const collectionSymbol = typeChecker.getSymbolAtLocation(node.name);
45593
45576
  if (collection && collectionSymbol) collectionsBySymbol.set(collectionSymbol, collection);
45594
45577
  }
45595
- ts.forEachChild(node, visitCollection);
45578
+ _react_doctor_require_typescript_default.forEachChild(node, visitCollection);
45596
45579
  };
45597
45580
  visitCollection(boundSourceFile);
45598
45581
  const consumedExportKeys = /* @__PURE__ */ new Set();
45599
45582
  const packageManifestIdentity = getFileIdentityKey(resolve(packageDirectory, "package.json"));
45600
45583
  const visitMapCall = (node) => {
45601
- if (ts.isCallExpression(node) && ts.isPropertyAccessExpression(node.expression) && node.expression.name.text === "map" && ts.isIdentifier(node.expression.expression) && node.arguments.length === 1 && (ts.isArrowFunction(node.arguments[0]) || ts.isFunctionExpression(node.arguments[0]))) {
45584
+ if (_react_doctor_require_typescript_default.isCallExpression(node) && _react_doctor_require_typescript_default.isPropertyAccessExpression(node.expression) && node.expression.name.text === "map" && _react_doctor_require_typescript_default.isIdentifier(node.expression.expression) && node.arguments.length === 1 && (_react_doctor_require_typescript_default.isArrowFunction(node.arguments[0]) || _react_doctor_require_typescript_default.isFunctionExpression(node.arguments[0]))) {
45602
45585
  const collectionSymbol = typeChecker.getSymbolAtLocation(node.expression.expression);
45603
45586
  const collection = collectionSymbol ? collectionsBySymbol.get(collectionSymbol) : void 0;
45604
45587
  const callback = node.arguments[0];
45605
- if (collection && callback.parameters.length === 1 && ts.isIdentifier(callback.parameters[0].name)) {
45588
+ if (collection && callback.parameters.length === 1 && _react_doctor_require_typescript_default.isIdentifier(callback.parameters[0].name)) {
45606
45589
  const buildInvocation = findBuildInvocation(callback, callback.parameters[0].name.text, imports, typeChecker);
45607
45590
  if (!buildInvocation) return;
45608
45591
  const exportNames = collectImportedNamespaceExportNames(callback, buildInvocation, typeChecker);
@@ -45621,7 +45604,7 @@ const collectScriptConsumedExportKeys = (scriptPath, packageDirectory) => {
45621
45604
  }
45622
45605
  }
45623
45606
  }
45624
- ts.forEachChild(node, visitMapCall);
45607
+ _react_doctor_require_typescript_default.forEachChild(node, visitMapCall);
45625
45608
  };
45626
45609
  visitMapCall(boundSourceFile);
45627
45610
  return consumedExportKeys;
@@ -45665,7 +45648,7 @@ const readPackageMetadata = (packageDirectory) => {
45665
45648
  return;
45666
45649
  }
45667
45650
  };
45668
- const hasNextraImport = (sourceFile) => sourceFile.statements.some((statement) => ts.isImportDeclaration(statement) && ts.isStringLiteral(statement.moduleSpecifier) && statement.moduleSpecifier.text === "nextra");
45651
+ const hasNextraImport = (sourceFile) => sourceFile.statements.some((statement) => _react_doctor_require_typescript_default.isImportDeclaration(statement) && _react_doctor_require_typescript_default.isStringLiteral(statement.moduleSpecifier) && statement.moduleSpecifier.text === "nextra");
45669
45652
  const collectReferencedNextraThemeConfigPaths = (packageDirectory) => {
45670
45653
  const referencedPaths = /* @__PURE__ */ new Set();
45671
45654
  for (const configFilename of NEXT_CONFIG_FILENAMES) {
@@ -45677,16 +45660,16 @@ const collectReferencedNextraThemeConfigPaths = (packageDirectory) => {
45677
45660
  } catch {
45678
45661
  continue;
45679
45662
  }
45680
- const sourceFile = ts.createSourceFile(configPath, content, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
45663
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile(configPath, content, _react_doctor_require_typescript_default.ScriptTarget.Latest, true, _react_doctor_require_typescript_default.ScriptKind.TS);
45681
45664
  if (!hasNextraImport(sourceFile)) continue;
45682
45665
  const visitNode = (node) => {
45683
- if (ts.isPropertyAssignment(node)) {
45684
- if ((ts.isIdentifier(node.name) || ts.isStringLiteral(node.name) ? node.name.text : void 0) === "themeConfig" && (ts.isStringLiteral(node.initializer) || ts.isNoSubstitutionTemplateLiteral(node.initializer)) && node.initializer.text.startsWith(".")) {
45666
+ if (_react_doctor_require_typescript_default.isPropertyAssignment(node)) {
45667
+ if ((_react_doctor_require_typescript_default.isIdentifier(node.name) || _react_doctor_require_typescript_default.isStringLiteral(node.name) ? node.name.text : void 0) === "themeConfig" && (_react_doctor_require_typescript_default.isStringLiteral(node.initializer) || _react_doctor_require_typescript_default.isNoSubstitutionTemplateLiteral(node.initializer)) && node.initializer.text.startsWith(".")) {
45685
45668
  const resolvedThemeConfigPath = resolveEntryWithExtensions(resolve(dirname(configPath), node.initializer.text));
45686
45669
  if (resolvedThemeConfigPath) referencedPaths.add(toPosixPath(toFilesystemIdentityPath(resolve(resolvedThemeConfigPath))));
45687
45670
  }
45688
45671
  }
45689
- ts.forEachChild(node, visitNode);
45672
+ _react_doctor_require_typescript_default.forEachChild(node, visitNode);
45690
45673
  };
45691
45674
  visitNode(sourceFile);
45692
45675
  }
@@ -46139,7 +46122,7 @@ const collectStaticModulePackageNames = (sourceText) => {
46139
46122
  //#region ../core/src/project-analysis/utils/matches-package-import-reference.ts
46140
46123
  const collectPackageImportNames = (content) => {
46141
46124
  const packageNames = collectStaticModulePackageNames(content);
46142
- const sourceFile = ts.createSourceFile("package-reference.ts", content, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
46125
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile("package-reference.ts", content, _react_doctor_require_typescript_default.ScriptTarget.Latest, true, _react_doctor_require_typescript_default.ScriptKind.TS);
46143
46126
  for (const typeReferenceDirective of sourceFile.typeReferenceDirectives) {
46144
46127
  const packageName = extractPackageName(typeReferenceDirective.fileName);
46145
46128
  if (packageName) packageNames.add(packageName);
@@ -46149,8 +46132,8 @@ const collectPackageImportNames = (content) => {
46149
46132
  //#endregion
46150
46133
  //#region ../core/src/project-analysis/utils/get-object-literal-element-name.ts
46151
46134
  const getObjectLiteralElementName = (property) => {
46152
- if (!ts.isPropertyAssignment(property) && !ts.isShorthandPropertyAssignment(property)) return;
46153
- return ts.isIdentifier(property.name) || ts.isStringLiteral(property.name) ? property.name.text : void 0;
46135
+ if (!_react_doctor_require_typescript_default.isPropertyAssignment(property) && !_react_doctor_require_typescript_default.isShorthandPropertyAssignment(property)) return;
46136
+ return _react_doctor_require_typescript_default.isIdentifier(property.name) || _react_doctor_require_typescript_default.isStringLiteral(property.name) ? property.name.text : void 0;
46154
46137
  };
46155
46138
  //#endregion
46156
46139
  //#region ../core/src/project-analysis/utils/collect-config-plugin-map-package-names.ts
@@ -46158,23 +46141,23 @@ const collectConfigPluginMapPackageNames = (expression) => {
46158
46141
  const packageNames = /* @__PURE__ */ new Set();
46159
46142
  const collectExpression = (currentExpression) => {
46160
46143
  const unwrappedExpression = unwrapTypescriptExpression(currentExpression);
46161
- if (ts.isConditionalExpression(unwrappedExpression)) {
46144
+ if (_react_doctor_require_typescript_default.isConditionalExpression(unwrappedExpression)) {
46162
46145
  collectExpression(unwrappedExpression.whenTrue);
46163
46146
  collectExpression(unwrappedExpression.whenFalse);
46164
46147
  return;
46165
46148
  }
46166
- if (ts.isBinaryExpression(unwrappedExpression) && [
46167
- ts.SyntaxKind.AmpersandAmpersandToken,
46168
- ts.SyntaxKind.BarBarToken,
46169
- ts.SyntaxKind.QuestionQuestionToken
46149
+ if (_react_doctor_require_typescript_default.isBinaryExpression(unwrappedExpression) && [
46150
+ _react_doctor_require_typescript_default.SyntaxKind.AmpersandAmpersandToken,
46151
+ _react_doctor_require_typescript_default.SyntaxKind.BarBarToken,
46152
+ _react_doctor_require_typescript_default.SyntaxKind.QuestionQuestionToken
46170
46153
  ].includes(unwrappedExpression.operatorToken.kind)) {
46171
46154
  collectExpression(unwrappedExpression.left);
46172
46155
  collectExpression(unwrappedExpression.right);
46173
46156
  return;
46174
46157
  }
46175
- if (!ts.isObjectLiteralExpression(unwrappedExpression)) return;
46158
+ if (!_react_doctor_require_typescript_default.isObjectLiteralExpression(unwrappedExpression)) return;
46176
46159
  for (const property of unwrappedExpression.properties) {
46177
- if (ts.isSpreadAssignment(property)) {
46160
+ if (_react_doctor_require_typescript_default.isSpreadAssignment(property)) {
46178
46161
  collectExpression(property.expression);
46179
46162
  continue;
46180
46163
  }
@@ -46197,16 +46180,16 @@ const STRUCTURED_TEXT_EXTENSIONS = new Set([
46197
46180
  const BABEL_CONFIG_FILE_PATTERN = /(?:^|[/\\])(?:babel\.config\.[^/\\]+|\.babelrc(?:\.[^/\\]+)?)$/;
46198
46181
  const BABEL_MODULE_PREFIX = "module:";
46199
46182
  const isBabelPluginOrPresetSpecifier = (node) => {
46200
- const parent = ts.isArrayLiteralExpression(node.parent) ? node.parent : void 0;
46183
+ const parent = _react_doctor_require_typescript_default.isArrayLiteralExpression(node.parent) ? node.parent : void 0;
46201
46184
  if (!parent) return false;
46202
- const property = (parent.elements[0] === node && ts.isArrayLiteralExpression(parent.parent) ? parent.parent : parent).parent;
46185
+ const property = (parent.elements[0] === node && _react_doctor_require_typescript_default.isArrayLiteralExpression(parent.parent) ? parent.parent : parent).parent;
46203
46186
  let ancestor = property;
46204
- while (ancestor && !ts.isSourceFile(ancestor)) {
46187
+ while (ancestor && !_react_doctor_require_typescript_default.isSourceFile(ancestor)) {
46205
46188
  const parentNode = ancestor.parent;
46206
- if (ts.isObjectLiteralExpression(ancestor) && ts.isArrayLiteralExpression(parentNode) && parentNode.elements[0] !== ancestor && ts.isStringLiteralLike(parentNode.elements[0])) return false;
46189
+ if (_react_doctor_require_typescript_default.isObjectLiteralExpression(ancestor) && _react_doctor_require_typescript_default.isArrayLiteralExpression(parentNode) && parentNode.elements[0] !== ancestor && _react_doctor_require_typescript_default.isStringLiteralLike(parentNode.elements[0])) return false;
46207
46190
  ancestor = parentNode;
46208
46191
  }
46209
- return ts.isPropertyAssignment(property) && (getObjectLiteralElementName(property) === "plugins" || getObjectLiteralElementName(property) === "presets");
46192
+ return _react_doctor_require_typescript_default.isPropertyAssignment(property) && (getObjectLiteralElementName(property) === "plugins" || getObjectLiteralElementName(property) === "presets");
46210
46193
  };
46211
46194
  const collectStructuredTextPackageReferences = (content) => {
46212
46195
  const uncommentedContent = content.split("\n").map(stripCoffeeScriptComment).join("\n");
@@ -46219,16 +46202,16 @@ const collectStructuredTextPackageReferences = (content) => {
46219
46202
  };
46220
46203
  const collectPackageConfigReferences = (filePath, content) => {
46221
46204
  if (STRUCTURED_TEXT_EXTENSIONS.has(extname(filePath))) return collectStructuredTextPackageReferences(content);
46222
- const sourceFile = ts.createSourceFile(filePath, content, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
46205
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile(filePath, content, _react_doctor_require_typescript_default.ScriptTarget.Latest, true, _react_doctor_require_typescript_default.ScriptKind.TS);
46223
46206
  const packageNames = /* @__PURE__ */ new Set();
46224
46207
  const visit = (node) => {
46225
- if (ts.isPropertyAssignment(node) && getObjectLiteralElementName(node) === "plugins") for (const packageName of collectConfigPluginMapPackageNames(node.initializer)) packageNames.add(packageName);
46226
- if (ts.isStringLiteralLike(node)) {
46208
+ if (_react_doctor_require_typescript_default.isPropertyAssignment(node) && getObjectLiteralElementName(node) === "plugins") for (const packageName of collectConfigPluginMapPackageNames(node.initializer)) packageNames.add(packageName);
46209
+ if (_react_doctor_require_typescript_default.isStringLiteralLike(node)) {
46227
46210
  const packageName = extractPackageName(BABEL_CONFIG_FILE_PATTERN.test(filePath) && node.text.startsWith(BABEL_MODULE_PREFIX) && isBabelPluginOrPresetSpecifier(node) ? node.text.slice(7) : node.text);
46228
46211
  if (packageName) packageNames.add(packageName);
46229
46212
  return;
46230
46213
  }
46231
- ts.forEachChild(node, visit);
46214
+ _react_doctor_require_typescript_default.forEachChild(node, visit);
46232
46215
  };
46233
46216
  visit(sourceFile);
46234
46217
  return packageNames;
@@ -48456,21 +48439,21 @@ const extractPreviewRegistryNamesFromMdx = (sourceText) => {
48456
48439
  //#endregion
48457
48440
  //#region ../core/src/project-analysis/utils/are-source-files-structurally-equivalent.ts
48458
48441
  const buildSourceStructure = (filePath, sourceText) => {
48459
- const sourceFile = ts.createSourceFile(filePath, sourceText, ts.ScriptTarget.Latest, true, filePath.endsWith("x") ? ts.ScriptKind.TSX : ts.ScriptKind.TS);
48442
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile(filePath, sourceText, _react_doctor_require_typescript_default.ScriptTarget.Latest, true, filePath.endsWith("x") ? _react_doctor_require_typescript_default.ScriptKind.TSX : _react_doctor_require_typescript_default.ScriptKind.TS);
48460
48443
  const structure = [];
48461
48444
  const visitNode = (node, normalizeClassNames = false) => {
48462
48445
  structure.push(String(node.kind));
48463
- if (ts.isIdentifier(node)) structure.push(node.text);
48464
- else if (ts.isStringLiteralLike(node)) structure.push(normalizeClassNames ? node.text.trim().split(/\s+/).sort().join(" ") : node.text);
48465
- else if (ts.isNumericLiteral(node)) structure.push(node.text);
48466
- else if (ts.isTemplateLiteralToken(node) || ts.isRegularExpressionLiteral(node) || ts.isBigIntLiteral(node)) structure.push(node.text);
48467
- else if (ts.isJsxText(node)) structure.push(node.text.replace(/\s+/g, " ").trim());
48468
- if (ts.isJsxAttribute(node) && ts.isIdentifier(node.name) && node.name.text === "className" && node.initializer && ts.isStringLiteral(node.initializer)) {
48446
+ if (_react_doctor_require_typescript_default.isIdentifier(node)) structure.push(node.text);
48447
+ else if (_react_doctor_require_typescript_default.isStringLiteralLike(node)) structure.push(normalizeClassNames ? node.text.trim().split(/\s+/).sort().join(" ") : node.text);
48448
+ else if (_react_doctor_require_typescript_default.isNumericLiteral(node)) structure.push(node.text);
48449
+ else if (_react_doctor_require_typescript_default.isTemplateLiteralToken(node) || _react_doctor_require_typescript_default.isRegularExpressionLiteral(node) || _react_doctor_require_typescript_default.isBigIntLiteral(node)) structure.push(node.text);
48450
+ else if (_react_doctor_require_typescript_default.isJsxText(node)) structure.push(node.text.replace(/\s+/g, " ").trim());
48451
+ if (_react_doctor_require_typescript_default.isJsxAttribute(node) && _react_doctor_require_typescript_default.isIdentifier(node.name) && node.name.text === "className" && node.initializer && _react_doctor_require_typescript_default.isStringLiteral(node.initializer)) {
48469
48452
  visitNode(node.name);
48470
48453
  visitNode(node.initializer, true);
48471
48454
  return;
48472
48455
  }
48473
- ts.forEachChild(node, (childNode) => visitNode(childNode));
48456
+ _react_doctor_require_typescript_default.forEachChild(node, (childNode) => visitNode(childNode));
48474
48457
  };
48475
48458
  visitNode(sourceFile);
48476
48459
  return structure.join("\0");
@@ -48484,8 +48467,8 @@ const buildScriptAnalysisKey = (scriptFile) => `${scriptFile.workingDirectory}\0
48484
48467
  const resolveBuildReference = (reference, workingDirectory, projectRoot) => reference.startsWith("/") ? resolve(projectRoot, reference.replace(/^\/+/, "")) : resolve(workingDirectory, reference);
48485
48468
  const getPropertyName$1 = (expression) => {
48486
48469
  const unwrappedExpression = unwrapTypescriptExpression(expression);
48487
- if (ts.isPropertyAccessExpression(unwrappedExpression)) return unwrappedExpression.name.text;
48488
- if (ts.isElementAccessExpression(unwrappedExpression) && unwrappedExpression.argumentExpression && ts.isStringLiteralLike(unwrappedExpression.argumentExpression)) return unwrappedExpression.argumentExpression.text;
48470
+ if (_react_doctor_require_typescript_default.isPropertyAccessExpression(unwrappedExpression)) return unwrappedExpression.name.text;
48471
+ if (_react_doctor_require_typescript_default.isElementAccessExpression(unwrappedExpression) && unwrappedExpression.argumentExpression && _react_doctor_require_typescript_default.isStringLiteralLike(unwrappedExpression.argumentExpression)) return unwrappedExpression.argumentExpression.text;
48489
48472
  };
48490
48473
  const resolveImportedScriptPath = (specifier, scriptFile, projectRoot) => {
48491
48474
  const importedPath = specifier.startsWith(".") ? resolve(dirname(scriptFile.filePath), specifier) : specifier.startsWith("@/registry/") ? resolve(scriptFile.workingDirectory, "src/registry", specifier.slice(11)) : void 0;
@@ -48502,20 +48485,20 @@ const collectWebpackEntrySpecifiers = (filePath) => {
48502
48485
  } catch {
48503
48486
  return [];
48504
48487
  }
48505
- const sourceFile = ts.createSourceFile(filePath, sourceText, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
48488
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile(filePath, sourceText, _react_doctor_require_typescript_default.ScriptTarget.Latest, true, _react_doctor_require_typescript_default.ScriptKind.TS);
48506
48489
  const specifiers = /* @__PURE__ */ new Set();
48507
48490
  const collectStringLiterals = (node) => {
48508
- if (ts.isStringLiteralLike(node) && node.text.startsWith(".")) {
48491
+ if (_react_doctor_require_typescript_default.isStringLiteralLike(node) && node.text.startsWith(".")) {
48509
48492
  specifiers.add(node.text);
48510
48493
  return;
48511
48494
  }
48512
- ts.forEachChild(node, collectStringLiterals);
48495
+ _react_doctor_require_typescript_default.forEachChild(node, collectStringLiterals);
48513
48496
  };
48514
48497
  const visitNode = (node) => {
48515
- if (ts.isPropertyAssignment(node) && (ts.isIdentifier(node.name) && node.name.text === "entry" || ts.isStringLiteralLike(node.name) && node.name.text === "entry")) collectStringLiterals(node.initializer);
48516
- if (ts.isBinaryExpression(node) && node.operatorToken.kind === ts.SyntaxKind.EqualsToken && ts.isPropertyAccessExpression(node.left) && node.left.name.text === "entry") collectStringLiterals(node.right);
48517
- if (ts.isCallExpression(node) && ts.isPropertyAccessExpression(node.expression) && node.expression.name.text === "concat" && node.getText(sourceFile).includes(".entry")) collectStringLiterals(node);
48518
- ts.forEachChild(node, visitNode);
48498
+ if (_react_doctor_require_typescript_default.isPropertyAssignment(node) && (_react_doctor_require_typescript_default.isIdentifier(node.name) && node.name.text === "entry" || _react_doctor_require_typescript_default.isStringLiteralLike(node.name) && node.name.text === "entry")) collectStringLiterals(node.initializer);
48499
+ if (_react_doctor_require_typescript_default.isBinaryExpression(node) && node.operatorToken.kind === _react_doctor_require_typescript_default.SyntaxKind.EqualsToken && _react_doctor_require_typescript_default.isPropertyAccessExpression(node.left) && node.left.name.text === "entry") collectStringLiterals(node.right);
48500
+ if (_react_doctor_require_typescript_default.isCallExpression(node) && _react_doctor_require_typescript_default.isPropertyAccessExpression(node.expression) && node.expression.name.text === "concat" && node.getText(sourceFile).includes(".entry")) collectStringLiterals(node);
48501
+ _react_doctor_require_typescript_default.forEachChild(node, visitNode);
48519
48502
  };
48520
48503
  visitNode(sourceFile);
48521
48504
  return [...specifiers];
@@ -48682,23 +48665,23 @@ const buildScriptAnalyses = (invokedScriptFiles, projectRoot) => {
48682
48665
  } catch {
48683
48666
  continue;
48684
48667
  }
48685
- const sourceFile = ts.createSourceFile(scriptFile.filePath, content, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
48668
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile(scriptFile.filePath, content, _react_doctor_require_typescript_default.ScriptTarget.Latest, true, _react_doctor_require_typescript_default.ScriptKind.TS);
48686
48669
  const localFunctions = /* @__PURE__ */ new Map();
48687
48670
  const defaultExportExpressions = [];
48688
48671
  for (const statement of sourceFile.statements) {
48689
- if (ts.isFunctionDeclaration(statement) && statement.body) {
48672
+ if (_react_doctor_require_typescript_default.isFunctionDeclaration(statement) && statement.body) {
48690
48673
  if (statement.name) localFunctions.set(statement.name.text, statement.body);
48691
- if (statement.modifiers?.some((modifier) => modifier.kind === ts.SyntaxKind.DefaultKeyword)) localFunctions.set("default", statement.body);
48674
+ if (statement.modifiers?.some((modifier) => modifier.kind === _react_doctor_require_typescript_default.SyntaxKind.DefaultKeyword)) localFunctions.set("default", statement.body);
48692
48675
  }
48693
- if (ts.isVariableStatement(statement)) {
48694
- for (const declaration of statement.declarationList.declarations) if (ts.isIdentifier(declaration.name) && declaration.initializer && (ts.isArrowFunction(declaration.initializer) || ts.isFunctionExpression(declaration.initializer))) localFunctions.set(declaration.name.text, declaration.initializer.body);
48676
+ if (_react_doctor_require_typescript_default.isVariableStatement(statement)) {
48677
+ for (const declaration of statement.declarationList.declarations) if (_react_doctor_require_typescript_default.isIdentifier(declaration.name) && declaration.initializer && (_react_doctor_require_typescript_default.isArrowFunction(declaration.initializer) || _react_doctor_require_typescript_default.isFunctionExpression(declaration.initializer))) localFunctions.set(declaration.name.text, declaration.initializer.body);
48695
48678
  }
48696
- if (ts.isExportAssignment(statement) && !statement.isExportEquals) defaultExportExpressions.push(statement.expression);
48679
+ if (_react_doctor_require_typescript_default.isExportAssignment(statement) && !statement.isExportEquals) defaultExportExpressions.push(statement.expression);
48697
48680
  }
48698
48681
  for (const defaultExportExpression of defaultExportExpressions) {
48699
48682
  const unwrappedDefaultExport = unwrapTypescriptExpression(defaultExportExpression);
48700
- if (ts.isArrowFunction(unwrappedDefaultExport) || ts.isFunctionExpression(unwrappedDefaultExport)) localFunctions.set("default", unwrappedDefaultExport.body);
48701
- else if (ts.isIdentifier(unwrappedDefaultExport)) {
48683
+ if (_react_doctor_require_typescript_default.isArrowFunction(unwrappedDefaultExport) || _react_doctor_require_typescript_default.isFunctionExpression(unwrappedDefaultExport)) localFunctions.set("default", unwrappedDefaultExport.body);
48684
+ else if (_react_doctor_require_typescript_default.isIdentifier(unwrappedDefaultExport)) {
48702
48685
  const defaultFunctionBody = localFunctions.get(unwrappedDefaultExport.text);
48703
48686
  if (defaultFunctionBody) localFunctions.set("default", defaultFunctionBody);
48704
48687
  }
@@ -48712,7 +48695,7 @@ const buildScriptAnalyses = (invokedScriptFiles, projectRoot) => {
48712
48695
  });
48713
48696
  }
48714
48697
  for (const analysis of analyses.values()) for (const statement of analysis.sourceFile.statements) {
48715
- if (!ts.isImportDeclaration(statement) || !ts.isStringLiteral(statement.moduleSpecifier)) continue;
48698
+ if (!_react_doctor_require_typescript_default.isImportDeclaration(statement) || !_react_doctor_require_typescript_default.isStringLiteral(statement.moduleSpecifier)) continue;
48716
48699
  const importClause = statement.importClause;
48717
48700
  if (!importClause || importClause.isTypeOnly) continue;
48718
48701
  const importedFilePath = resolveImportedScriptPath(statement.moduleSpecifier.text, analysis.scriptFile, projectRoot);
@@ -48726,7 +48709,7 @@ const buildScriptAnalyses = (invokedScriptFiles, projectRoot) => {
48726
48709
  analysisKey: importedAnalysisKey,
48727
48710
  exportName: "default"
48728
48711
  });
48729
- if (!importClause.namedBindings || !ts.isNamedImports(importClause.namedBindings)) continue;
48712
+ if (!importClause.namedBindings || !_react_doctor_require_typescript_default.isNamedImports(importClause.namedBindings)) continue;
48730
48713
  for (const element of importClause.namedBindings.elements) {
48731
48714
  if (element.isTypeOnly) continue;
48732
48715
  analysis.importedFunctions.set(element.name.text, {
@@ -48748,11 +48731,11 @@ const buildScriptAnalyses = (invokedScriptFiles, projectRoot) => {
48748
48731
  const visitLiveNode = (analysis, rootNode) => {
48749
48732
  const visitNode = (node) => {
48750
48733
  analysis.liveNodes.add(node);
48751
- if (node !== rootNode && (ts.isFunctionDeclaration(node) || ts.isFunctionExpression(node) || ts.isArrowFunction(node) || ts.isMethodDeclaration(node))) return;
48752
- if (ts.isCallExpression(node)) {
48734
+ if (node !== rootNode && (_react_doctor_require_typescript_default.isFunctionDeclaration(node) || _react_doctor_require_typescript_default.isFunctionExpression(node) || _react_doctor_require_typescript_default.isArrowFunction(node) || _react_doctor_require_typescript_default.isMethodDeclaration(node))) return;
48735
+ if (_react_doctor_require_typescript_default.isCallExpression(node)) {
48753
48736
  const calledExpression = unwrapTypescriptExpression(node.expression);
48754
- if (ts.isFunctionExpression(calledExpression) || ts.isArrowFunction(calledExpression)) queueFunctionBody(analysis, calledExpression.body);
48755
- if (ts.isIdentifier(calledExpression)) {
48737
+ if (_react_doctor_require_typescript_default.isFunctionExpression(calledExpression) || _react_doctor_require_typescript_default.isArrowFunction(calledExpression)) queueFunctionBody(analysis, calledExpression.body);
48738
+ if (_react_doctor_require_typescript_default.isIdentifier(calledExpression)) {
48756
48739
  const localFunctionBody = analysis.localFunctions.get(calledExpression.text);
48757
48740
  if (localFunctionBody) queueFunctionBody(analysis, localFunctionBody);
48758
48741
  const importedFunction = analysis.importedFunctions.get(calledExpression.text);
@@ -48762,10 +48745,10 @@ const buildScriptAnalyses = (invokedScriptFiles, projectRoot) => {
48762
48745
  }
48763
48746
  for (const argument of node.arguments) {
48764
48747
  const unwrappedArgument = unwrapTypescriptExpression(argument);
48765
- if (ts.isFunctionExpression(unwrappedArgument) || ts.isArrowFunction(unwrappedArgument)) queueFunctionBody(analysis, unwrappedArgument.body);
48748
+ if (_react_doctor_require_typescript_default.isFunctionExpression(unwrappedArgument) || _react_doctor_require_typescript_default.isArrowFunction(unwrappedArgument)) queueFunctionBody(analysis, unwrappedArgument.body);
48766
48749
  }
48767
48750
  }
48768
- ts.forEachChild(node, visitNode);
48751
+ _react_doctor_require_typescript_default.forEachChild(node, visitNode);
48769
48752
  };
48770
48753
  visitNode(rootNode);
48771
48754
  };
@@ -48790,18 +48773,18 @@ const findVariableDeclaration = (sourceFile, identifierName, usePosition) => {
48790
48773
  let closestDeclaration;
48791
48774
  const visitNode = (node) => {
48792
48775
  if (node.getStart(sourceFile) >= usePosition) return;
48793
- if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name)) {
48776
+ if (_react_doctor_require_typescript_default.isVariableDeclaration(node) && _react_doctor_require_typescript_default.isIdentifier(node.name)) {
48794
48777
  if (node.name.text === identifierName) closestDeclaration = node;
48795
48778
  }
48796
- ts.forEachChild(node, visitNode);
48779
+ _react_doctor_require_typescript_default.forEachChild(node, visitNode);
48797
48780
  };
48798
48781
  visitNode(sourceFile);
48799
48782
  return closestDeclaration;
48800
48783
  };
48801
48784
  const evaluatePathExpression = (expression, analysis, projectRoot, seenIdentifiers = /* @__PURE__ */ new Set()) => {
48802
48785
  const unwrappedExpression = unwrapTypescriptExpression(expression);
48803
- if (ts.isStringLiteralLike(unwrappedExpression)) return resolveBuildReference(unwrappedExpression.text, analysis.scriptFile.workingDirectory, projectRoot);
48804
- if (ts.isIdentifier(unwrappedExpression)) {
48786
+ if (_react_doctor_require_typescript_default.isStringLiteralLike(unwrappedExpression)) return resolveBuildReference(unwrappedExpression.text, analysis.scriptFile.workingDirectory, projectRoot);
48787
+ if (_react_doctor_require_typescript_default.isIdentifier(unwrappedExpression)) {
48805
48788
  if (unwrappedExpression.text === "__dirname") return dirname(analysis.scriptFile.filePath);
48806
48789
  if (seenIdentifiers.has(unwrappedExpression.text)) return void 0;
48807
48790
  const declaration = findVariableDeclaration(analysis.sourceFile, unwrappedExpression.text, unwrappedExpression.getStart(analysis.sourceFile));
@@ -48810,8 +48793,8 @@ const evaluatePathExpression = (expression, analysis, projectRoot, seenIdentifie
48810
48793
  nextSeenIdentifiers.add(unwrappedExpression.text);
48811
48794
  return evaluatePathExpression(declaration.initializer, analysis, projectRoot, nextSeenIdentifiers);
48812
48795
  }
48813
- if (!ts.isCallExpression(unwrappedExpression)) return void 0;
48814
- if (ts.isPropertyAccessExpression(unwrappedExpression.expression) && ts.isIdentifier(unwrappedExpression.expression.expression) && unwrappedExpression.expression.expression.text === "process" && unwrappedExpression.expression.name.text === "cwd") return analysis.scriptFile.workingDirectory;
48796
+ if (!_react_doctor_require_typescript_default.isCallExpression(unwrappedExpression)) return void 0;
48797
+ if (_react_doctor_require_typescript_default.isPropertyAccessExpression(unwrappedExpression.expression) && _react_doctor_require_typescript_default.isIdentifier(unwrappedExpression.expression.expression) && unwrappedExpression.expression.expression.text === "process" && unwrappedExpression.expression.name.text === "cwd") return analysis.scriptFile.workingDirectory;
48815
48798
  const pathMethodName = getPropertyName$1(unwrappedExpression.expression);
48816
48799
  if (pathMethodName !== "join" && pathMethodName !== "resolve") return void 0;
48817
48800
  const [baseExpression, ...segmentExpressions] = unwrappedExpression.arguments;
@@ -48821,7 +48804,7 @@ const evaluatePathExpression = (expression, analysis, projectRoot, seenIdentifie
48821
48804
  const pathSegments = [];
48822
48805
  for (const segmentExpression of segmentExpressions) {
48823
48806
  const unwrappedSegment = unwrapTypescriptExpression(segmentExpression);
48824
- if (!ts.isStringLiteralLike(unwrappedSegment)) return void 0;
48807
+ if (!_react_doctor_require_typescript_default.isStringLiteralLike(unwrappedSegment)) return void 0;
48825
48808
  pathSegments.push(unwrappedSegment.text);
48826
48809
  }
48827
48810
  const rootRelativeSegment = pathSegments.find((pathSegment) => pathSegment.startsWith("/"));
@@ -48835,48 +48818,48 @@ const evaluatePathExpression = (expression, analysis, projectRoot, seenIdentifie
48835
48818
  const expressionContainsIdentifier = (expression, identifierName) => {
48836
48819
  let containsIdentifier = false;
48837
48820
  const visitNode = (node) => {
48838
- if (ts.isIdentifier(node) && node.text === identifierName) {
48821
+ if (_react_doctor_require_typescript_default.isIdentifier(node) && node.text === identifierName) {
48839
48822
  containsIdentifier = true;
48840
48823
  return;
48841
48824
  }
48842
- if (!containsIdentifier) ts.forEachChild(node, visitNode);
48825
+ if (!containsIdentifier) _react_doctor_require_typescript_default.forEachChild(node, visitNode);
48843
48826
  };
48844
48827
  visitNode(expression);
48845
48828
  return containsIdentifier;
48846
48829
  };
48847
48830
  const isConditionallyExecuted = (node, boundary) => {
48848
- for (let ancestor = node.parent; ancestor && ancestor !== boundary; ancestor = ancestor.parent) if (ts.isIfStatement(ancestor) || ts.isConditionalExpression(ancestor) || ts.isSwitchStatement(ancestor)) return true;
48831
+ for (let ancestor = node.parent; ancestor && ancestor !== boundary; ancestor = ancestor.parent) if (_react_doctor_require_typescript_default.isIfStatement(ancestor) || _react_doctor_require_typescript_default.isConditionalExpression(ancestor) || _react_doctor_require_typescript_default.isSwitchStatement(ancestor)) return true;
48849
48832
  return false;
48850
48833
  };
48851
48834
  const analyzeDirectoryConsumer = (body, helperName, parameterName) => {
48852
48835
  const directoryEntryCollectionNames = /* @__PURE__ */ new Set();
48853
48836
  let unconditionallyConsumesEntries = false;
48854
48837
  let recursivelyTraverses = false;
48855
- const isDirectoryRead = (node) => ts.isCallExpression(node) && getPropertyName$1(node.expression) === "readdirSync" && node.arguments[0] !== void 0 && ts.isIdentifier(unwrapTypescriptExpression(node.arguments[0])) && unwrapTypescriptExpression(node.arguments[0]).getText() === parameterName;
48838
+ const isDirectoryRead = (node) => _react_doctor_require_typescript_default.isCallExpression(node) && getPropertyName$1(node.expression) === "readdirSync" && node.arguments[0] !== void 0 && _react_doctor_require_typescript_default.isIdentifier(unwrapTypescriptExpression(node.arguments[0])) && unwrapTypescriptExpression(node.arguments[0]).getText() === parameterName;
48856
48839
  const visitNode = (node) => {
48857
- if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name) && node.initializer && isDirectoryRead(unwrapTypescriptExpression(node.initializer))) directoryEntryCollectionNames.add(node.name.text);
48858
- if (ts.isForOfStatement(node) && ts.isVariableDeclarationList(node.initializer)) {
48840
+ if (_react_doctor_require_typescript_default.isVariableDeclaration(node) && _react_doctor_require_typescript_default.isIdentifier(node.name) && node.initializer && isDirectoryRead(unwrapTypescriptExpression(node.initializer))) directoryEntryCollectionNames.add(node.name.text);
48841
+ if (_react_doctor_require_typescript_default.isForOfStatement(node) && _react_doctor_require_typescript_default.isVariableDeclarationList(node.initializer)) {
48859
48842
  const collectionExpression = unwrapTypescriptExpression(node.expression);
48860
- if (isDirectoryRead(collectionExpression) || ts.isIdentifier(collectionExpression) && directoryEntryCollectionNames.has(collectionExpression.text)) {
48843
+ if (isDirectoryRead(collectionExpression) || _react_doctor_require_typescript_default.isIdentifier(collectionExpression) && directoryEntryCollectionNames.has(collectionExpression.text)) {
48861
48844
  const loopVariable = node.initializer.declarations[0]?.name;
48862
- if (loopVariable && ts.isIdentifier(loopVariable)) {
48845
+ if (loopVariable && _react_doctor_require_typescript_default.isIdentifier(loopVariable)) {
48863
48846
  const entryDependentNames = new Set([loopVariable.text]);
48864
48847
  const visitLoop = (loopNode) => {
48865
- if (ts.isVariableDeclaration(loopNode) && ts.isIdentifier(loopNode.name) && loopNode.initializer && [...entryDependentNames].some((identifierName) => expressionContainsIdentifier(loopNode.initializer, identifierName))) entryDependentNames.add(loopNode.name.text);
48866
- if (ts.isCallExpression(loopNode)) {
48848
+ if (_react_doctor_require_typescript_default.isVariableDeclaration(loopNode) && _react_doctor_require_typescript_default.isIdentifier(loopNode.name) && loopNode.initializer && [...entryDependentNames].some((identifierName) => expressionContainsIdentifier(loopNode.initializer, identifierName))) entryDependentNames.add(loopNode.name.text);
48849
+ if (_react_doctor_require_typescript_default.isCallExpression(loopNode)) {
48867
48850
  if (getPropertyName$1(loopNode.expression)?.match(/^(?:copyFile|readFile)(?:Sync)?$/) && loopNode.arguments.some((argument) => [...entryDependentNames].some((identifierName) => expressionContainsIdentifier(argument, identifierName)))) {
48868
48851
  if (!isConditionallyExecuted(loopNode, node.statement)) unconditionallyConsumesEntries = true;
48869
48852
  }
48870
48853
  const calledExpression = unwrapTypescriptExpression(loopNode.expression);
48871
- if (ts.isIdentifier(calledExpression) && calledExpression.text === helperName && loopNode.arguments.some((argument) => [...entryDependentNames].some((identifierName) => expressionContainsIdentifier(argument, identifierName)))) recursivelyTraverses = true;
48854
+ if (_react_doctor_require_typescript_default.isIdentifier(calledExpression) && calledExpression.text === helperName && loopNode.arguments.some((argument) => [...entryDependentNames].some((identifierName) => expressionContainsIdentifier(argument, identifierName)))) recursivelyTraverses = true;
48872
48855
  }
48873
- ts.forEachChild(loopNode, visitLoop);
48856
+ _react_doctor_require_typescript_default.forEachChild(loopNode, visitLoop);
48874
48857
  };
48875
48858
  visitLoop(node.statement);
48876
48859
  }
48877
48860
  }
48878
48861
  }
48879
- ts.forEachChild(node, visitNode);
48862
+ _react_doctor_require_typescript_default.forEachChild(node, visitNode);
48880
48863
  };
48881
48864
  visitNode(body);
48882
48865
  return {
@@ -48886,11 +48869,11 @@ const analyzeDirectoryConsumer = (body, helperName, parameterName) => {
48886
48869
  };
48887
48870
  const collectRecursiveInputDirectories = (analysis, projectRoot, consumedFiles) => {
48888
48871
  for (const node of analysis.liveNodes) {
48889
- if (!ts.isCallExpression(node) || !ts.isIdentifier(unwrapTypescriptExpression(node.expression))) continue;
48872
+ if (!_react_doctor_require_typescript_default.isCallExpression(node) || !_react_doctor_require_typescript_default.isIdentifier(unwrapTypescriptExpression(node.expression))) continue;
48890
48873
  const helperName = unwrapTypescriptExpression(node.expression).getText();
48891
48874
  const helperBody = analysis.localFunctions.get(helperName);
48892
- const helperDeclaration = [...analysis.sourceFile.statements].find((statement) => ts.isFunctionDeclaration(statement) && statement.name?.text === helperName);
48893
- if (!helperBody || !helperDeclaration || !ts.isFunctionDeclaration(helperDeclaration) || !helperDeclaration.parameters[0] || !ts.isIdentifier(helperDeclaration.parameters[0].name)) continue;
48875
+ const helperDeclaration = [...analysis.sourceFile.statements].find((statement) => _react_doctor_require_typescript_default.isFunctionDeclaration(statement) && statement.name?.text === helperName);
48876
+ if (!helperBody || !helperDeclaration || !_react_doctor_require_typescript_default.isFunctionDeclaration(helperDeclaration) || !helperDeclaration.parameters[0] || !_react_doctor_require_typescript_default.isIdentifier(helperDeclaration.parameters[0].name)) continue;
48894
48877
  const directoryConsumption = analyzeDirectoryConsumer(helperBody, helperName, helperDeclaration.parameters[0].name.text);
48895
48878
  if (!directoryConsumption.consumesAllEntries) continue;
48896
48879
  const directoryArgument = node.arguments[0];
@@ -48901,9 +48884,9 @@ const collectRecursiveInputDirectories = (analysis, projectRoot, consumedFiles)
48901
48884
  };
48902
48885
  const evaluateCopySourceExpression = (expression, loopVariableName, loopVariableValue) => {
48903
48886
  const unwrappedExpression = unwrapTypescriptExpression(expression);
48904
- if (ts.isIdentifier(unwrappedExpression)) return unwrappedExpression.text === loopVariableName ? loopVariableValue : void 0;
48905
- if (ts.isStringLiteralLike(unwrappedExpression)) return unwrappedExpression.text;
48906
- if (ts.isTemplateExpression(unwrappedExpression)) {
48887
+ if (_react_doctor_require_typescript_default.isIdentifier(unwrappedExpression)) return unwrappedExpression.text === loopVariableName ? loopVariableValue : void 0;
48888
+ if (_react_doctor_require_typescript_default.isStringLiteralLike(unwrappedExpression)) return unwrappedExpression.text;
48889
+ if (_react_doctor_require_typescript_default.isTemplateExpression(unwrappedExpression)) {
48907
48890
  let resolvedTemplate = unwrappedExpression.head.text;
48908
48891
  for (const templateSpan of unwrappedExpression.templateSpans) {
48909
48892
  const resolvedExpression = evaluateCopySourceExpression(templateSpan.expression, loopVariableName, loopVariableValue);
@@ -48912,7 +48895,7 @@ const evaluateCopySourceExpression = (expression, loopVariableName, loopVariable
48912
48895
  }
48913
48896
  return resolvedTemplate;
48914
48897
  }
48915
- if (ts.isBinaryExpression(unwrappedExpression) && unwrappedExpression.operatorToken.kind === ts.SyntaxKind.PlusToken) {
48898
+ if (_react_doctor_require_typescript_default.isBinaryExpression(unwrappedExpression) && unwrappedExpression.operatorToken.kind === _react_doctor_require_typescript_default.SyntaxKind.PlusToken) {
48916
48899
  const leftValue = evaluateCopySourceExpression(unwrappedExpression.left, loopVariableName, loopVariableValue);
48917
48900
  const rightValue = evaluateCopySourceExpression(unwrappedExpression.right, loopVariableName, loopVariableValue);
48918
48901
  return leftValue === void 0 || rightValue === void 0 ? void 0 : `${leftValue}${rightValue}`;
@@ -48920,25 +48903,25 @@ const evaluateCopySourceExpression = (expression, loopVariableName, loopVariable
48920
48903
  };
48921
48904
  const collectCopiedSourceFiles = (analysis, projectRoot, consumedFiles) => {
48922
48905
  for (const node of analysis.liveNodes) {
48923
- if (!ts.isForOfStatement(node) || !analysis.liveNodes.has(node.statement)) continue;
48924
- if (!ts.isVariableDeclarationList(node.initializer) || node.initializer.declarations.length !== 1 || !ts.isIdentifier(node.initializer.declarations[0].name) || !ts.isIdentifier(unwrapTypescriptExpression(node.expression))) continue;
48906
+ if (!_react_doctor_require_typescript_default.isForOfStatement(node) || !analysis.liveNodes.has(node.statement)) continue;
48907
+ if (!_react_doctor_require_typescript_default.isVariableDeclarationList(node.initializer) || node.initializer.declarations.length !== 1 || !_react_doctor_require_typescript_default.isIdentifier(node.initializer.declarations[0].name) || !_react_doctor_require_typescript_default.isIdentifier(unwrapTypescriptExpression(node.expression))) continue;
48925
48908
  const loopVariableName = node.initializer.declarations[0].name.text;
48926
48909
  const arrayIdentifier = unwrapTypescriptExpression(node.expression);
48927
- if (!ts.isIdentifier(arrayIdentifier)) continue;
48910
+ if (!_react_doctor_require_typescript_default.isIdentifier(arrayIdentifier)) continue;
48928
48911
  const arrayDeclaration = findVariableDeclaration(analysis.sourceFile, arrayIdentifier.text, node.getStart(analysis.sourceFile));
48929
- if (!arrayDeclaration?.initializer || !ts.isArrayLiteralExpression(arrayDeclaration.initializer)) continue;
48912
+ if (!arrayDeclaration?.initializer || !_react_doctor_require_typescript_default.isArrayLiteralExpression(arrayDeclaration.initializer)) continue;
48930
48913
  const values = arrayDeclaration.initializer.elements.flatMap((element) => {
48931
48914
  const unwrappedElement = unwrapTypescriptExpression(element);
48932
- return ts.isStringLiteralLike(unwrappedElement) ? [unwrappedElement.text] : [];
48915
+ return _react_doctor_require_typescript_default.isStringLiteralLike(unwrappedElement) ? [unwrappedElement.text] : [];
48933
48916
  });
48934
48917
  const visitLoopBody = (loopNode) => {
48935
- if (ts.isCallExpression(loopNode) && getPropertyName$1(loopNode.expression)?.match(/^copyFile(?:Sync)?$/) && loopNode.arguments[0]) for (const value of values) {
48918
+ if (_react_doctor_require_typescript_default.isCallExpression(loopNode) && getPropertyName$1(loopNode.expression)?.match(/^copyFile(?:Sync)?$/) && loopNode.arguments[0]) for (const value of values) {
48936
48919
  const sourceReference = evaluateCopySourceExpression(loopNode.arguments[0], loopVariableName, value);
48937
48920
  if (!sourceReference) continue;
48938
48921
  const sourcePath = resolveBuildReference(sourceReference, analysis.scriptFile.workingDirectory, projectRoot);
48939
48922
  if (isPathInsideDirectoryOrEqual(sourcePath, projectRoot) && existsSync(sourcePath) && statSync(sourcePath).isFile() && SOURCE_FILE_EXTENSION_PATTERN.test(sourcePath)) consumedFiles.add(sourcePath);
48940
48923
  }
48941
- ts.forEachChild(loopNode, visitLoopBody);
48924
+ _react_doctor_require_typescript_default.forEachChild(loopNode, visitLoopBody);
48942
48925
  };
48943
48926
  visitLoopBody(node.statement);
48944
48927
  }
@@ -48947,56 +48930,56 @@ const expressionContainsString = (expression, value) => {
48947
48930
  let containsString = false;
48948
48931
  const visitNode = (node) => {
48949
48932
  if (containsString) return;
48950
- if (ts.isStringLiteralLike(node) && node.text === value) {
48933
+ if (_react_doctor_require_typescript_default.isStringLiteralLike(node) && node.text === value) {
48951
48934
  containsString = true;
48952
48935
  return;
48953
48936
  }
48954
- ts.forEachChild(node, visitNode);
48937
+ _react_doctor_require_typescript_default.forEachChild(node, visitNode);
48955
48938
  };
48956
48939
  visitNode(expression);
48957
48940
  return containsString;
48958
48941
  };
48959
48942
  const collectObjectPathReferences = (expression, fileReferences) => {
48960
48943
  const unwrappedExpression = unwrapTypescriptExpression(expression);
48961
- if (ts.isStringLiteralLike(unwrappedExpression)) {
48944
+ if (_react_doctor_require_typescript_default.isStringLiteralLike(unwrappedExpression)) {
48962
48945
  fileReferences.add(unwrappedExpression.text);
48963
48946
  return;
48964
48947
  }
48965
- if (ts.isArrayLiteralExpression(unwrappedExpression)) {
48948
+ if (_react_doctor_require_typescript_default.isArrayLiteralExpression(unwrappedExpression)) {
48966
48949
  for (const element of unwrappedExpression.elements) collectObjectPathReferences(element, fileReferences);
48967
48950
  return;
48968
48951
  }
48969
- if (!ts.isObjectLiteralExpression(unwrappedExpression)) return;
48952
+ if (!_react_doctor_require_typescript_default.isObjectLiteralExpression(unwrappedExpression)) return;
48970
48953
  for (const property of unwrappedExpression.properties) {
48971
- if (!ts.isPropertyAssignment(property)) continue;
48972
- if ((ts.isIdentifier(property.name) || ts.isStringLiteralLike(property.name) ? property.name.text : void 0) === "path") collectObjectPathReferences(property.initializer, fileReferences);
48954
+ if (!_react_doctor_require_typescript_default.isPropertyAssignment(property)) continue;
48955
+ if ((_react_doctor_require_typescript_default.isIdentifier(property.name) || _react_doctor_require_typescript_default.isStringLiteralLike(property.name) ? property.name.text : void 0) === "path") collectObjectPathReferences(property.initializer, fileReferences);
48973
48956
  }
48974
48957
  };
48975
48958
  const findStyleRegistryFanoutSources = (analysis, analyses) => {
48976
48959
  for (const node of analysis.liveNodes) {
48977
- if (!ts.isForOfStatement(node) || !ts.isVariableDeclarationList(node.initializer) || node.initializer.declarations.length !== 1 || !ts.isIdentifier(node.initializer.declarations[0].name) || !ts.isIdentifier(unwrapTypescriptExpression(node.expression))) continue;
48960
+ if (!_react_doctor_require_typescript_default.isForOfStatement(node) || !_react_doctor_require_typescript_default.isVariableDeclarationList(node.initializer) || node.initializer.declarations.length !== 1 || !_react_doctor_require_typescript_default.isIdentifier(node.initializer.declarations[0].name) || !_react_doctor_require_typescript_default.isIdentifier(unwrapTypescriptExpression(node.expression))) continue;
48978
48961
  const styleVariableName = node.initializer.declarations[0].name.text;
48979
48962
  const styleCollectionExpression = unwrapTypescriptExpression(node.expression);
48980
- if (!ts.isIdentifier(styleCollectionExpression)) continue;
48963
+ if (!_react_doctor_require_typescript_default.isIdentifier(styleCollectionExpression)) continue;
48981
48964
  const stylesImport = analysis.importedFunctions.get(styleCollectionExpression.text);
48982
48965
  const stylesAnalysis = stylesImport ? analyses.get(stylesImport.analysisKey) : void 0;
48983
48966
  if (!stylesAnalysis) continue;
48984
48967
  let registryAnalysis;
48985
48968
  const visitStyleLoop = (loopNode) => {
48986
- if (registryAnalysis || !ts.isForOfStatement(loopNode)) {
48987
- if (!registryAnalysis) ts.forEachChild(loopNode, visitStyleLoop);
48969
+ if (registryAnalysis || !_react_doctor_require_typescript_default.isForOfStatement(loopNode)) {
48970
+ if (!registryAnalysis) _react_doctor_require_typescript_default.forEachChild(loopNode, visitStyleLoop);
48988
48971
  return;
48989
48972
  }
48990
- if (!ts.isVariableDeclarationList(loopNode.initializer) || loopNode.initializer.declarations.length !== 1 || !ts.isIdentifier(loopNode.initializer.declarations[0].name) || !ts.isIdentifier(unwrapTypescriptExpression(loopNode.expression))) {
48991
- ts.forEachChild(loopNode, visitStyleLoop);
48973
+ if (!_react_doctor_require_typescript_default.isVariableDeclarationList(loopNode.initializer) || loopNode.initializer.declarations.length !== 1 || !_react_doctor_require_typescript_default.isIdentifier(loopNode.initializer.declarations[0].name) || !_react_doctor_require_typescript_default.isIdentifier(unwrapTypescriptExpression(loopNode.expression))) {
48974
+ _react_doctor_require_typescript_default.forEachChild(loopNode, visitStyleLoop);
48992
48975
  return;
48993
48976
  }
48994
48977
  const registryItemName = loopNode.initializer.declarations[0].name.text;
48995
48978
  const registryCollectionExpression = unwrapTypescriptExpression(loopNode.expression);
48996
- if (!ts.isIdentifier(registryCollectionExpression)) return;
48979
+ if (!_react_doctor_require_typescript_default.isIdentifier(registryCollectionExpression)) return;
48997
48980
  const normalizedLoopBodyText = loopNode.statement.getText(analysis.sourceFile).replace(/\s/g, "");
48998
48981
  if (!normalizedLoopBodyText.includes(`src/registry/\${${styleVariableName}.name}/`) || !normalizedLoopBodyText.includes(`${registryItemName}.files`) || !/\$\{[A-Za-z_$][\w$]*\.path\}/.test(normalizedLoopBodyText)) {
48999
- ts.forEachChild(loopNode, visitStyleLoop);
48982
+ _react_doctor_require_typescript_default.forEachChild(loopNode, visitStyleLoop);
49000
48983
  return;
49001
48984
  }
49002
48985
  const registryImport = analysis.importedFunctions.get(registryCollectionExpression.text);
@@ -49013,10 +48996,10 @@ const collectRegistryFileReferences = (registryAnalysis, analyses) => {
49013
48996
  const registryFileReferences = /* @__PURE__ */ new Set();
49014
48997
  const collectRegistryModule = (moduleAnalysis) => {
49015
48998
  const visitNode = (node) => {
49016
- if (ts.isPropertyAssignment(node)) {
49017
- if ((ts.isIdentifier(node.name) || ts.isStringLiteralLike(node.name) ? node.name.text : void 0) === "files") collectObjectPathReferences(node.initializer, registryFileReferences);
48999
+ if (_react_doctor_require_typescript_default.isPropertyAssignment(node)) {
49000
+ if ((_react_doctor_require_typescript_default.isIdentifier(node.name) || _react_doctor_require_typescript_default.isStringLiteralLike(node.name) ? node.name.text : void 0) === "files") collectObjectPathReferences(node.initializer, registryFileReferences);
49018
49001
  }
49019
- ts.forEachChild(node, visitNode);
49002
+ _react_doctor_require_typescript_default.forEachChild(node, visitNode);
49020
49003
  };
49021
49004
  visitNode(moduleAnalysis.sourceFile);
49022
49005
  };
@@ -49030,11 +49013,11 @@ const collectRegistryFileReferences = (registryAnalysis, analyses) => {
49030
49013
  const collectRegistryStyleNames = (stylesAnalysis) => {
49031
49014
  const styleNames = /* @__PURE__ */ new Set();
49032
49015
  const visitNode = (node) => {
49033
- if (ts.isPropertyAssignment(node) && (ts.isIdentifier(node.name) || ts.isStringLiteralLike(node.name)) && node.name.text === "name") {
49016
+ if (_react_doctor_require_typescript_default.isPropertyAssignment(node) && (_react_doctor_require_typescript_default.isIdentifier(node.name) || _react_doctor_require_typescript_default.isStringLiteralLike(node.name)) && node.name.text === "name") {
49034
49017
  const styleNameExpression = unwrapTypescriptExpression(node.initializer);
49035
- if (ts.isStringLiteralLike(styleNameExpression)) styleNames.add(styleNameExpression.text);
49018
+ if (_react_doctor_require_typescript_default.isStringLiteralLike(styleNameExpression)) styleNames.add(styleNameExpression.text);
49036
49019
  }
49037
- ts.forEachChild(node, visitNode);
49020
+ _react_doctor_require_typescript_default.forEachChild(node, visitNode);
49038
49021
  };
49039
49022
  visitNode(stylesAnalysis.sourceFile);
49040
49023
  return styleNames;
@@ -49048,7 +49031,7 @@ const collectResolvedRegistryFiles = (registryFileReferences, styleNames, regist
49048
49031
  const collectRegistryMetadataConsumedFiles = (analyses, projectRoot, consumedFiles) => {
49049
49032
  for (const analysis of analyses.values()) {
49050
49033
  if (!basename(analysis.scriptFile.filePath).includes("registry")) continue;
49051
- if (![...analysis.liveNodes].some((node) => ts.isCallExpression(node) && getPropertyName$1(node.expression)?.match(/^readFile(?:Sync)?$/) && node.arguments[0] !== void 0 && expressionContainsString(node.arguments[0], "src/registry"))) continue;
49034
+ if (![...analysis.liveNodes].some((node) => _react_doctor_require_typescript_default.isCallExpression(node) && getPropertyName$1(node.expression)?.match(/^readFile(?:Sync)?$/) && node.arguments[0] !== void 0 && expressionContainsString(node.arguments[0], "src/registry"))) continue;
49052
49035
  const registryImport = analysis.importedFunctions.get("registry");
49053
49036
  const stylesImport = analysis.importedFunctions.get("styles");
49054
49037
  const registryAnalysis = registryImport ? analyses.get(registryImport.analysisKey) : void 0;
@@ -49069,7 +49052,7 @@ const nodeContainsNode = (rootNode, targetNode) => {
49069
49052
  containsNode = true;
49070
49053
  return;
49071
49054
  }
49072
- if (!containsNode) ts.forEachChild(node, visitNode);
49055
+ if (!containsNode) _react_doctor_require_typescript_default.forEachChild(node, visitNode);
49073
49056
  };
49074
49057
  visitNode(rootNode);
49075
49058
  return containsNode;
@@ -49078,11 +49061,11 @@ const findAssignedVariableName = (analysis, targetNode) => {
49078
49061
  let variableName;
49079
49062
  let smallestInitializerWidth = Number.POSITIVE_INFINITY;
49080
49063
  const visitNode = (node) => {
49081
- if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name) && node.initializer && nodeContainsNode(node.initializer, targetNode) && node.initializer.end - node.initializer.pos < smallestInitializerWidth) {
49064
+ if (_react_doctor_require_typescript_default.isVariableDeclaration(node) && _react_doctor_require_typescript_default.isIdentifier(node.name) && node.initializer && nodeContainsNode(node.initializer, targetNode) && node.initializer.end - node.initializer.pos < smallestInitializerWidth) {
49082
49065
  variableName = node.name.text;
49083
49066
  smallestInitializerWidth = node.initializer.end - node.initializer.pos;
49084
49067
  }
49085
- ts.forEachChild(node, visitNode);
49068
+ _react_doctor_require_typescript_default.forEachChild(node, visitNode);
49086
49069
  };
49087
49070
  visitNode(analysis.sourceFile);
49088
49071
  return variableName;
@@ -49090,29 +49073,29 @@ const findAssignedVariableName = (analysis, targetNode) => {
49090
49073
  const recursivelyReadsManifestWildcards = (analysis, readCall) => {
49091
49074
  const registryVariableName = findAssignedVariableName(analysis, readCall);
49092
49075
  if (!registryVariableName) return false;
49093
- const hasDirectRecursiveRead = [...analysis.liveNodes].some((node) => ts.isCallExpression(node) && ts.isIdentifier(unwrapTypescriptExpression(node.expression)) && unwrapTypescriptExpression(node.expression).getText() === "walk" && node.arguments.length >= 1 && ts.isIdentifier(unwrapTypescriptExpression(node.arguments[0])) && unwrapTypescriptExpression(node.arguments[0]).getText() === "sourceBase");
49076
+ const hasDirectRecursiveRead = [...analysis.liveNodes].some((node) => _react_doctor_require_typescript_default.isCallExpression(node) && _react_doctor_require_typescript_default.isIdentifier(unwrapTypescriptExpression(node.expression)) && unwrapTypescriptExpression(node.expression).getText() === "walk" && node.arguments.length >= 1 && _react_doctor_require_typescript_default.isIdentifier(unwrapTypescriptExpression(node.arguments[0])) && unwrapTypescriptExpression(node.arguments[0]).getText() === "sourceBase");
49094
49077
  const sourceBaseDeclaration = findVariableDeclaration(analysis.sourceFile, "sourceBase", analysis.sourceFile.end);
49095
49078
  if (hasDirectRecursiveRead && sourceBaseDeclaration?.initializer && sourceBaseDeclaration.initializer.getText(analysis.sourceFile).includes(registryVariableName) && sourceBaseDeclaration.initializer.getText(analysis.sourceFile).includes("split")) return true;
49096
49079
  const collectionNames = new Set([registryVariableName]);
49097
- for (const node of analysis.liveNodes) if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name) && node.initializer && ts.isPropertyAccessExpression(unwrapTypescriptExpression(node.initializer))) {
49080
+ for (const node of analysis.liveNodes) if (_react_doctor_require_typescript_default.isVariableDeclaration(node) && _react_doctor_require_typescript_default.isIdentifier(node.name) && node.initializer && _react_doctor_require_typescript_default.isPropertyAccessExpression(unwrapTypescriptExpression(node.initializer))) {
49098
49081
  const propertyAccess = unwrapTypescriptExpression(node.initializer);
49099
- if (ts.isPropertyAccessExpression(propertyAccess) && ts.isIdentifier(propertyAccess.expression) && collectionNames.has(propertyAccess.expression.text)) collectionNames.add(node.name.text);
49082
+ if (_react_doctor_require_typescript_default.isPropertyAccessExpression(propertyAccess) && _react_doctor_require_typescript_default.isIdentifier(propertyAccess.expression) && collectionNames.has(propertyAccess.expression.text)) collectionNames.add(node.name.text);
49100
49083
  }
49101
49084
  for (const node of analysis.liveNodes) {
49102
- if (!ts.isForOfStatement(node) || !ts.isVariableDeclarationList(node.initializer) || node.initializer.declarations.length !== 1 || !ts.isIdentifier(node.initializer.declarations[0].name) || !ts.isIdentifier(unwrapTypescriptExpression(node.expression))) continue;
49085
+ if (!_react_doctor_require_typescript_default.isForOfStatement(node) || !_react_doctor_require_typescript_default.isVariableDeclarationList(node.initializer) || node.initializer.declarations.length !== 1 || !_react_doctor_require_typescript_default.isIdentifier(node.initializer.declarations[0].name) || !_react_doctor_require_typescript_default.isIdentifier(unwrapTypescriptExpression(node.expression))) continue;
49103
49086
  const collectionExpression = unwrapTypescriptExpression(node.expression);
49104
- if (!ts.isIdentifier(collectionExpression) || !collectionNames.has(collectionExpression.text)) continue;
49087
+ if (!_react_doctor_require_typescript_default.isIdentifier(collectionExpression) || !collectionNames.has(collectionExpression.text)) continue;
49105
49088
  const componentName = node.initializer.declarations[0].name.text;
49106
49089
  let hasRecursiveFileLoop = false;
49107
49090
  const visitOuterLoop = (outerNode) => {
49108
- if (ts.isForOfStatement(outerNode) && ts.isPropertyAccessExpression(unwrapTypescriptExpression(outerNode.expression))) {
49091
+ if (_react_doctor_require_typescript_default.isForOfStatement(outerNode) && _react_doctor_require_typescript_default.isPropertyAccessExpression(unwrapTypescriptExpression(outerNode.expression))) {
49109
49092
  const filesExpression = unwrapTypescriptExpression(outerNode.expression);
49110
- if (ts.isPropertyAccessExpression(filesExpression) && ts.isIdentifier(filesExpression.expression) && filesExpression.expression.text === componentName && filesExpression.name.text === "files") {
49093
+ if (_react_doctor_require_typescript_default.isPropertyAccessExpression(filesExpression) && _react_doctor_require_typescript_default.isIdentifier(filesExpression.expression) && filesExpression.expression.text === componentName && filesExpression.name.text === "files") {
49111
49094
  const innerLoopText = outerNode.statement.getText(analysis.sourceFile);
49112
49095
  if (/\.includes\(\s*["']\*["']\s*\)/.test(innerLoopText) && /\.split\(\s*["']\*["']\s*\)/.test(innerLoopText) && /\bwalk\s*\(\s*sourceBase\s*,\s*sourceBase\s*\)/.test(innerLoopText)) hasRecursiveFileLoop = true;
49113
49096
  }
49114
49097
  }
49115
- if (!hasRecursiveFileLoop) ts.forEachChild(outerNode, visitOuterLoop);
49098
+ if (!hasRecursiveFileLoop) _react_doctor_require_typescript_default.forEachChild(outerNode, visitOuterLoop);
49116
49099
  };
49117
49100
  visitOuterLoop(node.statement);
49118
49101
  if (hasRecursiveFileLoop) return true;
@@ -49121,7 +49104,7 @@ const recursivelyReadsManifestWildcards = (analysis, readCall) => {
49121
49104
  };
49122
49105
  const collectReferencedManifestFiles = (analysis, projectRoot, consumedFiles) => {
49123
49106
  for (const node of analysis.liveNodes) {
49124
- if (!ts.isCallExpression(node) || !getPropertyName$1(node.expression)?.match(/^readFile(?:Sync)?$/) || !node.arguments[0]) continue;
49107
+ if (!_react_doctor_require_typescript_default.isCallExpression(node) || !getPropertyName$1(node.expression)?.match(/^readFile(?:Sync)?$/) || !node.arguments[0]) continue;
49125
49108
  const manifestPath = evaluatePathExpression(node.arguments[0], analysis, projectRoot);
49126
49109
  if (!manifestPath || basename(manifestPath) !== "registry.json") continue;
49127
49110
  if (!isPathInsideDirectoryOrEqual(manifestPath, projectRoot)) continue;
@@ -49312,46 +49295,46 @@ const collectParcelHtmlEntryPaths = (rootDirectory) => {
49312
49295
  } catch {
49313
49296
  continue;
49314
49297
  }
49315
- const sourceFile = ts.createSourceFile(scriptPath, sourceText, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
49298
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile(scriptPath, sourceText, _react_doctor_require_typescript_default.ScriptTarget.Latest, true, _react_doctor_require_typescript_default.ScriptKind.TS);
49316
49299
  const parcelConstructorNames = /* @__PURE__ */ new Set();
49317
49300
  const variableInitializers = /* @__PURE__ */ new Map();
49318
49301
  for (const statement of sourceFile.statements) {
49319
- if (ts.isImportDeclaration(statement) && ts.isStringLiteralLike(statement.moduleSpecifier) && statement.moduleSpecifier.text === "parcel-bundler") {
49302
+ if (_react_doctor_require_typescript_default.isImportDeclaration(statement) && _react_doctor_require_typescript_default.isStringLiteralLike(statement.moduleSpecifier) && statement.moduleSpecifier.text === "parcel-bundler") {
49320
49303
  const importClause = statement.importClause;
49321
49304
  if (importClause?.name) parcelConstructorNames.add(importClause.name.text);
49322
49305
  }
49323
- if (!ts.isVariableStatement(statement)) continue;
49306
+ if (!_react_doctor_require_typescript_default.isVariableStatement(statement)) continue;
49324
49307
  for (const declaration of statement.declarationList.declarations) {
49325
- if (!ts.isIdentifier(declaration.name) || !declaration.initializer) continue;
49308
+ if (!_react_doctor_require_typescript_default.isIdentifier(declaration.name) || !declaration.initializer) continue;
49326
49309
  variableInitializers.set(declaration.name.text, declaration.initializer);
49327
- if (ts.isCallExpression(declaration.initializer) && ts.isIdentifier(declaration.initializer.expression) && declaration.initializer.expression.text === "require" && declaration.initializer.arguments.length === 1 && ts.isStringLiteralLike(declaration.initializer.arguments[0]) && declaration.initializer.arguments[0].text === "parcel-bundler") parcelConstructorNames.add(declaration.name.text);
49310
+ if (_react_doctor_require_typescript_default.isCallExpression(declaration.initializer) && _react_doctor_require_typescript_default.isIdentifier(declaration.initializer.expression) && declaration.initializer.expression.text === "require" && declaration.initializer.arguments.length === 1 && _react_doctor_require_typescript_default.isStringLiteralLike(declaration.initializer.arguments[0]) && declaration.initializer.arguments[0].text === "parcel-bundler") parcelConstructorNames.add(declaration.name.text);
49328
49311
  }
49329
49312
  }
49330
49313
  if (parcelConstructorNames.size === 0) continue;
49331
49314
  const evaluateEntryExpression = (expression, visitedIdentifiers = /* @__PURE__ */ new Set()) => {
49332
- if (ts.isStringLiteralLike(expression)) return [expression.text];
49333
- if (ts.isArrayLiteralExpression(expression)) return expression.elements.flatMap((element) => ts.isExpression(element) ? evaluateEntryExpression(element, visitedIdentifiers) : []);
49334
- if (ts.isIdentifier(expression)) {
49315
+ if (_react_doctor_require_typescript_default.isStringLiteralLike(expression)) return [expression.text];
49316
+ if (_react_doctor_require_typescript_default.isArrayLiteralExpression(expression)) return expression.elements.flatMap((element) => _react_doctor_require_typescript_default.isExpression(element) ? evaluateEntryExpression(element, visitedIdentifiers) : []);
49317
+ if (_react_doctor_require_typescript_default.isIdentifier(expression)) {
49335
49318
  if (visitedIdentifiers.has(expression.text)) return [];
49336
49319
  const initializer = variableInitializers.get(expression.text);
49337
49320
  if (!initializer) return [];
49338
49321
  return evaluateEntryExpression(initializer, new Set(visitedIdentifiers).add(expression.text));
49339
49322
  }
49340
- if (ts.isCallExpression(expression) && ts.isPropertyAccessExpression(expression.expression) && (expression.expression.name.text === "join" || expression.expression.name.text === "resolve") && expression.arguments.length > 1 && ts.isIdentifier(expression.arguments[0]) && expression.arguments[0].text === "__dirname" && expression.arguments.slice(1).every(ts.isStringLiteralLike)) {
49341
- const pathSegments = expression.arguments.slice(1).flatMap((argument) => ts.isStringLiteralLike(argument) ? [argument.text] : []);
49323
+ if (_react_doctor_require_typescript_default.isCallExpression(expression) && _react_doctor_require_typescript_default.isPropertyAccessExpression(expression.expression) && (expression.expression.name.text === "join" || expression.expression.name.text === "resolve") && expression.arguments.length > 1 && _react_doctor_require_typescript_default.isIdentifier(expression.arguments[0]) && expression.arguments[0].text === "__dirname" && expression.arguments.slice(1).every(_react_doctor_require_typescript_default.isStringLiteralLike)) {
49324
+ const pathSegments = expression.arguments.slice(1).flatMap((argument) => _react_doctor_require_typescript_default.isStringLiteralLike(argument) ? [argument.text] : []);
49342
49325
  return [resolve(dirname(scriptPath), ...pathSegments)];
49343
49326
  }
49344
49327
  return [];
49345
49328
  };
49346
49329
  const visitNode = (node) => {
49347
- if (ts.isNewExpression(node) && ts.isIdentifier(node.expression) && parcelConstructorNames.has(node.expression.text) && node.arguments?.[0]) for (const entrySpecifier of evaluateEntryExpression(node.arguments[0])) {
49330
+ if (_react_doctor_require_typescript_default.isNewExpression(node) && _react_doctor_require_typescript_default.isIdentifier(node.expression) && parcelConstructorNames.has(node.expression.text) && node.arguments?.[0]) for (const entrySpecifier of evaluateEntryExpression(node.arguments[0])) {
49348
49331
  const entryPattern = isAbsolute(entrySpecifier) ? entrySpecifier : resolve(dirname(scriptPath), entrySpecifier);
49349
49332
  for (const htmlEntryPath of import_out.default.sync(entryPattern.replaceAll("\\", "/"), {
49350
49333
  absolute: true,
49351
49334
  onlyFiles: true
49352
49335
  })) if (/\.html?$/i.test(htmlEntryPath)) htmlEntryPaths.add(htmlEntryPath);
49353
49336
  }
49354
- ts.forEachChild(node, visitNode);
49337
+ _react_doctor_require_typescript_default.forEachChild(node, visitNode);
49355
49338
  };
49356
49339
  visitNode(sourceFile);
49357
49340
  }
@@ -49397,22 +49380,22 @@ const isConsumedStringLiteral = (node) => {
49397
49380
  let currentNode = node;
49398
49381
  while (currentNode.parent) {
49399
49382
  const parentNode = currentNode.parent;
49400
- if (ts.isCallExpression(parentNode) || ts.isNewExpression(parentNode) || ts.isPropertyAssignment(parentNode) || ts.isExportAssignment(parentNode) || ts.isReturnStatement(parentNode)) return true;
49401
- if (ts.isVariableDeclaration(parentNode) || ts.isExpressionStatement(parentNode) || ts.isSourceFile(parentNode)) return false;
49383
+ if (_react_doctor_require_typescript_default.isCallExpression(parentNode) || _react_doctor_require_typescript_default.isNewExpression(parentNode) || _react_doctor_require_typescript_default.isPropertyAssignment(parentNode) || _react_doctor_require_typescript_default.isExportAssignment(parentNode) || _react_doctor_require_typescript_default.isReturnStatement(parentNode)) return true;
49384
+ if (_react_doctor_require_typescript_default.isVariableDeclaration(parentNode) || _react_doctor_require_typescript_default.isExpressionStatement(parentNode) || _react_doctor_require_typescript_default.isSourceFile(parentNode)) return false;
49402
49385
  currentNode = parentNode;
49403
49386
  }
49404
49387
  return false;
49405
49388
  };
49406
49389
  const matchesExecutableNodeModulesPackageReference = (content, packageName) => {
49407
- const sourceFile = ts.createSourceFile("node-modules-reference.ts", content, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
49390
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile("node-modules-reference.ts", content, _react_doctor_require_typescript_default.ScriptTarget.Latest, true, _react_doctor_require_typescript_default.ScriptKind.TS);
49408
49391
  let isMatched = false;
49409
49392
  const visit = (node) => {
49410
49393
  if (isMatched) return;
49411
- if (ts.isStringLiteralLike(node) && isConsumedStringLiteral(node) && matchesNodeModulesPackageReference(node.text, packageName)) {
49394
+ if (_react_doctor_require_typescript_default.isStringLiteralLike(node) && isConsumedStringLiteral(node) && matchesNodeModulesPackageReference(node.text, packageName)) {
49412
49395
  isMatched = true;
49413
49396
  return;
49414
49397
  }
49415
- ts.forEachChild(node, visit);
49398
+ _react_doctor_require_typescript_default.forEachChild(node, visit);
49416
49399
  };
49417
49400
  visit(sourceFile);
49418
49401
  return isMatched;
@@ -49472,14 +49455,14 @@ const collectTwoslashPackageNames = (sourceText) => {
49472
49455
  const packageNames = /* @__PURE__ */ new Set();
49473
49456
  for (const source of sources) try {
49474
49457
  for (const packageName of collectStaticModulePackageNames(source)) packageNames.add(packageName);
49475
- const sourceFile = ts.createSourceFile("twoslash-source.js", source, ts.ScriptTarget.Latest, true, ts.ScriptKind.JS);
49458
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile("twoslash-source.js", source, _react_doctor_require_typescript_default.ScriptTarget.Latest, true, _react_doctor_require_typescript_default.ScriptKind.JS);
49476
49459
  const visitNode = (node) => {
49477
- for (const tag of ts.getJSDocTags(node)) {
49478
- if (!ts.isJSDocImportTag(tag) || !ts.isStringLiteralLike(tag.moduleSpecifier)) continue;
49460
+ for (const tag of _react_doctor_require_typescript_default.getJSDocTags(node)) {
49461
+ if (!_react_doctor_require_typescript_default.isJSDocImportTag(tag) || !_react_doctor_require_typescript_default.isStringLiteralLike(tag.moduleSpecifier)) continue;
49479
49462
  const packageName = extractPackageName(tag.moduleSpecifier.text);
49480
49463
  if (packageName) packageNames.add(packageName);
49481
49464
  }
49482
- ts.forEachChild(node, visitNode);
49465
+ _react_doctor_require_typescript_default.forEachChild(node, visitNode);
49483
49466
  };
49484
49467
  visitNode(sourceFile);
49485
49468
  } catch {
@@ -49533,27 +49516,27 @@ const KARMA_BROWSER_PACKAGES = new Map([
49533
49516
  ["Safari", ["karma-safari-launcher"]]
49534
49517
  ]);
49535
49518
  const collectExpressionStrings = (expression, identifierStrings, strings) => {
49536
- if (ts.isStringLiteralLike(expression)) {
49519
+ if (_react_doctor_require_typescript_default.isStringLiteralLike(expression)) {
49537
49520
  strings.add(expression.text);
49538
49521
  return;
49539
49522
  }
49540
- if (ts.isIdentifier(expression)) {
49523
+ if (_react_doctor_require_typescript_default.isIdentifier(expression)) {
49541
49524
  for (const value of identifierStrings.get(expression.text) ?? []) strings.add(value);
49542
49525
  return;
49543
49526
  }
49544
- if (ts.isArrayLiteralExpression(expression)) {
49545
- for (const element of expression.elements) if (ts.isSpreadElement(element)) collectExpressionStrings(element.expression, identifierStrings, strings);
49527
+ if (_react_doctor_require_typescript_default.isArrayLiteralExpression(expression)) {
49528
+ for (const element of expression.elements) if (_react_doctor_require_typescript_default.isSpreadElement(element)) collectExpressionStrings(element.expression, identifierStrings, strings);
49546
49529
  else collectExpressionStrings(element, identifierStrings, strings);
49547
49530
  return;
49548
49531
  }
49549
- if (ts.isConditionalExpression(expression)) {
49532
+ if (_react_doctor_require_typescript_default.isConditionalExpression(expression)) {
49550
49533
  collectExpressionStrings(expression.whenTrue, identifierStrings, strings);
49551
49534
  collectExpressionStrings(expression.whenFalse, identifierStrings, strings);
49552
49535
  return;
49553
49536
  }
49554
- if (ts.isObjectLiteralExpression(expression)) {
49555
- for (const property of expression.properties) if (ts.isPropertyAssignment(property)) collectExpressionStrings(property.initializer, identifierStrings, strings);
49556
- else if (ts.isShorthandPropertyAssignment(property)) for (const value of identifierStrings.get(property.name.text) ?? []) strings.add(value);
49537
+ if (_react_doctor_require_typescript_default.isObjectLiteralExpression(expression)) {
49538
+ for (const property of expression.properties) if (_react_doctor_require_typescript_default.isPropertyAssignment(property)) collectExpressionStrings(property.initializer, identifierStrings, strings);
49539
+ else if (_react_doctor_require_typescript_default.isShorthandPropertyAssignment(property)) for (const value of identifierStrings.get(property.name.text) ?? []) strings.add(value);
49557
49540
  }
49558
49541
  };
49559
49542
  const collectIdentifierStrings = (sourceFile) => {
@@ -49564,21 +49547,21 @@ const collectIdentifierStrings = (sourceFile) => {
49564
49547
  identifierStrings.set(identifierName, strings);
49565
49548
  };
49566
49549
  const visit = (node) => {
49567
- if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name) && node.initializer) addExpression(node.name.text, node.initializer);
49568
- if (ts.isBinaryExpression(node) && node.operatorToken.kind === ts.SyntaxKind.EqualsToken && ts.isIdentifier(node.left)) addExpression(node.left.text, node.right);
49569
- ts.forEachChild(node, visit);
49550
+ if (_react_doctor_require_typescript_default.isVariableDeclaration(node) && _react_doctor_require_typescript_default.isIdentifier(node.name) && node.initializer) addExpression(node.name.text, node.initializer);
49551
+ if (_react_doctor_require_typescript_default.isBinaryExpression(node) && node.operatorToken.kind === _react_doctor_require_typescript_default.SyntaxKind.EqualsToken && _react_doctor_require_typescript_default.isIdentifier(node.left)) addExpression(node.left.text, node.right);
49552
+ _react_doctor_require_typescript_default.forEachChild(node, visit);
49570
49553
  };
49571
49554
  visit(sourceFile);
49572
49555
  return identifierStrings;
49573
49556
  };
49574
49557
  const collectPropertyStrings = (property, identifierStrings) => {
49575
49558
  const strings = /* @__PURE__ */ new Set();
49576
- if (ts.isPropertyAssignment(property)) collectExpressionStrings(property.initializer, identifierStrings, strings);
49577
- else if (ts.isShorthandPropertyAssignment(property)) for (const value of identifierStrings.get(property.name.text) ?? []) strings.add(value);
49559
+ if (_react_doctor_require_typescript_default.isPropertyAssignment(property)) collectExpressionStrings(property.initializer, identifierStrings, strings);
49560
+ else if (_react_doctor_require_typescript_default.isShorthandPropertyAssignment(property)) for (const value of identifierStrings.get(property.name.text) ?? []) strings.add(value);
49578
49561
  return strings;
49579
49562
  };
49580
49563
  const extractKarmaConfigPackageReferences = (content, declaredPackageNames) => {
49581
- const sourceFile = ts.createSourceFile("karma.config.ts", content, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
49564
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile("karma.config.ts", content, _react_doctor_require_typescript_default.ScriptTarget.Latest, true, _react_doctor_require_typescript_default.ScriptKind.TS);
49582
49565
  const identifierStrings = collectIdentifierStrings(sourceFile);
49583
49566
  const referencedPackages = /* @__PURE__ */ new Set();
49584
49567
  const propertyPackageMaps = new Map([
@@ -49588,12 +49571,12 @@ const extractKarmaConfigPackageReferences = (content, declaredPackageNames) => {
49588
49571
  ["browsers", KARMA_BROWSER_PACKAGES]
49589
49572
  ]);
49590
49573
  const visit = (node) => {
49591
- if (ts.isObjectLiteralExpression(node)) for (const property of node.properties) {
49574
+ if (_react_doctor_require_typescript_default.isObjectLiteralExpression(node)) for (const property of node.properties) {
49592
49575
  const packageMap = propertyPackageMaps.get(getObjectLiteralElementName(property) ?? "");
49593
49576
  if (!packageMap) continue;
49594
49577
  for (const token of collectPropertyStrings(property, identifierStrings)) for (const packageName of packageMap.get(token) ?? []) if (declaredPackageNames.has(packageName)) referencedPackages.add(packageName);
49595
49578
  }
49596
- ts.forEachChild(node, visit);
49579
+ _react_doctor_require_typescript_default.forEachChild(node, visit);
49597
49580
  };
49598
49581
  visit(sourceFile);
49599
49582
  return [...referencedPackages];
@@ -49610,23 +49593,23 @@ const hasExpoReactServerFunctions = (rootDirectory) => {
49610
49593
  //#endregion
49611
49594
  //#region ../core/src/project-analysis/utils/has-antfu-eslint-react-config.ts
49612
49595
  const hasReactEnabled = (expression) => {
49613
- if (!ts.isObjectLiteralExpression(expression)) return false;
49614
- return expression.properties.some((property) => ts.isPropertyAssignment(property) && (ts.isIdentifier(property.name) && property.name.text === "react" || ts.isStringLiteralLike(property.name) && property.name.text === "react") && (property.initializer.kind === ts.SyntaxKind.TrueKeyword || ts.isObjectLiteralExpression(property.initializer)));
49596
+ if (!_react_doctor_require_typescript_default.isObjectLiteralExpression(expression)) return false;
49597
+ return expression.properties.some((property) => _react_doctor_require_typescript_default.isPropertyAssignment(property) && (_react_doctor_require_typescript_default.isIdentifier(property.name) && property.name.text === "react" || _react_doctor_require_typescript_default.isStringLiteralLike(property.name) && property.name.text === "react") && (property.initializer.kind === _react_doctor_require_typescript_default.SyntaxKind.TrueKeyword || _react_doctor_require_typescript_default.isObjectLiteralExpression(property.initializer)));
49615
49598
  };
49616
49599
  const hasAntfuEslintReactConfig = (content) => {
49617
49600
  const virtualFilePath = "eslint.config.ts";
49618
- const sourceFile = ts.createSourceFile(virtualFilePath, content, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
49601
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile(virtualFilePath, content, _react_doctor_require_typescript_default.ScriptTarget.Latest, true, _react_doctor_require_typescript_default.ScriptKind.TS);
49619
49602
  const compilerOptions = {
49620
49603
  allowJs: true,
49621
49604
  noLib: true,
49622
49605
  noResolve: true,
49623
- target: ts.ScriptTarget.Latest
49606
+ target: _react_doctor_require_typescript_default.ScriptTarget.Latest
49624
49607
  };
49625
- const compilerHost = ts.createCompilerHost(compilerOptions);
49608
+ const compilerHost = _react_doctor_require_typescript_default.createCompilerHost(compilerOptions);
49626
49609
  compilerHost.fileExists = (candidatePath) => candidatePath === virtualFilePath;
49627
49610
  compilerHost.getSourceFile = (candidatePath) => candidatePath === virtualFilePath ? sourceFile : void 0;
49628
49611
  compilerHost.readFile = (candidatePath) => candidatePath === virtualFilePath ? content : void 0;
49629
- const program = ts.createProgram({
49612
+ const program = _react_doctor_require_typescript_default.createProgram({
49630
49613
  rootNames: [virtualFilePath],
49631
49614
  options: compilerOptions,
49632
49615
  host: compilerHost
@@ -49636,24 +49619,24 @@ const hasAntfuEslintReactConfig = (content) => {
49636
49619
  const typeChecker = program.getTypeChecker();
49637
49620
  const antfuFactorySymbols = /* @__PURE__ */ new Set();
49638
49621
  for (const statement of boundSourceFile.statements) {
49639
- if (!ts.isImportDeclaration(statement) || !ts.isStringLiteralLike(statement.moduleSpecifier) || statement.moduleSpecifier.text !== "@antfu/eslint-config" || !statement.importClause?.name) continue;
49622
+ if (!_react_doctor_require_typescript_default.isImportDeclaration(statement) || !_react_doctor_require_typescript_default.isStringLiteralLike(statement.moduleSpecifier) || statement.moduleSpecifier.text !== "@antfu/eslint-config" || !statement.importClause?.name) continue;
49640
49623
  const factorySymbol = typeChecker.getSymbolAtLocation(statement.importClause.name);
49641
49624
  if (factorySymbol) antfuFactorySymbols.add(factorySymbol);
49642
49625
  }
49643
49626
  let isReactEnabled = false;
49644
49627
  const visit = (node) => {
49645
49628
  if (isReactEnabled) return;
49646
- if (ts.isFunctionLike(node)) return;
49647
- if (ts.isCallExpression(node) && node.arguments[0] && hasReactEnabled(node.arguments[0])) {
49629
+ if (_react_doctor_require_typescript_default.isFunctionLike(node)) return;
49630
+ if (_react_doctor_require_typescript_default.isCallExpression(node) && node.arguments[0] && hasReactEnabled(node.arguments[0])) {
49648
49631
  const factorySymbol = typeChecker.getSymbolAtLocation(node.expression);
49649
49632
  if (factorySymbol && antfuFactorySymbols.has(factorySymbol)) {
49650
49633
  isReactEnabled = true;
49651
49634
  return;
49652
49635
  }
49653
49636
  }
49654
- ts.forEachChild(node, visit);
49637
+ _react_doctor_require_typescript_default.forEachChild(node, visit);
49655
49638
  };
49656
- for (const statement of boundSourceFile.statements) if (ts.isExportAssignment(statement)) visit(statement.expression);
49639
+ for (const statement of boundSourceFile.statements) if (_react_doctor_require_typescript_default.isExportAssignment(statement)) visit(statement.expression);
49657
49640
  return isReactEnabled;
49658
49641
  };
49659
49642
  //#endregion
@@ -51106,32 +51089,32 @@ const SUPPORTED_GLOBAL_VALUES = new Set([
51106
51089
  "writeable"
51107
51090
  ]);
51108
51091
  const getStaticProperty = (objectExpression, propertyName) => objectExpression.properties.find((property) => {
51109
- if (ts.isSpreadAssignment(property)) return false;
51110
- const name = ts.isComputedPropertyName(property.name) ? unwrapTypescriptExpression(property.name.expression) : property.name;
51111
- return (ts.isIdentifier(name) || ts.isStringLiteralLike(name)) && name.text === propertyName;
51092
+ if (_react_doctor_require_typescript_default.isSpreadAssignment(property)) return false;
51093
+ const name = _react_doctor_require_typescript_default.isComputedPropertyName(property.name) ? unwrapTypescriptExpression(property.name.expression) : property.name;
51094
+ return (_react_doctor_require_typescript_default.isIdentifier(name) || _react_doctor_require_typescript_default.isStringLiteralLike(name)) && name.text === propertyName;
51112
51095
  }) ?? null;
51113
- const hasNonLiteralComputedProperty = (objectExpression) => objectExpression.properties.some((property) => !ts.isSpreadAssignment(property) && ts.isComputedPropertyName(property.name) && !ts.isStringLiteralLike(unwrapTypescriptExpression(property.name.expression)));
51096
+ const hasNonLiteralComputedProperty = (objectExpression) => objectExpression.properties.some((property) => !_react_doctor_require_typescript_default.isSpreadAssignment(property) && _react_doctor_require_typescript_default.isComputedPropertyName(property.name) && !_react_doctor_require_typescript_default.isStringLiteralLike(unwrapTypescriptExpression(property.name.expression)));
51114
51097
  const getStaticPropertyAssignment = (objectExpression, propertyName) => {
51115
51098
  const property = getStaticProperty(objectExpression, propertyName);
51116
- return property && ts.isPropertyAssignment(property) ? property : null;
51099
+ return property && _react_doctor_require_typescript_default.isPropertyAssignment(property) ? property : null;
51117
51100
  };
51118
51101
  const getRequireModuleSpecifier = (expression) => {
51119
51102
  const unwrappedExpression = unwrapTypescriptExpression(expression);
51120
- if (ts.isPropertyAccessExpression(unwrappedExpression) && unwrappedExpression.name.text === "default") return getRequireModuleSpecifier(unwrappedExpression.expression);
51121
- if (!ts.isCallExpression(unwrappedExpression) || !ts.isIdentifier(unwrappedExpression.expression) || unwrappedExpression.expression.text !== "require" || unwrappedExpression.arguments.length !== 1) return null;
51103
+ if (_react_doctor_require_typescript_default.isPropertyAccessExpression(unwrappedExpression) && unwrappedExpression.name.text === "default") return getRequireModuleSpecifier(unwrappedExpression.expression);
51104
+ if (!_react_doctor_require_typescript_default.isCallExpression(unwrappedExpression) || !_react_doctor_require_typescript_default.isIdentifier(unwrappedExpression.expression) || unwrappedExpression.expression.text !== "require" || unwrappedExpression.arguments.length !== 1) return null;
51122
51105
  const moduleSpecifier = unwrappedExpression.arguments[0];
51123
- return moduleSpecifier && ts.isStringLiteralLike(moduleSpecifier) ? moduleSpecifier.text : null;
51106
+ return moduleSpecifier && _react_doctor_require_typescript_default.isStringLiteralLike(moduleSpecifier) ? moduleSpecifier.text : null;
51124
51107
  };
51125
51108
  const getRequiredPropertyModuleSpecifier = (expression, propertyName) => {
51126
51109
  const unwrappedExpression = unwrapTypescriptExpression(expression);
51127
- return ts.isPropertyAccessExpression(unwrappedExpression) && unwrappedExpression.name.text === propertyName ? getRequireModuleSpecifier(unwrappedExpression.expression) : null;
51110
+ return _react_doctor_require_typescript_default.isPropertyAccessExpression(unwrappedExpression) && unwrappedExpression.name.text === propertyName ? getRequireModuleSpecifier(unwrappedExpression.expression) : null;
51128
51111
  };
51129
- const isCommonJsExportAssignment = (node, sourceFile) => ts.isBinaryExpression(node) && node.operatorToken.kind === ts.SyntaxKind.EqualsToken && (node.left.getText(sourceFile) === "module.exports" || node.left.getText(sourceFile) === "exports.default");
51112
+ const isCommonJsExportAssignment = (node, sourceFile) => _react_doctor_require_typescript_default.isBinaryExpression(node) && node.operatorToken.kind === _react_doctor_require_typescript_default.SyntaxKind.EqualsToken && (node.left.getText(sourceFile) === "module.exports" || node.left.getText(sourceFile) === "exports.default");
51130
51113
  const isTopLevelExpression = (node) => {
51131
51114
  let ancestor = node.parent;
51132
- while (ancestor && !ts.isSourceFile(ancestor)) {
51133
- if (ts.isExpressionStatement(ancestor)) return ts.isSourceFile(ancestor.parent);
51134
- if (!ts.isParenthesizedExpression(ancestor) && !ts.isAsExpression(ancestor) && !ts.isSatisfiesExpression(ancestor) && !ts.isNonNullExpression(ancestor) && !ts.isTypeAssertionExpression(ancestor) && !ts.isAwaitExpression(ancestor)) return false;
51115
+ while (ancestor && !_react_doctor_require_typescript_default.isSourceFile(ancestor)) {
51116
+ if (_react_doctor_require_typescript_default.isExpressionStatement(ancestor)) return _react_doctor_require_typescript_default.isSourceFile(ancestor.parent);
51117
+ if (!_react_doctor_require_typescript_default.isParenthesizedExpression(ancestor) && !_react_doctor_require_typescript_default.isAsExpression(ancestor) && !_react_doctor_require_typescript_default.isSatisfiesExpression(ancestor) && !_react_doctor_require_typescript_default.isNonNullExpression(ancestor) && !_react_doctor_require_typescript_default.isTypeAssertionExpression(ancestor) && !_react_doctor_require_typescript_default.isAwaitExpression(ancestor)) return false;
51135
51118
  ancestor = ancestor.parent;
51136
51119
  }
51137
51120
  return false;
@@ -51139,21 +51122,21 @@ const isTopLevelExpression = (node) => {
51139
51122
  const isInsideActiveConfigProperty = (node, propertyName, sourceFile, esbuildBindings, esbuildNamespaceBindings) => {
51140
51123
  let ancestor = node.parent;
51141
51124
  let didFindConfigProperty = false;
51142
- while (ancestor && !ts.isSourceFile(ancestor)) {
51143
- if (!didFindConfigProperty && !ts.isArrayLiteralExpression(ancestor) && !ts.isParenthesizedExpression(ancestor) && !ts.isAsExpression(ancestor) && !ts.isSatisfiesExpression(ancestor) && !ts.isNonNullExpression(ancestor) && !ts.isTypeAssertionExpression(ancestor) && !ts.isPropertyAssignment(ancestor)) return false;
51144
- if (ts.isPropertyAssignment(ancestor)) {
51145
- const isConfigProperty = (ts.isIdentifier(ancestor.name) || ts.isStringLiteralLike(ancestor.name)) && ancestor.name.text === propertyName;
51125
+ while (ancestor && !_react_doctor_require_typescript_default.isSourceFile(ancestor)) {
51126
+ if (!didFindConfigProperty && !_react_doctor_require_typescript_default.isArrayLiteralExpression(ancestor) && !_react_doctor_require_typescript_default.isParenthesizedExpression(ancestor) && !_react_doctor_require_typescript_default.isAsExpression(ancestor) && !_react_doctor_require_typescript_default.isSatisfiesExpression(ancestor) && !_react_doctor_require_typescript_default.isNonNullExpression(ancestor) && !_react_doctor_require_typescript_default.isTypeAssertionExpression(ancestor) && !_react_doctor_require_typescript_default.isPropertyAssignment(ancestor)) return false;
51127
+ if (_react_doctor_require_typescript_default.isPropertyAssignment(ancestor)) {
51128
+ const isConfigProperty = (_react_doctor_require_typescript_default.isIdentifier(ancestor.name) || _react_doctor_require_typescript_default.isStringLiteralLike(ancestor.name)) && ancestor.name.text === propertyName;
51146
51129
  if (didFindConfigProperty || !isConfigProperty) return false;
51147
- if (!ts.isObjectLiteralExpression(ancestor.parent) || ancestor.parent.properties.some(ts.isSpreadAssignment)) return false;
51130
+ if (!_react_doctor_require_typescript_default.isObjectLiteralExpression(ancestor.parent) || ancestor.parent.properties.some(_react_doctor_require_typescript_default.isSpreadAssignment)) return false;
51148
51131
  didFindConfigProperty = true;
51149
51132
  ancestor = ancestor.parent;
51150
51133
  continue;
51151
51134
  }
51152
51135
  if (didFindConfigProperty) {
51153
- if (ts.isExportAssignment(ancestor)) return true;
51136
+ if (_react_doctor_require_typescript_default.isExportAssignment(ancestor)) return true;
51154
51137
  if (isCommonJsExportAssignment(ancestor, sourceFile)) return isTopLevelExpression(ancestor);
51155
- if (propertyName === "plugins" && ts.isCallExpression(ancestor) && (ts.isIdentifier(ancestor.expression) ? esbuildBindings.has(ancestor.expression.text) : ts.isPropertyAccessExpression(ancestor.expression) && ancestor.expression.name.text === "build" && (ts.isIdentifier(ancestor.expression.expression) && esbuildNamespaceBindings.has(ancestor.expression.expression.text) || getRequireModuleSpecifier(ancestor.expression.expression) === "esbuild"))) return isTopLevelExpression(ancestor);
51156
- if (!(ts.isObjectLiteralExpression(ancestor) || ts.isParenthesizedExpression(ancestor) || ts.isAsExpression(ancestor) || ts.isSatisfiesExpression(ancestor) || ts.isNonNullExpression(ancestor) || ts.isTypeAssertionExpression(ancestor) || ts.isCallExpression(ancestor) && ts.isIdentifier(ancestor.expression) && ancestor.expression.text === "defineConfig")) return false;
51138
+ if (propertyName === "plugins" && _react_doctor_require_typescript_default.isCallExpression(ancestor) && (_react_doctor_require_typescript_default.isIdentifier(ancestor.expression) ? esbuildBindings.has(ancestor.expression.text) : _react_doctor_require_typescript_default.isPropertyAccessExpression(ancestor.expression) && ancestor.expression.name.text === "build" && (_react_doctor_require_typescript_default.isIdentifier(ancestor.expression.expression) && esbuildNamespaceBindings.has(ancestor.expression.expression.text) || getRequireModuleSpecifier(ancestor.expression.expression) === "esbuild"))) return isTopLevelExpression(ancestor);
51139
+ if (!(_react_doctor_require_typescript_default.isObjectLiteralExpression(ancestor) || _react_doctor_require_typescript_default.isParenthesizedExpression(ancestor) || _react_doctor_require_typescript_default.isAsExpression(ancestor) || _react_doctor_require_typescript_default.isSatisfiesExpression(ancestor) || _react_doctor_require_typescript_default.isNonNullExpression(ancestor) || _react_doctor_require_typescript_default.isTypeAssertionExpression(ancestor) || _react_doctor_require_typescript_default.isCallExpression(ancestor) && _react_doctor_require_typescript_default.isIdentifier(ancestor.expression) && ancestor.expression.text === "defineConfig")) return false;
51157
51140
  }
51158
51141
  ancestor = ancestor.parent;
51159
51142
  }
@@ -51163,21 +51146,21 @@ const getGlobalsPathFromActiveAutoImportCall = (callExpression, packageDirectory
51163
51146
  const optionsExpression = callExpression.arguments[0];
51164
51147
  if (!optionsExpression) return null;
51165
51148
  const unwrappedOptions = unwrapTypescriptExpression(optionsExpression);
51166
- if (!ts.isObjectLiteralExpression(unwrappedOptions)) return null;
51167
- if (unwrappedOptions.properties.some(ts.isSpreadAssignment) || hasNonLiteralComputedProperty(unwrappedOptions)) return null;
51149
+ if (!_react_doctor_require_typescript_default.isObjectLiteralExpression(unwrappedOptions)) return null;
51150
+ if (unwrappedOptions.properties.some(_react_doctor_require_typescript_default.isSpreadAssignment) || hasNonLiteralComputedProperty(unwrappedOptions)) return null;
51168
51151
  if (getStaticProperty(unwrappedOptions, "include") || getStaticProperty(unwrappedOptions, "exclude")) return null;
51169
51152
  const eslintrcProperty = getStaticPropertyAssignment(unwrappedOptions, "eslintrc");
51170
51153
  if (!eslintrcProperty) return null;
51171
51154
  const eslintrcExpression = unwrapTypescriptExpression(eslintrcProperty.initializer);
51172
- if (!ts.isObjectLiteralExpression(eslintrcExpression)) return null;
51173
- if (eslintrcExpression.properties.some(ts.isSpreadAssignment) || hasNonLiteralComputedProperty(eslintrcExpression)) return null;
51155
+ if (!_react_doctor_require_typescript_default.isObjectLiteralExpression(eslintrcExpression)) return null;
51156
+ if (eslintrcExpression.properties.some(_react_doctor_require_typescript_default.isSpreadAssignment) || hasNonLiteralComputedProperty(eslintrcExpression)) return null;
51174
51157
  const enabledProperty = getStaticPropertyAssignment(eslintrcExpression, "enabled");
51175
- if (!enabledProperty || unwrapTypescriptExpression(enabledProperty.initializer).kind !== ts.SyntaxKind.TrueKeyword) return null;
51158
+ if (!enabledProperty || unwrapTypescriptExpression(enabledProperty.initializer).kind !== _react_doctor_require_typescript_default.SyntaxKind.TrueKeyword) return null;
51176
51159
  const filepathProperty = getStaticProperty(eslintrcExpression, "filepath");
51177
51160
  if (!filepathProperty) return path$1.join(packageDirectory, DEFAULT_ESLINT_GLOBALS_PATH);
51178
- if (!ts.isPropertyAssignment(filepathProperty)) return null;
51161
+ if (!_react_doctor_require_typescript_default.isPropertyAssignment(filepathProperty)) return null;
51179
51162
  const filepathExpression = unwrapTypescriptExpression(filepathProperty.initializer);
51180
- return ts.isStringLiteralLike(filepathExpression) ? path$1.resolve(packageDirectory, filepathExpression.text) : null;
51163
+ return _react_doctor_require_typescript_default.isStringLiteralLike(filepathExpression) ? path$1.resolve(packageDirectory, filepathExpression.text) : null;
51181
51164
  };
51182
51165
  const collectGlobalsPathsFromConfig = (configPath, packageDirectory) => {
51183
51166
  let sourceText;
@@ -51189,12 +51172,12 @@ const collectGlobalsPathsFromConfig = (configPath, packageDirectory) => {
51189
51172
  globalsPaths: []
51190
51173
  };
51191
51174
  }
51192
- const sourceFile = ts.createSourceFile(configPath, sourceText, ts.ScriptTarget.Latest, true);
51175
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile(configPath, sourceText, _react_doctor_require_typescript_default.ScriptTarget.Latest, true);
51193
51176
  const autoImportBindings = /* @__PURE__ */ new Map();
51194
51177
  const esbuildBindings = /* @__PURE__ */ new Set();
51195
51178
  const esbuildNamespaceBindings = /* @__PURE__ */ new Set();
51196
51179
  for (const statement of sourceFile.statements) {
51197
- if (ts.isImportDeclaration(statement) && ts.isStringLiteralLike(statement.moduleSpecifier)) {
51180
+ if (_react_doctor_require_typescript_default.isImportDeclaration(statement) && _react_doctor_require_typescript_default.isStringLiteralLike(statement.moduleSpecifier)) {
51198
51181
  const moduleSpecifier = statement.moduleSpecifier.text;
51199
51182
  if (AUTO_IMPORT_ADAPTER_PATTERN.test(moduleSpecifier)) {
51200
51183
  const defaultBinding = statement.importClause?.name;
@@ -51204,23 +51187,23 @@ const collectGlobalsPathsFromConfig = (configPath, packageDirectory) => {
51204
51187
  const defaultBinding = statement.importClause?.name;
51205
51188
  if (defaultBinding) esbuildNamespaceBindings.add(defaultBinding.text);
51206
51189
  const namedBindings = statement.importClause?.namedBindings;
51207
- if (namedBindings && ts.isNamedImports(namedBindings)) {
51190
+ if (namedBindings && _react_doctor_require_typescript_default.isNamedImports(namedBindings)) {
51208
51191
  for (const importSpecifier of namedBindings.elements) if ((importSpecifier.propertyName ?? importSpecifier.name).text === "build") esbuildBindings.add(importSpecifier.name.text);
51209
51192
  }
51210
- if (namedBindings && ts.isNamespaceImport(namedBindings)) esbuildNamespaceBindings.add(namedBindings.name.text);
51193
+ if (namedBindings && _react_doctor_require_typescript_default.isNamespaceImport(namedBindings)) esbuildNamespaceBindings.add(namedBindings.name.text);
51211
51194
  }
51212
51195
  }
51213
- if (!ts.isVariableStatement(statement)) continue;
51196
+ if (!_react_doctor_require_typescript_default.isVariableStatement(statement)) continue;
51214
51197
  for (const declaration of statement.declarationList.declarations) {
51215
51198
  if (!declaration.initializer) continue;
51216
- const declarationName = ts.isIdentifier(declaration.name) ? declaration.name.text : null;
51199
+ const declarationName = _react_doctor_require_typescript_default.isIdentifier(declaration.name) ? declaration.name.text : null;
51217
51200
  const moduleSpecifier = getRequireModuleSpecifier(declaration.initializer);
51218
51201
  if (declarationName && moduleSpecifier && AUTO_IMPORT_ADAPTER_PATTERN.test(moduleSpecifier)) autoImportBindings.set(declarationName, moduleSpecifier);
51219
51202
  if (moduleSpecifier === "esbuild") {
51220
51203
  if (declarationName) esbuildNamespaceBindings.add(declarationName);
51221
- if (ts.isObjectBindingPattern(declaration.name)) for (const bindingElement of declaration.name.elements) {
51204
+ if (_react_doctor_require_typescript_default.isObjectBindingPattern(declaration.name)) for (const bindingElement of declaration.name.elements) {
51222
51205
  const importedName = bindingElement.propertyName ?? bindingElement.name;
51223
- if (ts.isIdentifier(importedName) && importedName.text === "build" && ts.isIdentifier(bindingElement.name)) esbuildBindings.add(bindingElement.name.text);
51206
+ if (_react_doctor_require_typescript_default.isIdentifier(importedName) && importedName.text === "build" && _react_doctor_require_typescript_default.isIdentifier(bindingElement.name)) esbuildBindings.add(bindingElement.name.text);
51224
51207
  }
51225
51208
  }
51226
51209
  if (declarationName && getRequiredPropertyModuleSpecifier(declaration.initializer, "build") === "esbuild") esbuildBindings.add(declarationName);
@@ -51230,8 +51213,8 @@ const collectGlobalsPathsFromConfig = (configPath, packageDirectory) => {
51230
51213
  let didFindActiveAutoImport = false;
51231
51214
  let didFindUnsafeActiveAutoImport = false;
51232
51215
  const visit = (node) => {
51233
- if (ts.isCallExpression(node)) {
51234
- const moduleSpecifier = ts.isIdentifier(node.expression) ? autoImportBindings.get(node.expression.text) : getRequireModuleSpecifier(node.expression);
51216
+ if (_react_doctor_require_typescript_default.isCallExpression(node)) {
51217
+ const moduleSpecifier = _react_doctor_require_typescript_default.isIdentifier(node.expression) ? autoImportBindings.get(node.expression.text) : getRequireModuleSpecifier(node.expression);
51235
51218
  if (moduleSpecifier && AUTO_IMPORT_ADAPTER_PATTERN.test(moduleSpecifier)) {
51236
51219
  if (isInsideActiveConfigProperty(node, moduleSpecifier.endsWith("/astro") ? "integrations" : "plugins", sourceFile, esbuildBindings, esbuildNamespaceBindings)) {
51237
51220
  didFindActiveAutoImport = true;
@@ -51241,7 +51224,7 @@ const collectGlobalsPathsFromConfig = (configPath, packageDirectory) => {
51241
51224
  }
51242
51225
  }
51243
51226
  }
51244
- ts.forEachChild(node, visit);
51227
+ _react_doctor_require_typescript_default.forEachChild(node, visit);
51245
51228
  };
51246
51229
  visit(sourceFile);
51247
51230
  return {
@@ -51322,7 +51305,7 @@ const GENERATED_AUTO_IMPORT_MARKER = "Generated by unplugin-auto-import";
51322
51305
  const AUTO_IMPORT_SOURCE_BINDING_PATTERN = /\bconst\s+([A-Za-z_$][\w$]*)\s*:\s*typeof\s+import\(["']([^"']+)["']\)\[["']([^"']+)["']\]/g;
51323
51306
  const isNonReferenceIdentifier = (identifier) => {
51324
51307
  const parent = identifier.parent;
51325
- return (ts.isVariableDeclaration(parent) || ts.isParameter(parent) || ts.isFunctionDeclaration(parent) || ts.isFunctionExpression(parent) || ts.isClassDeclaration(parent) || ts.isClassExpression(parent) || ts.isImportClause(parent) || ts.isImportSpecifier(parent) || ts.isNamespaceImport(parent) || ts.isBindingElement(parent)) && parent.name === identifier || ts.isImportSpecifier(parent) && parent.propertyName === identifier || ts.isBindingElement(parent) && parent.propertyName === identifier || ts.isJsxAttribute(parent) && parent.name === identifier || (ts.isPropertyAccessExpression(parent) || ts.isPropertyAssignment(parent) || ts.isPropertyDeclaration(parent) || ts.isMethodDeclaration(parent) || ts.isMethodSignature(parent) || ts.isPropertySignature(parent)) && parent.name === identifier || ts.isQualifiedName(parent) && parent.right === identifier;
51308
+ return (_react_doctor_require_typescript_default.isVariableDeclaration(parent) || _react_doctor_require_typescript_default.isParameter(parent) || _react_doctor_require_typescript_default.isFunctionDeclaration(parent) || _react_doctor_require_typescript_default.isFunctionExpression(parent) || _react_doctor_require_typescript_default.isClassDeclaration(parent) || _react_doctor_require_typescript_default.isClassExpression(parent) || _react_doctor_require_typescript_default.isImportClause(parent) || _react_doctor_require_typescript_default.isImportSpecifier(parent) || _react_doctor_require_typescript_default.isNamespaceImport(parent) || _react_doctor_require_typescript_default.isBindingElement(parent)) && parent.name === identifier || _react_doctor_require_typescript_default.isImportSpecifier(parent) && parent.propertyName === identifier || _react_doctor_require_typescript_default.isBindingElement(parent) && parent.propertyName === identifier || _react_doctor_require_typescript_default.isJsxAttribute(parent) && parent.name === identifier || (_react_doctor_require_typescript_default.isPropertyAccessExpression(parent) || _react_doctor_require_typescript_default.isPropertyAssignment(parent) || _react_doctor_require_typescript_default.isPropertyDeclaration(parent) || _react_doctor_require_typescript_default.isMethodDeclaration(parent) || _react_doctor_require_typescript_default.isMethodSignature(parent) || _react_doctor_require_typescript_default.isPropertySignature(parent)) && parent.name === identifier || _react_doctor_require_typescript_default.isQualifiedName(parent) && parent.right === identifier;
51326
51309
  };
51327
51310
  const collectUnboundGlobalNames = (filePath, candidateGlobalNames) => {
51328
51311
  let source;
@@ -51331,19 +51314,19 @@ const collectUnboundGlobalNames = (filePath, candidateGlobalNames) => {
51331
51314
  } catch {
51332
51315
  return /* @__PURE__ */ new Set();
51333
51316
  }
51334
- const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true);
51317
+ const sourceFile = _react_doctor_require_typescript_default.createSourceFile(filePath, source, _react_doctor_require_typescript_default.ScriptTarget.Latest, true);
51335
51318
  const compilerOptions = {
51336
51319
  allowJs: true,
51337
- jsx: ts.JsxEmit.Preserve,
51320
+ jsx: _react_doctor_require_typescript_default.JsxEmit.Preserve,
51338
51321
  noLib: true,
51339
51322
  noResolve: true,
51340
- target: ts.ScriptTarget.Latest
51323
+ target: _react_doctor_require_typescript_default.ScriptTarget.Latest
51341
51324
  };
51342
- const compilerHost = ts.createCompilerHost(compilerOptions);
51325
+ const compilerHost = _react_doctor_require_typescript_default.createCompilerHost(compilerOptions);
51343
51326
  compilerHost.fileExists = (candidatePath) => candidatePath === filePath;
51344
51327
  compilerHost.getSourceFile = (candidatePath) => candidatePath === filePath ? sourceFile : void 0;
51345
51328
  compilerHost.readFile = (candidatePath) => candidatePath === filePath ? source : void 0;
51346
- const program = ts.createProgram({
51329
+ const program = _react_doctor_require_typescript_default.createProgram({
51347
51330
  rootNames: [filePath],
51348
51331
  options: compilerOptions,
51349
51332
  host: compilerHost
@@ -51353,10 +51336,10 @@ const collectUnboundGlobalNames = (filePath, candidateGlobalNames) => {
51353
51336
  if (!boundSourceFile) return /* @__PURE__ */ new Set();
51354
51337
  const unboundGlobalNames = /* @__PURE__ */ new Set();
51355
51338
  const visitNode = (node) => {
51356
- if (ts.isIdentifier(node) && candidateGlobalNames.has(node.text) && !isNonReferenceIdentifier(node)) {
51357
- if (!(ts.isShorthandPropertyAssignment(node.parent) ? typeChecker.getShorthandAssignmentValueSymbol(node.parent) : typeChecker.getSymbolAtLocation(node))) unboundGlobalNames.add(node.text);
51339
+ if (_react_doctor_require_typescript_default.isIdentifier(node) && candidateGlobalNames.has(node.text) && !isNonReferenceIdentifier(node)) {
51340
+ if (!(_react_doctor_require_typescript_default.isShorthandPropertyAssignment(node.parent) ? typeChecker.getShorthandAssignmentValueSymbol(node.parent) : typeChecker.getSymbolAtLocation(node))) unboundGlobalNames.add(node.text);
51358
51341
  }
51359
- ts.forEachChild(node, visitNode);
51342
+ _react_doctor_require_typescript_default.forEachChild(node, visitNode);
51360
51343
  };
51361
51344
  visitNode(boundSourceFile);
51362
51345
  return unboundGlobalNames;
@@ -51529,7 +51512,7 @@ const hasUnparseableCompilerConfig = (packageRootDirectory) => {
51529
51512
  return configNames.some((configName) => {
51530
51513
  const configPath = join(packageRootDirectory, configName);
51531
51514
  try {
51532
- return ts.parseConfigFileTextToJson(configPath, readFileSync(configPath, "utf8")).error !== void 0;
51515
+ return _react_doctor_require_typescript_default.parseConfigFileTextToJson(configPath, readFileSync(configPath, "utf8")).error !== void 0;
51533
51516
  } catch {
51534
51517
  return true;
51535
51518
  }
@@ -51902,4 +51885,4 @@ startProjectAnalysisWorker();
51902
51885
  export {};
51903
51886
 
51904
51887
  //# sourceMappingURL=project-analysis-worker.js.map
51905
- //# debugId=36894edb-acbd-5c90-9ce2-80c54b021bfb
51888
+ //# debugId=a64790d6-0fbf-5baf-969b-f9980583a72d