vercel 63.1.2 → 64.0.1

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 (157) hide show
  1. package/dist/chunks/{add-WX7XBOMM.js → add-BMUUEEVH.js} +1 -1
  2. package/dist/chunks/add-HVM5P72U.js +8 -0
  3. package/dist/chunks/{add-YAWFEGID.js → add-UGPZ3CCF.js} +1 -1
  4. package/dist/chunks/{build-FIPVJJWA.js → build-TNTAXGN2.js} +1 -1
  5. package/dist/chunks/{chunk-VUILLFZ6.js → chunk-2EZVL7H3.js} +1 -1
  6. package/dist/chunks/chunk-3AVG55SO.js +7 -0
  7. package/dist/chunks/chunk-42GFIWDH.js +12 -0
  8. package/dist/chunks/chunk-5UEBA6N6.js +8 -0
  9. package/dist/chunks/chunk-6EOSJGQQ.js +7 -0
  10. package/dist/chunks/{chunk-R4TMZGV5.js → chunk-74OAJW3T.js} +10 -7
  11. package/dist/chunks/{chunk-MJR564B4.js → chunk-A6WTFAZT.js} +1 -1
  12. package/dist/chunks/{chunk-RZTGPQFR.js → chunk-A7LJYJTR.js} +1 -1
  13. package/dist/chunks/{chunk-MS576PZ7.js → chunk-AKY6JG2X.js} +1 -1
  14. package/dist/chunks/{chunk-7I57HOA6.js → chunk-AZAGTZTH.js} +1 -1
  15. package/dist/chunks/{chunk-AVRYIQRF.js → chunk-BLAIBYEU.js} +3 -3
  16. package/dist/chunks/{chunk-IVUYULMP.js → chunk-BM2K5MMH.js} +1 -1
  17. package/dist/chunks/{chunk-EGZIRI5B.js → chunk-BNJQIVC2.js} +1 -1
  18. package/dist/chunks/{chunk-2GTCIOCB.js → chunk-BO2A5V7C.js} +1 -1
  19. package/dist/chunks/{chunk-UPXIQO57.js → chunk-CDGQ3T52.js} +1 -1
  20. package/dist/chunks/{chunk-26KRNEYD.js → chunk-COGMOZTL.js} +1 -1
  21. package/dist/chunks/{chunk-L3S26YTM.js → chunk-CUGDEOWG.js} +1 -1
  22. package/dist/chunks/{chunk-WKTIAVGU.js → chunk-CX2GKBWT.js} +1 -1
  23. package/dist/chunks/{chunk-LZAGJ3QI.js → chunk-D4B463CV.js} +1 -1
  24. package/dist/chunks/{chunk-OKS442LQ.js → chunk-DVQDWCWS.js} +1 -1
  25. package/dist/chunks/chunk-FO7MV3VE.js +8 -0
  26. package/dist/chunks/{chunk-TEHMKMPG.js → chunk-FRXP4IEJ.js} +1 -1
  27. package/dist/chunks/{chunk-WDJFZM7U.js → chunk-HYFA2W4U.js} +1 -1
  28. package/dist/chunks/{chunk-HVNIW32A.js → chunk-JFASDCSW.js} +2 -2
  29. package/dist/chunks/{chunk-QCG6Q33G.js → chunk-JJXNBWZY.js} +1 -1
  30. package/dist/chunks/{chunk-NUPLQVP3.js → chunk-JWO4AFKT.js} +1 -1
  31. package/dist/chunks/{chunk-IOJYYPUF.js → chunk-LG5FP6PL.js} +3 -3
  32. package/dist/chunks/{chunk-BW64GZ3E.js → chunk-MMIOAN6V.js} +1 -1
  33. package/dist/chunks/{chunk-G64N3I5W.js → chunk-MTSJMQCE.js} +1 -1
  34. package/dist/chunks/{chunk-YCV465P5.js → chunk-N7DY367Z.js} +1 -1
  35. package/dist/chunks/{chunk-JV4URBEA.js → chunk-NVSVMH3S.js} +1 -1
  36. package/dist/chunks/{chunk-DO4GPDKO.js → chunk-PFM3URPJ.js} +1 -1
  37. package/dist/chunks/{chunk-TAAV7L3T.js → chunk-PZK6CKRM.js} +1 -1
  38. package/dist/chunks/{chunk-MHQ2MW2B.js → chunk-QHKVAGWC.js} +3 -3
  39. package/dist/chunks/chunk-QUE7MWER.js +11 -0
  40. package/dist/chunks/chunk-R5FJNGWK.js +10 -0
  41. package/dist/chunks/{chunk-YDRNDY2V.js → chunk-R7FDTIAQ.js} +2 -2
  42. package/dist/chunks/{chunk-GNY6U33Z.js → chunk-S2JJZDW6.js} +2 -2
  43. package/dist/chunks/{chunk-I4NK2P2D.js → chunk-SFW6MBQN.js} +1 -1
  44. package/dist/chunks/{chunk-DJDT2SUM.js → chunk-TC65E2YX.js} +1 -1
  45. package/dist/chunks/{chunk-67N2NJCF.js → chunk-TWRV6QGX.js} +1 -1
  46. package/dist/chunks/{chunk-WJEAGH4K.js → chunk-UC4YUQBN.js} +1 -1
  47. package/dist/chunks/{chunk-OA446564.js → chunk-V3UOKOM5.js} +1 -1
  48. package/dist/chunks/{chunk-ACGKBCXE.js → chunk-WDNNB4RL.js} +1 -1
  49. package/dist/chunks/{chunk-7Z4JCYS6.js → chunk-WJ3UIEZ5.js} +2 -2
  50. package/dist/chunks/chunk-YBOS65VB.js +7 -0
  51. package/dist/chunks/{chunk-WXWBB7LP.js → chunk-YBSW4AZH.js} +1 -1
  52. package/dist/chunks/{chunk-ME6DBVQG.js → chunk-YH6CNXAT.js} +1 -1
  53. package/dist/chunks/{chunk-G2JKENQU.js → chunk-YLTOFGIJ.js} +1 -1
  54. package/dist/chunks/chunk-YTDK6AHS.js +7 -0
  55. package/dist/chunks/{chunk-Q3SWLXLO.js → chunk-YTEZO2SZ.js} +1 -1
  56. package/dist/chunks/{chunk-Q7ZF7MBI.js → chunk-YWLJSVTR.js} +1 -1
  57. package/dist/chunks/{chunk-46XQIXL7.js → chunk-ZF6QZY35.js} +1 -1
  58. package/dist/chunks/{chunk-ME75ZZW7.js → chunk-ZMIRVO5A.js} +1 -1
  59. package/dist/chunks/{clear-ZEWRQLJR.js → clear-MRFK6SNK.js} +1 -1
  60. package/dist/chunks/{compile-vercel-config-66TMMPL5.js → compile-vercel-config-MOEJ6RRY.js} +1 -1
  61. package/dist/chunks/config-ESRDSIAF.js +7 -0
  62. package/dist/chunks/{config-LDTDOVVC.js → config-H7EMH632.js} +1 -1
  63. package/dist/chunks/config-validator.mjs +1 -1
  64. package/dist/chunks/{delete-QVG74P23.js → delete-TIWKKRQQ.js} +1 -1
  65. package/dist/chunks/{delete-5WC3BAXY.js → delete-TYLF74HP.js} +1 -1
  66. package/dist/chunks/{detect-projects-FTGWHOTA.js → detect-projects-LFEZ7BQU.js} +1 -1
  67. package/dist/chunks/{detect-services-QPBLJZGR.js → detect-services-KGIGKZFX.js} +1 -1
  68. package/dist/chunks/{disable-MJP72BUH.js → disable-SRIMYL73.js} +1 -1
  69. package/dist/chunks/{discard-GHJO6HJ7.js → discard-F4Y2NOHU.js} +1 -1
  70. package/dist/chunks/{edit-ELV6KOAC.js → edit-3D6L76R3.js} +1 -1
  71. package/dist/chunks/{edit-MCMKL3PG.js → edit-5VW3WYFP.js} +1 -1
  72. package/dist/chunks/{enable-NJV7TP3E.js → enable-IPPUYI4D.js} +1 -1
  73. package/dist/chunks/{export-OFXKWFKJ.js → export-BPHKR42P.js} +1 -1
  74. package/dist/chunks/{future-TTQX6P2J.js → future-PZPJ3LBY.js} +1 -1
  75. package/dist/chunks/{generate-cert-for-deploy-H5CIDNMW.js → generate-cert-for-deploy-JRFEERJY.js} +1 -1
  76. package/dist/chunks/{image-2V2VJOSJ.js → image-2GMCXYKH.js} +1 -1
  77. package/dist/chunks/{import-builders-K3AX56WJ.js → import-builders-LAISJVC4.js} +1 -1
  78. package/dist/chunks/{inspect-ZNSHEHOX.js → inspect-NZIX5PW5.js} +1 -1
  79. package/dist/chunks/inspect-PMOUB7TZ.js +13 -0
  80. package/dist/chunks/{inspect-3YVNC464.js → inspect-WYE74TOO.js} +1 -1
  81. package/dist/chunks/{inspect-7YQ3GVZK.js → inspect-Y7MAI6NN.js} +1 -1
  82. package/dist/chunks/{inspect-SLCLHRCE.js → inspect-ZRNPBDR7.js} +1 -1
  83. package/dist/chunks/{list-TFJSUTGX.js → list-5M4CTEGG.js} +1 -1
  84. package/dist/chunks/{list-QWTJ5GEV.js → list-IUAECVSK.js} +1 -1
  85. package/dist/chunks/{list-AKLXWJVE.js → list-U7ZZ5HN6.js} +1 -1
  86. package/dist/chunks/{login-DTYYE77N.js → login-JNMM2LCA.js} +1 -1
  87. package/dist/chunks/{login-2RXKHHR7.js → login-ZRY2YGZM.js} +1 -1
  88. package/dist/chunks/logs-YHQ6C7QH.js +7 -0
  89. package/dist/chunks/{ls-KPDMEX3M.js → ls-3HMQEZEV.js} +1 -1
  90. package/dist/chunks/ls-53GH55RA.js +8 -0
  91. package/dist/chunks/{ls-PDGT4IYT.js → ls-BAUM7ICU.js} +1 -1
  92. package/dist/chunks/{ls-SWSNZDIB.js → ls-CLAXRPIK.js} +1 -1
  93. package/dist/chunks/{ls-XBWZZIZW.js → ls-IUULJ6WA.js} +1 -1
  94. package/dist/chunks/{ls-62IGNDVX.js → ls-V5G5SIGL.js} +1 -1
  95. package/dist/chunks/{ls-RT2GW7GQ.js → ls-XO7ZHACJ.js} +1 -1
  96. package/dist/chunks/{mutate-4QF5LX5H.js → mutate-NEVQYFUV.js} +1 -1
  97. package/dist/chunks/{notifications-EZWNVZIY.js → notifications-6AZQNEOE.js} +1 -1
  98. package/dist/chunks/{open-ZOCLC6EL.js → open-23Y6VJR4.js} +1 -1
  99. package/dist/chunks/{openapi-WDPDBK6G.js → openapi-KBLEYOJR.js} +1 -1
  100. package/dist/chunks/{permissions-WZ74DZVX.js → permissions-R6MSKYOZ.js} +1 -1
  101. package/dist/chunks/{prompt-missing-credentials-EU3KK3J4.js → prompt-missing-credentials-UML2SHRT.js} +1 -1
  102. package/dist/chunks/{publish-M6VGADUV.js → publish-TBU3WUSE.js} +1 -1
  103. package/dist/chunks/{pull-HE4HZUJO.js → pull-M7CBRERS.js} +1 -1
  104. package/dist/chunks/{purchase-domain-if-available-YK7ZK4OQ.js → purchase-domain-if-available-O2SEHZQG.js} +1 -1
  105. package/dist/chunks/{push-AXG4E43Q.js → push-7LXD5RDV.js} +1 -1
  106. package/dist/chunks/query-GDAAENV5.js +12 -0
  107. package/dist/chunks/{reauthenticate-S6DCF7RS.js → reauthenticate-6PGYUP3P.js} +1 -1
  108. package/dist/chunks/{reorder-4G2JILHR.js → reorder-S5CX2UNT.js} +1 -1
  109. package/dist/chunks/{reply-MDSF5FRG.js → reply-4G2J5O6V.js} +1 -1
  110. package/dist/chunks/{resolve-JFM5IA7H.js → resolve-724ULLUY.js} +1 -1
  111. package/dist/chunks/{restore-DGXZYLLN.js → restore-EPBSJFSA.js} +1 -1
  112. package/dist/chunks/rm-F3LLL6MZ.js +8 -0
  113. package/dist/chunks/{rm-WFK724PU.js → rm-IDDLGKRZ.js} +1 -1
  114. package/dist/chunks/{rm-56YVF7VJ.js → rm-MI7NPJ4F.js} +1 -1
  115. package/dist/chunks/{rm-OAN2XZOH.js → rm-PWUJF6CB.js} +1 -1
  116. package/dist/chunks/{rm-72VFNBSP.js → rm-WWPCSM3O.js} +1 -1
  117. package/dist/chunks/rule-inspect-FFUYLBZG.js +8 -0
  118. package/dist/chunks/{rules-5EKUX5OX.js → rules-YFLGPQRW.js} +1 -1
  119. package/dist/chunks/{schema-LM6XGKQS.js → schema-3VHLYZBA.js} +1 -1
  120. package/dist/chunks/{schema-6LPADSVE.js → schema-QRHP4WMY.js} +1 -1
  121. package/dist/chunks/{select-org-MARKOFHY.js → select-org-6BWIH3S3.js} +1 -1
  122. package/dist/chunks/{set-MTKMZ2YS.js → set-FPPF7W47.js} +1 -1
  123. package/dist/chunks/{setup-and-link-KMD3ZLHN.js → setup-and-link-ENQEJG6L.js} +1 -1
  124. package/dist/chunks/{tags-SXRDMEPO.js → tags-JDL3PPLS.js} +1 -1
  125. package/dist/chunks/{types-K73TDN7C.js → types-HLISMAF6.js} +1 -1
  126. package/dist/chunks/{update-QSNT3MDG.js → update-GH56IPQR.js} +1 -1
  127. package/dist/commands/build/index.js +1 -1
  128. package/dist/commands/deploy/index.js +4 -4
  129. package/dist/commands/dev/index.js +9 -9
  130. package/dist/commands/env/index.js +1 -1
  131. package/dist/commands/link/index.js +1 -1
  132. package/dist/commands/list/index.js +1 -1
  133. package/dist/commands-bulk.js +341 -325
  134. package/dist/index.js +2 -2
  135. package/dist/internal-build.js +1 -1
  136. package/dist/root-help-commands.mjs +1 -1
  137. package/dist/version.mjs +1 -1
  138. package/package.json +56 -56
  139. package/dist/chunks/add-LFJBSEHE.js +0 -8
  140. package/dist/chunks/chunk-5DXCVG5U.js +0 -10
  141. package/dist/chunks/chunk-5O2CW3SX.js +0 -8
  142. package/dist/chunks/chunk-6LZ72MNE.js +0 -9
  143. package/dist/chunks/chunk-AMDHTZDV.js +0 -11
  144. package/dist/chunks/chunk-HRR57QNP.js +0 -7
  145. package/dist/chunks/chunk-IADIPNJO.js +0 -7
  146. package/dist/chunks/chunk-MYY36NBW.js +0 -7
  147. package/dist/chunks/chunk-OBRNACWW.js +0 -18
  148. package/dist/chunks/chunk-OH2RT2GN.js +0 -7
  149. package/dist/chunks/chunk-PFD7LETF.js +0 -7
  150. package/dist/chunks/chunk-WH3SHWVK.js +0 -8
  151. package/dist/chunks/config-V7SAJGMS.js +0 -7
  152. package/dist/chunks/inspect-SEHUG246.js +0 -13
  153. package/dist/chunks/logs-RI5TPLZS.js +0 -7
  154. package/dist/chunks/ls-O6RYA4QE.js +0 -8
  155. package/dist/chunks/query-LSTTTOQM.js +0 -12
  156. package/dist/chunks/rm-3CXFYPYT.js +0 -8
  157. package/dist/chunks/rule-inspect-C6FZRTXY.js +0 -8
