@vercel/cli-support 65.6.0-snapshot-1ef3a0de66d0 → 65.6.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 (174) hide show
  1. package/dist/chunks/{add-6UOKR26K.js → add-7G5PAIUN.js} +1 -1
  2. package/dist/chunks/{add-RPAOJH5O.js → add-LA2T477X.js} +1 -1
  3. package/dist/chunks/{add-GULZ6EGJ.js → add-TPDABQQA.js} +1 -1
  4. package/dist/chunks/{build-MLAKPRSC.js → build-A463NBA2.js} +1 -1
  5. package/dist/chunks/{chunk-CU2FTX57.js → chunk-2H4UEVTG.js} +1 -1
  6. package/dist/chunks/{chunk-L4XLDN6T.js → chunk-2KINJIWA.js} +1 -1
  7. package/dist/chunks/{chunk-5K426HWC.js → chunk-3DFEM7ZL.js} +1 -1
  8. package/dist/chunks/{chunk-JXAEI2GJ.js → chunk-3UD4MZMH.js} +1 -1
  9. package/dist/chunks/{chunk-7G4PQR6J.js → chunk-43WS2YU4.js} +1 -1
  10. package/dist/chunks/{chunk-2QIJEHNE.js → chunk-4KO6U4CW.js} +2 -2
  11. package/dist/chunks/{chunk-YIRSRF6D.js → chunk-4P6IRBBK.js} +1 -1
  12. package/dist/chunks/{chunk-ZUYPTLVO.js → chunk-5ULKEPKM.js} +1 -1
  13. package/dist/chunks/{chunk-ZUNQHI5Y.js → chunk-6GSI4VMJ.js} +1 -1
  14. package/dist/chunks/{chunk-DAUAVRFC.js → chunk-7CNJTFWP.js} +1 -1
  15. package/dist/chunks/{chunk-SW3JRXUW.js → chunk-A4UOBMZR.js} +1 -1
  16. package/dist/chunks/{chunk-4G7ZQONX.js → chunk-A7E3WORN.js} +1 -1
  17. package/dist/chunks/{chunk-QUSEBFDO.js → chunk-CNE5UGJC.js} +1 -1
  18. package/dist/chunks/{chunk-HVDGNAPM.js → chunk-DCX2PBSX.js} +1 -1
  19. package/dist/chunks/{chunk-MZQEDXOH.js → chunk-DFXYDOFX.js} +2 -2
  20. package/dist/chunks/{chunk-5WYPJ2T5.js → chunk-E32IBIXV.js} +2 -2
  21. package/dist/chunks/{chunk-3NG2EYQ5.js → chunk-EOK43KMC.js} +1 -1
  22. package/dist/chunks/{chunk-CWO4HMKU.js → chunk-F6MHQRDG.js} +1 -1
  23. package/dist/chunks/{chunk-YALEYPMP.js → chunk-FN3W5CJQ.js} +1 -1
  24. package/dist/chunks/{chunk-R3BEQTZZ.js → chunk-FSBAVQQP.js} +1 -1
  25. package/dist/chunks/{chunk-JSAY52FE.js → chunk-FVIVFDCB.js} +1 -1
  26. package/dist/chunks/{chunk-ORJBK5FT.js → chunk-G62JX3C5.js} +1 -1
  27. package/dist/chunks/{chunk-ODAV7Z2H.js → chunk-GAGROISK.js} +1 -1
  28. package/dist/chunks/{chunk-WICRM2JL.js → chunk-GKCTMBCM.js} +1 -1
  29. package/dist/chunks/{chunk-JMLKK7RL.js → chunk-GTHPBDPB.js} +2 -2
  30. package/dist/chunks/{chunk-NZPGWZLV.js → chunk-H3E4YX2M.js} +1 -1
  31. package/dist/chunks/{chunk-PRFIFS3Q.js → chunk-HKZKGIBQ.js} +1 -1
  32. package/dist/chunks/chunk-HNNCK5KD.js +13 -0
  33. package/dist/chunks/{chunk-FAEC4BER.js → chunk-HOOQ7ZMB.js} +1 -1
  34. package/dist/chunks/{chunk-AOC6XXOO.js → chunk-HTOZY5SI.js} +1 -1
  35. package/dist/chunks/{chunk-LT5UZRMK.js → chunk-I64T5ZML.js} +1 -1
  36. package/dist/chunks/chunk-I7U2XP4X.js +10 -0
  37. package/dist/chunks/{chunk-RWPQOJTT.js → chunk-I7YEXDVF.js} +1 -1
  38. package/dist/chunks/{chunk-PHHZ6J7Q.js → chunk-IEZKTS2C.js} +1 -1
  39. package/dist/chunks/{chunk-ARQMFBV4.js → chunk-IUMJJFEP.js} +1 -1
  40. package/dist/chunks/{chunk-JGMJP4T3.js → chunk-JPEIHA57.js} +1 -1
  41. package/dist/chunks/{chunk-CLVEFWEX.js → chunk-JW57JYRO.js} +1 -1
  42. package/dist/chunks/{chunk-VUQWLLNI.js → chunk-KBFHUWSQ.js} +1 -1
  43. package/dist/chunks/{chunk-JWUXHL35.js → chunk-LAINBICC.js} +1 -1
  44. package/dist/chunks/{chunk-VQ755MPP.js → chunk-LCMNJNSQ.js} +1 -1
  45. package/dist/chunks/{chunk-IC3THLYP.js → chunk-LIXU6EGC.js} +1 -1
  46. package/dist/chunks/{chunk-SDOPVIKJ.js → chunk-MJ7JIQL3.js} +1 -1
  47. package/dist/chunks/{chunk-WDUHDLUA.js → chunk-MMKG5W42.js} +1 -1
  48. package/dist/chunks/{chunk-XAU3KTPX.js → chunk-MYTOHLYZ.js} +1 -1
  49. package/dist/chunks/{chunk-GP55VEOQ.js → chunk-N36OHJVQ.js} +1 -1
  50. package/dist/chunks/{chunk-6WMO5G45.js → chunk-OEPDTNS3.js} +1 -1
  51. package/dist/chunks/{chunk-EFEQQXRU.js → chunk-OGSTNJJ5.js} +1 -1
  52. package/dist/chunks/{chunk-ED3VA7D4.js → chunk-OORHGYZ3.js} +1 -1
  53. package/dist/chunks/{chunk-ZQUVDDPB.js → chunk-OS5I5TXU.js} +1 -1
  54. package/dist/chunks/{chunk-JHNLBVO2.js → chunk-QBP6E2YB.js} +1 -1
  55. package/dist/chunks/{chunk-NVNE3W7S.js → chunk-QDQ4NHQN.js} +1 -1
  56. package/dist/chunks/{chunk-OQX4YVGU.js → chunk-QFUCWOCL.js} +1 -1
  57. package/dist/chunks/{chunk-GFD6UAAO.js → chunk-QRYQADGN.js} +1 -1
  58. package/dist/chunks/{chunk-WSVYZKI6.js → chunk-RD2VHI66.js} +1 -1
  59. package/dist/chunks/{chunk-36NK2Z3C.js → chunk-RNTS4MJP.js} +1 -1
  60. package/dist/chunks/{chunk-JCGEXU7T.js → chunk-RQYXFSED.js} +2 -2
  61. package/dist/chunks/{chunk-ETEVOJQJ.js → chunk-S22GZWJS.js} +1 -1
  62. package/dist/chunks/{chunk-MLGQ233X.js → chunk-S52O6DKC.js} +1 -1
  63. package/dist/chunks/{chunk-NM44RWS6.js → chunk-SAUBWYQJ.js} +1 -1
  64. package/dist/chunks/{chunk-5EMSOR2P.js → chunk-SKDLXVRO.js} +1 -1
  65. package/dist/chunks/{chunk-AIRQFG5A.js → chunk-SXRZZDON.js} +1 -1
  66. package/dist/chunks/{chunk-VLYVVC3P.js → chunk-TKKGZI7O.js} +5 -5
  67. package/dist/chunks/{chunk-4HJGSSSZ.js → chunk-TYL6IYR4.js} +1 -1
  68. package/dist/chunks/{chunk-I2WEQWCA.js → chunk-UWGWRZP5.js} +1 -1
  69. package/dist/chunks/chunk-V6NMCQUQ.js +7 -0
  70. package/dist/chunks/chunk-VH5Z5VHD.js +10 -0
  71. package/dist/chunks/{chunk-QDPYU6KS.js → chunk-VKJVYR4T.js} +1 -1
  72. package/dist/chunks/chunk-WRHQTUHU.js +8 -0
  73. package/dist/chunks/{chunk-TGOGYSBO.js → chunk-WZAJYSJZ.js} +1 -1
  74. package/dist/chunks/{chunk-KWKEBKUR.js → chunk-X4K3UJN7.js} +1 -1
  75. package/dist/chunks/{clear-UZWOOGOH.js → clear-ISIDZTUZ.js} +1 -1
  76. package/dist/chunks/{compile-vercel-config-2RQDL3RD.js → compile-vercel-config-CZVX4OWQ.js} +1 -1
  77. package/dist/chunks/{config-RMJWRS7O.js → config-GMCTHBY6.js} +1 -1
  78. package/dist/chunks/{config-C76IGJ6B.js → config-MAFBMJV3.js} +1 -1
  79. package/dist/chunks/config-validator.mjs +1 -1
  80. package/dist/chunks/{delete-OKOBDL7Z.js → delete-LLQFSC7R.js} +1 -1
  81. package/dist/chunks/{delete-2WBR5JQW.js → delete-PIFKRZEO.js} +1 -1
  82. package/dist/chunks/{detect-projects-XPB3R7VS.js → detect-projects-EYF4ZSYF.js} +1 -1
  83. package/dist/chunks/{detect-services-DRHV22O5.js → detect-services-LNYPPBJP.js} +1 -1
  84. package/dist/chunks/{disable-DFEABU2Z.js → disable-7JLE53D2.js} +1 -1
  85. package/dist/chunks/{discard-KGBEMNFT.js → discard-EXDT6QIK.js} +1 -1
  86. package/dist/chunks/{edit-5XIRLUKG.js → edit-3NOKVF5V.js} +1 -1
  87. package/dist/chunks/{edit-PJIDMKUS.js → edit-BQCPB3ZR.js} +1 -1
  88. package/dist/chunks/{enable-UDWDPFOI.js → enable-KYVZIXZM.js} +1 -1
  89. package/dist/chunks/{export-W75EA6EQ.js → export-4RZRCFX7.js} +1 -1
  90. package/dist/chunks/{fetch-proxy-45DGILKR.js → fetch-proxy-MOKBS56A.js} +1 -1
  91. package/dist/chunks/{future-PHSAEQIE.js → future-YZGJX6FF.js} +1 -1
  92. package/dist/chunks/{generate-cert-for-deploy-C67VL5Z6.js → generate-cert-for-deploy-I236CHA2.js} +1 -1
  93. package/dist/chunks/{image-U5CV2PRP.js → image-EIMVSQLG.js} +1 -1
  94. package/dist/chunks/{import-builders-PHIIX7HW.js → import-builders-JEJRMLNC.js} +1 -1
  95. package/dist/chunks/{inspect-DQQI3PM7.js → inspect-2SCDEURI.js} +1 -1
  96. package/dist/chunks/{inspect-AU3MX7E2.js → inspect-BMBFYISW.js} +1 -1
  97. package/dist/chunks/{inspect-RNWLPR7I.js → inspect-IOKO45PV.js} +1 -1
  98. package/dist/chunks/{inspect-LJK7I6RZ.js → inspect-P246VXF5.js} +1 -1
  99. package/dist/chunks/{inspect-WHPWW4BI.js → inspect-UJAAVGJT.js} +1 -1
  100. package/dist/chunks/{list-QNRFVMMQ.js → list-34Z62YFO.js} +1 -1
  101. package/dist/chunks/{list-JV26NNYL.js → list-PC4ZVIHQ.js} +1 -1
  102. package/dist/chunks/{list-YF4FXWUZ.js → list-WL3WA7CS.js} +1 -1
  103. package/dist/chunks/{login-A4KNOUNA.js → login-BOBO3TKA.js} +1 -1
  104. package/dist/chunks/{login-COGE7JQU.js → login-RAN3UBFA.js} +1 -1
  105. package/dist/chunks/{logs-KMQATUYR.js → logs-L3VFH7SK.js} +1 -1
  106. package/dist/chunks/{ls-HMYU2ZGA.js → ls-FKECGTP3.js} +1 -1
  107. package/dist/chunks/{ls-DTFLHFOW.js → ls-FL3FCE2T.js} +1 -1
  108. package/dist/chunks/{ls-IHF33MQP.js → ls-HQHXDVPG.js} +1 -1
  109. package/dist/chunks/{ls-RNRMYD3V.js → ls-MDTI26PW.js} +1 -1
  110. package/dist/chunks/{ls-ZQLCDIQJ.js → ls-NQVH63KO.js} +1 -1
  111. package/dist/chunks/{ls-QD54I4S7.js → ls-PQBYVYPW.js} +1 -1
  112. package/dist/chunks/{ls-FOKMPVIB.js → ls-ZK5ESMRT.js} +1 -1
  113. package/dist/chunks/{mutate-RMIFQOF6.js → mutate-6OEPBAJF.js} +1 -1
  114. package/dist/chunks/{notifications-BFBNV2HY.js → notifications-A46PC7QX.js} +1 -1
  115. package/dist/chunks/{open-L6HEXHAI.js → open-QWJQWDZD.js} +1 -1
  116. package/dist/chunks/{openapi-6JKCOR7K.js → openapi-5QWHDLKR.js} +1 -1
  117. package/dist/chunks/{permissions-UYGTYRKA.js → permissions-MCOS247Q.js} +1 -1
  118. package/dist/chunks/{plugin-offer-NBHRXMNR.js → plugin-offer-ZMTZG6FR.js} +1 -1
  119. package/dist/chunks/{prompt-missing-credentials-2IYIF2JI.js → prompt-missing-credentials-AUJFBZRC.js} +1 -1
  120. package/dist/chunks/{publish-T2VSTPG4.js → publish-CQ5FHKNN.js} +1 -1
  121. package/dist/chunks/{pull-4GL47Z2S.js → pull-RVNTGJ4C.js} +1 -1
  122. package/dist/chunks/{purchase-domain-if-available-BHFBD3LW.js → purchase-domain-if-available-6FAGFFWC.js} +1 -1
  123. package/dist/chunks/{push-CQPIDVTL.js → push-IBOUSKO7.js} +1 -1
  124. package/dist/chunks/{query-HN45ORIB.js → query-OG4FG2AO.js} +1 -1
  125. package/dist/chunks/{reauthenticate-FTHGAWK3.js → reauthenticate-TVQDXIFS.js} +1 -1
  126. package/dist/chunks/{reorder-7BD5JZKQ.js → reorder-LWKTDFSH.js} +1 -1
  127. package/dist/chunks/{reply-2INQJ5KM.js → reply-5CE2KUD7.js} +1 -1
  128. package/dist/chunks/{resolve-DHAJC3I7.js → resolve-S35UEM35.js} +1 -1
  129. package/dist/chunks/{resolve-agent-team-KGYPHN5F.js → resolve-agent-team-DXHF7XLU.js} +1 -1
  130. package/dist/chunks/{restore-OQKNWEFQ.js → restore-K66POLY7.js} +1 -1
  131. package/dist/chunks/{rm-CTP4UZH7.js → rm-6PBYTCDC.js} +1 -1
  132. package/dist/chunks/{rm-OG3OXA6H.js → rm-C4FXH2RT.js} +1 -1
  133. package/dist/chunks/{rm-GFHEXQQW.js → rm-C73EKJS4.js} +1 -1
  134. package/dist/chunks/{rm-PFZYHXEN.js → rm-MNT5XIGK.js} +1 -1
  135. package/dist/chunks/{rm-XAW3WJ3I.js → rm-VJOHV243.js} +1 -1
  136. package/dist/chunks/{routes-XKEWEA3P.js → routes-LQGTKBXU.js} +1 -1
  137. package/dist/chunks/{rule-inspect-MKQE5IVJ.js → rule-inspect-4EBB5IDK.js} +1 -1
  138. package/dist/chunks/{schema-TFN5PSYE.js → schema-H5RRV4J3.js} +1 -1
  139. package/dist/chunks/{schema-XFER2RCF.js → schema-S32JRZH5.js} +1 -1
  140. package/dist/chunks/{select-org-PFTR6HQZ.js → select-org-VTLOMQYC.js} +1 -1
  141. package/dist/chunks/{set-KWOZNGRL.js → set-52J54LJU.js} +1 -1
  142. package/dist/chunks/{setup-and-link-BRYK42L7.js → setup-and-link-XGBTMVW7.js} +1 -1
  143. package/dist/chunks/{skills-2MOFBKIE.js → skills-CY57F35A.js} +1 -1
  144. package/dist/chunks/{tags-BHZUQTOQ.js → tags-WAVSTC2G.js} +1 -1
  145. package/dist/chunks/{types-IWO5QLAV.js → types-EK3C4EHF.js} +1 -1
  146. package/dist/chunks/{update-LP7ZZUFZ.js → update-4LNUD2AB.js} +1 -1
  147. package/dist/commands/build/index.js +1 -1
  148. package/dist/commands/deploy/index.js +9 -6
  149. package/dist/commands/dev/index.js +3 -3
  150. package/dist/commands/env/index.js +1 -1
  151. package/dist/commands/link/index.js +1 -1
  152. package/dist/commands/list/index.js +1 -1
  153. package/dist/commands/project/index.js +1 -1
  154. package/dist/commands-account.js +7 -3
  155. package/dist/commands-ai.js +3 -3
  156. package/dist/commands-blob.js +1 -1
  157. package/dist/commands-core.js +26 -14
  158. package/dist/commands-deployments.js +1 -1
  159. package/dist/commands-flags.js +1 -1
  160. package/dist/commands-integrations.js +1 -1
  161. package/dist/commands-observability.js +2 -2
  162. package/dist/commands-routing.js +2 -2
  163. package/dist/index.js +5 -5
  164. package/dist/internal-build.js +2 -2
  165. package/dist/native-download.js +2 -1
  166. package/dist/package.json +58 -58
  167. package/dist/vc.js +26 -7
  168. package/dist/version.mjs +1 -1
  169. package/package.json +51 -51
  170. package/dist/chunks/chunk-6IATT2ID.js +0 -8
  171. package/dist/chunks/chunk-EE2FTI3R.js +0 -7
  172. package/dist/chunks/chunk-EWP5WICJ.js +0 -10
  173. package/dist/chunks/chunk-XE24Y6NM.js +0 -10
  174. package/dist/chunks/chunk-YQDOADMG.js +0 -10
