vercel 60.1.1 → 61.0.0

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 (133) hide show
  1. package/dist/chunks/{add-D6D2J6ID.js → add-I5N2DAIP.js} +1 -1
  2. package/dist/chunks/{add-QBCRXMR3.js → add-KKZS2KRG.js} +1 -1
  3. package/dist/chunks/{add-JKIDAH7K.js → add-NLTAYU5Z.js} +1 -1
  4. package/dist/chunks/{build-PP4JOW2C.js → build-V6DQKDOO.js} +1 -1
  5. package/dist/chunks/chunk-23NBYS6R.js +36 -0
  6. package/dist/chunks/{chunk-C6QYMZ3S.js → chunk-2JRC4QJO.js} +1 -1
  7. package/dist/chunks/{chunk-H4IUDU5W.js → chunk-2VAKGA3F.js} +1 -1
  8. package/dist/chunks/{chunk-77WAICTF.js → chunk-2XUWYQ5P.js} +1 -1
  9. package/dist/chunks/{chunk-YMLWTVT5.js → chunk-4GA73K74.js} +1 -1
  10. package/dist/chunks/{chunk-3KQRJYBJ.js → chunk-4KJZA5JH.js} +1 -1
  11. package/dist/chunks/{chunk-LNOX5GIA.js → chunk-57DOAKMY.js} +1 -1
  12. package/dist/chunks/{chunk-CD4FLZED.js → chunk-5BQ25PMQ.js} +1 -1
  13. package/dist/chunks/{chunk-KOOED3TJ.js → chunk-6FHZ2IVO.js} +2 -2
  14. package/dist/chunks/{chunk-YG6LPJFT.js → chunk-7QVVD3WT.js} +1 -1
  15. package/dist/chunks/{chunk-2TBUMUHF.js → chunk-BFHLAM7O.js} +1 -1
  16. package/dist/chunks/{chunk-VVWALKUM.js → chunk-BN3XAVPG.js} +1 -1
  17. package/dist/chunks/{chunk-JMNAVONO.js → chunk-DT3EUC6S.js} +2 -2
  18. package/dist/chunks/{chunk-WUH5HYCX.js → chunk-EMDAZAWN.js} +1 -1
  19. package/dist/chunks/{chunk-KTB75ID3.js → chunk-FYRK4GX7.js} +1 -1
  20. package/dist/chunks/{chunk-ZWYU5SBC.js → chunk-GBWSLOL5.js} +1 -1
  21. package/dist/chunks/chunk-GIIG5KNF.js +7 -0
  22. package/dist/chunks/{chunk-SGU7YIY3.js → chunk-HQZXUIZY.js} +1 -1
  23. package/dist/chunks/chunk-IMN3Z3VV.js +9 -0
  24. package/dist/chunks/{chunk-STO2JRII.js → chunk-JS5WLQ6E.js} +1 -1
  25. package/dist/chunks/{chunk-7JAKGIQ6.js → chunk-KEVHEKQZ.js} +1 -1
  26. package/dist/chunks/{chunk-RB3NPNPD.js → chunk-KRQNSFGI.js} +1 -1
  27. package/dist/chunks/{chunk-M6UYGRPW.js → chunk-OEICO6OI.js} +1 -1
  28. package/dist/chunks/{chunk-IXN5A5WZ.js → chunk-OTP26MC7.js} +1 -1
  29. package/dist/chunks/{chunk-Q5VLP2LY.js → chunk-OVOQNHSJ.js} +1 -1
  30. package/dist/chunks/{chunk-G77TCKNI.js → chunk-P33CQ5CD.js} +1 -1
  31. package/dist/chunks/{chunk-TTMLSKF7.js → chunk-Q5CKKVCX.js} +1 -1
  32. package/dist/chunks/{chunk-LUVIR6F2.js → chunk-QFXHS36S.js} +1 -1
  33. package/dist/chunks/{chunk-URI72S7J.js → chunk-RAQCLWCR.js} +1 -1
  34. package/dist/chunks/{chunk-GK5C5TE5.js → chunk-RBJ4IMRF.js} +1 -1
  35. package/dist/chunks/{chunk-4OKKSZVX.js → chunk-ROQLVSZT.js} +1 -1
  36. package/dist/chunks/{chunk-3CQQXHDI.js → chunk-S3ZJ6ZBN.js} +1 -1
  37. package/dist/chunks/{chunk-GZBSABCA.js → chunk-SCNNUBUE.js} +1 -1
  38. package/dist/chunks/{chunk-7HT5KIFA.js → chunk-SIRSBEOT.js} +1 -1
  39. package/dist/chunks/{chunk-4S6WFNRF.js → chunk-SZJLH6TE.js} +2 -2
  40. package/dist/chunks/{chunk-MSLHCYBD.js → chunk-TB4CAJ7K.js} +2 -2
  41. package/dist/chunks/{chunk-6A6LV2S2.js → chunk-TDR4D3EL.js} +3 -3
  42. package/dist/chunks/{chunk-RLCFE3MK.js → chunk-TKNV5ONT.js} +3 -3
  43. package/dist/chunks/{chunk-H4FTGLWV.js → chunk-USSZAG2L.js} +1 -1
  44. package/dist/chunks/chunk-W26LLGQV.js +7 -0
  45. package/dist/chunks/{chunk-WH6M54KF.js → chunk-WOFE2X43.js} +3 -3
  46. package/dist/chunks/{chunk-HMB4MZOB.js → chunk-XF4GWZT2.js} +1 -1
  47. package/dist/chunks/{chunk-2ZIWDSUX.js → chunk-Y7TY3VO2.js} +3 -3
  48. package/dist/chunks/{chunk-CVKB54WW.js → chunk-YBXO6YRZ.js} +1 -1
  49. package/dist/chunks/{chunk-DPH3CQXE.js → chunk-YTUFUBDL.js} +7 -5
  50. package/dist/chunks/{clear-TQFWNYKK.js → clear-FP53TC7K.js} +1 -1
  51. package/dist/chunks/{compile-vercel-config-YY3CODZP.js → compile-vercel-config-EVBLB7VS.js} +1 -1
  52. package/dist/chunks/{config-4FCRR7C5.js → config-5Q37O5JW.js} +1 -1
  53. package/dist/chunks/{config-VZQLRHHA.js → config-L2HMQKZN.js} +1 -1
  54. package/dist/chunks/config-validator.mjs +1 -1
  55. package/dist/chunks/{delete-L45TA4WK.js → delete-F75LDVGB.js} +1 -1
  56. package/dist/chunks/{delete-MPLEIGYN.js → delete-UAJRL4OB.js} +1 -1
  57. package/dist/chunks/{detect-projects-3AFQ2AC5.js → detect-projects-325QE23N.js} +1 -1
  58. package/dist/chunks/{detect-services-7QL6RPKV.js → detect-services-XZEOFBIS.js} +1 -1
  59. package/dist/chunks/{disable-WY6N4R7I.js → disable-F22ULQBR.js} +1 -1
  60. package/dist/chunks/{discard-3VYFSUTH.js → discard-RTIHE562.js} +1 -1
  61. package/dist/chunks/{edit-FCPWK252.js → edit-A2YLMFJY.js} +1 -1
  62. package/dist/chunks/{edit-VOZ4IKZI.js → edit-OQYEMSTW.js} +1 -1
  63. package/dist/chunks/{enable-IJ7UEQ3G.js → enable-PQE7IYLJ.js} +1 -1
  64. package/dist/chunks/{export-L4D4GCJI.js → export-MXCHIXRP.js} +1 -1
  65. package/dist/chunks/{future-IGDV62BF.js → future-EJDVAUMH.js} +1 -1
  66. package/dist/chunks/{generate-cert-for-deploy-GSWBCLZX.js → generate-cert-for-deploy-CORREIMU.js} +1 -1
  67. package/dist/chunks/{image-ORGBK7MR.js → image-IWWMC6OL.js} +1 -1
  68. package/dist/chunks/{import-builders-N4XIYEW5.js → import-builders-ZBNF3EDI.js} +1 -1
  69. package/dist/chunks/{inspect-F4OENUQT.js → inspect-BRSK7FWE.js} +1 -1
  70. package/dist/chunks/{inspect-GTALMRKE.js → inspect-CQAFY6OA.js} +1 -1
  71. package/dist/chunks/{inspect-V6IX3MOJ.js → inspect-L6XPIN4I.js} +1 -1
  72. package/dist/chunks/{inspect-377IAEIY.js → inspect-PCDAOGYE.js} +1 -1
  73. package/dist/chunks/{inspect-2EMBEQHZ.js → inspect-QPEB2PYJ.js} +1 -1
  74. package/dist/chunks/{list-57XWFXDW.js → list-HBPNOZ36.js} +1 -1
  75. package/dist/chunks/{list-GKXJQRX6.js → list-MHFZCZLT.js} +1 -1
  76. package/dist/chunks/{list-5ZBTU324.js → list-UNOHMSYJ.js} +1 -1
  77. package/dist/chunks/{login-MQXAAFBP.js → login-4RTE52M4.js} +1 -1
  78. package/dist/chunks/{login-X3KPMMEP.js → login-GZEBYAAZ.js} +1 -1
  79. package/dist/chunks/{logs-ZYELN5F2.js → logs-OCIAVVYS.js} +1 -1
  80. package/dist/chunks/{ls-AAU7AKS7.js → ls-4IBSWNBN.js} +1 -1
  81. package/dist/chunks/{ls-LMHRMNKE.js → ls-CDMZQWTZ.js} +1 -1
  82. package/dist/chunks/{ls-POKSXYZU.js → ls-CR7MEDCH.js} +1 -1
  83. package/dist/chunks/{ls-ADATML6R.js → ls-GCIPXWXQ.js} +1 -1
  84. package/dist/chunks/{ls-VYEJT272.js → ls-KYR3NKYY.js} +1 -1
  85. package/dist/chunks/{ls-GD6LB7IE.js → ls-MZV54WLV.js} +1 -1
  86. package/dist/chunks/{ls-NX3EMRFH.js → ls-XI2PIZR4.js} +1 -1
  87. package/dist/chunks/{mutate-QMU5QHF3.js → mutate-KROV5RBJ.js} +1 -1
  88. package/dist/chunks/{notifications-OYUKYMU7.js → notifications-5CF5744G.js} +1 -1
  89. package/dist/chunks/{open-SNN3JPON.js → open-JSSJIIAC.js} +1 -1
  90. package/dist/chunks/{openapi-7JUPKBWV.js → openapi-SEMT6PBJ.js} +1 -1
  91. package/dist/chunks/{permissions-5LSKNTW7.js → permissions-OIMJWVL6.js} +1 -1
  92. package/dist/chunks/{prompt-missing-credentials-PPUSNDNC.js → prompt-missing-credentials-QCUYKCHH.js} +1 -1
  93. package/dist/chunks/{publish-FIHJARRJ.js → publish-LY3THAIP.js} +1 -1
  94. package/dist/chunks/{pull-2M2BJYAS.js → pull-CULSXHFY.js} +1 -1
  95. package/dist/chunks/{purchase-domain-if-available-VKWKDDUD.js → purchase-domain-if-available-FFNNBECE.js} +1 -1
  96. package/dist/chunks/{push-VN6BPT3B.js → push-YEQRRX7B.js} +1 -1
  97. package/dist/chunks/{query-P35ZTMXV.js → query-IRNHCI3O.js} +1 -1
  98. package/dist/chunks/{reauthenticate-DIFJZWC5.js → reauthenticate-7HYVS7DU.js} +1 -1
  99. package/dist/chunks/{reorder-L4L2V3MZ.js → reorder-DSBV4PC7.js} +1 -1
  100. package/dist/chunks/{reply-XIJ54B7U.js → reply-WEUR5QKT.js} +1 -1
  101. package/dist/chunks/{resolve-W2O6M4GH.js → resolve-KEPX7J5A.js} +1 -1
  102. package/dist/chunks/{resolve-deployment-framework-preset-XF3NJIDS.js → resolve-deployment-framework-preset-QEPJNWVF.js} +1 -1
  103. package/dist/chunks/{restore-OZPJHXTE.js → restore-YW2G6UVL.js} +1 -1
  104. package/dist/chunks/{rm-2YDLXDCB.js → rm-6TV3ABUA.js} +1 -1
  105. package/dist/chunks/{rm-OYSWVVSJ.js → rm-CYZTYWOW.js} +1 -1
  106. package/dist/chunks/{rm-HM7V26WX.js → rm-NUUHW6XI.js} +1 -1
  107. package/dist/chunks/{rm-4EUHQZ7U.js → rm-RJ7FOO54.js} +1 -1
  108. package/dist/chunks/{rm-IM7VAVCG.js → rm-TP5O3DFW.js} +1 -1
  109. package/dist/chunks/{rule-inspect-75RUPIVB.js → rule-inspect-OVUBNDW6.js} +1 -1
  110. package/dist/chunks/{rules-PKOTTFKG.js → rules-B2XF44SN.js} +1 -1
  111. package/dist/chunks/{schema-NJC47D5M.js → schema-5XTHUY2F.js} +1 -1
  112. package/dist/chunks/{schema-EPUGS3PX.js → schema-O7WKXTFS.js} +1 -1
  113. package/dist/chunks/{set-GESKJPQA.js → set-JQ5LDT2W.js} +1 -1
  114. package/dist/chunks/{setup-and-link-PM46H7GU.js → setup-and-link-NEEWO4NE.js} +1 -1
  115. package/dist/chunks/{tags-MBJR7IQW.js → tags-M6DJBEV4.js} +1 -1
  116. package/dist/chunks/{types-UYIFBCCL.js → types-F6SLL27E.js} +1 -1
  117. package/dist/chunks/{update-TNUYPCS3.js → update-YP44NRTW.js} +1 -1
  118. package/dist/chunks/vlt-builder-importer-W63QEXYX.js +11 -0
  119. package/dist/commands/build/index.js +1 -1
  120. package/dist/commands/deploy/index.js +9 -9
  121. package/dist/commands/dev/index.js +5 -5
  122. package/dist/commands/env/index.js +1 -1
  123. package/dist/commands/link/index.js +1 -1
  124. package/dist/commands/list/index.js +1 -1
  125. package/dist/commands-bulk.js +41 -31
  126. package/dist/index.js +2 -2
  127. package/dist/version.mjs +1 -1
  128. package/package.json +59 -59
  129. package/dist/chunks/chunk-6PFC3KWQ.js +0 -7
  130. package/dist/chunks/chunk-KK4AJES5.js +0 -36
  131. package/dist/chunks/chunk-N5AIKGEO.js +0 -9
  132. package/dist/chunks/chunk-VHTNAYWA.js +0 -7
  133. package/dist/chunks/vlt-builder-importer-6DGKK72W.js +0 -11
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{humanizeReference,renderAlertTable}from"./chunk-7PNYOSDU.js";import{formatDate}from"./chunk-6PFC3KWQ.js";import{truncateEnd,truncateMiddle}from"./chunk-MBL6TXEJ.js";import{buildCommandWithGlobalFlags}from"./chunk-KCARCOP5.js";import{quoteArg}from"./chunk-BKV35LVB.js";import{printAlignedLabel}from"./chunk-YMM3VY3J.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1);function formatBoolean(value){return value?"yes":"no"}function formatOperator(operator){return{gt:">",gte:">=",lt:"<",lte:"<="}[operator]??operator}function formatPublicRuleScope(rule){let scope=rule.ruleScope;return scope.type==="all"?"all projects":scope.type==="project"?`project: ${scope.projectId}`:`${scope.type}: ${scope.projectIds.join(", ")}`}function formatMetricSelection(metric){let modifiers=[metric.per?`per ${metric.per}`:void 0,metric.normalize?`normalize ${metric.normalize}`:void 0,metric.dimensions?.length?`dimensions ${metric.dimensions.join(", ")}`:void 0].filter(Boolean);return`${metric.aggregation} ${metric.metric}${modifiers.length?` (${modifiers.join("; ")})`:""}`}function formatCustomTrigger(trigger){let minimum=trigger.minimum?`; minimum ${trigger.minimum.output} >= ${trigger.minimum.threshold}`:"";return trigger.type==="anomaly"?`${trigger.output} anomaly at ${trigger.standardDeviations} standard deviations${minimum}`:`${trigger.output} ${formatOperator(trigger.operator)} ${trigger.threshold}${minimum}`}function formatCustomCondition(rule){if(!rule.querySupported)return"Query unavailable via API";let query=rule.evaluation.query,output=query.outputs[0];return`${query.formulas?.[output]?`${output} = ${query.formulas[output]}`:query.metrics[output]?formatMetricSelection(query.metrics[output]):output}; ${formatCustomTrigger(rule.trigger)}; ${rule.evaluation.window}`}function formatBuiltInCondition(rule){return`${rule.triggers.mode==="all"?"all triggers":rule.triggers.items.map(trigger=>humanizeReference(trigger.type)).join(", ")}; minimum ${rule.matchMinimumSeverityLevel}`}function formatRuleCondition(rule){return rule.type==="built-in"?formatBuiltInCondition(rule):formatCustomCondition(rule)}function printRules(rules){let rows=[["Name","Rule ID","Type","Scope","Condition"].map(header=>import_chalk.default.cyan(header)),...rules.map(rule=>[import_chalk.default.bold(truncateEnd(rule.name,36)),import_chalk.default.dim(rule.id),rule.isDefault?`${rule.type} (default)`:rule.type,truncateMiddle(formatPublicRuleScope(rule),38),truncateEnd(formatRuleCondition(rule),72)])];output_manager_default.print(`
7
+ import{humanizeReference,renderAlertTable}from"./chunk-7PNYOSDU.js";import{formatDate}from"./chunk-W26LLGQV.js";import{truncateEnd,truncateMiddle}from"./chunk-MBL6TXEJ.js";import{buildCommandWithGlobalFlags}from"./chunk-KCARCOP5.js";import{quoteArg}from"./chunk-BKV35LVB.js";import{printAlignedLabel}from"./chunk-YMM3VY3J.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1);function formatBoolean(value){return value?"yes":"no"}function formatOperator(operator){return{gt:">",gte:">=",lt:"<",lte:"<="}[operator]??operator}function formatPublicRuleScope(rule){let scope=rule.ruleScope;return scope.type==="all"?"all projects":scope.type==="project"?`project: ${scope.projectId}`:`${scope.type}: ${scope.projectIds.join(", ")}`}function formatMetricSelection(metric){let modifiers=[metric.per?`per ${metric.per}`:void 0,metric.normalize?`normalize ${metric.normalize}`:void 0,metric.dimensions?.length?`dimensions ${metric.dimensions.join(", ")}`:void 0].filter(Boolean);return`${metric.aggregation} ${metric.metric}${modifiers.length?` (${modifiers.join("; ")})`:""}`}function formatCustomTrigger(trigger){let minimum=trigger.minimum?`; minimum ${trigger.minimum.output} >= ${trigger.minimum.threshold}`:"";return trigger.type==="anomaly"?`${trigger.output} anomaly at ${trigger.standardDeviations} standard deviations${minimum}`:`${trigger.output} ${formatOperator(trigger.operator)} ${trigger.threshold}${minimum}`}function formatCustomCondition(rule){if(!rule.querySupported)return"Query unavailable via API";let query=rule.evaluation.query,output=query.outputs[0];return`${query.formulas?.[output]?`${output} = ${query.formulas[output]}`:query.metrics[output]?formatMetricSelection(query.metrics[output]):output}; ${formatCustomTrigger(rule.trigger)}; ${rule.evaluation.window}`}function formatBuiltInCondition(rule){return`${rule.triggers.mode==="all"?"all triggers":rule.triggers.items.map(trigger=>humanizeReference(trigger.type)).join(", ")}; minimum ${rule.matchMinimumSeverityLevel}`}function formatRuleCondition(rule){return rule.type==="built-in"?formatBuiltInCondition(rule):formatCustomCondition(rule)}function printRules(rules){let rows=[["Name","Rule ID","Type","Scope","Condition"].map(header=>import_chalk.default.cyan(header)),...rules.map(rule=>[import_chalk.default.bold(truncateEnd(rule.name,36)),import_chalk.default.dim(rule.id),rule.isDefault?`${rule.type} (default)`:rule.type,truncateMiddle(formatPublicRuleScope(rule),38),truncateEnd(formatRuleCondition(rule),72)])];output_manager_default.print(`
8
8
  ${renderAlertTable(rows,2)}
