{
  "version": 3,
  "sources": ["../../../../src/packages/exec.build-commands/ignoredBuilds.ts"],
  "sourcesContent": ["import type { Config } from '../config/index.ts';\nimport renderHelp from 'render-help';\nimport { getAutomaticallyIgnoredBuilds } from './getAutomaticallyIgnoredBuilds.ts';\n\nexport type IgnoredBuildsCommandOpts = Pick<\n  Config,\n  'modulesDir' | 'dir' | 'rootProjectManifest' | 'lockfileDir'\n>;\n\nexport const commandNames = ['ignored-builds'];\n\nexport function help(): string {\n  return renderHelp({\n    description: 'Print the list of packages with blocked build scripts',\n    usages: [],\n  });\n}\n\nexport function cliOptionsTypes(): Record<string, unknown> {\n  return {};\n}\n\nexport function rcOptionsTypes(): Record<string, unknown> {\n  return {};\n}\n\nexport async function handler(opts: IgnoredBuildsCommandOpts): Promise<string> {\n  const ignoredBuiltDependencies =\n    opts.rootProjectManifest?.pnpm?.ignoredBuiltDependencies ?? [];\n\n  const automaticallyIgnoredBuilds = (\n    await getAutomaticallyIgnoredBuilds(opts)\n  )?.filter((automaticallyIgnoredBuild: string): boolean => {\n    return !ignoredBuiltDependencies.includes(automaticallyIgnoredBuild);\n  });\n\n  let output = 'Automatically ignored builds during installation:\\n';\n\n  if (automaticallyIgnoredBuilds == null) {\n    output += '  Cannot identify as no node_modules found';\n  } else if (automaticallyIgnoredBuilds.length === 0) {\n    output += '  None';\n  } else {\n    output += `  ${automaticallyIgnoredBuilds.join('\\n  ')}\nhint: To allow the execution of build scripts for a package, add its name to \"pnpm.onlyBuiltDependencies\" in your \"package.json\", then run \"pnpm rebuild\".\nhint: If you don't want to build a package, add it to the \"pnpm.ignoredBuiltDependencies\" list.`;\n  }\n\n  output += '\\n';\n\n  if (ignoredBuiltDependencies.length) {\n    output += `\\nExplicitly ignored package builds (via pnpm.ignoredBuiltDependencies):\\n  ${ignoredBuiltDependencies.join('\\n  ')}\\n`;\n  }\n\n  return output;\n}\n"],
  "mappings": "AACA,OAAO,gBAAgB;AACvB,SAAS,qCAAqC;AAOvC,MAAM,eAAe,CAAC,gBAAgB;AAEtC,SAAS,OAAe;AAC7B,SAAO,WAAW;AAAA,IAChB,aAAa;AAAA,IACb,QAAQ,CAAC;AAAA,EACX,CAAC;AACH;AAEO,SAAS,kBAA2C;AACzD,SAAO,CAAC;AACV;AAEO,SAAS,iBAA0C;AACxD,SAAO,CAAC;AACV;AAEA,eAAsB,QAAQ,MAAiD;AAC7E,QAAM,2BACJ,KAAK,qBAAqB,MAAM,4BAA4B,CAAC;AAE/D,QAAM,8BACJ,MAAM,8BAA8B,IAAI,IACvC,OAAO,CAAC,8BAA+C;AACxD,WAAO,CAAC,yBAAyB,SAAS,yBAAyB;AAAA,EACrE,CAAC;AAED,MAAI,SAAS;AAEb,MAAI,8BAA8B,MAAM;AACtC,cAAU;AAAA,EACZ,WAAW,2BAA2B,WAAW,GAAG;AAClD,cAAU;AAAA,EACZ,OAAO;AACL,cAAU,KAAK,2BAA2B,KAAK,MAAM,CAAC;AAAA;AAAA;AAAA,EAGxD;AAEA,YAAU;AAEV,MAAI,yBAAyB,QAAQ;AACnC,cAAU;AAAA;AAAA,IAA+E,yBAAyB,KAAK,MAAM,CAAC;AAAA;AAAA,EAChI;AAEA,SAAO;AACT;",
  "names": []
}