@@ -4,5 +4,5 @@ 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{getTeams}from"./chunk-P6ZTEDX2.js";import{param}from"./chunk-3G3FQYMW.js";import{outputActionRequired}from"./chunk-XE24Y6NM.js";import{getUser}from"./chunk-VLYVVC3P.js";import{printAlignedLabel}from"./chunk-26QK3I2S.js";import{getCommandName,packageName}from"./chunk-JESNVRVR.js";import{emoji,output_manager_default,require_build_utils}from"./chunk-DWOJP4ST.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var import_build_utils=__toESM(require_build_utils(),1);function getScopeOrTeamFromArgv(argv){let args=argv.slice(2);for(let i=0;i<args.length;i++){let arg=args[i];if(arg==="--scope"||arg==="--team"||arg==="-S"||arg==="-T"){let next=args[i+1];if(typeof next=="string"&&!next.startsWith("-"))return next;continue}if(arg.startsWith("--scope="))return arg.slice(8);if(arg.startsWith("--team="))return arg.slice(7)}return null}async function selectOrg(client,question,autoConfirm,searchable=!1,meta,description){let{config:{currentTeam}}=client;output_manager_default.spinner("Loading teams\u2026",1e3);let user,teams;try{[user,teams]=await Promise.all([getUser(client),getTeams(client)])}finally{output_manager_default.stopSpinner()}let formatChoiceName=(name,slug,isCurrent,limited)=>{let title=`${name} (${slug})`;return isCurrent&&(title+=` ${import_chalk.default.bold("(current)")}`),limited&&(title+=` ${emoji("locked")}`),title},personalAccountChoice=user.version==="northstar"?[]:[{name:formatChoiceName(user.name||user.username,user.username,!currentTeam,user.limited),value:{type:"user",id:user.id,slug:user.username}}],orderedTeams=client.ignoresSavedTeam?teams:teams.sort(a=>a.id===user.defaultTeamId?-1:1),choices=[...personalAccountChoice,...orderedTeams.map(team=>({name:formatChoiceName(team.name||team.slug,team.slug,team.id===currentTeam,team.limited),value:{type:"team",id:team.id,slug:team.slug}}))],defaultChoiceIndex=Math.max(choices.findIndex(choice=>choice.value.id===currentTeam),0);meta&&(meta.choiceCount=choices.length);let localConfigScope=client.localConfig?.scope,explicitScope=getScopeOrTeamFromArgv(client.argv)??(typeof localConfigScope=="string"?localConfigScope:null)??(0,import_build_utils.getPlatformEnv)("ORG_ID")??null,matchExplicitScope=()=>{if(!explicitScope)return;let match=choices.find(c=>c.value.id===explicitScope||c.value.slug===explicitScope);if(match)return match.value;if(user.id===explicitScope||user.email===explicitScope||user.username===explicitScope)return choices.find(c=>c.value.type==="user")?.value};if(client.nonInteractive||!client.stdin.isTTY){let match=matchExplicitScope();if(match)return match;if(choices.length===1)return choices[0].value;let actionRequired={status:"action_required",reason:"missing_scope",message:choices.length>0?"Provide --scope explicitly. No default is applied in non-interactive mode.":"No teams available.",...choices.length>0&&{userActionRequired:!0,hint:"Ask the user which team to use, then run the matching command in next[]. Do not choose a team yourself."},choices:choices.map(c=>({id:c.value.id,name:c.value.slug})),next:choices.map(c=>({command:`${packageName} link --scope ${c.value.slug}`}))};outputActionRequired(client,actionRequired),output_manager_default.error(choices.length>0?`Multiple teams found. Teams are never auto-selected when the CLI runs without an interactive terminal. Re-run this command with ${param("--scope <slug>")}, or run ${getCommandName("teams ls")} to list your teams.`:"No teams available."),process.exit(1)}let explicitOrg=matchExplicitScope();if(explicitOrg)return explicitOrg;if(choices.length===1)return printAlignedLabel("Team",choices[0].value.slug),choices[0].value;let descriptionLine=description?`
7
+ import{getTeams}from"./chunk-P6ZTEDX2.js";import{param}from"./chunk-3G3FQYMW.js";import{outputActionRequired}from"./chunk-I7U2XP4X.js";import{getUser}from"./chunk-TKKGZI7O.js";import{printAlignedLabel}from"./chunk-26QK3I2S.js";import{getCommandName,packageName}from"./chunk-JESNVRVR.js";import{emoji,output_manager_default,require_build_utils}from"./chunk-DWOJP4ST.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var import_build_utils=__toESM(require_build_utils(),1);function getScopeOrTeamFromArgv(argv){let args=argv.slice(2);for(let i=0;i<args.length;i++){let arg=args[i];if(arg==="--scope"||arg==="--team"||arg==="-S"||arg==="-T"){let next=args[i+1];if(typeof next=="string"&&!next.startsWith("-"))return next;continue}if(arg.startsWith("--scope="))return arg.slice(8);if(arg.startsWith("--team="))return arg.slice(7)}return null}async function selectOrg(client,question,autoConfirm,searchable=!1,meta,description){let{config:{currentTeam}}=client;output_manager_default.spinner("Loading teams\u2026",1e3);let user,teams;try{[user,teams]=await Promise.all([getUser(client),getTeams(client)])}finally{output_manager_default.stopSpinner()}let formatChoiceName=(name,slug,isCurrent,limited)=>{let title=`${name} (${slug})`;return isCurrent&&(title+=` ${import_chalk.default.bold("(current)")}`),limited&&(title+=` ${emoji("locked")}`),title},personalAccountChoice=user.version==="northstar"?[]:[{name:formatChoiceName(user.name||user.username,user.username,!currentTeam,user.limited),value:{type:"user",id:user.id,slug:user.username}}],orderedTeams=client.ignoresSavedTeam?teams:teams.sort(a=>a.id===user.defaultTeamId?-1:1),choices=[...personalAccountChoice,...orderedTeams.map(team=>({name:formatChoiceName(team.name||team.slug,team.slug,team.id===currentTeam,team.limited),value:{type:"team",id:team.id,slug:team.slug}}))],defaultChoiceIndex=Math.max(choices.findIndex(choice=>choice.value.id===currentTeam),0);meta&&(meta.choiceCount=choices.length);let localConfigScope=client.localConfig?.scope,explicitScope=getScopeOrTeamFromArgv(client.argv)??(typeof localConfigScope=="string"?localConfigScope:null)??(0,import_build_utils.getPlatformEnv)("ORG_ID")??null,matchExplicitScope=()=>{if(!explicitScope)return;let match=choices.find(c=>c.value.id===explicitScope||c.value.slug===explicitScope);if(match)return match.value;if(user.id===explicitScope||user.email===explicitScope||user.username===explicitScope)return choices.find(c=>c.value.type==="user")?.value};if(client.nonInteractive||!client.stdin.isTTY){let match=matchExplicitScope();if(match)return match;if(choices.length===1)return choices[0].value;let actionRequired={status:"action_required",reason:"missing_scope",message:choices.length>0?"Provide --scope explicitly. No default is applied in non-interactive mode.":"No teams available.",...choices.length>0&&{userActionRequired:!0,hint:"Ask the user which team to use, then run the matching command in next[]. Do not choose a team yourself."},choices:choices.map(c=>({id:c.value.id,name:c.value.slug})),next:choices.map(c=>({command:`${packageName} link --scope ${c.value.slug}`}))};outputActionRequired(client,actionRequired),output_manager_default.error(choices.length>0?`Multiple teams found. Teams are never auto-selected when the CLI runs without an interactive terminal. Re-run this command with ${param("--scope <slug>")}, or run ${getCommandName("teams ls")} to list your teams.`:"No teams available."),process.exit(1)}let explicitOrg=matchExplicitScope();if(explicitOrg)return explicitOrg;if(choices.length===1)return printAlignedLabel("Team",choices[0].value.slug),choices[0].value;let descriptionLine=description?`
8
8
  ${import_chalk.default.dim(` ${description}`)}`:"";if(!searchable)return await client.input.select({message:`${question}${descriptionLine}`,choices,default:choices[defaultChoiceIndex].value});let defaultChoice=choices[defaultChoiceIndex],initialChoices=defaultChoice?[defaultChoice,...choices.filter(choice=>choice!==defaultChoice)]:choices,pageSize=15,countHint=choices.length>pageSize?` ${import_chalk.default.dim(`(${choices.length} teams)`)}`:"";return await client.input.search({message:`${question}${countHint}${descriptionLine}`,pageSize,source:term=>{let searchTerm=term?.trim().toLowerCase();return searchTerm?choices.filter(choice=>choice.name.toLowerCase().includes(searchTerm)||choice.value.slug.toLowerCase().includes(searchTerm)):initialChoices}})}export{selectOrg};
@@ -4,6 +4,6 @@ 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{RULE_ENVIRONMENTS}from"./chunk-M7LUSXMG.js";import{AGENT_STATUS}from"./chunk-XE24Y6NM.js";import{warnDeprecatedInput}from"./chunk-7SAEZ4NC.js";function writeConfigJson(client,{project,bare,envelope,message,next}){if(!client.nonInteractive){client.stdout.write(`${JSON.stringify(bare,null,2)}
7
+ import{RULE_ENVIRONMENTS}from"./chunk-M7LUSXMG.js";import{AGENT_STATUS}from"./chunk-I7U2XP4X.js";import{warnDeprecatedInput}from"./chunk-7SAEZ4NC.js";function writeConfigJson(client,{project,bare,envelope,message,next}){if(!client.nonInteractive){client.stdout.write(`${JSON.stringify(bare,null,2)}
8
8
  `);return}client.stdout.write(`${JSON.stringify({status:AGENT_STATUS.OK,projectId:project.id,projectName:project.name,...envelope,message,next},null,2)}
9
9
  `)}var RULE_LIMIT=10,MIN_SAMPLE_RATE=1,MAX_SAMPLE_RATE=100;function isRuleEnvironment(value){return RULE_ENVIRONMENTS.includes(value)}var ENVIRONMENT_ERROR=`\`environment\` must be one of: ${RULE_ENVIRONMENTS.join(", ")}.`,RATE_ERROR=`\`rate\` must be a whole number from ${MIN_SAMPLE_RATE} to ${MAX_SAMPLE_RATE}.`,EMPTY_PATH_ERROR="`requestPath` cannot be empty.";function parseSampleRate(value){if(!/^\d+$/.test(value.trim()))return;let rate=Number(value);return rate>=MIN_SAMPLE_RATE&&rate<=MAX_SAMPLE_RATE?rate:void 0}function toRow(rule){return{environment:rule.env??"any",requestPath:rule.requestPath??null,sampleRate:Math.round(rule.rate*100)}}function toApiRate(sampleRate){return sampleRate/100}function toRule(row){return{type:"head_sampling",rate:toApiRate(row.sampleRate),...row.environment==="any"?{}:{env:row.environment},...row.requestPath===null?{}:{requestPath:row.requestPath}}}var ALL_PATHS_LABEL="(all paths)";function formatPath(requestPath){return requestPath??ALL_PATHS_LABEL}function formatRate(sampleRate){return`${sampleRate}%`}function formatRuleTarget(environment,requestPath){return`${environment} ${formatPath(requestPath)}`}function formatRuleLine(row){return`${formatRuleTarget(row.environment,row.requestPath)} ${formatRate(row.sampleRate)}`}var COMMAND_WORD_COUNT=3;function subcommandArguments(positional){return positional.slice(COMMAND_WORD_COUNT)}function resolveRuleEnvironment(client,environmentFlag,args){if(environmentFlag===void 0){let[environment,...rest]=args;return environment!==void 0&&isRuleEnvironment(environment)?(warnDeprecatedInput(client,"The environment argument","--environment"),{environment,args:rest}):{environment:void 0,args}}return args[0]!==void 0&&isRuleEnvironment(args[0])?{error:"Can't use an environment argument with --environment. Use --environment."}:{environment:environmentFlag,args}}function hasSameKey(a,b){return a.environment===b.environment&&a.requestPath===b.requestPath}async function readTracingConfig({client,teamId,projectId,projectName}){let config=await client.fetch(`/v1/drains/tracing/config?${new URLSearchParams({projectId})}`,{accountId:teamId}),sampling=config.enabled&&config.sampling.length===0?[{type:"head_sampling",rate:1}]:config.sampling;return{project:{id:projectId,name:projectName},enabled:config.enabled,entries:sampling.map(rule=>({rule,row:toRow(rule)}))}}async function writeSamplingRules({client,teamId,projectId,rules}){await client.fetch(`/v1/drains/tracing/config?${new URLSearchParams({projectId})}`,{accountId:teamId,method:"PUT",body:{enabled:rules.length>0,...rules.length>0?{sampling:rules}:{}}})}export{writeConfigJson,RULE_LIMIT,isRuleEnvironment,ENVIRONMENT_ERROR,RATE_ERROR,EMPTY_PATH_ERROR,parseSampleRate,toApiRate,toRule,formatPath,formatRate,formatRuleTarget,formatRuleLine,subcommandArguments,resolveRuleEnvironment,hasSameKey,readTracingConfig,writeSamplingRules};