9
9
  `)}function commonRows(rule){return[["Name",rule.name],["Rule ID",rule.id],["Type",rule.type],["Scope",formatPublicRuleScope(rule)],["Default",formatBoolean(rule.isDefault)],...rule.createdAt?[["Created",formatDate(rule.createdAt)]]:[],...rule.updatedAt?[["Updated",formatDate(rule.updatedAt)]]:[]]}function notificationRows(rule){return[["Team owner notifications",formatBoolean(rule.notificationSettings.enableTeamOwnerNotifications)],...rule.notificationSettings.incidentIoRoutingKey?[["Incident.io routing key",rule.notificationSettings.incidentIoRoutingKey]]:[]]}function printBuiltInRule(rule){output_manager_default.print(`${import_chalk.default.cyan("Built-in conditions")}
10
10
 
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{resolveProjectContext}from"./chunk-ZWYU5SBC.js";import{AGENT_REASON,AGENT_STATUS}from"./chunk-WUH5HYCX.js";import{detectExplicitScope}from"./chunk-4OKKSZVX.js";import{printError}from"./chunk-N5AIKGEO.js";import{getProjectByNameOrId}from"./chunk-RLCFE3MK.js";import{buildCommandWithGlobalFlags,getErrorRecovery,outputActionRequired,outputAgentError}from"./chunk-KCARCOP5.js";import{ProjectNotFound,isAPIError}from"./chunk-RINZXCDJ.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";function messageFor(err){return isAPIError(err)?err.serverMessage||err.message:err instanceof Error?err.message:String(err)}function handleTracingApiError(client,err){if(client.nonInteractive){let apiError=isAPIError(err)?err:void 0,status=apiError?.status;outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:status===403?AGENT_REASON.PERMISSION_DENIED:status===404?AGENT_REASON.NOT_FOUND:status===429?AGENT_REASON.RATE_LIMITED:AGENT_REASON.API_ERROR,message:messageFor(err),...apiError?.status===429&&getErrorRecovery(apiError,client)})}return isAPIError(err)&&err.status===403?(output_manager_default.error(messageFor(err)),1):(printError(err),1)}function configError(client,reason,message){return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason,message}),output_manager_default.error(message),1}function invalidArguments(client,message){return configError(client,AGENT_REASON.INVALID_ARGUMENTS,message)}function ruleNotFound(client,message){return configError(client,AGENT_REASON.NOT_FOUND,message)}function confirmationRequired(client,message,next){return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.CONFIRMATION_REQUIRED,message,userActionRequired:!0,next}),output_manager_default.error(message),1}var MISSING_BOTH_MESSAGE="No linked project found. Run `vercel link`, pass --cwd to a linked dir, or use --scope <team> and --project <name>.";async function resolveScope({client,flags={},linkedProject}){let flagScope=flags.scope?.trim()||void 0,flagProject=flags.project?.trim()||void 0;if(linkedProject.status==="linked"){if(!flagScope&&!flagProject)return{teamId:linkedProject.org.id,projectId:linkedProject.project.id};let teamId=flagScope?client.config.currentTeam:linkedProject.org.id;if(!teamId)return{reason:AGENT_REASON.NOT_FOUND,message:`Team not found: ${flagScope}`};let project=await getProjectByNameOrId(client,flagProject??linkedProject.project.id,teamId);return project instanceof ProjectNotFound?{reason:AGENT_REASON.NOT_FOUND,message:`Project not found: ${flagProject}`}:{teamId,projectId:project.id}}if(flagScope&&flagProject){let teamId=client.config.currentTeam;if(!teamId)return{reason:AGENT_REASON.NOT_FOUND,message:`Team not found: ${flagScope}`};let project=await getProjectByNameOrId(client,flagProject,teamId);return project instanceof ProjectNotFound?{reason:AGENT_REASON.NOT_FOUND,message:`Project not found: ${flagProject}`}:{teamId,projectId:project.id}}return{reason:AGENT_REASON.NOT_LINKED,message:MISSING_BOTH_MESSAGE}}async function resolveConfigScope(client,flags){let link=await resolveProjectContext({client,projectNameOrId:flags.project});return link.status==="error"?{exitCode:link.exitCode}:link.status==="not_linked"?(outputActionRequired(client,{status:AGENT_STATUS.ACTION_REQUIRED,reason:AGENT_REASON.NOT_LINKED,message:MISSING_BOTH_MESSAGE,hint:"Link a project or pass --scope and --project.",next:[{command:buildCommandWithGlobalFlags(client.argv,"link"),when:"link this directory to a project"}]}),output_manager_default.error(MISSING_BOTH_MESSAGE),{exitCode:1}):flags.project===void 0&&detectExplicitScope(client)&&link.org.id!==client.config.currentTeam?{exitCode:invalidArguments(client,`The linked project ${link.project.name} belongs to ${link.org.slug||link.org.id}, which is not the scope that was passed. Pass --project <name> to act on a project in that scope.`)}:{teamId:link.org.id,projectId:link.project.id}}export{resolveScope,handleTracingApiError,invalidArguments,ruleNotFound,confirmationRequired,resolveConfigScope};
7
+ import{resolveProjectContext}from"./chunk-GBWSLOL5.js";import{AGENT_REASON,AGENT_STATUS}from"./chunk-EMDAZAWN.js";import{detectExplicitScope}from"./chunk-ROQLVSZT.js";import{printError}from"./chunk-IMN3Z3VV.js";import{getProjectByNameOrId}from"./chunk-TKNV5ONT.js";import{buildCommandWithGlobalFlags,getErrorRecovery,outputActionRequired,outputAgentError}from"./chunk-KCARCOP5.js";import{ProjectNotFound,isAPIError}from"./chunk-RINZXCDJ.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";function messageFor(err){return isAPIError(err)?err.serverMessage||err.message:err instanceof Error?err.message:String(err)}function handleTracingApiError(client,err){if(client.nonInteractive){let apiError=isAPIError(err)?err:void 0,status=apiError?.status;outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:status===403?AGENT_REASON.PERMISSION_DENIED:status===404?AGENT_REASON.NOT_FOUND:status===429?AGENT_REASON.RATE_LIMITED:AGENT_REASON.API_ERROR,message:messageFor(err),...apiError?.status===429&&getErrorRecovery(apiError,client)})}return isAPIError(err)&&err.status===403?(output_manager_default.error(messageFor(err)),1):(printError(err),1)}function configError(client,reason,message){return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason,message}),output_manager_default.error(message),1}function invalidArguments(client,message){return configError(client,AGENT_REASON.INVALID_ARGUMENTS,message)}function ruleNotFound(client,message){return configError(client,AGENT_REASON.NOT_FOUND,message)}function confirmationRequired(client,message,next){return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.CONFIRMATION_REQUIRED,message,userActionRequired:!0,next}),output_manager_default.error(message),1}var MISSING_BOTH_MESSAGE="No linked project found. Run `vercel link`, pass --cwd to a linked dir, or use --scope <team> and --project <name>.";async function resolveScope({client,flags={},linkedProject}){let flagScope=flags.scope?.trim()||void 0,flagProject=flags.project?.trim()||void 0;if(linkedProject.status==="linked"){if(!flagScope&&!flagProject)return{teamId:linkedProject.org.id,projectId:linkedProject.project.id};let teamId=flagScope?client.config.currentTeam:linkedProject.org.id;if(!teamId)return{reason:AGENT_REASON.NOT_FOUND,message:`Team not found: ${flagScope}`};let project=await getProjectByNameOrId(client,flagProject??linkedProject.project.id,teamId);return project instanceof ProjectNotFound?{reason:AGENT_REASON.NOT_FOUND,message:`Project not found: ${flagProject}`}:{teamId,projectId:project.id}}if(flagScope&&flagProject){let teamId=client.config.currentTeam;if(!teamId)return{reason:AGENT_REASON.NOT_FOUND,message:`Team not found: ${flagScope}`};let project=await getProjectByNameOrId(client,flagProject,teamId);return project instanceof ProjectNotFound?{reason:AGENT_REASON.NOT_FOUND,message:`Project not found: ${flagProject}`}:{teamId,projectId:project.id}}return{reason:AGENT_REASON.NOT_LINKED,message:MISSING_BOTH_MESSAGE}}async function resolveConfigScope(client,flags){let link=await resolveProjectContext({client,projectNameOrId:flags.project});return link.status==="error"?{exitCode:link.exitCode}:link.status==="not_linked"?(outputActionRequired(client,{status:AGENT_STATUS.ACTION_REQUIRED,reason:AGENT_REASON.NOT_LINKED,message:MISSING_BOTH_MESSAGE,hint:"Link a project or pass --scope and --project.",next:[{command:buildCommandWithGlobalFlags(client.argv,"link"),when:"link this directory to a project"}]}),output_manager_default.error(MISSING_BOTH_MESSAGE),{exitCode:1}):flags.project===void 0&&detectExplicitScope(client)&&link.org.id!==client.config.currentTeam?{exitCode:invalidArguments(client,`The linked project ${link.project.name} belongs to ${link.org.slug||link.org.id}, which is not the scope that was passed. Pass --project <name> to act on a project in that scope.`)}:{teamId:link.org.id,projectId:link.project.id}}export{resolveScope,handleTracingApiError,invalidArguments,ruleNotFound,confirmationRequired,resolveConfigScope};
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
- import{require_dist2 as require_dist}from"./chunk-JMNAVONO.js";import{require_frameworks}from"./chunk-KK4AJES5.js";import{__toESM}from"./chunk-6L236MNA.js";var import_frameworks=__toESM(require_frameworks(),1),import_fs_detectors=__toESM(require_dist(),1);import{join}from"path";async function detectProjects(cwd){let fs=new import_fs_detectors.LocalFileSystemDetector(cwd),workspaces=await(0,import_fs_detectors.getWorkspaces)({fs}),detectedProjects=new Map,packagePaths=(await Promise.all(workspaces.map(workspace=>(0,import_fs_detectors.getWorkspacePackagePaths)({fs,workspace})))).flat();return packagePaths.length===0&&packagePaths.push("/"),await Promise.all(packagePaths.map(async p=>{let frameworks=await(0,import_fs_detectors.detectFrameworks)({fs:fs.chdir(join(".",p)),frameworkList:import_frameworks.frameworkList});frameworks.length!==0&&detectedProjects.set(p.slice(1),frameworks)})),detectedProjects}export{detectProjects};
7
+ import{require_dist2 as require_dist}from"./chunk-DT3EUC6S.js";import{require_frameworks}from"./chunk-23NBYS6R.js";import{__toESM}from"./chunk-6L236MNA.js";var import_frameworks=__toESM(require_frameworks(),1),import_fs_detectors=__toESM(require_dist(),1);import{join}from"path";async function detectProjects(cwd){let fs=new import_fs_detectors.LocalFileSystemDetector(cwd),workspaces=await(0,import_fs_detectors.getWorkspaces)({fs}),detectedProjects=new Map,packagePaths=(await Promise.all(workspaces.map(workspace=>(0,import_fs_detectors.getWorkspacePackagePaths)({fs,workspace})))).flat();return packagePaths.length===0&&packagePaths.push("/"),await Promise.all(packagePaths.map(async p=>{let frameworks=await(0,import_fs_detectors.detectFrameworks)({fs:fs.chdir(join(".",p)),frameworkList:import_frameworks.frameworkList});frameworks.length!==0&&detectedProjects.set(p.slice(1),frameworks)})),detectedProjects}export{detectProjects};