@vercel/cli-support 68.1.0 → 68.2.0-snapshot-3ff96ca5e2fe

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 (122) hide show
  1. package/dist/chunks/{add-57EE2LQO.js → add-4BFJ2SAR.js} +1 -1
  2. package/dist/chunks/{add-DNRNPUU7.js → add-5BQ3RSZQ.js} +1 -1
  3. package/dist/chunks/{add-FLVE2M3L.js → add-S7U4ZFBS.js} +1 -1
  4. package/dist/chunks/{alerts-26PDHRBL.js → alerts-GIT77GJG.js} +1 -1
  5. package/dist/chunks/{build-6WTRWW2M.js → build-RQ4ABN6Z.js} +1 -1
  6. package/dist/chunks/{chunk-WKEDN5SX.js → chunk-3JYREVOI.js} +1 -1
  7. package/dist/chunks/{chunk-U3IPJYB6.js → chunk-4HHDAGMC.js} +1 -1
  8. package/dist/chunks/{chunk-PP7BNCIG.js → chunk-4KHVAEGO.js} +1 -1
  9. package/dist/chunks/{chunk-7ZCM4LWL.js → chunk-4U6Y6LWP.js} +1 -1
  10. package/dist/chunks/{chunk-4FPYV37P.js → chunk-6JY43KSR.js} +1 -1
  11. package/dist/chunks/{chunk-GNQ7KLCN.js → chunk-BCOUDSOR.js} +1 -1
  12. package/dist/chunks/{chunk-OICSITNU.js → chunk-DRNUHJ6I.js} +1 -1
  13. package/dist/chunks/{chunk-76AOTUM2.js → chunk-HJPZOKEB.js} +1 -1
  14. package/dist/chunks/chunk-IKVQLMEI.js +7 -0
  15. package/dist/chunks/{chunk-BCD4TRQF.js → chunk-J54A5356.js} +1 -1
  16. package/dist/chunks/chunk-JOOWSBNQ.js +7 -0
  17. package/dist/chunks/{chunk-FO7OSSLI.js → chunk-LA3VRJX7.js} +1 -1
  18. package/dist/chunks/chunk-LUQPAO6K.js +7 -0
  19. package/dist/chunks/{chunk-732HWE3P.js → chunk-R2LNF5VK.js} +2 -2
  20. package/dist/chunks/{chunk-ILUU3SGP.js → chunk-R6LM3MBK.js} +2 -2
  21. package/dist/chunks/{chunk-YVWIDLY4.js → chunk-RBM4KOQ2.js} +3 -3
  22. package/dist/chunks/{chunk-AASXSNBW.js → chunk-RBZOVE2W.js} +1 -1
  23. package/dist/chunks/chunk-RVQ26UHS.js +7 -0
  24. package/dist/chunks/{chunk-QMI7GTT2.js → chunk-RXHW3T4H.js} +1 -1
  25. package/dist/chunks/chunk-TTJWZ3ZW.js +7 -0
  26. package/dist/chunks/{chunk-CNGI6Z2G.js → chunk-TXROE436.js} +1 -1
  27. package/dist/chunks/chunk-USCJFJD4.js +7 -0
  28. package/dist/chunks/{chunk-PSMKLDLV.js → chunk-YXJXKKS5.js} +1 -1
  29. package/dist/chunks/{chunk-FSMZPHAA.js → chunk-Z2L36RO3.js} +1 -1
  30. package/dist/chunks/{chunk-DWA7B7TB.js → chunk-Z3Z5GBKO.js} +1 -1
  31. package/dist/chunks/{clear-4MDTHLLE.js → clear-PQBUHQMO.js} +1 -1
  32. package/dist/chunks/{commands-Bx-lrmie-W7FCFL4P.js → commands-Bx-lrmie-3SGNZMAL.js} +1 -1
  33. package/dist/chunks/{config-A7DCP25J.js → config-6CSTGEZQ.js} +1 -1
  34. package/dist/chunks/{config-HiWLfXRQ-D7JA4E3D.js → config-HiWLfXRQ-C5TMRFGS.js} +1 -1
  35. package/dist/chunks/{config-4R62ATWJ.js → config-QQY3G5PG.js} +1 -1
  36. package/dist/chunks/{connect-U3yG4EtI-XYHDJQT7.js → connect-U3yG4EtI-W4F53AYR.js} +1 -1
  37. package/dist/chunks/{cp-aFe-HVrK-UAGAR2BC.js → cp-aFe-HVrK-NIJ7LN5P.js} +1 -1
  38. package/dist/chunks/{create-ilHWvzSk-7KWZXBE2.js → create-ilHWvzSk-5CZ443XL.js} +1 -1
  39. package/dist/chunks/{delete-DN53BRH7.js → delete-CELW3NLN.js} +1 -1
  40. package/dist/chunks/{delete-G4MAUBXZ.js → delete-YRATGP5Y.js} +1 -1
  41. package/dist/chunks/{dist-4F3LAB5Z.js → dist-6OEIUX4D.js} +1 -1
  42. package/dist/chunks/{domain-DGvr_U55-PNXSOVDO.js → domain-DGvr_U55-DTHIJA2K.js} +1 -1
  43. package/dist/chunks/{drives-Bi-Mnt2z-Z4T2YY4P.js → drives-Bi-Mnt2z-NUZTZOCO.js} +1 -1
  44. package/dist/chunks/{edit-7AUE6GXE.js → edit-YAYZEQRX.js} +1 -1
  45. package/dist/chunks/{exec-Bwv4MDyN-7YUAVBB2.js → exec-Bwv4MDyN-H45MRS5Y.js} +1 -1
  46. package/dist/chunks/{extend-D9tq9Cot-QT72AXGH.js → extend-D9tq9Cot-VK6JMUOY.js} +1 -1
  47. package/dist/chunks/{fork-DQ6qfKqB-XXTHHUMZ.js → fork-DQ6qfKqB-F3SVDDUI.js} +1 -1
  48. package/dist/chunks/group-actions-UOMO2WB2.js +14 -0
  49. package/dist/chunks/{groups-B8JVEeKk-K57VTXSS.js → groups-B8JVEeKk-K3CAYKG3.js} +1 -1
  50. package/dist/chunks/{image-DX2IAUKJ.js → image-DXZ4FKTV.js} +1 -1
  51. package/dist/chunks/{inspect-IHVP2M4H.js → inspect-BZKFXH45.js} +1 -1
  52. package/dist/chunks/{inspect-PBSKPN4W.js → inspect-TAR6RBRU.js} +1 -1
  53. package/dist/chunks/{inspect-GJXLYJC7.js → inspect-TDDHNNQS.js} +1 -1
  54. package/dist/chunks/inspect-YBEV7TZS.js +13 -0
  55. package/dist/chunks/{inspect-BS5UPI6W.js → inspect-YPATSOEP.js} +1 -1
  56. package/dist/chunks/{list-2ZCNO6DY.js → list-6JXV7U6T.js} +1 -1
  57. package/dist/chunks/{list-TUST62E6.js → list-JB32VTAB.js} +2 -2
  58. package/dist/chunks/{list-ZSQVIQXC.js → list-KJGICUN5.js} +1 -1
  59. package/dist/chunks/{list-iqQFvOHx-PNAUIUQL.js → list-iqQFvOHx-X3FHHVJX.js} +1 -1
  60. package/dist/chunks/{login-DGxA9ez--ZRIJ24TS.js → login-DGxA9ez--34Z67E3O.js} +1 -1
  61. package/dist/chunks/{login-CUEQHDT5.js → login-NXBKDSGN.js} +1 -1
  62. package/dist/chunks/{logout-OEbPJLu2-7NPM6ALK.js → logout-OEbPJLu2-RYNBWYWW.js} +1 -1
  63. package/dist/chunks/{ls-EEJQIKNI.js → ls-5UEICZHX.js} +1 -1
  64. package/dist/chunks/{ls-XYEJ5MR6.js → ls-A576SCRN.js} +1 -1
  65. package/dist/chunks/ls-BPD6GAEF.js +8 -0
  66. package/dist/chunks/{ls-UMSUUQCG.js → ls-KSFP2X45.js} +1 -1
  67. package/dist/chunks/{ls-27K5BB7Z.js → ls-SSLCXR4A.js} +1 -1
  68. package/dist/chunks/{ls-W7C5I555.js → ls-TBZHWZVO.js} +1 -1
  69. package/dist/chunks/{mutate-IELSY6ED.js → mutate-IQQTYNNF.js} +1 -1
  70. package/dist/chunks/{notifications-GZH7CFZY.js → notifications-BC2UCLDC.js} +1 -1
  71. package/dist/chunks/{open-EVYPUPNZ.js → open-JS5WAG77.js} +1 -1
  72. package/dist/chunks/{permissions-EHF5MNZP.js → permissions-3CD6EL4U.js} +1 -1
  73. package/dist/chunks/{push-YWKZ6SOO.js → push-TO7G2R7N.js} +1 -1
  74. package/dist/chunks/{query-G62G25HV.js → query-EVW5T2PI.js} +1 -1
  75. package/dist/chunks/{raw-query-WTKAOYCP.js → raw-query-7GAKEK2P.js} +1 -1
  76. package/dist/chunks/{read-BTA5slYO-IJLWMNSS.js → read-BTA5slYO-BJWNLVXG.js} +1 -1
  77. package/dist/chunks/{remove-7PSNAEDY.js → remove-AAFJR4EN.js} +1 -1
  78. package/dist/chunks/{remove-CCa99nz9-LCSNBDLT.js → remove-CCa99nz9-GDMR52SN.js} +1 -1
  79. package/dist/chunks/{reorder-OLCKSATY.js → reorder-QVSTUVEQ.js} +1 -1
  80. package/dist/chunks/{reply-OVHQNEBO.js → reply-QSTMHPP5.js} +1 -1
  81. package/dist/chunks/{resolve-TUHO4FHT.js → resolve-MITWQMP7.js} +1 -1
  82. package/dist/chunks/{rm-5RGN33Y5.js → rm-6KTCXHBG.js} +1 -1
  83. package/dist/chunks/{rm-D7CWGBTV.js → rm-GXDLM3SA.js} +1 -1
  84. package/dist/chunks/{rm-FYU3GBLC.js → rm-HXJWSOE4.js} +1 -1
  85. package/dist/chunks/{rm-HA752TW6.js → rm-M7QVN2N6.js} +1 -1
  86. package/dist/chunks/{rule-inspect-Y2MX7LQN.js → rule-inspect-D3BVZZRN.js} +1 -1
  87. package/dist/chunks/{run-D8obqfKw-D2EGHTU2.js → run-D8obqfKw-OEX3KLVO.js} +1 -1
  88. package/dist/chunks/{schema-UVTYLX6L.js → schema-T5BO3RBL.js} +1 -1
  89. package/dist/chunks/{sessions-cvWvPgzc-FBOQQPU5.js → sessions-cvWvPgzc-TBJZH7TC.js} +1 -1
  90. package/dist/chunks/{sh-7olsIyJh-NFO2QYTK.js → sh-7olsIyJh-FVAQLHEW.js} +1 -1
  91. package/dist/chunks/{snapshot-D9MAspub-UAVA2YSK.js → snapshot-D9MAspub-3U6JKVET.js} +1 -1
  92. package/dist/chunks/{snapshots-DQjvm6St-DBG4H2HS.js → snapshots-DQjvm6St-OGXR5PCJ.js} +1 -1
  93. package/dist/chunks/{stop-SQX-uC-Q-CRDQOA5M.js → stop-SQX-uC-Q-JSVPVN5K.js} +1 -1
  94. package/dist/chunks/{tags-DEIOW5MM.js → tags-KBCTII3M.js} +1 -1
  95. package/dist/chunks/{update-VG2LHBRV.js → update-FZESOZEW.js} +1 -1
  96. package/dist/chunks/{users-CGEsQ4G8-POYTVZJV.js → users-CGEsQ4G8-R2N46HVG.js} +1 -1
  97. package/dist/chunks/views-YXAMSKLM.js +11 -0
  98. package/dist/chunks/{write-DixEhGqz-YYDLLSJE.js → write-DixEhGqz-GBORRSZU.js} +1 -1
  99. package/dist/commands/deploy/index.js +1 -1
  100. package/dist/commands/env/index.js +1 -1
  101. package/dist/commands/link/index.js +1 -1
  102. package/dist/commands/project/index.js +1 -1
  103. package/dist/commands-account.js +2 -2
  104. package/dist/commands-ai.js +1 -1
  105. package/dist/commands-blob.js +1 -1
  106. package/dist/commands-core.js +78 -46
  107. package/dist/commands-deployments.js +1 -1
  108. package/dist/commands-flags.js +1 -1
  109. package/dist/commands-integrations.js +1 -1
  110. package/dist/commands-observability.js +2 -2
  111. package/dist/commands-routing.js +2 -2
  112. package/dist/index.js +1 -1
  113. package/dist/internal-build.js +1 -1
  114. package/dist/package.json +1 -1
  115. package/dist/root-help-commands.mjs +1 -1
  116. package/dist/version.mjs +1 -1
  117. package/package.json +11 -11
  118. package/dist/chunks/chunk-4OOHXEKI.js +0 -7
  119. package/dist/chunks/chunk-RACUGILV.js +0 -7
  120. package/dist/chunks/inspect-Y7VXJEI2.js +0 -13
  121. package/dist/chunks/ls-PAL6FQB6.js +0 -8
  122. /package/dist/chunks/{chunk-OTIERMC7.js → chunk-COOA33HY.js} +0 -0