@@ -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-HVDGNAPM.js";import{require_frameworks}from"./chunk-6Y2ZL5XJ.js";import{__toESM}from"./chunk-BZENIQ7N.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-DCX2PBSX.js";import{require_frameworks}from"./chunk-6Y2ZL5XJ.js";import{__toESM}from"./chunk-BZENIQ7N.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};
@@ -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{performDeviceCodeFlow}from"./chunk-RWPQOJTT.js";import{isAPIError}from"./chunk-YCJHUYBJ.js";import{output_manager_default}from"./chunk-DWOJP4ST.js";import{URLSearchParams}from"url";var RECOVERABLE_CHALLENGE_CODES=new Set(["challenge_required","challenge_required_email_otp","user_auth_required"]);async function withEnvChallengeRecovery(client,fn){let hadStoredSession=!!(client.authConfig.token||client.authConfig.refreshToken);try{return await fn()}catch(error){if(!isAPIError(error))throw error;let isRecoverableChallenge=RECOVERABLE_CHALLENGE_CODES.has(error.code),isRejectedStoredSession=hadStoredSession&&error.invalidToken===!0;if(!isRecoverableChallenge&&!isRejectedStoredSession||client.authConfig.tokenSource||!client.stdin.isTTY||client.nonInteractive)throw error;output_manager_default.stopSpinner(),output_manager_default.log("Sensitive Environment Variables require fresh authentication.");let refreshToken=client.authConfig.refreshToken,acrValues=getAcrValuesFromWWWAuthenticate(error.wwwAuthenticate),tokens=isRecoverableChallenge&&refreshToken&&acrValues?await performDeviceCodeFlow(client,{refreshToken,acrValues,fallbackToLoginOnStepUpFailure:!0}):await performDeviceCodeFlow(client);if(!tokens)throw error;return client.updateAuthConfig({token:tokens.access_token,userId:void 0,expiresAt:Math.floor(Date.now()/1e3)+tokens.expires_in,refreshToken:tokens.refresh_token}),client.persistAuthConfig(),await fn()}}function getAcrValuesFromWWWAuthenticate(header){if(!header)return;let bearerIndex=header.toLowerCase().indexOf("bearer");if(bearerIndex===-1)return;let match=header.slice(bearerIndex+6).match(/(?:^|[,\s])acr_values=(?:"((?:\\.|[^"\\])*)"|([^,\s]+))/i);return match?.[1]?.replace(/\\(.)/g,"$1")??match?.[2]}async function getEnvRecords(client,projectId,source,{target,gitBranch,decrypt}={}){output_manager_default.debug(`Fetching Environment Variables of project ${projectId} and target ${target}`);let query=new URLSearchParams;if(target){let targetParam="target";target!=="production"&&target!=="preview"&&target!=="development"&&(targetParam="customEnvironmentId"),query.set(targetParam,target)}gitBranch&&query.set("gitBranch",gitBranch),decrypt&&query.set("decrypt",decrypt.toString()),source&&query.set("source",source);let url=`/v10/projects/${projectId}/env?${query}`;return withEnvChallengeRecovery(client,()=>client.fetch(url))}async function pullEnvRecords(client,projectIdOrDeploymentId,source,{target,gitBranch}={}){output_manager_default.debug(`Fetching Environment Variables of ${projectIdOrDeploymentId} and target ${target}`);let query=new URLSearchParams,url=`/v3/env/pull/${projectIdOrDeploymentId}`;return projectIdOrDeploymentId.startsWith("dpl_")||target&&(url+=`/${encodeURIComponent(target)}`,gitBranch&&(url+=`/${encodeURIComponent(gitBranch)}`)),source&&query.set("source",source),Array.from(query).length>0&&(url+=`?${query}`),withEnvChallengeRecovery(client,()=>client.fetch(url))}var parseEnv=env=>{if(!env)return{};if(typeof env=="string"&&(env=[env]),Array.isArray(env)){let startingDict={};return env.reduce((o,e)=>{let key,value,equalsSign=e.indexOf("=");return equalsSign===-1?key=e:(key=e.slice(0,equalsSign),value=e.slice(equalsSign+1)),o[key]=value,o},startingDict)}return env};export{getEnvRecords,pullEnvRecords,parseEnv};
7
+ import{performDeviceCodeFlow}from"./chunk-I7YEXDVF.js";import{isAPIError}from"./chunk-YCJHUYBJ.js";import{output_manager_default}from"./chunk-DWOJP4ST.js";import{URLSearchParams}from"url";var RECOVERABLE_CHALLENGE_CODES=new Set(["challenge_required","challenge_required_email_otp","user_auth_required"]);async function withEnvChallengeRecovery(client,fn){let hadStoredSession=!!(client.authConfig.token||client.authConfig.refreshToken);try{return await fn()}catch(error){if(!isAPIError(error))throw error;let isRecoverableChallenge=RECOVERABLE_CHALLENGE_CODES.has(error.code),isRejectedStoredSession=hadStoredSession&&error.invalidToken===!0;if(!isRecoverableChallenge&&!isRejectedStoredSession||client.authConfig.tokenSource||!client.stdin.isTTY||client.nonInteractive)throw error;output_manager_default.stopSpinner(),output_manager_default.log("Sensitive Environment Variables require fresh authentication.");let refreshToken=client.authConfig.refreshToken,acrValues=getAcrValuesFromWWWAuthenticate(error.wwwAuthenticate),tokens=isRecoverableChallenge&&refreshToken&&acrValues?await performDeviceCodeFlow(client,{refreshToken,acrValues,fallbackToLoginOnStepUpFailure:!0}):await performDeviceCodeFlow(client);if(!tokens)throw error;return client.updateAuthConfig({token:tokens.access_token,userId:void 0,expiresAt:Math.floor(Date.now()/1e3)+tokens.expires_in,refreshToken:tokens.refresh_token}),client.persistAuthConfig(),await fn()}}function getAcrValuesFromWWWAuthenticate(header){if(!header)return;let bearerIndex=header.toLowerCase().indexOf("bearer");if(bearerIndex===-1)return;let match=header.slice(bearerIndex+6).match(/(?:^|[,\s])acr_values=(?:"((?:\\.|[^"\\])*)"|([^,\s]+))/i);return match?.[1]?.replace(/\\(.)/g,"$1")??match?.[2]}async function getEnvRecords(client,projectId,source,{target,gitBranch,decrypt}={}){output_manager_default.debug(`Fetching Environment Variables of project ${projectId} and target ${target}`);let query=new URLSearchParams;if(target){let targetParam="target";target!=="production"&&target!=="preview"&&target!=="development"&&(targetParam="customEnvironmentId"),query.set(targetParam,target)}gitBranch&&query.set("gitBranch",gitBranch),decrypt&&query.set("decrypt",decrypt.toString()),source&&query.set("source",source);let url=`/v10/projects/${projectId}/env?${query}`;return withEnvChallengeRecovery(client,()=>client.fetch(url))}async function pullEnvRecords(client,projectIdOrDeploymentId,source,{target,gitBranch}={}){output_manager_default.debug(`Fetching Environment Variables of ${projectIdOrDeploymentId} and target ${target}`);let query=new URLSearchParams,url=`/v3/env/pull/${projectIdOrDeploymentId}`;return projectIdOrDeploymentId.startsWith("dpl_")||target&&(url+=`/${encodeURIComponent(target)}`,gitBranch&&(url+=`/${encodeURIComponent(gitBranch)}`)),source&&query.set("source",source),Array.from(query).length>0&&(url+=`?${query}`),withEnvChallengeRecovery(client,()=>client.fetch(url))}var parseEnv=env=>{if(!env)return{};if(typeof env=="string"&&(env=[env]),Array.isArray(env)){let startingDict={};return env.reduce((o,e)=>{let key,value,equalsSign=e.indexOf("=");return equalsSign===-1?key=e:(key=e.slice(0,equalsSign),value=e.slice(equalsSign+1)),o[key]=value,o},startingDict)}return env};export{getEnvRecords,pullEnvRecords,parseEnv};
@@ -4,6 +4,6 @@ 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{getErrorRecovery,shouldEmitNonInteractiveCommandError,trackAgentError,writeAgentError}from"./chunk-XE24Y6NM.js";import{buildCorrectedCommand,isArgumentError}from"./chunk-F22QLVTX.js";import{parseRetryAfterHeaderAsMillis,require_bytes}from"./chunk-YCJHUYBJ.js";import{getCommandName}from"./chunk-JESNVRVR.js";import{cliErrorFromUnknown,output_manager_default,recordCliError}from"./chunk-DWOJP4ST.js";import{pkg_default}from"./chunk-OO572JUC.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var import_bytes=__toESM(require_bytes(),1);async function responseError(res,fallbackMessage=null,parsedBody={}){let message="",bodyError;if(res.status>=400&&res.status<500){let body;try{body=await res.json()}catch{body=parsedBody}bodyError=body.error||body.err||{},message=bodyError.message}message||(message=fallbackMessage===null?"Response Error":fallbackMessage);let err=new Error(`${message} (${res.status})`);if(err.status=res.status,err.serverMessage=message,bodyError)for(let field of Object.keys(bodyError))field!=="message"&&(err[field]=bodyError[field]);if(res.status===429||res.status===503){let parsed=parseRetryAfterHeaderAsMillis(res.headers.get("Retry-After"));err.retryAfterMs=parsed??(res.status===429?0:void 0)}return err}var MAX_SERIALIZED_ERROR_DEPTH=5;function isPlainObject(value){let proto=Object.getPrototypeOf(value);return proto===null||proto===Object.prototype}function toJsonSafe(value,ancestors,depth){if(typeof value=="bigint")return value.toString();if(!(typeof value=="function"||typeof value=="symbol")){if(value===null||typeof value!="object")return value;if(ancestors.has(value))return"[Circular]";if(depth>=MAX_SERIALIZED_ERROR_DEPTH)return"[Truncated]";if(value instanceof Error)return serializeError(value,ancestors,depth+1);if(!Array.isArray(value)&&!isPlainObject(value))return`[${value.constructor?.name||"Object"}]`;ancestors.add(value);try{if(Array.isArray(value))return value.map(item=>toJsonSafe(item,ancestors,depth+1));let copy={};for(let[key,child]of Object.entries(value))copy[key]=toJsonSafe(child,ancestors,depth+1);return copy}finally{ancestors.delete(value)}}}function serializeError(err,ancestors,depth){ancestors.add(err);try{let enumerable={name:err.name};for(let key of Object.getOwnPropertyNames(err))enumerable[key]=toJsonSafe(err[key],ancestors,depth);return enumerable}finally{ancestors.delete(err)}}function toEnumerableError(err){return err===null||typeof err!="object"?{name:"Error",message:String(err)}:serializeError(err,new WeakSet,0)}function printError(error2,client){typeof error2=="string"&&(error2=new Error(error2)),recordCliError(cliErrorFromUnknown(error2));let apiError=error2,{message,stack,status,code,sizeLimit}=apiError,argumentError=isArgumentError(error2)?error2:void 0,suggestion=argumentError?.suggestedOption&&argumentError.invalidOption,correction=suggestion&&client&&argumentError?buildCorrectedCommand(client.argv,argumentError.invalidOption,argumentError.suggestedOption,argumentError.flagsSpecification):void 0,recovery=getErrorRecovery(apiError,client),reason=status===403?"forbidden":status===402?"payment_required":status===401?"not_authorized":status===429?"rate_limited":argumentError?"invalid_arguments":"api_error",hint=argumentError?.allowedOptions?`Vercel CLI ${pkg_default.version} accepts: ${argumentError.allowedOptions.join(", ")}.${suggestion?` Did you mean ${argumentError.suggestedOption}?`:""}`:recovery.hint;if(client&&(status||argumentError?.allowedOptions)){let payload={...recovery,status:"error",reason,message:apiError.serverMessage||message,hint,...argumentError?.allowedOptions&&{allowedOptions:argumentError.allowedOptions,suggestedOption:argumentError.suggestedOption,cliVersion:pkg_default.version},...correction&&{next:[{command:correction,when:correction.includes("<")?"Replace placeholders with the intended values, then run the corrected command":"Run the corrected command"}]}};if(shouldEmitNonInteractiveCommandError(client)){output_manager_default.stopSpinner(),writeAgentError(client,payload);return}trackAgentError(client,payload)}if(hint){output_manager_default.stopSpinner(),output_manager_default.fatal(apiError.serverMessage||message||"The request failed."),output_manager_default.print(` ${hint}
7
+ import{getErrorRecovery,shouldEmitNonInteractiveCommandError,trackAgentError,writeAgentError}from"./chunk-I7U2XP4X.js";import{buildCorrectedCommand,isArgumentError}from"./chunk-F22QLVTX.js";import{parseRetryAfterHeaderAsMillis,require_bytes}from"./chunk-YCJHUYBJ.js";import{getCommandName}from"./chunk-JESNVRVR.js";import{cliErrorFromUnknown,output_manager_default,recordCliError}from"./chunk-DWOJP4ST.js";import{pkg_default}from"./chunk-OO572JUC.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var import_bytes=__toESM(require_bytes(),1);async function responseError(res,fallbackMessage=null,parsedBody={}){let message="",bodyError;if(res.status>=400&&res.status<500){let body;try{body=await res.json()}catch{body=parsedBody}bodyError=body.error||body.err||{},message=bodyError.message}message||(message=fallbackMessage===null?"Response Error":fallbackMessage);let err=new Error(`${message} (${res.status})`);if(err.status=res.status,err.serverMessage=message,bodyError)for(let field of Object.keys(bodyError))field!=="message"&&(err[field]=bodyError[field]);if(res.status===429||res.status===503){let parsed=parseRetryAfterHeaderAsMillis(res.headers.get("Retry-After"));err.retryAfterMs=parsed??(res.status===429?0:void 0)}return err}var MAX_SERIALIZED_ERROR_DEPTH=5;function isPlainObject(value){let proto=Object.getPrototypeOf(value);return proto===null||proto===Object.prototype}function toJsonSafe(value,ancestors,depth){if(typeof value=="bigint")return value.toString();if(!(typeof value=="function"||typeof value=="symbol")){if(value===null||typeof value!="object")return value;if(ancestors.has(value))return"[Circular]";if(depth>=MAX_SERIALIZED_ERROR_DEPTH)return"[Truncated]";if(value instanceof Error)return serializeError(value,ancestors,depth+1);if(!Array.isArray(value)&&!isPlainObject(value))return`[${value.constructor?.name||"Object"}]`;ancestors.add(value);try{if(Array.isArray(value))return value.map(item=>toJsonSafe(item,ancestors,depth+1));let copy={};for(let[key,child]of Object.entries(value))copy[key]=toJsonSafe(child,ancestors,depth+1);return copy}finally{ancestors.delete(value)}}}function serializeError(err,ancestors,depth){ancestors.add(err);try{let enumerable={name:err.name};for(let key of Object.getOwnPropertyNames(err))enumerable[key]=toJsonSafe(err[key],ancestors,depth);return enumerable}finally{ancestors.delete(err)}}function toEnumerableError(err){return err===null||typeof err!="object"?{name:"Error",message:String(err)}:serializeError(err,new WeakSet,0)}function printError(error2,client){typeof error2=="string"&&(error2=new Error(error2)),recordCliError(cliErrorFromUnknown(error2));let apiError=error2,{message,stack,status,code,sizeLimit}=apiError,argumentError=isArgumentError(error2)?error2:void 0,suggestion=argumentError?.suggestedOption&&argumentError.invalidOption,correction=suggestion&&client&&argumentError?buildCorrectedCommand(client.argv,argumentError.invalidOption,argumentError.suggestedOption,argumentError.flagsSpecification):void 0,recovery=getErrorRecovery(apiError,client),reason=status===403?"forbidden":status===402?"payment_required":status===401?"not_authorized":status===429?"rate_limited":argumentError?"invalid_arguments":"api_error",hint=argumentError?.allowedOptions?`Vercel CLI ${pkg_default.version} accepts: ${argumentError.allowedOptions.join(", ")}.${suggestion?` Did you mean ${argumentError.suggestedOption}?`:""}`:recovery.hint;if(client&&(status||argumentError?.allowedOptions)){let payload={...recovery,status:"error",reason,message:apiError.serverMessage||message,hint,...argumentError?.allowedOptions&&{allowedOptions:argumentError.allowedOptions,suggestedOption:argumentError.suggestedOption,cliVersion:pkg_default.version},...correction&&{next:[{command:correction,when:correction.includes("<")?"Replace placeholders with the intended values, then run the corrected command":"Run the corrected command"}]}};if(shouldEmitNonInteractiveCommandError(client)){output_manager_default.stopSpinner(),writeAgentError(client,payload);return}trackAgentError(client,payload)}if(hint){output_manager_default.stopSpinner(),output_manager_default.fatal(apiError.serverMessage||message||"The request failed."),output_manager_default.print(` ${hint}
8
8
  `),correction&&output_manager_default.print(` ${correction}