@@ -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{emitVcrArgParseError,handleVcrApiError,resolveVcrScope,validateVcrJsonOutput}from"./chunk-QCG6Q33G.js";import{outputError}from"./chunk-WH3SHWVK.js";import"./chunk-GSOPJJO5.js";import{addSubcommand}from"./chunk-RZGWCQP7.js";import"./chunk-AG5QQNJ3.js";import"./chunk-AU42HSQ3.js";import"./chunk-L5FUUGYX.js";import"./chunk-FBYA6LLM.js";import"./chunk-SCV7XEEO.js";import{printError}from"./chunk-WDJFZM7U.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-5DXCVG5U.js";import"./chunk-D4MW3RDW.js";import"./chunk-67N2NJCF.js";import"./chunk-HMS3UIQ2.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-VKXEOL4K.js";import"./chunk-4SAVH3H7.js";import"./chunk-ZS2WS4AM.js";import"./chunk-AOWWC6WZ.js";import"./chunk-MY4MONOH.js";import{parseArguments}from"./chunk-R4VVQRLX.js";import"./chunk-BKV35LVB.js";import{getFlagsSpecification}from"./chunk-5IPBCD7K.js";import"./chunk-IOJYYPUF.js";import"./chunk-ROPQIBWJ.js";import"./chunk-VKPZP4LC.js";import"./chunk-PPCFQQSU.js";import"./chunk-N7Q2IESO.js";import"./chunk-WPQN5UKR.js";import"./chunk-VOZEB6PD.js";import{isAPIError}from"./chunk-YIIPBH2D.js";import{packageName}from"./chunk-JESNVRVR.js";import{output_manager_default}from"./chunk-75IAMKGV.js";import"./chunk-RM3ZDRYE.js";import"./chunk-OO572JUC.js";import"./chunk-D3AHZ5LI.js";import"./chunk-2GHZGOWT.js";import"./chunk-YHPPP3SF.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BZENIQ7N.js";async function add(client,argv,telemetry){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(addSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,"vcr create <name> --project <name-or-id>"),printError(err),2}let fr=validateVcrJsonOutput(client,parsedArgs.flags);if(typeof fr=="number")return fr;let name=parsedArgs.args[0],project=parsedArgs.flags["--project"];if(telemetry.trackCliOptionProject(project),telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]),!name)return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message:`Missing repository name. Example: ${packageName} vcr create <name>`,next:[{command:buildCommandWithGlobalFlags(client.argv,"vcr create <name>"),when:"Replace <name> with the repository name to create"}]},2),outputError(client,fr.jsonOutput,"MISSING_ARGUMENTS","Usage: `vercel vcr create <name>`");let scope=await resolveVcrScope(client,{project,jsonOutput:fr.jsonOutput});if(typeof scope=="number")return scope;let path=`/v1/vcr/repository?teamId=${encodeURIComponent(scope.teamId)}`;output_manager_default.spinner("Creating repository...");try{let created=await client.fetch(path,{method:"POST",body:{projectId:scope.projectId,name}});return fr.jsonOutput?client.stdout.write(`${JSON.stringify(created,null,2)}
7
+ import{emitVcrArgParseError,handleVcrApiError,resolveVcrScope,validateVcrJsonOutput}from"./chunk-JJXNBWZY.js";import{outputError}from"./chunk-5UEBA6N6.js";import"./chunk-GSOPJJO5.js";import{addSubcommand}from"./chunk-RZGWCQP7.js";import"./chunk-AG5QQNJ3.js";import"./chunk-AU42HSQ3.js";import"./chunk-L5FUUGYX.js";import"./chunk-FBYA6LLM.js";import"./chunk-SCV7XEEO.js";import{printError}from"./chunk-HYFA2W4U.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-R5FJNGWK.js";import"./chunk-D4MW3RDW.js";import"./chunk-TWRV6QGX.js";import"./chunk-HMS3UIQ2.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-VKXEOL4K.js";import"./chunk-4SAVH3H7.js";import"./chunk-ZS2WS4AM.js";import"./chunk-AOWWC6WZ.js";import"./chunk-MY4MONOH.js";import{parseArguments}from"./chunk-R4VVQRLX.js";import"./chunk-BKV35LVB.js";import{getFlagsSpecification}from"./chunk-5IPBCD7K.js";import"./chunk-LG5FP6PL.js";import"./chunk-ROPQIBWJ.js";import"./chunk-VKPZP4LC.js";import"./chunk-PPCFQQSU.js";import"./chunk-N7Q2IESO.js";import"./chunk-WPQN5UKR.js";import"./chunk-VOZEB6PD.js";import{isAPIError}from"./chunk-YIIPBH2D.js";import{packageName}from"./chunk-JESNVRVR.js";import{output_manager_default}from"./chunk-75IAMKGV.js";import"./chunk-RM3ZDRYE.js";import"./chunk-OO572JUC.js";import"./chunk-D3AHZ5LI.js";import"./chunk-2GHZGOWT.js";import"./chunk-YHPPP3SF.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BZENIQ7N.js";async function add(client,argv,telemetry){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(addSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,"vcr create <name> --project <name-or-id>"),printError(err),2}let fr=validateVcrJsonOutput(client,parsedArgs.flags);if(typeof fr=="number")return fr;let name=parsedArgs.args[0],project=parsedArgs.flags["--project"];if(telemetry.trackCliOptionProject(project),telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]),!name)return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message:`Missing repository name. Example: ${packageName} vcr create <name>`,next:[{command:buildCommandWithGlobalFlags(client.argv,"vcr create <name>"),when:"Replace <name> with the repository name to create"}]},2),outputError(client,fr.jsonOutput,"MISSING_ARGUMENTS","Usage: `vercel vcr create <name>`");let scope=await resolveVcrScope(client,{project,jsonOutput:fr.jsonOutput});if(typeof scope=="number")return scope;let path=`/v1/vcr/repository?teamId=${encodeURIComponent(scope.teamId)}`;output_manager_default.spinner("Creating repository...");try{let created=await client.fetch(path,{method:"POST",body:{projectId:scope.projectId,name}});return fr.jsonOutput?client.stdout.write(`${JSON.stringify(created,null,2)}
8
8
  `):output_manager_default.success(`Created repository ${created.repository?.name??name}`),0}catch(err){if(isAPIError(err))return handleVcrApiError(client,err,fr.jsonOutput,{retry:{command:buildCommandWithGlobalFlags(client.argv,"vcr ls"),when:"List existing repositories (a name conflict means it already exists)"}});throw err}finally{output_manager_default.stopSpinner()}}export{add as default};
@@ -0,0 +1,8 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{printRuleMutationReceipt}from"./chunk-PZK6CKRM.js";import"./chunk-RRWEIG6B.js";import{emitRulesArgParseError,getBodyType,handleRulesApiError,outputRulesError,readRuleBody,resolveRulesProject,resolveRulesTeam,rulesCollectionPath}from"./chunk-AKY6JG2X.js";import"./chunk-CDGQ3T52.js";import"./chunk-YTDK6AHS.js";import"./chunk-GZNDA6SV.js";import"./chunk-5UEBA6N6.js";import"./chunk-GHAY4PSD.js";import"./chunk-QHKVAGWC.js";import"./chunk-O4FDRZ22.js";import"./chunk-T3GQAMBJ.js";import"./chunk-P2O5DOYE.js";import"./chunk-ID663OJ7.js";import{rulesAddSubcommand}from"./chunk-LU5O3NH7.js";import"./chunk-773GOZIR.js";import{printError}from"./chunk-HYFA2W4U.js";import"./chunk-R5FJNGWK.js";import"./chunk-67GZ5REA.js";import"./chunk-BS32OUOC.js";import{validateJsonOutput}from"./chunk-D4MW3RDW.js";import"./chunk-TWRV6QGX.js";import"./chunk-HMS3UIQ2.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-VKXEOL4K.js";import"./chunk-4SAVH3H7.js";import"./chunk-ZS2WS4AM.js";import"./chunk-AOWWC6WZ.js";import"./chunk-MY4MONOH.js";import{parseArguments}from"./chunk-R4VVQRLX.js";import"./chunk-BKV35LVB.js";import{getFlagsSpecification}from"./chunk-5IPBCD7K.js";import"./chunk-LG5FP6PL.js";import"./chunk-ROPQIBWJ.js";import"./chunk-VKPZP4LC.js";import"./chunk-PPCFQQSU.js";import"./chunk-N7Q2IESO.js";import"./chunk-WPQN5UKR.js";import"./chunk-VOZEB6PD.js";import{isAPIError}from"./chunk-YIIPBH2D.js";import"./chunk-JESNVRVR.js";import{output_manager_default}from"./chunk-75IAMKGV.js";import"./chunk-RM3ZDRYE.js";import"./chunk-OO572JUC.js";import"./chunk-D3AHZ5LI.js";import"./chunk-2GHZGOWT.js";import"./chunk-YHPPP3SF.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BZENIQ7N.js";function applyScopeFlag(client,body,type,scope,flags,jsonOutput){if(Object.hasOwn(body,"ruleScope"))return flags["--project"]||flags["--all"]?outputRulesError(client,jsonOutput,"SCOPE_CONFLICT","Specify rule scope either in the body or with --project/--all, not both."):void 0;if(flags["--project"]){body.ruleScope=type==="custom"?{type:"project",projectId:scope.projectId}:{type:"include",projectIds:[scope.projectId]};return}if(flags["--all"]){if(type==="custom")return outputRulesError(client,jsonOutput,"INVALID_SCOPE","Custom alert rules must target one project. Use --project <name-or-id>.");body.ruleScope={type:"all"};return}return outputRulesError(client,jsonOutput,"MISSING_SCOPE","Missing rule scope. Add ruleScope to the body, or pass --project or --all.")}async function resolveCreateScope(client,flags,jsonOutput){return flags["--project"]&&flags["--all"]?outputRulesError(client,jsonOutput,"MUTUAL_EXCLUSIVITY","Cannot specify both --all and --project. Use one or the other."):flags["--project"]?resolveRulesProject(client,flags["--project"],jsonOutput,"alerts rules create"):resolveRulesTeam(client,jsonOutput)}async function add(client,argv){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(rulesAddSubcommand.options))}catch(error){return emitRulesArgParseError(client,error,"alerts rules create --project <name-or-id> --body <path>"),printError(error),2}let flags=parsedArgs.flags,format=validateJsonOutput(flags);if(!format.valid)return outputRulesError(client,!1,"INVALID_ARGUMENTS",format.error);if(!flags["--body"])return outputRulesError(client,format.jsonOutput,"MISSING_ARGUMENTS","Missing required flag: --body <PATH>.");let body=readRuleBody(client,flags["--body"],format.jsonOutput);if(typeof body=="number")return body;let type=getBodyType(body);if(!type)return outputRulesError(client,format.jsonOutput,"INVALID_RULE_TYPE","Create body must set a supported rule type.");if(Object.hasOwn(body,"ruleScope")&&(flags["--project"]||flags["--all"]))return outputRulesError(client,format.jsonOutput,"SCOPE_CONFLICT","Specify rule scope either in the body or with --project/--all, not both.");if(type==="custom"&&flags["--all"])return outputRulesError(client,format.jsonOutput,"INVALID_SCOPE","Custom alert rules must target one project. Use --project <name-or-id>.");let scope=await resolveCreateScope(client,flags,format.jsonOutput);if(typeof scope=="number")return scope;let scopeError=applyScopeFlag(client,body,type,scope,flags,format.jsonOutput);if(scopeError!==void 0)return scopeError;output_manager_default.spinner("Creating alert rule\u2026");try{let response=await client.fetch(rulesCollectionPath(scope.teamId),{method:"POST",body});return format.jsonOutput?client.stdout.write(`${JSON.stringify(response,null,2)}
8
+ `):printRuleMutationReceipt("Created",response.rule,client.argv),0}catch(error){if(isAPIError(error))return handleRulesApiError(client,error,format.jsonOutput);throw error}finally{output_manager_default.stopSpinner()}}export{add as default};
@@ -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{parseTeamRefs,teamRefBody}from"./chunk-LSF7FY6X.js";import{repositoryPermissionsPath}from"./chunk-DFVNL5ML.js";import{emitVcrArgParseError,resolveVcrScope,validateVcrJsonOutput}from"./chunk-QCG6Q33G.js";import{outputError}from"./chunk-WH3SHWVK.js";import{require_async_sema}from"./chunk-NZ2TFADV.js";import"./chunk-GSOPJJO5.js";import{permissionsAddSubcommand}from"./chunk-AU42HSQ3.js";import"./chunk-FBYA6LLM.js";import"./chunk-SCV7XEEO.js";import{printError}from"./chunk-WDJFZM7U.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-5DXCVG5U.js";import"./chunk-D4MW3RDW.js";import"./chunk-67N2NJCF.js";import"./chunk-HMS3UIQ2.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-VKXEOL4K.js";import"./chunk-4SAVH3H7.js";import"./chunk-ZS2WS4AM.js";import"./chunk-AOWWC6WZ.js";import"./chunk-MY4MONOH.js";import{parseArguments}from"./chunk-R4VVQRLX.js";import"./chunk-BKV35LVB.js";import{getFlagsSpecification}from"./chunk-5IPBCD7K.js";import"./chunk-IOJYYPUF.js";import"./chunk-ROPQIBWJ.js";import"./chunk-VKPZP4LC.js";import"./chunk-PPCFQQSU.js";import"./chunk-N7Q2IESO.js";import"./chunk-WPQN5UKR.js";import"./chunk-VOZEB6PD.js";import{isAPIError}from"./chunk-YIIPBH2D.js";import{packageName}from"./chunk-JESNVRVR.js";import{output_manager_default}from"./chunk-75IAMKGV.js";import"./chunk-RM3ZDRYE.js";import"./chunk-OO572JUC.js";import"./chunk-D3AHZ5LI.js";import"./chunk-2GHZGOWT.js";import"./chunk-YHPPP3SF.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_async_sema=__toESM(require_async_sema(),1);var USAGE="vcr permissions <repository> add <team>[,<team>...]";async function add(client,argv,telemetry){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(permissionsAddSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,USAGE),printError(err),2}let fr=validateVcrJsonOutput(client,parsedArgs.flags);if(typeof fr=="number")return fr;let repository=parsedArgs.args[0],teamRefs=parseTeamRefs(parsedArgs.args.slice(2)),project=parsedArgs.flags["--project"];if(telemetry.trackCliOptionProject(project),telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]),teamRefs.length===0)return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message:`Missing team. Example: ${packageName} vcr permissions ${repository} add team_1a2b3c4d`,next:[{command:buildCommandWithGlobalFlags(client.argv,USAGE),when:"Replace <team> with a team id or slug (comma-separate multiple teams)"}]},2),outputError(client,fr.jsonOutput,"MISSING_ARGUMENTS",`Usage: \`vercel ${USAGE}\``);let scope=await resolveVcrScope(client,{project,jsonOutput:fr.jsonOutput});if(typeof scope=="number")return scope;let path=repositoryPermissionsPath(scope,repository),added=[],failed=[];output_manager_default.spinner(`Sharing ${repository} with ${teamRefs.length===1?teamRefs[0]:`${teamRefs.length} teams`}...`);let sema=new import_async_sema.default(10),results;try{results=await Promise.all(teamRefs.map(async team=>{await sema.acquire();try{let result=await client.fetch(path,{method:"POST",body:teamRefBody(team)});return{ok:!0,team,permission:result.permission}}catch(err){if(!isAPIError(err))throw err;let message=err.serverMessage||`API error (${err.status}).`;return{ok:!1,team,failure:{team,code:err.code||"API_ERROR",message}}}finally{sema.release()}}))}finally{output_manager_default.stopSpinner()}for(let result of results)result.ok?(added.push(result.permission),fr.jsonOutput||output_manager_default.success(`Shared ${repository} with ${result.permission?.teamSlug??result.team}`)):(failed.push(result.failure),fr.jsonOutput||output_manager_default.error(`Failed to share ${repository} with ${result.team}: ${result.failure.message}`));return failed.length>0&&outputAgentError(client,{status:"error",reason:AGENT_REASON.API_ERROR,message:`Failed to share ${repository} with ${failed.map(f=>`${f.team} (${f.message})`).join(", ")}`},1),fr.jsonOutput&&client.stdout.write(`${JSON.stringify({permissions:added,failed},null,2)}
7
+ import{parseTeamRefs,teamRefBody}from"./chunk-LSF7FY6X.js";import{repositoryPermissionsPath}from"./chunk-DFVNL5ML.js";import{emitVcrArgParseError,resolveVcrScope,validateVcrJsonOutput}from"./chunk-JJXNBWZY.js";import{outputError}from"./chunk-5UEBA6N6.js";import{require_async_sema}from"./chunk-NZ2TFADV.js";import"./chunk-GSOPJJO5.js";import{permissionsAddSubcommand}from"./chunk-AU42HSQ3.js";import"./chunk-FBYA6LLM.js";import"./chunk-SCV7XEEO.js";import{printError}from"./chunk-HYFA2W4U.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-R5FJNGWK.js";import"./chunk-D4MW3RDW.js";import"./chunk-TWRV6QGX.js";import"./chunk-HMS3UIQ2.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-VKXEOL4K.js";import"./chunk-4SAVH3H7.js";import"./chunk-ZS2WS4AM.js";import"./chunk-AOWWC6WZ.js";import"./chunk-MY4MONOH.js";import{parseArguments}from"./chunk-R4VVQRLX.js";import"./chunk-BKV35LVB.js";import{getFlagsSpecification}from"./chunk-5IPBCD7K.js";import"./chunk-LG5FP6PL.js";import"./chunk-ROPQIBWJ.js";import"./chunk-VKPZP4LC.js";import"./chunk-PPCFQQSU.js";import"./chunk-N7Q2IESO.js";import"./chunk-WPQN5UKR.js";import"./chunk-VOZEB6PD.js";import{isAPIError}from"./chunk-YIIPBH2D.js";import{packageName}from"./chunk-JESNVRVR.js";import{output_manager_default}from"./chunk-75IAMKGV.js";import"./chunk-RM3ZDRYE.js";import"./chunk-OO572JUC.js";import"./chunk-D3AHZ5LI.js";import"./chunk-2GHZGOWT.js";import"./chunk-YHPPP3SF.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_async_sema=__toESM(require_async_sema(),1);var USAGE="vcr permissions <repository> add <team>[,<team>...]";async function add(client,argv,telemetry){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(permissionsAddSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,USAGE),printError(err),2}let fr=validateVcrJsonOutput(client,parsedArgs.flags);if(typeof fr=="number")return fr;let repository=parsedArgs.args[0],teamRefs=parseTeamRefs(parsedArgs.args.slice(2)),project=parsedArgs.flags["--project"];if(telemetry.trackCliOptionProject(project),telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]),teamRefs.length===0)return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message:`Missing team. Example: ${packageName} vcr permissions ${repository} add team_1a2b3c4d`,next:[{command:buildCommandWithGlobalFlags(client.argv,USAGE),when:"Replace <team> with a team id or slug (comma-separate multiple teams)"}]},2),outputError(client,fr.jsonOutput,"MISSING_ARGUMENTS",`Usage: \`vercel ${USAGE}\``);let scope=await resolveVcrScope(client,{project,jsonOutput:fr.jsonOutput});if(typeof scope=="number")return scope;let path=repositoryPermissionsPath(scope,repository),added=[],failed=[];output_manager_default.spinner(`Sharing ${repository} with ${teamRefs.length===1?teamRefs[0]:`${teamRefs.length} teams`}...`);let sema=new import_async_sema.default(10),results;try{results=await Promise.all(teamRefs.map(async team=>{await sema.acquire();try{let result=await client.fetch(path,{method:"POST",body:teamRefBody(team)});return{ok:!0,team,permission:result.permission}}catch(err){if(!isAPIError(err))throw err;let message=err.serverMessage||`API error (${err.status}).`;return{ok:!1,team,failure:{team,code:err.code||"API_ERROR",message}}}finally{sema.release()}}))}finally{output_manager_default.stopSpinner()}for(let result of results)result.ok?(added.push(result.permission),fr.jsonOutput||output_manager_default.success(`Shared ${repository} with ${result.permission?.teamSlug??result.team}`)):(failed.push(result.failure),fr.jsonOutput||output_manager_default.error(`Failed to share ${repository} with ${result.team}: ${result.failure.message}`));return failed.length>0&&outputAgentError(client,{status:"error",reason:AGENT_REASON.API_ERROR,message:`Failed to share ${repository} with ${failed.map(f=>`${f.team} (${f.message})`).join(", ")}`},1),fr.jsonOutput&&client.stdout.write(`${JSON.stringify({permissions:added,failed},null,2)}
8
8
  `),failed.length>0?1:0}export{add as default};