@@ -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{RoutesAddTelemetryClient,RoutesTelemetryClient}from"./chunks/chunk-2STLJAXZ.js";import{ALL_ACTION_CHOICES,MAX_CONDITIONS,MAX_DESCRIPTION_LENGTH,MAX_NAME_LENGTH,REDIRECT_STATUS_CODES,VALID_SYNTAXES,collectActionDetails,collectHeadersAndTransforms,collectInteractiveConditions,convertRouteToCurrentRoute,extractTransformFlags,generateRoute,generatedRouteToAddInput,parseConditions,populateRouteEnv,printGeneratedRoutePreview,runInteractiveEditLoop,stripQuotes,validateActionFlags}from"./chunks/chunk-WQBNOQUT.js";import{getRouteVersions}from"./chunks/chunk-BVH2AEFE.js";import{TRANSFORM_TYPE_LABELS,findVersionById,formatCondition,formatTransform,getRouteTypeLabel,getRoutes,getSrcSyntaxLabel,isTargetTransform,offerAutoPromote,parsePosition,parseSubcommandArgs,withGlobalFlags as withGlobalFlags2}from"./chunks/chunk-LHK6B4ER.js";import{LOCAL_SCHEDULES_SESSION_HEADER,isLocalSchedulesOrigin,readLocalSchedulesSessions}from"./chunks/chunk-XPEWDJV6.js";import{getLinkedFlagsProject,getProjectNameFromFlags}from"./chunks/chunk-BB27VKHS.js";import{OBSERVABILITY_METRICS_PATH}from"./chunks/chunk-EDXNAXEZ.js";import{ensureMicrofrontendsContext,fetchMicrofrontendsGroups,validateDefaultRoute,validateRoutingPath}from"./chunks/chunk-42RUDD27.js";import{BLOCKED_DEPLOYMENT_REASON,Now,getBlockKind,getBlockedDeploymentDetails,getBlockedDeploymentMessage,getTeamMembersUrl,isBlockedDeployment,printBlockedDeployment,printDeploymentStatus,stripControlCharacters}from"./chunks/chunk-JRUL67UC.js";import{isDeploying}from"./chunks/chunk-ZFRNVIHI.js";import"./chunks/chunk-2XQO6C7Q.js";import"./chunks/chunk-S4ARHJGW.js";import"./chunks/chunk-C2R5IEN6.js";import"./chunks/chunk-Y7SZI3JV.js";import{getCustomEnvironments,pickCustomEnvironment}from"./chunks/chunk-AU54JBLF.js";import"./chunks/chunk-MAAJGMXM.js";import{deploymentJson}from"./chunks/chunk-KKE55LTK.js";import{parseJsonObjectFlag,readPrivateKey}from"./chunks/chunk-DRDY2UZX.js";import{parseSubcommandArguments,requireProjectContext,validateRequiredArguments}from"./chunks/chunk-WRTBYD4I.js";import{formatMetricValue,generateSparkline}from"./chunks/chunk-IZOKMWU5.js";import"./chunks/chunk-JK3NTR7T.js";import"./chunks/chunk-IVSSTHB6.js";import"./chunks/chunk-YIKXLWSR.js";import"./chunks/chunk-U56NHYAH.js";import{readJSONFile}from"./chunks/chunk-KNKGJD5J.js";import{getTeamBillingUrl}from"./chunks/chunk-XR6QY7RR.js";import"./chunks/chunk-VT6RIZJH.js";import"./chunks/chunk-EL65DTVZ.js";import{isValidName}from"./chunks/chunk-PADL3C6Z.js";import{require_async_sema}from"./chunks/chunk-ZOJI7HYA.js";import"./chunks/chunk-KG526MHL.js";import{handleValidationError,normalizeRepeatableStringFilters,validateIntegerRangeWithDefault,validateOptionalIntegerRange,validateTimeBound,validateTimeOrder}from"./chunks/chunk-4FPYV37P.js";import{getAliases}from"./chunks/chunk-4R7ICESH.js";import{INVALID_NEXT_MESSAGE,parseNumericCursor}from"./chunks/chunk-C6GY2G73.js";import{resolveTimeRange}from"./chunks/chunk-FIICEEXO.js";import{formatDate}from"./chunks/chunk-46R47IE5.js";import{formatTable,strlen}from"./chunks/chunk-PR4NNS3O.js";import{stamp_default}from"./chunks/chunk-LY3EY2VG.js";import{elapsed}from"./chunks/chunk-LLHXL3SV.js";import{printUnknownCommand}from"./chunks/chunk-OICSITNU.js";import{applyDeprecatedTargetFlag}from"./chunks/chunk-7IHVCKUV.js";import"./chunks/chunk-GZNDA6SV.js";import{formatProject}from"./chunks/chunk-3HP6FOOL.js";import"./chunks/chunk-K7YK4PZP.js";import{require_open}from"./chunks/chunk-CSU46B7Q.js";import{resolveProjectContext}from"./chunks/chunk-JJTAADC5.js";import{ensureLink}from"./chunks/chunk-IMZD7QEB.js";import"./chunks/chunk-Q4W3R6U2.js";import{getDeployment}from"./chunks/chunk-MMMX3KE2.js";import"./chunks/chunk-WWEUGL6W.js";import{getCommandFlags}from"./chunks/chunk-XGTKHQTT.js";import{require_format}from"./chunks/chunk-OM6NML7C.js";import{getInvalidSubcommand}from"./chunks/chunk-TG2RCYTH.js";import{requireApproval}from"./chunks/chunk-YVWIDLY4.js";import"./chunks/chunk-NFBFXM6X.js";import"./chunks/chunk-KDCLHZYL.js";import{trackCreatedId}from"./chunks/chunk-ILNTOWHG.js";import{canPromptOnTerminal}from"./chunks/chunk-IQ7FPAI4.js";import{getRenamedOption,renameOptionInArgs,reportRenamedOptionError,withWarnings}from"./chunks/chunk-R5KBPWWS.js";import{getSubcommand as getSubcommand2}from"./chunks/chunk-ETV3C2CV.js";import{validateLsArgs}from"./chunks/chunk-T4257EDB.js";import{table}from"./chunks/chunk-QCYCLWNG.js";import{getNextPageCommand,printNextPageCommand}from"./chunks/chunk-WS6UOPMS.js";import"./chunks/chunk-GILTW5RJ.js";import{param}from"./chunks/chunk-ERMHTPO4.js";import{KMS_ALGORITHMS,PROJECT_GRANT_POLICY_KIND,activateKeySubcommand,addGrantSubcommand,addKeySubcommand,addSubcommand8 as addSubcommand,addSubcommand9 as addSubcommand2,addToGroupSubcommand,analyzeSubcommand,createGroupSubcommand,createSubcommand5 as createSubcommand,createSubcommand9 as createSubcommand2,decideSubcommand,deleteGroupSubcommand,deleteSubcommand3 as deleteSubcommand,deleteSubcommand5 as deleteSubcommand3,diagnoseSubcommand,disableSubcommand4 as disableSubcommand2,enableSubcommand4 as enableSubcommand2,executionsListSubcommand,executionsSubcommand,experimentsCommand,getCommandAliases,getSubcommand2 as getSubcommand,importKeySubcommand,importSubcommand2 as importSubcommand,inspectGroupSubcommand,inspectSubcommand14 as inspectSubcommand3,inspectSubcommand5 as inspectSubcommand,inspectSubcommand9 as inspectSubcommand2,instancesInspectSubcommand,instancesListSubcommand,instancesRestartSubcommand,instancesSubcommand,invokeSubcommand,isProjectGrant,issuerJwksUrl,issuerUrl,kmsCommand,listSubcommand14 as listSubcommand2,listSubcommand19 as listSubcommand3,listSubcommand22 as listSubcommand4,listSubcommand23 as listSubcommand6,listSubcommand9 as listSubcommand,listVersionsSubcommand,microfrontendsCommand,openSubcommand2 as openSubcommand,promoteSubcommand,pullSubcommand,redeployCommand,redirectsCommand,removeCommand,removeFromGroupSubcommand,removeGrantSubcommand,removeSubcommand13 as removeSubcommand,removeSubcommand14 as removeSubcommand2,reseedEnrollmentSubcommand,restartAnalysisSubcommand,restoreSubcommand,returnToDraftSubcommand,revokeKeySubcommand,scaleSubcommand,schedulesCommand,setRampSubcommand,startSubcommand,updateGrantSubcommand,updateSubcommand12 as updateSubcommand3,updateSubcommand4 as updateSubcommand,updateSubcommand9 as updateSubcommand2,uploadSubcommand}from"./chunks/chunk-ILUU3SGP.js";import"./chunks/chunk-4MAA4BQD.js";import{addSubcommand as addSubcommand3,deleteSubcommand as deleteSubcommand2,disableSubcommand,discardSubcommand,editSubcommand,enableSubcommand,exportSubcommand,inspectSubcommand as inspectSubcommand4,listSubcommand as listSubcommand5,listVersionsSubcommand as listVersionsSubcommand2,publishSubcommand,reorderSubcommand,restoreSubcommand as restoreSubcommand2,routesCommand}from"./chunks/chunk-GO64LSUW.js";import"./chunks/chunk-TUPVVZ4I.js";import"./chunks/chunk-XHWA436J.js";import"./chunks/chunk-OXQKWOLS.js";import"./chunks/chunk-HXIOR7P6.js";import"./chunks/chunk-M3LYYAQ6.js";import"./chunks/chunk-L74PQVPL.js";import"./chunks/chunk-CHTFRAXA.js";import"./chunks/chunk-T2IZUTGY.js";import"./chunks/chunk-3F3WNT5K.js";import"./chunks/chunk-P7GA2C6N.js";import"./chunks/chunk-RPYIWRSN.js";import"./chunks/chunk-CDO5IECP.js";import"./chunks/chunk-6XXXPJBV.js";import"./chunks/chunk-HT5EXCYX.js";import"./chunks/chunk-RACUGILV.js";import"./chunks/chunk-R3ZPLQDI.js";import"./chunks/chunk-QPPFQREO.js";import"./chunks/chunk-X2UJGCIC.js";import"./chunks/chunk-XZYVBYUY.js";import{DEV_RESOURCE_TOKEN}from"./chunks/chunk-EZ3HXFLB.js";import"./chunks/chunk-WMIZ6Y4E.js";import"./chunks/chunk-QPNYOR6O.js";import"./chunks/chunk-JGEJY7AC.js";import"./chunks/chunk-LBJ7EOZM.js";import{getContextName,getScope}from"./chunks/chunk-CRPZYLIL.js";import{TelemetryClient}from"./chunks/chunk-QROPMCL2.js";import{getLinkedProject,isPromptCanceledError,jsonNextStep,require_dist2,require_lib,responseError,runWithJsonOutput,sleep,writeJsonError,writeJsonFailure,writeJsonResult,writeJsonUsageError}from"./chunks/chunk-HDKEES7E.js";import{ALIGNED_LABEL_WIDTH,formatAlignedLabel,printAlignedLabel}from"./chunks/chunk-SUD5V67L.js";import{require_pluralize}from"./chunks/chunk-7TRHPXCG.js";import{getProjectByNameOrId}from"./chunks/chunk-UGVOMXYR.js";import{ua_default}from"./chunks/chunk-QRPBDCDH.js";import"./chunks/chunk-2GXP676X.js";import"./chunks/chunk-K5GE24PG.js";import"./chunks/chunk-IFMPBA4K.js";import"./chunks/chunk-KHJWQ4WP.js";import{directFetch,getFetchDispatcher}from"./chunks/chunk-MY4MONOH.js";import"./chunks/chunk-YATYCZQJ.js";import{require_ms}from"./chunks/chunk-2ILZM77F.js";import{printError}from"./chunks/chunk-7EI554V5.js";import{getTypedOptionName,isArgumentError,parseArguments,takeCommand}from"./chunks/chunk-E7ICSU45.js";import{AGENT_ACTION,AGENT_REASON,AGENT_STATUS,buildCommandWithGlobalFlags,buildCommandWithYes,getErrorRecovery,getExitCodeForReason,openUrlInBrowserCommand,outputActionRequired,outputAgentError,quoteSuggestionToken,shouldEmitNonInteractiveCommandError,withGlobalFlags,writeActionRequired}from"./chunks/chunk-E6VQXHBD.js";import{validateJsonOutput,wantsMachineReadableOutput,warnDeprecatedInput,warnDeprecatedOption,warnDeprecatedSubcommand}from"./chunks/chunk-BDLZ6WL2.js";import"./chunks/chunk-PH2MLBQO.js";import"./chunks/chunk-DCFCPAFQ.js";import"./chunks/chunk-GOXGA37R.js";import{NowError,ProjectNotFound,humanizePath,isAPIError}from"./chunks/chunk-MTPHHAPR.js";import{cmd,getCommandName,getCommandNamePlain}from"./chunks/chunk-EFGZK6OY.js";import"./chunks/chunk-JCDPMWKO.js";import{emoji,link_default,output_manager_default,prependEmoji}from"./chunks/chunk-RIXTYUYN.js";import"./chunks/chunk-7Y572CPZ.js";import"./chunks/chunk-BVFFSUG3.js";import"./chunks/chunk-RRX2AMWY.js";import"./chunks/chunk-GUFRGEM5.js";import"./chunks/chunk-SUT2PTL3.js";import"./chunks/chunk-AX6UCTOC.js";import{require_dist}from"./chunks/chunk-4SIQE2W4.js";import"./chunks/chunk-MF43WTDT.js";import"./chunks/chunk-FUH5PBGR.js";import{help}from"./chunks/chunk-7TREJIPV.js";import"./chunks/chunk-7QHUMMBA.js";import{remoteText}from"./chunks/chunk-AUCQKYL2.js";import{getFlagsSpecification,getGlobalFlagsFromArgs,getProjectOptionFromArgs,getSameSubcommandSuggestionFlags,normalizeFlagName,quoteArg}from"./chunks/chunk-CUO3CYU3.js";import"./chunks/chunk-2BKALEOP.js";import{require_source}from"./chunks/chunk-UJ7YUIEJ.js";import"./chunks/chunk-L6MWUMWZ.js";import"./chunks/chunk-L4CSJDG7.js";import"./chunks/chunk-YHZXIBS7.js";import"./chunks/chunk-LPYHYTYI.js";import{__toESM}from"./chunks/chunk-NBPLUP7C.js";var DaemonsTelemetryClient=class extends TelemetryClient{constructor(){super(...arguments);this.sub=subcommand=>value=>this.trackSubcommand(subcommand,value);this.arg=arg=>value=>this.trackCliArgument({arg,value:value&&this.redactedValue});this.option=option=>value=>this.trackRedactedCliOption(option,value);this.flag=flag=>value=>{value&&this.trackCliFlag(flag)};this.trackCliSubcommandList=this.sub("list");this.trackCliSubcommandScale=this.sub("scale");this.trackCliSubcommandInstances=this.sub("instances");this.trackCliSubcommandInspect=this.sub("inspect");this.trackCliSubcommandRestart=this.sub("restart");this.trackCliArgumentDaemon=this.arg("daemon");this.trackCliArgumentInstance=this.arg("instance");this.trackCliOptionNext=this.option("next");this.trackCliOptionSince=this.option("since");this.trackCliOptionUntil=this.option("until");this.trackCliFlagReset=this.flag("reset");this.trackCliFlagJson=this.flag("json")}trackCliOptionEnvironment(value){value&&this.trackCliOption({option:"environment",value:this.redactedTargetName(value)})}trackSubcommand(subcommand,value){this.trackCliSubcommand({subcommand,value})}trackCliArgumentOverrides(value){let count=value.length?String(value.length):void 0;this.trackCliArgument({arg:"overrides",value:count})}trackRequestedInstances(overrides){let counts=Object.values(overrides);if(counts.length===0)return;let total=counts.reduce((sum,count)=>sum+count,0);this.trackCommandOutput({key:"requested-instances",value:String(total)})}trackScaleResult(result){this.trackCommandOutput({key:"scale-result",value:result})}trackCliOptionLimit(value){value!==void 0&&this.trackCliOption({option:"limit",value:String(value)})}trackOptions(flags){this.trackCliOptionProject(flags["--project"]),this.trackCliOptionEnvironment(flags["--environment"]),this.trackCliOptionLimit(flags["--limit"]),this.trackCliOptionNext(flags["--next"]),this.trackCliOptionSince(flags["--since"]),this.trackCliOptionUntil(flags["--until"]),this.trackCliFlagReset(flags["--reset"]),this.trackCliOptionFormat(flags["--format"]),this.trackCliFlagJson(flags["--json"])}};var import_chalk2=__toESM(require_source(),1);var import_chalk=__toESM(require_source(),1),import_ms=__toESM(require_ms(),1);function isJsonOutput(client){return wantsMachineReadableOutput("daemons",client.argv)||client.nonInteractive}function reportError(client,err,exitCode=1){if(!isJsonOutput(client))return printError(err,client),exitCode;let apiError=isAPIError(err)?err:void 0,reason=exitCode===2?AGENT_REASON.INVALID_ARGUMENTS:AGENT_REASON.API_ERROR,message=exitCode===2&&err instanceof Error?err.message:"Couldn't complete the daemon command.";return writeJsonError(client,{status:AGENT_STATUS.ERROR,reason,message,...apiError&&{...getErrorRecovery(apiError,client),data:{httpStatus:apiError.status}}},exitCode)}function toDaemon(daemon){if(!("replicas"in daemon))return daemon;let{replicas:instances,config,...rest}=daemon;if(!config)return{...rest,instances};let{replicas,configuredReplicas,...restConfig}=config;return{...rest,config:{...restConfig,instances:replicas,configuredInstances:configuredReplicas},instances}}var DAEMON_NAME_PATTERN=/^[a-zA-Z0-9_-]+$/;function environmentName(environment){return environment.type==="production"?"production":environment.name}function environmentLabel(environment){return environment.type==="production"?"Production":environment.name}var ENVIRONMENT_SELECTOR_PATTERN=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/,UNSUPPORTED_ENVIRONMENTS=["preview","development"],parsedEnvironments=new WeakMap;function validateEnvironment(value){if(value!==void 0){if(!ENVIRONMENT_SELECTOR_PATTERN.test(value))return"Expected an environment: production, or a custom environment slug or ID.";if(UNSUPPORTED_ENVIRONMENTS.includes(value.toLowerCase()))return"Daemons run in Production and custom environments, not in Preview or Development."}}function instanceIdArg(client,args,usage){return args.length===0?failure(client,AGENT_REASON.INVALID_ARGUMENTS,"An instance ID is required.",{command:"instances list",when:"List available instances"},2):args.length===1&&/^dmni_[0-9a-hjkmnp-tv-z]{26}$/.test(args[0])?args[0]:usageError(client,"Expected one instance ID, like dmni_01k7d0q5w3x8y9z0a1b2c3d4e5.",usage)}function parse(client,argv,options,usage){parsedEnvironments.delete(client);let parsed;try{let spec=getFlagsSpecification(options);parsed=parseArguments(argv,spec)}catch(err){return reportError(client,err,2)}let telemetry=new DaemonsTelemetryClient({opts:{store:client.telemetryEventStore}});telemetry.trackOptions(parsed.flags);let flags=parsed.flags,environmentError=validateEnvironment(flags["--environment"]);if(environmentError)return usageError(client,environmentError,usage);flags["--environment"]!==void 0&&parsedEnvironments.set(client,flags["--environment"]);let format2=validateJsonOutput(parsed.flags);if(!format2.valid)return usageError(client,format2.error,usage);let asJson=format2.jsonOutput||client.nonInteractive;return{...parsed,asJson,telemetry}}async function resolveProject(client,flags){let project=flags["--project"],environment=flags["--environment"]??"production",link=isJsonOutput(client)?await resolveProjectContext({client,projectNameOrId:project,projectNotFoundHandling:"return",quiet:!0}):await requireProjectContext(client,"daemons",project);if(typeof link=="number")return link;if(link.status==="error")return reportError(client,new Error("Could not resolve project context."),link.exitCode);if(link.status!=="linked")return failure(client,project?AGENT_REASON.PROJECT_NOT_FOUND:AGENT_REASON.NOT_LINKED,project?`Couldn't find project ${project}.`:"No linked project found.",{command:"list --project <PROJECT>",when:"Select an existing project"});client.config.currentTeam=link.org.type==="team"?link.org.id:void 0;let target=`${link.org.slug}/${link.project.name}`;if(environment.toLowerCase()==="production")return{...link,target,environment:{type:"production"}};let custom=pickCustomEnvironment(await getCustomEnvironments(client,link.project.id),environment);if(!custom)return failure(client,AGENT_REASON.NOT_FOUND,`Couldn't find environment ${environment} in ${target}.`,{command:withGlobalFlags(client,"environments list",{preserveProject:!0}),when:"See the environments"},1,{prefixed:!0});let name=ENVIRONMENT_SELECTOR_PATTERN.test(custom.slug)?custom.slug:custom.id;return{...link,target,environment:{type:"custom",id:custom.id,name}}}function daemonsCommand(client,command2,environment){let name=environment?environment.type==="custom"?environment.name:void 0:parsedEnvironments.get(client),suffix=name&&name.toLowerCase()!=="production"?` --environment ${quoteArg(name)}`:"";return withGlobalFlags(client,`daemons ${command2}${suffix}`,{preserveProject:!0})}function failure(client,reason,message,next,exitCode=1,{prefixed=!1,environment}={}){let command2=prefixed?next.command:daemonsCommand(client,next.command,environment);return output_manager_default.stopSpinner(),isJsonOutput(client)?writeJsonError(client,{status:AGENT_STATUS.ERROR,reason,message,next:[{...next,command:command2}]},exitCode):(output_manager_default.fatal(message),output_manager_default.print(`
7
+ import{RoutesAddTelemetryClient,RoutesTelemetryClient}from"./chunks/chunk-2STLJAXZ.js";import{ALL_ACTION_CHOICES,MAX_CONDITIONS,MAX_DESCRIPTION_LENGTH,MAX_NAME_LENGTH,REDIRECT_STATUS_CODES,VALID_SYNTAXES,collectActionDetails,collectHeadersAndTransforms,collectInteractiveConditions,convertRouteToCurrentRoute,extractTransformFlags,generateRoute,generatedRouteToAddInput,parseConditions,populateRouteEnv,printGeneratedRoutePreview,runInteractiveEditLoop,stripQuotes,validateActionFlags}from"./chunks/chunk-WQBNOQUT.js";import{getRouteVersions}from"./chunks/chunk-BVH2AEFE.js";import{TRANSFORM_TYPE_LABELS,findVersionById,formatCondition,formatTransform,getRouteTypeLabel,getRoutes,getSrcSyntaxLabel,isTargetTransform,offerAutoPromote,parsePosition,parseSubcommandArgs,withGlobalFlags as withGlobalFlags2}from"./chunks/chunk-LHK6B4ER.js";import{LOCAL_SCHEDULES_SESSION_HEADER,isLocalSchedulesOrigin,readLocalSchedulesSessions}from"./chunks/chunk-XPEWDJV6.js";import{getLinkedFlagsProject,getProjectNameFromFlags}from"./chunks/chunk-BB27VKHS.js";import{OBSERVABILITY_METRICS_PATH}from"./chunks/chunk-EDXNAXEZ.js";import{ensureMicrofrontendsContext,fetchMicrofrontendsGroups,validateDefaultRoute,validateRoutingPath}from"./chunks/chunk-42RUDD27.js";import{BLOCKED_DEPLOYMENT_REASON,Now,getBlockKind,getBlockedDeploymentDetails,getBlockedDeploymentMessage,getTeamMembersUrl,isBlockedDeployment,printBlockedDeployment,printDeploymentStatus,stripControlCharacters}from"./chunks/chunk-JRUL67UC.js";import{isDeploying}from"./chunks/chunk-ZFRNVIHI.js";import"./chunks/chunk-2XQO6C7Q.js";import"./chunks/chunk-S4ARHJGW.js";import"./chunks/chunk-C2R5IEN6.js";import"./chunks/chunk-Y7SZI3JV.js";import{getCustomEnvironments,pickCustomEnvironment}from"./chunks/chunk-AU54JBLF.js";import"./chunks/chunk-MAAJGMXM.js";import{deploymentJson}from"./chunks/chunk-KKE55LTK.js";import{parseJsonObjectFlag,readPrivateKey}from"./chunks/chunk-DRDY2UZX.js";import{parseSubcommandArguments,requireProjectContext,validateRequiredArguments}from"./chunks/chunk-WRTBYD4I.js";import{formatMetricValue,generateSparkline}from"./chunks/chunk-IZOKMWU5.js";import"./chunks/chunk-JK3NTR7T.js";import"./chunks/chunk-IVSSTHB6.js";import"./chunks/chunk-YIKXLWSR.js";import"./chunks/chunk-U56NHYAH.js";import{readJSONFile}from"./chunks/chunk-KNKGJD5J.js";import{getTeamBillingUrl}from"./chunks/chunk-XR6QY7RR.js";import"./chunks/chunk-VT6RIZJH.js";import"./chunks/chunk-EL65DTVZ.js";import{isValidName}from"./chunks/chunk-PADL3C6Z.js";import{require_async_sema}from"./chunks/chunk-ZOJI7HYA.js";import"./chunks/chunk-KG526MHL.js";import{handleValidationError,normalizeRepeatableStringFilters,validateIntegerRangeWithDefault,validateOptionalIntegerRange,validateTimeBound,validateTimeOrder}from"./chunks/chunk-6JY43KSR.js";import{getAliases}from"./chunks/chunk-4R7ICESH.js";import{INVALID_NEXT_MESSAGE,parseNumericCursor}from"./chunks/chunk-C6GY2G73.js";import{resolveTimeRange}from"./chunks/chunk-FIICEEXO.js";import{formatDate}from"./chunks/chunk-46R47IE5.js";import{formatTable,strlen}from"./chunks/chunk-PR4NNS3O.js";import{stamp_default}from"./chunks/chunk-LY3EY2VG.js";import{elapsed}from"./chunks/chunk-LLHXL3SV.js";import{printUnknownCommand}from"./chunks/chunk-DRNUHJ6I.js";import{applyDeprecatedTargetFlag}from"./chunks/chunk-7IHVCKUV.js";import"./chunks/chunk-GZNDA6SV.js";import{formatProject}from"./chunks/chunk-3HP6FOOL.js";import"./chunks/chunk-K7YK4PZP.js";import{require_open}from"./chunks/chunk-CSU46B7Q.js";import{resolveProjectContext}from"./chunks/chunk-JJTAADC5.js";import{ensureLink}from"./chunks/chunk-IMZD7QEB.js";import"./chunks/chunk-Q4W3R6U2.js";import{getDeployment}from"./chunks/chunk-MMMX3KE2.js";import"./chunks/chunk-WWEUGL6W.js";import{getCommandFlags}from"./chunks/chunk-XGTKHQTT.js";import{require_format}from"./chunks/chunk-OM6NML7C.js";import{getInvalidSubcommand}from"./chunks/chunk-TG2RCYTH.js";import{requireApproval}from"./chunks/chunk-RBM4KOQ2.js";import"./chunks/chunk-KDCLHZYL.js";import"./chunks/chunk-NFBFXM6X.js";import{trackCreatedId}from"./chunks/chunk-ILNTOWHG.js";import{canPromptOnTerminal}from"./chunks/chunk-IQ7FPAI4.js";import{getRenamedOption,renameOptionInArgs,reportRenamedOptionError,withWarnings}from"./chunks/chunk-R5KBPWWS.js";import{getSubcommand as getSubcommand2}from"./chunks/chunk-ETV3C2CV.js";import{validateLsArgs}from"./chunks/chunk-T4257EDB.js";import{table}from"./chunks/chunk-QCYCLWNG.js";import{getNextPageCommand,printNextPageCommand}from"./chunks/chunk-WS6UOPMS.js";import"./chunks/chunk-GILTW5RJ.js";import{param}from"./chunks/chunk-ERMHTPO4.js";import{KMS_ALGORITHMS,PROJECT_GRANT_POLICY_KIND,activateKeySubcommand,addGrantSubcommand,addKeySubcommand,addSubcommand8 as addSubcommand,addSubcommand9 as addSubcommand2,addToGroupSubcommand,analyzeSubcommand,createGroupSubcommand,createSubcommand5 as createSubcommand,createSubcommand9 as createSubcommand2,decideSubcommand,deleteGroupSubcommand,deleteSubcommand3 as deleteSubcommand,deleteSubcommand5 as deleteSubcommand3,diagnoseSubcommand,disableSubcommand4 as disableSubcommand2,enableSubcommand4 as enableSubcommand2,executionsListSubcommand,executionsSubcommand,experimentsCommand,getCommandAliases,getSubcommand2 as getSubcommand,importKeySubcommand,importSubcommand2 as importSubcommand,inspectGroupSubcommand,inspectSubcommand14 as inspectSubcommand3,inspectSubcommand5 as inspectSubcommand,inspectSubcommand9 as inspectSubcommand2,instancesInspectSubcommand,instancesListSubcommand,instancesRestartSubcommand,instancesSubcommand,invokeSubcommand,isProjectGrant,issuerJwksUrl,issuerUrl,kmsCommand,listSubcommand14 as listSubcommand2,listSubcommand19 as listSubcommand3,listSubcommand22 as listSubcommand4,listSubcommand23 as listSubcommand6,listSubcommand9 as listSubcommand,listVersionsSubcommand,microfrontendsCommand,openSubcommand2 as openSubcommand,promoteSubcommand,pullSubcommand,redeployCommand,redirectsCommand,removeCommand,removeFromGroupSubcommand,removeGrantSubcommand,removeSubcommand13 as removeSubcommand,removeSubcommand14 as removeSubcommand2,reseedEnrollmentSubcommand,restartAnalysisSubcommand,restoreSubcommand,returnToDraftSubcommand,revokeKeySubcommand,scaleSubcommand,schedulesCommand,setRampSubcommand,startSubcommand,updateGrantSubcommand,updateSubcommand12 as updateSubcommand3,updateSubcommand4 as updateSubcommand,updateSubcommand9 as updateSubcommand2,uploadSubcommand}from"./chunks/chunk-R6LM3MBK.js";import"./chunks/chunk-XHWA436J.js";import"./chunks/chunk-4MAA4BQD.js";import"./chunks/chunk-OXQKWOLS.js";import{addSubcommand as addSubcommand3,deleteSubcommand as deleteSubcommand2,disableSubcommand,discardSubcommand,editSubcommand,enableSubcommand,exportSubcommand,inspectSubcommand as inspectSubcommand4,listSubcommand as listSubcommand5,listVersionsSubcommand as listVersionsSubcommand2,publishSubcommand,reorderSubcommand,restoreSubcommand as restoreSubcommand2,routesCommand}from"./chunks/chunk-GO64LSUW.js";import"./chunks/chunk-M3LYYAQ6.js";import"./chunks/chunk-TUPVVZ4I.js";import"./chunks/chunk-HXIOR7P6.js";import"./chunks/chunk-CHTFRAXA.js";import"./chunks/chunk-T2IZUTGY.js";import"./chunks/chunk-3F3WNT5K.js";import"./chunks/chunk-P7GA2C6N.js";import"./chunks/chunk-RPYIWRSN.js";import"./chunks/chunk-CDO5IECP.js";import"./chunks/chunk-6XXXPJBV.js";import"./chunks/chunk-L74PQVPL.js";import"./chunks/chunk-HT5EXCYX.js";import"./chunks/chunk-TTJWZ3ZW.js";import"./chunks/chunk-R3ZPLQDI.js";import"./chunks/chunk-QPPFQREO.js";import"./chunks/chunk-X2UJGCIC.js";import"./chunks/chunk-XZYVBYUY.js";import{DEV_RESOURCE_TOKEN}from"./chunks/chunk-EZ3HXFLB.js";import"./chunks/chunk-WMIZ6Y4E.js";import"./chunks/chunk-QPNYOR6O.js";import"./chunks/chunk-JGEJY7AC.js";import"./chunks/chunk-LBJ7EOZM.js";import{getContextName,getScope}from"./chunks/chunk-CRPZYLIL.js";import{TelemetryClient}from"./chunks/chunk-QROPMCL2.js";import{getLinkedProject,isPromptCanceledError,jsonNextStep,require_dist2,require_lib,responseError,runWithJsonOutput,sleep,writeJsonError,writeJsonFailure,writeJsonResult,writeJsonUsageError}from"./chunks/chunk-HDKEES7E.js";import{ALIGNED_LABEL_WIDTH,formatAlignedLabel,printAlignedLabel}from"./chunks/chunk-SUD5V67L.js";import{require_pluralize}from"./chunks/chunk-7TRHPXCG.js";import{getProjectByNameOrId}from"./chunks/chunk-UGVOMXYR.js";import{ua_default}from"./chunks/chunk-QRPBDCDH.js";import"./chunks/chunk-2GXP676X.js";import"./chunks/chunk-K5GE24PG.js";import"./chunks/chunk-IFMPBA4K.js";import"./chunks/chunk-KHJWQ4WP.js";import{directFetch,getFetchDispatcher}from"./chunks/chunk-MY4MONOH.js";import"./chunks/chunk-YATYCZQJ.js";import{require_ms}from"./chunks/chunk-2ILZM77F.js";import{printError}from"./chunks/chunk-7EI554V5.js";import{getTypedOptionName,isArgumentError,parseArguments,takeCommand}from"./chunks/chunk-E7ICSU45.js";import{AGENT_ACTION,AGENT_REASON,AGENT_STATUS,buildCommandWithGlobalFlags,buildCommandWithYes,getErrorRecovery,getExitCodeForReason,openUrlInBrowserCommand,outputActionRequired,outputAgentError,quoteSuggestionToken,shouldEmitNonInteractiveCommandError,withGlobalFlags,writeActionRequired}from"./chunks/chunk-E6VQXHBD.js";import{validateJsonOutput,wantsMachineReadableOutput,warnDeprecatedInput,warnDeprecatedOption,warnDeprecatedSubcommand}from"./chunks/chunk-BDLZ6WL2.js";import"./chunks/chunk-PH2MLBQO.js";import"./chunks/chunk-DCFCPAFQ.js";import"./chunks/chunk-GOXGA37R.js";import{NowError,ProjectNotFound,humanizePath,isAPIError}from"./chunks/chunk-MTPHHAPR.js";import{cmd,getCommandName,getCommandNamePlain}from"./chunks/chunk-EFGZK6OY.js";import"./chunks/chunk-JCDPMWKO.js";import{emoji,link_default,output_manager_default,prependEmoji}from"./chunks/chunk-RIXTYUYN.js";import"./chunks/chunk-7Y572CPZ.js";import"./chunks/chunk-BVFFSUG3.js";import"./chunks/chunk-RRX2AMWY.js";import"./chunks/chunk-GUFRGEM5.js";import"./chunks/chunk-SUT2PTL3.js";import"./chunks/chunk-AX6UCTOC.js";import{require_dist}from"./chunks/chunk-4SIQE2W4.js";import"./chunks/chunk-MF43WTDT.js";import"./chunks/chunk-FUH5PBGR.js";import{help}from"./chunks/chunk-7TREJIPV.js";import"./chunks/chunk-7QHUMMBA.js";import{remoteText}from"./chunks/chunk-AUCQKYL2.js";import{getFlagsSpecification,getGlobalFlagsFromArgs,getProjectOptionFromArgs,getSameSubcommandSuggestionFlags,normalizeFlagName,quoteArg}from"./chunks/chunk-CUO3CYU3.js";import"./chunks/chunk-2BKALEOP.js";import{require_source}from"./chunks/chunk-UJ7YUIEJ.js";import"./chunks/chunk-L6MWUMWZ.js";import"./chunks/chunk-L4CSJDG7.js";import"./chunks/chunk-YHZXIBS7.js";import"./chunks/chunk-LPYHYTYI.js";import{__toESM}from"./chunks/chunk-NBPLUP7C.js";var DaemonsTelemetryClient=class extends TelemetryClient{constructor(){super(...arguments);this.sub=subcommand=>value=>this.trackSubcommand(subcommand,value);this.arg=arg=>value=>this.trackCliArgument({arg,value:value&&this.redactedValue});this.option=option=>value=>this.trackRedactedCliOption(option,value);this.flag=flag=>value=>{value&&this.trackCliFlag(flag)};this.trackCliSubcommandList=this.sub("list");this.trackCliSubcommandScale=this.sub("scale");this.trackCliSubcommandInstances=this.sub("instances");this.trackCliSubcommandInspect=this.sub("inspect");this.trackCliSubcommandRestart=this.sub("restart");this.trackCliArgumentDaemon=this.arg("daemon");this.trackCliArgumentInstance=this.arg("instance");this.trackCliOptionNext=this.option("next");this.trackCliOptionSince=this.option("since");this.trackCliOptionUntil=this.option("until");this.trackCliFlagReset=this.flag("reset");this.trackCliFlagJson=this.flag("json")}trackCliOptionEnvironment(value){value&&this.trackCliOption({option:"environment",value:this.redactedTargetName(value)})}trackSubcommand(subcommand,value){this.trackCliSubcommand({subcommand,value})}trackCliArgumentOverrides(value){let count=value.length?String(value.length):void 0;this.trackCliArgument({arg:"overrides",value:count})}trackRequestedInstances(overrides){let counts=Object.values(overrides);if(counts.length===0)return;let total=counts.reduce((sum,count)=>sum+count,0);this.trackCommandOutput({key:"requested-instances",value:String(total)})}trackScaleResult(result){this.trackCommandOutput({key:"scale-result",value:result})}trackCliOptionLimit(value){value!==void 0&&this.trackCliOption({option:"limit",value:String(value)})}trackOptions(flags){this.trackCliOptionProject(flags["--project"]),this.trackCliOptionEnvironment(flags["--environment"]),this.trackCliOptionLimit(flags["--limit"]),this.trackCliOptionNext(flags["--next"]),this.trackCliOptionSince(flags["--since"]),this.trackCliOptionUntil(flags["--until"]),this.trackCliFlagReset(flags["--reset"]),this.trackCliOptionFormat(flags["--format"]),this.trackCliFlagJson(flags["--json"])}};var import_chalk2=__toESM(require_source(),1);var import_chalk=__toESM(require_source(),1),import_ms=__toESM(require_ms(),1);function isJsonOutput(client){return wantsMachineReadableOutput("daemons",client.argv)||client.nonInteractive}function reportError(client,err,exitCode=1){if(!isJsonOutput(client))return printError(err,client),exitCode;let apiError=isAPIError(err)?err:void 0,reason=exitCode===2?AGENT_REASON.INVALID_ARGUMENTS:AGENT_REASON.API_ERROR,message=exitCode===2&&err instanceof Error?err.message:"Couldn't complete the daemon command.";return writeJsonError(client,{status:AGENT_STATUS.ERROR,reason,message,...apiError&&{...getErrorRecovery(apiError,client),data:{httpStatus:apiError.status}}},exitCode)}function toDaemon(daemon){if(!("replicas"in daemon))return daemon;let{replicas:instances,config,...rest}=daemon;if(!config)return{...rest,instances};let{replicas,configuredReplicas,...restConfig}=config;return{...rest,config:{...restConfig,instances:replicas,configuredInstances:configuredReplicas},instances}}var DAEMON_NAME_PATTERN=/^[a-zA-Z0-9_-]+$/;function environmentName(environment){return environment.type==="production"?"production":environment.name}function environmentLabel(environment){return environment.type==="production"?"Production":environment.name}var ENVIRONMENT_SELECTOR_PATTERN=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/,UNSUPPORTED_ENVIRONMENTS=["preview","development"],parsedEnvironments=new WeakMap;function validateEnvironment(value){if(value!==void 0){if(!ENVIRONMENT_SELECTOR_PATTERN.test(value))return"Expected an environment: production, or a custom environment slug or ID.";if(UNSUPPORTED_ENVIRONMENTS.includes(value.toLowerCase()))return"Daemons run in Production and custom environments, not in Preview or Development."}}function instanceIdArg(client,args,usage){return args.length===0?failure(client,AGENT_REASON.INVALID_ARGUMENTS,"An instance ID is required.",{command:"instances list",when:"List available instances"},2):args.length===1&&/^dmni_[0-9a-hjkmnp-tv-z]{26}$/.test(args[0])?args[0]:usageError(client,"Expected one instance ID, like dmni_01k7d0q5w3x8y9z0a1b2c3d4e5.",usage)}function parse(client,argv,options,usage){parsedEnvironments.delete(client);let parsed;try{let spec=getFlagsSpecification(options);parsed=parseArguments(argv,spec)}catch(err){return reportError(client,err,2)}let telemetry=new DaemonsTelemetryClient({opts:{store:client.telemetryEventStore}});telemetry.trackOptions(parsed.flags);let flags=parsed.flags,environmentError=validateEnvironment(flags["--environment"]);if(environmentError)return usageError(client,environmentError,usage);flags["--environment"]!==void 0&&parsedEnvironments.set(client,flags["--environment"]);let format2=validateJsonOutput(parsed.flags);if(!format2.valid)return usageError(client,format2.error,usage);let asJson=format2.jsonOutput||client.nonInteractive;return{...parsed,asJson,telemetry}}async function resolveProject(client,flags){let project=flags["--project"],environment=flags["--environment"]??"production",link=isJsonOutput(client)?await resolveProjectContext({client,projectNameOrId:project,projectNotFoundHandling:"return",quiet:!0}):await requireProjectContext(client,"daemons",project);if(typeof link=="number")return link;if(link.status==="error")return reportError(client,new Error("Could not resolve project context."),link.exitCode);if(link.status!=="linked")return failure(client,project?AGENT_REASON.PROJECT_NOT_FOUND:AGENT_REASON.NOT_LINKED,project?`Couldn't find project ${project}.`:"No linked project found.",{command:"list --project <PROJECT>",when:"Select an existing project"});client.config.currentTeam=link.org.type==="team"?link.org.id:void 0;let target=`${link.org.slug}/${link.project.name}`;if(environment.toLowerCase()==="production")return{...link,target,environment:{type:"production"}};let custom=pickCustomEnvironment(await getCustomEnvironments(client,link.project.id),environment);if(!custom)return failure(client,AGENT_REASON.NOT_FOUND,`Couldn't find environment ${environment} in ${target}.`,{command:withGlobalFlags(client,"environments list",{preserveProject:!0}),when:"See the environments"},1,{prefixed:!0});let name=ENVIRONMENT_SELECTOR_PATTERN.test(custom.slug)?custom.slug:custom.id;return{...link,target,environment:{type:"custom",id:custom.id,name}}}function daemonsCommand(client,command2,environment){let name=environment?environment.type==="custom"?environment.name:void 0:parsedEnvironments.get(client),suffix=name&&name.toLowerCase()!=="production"?` --environment ${quoteArg(name)}`:"";return withGlobalFlags(client,`daemons ${command2}${suffix}`,{preserveProject:!0})}function failure(client,reason,message,next,exitCode=1,{prefixed=!1,environment}={}){let command2=prefixed?next.command:daemonsCommand(client,next.command,environment);return output_manager_default.stopSpinner(),isJsonOutput(client)?writeJsonError(client,{status:AGENT_STATUS.ERROR,reason,message,next:[{...next,command:command2}]},exitCode):(output_manager_default.fatal(message),output_manager_default.print(`
8
8
  ${next.when}:
9
9
  ${cmd(command2)}
10
10
  `),exitCode)}function usageError(client,message,usage){let next={command:usage,when:"Usage"};return failure(client,AGENT_REASON.INVALID_ARGUMENTS,message,next,2)}function printJson(client,value){return client.stdout.write(`${JSON.stringify(value,null,2)}
@@ -272,7 +272,7 @@ ${import_chalk29.default.gray("No changes detected from current production versi
272
272
  `),output_manager_default.print(` ${import_chalk34.default.gray("ID:")} ${route2.id}
273
273
  `),output_manager_default.print(`
274
274
  ${import_chalk34.default.bold("Staging version:")} ${version.id}
275
- `),await offerAutoPromote(client,projectId,version,!!existingStagingVersion,{teamId,skipPrompts}),0}catch(e){let error=e;return client.nonInteractive&&outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.ROUTE_CREATE_FAILED,message:"Route creation failed for this project. See hint for next steps.",hint:error.message||"Use `vercel routes list --diff` to inspect staged routes, then adjust options and retry.",next:[{command:withGlobalFlags2(client,"routes list --diff"),when:"to inspect staged state"}]},1),output_manager_default.error(error.message||"Failed to create route"),1}}var COMMAND_CONFIG5={list:getCommandAliases(listSubcommand5),"list-versions":getCommandAliases(listVersionsSubcommand2),inspect:getCommandAliases(inspectSubcommand4),add:getCommandAliases(addSubcommand3),update:getCommandAliases(editSubcommand),remove:getCommandAliases(deleteSubcommand2),enable:getCommandAliases(enableSubcommand),disable:getCommandAliases(disableSubcommand),move:getCommandAliases(reorderSubcommand),export:getCommandAliases(exportSubcommand),publish:getCommandAliases(publishSubcommand),restore:getCommandAliases(restoreSubcommand2),"discard-staging":getCommandAliases(discardSubcommand)};async function main4(client){let telemetry=new RoutesTelemetryClient({opts:{store:client.telemetryEventStore}}),parsedArgs,flagsSpecification=getFlagsSpecification(routesCommand.options);try{parsedArgs=parseArguments(client.argv.slice(2),flagsSpecification,{permissive:!0})}catch(err){return printError(err),2}let subArgs=parsedArgs.args.slice(1),{subcommand,args,subcommandOriginal}=getSubcommand2(subArgs,COMMAND_CONFIG5),needHelp=parsedArgs.flags["--help"];if(!subcommand&&needHelp)return telemetry.trackCliFlagHelp("routes"),output_manager_default.print(help(routesCommand,{stream:client.stderr,columns:client.stderr.columns})),0;function printHelp(command2){output_manager_default.print(help(command2,{stream:client.stderr,parent:routesCommand,columns:client.stderr.columns}))}switch(subcommand&&!needHelp&&telemetry.trackCliOptionProject(getProjectOptionFromArgs(args)),subcommand){case"list":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(listSubcommand5),0):(telemetry.trackCliSubcommandList(subcommandOriginal),list3(client,args));case"list-versions":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(listVersionsSubcommand2),0):(telemetry.trackCliSubcommandListVersions(subcommandOriginal),subcommandOriginal==="ls-versions"&&warnDeprecatedSubcommand(client,"routes ls-versions","routes list-versions"),listVersions2(client,args));case"inspect":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(inspectSubcommand4),0):(telemetry.trackCliSubcommandInspect(subcommandOriginal),inspect3(client,args));case"add":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(addSubcommand3),0):(telemetry.trackCliSubcommandAdd(subcommandOriginal),add3(client,args));case"update":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(editSubcommand),0):(telemetry.trackCliSubcommandUpdate(subcommandOriginal),subcommandOriginal==="edit"&&warnDeprecatedSubcommand(client,"routes edit","routes update"),(await import("./chunks/edit-HHLQDVOP.js")).default(client,args));case"remove":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(deleteSubcommand2),0):(telemetry.trackCliSubcommandRemove(subcommandOriginal),subcommandOriginal==="delete"&&warnDeprecatedSubcommand(client,"routes delete","routes remove"),(await import("./chunks/delete-DN53BRH7.js")).default(client,args));case"enable":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(enableSubcommand),0):(telemetry.trackCliSubcommandEnable(subcommandOriginal),(await import("./chunks/enable-BV3N6GEL.js")).default(client,args));case"disable":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(disableSubcommand),0):(telemetry.trackCliSubcommandDisable(subcommandOriginal),(await import("./chunks/disable-CG3R2VAL.js")).default(client,args));case"move":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(reorderSubcommand),0):(telemetry.trackCliSubcommandMove(subcommandOriginal),subcommandOriginal==="reorder"&&warnDeprecatedSubcommand(client,"routes reorder","routes move"),(await import("./chunks/reorder-OLCKSATY.js")).default(client,args));case"export":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(exportSubcommand),0):(telemetry.trackCliSubcommandExport(subcommandOriginal),(await import("./chunks/export-WUPMMHSX.js")).default(client,args));case"publish":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(publishSubcommand),0):(telemetry.trackCliSubcommandPublish(subcommandOriginal),(await import("./chunks/publish-ZB2Q2YSB.js")).default(client,args));case"restore":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(restoreSubcommand2),0):(telemetry.trackCliSubcommandRestore(subcommandOriginal),(await import("./chunks/restore-5RLBSVYQ.js")).default(client,args));case"discard-staging":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(discardSubcommand),0):(telemetry.trackCliSubcommandDiscardStaging(subcommandOriginal),(await import("./chunks/discard-REGFZXFU.js")).default(client,args));default:return output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG5)),output_manager_default.print(help(routesCommand,{stream:client.stderr,columns:client.stderr.columns})),2}}var SchedulesTelemetryClient=class extends TelemetryClient{trackCliFlagLocal(local){local&&this.trackCliFlag("local")}trackCliSubcommandInspect(actual){this.trackCliSubcommand({subcommand:"inspect",value:actual})}trackCliSubcommandList(actual){this.trackCliSubcommand({subcommand:"list",value:actual})}trackCliSubcommandCreate(actual){this.trackCliSubcommand({subcommand:"create",value:actual})}trackCliSubcommandUpdate(actual){this.trackCliSubcommand({subcommand:"update",value:actual})}trackCliSubcommandEnable(actual){this.trackCliSubcommand({subcommand:"enable",value:actual})}trackCliSubcommandDisable(actual){this.trackCliSubcommand({subcommand:"disable",value:actual})}trackCliSubcommandInvoke(actual){this.trackCliSubcommand({subcommand:"invoke",value:actual})}trackCliSubcommandDelete(actual){this.trackCliSubcommand({subcommand:"delete",value:actual})}trackCliSubcommandExecutions(actual){this.trackCliSubcommand({subcommand:"executions",value:actual})}trackCliSubcommandExecutionsList(actual){this.trackCliSubcommand({subcommand:"executions:list",value:actual})}};var import_ms8=__toESM(require_ms(),1);var SchedulesActionTelemetryClient=class extends TelemetryClient{trackCliArgumentName(name){name&&this.trackCliArgument({arg:"name",value:this.redactedValue})}trackCliOptionEnvironment(environment){environment&&this.trackCliOption({option:"environment",value:this.redactedValue})}trackCliOptionGitBranch(gitBranch){gitBranch&&this.trackCliOption({option:"git-branch",value:this.redactedValue})}trackCliOptionUser(user){user&&this.trackCliOption({option:"user",value:this.redactedValue})}trackCliOptionNamespace(namespace){namespace&&this.trackCliOption({option:"namespace",value:this.redactedValue})}trackCliOptionUntil(until){until&&this.trackCliOption({option:"until",value:this.redactedValue})}trackCliOptionFor(duration){duration&&this.trackCliOption({option:"for",value:this.redactedValue})}trackCliOptionFormat(format2){format2&&this.trackCliOption({option:"format",value:format2})}trackCliFlagLocal(local){local&&this.trackCliFlag("local")}trackCliFlagJson(json){json&&this.trackCliFlag("json")}};function asSentence(value){let trimmed=value.trim();return/[.!?]$/.test(trimmed)?trimmed:`${trimmed}.`}function apiErrorDetail(error){let message=error.serverMessage?.trim();return message&&message!=="Response Error"?asSentence(message):void 0}function requestDescription(context){return context.action==="list"?`list schedules in namespace ${context.namespace}`:context.action==="list-executions"?`list executions for schedule ${context.namespace}/${context.name}`:`${context.action} schedule ${context.namespace}/${context.name}`}function ambiguousInvokeError(local){return{reason:AGENT_REASON.API_ERROR,message:"The schedule invocation may have been accepted, but the CLI did not receive confirmation. Check whether the schedule ran before invoking it again."+(local?` Inspect the ${getCommandName("dev")} output for local executions.`:""),retryable:!1,userActionRequired:!0}}function getSchedulesError(client,error,context){if(!isAPIError(error))return context.action==="invoke"?ambiguousInvokeError(context.local):context.local?{reason:AGENT_REASON.API_ERROR,message:`${error instanceof Error?asSentence(error.message):"Failed to connect to local Schedules."} Check the local session and restart ${getCommandName("dev")} in this project if needed.`,retryable:!1,userActionRequired:!0}:{reason:AGENT_REASON.API_ERROR,message:"Failed to connect to the Schedules API. Check your connection and try again.",retryable:!0};let serverMessage=error.serverMessage?.trim().toLowerCase();if(context.local&&context.action==="invoke"&&error.status>=500)return ambiguousInvokeError(!0);if(context.local&&(error.status===401||error.status===402||error.status===403||/(?:project|session)_(?:mismatch|not_found|expired)/.test(error.code??"")||/^(?:local )?(?:project|session)\b/.test(serverMessage??"")))return{reason:AGENT_REASON.API_ERROR,message:`${apiErrorDetail(error)??"The local Schedules session is unavailable."} Restart ${getCommandName("dev")} in this project and use its local session.`,retryable:!1,userActionRequired:!0};if(error.code==="schedule_already_exists")return{reason:AGENT_REASON.SCHEDULE_ALREADY_EXISTS,message:context.name?`Schedule ${context.namespace}/${context.name} already exists. Choose a different name or update the existing schedule.`:"The schedule already exists. Choose a different name or update the existing schedule.",retryable:!1};if(error.code==="schedule_single_at_passed")return{reason:AGENT_REASON.SCHEDULE_SINGLE_AT_PASSED,message:context.name?`Schedule ${context.namespace}/${context.name} has passed its scheduled time and can't be modified. Delete it or create a new schedule.`:"The schedule has passed its scheduled time and can't be modified. Delete it or create a new schedule.",retryable:!1};if(error.code==="schedule_already_active"){let schedule=context.name?[quoteArg(context.name),`--namespace ${quoteArg(context.namespace)}`,...context.trackArgs??[]].join(" "):void 0;return{reason:AGENT_REASON.SCHEDULE_ALREADY_ACTIVE,message:context.name?`Schedule ${context.namespace}/${context.name} is already enabled without an end time. Disable it first, then enable it with --until or --for.`:"The schedule is already enabled without an end time. Disable it first, then enable it with --until or --for.",retryable:!1,...schedule&&{next:[{command:buildCommandWithGlobalFlags(client.argv,`schedules disable ${schedule}`,void 0,{excludeFlags:["--yes","--until","--for"]}),when:"Disable the schedule before enabling it with an end time"}]}}}if(error.code==="static_schedule"){let schedule=context.name?[quoteArg(context.name),`--namespace ${quoteArg(context.namespace)}`,...context.trackArgs??[]].join(" "):void 0;return{reason:AGENT_REASON.STATIC_SCHEDULE,message:context.name?`Static schedule ${context.namespace}/${context.name} can't be updated or deleted. Enable or disable it instead.`:"Static schedules can't be updated or deleted. Enable or disable them instead.",retryable:!1,...schedule&&{next:[{command:buildCommandWithGlobalFlags(client.argv,`schedules enable ${schedule}`,void 0,{excludeFlags:["--yes"]}),when:"Enable the static schedule"},{command:buildCommandWithGlobalFlags(client.argv,`schedules disable ${schedule}`,void 0,{excludeFlags:["--yes"]}),when:"Disable the static schedule"}]}}}if(error.code==="invalid_cron_expression")return{reason:AGENT_REASON.INVALID_CRON_EXPRESSION,message:`${apiErrorDetail(error)??"The cron expression is invalid."} Check \`--cron\` and try again.`,retryable:!1};if(error.code==="invalid_jitter")return{reason:AGENT_REASON.INVALID_JITTER,message:apiErrorDetail(error)??"The schedule jitter setting is invalid.",retryable:!1};if(error.code==="jitter_exceeds_cadence")return{reason:AGENT_REASON.JITTER_EXCEEDS_CADENCE,message:`${apiErrorDetail(error)??"The schedule jitter exceeds the interval between runs."} Increase the interval between runs.`,retryable:!1};if(error.code==="single_at_too_soon")return{reason:AGENT_REASON.SINGLE_AT_TOO_SOON,message:`${apiErrorDetail(error)??"The one-time schedule is too soon."} Choose a later value for \`--at\`.`,retryable:!1};if(error.code==="payload_too_large")return{reason:AGENT_REASON.SCHEDULE_PAYLOAD_TOO_LARGE,message:`${apiErrorDetail(error)??"The schedule payload is too large."} Reduce the value passed to \`--payload\` and try again.`,retryable:!1};if(error.code==="payload_store_failed")return{reason:AGENT_REASON.SCHEDULE_PAYLOAD_STORE_FAILED,message:"Failed to store the schedule payload. Try again later.",retryable:!0};if(error.code==="service_unavailable")return{reason:AGENT_REASON.SCHEDULE_SERVICE_UNAVAILABLE,message:"Schedule execution history is temporarily unavailable. Try again later.",retryable:!0};if(error.code==="service_error")return{reason:AGENT_REASON.SCHEDULE_SERVICE_ERROR,message:error.status>=500?"Failed to load schedule execution history. Try again later.":"Failed to load schedule execution history. Choose a shorter time range and try again.",retryable:error.status>=500};if(error.status===400){let detail2=apiErrorDetail(error);return{reason:AGENT_REASON.INVALID_ARGUMENTS,message:`The Schedules API rejected the request.${detail2?` ${detail2}`:""}`,retryable:!1}}if(error.status===401&&error.code==="missing_team_param")return{reason:AGENT_REASON.MISSING_SCOPE,message:"Schedules requires a team project. Run `vercel link` to link a project owned by a team.",retryable:!1,userActionRequired:!0};if(error.status===401){let tokenSource=client.authConfig.tokenSource;return{reason:AGENT_REASON.LOGIN_REQUIRED,message:tokenSource==="env"?"Schedules API authentication failed. Replace VERCEL_TOKEN, or unset it to use your saved login.":tokenSource==="flag"?"Schedules API authentication failed. Replace the token passed to `--token`.":`Schedules API authentication failed. Run ${getCommandName("login")} and try again.`,retryable:!1,userActionRequired:!0}}if(error.status===402){let detail2=apiErrorDetail(error);return{reason:AGENT_REASON.PLAN_UPGRADE_REQUIRED,message:`Schedules isn't available for this team.${detail2?` ${detail2}`:""} Ask a team owner to review the requirement.`,retryable:!1,userActionRequired:!0}}if(error.status===403&&error.code==="not_enabled"||!context.local&&error.status===404&&(serverMessage==="not found"||serverMessage==="not found."))return{reason:AGENT_REASON.SCHEDULES_NOT_ENABLED,message:"Vercel Schedules is not enabled for this team.",retryable:!1,userActionRequired:!0};if(error.status===403)return{reason:AGENT_REASON.PERMISSION_DENIED,message:"Can't access Schedules with the current credentials and team. Check the token and selected team. If both are correct, ask a team owner for access.",retryable:!1,userActionRequired:!0};if(error.status===404&&(serverMessage==="project not found"||serverMessage==="project not found."))return{reason:AGENT_REASON.PROJECT_NOT_FOUND,message:"The linked project isn't available to this team. Run `vercel link` to update the project link.",retryable:!1,userActionRequired:!0};if(error.status===404&&context.action!=="create"&&context.action!=="list"&&context.name)return{reason:AGENT_REASON.NOT_FOUND,message:`Schedule not found: ${context.namespace}/${context.name}.`,retryable:!1};if(error.status===429){let retryAfterMs=typeof error.retryAfterMs=="number"&&error.retryAfterMs>0?error.retryAfterMs:void 0;return{reason:AGENT_REASON.RATE_LIMITED,message:retryAfterMs===void 0?"The Schedules API request limit was reached. Wait and try again.":`The Schedules API request limit was reached. Try again in ${Math.ceil(retryAfterMs/1e3)} second${retryAfterMs>1e3?"s":""}.`,retryable:!0,...retryAfterMs&&{retryAfterMs}}}if(error.status>=500)return context.action==="invoke"?ambiguousInvokeError(context.local):{reason:AGENT_REASON.API_ERROR,message:context.local?`Local Schedules is unavailable. Check the ${getCommandName("dev")} output and restart the local session if needed.`:"The Schedules API is temporarily unavailable. Try again later.",retryable:!0};let detail=apiErrorDetail(error);return{reason:AGENT_REASON.API_ERROR,message:`Failed to ${requestDescription(context)}.${detail?` ${detail}`:""}`,retryable:!1}}function handleSchedulesApiError(client,error,context){let details=getSchedulesError(client,error,context);return client.nonInteractive?(outputAgentError(client,{status:AGENT_STATUS.ERROR,...details},1),1):(output_manager_default.fatal(details.message),1)}var DEFAULT_SCHEDULE_NAMESPACE="default",DEFAULT_SCHEDULES_LIMIT=20,SCHEDULES_REQUEST_SOURCE_HEADER="x-vss-client",LocalSchedulesError=class extends Error{constructor(message){super(message),this.name="LocalSchedulesError"}};function sanitizeSchedule(schedule){let{trackId:_trackId,...publicSchedule}=schedule;return publicSchedule}var SchedulesClient=class{constructor(client,options){this.client=client;this.options=options;if("local"in options){if(!isLocalSchedulesOrigin(options.local.origin))throw new LocalSchedulesError("Local Schedules requires an HTTP 127.0.0.1 endpoint with a valid port.");this.baseUrl=new URL(options.local.origin);return}this.baseUrl=new URL(options.baseUrl??process.env.VERCEL_SCHEDULE_BASE_URL??client.apiUrl)}get localOrigin(){return"local"in this.options?this.baseUrl.origin:void 0}async request(path,options={}){let url=new URL(path,this.baseUrl);if("local"in this.options){let session=this.options.local;url.searchParams.set("projectId",session.projectId);let response;try{response=await directFetch(url.href,{method:options.method??"GET",headers:{authorization:`Bearer ${DEV_RESOURCE_TOKEN}`,[LOCAL_SCHEDULES_SESSION_HEADER]:session.id,[SCHEDULES_REQUEST_SOURCE_HEADER]:"cli",...options.body===void 0?{}:{"content-type":"application/json"}},body:options.body===void 0?void 0:JSON.stringify(options.body),redirect:"manual",signal:AbortSignal.timeout(3e4)})}catch{throw new LocalSchedulesError(`Could not reach local Schedules at ${session.origin}. No cloud request was made.`)}if(response.status>=300&&response.status<400||response.headers.get(LOCAL_SCHEDULES_SESSION_HEADER)!==session.id)throw await response.body?.cancel(),new LocalSchedulesError("The local Schedules session changed or returned an unexpected response. Restart vercel dev and try again.");if(!response.ok)throw await responseError(response);if(response.status===204)return;try{return await response.json()}catch{throw new LocalSchedulesError("The local Schedules session returned an invalid JSON response.")}}url.searchParams.set("projectId",this.options.projectId),this.options.environment!==void 0&&url.searchParams.set("env",this.options.environment),this.options.gitBranch!==void 0&&url.searchParams.set("branch",this.options.gitBranch),this.options.user!==void 0&&url.searchParams.set("user",this.options.user);let headers=new globalThis.Headers(options.headers);return headers.set(SCHEDULES_REQUEST_SOURCE_HEADER,"cli"),this.client.fetch(url.href,{...options,headers,accountId:this.options.ownerId,useCurrentTeam:!1})}schedulePath(name,namespace,suffix=""){return`${`/v1/schedules/${encodeURIComponent(name)}${suffix}`}?${new URLSearchParams({namespace})}`}async create({target,...params}){let schedule=await this.request("/v1/schedules",{method:"POST",bailOn429:!0,body:{...params,target:{type:"queue",topic:target.topic}}});return sanitizeSchedule(schedule)}async get({name,namespace=DEFAULT_SCHEDULE_NAMESPACE}){let schedule=await this.request(this.schedulePath(name,namespace),{bailOn429:!0});return sanitizeSchedule(schedule)}async list({namespace=DEFAULT_SCHEDULE_NAMESPACE,cursor,limit=DEFAULT_SCHEDULES_LIMIT}={}){let searchParams=new URLSearchParams({namespace,limit:String(limit)});cursor!==void 0&&searchParams.set("cursor",cursor);let response=await this.request(`/v1/schedules?${searchParams}`,{bailOn429:!0});return{data:response.data.map(sanitizeSchedule),cursor:response.cursor}}async update({name,namespace=DEFAULT_SCHEDULE_NAMESPACE,target,...params}){let schedule=await this.request(this.schedulePath(name,namespace),{method:"PATCH",bailOn429:!0,body:{...params,...target?{target:{type:"queue",topic:target.topic}}:{}}});return sanitizeSchedule(schedule)}async delete({name,namespace=DEFAULT_SCHEDULE_NAMESPACE}){return this.request(this.schedulePath(name,namespace),{method:"DELETE",bailOn429:!0})}async enable({name,namespace=DEFAULT_SCHEDULE_NAMESPACE,activeUntil}){return this.changeState(name,namespace,"enable",activeUntil===void 0?void 0:{until:activeUntil})}async disable({name,namespace=DEFAULT_SCHEDULE_NAMESPACE}){return this.changeState(name,namespace,"disable")}async changeState(name,namespace,action,body){let schedule=await this.request(this.schedulePath(name,namespace,`/${action}`),{method:"POST",bailOn429:!0,...body&&{body}});return sanitizeSchedule(schedule)}async invoke({name,namespace=DEFAULT_SCHEDULE_NAMESPACE}){await this.request(this.schedulePath(name,namespace,"/invoke"),{method:"POST",bailOn429:!0,retry:{retries:0}})}async listExecutions({name,namespace=DEFAULT_SCHEDULE_NAMESPACE,cursor,limit=DEFAULT_SCHEDULES_LIMIT,sort,from,to,executionId}){if("local"in this.options)throw new LocalSchedulesError("Execution history is not supported for local Schedules. Inspect the vercel dev output for local executions.");let searchParams=new URLSearchParams({limit:String(limit)});return cursor!==void 0&&searchParams.set("cursor",cursor),sort!==void 0&&searchParams.set("sort",sort),from!==void 0&&searchParams.set("from",String(from)),to!==void 0&&searchParams.set("to",String(to)),executionId!==void 0&&searchParams.set("executionId",executionId),this.request(`${this.schedulePath(name,namespace,"/executions")}&${searchParams}`,{bailOn429:!0})}};async function createLocalSchedulesClient(client){let sessions=await readLocalSchedulesSessions(client.cwd);if(sessions.length===0)throw new LocalSchedulesError("No running local Schedules session was found in this directory. Start vercel dev here, or use --cwd to select its project directory.");if(sessions.length>1)throw new LocalSchedulesError("Multiple vercel dev sessions are running in this directory. Stop the extra instances before using schedules --local.");let[session]=sessions,response;try{response=await directFetch(`${session.origin}/v1/info`,{headers:{authorization:`Bearer ${DEV_RESOURCE_TOKEN}`,[LOCAL_SCHEDULES_SESSION_HEADER]:session.id,[SCHEDULES_REQUEST_SOURCE_HEADER]:"cli"},redirect:"manual",signal:AbortSignal.timeout(2e3)})}catch{throw new LocalSchedulesError(`The local Schedules session at ${session.origin} is unavailable. Restart vercel dev in this directory. No cloud request was made.`)}if(!response.ok||response.headers.get(LOCAL_SCHEDULES_SESSION_HEADER)!==session.id)throw await response.body?.cancel(),new LocalSchedulesError("The local Schedules session is stale, not ready, or incompatible. Restart vercel dev in this directory.");let info;try{info=await response.json()}catch{throw new LocalSchedulesError("The local Schedules session returned invalid metadata. Restart vercel dev in this directory.")}if(!info||info.version!==session.version||info.id!==session.id||info.pid!==session.pid||info.cwd!==session.cwd||info.origin!==session.origin||info.projectId!==session.projectId)throw new LocalSchedulesError("The local Schedules session does not match this project instance. Restart vercel dev in this directory.");return new SchedulesClient(client,{local:session})}var import_ms7=__toESM(require_ms(),1),MAX_IDENTIFIER_LENGTH=256,IDENTIFIER_PATTERN=/^[0-9A-Za-z][0-9A-Za-z._-]*$/,MAX_QUEUE_TOPIC_LENGTH=256,QUEUE_TOPIC_PATTERN=/^[A-Za-z0-9_-]+$/,MAX_JITTER_MINUTES=15,LOCAL_MINUTE_DATETIME_PATTERN=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})$/,LOCAL_SECOND_DATETIME_PATTERN=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})$/,TIMEZONE_PATTERN=/^[A-Za-z][A-Za-z0-9_+/-]*$/;function validateScheduleIdentifier(value,label){if(value.length>MAX_IDENTIFIER_LENGTH)return`${label} must be at most ${MAX_IDENTIFIER_LENGTH} characters.`;if(!IDENTIFIER_PATTERN.test(value))return`${label} must start with a letter or number and can contain only letters, numbers, periods, underscores, and hyphens.`}function validateScheduleTimezone(value){if(value!==void 0){if(value.length===0||value.length>50||!TIMEZONE_PATTERN.test(value))return"`--timezone` must be a valid IANA timezone.";try{new Intl.DateTimeFormat("en-US",{timeZone:value})}catch{return"`--timezone` must be a valid IANA timezone."}}}function validateScheduleQueueTopic(value){if(value.length>MAX_QUEUE_TOPIC_LENGTH||!QUEUE_TOPIC_PATTERN.test(value))return"`--topic` must be 1\u2013256 characters and contain only letters, numbers, underscores, and hyphens."}function normalizeLocalDatetime(value){let secondMatch=LOCAL_SECOND_DATETIME_PATTERN.exec(value);if(secondMatch){if(secondMatch[6]!=="00")return}else LOCAL_MINUTE_DATETIME_PATTERN.test(value)&&(value=`${value}:00`);let match=LOCAL_SECOND_DATETIME_PATTERN.exec(value);if(!match)return;let[,yearValue,monthValue,dayValue,hourValue,minuteValue]=match,year=Number(yearValue),month=Number(monthValue),day=Number(dayValue),hour=Number(hourValue),minute=Number(minuteValue),daysInMonth=[31,year%4===0&&(year%100!==0||year%400===0)?29:28,31,30,31,30,31,31,30,31,30,31];if(!(month<1||month>12||day<1||day>daysInMonth[month-1]||hour<0||hour>23||minute<0||minute>59))return value}function parseScheduleExpression(cron,at,required){if(cron!==void 0&&at!==void 0)return{valid:!1,error:"Use either `--cron` or `--at`, not both."};if(cron!==void 0)return cron.trim()?{valid:!0,value:{type:"cron",cron}}:{valid:!1,error:"`--cron` cannot be empty."};if(at!==void 0){let normalized=normalizeLocalDatetime(at);return normalized===void 0?{valid:!1,error:"`--at` must use YYYY-MM-DDTHH:mm or YYYY-MM-DDTHH:mm:00 without a timezone suffix. Use `--timezone` to select the timezone."}:{valid:!0,value:{type:"single",at:normalized}}}return required?{valid:!1,error:"A schedule expression is required. Use `--cron` or `--at`."}:{valid:!0,value:void 0}}function validateJitter(value){return!Number.isInteger(value)||value<1||value>MAX_JITTER_MINUTES?{valid:!1,error:"`--jitter` must be an integer between 1 and 15."}:{valid:!0,value}}function parseCreateJitter(value){return value===void 0?{valid:!0,value:void 0}:validateJitter(value)}function parseUpdateJitter(value){return value===void 0?{valid:!0,value:void 0}:value==="none"?{valid:!0,value:null}:validateJitter(Number(value))}function parseSchedulePayload(value){if(value===void 0)return{valid:!0,value:void 0};try{return{valid:!0,value:JSON.parse(value)}}catch{return{valid:!1,error:"`--payload` must be valid JSON."}}}var UNIX_MILLISECONDS_PATTERN=/^\d+$/,ISO_DATE_PATTERN=/^(\d{4})-(\d{2})-(\d{2})/,DURATION_PATTERN=/^\d+(?:\.\d+)?\s*[a-z]+$/i;function parseEnableUntil(until,duration,now=Date.now()){if(until!==void 0&&duration!==void 0)return{valid:!1,error:"`--until` and `--for` cannot be used together."};if(duration!==void 0){let durationMs=DURATION_PATTERN.test(duration.trim())?(0,import_ms7.default)(duration.trim()):void 0;return durationMs===void 0||!(durationMs>0)?{valid:!1,error:"`--for` must be a duration such as 30m, 5h, or 10s."}:{valid:!0,value:now+durationMs}}if(until===void 0)return{valid:!0,value:void 0};let untilMs,isoDate=ISO_DATE_PATTERN.exec(until);if(UNIX_MILLISECONDS_PATTERN.test(until))untilMs=Number(until);else if(isoDate){let[,year,month,day]=isoDate.map(Number),daysInMonth=new Date(Date.UTC(year,month,0)).getUTCDate();untilMs=day>=1&&day<=daysInMonth?Date.parse(until):NaN}else return{valid:!1,error:DURATION_PATTERN.test(until.trim())?`\`--until\` must be a time, not a duration. Use \`--for ${until.trim()}\` instead.`:"`--until` must be an ISO 8601 time or Unix milliseconds."};return Number.isFinite(untilMs)?untilMs<=now?{valid:!1,error:"`--until` must be in the future."}:{valid:!0,value:untilMs}:{valid:!1,error:"`--until` must be an ISO 8601 time or Unix milliseconds."}}var routingFlags2=getFlagsSpecification([...schedulesCommand.subcommands.flatMap(command2=>[...command2.options]),...executionsListSubcommand.options]);function takeScheduleCommand(argv){return takeCommand(argv,routingFlags2)}function scheduleCommandWithGlobalFlags(client,usage){let local=!1;try{local=!!parseArguments(client.argv.slice(2),routingFlags2,{permissive:!0}).flags["--local"]}catch{}return buildCommandWithGlobalFlags(client.argv,`${usage}${local?" --local":""}`,void 0,{excludeFlags:local?["--scope","--team"]:[]})}function validateLocalScheduleFlags(client,flags,usage){if(flags["--environment"]!==void 0&&flags["--git-branch"]!==void 0)return invalidScheduleArguments(client,usage,"Use either --environment or --git-branch, not both.");if(flags["--environment"]!==void 0&&flags["--user"]!==void 0)return invalidScheduleArguments(client,usage,"Use either --environment or --user, not both.");if(!flags["--local"])return;for(let flag of["--environment","--git-branch","--user"])if(flags[flag]!==void 0)return invalidScheduleArguments(client,usage,`Cannot combine --local with ${flag}. Local Schedules uses the current vercel dev session.`);let originalFlags;try{originalFlags=parseArguments(client.argv.slice(2),routingFlags2,{permissive:!0}).flags}catch(error){return invalidScheduleArguments(client,usage,error instanceof Error?error.message:String(error))}for(let flag of["--scope","--team","--token"])if(flags[flag]!==void 0||originalFlags[flag]!==void 0)return invalidScheduleArguments(client,usage,`Cannot combine --local with ${flag}. Local Schedules uses the current vercel dev session.`)}function unsupportedLocalExecutions(client){let message="Execution history is not supported for local Schedules. Inspect the vercel dev output for local executions.";return client.nonInteractive?outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.API_ERROR,message,retryable:!1}):output_manager_default.fatal(message),1}async function resolveSchedulesClient(client,flags){if(flags["--local"])try{let schedules=await createLocalSchedulesClient(client);return output_manager_default.log(`Using local Schedules at ${schedules.localOrigin}`),schedules}catch(error){let message=error instanceof Error?error.message:String(error);return client.nonInteractive?outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.API_ERROR,message,retryable:!1}):output_manager_default.fatal(message),1}let link=await requireProjectContext(client,"schedules");return typeof link=="number"?link:new SchedulesClient(client,{ownerId:link.org.id,projectId:link.project.id,environment:flags["--environment"]==="production"?void 0:flags["--environment"],gitBranch:flags["--git-branch"],user:flags["--user"]})}function scheduleTrackArgs(flags){let args=[];return flags["--environment"]!==void 0&&flags["--environment"]!=="production"&&args.push(`--environment ${quoteArg(flags["--environment"])}`),flags["--git-branch"]!==void 0&&args.push(`--git-branch ${quoteArg(flags["--git-branch"])}`),flags["--user"]!==void 0&&args.push(`--user ${quoteArg(flags["--user"])}`),args}function invalidScheduleArguments(client,usage,message){return client.nonInteractive?(outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message,next:[{command:scheduleCommandWithGlobalFlags(client,usage),when:"Provide valid schedule arguments"}]}),2):(output_manager_default.fatal(message),2)}function validateScheduleNameAndNamespace(client,args,namespaceFlag,usage){let[name]=args;if(!name)return{valid:!1,exitCode:invalidScheduleArguments(client,usage,"A schedule name is required")};if(args.length!==1)return{valid:!1,exitCode:invalidScheduleArguments(client,usage,`Expected one schedule name. Usage: ${getCommandName(usage)}`)};let namespace=namespaceFlag??DEFAULT_SCHEDULE_NAMESPACE,nameError=validateScheduleIdentifier(name,"Schedule name"),namespaceError=validateScheduleIdentifier(namespace,"Namespace"),error=nameError??namespaceError;return error?{valid:!1,exitCode:invalidScheduleArguments(client,usage,error)}:{valid:!0,name,namespace}}function parseScheduleOutput(client,usage,flags){let result=validateJsonOutput(flags);return result.valid?{valid:!0,json:result.jsonOutput||client.nonInteractive}:{valid:!1,exitCode:invalidScheduleArguments(client,usage,result.error)}}function writeScheduleMutationResult(client,schedule,message,json){if(json){let value=client.nonInteractive?{status:AGENT_STATUS.OK,schedule,message}:schedule;client.stdout.write(`${JSON.stringify(value,null,2)}
275
+ `),await offerAutoPromote(client,projectId,version,!!existingStagingVersion,{teamId,skipPrompts}),0}catch(e){let error=e;return client.nonInteractive&&outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.ROUTE_CREATE_FAILED,message:"Route creation failed for this project. See hint for next steps.",hint:error.message||"Use `vercel routes list --diff` to inspect staged routes, then adjust options and retry.",next:[{command:withGlobalFlags2(client,"routes list --diff"),when:"to inspect staged state"}]},1),output_manager_default.error(error.message||"Failed to create route"),1}}var COMMAND_CONFIG5={list:getCommandAliases(listSubcommand5),"list-versions":getCommandAliases(listVersionsSubcommand2),inspect:getCommandAliases(inspectSubcommand4),add:getCommandAliases(addSubcommand3),update:getCommandAliases(editSubcommand),remove:getCommandAliases(deleteSubcommand2),enable:getCommandAliases(enableSubcommand),disable:getCommandAliases(disableSubcommand),move:getCommandAliases(reorderSubcommand),export:getCommandAliases(exportSubcommand),publish:getCommandAliases(publishSubcommand),restore:getCommandAliases(restoreSubcommand2),"discard-staging":getCommandAliases(discardSubcommand)};async function main4(client){let telemetry=new RoutesTelemetryClient({opts:{store:client.telemetryEventStore}}),parsedArgs,flagsSpecification=getFlagsSpecification(routesCommand.options);try{parsedArgs=parseArguments(client.argv.slice(2),flagsSpecification,{permissive:!0})}catch(err){return printError(err),2}let subArgs=parsedArgs.args.slice(1),{subcommand,args,subcommandOriginal}=getSubcommand2(subArgs,COMMAND_CONFIG5),needHelp=parsedArgs.flags["--help"];if(!subcommand&&needHelp)return telemetry.trackCliFlagHelp("routes"),output_manager_default.print(help(routesCommand,{stream:client.stderr,columns:client.stderr.columns})),0;function printHelp(command2){output_manager_default.print(help(command2,{stream:client.stderr,parent:routesCommand,columns:client.stderr.columns}))}switch(subcommand&&!needHelp&&telemetry.trackCliOptionProject(getProjectOptionFromArgs(args)),subcommand){case"list":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(listSubcommand5),0):(telemetry.trackCliSubcommandList(subcommandOriginal),list3(client,args));case"list-versions":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(listVersionsSubcommand2),0):(telemetry.trackCliSubcommandListVersions(subcommandOriginal),subcommandOriginal==="ls-versions"&&warnDeprecatedSubcommand(client,"routes ls-versions","routes list-versions"),listVersions2(client,args));case"inspect":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(inspectSubcommand4),0):(telemetry.trackCliSubcommandInspect(subcommandOriginal),inspect3(client,args));case"add":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(addSubcommand3),0):(telemetry.trackCliSubcommandAdd(subcommandOriginal),add3(client,args));case"update":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(editSubcommand),0):(telemetry.trackCliSubcommandUpdate(subcommandOriginal),subcommandOriginal==="edit"&&warnDeprecatedSubcommand(client,"routes edit","routes update"),(await import("./chunks/edit-HHLQDVOP.js")).default(client,args));case"remove":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(deleteSubcommand2),0):(telemetry.trackCliSubcommandRemove(subcommandOriginal),subcommandOriginal==="delete"&&warnDeprecatedSubcommand(client,"routes delete","routes remove"),(await import("./chunks/delete-CELW3NLN.js")).default(client,args));case"enable":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(enableSubcommand),0):(telemetry.trackCliSubcommandEnable(subcommandOriginal),(await import("./chunks/enable-BV3N6GEL.js")).default(client,args));case"disable":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(disableSubcommand),0):(telemetry.trackCliSubcommandDisable(subcommandOriginal),(await import("./chunks/disable-CG3R2VAL.js")).default(client,args));case"move":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(reorderSubcommand),0):(telemetry.trackCliSubcommandMove(subcommandOriginal),subcommandOriginal==="reorder"&&warnDeprecatedSubcommand(client,"routes reorder","routes move"),(await import("./chunks/reorder-QVSTUVEQ.js")).default(client,args));case"export":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(exportSubcommand),0):(telemetry.trackCliSubcommandExport(subcommandOriginal),(await import("./chunks/export-WUPMMHSX.js")).default(client,args));case"publish":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(publishSubcommand),0):(telemetry.trackCliSubcommandPublish(subcommandOriginal),(await import("./chunks/publish-ZB2Q2YSB.js")).default(client,args));case"restore":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(restoreSubcommand2),0):(telemetry.trackCliSubcommandRestore(subcommandOriginal),(await import("./chunks/restore-5RLBSVYQ.js")).default(client,args));case"discard-staging":return needHelp?(telemetry.trackCliFlagHelp("routes",subcommandOriginal),printHelp(discardSubcommand),0):(telemetry.trackCliSubcommandDiscardStaging(subcommandOriginal),(await import("./chunks/discard-REGFZXFU.js")).default(client,args));default:return output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG5)),output_manager_default.print(help(routesCommand,{stream:client.stderr,columns:client.stderr.columns})),2}}var SchedulesTelemetryClient=class extends TelemetryClient{trackCliFlagLocal(local){local&&this.trackCliFlag("local")}trackCliSubcommandInspect(actual){this.trackCliSubcommand({subcommand:"inspect",value:actual})}trackCliSubcommandList(actual){this.trackCliSubcommand({subcommand:"list",value:actual})}trackCliSubcommandCreate(actual){this.trackCliSubcommand({subcommand:"create",value:actual})}trackCliSubcommandUpdate(actual){this.trackCliSubcommand({subcommand:"update",value:actual})}trackCliSubcommandEnable(actual){this.trackCliSubcommand({subcommand:"enable",value:actual})}trackCliSubcommandDisable(actual){this.trackCliSubcommand({subcommand:"disable",value:actual})}trackCliSubcommandInvoke(actual){this.trackCliSubcommand({subcommand:"invoke",value:actual})}trackCliSubcommandDelete(actual){this.trackCliSubcommand({subcommand:"delete",value:actual})}trackCliSubcommandExecutions(actual){this.trackCliSubcommand({subcommand:"executions",value:actual})}trackCliSubcommandExecutionsList(actual){this.trackCliSubcommand({subcommand:"executions:list",value:actual})}};var import_ms8=__toESM(require_ms(),1);var SchedulesActionTelemetryClient=class extends TelemetryClient{trackCliArgumentName(name){name&&this.trackCliArgument({arg:"name",value:this.redactedValue})}trackCliOptionEnvironment(environment){environment&&this.trackCliOption({option:"environment",value:this.redactedValue})}trackCliOptionGitBranch(gitBranch){gitBranch&&this.trackCliOption({option:"git-branch",value:this.redactedValue})}trackCliOptionUser(user){user&&this.trackCliOption({option:"user",value:this.redactedValue})}trackCliOptionNamespace(namespace){namespace&&this.trackCliOption({option:"namespace",value:this.redactedValue})}trackCliOptionUntil(until){until&&this.trackCliOption({option:"until",value:this.redactedValue})}trackCliOptionFor(duration){duration&&this.trackCliOption({option:"for",value:this.redactedValue})}trackCliOptionFormat(format2){format2&&this.trackCliOption({option:"format",value:format2})}trackCliFlagLocal(local){local&&this.trackCliFlag("local")}trackCliFlagJson(json){json&&this.trackCliFlag("json")}};function asSentence(value){let trimmed=value.trim();return/[.!?]$/.test(trimmed)?trimmed:`${trimmed}.`}function apiErrorDetail(error){let message=error.serverMessage?.trim();return message&&message!=="Response Error"?asSentence(message):void 0}function requestDescription(context){return context.action==="list"?`list schedules in namespace ${context.namespace}`:context.action==="list-executions"?`list executions for schedule ${context.namespace}/${context.name}`:`${context.action} schedule ${context.namespace}/${context.name}`}function ambiguousInvokeError(local){return{reason:AGENT_REASON.API_ERROR,message:"The schedule invocation may have been accepted, but the CLI did not receive confirmation. Check whether the schedule ran before invoking it again."+(local?` Inspect the ${getCommandName("dev")} output for local executions.`:""),retryable:!1,userActionRequired:!0}}function getSchedulesError(client,error,context){if(!isAPIError(error))return context.action==="invoke"?ambiguousInvokeError(context.local):context.local?{reason:AGENT_REASON.API_ERROR,message:`${error instanceof Error?asSentence(error.message):"Failed to connect to local Schedules."} Check the local session and restart ${getCommandName("dev")} in this project if needed.`,retryable:!1,userActionRequired:!0}:{reason:AGENT_REASON.API_ERROR,message:"Failed to connect to the Schedules API. Check your connection and try again.",retryable:!0};let serverMessage=error.serverMessage?.trim().toLowerCase();if(context.local&&context.action==="invoke"&&error.status>=500)return ambiguousInvokeError(!0);if(context.local&&(error.status===401||error.status===402||error.status===403||/(?:project|session)_(?:mismatch|not_found|expired)/.test(error.code??"")||/^(?:local )?(?:project|session)\b/.test(serverMessage??"")))return{reason:AGENT_REASON.API_ERROR,message:`${apiErrorDetail(error)??"The local Schedules session is unavailable."} Restart ${getCommandName("dev")} in this project and use its local session.`,retryable:!1,userActionRequired:!0};if(error.code==="schedule_already_exists")return{reason:AGENT_REASON.SCHEDULE_ALREADY_EXISTS,message:context.name?`Schedule ${context.namespace}/${context.name} already exists. Choose a different name or update the existing schedule.`:"The schedule already exists. Choose a different name or update the existing schedule.",retryable:!1};if(error.code==="schedule_single_at_passed")return{reason:AGENT_REASON.SCHEDULE_SINGLE_AT_PASSED,message:context.name?`Schedule ${context.namespace}/${context.name} has passed its scheduled time and can't be modified. Delete it or create a new schedule.`:"The schedule has passed its scheduled time and can't be modified. Delete it or create a new schedule.",retryable:!1};if(error.code==="schedule_already_active"){let schedule=context.name?[quoteArg(context.name),`--namespace ${quoteArg(context.namespace)}`,...context.trackArgs??[]].join(" "):void 0;return{reason:AGENT_REASON.SCHEDULE_ALREADY_ACTIVE,message:context.name?`Schedule ${context.namespace}/${context.name} is already enabled without an end time. Disable it first, then enable it with --until or --for.`:"The schedule is already enabled without an end time. Disable it first, then enable it with --until or --for.",retryable:!1,...schedule&&{next:[{command:buildCommandWithGlobalFlags(client.argv,`schedules disable ${schedule}`,void 0,{excludeFlags:["--yes","--until","--for"]}),when:"Disable the schedule before enabling it with an end time"}]}}}if(error.code==="static_schedule"){let schedule=context.name?[quoteArg(context.name),`--namespace ${quoteArg(context.namespace)}`,...context.trackArgs??[]].join(" "):void 0;return{reason:AGENT_REASON.STATIC_SCHEDULE,message:context.name?`Static schedule ${context.namespace}/${context.name} can't be updated or deleted. Enable or disable it instead.`:"Static schedules can't be updated or deleted. Enable or disable them instead.",retryable:!1,...schedule&&{next:[{command:buildCommandWithGlobalFlags(client.argv,`schedules enable ${schedule}`,void 0,{excludeFlags:["--yes"]}),when:"Enable the static schedule"},{command:buildCommandWithGlobalFlags(client.argv,`schedules disable ${schedule}`,void 0,{excludeFlags:["--yes"]}),when:"Disable the static schedule"}]}}}if(error.code==="invalid_cron_expression")return{reason:AGENT_REASON.INVALID_CRON_EXPRESSION,message:`${apiErrorDetail(error)??"The cron expression is invalid."} Check \`--cron\` and try again.`,retryable:!1};if(error.code==="invalid_jitter")return{reason:AGENT_REASON.INVALID_JITTER,message:apiErrorDetail(error)??"The schedule jitter setting is invalid.",retryable:!1};if(error.code==="jitter_exceeds_cadence")return{reason:AGENT_REASON.JITTER_EXCEEDS_CADENCE,message:`${apiErrorDetail(error)??"The schedule jitter exceeds the interval between runs."} Increase the interval between runs.`,retryable:!1};if(error.code==="single_at_too_soon")return{reason:AGENT_REASON.SINGLE_AT_TOO_SOON,message:`${apiErrorDetail(error)??"The one-time schedule is too soon."} Choose a later value for \`--at\`.`,retryable:!1};if(error.code==="payload_too_large")return{reason:AGENT_REASON.SCHEDULE_PAYLOAD_TOO_LARGE,message:`${apiErrorDetail(error)??"The schedule payload is too large."} Reduce the value passed to \`--payload\` and try again.`,retryable:!1};if(error.code==="payload_store_failed")return{reason:AGENT_REASON.SCHEDULE_PAYLOAD_STORE_FAILED,message:"Failed to store the schedule payload. Try again later.",retryable:!0};if(error.code==="service_unavailable")return{reason:AGENT_REASON.SCHEDULE_SERVICE_UNAVAILABLE,message:"Schedule execution history is temporarily unavailable. Try again later.",retryable:!0};if(error.code==="service_error")return{reason:AGENT_REASON.SCHEDULE_SERVICE_ERROR,message:error.status>=500?"Failed to load schedule execution history. Try again later.":"Failed to load schedule execution history. Choose a shorter time range and try again.",retryable:error.status>=500};if(error.status===400){let detail2=apiErrorDetail(error);return{reason:AGENT_REASON.INVALID_ARGUMENTS,message:`The Schedules API rejected the request.${detail2?` ${detail2}`:""}`,retryable:!1}}if(error.status===401&&error.code==="missing_team_param")return{reason:AGENT_REASON.MISSING_SCOPE,message:"Schedules requires a team project. Run `vercel link` to link a project owned by a team.",retryable:!1,userActionRequired:!0};if(error.status===401){let tokenSource=client.authConfig.tokenSource;return{reason:AGENT_REASON.LOGIN_REQUIRED,message:tokenSource==="env"?"Schedules API authentication failed. Replace VERCEL_TOKEN, or unset it to use your saved login.":tokenSource==="flag"?"Schedules API authentication failed. Replace the token passed to `--token`.":`Schedules API authentication failed. Run ${getCommandName("login")} and try again.`,retryable:!1,userActionRequired:!0}}if(error.status===402){let detail2=apiErrorDetail(error);return{reason:AGENT_REASON.PLAN_UPGRADE_REQUIRED,message:`Schedules isn't available for this team.${detail2?` ${detail2}`:""} Ask a team owner to review the requirement.`,retryable:!1,userActionRequired:!0}}if(error.status===403&&error.code==="not_enabled"||!context.local&&error.status===404&&(serverMessage==="not found"||serverMessage==="not found."))return{reason:AGENT_REASON.SCHEDULES_NOT_ENABLED,message:"Vercel Schedules is not enabled for this team.",retryable:!1,userActionRequired:!0};if(error.status===403)return{reason:AGENT_REASON.PERMISSION_DENIED,message:"Can't access Schedules with the current credentials and team. Check the token and selected team. If both are correct, ask a team owner for access.",retryable:!1,userActionRequired:!0};if(error.status===404&&(serverMessage==="project not found"||serverMessage==="project not found."))return{reason:AGENT_REASON.PROJECT_NOT_FOUND,message:"The linked project isn't available to this team. Run `vercel link` to update the project link.",retryable:!1,userActionRequired:!0};if(error.status===404&&context.action!=="create"&&context.action!=="list"&&context.name)return{reason:AGENT_REASON.NOT_FOUND,message:`Schedule not found: ${context.namespace}/${context.name}.`,retryable:!1};if(error.status===429){let retryAfterMs=typeof error.retryAfterMs=="number"&&error.retryAfterMs>0?error.retryAfterMs:void 0;return{reason:AGENT_REASON.RATE_LIMITED,message:retryAfterMs===void 0?"The Schedules API request limit was reached. Wait and try again.":`The Schedules API request limit was reached. Try again in ${Math.ceil(retryAfterMs/1e3)} second${retryAfterMs>1e3?"s":""}.`,retryable:!0,...retryAfterMs&&{retryAfterMs}}}if(error.status>=500)return context.action==="invoke"?ambiguousInvokeError(context.local):{reason:AGENT_REASON.API_ERROR,message:context.local?`Local Schedules is unavailable. Check the ${getCommandName("dev")} output and restart the local session if needed.`:"The Schedules API is temporarily unavailable. Try again later.",retryable:!0};let detail=apiErrorDetail(error);return{reason:AGENT_REASON.API_ERROR,message:`Failed to ${requestDescription(context)}.${detail?` ${detail}`:""}`,retryable:!1}}function handleSchedulesApiError(client,error,context){let details=getSchedulesError(client,error,context);return client.nonInteractive?(outputAgentError(client,{status:AGENT_STATUS.ERROR,...details},1),1):(output_manager_default.fatal(details.message),1)}var DEFAULT_SCHEDULE_NAMESPACE="default",DEFAULT_SCHEDULES_LIMIT=20,SCHEDULES_REQUEST_SOURCE_HEADER="x-vss-client",LocalSchedulesError=class extends Error{constructor(message){super(message),this.name="LocalSchedulesError"}};function sanitizeSchedule(schedule){let{trackId:_trackId,...publicSchedule}=schedule;return publicSchedule}var SchedulesClient=class{constructor(client,options){this.client=client;this.options=options;if("local"in options){if(!isLocalSchedulesOrigin(options.local.origin))throw new LocalSchedulesError("Local Schedules requires an HTTP 127.0.0.1 endpoint with a valid port.");this.baseUrl=new URL(options.local.origin);return}this.baseUrl=new URL(options.baseUrl??process.env.VERCEL_SCHEDULE_BASE_URL??client.apiUrl)}get localOrigin(){return"local"in this.options?this.baseUrl.origin:void 0}async request(path,options={}){let url=new URL(path,this.baseUrl);if("local"in this.options){let session=this.options.local;url.searchParams.set("projectId",session.projectId);let response;try{response=await directFetch(url.href,{method:options.method??"GET",headers:{authorization:`Bearer ${DEV_RESOURCE_TOKEN}`,[LOCAL_SCHEDULES_SESSION_HEADER]:session.id,[SCHEDULES_REQUEST_SOURCE_HEADER]:"cli",...options.body===void 0?{}:{"content-type":"application/json"}},body:options.body===void 0?void 0:JSON.stringify(options.body),redirect:"manual",signal:AbortSignal.timeout(3e4)})}catch{throw new LocalSchedulesError(`Could not reach local Schedules at ${session.origin}. No cloud request was made.`)}if(response.status>=300&&response.status<400||response.headers.get(LOCAL_SCHEDULES_SESSION_HEADER)!==session.id)throw await response.body?.cancel(),new LocalSchedulesError("The local Schedules session changed or returned an unexpected response. Restart vercel dev and try again.");if(!response.ok)throw await responseError(response);if(response.status===204)return;try{return await response.json()}catch{throw new LocalSchedulesError("The local Schedules session returned an invalid JSON response.")}}url.searchParams.set("projectId",this.options.projectId),this.options.environment!==void 0&&url.searchParams.set("env",this.options.environment),this.options.gitBranch!==void 0&&url.searchParams.set("branch",this.options.gitBranch),this.options.user!==void 0&&url.searchParams.set("user",this.options.user);let headers=new globalThis.Headers(options.headers);return headers.set(SCHEDULES_REQUEST_SOURCE_HEADER,"cli"),this.client.fetch(url.href,{...options,headers,accountId:this.options.ownerId,useCurrentTeam:!1})}schedulePath(name,namespace,suffix=""){return`${`/v1/schedules/${encodeURIComponent(name)}${suffix}`}?${new URLSearchParams({namespace})}`}async create({target,...params}){let schedule=await this.request("/v1/schedules",{method:"POST",bailOn429:!0,body:{...params,target:{type:"queue",topic:target.topic}}});return sanitizeSchedule(schedule)}async get({name,namespace=DEFAULT_SCHEDULE_NAMESPACE}){let schedule=await this.request(this.schedulePath(name,namespace),{bailOn429:!0});return sanitizeSchedule(schedule)}async list({namespace=DEFAULT_SCHEDULE_NAMESPACE,cursor,limit=DEFAULT_SCHEDULES_LIMIT}={}){let searchParams=new URLSearchParams({namespace,limit:String(limit)});cursor!==void 0&&searchParams.set("cursor",cursor);let response=await this.request(`/v1/schedules?${searchParams}`,{bailOn429:!0});return{data:response.data.map(sanitizeSchedule),cursor:response.cursor}}async update({name,namespace=DEFAULT_SCHEDULE_NAMESPACE,target,...params}){let schedule=await this.request(this.schedulePath(name,namespace),{method:"PATCH",bailOn429:!0,body:{...params,...target?{target:{type:"queue",topic:target.topic}}:{}}});return sanitizeSchedule(schedule)}async delete({name,namespace=DEFAULT_SCHEDULE_NAMESPACE}){return this.request(this.schedulePath(name,namespace),{method:"DELETE",bailOn429:!0})}async enable({name,namespace=DEFAULT_SCHEDULE_NAMESPACE,activeUntil}){return this.changeState(name,namespace,"enable",activeUntil===void 0?void 0:{until:activeUntil})}async disable({name,namespace=DEFAULT_SCHEDULE_NAMESPACE}){return this.changeState(name,namespace,"disable")}async changeState(name,namespace,action,body){let schedule=await this.request(this.schedulePath(name,namespace,`/${action}`),{method:"POST",bailOn429:!0,...body&&{body}});return sanitizeSchedule(schedule)}async invoke({name,namespace=DEFAULT_SCHEDULE_NAMESPACE}){await this.request(this.schedulePath(name,namespace,"/invoke"),{method:"POST",bailOn429:!0,retry:{retries:0}})}async listExecutions({name,namespace=DEFAULT_SCHEDULE_NAMESPACE,cursor,limit=DEFAULT_SCHEDULES_LIMIT,sort,from,to,executionId}){if("local"in this.options)throw new LocalSchedulesError("Execution history is not supported for local Schedules. Inspect the vercel dev output for local executions.");let searchParams=new URLSearchParams({limit:String(limit)});return cursor!==void 0&&searchParams.set("cursor",cursor),sort!==void 0&&searchParams.set("sort",sort),from!==void 0&&searchParams.set("from",String(from)),to!==void 0&&searchParams.set("to",String(to)),executionId!==void 0&&searchParams.set("executionId",executionId),this.request(`${this.schedulePath(name,namespace,"/executions")}&${searchParams}`,{bailOn429:!0})}};async function createLocalSchedulesClient(client){let sessions=await readLocalSchedulesSessions(client.cwd);if(sessions.length===0)throw new LocalSchedulesError("No running local Schedules session was found in this directory. Start vercel dev here, or use --cwd to select its project directory.");if(sessions.length>1)throw new LocalSchedulesError("Multiple vercel dev sessions are running in this directory. Stop the extra instances before using schedules --local.");let[session]=sessions,response;try{response=await directFetch(`${session.origin}/v1/info`,{headers:{authorization:`Bearer ${DEV_RESOURCE_TOKEN}`,[LOCAL_SCHEDULES_SESSION_HEADER]:session.id,[SCHEDULES_REQUEST_SOURCE_HEADER]:"cli"},redirect:"manual",signal:AbortSignal.timeout(2e3)})}catch{throw new LocalSchedulesError(`The local Schedules session at ${session.origin} is unavailable. Restart vercel dev in this directory. No cloud request was made.`)}if(!response.ok||response.headers.get(LOCAL_SCHEDULES_SESSION_HEADER)!==session.id)throw await response.body?.cancel(),new LocalSchedulesError("The local Schedules session is stale, not ready, or incompatible. Restart vercel dev in this directory.");let info;try{info=await response.json()}catch{throw new LocalSchedulesError("The local Schedules session returned invalid metadata. Restart vercel dev in this directory.")}if(!info||info.version!==session.version||info.id!==session.id||info.pid!==session.pid||info.cwd!==session.cwd||info.origin!==session.origin||info.projectId!==session.projectId)throw new LocalSchedulesError("The local Schedules session does not match this project instance. Restart vercel dev in this directory.");return new SchedulesClient(client,{local:session})}var import_ms7=__toESM(require_ms(),1),MAX_IDENTIFIER_LENGTH=256,IDENTIFIER_PATTERN=/^[0-9A-Za-z][0-9A-Za-z._-]*$/,MAX_QUEUE_TOPIC_LENGTH=256,QUEUE_TOPIC_PATTERN=/^[A-Za-z0-9_-]+$/,MAX_JITTER_MINUTES=15,LOCAL_MINUTE_DATETIME_PATTERN=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})$/,LOCAL_SECOND_DATETIME_PATTERN=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})$/,TIMEZONE_PATTERN=/^[A-Za-z][A-Za-z0-9_+/-]*$/;function validateScheduleIdentifier(value,label){if(value.length>MAX_IDENTIFIER_LENGTH)return`${label} must be at most ${MAX_IDENTIFIER_LENGTH} characters.`;if(!IDENTIFIER_PATTERN.test(value))return`${label} must start with a letter or number and can contain only letters, numbers, periods, underscores, and hyphens.`}function validateScheduleTimezone(value){if(value!==void 0){if(value.length===0||value.length>50||!TIMEZONE_PATTERN.test(value))return"`--timezone` must be a valid IANA timezone.";try{new Intl.DateTimeFormat("en-US",{timeZone:value})}catch{return"`--timezone` must be a valid IANA timezone."}}}function validateScheduleQueueTopic(value){if(value.length>MAX_QUEUE_TOPIC_LENGTH||!QUEUE_TOPIC_PATTERN.test(value))return"`--topic` must be 1\u2013256 characters and contain only letters, numbers, underscores, and hyphens."}function normalizeLocalDatetime(value){let secondMatch=LOCAL_SECOND_DATETIME_PATTERN.exec(value);if(secondMatch){if(secondMatch[6]!=="00")return}else LOCAL_MINUTE_DATETIME_PATTERN.test(value)&&(value=`${value}:00`);let match=LOCAL_SECOND_DATETIME_PATTERN.exec(value);if(!match)return;let[,yearValue,monthValue,dayValue,hourValue,minuteValue]=match,year=Number(yearValue),month=Number(monthValue),day=Number(dayValue),hour=Number(hourValue),minute=Number(minuteValue),daysInMonth=[31,year%4===0&&(year%100!==0||year%400===0)?29:28,31,30,31,30,31,31,30,31,30,31];if(!(month<1||month>12||day<1||day>daysInMonth[month-1]||hour<0||hour>23||minute<0||minute>59))return value}function parseScheduleExpression(cron,at,required){if(cron!==void 0&&at!==void 0)return{valid:!1,error:"Use either `--cron` or `--at`, not both."};if(cron!==void 0)return cron.trim()?{valid:!0,value:{type:"cron",cron}}:{valid:!1,error:"`--cron` cannot be empty."};if(at!==void 0){let normalized=normalizeLocalDatetime(at);return normalized===void 0?{valid:!1,error:"`--at` must use YYYY-MM-DDTHH:mm or YYYY-MM-DDTHH:mm:00 without a timezone suffix. Use `--timezone` to select the timezone."}:{valid:!0,value:{type:"single",at:normalized}}}return required?{valid:!1,error:"A schedule expression is required. Use `--cron` or `--at`."}:{valid:!0,value:void 0}}function validateJitter(value){return!Number.isInteger(value)||value<1||value>MAX_JITTER_MINUTES?{valid:!1,error:"`--jitter` must be an integer between 1 and 15."}:{valid:!0,value}}function parseCreateJitter(value){return value===void 0?{valid:!0,value:void 0}:validateJitter(value)}function parseUpdateJitter(value){return value===void 0?{valid:!0,value:void 0}:value==="none"?{valid:!0,value:null}:validateJitter(Number(value))}function parseSchedulePayload(value){if(value===void 0)return{valid:!0,value:void 0};try{return{valid:!0,value:JSON.parse(value)}}catch{return{valid:!1,error:"`--payload` must be valid JSON."}}}var UNIX_MILLISECONDS_PATTERN=/^\d+$/,ISO_DATE_PATTERN=/^(\d{4})-(\d{2})-(\d{2})/,DURATION_PATTERN=/^\d+(?:\.\d+)?\s*[a-z]+$/i;function parseEnableUntil(until,duration,now=Date.now()){if(until!==void 0&&duration!==void 0)return{valid:!1,error:"`--until` and `--for` cannot be used together."};if(duration!==void 0){let durationMs=DURATION_PATTERN.test(duration.trim())?(0,import_ms7.default)(duration.trim()):void 0;return durationMs===void 0||!(durationMs>0)?{valid:!1,error:"`--for` must be a duration such as 30m, 5h, or 10s."}:{valid:!0,value:now+durationMs}}if(until===void 0)return{valid:!0,value:void 0};let untilMs,isoDate=ISO_DATE_PATTERN.exec(until);if(UNIX_MILLISECONDS_PATTERN.test(until))untilMs=Number(until);else if(isoDate){let[,year,month,day]=isoDate.map(Number),daysInMonth=new Date(Date.UTC(year,month,0)).getUTCDate();untilMs=day>=1&&day<=daysInMonth?Date.parse(until):NaN}else return{valid:!1,error:DURATION_PATTERN.test(until.trim())?`\`--until\` must be a time, not a duration. Use \`--for ${until.trim()}\` instead.`:"`--until` must be an ISO 8601 time or Unix milliseconds."};return Number.isFinite(untilMs)?untilMs<=now?{valid:!1,error:"`--until` must be in the future."}:{valid:!0,value:untilMs}:{valid:!1,error:"`--until` must be an ISO 8601 time or Unix milliseconds."}}var routingFlags2=getFlagsSpecification([...schedulesCommand.subcommands.flatMap(command2=>[...command2.options]),...executionsListSubcommand.options]);function takeScheduleCommand(argv){return takeCommand(argv,routingFlags2)}function scheduleCommandWithGlobalFlags(client,usage){let local=!1;try{local=!!parseArguments(client.argv.slice(2),routingFlags2,{permissive:!0}).flags["--local"]}catch{}return buildCommandWithGlobalFlags(client.argv,`${usage}${local?" --local":""}`,void 0,{excludeFlags:local?["--scope","--team"]:[]})}function validateLocalScheduleFlags(client,flags,usage){if(flags["--environment"]!==void 0&&flags["--git-branch"]!==void 0)return invalidScheduleArguments(client,usage,"Use either --environment or --git-branch, not both.");if(flags["--environment"]!==void 0&&flags["--user"]!==void 0)return invalidScheduleArguments(client,usage,"Use either --environment or --user, not both.");if(!flags["--local"])return;for(let flag of["--environment","--git-branch","--user"])if(flags[flag]!==void 0)return invalidScheduleArguments(client,usage,`Cannot combine --local with ${flag}. Local Schedules uses the current vercel dev session.`);let originalFlags;try{originalFlags=parseArguments(client.argv.slice(2),routingFlags2,{permissive:!0}).flags}catch(error){return invalidScheduleArguments(client,usage,error instanceof Error?error.message:String(error))}for(let flag of["--scope","--team","--token"])if(flags[flag]!==void 0||originalFlags[flag]!==void 0)return invalidScheduleArguments(client,usage,`Cannot combine --local with ${flag}. Local Schedules uses the current vercel dev session.`)}function unsupportedLocalExecutions(client){let message="Execution history is not supported for local Schedules. Inspect the vercel dev output for local executions.";return client.nonInteractive?outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.API_ERROR,message,retryable:!1}):output_manager_default.fatal(message),1}async function resolveSchedulesClient(client,flags){if(flags["--local"])try{let schedules=await createLocalSchedulesClient(client);return output_manager_default.log(`Using local Schedules at ${schedules.localOrigin}`),schedules}catch(error){let message=error instanceof Error?error.message:String(error);return client.nonInteractive?outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.API_ERROR,message,retryable:!1}):output_manager_default.fatal(message),1}let link=await requireProjectContext(client,"schedules");return typeof link=="number"?link:new SchedulesClient(client,{ownerId:link.org.id,projectId:link.project.id,environment:flags["--environment"]==="production"?void 0:flags["--environment"],gitBranch:flags["--git-branch"],user:flags["--user"]})}function scheduleTrackArgs(flags){let args=[];return flags["--environment"]!==void 0&&flags["--environment"]!=="production"&&args.push(`--environment ${quoteArg(flags["--environment"])}`),flags["--git-branch"]!==void 0&&args.push(`--git-branch ${quoteArg(flags["--git-branch"])}`),flags["--user"]!==void 0&&args.push(`--user ${quoteArg(flags["--user"])}`),args}function invalidScheduleArguments(client,usage,message){return client.nonInteractive?(outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message,next:[{command:scheduleCommandWithGlobalFlags(client,usage),when:"Provide valid schedule arguments"}]}),2):(output_manager_default.fatal(message),2)}function validateScheduleNameAndNamespace(client,args,namespaceFlag,usage){let[name]=args;if(!name)return{valid:!1,exitCode:invalidScheduleArguments(client,usage,"A schedule name is required")};if(args.length!==1)return{valid:!1,exitCode:invalidScheduleArguments(client,usage,`Expected one schedule name. Usage: ${getCommandName(usage)}`)};let namespace=namespaceFlag??DEFAULT_SCHEDULE_NAMESPACE,nameError=validateScheduleIdentifier(name,"Schedule name"),namespaceError=validateScheduleIdentifier(namespace,"Namespace"),error=nameError??namespaceError;return error?{valid:!1,exitCode:invalidScheduleArguments(client,usage,error)}:{valid:!0,name,namespace}}function parseScheduleOutput(client,usage,flags){let result=validateJsonOutput(flags);return result.valid?{valid:!0,json:result.jsonOutput||client.nonInteractive}:{valid:!1,exitCode:invalidScheduleArguments(client,usage,result.error)}}function writeScheduleMutationResult(client,schedule,message,json){if(json){let value=client.nonInteractive?{status:AGENT_STATUS.OK,schedule,message}:schedule;client.stdout.write(`${JSON.stringify(value,null,2)}
276
276
  `)}else output_manager_default.success(message);return 0}async function runScheduleAction(client,argv,action){let subcommand=action==="enable"?enableSubcommand2:action==="disable"?disableSubcommand2:invokeSubcommand,usage=`schedules ${action} <name>`,telemetry=new SchedulesActionTelemetryClient({opts:{store:client.telemetryEventStore}}),parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(subcommand.options))}catch(error){return invalidScheduleArguments(client,usage,error instanceof Error?error.message:String(error))}let{args,flags}=parsedArgs,enableFlags=flags;telemetry.trackCliFlagLocal(flags["--local"]);let conflict=validateLocalScheduleFlags(client,flags,usage);if(conflict!==void 0)return conflict;telemetry.trackCliArgumentName(args[0]),telemetry.trackCliOptionNamespace(flags["--namespace"]),telemetry.trackCliOptionEnvironment(flags["--environment"]),telemetry.trackCliOptionGitBranch(flags["--git-branch"]),telemetry.trackCliOptionUser(flags["--user"]),telemetry.trackCliOptionUntil(enableFlags["--until"]),telemetry.trackCliOptionFor(enableFlags["--for"]),telemetry.trackCliOptionFormat(flags["--format"]),telemetry.trackCliFlagJson(flags["--json"]);let identifier=validateScheduleNameAndNamespace(client,args,flags["--namespace"],usage);if(!identifier.valid)return identifier.exitCode;let outputMode=parseScheduleOutput(client,usage,flags);if(!outputMode.valid)return outputMode.exitCode;let activeUntil=parseEnableUntil(enableFlags["--until"],enableFlags["--for"]);if(!activeUntil.valid)return invalidScheduleArguments(client,usage,activeUntil.error);let schedulesClient=await resolveSchedulesClient(client,flags);if(typeof schedulesClient=="number")return schedulesClient;let presentParticiple=action==="enable"?"Enabling":action==="disable"?"Disabling":"Invoking";outputMode.json||output_manager_default.spinner(`${presentParticiple} schedule\u2026`);let schedule;try{action==="enable"?schedule=await schedulesClient.enable({...identifier,activeUntil:activeUntil.value}):action==="disable"?schedule=await schedulesClient.disable(identifier):await schedulesClient.invoke(identifier)}catch(error){return output_manager_default.stopSpinner(),handleSchedulesApiError(client,error,{action,local:flags["--local"],name:identifier.name,namespace:identifier.namespace,trackArgs:scheduleTrackArgs(flags)})}output_manager_default.stopSpinner();let pastTense=action==="enable"?"Enabled":action==="disable"?"Disabled":"Invoked",enabledUntil=schedule?.activeUntil??activeUntil.value,message=action==="enable"&&enabledUntil!==void 0?`${pastTense} schedule ${identifier.namespace}/${identifier.name} until ${new Date(enabledUntil).toISOString()} (in ${(0,import_ms8.default)(Math.max(enabledUntil-Date.now(),1e3),{long:!0})}).`:`${pastTense} schedule ${identifier.namespace}/${identifier.name}.`;if(schedule)return writeScheduleMutationResult(client,schedule,message,outputMode.json);if(outputMode.json){let result=client.nonInteractive?{status:AGENT_STATUS.OK,message}:{invoked:!0,name:identifier.name,namespace:identifier.namespace};client.stdout.write(`${JSON.stringify(result,null,2)}
277
277
  `)}else output_manager_default.success(message);return 0}var SchedulesCreateTelemetryClient=class extends TelemetryClient{trackCliArgumentName(name){name&&this.trackCliArgument({arg:"name",value:this.redactedValue})}trackCliOptionEnvironment(environment){environment&&this.trackCliOption({option:"environment",value:this.redactedValue})}trackCliOptionGitBranch(gitBranch){gitBranch&&this.trackCliOption({option:"git-branch",value:this.redactedValue})}trackCliOptionUser(user){user&&this.trackCliOption({option:"user",value:this.redactedValue})}trackCliOptionNamespace(namespace){namespace&&this.trackCliOption({option:"namespace",value:this.redactedValue})}trackCliOptionCron(cron){cron&&this.trackCliOption({option:"cron",value:this.redactedValue})}trackCliOptionAt(at){at&&this.trackCliOption({option:"at",value:this.redactedValue})}trackCliOptionTimezone(timezone){timezone&&this.trackCliOption({option:"timezone",value:timezone})}trackCliOptionJitter(jitter){jitter!==void 0&&this.trackCliOption({option:"jitter",value:String(jitter)})}trackCliOptionTopic(topic){topic&&this.trackCliOption({option:"topic",value:this.redactedValue})}trackCliOptionPayload(payload){payload!==void 0&&this.trackCliOption({option:"payload",value:this.redactedValue})}trackCliOptionFormat(format2){format2&&this.trackCliOption({option:"format",value:format2})}trackCliFlagLocal(local){local&&this.trackCliFlag("local")}trackCliFlagJson(json){json&&this.trackCliFlag("json")}};var USAGE14="schedules create <name> --cron <expression> --topic <topic>";async function create(client,argv){let telemetry=new SchedulesCreateTelemetryClient({opts:{store:client.telemetryEventStore}}),parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(createSubcommand2.options))}catch(error){return invalidScheduleArguments(client,USAGE14,error instanceof Error?error.message:String(error))}let{args,flags}=parsedArgs;telemetry.trackCliFlagLocal(flags["--local"]);let conflict=validateLocalScheduleFlags(client,flags,USAGE14);if(conflict!==void 0)return conflict;telemetry.trackCliArgumentName(args[0]),telemetry.trackCliOptionNamespace(flags["--namespace"]),telemetry.trackCliOptionEnvironment(flags["--environment"]),telemetry.trackCliOptionGitBranch(flags["--git-branch"]),telemetry.trackCliOptionUser(flags["--user"]),telemetry.trackCliOptionCron(flags["--cron"]),telemetry.trackCliOptionAt(flags["--at"]),telemetry.trackCliOptionTimezone(flags["--timezone"]),telemetry.trackCliOptionJitter(flags["--jitter"]),telemetry.trackCliOptionTopic(flags["--topic"]),telemetry.trackCliOptionPayload(flags["--payload"]),telemetry.trackCliOptionFormat(flags["--format"]),telemetry.trackCliFlagJson(flags["--json"]);let identifier=validateScheduleNameAndNamespace(client,args,flags["--namespace"],USAGE14);if(!identifier.valid)return identifier.exitCode;let expression=parseScheduleExpression(flags["--cron"],flags["--at"],!0);if(!expression.valid)return invalidScheduleArguments(client,USAGE14,expression.error);let topic=flags["--topic"];if(!topic?.trim())return invalidScheduleArguments(client,USAGE14,"A target queue topic is required. Use `--topic`.");let topicError=validateScheduleQueueTopic(topic);if(topicError)return invalidScheduleArguments(client,USAGE14,topicError);let jitter=parseCreateJitter(flags["--jitter"]);if(!jitter.valid)return invalidScheduleArguments(client,USAGE14,jitter.error);let timezoneError=validateScheduleTimezone(flags["--timezone"]);if(timezoneError)return invalidScheduleArguments(client,USAGE14,timezoneError);let payload=parseSchedulePayload(flags["--payload"]);if(!payload.valid)return invalidScheduleArguments(client,USAGE14,payload.error);let outputMode=parseScheduleOutput(client,USAGE14,flags);if(!outputMode.valid)return outputMode.exitCode;let schedules=await resolveSchedulesClient(client,flags);if(typeof schedules=="number")return schedules;outputMode.json||output_manager_default.spinner("Creating schedule\u2026");let schedule;try{schedule=await schedules.create({name:identifier.name,namespace:identifier.namespace,expression:expression.value,target:{topic},...flags["--timezone"]!==void 0&&{timezone:flags["--timezone"]},...jitter.value!==void 0&&{jitter:jitter.value},...flags["--payload"]!==void 0&&{payload:payload.value}}),trackCreatedId(client,"schedule",schedule.scheduleId)}catch(error){return output_manager_default.stopSpinner(),handleSchedulesApiError(client,error,{action:"create",local:flags["--local"],name:identifier.name,namespace:identifier.namespace,trackArgs:scheduleTrackArgs(flags)})}return output_manager_default.stopSpinner(),writeScheduleMutationResult(client,schedule,`Created schedule ${identifier.namespace}/${identifier.name}.`,outputMode.json)}var SchedulesDeleteTelemetryClient=class extends TelemetryClient{trackCliArgumentName(name){name&&this.trackCliArgument({arg:"name",value:this.redactedValue})}trackCliOptionEnvironment(environment){environment&&this.trackCliOption({option:"environment",value:this.redactedValue})}trackCliOptionGitBranch(gitBranch){gitBranch&&this.trackCliOption({option:"git-branch",value:this.redactedValue})}trackCliOptionUser(user){user&&this.trackCliOption({option:"user",value:this.redactedValue})}trackCliOptionNamespace(namespace){namespace&&this.trackCliOption({option:"namespace",value:this.redactedValue})}trackCliOptionConfirmName(name){this.trackRedactedCliOption("confirm-name",name)}trackCliFlagYes(yes){yes&&this.trackCliFlag("yes")}trackCliOptionFormat(format2){format2&&this.trackCliOption({option:"format",value:format2})}trackCliFlagLocal(local){local&&this.trackCliFlag("local")}trackCliFlagJson(json){json&&this.trackCliFlag("json")}};var USAGE15="schedules delete <name>";async function deleteSchedule(client,argv){let telemetry=new SchedulesDeleteTelemetryClient({opts:{store:client.telemetryEventStore}}),parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(deleteSubcommand3.options))}catch(error){return invalidScheduleArguments(client,USAGE15,error instanceof Error?error.message:String(error))}let{args,flags}=parsedArgs;telemetry.trackCliFlagLocal(flags["--local"]);let conflict=validateLocalScheduleFlags(client,flags,USAGE15);if(conflict!==void 0)return conflict;telemetry.trackCliArgumentName(args[0]),telemetry.trackCliOptionNamespace(flags["--namespace"]),telemetry.trackCliOptionEnvironment(flags["--environment"]),telemetry.trackCliOptionGitBranch(flags["--git-branch"]),telemetry.trackCliOptionUser(flags["--user"]),telemetry.trackCliOptionConfirmName(flags["--confirm-name"]),telemetry.trackCliFlagYes(flags["--yes"]),telemetry.trackCliOptionFormat(flags["--format"]),telemetry.trackCliFlagJson(flags["--json"]);let identifier=validateScheduleNameAndNamespace(client,args,flags["--namespace"],USAGE15);if(!identifier.valid)return identifier.exitCode;let outputMode=parseScheduleOutput(client,USAGE15,flags);if(!outputMode.valid)return outputMode.exitCode;let schedules=await resolveSchedulesClient(client,flags);if(typeof schedules=="number")return schedules;let target=flags["--local"]?"local schedule":"schedule",approval=await requireApproval(client,deleteSubcommand3.consequence,{kind:"delete",noun:target,target:identifier.name,effects:[`Deletes ${target} ${identifier.namespace}/${identifier.name}. It stops running.`,"This cannot be undone."]},flags,{legacy:{stopExitCode:1,stopStatus:"error",declineExitCode:0,pipedAnswer:!0}});if(!approval.approved)return approval.exitCode;outputMode.json||output_manager_default.spinner("Deleting schedule\u2026");let deletedScheduleId;try{deletedScheduleId=(await schedules.delete(identifier)).scheduleId}catch(error){return output_manager_default.stopSpinner(),handleSchedulesApiError(client,error,{action:"delete",local:flags["--local"],name:identifier.name,namespace:identifier.namespace,trackArgs:scheduleTrackArgs(flags)})}output_manager_default.stopSpinner();let message=`Deleted ${target} ${identifier.namespace}/${identifier.name}.`;if(outputMode.json){let deleted={name:identifier.name,namespace:identifier.namespace,scheduleId:deletedScheduleId},result=client.nonInteractive?{status:AGENT_STATUS.OK,deleted,message}:{deleted:!0,...deleted};client.stdout.write(`${JSON.stringify(withWarnings(result,approval.warnings),null,2)}
278
278
  `)}else output_manager_default.success(message);return 0}var import_chalk35=__toESM(require_source(),1);var SchedulesListExecutionsTelemetryClient=class extends TelemetryClient{trackCliArgumentName(name){name&&this.trackCliArgument({arg:"name",value:this.redactedValue})}trackCliOptionEnvironment(environment){environment&&this.trackCliOption({option:"environment",value:this.redactedValue})}trackCliOptionGitBranch(gitBranch){gitBranch&&this.trackCliOption({option:"git-branch",value:this.redactedValue})}trackCliOptionUser(user){user&&this.trackCliOption({option:"user",value:this.redactedValue})}trackCliOptionNamespace(namespace){namespace&&this.trackCliOption({option:"namespace",value:this.redactedValue})}trackCliOptionLimit(limit){limit!==void 0&&this.trackCliOption({option:"limit",value:String(limit)})}trackCliOptionNext(next){next&&this.trackCliOption({option:"next",value:this.redactedValue})}trackCliOptionSort(sort){sort&&this.trackCliOption({option:"sort",value:sort})}trackCliOptionSince(since){since&&this.trackCliOption({option:"since",value:this.redactedValue})}trackCliOptionUntil(until){until&&this.trackCliOption({option:"until",value:this.redactedValue})}trackCliOptionFrom(from){from!==void 0&&this.trackCliOption({option:"from",value:String(from)})}trackCliOptionTo(to){to!==void 0&&this.trackCliOption({option:"to",value:String(to)})}trackCliOptionExecution(execution){execution&&this.trackCliOption({option:"execution",value:this.redactedValue})}trackCliOptionExecutionId(executionId){executionId&&this.trackCliOption({option:"execution-id",value:this.redactedValue})}trackCliOptionFormat(format2){format2&&this.trackCliOption({option:"format",value:format2})}trackCliFlagLocal(local){local&&this.trackCliFlag("local")}trackCliFlagJson(json){json&&this.trackCliFlag("json")}};var USAGE16="schedules executions list <name>",MAX_EXECUTION_RANGE_MS=30*864e5;function invalidArguments(client,message){return client.nonInteractive?(outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message,next:[{command:buildCommandWithGlobalFlags(client.argv,USAGE16),when:"List schedule executions with valid options"}]}),2):(output_manager_default.fatal(message),2)}function capitalize(value){return`${value.charAt(0).toUpperCase()}${value.slice(1)}`}function formatExecutionStatus(status){return status==="succeeded"?import_chalk35.default.green("Succeeded"):status==="failed"?import_chalk35.default.red("Failed"):import_chalk35.default.gray("Unavailable")}function formatPercentage(value){return value===null?import_chalk35.default.gray("-"):`${Number((value*100).toFixed(2))}%`}function formatDuration(value){return value===null?import_chalk35.default.gray("-"):value<1e3?`${Math.round(value)}ms`:value<6e4?`${Number((value/1e3).toFixed(1))}s`:`${Number((value/6e4).toFixed(1))}m`}function formatInvocationCount(value){return`${value} invocation${value===1?"":"s"}`}function executionMetrics(metrics){return[formatAlignedLabel("Range",`${formatDate(metrics.from)} \u2013 ${formatDate(metrics.to)}`),formatAlignedLabel("Recorded",formatInvocationCount(metrics.recordedInvocations)),formatAlignedLabel("Failed",formatInvocationCount(metrics.failedInvocations)),formatAlignedLabel("Error Rate",formatPercentage(metrics.errorRate)),formatAlignedLabel("Avg Duration",formatDuration(metrics.averageDurationMs))].join(`
package/dist/index.js CHANGED
@@ -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{handleCommandTypo}from"./chunks/chunk-V7VHLSYL.js";import{findCommandShorthands,findHiddenShorthandOption}from"./chunks/chunk-QAVUE3TR.js";import{earlyGetConfig,exitWithUnexpectedError,getDirectBuildFallbackAttributes,handleUnexpectedError,installProcessGuards,isOutputDebugEnabled,registerUnexpectedErrorHandlers,reportError,resolveNonInteractive}from"./chunks/chunk-DWA7B7TB.js";import{canAutoUpdate,executeAutomaticUpgrade,executeUpgrade,flagConsumesValue,getWhoamiCachedAnswer,hasAutoUpdatePreference,require_fetch_dist_tags,scheduleNativeAutoUpdate,setAutoUpdate}from"./chunks/chunk-PIGJVJNM.js";import{require_xdg_app_paths}from"./chunks/chunk-BFS4K2RF.js";import"./chunks/chunk-7PK2JFEH.js";import{getUpdateCommand}from"./chunks/chunk-6KI5LJIB.js";import"./chunks/chunk-TABMJZVW.js";import"./chunks/chunk-U56NHYAH.js";import{help}from"./chunks/chunk-7OOCSVWT.js";import{isNativeBinaryInstall}from"./chunks/chunk-5F4RJ32E.js";import"./chunks/chunk-KNKGJD5J.js";import{box}from"./chunks/chunk-VJM3WCEC.js";import"./chunks/chunk-MAIZY5BV.js";import{matchesCliApiTag}from"./chunks/chunk-JPJ6HGAN.js";import{getNetworkFailureCause}from"./chunks/chunk-KXK4TF6L.js";import"./chunks/chunk-5QC4IKRZ.js";import{RootTelemetryClient,asksForVersion,deployAcceptsOptions,findBetaCommand,getCommandPathOptions,printCommandHelp,printGroupHelp,printUnknownCommand,rewriteMovedCommand,tokensAfterCommand}from"./chunks/chunk-OICSITNU.js";import{require_semver}from"./chunks/chunk-IZV6K7RR.js";import{isInteractiveHumanRun}from"./chunks/chunk-O256QMQM.js";import"./chunks/chunk-K7YK4PZP.js";import{isGuidanceEnabled}from"./chunks/chunk-TAAWMNNL.js";import{getFalseValueWarnings}from"./chunks/chunk-MJKDKZ2J.js";import{getTeams}from"./chunks/chunk-GILTW5RJ.js";import{param}from"./chunks/chunk-ERMHTPO4.js";import{commands,commandsStructs,executionsListSubcommand,schedulesCommand}from"./chunks/chunk-ILUU3SGP.js";import"./chunks/chunk-4MAA4BQD.js";import"./chunks/chunk-GO64LSUW.js";import"./chunks/chunk-TUPVVZ4I.js";import"./chunks/chunk-XHWA436J.js";import"./chunks/chunk-OXQKWOLS.js";import"./chunks/chunk-HXIOR7P6.js";import"./chunks/chunk-M3LYYAQ6.js";import"./chunks/chunk-L74PQVPL.js";import"./chunks/chunk-CHTFRAXA.js";import"./chunks/chunk-T2IZUTGY.js";import"./chunks/chunk-3F3WNT5K.js";import"./chunks/chunk-P7GA2C6N.js";import"./chunks/chunk-RPYIWRSN.js";import"./chunks/chunk-CDO5IECP.js";import"./chunks/chunk-6XXXPJBV.js";import"./chunks/chunk-HT5EXCYX.js";import"./chunks/chunk-RACUGILV.js";import"./chunks/chunk-R3ZPLQDI.js";import"./chunks/chunk-QPPFQREO.js";import"./chunks/chunk-X2UJGCIC.js";import"./chunks/chunk-XZYVBYUY.js";import"./chunks/chunk-EZ3HXFLB.js";import"./chunks/chunk-WMIZ6Y4E.js";import"./chunks/chunk-QPNYOR6O.js";import"./chunks/chunk-JGEJY7AC.js";import"./chunks/chunk-LBJ7EOZM.js";import{forgetCachedTeamSlug}from"./chunks/chunk-CRPZYLIL.js";import{TelemetryEventStore,getStartupDurationMs,markStartup,require_ci_info,toCommandTrace}from"./chunks/chunk-QROPMCL2.js";import{Client,TEAM_NOT_CHOSEN,getAuthConfigFilePath,getConfigFilePath,getLinkFromDir,getLinkedProjectIdSync,getUser,getVercelDirectory,hasLocalProjectLink,highlight,isActiveAppToken,isValidAccessToken,readAuthConfigFile,readConfigFile,require_lib,resolveAppTokenScope,writeToConfigFile}from"./chunks/chunk-HDKEES7E.js";import"./chunks/chunk-SUD5V67L.js";import"./chunks/chunk-7TRHPXCG.js";import"./chunks/chunk-UGVOMXYR.js";import"./chunks/chunk-QRPBDCDH.js";import"./chunks/chunk-2GXP676X.js";import"./chunks/chunk-K5GE24PG.js";import"./chunks/chunk-IFMPBA4K.js";import"./chunks/chunk-KHJWQ4WP.js";import{setFetchDispatcher}from"./chunks/chunk-MY4MONOH.js";import{getGlobalPathConfig}from"./chunks/chunk-YATYCZQJ.js";import"./chunks/chunk-2ILZM77F.js";import{printError}from"./chunks/chunk-7EI554V5.js";import{getUsedDeprecatedShorthands,parseArguments,require_arg}from"./chunks/chunk-E7ICSU45.js";import{AGENT_REASON,AGENT_STATUS,getTeamByIdOrSlug,isHelpInvocation,isInvalidTokenError,shouldEmitNonInteractiveCommandError,trackAgentCommandOutcome,writeAgentError}from"./chunks/chunk-E6VQXHBD.js";import{shouldPrintVersionBanner,wantsMachineReadableOutput,warnDeprecatedInput,warnDeprecatedSubcommand}from"./chunks/chunk-BDLZ6WL2.js";import"./chunks/chunk-PH2MLBQO.js";import{require_cli_config}from"./chunks/chunk-DCFCPAFQ.js";import"./chunks/chunk-GOXGA37R.js";import{APIError,CantFindConfig,CantParseJSONFile,humanizePath}from"./chunks/chunk-MTPHHAPR.js";import{cmd,getCommandNamePlain,getTitleName}from"./chunks/chunk-EFGZK6OY.js";import{pkg_default}from"./chunks/chunk-JCDPMWKO.js";import{UNCLASSIFIED_ERROR_CODE,cliErrorFromUnknown,output_manager_default,recordCliError,recordCliErrorFromOutput,takeCliError}from"./chunks/chunk-RIXTYUYN.js";import"./chunks/chunk-7Y572CPZ.js";import{require_build_utils}from"./chunks/chunk-BVFFSUG3.js";import"./chunks/chunk-RRX2AMWY.js";import"./chunks/chunk-GUFRGEM5.js";import"./chunks/chunk-SUT2PTL3.js";import"./chunks/chunk-AX6UCTOC.js";import{require_dist}from"./chunks/chunk-4SIQE2W4.js";import"./chunks/chunk-MF43WTDT.js";import{getRootHelpCommands}from"./chunks/chunk-FUH5PBGR.js";import{configureHelpOutput}from"./chunks/chunk-7TREJIPV.js";import"./chunks/chunk-7QHUMMBA.js";import"./chunks/chunk-AUCQKYL2.js";import{arg_common_default,getFlagsSpecification,getShortFlagLongName,globalCommandOptions}from"./chunks/chunk-CUO3CYU3.js";import"./chunks/chunk-2BKALEOP.js";import{require_source}from"./chunks/chunk-UJ7YUIEJ.js";import"./chunks/chunk-L6MWUMWZ.js";import"./chunks/chunk-L4CSJDG7.js";import"./chunks/chunk-YHZXIBS7.js";import"./chunks/chunk-LPYHYTYI.js";import{__toESM}from"./chunks/chunk-NBPLUP7C.js";var import_error_utils=__toESM(require_dist(),1),import_fs_extra2=__toESM(require_lib(),1),import_chalk=__toESM(require_source(),1),import_semver2=__toESM(require_semver(),1);import{join as join2,resolve as resolve2}from"path";import{existsSync as existsSync3}from"fs";var import_semver=__toESM(require_semver(),1),import_xdg_app_paths=__toESM(require_xdg_app_paths(),1),import_fs_extra=__toESM(require_lib(),1);import{dirname,parse as parsePath,resolve as resolvePath}from"path";import{spawn}from"child_process";var import_fetch_dist_tags=__toESM(require_fetch_dist_tags(),1);function getLatestVersion({cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),distTag="latest",notifyInterval=1e3*60*60*24*3,pkg,updateCheckInterval=1e3*60*60*24,consumeNotification=!0}){if(!pkg||typeof pkg!="object"||!pkg.name||typeof pkg.name!="string")throw new TypeError("Expected package to be an object with a package name");let cacheFile=resolvePath(cacheDir,"package-updates",`${pkg.name}-${distTag}.json`),cache;try{cache=(0,import_fs_extra.readJSONSync)(cacheFile)}catch(err){err.code!=="ENOENT"&&output_manager_default?.debug(`Error reading latest package cache file: ${err}`)}if((!cache||!cache.expireAt||cache.expireAt<=Date.now())&&spawnWorker({cacheFile,distTag,name:pkg.name,updateCheckInterval}),cache){let shouldNotify=!cache.notifyAt||cache.notifyAt<=Date.now(),updateAvailable=!1;if(cache.version&&pkg.version&&(updateAvailable=import_semver.default.lt(pkg.version,cache.version)),shouldNotify&&updateAvailable)return consumeNotification&&(cache.notifyAt=Date.now()+notifyInterval,(0,import_fs_extra.outputJSONSync)(cacheFile,cache)),cache.version}}function spawnWorker(payload){let dir=dirname(__filename),script=resolvePath(dir,"dist","get-latest-worker.cjs"),{root}=parsePath(dir);for(;!(0,import_fs_extra.existsSync)(script);){if(dir=dirname(dir),dir===root){output_manager_default?.debug("Failed to find the get latest worker script!");return}script=resolvePath(dir,"dist","get-latest-worker.cjs")}output_manager_default?.debug(`Spawning ${script}`);let args=[script];output_manager_default?.debugEnabled&&args.push("--debug");let worker=spawn(process.execPath,args,{stdio:["inherit","inherit","inherit","ipc"],windowsHide:!0}),workerReadyTimer=setTimeout(()=>worker.kill(),2e3),onClose=code=>{output_manager_default?.debug(`Get latest worker exited (code ${code})`)};worker.on("close",onClose),worker.on("error",err=>{output_manager_default?.log(`Failed to spawn get latest worker: ${err.stack}`)}),worker.once("message",()=>{clearTimeout(workerReadyTimer),worker.removeListener("close",onClose),worker.send(payload),worker.unref()})}async function fetchLatestVersion({name,distTag="latest",timeout=3e3}){return(await(0,import_fetch_dist_tags.fetchDistTags)(name,{timeout}))?.[distTag]}function updateLatestVersionCache({cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),distTag="latest",name,version,updateCheckInterval=1e3*60*60*24}){let cacheFile=resolvePath(cacheDir,"package-updates",`${name}-${distTag}.json`),notifyAt;try{notifyAt=(0,import_fs_extra.readJSONSync)(cacheFile)?.notifyAt}catch{}(0,import_fs_extra.outputJSONSync)(cacheFile,{expireAt:Date.now()+updateCheckInterval,notifyAt,version})}import{URL}from"url";var SUBCOMMANDS_WITHOUT_TOKEN=["login","logout","signup","help","init","templates","build","builders","changelog","kb","docs","pricing","feedback","deploy","sandbox","board","telemetry","upgrade","version","skills","health","doctor","dr","status-page","agent","whoami"];var import_arg=__toESM(require_arg(),1);var flagsSpecification={...getFlagsSpecification([...schedulesCommand.options,...schedulesCommand.subcommands.flatMap(command=>command.options),...executionsListSubcommand.options]),"--local":Boolean,"-L":"--local","--changelog":Boolean};function parseSchedulesArguments(argv){let parsed=parseArguments(argv.slice(2),flagsSpecification,{warnDeprecated:!1});return{...parsed,args:[...argv.slice(0,2),...parsed.args]}}function isSchedulesCommand(argv){try{let{_:args}=(0,import_arg.default)({...arg_common_default(),...flagsSpecification},{argv:argv.slice(2),stopAtPositional:!0});return args[0]==="schedules"||args[0]==="help"&&args[1]==="schedules"}catch{return!1}}function isLocalSchedulesCommand(argv){try{let{args,flags}=parseSchedulesArguments(argv);return(args[2]==="schedules"||args[2]==="help"&&args[3]==="schedules")&&flags["--local"]===!0}catch{return!1}}function getSchedulesErrorContext(argv){let spec={...arg_common_default(),...flagsSpecification},local=!1,nonInteractive;for(let i=2;i<argv.length;i++){let token=argv[i];if(token==="--")break;if(!token.startsWith("-")||token==="-")continue;let options=token.startsWith("--")?[token]:[...token.slice(1)].map(letter=>`-${letter}`);for(let j=0;j<options.length;j++){let[option,value]=options[j].split(/=(.*)/,2),name=typeof spec[option]=="string"?spec[option]:option,handler=spec[name];if(!handler)break;if(handler!==Boolean){if(j<options.length-1)break;let next=argv[i+1];value===void 0&&next!==void 0&&(!next.startsWith("-")||next==="-"||handler===Number&&/^-?\d*(\.(?=\d))?\d*$/.test(next))&&i++;continue}if(name==="--local"&&(local=!0),name==="--non-interactive"){let separateFalse=value===void 0&&argv[i+1]==="false";value==="false"||separateFalse?(nonInteractive=!1,separateFalse&&i++):nonInteractive!==!1&&(nonInteractive=!0)}}}return{local,nonInteractive}}import{existsSync as existsSync2}from"fs";import{resolve}from"path";var ENTRY_POINT_FLAGS={"--version":Boolean,"-v":"--version","--changelog":Boolean,"--non-interactive":Boolean};function isGlobalOption(name,flagsSpecification2){return name in flagsSpecification2?!0:name.startsWith("--no-")&&flagsSpecification2[`--${name.slice(5)}`]===Boolean}function getGlobalOptionArity(arg2,flagsSpecification2){let name=arg2.split("=")[0];if(isGlobalOption(name,flagsSpecification2))return flagConsumesValue(arg2,flagsSpecification2)?1:0;if(arg2.startsWith("--")||arg2.includes("=")||arg2.length<3)return;let letters=arg2.slice(1).split("");for(let[i,letter]of letters.entries()){let option=`-${letter}`;if(!isGlobalOption(option,flagsSpecification2))return;if(flagConsumesValue(option,flagsSpecification2))return i===letters.length-1?1:void 0}return 0}function findCommandToken(argv){let flagsSpecification2={...arg_common_default(),...ENTRY_POINT_FLAGS};for(let index=2;index<argv.length;index++){let arg2=argv[index];if(arg2==="--")return;if(arg2.startsWith("-")){let arity=getGlobalOptionArity(arg2,flagsSpecification2);if(arity===void 0)return;index+=arity;continue}return{index,name:arg2,rest:argv.slice(index+1)}}}function getCwdOption(globalArgs){let cwd;for(let i=0;i<globalArgs.length;i++){let arg2=globalArgs[i];arg2==="--cwd"?(cwd=globalArgs[i+1],i++):arg2.startsWith("--cwd=")&&(cwd=arg2.slice(6))}return cwd}async function findExtensionInvocation(argv,{isBuiltin,cwd,find}){let command=findCommandToken(argv),globalArgs=argv.slice(2,command?.index);if(!command||await isBuiltin(command.name,globalArgs))return;let cwdOption=getCwdOption(globalArgs),resolvedCwd=cwdOption?resolve(cwd,cwdOption):cwd;if(existsSync2(resolve(resolvedCwd,command.name)))return;let path=await find(command.name,resolvedCwd);if(path)return{name:command.name,path,index:command.index,args:command.rest}}var import_ci_info=__toESM(require_ci_info(),1),import_cli_config=__toESM(require_cli_config(),1);var MFA_REMINDER_INTERVAL_MS=7*24*60*60*1e3,MFA_SETUP_URL="https://vercel.com/account/settings/authentication?setup=authenticator",MFA_REMINDER_COMMANDS=new Set(["deploy","login","logout"]),LOOKUP_BEFORE_COMMAND=new Set(["logout"]);async function prepareMfaReminder(client2,command){if(!command)return;let isFirstRun=client2.config.usedBefore===!1;if(!(!MFA_REMINDER_COMMANDS.has(command)&&!isFirstRun)&&!(!canShowMfaReminder(client2,command)||!isMfaReminderDue(client2))){if(!LOOKUP_BEFORE_COMMAND.has(command))return{command};if(client2.authConfig.token)return{command,userBeforeCommand:await lookUpUser(client2)}}}async function showMfaReminder(client2,state,exitCode){if(!state||exitCode!==0)return;let user=state.userBeforeCommand;if(!LOOKUP_BEFORE_COMMAND.has(state.command)){if(!client2.authConfig.token)return;user=await lookUpUser(client2)}if(recordMfaReminderCheck(client2),!user||user.mfa?.enabled)return;let lines=["Help protect your Vercel account from unauthorized access with two-factor authentication (2FA).",MFA_SETUP_URL];client2.isAgent&&lines.push("The account owner must enable 2FA in a browser. Give this link to the user."),output_manager_default.print(`
7
+ import{handleCommandTypo}from"./chunks/chunk-V7VHLSYL.js";import{findCommandShorthands,findHiddenShorthandOption}from"./chunks/chunk-QAVUE3TR.js";import{earlyGetConfig,exitWithUnexpectedError,getDirectBuildFallbackAttributes,handleUnexpectedError,installProcessGuards,isOutputDebugEnabled,registerUnexpectedErrorHandlers,reportError,resolveNonInteractive}from"./chunks/chunk-Z3Z5GBKO.js";import{canAutoUpdate,executeAutomaticUpgrade,executeUpgrade,flagConsumesValue,getWhoamiCachedAnswer,hasAutoUpdatePreference,require_fetch_dist_tags,scheduleNativeAutoUpdate,setAutoUpdate}from"./chunks/chunk-PIGJVJNM.js";import{require_xdg_app_paths}from"./chunks/chunk-BFS4K2RF.js";import"./chunks/chunk-7PK2JFEH.js";import{getUpdateCommand}from"./chunks/chunk-6KI5LJIB.js";import"./chunks/chunk-TABMJZVW.js";import"./chunks/chunk-U56NHYAH.js";import{help}from"./chunks/chunk-7OOCSVWT.js";import{isNativeBinaryInstall}from"./chunks/chunk-5F4RJ32E.js";import"./chunks/chunk-KNKGJD5J.js";import{box}from"./chunks/chunk-VJM3WCEC.js";import"./chunks/chunk-MAIZY5BV.js";import{matchesCliApiTag}from"./chunks/chunk-JPJ6HGAN.js";import{getNetworkFailureCause}from"./chunks/chunk-KXK4TF6L.js";import"./chunks/chunk-5QC4IKRZ.js";import{RootTelemetryClient,asksForVersion,deployAcceptsOptions,findBetaCommand,getCommandPathOptions,printCommandHelp,printGroupHelp,printUnknownCommand,rewriteMovedCommand,tokensAfterCommand}from"./chunks/chunk-DRNUHJ6I.js";import{require_semver}from"./chunks/chunk-IZV6K7RR.js";import{isInteractiveHumanRun}from"./chunks/chunk-O256QMQM.js";import"./chunks/chunk-K7YK4PZP.js";import{isGuidanceEnabled}from"./chunks/chunk-TAAWMNNL.js";import{getFalseValueWarnings}from"./chunks/chunk-MJKDKZ2J.js";import{getTeams}from"./chunks/chunk-GILTW5RJ.js";import{param}from"./chunks/chunk-ERMHTPO4.js";import{commands,commandsStructs,executionsListSubcommand,schedulesCommand}from"./chunks/chunk-R6LM3MBK.js";import"./chunks/chunk-XHWA436J.js";import"./chunks/chunk-4MAA4BQD.js";import"./chunks/chunk-OXQKWOLS.js";import"./chunks/chunk-GO64LSUW.js";import"./chunks/chunk-M3LYYAQ6.js";import"./chunks/chunk-TUPVVZ4I.js";import"./chunks/chunk-HXIOR7P6.js";import"./chunks/chunk-CHTFRAXA.js";import"./chunks/chunk-T2IZUTGY.js";import"./chunks/chunk-3F3WNT5K.js";import"./chunks/chunk-P7GA2C6N.js";import"./chunks/chunk-RPYIWRSN.js";import"./chunks/chunk-CDO5IECP.js";import"./chunks/chunk-6XXXPJBV.js";import"./chunks/chunk-L74PQVPL.js";import"./chunks/chunk-HT5EXCYX.js";import"./chunks/chunk-TTJWZ3ZW.js";import"./chunks/chunk-R3ZPLQDI.js";import"./chunks/chunk-QPPFQREO.js";import"./chunks/chunk-X2UJGCIC.js";import"./chunks/chunk-XZYVBYUY.js";import"./chunks/chunk-EZ3HXFLB.js";import"./chunks/chunk-WMIZ6Y4E.js";import"./chunks/chunk-QPNYOR6O.js";import"./chunks/chunk-JGEJY7AC.js";import"./chunks/chunk-LBJ7EOZM.js";import{forgetCachedTeamSlug}from"./chunks/chunk-CRPZYLIL.js";import{TelemetryEventStore,getStartupDurationMs,markStartup,require_ci_info,toCommandTrace}from"./chunks/chunk-QROPMCL2.js";import{Client,TEAM_NOT_CHOSEN,getAuthConfigFilePath,getConfigFilePath,getLinkFromDir,getLinkedProjectIdSync,getUser,getVercelDirectory,hasLocalProjectLink,highlight,isActiveAppToken,isValidAccessToken,readAuthConfigFile,readConfigFile,require_lib,resolveAppTokenScope,writeToConfigFile}from"./chunks/chunk-HDKEES7E.js";import"./chunks/chunk-SUD5V67L.js";import"./chunks/chunk-7TRHPXCG.js";import"./chunks/chunk-UGVOMXYR.js";import"./chunks/chunk-QRPBDCDH.js";import"./chunks/chunk-2GXP676X.js";import"./chunks/chunk-K5GE24PG.js";import"./chunks/chunk-IFMPBA4K.js";import"./chunks/chunk-KHJWQ4WP.js";import{setFetchDispatcher}from"./chunks/chunk-MY4MONOH.js";import{getGlobalPathConfig}from"./chunks/chunk-YATYCZQJ.js";import"./chunks/chunk-2ILZM77F.js";import{printError}from"./chunks/chunk-7EI554V5.js";import{getUsedDeprecatedShorthands,parseArguments,require_arg}from"./chunks/chunk-E7ICSU45.js";import{AGENT_REASON,AGENT_STATUS,getTeamByIdOrSlug,isHelpInvocation,isInvalidTokenError,shouldEmitNonInteractiveCommandError,trackAgentCommandOutcome,writeAgentError}from"./chunks/chunk-E6VQXHBD.js";import{shouldPrintVersionBanner,wantsMachineReadableOutput,warnDeprecatedInput,warnDeprecatedSubcommand}from"./chunks/chunk-BDLZ6WL2.js";import"./chunks/chunk-PH2MLBQO.js";import{require_cli_config}from"./chunks/chunk-DCFCPAFQ.js";import"./chunks/chunk-GOXGA37R.js";import{APIError,CantFindConfig,CantParseJSONFile,humanizePath}from"./chunks/chunk-MTPHHAPR.js";import{cmd,getCommandNamePlain,getTitleName}from"./chunks/chunk-EFGZK6OY.js";import{pkg_default}from"./chunks/chunk-JCDPMWKO.js";import{UNCLASSIFIED_ERROR_CODE,cliErrorFromUnknown,output_manager_default,recordCliError,recordCliErrorFromOutput,takeCliError}from"./chunks/chunk-RIXTYUYN.js";import"./chunks/chunk-7Y572CPZ.js";import{require_build_utils}from"./chunks/chunk-BVFFSUG3.js";import"./chunks/chunk-RRX2AMWY.js";import"./chunks/chunk-GUFRGEM5.js";import"./chunks/chunk-SUT2PTL3.js";import"./chunks/chunk-AX6UCTOC.js";import{require_dist}from"./chunks/chunk-4SIQE2W4.js";import"./chunks/chunk-MF43WTDT.js";import{getRootHelpCommands}from"./chunks/chunk-FUH5PBGR.js";import{configureHelpOutput}from"./chunks/chunk-7TREJIPV.js";import"./chunks/chunk-7QHUMMBA.js";import"./chunks/chunk-AUCQKYL2.js";import{arg_common_default,getFlagsSpecification,getShortFlagLongName,globalCommandOptions}from"./chunks/chunk-CUO3CYU3.js";import"./chunks/chunk-2BKALEOP.js";import{require_source}from"./chunks/chunk-UJ7YUIEJ.js";import"./chunks/chunk-L6MWUMWZ.js";import"./chunks/chunk-L4CSJDG7.js";import"./chunks/chunk-YHZXIBS7.js";import"./chunks/chunk-LPYHYTYI.js";import{__toESM}from"./chunks/chunk-NBPLUP7C.js";var import_error_utils=__toESM(require_dist(),1),import_fs_extra2=__toESM(require_lib(),1),import_chalk=__toESM(require_source(),1),import_semver2=__toESM(require_semver(),1);import{join as join2,resolve as resolve2}from"path";import{existsSync as existsSync3}from"fs";var import_semver=__toESM(require_semver(),1),import_xdg_app_paths=__toESM(require_xdg_app_paths(),1),import_fs_extra=__toESM(require_lib(),1);import{dirname,parse as parsePath,resolve as resolvePath}from"path";import{spawn}from"child_process";var import_fetch_dist_tags=__toESM(require_fetch_dist_tags(),1);function getLatestVersion({cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),distTag="latest",notifyInterval=1e3*60*60*24*3,pkg,updateCheckInterval=1e3*60*60*24,consumeNotification=!0}){if(!pkg||typeof pkg!="object"||!pkg.name||typeof pkg.name!="string")throw new TypeError("Expected package to be an object with a package name");let cacheFile=resolvePath(cacheDir,"package-updates",`${pkg.name}-${distTag}.json`),cache;try{cache=(0,import_fs_extra.readJSONSync)(cacheFile)}catch(err){err.code!=="ENOENT"&&output_manager_default?.debug(`Error reading latest package cache file: ${err}`)}if((!cache||!cache.expireAt||cache.expireAt<=Date.now())&&spawnWorker({cacheFile,distTag,name:pkg.name,updateCheckInterval}),cache){let shouldNotify=!cache.notifyAt||cache.notifyAt<=Date.now(),updateAvailable=!1;if(cache.version&&pkg.version&&(updateAvailable=import_semver.default.lt(pkg.version,cache.version)),shouldNotify&&updateAvailable)return consumeNotification&&(cache.notifyAt=Date.now()+notifyInterval,(0,import_fs_extra.outputJSONSync)(cacheFile,cache)),cache.version}}function spawnWorker(payload){let dir=dirname(__filename),script=resolvePath(dir,"dist","get-latest-worker.cjs"),{root}=parsePath(dir);for(;!(0,import_fs_extra.existsSync)(script);){if(dir=dirname(dir),dir===root){output_manager_default?.debug("Failed to find the get latest worker script!");return}script=resolvePath(dir,"dist","get-latest-worker.cjs")}output_manager_default?.debug(`Spawning ${script}`);let args=[script];output_manager_default?.debugEnabled&&args.push("--debug");let worker=spawn(process.execPath,args,{stdio:["inherit","inherit","inherit","ipc"],windowsHide:!0}),workerReadyTimer=setTimeout(()=>worker.kill(),2e3),onClose=code=>{output_manager_default?.debug(`Get latest worker exited (code ${code})`)};worker.on("close",onClose),worker.on("error",err=>{output_manager_default?.log(`Failed to spawn get latest worker: ${err.stack}`)}),worker.once("message",()=>{clearTimeout(workerReadyTimer),worker.removeListener("close",onClose),worker.send(payload),worker.unref()})}async function fetchLatestVersion({name,distTag="latest",timeout=3e3}){return(await(0,import_fetch_dist_tags.fetchDistTags)(name,{timeout}))?.[distTag]}function updateLatestVersionCache({cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),distTag="latest",name,version,updateCheckInterval=1e3*60*60*24}){let cacheFile=resolvePath(cacheDir,"package-updates",`${name}-${distTag}.json`),notifyAt;try{notifyAt=(0,import_fs_extra.readJSONSync)(cacheFile)?.notifyAt}catch{}(0,import_fs_extra.outputJSONSync)(cacheFile,{expireAt:Date.now()+updateCheckInterval,notifyAt,version})}import{URL}from"url";var SUBCOMMANDS_WITHOUT_TOKEN=["login","logout","signup","help","init","templates","build","builders","changelog","kb","docs","pricing","feedback","deploy","sandbox","board","telemetry","upgrade","version","skills","health","doctor","dr","status-page","agent","whoami"];var import_arg=__toESM(require_arg(),1);var flagsSpecification={...getFlagsSpecification([...schedulesCommand.options,...schedulesCommand.subcommands.flatMap(command=>command.options),...executionsListSubcommand.options]),"--local":Boolean,"-L":"--local","--changelog":Boolean};function parseSchedulesArguments(argv){let parsed=parseArguments(argv.slice(2),flagsSpecification,{warnDeprecated:!1});return{...parsed,args:[...argv.slice(0,2),...parsed.args]}}function isSchedulesCommand(argv){try{let{_:args}=(0,import_arg.default)({...arg_common_default(),...flagsSpecification},{argv:argv.slice(2),stopAtPositional:!0});return args[0]==="schedules"||args[0]==="help"&&args[1]==="schedules"}catch{return!1}}function isLocalSchedulesCommand(argv){try{let{args,flags}=parseSchedulesArguments(argv);return(args[2]==="schedules"||args[2]==="help"&&args[3]==="schedules")&&flags["--local"]===!0}catch{return!1}}function getSchedulesErrorContext(argv){let spec={...arg_common_default(),...flagsSpecification},local=!1,nonInteractive;for(let i=2;i<argv.length;i++){let token=argv[i];if(token==="--")break;if(!token.startsWith("-")||token==="-")continue;let options=token.startsWith("--")?[token]:[...token.slice(1)].map(letter=>`-${letter}`);for(let j=0;j<options.length;j++){let[option,value]=options[j].split(/=(.*)/,2),name=typeof spec[option]=="string"?spec[option]:option,handler=spec[name];if(!handler)break;if(handler!==Boolean){if(j<options.length-1)break;let next=argv[i+1];value===void 0&&next!==void 0&&(!next.startsWith("-")||next==="-"||handler===Number&&/^-?\d*(\.(?=\d))?\d*$/.test(next))&&i++;continue}if(name==="--local"&&(local=!0),name==="--non-interactive"){let separateFalse=value===void 0&&argv[i+1]==="false";value==="false"||separateFalse?(nonInteractive=!1,separateFalse&&i++):nonInteractive!==!1&&(nonInteractive=!0)}}}return{local,nonInteractive}}import{existsSync as existsSync2}from"fs";import{resolve}from"path";var ENTRY_POINT_FLAGS={"--version":Boolean,"-v":"--version","--changelog":Boolean,"--non-interactive":Boolean};function isGlobalOption(name,flagsSpecification2){return name in flagsSpecification2?!0:name.startsWith("--no-")&&flagsSpecification2[`--${name.slice(5)}`]===Boolean}function getGlobalOptionArity(arg2,flagsSpecification2){let name=arg2.split("=")[0];if(isGlobalOption(name,flagsSpecification2))return flagConsumesValue(arg2,flagsSpecification2)?1:0;if(arg2.startsWith("--")||arg2.includes("=")||arg2.length<3)return;let letters=arg2.slice(1).split("");for(let[i,letter]of letters.entries()){let option=`-${letter}`;if(!isGlobalOption(option,flagsSpecification2))return;if(flagConsumesValue(option,flagsSpecification2))return i===letters.length-1?1:void 0}return 0}function findCommandToken(argv){let flagsSpecification2={...arg_common_default(),...ENTRY_POINT_FLAGS};for(let index=2;index<argv.length;index++){let arg2=argv[index];if(arg2==="--")return;if(arg2.startsWith("-")){let arity=getGlobalOptionArity(arg2,flagsSpecification2);if(arity===void 0)return;index+=arity;continue}return{index,name:arg2,rest:argv.slice(index+1)}}}function getCwdOption(globalArgs){let cwd;for(let i=0;i<globalArgs.length;i++){let arg2=globalArgs[i];arg2==="--cwd"?(cwd=globalArgs[i+1],i++):arg2.startsWith("--cwd=")&&(cwd=arg2.slice(6))}return cwd}async function findExtensionInvocation(argv,{isBuiltin,cwd,find}){let command=findCommandToken(argv),globalArgs=argv.slice(2,command?.index);if(!command||await isBuiltin(command.name,globalArgs))return;let cwdOption=getCwdOption(globalArgs),resolvedCwd=cwdOption?resolve(cwd,cwdOption):cwd;if(existsSync2(resolve(resolvedCwd,command.name)))return;let path=await find(command.name,resolvedCwd);if(path)return{name:command.name,path,index:command.index,args:command.rest}}var import_ci_info=__toESM(require_ci_info(),1),import_cli_config=__toESM(require_cli_config(),1);var MFA_REMINDER_INTERVAL_MS=7*24*60*60*1e3,MFA_SETUP_URL="https://vercel.com/account/settings/authentication?setup=authenticator",MFA_REMINDER_COMMANDS=new Set(["deploy","login","logout"]),LOOKUP_BEFORE_COMMAND=new Set(["logout"]);async function prepareMfaReminder(client2,command){if(!command)return;let isFirstRun=client2.config.usedBefore===!1;if(!(!MFA_REMINDER_COMMANDS.has(command)&&!isFirstRun)&&!(!canShowMfaReminder(client2,command)||!isMfaReminderDue(client2))){if(!LOOKUP_BEFORE_COMMAND.has(command))return{command};if(client2.authConfig.token)return{command,userBeforeCommand:await lookUpUser(client2)}}}async function showMfaReminder(client2,state,exitCode){if(!state||exitCode!==0)return;let user=state.userBeforeCommand;if(!LOOKUP_BEFORE_COMMAND.has(state.command)){if(!client2.authConfig.token)return;user=await lookUpUser(client2)}if(recordMfaReminderCheck(client2),!user||user.mfa?.enabled)return;let lines=["Help protect your Vercel account from unauthorized access with two-factor authentication (2FA).",MFA_SETUP_URL];client2.isAgent&&lines.push("The account owner must enable 2FA in a browser. Give this link to the user."),output_manager_default.print(`
8
8
  `),output_manager_default.warning(lines.join(`
9
9
  `))}function canShowMfaReminder(client2,command){return!isGuidanceEnabled(client2,void 0,!0)||client2.argv.includes("--help")||client2.argv.includes("-h")?!1:isInteractiveHumanRun(client2,command)?!0:client2.isAgent&&!import_ci_info.default.isCI&&!wantsMachineReadableOutput(command,client2.argv)}function isMfaReminderDue(client2){let checkedAt=client2.config.mfaReminderCheckedAt;if(typeof checkedAt!="number")return!0;let elapsed=Date.now()-checkedAt;return elapsed<0||elapsed>=MFA_REMINDER_INTERVAL_MS}async function lookUpUser(client2){try{return await getUser(client2)}catch(err){output_manager_default.debug(`2FA reminder: user lookup failed: ${err}`);return}}function recordMfaReminderCheck(client2){let now=Date.now();client2.config.mfaReminderCheckedAt=now;try{let path=getConfigFilePath();(0,import_cli_config.writeGlobalConfigFile)(path,{...(0,import_cli_config.readGlobalConfigFile)(path),mfaReminderCheckedAt:now})}catch{output_manager_default.debug("Could not save mfaReminderCheckedAt.")}}function getCachedScopeTeamId(config,scope){return config.cachedTeamIds?.[scope]}function setCachedScopeTeamId(client2,scope,teamId,persistedTeamId){if(getCachedScopeTeamId(client2.config,scope)===teamId)return;let config=client2.config;config.cachedTeamIds={...config.cachedTeamIds,[scope]:teamId},writeToConfigFile({...config,currentTeam:persistedTeamId})}function attempt(fn){try{return fn()}catch{return}}function createRunTelemetry({isAgent,telemetry,store,getClient,getConfigIdentity,getProjectId}){let runEndTracked=!1,saveStarted=!1,trackFailedRunError=(exitCode,client2)=>{let details=takeCliError();if(exitCode===0&&!details?.reportOnSuccess||isHelpInvocation(client2?.argv??process.argv))return;let sentCodes=store.readonlyEvents.filter(event=>event.key==="error_code").map(event=>event.value);if(sentCodes.length===0)telemetry.trackErrorCode(details?.code??UNCLASSIFIED_ERROR_CODE);else if(!details?.code||!sentCodes.includes(details.code))return;telemetry.trackErrorStatus(details?.status),telemetry.trackErrorSlug(details?.slug),telemetry.trackErrorAction(details?.action),isAgent&&telemetry.trackErrorServerMessage(details?.serverMessage)},trackRunEnd=exitCode=>{if(runEndTracked)return;runEndTracked=!0;let client2=getClient();trackFailedRunError(exitCode,client2),client2&&trackAgentCommandOutcome(client2,exitCode)};return{trackRunEnd,markSaveStarted:()=>{saveStarted=!0},get saveStarted(){return saveStarted},flushOnExit:exitCode=>{if(saveStarted)return;saveStarted=!0,attempt(()=>trackRunEnd(exitCode));let client2=getClient(),identity=attempt(getConfigIdentity);attempt(()=>store.updateTeamId(client2?.config.currentTeam??identity?.teamId)),attempt(()=>store.updateUserId(client2?.authConfig.userId??identity?.userId));let projectId=attempt(getProjectId);projectId&&store.updateProjectId(projectId),attempt(()=>telemetry.trackProjectId(store.currentProjectId)),attempt(()=>store.save({detach:!0}).catch(()=>{}))}}}function captureStdoutErrors(stream){let write=stream.write;return stream.write=function(chunk,...rest){return recordCliErrorFromOutput(chunk),Reflect.apply(write,this,[chunk,...rest])},()=>{stream.write=write}}var import_cli_config2=__toESM(require_cli_config(),1);var RELEASE_NOTES_URL="https://vercel.com/docs/cli/release-notes";function getReleaseNotesUrl(version){return`${RELEASE_NOTES_URL}#vercel@${version}`}async function runUpdateMaintenance(exitCode,update){try{return await update()}catch(error){return output_manager_default.stopSpinner(),output_manager_default.debug(`Post-command update failed; preserving exit code ${exitCode??0}: ${error instanceof Error?error.message:String(error)}`),exitCode}}function shouldStartUserLookupForTelemetry({authConfig,hasTelemetryUserId}){return!hasTelemetryUserId&&!authConfig.userId&&isValidAccessToken(authConfig)}import{readFileSync}from"node:fs";import{homedir}from"node:os";import{join}from"node:path";var ACTIVE_SESSION_MARKER_PATH=join(homedir(),".config","vercel-plugin","active-session.json"),SEMVERISH_RE=/^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/;function isRecord(value){return typeof value=="object"&&value!==null}function readVercelPluginActiveSessionMarker(opts={}){let filePath=opts.filePath??ACTIVE_SESSION_MARKER_PATH,now=opts.now?.()??Date.now();try{let marker=JSON.parse(readFileSync(filePath,"utf-8"));return!isRecord(marker)||marker.schema!==1||marker.active!==!0||typeof marker.expiresAt!="number"||marker.expiresAt<=now||typeof marker.pluginVersion!="string"||!SEMVERISH_RE.test(marker.pluginVersion)?null:{pluginVersion:marker.pluginVersion}}catch{return null}}function checkGuidanceStatus({config}){process.env.FF_GUIDANCE_MODE&&(process.env.CI||process.env.VERCEL_GUIDANCE_DISABLED||config.guidance||(output_manager_default.note("The Vercel CLI can suggest common follow-up commands and steps to help guide new users."),output_manager_default.log("You can disable this feature by running:"),output_manager_default.log("vercel guidance disable"),output_manager_default.log("or by setting VERCEL_GUIDANCE_DISABLED=1"),config.guidance={enabled:!0},writeToConfigFile(config)))}import{determineAgent}from"@vercel/detect-agent";var import_build_utils=__toESM(require_build_utils(),1);import{mkdir,writeFile}from"fs/promises";try{process.cwd()}catch(err){(0,import_error_utils.isError)(err)&&err.message.includes("uv_cwd")&&(console.error("Error: The current working directory does not exist."),process.exit(1))}markStartup("module_init");var VERCEL_DIR,VERCEL_CONFIG_PATH,VERCEL_AUTH_CONFIG_PATH;function reportConfigPathArgError(err){if(!(err instanceof Error)||err.name!=="ArgError"||!["ARG_UNKNOWN_OPTION","ARG_MISSING_REQUIRED_LONGARG","ARG_MISSING_REQUIRED_SHORTARG"].includes(err.code??""))return!1;let nonInteractive=!1;for(let arg2 of process.argv.slice(2)){if(arg2==="--")break;arg2==="--non-interactive"||arg2==="--non-interactive=true"?nonInteractive=!0:arg2==="--non-interactive=false"&&(nonInteractive=!1)}return nonInteractive?process.stdout.write(`${JSON.stringify({status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message:err.message},null,2)}
10
10
  `):process.stderr.write(`\u2717 ${err.message}
@@ -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{earlyGetConfig,exitWithUnexpectedError,handleUnexpectedError,installProcessGuards,isOutputDebugEnabled,recordDirectBuildFallback,registerUnexpectedErrorHandlers,resolveNonInteractive}from"./chunks/chunk-DWA7B7TB.js";import{isNativeBinaryInstall}from"./chunks/chunk-5F4RJ32E.js";import"./chunks/chunk-KNKGJD5J.js";import"./chunks/chunk-KXK4TF6L.js";import"./chunks/chunk-K7YK4PZP.js";import{param}from"./chunks/chunk-ERMHTPO4.js";import"./chunks/chunk-ILUU3SGP.js";import"./chunks/chunk-4MAA4BQD.js";import"./chunks/chunk-GO64LSUW.js";import"./chunks/chunk-TUPVVZ4I.js";import"./chunks/chunk-XHWA436J.js";import"./chunks/chunk-OXQKWOLS.js";import"./chunks/chunk-HXIOR7P6.js";import"./chunks/chunk-M3LYYAQ6.js";import"./chunks/chunk-L74PQVPL.js";import"./chunks/chunk-CHTFRAXA.js";import"./chunks/chunk-T2IZUTGY.js";import"./chunks/chunk-3F3WNT5K.js";import"./chunks/chunk-P7GA2C6N.js";import"./chunks/chunk-RPYIWRSN.js";import"./chunks/chunk-CDO5IECP.js";import"./chunks/chunk-6XXXPJBV.js";import"./chunks/chunk-HT5EXCYX.js";import"./chunks/chunk-RACUGILV.js";import"./chunks/chunk-R3ZPLQDI.js";import"./chunks/chunk-QPPFQREO.js";import"./chunks/chunk-X2UJGCIC.js";import"./chunks/chunk-XZYVBYUY.js";import"./chunks/chunk-EZ3HXFLB.js";import"./chunks/chunk-WMIZ6Y4E.js";import"./chunks/chunk-QPNYOR6O.js";import"./chunks/chunk-JGEJY7AC.js";import"./chunks/chunk-LBJ7EOZM.js";import"./chunks/chunk-CRPZYLIL.js";import{TelemetryEventStore}from"./chunks/chunk-QROPMCL2.js";import{Client,getAuthConfigFilePath,getConfigFilePath,hasLocalProjectLink,highlight,readAuthConfigFile,readConfigFile,require_lib,writeToConfigFile}from"./chunks/chunk-HDKEES7E.js";import"./chunks/chunk-SUD5V67L.js";import"./chunks/chunk-7TRHPXCG.js";import"./chunks/chunk-UGVOMXYR.js";import"./chunks/chunk-QRPBDCDH.js";import"./chunks/chunk-2GXP676X.js";import"./chunks/chunk-K5GE24PG.js";import"./chunks/chunk-IFMPBA4K.js";import"./chunks/chunk-KHJWQ4WP.js";import{setFetchDispatcher}from"./chunks/chunk-MY4MONOH.js";import{getGlobalPathConfig}from"./chunks/chunk-YATYCZQJ.js";import"./chunks/chunk-2ILZM77F.js";import"./chunks/chunk-7EI554V5.js";import{parseArguments}from"./chunks/chunk-E7ICSU45.js";import"./chunks/chunk-E6VQXHBD.js";import{shouldPrintVersionBanner,wantsMachineReadableOutput}from"./chunks/chunk-BDLZ6WL2.js";import"./chunks/chunk-PH2MLBQO.js";import{require_cli_config}from"./chunks/chunk-DCFCPAFQ.js";import"./chunks/chunk-GOXGA37R.js";import{CantFindConfig,CantParseJSONFile,humanizePath}from"./chunks/chunk-MTPHHAPR.js";import{getTitleName}from"./chunks/chunk-EFGZK6OY.js";import{pkg_default}from"./chunks/chunk-JCDPMWKO.js";import{output_manager_default}from"./chunks/chunk-RIXTYUYN.js";import"./chunks/chunk-7Y572CPZ.js";import{require_build_utils}from"./chunks/chunk-BVFFSUG3.js";import"./chunks/chunk-RRX2AMWY.js";import"./chunks/chunk-GUFRGEM5.js";import"./chunks/chunk-SUT2PTL3.js";import"./chunks/chunk-AX6UCTOC.js";import{require_dist}from"./chunks/chunk-4SIQE2W4.js";import"./chunks/chunk-MF43WTDT.js";import"./chunks/chunk-FUH5PBGR.js";import"./chunks/chunk-7TREJIPV.js";import"./chunks/chunk-7QHUMMBA.js";import"./chunks/chunk-AUCQKYL2.js";import{getShortFlagLongName}from"./chunks/chunk-CUO3CYU3.js";import"./chunks/chunk-2BKALEOP.js";import{require_source}from"./chunks/chunk-UJ7YUIEJ.js";import"./chunks/chunk-L6MWUMWZ.js";import"./chunks/chunk-L4CSJDG7.js";import"./chunks/chunk-YHZXIBS7.js";import"./chunks/chunk-LPYHYTYI.js";import{__toESM}from"./chunks/chunk-NBPLUP7C.js";var import_chalk=__toESM(require_source(),1),import_fs_extra=__toESM(require_lib(),1),import_error_utils=__toESM(require_dist(),1),import_cli_config=__toESM(require_cli_config(),1);import{existsSync}from"node:fs";import{mkdir,writeFile}from"node:fs/promises";import{join}from"node:path";import{determineAgent}from"@vercel/detect-agent";var import_build_utils=__toESM(require_build_utils(),1);var DIRECT_GLOBAL_FLAGS=new Set(["--cwd","--debug","--global-config","--local-config","--no-color","--non-interactive","--scope","--token"]),PROXY_ENV_VARS=["HTTP_PROXY","HTTPS_PROXY","http_proxy","https_proxy","ALL_PROXY","all_proxy"],InMemoryReporter=class{constructor(){this.events=[]}report(event){this.events.push(event)}};function parseInitialArgs(argv){return parseArguments(argv,{"--version":Boolean,"-v":"--version","--changelog":Boolean,"--non-interactive":Boolean},{permissive:!0})}function getDirectBuildFallbackReason(argv=process.argv,env=process.env){let parsedArgs;try{parsedArgs=parseInitialArgs(argv)}catch{return"invalid_arguments"}if(parsedArgs.args[2]!=="build"||argv[2]!=="build")return"not_build";for(let[flag,value]of Object.entries(parsedArgs.flags))if(value!==void 0&&!DIRECT_GLOBAL_FLAGS.has(flag))return`flag:${flag}`;let separatorIndex=argv.indexOf("--");if((separatorIndex===-1?argv:argv.slice(0,separatorIndex)).some(arg=>arg==="--project"||arg.startsWith("--project=")||getShortFlagLongName(arg)==="--project"))return"project_scope";if(env.FORCE_TTY==="1")return"force_tty";if(env.FF_GUIDANCE_MODE)return"guidance_mode";if(!env.VERCEL_TELEMETRY_DISABLED)return"telemetry_enabled";if(env.VERCEL_TELEMETRY_DEBUG==="1")return"telemetry_debug";if(!env.NO_UPDATE_NOTIFIER&&!env.VERCEL&&!isNativeBinaryInstall())return"update_check"}async function runInternalBuild(){let fallbackReason=getDirectBuildFallbackReason();if(fallbackReason!==void 0){recordDirectBuildFallback(fallbackReason);return}installProcessGuards();let client;registerUnexpectedErrorHandlers(()=>client),process.env.CLAUDECODE&&process.stderr.write(`<claude-code-hint v="1" type="plugin" value="vercel@claude-plugins-official" />
7
+ import{earlyGetConfig,exitWithUnexpectedError,handleUnexpectedError,installProcessGuards,isOutputDebugEnabled,recordDirectBuildFallback,registerUnexpectedErrorHandlers,resolveNonInteractive}from"./chunks/chunk-Z3Z5GBKO.js";import{isNativeBinaryInstall}from"./chunks/chunk-5F4RJ32E.js";import"./chunks/chunk-KNKGJD5J.js";import"./chunks/chunk-KXK4TF6L.js";import"./chunks/chunk-K7YK4PZP.js";import{param}from"./chunks/chunk-ERMHTPO4.js";import"./chunks/chunk-R6LM3MBK.js";import"./chunks/chunk-XHWA436J.js";import"./chunks/chunk-4MAA4BQD.js";import"./chunks/chunk-OXQKWOLS.js";import"./chunks/chunk-GO64LSUW.js";import"./chunks/chunk-M3LYYAQ6.js";import"./chunks/chunk-TUPVVZ4I.js";import"./chunks/chunk-HXIOR7P6.js";import"./chunks/chunk-CHTFRAXA.js";import"./chunks/chunk-T2IZUTGY.js";import"./chunks/chunk-3F3WNT5K.js";import"./chunks/chunk-P7GA2C6N.js";import"./chunks/chunk-RPYIWRSN.js";import"./chunks/chunk-CDO5IECP.js";import"./chunks/chunk-6XXXPJBV.js";import"./chunks/chunk-L74PQVPL.js";import"./chunks/chunk-HT5EXCYX.js";import"./chunks/chunk-TTJWZ3ZW.js";import"./chunks/chunk-R3ZPLQDI.js";import"./chunks/chunk-QPPFQREO.js";import"./chunks/chunk-X2UJGCIC.js";import"./chunks/chunk-XZYVBYUY.js";import"./chunks/chunk-EZ3HXFLB.js";import"./chunks/chunk-WMIZ6Y4E.js";import"./chunks/chunk-QPNYOR6O.js";import"./chunks/chunk-JGEJY7AC.js";import"./chunks/chunk-LBJ7EOZM.js";import"./chunks/chunk-CRPZYLIL.js";import{TelemetryEventStore}from"./chunks/chunk-QROPMCL2.js";import{Client,getAuthConfigFilePath,getConfigFilePath,hasLocalProjectLink,highlight,readAuthConfigFile,readConfigFile,require_lib,writeToConfigFile}from"./chunks/chunk-HDKEES7E.js";import"./chunks/chunk-SUD5V67L.js";import"./chunks/chunk-7TRHPXCG.js";import"./chunks/chunk-UGVOMXYR.js";import"./chunks/chunk-QRPBDCDH.js";import"./chunks/chunk-2GXP676X.js";import"./chunks/chunk-K5GE24PG.js";import"./chunks/chunk-IFMPBA4K.js";import"./chunks/chunk-KHJWQ4WP.js";import{setFetchDispatcher}from"./chunks/chunk-MY4MONOH.js";import{getGlobalPathConfig}from"./chunks/chunk-YATYCZQJ.js";import"./chunks/chunk-2ILZM77F.js";import"./chunks/chunk-7EI554V5.js";import{parseArguments}from"./chunks/chunk-E7ICSU45.js";import"./chunks/chunk-E6VQXHBD.js";import{shouldPrintVersionBanner,wantsMachineReadableOutput}from"./chunks/chunk-BDLZ6WL2.js";import"./chunks/chunk-PH2MLBQO.js";import{require_cli_config}from"./chunks/chunk-DCFCPAFQ.js";import"./chunks/chunk-GOXGA37R.js";import{CantFindConfig,CantParseJSONFile,humanizePath}from"./chunks/chunk-MTPHHAPR.js";import{getTitleName}from"./chunks/chunk-EFGZK6OY.js";import{pkg_default}from"./chunks/chunk-JCDPMWKO.js";import{output_manager_default}from"./chunks/chunk-RIXTYUYN.js";import"./chunks/chunk-7Y572CPZ.js";import{require_build_utils}from"./chunks/chunk-BVFFSUG3.js";import"./chunks/chunk-RRX2AMWY.js";import"./chunks/chunk-GUFRGEM5.js";import"./chunks/chunk-SUT2PTL3.js";import"./chunks/chunk-AX6UCTOC.js";import{require_dist}from"./chunks/chunk-4SIQE2W4.js";import"./chunks/chunk-MF43WTDT.js";import"./chunks/chunk-FUH5PBGR.js";import"./chunks/chunk-7TREJIPV.js";import"./chunks/chunk-7QHUMMBA.js";import"./chunks/chunk-AUCQKYL2.js";import{getShortFlagLongName}from"./chunks/chunk-CUO3CYU3.js";import"./chunks/chunk-2BKALEOP.js";import{require_source}from"./chunks/chunk-UJ7YUIEJ.js";import"./chunks/chunk-L6MWUMWZ.js";import"./chunks/chunk-L4CSJDG7.js";import"./chunks/chunk-YHZXIBS7.js";import"./chunks/chunk-LPYHYTYI.js";import{__toESM}from"./chunks/chunk-NBPLUP7C.js";var import_chalk=__toESM(require_source(),1),import_fs_extra=__toESM(require_lib(),1),import_error_utils=__toESM(require_dist(),1),import_cli_config=__toESM(require_cli_config(),1);import{existsSync}from"node:fs";import{mkdir,writeFile}from"node:fs/promises";import{join}from"node:path";import{determineAgent}from"@vercel/detect-agent";var import_build_utils=__toESM(require_build_utils(),1);var DIRECT_GLOBAL_FLAGS=new Set(["--cwd","--debug","--global-config","--local-config","--no-color","--non-interactive","--scope","--token"]),PROXY_ENV_VARS=["HTTP_PROXY","HTTPS_PROXY","http_proxy","https_proxy","ALL_PROXY","all_proxy"],InMemoryReporter=class{constructor(){this.events=[]}report(event){this.events.push(event)}};function parseInitialArgs(argv){return parseArguments(argv,{"--version":Boolean,"-v":"--version","--changelog":Boolean,"--non-interactive":Boolean},{permissive:!0})}function getDirectBuildFallbackReason(argv=process.argv,env=process.env){let parsedArgs;try{parsedArgs=parseInitialArgs(argv)}catch{return"invalid_arguments"}if(parsedArgs.args[2]!=="build"||argv[2]!=="build")return"not_build";for(let[flag,value]of Object.entries(parsedArgs.flags))if(value!==void 0&&!DIRECT_GLOBAL_FLAGS.has(flag))return`flag:${flag}`;let separatorIndex=argv.indexOf("--");if((separatorIndex===-1?argv:argv.slice(0,separatorIndex)).some(arg=>arg==="--project"||arg.startsWith("--project=")||getShortFlagLongName(arg)==="--project"))return"project_scope";if(env.FORCE_TTY==="1")return"force_tty";if(env.FF_GUIDANCE_MODE)return"guidance_mode";if(!env.VERCEL_TELEMETRY_DISABLED)return"telemetry_enabled";if(env.VERCEL_TELEMETRY_DEBUG==="1")return"telemetry_debug";if(!env.NO_UPDATE_NOTIFIER&&!env.VERCEL&&!isNativeBinaryInstall())return"update_check"}async function runInternalBuild(){let fallbackReason=getDirectBuildFallbackReason();if(fallbackReason!==void 0){recordDirectBuildFallback(fallbackReason);return}installProcessGuards();let client;registerUnexpectedErrorHandlers(()=>client),process.env.CLAUDECODE&&process.stderr.write(`<claude-code-hint v="1" type="plugin" value="vercel@claude-plugins-official" />
8
8
  `);try{let exitCode=await main(c=>{client=c});return process.exitCode=exitCode,exitCode??0}catch(error){return await handleUnexpectedError(client,error),exitWithUnexpectedError(error)}}async function main(setClient){let vercelDir=getGlobalPathConfig(),traceReporter=new InMemoryReporter,rootSpan=new import_build_utils.Span({name:"vc.cli",reporter:traceReporter,attrs:{directBuild:"true"}}),parsedArgs=parseInitialArgs(process.argv);output_manager_default.initialize({debug:isOutputDebugEnabled(parsedArgs.flags["--debug"]),noColor:parsedArgs.flags["--no-color"]});let localConfigPath=parsedArgs.flags["--local-config"],localConfig=await earlyGetConfig(localConfigPath);if(localConfig instanceof CantParseJSONFile)return output_manager_default.error(`Couldn't parse JSON file ${localConfig.meta.file}.`),1;if(localConfig instanceof CantFindConfig){if(localConfigPath)return output_manager_default.error(`Couldn't find a project configuration file at
9
9
  ${localConfig.meta.paths.join(` or
10
10
  `)}`),1;localConfig=void 0}if(localConfig instanceof Error)return output_manager_default.prettyError(localConfig),1;let shortBuildLabel=void 0?` (${(void 0).split(" ")[0]})`:"",versionBanner=isNativeBinaryInstall()?`${getTitleName()} CLI ${pkg_default.version}${shortBuildLabel}`:`${getTitleName()} CLI ${pkg_default.version}${shortBuildLabel} (Node.js ${process.versions.node})`,{isAgent,agent:detectedAgent}=await determineAgent(),nonInteractiveFlag=parsedArgs.flags["--non-interactive"]===!0,{nonInteractive,explicitNonInteractiveFalse}=resolveNonInteractive({argv:process.argv,nonInteractiveFlag,isAgent,stdinIsTTY:process.stdin?.isTTY===!0});shouldPrintVersionBanner("build",process.argv,{nonInteractive})&&output_manager_default.print(`${import_chalk.default.dim(versionBanner)}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel",
3
- "version": "68.1.0",
3
+ "version": "68.2.0-snapshot-3ff96ca5e2fe",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@vercel/backends": "29.0.0",
@@ -1 +1 @@
1
- export const rootHelpCommands = [{"names":["deploy"],"description":"Deploy your project to Vercel","group":"Deploy and Develop","default":true},{"names":["activity"],"description":"List user activity events","group":"Operations and Security","default":false},{"names":["agent"],"description":"Generate Vercel deployment guidance in AGENTS.md","group":"CLI and Integrations","default":false},{"names":["agent-runs"],"description":"Inspect Agent Runs observability data","group":"Operations and Security","default":false},{"names":["ai-gateway"],"description":"Manage AI Gateway resources","group":"Data and Compute","default":false},{"names":["alerts"],"description":"List alert groups or inspect a group","group":"Operations and Security","default":false},{"names":["alias"],"description":"Interact with deployment aliases","group":"Domains and Traffic","default":false},{"names":["api"],"description":"Make authenticated HTTP requests to the Vercel API","group":"CLI and Integrations","default":false},{"names":["billing"],"description":"Manage billing for a team","group":"Account and Billing","default":false},{"names":["bisect"],"description":"Bisect the current project interactively or via an automated test script","group":"Deploy and Develop","default":false},{"names":["blob"],"description":"Interact with Vercel Blob","group":"Data and Compute","default":false},{"names":["build"],"description":"Build the project","group":"Deploy and Develop","default":false},{"names":["buy"],"description":"Purchase Vercel products for your team","group":"Account and Billing","default":false},{"names":["cache"],"description":"Manage cache for a Project","group":"Projects and Configuration","default":false},{"names":["certs"],"description":"Interact with SSL certificates","group":"Domains and Traffic","default":false},{"names":["changelog"],"description":"Show the latest Vercel product updates","group":"CLI and Integrations","default":false},{"names":["ci"],"description":"Inspect Vercel CI and rerun runs","group":"Deploy and Develop","default":false},{"names":["comments"],"description":"Review and act on Vercel Toolbar comments from the command line","group":"Operations and Security","default":false},{"names":["connect"],"description":"Manage connectors","group":"CLI and Integrations","default":false},{"names":["crons"],"description":"Manage cron jobs for a project [beta]","group":"Data and Compute","default":false},{"names":["curl"],"description":"Request deployments with protection bypass","group":"Deploy and Develop","default":false},{"names":["daemons"],"description":"Manage daemons for a project [beta]","group":"Data and Compute","default":false},{"names":["deploy-hooks"],"description":"Manage deploy hooks for Git-triggered builds","group":"Projects and Configuration","default":false},{"names":["dev"],"description":"Starts the `vercel dev` server","group":"Deploy and Develop","default":false},{"names":["dns"],"description":"Manage DNS records for your domains","group":"Domains and Traffic","default":false},{"names":["docs"],"description":"Search and read the Vercel docs","group":"CLI and Integrations","default":false},{"names":["doctor"],"description":"Check your CLI setup and show how to fix problems","group":"CLI and Integrations","default":false},{"names":["domains"],"description":"Manage domains","group":"Domains and Traffic","default":false},{"names":["drains"],"description":"Manage drains for logs, traces, analytics, Speed Insights, Connect, and audit logs","group":"Operations and Security","default":false},{"names":["drives"],"description":"Manage persistent drives for a project","group":"Data and Compute","default":false},{"names":["env"],"description":"Interact with Environment Variables for a Project","group":"Projects and Configuration","default":false},{"names":["environments"],"description":"Manage custom environments for a Project","group":"Projects and Configuration","default":false},{"names":["feedback"],"description":"Send bugs, friction, and feature requests to the Vercel team","group":"CLI and Integrations","default":false},{"names":["firewall"],"description":"Manage firewall rules and bypass settings","group":"Operations and Security","default":false},{"names":["flags"],"description":"Manage feature flags for a Vercel project","group":"Projects and Configuration","default":false},{"names":["git"],"description":"Manage your Git repository connection to the current Project","group":"Projects and Configuration","default":false},{"names":["global-config"],"description":"Manage Global Config stores (dashboard API parity)","group":"Data and Compute","default":false},{"names":["health"],"description":"Show the current Vercel platform status and recent incidents","group":"Operations and Security","default":false},{"names":["help"],"description":"Show help for a command, or find a command by task","group":"CLI and Integrations","default":false},{"names":["httpstat"],"description":"Show deployment HTTP timing","group":"Deploy and Develop","default":false},{"names":["init"],"description":"Initialize example Vercel Projects","group":"Deploy and Develop","default":false},{"names":["inspect"],"description":"Show information about a deployment","group":"Deploy and Develop","default":false},{"names":["install"],"description":"Install a marketplace integration","group":"CLI and Integrations","default":false},{"names":["integration"],"description":"Manage marketplace integrations","group":"CLI and Integrations","default":false},{"names":["kb"],"description":"Show the latest Vercel Knowledge Base guides, newest first","group":"CLI and Integrations","default":false},{"names":["kms"],"description":"Manage KMS issuers, signing keys, and project grants [beta]","group":"Operations and Security","default":false},{"names":["link"],"description":"Link a local directory to a Vercel project","group":"Projects and Configuration","default":false},{"names":["list"],"description":"List deployments","group":"Deploy and Develop","default":false},{"names":["login"],"description":"Sign in to your Vercel account","group":"Account and Billing","default":false},{"names":["logout"],"description":"Sign out the currently authenticated user","group":"Account and Billing","default":false},{"names":["logs"],"description":"Display logs","group":"Operations and Security","default":false},{"names":["mcp"],"description":"Set up MCP agents for Vercel","group":"CLI and Integrations","default":false},{"names":["metrics"],"description":"Query observability metrics for your Vercel project or team","group":"Operations and Security","default":false},{"names":["microfrontends"],"description":"Manage microfrontends groups","group":"Projects and Configuration","default":false},{"names":["monitors"],"description":"Add, inspect, list, update, and remove monitors, and manage their notification destinations","group":"Operations and Security","default":false},{"names":["networking"],"description":"Manage networking","group":"Data and Compute","default":false},{"names":["open"],"description":"Opens the current project in the Vercel Dashboard","group":"Projects and Configuration","default":false},{"names":["organizations"],"description":"Manage Vercel organizations","group":"Account and Billing","default":false},{"names":["pricing"],"description":"Compare public plan features","group":"Account and Billing","default":false},{"names":["project"],"description":"Manage your Vercel projects","group":"Projects and Configuration","default":false},{"names":["promote"],"description":"Promote an existing Deployment to current","group":"Deploy and Develop","default":false},{"names":["pull"],"description":"Pull Environment Variables and project settings into .vercel","group":"Projects and Configuration","default":false},{"names":["redeploy"],"description":"Rebuild and deploy a previous deployment","group":"Deploy and Develop","default":false},{"names":["redirects"],"description":"Manage redirects for a project","group":"Domains and Traffic","default":false},{"names":["remove"],"description":"Delete deployment(s) by project name or deployment ID","group":"Deploy and Develop","default":false},{"names":["rollback"],"description":"Roll back to a previous deployment","group":"Deploy and Develop","default":false},{"names":["rolling-release"],"description":"Shift deployment traffic in stages","group":"Deploy and Develop","default":false},{"names":["routes"],"description":"Manage routing rules for a project","group":"Domains and Traffic","default":false},{"names":["sandbox"],"description":"Interact with Vercel Sandbox","group":"Data and Compute","default":false},{"names":["schedules"],"description":"Manage schedules for the current project [beta]","group":"Data and Compute","default":false},{"names":["security"],"description":"Inspect the security posture of the current team","group":"Operations and Security","default":false},{"names":["setup"],"description":"Set up coding agents for Vercel","group":"CLI and Integrations","default":false},{"names":["signup"],"description":"Create a Vercel account and sign in","group":"Account and Billing","default":false},{"names":["skills"],"description":"Discover agent skills relevant to your project","group":"CLI and Integrations","default":false},{"names":["storage"],"description":"Manage project storage resources","group":"Data and Compute","default":false},{"names":["switch"],"description":"Switch to a different team","group":"Account and Billing","default":false},{"names":["teams"],"description":"Manage Teams under your Vercel account","group":"Account and Billing","default":false},{"names":["telemetry"],"description":"Allows you to enable or disable telemetry collection","group":"CLI and Integrations","default":false},{"names":["templates"],"description":"Find, inspect, and deploy Vercel templates","group":"Deploy and Develop","default":false},{"names":["token-pass"],"description":"Set up a coding agent with Vercel Token Pass","group":"CLI and Integrations","default":false},{"names":["tokens"],"description":"Manage your personal Vercel authentication tokens","group":"Account and Billing","default":false},{"names":["traces"],"description":"Inspect project traces and search spans across a Vercel team","group":"Operations and Security","default":false},{"names":["upgrade"],"description":"Upgrade the current global or native Vercel CLI installation","group":"CLI and Integrations","default":false},{"names":["vcr"],"description":"Manage Vercel Container Registry repositories and images (see `vcr image`)","group":"Data and Compute","default":false},{"names":["version"],"description":"Manages the installed Vercel CLI version","group":"CLI and Integrations","default":false},{"names":["webhooks"],"description":"Manage webhooks","group":"Operations and Security","default":false},{"names":["whoami"],"description":"Shows the username of the currently logged in user","group":"Account and Billing","default":false}];
1
+ export const rootHelpCommands = [{"names":["deploy"],"description":"Deploy your project to Vercel","group":"Deploy and Develop","default":true},{"names":["activity"],"description":"List user activity events","group":"Operations and Security","default":false},{"names":["agent"],"description":"Generate Vercel deployment guidance in AGENTS.md","group":"CLI and Integrations","default":false},{"names":["agent-runs"],"description":"Inspect Agent Runs observability data","group":"Operations and Security","default":false},{"names":["ai-gateway"],"description":"Manage AI Gateway resources","group":"Data and Compute","default":false},{"names":["alerts"],"description":"List alert groups, inspect, acknowledge, or mute them","group":"Operations and Security","default":false},{"names":["alias"],"description":"Interact with deployment aliases","group":"Domains and Traffic","default":false},{"names":["api"],"description":"Make authenticated HTTP requests to the Vercel API","group":"CLI and Integrations","default":false},{"names":["billing"],"description":"Manage billing for a team","group":"Account and Billing","default":false},{"names":["bisect"],"description":"Bisect the current project interactively or via an automated test script","group":"Deploy and Develop","default":false},{"names":["blob"],"description":"Interact with Vercel Blob","group":"Data and Compute","default":false},{"names":["build"],"description":"Build the project","group":"Deploy and Develop","default":false},{"names":["buy"],"description":"Purchase Vercel products for your team","group":"Account and Billing","default":false},{"names":["cache"],"description":"Manage cache for a Project","group":"Projects and Configuration","default":false},{"names":["certs"],"description":"Interact with SSL certificates","group":"Domains and Traffic","default":false},{"names":["changelog"],"description":"Show the latest Vercel product updates","group":"CLI and Integrations","default":false},{"names":["ci"],"description":"Inspect Vercel CI and rerun runs","group":"Deploy and Develop","default":false},{"names":["comments"],"description":"Review and act on Vercel Toolbar comments from the command line","group":"Operations and Security","default":false},{"names":["connect"],"description":"Manage connectors","group":"CLI and Integrations","default":false},{"names":["crons"],"description":"Manage cron jobs for a project [beta]","group":"Data and Compute","default":false},{"names":["curl"],"description":"Request deployments with protection bypass","group":"Deploy and Develop","default":false},{"names":["daemons"],"description":"Manage daemons for a project [beta]","group":"Data and Compute","default":false},{"names":["deploy-hooks"],"description":"Manage deploy hooks for Git-triggered builds","group":"Projects and Configuration","default":false},{"names":["dev"],"description":"Starts the `vercel dev` server","group":"Deploy and Develop","default":false},{"names":["dns"],"description":"Manage DNS records for your domains","group":"Domains and Traffic","default":false},{"names":["docs"],"description":"Search and read the Vercel docs","group":"CLI and Integrations","default":false},{"names":["doctor"],"description":"Check your CLI setup and show how to fix problems","group":"CLI and Integrations","default":false},{"names":["domains"],"description":"Manage domains","group":"Domains and Traffic","default":false},{"names":["drains"],"description":"Manage drains for logs, traces, analytics, Speed Insights, Connect, and audit logs","group":"Operations and Security","default":false},{"names":["drives"],"description":"Manage persistent drives for a project","group":"Data and Compute","default":false},{"names":["env"],"description":"Interact with Environment Variables for a Project","group":"Projects and Configuration","default":false},{"names":["environments"],"description":"Manage custom environments for a Project","group":"Projects and Configuration","default":false},{"names":["feedback"],"description":"Send bugs, friction, and feature requests to the Vercel team","group":"CLI and Integrations","default":false},{"names":["firewall"],"description":"Manage firewall rules and bypass settings","group":"Operations and Security","default":false},{"names":["flags"],"description":"Manage feature flags for a Vercel project","group":"Projects and Configuration","default":false},{"names":["git"],"description":"Manage your Git repository connection to the current Project","group":"Projects and Configuration","default":false},{"names":["global-config"],"description":"Manage Global Config stores (dashboard API parity)","group":"Data and Compute","default":false},{"names":["health"],"description":"Show the current Vercel platform status and recent incidents","group":"Operations and Security","default":false},{"names":["help"],"description":"Show help for a command, or find a command by task","group":"CLI and Integrations","default":false},{"names":["httpstat"],"description":"Show deployment HTTP timing","group":"Deploy and Develop","default":false},{"names":["init"],"description":"Initialize example Vercel Projects","group":"Deploy and Develop","default":false},{"names":["inspect"],"description":"Show information about a deployment","group":"Deploy and Develop","default":false},{"names":["install"],"description":"Install a marketplace integration","group":"CLI and Integrations","default":false},{"names":["integration"],"description":"Manage marketplace integrations","group":"CLI and Integrations","default":false},{"names":["kb"],"description":"Show the latest Vercel Knowledge Base guides, newest first","group":"CLI and Integrations","default":false},{"names":["kms"],"description":"Manage KMS issuers, signing keys, and project grants [beta]","group":"Operations and Security","default":false},{"names":["link"],"description":"Link a local directory to a Vercel project","group":"Projects and Configuration","default":false},{"names":["list"],"description":"List deployments","group":"Deploy and Develop","default":false},{"names":["login"],"description":"Sign in to your Vercel account","group":"Account and Billing","default":false},{"names":["logout"],"description":"Sign out the currently authenticated user","group":"Account and Billing","default":false},{"names":["logs"],"description":"Display logs","group":"Operations and Security","default":false},{"names":["mcp"],"description":"Set up MCP agents for Vercel","group":"CLI and Integrations","default":false},{"names":["metrics"],"description":"Query observability metrics for your Vercel project or team","group":"Operations and Security","default":false},{"names":["microfrontends"],"description":"Manage microfrontends groups","group":"Projects and Configuration","default":false},{"names":["monitors"],"description":"Add, inspect, list, update, and remove monitors, and manage their notification destinations","group":"Operations and Security","default":false},{"names":["networking"],"description":"Manage networking","group":"Data and Compute","default":false},{"names":["open"],"description":"Opens the current project in the Vercel Dashboard","group":"Projects and Configuration","default":false},{"names":["organizations"],"description":"Manage Vercel organizations","group":"Account and Billing","default":false},{"names":["pricing"],"description":"Compare public plan features","group":"Account and Billing","default":false},{"names":["project"],"description":"Manage your Vercel projects","group":"Projects and Configuration","default":false},{"names":["promote"],"description":"Promote an existing Deployment to current","group":"Deploy and Develop","default":false},{"names":["pull"],"description":"Pull Environment Variables and project settings into .vercel","group":"Projects and Configuration","default":false},{"names":["redeploy"],"description":"Rebuild and deploy a previous deployment","group":"Deploy and Develop","default":false},{"names":["redirects"],"description":"Manage redirects for a project","group":"Domains and Traffic","default":false},{"names":["remove"],"description":"Delete deployment(s) by project name or deployment ID","group":"Deploy and Develop","default":false},{"names":["rollback"],"description":"Roll back to a previous deployment","group":"Deploy and Develop","default":false},{"names":["rolling-release"],"description":"Shift deployment traffic in stages","group":"Deploy and Develop","default":false},{"names":["routes"],"description":"Manage routing rules for a project","group":"Domains and Traffic","default":false},{"names":["sandbox"],"description":"Interact with Vercel Sandbox","group":"Data and Compute","default":false},{"names":["schedules"],"description":"Manage schedules for the current project [beta]","group":"Data and Compute","default":false},{"names":["security"],"description":"Inspect the security posture of the current team","group":"Operations and Security","default":false},{"names":["setup"],"description":"Set up coding agents for Vercel","group":"CLI and Integrations","default":false},{"names":["signup"],"description":"Create a Vercel account and sign in","group":"Account and Billing","default":false},{"names":["skills"],"description":"Discover agent skills relevant to your project","group":"CLI and Integrations","default":false},{"names":["storage"],"description":"Manage project storage resources","group":"Data and Compute","default":false},{"names":["switch"],"description":"Switch to a different team","group":"Account and Billing","default":false},{"names":["teams"],"description":"Manage Teams under your Vercel account","group":"Account and Billing","default":false},{"names":["telemetry"],"description":"Allows you to enable or disable telemetry collection","group":"CLI and Integrations","default":false},{"names":["templates"],"description":"Find, inspect, and deploy Vercel templates","group":"Deploy and Develop","default":false},{"names":["token-pass"],"description":"Set up a coding agent with Vercel Token Pass","group":"CLI and Integrations","default":false},{"names":["tokens"],"description":"Manage your personal Vercel authentication tokens","group":"Account and Billing","default":false},{"names":["traces"],"description":"Inspect project traces and search spans across a Vercel team","group":"Operations and Security","default":false},{"names":["upgrade"],"description":"Upgrade the current global or native Vercel CLI installation","group":"CLI and Integrations","default":false},{"names":["vcr"],"description":"Manage Vercel Container Registry repositories and images (see `vcr image`)","group":"Data and Compute","default":false},{"names":["version"],"description":"Manages the installed Vercel CLI version","group":"CLI and Integrations","default":false},{"names":["webhooks"],"description":"Manage webhooks","group":"Operations and Security","default":false},{"names":["whoami"],"description":"Shows the username of the currently logged in user","group":"Account and Billing","default":false}];
package/dist/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const version = "68.1.0";
1
+ export const version = "68.2.0-snapshot-3ff96ca5e2fe";
2
2
  export const buildLabel = "";