9
9
  `);return}output_manager_default.debug(`handling error: ${stack}`),message!=="User force closed the prompt with 0 null"&&(status===403?output_manager_default.error(message||`Authentication error. Run ${getCommandName("login")} to log-in again.`):status===429?output_manager_default.error(message):code==="size_limit_exceeded"?output_manager_default.error(`File size limit exceeded (${(0,import_bytes.default)(sizeLimit)})`):message?output_manager_default.prettyError(apiError):status===500?output_manager_default.error("Unexpected server error. Please retry."):code==="USER_ABORT"?output_manager_default.log("Canceled"):output_manager_default.error(`Unexpected error. Please try again later. (${message})`))}export{responseError,toEnumerableError,printError};
@@ -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-36NK2Z3C.js";function getProjectNameFromFlags(flags){return flags["--project"]}function getLinkedFlagsProject(client,projectName,options){return resolveProjectContext({client,projectNameOrId:projectName,projectNotFoundHandling:options?.projectNotFoundHandling})}export{getProjectNameFromFlags,getLinkedFlagsProject};
7
+ import{resolveProjectContext}from"./chunk-RNTS4MJP.js";function getProjectNameFromFlags(flags){return flags["--project"]}function getLinkedFlagsProject(client,projectName,options){return resolveProjectContext({client,projectNameOrId:projectName,projectNotFoundHandling:options?.projectNotFoundHandling})}export{getProjectNameFromFlags,getLinkedFlagsProject};
@@ -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{getScope}from"./chunk-WICRM2JL.js";import{AGENT_REASON,AGENT_STATUS,buildCommandWithGlobalFlags,outputAgentError,shouldEmitNonInteractiveCommandError}from"./chunk-XE24Y6NM.js";import{getOrgById}from"./chunk-VLYVVC3P.js";import{suggestCorrection}from"./chunk-F22QLVTX.js";import{output_manager_default}from"./chunk-DWOJP4ST.js";async function findSimilarProjectName(client,name,orgId){try{let{projects}=await client.fetch("/v9/projects?limit=100",{accountId:orgId});return suggestCorrection(name,projects.map(project=>project.name).filter(projectName=>/^[a-z0-9._-]+$/i.test(projectName)))}catch(err){output_manager_default.debug(`Project suggestion lookup failed: ${err}`);return}}async function printProjectNotFoundError(client,projectNameOrId,commandName,orgId,{createCommand}={}){let contextName;try{orgId?contextName=(await getOrgById(client,orgId))?.slug??orgId:contextName=(await getScope(client)).contextName}catch(err){contextName=orgId,output_manager_default.debug(`Scope lookup failed during error reporting: ${err}`)}let scopeClause=contextName?` (${contextName})`:"",headline=`Project "${projectNameOrId}" was not found in the current scope${scopeClause}.`,suggestion=createCommand?await findSimilarProjectName(client,projectNameOrId,orgId):void 0,suggestionLine=suggestion?` Did you mean ${suggestion}?`:"",createNote=createCommand?.note;if(output_manager_default.error(`${headline}${suggestionLine}
7
+ import{getScope}from"./chunk-GKCTMBCM.js";import{AGENT_REASON,AGENT_STATUS,buildCommandWithGlobalFlags,outputAgentError,shouldEmitNonInteractiveCommandError}from"./chunk-I7U2XP4X.js";import{getOrgById}from"./chunk-TKKGZI7O.js";import{suggestCorrection}from"./chunk-F22QLVTX.js";import{output_manager_default}from"./chunk-DWOJP4ST.js";async function findSimilarProjectName(client,name,orgId){try{let{projects}=await client.fetch("/v9/projects?limit=100",{accountId:orgId});return suggestCorrection(name,projects.map(project=>project.name).filter(projectName=>/^[a-z0-9._-]+$/i.test(projectName)))}catch(err){output_manager_default.debug(`Project suggestion lookup failed: ${err}`);return}}async function printProjectNotFoundError(client,projectNameOrId,commandName,orgId,{createCommand}={}){let contextName;try{orgId?contextName=(await getOrgById(client,orgId))?.slug??orgId:contextName=(await getScope(client)).contextName}catch(err){contextName=orgId,output_manager_default.debug(`Scope lookup failed during error reporting: ${err}`)}let scopeClause=contextName?` (${contextName})`:"",headline=`Project "${projectNameOrId}" was not found in the current scope${scopeClause}.`,suggestion=createCommand?await findSimilarProjectName(client,projectNameOrId,orgId):void 0,suggestionLine=suggestion?` Did you mean ${suggestion}?`:"",createNote=createCommand?.note;if(output_manager_default.error(`${headline}${suggestionLine}
8
8
 
9
9
  `+(createCommand?`To create it${createNote?`, ${createNote}`:""}:
10
10
  ${createCommand.command}