{
  "version": 3,
  "sources": ["../../../../src/packages/default-reporter/reportError.ts"],
  "sourcesContent": ["import type { Config } from '../config/index.ts';\nimport type { Log } from '../core-loggers/index.ts';\nimport { renderDedupeCheckIssues } from '../dedupe.issues-renderer/index.ts';\nimport type { DedupeCheckIssues } from '../dedupe.types/index.ts';\nimport type { PnpmError } from '../error/index.ts';\nimport { renderPeerIssues } from '../render-peer-issues/index.ts';\nimport type {\n  PeerDependencyRules,\n  PeerDependencyIssuesByProjects,\n  ModulesDir,\n} from '../types/index.ts';\nimport chalk from 'chalk';\nimport equals from 'ramda/src/equals';\nimport StackTracey from 'stacktracey';\nimport { EOL } from './constants.ts';\n\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\n// Property 'maxColumnWidths' does not exist on type 'typeof StackTracey'.ts(2339)\nStackTracey.maxColumnWidths = {\n  callee: 25,\n  file: 350,\n  sourceLine: 25,\n};\n\nconst highlight = chalk.yellow;\nconst colorPath = chalk.gray;\n\nexport function reportError(\n  logObj: Log,\n  config?: Config | undefined,\n  peerDependencyRules?: PeerDependencyRules | undefined\n): string | null {\n  const errorInfo = getErrorInfo(logObj, config, peerDependencyRules);\n\n  if (!errorInfo) {\n    return null;\n  }\n\n  let output = formatErrorSummary(\n    errorInfo.title,\n    (logObj as LogObjWithPossibleError).err?.code\n  );\n\n  if (logObj.pkgsStack != null) {\n    if (logObj.pkgsStack.length > 0) {\n      output += `\\n\\n${formatPkgsStack(logObj.pkgsStack)}`;\n    } else if ('prefix' in logObj && typeof logObj.prefix !== 'undefined') {\n      output += `\\n\\nThis error happened while installing a direct dependency of ${logObj.prefix}`;\n    }\n  }\n\n  if (typeof errorInfo.body !== 'undefined') {\n    output += `\\n\\n${errorInfo.body}`;\n  }\n\n  return output;\n\n  /**\n   * A type to assist with introspection of the logObj.\n   * These objects may or may not have an `err` field.\n   */\n  type LogObjWithPossibleError = {\n    readonly err?: { code?: string | undefined } | undefined;\n  };\n}\n\ntype ErrorInfo = {\n  title: string;\n  body?: string | undefined;\n};\n\nfunction getErrorInfo(\n  logObj: Log,\n  config?: Config | undefined,\n  peerDependencyRules?: PeerDependencyRules | undefined\n): ErrorInfo | null {\n  if ('err' in logObj && logObj.err) {\n    const err = logObj.err as PnpmError & { stack: object };\n\n    switch (err.code) {\n      case 'ERR_PNPM_UNEXPECTED_STORE': {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        return reportUnexpectedStore(err, logObj as any);\n      }\n\n      case 'ERR_PNPM_UNEXPECTED_VIRTUAL_STORE': {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        return reportUnexpectedVirtualStoreDir(err, logObj as any);\n      }\n\n      case 'ERR_PNPM_STORE_BREAKING_CHANGE': {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        return reportStoreBreakingChange(logObj as any);\n      }\n\n      case 'ERR_PNPM_MODULES_BREAKING_CHANGE': {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        return reportModulesBreakingChange(logObj as any);\n      }\n\n      case 'ERR_PNPM_MODIFIED_DEPENDENCY': {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        return reportModifiedDependency(logObj as any);\n      }\n\n      case 'ERR_PNPM_LOCKFILE_BREAKING_CHANGE': {\n        return reportLockfileBreakingChange(err, logObj);\n      }\n\n      case 'ERR_PNPM_RECURSIVE_RUN_NO_SCRIPT': {\n        return { title: err.message };\n      }\n\n      case 'ERR_PNPM_MISSING_TIME': {\n        return {\n          title: err.message,\n          body: 'If you cannot fix this registry issue, then set \"resolution-mode\" to \"highest\".',\n        };\n      }\n\n      case 'ERR_PNPM_NO_MATCHING_VERSION': {\n        return formatNoMatchingVersion(\n          err,\n          logObj as unknown as { packageMeta: PackageMeta }\n        );\n      }\n\n      case 'ERR_PNPM_RECURSIVE_FAIL': {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        return formatRecursiveCommandSummary(logObj as any);\n      }\n\n      case 'ERR_PNPM_BAD_TARBALL_SIZE': {\n        return reportBadTarballSize(err, logObj);\n      }\n\n      case 'ELIFECYCLE': {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        return reportLifecycleError(logObj as any);\n      }\n\n      case 'ERR_PNPM_UNSUPPORTED_ENGINE': {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        return reportEngineError(logObj as any);\n      }\n\n      case 'ERR_PNPM_PEER_DEP_ISSUES': {\n        return reportPeerDependencyIssuesError(\n          err,\n          // eslint-disable-next-line @typescript-eslint/no-explicit-any\n          logObj as any,\n          peerDependencyRules\n        );\n      }\n\n      case 'ERR_PNPM_DEDUPE_CHECK_ISSUES': {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        return reportDedupeCheckIssuesError(err, logObj as any);\n      }\n\n      case 'ERR_PNPM_SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER': {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        return reportSpecNotSupportedByAnyResolverError(err, logObj as any);\n      }\n\n      case 'ERR_PNPM_FETCH_401':\n      case 'ERR_PNPM_FETCH_403': {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        return reportAuthError(err, logObj as any, config);\n      }\n\n      default: {\n        // Errors with unknown error codes are printed with stack trace\n        if (!err.code.startsWith('ERR_PNPM_')) {\n          return formatGenericError(\n            // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n            err.message ?? (logObj as { message: string }).message,\n            err.stack\n          );\n        }\n\n        return {\n          // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n          title: err.message ?? '',\n          body: (logObj as { hint?: string }).hint,\n        };\n      }\n    }\n  }\n\n  return { title: logObj.message ?? '' };\n}\n\ninterface PkgStackItem {\n  readonly id: string;\n  readonly name: string;\n  // The version may be missing if this was a private workspace package without\n  // the version field set.\n  readonly version?: string | undefined;\n}\n\nfunction formatPkgNameVer({ name, version }: PkgStackItem): string {\n  return version == null ? name : `${name}@${version}`;\n}\n\nfunction formatPkgsStack(pkgsStack: readonly PkgStackItem[]): string {\n  return `This error happened while installing the dependencies of \\\n${formatPkgNameVer(pkgsStack[0] as PkgStackItem)}\\\n${pkgsStack\n  .slice(1)\n  .map((pkgInfo) => `${EOL} at ${formatPkgNameVer(pkgInfo)}`)\n  .join('')}`;\n}\n\ninterface PackageMeta {\n  name: string;\n  'dist-tags': Record<string, string> & {\n    latest: string;\n  };\n  versions: Record<string, object>;\n}\n\nfunction formatNoMatchingVersion(\n  err: Error,\n  msg: { packageMeta: PackageMeta }\n): {\n  title: string;\n  body: string;\n} {\n  const meta: PackageMeta = msg.packageMeta;\n\n  let output = `The latest release of ${meta.name} is \"${meta['dist-tags'].latest}\".${EOL}`;\n\n  if (!equals.default(Object.keys(meta['dist-tags']), ['latest'])) {\n    output += `${EOL}Other releases are: ${EOL}`;\n\n    for (const tag in meta['dist-tags']) {\n      if (tag !== 'latest') {\n        output += `  * ${tag}: ${meta['dist-tags'][tag]}${EOL}`;\n      }\n    }\n  }\n\n  output += `${EOL}If you need the full list of all ${Object.keys(meta.versions).length} published versions run \"$ pnpm view ${meta.name} versions\".`;\n\n  return {\n    title: err.message,\n    body: output,\n  };\n}\n\nfunction reportUnexpectedStore(\n  err: Error,\n  msg: {\n    actualStorePath: string;\n    expectedStorePath: string;\n    modulesDir: ModulesDir;\n  }\n): ErrorInfo {\n  return {\n    title: err.message,\n    body: `The dependencies at \"${msg.modulesDir}\" are currently linked from the store at \"${msg.expectedStorePath}\".\n\npnpm now wants to use the store at \"${msg.actualStorePath}\" to link dependencies.\n\nIf you want to use the new store location, reinstall your dependencies with \"pnpm install\".\n\nYou may change the global store location by running \"pnpm config set store-dir <dir> --global\".\n(This error may happen if the node_modules was installed with a different major version of pnpm)`,\n  };\n}\n\nfunction reportUnexpectedVirtualStoreDir(\n  err: Error,\n  msg: {\n    actual: string;\n    expected: string;\n    modulesDir: ModulesDir;\n  }\n): ErrorInfo {\n  return {\n    title: err.message,\n    body: `The dependencies at \"${msg.modulesDir}\" are currently symlinked from the virtual store directory at \"${msg.expected}\".\n\npnpm now wants to use the virtual store at \"${msg.actual}\" to link dependencies from the store.\n\nIf you want to use the new virtual store location, reinstall your dependencies with \"pnpm install\".\n\nYou may change the virtual store location by changing the value of the virtual-store-dir config.`,\n  };\n}\n\nfunction reportStoreBreakingChange(msg: {\n  additionalInformation?: string | undefined;\n  storePath: string;\n  relatedIssue?: number | undefined;\n  relatedPR?: number | undefined;\n}): ErrorInfo {\n  let output = `Store path: ${colorPath(msg.storePath)}\n\nRun \"pnpm install\" to recreate node_modules.`;\n\n  if (typeof msg.additionalInformation === 'string') {\n    output = `${output}${EOL}${EOL}${msg.additionalInformation}`;\n  }\n\n  output += formatRelatedSources(msg);\n  return {\n    title:\n      'The store used for the current node_modules is incompatible with the current version of pnpm',\n    body: output,\n  };\n}\n\nfunction reportModulesBreakingChange(msg: {\n  additionalInformation?: string;\n  modulesPath: string;\n  relatedIssue?: number;\n  relatedPR?: number;\n}): ErrorInfo {\n  let output = `node_modules path: ${colorPath(msg.modulesPath)}\n\nRun ${highlight('pnpm install')} to recreate node_modules.`;\n\n  if (typeof msg.additionalInformation === 'string') {\n    output = `${output}${EOL}${EOL}${msg.additionalInformation}`;\n  }\n\n  output += formatRelatedSources(msg);\n\n  return {\n    title:\n      'The current version of pnpm is not compatible with the available node_modules structure',\n    body: output,\n  };\n}\n\nfunction formatRelatedSources(msg: {\n  relatedIssue?: number | undefined;\n  relatedPR?: number | undefined;\n}): string {\n  let output = '';\n\n  if (\n    typeof msg.relatedIssue === 'undefined' &&\n    typeof msg.relatedPR === 'undefined'\n  ) {\n    return output;\n  }\n\n  output += EOL;\n\n  if (typeof msg.relatedIssue === 'number') {\n    output += `${EOL}Related issue: ${colorPath(`https://github.com/pnpm/pnpm/issues/${msg.relatedIssue}`)}`;\n  }\n\n  if (typeof msg.relatedPR === 'number') {\n    output += `${EOL}Related PR: ${colorPath(`https://github.com/pnpm/pnpm/pull/${msg.relatedPR}`)}`;\n  }\n\n  return output;\n}\n\nfunction formatGenericError(\n  errorMessage: string,\n  stack: Error | string\n): ErrorInfo {\n  // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n  if (stack) {\n    let prettyStack: string | undefined;\n    try {\n      prettyStack = new StackTracey(stack).asTable();\n    } catch {\n      prettyStack = stack.toString();\n    }\n    if (prettyStack) {\n      return {\n        title: errorMessage,\n        body: prettyStack,\n      };\n    }\n  }\n  return { title: errorMessage };\n}\n\nfunction formatErrorSummary(message: string, code?: string): string {\n  return `${chalk.bgRed.black(`\\u2009${code ?? 'ERROR'}\\u2009`)} ${chalk.red(message)}`;\n}\n\nfunction reportModifiedDependency(msg: { modified: string[] }): ErrorInfo {\n  return {\n    title: 'Packages in the store have been mutated',\n    body: `These packages are modified:\n${msg.modified.map((pkgPath: string) => colorPath(pkgPath)).join(EOL)}\n\nYou can run ${highlight('pnpm install --force')} to refetch the modified packages`,\n  };\n}\n\nfunction reportLockfileBreakingChange(err: Error, _msg: object): ErrorInfo {\n  return {\n    title: err.message,\n    body: `Run with the ${highlight('--force')} parameter to recreate the lockfile.`,\n  };\n}\n\nfunction formatRecursiveCommandSummary(msg: {\n  failures: Array<Error & { prefix: string }>;\n  passes: number;\n}): ErrorInfo {\n  const output = `${EOL}Summary: ${chalk.red(`${msg.failures.length} fails`)}, ${msg.passes} passes${EOL}${EOL}${msg.failures\n    .map(({ message, prefix }): string => {\n      return `${prefix}:${EOL}${formatErrorSummary(message)}`;\n    })\n    .join(EOL + EOL)}`;\n  return {\n    title: '',\n    body: output,\n  };\n}\n\nfunction reportBadTarballSize(err: Error, _msg: object): ErrorInfo {\n  return {\n    title: err.message,\n    body: `Seems like you have internet connection issues.\nTry running the same command again.\nIf that doesn't help, try one of the following:\n\n- Set a bigger value for the \\`fetch-retries\\` config.\n    To check the current value of \\`fetch-retries\\`, run \\`pnpm get fetch-retries\\`.\n    To set a new value, run \\`pnpm set fetch-retries <number>\\`.\n\n- Set \\`network-concurrency\\` to 1.\n    This change will slow down installation times, so it is recommended to\n    delete the config once the internet connection is good again: \\`pnpm config delete network-concurrency\\`\n\nNOTE: You may also override configs via flags.\nFor instance, \\`pnpm install --fetch-retries 5 --network-concurrency 1\\``,\n  };\n}\n\nfunction reportLifecycleError(msg: {\n  stage: string;\n  errno?: number | string;\n}): ErrorInfo {\n  if (msg.stage === 'test') {\n    return { title: 'Test failed. See above for more details.' };\n  }\n\n  if (typeof msg.errno === 'number') {\n    return { title: `Command failed with exit code ${msg.errno}.` };\n  }\n\n  return { title: 'Command failed.' };\n}\n\nfunction reportEngineError(msg: {\n  message: string;\n  current: {\n    node: string;\n    pnpm: string;\n  };\n  packageId: string;\n  wanted: {\n    node?: string | undefined;\n    pnpm?: string | undefined;\n  };\n}): ErrorInfo {\n  let output = '';\n\n  if (typeof msg.wanted.pnpm === 'string') {\n    output += `\\\nYour pnpm version is incompatible with \"${msg.packageId}\".\n\nExpected version: ${msg.wanted.pnpm}\nGot: ${msg.current.pnpm}\n\nThis is happening because the package's manifest has an engines.pnpm field specified.\nTo fix this issue, install the required pnpm version globally.\n\nTo install the latest version of pnpm, run \"pnpm i -g pnpm\".\nTo check your pnpm version, run \"pnpm -v\".`;\n  }\n  if (typeof msg.wanted.node === 'string') {\n    if (output) output += EOL + EOL;\n    output += `\\\nYour Node version is incompatible with \"${msg.packageId}\".\n\nExpected version: ${msg.wanted.node}\nGot: ${msg.current.node}\n\nThis is happening because the package's manifest has an engines.node field specified.\nTo fix this issue, install the required Node version.`;\n  }\n  return {\n    title: 'Unsupported environment (bad pnpm and/or Node.js version)',\n    body: output,\n  };\n}\n\nfunction reportAuthError(\n  err: Error,\n  msg: { hint?: string | undefined },\n  config?: Config | undefined\n): ErrorInfo {\n  const foundSettings = [] as string[];\n\n  for (const [key, value] of Object.entries(config?.rawConfig ?? {})) {\n    if (key[0] === '@') {\n      foundSettings.push(`${key}=${String(value)}`);\n      continue;\n    }\n\n    if (\n      key.endsWith('_auth') ||\n      key.endsWith('_authToken') ||\n      key.endsWith('username') ||\n      key.endsWith('_password')\n    ) {\n      foundSettings.push(`${key}=${hideSecureInfo(key, value)}`);\n    }\n  }\n\n  let output = typeof msg.hint === 'string' ? `${msg.hint}${EOL}${EOL}` : '';\n\n  if (foundSettings.length === 0) {\n    output += `No authorization settings were found in the configs.\nTry to log in to the registry by running \"pnpm login\"\nor add the auth tokens manually to the ~/.npmrc file.`;\n  } else {\n    output += `These authorization settings were found:\n${foundSettings.join('\\n')}`;\n  }\n\n  return {\n    title: err.message,\n    body: output,\n  };\n}\n\nfunction hideSecureInfo(key: string, value: string): string {\n  if (key.endsWith('_password')) {\n    return '[hidden]';\n  }\n\n  if (key.endsWith('_auth') || key.endsWith('_authToken')) {\n    return `${value.substring(0, 4)}[hidden]`;\n  }\n\n  return value;\n}\n\nfunction reportPeerDependencyIssuesError(\n  err: Error,\n  msg: { issuesByProjects: PeerDependencyIssuesByProjects },\n  peerDependencyRules?: PeerDependencyRules | undefined\n): ErrorInfo | null {\n  const hasMissingPeers = getHasMissingPeers(msg.issuesByProjects);\n\n  const hints: string[] = [];\n\n  if (hasMissingPeers) {\n    hints.push(\n      'If you want peer dependencies to be automatically installed, add \"auto-install-peers=true\" to an .npmrc file at the root of your project.'\n    );\n  }\n\n  hints.push(\n    'If you don\\'t want pnpm to fail on peer dependency issues, add \"strict-peer-dependencies=false\" to an .npmrc file at the root of your project.'\n  );\n\n  const rendered = renderPeerIssues(msg.issuesByProjects, {\n    rules: peerDependencyRules,\n  });\n\n  if (!rendered) {\n    return null;\n  }\n\n  return {\n    title: err.message,\n    body: `${rendered}\n${hints.map((hint) => `hint: ${hint}`).join('\\n')}\n`,\n  };\n}\n\nfunction getHasMissingPeers(\n  issuesByProjects: PeerDependencyIssuesByProjects\n): boolean {\n  return Object.values(issuesByProjects).some((issues) =>\n    Object.values(issues.missing)\n      .flat()\n      .some(({ optional }) => !optional)\n  );\n}\n\nfunction reportDedupeCheckIssuesError(\n  err: Error,\n  msg: { dedupeCheckIssues: DedupeCheckIssues }\n): ErrorInfo {\n  return {\n    title: err.message,\n    body: `\\\n${renderDedupeCheckIssues(msg.dedupeCheckIssues)}\nRun ${chalk.yellow('pnpm dedupe')} to apply the changes above.\n`,\n  };\n}\n\nfunction reportSpecNotSupportedByAnyResolverError(\n  err: Error,\n  logObj: Log\n): ErrorInfo {\n  // If the catalog protocol specifier was sent to a \"real resolver\", it'll\n  // eventually throw a \"specifier not supported\" error since the catalog\n  // protocol is meant to be replaced before it's passed to any of the real\n  // resolvers.\n  //\n  // If this kind of error is thrown, and the dependency pref is using the\n  // catalog protocol it's most likely because we're trying to install an out of\n  // repo dependency that was published incorrectly. For example, it may be been\n  // mistakenly published with 'npm publish' instead of 'pnpm publish'. Report a\n  // more clear error in this case.\n  if (logObj.package?.pref?.startsWith('catalog:') === true) {\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    return reportExternalCatalogProtocolError(err, logObj as any);\n  }\n\n  return {\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n    title: err.message ?? '',\n    body: logObj.hint,\n  };\n}\n\nfunction reportExternalCatalogProtocolError(\n  err: Error,\n  logObj: Log\n): ErrorInfo {\n  const { pkgsStack } = logObj;\n  const problemDep = pkgsStack?.[0];\n\n  let body = `\\\nAn external package outside of the pnpm workspace declared a dependency using\nthe catalog protocol. This is likely a bug in that external package. Only\npackages within the pnpm workspace may use catalogs. Usages of the catalog\nprotocol are replaced with real specifiers on 'pnpm publish'.\n`;\n\n  if (problemDep != null) {\n    body += `\\\n\nThis is likely a bug in the publishing automation of this package. Consider filing\na bug with the authors of:\n\n  ${highlight(formatPkgNameVer(problemDep))}\n`;\n  }\n\n  return {\n    title: err.message,\n    body,\n  };\n}\n"],
  "mappings": "AAEA,SAAS,+BAA+B;AAGxC,SAAS,wBAAwB;AAMjC,OAAO,WAAW;AAClB,OAAO,YAAY;AACnB,OAAO,iBAAiB;AACxB,SAAS,WAAW;AAKpB,YAAY,kBAAkB;AAAA,EAC5B,QAAQ;AAAA,EACR,MA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