@@ -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{DEFAULT_TAG,buildRepositoryReference,parseNameArg,validateImageParts}from"./chunk-HEGJZJO7.js";import{VCR_ENGINES,emitVcrArgParseError,isBuildxAvailable,isEngineInstalled,pushCompressionArgs,reportEngineCommandFailure,reportEnginePushFailure,resolveRegistry,resolveVcrScope,runEngine,splitPassthrough,validateVcrChoice}from"./chunk-QCG6Q33G.js";import{outputError}from"./chunk-WH3SHWVK.js";import"./chunk-GSOPJJO5.js";import{buildSubcommand}from"./chunk-RZGWCQP7.js";import"./chunk-AG5QQNJ3.js";import"./chunk-AU42HSQ3.js";import"./chunk-L5FUUGYX.js";import"./chunk-FBYA6LLM.js";import"./chunk-SCV7XEEO.js";import{printError}from"./chunk-WDJFZM7U.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-5DXCVG5U.js";import"./chunk-D4MW3RDW.js";import"./chunk-67N2NJCF.js";import"./chunk-HMS3UIQ2.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-VKXEOL4K.js";import"./chunk-4SAVH3H7.js";import"./chunk-ZS2WS4AM.js";import"./chunk-AOWWC6WZ.js";import"./chunk-MY4MONOH.js";import{parseArguments}from"./chunk-R4VVQRLX.js";import"./chunk-BKV35LVB.js";import{getFlagsSpecification}from"./chunk-5IPBCD7K.js";import"./chunk-IOJYYPUF.js";import"./chunk-ROPQIBWJ.js";import"./chunk-VKPZP4LC.js";import"./chunk-PPCFQQSU.js";import"./chunk-N7Q2IESO.js";import"./chunk-WPQN5UKR.js";import"./chunk-VOZEB6PD.js";import"./chunk-YIIPBH2D.js";import"./chunk-JESNVRVR.js";import{output_manager_default}from"./chunk-75IAMKGV.js";import"./chunk-RM3ZDRYE.js";import"./chunk-OO572JUC.js";import"./chunk-D3AHZ5LI.js";import"./chunk-2GHZGOWT.js";import"./chunk-YHPPP3SF.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BZENIQ7N.js";var DEFAULT_PLATFORM="linux/amd64";async function build(client,telemetry){let{own,passthrough}=splitPassthrough(client.argv),parsedArgs;try{parsedArgs=parseArguments(own,getFlagsSpecification(buildSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,"vcr build <engine> [path] [name[:tag]]"),printError(err),2}let[engineArg,pathArg,nameArg]=parsedArgs.args.slice(2),project=parsedArgs.flags["--project"],platform=parsedArgs.flags["--platform"],push=!!parsedArgs.flags["--push"];if(telemetry.trackCliArgumentEngine(engineArg),telemetry.trackCliArgumentPath(pathArg),telemetry.trackCliArgumentName(nameArg),telemetry.trackCliOptionProject(project),telemetry.trackCliOptionPlatform(platform),telemetry.trackCliFlagPush(push),!engineArg){let message=`Missing engine. Choose one of: ${VCR_ENGINES.join(", ")}.`;return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message,next:[{command:buildCommandWithGlobalFlags(client.argv,"vcr build docker"),when:"Replace docker with the container tool you use"}]},2),outputError(client,!1,"MISSING_ARGUMENTS",message)}let choiceError=validateVcrChoice(client,"engine",engineArg,VCR_ENGINES,!1);if(typeof choiceError=="number")return choiceError;let engine=engineArg;if(!isEngineInstalled(engine)){let message=`\`${engine}\` is not installed or not on your PATH. Install it and try again.`;return outputAgentError(client,{status:"error",reason:"engine_not_found",message},1),outputError(client,!1,"ENGINE_NOT_FOUND",message)}let scope=await resolveVcrScope(client,{project,jsonOutput:!1});if(typeof scope=="number")return scope;let parsed=parseNameArg(nameArg,scope.projectName);if("error"in parsed)return outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:parsed.error},2),outputError(client,!1,"INVALID_ARGUMENTS",parsed.error);let validationError=validateImageParts(parsed);if(validationError)return outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:validationError},2),outputError(client,!1,"INVALID_ARGUMENTS",validationError);let ref=`${buildRepositoryReference({registry:resolveRegistry(),teamSlug:scope.teamSlug,projectName:scope.projectName,repository:parsed.repository})}:${parsed.tag??DEFAULT_TAG}`,contextPath=pathArg??".",buildPlatform=platform??DEFAULT_PLATFORM;if(push&&engine==="docker"&&await isBuildxAvailable()){let outputSpec=`type=image,name=${ref},push=true,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true`,engineArgs2=["buildx","build","--platform",buildPlatform,"--output",outputSpec,...passthrough,contextPath];output_manager_default.log(`Running: ${engine} ${engineArgs2.join(" ")}`);let result2=await runEngine(engine,engineArgs2,{cwd:client.cwd,captureStderr:!0});return result2.exitCode!==0?reportEnginePushFailure(client,engine,"buildx build",result2):(output_manager_default.success(`Built and pushed ${ref} (zstd compression)`),0)}push&&engine==="docker"&&output_manager_default.warn("Docker Buildx is not available; building and pushing without zstd compression. Install Buildx for smaller, faster image pushes.");let engineArgs=["build","--platform",buildPlatform,"--tag",ref,...passthrough,contextPath];output_manager_default.log(`Running: ${engine} ${engineArgs.join(" ")}`);let result=await runEngine(engine,engineArgs,{cwd:client.cwd});if(result.exitCode!==0)return reportEngineCommandFailure(client,engine,"build",result);if(!push)return output_manager_default.success(`Built ${ref}`),output_manager_default.log(`Push it with \`${buildCommandWithGlobalFlags(client.argv,`vcr push ${engine}${nameArg?` ${nameArg}`:""}`)}\`.`),0;let pushArgs=["push",...pushCompressionArgs(engine),ref];output_manager_default.log(`Running: ${engine} ${pushArgs.join(" ")}`);let pushResult=await runEngine(engine,pushArgs,{cwd:client.cwd,captureStderr:!0});if(pushResult.exitCode!==0)return reportEnginePushFailure(client,engine,"push",pushResult);let compressed=engine!=="docker";return output_manager_default.success(`Built and pushed ${ref}${compressed?" (zstd compression)":""}`),0}export{build as default};
7
+ import{DEFAULT_TAG,buildRepositoryReference,parseNameArg,validateImageParts}from"./chunk-HEGJZJO7.js";import{VCR_ENGINES,emitVcrArgParseError,isBuildxAvailable,isEngineInstalled,pushCompressionArgs,reportEngineCommandFailure,reportEnginePushFailure,resolveRegistry,resolveVcrScope,runEngine,splitPassthrough,validateVcrChoice}from"./chunk-JJXNBWZY.js";import{outputError}from"./chunk-5UEBA6N6.js";import"./chunk-GSOPJJO5.js";import{buildSubcommand}from"./chunk-RZGWCQP7.js";import"./chunk-AG5QQNJ3.js";import"./chunk-AU42HSQ3.js";import"./chunk-L5FUUGYX.js";import"./chunk-FBYA6LLM.js";import"./chunk-SCV7XEEO.js";import{printError}from"./chunk-HYFA2W4U.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-R5FJNGWK.js";import"./chunk-D4MW3RDW.js";import"./chunk-TWRV6QGX.js";import"./chunk-HMS3UIQ2.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-VKXEOL4K.js";import"./chunk-4SAVH3H7.js";import"./chunk-ZS2WS4AM.js";import"./chunk-AOWWC6WZ.js";import"./chunk-MY4MONOH.js";import{parseArguments}from"./chunk-R4VVQRLX.js";import"./chunk-BKV35LVB.js";import{getFlagsSpecification}from"./chunk-5IPBCD7K.js";import"./chunk-LG5FP6PL.js";import"./chunk-ROPQIBWJ.js";import"./chunk-VKPZP4LC.js";import"./chunk-PPCFQQSU.js";import"./chunk-N7Q2IESO.js";import"./chunk-WPQN5UKR.js";import"./chunk-VOZEB6PD.js";import"./chunk-YIIPBH2D.js";import"./chunk-JESNVRVR.js";import{output_manager_default}from"./chunk-75IAMKGV.js";import"./chunk-RM3ZDRYE.js";import"./chunk-OO572JUC.js";import"./chunk-D3AHZ5LI.js";import"./chunk-2GHZGOWT.js";import"./chunk-YHPPP3SF.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BZENIQ7N.js";var DEFAULT_PLATFORM="linux/amd64";async function build(client,telemetry){let{own,passthrough}=splitPassthrough(client.argv),parsedArgs;try{parsedArgs=parseArguments(own,getFlagsSpecification(buildSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,"vcr build <engine> [path] [name[:tag]]"),printError(err),2}let[engineArg,pathArg,nameArg]=parsedArgs.args.slice(2),project=parsedArgs.flags["--project"],platform=parsedArgs.flags["--platform"],push=!!parsedArgs.flags["--push"];if(telemetry.trackCliArgumentEngine(engineArg),telemetry.trackCliArgumentPath(pathArg),telemetry.trackCliArgumentName(nameArg),telemetry.trackCliOptionProject(project),telemetry.trackCliOptionPlatform(platform),telemetry.trackCliFlagPush(push),!engineArg){let message=`Missing engine. Choose one of: ${VCR_ENGINES.join(", ")}.`;return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message,next:[{command:buildCommandWithGlobalFlags(client.argv,"vcr build docker"),when:"Replace docker with the container tool you use"}]},2),outputError(client,!1,"MISSING_ARGUMENTS",message)}let choiceError=validateVcrChoice(client,"engine",engineArg,VCR_ENGINES,!1);if(typeof choiceError=="number")return choiceError;let engine=engineArg;if(!isEngineInstalled(engine)){let message=`\`${engine}\` is not installed or not on your PATH. Install it and try again.`;return outputAgentError(client,{status:"error",reason:"engine_not_found",message},1),outputError(client,!1,"ENGINE_NOT_FOUND",message)}let scope=await resolveVcrScope(client,{project,jsonOutput:!1});if(typeof scope=="number")return scope;let parsed=parseNameArg(nameArg,scope.projectName);if("error"in parsed)return outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:parsed.error},2),outputError(client,!1,"INVALID_ARGUMENTS",parsed.error);let validationError=validateImageParts(parsed);if(validationError)return outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:validationError},2),outputError(client,!1,"INVALID_ARGUMENTS",validationError);let ref=`${buildRepositoryReference({registry:resolveRegistry(),teamSlug:scope.teamSlug,projectName:scope.projectName,repository:parsed.repository})}:${parsed.tag??DEFAULT_TAG}`,contextPath=pathArg??".",buildPlatform=platform??DEFAULT_PLATFORM;if(push&&engine==="docker"&&await isBuildxAvailable()){let outputSpec=`type=image,name=${ref},push=true,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true`,engineArgs2=["buildx","build","--platform",buildPlatform,"--output",outputSpec,...passthrough,contextPath];output_manager_default.log(`Running: ${engine} ${engineArgs2.join(" ")}`);let result2=await runEngine(engine,engineArgs2,{cwd:client.cwd,captureStderr:!0});return result2.exitCode!==0?reportEnginePushFailure(client,engine,"buildx build",result2):(output_manager_default.success(`Built and pushed ${ref} (zstd compression)`),0)}push&&engine==="docker"&&output_manager_default.warn("Docker Buildx is not available; building and pushing without zstd compression. Install Buildx for smaller, faster image pushes.");let engineArgs=["build","--platform",buildPlatform,"--tag",ref,...passthrough,contextPath];output_manager_default.log(`Running: ${engine} ${engineArgs.join(" ")}`);let result=await runEngine(engine,engineArgs,{cwd:client.cwd});if(result.exitCode!==0)return reportEngineCommandFailure(client,engine,"build",result);if(!push)return output_manager_default.success(`Built ${ref}`),output_manager_default.log(`Push it with \`${buildCommandWithGlobalFlags(client.argv,`vcr push ${engine}${nameArg?` ${nameArg}`:""}`)}\`.`),0;let pushArgs=["push",...pushCompressionArgs(engine),ref];output_manager_default.log(`Running: ${engine} ${pushArgs.join(" ")}`);let pushResult=await runEngine(engine,pushArgs,{cwd:client.cwd,captureStderr:!0});if(pushResult.exitCode!==0)return reportEnginePushFailure(client,engine,"push",pushResult);let compressed=engine!=="docker";return output_manager_default.success(`Built and pushed ${ref}${compressed?" (zstd compression)":""}`),0}export{build as default};
@@ -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{outputError,writeJsonError}from"./chunk-WH3SHWVK.js";import{resolveProjectContext}from"./chunk-WJEAGH4K.js";import{printError}from"./chunk-WDJFZM7U.js";import{detectExplicitScope,getScope}from"./chunk-67N2NJCF.js";import{getLinkedProject}from"./chunk-IOJYYPUF.js";import{isAPIError}from"./chunk-YIIPBH2D.js";import{getCommandName}from"./chunk-JESNVRVR.js";import{output_manager_default}from"./chunk-75IAMKGV.js";function handleCommentsParseError(err,subcommandName){return printError(err),err instanceof Error&&/unknown or unexpected option: -[^-]/.test(err.message)&&output_manager_default.log(`An argument starting with "-"? Put it after \`--\`: ${getCommandName(`comments ${subcommandName} -- <arg>`)}`),output_manager_default.log(`Run ${getCommandName(`comments ${subcommandName} --help`)} for usage.`),2}function threadNotFoundMessage(threadId,scope){return`Comment not found: ${threadId} in team ${scope.teamSlug??scope.teamId}. If it belongs to another team, pass --scope <team>.`}function query(teamId,params={}){let search=new URLSearchParams({teamId});for(let[key,value]of Object.entries(params))if(value!==void 0)if(Array.isArray(value))for(let entry of value)search.append(key,entry);else search.set(key,String(value));return search.toString()}var fetchOpts={useCurrentTeam:!1};function listThreads(client,teamId,params){return client.fetch(`/toolbar/threads?${query(teamId,{...params})}`,fetchOpts)}function getThread(client,teamId,threadId){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}?${query(teamId)}`,fetchOpts)}function updateThread(client,teamId,threadId,resolved){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}?${query(teamId)}`,{...fetchOpts,method:"PATCH",body:{resolved}})}function listMessages(client,teamId,threadId,opts={}){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}/messages?${query(teamId,{...opts})}`,fetchOpts)}function addMessage(client,teamId,threadId,body){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}/messages?${query(teamId)}`,{...fetchOpts,method:"POST",body})}function updateMessage(client,teamId,threadId,messageId,body){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}/messages/${encodeURIComponent(messageId)}?${query(teamId)}`,{...fetchOpts,method:"PATCH",body})}function deleteMessage(client,teamId,threadId,messageId){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}/messages/${encodeURIComponent(messageId)}?${query(teamId)}`,{...fetchOpts,method:"DELETE"})}function toApiErrorParts(err){let apiErr=err;return{code:apiErr.code||"API_ERROR",message:apiErr.serverMessage||`API error (${apiErr.status??"unknown"}).`}}import{spawnSync}from"node:child_process";async function resolveCommentsScope(client,opts){if(opts.urlTeamSlug&&!opts.project&&!detectExplicitScope(client))return{teamId:opts.urlTeamSlug,teamSlug:opts.urlTeamSlug};if(opts.project){let context;try{context=await resolveProjectContext({client,projectNameOrId:opts.project,projectNotFoundHandling:opts.jsonOutput?"return":"report"})}catch(err){if(isAPIError(err))return outputError(client,opts.jsonOutput,err.code||"API_ERROR",err.serverMessage||`API error (${err.status}).`);throw err}return context.status==="error"?(opts.jsonOutput&&writeJsonError(client,"PROJECT_CONTEXT_ERROR","Could not resolve the project context."),context.exitCode):context.status==="not_linked"?outputError(client,opts.jsonOutput,"PROJECT_NOT_FOUND",`Project "${opts.project}" was not found in the current scope.`):{teamId:context.org.id,teamSlug:context.org.slug,projectId:context.project.id,projectName:context.project.name,linked:!!context.repoRoot}}let linked=await getLinkedProject(client);if(linked.status==="error")return linked.exitCode;if(linked.status==="linked"){if(detectExplicitScope(client)){let{team:team2}=await getScope(client);if(!team2)return outputError(client,opts.jsonOutput,"NO_TEAM","No team context found for --scope.");if(team2.id!==linked.org.id)return opts.requireProject?outputError(client,opts.jsonOutput,"SCOPE_PROJECT_MISMATCH",`--scope ${team2.slug} does not match the linked project's team (${linked.org.slug}). Pass --project <name-or-id> for a project in ${team2.slug}.`):{teamId:team2.id,teamSlug:team2.slug}}return{teamId:linked.org.id,teamSlug:linked.org.slug,projectId:linked.project.id,projectName:linked.project.name,linked:!0}}if(opts.requireProject)return outputError(client,opts.jsonOutput,"NOT_LINKED","No linked project found. Run `vercel link` to link a project, or pass --project <name-or-id>.");let{team}=await getScope(client);return team?{teamId:team.id,teamSlug:team.slug}:outputError(client,opts.jsonOutput,"NO_TEAM","No team context found. Run `vercel switch` to select a team, or run `vercel link` in a project directory.")}function inferBranch(cwd){let result=spawnSync("git",["rev-parse","--abbrev-ref","HEAD"],{cwd,encoding:"utf8"});if(result.status===0){let branch=result.stdout.trim();if(branch&&branch!=="HEAD")return{value:branch,source:"git"}}let ciRef=process.env.VERCEL_GIT_COMMIT_REF||process.env.GITHUB_HEAD_REF||process.env.GITHUB_REF_NAME;if(ciRef)return{value:ciRef,source:"ci"}}export{handleCommentsParseError,threadNotFoundMessage,listThreads,getThread,updateThread,listMessages,addMessage,updateMessage,deleteMessage,toApiErrorParts,resolveCommentsScope,inferBranch};
7
+ import{outputError,writeJsonError}from"./chunk-5UEBA6N6.js";import{resolveProjectContext}from"./chunk-UC4YUQBN.js";import{printError}from"./chunk-HYFA2W4U.js";import{detectExplicitScope,getScope}from"./chunk-TWRV6QGX.js";import{getLinkedProject}from"./chunk-LG5FP6PL.js";import{isAPIError}from"./chunk-YIIPBH2D.js";import{getCommandName}from"./chunk-JESNVRVR.js";import{output_manager_default}from"./chunk-75IAMKGV.js";function handleCommentsParseError(err,subcommandName){return printError(err),err instanceof Error&&/unknown or unexpected option: -[^-]/.test(err.message)&&output_manager_default.log(`An argument starting with "-"? Put it after \`--\`: ${getCommandName(`comments ${subcommandName} -- <arg>`)}`),output_manager_default.log(`Run ${getCommandName(`comments ${subcommandName} --help`)} for usage.`),2}function threadNotFoundMessage(threadId,scope){return`Comment not found: ${threadId} in team ${scope.teamSlug??scope.teamId}. If it belongs to another team, pass --scope <team>.`}function query(teamId,params={}){let search=new URLSearchParams({teamId});for(let[key,value]of Object.entries(params))if(value!==void 0)if(Array.isArray(value))for(let entry of value)search.append(key,entry);else search.set(key,String(value));return search.toString()}var fetchOpts={useCurrentTeam:!1};function listThreads(client,teamId,params){return client.fetch(`/toolbar/threads?${query(teamId,{...params})}`,fetchOpts)}function getThread(client,teamId,threadId){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}?${query(teamId)}`,fetchOpts)}function updateThread(client,teamId,threadId,resolved){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}?${query(teamId)}`,{...fetchOpts,method:"PATCH",body:{resolved}})}function listMessages(client,teamId,threadId,opts={}){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}/messages?${query(teamId,{...opts})}`,fetchOpts)}function addMessage(client,teamId,threadId,body){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}/messages?${query(teamId)}`,{...fetchOpts,method:"POST",body})}function updateMessage(client,teamId,threadId,messageId,body){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}/messages/${encodeURIComponent(messageId)}?${query(teamId)}`,{...fetchOpts,method:"PATCH",body})}function deleteMessage(client,teamId,threadId,messageId){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}/messages/${encodeURIComponent(messageId)}?${query(teamId)}`,{...fetchOpts,method:"DELETE"})}function toApiErrorParts(err){let apiErr=err;return{code:apiErr.code||"API_ERROR",message:apiErr.serverMessage||`API error (${apiErr.status??"unknown"}).`}}import{spawnSync}from"node:child_process";async function resolveCommentsScope(client,opts){if(opts.urlTeamSlug&&!opts.project&&!detectExplicitScope(client))return{teamId:opts.urlTeamSlug,teamSlug:opts.urlTeamSlug};if(opts.project){let context;try{context=await resolveProjectContext({client,projectNameOrId:opts.project,projectNotFoundHandling:opts.jsonOutput?"return":"report"})}catch(err){if(isAPIError(err))return outputError(client,opts.jsonOutput,err.code||"API_ERROR",err.serverMessage||`API error (${err.status}).`);throw err}return context.status==="error"?(opts.jsonOutput&&writeJsonError(client,"PROJECT_CONTEXT_ERROR","Could not resolve the project context."),context.exitCode):context.status==="not_linked"?outputError(client,opts.jsonOutput,"PROJECT_NOT_FOUND",`Project "${opts.project}" was not found in the current scope.`):{teamId:context.org.id,teamSlug:context.org.slug,projectId:context.project.id,projectName:context.project.name,linked:!!context.repoRoot}}let linked=await getLinkedProject(client);if(linked.status==="error")return linked.exitCode;if(linked.status==="linked"){if(detectExplicitScope(client)){let{team:team2}=await getScope(client);if(!team2)return outputError(client,opts.jsonOutput,"NO_TEAM","No team context found for --scope.");if(team2.id!==linked.org.id)return opts.requireProject?outputError(client,opts.jsonOutput,"SCOPE_PROJECT_MISMATCH",`--scope ${team2.slug} does not match the linked project's team (${linked.org.slug}). Pass --project <name-or-id> for a project in ${team2.slug}.`):{teamId:team2.id,teamSlug:team2.slug}}return{teamId:linked.org.id,teamSlug:linked.org.slug,projectId:linked.project.id,projectName:linked.project.name,linked:!0}}if(opts.requireProject)return outputError(client,opts.jsonOutput,"NOT_LINKED","No linked project found. Run `vercel link` to link a project, or pass --project <name-or-id>.");let{team}=await getScope(client);return team?{teamId:team.id,teamSlug:team.slug}:outputError(client,opts.jsonOutput,"NO_TEAM","No team context found. Run `vercel switch` to select a team, or run `vercel link` in a project directory.")}function inferBranch(cwd){let result=spawnSync("git",["rev-parse","--abbrev-ref","HEAD"],{cwd,encoding:"utf8"});if(result.status===0){let branch=result.stdout.trim();if(branch&&branch!=="HEAD")return{value:branch,source:"git"}}let ciRef=process.env.VERCEL_GIT_COMMIT_REF||process.env.GITHUB_HEAD_REF||process.env.GITHUB_REF_NAME;if(ciRef)return{value:ciRef,source:"ci"}}export{handleCommentsParseError,threadNotFoundMessage,listThreads,getThread,updateThread,listMessages,addMessage,updateMessage,deleteMessage,toApiErrorParts,resolveCommentsScope,inferBranch};
@@ -0,0 +1,7 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import{tracesConfigCommand}from"./chunk-UFXKCETS.js";import{deploymentOption,nextCursorOption,projectOption,protectionBypassOption,sinceOption,untilOption,yesOption}from"./chunk-5IPBCD7K.js";import{packageName}from"./chunk-JESNVRVR.js";var spanQueryOptions=[{...projectOption,shorthand:"p",description:"Filter spans to one project (default: all team projects)"},{name:"environment",shorthand:null,type:String,deprecated:!1,description:"Environment: production or preview (case-insensitive)"},{name:"service",shorthand:null,type:String,deprecated:!1,description:"Filter by service name"},{name:"name",shorthand:null,type:String,deprecated:!1,description:"Filter by span name"},{name:"kind",shorthand:null,type:String,deprecated:!1,description:"Filter by span kind: unspecified (0), internal (1), server (2), client (3), producer (4), consumer (5)"},{name:"status",shorthand:null,type:String,deprecated:!1,description:"Status: error, ok, or unset (case-insensitive)"},{name:"deployment-id",shorthand:null,type:String,deprecated:!1,description:"Filter by deployment ID"},{name:"request-id",shorthand:null,type:String,deprecated:!1,description:"Filter by request ID. Some IDs return 404 in traces inspect. Reuse --scope and --project. See traces inspect --help."},{name:"trace-id",shorthand:null,type:String,deprecated:!1,description:"Filter by trace ID"},{name:"span-id",shorthand:null,type:String,deprecated:!1,description:"Filter by span ID"},{name:"root",shorthand:null,type:Boolean,deprecated:!1,description:"Show root spans only"},{...sinceOption,description:`${sinceOption.description} (default: 1h ago)`},untilOption];var requestIdLookupHelp={title:"Request-ID lookup",body:["A request ID in search results does not guarantee traces inspect can retrieve the trace. Lookup requires a matching root span in the same project within 30 minutes after the request-ID timestamp.","","If no matching root is found, lookup returns 404. Use the same --scope and --project for search and inspect."]},getSubcommand={name:"inspect",aliases:["get"],default:!0,description:"Fetch a captured trace by trace ID or request ID",helpSections:[{title:"Trace-ID lookup",body:["A 32-character hexadecimal ID selects trace-ID lookup. Other IDs select request-ID lookup.","Trace-ID lookup retrieves the trace directly within the trace retention window. Use the same --scope and --project as search."]},requestIdLookupHelp],arguments:[{name:"id",required:!0}],options:[{name:"json",shorthand:null,type:Boolean,deprecated:!1,description:"Print the raw trace JSON to stdout"},{name:"project",shorthand:null,type:String,argument:"NAME|ID",deprecated:!1,description:"Project name or id to fetch the trace from (overrides the linked project)."},{name:"open",shorthand:null,type:Boolean,deprecated:!1,description:"Open the trace in the Vercel Dashboard instead of printing it."},{name:"view",shorthand:null,type:String,argument:"timeline|tree|waterfall",deprecated:!1,description:"Dashboard view to open. Only valid with --open. Defaults to timeline."}],examples:[{name:"Fetch a trace by trace ID",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00`},{name:"Fetch a trace by request ID",value:`${packageName} traces inspect qb46r-1790847620933-1145d2891a3e`},{name:"Print the raw trace JSON",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --json`},{name:"Fetch a trace without the default inspect subcommand",value:`${packageName} traces e5c0d1efb3904155472b01692c7f2d00`},{name:"Fetch a trace from a specific team and project",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --scope my-team --project my-app`},{name:"Open the trace in the Vercel Dashboard",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --open`},{name:"Open the trace in the Vercel Dashboard with the waterfall view",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --open --view waterfall`}]},createSubcommand={name:"create",aliases:[],description:"Capture a session trace for a request (alias for `vercel curl --trace`).",arguments:[{name:"path",required:!0}],options:[deploymentOption,protectionBypassOption,{name:"json",shorthand:null,type:Boolean,deprecated:!1,description:"Emit { response, requestId } as JSON on stdout"},{...yesOption,description:"Skip the production confirmation prompt (e.g. in non-interactive mode)"}],examples:[{name:"Capture a session trace for a request",value:`${packageName} traces create /api/hello`},{name:"Target a specific deployment",value:`${packageName} traces create /api/status --deployment https://your-project-abc123.vercel.app`},{name:"Pass curl flags after the separator",value:`${packageName} traces create /api/test -- --request POST --data '{"name": "John"}'`}]},searchSubcommand={name:"search",aliases:[],description:"Search team spans. Use --project to filter one project. Results are newest first. Duration filters do not sort results.",helpSections:[{title:"Table columns",body:["Available: span.startTime, span.duration, span.name, span.status.code, service.name, environment, request.id, trace.id, span.id, parent.id, span.kind","Default: all except environment, request.id, and span.kind."]},{title:"KQL filters",body:["Fields: project.id, environment, service.name, deployment.id, request.id, user.id, session.id","Span fields: span.name, span.kind, span.id, parent.id, span.isRoot, span.status.code, span.duration","Trace fields: trace.id, trace.state","","Other fields search span attributes first, then resource attributes.","","span.duration uses milliseconds.","span.kind uses the numeric values shown under --kind.","span.status.code uses Error, Ok, or Unset.","Use field:value filters. Plain text search is not supported.","Use NOT to exclude values. End a value with * to match a prefix.","Wrap values with spaces in double quotes. Keep the full query in single quotes."]},{title:"Paging",body:["When more spans match, a Next page command is printed on stderr.","--json prints one span line per record and ends with a summary line; --non-interactive implies --json.","--next continues from the summary's pagination.next value. It keeps the original team, project, filters, and time window, so it can't be combined with them. --limit can change."]}],arguments:[],options:[...spanQueryOptions,{name:"limit",shorthand:"n",type:Number,deprecated:!1,description:"Maximum number of spans (default: 100)"},{name:"query",shorthand:"q",type:String,deprecated:!1,description:"Filter spans using KQL"},{name:"columns",shorthand:null,argument:"LIST",type:String,deprecated:!1,description:"Columns to show, in order. Separate names with commas. Cannot be used with --json or --non-interactive."},{...nextCursorOption,description:"Continue a previous search from its summary's next value"},{name:"json",shorthand:"j",type:Boolean,deprecated:!1,description:"Output JSON Lines ending with a summary line"}],examples:[{name:"Find production errors for one service",value:`${packageName} traces search --environment production --service checkout-api --status error --since 1h`},{name:"Use KQL and output JSON Lines",value:`${packageName} traces search --query 'http.route:"/api/checkout"' --kind server --json`},{name:"Exclude span names starting with app/lib/fetch-api",value:`${packageName} traces search --query 'NOT span.name:app/lib/fetch-api*'`},{name:"Exclude exact span names",value:`${packageName} traces search --query 'NOT span.name:("GET /screenshot/v2" OR "middleware GET")'`},{name:"Find spans longer than 2 seconds",value:`${packageName} traces search --query 'span.duration > 2000' --columns span.startTime,span.duration,span.name,span.kind,span.status.code`},{name:"Continue from the summary's next value",value:`${packageName} traces search --next <cursor> --json`}]},tracesCommand={name:"traces",aliases:[],description:"Fetch project traces and search spans across a Vercel team.",arguments:[{name:"id",required:!1}],subcommands:[getSubcommand,searchSubcommand,createSubcommand,tracesConfigCommand],options:[],examples:[{name:"Fetch a trace by trace ID",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00`},{name:"Fetch a trace by request ID",value:`${packageName} traces inspect qb46r-1790847620933-1145d2891a3e`},{name:"Print the raw trace JSON",value:`${packageName} traces inspect e5c0d1efb3904155472b01692c7f2d00 --json`},{name:"Capture a session trace for a request",value:`${packageName} traces create /api/hello`},{name:"Search recent spans",value:`${packageName} traces search --status error`},{name:"List the trace sampling rules for a project",value:`${packageName} traces config ls`}]};export{getSubcommand,createSubcommand,searchSubcommand,tracesCommand};